From 789114ae24e2b8b3509d71520459553cf9b73e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4pe?= Date: Sun, 15 Mar 2020 15:17:04 +0100 Subject: [PATCH 01/17] Implementation of resource new resource type for GuardDuty S3 Export (#10920) --- aws/provider.go | 1 + aws/resource_aws_guardduty_test.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/aws/provider.go b/aws/provider.go index 7de35b36bd8..ffcb3333fe3 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -562,6 +562,7 @@ func Provider() terraform.ResourceProvider { "aws_glue_trigger": resourceAwsGlueTrigger(), "aws_glue_workflow": resourceAwsGlueWorkflow(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_publishing_destination": resourceAwsGuardDutyPublishingDestination(), "aws_guardduty_invite_accepter": resourceAwsGuardDutyInviteAccepter(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), diff --git a/aws/resource_aws_guardduty_test.go b/aws/resource_aws_guardduty_test.go index ade7489abcf..93059dec3a5 100644 --- a/aws/resource_aws_guardduty_test.go +++ b/aws/resource_aws_guardduty_test.go @@ -28,6 +28,10 @@ func TestAccAWSGuardDuty(t *testing.T) { "inviteDisassociate": testAccAwsGuardDutyMember_invite_disassociate, "invitationMessage": testAccAwsGuardDutyMember_invitationMessage, }, + "PublishDestination": { + "basic": TestAccAwsGuardDutyPublishDestination_basic, + "import": TestAccAwsGuardDutyPublishDestination_import, + }, } for group, m := range testCases { From 9014a40c746de429128efa027cb68517d78b8876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4pe?= Date: Sun, 15 Mar 2020 15:17:40 +0100 Subject: [PATCH 02/17] Added tests and documentation --- ...ce_aws_guardduty_publishing_destination.go | 192 ++++++++++++ ...s_guardduty_publishing_destination_test.go | 290 ++++++++++++++++++ ...dduty_publishing_destination.html.markdown | 148 +++++++++ 3 files changed, 630 insertions(+) create mode 100644 aws/resource_aws_guardduty_publishing_destination.go create mode 100644 aws/resource_aws_guardduty_publishing_destination_test.go create mode 100644 website/docs/r/guardduty_publishing_destination.html.markdown diff --git a/aws/resource_aws_guardduty_publishing_destination.go b/aws/resource_aws_guardduty_publishing_destination.go new file mode 100644 index 00000000000..1feb28fa803 --- /dev/null +++ b/aws/resource_aws_guardduty_publishing_destination.go @@ -0,0 +1,192 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAwsGuardDutyPublishingDestination() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGuardDutyPublishingDestinationCreate, + Read: resourceAwsGuardDutyPublishingDestinationRead, + Update: resourceAwsGuardDutyPublishingDestinationUpdate, + Delete: resourceAwsGuardDutyPublishingDestinationDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "detector_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "destination_type": { + Type: schema.TypeString, + Optional: true, + Default: "S3", + }, + "destination_arn": { + Type: schema.TypeString, + Required: true, + }, + "kms_key_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func resourceAwsGuardDutyPublishingDestinationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).guarddutyconn + + detectorID := d.Get("detector_id").(string) + input := guardduty.CreatePublishingDestinationInput{ + DetectorId: aws.String(detectorID), + DestinationProperties: &guardduty.DestinationProperties{ + DestinationArn: aws.String(d.Get("destination_arn").(string)), + KmsKeyArn: aws.String(d.Get("kms_key_arn").(string)), + }, + DestinationType: aws.String(d.Get("destination_type").(string)), + } + + log.Printf("[DEBUG] Creating GuardDuty publishing destination: %s", input) + output, err := conn.CreatePublishingDestination(&input) + if err != nil { + return fmt.Errorf("Creating GuardDuty publishing destination failed: %s", err.Error()) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{guardduty.PublishingStatusPendingVerification}, + Target: []string{guardduty.PublishingStatusPublishing}, + Refresh: guardDutyPublishingDestinationRefreshStatusFunc(conn, *output.DestinationId, detectorID), + Timeout: 5 * time.Minute, + MinTimeout: 3 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for GuardDuty PublishingDestination status to be \"%s\": %s", + guardduty.PublishingStatusPublishing, err) + } + + d.SetId(fmt.Sprintf("%s:%s", d.Get("detector_id"), *output.DestinationId)) + + return resourceAwsGuardDutyPublishingDestinationRead(d, meta) +} + +func guardDutyPublishingDestinationRefreshStatusFunc(conn *guardduty.GuardDuty, destinationID, detectorID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &guardduty.DescribePublishingDestinationInput{ + DetectorId: aws.String(detectorID), + DestinationId: aws.String(destinationID), + } + resp, err := conn.DescribePublishingDestination(input) + if err != nil { + return nil, "failed", err + } + return resp, *resp.Status, nil + } +} + +func resourceAwsGuardDutyPublishingDestinationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).guarddutyconn + + destination_id, detector_id, err_state_read := decodeGuardDutyPublishDestinationID(d.Id()) + + if err_state_read != nil { + return err_state_read + } + + input := &guardduty.DescribePublishingDestinationInput{ + DetectorId: aws.String(detector_id), + DestinationId: aws.String(destination_id), + } + + log.Printf("[DEBUG] Reading GuardDuty publishing destination: %s", input) + gdo, err := conn.DescribePublishingDestination(input) + if err != nil { + if isAWSErr(err, guardduty.ErrCodeBadRequestException, "The request is rejected because the input detectorId is not owned by the current account.") { + log.Printf("[WARN] GuardDuty publishing destination: %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Reading GuardDuty publishing destination: '%s' failed: %s", d.Id(), err.Error()) + } + + d.Set("detector_id", detector_id) + d.Set("destination_type", *gdo.DestinationType) + d.Set("kms_key_arn", *gdo.DestinationProperties.KmsKeyArn) + d.Set("destination_arn", *gdo.DestinationProperties.DestinationArn) + d.Set("status", *gdo.Status) + return nil +} + +func resourceAwsGuardDutyPublishingDestinationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).guarddutyconn + + destination_id, detector_id, err_state_read := decodeGuardDutyPublishDestinationID(d.Id()) + + if err_state_read != nil { + return err_state_read + } + + input := guardduty.UpdatePublishingDestinationInput{ + DestinationId: aws.String(destination_id), + DetectorId: aws.String(detector_id), + DestinationProperties: &guardduty.DestinationProperties{ + DestinationArn: aws.String(d.Get("destination_arn").(string)), + KmsKeyArn: aws.String(d.Get("kms_key_arn").(string)), + }, + } + + log.Printf("[DEBUG] Update GuardDuty publishing destination: %s", input) + _, err := conn.UpdatePublishingDestination(&input) + if err != nil { + return fmt.Errorf("Updating GuardDuty publishing destination '%s' failed: %s", d.Id(), err.Error()) + } + + return resourceAwsGuardDutyPublishingDestinationRead(d, meta) +} + +func resourceAwsGuardDutyPublishingDestinationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).guarddutyconn + + destination_id, detector_id, err_state_read := decodeGuardDutyPublishDestinationID(d.Id()) + + if err_state_read != nil { + return err_state_read + } + + input := guardduty.DeletePublishingDestinationInput{ + DestinationId: aws.String(destination_id), + DetectorId: aws.String(detector_id), + } + + log.Printf("[DEBUG] Delete GuardDuty publishing destination: %s", input) + _, err := conn.DeletePublishingDestination(&input) + if err != nil { + return fmt.Errorf("Deleting GuardDuty publishing destination '%s' failed: %s", d.Id(), err.Error()) + } + return nil +} + +func decodeGuardDutyPublishDestinationID(id string) (destinationID, detectorID string, err error) { + parts := strings.Split(id, ":") + if len(parts) != 2 { + err = fmt.Errorf("GuardDuty Publishing Destination ID must be of the form :, was provided: %s", id) + return + } + destinationID = parts[1] + detectorID = parts[0] + return +} diff --git a/aws/resource_aws_guardduty_publishing_destination_test.go b/aws/resource_aws_guardduty_publishing_destination_test.go new file mode 100644 index 00000000000..cf1eb952b8b --- /dev/null +++ b/aws/resource_aws_guardduty_publishing_destination_test.go @@ -0,0 +1,290 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func init() { + resource.AddTestSweepers("aws_guardduty_publishing_destination", &resource.Sweeper{ + Name: "aws_guardduty_publishing_destination", + F: testSweepGuarddutyPublishDestinations, + }) +} + +func testSweepGuarddutyPublishDestinations(region string) error { + client, err := sharedClientForRegion(region) + + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + + conn := client.(*AWSClient).guarddutyconn + var sweeperErrs *multierror.Error + + detect_input := &guardduty.ListDetectorsInput{} + + err = conn.ListDetectorsPages(detect_input, func(page *guardduty.ListDetectorsOutput, lastPage bool) bool { + for _, detectorID := range page.DetectorIds { + list_input := &guardduty.ListPublishingDestinationsInput{ + DetectorId: detectorID, + } + + err = conn.ListPublishingDestinationsPages(list_input, func(page *guardduty.ListPublishingDestinationsOutput, lastPage bool) bool { + for _, destination_element := range page.Destinations { + input := &guardduty.DeletePublishingDestinationInput{ + DestinationId: destination_element.DestinationId, + DetectorId: detectorID, + } + + log.Printf("[INFO] Deleting GuardDuty Publish Destination: %s", *destination_element.DestinationId) + _, err := conn.DeletePublishingDestination(input) + + if err != nil { + sweeperErr := fmt.Errorf("error deleting GuardDuty Pusblish Destination (%s): %w", *destination_element.DestinationId, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + } + } + return !lastPage + }) + } + return !lastPage + }) + + if err != nil { + sweeperErr := fmt.Errorf("Error receiving Guardduty detectors for publish sweep : %w", err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + } + + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping GuardDuty Publish Destination sweep for %s: %s", region, err) + return nil + } + + if err != nil { + return fmt.Errorf("error retrieving GuardDuty Publish Destinations: %s", err) + } + + return sweeperErrs.ErrorOrNil() +} + +func TestAccAwsGuardDutyPublishDestination_basic(t *testing.T) { + resourceName := "aws_guardduty_publishing_destination.test" + bucketName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsGuardDutyPublishingDestinationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsGuardDutyPublishingDestinationExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "detector_id"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "destination_arn"), + resource.TestCheckResourceAttr(resourceName, "destination_type", "S3")), + }, + }, + }) +} + +func TestAccAwsGuardDutyPublishDestination_import(t *testing.T) { + resourceName := "aws_guardduty_publishing_destination.test" + bucketName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsGuardDutyPublishingDestinationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName), + }, + + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +const testAccGuardDutyDetectorDSConfig_basic1 = ` + +data "aws_caller_identity" "current" {} + +data "aws_region" "current" {} + +data "aws_iam_policy_document" "bucket_pol" { + statement { + sid = "Allow PutObject" + actions = [ + "s3:PutObject" + ] + + resources = [ + "${aws_s3_bucket.gd_bucket.arn}/*" + ] + + principals { + type = "Service" + identifiers = ["guardduty.amazonaws.com"] + } + } + + statement { + sid = "Allow GetBucketLocation" + actions = [ + "s3:GetBucketLocation" + ] + + resources = [ + "${aws_s3_bucket.gd_bucket.arn}" + ] + + principals { + type = "Service" + identifiers = ["guardduty.amazonaws.com"] + } + } +} + +data "aws_iam_policy_document" "kms_pol" { + + statement { + sid = "Allow GuardDuty to encrypt findings" + actions = [ + "kms:GenerateDataKey" + ] + + resources = [ + "arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*" + ] + + principals { + type = "Service" + identifiers = ["guardduty.amazonaws.com"] + } + } + + statement { + sid = "Allow all users to modify/delete key (test only)" + actions = [ + "kms:*" + ] + + resources = [ + "arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*" + ] + + principals { + type = "AWS" + identifiers = [ "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root" ] + } + } + +} + +resource "aws_guardduty_detector" "test_gd" { + enable = true +} + +resource "aws_s3_bucket" "gd_bucket" { + bucket = "<>" + acl = "private" + force_destroy = true +} + +resource "aws_s3_bucket_policy" "gd_bucket_policy" { + bucket = aws_s3_bucket.gd_bucket.id + policy = data.aws_iam_policy_document.bucket_pol.json +} + +resource "aws_kms_key" "gd_key" { + description = "Temporary key for AccTest of TF" + deletion_window_in_days = 7 + policy = data.aws_iam_policy_document.kms_pol.json +}` + +func testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName string) string { + return fmt.Sprintf(` + %[1]s + + resource "aws_guardduty_publishing_destination" "test" { + detector_id = aws_guardduty_detector.test_gd.id + destination_arn = aws_s3_bucket.gd_bucket.arn + kms_key_arn = aws_kms_key.gd_key.arn + + depends_on = [ + aws_s3_bucket_policy.gd_bucket_policy, + ] + } + `, strings.Replace(testAccGuardDutyDetectorDSConfig_basic1, "<>", bucketName, 1)) +} + +func testAccCheckAwsGuardDutyPublishingDestinationExists(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) + } + + destination_id, detector_id, err_state_read := decodeGuardDutyPublishDestinationID(rs.Primary.ID) + + if err_state_read != nil { + return err_state_read + } + + input := &guardduty.DescribePublishingDestinationInput{ + DetectorId: aws.String(detector_id), + DestinationId: aws.String(destination_id), + } + + conn := testAccProvider.Meta().(*AWSClient).guarddutyconn + _, err := conn.DescribePublishingDestination(input) + return err + } +} + +func testAccCheckAwsGuardDutyPublishingDestinationDestroy(s *terraform.State) error { + + conn := testAccProvider.Meta().(*AWSClient).guarddutyconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_guardduty_publishing_destination" { + continue + } + + destination_id, detector_id, err_state_read := decodeGuardDutyPublishDestinationID(rs.Primary.ID) + + if err_state_read != nil { + return err_state_read + } + + input := &guardduty.DescribePublishingDestinationInput{ + DetectorId: aws.String(detector_id), + DestinationId: aws.String(destination_id), + } + + _, err := conn.DescribePublishingDestination(input) + // Catch expected error. + if err == nil { + return fmt.Errorf("Resource still exists.") + } + } + return nil +} diff --git a/website/docs/r/guardduty_publishing_destination.html.markdown b/website/docs/r/guardduty_publishing_destination.html.markdown new file mode 100644 index 00000000000..95ce71fd39d --- /dev/null +++ b/website/docs/r/guardduty_publishing_destination.html.markdown @@ -0,0 +1,148 @@ +--- +subcategory: "GuardDuty" +layout: aws +page_title: 'AWS: aws_guardduty_publishingdestination' +description: Provides a resource to manage a GuardDuty PublishingDestination +--- + +# Resource: aws_guardduty_publishingdestination + +Provides a resource to manage a GuardDuty PublishingDestination. Requires an existing GuardDuty Detector. + +## Example Usage + +```hcl +data "aws_caller_identity" "current" {} + +data "aws_region" "current" {} + +data "aws_iam_policy_document" "bucket_pol" { + statement { + sid = "Allow PutObject" + actions = [ + "s3:PutObject" + ] + + resources = [ + "${aws_s3_bucket.gd_bucket.arn}/*" + ] + + principals { + type = "Service" + identifiers = ["guardduty.amazonaws.com"] + } + } + + statement { + sid = "Allow GetBucketLocation" + actions = [ + "s3:GetBucketLocation" + ] + + resources = [ + "${aws_s3_bucket.gd_bucket.arn}" + ] + + principals { + type = "Service" + identifiers = ["guardduty.amazonaws.com"] + } + } +} + +data "aws_iam_policy_document" "kms_pol" { + + statement { + sid = "Allow GuardDuty to encrypt findings" + actions = [ + "kms:GenerateDataKey" + ] + + resources = [ + "arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*" + ] + + principals { + type = "Service" + identifiers = ["guardduty.amazonaws.com"] + } + } + + statement { + sid = "Allow all users to modify/delete key (test only)" + actions = [ + "kms:*" + ] + + resources = [ + "arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*" + ] + + principals { + type = "AWS" + identifiers = [ "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root" ] + } + } + +} + +resource "aws_guardduty_detector" "test_gd" { + enable = true +} + +resource "aws_s3_bucket" "gd_bucket" { + bucket = "<>" + acl = "private" + force_destroy = true +} + +resource "aws_s3_bucket_policy" "gd_bucket_policy" { + bucket = aws_s3_bucket.gd_bucket.id + policy = data.aws_iam_policy_document.bucket_pol.json +} + +resource "aws_kms_key" "gd_key" { + description = "Temporary key for AccTest of TF" + deletion_window_in_days = 7 + policy = data.aws_iam_policy_document.kms_pol.json +} + +resource "aws_guardduty_publishing_destination" "test" { + detector_id = aws_guardduty_detector.test_gd.id + destination_arn = aws_s3_bucket.gd_bucket.arn + kms_key_arn = aws_kms_key.gd_key.arn + + depends_on = [ + aws_s3_bucket_policy.gd_bucket_policy, + ] +} +``` + +~> **Note:** Please do not use this simple example for Bucket-Policy and KMS Key Policy in a production environment. It is much too open for such a use-case. Refer to the AWS documentation here: https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_exportfindings.html + +## Argument Reference + +The following arguments are supported: + +* `detector_id` - (Required) The detector ID of the GuardDuty. +* `destination_arn` - (Required) The bucket arn and prefix under which the findings get exported. Bucket-ARN is required, the prefix is optional and will be `AWSLogs/[Account-ID]/GuardDuty/[Region]/` if not provided +* `kms_key_arn` - (Required) The ARN of the KMS key used to encrypt GuardDuty findings. GuardDuty enforces this to be encrypted. +* `destination_type`- (Optional) Currently there is only "S3" available as destination type which is also the default value + + +~> **Note:** In case of missing permissions (S3 Bucket Policy _or_ KMS Key permissions) the resource will fail to create. If the permissions are changed after resource creation, this can be asked from the AWS API via the "DescribePublishingDestination" call (https://docs.aws.amazon.com/cli/latest/reference/guardduty/describe-publishing-destination.html). + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The ID of the GuardDuty PublishingDestination and the detector ID. Format: `:` +* `status` - The state of the PublishingDestination. See here for possible values. A working destination will have "PUBLISHING". + +## Import + +GuardDuty PublishingDestination can be imported using the the master GuardDuty detector ID and PublishingDestinationID, e.g. + +``` +$ terraform import aws_guardduty_publishing_destination.test a4b86f26fa42e7e7cf0d1c333ea77777:a4b86f27a0e464e4a7e0516d242f1234 +``` From c88e75338a552365041f90e06c17ad6fd0f0d50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4pe?= Date: Sun, 15 Mar 2020 16:23:23 +0100 Subject: [PATCH 03/17] Fixed test namings --- ...s_guardduty_publishing_destination_test.go | 21 +++++++++---------- aws/resource_aws_guardduty_test.go | 6 +++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_guardduty_publishing_destination_test.go b/aws/resource_aws_guardduty_publishing_destination_test.go index cf1eb952b8b..9c414a48cdd 100644 --- a/aws/resource_aws_guardduty_publishing_destination_test.go +++ b/aws/resource_aws_guardduty_publishing_destination_test.go @@ -17,11 +17,11 @@ import ( func init() { resource.AddTestSweepers("aws_guardduty_publishing_destination", &resource.Sweeper{ Name: "aws_guardduty_publishing_destination", - F: testSweepGuarddutyPublishDestinations, + F: testSweepGuarddutyPublishingDestinations, }) } -func testSweepGuarddutyPublishDestinations(region string) error { +func testSweepGuarddutyPublishingDestinations(region string) error { client, err := sharedClientForRegion(region) if err != nil { @@ -79,7 +79,7 @@ func testSweepGuarddutyPublishDestinations(region string) error { return sweeperErrs.ErrorOrNil() } -func TestAccAwsGuardDutyPublishDestination_basic(t *testing.T) { +func TestAccAwsGuardDutyPublishingDestination_basic(t *testing.T) { resourceName := "aws_guardduty_publishing_destination.test" bucketName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) @@ -89,19 +89,19 @@ func TestAccAwsGuardDutyPublishDestination_basic(t *testing.T) { CheckDestroy: testAccCheckAwsGuardDutyPublishingDestinationDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName), + Config: testAccAwsGuardDutyPublishingDestinationConfig_basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsGuardDutyPublishingDestinationExists(resourceName), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), - resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttrSet(resourceName, "destination_arn"), + resource.TestCheckResourceAttrSet(resourceName, "kms_key_arn"), resource.TestCheckResourceAttr(resourceName, "destination_type", "S3")), }, }, }) } -func TestAccAwsGuardDutyPublishDestination_import(t *testing.T) { +func TestAccAwsGuardDutyPublishingDestination_import(t *testing.T) { resourceName := "aws_guardduty_publishing_destination.test" bucketName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) @@ -111,9 +111,8 @@ func TestAccAwsGuardDutyPublishDestination_import(t *testing.T) { CheckDestroy: testAccCheckAwsGuardDutyPublishingDestinationDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName), + Config: testAccAwsGuardDutyPublishingDestinationConfig_basic(bucketName), }, - { ResourceName: resourceName, ImportState: true, @@ -123,7 +122,7 @@ func TestAccAwsGuardDutyPublishDestination_import(t *testing.T) { }) } -const testAccGuardDutyDetectorDSConfig_basic1 = ` +const testAccGuardDutyPublishingDestinationConfig_basic1 = ` data "aws_caller_identity" "current" {} @@ -220,7 +219,7 @@ resource "aws_kms_key" "gd_key" { policy = data.aws_iam_policy_document.kms_pol.json }` -func testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName string) string { +func testAccAwsGuardDutyPublishingDestinationConfig_basic(bucketName string) string { return fmt.Sprintf(` %[1]s @@ -233,7 +232,7 @@ func testAccAwsGuardDutyPublishDestinationConfig_basic(bucketName string) string aws_s3_bucket_policy.gd_bucket_policy, ] } - `, strings.Replace(testAccGuardDutyDetectorDSConfig_basic1, "<>", bucketName, 1)) + `, strings.Replace(testAccGuardDutyPublishingDestinationConfig_basic1, "<>", bucketName, 1)) } func testAccCheckAwsGuardDutyPublishingDestinationExists(name string) resource.TestCheckFunc { diff --git a/aws/resource_aws_guardduty_test.go b/aws/resource_aws_guardduty_test.go index 93059dec3a5..0c7fd26eb64 100644 --- a/aws/resource_aws_guardduty_test.go +++ b/aws/resource_aws_guardduty_test.go @@ -28,9 +28,9 @@ func TestAccAWSGuardDuty(t *testing.T) { "inviteDisassociate": testAccAwsGuardDutyMember_invite_disassociate, "invitationMessage": testAccAwsGuardDutyMember_invitationMessage, }, - "PublishDestination": { - "basic": TestAccAwsGuardDutyPublishDestination_basic, - "import": TestAccAwsGuardDutyPublishDestination_import, + "PublishingDestination": { + "basic": TestAccAwsGuardDutyPublishingDestination_basic, + "import": TestAccAwsGuardDutyPublishingDestination_import, }, } From a3d82388b056b334105353ea91b9f91a2ba48545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4pe?= Date: Sun, 15 Mar 2020 17:13:08 +0100 Subject: [PATCH 04/17] Fixed linter issues and removed explicit import test case --- ...ource_aws_guardduty_publishing_destination.go | 8 ++++---- ..._aws_guardduty_publishing_destination_test.go | 16 ---------------- aws/resource_aws_guardduty_test.go | 3 +-- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/aws/resource_aws_guardduty_publishing_destination.go b/aws/resource_aws_guardduty_publishing_destination.go index 1feb28fa803..770c4e3a792 100644 --- a/aws/resource_aws_guardduty_publishing_destination.go +++ b/aws/resource_aws_guardduty_publishing_destination.go @@ -124,10 +124,10 @@ func resourceAwsGuardDutyPublishingDestinationRead(d *schema.ResourceData, meta } d.Set("detector_id", detector_id) - d.Set("destination_type", *gdo.DestinationType) - d.Set("kms_key_arn", *gdo.DestinationProperties.KmsKeyArn) - d.Set("destination_arn", *gdo.DestinationProperties.DestinationArn) - d.Set("status", *gdo.Status) + d.Set("destination_type", gdo.DestinationType) + d.Set("kms_key_arn", gdo.DestinationProperties.KmsKeyArn) + d.Set("destination_arn", gdo.DestinationProperties.DestinationArn) + d.Set("status", gdo.Status) return nil } diff --git a/aws/resource_aws_guardduty_publishing_destination_test.go b/aws/resource_aws_guardduty_publishing_destination_test.go index 9c414a48cdd..afe346dbf44 100644 --- a/aws/resource_aws_guardduty_publishing_destination_test.go +++ b/aws/resource_aws_guardduty_publishing_destination_test.go @@ -97,22 +97,6 @@ func TestAccAwsGuardDutyPublishingDestination_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "kms_key_arn"), resource.TestCheckResourceAttr(resourceName, "destination_type", "S3")), }, - }, - }) -} - -func TestAccAwsGuardDutyPublishingDestination_import(t *testing.T) { - resourceName := "aws_guardduty_publishing_destination.test" - bucketName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsGuardDutyPublishingDestinationDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAwsGuardDutyPublishingDestinationConfig_basic(bucketName), - }, { ResourceName: resourceName, ImportState: true, diff --git a/aws/resource_aws_guardduty_test.go b/aws/resource_aws_guardduty_test.go index 0c7fd26eb64..6bd1f086653 100644 --- a/aws/resource_aws_guardduty_test.go +++ b/aws/resource_aws_guardduty_test.go @@ -29,8 +29,7 @@ func TestAccAWSGuardDuty(t *testing.T) { "invitationMessage": testAccAwsGuardDutyMember_invitationMessage, }, "PublishingDestination": { - "basic": TestAccAwsGuardDutyPublishingDestination_basic, - "import": TestAccAwsGuardDutyPublishingDestination_import, + "basic": TestAccAwsGuardDutyPublishingDestination_basic, }, } From a8bb7723b200ea12f6c6bec8ecc1bbf12332a86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4pe?= Date: Sun, 15 Mar 2020 17:22:32 +0100 Subject: [PATCH 05/17] Fixed HCL formatting in documentation --- ...rdduty_publishing_destination.html.markdown | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/docs/r/guardduty_publishing_destination.html.markdown b/website/docs/r/guardduty_publishing_destination.html.markdown index 95ce71fd39d..fbd25e14680 100644 --- a/website/docs/r/guardduty_publishing_destination.html.markdown +++ b/website/docs/r/guardduty_publishing_destination.html.markdown @@ -36,7 +36,7 @@ data "aws_iam_policy_document" "bucket_pol" { statement { sid = "Allow GetBucketLocation" actions = [ - "s3:GetBucketLocation" + "s3:GetBucketLocation" ] resources = [ @@ -80,7 +80,7 @@ data "aws_iam_policy_document" "kms_pol" { principals { type = "AWS" - identifiers = [ "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root" ] + identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"] } } @@ -91,8 +91,8 @@ resource "aws_guardduty_detector" "test_gd" { } resource "aws_s3_bucket" "gd_bucket" { - bucket = "<>" - acl = "private" + bucket = "<>" + acl = "private" force_destroy = true } @@ -102,16 +102,16 @@ resource "aws_s3_bucket_policy" "gd_bucket_policy" { } resource "aws_kms_key" "gd_key" { - description = "Temporary key for AccTest of TF" + description = "Temporary key for AccTest of TF" deletion_window_in_days = 7 - policy = data.aws_iam_policy_document.kms_pol.json + policy = data.aws_iam_policy_document.kms_pol.json } resource "aws_guardduty_publishing_destination" "test" { - detector_id = aws_guardduty_detector.test_gd.id + detector_id = aws_guardduty_detector.test_gd.id destination_arn = aws_s3_bucket.gd_bucket.arn - kms_key_arn = aws_kms_key.gd_key.arn - + kms_key_arn = aws_kms_key.gd_key.arn + depends_on = [ aws_s3_bucket_policy.gd_bucket_policy, ] From 3826b50e0e19c320c9dfdc6c2c7320a46d59457d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4pe?= Date: Sun, 15 Mar 2020 17:34:52 +0100 Subject: [PATCH 06/17] Fixed some namings and sidebar link --- website/aws.erb | 3 +++ website/docs/r/guardduty_publishing_destination.html.markdown | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/website/aws.erb b/website/aws.erb index db4bcbbd8ef..6522f4e05a2 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1714,6 +1714,9 @@
  • aws_guardduty_member
  • +
  • + aws_guardduty_publishing_destination +
  • aws_guardduty_threatintelset
  • diff --git a/website/docs/r/guardduty_publishing_destination.html.markdown b/website/docs/r/guardduty_publishing_destination.html.markdown index fbd25e14680..0a3c415ed61 100644 --- a/website/docs/r/guardduty_publishing_destination.html.markdown +++ b/website/docs/r/guardduty_publishing_destination.html.markdown @@ -1,11 +1,11 @@ --- subcategory: "GuardDuty" layout: aws -page_title: 'AWS: aws_guardduty_publishingdestination' +page_title: 'AWS: aws_guardduty_publishing_destination' description: Provides a resource to manage a GuardDuty PublishingDestination --- -# Resource: aws_guardduty_publishingdestination +# Resource: aws_guardduty_publishing_destination Provides a resource to manage a GuardDuty PublishingDestination. Requires an existing GuardDuty Detector. From 35f730c07c93e8dacfcc003f4d4f1d00f20c406e Mon Sep 17 00:00:00 2001 From: Ben de Haan <53901866+bendehaan@users.noreply.github.com> Date: Sun, 14 Jun 2020 10:45:15 +0200 Subject: [PATCH 07/17] Update/refactor publishing destination (#1) * Merged latest master changes and resolved conflicts --- .github/CONTRIBUTING.md | 1201 --- .github/MAINTAINING.md | 310 - .github/PULL_REQUEST_TEMPLATE.md | 2 +- .../{changelog_checks.yml => changelog.yml} | 27 +- .github/workflows/examples.yml | 70 + .github/workflows/issues.yml | 10 +- .github/workflows/stale.yml | 27 + .github/workflows/terraform_provider.yml | 257 + .github/workflows/website.yml | 21 + .gitignore | 2 +- .hashibot.hcl | 80 +- .markdownlinkcheck.json | 33 + CHANGELOG.md | 465 +- GNUmakefile | 29 +- README.md | 95 +- ROADMAP.md | 94 + aws/autoscaling_tags.go | 23 +- aws/aws_sweeper_test.go | 11 + aws/config.go | 40 +- aws/data_source_aws_acm_certificate.go | 15 +- aws/data_source_aws_acm_certificate_test.go | 22 +- ...source_aws_acmpca_certificate_authority.go | 3 +- aws/data_source_aws_ami.go | 12 +- aws/data_source_aws_ami_ids.go | 2 - aws/data_source_aws_api_gateway_api_key.go | 4 +- aws/data_source_aws_api_gateway_rest_api.go | 6 +- ...ta_source_aws_api_gateway_rest_api_test.go | 47 +- aws/data_source_aws_api_gateway_vpc_link.go | 4 +- aws/data_source_aws_autoscaling_group.go | 1 - aws/data_source_aws_autoscaling_group_test.go | 5 + ...data_source_aws_autoscaling_groups_test.go | 18 +- aws/data_source_aws_availability_zone.go | 39 +- aws/data_source_aws_availability_zone_test.go | 172 +- aws/data_source_aws_availability_zones.go | 34 + ...data_source_aws_availability_zones_test.go | 69 + aws/data_source_aws_backup_plan.go | 64 + aws/data_source_aws_backup_plan_test.go | 69 + aws/data_source_aws_backup_selection.go | 64 + aws/data_source_aws_backup_selection_test.go | 86 + aws/data_source_aws_backup_vault.go | 66 + aws/data_source_aws_backup_vault_test.go | 60 + ...ta_source_aws_batch_compute_environment.go | 1 - aws/data_source_aws_batch_job_queue.go | 1 - ...source_aws_billing_service_account_test.go | 8 +- aws/data_source_aws_caller_identity_test.go | 26 - aws/data_source_aws_cloudformation_stack.go | 6 +- ...data_source_aws_cloudfront_distribution.go | 96 + ...source_aws_cloudfront_distribution_test.go | 41 + aws/data_source_aws_cloudhsm2_cluster_test.go | 9 +- ...a_source_aws_cloudtrail_service_account.go | 2 + ...rce_aws_cloudtrail_service_account_test.go | 13 +- aws/data_source_aws_cloudwatch_log_group.go | 3 +- aws/data_source_aws_codecommit_repository.go | 1 - aws/data_source_aws_common_schema.go | 1 - aws/data_source_aws_customer_gateway.go | 4 +- aws/data_source_aws_db_cluster_snapshot.go | 3 +- ...ata_source_aws_db_cluster_snapshot_test.go | 27 +- aws/data_source_aws_db_instance.go | 6 +- aws/data_source_aws_db_instance_test.go | 1 + aws/data_source_aws_db_snapshot.go | 6 - ..._source_aws_directory_service_directory.go | 33 +- ...ce_aws_directory_service_directory_test.go | 94 +- aws/data_source_aws_dynamodb_table.go | 26 +- aws/data_source_aws_ebs_snapshot.go | 11 +- aws/data_source_aws_ebs_snapshot_ids.go | 2 - aws/data_source_aws_ebs_snapshot_test.go | 27 +- aws/data_source_aws_ebs_volume.go | 13 +- aws/data_source_aws_ebs_volume_test.go | 58 +- aws/data_source_aws_ec2_coip_pool.go | 105 + aws/data_source_aws_ec2_coip_pool_test.go | 88 + aws/data_source_aws_ec2_coip_pools.go | 75 + aws/data_source_aws_ec2_coip_pools_test.go | 79 + ...rce_aws_ec2_instance_type_offering_test.go | 5 + ...ce_aws_ec2_instance_type_offerings_test.go | 5 + aws/data_source_aws_ec2_local_gateway.go | 101 + ...ource_aws_ec2_local_gateway_route_table.go | 104 + ..._aws_ec2_local_gateway_route_table_test.go | 165 + ...urce_aws_ec2_local_gateway_route_tables.go | 71 + ...aws_ec2_local_gateway_route_tables_test.go | 79 + aws/data_source_aws_ec2_local_gateway_test.go | 48 + aws/data_source_aws_ec2_local_gateways.go | 75 + ...data_source_aws_ec2_local_gateways_test.go | 40 + aws/data_source_aws_ec2_transit_gateway.go | 3 +- ...2_transit_gateway_dx_gateway_attachment.go | 43 +- ...nsit_gateway_dx_gateway_attachment_test.go | 65 +- ..._ec2_transit_gateway_peering_attachment.go | 105 + ...transit_gateway_peering_attachment_test.go | 211 + ...rce_aws_ec2_transit_gateway_route_table.go | 3 +- ..._aws_ec2_transit_gateway_vpc_attachment.go | 3 +- ...ec2_transit_gateway_vpc_attachment_test.go | 10 + ..._aws_ec2_transit_gateway_vpn_attachment.go | 41 +- ...ec2_transit_gateway_vpn_attachment_test.go | 55 +- aws/data_source_aws_ecr_repository.go | 4 +- aws/data_source_aws_ecr_repository_test.go | 4 +- aws/data_source_aws_ecs_cluster.go | 1 - ...ata_source_aws_ecs_container_definition.go | 2 - aws/data_source_aws_ecs_service.go | 2 - aws/data_source_aws_ecs_task_definition.go | 1 - ...ata_source_aws_ecs_task_definition_test.go | 11 +- aws/data_source_aws_efs_access_point.go | 144 + aws/data_source_aws_efs_access_point_test.go | 49 + aws/data_source_aws_efs_file_system.go | 17 +- aws/data_source_aws_efs_file_system_test.go | 3 + aws/data_source_aws_efs_mount_target.go | 1 - aws/data_source_aws_eip.go | 13 +- aws/data_source_aws_eip_test.go | 56 + aws/data_source_aws_eks_cluster.go | 5 +- aws/data_source_aws_eks_cluster_test.go | 7 +- ...ource_aws_elastic_beanstalk_application.go | 1 - ...ource_aws_elastic_beanstalk_hosted_zone.go | 2 + ...ce_aws_elastic_beanstalk_solution_stack.go | 2 - aws/data_source_aws_elasticache_cluster.go | 4 +- ..._aws_elasticache_replication_group_test.go | 9 +- aws/data_source_aws_elasticsearch_domain.go | 6 +- ...ta_source_aws_elasticsearch_domain_test.go | 6 + aws/data_source_aws_elb.go | 4 +- aws/data_source_aws_elb_hosted_zone_id.go | 4 + aws/data_source_aws_elb_service_account.go | 2 + ...ata_source_aws_elb_service_account_test.go | 29 +- aws/data_source_aws_elb_test.go | 9 +- ...data_source_aws_guardduty_detector_test.go | 4 +- ...ta_source_aws_iam_instance_profile_test.go | 21 +- aws/data_source_aws_iam_policy_document.go | 3 +- aws/data_source_aws_iam_policy_test.go | 13 +- aws/data_source_aws_iam_role.go | 6 + aws/data_source_aws_iam_role_test.go | 63 + aws/data_source_aws_iam_server_certificate.go | 4 - aws/data_source_aws_iam_user_test.go | 13 +- aws/data_source_aws_instance.go | 42 +- aws/data_source_aws_instance_test.go | 64 +- aws/data_source_aws_internet_gateway.go | 4 +- aws/data_source_aws_kinesis_stream.go | 4 +- aws/data_source_aws_kms_alias_test.go | 52 +- aws/data_source_aws_kms_secret.go | 1 - aws/data_source_aws_kms_secrets.go | 1 - aws/data_source_aws_lambda_function.go | 4 +- aws/data_source_aws_lambda_invocation.go | 10 +- aws/data_source_aws_launch_template.go | 73 +- aws/data_source_aws_launch_template_test.go | 196 + aws/data_source_aws_lb.go | 10 + aws/data_source_aws_lb_listener.go | 2 + aws/data_source_aws_lb_listener_test.go | 27 +- aws/data_source_aws_lb_target_group.go | 5 + aws/data_source_aws_lb_target_group_test.go | 21 +- aws/data_source_aws_lb_test.go | 20 +- aws/data_source_aws_mq_broker_test.go | 9 +- aws/data_source_aws_msk_cluster.go | 3 +- aws/data_source_aws_nat_gateway.go | 3 +- aws/data_source_aws_network_interface.go | 8 +- aws/data_source_aws_network_interface_test.go | 19 +- aws/data_source_aws_prefix_list.go | 7 +- aws/data_source_aws_prefix_list_test.go | 34 +- aws/data_source_aws_ram_resource_share.go | 9 +- ...data_source_aws_ram_resource_share_test.go | 1 + aws/data_source_aws_rds_cluster.go | 8 +- aws/data_source_aws_rds_cluster_test.go | 1 + aws/data_source_aws_redshift_cluster.go | 3 +- ...ata_source_aws_redshift_service_account.go | 2 + ...ource_aws_redshift_service_account_test.go | 29 +- aws/data_source_aws_regions.go | 62 + aws/data_source_aws_regions_test.go | 117 + aws/data_source_aws_route53_resolver_rule.go | 3 +- ..._source_aws_route53_resolver_rules_test.go | 5 +- aws/data_source_aws_route53_zone.go | 4 +- aws/data_source_aws_route53_zone_test.go | 5 +- aws/data_source_aws_route_table.go | 4 +- aws/data_source_aws_route_test.go | 5 + aws/data_source_aws_s3_bucket_object.go | 4 +- aws/data_source_aws_s3_bucket_object_test.go | 518 +- aws/data_source_aws_s3_bucket_test.go | 39 +- aws/data_source_aws_secretsmanager_secret.go | 5 +- ...ource_aws_secretsmanager_secret_version.go | 1 - aws/data_source_aws_security_group.go | 4 +- aws/data_source_aws_sqs_queue.go | 4 +- aws/data_source_aws_ssm_parameter_test.go | 10 +- ...urce_aws_storagegateway_local_disk_test.go | 135 +- aws/data_source_aws_subnet.go | 9 +- aws/data_source_aws_subnet_test.go | 207 +- aws/data_source_aws_vpc.go | 3 +- aws/data_source_aws_vpc_dhcp_options.go | 3 +- aws/data_source_aws_vpc_endpoint.go | 3 +- aws/data_source_aws_vpc_endpoint_service.go | 24 +- ...ta_source_aws_vpc_endpoint_service_test.go | 90 +- aws/data_source_aws_vpc_endpoint_test.go | 9 +- aws/data_source_aws_vpc_peering_connection.go | 3 +- aws/data_source_aws_vpn_gateway.go | 3 +- aws/data_source_aws_wafv2_ip_set.go | 111 + aws/data_source_aws_wafv2_ip_set_test.go | 70 + ...data_source_aws_wafv2_regex_pattern_set.go | 113 + ...source_aws_wafv2_regex_pattern_set_test.go | 75 + aws/data_source_aws_wafv2_rule_group.go | 83 + aws/data_source_aws_wafv2_rule_group_test.go | 80 + aws/ec2_transit_gateway.go | 122 + aws/hosted_zones.go | 2 + aws/iam_policy_model.go | 2 +- aws/import_aws_network_acl.go | 95 - aws/internal/keyvaluetags/create_tags_gen.go | 78 + .../generators/createtags/main.go | 199 + .../keyvaluetags/generators/listtags/main.go | 255 +- .../generators/servicetags/main.go | 56 +- .../generators/updatetags/main.go | 417 +- aws/internal/keyvaluetags/inspector_tags.go | 44 + aws/internal/keyvaluetags/key_value_tags.go | 19 + .../keyvaluetags/key_value_tags_test.go | 197 + aws/internal/keyvaluetags/list_tags_gen.go | 18 + .../service_generation_customizations.go | 640 +- aws/internal/keyvaluetags/service_tags_gen.go | 38 + aws/internal/keyvaluetags/update_tags_gen.go | 111 + aws/internal/keyvaluetags/workspaces_tags.go | 49 - .../service/apigatewayv2/waiter/status.go | 56 + .../service/apigatewayv2/waiter/waiter.go | 73 + .../batch/equivalency/container_properties.go | 5 + .../equivalency/container_properties_test.go | 32 + .../service/guardduty/waiter/status.go | 59 + .../service/guardduty/waiter/waiter.go | 59 + aws/internal/service/iam/waiter/waiter.go | 14 + .../service/kinesisanalytics/waiter/status.go | 38 + .../service/kinesisanalytics/waiter/waiter.go | 31 + aws/internal/service/kms/waiter/status.go | 28 + aws/internal/service/kms/waiter/waiter.go | 34 + aws/internal/service/neptune/waiter/status.go | 36 + aws/internal/service/neptune/waiter/waiter.go | 31 + aws/internal/service/rds/waiter/status.go | 36 + aws/internal/service/rds/waiter/waiter.go | 31 + .../service/secretsmanager/waiter/waiter.go | 10 + .../service/servicediscovery/waiter/status.go | 35 + .../service/servicediscovery/waiter/waiter.go | 31 + .../service/workspaces/waiter/status.go | 43 + .../service/workspaces/waiter/waiter.go | 151 + aws/opsworks_layers.go | 115 +- aws/provider.go | 138 +- aws/provider_test.go | 459 +- aws/resource_aws_accessanalyzer_analyzer.go | 3 +- aws/resource_aws_acm_certificate.go | 47 +- aws/resource_aws_acm_certificate_test.go | 101 +- ...rce_aws_acm_certificate_validation_test.go | 14 +- ...source_aws_acmpca_certificate_authority.go | 3 +- aws/resource_aws_ami.go | 12 +- aws/resource_aws_ami_copy.go | 6 +- aws/resource_aws_ami_copy_test.go | 9 +- aws/resource_aws_ami_from_instance.go | 6 +- aws/resource_aws_ami_launch_permission.go | 25 +- aws/resource_aws_ami_test.go | 9 +- aws/resource_aws_api_gateway_account_test.go | 11 +- aws/resource_aws_api_gateway_api_key.go | 4 +- ...esource_aws_api_gateway_authorizer_test.go | 222 +- ..._aws_api_gateway_base_path_mapping_test.go | 6 +- ...urce_aws_api_gateway_client_certificate.go | 3 +- aws/resource_aws_api_gateway_deployment.go | 7 + ...esource_aws_api_gateway_deployment_test.go | 74 +- aws/resource_aws_api_gateway_domain_name.go | 4 +- ...source_aws_api_gateway_integration_test.go | 16 +- ...esource_aws_api_gateway_method_settings.go | 40 +- ...ource_aws_api_gateway_request_validator.go | 1 - aws/resource_aws_api_gateway_rest_api.go | 36 +- aws/resource_aws_api_gateway_rest_api_test.go | 108 +- aws/resource_aws_api_gateway_stage.go | 52 +- aws/resource_aws_api_gateway_stage_test.go | 112 +- aws/resource_aws_api_gateway_usage_plan.go | 22 +- ...esource_aws_api_gateway_usage_plan_test.go | 22 +- aws/resource_aws_api_gateway_vpc_link.go | 7 +- aws/resource_aws_api_gateway_vpc_link_test.go | 9 +- aws/resource_aws_apigatewayv2_api.go | 142 +- aws/resource_aws_apigatewayv2_api_mapping.go | 144 + ...ource_aws_apigatewayv2_api_mapping_test.go | 286 + aws/resource_aws_apigatewayv2_api_test.go | 293 + aws/resource_aws_apigatewayv2_authorizer.go | 234 + ...source_aws_apigatewayv2_authorizer_test.go | 385 + aws/resource_aws_apigatewayv2_deployment.go | 147 + ...source_aws_apigatewayv2_deployment_test.go | 270 + aws/resource_aws_apigatewayv2_domain_name.go | 260 + ...ource_aws_apigatewayv2_domain_name_test.go | 361 + aws/resource_aws_apigatewayv2_integration.go | 314 + ...e_aws_apigatewayv2_integration_response.go | 177 + ..._apigatewayv2_integration_response_test.go | 243 + ...ource_aws_apigatewayv2_integration_test.go | 450 + aws/resource_aws_apigatewayv2_model.go | 172 + aws/resource_aws_apigatewayv2_model_test.go | 283 + aws/resource_aws_apigatewayv2_route.go | 251 + ...esource_aws_apigatewayv2_route_response.go | 160 + ...ce_aws_apigatewayv2_route_response_test.go | 212 + aws/resource_aws_apigatewayv2_route_test.go | 535 + aws/resource_aws_apigatewayv2_stage.go | 569 + aws/resource_aws_apigatewayv2_stage_test.go | 953 ++ aws/resource_aws_apigatewayv2_vpc_link.go | 165 + ...resource_aws_apigatewayv2_vpc_link_test.go | 320 + aws/resource_aws_appautoscaling_policy.go | 13 +- ...resource_aws_appautoscaling_policy_test.go | 115 +- ...rce_aws_appautoscaling_scheduled_action.go | 33 +- ...ws_appautoscaling_scheduled_action_test.go | 97 + ...resource_aws_appautoscaling_target_test.go | 11 +- aws/resource_aws_appmesh_mesh.go | 3 +- aws/resource_aws_appmesh_route.go | 3 +- aws/resource_aws_appmesh_route_test.go | 104 +- aws/resource_aws_appmesh_virtual_node.go | 44 +- aws/resource_aws_appmesh_virtual_node_test.go | 49 +- aws/resource_aws_appmesh_virtual_router.go | 23 +- ...esource_aws_appmesh_virtual_router_test.go | 12 +- aws/resource_aws_appmesh_virtual_service.go | 3 +- aws/resource_aws_appsync_graphql_api.go | 10 +- aws/resource_aws_appsync_graphql_api_test.go | 86 + aws/resource_aws_appsync_resolver.go | 84 + aws/resource_aws_appsync_resolver_test.go | 98 + aws/resource_aws_athena_database.go | 27 +- aws/resource_aws_athena_workgroup.go | 19 +- aws/resource_aws_athena_workgroup_test.go | 201 +- aws/resource_aws_autoscaling_group.go | 59 +- aws/resource_aws_autoscaling_group_test.go | 257 +- aws/resource_aws_autoscaling_notification.go | 3 +- aws/resource_aws_autoscaling_policy_test.go | 16 +- aws/resource_aws_backup_plan.go | 131 +- aws/resource_aws_backup_plan_test.go | 294 +- aws/resource_aws_backup_selection.go | 8 + aws/resource_aws_backup_selection_test.go | 26 +- aws/resource_aws_backup_vault.go | 9 +- aws/resource_aws_backup_vault_test.go | 22 + aws/resource_aws_batch_job_definition_test.go | 56 + aws/resource_aws_batch_job_queue.go | 11 +- aws/resource_aws_batch_job_queue_test.go | 300 +- aws/resource_aws_budgets_budget.go | 1 + aws/resource_aws_budgets_budget_test.go | 64 +- aws/resource_aws_cloud9_environment_ec2.go | 3 +- ...esource_aws_cloud9_environment_ec2_test.go | 19 +- aws/resource_aws_cloudformation_stack.go | 7 +- aws/resource_aws_cloudformation_stack_set.go | 3 +- aws/resource_aws_cloudformation_stack_test.go | 7 +- aws/resource_aws_cloudfront_distribution.go | 10 +- ...source_aws_cloudfront_distribution_test.go | 2 +- ..._cloudfront_origin_access_identity_test.go | 26 +- aws/resource_aws_cloudhsm2_cluster.go | 23 +- aws/resource_aws_cloudhsm2_cluster_test.go | 27 +- aws/resource_aws_cloudhsm2_hsm_test.go | 9 +- aws/resource_aws_cloudtrail.go | 3 +- aws/resource_aws_cloudtrail_test.go | 157 +- aws/resource_aws_cloudwatch_dashboard.go | 2 +- aws/resource_aws_cloudwatch_event_rule.go | 3 +- aws/resource_aws_cloudwatch_event_target.go | 1 + ...source_aws_cloudwatch_event_target_test.go | 90 +- aws/resource_aws_cloudwatch_log_group.go | 4 +- aws/resource_aws_cloudwatch_log_group_test.go | 83 + ...source_aws_cloudwatch_log_metric_filter.go | 27 +- ...e_aws_cloudwatch_log_metric_filter_test.go | 52 +- aws/resource_aws_cloudwatch_metric_alarm.go | 5 +- aws/resource_aws_codebuild_project.go | 185 +- aws/resource_aws_codebuild_project_test.go | 899 +- aws/resource_aws_codebuild_webhook.go | 1 + aws/resource_aws_codecommit_repository.go | 3 +- ...esource_aws_codedeploy_deployment_group.go | 4 +- ...ce_aws_codedeploy_deployment_group_test.go | 442 +- aws/resource_aws_codepipeline.go | 149 +- aws/resource_aws_codepipeline_test.go | 1149 +- aws/resource_aws_codepipeline_webhook.go | 3 +- aws/resource_aws_codepipeline_webhook_test.go | 34 - ...codestarnotifications_notification_rule.go | 12 +- aws/resource_aws_cognito_identity_pool.go | 4 +- ..._cognito_identity_pool_roles_attachment.go | 28 +- ...ito_identity_pool_roles_attachment_test.go | 92 +- ...resource_aws_cognito_identity_pool_test.go | 7 +- aws/resource_aws_cognito_identity_provider.go | 26 + ...urce_aws_cognito_identity_provider_test.go | 63 +- aws/resource_aws_cognito_user_pool.go | 43 +- aws/resource_aws_cognito_user_pool_client.go | 147 +- ...ource_aws_cognito_user_pool_client_test.go | 267 +- aws/resource_aws_cognito_user_pool_test.go | 85 +- ...urce_aws_config_aggregate_authorization.go | 3 +- ...aws_config_aggregate_authorization_test.go | 6 +- aws/resource_aws_config_config_rule.go | 5 +- aws/resource_aws_config_config_rule_test.go | 62 +- ...rce_aws_config_configuration_aggregator.go | 4 +- ...ws_config_configuration_aggregator_test.go | 5 +- ...ource_aws_config_configuration_recorder.go | 8 +- ...ws_config_configuration_recorder_status.go | 11 +- ..._aws_config_configuration_recorder_test.go | 51 +- ...source_aws_config_delivery_channel_test.go | 17 +- ...rce_aws_config_organization_custom_rule.go | 2 +- ...ce_aws_config_organization_managed_rule.go | 2 +- aws/resource_aws_customer_gateway.go | 5 +- aws/resource_aws_datapipeline_pipeline.go | 3 +- aws/resource_aws_datasync_agent.go | 3 +- aws/resource_aws_datasync_location_efs.go | 3 +- aws/resource_aws_datasync_location_nfs.go | 3 +- aws/resource_aws_datasync_location_s3.go | 3 +- aws/resource_aws_datasync_location_smb.go | 3 +- aws/resource_aws_datasync_task.go | 4 +- aws/resource_aws_datasync_task_test.go | 11 +- aws/resource_aws_dax_cluster.go | 4 +- aws/resource_aws_db_cluster_snapshot.go | 5 +- aws/resource_aws_db_cluster_snapshot_test.go | 133 +- aws/resource_aws_db_event_subscription.go | 13 +- ...resource_aws_db_event_subscription_test.go | 154 +- aws/resource_aws_db_instance.go | 78 +- aws/resource_aws_db_instance_migrate.go | 1 - aws/resource_aws_db_instance_test.go | 1175 +- aws/resource_aws_db_option_group.go | 7 +- aws/resource_aws_db_option_group_test.go | 7 +- aws/resource_aws_db_parameter_group.go | 15 +- aws/resource_aws_db_parameter_group_test.go | 129 +- aws/resource_aws_db_security_group.go | 9 +- aws/resource_aws_db_security_group_test.go | 24 +- aws/resource_aws_db_snapshot.go | 21 +- aws/resource_aws_db_snapshot_test.go | 228 +- aws/resource_aws_db_subnet_group.go | 5 +- aws/resource_aws_db_subnet_group_test.go | 89 +- aws/resource_aws_default_network_acl.go | 8 +- aws/resource_aws_default_network_acl_test.go | 40 + aws/resource_aws_default_route_table.go | 24 +- aws/resource_aws_default_route_table_test.go | 200 +- aws/resource_aws_default_security_group.go | 2 +- ...esource_aws_default_security_group_test.go | 18 +- ...tory_service_conditional_forwarder_test.go | 5 + ...esource_aws_directory_service_directory.go | 46 +- ...ce_aws_directory_service_directory_test.go | 481 +- ...directory_service_log_subscription_test.go | 5 + aws/resource_aws_dlm_lifecycle_policy.go | 9 +- aws/resource_aws_dms_endpoint.go | 292 +- aws/resource_aws_dms_endpoint_test.go | 479 + aws/resource_aws_dms_event_subscription.go | 284 + ...esource_aws_dms_event_subscription_test.go | 387 + aws/resource_aws_dms_replication_instance.go | 3 +- ...ource_aws_dms_replication_instance_test.go | 27 +- ...source_aws_dms_replication_subnet_group.go | 3 +- aws/resource_aws_dms_replication_task.go | 7 +- aws/resource_aws_docdb_cluster.go | 20 +- aws/resource_aws_docdb_cluster_instance.go | 13 +- ...esource_aws_docdb_cluster_instance_test.go | 9 +- ...ource_aws_docdb_cluster_parameter_group.go | 10 +- ..._aws_docdb_cluster_parameter_group_test.go | 85 +- ...esource_aws_docdb_cluster_snapshot_test.go | 9 +- aws/resource_aws_docdb_cluster_test.go | 75 +- aws/resource_aws_docdb_subnet_group.go | 5 +- aws/resource_aws_dx_connection.go | 3 +- ...ws_dx_gateway_association_proposal_test.go | 5 +- ...esource_aws_dx_gateway_association_test.go | 50 +- ...sted_private_virtual_interface_accepter.go | 3 +- ...osted_public_virtual_interface_accepter.go | 3 +- ...sted_transit_virtual_interface_accepter.go | 3 +- aws/resource_aws_dx_lag.go | 3 +- ...source_aws_dx_private_virtual_interface.go | 3 +- ...esource_aws_dx_public_virtual_interface.go | 3 +- ...source_aws_dx_transit_virtual_interface.go | 3 +- ...resource_aws_dynamodb_global_table_test.go | 3 +- aws/resource_aws_dynamodb_table.go | 289 +- aws/resource_aws_dynamodb_table_test.go | 200 +- aws/resource_aws_ebs_snapshot.go | 3 +- aws/resource_aws_ebs_snapshot_copy.go | 3 +- aws/resource_aws_ebs_snapshot_copy_test.go | 30 + aws/resource_aws_ebs_volume.go | 38 +- aws/resource_aws_ebs_volume_test.go | 206 +- ...esource_aws_ec2_availability_zone_group.go | 188 + ...ce_aws_ec2_availability_zone_group_test.go | 102 + aws/resource_aws_ec2_capacity_reservation.go | 3 +- ...ource_aws_ec2_capacity_reservation_test.go | 99 +- aws/resource_aws_ec2_client_vpn_endpoint.go | 106 +- ...source_aws_ec2_client_vpn_endpoint_test.go | 179 +- ...ec2_client_vpn_network_association_test.go | 5 + aws/resource_aws_ec2_fleet.go | 3 +- aws/resource_aws_ec2_fleet_test.go | 9 +- aws/resource_aws_ec2_traffic_mirror_filter.go | 3 +- ...resource_aws_ec2_traffic_mirror_session.go | 3 +- ...rce_aws_ec2_traffic_mirror_session_test.go | 5 + aws/resource_aws_ec2_traffic_mirror_target.go | 3 +- ...urce_aws_ec2_traffic_mirror_target_test.go | 9 +- aws/resource_aws_ec2_transit_gateway.go | 7 +- ..._ec2_transit_gateway_peering_attachment.go | 158 + ...sit_gateway_peering_attachment_accepter.go | 176 + ...ateway_peering_attachment_accepter_test.go | 224 + ...transit_gateway_peering_attachment_test.go | 401 + ...rce_aws_ec2_transit_gateway_route_table.go | 3 +- ...urce_aws_ec2_transit_gateway_route_test.go | 5 + aws/resource_aws_ec2_transit_gateway_test.go | 1 + ..._aws_ec2_transit_gateway_vpc_attachment.go | 3 +- ...transit_gateway_vpc_attachment_accepter.go | 5 +- ...it_gateway_vpc_attachment_accepter_test.go | 5 + ...ec2_transit_gateway_vpc_attachment_test.go | 55 + aws/resource_aws_ecr_lifecycle_policy.go | 2 +- aws/resource_aws_ecr_repository.go | 3 +- aws/resource_aws_ecr_repository_test.go | 56 + aws/resource_aws_ecs_capacity_provider.go | 3 +- ...resource_aws_ecs_capacity_provider_test.go | 9 +- aws/resource_aws_ecs_cluster.go | 3 +- aws/resource_aws_ecs_cluster_test.go | 29 +- aws/resource_aws_ecs_service.go | 115 +- aws/resource_aws_ecs_service_test.go | 216 +- aws/resource_aws_ecs_task_definition.go | 71 +- aws/resource_aws_ecs_task_definition_test.go | 249 +- aws/resource_aws_efs_access_point.go | 406 + aws/resource_aws_efs_access_point_test.go | 476 + aws/resource_aws_efs_file_system.go | 85 +- aws/resource_aws_efs_file_system_policy.go | 100 + ...esource_aws_efs_file_system_policy_test.go | 191 + aws/resource_aws_efs_file_system_test.go | 1 + aws/resource_aws_efs_mount_target_test.go | 4 +- ...source_aws_egress_only_internet_gateway.go | 28 + ...e_aws_egress_only_internet_gateway_test.go | 85 + aws/resource_aws_eip.go | 23 +- aws/resource_aws_eip_association_test.go | 25 +- aws/resource_aws_eip_test.go | 67 +- aws/resource_aws_eks_cluster.go | 3 +- aws/resource_aws_eks_cluster_test.go | 20 +- aws/resource_aws_eks_fargate_profile.go | 3 +- aws/resource_aws_eks_fargate_profile_test.go | 5 + aws/resource_aws_eks_node_group.go | 17 +- aws/resource_aws_eks_node_group_test.go | 145 +- ...ource_aws_elastic_beanstalk_application.go | 3 +- ..._aws_elastic_beanstalk_application_test.go | 35 +- ...s_elastic_beanstalk_application_version.go | 3 +- ...c_beanstalk_configuration_template_test.go | 7 +- ...ource_aws_elastic_beanstalk_environment.go | 195 +- ..._aws_elastic_beanstalk_environment_test.go | 82 +- ...esource_aws_elastic_transcoder_pipeline.go | 112 +- ...ce_aws_elastic_transcoder_pipeline_test.go | 274 +- aws/resource_aws_elastic_transcoder_preset.go | 366 +- ...urce_aws_elastic_transcoder_preset_test.go | 229 +- aws/resource_aws_elasticache_cluster.go | 4 +- aws/resource_aws_elasticache_cluster_test.go | 32 +- ...esource_aws_elasticache_parameter_group.go | 12 - ...ce_aws_elasticache_parameter_group_test.go | 7 +- ..._aws_elasticache_replication_group_test.go | 56 +- aws/resource_aws_elasticsearch_domain.go | 12 +- aws/resource_aws_elasticsearch_domain_test.go | 19 + aws/resource_aws_elb.go | 48 +- aws/resource_aws_elb_test.go | 156 +- aws/resource_aws_emr_cluster.go | 35 +- aws/resource_aws_emr_cluster_test.go | 6255 ++++------- aws/resource_aws_emr_instance_group.go | 5 +- aws/resource_aws_emr_instance_group_test.go | 5 + ...resource_aws_emr_security_configuration.go | 2 +- aws/resource_aws_flow_log.go | 18 +- aws/resource_aws_flow_log_test.go | 125 +- aws/resource_aws_fsx_lustre_file_system.go | 7 +- ...esource_aws_fsx_lustre_file_system_test.go | 5 + aws/resource_aws_fsx_windows_file_system.go | 9 +- ...source_aws_fsx_windows_file_system_test.go | 59 + aws/resource_aws_gamelift_alias.go | 3 +- aws/resource_aws_gamelift_build.go | 3 +- aws/resource_aws_gamelift_fleet.go | 3 +- ...esource_aws_gamelift_game_session_queue.go | 4 +- aws/resource_aws_glacier_vault.go | 5 +- aws/resource_aws_glacier_vault_test.go | 62 + ...ource_aws_globalaccelerator_accelerator.go | 16 +- ...rce_aws_globalaccelerator_listener_test.go | 14 +- aws/resource_aws_glue_catalog_database.go | 23 - ...resource_aws_glue_catalog_database_test.go | 33 +- aws/resource_aws_glue_catalog_table.go | 6 +- aws/resource_aws_glue_catalog_table_test.go | 119 + aws/resource_aws_glue_connection.go | 17 + aws/resource_aws_glue_connection_test.go | 104 +- aws/resource_aws_glue_crawler.go | 23 +- aws/resource_aws_glue_job.go | 4 +- aws/resource_aws_glue_job_test.go | 3 +- ...esource_aws_glue_security_configuration.go | 4 +- aws/resource_aws_glue_trigger.go | 14 +- aws/resource_aws_guardduty_detector.go | 28 +- aws/resource_aws_guardduty_detector_test.go | 26 +- ...ws_guardduty_organization_admin_account.go | 122 + ...ardduty_organization_admin_account_test.go | 109 + ...ws_guardduty_organization_configuration.go | 87 + ...ardduty_organization_configuration_test.go | 73 + ...ce_aws_guardduty_publishing_destination.go | 57 +- aws/resource_aws_guardduty_test.go | 11 +- aws/resource_aws_iam_group.go | 20 +- aws/resource_aws_iam_group_test.go | 37 - aws/resource_aws_iam_instance_profile.go | 47 +- ...esource_aws_iam_openid_connect_provider.go | 42 +- aws/resource_aws_iam_policy.go | 35 +- aws/resource_aws_iam_role.go | 39 +- aws/resource_aws_iam_role_test.go | 2 +- aws/resource_aws_iam_saml_provider.go | 40 +- aws/resource_aws_iam_saml_provider_test.go | 31 +- aws/resource_aws_iam_user.go | 56 +- aws/resource_aws_iam_user_login_profile.go | 16 +- ...esource_aws_iam_user_login_profile_test.go | 16 +- aws/resource_aws_iam_user_test.go | 94 +- ...ource_aws_inspector_assessment_template.go | 107 +- ..._aws_inspector_assessment_template_test.go | 203 +- aws/resource_aws_inspector_resource_group.go | 2 + ...ource_aws_inspector_resource_group_test.go | 4 +- aws/resource_aws_instance.go | 487 +- aws/resource_aws_instance_migrate.go | 7 +- aws/resource_aws_instance_test.go | 1171 +- aws/resource_aws_internet_gateway.go | 5 +- aws/resource_aws_iot_role_alias_test.go | 34 +- aws/resource_aws_iot_thing.go | 1 + aws/resource_aws_iot_topic_rule.go | 1707 ++- aws/resource_aws_iot_topic_rule_test.go | 385 +- aws/resource_aws_key_pair.go | 37 +- aws/resource_aws_key_pair_test.go | 30 +- ...ource_aws_kinesis_analytics_application.go | 13 +- ..._aws_kinesis_analytics_application_test.go | 87 + ...ce_aws_kinesis_firehose_delivery_stream.go | 204 +- ...s_kinesis_firehose_delivery_stream_test.go | 272 +- aws/resource_aws_kinesis_stream.go | 38 +- aws/resource_aws_kinesis_stream_test.go | 48 + aws/resource_aws_kinesis_video_stream.go | 3 +- aws/resource_aws_kinesis_video_stream_test.go | 4 +- aws/resource_aws_kms_external_key.go | 57 +- aws/resource_aws_kms_external_key_test.go | 7 +- aws/resource_aws_kms_grant.go | 50 +- aws/resource_aws_kms_grant_test.go | 341 +- aws/resource_aws_kms_key.go | 117 +- aws/resource_aws_kms_key_test.go | 159 +- aws/resource_aws_lambda_alias.go | 8 + aws/resource_aws_lambda_alias_test.go | 143 +- ...ce_aws_lambda_event_source_mapping_test.go | 40 +- aws/resource_aws_lambda_function.go | 25 +- aws/resource_aws_lambda_function_test.go | 164 +- aws/resource_aws_lambda_permission.go | 3 +- aws/resource_aws_lambda_permission_test.go | 268 +- aws/resource_aws_launch_configuration_test.go | 14 +- aws/resource_aws_launch_template.go | 165 +- aws/resource_aws_launch_template_test.go | 268 +- aws/resource_aws_lb.go | 22 +- ...esource_aws_lb_cookie_stickiness_policy.go | 7 +- aws/resource_aws_lb_listener.go | 151 +- ...source_aws_lb_listener_certificate_test.go | 9 +- aws/resource_aws_lb_listener_rule.go | 167 +- aws/resource_aws_lb_listener_rule_test.go | 1812 +++- aws/resource_aws_lb_listener_test.go | 555 +- aws/resource_aws_lb_ssl_negotiation_policy.go | 20 +- ...urce_aws_lb_ssl_negotiation_policy_test.go | 5 + aws/resource_aws_lb_target_group.go | 50 +- ...rce_aws_lb_target_group_attachment_test.go | 5 + aws/resource_aws_lb_target_group_test.go | 80 +- aws/resource_aws_lb_test.go | 244 +- ...ws_licensemanager_license_configuration.go | 9 +- aws/resource_aws_lightsail_instance.go | 9 +- aws/resource_aws_lightsail_instance_test.go | 16 + aws/resource_aws_lightsail_key_pair_test.go | 6 +- ...aws_lightsail_static_ip_attachment_test.go | 5 + ...aws_load_balancer_backend_server_policy.go | 6 +- ...oad_balancer_backend_server_policy_test.go | 15 + ...ource_aws_load_balancer_listener_policy.go | 6 +- ...e_aws_main_route_table_association_test.go | 17 +- aws/resource_aws_media_convert_queue.go | 4 +- aws/resource_aws_media_package_channel.go | 3 +- aws/resource_aws_media_store_container.go | 3 +- aws/resource_aws_mq_broker.go | 44 +- aws/resource_aws_mq_broker_test.go | 575 +- aws/resource_aws_mq_configuration.go | 13 +- aws/resource_aws_mq_configuration_test.go | 83 +- aws/resource_aws_msk_cluster.go | 230 +- aws/resource_aws_msk_cluster_test.go | 162 + aws/resource_aws_nat_gateway.go | 30 +- aws/resource_aws_nat_gateway_test.go | 254 +- aws/resource_aws_neptune_cluster.go | 10 +- aws/resource_aws_neptune_cluster_instance.go | 13 +- ...ource_aws_neptune_cluster_instance_test.go | 282 +- ...rce_aws_neptune_cluster_parameter_group.go | 10 +- ...ws_neptune_cluster_parameter_group_test.go | 114 +- ...ource_aws_neptune_cluster_snapshot_test.go | 8 +- aws/resource_aws_neptune_cluster_test.go | 48 +- ...resource_aws_neptune_event_subscription.go | 13 +- ...rce_aws_neptune_event_subscription_test.go | 234 +- aws/resource_aws_neptune_parameter_group.go | 17 +- ...source_aws_neptune_parameter_group_test.go | 9 +- aws/resource_aws_neptune_subnet_group.go | 5 +- aws/resource_aws_network_acl.go | 23 +- aws/resource_aws_network_acl_rule.go | 29 +- aws/resource_aws_network_acl_rule_test.go | 56 +- aws/resource_aws_network_acl_test.go | 45 +- aws/resource_aws_network_interface.go | 36 +- ...ws_network_interface_sg_attachment_test.go | 9 +- aws/resource_aws_network_interface_test.go | 2 + aws/resource_aws_opsworks_application.go | 114 +- aws/resource_aws_opsworks_application_test.go | 171 +- aws/resource_aws_opsworks_custom_layer.go | 3 +- ...resource_aws_opsworks_custom_layer_test.go | 160 +- aws/resource_aws_opsworks_ganglia_layer.go | 9 +- ...esource_aws_opsworks_ganglia_layer_test.go | 133 + aws/resource_aws_opsworks_haproxy_layer.go | 15 +- ...esource_aws_opsworks_haproxy_layer_test.go | 133 + aws/resource_aws_opsworks_java_app_layer.go | 13 +- ...source_aws_opsworks_java_app_layer_test.go | 132 + aws/resource_aws_opsworks_memcached_layer.go | 5 +- ...ource_aws_opsworks_memcached_layer_test.go | 132 + aws/resource_aws_opsworks_mysql_layer.go | 7 +- aws/resource_aws_opsworks_mysql_layer_test.go | 132 + aws/resource_aws_opsworks_nodejs_app_layer.go | 5 +- ...urce_aws_opsworks_nodejs_app_layer_test.go | 132 + aws/resource_aws_opsworks_php_app_layer.go | 3 +- ...esource_aws_opsworks_php_app_layer_test.go | 142 + aws/resource_aws_opsworks_rails_app_layer.go | 15 +- ...ource_aws_opsworks_rails_app_layer_test.go | 150 +- aws/resource_aws_opsworks_rds_db_instance.go | 7 - aws/resource_aws_opsworks_stack.go | 19 +- aws/resource_aws_opsworks_stack_test.go | 18 +- aws/resource_aws_opsworks_static_web_layer.go | 3 +- ...urce_aws_opsworks_static_web_layer_test.go | 142 + aws/resource_aws_organizations_account.go | 47 +- aws/resource_aws_organizations_policy.go | 2 +- aws/resource_aws_organizations_policy_test.go | 2 +- aws/resource_aws_pinpoint_app.go | 3 +- aws/resource_aws_placement_group.go | 33 +- aws/resource_aws_placement_group_test.go | 5 +- aws/resource_aws_proxy_protocol_policy.go | 6 - ...resource_aws_proxy_protocol_policy_test.go | 7 +- aws/resource_aws_qldb_ledger.go | 9 +- aws/resource_aws_ram_resource_share.go | 3 +- ...esource_aws_ram_resource_share_accepter.go | 2 +- ...ce_aws_ram_resource_share_accepter_test.go | 18 +- aws/resource_aws_rds_cluster.go | 16 +- aws/resource_aws_rds_cluster_endpoint.go | 3 +- aws/resource_aws_rds_cluster_instance.go | 15 +- aws/resource_aws_rds_cluster_instance_test.go | 20 +- ...esource_aws_rds_cluster_parameter_group.go | 8 +- ...ce_aws_rds_cluster_parameter_group_test.go | 118 +- aws/resource_aws_rds_cluster_test.go | 120 +- aws/resource_aws_rds_global_cluster.go | 1 + aws/resource_aws_rds_global_cluster_test.go | 26 + aws/resource_aws_redshift_cluster.go | 173 +- aws/resource_aws_redshift_cluster_test.go | 193 +- ...esource_aws_redshift_event_subscription.go | 9 +- ...ce_aws_redshift_event_subscription_test.go | 73 +- aws/resource_aws_redshift_parameter_group.go | 49 +- ...ource_aws_redshift_parameter_group_test.go | 47 +- aws/resource_aws_redshift_security_group.go | 33 +- ...source_aws_redshift_security_group_test.go | 39 +- ...source_aws_redshift_snapshot_copy_grant.go | 163 +- ...e_aws_redshift_snapshot_copy_grant_test.go | 77 +- ...resource_aws_redshift_snapshot_schedule.go | 7 +- aws/resource_aws_redshift_subnet_group.go | 38 +- ...resource_aws_redshift_subnet_group_test.go | 40 - aws/resource_aws_resourcegroups_group.go | 3 +- aws/resource_aws_route.go | 128 +- aws/resource_aws_route53_health_check.go | 18 +- aws/resource_aws_route53_health_check_test.go | 133 +- aws/resource_aws_route53_query_log_test.go | 56 +- aws/resource_aws_route53_record_test.go | 18 +- aws/resource_aws_route53_resolver_endpoint.go | 10 +- ...urce_aws_route53_resolver_endpoint_test.go | 9 +- aws/resource_aws_route53_resolver_rule.go | 10 +- ...resource_aws_route53_resolver_rule_test.go | 23 +- aws/resource_aws_route53_zone.go | 17 +- aws/resource_aws_route_table.go | 35 +- aws/resource_aws_route_table_test.go | 346 +- aws/resource_aws_route_test.go | 205 +- aws/resource_aws_s3_bucket.go | 295 +- ...e_aws_s3_bucket_analytics_configuration.go | 1 + aws/resource_aws_s3_bucket_object.go | 3 +- aws/resource_aws_s3_bucket_policy.go | 2 +- aws/resource_aws_s3_bucket_test.go | 1138 +- aws/resource_aws_sagemaker_endpoint.go | 9 +- ...ce_aws_sagemaker_endpoint_configuration.go | 3 +- aws/resource_aws_sagemaker_model.go | 9 +- ...esource_aws_sagemaker_notebook_instance.go | 8 +- aws/resource_aws_secretsmanager_secret.go | 8 +- ...resource_aws_secretsmanager_secret_test.go | 62 +- ..._aws_secretsmanager_secret_version_test.go | 30 +- aws/resource_aws_security_group.go | 5 +- aws/resource_aws_security_group_rule.go | 47 +- aws/resource_aws_security_group_rule_test.go | 64 + aws/resource_aws_security_group_test.go | 107 +- aws/resource_aws_securityhub_member.go | 158 + aws/resource_aws_securityhub_member_test.go | 142 + aws/resource_aws_securityhub_test.go | 4 + ...ce_aws_service_discovery_http_namespace.go | 57 +- ...s_service_discovery_http_namespace_test.go | 81 + ...service_discovery_private_dns_namespace.go | 63 +- ...ce_discovery_private_dns_namespace_test.go | 105 +- ..._service_discovery_public_dns_namespace.go | 73 +- ...ice_discovery_public_dns_namespace_test.go | 81 + aws/resource_aws_service_discovery_service.go | 36 +- ...urce_aws_service_discovery_service_test.go | 101 + aws/resource_aws_servicecatalog_portfolio.go | 4 +- ...esource_aws_ses_active_receipt_rule_set.go | 5 + ...ce_aws_ses_active_receipt_rule_set_test.go | 49 +- aws/resource_aws_ses_configuration_set.go | 44 +- ...resource_aws_ses_configuration_set_test.go | 132 +- aws/resource_aws_ses_domain_identity_test.go | 53 + aws/resource_aws_ses_email_identity_test.go | 7 + aws/resource_aws_ses_event_destination.go | 118 +- ...resource_aws_ses_event_destination_test.go | 157 +- aws/resource_aws_ses_identity_policy.go | 2 +- aws/resource_aws_ses_receipt_rule.go | 12 +- aws/resource_aws_ses_receipt_rule_set_test.go | 90 + aws/resource_aws_ses_receipt_rule_test.go | 33 + aws/resource_aws_ses_template.go | 4 +- aws/resource_aws_ses_template_test.go | 68 +- aws/resource_aws_sfn_activity.go | 4 +- aws/resource_aws_sfn_state_machine.go | 4 +- aws/resource_aws_shield_protection_test.go | 27 +- ...e_aws_snapshot_create_volume_permission.go | 29 +- ..._snapshot_create_volume_permission_test.go | 44 +- ...ource_aws_sns_platform_application_test.go | 60 +- aws/resource_aws_sns_sms_preferences.go | 12 +- aws/resource_aws_sns_sms_preferences_test.go | 72 +- aws/resource_aws_sns_topic.go | 309 +- aws/resource_aws_sns_topic_policy.go | 2 +- aws/resource_aws_sns_topic_subscription.go | 4 +- aws/resource_aws_sns_topic_test.go | 130 +- aws/resource_aws_spot_fleet_request.go | 475 +- aws/resource_aws_spot_fleet_request_test.go | 1185 +- aws/resource_aws_spot_instance_request.go | 16 +- ...resource_aws_spot_instance_request_test.go | 80 +- aws/resource_aws_sqs_queue.go | 7 +- aws/resource_aws_sqs_queue_policy.go | 4 +- aws/resource_aws_sqs_queue_test.go | 58 + aws/resource_aws_ssm_activation.go | 8 +- aws/resource_aws_ssm_activation_test.go | 32 + aws/resource_aws_ssm_association.go | 1 + aws/resource_aws_ssm_association_test.go | 19 +- aws/resource_aws_ssm_document.go | 59 +- aws/resource_aws_ssm_document_test.go | 41 + aws/resource_aws_ssm_maintenance_window.go | 3 +- ...ource_aws_ssm_maintenance_window_target.go | 21 +- ..._aws_ssm_maintenance_window_target_test.go | 270 +- aws/resource_aws_ssm_parameter.go | 29 +- aws/resource_aws_ssm_patch_baseline.go | 3 +- aws/resource_aws_ssm_patch_baseline_test.go | 7 +- aws/resource_aws_storagegateway_cache_test.go | 54 +- ..._aws_storagegateway_cached_iscsi_volume.go | 3 +- ...storagegateway_cached_iscsi_volume_test.go | 275 +- aws/resource_aws_storagegateway_gateway.go | 93 +- ...esource_aws_storagegateway_gateway_test.go | 105 +- ...ource_aws_storagegateway_nfs_file_share.go | 7 +- ..._aws_storagegateway_nfs_file_share_test.go | 23 +- ...ource_aws_storagegateway_smb_file_share.go | 7 +- ..._aws_storagegateway_smb_file_share_test.go | 25 +- ...e_aws_storagegateway_upload_buffer_test.go | 28 +- ...aws_storagegateway_working_storage_test.go | 28 +- aws/resource_aws_subnet.go | 60 +- aws/resource_aws_subnet_test.go | 103 +- aws/resource_aws_swf_domain.go | 3 +- aws/resource_aws_transfer_server.go | 3 +- aws/resource_aws_transfer_user.go | 4 +- aws/resource_aws_volume_attachment.go | 42 +- aws/resource_aws_volume_attachment_test.go | 312 +- aws/resource_aws_vpc.go | 59 +- aws/resource_aws_vpc_dhcp_options.go | 6 +- ...source_aws_vpc_dhcp_options_association.go | 24 + ...e_aws_vpc_dhcp_options_association_test.go | 18 + aws/resource_aws_vpc_endpoint.go | 5 +- aws/resource_aws_vpc_endpoint_service.go | 9 +- aws/resource_aws_vpc_endpoint_service_test.go | 9 +- ...ws_vpc_endpoint_subnet_association_test.go | 18 +- aws/resource_aws_vpc_endpoint_test.go | 27 +- aws/resource_aws_vpc_peering_connection.go | 17 +- ...rce_aws_vpc_peering_connection_accepter.go | 32 +- ...aws_vpc_peering_connection_options_test.go | 17 +- ...esource_aws_vpc_peering_connection_test.go | 24 +- aws/resource_aws_vpc_test.go | 4 +- aws/resource_aws_vpn_connection.go | 86 +- aws/resource_aws_vpn_connection_test.go | 23 +- aws/resource_aws_vpn_gateway.go | 5 +- aws/resource_aws_waf_byte_match_set.go | 25 +- aws/resource_aws_waf_byte_match_set_test.go | 88 +- aws/resource_aws_waf_geo_match_set_test.go | 14 +- aws/resource_aws_waf_ipset.go | 31 +- aws/resource_aws_waf_ipset_test.go | 229 +- aws/resource_aws_waf_rate_based_rule.go | 3 +- aws/resource_aws_waf_rate_based_rule_test.go | 7 +- aws/resource_aws_waf_regex_match_set_test.go | 14 +- ...resource_aws_waf_regex_pattern_set_test.go | 14 +- aws/resource_aws_waf_rule.go | 3 +- aws/resource_aws_waf_rule_group.go | 3 +- aws/resource_aws_waf_rule_group_test.go | 14 +- aws/resource_aws_waf_rule_test.go | 14 +- ...source_aws_waf_size_constraint_set_test.go | 14 +- ...esource_aws_waf_sql_injection_match_set.go | 12 +- ...ce_aws_waf_sql_injection_match_set_test.go | 160 +- aws/resource_aws_waf_web_acl.go | 14 +- aws/resource_aws_waf_web_acl_test.go | 16 +- aws/resource_aws_waf_xss_match_set.go | 56 +- aws/resource_aws_waf_xss_match_set_test.go | 128 +- ...rce_aws_wafregional_byte_match_set_test.go | 21 +- ...urce_aws_wafregional_geo_match_set_test.go | 14 +- aws/resource_aws_wafregional_ipset_test.go | 108 +- ...esource_aws_wafregional_rate_based_rule.go | 3 +- ...ce_aws_wafregional_rate_based_rule_test.go | 7 +- ...ce_aws_wafregional_regex_match_set_test.go | 14 +- ..._aws_wafregional_regex_pattern_set_test.go | 14 +- aws/resource_aws_wafregional_rule.go | 3 +- aws/resource_aws_wafregional_rule_group.go | 3 +- ...esource_aws_wafregional_rule_group_test.go | 14 +- aws/resource_aws_wafregional_rule_test.go | 7 +- ...ws_wafregional_size_constraint_set_test.go | 14 +- ...afregional_sql_injection_match_set_test.go | 14 +- aws/resource_aws_wafregional_web_acl.go | 32 +- ...ws_wafregional_web_acl_association_test.go | 9 +- aws/resource_aws_wafregional_web_acl_test.go | 92 +- aws/resource_aws_wafregional_xss_match_set.go | 31 +- ...urce_aws_wafregional_xss_match_set_test.go | 124 +- aws/resource_aws_wafv2_ip_set.go | 263 + aws/resource_aws_wafv2_ip_set_test.go | 405 + aws/resource_aws_wafv2_regex_pattern_set.go | 279 + ...source_aws_wafv2_regex_pattern_set_test.go | 362 + aws/resource_aws_wafv2_rule_group.go | 1346 +++ aws/resource_aws_wafv2_rule_group_test.go | 2488 +++++ aws/resource_aws_worklink_fleet_test.go | 9 +- aws/resource_aws_workspaces_directory.go | 155 +- aws/resource_aws_workspaces_directory_test.go | 288 +- aws/resource_aws_workspaces_ip_group.go | 25 +- aws/resource_aws_workspaces_ip_group_test.go | 135 +- aws/resource_aws_workspaces_workspace.go | 394 + aws/resource_aws_workspaces_workspace_test.go | 547 + aws/structure.go | 545 +- aws/structure_test.go | 83 + aws/tags.go | 3 + .../testdata}/mysql-5-6-xtrabackup.tar.gz | Bin aws/tls.go | 15 + aws/validators.go | 6 + aws/validators_test.go | 35 + aws/waf_helpers.go | 6 +- .../awsprovidertype/keyvaluetags/funcs.go | 5 + .../awsprovidertype/keyvaluetags/package.go | 28 + .../keyvaluetags/type_ignoreconfig.go | 21 + .../keyvaluetags/type_keyvaluetags.go | 37 + awsproviderlint/passes/AWSR002/AWSR002.go | 75 + .../passes/AWSR002/AWSR002_test.go | 24 + awsproviderlint/passes/AWSR002/README.md | 26 + awsproviderlint/passes/checks.go | 2 + docs/CONTRIBUTING.md | 18 + docs/CORE_SERVICES.md | 27 + docs/DEVELOPMENT.md | 53 + docs/FAQ.md | 74 + docs/MAINTAINING.md | 503 + docs/contributing/contribution-checklists.md | 580 + .../issue-reporting-and-lifecycle.md | 77 + .../pullrequest-submission-and-lifecycle.md | 157 + .../running-and-writing-acceptance-tests.md | 1016 ++ examples/alexa/main.tf | 2 +- .../api-gateway-websocket-chat-app/.gitignore | 1 + .../api-gateway-websocket-chat-app/README.md | 14 + .../api-gateway-websocket-chat-app/main.tf | 454 + .../onconnect/app.js | 23 + .../onconnect/package.json | 11 + .../ondisconnect/app.js | 29 + .../ondisconnect/package.json | 11 + .../sendmessage/app.js | 46 + .../sendmessage/package.json | 11 + .../terraform.template.tfvars | 1 + .../variables.tf | 4 + examples/asg/README.md | 3 + examples/asg/main.tf | 8 +- examples/asg/terraform.template.tfvars | 1 + examples/ecs-alb/README.md | 2 + examples/ecs-alb/main.tf | 6 +- examples/ecs-alb/terraform.template.tfvars | 2 + examples/eip/README.md | 2 + examples/eip/outputs.tf | 2 +- examples/eip/terraform.template.tfvars | 1 + examples/eks-getting-started/vpc.tf | 7 +- examples/elb/README.md | 2 + examples/elb/terraform.template.tfvars | 1 + examples/networking/numbering/variables.tf | 27 - .../region/terraform.template.tfvars | 2 + examples/networking/region/variables.tf | 9 + examples/networking/subnet/subnet.tf | 2 +- .../subnet/terraform.template.tfvars | 2 + examples/networking/subnet/variables.tf | 19 + examples/networking/variables.tf | 2 +- examples/rds/README.md | 2 + examples/rds/terraform.template.tfvars | 2 + examples/s3-api-gateway-integration/main.tf | 18 +- .../README.md | 24 + .../main.tf | 87 + .../terraform.template.tfvars | 10 + .../variables.tf | 11 + examples/two-tier/README.md | 2 + examples/two-tier/terraform.template.tfvars | 2 + examples/workspaces/README.md | 20 + examples/workspaces/iam.tf | 28 + examples/workspaces/main.tf | 112 +- examples/workspaces/variables.tf | 4 + go.mod | 12 +- go.sum | 114 +- infrastructure/README.md | 5 + infrastructure/repository/README.md | 5 + infrastructure/repository/labels-partition.tf | 18 + infrastructure/repository/labels-service.tf | 201 + infrastructure/repository/labels-workflow.tf | 18 + infrastructure/repository/main.tf | 15 + scripts/markdown-link-check.sh | 64 + .../github.com/Djarvur/go-err113/.gitignore | 15 + .../Djarvur/go-err113/.golangci.yml | 150 + .../github.com/Djarvur/go-err113/.travis.yml | 24 + vendor/github.com/Djarvur/go-err113/LICENSE | 21 + .../github.com/Djarvur/go-err113/README.adoc | 73 + .../Djarvur/go-err113/comparison.go | 103 + .../Djarvur/go-err113/definition.go | 74 + vendor/github.com/Djarvur/go-err113/err113.go | 90 + vendor/github.com/Djarvur/go-err113/go.mod | 5 + vendor/github.com/Djarvur/go-err113/go.sum | 20 + .../aws-sdk-go/aws/credentials/credentials.go | 35 +- .../ec2rolecreds/ec2_role_provider.go | 20 +- .../aws/credentials/endpointcreds/provider.go | 11 +- .../aws/credentials/static_provider.go | 4 +- .../stscreds/assume_role_provider.go | 44 +- .../stscreds/web_identity_provider.go | 45 +- .../aws/aws-sdk-go/aws/ec2metadata/api.go | 61 +- .../aws/ec2metadata/token_provider.go | 2 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 3277 +++++- .../aws/aws-sdk-go/aws/session/credentials.go | 10 +- .../aws-sdk-go/aws/session/shared_config.go | 28 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../private/protocol/xml/xmlutil/build.go | 9 + .../private/protocol/xml/xmlutil/unmarshal.go | 8 + .../aws-sdk-go/service/accessanalyzer/api.go | 384 +- .../aws/aws-sdk-go/service/acm/api.go | 302 +- .../aws/aws-sdk-go/service/acm/errors.go | 2 +- .../aws/aws-sdk-go/service/acmpca/api.go | 396 +- .../aws/aws-sdk-go/service/amplify/api.go | 154 +- .../aws/aws-sdk-go/service/apigateway/api.go | 191 +- .../aws-sdk-go/service/apigatewayv2/api.go | 2295 +++- .../service/applicationautoscaling/api.go | 753 +- .../service/applicationautoscaling/doc.go | 11 +- .../service/applicationinsights/api.go | 391 +- .../aws/aws-sdk-go/service/appmesh/api.go | 425 +- .../aws/aws-sdk-go/service/appmesh/doc.go | 2 +- .../aws/aws-sdk-go/service/appmesh/errors.go | 2 +- .../aws/aws-sdk-go/service/appstream/api.go | 242 +- .../aws/aws-sdk-go/service/appsync/api.go | 242 +- .../aws/aws-sdk-go/service/athena/api.go | 121 +- .../service/autoscalingplans/api.go | 132 +- .../aws/aws-sdk-go/service/backup/api.go | 506 +- .../aws/aws-sdk-go/service/batch/api.go | 44 +- .../aws/aws-sdk-go/service/budgets/api.go | 176 +- .../aws/aws-sdk-go/service/cloud9/api.go | 154 +- .../aws-sdk-go/service/cloudformation/api.go | 568 +- .../service/cloudformation/waiters.go | 66 + .../aws/aws-sdk-go/service/cloudhsmv2/api.go | 132 +- .../aws/aws-sdk-go/service/cloudtrail/api.go | 924 +- .../aws/aws-sdk-go/service/cloudwatch/api.go | 70 +- .../service/cloudwatchevents/api.go | 198 +- .../aws-sdk-go/service/cloudwatchlogs/api.go | 844 +- .../service/cloudwatchlogs/errors.go | 2 +- .../aws/aws-sdk-go/service/codebuild/api.go | 679 +- .../aws/aws-sdk-go/service/codecommit/api.go | 3982 +++---- .../aws/aws-sdk-go/service/codedeploy/api.go | 2861 ++--- .../aws-sdk-go/service/codedeploy/errors.go | 12 +- .../aws-sdk-go/service/codepipeline/api.go | 748 +- .../service/codestarnotifications/api.go | 176 +- .../aws-sdk-go/service/cognitoidentity/api.go | 242 +- .../service/cognitoidentityprovider/api.go | 857 +- .../aws-sdk-go/service/configservice/api.go | 1122 +- .../service/costandusagereportservice/api.go | 88 +- .../service/databasemigrationservice/api.go | 676 +- .../aws-sdk-go/service/dataexchange/api.go | 246 +- .../aws-sdk-go/service/datapipeline/api.go | 110 +- .../aws/aws-sdk-go/service/datasync/api.go | 44 +- .../aws/aws-sdk-go/service/dax/api.go | 572 +- .../aws/aws-sdk-go/service/devicefarm/api.go | 264 +- .../aws-sdk-go/service/directconnect/api.go | 88 +- .../service/directoryservice/api.go | 682 +- .../aws/aws-sdk-go/service/dlm/api.go | 92 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 590 +- .../aws/aws-sdk-go/service/ec2/api.go | 1150 +- .../aws/aws-sdk-go/service/ecr/api.go | 751 +- .../aws/aws-sdk-go/service/ecr/errors.go | 17 +- .../aws/aws-sdk-go/service/ecs/api.go | 987 +- .../aws/aws-sdk-go/service/efs/api.go | 586 +- .../aws/aws-sdk-go/service/eks/api.go | 272 +- .../aws/aws-sdk-go/service/elasticache/api.go | 9543 ++++++++++------- .../aws-sdk-go/service/elasticache/errors.go | 18 + .../service/elasticbeanstalk/api.go | 782 +- .../service/elasticsearchservice/api.go | 2286 +++- .../service/elasticsearchservice/errors.go | 16 + .../service/elastictranscoder/api.go | 154 +- .../aws/aws-sdk-go/service/emr/api.go | 652 +- .../aws/aws-sdk-go/service/firehose/api.go | 463 +- .../aws/aws-sdk-go/service/fms/api.go | 213 +- .../aws-sdk-go/service/forecastservice/api.go | 132 +- .../aws/aws-sdk-go/service/fsx/api.go | 650 +- .../aws/aws-sdk-go/service/fsx/service.go | 3 + .../aws/aws-sdk-go/service/gamelift/api.go | 5385 ++++++++-- .../aws/aws-sdk-go/service/gamelift/doc.go | 37 +- .../aws/aws-sdk-go/service/gamelift/errors.go | 9 + .../aws/aws-sdk-go/service/glacier/api.go | 176 +- .../service/globalaccelerator/api.go | 390 +- .../aws/aws-sdk-go/service/glue/api.go | 766 +- .../aws/aws-sdk-go/service/glue/errors.go | 7 + .../aws/aws-sdk-go/service/greengrass/api.go | 44 +- .../aws/aws-sdk-go/service/guardduty/api.go | 1856 +++- .../aws/aws-sdk-go/service/guardduty/doc.go | 25 +- .../aws-sdk-go/service/guardduty/errors.go | 4 +- .../aws/aws-sdk-go/service/iam/api.go | 16 +- .../aws-sdk-go/service/imagebuilder/api.go | 520 +- .../aws/aws-sdk-go/service/inspector/api.go | 242 +- .../aws/aws-sdk-go/service/iot/api.go | 2545 ++++- .../aws/aws-sdk-go/service/iot/doc.go | 8 + .../aws-sdk-go/service/iotanalytics/api.go | 154 +- .../aws/aws-sdk-go/service/iotevents/api.go | 1024 +- .../aws/aws-sdk-go/service/iotevents/doc.go | 4 +- .../aws/aws-sdk-go/service/kafka/api.go | 176 +- .../aws/aws-sdk-go/service/kinesis/api.go | 308 +- .../service/kinesisanalytics/api.go | 264 +- .../service/kinesisanalyticsv2/api.go | 286 +- .../aws-sdk-go/service/kinesisvideo/api.go | 350 +- .../aws-sdk-go/service/kinesisvideo/errors.go | 2 +- .../aws/aws-sdk-go/service/kms/api.go | 726 +- .../aws-sdk-go/service/lakeformation/api.go | 132 +- .../aws/aws-sdk-go/service/lambda/api.go | 629 +- .../service/lexmodelbuildingservice/api.go | 796 +- .../aws-sdk-go/service/licensemanager/api.go | 220 +- .../aws/aws-sdk-go/service/lightsail/api.go | 828 +- .../aws/aws-sdk-go/service/macie/api.go | 88 +- .../service/managedblockchain/api.go | 795 +- .../service/marketplacecatalog/api.go | 176 +- .../aws-sdk-go/service/mediaconnect/api.go | 1834 +++- .../aws-sdk-go/service/mediaconvert/api.go | 931 +- .../aws/aws-sdk-go/service/medialive/api.go | 1939 +++- .../aws-sdk-go/service/medialive/waiters.go | 177 +- .../aws-sdk-go/service/mediapackage/api.go | 132 +- .../aws/aws-sdk-go/service/mediastore/api.go | 768 +- .../aws-sdk-go/service/mediastoredata/api.go | 88 +- .../aws/aws-sdk-go/service/mq/api.go | 132 +- .../aws-sdk-go/service/networkmanager/api.go | 7093 ++++++++++++ .../aws-sdk-go/service/networkmanager/doc.go | 30 + .../service/networkmanager/errors.go | 63 + .../service/networkmanager/service.go | 104 + .../aws/aws-sdk-go/service/opsworks/api.go | 44 +- .../aws-sdk-go/service/organizations/api.go | 4770 +++++--- .../service/organizations/errors.go | 55 +- .../aws/aws-sdk-go/service/personalize/api.go | 178 +- .../aws/aws-sdk-go/service/pinpoint/api.go | 609 +- .../aws/aws-sdk-go/service/pricing/api.go | 110 +- .../aws/aws-sdk-go/service/qldb/api.go | 1242 ++- .../aws/aws-sdk-go/service/quicksight/api.go | 374 +- .../aws/aws-sdk-go/service/ram/api.go | 688 +- .../aws/aws-sdk-go/service/rds/api.go | 524 +- .../aws/aws-sdk-go/service/redshift/api.go | 1703 ++- .../aws/aws-sdk-go/service/redshift/errors.go | 18 + .../aws-sdk-go/service/resourcegroups/api.go | 154 +- .../aws/aws-sdk-go/service/route53/api.go | 468 +- .../aws/aws-sdk-go/service/route53/errors.go | 36 +- .../aws-sdk-go/service/route53domains/api.go | 7731 +++++++++++++ .../aws-sdk-go/service/route53domains/doc.go | 29 + .../service/route53domains/errors.go | 59 + .../service/route53domains/service.go | 103 + .../aws-sdk-go/service/route53resolver/api.go | 286 +- .../aws-sdk-go/service/s3/statusok_error.go | 16 +- .../aws-sdk-go/service/s3/unmarshal_error.go | 40 +- .../aws/aws-sdk-go/service/s3control/api.go | 1023 +- .../aws-sdk-go/service/s3control/errors.go | 4 + .../aws/aws-sdk-go/service/sagemaker/api.go | 870 +- .../aws/aws-sdk-go/service/sagemaker/doc.go | 6 + .../aws-sdk-go/service/secretsmanager/api.go | 242 +- .../aws/aws-sdk-go/service/securityhub/api.go | 1392 ++- .../serverlessapplicationrepository/api.go | 305 +- .../aws-sdk-go/service/servicecatalog/api.go | 226 +- .../service/servicediscovery/api.go | 520 +- .../aws-sdk-go/service/servicequotas/api.go | 330 +- .../aws/aws-sdk-go/service/sfn/api.go | 506 +- .../aws/aws-sdk-go/service/shield/api.go | 286 +- .../aws/aws-sdk-go/service/ssm/api.go | 3375 +++--- .../aws/aws-sdk-go/service/ssm/doc.go | 15 +- .../aws/aws-sdk-go/service/ssm/errors.go | 24 +- .../aws-sdk-go/service/storagegateway/api.go | 952 +- .../aws-sdk-go/service/storagegateway/doc.go | 2 +- .../aws/aws-sdk-go/service/sts/api.go | 4 +- .../aws/aws-sdk-go/service/swf/api.go | 220 +- .../aws/aws-sdk-go/service/synthetics/api.go | 3792 +++++++ .../aws/aws-sdk-go/service/synthetics/doc.go | 42 + .../aws-sdk-go/service/synthetics/errors.go | 41 + .../aws-sdk-go/service/synthetics/service.go | 104 + .../aws/aws-sdk-go/service/transfer/api.go | 1237 ++- .../aws/aws-sdk-go/service/transfer/doc.go | 29 +- .../aws/aws-sdk-go/service/transfer/errors.go | 19 +- .../aws-sdk-go/service/transfer/service.go | 2 +- .../aws/aws-sdk-go/service/waf/api.go | 2290 +++- .../aws/aws-sdk-go/service/waf/doc.go | 26 +- .../aws/aws-sdk-go/service/waf/errors.go | 27 + .../aws/aws-sdk-go/service/wafregional/api.go | 1532 ++- .../aws/aws-sdk-go/service/wafregional/doc.go | 28 +- .../aws-sdk-go/service/wafregional/errors.go | 27 + .../aws/aws-sdk-go/service/wafv2/api.go | 1876 +++- .../aws/aws-sdk-go/service/wafv2/doc.go | 8 +- .../aws/aws-sdk-go/service/wafv2/errors.go | 30 + .../aws/aws-sdk-go/service/worklink/api.go | 132 +- .../aws/aws-sdk-go/service/workmail/api.go | 427 +- .../aws/aws-sdk-go/service/workspaces/api.go | 308 +- .../aws/aws-sdk-go/service/xray/api.go | 93 +- .../bflad/tfproviderdocs/.gitignore | 1 + .../bflad/tfproviderdocs/CHANGELOG.md | 25 + .../github.com/bflad/tfproviderdocs/README.md | 1 + .../bflad/tfproviderdocs/check/check.go | 50 +- .../bflad/tfproviderdocs/check/directory.go | 13 +- .../tfproviderdocs/check/file_mismatch.go | 85 +- .../check/sidenavigation/sidenavigation.go | 2 +- .../bflad/tfproviderdocs/command/check.go | 93 +- vendor/github.com/bflad/tfproviderdocs/go.mod | 2 +- vendor/github.com/bflad/tfproviderdocs/go.sum | 10 +- .../bflad/tfproviderdocs/version/version.go | 2 +- .../helper/analysisutils/analyzers.go | 87 +- .../helper/analysisutils/runners.go | 377 +- .../helper/analysisutils/schema_analyzers.go | 29 + .../helper/analysisutils/schema_runners.go | 50 + .../helper/astutils/basiclit.go | 11 +- .../tfproviderlint/helper/astutils/expr.go | 54 + .../helper/astutils/fieldlist.go | 10 + .../helper/astutils/function_parameters.go | 40 - .../tfproviderlint/helper/astutils/package.go | 2 + .../terraformtype/helper/schema/attributes.go | 61 + .../helper/schema/type_customizedifffunc.go | 87 + .../helper/schema/type_provider.go | 26 + .../helper/schema/type_resourcediff.go | 21 + .../helper/schema/type_stateupgradefunc.go | 91 + .../bflad/tfproviderlint/passes/R007/R007.go | 4 +- .../bflad/tfproviderlint/passes/R008/R008.go | 4 +- .../bflad/tfproviderlint/passes/S015/S015.go | 5 +- .../tfproviderlint/passes/S035/README.md | 32 + .../bflad/tfproviderlint/passes/S035/S035.go | 8 + .../tfproviderlint/passes/S036/README.md | 32 + .../bflad/tfproviderlint/passes/S036/S036.go | 8 + .../tfproviderlint/passes/S037/README.md | 32 + .../bflad/tfproviderlint/passes/S037/S037.go | 8 + .../bflad/tfproviderlint/passes/V002/V002.go | 4 +- .../bflad/tfproviderlint/passes/V003/V003.go | 8 +- .../bflad/tfproviderlint/passes/V004/V004.go | 8 +- .../bflad/tfproviderlint/passes/V005/V005.go | 4 +- .../bflad/tfproviderlint/passes/V006/V006.go | 4 +- .../bflad/tfproviderlint/passes/V007/V007.go | 4 +- .../bflad/tfproviderlint/passes/V008/V008.go | 4 +- .../bflad/tfproviderlint/passes/checks.go | 6 + .../schema/crudfuncinfo/crudfuncinfo.go | 4 +- .../resourcedatapartialcallexpr.go | 14 + .../resourcedatasetpartialcallexpr.go | 14 + .../schemavalidatefuncinfo.go | 8 +- .../iprangecallexpr/iprangecallexpr.go | 13 + .../singleipcallexpr/singleipcallexpr.go | 13 + .../bflad/tfproviderlint/version/version.go | 2 +- vendor/github.com/bombsimon/wsl/v2/go.mod | 12 - vendor/github.com/bombsimon/wsl/v2/go.sum | 30 - .../bombsimon/wsl/{v2 => v3}/.gitignore | 0 .../bombsimon/wsl/{v2 => v3}/.travis.yml | 0 .../bombsimon/wsl/{v2 => v3}/LICENSE | 0 .../bombsimon/wsl/{v2 => v3}/README.md | 3 +- vendor/github.com/bombsimon/wsl/v3/go.mod | 12 + vendor/github.com/bombsimon/wsl/v3/go.sum | 25 + .../bombsimon/wsl/{v2 => v3}/wsl.go | 214 +- .../github.com/golang/protobuf/proto/lib.go | 2 +- .../github.com/golang/protobuf/proto/text.go | 6 +- .../protoc-gen-go/descriptor/descriptor.pb.go | 12 +- .../protoc-gen-go/descriptor/descriptor.proto | 140 +- .../golang/protobuf/ptypes/any/any.pb.go | 7 +- .../golang/protobuf/ptypes/any/any.proto | 3 +- .../protobuf/ptypes/duration/duration.pb.go | 6 +- .../protobuf/ptypes/duration/duration.proto | 3 +- .../protobuf/ptypes/timestamp/timestamp.pb.go | 40 +- .../protobuf/ptypes/timestamp/timestamp.proto | 37 +- .../golangci-lint/pkg/commands/run.go | 8 +- .../golangci-lint/pkg/config/config.go | 113 +- .../pkg/config/config_gocritic.go | 74 +- .../golangci-lint/pkg/golinters/asciicheck.go | 19 + .../golangci-lint/pkg/golinters/deadcode.go | 2 +- .../golangci-lint/pkg/golinters/depguard.go | 2 +- .../golangci-lint/pkg/golinters/dupl.go | 2 +- .../golangci-lint/pkg/golinters/errcheck.go | 2 +- .../golangci-lint/pkg/golinters/funlen.go | 2 +- .../pkg/golinters/goanalysis/issue.go | 12 +- .../pkg/golinters/goanalysis/linter.go | 26 +- .../pkg/golinters/goanalysis/runner.go | 59 +- .../golangci-lint/pkg/golinters/gocognit.go | 2 +- .../golangci-lint/pkg/golinters/goconst.go | 2 +- .../golangci-lint/pkg/golinters/gocyclo.go | 2 +- .../golangci-lint/pkg/golinters/godot.go | 64 + .../golangci-lint/pkg/golinters/godox.go | 2 +- .../golangci-lint/pkg/golinters/goerr113.go | 19 + .../pkg/golinters/gofmt_common.go | 1 - .../golangci-lint/pkg/golinters/gomodguard.go | 88 + .../golangci-lint/pkg/golinters/gosec.go | 2 +- .../golangci-lint/pkg/golinters/govet.go | 5 + .../pkg/golinters/ineffassign.go | 2 +- .../golangci-lint/pkg/golinters/interfacer.go | 2 +- .../golangci-lint/pkg/golinters/maligned.go | 2 +- .../golangci-lint/pkg/golinters/nestif.go | 65 + .../golangci-lint/pkg/golinters/nolintlint.go | 92 + .../pkg/golinters/nolintlint/README.md | 31 + .../pkg/golinters/nolintlint/nolintlint.go | 239 + .../golangci-lint/pkg/golinters/prealloc.go | 2 +- .../pkg/golinters/structcheck.go | 2 +- .../pkg/golinters/testpackage.go | 23 + .../golangci-lint/pkg/golinters/unconvert.go | 2 +- .../golangci-lint/pkg/golinters/unparam.go | 2 +- .../golangci-lint/pkg/golinters/unused.go | 13 +- .../golangci-lint/pkg/golinters/varcheck.go | 2 +- .../golangci-lint/pkg/golinters/whitespace.go | 2 +- .../golangci-lint/pkg/golinters/wsl.go | 9 +- .../pkg/lint/lintersdb/enabled_set.go | 2 +- .../pkg/lint/lintersdb/manager.go | 26 + .../golangci/golangci-lint/pkg/lint/runner.go | 28 +- .../golangci-lint/pkg/printers/github.go | 39 + .../golangci-lint/pkg/result/issue.go | 4 + .../processors/autogenerated_exclude.go | 2 +- .../pkg/result/processors/exclude.go | 20 + .../pkg/result/processors/exclude_rules.go | 33 +- .../pkg/result/processors/fixer.go | 10 +- .../processors/max_per_file_from_linter.go | 2 +- .../pkg/result/processors/nolint.go | 68 +- .../hashicorp/terraform-json/schemas.go | 29 +- .../terraform-plugin-sdk/acctest/doc.go | 31 + .../helper/encryption/encryption.go | 8 + .../helper/hashcode/hashcode.go | 8 + .../helper/mutexkv/mutexkv.go | 12 + .../helper/resource/map.go | 2 +- .../helper/resource/testing.go | 124 +- .../helper/resource/testing_import_state.go | 2 +- .../helper/resource/testing_new.go | 46 +- .../helper/resource/testing_new_config.go | 1 + .../helper/schema/core_schema.go | 64 +- .../helper/schema/field_reader.go | 4 +- .../helper/schema/field_writer_map.go | 4 +- .../helper/schema/provider.go | 4 +- .../helper/schema/resource.go | 9 +- .../helper/schema/resource_data.go | 18 +- .../helper/schema/schema.go | 93 +- .../helper/schema/serialize.go | 2 + .../terraform-plugin-sdk/helper/schema/set.go | 37 +- .../helper/validation/strings.go | 22 + .../httpclient/useragent.go | 4 + .../internal/configs/configschema/schema.go | 27 +- .../internal/flatmap/map.go | 6 +- .../internal/helper/config/validator.go | 6 +- .../internal/plugin/convert/schema.go | 62 +- .../internal/tfplugin5/tfplugin5.pb.go | 388 +- .../internal/tfplugin5/tfplugin5.proto | 27 +- .../terraform-plugin-sdk/meta/meta.go | 2 +- .../terraform-plugin-sdk/terraform/diff.go | 20 +- .../terraform-plugin-sdk/terraform/state.go | 16 +- .../hashicorp/terraform-plugin-test/helper.go | 7 +- .../hashicorp/terraform-plugin-test/util.go | 40 + .../jmespath/go-jmespath/.travis.yml | 10 +- .../github.com/jmespath/go-jmespath/README.md | 82 +- vendor/github.com/jmespath/go-jmespath/api.go | 2 +- vendor/github.com/jmespath/go-jmespath/go.mod | 5 + vendor/github.com/jmespath/go-jmespath/go.sum | 11 + .../github.com/jmespath/go-jmespath/parser.go | 2 +- .../github.com/maratori/testpackage/LICENSE | 21 + .../pkg/testpackage/testpackage.go | 53 + vendor/github.com/nakabonne/nestif/.gitignore | 16 + vendor/github.com/nakabonne/nestif/LICENSE | 25 + vendor/github.com/nakabonne/nestif/README.md | 122 + vendor/github.com/nakabonne/nestif/go.mod | 8 + vendor/github.com/nakabonne/nestif/go.sum | 12 + vendor/github.com/nakabonne/nestif/nestif.go | 148 + .../ryancurrah/gomodguard/.dockerignore | 1 + .../ryancurrah/gomodguard/.gitignore | 21 + .../ryancurrah/gomodguard/.gomodguard.yaml | 18 + .../ryancurrah/gomodguard/.goreleaser.yml | 31 + .../ryancurrah/gomodguard/Dockerfile | 17 + .../gomodguard/Dockerfile.goreleaser | 10 + .../github.com/ryancurrah/gomodguard/LICENSE | 21 + .../github.com/ryancurrah/gomodguard/Makefile | 37 + .../ryancurrah/gomodguard/README.md | 114 + .../github.com/ryancurrah/gomodguard/VERSION | 1 + .../github.com/ryancurrah/gomodguard/go.mod | 11 + .../github.com/ryancurrah/gomodguard/go.sum | 24 + .../ryancurrah/gomodguard/gomodguard.go | 403 + vendor/github.com/securego/gosec/.travis.yml | 2 +- vendor/github.com/securego/gosec/Makefile | 20 +- vendor/github.com/securego/gosec/README.md | 4 + vendor/github.com/securego/gosec/analyzer.go | 45 +- vendor/github.com/securego/gosec/call_list.go | 39 +- vendor/github.com/securego/gosec/go.mod | 12 +- vendor/github.com/securego/gosec/go.sum | 23 +- vendor/github.com/securego/gosec/helpers.go | 37 + vendor/github.com/securego/gosec/install.sh | 55 +- vendor/github.com/securego/gosec/issue.go | 2 + .../securego/gosec/rules/archive.go | 2 +- .../securego/gosec/rules/bad_defer.go | 69 + .../github.com/securego/gosec/rules/bind.go | 2 +- .../gosec/rules/decompression-bomb.go | 109 + .../github.com/securego/gosec/rules/errors.go | 4 +- .../securego/gosec/rules/fileperms.go | 16 + .../securego/gosec/rules/integer_overflow.go | 89 + .../securego/gosec/rules/readfile.go | 4 +- vendor/github.com/securego/gosec/rules/rsa.go | 2 +- .../securego/gosec/rules/rulelist.go | 4 + vendor/github.com/securego/gosec/rules/sql.go | 4 +- .../github.com/securego/gosec/rules/ssrf.go | 2 +- .../securego/gosec/rules/subproc.go | 23 +- .../securego/gosec/rules/tempfiles.go | 2 +- .../securego/gosec/rules/templates.go | 2 +- .../testify/assert/assertion_format.go | 78 +- .../testify/assert/assertion_forward.go | 156 +- .../stretchr/testify/assert/assertions.go | 218 +- .../testify/assert/forward_assertions.go | 2 +- .../github.com/stretchr/testify/mock/mock.go | 25 +- .../github.com/tdakkota/asciicheck/.gitignore | 33 + vendor/github.com/tdakkota/asciicheck/LICENSE | 21 + .../github.com/tdakkota/asciicheck/README.md | 44 + .../github.com/tdakkota/asciicheck/ascii.go | 18 + .../tdakkota/asciicheck/asciicheck.go | 49 + vendor/github.com/tdakkota/asciicheck/go.mod | 5 + vendor/github.com/tetafro/godot/.gitignore | 1 + vendor/github.com/tetafro/godot/LICENSE | 21 + vendor/github.com/tetafro/godot/README.md | 44 + vendor/github.com/tetafro/godot/go.mod | 3 + vendor/github.com/tetafro/godot/godot.go | 147 + .../tommy-muehle/go-mnd/.goreleaser.yml | 22 +- .../tommy-muehle/go-mnd/.travis.yml | 4 + .../github.com/tommy-muehle/go-mnd/README.md | 18 +- .../tommy-muehle/go-mnd/analyzer.go | 50 +- .../tommy-muehle/go-mnd/checks/argument.go | 23 +- .../tommy-muehle/go-mnd/checks/assign.go | 21 +- .../tommy-muehle/go-mnd/checks/case.go | 21 +- .../tommy-muehle/go-mnd/checks/checks.go | 9 - .../tommy-muehle/go-mnd/checks/condition.go | 19 +- .../tommy-muehle/go-mnd/checks/operation.go | 19 +- .../tommy-muehle/go-mnd/checks/return.go | 17 +- .../github.com/tommy-muehle/go-mnd/config.go | 58 - .../tommy-muehle/go-mnd/config/config.go | 84 + .../x/mod/internal/lazyregexp/lazyre.go | 78 + vendor/golang.org/x/mod/modfile/print.go | 165 + vendor/golang.org/x/mod/modfile/read.go | 909 ++ vendor/golang.org/x/mod/modfile/rule.go | 776 ++ vendor/golang.org/x/mod/module/module.go | 6 +- vendor/golang.org/x/net/http2/http2.go | 6 - vendor/golang.org/x/net/http2/server.go | 11 +- vendor/golang.org/x/net/http2/transport.go | 3 - vendor/golang.org/x/sys/cpu/cpu.go | 9 + vendor/golang.org/x/sys/cpu/cpu_arm64.go | 138 + vendor/golang.org/x/sys/cpu/cpu_arm64.s | 31 + vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go | 11 + .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 11 + .../sys/cpu/{cpu_gccgo.c => cpu_gccgo_x86.c} | 0 .../cpu/{cpu_gccgo.go => cpu_gccgo_x86.go} | 0 vendor/golang.org/x/sys/cpu/cpu_linux.go | 48 +- .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 8 +- .../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 22 + .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 9 + vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 2 - vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 2 - .../golang.org/x/sys/cpu/cpu_other_arm64.go | 2 - vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 9 + vendor/golang.org/x/sys/cpu/cpu_wasm.go | 2 - vendor/golang.org/x/sys/cpu/hwcap_linux.go | 56 + vendor/golang.org/x/sys/unix/README.md | 11 + .../golang.org/x/sys/unix/asm_linux_riscv64.s | 7 - .../golang.org/x/sys/unix/bluetooth_linux.go | 1 + vendor/golang.org/x/sys/unix/fcntl.go | 12 +- vendor/golang.org/x/sys/unix/fdset.go | 29 + vendor/golang.org/x/sys/unix/mkall.sh | 2 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 12 +- .../x/sys/unix/sockcmsg_dragonfly.go | 16 + .../golang.org/x/sys/unix/sockcmsg_linux.go | 2 +- vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 36 +- .../x/sys/unix/sockcmsg_unix_other.go | 38 + vendor/golang.org/x/sys/unix/syscall_bsd.go | 21 +- .../x/sys/unix/syscall_darwin.1_13.go | 2 - .../golang.org/x/sys/unix/syscall_darwin.go | 21 +- .../x/sys/unix/syscall_darwin_386.go | 1 - .../x/sys/unix/syscall_darwin_amd64.go | 1 - .../x/sys/unix/syscall_darwin_arm.1_11.go | 2 +- .../x/sys/unix/syscall_darwin_arm.go | 4 - .../x/sys/unix/syscall_darwin_arm64.go | 4 - .../x/sys/unix/syscall_dragonfly.go | 24 +- .../golang.org/x/sys/unix/syscall_freebsd.go | 19 +- .../x/sys/unix/syscall_freebsd_386.go | 6 + .../x/sys/unix/syscall_freebsd_amd64.go | 6 + .../x/sys/unix/syscall_freebsd_arm.go | 6 + .../x/sys/unix/syscall_freebsd_arm64.go | 6 + vendor/golang.org/x/sys/unix/syscall_linux.go | 159 +- .../x/sys/unix/syscall_linux_386.go | 4 +- .../x/sys/unix/syscall_linux_amd64.go | 4 +- .../x/sys/unix/syscall_linux_arm.go | 4 +- .../x/sys/unix/syscall_linux_arm64.go | 4 +- .../x/sys/unix/syscall_linux_mips64x.go | 8 +- .../x/sys/unix/syscall_linux_mipsx.go | 4 +- .../x/sys/unix/syscall_linux_ppc64x.go | 4 +- .../x/sys/unix/syscall_linux_riscv64.go | 4 +- .../x/sys/unix/syscall_linux_s390x.go | 4 +- .../x/sys/unix/syscall_linux_sparc64.go | 4 +- .../golang.org/x/sys/unix/syscall_netbsd.go | 32 +- .../golang.org/x/sys/unix/syscall_openbsd.go | 33 +- .../golang.org/x/sys/unix/syscall_solaris.go | 2 +- .../golang.org/x/sys/unix/zerrors_aix_ppc.go | 12 +- .../x/sys/unix/zerrors_aix_ppc64.go | 12 +- vendor/golang.org/x/sys/unix/zerrors_linux.go | 2453 +++++ .../x/sys/unix/zerrors_linux_386.go | 3265 +----- .../x/sys/unix/zerrors_linux_amd64.go | 3265 +----- .../x/sys/unix/zerrors_linux_arm.go | 3277 +----- .../x/sys/unix/zerrors_linux_arm64.go | 3251 +----- .../x/sys/unix/zerrors_linux_mips.go | 3269 +----- .../x/sys/unix/zerrors_linux_mips64.go | 3269 +----- .../x/sys/unix/zerrors_linux_mips64le.go | 3269 +----- .../x/sys/unix/zerrors_linux_mipsle.go | 3269 +----- .../x/sys/unix/zerrors_linux_ppc64.go | 3388 +----- .../x/sys/unix/zerrors_linux_ppc64le.go | 3388 +----- .../x/sys/unix/zerrors_linux_riscv64.go | 3239 +----- .../x/sys/unix/zerrors_linux_s390x.go | 3385 +----- .../x/sys/unix/zerrors_linux_sparc64.go | 3366 +----- ...acearm_linux.go => zptrace_armnn_linux.go} | 2 +- .../x/sys/unix/zptrace_linux_arm64.go | 17 + ...emips_linux.go => zptrace_mipsnn_linux.go} | 2 +- ...sle_linux.go => zptrace_mipsnnle_linux.go} | 2 +- ...trace386_linux.go => zptrace_x86_linux.go} | 2 +- .../x/sys/unix/zsyscall_darwin_386.1_11.go | 54 +- .../x/sys/unix/zsyscall_darwin_386.go | 74 +- .../x/sys/unix/zsyscall_darwin_386.s | 8 +- .../x/sys/unix/zsyscall_darwin_amd64.1_11.go | 54 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 74 +- .../x/sys/unix/zsyscall_darwin_amd64.s | 8 +- .../x/sys/unix/zsyscall_darwin_arm.1_11.go | 38 +- .../x/sys/unix/zsyscall_darwin_arm.go | 53 +- .../x/sys/unix/zsyscall_darwin_arm.s | 6 +- .../x/sys/unix/zsyscall_darwin_arm64.1_11.go | 38 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 53 +- .../x/sys/unix/zsyscall_darwin_arm64.s | 6 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 11 - .../x/sys/unix/zsyscall_freebsd_386.go | 11 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 11 - .../x/sys/unix/zsyscall_freebsd_arm.go | 11 - .../x/sys/unix/zsyscall_freebsd_arm64.go | 11 - .../golang.org/x/sys/unix/zsyscall_linux.go | 1825 ++++ .../x/sys/unix/zsyscall_linux_386.go | 1742 +-- .../x/sys/unix/zsyscall_linux_amd64.go | 1742 +-- .../x/sys/unix/zsyscall_linux_arm.go | 1742 +-- .../x/sys/unix/zsyscall_linux_arm64.go | 1742 +-- .../x/sys/unix/zsyscall_linux_mips.go | 1742 +-- .../x/sys/unix/zsyscall_linux_mips64.go | 1742 +-- .../x/sys/unix/zsyscall_linux_mips64le.go | 1742 +-- .../x/sys/unix/zsyscall_linux_mipsle.go | 1742 +-- .../x/sys/unix/zsyscall_linux_ppc64.go | 1742 +-- .../x/sys/unix/zsyscall_linux_ppc64le.go | 1742 +-- .../x/sys/unix/zsyscall_linux_riscv64.go | 1742 +-- .../x/sys/unix/zsyscall_linux_s390x.go | 1742 +-- .../x/sys/unix/zsyscall_linux_sparc64.go | 1742 +-- .../x/sys/unix/zsyscall_netbsd_386.go | 78 +- .../x/sys/unix/zsyscall_netbsd_amd64.go | 78 +- .../x/sys/unix/zsyscall_netbsd_arm.go | 78 +- .../x/sys/unix/zsyscall_netbsd_arm64.go | 78 +- .../x/sys/unix/zsyscall_openbsd_386.go | 57 +- .../x/sys/unix/zsyscall_openbsd_amd64.go | 57 +- .../x/sys/unix/zsyscall_openbsd_arm.go | 57 +- .../x/sys/unix/zsyscall_openbsd_arm64.go | 57 +- .../x/sys/unix/zsysnum_linux_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/ztypes_dragonfly_amd64.go | 10 + .../x/sys/unix/ztypes_freebsd_386.go | 12 +- .../x/sys/unix/ztypes_freebsd_amd64.go | 12 +- .../x/sys/unix/ztypes_freebsd_arm.go | 12 +- .../x/sys/unix/ztypes_freebsd_arm64.go | 14 +- vendor/golang.org/x/sys/unix/ztypes_linux.go | 2274 ++++ .../golang.org/x/sys/unix/ztypes_linux_386.go | 2036 +--- .../x/sys/unix/ztypes_linux_amd64.go | 2037 +--- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 2037 +--- .../x/sys/unix/ztypes_linux_arm64.go | 2037 +--- .../x/sys/unix/ztypes_linux_mips.go | 2037 +--- .../x/sys/unix/ztypes_linux_mips64.go | 2038 +--- .../x/sys/unix/ztypes_linux_mips64le.go | 2038 +--- .../x/sys/unix/ztypes_linux_mipsle.go | 2037 +--- .../x/sys/unix/ztypes_linux_ppc64.go | 2037 +--- .../x/sys/unix/ztypes_linux_ppc64le.go | 2037 +--- .../x/sys/unix/ztypes_linux_riscv64.go | 2037 +--- .../x/sys/unix/ztypes_linux_s390x.go | 2037 +--- .../x/sys/unix/ztypes_linux_sparc64.go | 2037 +--- .../x/sys/unix/ztypes_netbsd_386.go | 32 + .../x/sys/unix/ztypes_netbsd_amd64.go | 33 + .../x/sys/unix/ztypes_netbsd_arm.go | 32 + .../x/sys/unix/ztypes_netbsd_arm64.go | 33 + .../x/sys/unix/ztypes_solaris_amd64.go | 7 + .../x/tools/go/analysis/analysis.go | 16 + .../go/analysis/analysistest/analysistest.go | 75 + .../analysis/internal/analysisflags/flags.go | 2 +- .../go/analysis/internal/checker/checker.go | 32 + .../go/analysis/passes/errorsas/errorsas.go | 2 +- .../go/analysis/passes/findcall/findcall.go | 14 +- .../go/analysis/passes/nilness/nilness.go | 103 +- .../tools/go/analysis/passes/printf/printf.go | 62 +- .../passes/unreachable/unreachable.go | 13 +- .../x/tools/go/ast/inspector/inspector.go | 6 +- .../tools/go/internal/packagesdriver/sizes.go | 109 +- .../golang.org/x/tools/go/packages/golist.go | 72 +- .../x/tools/go/packages/golist_overlay.go | 64 +- .../x/tools/go/packages/loadmode_string.go | 2 +- .../x/tools/go/packages/packages.go | 19 + vendor/golang.org/x/tools/imports/forward.go | 5 +- .../internal/analysisinternal/analysis.go | 118 + .../tools/internal/fastwalk/fastwalk_unix.go | 5 +- .../x/tools/internal/gocommand/invoke.go | 186 + .../x/tools/internal/gopathwalk/walk.go | 32 +- .../x/tools/internal/imports/fix.go | 66 +- .../x/tools/internal/imports/imports.go | 10 +- .../x/tools/internal/imports/mod.go | 12 +- .../x/tools/internal/imports/zstdlib.go | 87 + .../x/tools/internal/lsp/diff/diff.go | 159 + .../x/tools/internal/lsp/diff/myers/diff.go | 205 + .../x/tools/internal/lsp/diff/unified.go | 210 + .../internal/packagesinternal/packages.go | 31 + .../golang.org/x/tools/internal/span/parse.go | 100 + .../golang.org/x/tools/internal/span/span.go | 285 + .../golang.org/x/tools/internal/span/token.go | 182 + .../x/tools/internal/span/token111.go | 39 + .../x/tools/internal/span/token112.go | 16 + .../golang.org/x/tools/internal/span/uri.go | 165 + .../golang.org/x/tools/internal/span/utf16.go | 94 + .../x/tools/internal/telemetry/event/event.go | 113 + .../tools/internal/telemetry/event/export.go | 68 + .../x/tools/internal/telemetry/event/key.go | 565 + .../x/tools/internal/telemetry/event/label.go | 29 + .../x/tools/internal/telemetry/event/log.go | 68 + .../tools/internal/telemetry/event/metric.go | 29 + .../x/tools/internal/telemetry/event/tag.go | 197 + .../x/tools/internal/telemetry/event/trace.go | 42 + vendor/golang.org/x/xerrors/fmt.go | 138 +- .../api/annotations/annotations.pb.go | 4 +- .../googleapis/api/annotations/client.pb.go | 4 +- .../api/annotations/field_behavior.pb.go | 4 +- .../googleapis/api/annotations/http.pb.go | 4 +- .../googleapis/api/annotations/resource.pb.go | 272 +- .../googleapis/iam/v1/iam_policy.pb.go | 93 +- .../genproto/googleapis/iam/v1/options.pb.go | 14 +- .../genproto/googleapis/iam/v1/policy.pb.go | 67 +- .../genproto/googleapis/rpc/code/code.pb.go | 9 +- .../googleapis/rpc/status/status.pb.go | 74 +- .../genproto/googleapis/type/expr/expr.pb.go | 4 +- vendor/google.golang.org/grpc/.travis.yml | 27 +- .../google.golang.org/grpc/CODE-OF-CONDUCT.md | 3 + vendor/google.golang.org/grpc/CONTRIBUTING.md | 4 +- vendor/google.golang.org/grpc/GOVERNANCE.md | 1 + vendor/google.golang.org/grpc/MAINTAINERS.md | 27 + vendor/google.golang.org/grpc/Makefile | 3 + .../grpc/attributes/attributes.go | 70 + vendor/google.golang.org/grpc/backoff.go | 20 + .../google.golang.org/grpc/backoff/backoff.go | 52 + .../grpc/balancer/balancer.go | 120 +- .../grpc/balancer/base/balancer.go | 142 +- .../grpc/balancer/base/base.go | 29 + .../grpc/balancer/roundrobin/roundrobin.go | 18 +- .../grpc/balancer_conn_wrappers.go | 163 +- .../grpc/balancer_v1_wrapper.go | 34 +- vendor/google.golang.org/grpc/clientconn.go | 303 +- .../grpc/credentials/credentials.go | 275 +- .../grpc/credentials/{tls13.go => go12.go} | 0 .../google.golang.org/grpc/credentials/tls.go | 225 + vendor/google.golang.org/grpc/dialoptions.go | 82 +- .../grpc/encoding/encoding.go | 4 + vendor/google.golang.org/grpc/go.mod | 15 +- vendor/google.golang.org/grpc/go.sum | 36 +- .../google.golang.org/grpc/grpclog/grpclog.go | 2 +- .../google.golang.org/grpc/health/client.go | 42 +- .../grpc/health/grpc_health_v1/health.pb.go | 96 +- .../google.golang.org/grpc/health/server.go | 10 +- .../grpc/internal/backoff/backoff.go | 27 +- .../grpc/internal/binarylog/binarylog.go | 12 +- .../grpc/internal/binarylog/env_config.go | 4 +- .../grpc/internal/binarylog/sink.go | 2 +- .../grpc/internal/buffer/unbounded.go | 85 + .../grpc/internal/envconfig/envconfig.go | 7 +- .../grpc/internal/internal.go | 15 +- .../resolver/dns/dns_resolver.go | 214 +- .../grpc/internal/resolver/dns/go113.go | 33 + .../resolver/passthrough/passthrough.go | 4 +- .../grpc/internal/transport/controlbuf.go | 12 +- .../grpc/internal/transport/handler_server.go | 10 +- .../grpc/internal/transport/http2_client.go | 203 +- .../grpc/internal/transport/http2_server.go | 157 +- .../grpc/internal/transport/http_util.go | 1 + .../grpc/internal/transport/transport.go | 70 +- .../google.golang.org/grpc/picker_wrapper.go | 172 +- vendor/google.golang.org/grpc/pickfirst.go | 89 +- .../grpc/resolver/resolver.go | 90 +- .../grpc/resolver_conn_wrapper.go | 175 +- vendor/google.golang.org/grpc/rpc_util.go | 56 +- vendor/google.golang.org/grpc/server.go | 160 +- .../google.golang.org/grpc/service_config.go | 39 +- .../grpc/serviceconfig/serviceconfig.go | 21 +- vendor/google.golang.org/grpc/stats/stats.go | 11 + vendor/google.golang.org/grpc/stream.go | 2 +- .../grpc/test/bufconn/bufconn.go | 74 +- vendor/google.golang.org/grpc/trace.go | 3 - vendor/google.golang.org/grpc/version.go | 2 +- vendor/google.golang.org/grpc/vet.sh | 87 +- vendor/modules.txt | 81 +- website/allowed-subcategories.txt | 9 +- website/aws.erb | 143 +- website/docs/d/acm_certificate.html.markdown | 2 + .../docs/d/api_gateway_api_key.html.markdown | 2 +- .../docs/d/api_gateway_rest_api.html.markdown | 2 +- .../docs/d/api_gateway_vpc_link.html.markdown | 2 +- .../docs/d/availability_zone.html.markdown | 30 +- .../docs/d/availability_zones.html.markdown | 40 + website/docs/d/backup_plan.html.markdown | 34 + website/docs/d/backup_selection.html.markdown | 35 + website/docs/d/backup_vault.html.markdown | 34 + .../d/cloudfront_distribution.html.markdown | 51 + .../docs/d/cloudwatch_log_group.html.markdown | 2 +- .../docs/d/db_cluster_snapshot.html.markdown | 2 +- .../directory_service_directory.html.markdown | 3 +- website/docs/d/ebs_snapshot.html.markdown | 2 +- website/docs/d/ebs_volume.html.markdown | 4 +- website/docs/d/ec2_coip_pool.html.markdown | 60 + website/docs/d/ec2_coip_pools.html.markdown | 43 + .../docs/d/ec2_local_gateway.html.markdown | 61 + ...c2_local_gateway_route_table.html.markdown | 51 + ...2_local_gateway_route_tables.html.markdown | 42 + .../docs/d/ec2_local_gateways.html.markdown | 47 + ...ateway_dx_gateway_attachment.html.markdown | 13 +- ...t_gateway_peering_attachment.html.markdown | 58 + ...ansit_gateway_vpn_attachment.html.markdown | 24 +- website/docs/d/ecr_repository.html.markdown | 2 +- website/docs/d/efs_access_point.html.markdown | 45 + website/docs/d/efs_file_system.html.markdown | 7 +- website/docs/d/eip.html.markdown | 4 +- website/docs/d/eks_cluster.html.markdown | 22 +- .../docs/d/iam_policy_document.html.markdown | 11 +- website/docs/d/iam_role.html.markdown | 1 + website/docs/d/instance.html.markdown | 10 +- website/docs/d/instances.html.markdown | 2 +- website/docs/d/internet_gateway.html.markdown | 2 +- website/docs/d/kinesis_stream.html.markdown | 2 +- .../docs/d/lambda_invocation.html.markdown | 2 +- website/docs/d/launch_template.html.markdown | 30 +- website/docs/d/nat_gateway.html.markdown | 2 +- website/docs/d/network_acls.html.markdown | 2 +- .../docs/d/network_interface.html.markdown | 1 + .../docs/d/network_interfaces.html.markdown | 2 +- website/docs/d/prefix_list.html.markdown | 25 +- .../docs/d/ram_resource_share.html.markdown | 1 + website/docs/d/rds_cluster.html.markdown | 4 +- website/docs/d/regions.html.markdown | 63 + .../d/route53_resolver_rule.html.markdown | 2 +- website/docs/d/route53_zone.html.markdown | 2 +- website/docs/d/route_table.html.markdown | 2 +- website/docs/d/route_tables.html.markdown | 4 +- website/docs/d/s3_bucket_object.html.markdown | 2 +- website/docs/d/security_group.html.markdown | 2 +- website/docs/d/security_groups.html.markdown | 2 +- website/docs/d/sqs_queue.html.markdown | 2 +- website/docs/d/subnet.html.markdown | 3 +- website/docs/d/subnet_ids.html.markdown | 2 +- website/docs/d/vpc.html.markdown | 2 +- website/docs/d/vpc_dhcp_options.html.markdown | 2 +- website/docs/d/vpc_endpoint.html.markdown | 6 +- .../docs/d/vpc_endpoint_service.html.markdown | 30 +- .../d/vpc_peering_connection.html.markdown | 6 +- website/docs/d/vpcs.html.markdown | 2 +- website/docs/d/vpn_gateway.html.markdown | 2 +- website/docs/d/wafv2_ip_set.html.markdown | 38 + .../d/wafv2_regex_pattern_set.html.markdown | 42 + website/docs/d/wafv2_rule_group.html.markdown | 35 + .../guides/custom-service-endpoints.html.md | 4 + website/docs/guides/version-3-upgrade.html.md | 27 + website/docs/index.html.markdown | 67 +- .../r/accessanalyzer_analyzer.html.markdown | 2 +- website/docs/r/acm_certificate.html.markdown | 9 +- .../acm_certificate_validation.html.markdown | 8 +- website/docs/r/ami.html.markdown | 2 +- website/docs/r/ami_copy.html.markdown | 2 +- .../docs/r/ami_from_instance.html.markdown | 2 +- .../docs/r/api_gateway_api_key.html.markdown | 2 +- .../r/api_gateway_authorizer.html.markdown | 6 + ...i_gateway_client_certificate.html.markdown | 2 +- .../r/api_gateway_deployment.html.markdown | 33 +- .../r/api_gateway_domain_name.html.markdown | 2 +- .../r/api_gateway_integration.html.markdown | 2 +- .../docs/r/api_gateway_rest_api.html.markdown | 2 +- .../docs/r/api_gateway_stage.html.markdown | 2 +- .../r/api_gateway_usage_plan.html.markdown | 2 +- .../docs/r/api_gateway_vpc_link.html.markdown | 5 +- website/docs/r/apigatewayv2_api.html.markdown | 17 +- .../r/apigatewayv2_api_mapping.html.markdown | 47 + .../r/apigatewayv2_authorizer.html.markdown | 81 + .../r/apigatewayv2_deployment.html.markdown | 78 + .../r/apigatewayv2_domain_name.html.markdown | 70 + .../r/apigatewayv2_integration.html.markdown | 86 + ...tewayv2_integration_response.html.markdown | 49 + .../docs/r/apigatewayv2_model.html.markdown | 58 + .../docs/r/apigatewayv2_route.html.markdown | 58 + .../apigatewayv2_route_response.html.markdown | 48 + .../docs/r/apigatewayv2_stage.html.markdown | 90 + .../r/apigatewayv2_vpc_link.html.markdown | 52 + .../r/appautoscaling_policy.html.markdown | 59 +- ...autoscaling_scheduled_action.html.markdown | 2 - .../r/appautoscaling_target.html.markdown | 8 +- website/docs/r/appmesh_mesh.html.markdown | 2 +- website/docs/r/appmesh_route.html.markdown | 2 +- .../docs/r/appmesh_virtual_node.html.markdown | 2 +- .../r/appmesh_virtual_router.html.markdown | 2 +- .../r/appmesh_virtual_service.html.markdown | 2 +- .../docs/r/appsync_graphql_api.html.markdown | 3 +- website/docs/r/appsync_resolver.html.markdown | 18 +- website/docs/r/athena_workgroup.html.markdown | 7 +- .../docs/r/autoscaling_group.html.markdown | 6 +- website/docs/r/backup_plan.html.markdown | 29 +- .../r/cloud9_environment_ec2.html.markdown | 2 +- .../r/cloudfront_distribution.html.markdown | 4 +- .../docs/r/cloudhsm_v2_cluster.html.markdown | 2 +- website/docs/r/cloudtrail.html.markdown | 4 +- .../r/cloudwatch_event_rule.html.markdown | 2 +- .../docs/r/cloudwatch_log_group.html.markdown | 2 +- ...cloudwatch_log_metric_filter.html.markdown | 8 + .../r/cloudwatch_metric_alarm.html.markdown | 2 +- .../docs/r/codebuild_project.html.markdown | 6 +- .../r/codecommit_repository.html.markdown | 6 +- .../docs/r/codecommit_trigger.html.markdown | 4 - website/docs/r/codepipeline.markdown | 11 +- website/docs/r/codepipeline_webhook.markdown | 2 +- ...arnotifications_notification_rule.markdown | 4 +- website/docs/r/cognito_identity_pool.markdown | 2 +- ...to_identity_pool_roles_attachment.markdown | 8 + website/docs/r/cognito_user_pool.markdown | 14 +- .../docs/r/cognito_user_pool_client.markdown | 76 + .../r/config_aggregate_authorization.markdown | 2 +- .../docs/r/config_config_rule.html.markdown | 2 +- ...fig_configuration_aggregator.html.markdown | 2 +- .../r/datapipeline_pipeline.html.markdown | 2 +- website/docs/r/datasync_task.html.markdown | 2 +- website/docs/r/dax_cluster.html.markdown | 2 +- .../docs/r/db_cluster_snapshot.html.markdown | 6 +- .../r/db_event_subscription.html.markdown | 8 +- website/docs/r/db_instance.html.markdown | 19 +- ...db_instance_role_association.html.markdown | 4 +- website/docs/r/db_option_group.html.markdown | 2 +- .../docs/r/db_parameter_group.html.markdown | 2 +- .../docs/r/db_security_group.html.markdown | 2 +- website/docs/r/db_snapshot.html.markdown | 14 +- website/docs/r/db_subnet_group.html.markdown | 2 +- .../docs/r/default_network_acl.html.markdown | 12 +- .../docs/r/default_route_table.html.markdown | 9 +- .../r/default_security_group.html.markdown | 2 +- website/docs/r/default_subnet.html.markdown | 2 +- website/docs/r/default_vpc.html.markdown | 2 +- .../r/default_vpc_dhcp_options.html.markdown | 2 +- .../directory_service_directory.html.markdown | 5 +- website/docs/r/dlm_lifecycle_policy.markdown | 8 +- website/docs/r/dms_endpoint.html.markdown | 70 +- .../r/dms_event_subscription.html.markdown | 55 + .../r/dms_replication_instance.html.markdown | 2 +- ...dms_replication_subnet_group.html.markdown | 2 +- .../docs/r/dms_replication_task.html.markdown | 2 +- website/docs/r/docdb_cluster.html.markdown | 3 +- .../r/docdb_cluster_instance.html.markdown | 2 +- ...ocdb_cluster_parameter_group.html.markdown | 2 +- .../docs/r/docdb_subnet_group.html.markdown | 2 +- website/docs/r/dx_connection.html.markdown | 4 +- ...e_virtual_interface_accepter.html.markdown | 2 +- ...c_virtual_interface_accepter.html.markdown | 2 +- ...t_virtual_interface_accepter.html.markdown | 2 +- website/docs/r/dx_lag.html.markdown | 4 +- ...dx_private_virtual_interface.html.markdown | 2 +- .../dx_public_virtual_interface.html.markdown | 2 +- ...dx_transit_virtual_interface.html.markdown | 2 +- .../r/dynamodb_global_table.html.markdown | 6 +- website/docs/r/dynamodb_table.html.markdown | 36 +- website/docs/r/ebs_snapshot.html.markdown | 4 +- .../docs/r/ebs_snapshot_copy.html.markdown | 4 +- website/docs/r/ebs_volume.html.markdown | 4 +- .../ec2_availability_zone_group.html.markdown | 43 + .../docs/r/ec2_capacity_reservation.markdown | 2 +- .../r/ec2_client_vpn_endpoint.html.markdown | 3 +- .../r/ec2_traffic_mirror_filter.html.markdown | 2 +- .../ec2_traffic_mirror_session.html.markdown | 2 +- .../r/ec2_traffic_mirror_target.html.markdown | 2 +- ...t_gateway_peering_attachment.html.markdown | 85 + ...teway_peering_attachment_accepter.markdown | 49 + website/docs/r/ecr_repository.html.markdown | 2 +- .../r/ecs_capacity_provider.html.markdown | 2 +- website/docs/r/ecs_cluster.html.markdown | 2 +- website/docs/r/ecs_service.html.markdown | 10 +- .../docs/r/ecs_task_definition.html.markdown | 59 +- website/docs/r/efs_access_point.html.markdown | 72 + website/docs/r/efs_file_system.html.markdown | 8 +- .../r/efs_file_system_policy.html.markdown | 70 + ...egress_only_internet_gateway.html.markdown | 5 + website/docs/r/eip.html.markdown | 5 +- website/docs/r/eks_cluster.html.markdown | 12 +- .../docs/r/eks_fargate_profile.html.markdown | 4 +- website/docs/r/eks_node_group.html.markdown | 33 +- ...lastic_beanstalk_application.html.markdown | 2 +- ...eanstalk_application_version.html.markdown | 2 +- .../docs/r/elasticache_cluster.html.markdown | 2 +- ...lasticache_replication_group.html.markdown | 2 +- .../docs/r/elasticsearch_domain.html.markdown | 10 +- website/docs/r/elb.html.markdown | 2 +- website/docs/r/emr_cluster.html.markdown | 2 +- website/docs/r/flow_log.html.markdown | 6 +- .../r/fsx_lustre_file_system.html.markdown | 2 +- .../r/fsx_windows_file_system.html.markdown | 2 +- website/docs/r/gamelift_alias.html.markdown | 2 +- website/docs/r/gamelift_build.html.markdown | 2 +- website/docs/r/gamelift_fleet.html.markdown | 2 +- .../gamelift_game_session_queue.html.markdown | 2 +- website/docs/r/glacier_vault.html.markdown | 2 +- .../r/globalaccelerator_accelerator.markdown | 2 +- .../docs/r/glue_catalog_table.html.markdown | 2 +- website/docs/r/glue_connection.html.markdown | 3 +- website/docs/r/glue_crawler.html.markdown | 2 +- website/docs/r/glue_job.html.markdown | 2 +- website/docs/r/glue_trigger.html.markdown | 2 +- ...y_organization_admin_account.html.markdown | 48 + ...y_organization_configuration.html.markdown | 47 + website/docs/r/iam_role.html.markdown | 2 +- website/docs/r/iam_role_policy.html.markdown | 4 +- website/docs/r/iam_user.html.markdown | 2 +- ...nspector_assessment_template.html.markdown | 15 +- website/docs/r/instance.html.markdown | 24 +- website/docs/r/internet_gateway.html.markdown | 2 +- website/docs/r/iot_topic_rule.html.markdown | 28 +- website/docs/r/key_pair.html.markdown | 2 +- ...inesis_analytics_application.html.markdown | 2 +- ...sis_firehose_delivery_stream.html.markdown | 2 +- website/docs/r/kinesis_stream.html.markdown | 2 +- .../docs/r/kinesis_video_stream.html.markdown | 2 +- website/docs/r/kms_grant.html.markdown | 8 + website/docs/r/kms_key.html.markdown | 2 +- website/docs/r/lambda_function.html.markdown | 2 +- .../docs/r/lambda_permission.html.markdown | 15 +- website/docs/r/launch_template.html.markdown | 37 +- website/docs/r/lb.html.markdown | 3 +- website/docs/r/lb_listener.html.markdown | 19 +- website/docs/r/lb_listener_rule.html.markdown | 56 +- website/docs/r/lb_target_group.html.markdown | 2 +- ...ensemanager_license_configuration.markdown | 2 +- .../docs/r/lightsail_instance.html.markdown | 2 +- ...e_member_account_association.html.markdown | 4 +- .../macie_s3_bucket_association.html.markdown | 4 +- .../docs/r/media_convert_queue.html.markdown | 2 +- .../r/media_package_channel.html.markdown | 2 +- .../r/media_store_container.html.markdown | 2 +- website/docs/r/mq_broker.html.markdown | 8 +- website/docs/r/mq_configuration.html.markdown | 2 +- website/docs/r/msk_cluster.html.markdown | 90 +- website/docs/r/nat_gateway.html.markdown | 6 +- website/docs/r/neptune_cluster.html.markdown | 4 +- .../r/neptune_cluster_instance.html.markdown | 2 +- ...tune_cluster_parameter_group.html.markdown | 2 +- .../neptune_event_subscription.html.markdown | 2 +- .../r/neptune_parameter_group.html.markdown | 2 +- .../docs/r/neptune_subnet_group.html.markdown | 2 +- website/docs/r/network_acl.html.markdown | 2 +- website/docs/r/network_acl_rule.html.markdown | 18 + website/docs/r/network_interface.markdown | 2 +- .../docs/r/opsworks_application.html.markdown | 8 + .../r/opsworks_custom_layer.html.markdown | 2 + .../r/opsworks_ganglia_layer.html.markdown | 2 + .../r/opsworks_haproxy_layer.html.markdown | 2 + .../r/opsworks_java_app_layer.html.markdown | 2 + .../r/opsworks_memcached_layer.html.markdown | 2 + .../docs/r/opsworks_mysql_layer.html.markdown | 2 + .../r/opsworks_nodejs_app_layer.html.markdown | 2 + .../r/opsworks_php_app_layer.html.markdown | 10 + .../r/opsworks_rails_app_layer.html.markdown | 2 + website/docs/r/opsworks_stack.html.markdown | 2 +- .../r/opsworks_static_web_layer.html.markdown | 10 + .../r/organizations_account.html.markdown | 2 +- website/docs/r/pinpoint_app.markdown | 2 +- .../docs/r/pinpoint_email_channel.markdown | 4 +- website/docs/r/placement_group.html.markdown | 4 +- website/docs/r/qldb_ledger.html.markdown | 2 +- website/docs/r/ram_resource_share.markdown | 4 +- website/docs/r/rds_cluster.html.markdown | 65 +- .../docs/r/rds_cluster_endpoint.html.markdown | 6 +- .../docs/r/rds_cluster_instance.html.markdown | 2 +- .../r/rds_cluster_parameter_group.markdown | 2 +- .../docs/r/rds_global_cluster.html.markdown | 6 +- website/docs/r/redshift_cluster.html.markdown | 2 +- .../redshift_event_subscription.html.markdown | 2 +- .../r/redshift_parameter_group.html.markdown | 2 +- ...redshift_snapshot_copy_grant.html.markdown | 10 +- .../redshift_snapshot_schedule.html.markdown | 2 +- .../r/redshift_subnet_group.html.markdown | 2 +- .../docs/r/resourcegroups_group.html.markdown | 2 +- .../docs/r/route53_health_check.html.markdown | 2 +- .../r/route53_resolver_endpoint.html.markdown | 2 +- .../r/route53_resolver_rule.html.markdown | 2 +- website/docs/r/route53_zone.html.markdown | 2 +- website/docs/r/route_table.html.markdown | 2 +- website/docs/r/s3_bucket.html.markdown | 26 +- ...ket_analytics_configuration.html.markdown} | 0 website/docs/r/s3_bucket_object.html.markdown | 4 +- .../docs/r/sagemaker_endpoint.html.markdown | 2 +- ...maker_endpoint_configuration.html.markdown | 2 +- website/docs/r/sagemaker_model.html.markdown | 2 +- .../sagemaker_notebook_instance.html.markdown | 2 +- website/docs/r/security_group.html.markdown | 4 +- .../docs/r/security_group_rule.html.markdown | 11 +- website/docs/r/securityhub_member.markdown | 48 + ...ecurityhub_standards_subscription.markdown | 11 +- ...covery_private_dns_namespace.html.markdown | 8 + website/docs/r/ses_event_destination.markdown | 9 + website/docs/r/sfn_activity.html.markdown | 2 +- .../docs/r/sfn_state_machine.html.markdown | 2 +- website/docs/r/sns_topic.html.markdown | 2 +- .../docs/r/spot_fleet_request.html.markdown | 117 +- .../r/spot_instance_request.html.markdown | 2 +- website/docs/r/sqs_queue.html.markdown | 2 +- website/docs/r/ssm_activation.html.markdown | 14 +- website/docs/r/ssm_document.html.markdown | 3 +- .../r/ssm_maintenance_window.html.markdown | 2 +- ...sm_maintenance_window_target.html.markdown | 38 +- .../ssm_maintenance_window_task.html.markdown | 2 +- website/docs/r/ssm_parameter.html.markdown | 2 +- .../docs/r/ssm_patch_baseline.html.markdown | 2 +- ...egateway_cached_iscsi_volume.html.markdown | 2 +- .../r/storagegateway_gateway.html.markdown | 3 +- ...toragegateway_nfs_file_share.html.markdown | 2 +- ...toragegateway_smb_file_share.html.markdown | 2 +- website/docs/r/subnet.html.markdown | 3 +- website/docs/r/swf_domain.html.markdown | 2 +- website/docs/r/transfer_server.html.markdown | 2 +- website/docs/r/transfer_user.html.markdown | 2 +- .../docs/r/volume_attachment.html.markdown | 9 + website/docs/r/vpc.html.markdown | 2 +- website/docs/r/vpc_dhcp_options.html.markdown | 2 +- ...vpc_dhcp_options_association.html.markdown | 8 + website/docs/r/vpc_endpoint.html.markdown | 6 +- .../docs/r/vpc_endpoint_service.html.markdown | 2 +- .../r/vpc_peering_connection.html.markdown | 6 +- ..._peering_connection_accepter.html.markdown | 6 +- ...c_peering_connection_options.html.markdown | 4 +- website/docs/r/vpn_gateway.html.markdown | 2 +- .../docs/r/waf_rate_based_rule.html.markdown | 2 +- website/docs/r/waf_rule.html.markdown | 4 +- website/docs/r/waf_rule_group.html.markdown | 2 +- .../r/waf_size_constraint_set.html.markdown | 2 +- .../waf_sql_injection_match_set.html.markdown | 8 + website/docs/r/waf_web_acl.html.markdown | 2 +- .../wafregional_rate_based_rule.html.markdown | 2 +- website/docs/r/wafregional_rule.html.markdown | 2 +- .../r/wafregional_rule_group.html.markdown | 2 +- ...regional_size_constraint_set.html.markdown | 2 +- .../docs/r/wafregional_web_acl.html.markdown | 2 +- website/docs/r/wafv2_ip_set.html.markdown | 54 + .../r/wafv2_regex_pattern_set.html.markdown | 63 + website/docs/r/wafv2_rule_group.html.markdown | 466 + .../docs/r/workspaces_directory.html.markdown | 13 +- .../docs/r/workspaces_workspace.html.markdown | 87 + 2022 files changed, 188664 insertions(+), 139725 deletions(-) delete mode 100644 .github/CONTRIBUTING.md delete mode 100644 .github/MAINTAINING.md rename .github/workflows/{changelog_checks.yml => changelog.yml} (56%) create mode 100644 .github/workflows/examples.yml create mode 100644 .github/workflows/stale.yml create mode 100644 .github/workflows/terraform_provider.yml create mode 100644 .github/workflows/website.yml create mode 100644 .markdownlinkcheck.json create mode 100644 ROADMAP.md create mode 100644 aws/data_source_aws_backup_plan.go create mode 100644 aws/data_source_aws_backup_plan_test.go create mode 100644 aws/data_source_aws_backup_selection.go create mode 100644 aws/data_source_aws_backup_selection_test.go create mode 100644 aws/data_source_aws_backup_vault.go create mode 100644 aws/data_source_aws_backup_vault_test.go create mode 100644 aws/data_source_aws_cloudfront_distribution.go create mode 100644 aws/data_source_aws_cloudfront_distribution_test.go create mode 100644 aws/data_source_aws_ec2_coip_pool.go create mode 100644 aws/data_source_aws_ec2_coip_pool_test.go create mode 100644 aws/data_source_aws_ec2_coip_pools.go create mode 100644 aws/data_source_aws_ec2_coip_pools_test.go create mode 100644 aws/data_source_aws_ec2_local_gateway.go create mode 100644 aws/data_source_aws_ec2_local_gateway_route_table.go create mode 100644 aws/data_source_aws_ec2_local_gateway_route_table_test.go create mode 100644 aws/data_source_aws_ec2_local_gateway_route_tables.go create mode 100644 aws/data_source_aws_ec2_local_gateway_route_tables_test.go create mode 100644 aws/data_source_aws_ec2_local_gateway_test.go create mode 100644 aws/data_source_aws_ec2_local_gateways.go create mode 100644 aws/data_source_aws_ec2_local_gateways_test.go create mode 100644 aws/data_source_aws_ec2_transit_gateway_peering_attachment.go create mode 100644 aws/data_source_aws_ec2_transit_gateway_peering_attachment_test.go create mode 100644 aws/data_source_aws_efs_access_point.go create mode 100644 aws/data_source_aws_efs_access_point_test.go create mode 100644 aws/data_source_aws_regions.go create mode 100644 aws/data_source_aws_regions_test.go create mode 100644 aws/data_source_aws_wafv2_ip_set.go create mode 100644 aws/data_source_aws_wafv2_ip_set_test.go create mode 100644 aws/data_source_aws_wafv2_regex_pattern_set.go create mode 100644 aws/data_source_aws_wafv2_regex_pattern_set_test.go create mode 100644 aws/data_source_aws_wafv2_rule_group.go create mode 100644 aws/data_source_aws_wafv2_rule_group_test.go delete mode 100644 aws/import_aws_network_acl.go create mode 100644 aws/internal/keyvaluetags/create_tags_gen.go create mode 100644 aws/internal/keyvaluetags/generators/createtags/main.go create mode 100644 aws/internal/keyvaluetags/inspector_tags.go delete mode 100644 aws/internal/keyvaluetags/workspaces_tags.go create mode 100644 aws/internal/service/apigatewayv2/waiter/status.go create mode 100644 aws/internal/service/apigatewayv2/waiter/waiter.go create mode 100644 aws/internal/service/guardduty/waiter/status.go create mode 100644 aws/internal/service/guardduty/waiter/waiter.go create mode 100644 aws/internal/service/iam/waiter/waiter.go create mode 100644 aws/internal/service/kinesisanalytics/waiter/status.go create mode 100644 aws/internal/service/kinesisanalytics/waiter/waiter.go create mode 100644 aws/internal/service/kms/waiter/status.go create mode 100644 aws/internal/service/kms/waiter/waiter.go create mode 100644 aws/internal/service/neptune/waiter/status.go create mode 100644 aws/internal/service/neptune/waiter/waiter.go create mode 100644 aws/internal/service/rds/waiter/status.go create mode 100644 aws/internal/service/rds/waiter/waiter.go create mode 100644 aws/internal/service/secretsmanager/waiter/waiter.go create mode 100644 aws/internal/service/servicediscovery/waiter/status.go create mode 100644 aws/internal/service/servicediscovery/waiter/waiter.go create mode 100644 aws/internal/service/workspaces/waiter/status.go create mode 100644 aws/internal/service/workspaces/waiter/waiter.go create mode 100644 aws/resource_aws_apigatewayv2_api_mapping.go create mode 100644 aws/resource_aws_apigatewayv2_api_mapping_test.go create mode 100644 aws/resource_aws_apigatewayv2_authorizer.go create mode 100644 aws/resource_aws_apigatewayv2_authorizer_test.go create mode 100644 aws/resource_aws_apigatewayv2_deployment.go create mode 100644 aws/resource_aws_apigatewayv2_deployment_test.go create mode 100644 aws/resource_aws_apigatewayv2_domain_name.go create mode 100644 aws/resource_aws_apigatewayv2_domain_name_test.go create mode 100644 aws/resource_aws_apigatewayv2_integration.go create mode 100644 aws/resource_aws_apigatewayv2_integration_response.go create mode 100644 aws/resource_aws_apigatewayv2_integration_response_test.go create mode 100644 aws/resource_aws_apigatewayv2_integration_test.go create mode 100644 aws/resource_aws_apigatewayv2_model.go create mode 100644 aws/resource_aws_apigatewayv2_model_test.go create mode 100644 aws/resource_aws_apigatewayv2_route.go create mode 100644 aws/resource_aws_apigatewayv2_route_response.go create mode 100644 aws/resource_aws_apigatewayv2_route_response_test.go create mode 100644 aws/resource_aws_apigatewayv2_route_test.go create mode 100644 aws/resource_aws_apigatewayv2_stage.go create mode 100644 aws/resource_aws_apigatewayv2_stage_test.go create mode 100644 aws/resource_aws_apigatewayv2_vpc_link.go create mode 100644 aws/resource_aws_apigatewayv2_vpc_link_test.go create mode 100644 aws/resource_aws_dms_event_subscription.go create mode 100644 aws/resource_aws_dms_event_subscription_test.go create mode 100644 aws/resource_aws_ec2_availability_zone_group.go create mode 100644 aws/resource_aws_ec2_availability_zone_group_test.go create mode 100644 aws/resource_aws_ec2_transit_gateway_peering_attachment.go create mode 100644 aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter.go create mode 100644 aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter_test.go create mode 100644 aws/resource_aws_ec2_transit_gateway_peering_attachment_test.go create mode 100644 aws/resource_aws_efs_access_point.go create mode 100644 aws/resource_aws_efs_access_point_test.go create mode 100644 aws/resource_aws_efs_file_system_policy.go create mode 100644 aws/resource_aws_efs_file_system_policy_test.go create mode 100644 aws/resource_aws_guardduty_organization_admin_account.go create mode 100644 aws/resource_aws_guardduty_organization_admin_account_test.go create mode 100644 aws/resource_aws_guardduty_organization_configuration.go create mode 100644 aws/resource_aws_guardduty_organization_configuration_test.go create mode 100644 aws/resource_aws_opsworks_ganglia_layer_test.go create mode 100644 aws/resource_aws_opsworks_haproxy_layer_test.go create mode 100644 aws/resource_aws_opsworks_java_app_layer_test.go create mode 100644 aws/resource_aws_opsworks_memcached_layer_test.go create mode 100644 aws/resource_aws_opsworks_mysql_layer_test.go create mode 100644 aws/resource_aws_opsworks_nodejs_app_layer_test.go create mode 100644 aws/resource_aws_opsworks_php_app_layer_test.go create mode 100644 aws/resource_aws_opsworks_static_web_layer_test.go create mode 100644 aws/resource_aws_securityhub_member.go create mode 100644 aws/resource_aws_securityhub_member_test.go create mode 100644 aws/resource_aws_wafv2_ip_set.go create mode 100644 aws/resource_aws_wafv2_ip_set_test.go create mode 100644 aws/resource_aws_wafv2_regex_pattern_set.go create mode 100644 aws/resource_aws_wafv2_regex_pattern_set_test.go create mode 100644 aws/resource_aws_wafv2_rule_group.go create mode 100644 aws/resource_aws_wafv2_rule_group_test.go create mode 100644 aws/resource_aws_workspaces_workspace.go create mode 100644 aws/resource_aws_workspaces_workspace_test.go rename {files => aws/testdata}/mysql-5-6-xtrabackup.tar.gz (100%) create mode 100644 awsproviderlint/helper/awsprovidertype/keyvaluetags/funcs.go create mode 100644 awsproviderlint/helper/awsprovidertype/keyvaluetags/package.go create mode 100644 awsproviderlint/helper/awsprovidertype/keyvaluetags/type_ignoreconfig.go create mode 100644 awsproviderlint/helper/awsprovidertype/keyvaluetags/type_keyvaluetags.go create mode 100644 awsproviderlint/passes/AWSR002/AWSR002.go create mode 100644 awsproviderlint/passes/AWSR002/AWSR002_test.go create mode 100644 awsproviderlint/passes/AWSR002/README.md create mode 100644 docs/CONTRIBUTING.md create mode 100644 docs/CORE_SERVICES.md create mode 100644 docs/DEVELOPMENT.md create mode 100644 docs/FAQ.md create mode 100644 docs/MAINTAINING.md create mode 100644 docs/contributing/contribution-checklists.md create mode 100644 docs/contributing/issue-reporting-and-lifecycle.md create mode 100644 docs/contributing/pullrequest-submission-and-lifecycle.md create mode 100644 docs/contributing/running-and-writing-acceptance-tests.md create mode 100644 examples/api-gateway-websocket-chat-app/.gitignore create mode 100644 examples/api-gateway-websocket-chat-app/README.md create mode 100644 examples/api-gateway-websocket-chat-app/main.tf create mode 100644 examples/api-gateway-websocket-chat-app/onconnect/app.js create mode 100644 examples/api-gateway-websocket-chat-app/onconnect/package.json create mode 100644 examples/api-gateway-websocket-chat-app/ondisconnect/app.js create mode 100644 examples/api-gateway-websocket-chat-app/ondisconnect/package.json create mode 100644 examples/api-gateway-websocket-chat-app/sendmessage/app.js create mode 100644 examples/api-gateway-websocket-chat-app/sendmessage/package.json create mode 100644 examples/api-gateway-websocket-chat-app/terraform.template.tfvars create mode 100644 examples/api-gateway-websocket-chat-app/variables.tf create mode 100644 examples/asg/terraform.template.tfvars create mode 100644 examples/ecs-alb/terraform.template.tfvars create mode 100644 examples/eip/terraform.template.tfvars create mode 100644 examples/elb/terraform.template.tfvars delete mode 100644 examples/networking/numbering/variables.tf create mode 100644 examples/networking/region/terraform.template.tfvars create mode 100644 examples/networking/subnet/terraform.template.tfvars create mode 100644 examples/rds/terraform.template.tfvars create mode 100644 examples/transit-gateway-cross-account-peering-attachment/README.md create mode 100644 examples/transit-gateway-cross-account-peering-attachment/main.tf create mode 100644 examples/transit-gateway-cross-account-peering-attachment/terraform.template.tfvars create mode 100644 examples/transit-gateway-cross-account-peering-attachment/variables.tf create mode 100644 examples/two-tier/terraform.template.tfvars create mode 100644 examples/workspaces/README.md create mode 100644 examples/workspaces/iam.tf create mode 100644 examples/workspaces/variables.tf create mode 100644 infrastructure/README.md create mode 100644 infrastructure/repository/README.md create mode 100644 infrastructure/repository/labels-partition.tf create mode 100644 infrastructure/repository/labels-service.tf create mode 100644 infrastructure/repository/labels-workflow.tf create mode 100644 infrastructure/repository/main.tf create mode 100755 scripts/markdown-link-check.sh create mode 100644 vendor/github.com/Djarvur/go-err113/.gitignore create mode 100644 vendor/github.com/Djarvur/go-err113/.golangci.yml create mode 100644 vendor/github.com/Djarvur/go-err113/.travis.yml create mode 100644 vendor/github.com/Djarvur/go-err113/LICENSE create mode 100644 vendor/github.com/Djarvur/go-err113/README.adoc create mode 100644 vendor/github.com/Djarvur/go-err113/comparison.go create mode 100644 vendor/github.com/Djarvur/go-err113/definition.go create mode 100644 vendor/github.com/Djarvur/go-err113/err113.go create mode 100644 vendor/github.com/Djarvur/go-err113/go.mod create mode 100644 vendor/github.com/Djarvur/go-err113/go.sum create mode 100644 vendor/github.com/aws/aws-sdk-go/service/networkmanager/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/networkmanager/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/networkmanager/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/networkmanager/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53domains/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53domains/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53domains/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53domains/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/synthetics/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/synthetics/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/synthetics/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/synthetics/service.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_analyzers.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_runners.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/astutils/expr.go delete mode 100644 vendor/github.com/bflad/tfproviderlint/helper/astutils/function_parameters.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/attributes.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_customizedifffunc.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_provider.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_resourcediff.go create mode 100644 vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_stateupgradefunc.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/S035/README.md create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/S035/S035.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/S036/README.md create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/S036/S036.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/S037/README.md create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/S037/S037.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialcallexpr/resourcedatapartialcallexpr.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialcallexpr/resourcedatasetpartialcallexpr.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/helper/validation/iprangecallexpr/iprangecallexpr.go create mode 100644 vendor/github.com/bflad/tfproviderlint/passes/helper/validation/singleipcallexpr/singleipcallexpr.go delete mode 100644 vendor/github.com/bombsimon/wsl/v2/go.mod delete mode 100644 vendor/github.com/bombsimon/wsl/v2/go.sum rename vendor/github.com/bombsimon/wsl/{v2 => v3}/.gitignore (100%) rename vendor/github.com/bombsimon/wsl/{v2 => v3}/.travis.yml (100%) rename vendor/github.com/bombsimon/wsl/{v2 => v3}/LICENSE (100%) rename vendor/github.com/bombsimon/wsl/{v2 => v3}/README.md (96%) create mode 100644 vendor/github.com/bombsimon/wsl/v3/go.mod create mode 100644 vendor/github.com/bombsimon/wsl/v3/go.sum rename vendor/github.com/bombsimon/wsl/{v2 => v3}/wsl.go (76%) create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/asciicheck.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/godot.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/goerr113.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/gomodguard.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/nestif.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/README.md create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/nolintlint.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/golinters/testpackage.go create mode 100644 vendor/github.com/golangci/golangci-lint/pkg/printers/github.go create mode 100644 vendor/github.com/hashicorp/terraform-plugin-sdk/acctest/doc.go create mode 100644 vendor/github.com/jmespath/go-jmespath/go.mod create mode 100644 vendor/github.com/jmespath/go-jmespath/go.sum create mode 100644 vendor/github.com/maratori/testpackage/LICENSE create mode 100644 vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go create mode 100644 vendor/github.com/nakabonne/nestif/.gitignore create mode 100644 vendor/github.com/nakabonne/nestif/LICENSE create mode 100644 vendor/github.com/nakabonne/nestif/README.md create mode 100644 vendor/github.com/nakabonne/nestif/go.mod create mode 100644 vendor/github.com/nakabonne/nestif/go.sum create mode 100644 vendor/github.com/nakabonne/nestif/nestif.go create mode 100644 vendor/github.com/ryancurrah/gomodguard/.dockerignore create mode 100644 vendor/github.com/ryancurrah/gomodguard/.gitignore create mode 100644 vendor/github.com/ryancurrah/gomodguard/.gomodguard.yaml create mode 100644 vendor/github.com/ryancurrah/gomodguard/.goreleaser.yml create mode 100644 vendor/github.com/ryancurrah/gomodguard/Dockerfile create mode 100644 vendor/github.com/ryancurrah/gomodguard/Dockerfile.goreleaser create mode 100644 vendor/github.com/ryancurrah/gomodguard/LICENSE create mode 100644 vendor/github.com/ryancurrah/gomodguard/Makefile create mode 100644 vendor/github.com/ryancurrah/gomodguard/README.md create mode 100644 vendor/github.com/ryancurrah/gomodguard/VERSION create mode 100644 vendor/github.com/ryancurrah/gomodguard/go.mod create mode 100644 vendor/github.com/ryancurrah/gomodguard/go.sum create mode 100644 vendor/github.com/ryancurrah/gomodguard/gomodguard.go create mode 100644 vendor/github.com/securego/gosec/rules/bad_defer.go create mode 100644 vendor/github.com/securego/gosec/rules/decompression-bomb.go create mode 100644 vendor/github.com/securego/gosec/rules/integer_overflow.go create mode 100644 vendor/github.com/tdakkota/asciicheck/.gitignore create mode 100644 vendor/github.com/tdakkota/asciicheck/LICENSE create mode 100644 vendor/github.com/tdakkota/asciicheck/README.md create mode 100644 vendor/github.com/tdakkota/asciicheck/ascii.go create mode 100644 vendor/github.com/tdakkota/asciicheck/asciicheck.go create mode 100644 vendor/github.com/tdakkota/asciicheck/go.mod create mode 100644 vendor/github.com/tetafro/godot/.gitignore create mode 100644 vendor/github.com/tetafro/godot/LICENSE create mode 100644 vendor/github.com/tetafro/godot/README.md create mode 100644 vendor/github.com/tetafro/godot/go.mod create mode 100644 vendor/github.com/tetafro/godot/godot.go delete mode 100644 vendor/github.com/tommy-muehle/go-mnd/config.go create mode 100644 vendor/github.com/tommy-muehle/go-mnd/config/config.go create mode 100644 vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go create mode 100644 vendor/golang.org/x/mod/modfile/print.go create mode 100644 vendor/golang.org/x/mod/modfile/read.go create mode 100644 vendor/golang.org/x/mod/modfile/rule.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.s create mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go rename vendor/golang.org/x/sys/cpu/{cpu_gccgo.c => cpu_gccgo_x86.c} (100%) rename vendor/golang.org/x/sys/cpu/{cpu_gccgo.go => cpu_gccgo_x86.go} (100%) create mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_riscv64.go create mode 100644 vendor/golang.org/x/sys/cpu/hwcap_linux.go create mode 100644 vendor/golang.org/x/sys/unix/fdset.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux.go rename vendor/golang.org/x/sys/unix/{zptracearm_linux.go => zptrace_armnn_linux.go} (93%) create mode 100644 vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go rename vendor/golang.org/x/sys/unix/{zptracemips_linux.go => zptrace_mipsnn_linux.go} (93%) rename vendor/golang.org/x/sys/unix/{zptracemipsle_linux.go => zptrace_mipsnnle_linux.go} (93%) rename vendor/golang.org/x/sys/unix/{zptrace386_linux.go => zptrace_x86_linux.go} (95%) create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux.go create mode 100644 vendor/golang.org/x/tools/internal/analysisinternal/analysis.go create mode 100644 vendor/golang.org/x/tools/internal/gocommand/invoke.go create mode 100644 vendor/golang.org/x/tools/internal/lsp/diff/diff.go create mode 100644 vendor/golang.org/x/tools/internal/lsp/diff/myers/diff.go create mode 100644 vendor/golang.org/x/tools/internal/lsp/diff/unified.go create mode 100644 vendor/golang.org/x/tools/internal/span/parse.go create mode 100644 vendor/golang.org/x/tools/internal/span/span.go create mode 100644 vendor/golang.org/x/tools/internal/span/token.go create mode 100644 vendor/golang.org/x/tools/internal/span/token111.go create mode 100644 vendor/golang.org/x/tools/internal/span/token112.go create mode 100644 vendor/golang.org/x/tools/internal/span/uri.go create mode 100644 vendor/golang.org/x/tools/internal/span/utf16.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/event.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/export.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/key.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/label.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/log.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/metric.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/tag.go create mode 100644 vendor/golang.org/x/tools/internal/telemetry/event/trace.go create mode 100644 vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md create mode 100644 vendor/google.golang.org/grpc/GOVERNANCE.md create mode 100644 vendor/google.golang.org/grpc/MAINTAINERS.md create mode 100644 vendor/google.golang.org/grpc/attributes/attributes.go create mode 100644 vendor/google.golang.org/grpc/backoff/backoff.go rename vendor/google.golang.org/grpc/credentials/{tls13.go => go12.go} (100%) create mode 100644 vendor/google.golang.org/grpc/credentials/tls.go create mode 100644 vendor/google.golang.org/grpc/internal/buffer/unbounded.go rename vendor/google.golang.org/grpc/{ => internal}/resolver/dns/dns_resolver.go (72%) create mode 100644 vendor/google.golang.org/grpc/internal/resolver/dns/go113.go rename vendor/google.golang.org/grpc/{ => internal}/resolver/passthrough/passthrough.go (94%) create mode 100644 website/docs/d/backup_plan.html.markdown create mode 100644 website/docs/d/backup_selection.html.markdown create mode 100644 website/docs/d/backup_vault.html.markdown create mode 100644 website/docs/d/cloudfront_distribution.html.markdown create mode 100644 website/docs/d/ec2_coip_pool.html.markdown create mode 100644 website/docs/d/ec2_coip_pools.html.markdown create mode 100644 website/docs/d/ec2_local_gateway.html.markdown create mode 100644 website/docs/d/ec2_local_gateway_route_table.html.markdown create mode 100644 website/docs/d/ec2_local_gateway_route_tables.html.markdown create mode 100644 website/docs/d/ec2_local_gateways.html.markdown create mode 100644 website/docs/d/ec2_transit_gateway_peering_attachment.html.markdown create mode 100644 website/docs/d/efs_access_point.html.markdown create mode 100644 website/docs/d/regions.html.markdown create mode 100644 website/docs/d/wafv2_ip_set.html.markdown create mode 100644 website/docs/d/wafv2_regex_pattern_set.html.markdown create mode 100644 website/docs/d/wafv2_rule_group.html.markdown create mode 100644 website/docs/r/apigatewayv2_api_mapping.html.markdown create mode 100644 website/docs/r/apigatewayv2_authorizer.html.markdown create mode 100644 website/docs/r/apigatewayv2_deployment.html.markdown create mode 100644 website/docs/r/apigatewayv2_domain_name.html.markdown create mode 100644 website/docs/r/apigatewayv2_integration.html.markdown create mode 100644 website/docs/r/apigatewayv2_integration_response.html.markdown create mode 100644 website/docs/r/apigatewayv2_model.html.markdown create mode 100644 website/docs/r/apigatewayv2_route.html.markdown create mode 100644 website/docs/r/apigatewayv2_route_response.html.markdown create mode 100644 website/docs/r/apigatewayv2_stage.html.markdown create mode 100644 website/docs/r/apigatewayv2_vpc_link.html.markdown create mode 100644 website/docs/r/dms_event_subscription.html.markdown create mode 100644 website/docs/r/ec2_availability_zone_group.html.markdown create mode 100644 website/docs/r/ec2_transit_gateway_peering_attachment.html.markdown create mode 100644 website/docs/r/ec2_transit_gateway_peering_attachment_accepter.markdown create mode 100644 website/docs/r/efs_access_point.html.markdown create mode 100644 website/docs/r/efs_file_system_policy.html.markdown create mode 100644 website/docs/r/guardduty_organization_admin_account.html.markdown create mode 100644 website/docs/r/guardduty_organization_configuration.html.markdown rename website/docs/r/{s3_bucket_analysis_configuration.html.markdown => s3_bucket_analytics_configuration.html.markdown} (100%) create mode 100644 website/docs/r/securityhub_member.markdown create mode 100644 website/docs/r/wafv2_ip_set.html.markdown create mode 100644 website/docs/r/wafv2_regex_pattern_set.html.markdown create mode 100644 website/docs/r/wafv2_rule_group.html.markdown create mode 100644 website/docs/r/workspaces_workspace.html.markdown diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index b618ba29a75..00000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,1201 +0,0 @@ -# Contributing to Terraform - AWS Provider - -**First:** if you're unsure or afraid of _anything_, ask for help! You can -submit a work in progress (WIP) pull request, or file an issue with the parts -you know. We'll do our best to guide you in the right direction, and let you -know if there are guidelines we will need to follow. We want people to be able -to participate without fear of doing the wrong thing. - -Below are our expectations for contributors. Following these guidelines gives us -the best opportunity to work with you, by making sure we have the things we need -in order to make it happen. Doing your best to follow it will speed up our -ability to merge PRs and respond to issues. - - - -- [Issues](#issues) - - [Issue Reporting Checklists](#issue-reporting-checklists) - - [Bug Reports](#bug-reports) - - [Feature Requests](#feature-requests) - - [Questions](#questions) - - [Issue Lifecycle](#issue-lifecycle) -- [Pull Requests](#pull-requests) - - [Pull Request Lifecycle](#pull-request-lifecycle) - - [Checklists for Contribution](#checklists-for-contribution) - - [Documentation Update](#documentation-update) - - [Enhancement/Bugfix to a Resource](#enhancementbugfix-to-a-resource) - - [Adding Resource Import Support](#adding-resource-import-support) - - [Adding Resource Name Generation Support](#adding-resource-name-generation-support) - - [Adding Resource Tagging Support](#adding-resource-tagging-support) - - [New Resource](#new-resource) - - [New Service](#new-service) - - [New Region](#new-region) - - [Common Review Items](#common-review-items) - - [Go Coding Style](#go-coding-style) - - [Resource Contribution Guidelines](#resource-contribution-guidelines) - - [Acceptance Testing Guidelines](#acceptance-testing-guidelines) - - [Writing Acceptance Tests](#writing-acceptance-tests) - - [Acceptance Tests Often Cost Money to Run](#acceptance-tests-often-cost-money-to-run) - - [Running an Acceptance Test](#running-an-acceptance-test) - - [Writing an Acceptance Test](#writing-an-acceptance-test) - - [Writing and running Cross-Account Acceptance Tests](#writing-and-running-cross-account-acceptance-tests) - - [Writing and running Cross-Region Acceptance Tests](#writing-and-running-cross-region-acceptance-tests) - - - -## Issues - -### Issue Reporting Checklists - -We welcome issues of all kinds including feature requests, bug reports, and -general questions. Below you'll find checklists with guidelines for well-formed -issues of each type. - -#### [Bug Reports](https://github.com/terraform-providers/terraform-provider-aws/issues/new?template=Bug_Report.md) - - - [ ] __Test against latest release__: Make sure you test against the latest - released version. It is possible we already fixed the bug you're experiencing. - - - [ ] __Search for possible duplicate reports__: It's helpful to keep bug - reports consolidated to one thread, so do a quick search on existing bug - reports to check if anybody else has reported the same thing. You can [scope - searches by the label "bug"](https://github.com/terraform-providers/terraform-provider-aws/issues?q=is%3Aopen+is%3Aissue+label%3Abug) to help narrow things down. - - - [ ] __Include steps to reproduce__: Provide steps to reproduce the issue, - along with your `.tf` files, with secrets removed, so we can try to - reproduce it. Without this, it makes it much harder to fix the issue. - - - [ ] __For panics, include `crash.log`__: If you experienced a panic, please - create a [gist](https://gist.github.com) of the *entire* generated crash log - for us to look at. Double check no sensitive items were in the log. - -#### [Feature Requests](https://github.com/terraform-providers/terraform-provider-aws/issues/new?labels=enhancement&template=Feature_Request.md) - - - [ ] __Search for possible duplicate requests__: It's helpful to keep requests - consolidated to one thread, so do a quick search on existing requests to - check if anybody else has reported the same thing. You can [scope searches by - the label "enhancement"](https://github.com/terraform-providers/terraform-provider-aws/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) to help narrow things down. - - - [ ] __Include a use case description__: In addition to describing the - behavior of the feature you'd like to see added, it's helpful to also lay - out the reason why the feature would be important and how it would benefit - Terraform users. - -#### [Questions](https://github.com/terraform-providers/terraform-provider-aws/issues/new?labels=question&template=Question.md) - - - [ ] __Search for answers in Terraform documentation__: We're happy to answer - questions in GitHub Issues, but it helps reduce issue churn and maintainer - workload if you work to [find answers to common questions in the - documentation](https://www.terraform.io/docs/providers/aws/index.html). Oftentimes Question issues result in documentation updates - to help future users, so if you don't find an answer, you can give us - pointers for where you'd expect to see it in the docs. - -### Issue Lifecycle - -1. The issue is reported. - -2. The issue is verified and categorized by a Terraform collaborator. - Categorization is done via GitHub labels. We generally use a two-label - system of (1) issue/PR type, and (2) section of the codebase. Type is - one of "bug", "enhancement", "documentation", or "question", and section - is usually the AWS service name. - -3. An initial triage process determines whether the issue is critical and must - be addressed immediately, or can be left open for community discussion. - -4. The issue is addressed in a pull request or commit. The issue number will be - referenced in the commit message so that the code that fixes it is clearly - linked. - -5. The issue is closed. Sometimes, valid issues will be closed because they are - tracked elsewhere or non-actionable. The issue is still indexed and - available for future viewers, or can be re-opened if necessary. - -## Pull Requests - -We appreciate direct contributions to the provider codebase. Here's what to -expect: - - * For pull requests that follow the guidelines, we will proceed to reviewing - and merging, following the provider team's review schedule. There may be some - internal or community discussion needed before we can complete this. - * Pull requests that don't follow the guidelines will be commented with what - they're missing. The person who submits the pull request or another community - member will need to address those requests before they move forward. - -### Pull Request Lifecycle - -1. [Fork the GitHub repository](https://help.github.com/en/articles/fork-a-repo), - modify the code, and [create a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). - You are welcome to submit your pull request for commentary or review before - it is fully completed by creating a [draft pull request](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests) - or adding `[WIP]` to the beginning of the pull request title. - Please include specific questions or items you'd like feedback on. - -1. Once you believe your pull request is ready to be reviewed, ensure the - pull request is not a draft pull request by [marking it ready for review](https://help.github.com/en/articles/changing-the-stage-of-a-pull-request) - or removing `[WIP]` from the pull request title if necessary, and a - maintainer will review it. Follow [the checklists below](#checklists-for-contribution) - to help ensure that your contribution can be easily reviewed and potentially - merged. - -1. One of Terraform's provider team members will look over your contribution and - either approve it or provide comments letting you know if there is anything - left to do. We do our best to keep up with the volume of PRs waiting for - review, but it may take some time depending on the complexity of the work. - -1. Once all outstanding comments and checklist items have been addressed, your - contribution will be merged! Merged PRs will be included in the next - Terraform release. The provider team takes care of updating the CHANGELOG as - they merge. - -1. In some cases, we might decide that a PR should be closed without merging. - We'll make sure to provide clear reasoning when this happens. - -### Checklists for Contribution - -There are several different kinds of contribution, each of which has its own -standards for a speedy review. The following sections describe guidelines for -each type of contribution. - -#### Documentation Update - -The [Terraform AWS Provider's website source][website] is in this repository -along with the code and tests. Below are some common items that will get -flagged during documentation reviews: - -- [ ] __Reasoning for Change__: Documentation updates should include an explanation for why the update is needed. -- [ ] __Prefer AWS Documentation__: Documentation about AWS service features and valid argument values that are likely to update over time should link to AWS service user guides and API references where possible. -- [ ] __Large Example Configurations__: Example Terraform configuration that includes multiple resource definitions should be added to the repository `examples` directory instead of an individual resource documentation page. Each directory under `examples` should be self-contained to call `terraform apply` without special configuration. -- [ ] __Terraform Configuration Language Features__: Individual resource documentation pages and examples should refrain from highlighting particular Terraform configuration language syntax workarounds or features such as `variable`, `local`, `count`, and built-in functions. - -#### Enhancement/Bugfix to a Resource - -Working on existing resources is a great way to get started as a Terraform -contributor because you can work within existing code and tests to get a feel -for what to do. - -In addition to the below checklist, please see the [Common Review -Items](#common-review-items) sections for more specific coding and testing -guidelines. - - - [ ] __Acceptance test coverage of new behavior__: Existing resources each - have a set of [acceptance tests][acctests] covering their functionality. - These tests should exercise all the behavior of the resource. Whether you are - adding something or fixing a bug, the idea is to have an acceptance test that - fails if your code were to be removed. Sometimes it is sufficient to - "enhance" an existing test by adding an assertion or tweaking the config - that is used, but it's often better to add a new test. You can copy/paste an - existing test and follow the conventions you see there, modifying the test - to exercise the behavior of your code. - - [ ] __Documentation updates__: If your code makes any changes that need to - be documented, you should include those doc updates in the same PR. This - includes things like new resource attributes or changes in default values. - The [Terraform website][website] source is in this repo and includes - instructions for getting a local copy of the site up and running if you'd - like to preview your changes. - - [ ] __Well-formed Code__: Do your best to follow existing conventions you - see in the codebase, and ensure your code is formatted with `go fmt`. (The - Travis CI build will fail if `go fmt` has not been run on incoming code.) - The PR reviewers can help out on this front, and may provide comments with - suggestions on how to improve the code. - - [ ] __Vendor additions__: Create a separate PR if you are updating the vendor - folder. This is to avoid conflicts as the vendor versions tend to be fast- - moving targets. We will plan to merge the PR with this change first. - -#### Adding Resource Import Support - -Adding import support for Terraform resources will allow existing infrastructure to be managed within Terraform. This type of enhancement generally requires a small to moderate amount of code changes. - -Comprehensive code examples and information about resource import support can be found in the [Extending Terraform documentation](https://www.terraform.io/docs/extend/resources/import.html). - -In addition to the below checklist and the items noted in the Extending Terraform documentation, please see the [Common Review Items](#common-review-items) sections for more specific coding and testing guidelines. - -- [ ] _Resource Code Implementation_: In the resource code (e.g. `aws/resource_aws_service_thing.go`), implementation of `Importer` `State` function -- [ ] _Resource Acceptance Testing Implementation_: In the resource acceptance testing (e.g. `aws/resource_aws_service_thing_test.go`), implementation of `TestStep`s with `ImportState: true` -- [ ] _Resource Documentation Implementation_: In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), addition of `Import` documentation section at the bottom of the page - -#### Adding Resource Name Generation Support - -Terraform AWS Provider resources can use shared logic to support and test name generation, where the operator can choose between an expected naming value, a generated naming value with a prefix, or a fully generated name. - -Implementing name generation support for Terraform AWS Provider resources requires the following, each with its own section below: - -- [ ] _Resource Name Generation Code Implementation_: In the resource code (e.g. `aws/resource_aws_service_thing.go`), implementation of `name_prefix` attribute, along with handling in `Create` function. -- [ ] _Resource Name Generation Testing Implementation_: In the resource acceptance testing (e.g. `aws/resource_aws_service_thing_test.go`), implementation of new acceptance test functions and configurations to exercise new naming logic. -- [ ] _Resource Name Generation Documentation Implementation_: In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), addition of `name_prefix` argument and update of `name` argument description. - -##### Resource Name Generation Code Implementation - -- In the resource Go file (e.g. `aws/resource_aws_service_thing.go`), add the following Go import: `"github.com/terraform-providers/terraform-provider-aws/aws/internal/naming"` -- In the resource schema, add the new `name_prefix` attribute and adjust the `name` attribute to be `Optional`, `Computed`, and `ConflictsWith` the `name_prefix` attribute. Ensure to keep any existing schema fields on `name` such as `ValidateFunc`. e.g. - -```go -"name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ConflictsWith: []string{"name_prefix"}, -}, -"name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"name"}, -}, -``` - -- In the resource `Create` function, switch any calls from `d.Get("name").(string)` to instead use the `naming.Generate()` function, e.g. - -```go -name := naming.Generate(d.Get("name").(string), d.Get("name_prefix").(string)) - -// ... in AWS Go SDK Input types, etc. use aws.String(name) -``` - -##### Resource Name Generation Testing Implementation - -- In the resource testing (e.g. `aws/resource_aws_service_thing_test.go`), add the following Go import: `"github.com/terraform-providers/terraform-provider-aws/aws/internal/naming"` -- In the resource testing, implement two new tests named `_Name_Generated` and `_NamePrefix` with associated configurations, that verifies creating the resource without `name` and `name_prefix` arguments (for the former) and with only the `name_prefix` argument (for the latter). e.g. - -```go -func TestAccAWSServiceThing_Name_Generated(t *testing.T) { - var thing service.ServiceThing - resourceName := "aws_service_thing.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSServiceThingDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSServiceThingConfigNameGenerated(), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSServiceThingExists(resourceName, &thing), - naming.TestCheckResourceAttrNameGenerated(resourceName, "name"), - ), - }, - // If the resource supports import: - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccAWSServiceThing_NamePrefix(t *testing.T) { - var thing service.ServiceThing - resourceName := "aws_service_thing.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSServiceThingDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSServiceThingConfigNamePrefix("tf-acc-test-prefix-"), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSServiceThingExists(resourceName, &thing), - naming.TestCheckResourceAttrNameFromPrefix(resourceName, "name", "tf-acc-test-prefix-"), - ), - }, - // If the resource supports import: - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccAWSServiceThingConfigNameGenerated() string { - return fmt.Sprintf(` -resource "aws_service_thing" "test" { - # ... other configuration ... -} -`) -} - -func testAccAWSServiceThingConfigNamePrefix(namePrefix string) string { - return fmt.Sprintf(` -resource "aws_service_thing" "test" { - # ... other configuration ... - - name_prefix = %[1]q -} -`, namePrefix) -} -``` - -##### Resource Code Generation Documentation Implementation - -- In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), add the following to the arguments reference: - -```markdown -* `name_prefix` - (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. -``` - -- Adjust the existing `name` argument reference to ensure its denoted as `Optional`, includes a mention that it can be generated, and that it conflicts with `name_prefix`: - -```markdown -* `name` - (Optional) Name of the thing. If omitted, Terraform will assign a random, unique name. Conflicts with `name_prefix`. -``` - -#### Adding Resource Tagging Support - -AWS provides key-value metadata across many services and resources, which can be used for a variety of use cases including billing, ownership, and more. See the [AWS Tagging Strategy page](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/) for more information about tagging at a high level. - -Implementing tagging support for Terraform AWS Provider resources requires the following, each with its own section below: - -- [ ] _Generated Service Tagging Code_: In the internal code generators (e.g. `aws/internal/keyvaluetags`), implementation and customization of how a service handles tagging, which is standardized for the resources. -- [ ] _Resource Tagging Code Implementation_: In the resource code (e.g. `aws/resource_aws_service_thing.go`), implementation of `tags` schema attribute, along with handling in `Create`, `Read`, and `Update` functions. -- [ ] _Resource Tagging Acceptance Testing Implementation_: In the resource acceptance testing (e.g. `aws/resource_aws_service_thing_test.go`), implementation of new acceptance test function and configurations to exercise new tagging logic. -- [ ] _Resource Tagging Documentation Implementation_: In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), addition of `tags` argument - -See also a [full example pull request for implementing EKS tagging](https://github.com/terraform-providers/terraform-provider-aws/pull/10307). - -##### Adding Service to Tag Generating Code - -This step is only necessary for the first implementation and may have been previously completed. If so, move on to the next section. - -More details about this code generation, including fixes for potential error messages in this process, can be found in the [keyvaluetags documentation](../aws/internal/keyvaluetags/README.md). - -- Open the AWS Go SDK documentation for the service, e.g. for [`service/eks`](https://docs.aws.amazon.com/sdk-for-go/api/service/eks/). Note: there can be a delay between the AWS announcement and the updated AWS Go SDK documentation. -- Determine the "type" of tagging implementation. Some services will use a simple map style (`map[string]*string` in Go) while others will have a separate structure shape (`[]service.Tag` struct with `Key` and `Value` fields). - - - If the type is a map, add the AWS Go SDK service name (e.g. `eks`) to `mapServiceNames` in `aws/internal/keyvaluetags/generators/servicetags/main.go` - - Otherwise, if the type is a struct, add the AWS Go SDK service name (e.g. `eks`) to `sliceServiceNames` in `aws/internal/keyvaluetags/generators/servicetags/main.go`. If the struct name is not exactly `Tag`, it can be customized via the `ServiceTagType` function. If the struct key field is not exactly `Key`, it can be customized via the `ServiceTagTypeKeyField` function. If the struct value field is not exactly `Value`, it can be customized via the `ServiceTagTypeValueField` function. - -- Determine if the service API includes functionality for listing tags (usually a `ListTags` or `ListTagsForResource` API call) or updating tags (usually `TagResource` and `UntagResource` API calls). If so, add the AWS Go SDK service client information to `ServiceClientType` (along with the new required import) in `aws/internal/keyvaluetags/service_generation_customizations.go`, e.g. for EKS: - - ```go - case "eks": - funcType = reflect.TypeOf(eks.New) - ``` - - - If the service API includes functionality for listing tags, add the AWS Go SDK service name (e.g. `eks`) to `serviceNames` in `aws/internal/keyvaluetags/generators/listtags/main.go`. - - If the service API includes functionality for updating tags, add the AWS Go SDK service name (e.g. `eks`) to `serviceNames` in `aws/internal/keyvaluetags/generators/updatetags/main.go`. - -- Run `make gen` (`go generate ./...`) and ensure there are no errors via `make test` (`go test ./...`) - -##### Resource Tagging Code Implementation - -- In the resource Go file (e.g. `aws/resource_aws_eks_cluster.go`), add the following Go import: `"github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags"` -- In the resource schema, add `"tags": tagsSchema(),` -- If the API supports tagging on creation (the `Input` struct accepts a `Tags` field), in the resource `Create` function, implement the logic to convert the configuration tags into the service tags, e.g. with EKS Clusters: - - ```go - input := &eks.CreateClusterInput{ - /* ... other configuration ... */ - Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().EksTags(), - } - ``` - - If the service API does not allow passing an empty list, the logic can be adjusted similar to: - - ```go - input := &eks.CreateClusterInput{ - /* ... other configuration ... */ - } - - if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - input.Tags = keyvaluetags.New(v).IgnoreAws().EksTags() - } - ``` - -- Otherwise if the API does not support tagging on creation (the `Input` struct does not accept a `Tags` field), in the resource `Create` function, implement the logic to convert the configuration tags into the service API call to tag a resource, e.g. with CloudHSM v2 Clusters: - - ```go - if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Cloudhsmv2UpdateTags(conn, d.Id(), nil, v); err != nil { - return fmt.Errorf("error adding CloudHSM v2 Cluster (%s) tags: %s", d.Id(), err) - } - } - ``` - -- Some EC2 resources (for example [`aws_ec2_fleet`](https://www.terraform.io/docs/providers/aws/r/ec2_fleet.html)) have a `TagsSpecification` field in the `InputStruct` instead of a `Tags` field. In these cases the `ec2TagSpecificationsFromMap()` helper function should be used, e.g.: - - ```go - input := &ec2.CreateFleetInput{ - /* ... other configuration ... */ - TagSpecifications: ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypeFleet), - } - ``` - -- In the resource `Read` function, implement the logic to convert the service tags to save them into the Terraform state for drift detection, e.g. with EKS Clusters (which had the tags available in the DescribeCluster API call): - - ```go - if err := d.Set("tags", keyvaluetags.EksKeyValueTags(cluster.Tags).IgnoreAws().Map()); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - ``` - - If the service API does not return the tags directly from reading the resource and requires a separate API call, its possible to use the `keyvaluetags` functionality like the following, e.g. with Athena Workgroups: - - ```go - tags, err := keyvaluetags.AthenaListTags(conn, arn.String()) - - if err != nil { - return fmt.Errorf("error listing tags for resource (%s): %s", arn, err) - } - - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { - return fmt.Errorf("error setting tags: %s", err) - } - ``` - -- In the resource `Update` function (this may be the first functionality requiring the creation of the `Update` function), implement the logic to handle tagging updates, e.g. with EKS Clusters: - - ```go - if d.HasChange("tags") { - o, n := d.GetChange("tags") - if err := keyvaluetags.EksUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { - return fmt.Errorf("error updating tags: %s", err) - } - } - ``` - -##### Resource Tagging Acceptance Testing Implementation - -- In the resource testing (e.g. `aws/resource_aws_eks_cluster_test.go`), verify that existing resources without tagging are unaffected and do not have tags saved into their Terraform state. This should be done in the `_basic` acceptance test by adding a line similar to `resource.TestCheckResourceAttr(resourceName, "tags.%s", "0"),` -- In the resource testing, implement a new test named `_Tags` with associated configurations, that verifies creating the resource with tags and updating tags. e.g. EKS Clusters: - - ```go - func TestAccAWSEksCluster_Tags(t *testing.T) { - var cluster1, cluster2, cluster3 eks.Cluster - rName := acctest.RandomWithPrefix("tf-acc-test") - resourceName := "aws_eks_cluster.test" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEksClusterDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSEksClusterConfigTags1(rName, "key1", "value1"), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEksClusterExists(resourceName, &cluster1), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), - ), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - { - Config: testAccAWSEksClusterConfigTags2(rName, "key1", "value1updated", "key2", "value2"), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEksClusterExists(resourceName, &cluster2), - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), - ), - }, - { - Config: testAccAWSEksClusterConfigTags1(rName, "key2", "value2"), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEksClusterExists(resourceName, &cluster3), - resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), - ), - }, - }, - }) - } - - func testAccAWSEksClusterConfigTags1(rName, tagKey1, tagValue1 string) string { - return testAccAWSEksClusterConfig_Base(rName) + fmt.Sprintf(` - resource "aws_eks_cluster" "test" { - name = %[1]q - role_arn = "${aws_iam_role.test.arn}" - - tags = { - %[2]q = %[3]q - } - - vpc_config { - subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] - } - - depends_on = ["aws_iam_role_policy_attachment.test-AmazonEKSClusterPolicy", "aws_iam_role_policy_attachment.test-AmazonEKSServicePolicy"] - } - `, rName, tagKey1, tagValue1) - } - - func testAccAWSEksClusterConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return testAccAWSEksClusterConfig_Base(rName) + fmt.Sprintf(` - resource "aws_eks_cluster" "test" { - name = %[1]q - role_arn = "${aws_iam_role.test.arn}" - - tags = { - %[2]q = %[3]q - %[4]q = %[5]q - } - - vpc_config { - subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] - } - - depends_on = ["aws_iam_role_policy_attachment.test-AmazonEKSClusterPolicy", "aws_iam_role_policy_attachment.test-AmazonEKSServicePolicy"] - } - `, rName, tagKey1, tagValue1, tagKey2, tagValue2) - } - ``` - -- Verify all acceptance testing passes for the resource (e.g. `make testacc TESTARGS='-run=TestAccAWSEksCluster_'`) - -#### Resource Tagging Documentation Implementation - -- In the resource documentation (e.g. `website/docs/r/eks_cluster.html.markdown`), add the following to the arguments reference: - - ```markdown - * `tags` - (Optional) Key-value mapping of resource tags - ``` - -#### New Resource - -Implementing a new resource is a good way to learn more about how Terraform -interacts with upstream APIs. There are plenty of examples to draw from in the -existing resources, but you still get to implement something completely new. - -In addition to the below checklist, please see the [Common Review -Items](#common-review-items) sections for more specific coding and testing -guidelines. - - - [ ] __Minimal LOC__: It's difficult for both the reviewer and author to go - through long feedback cycles on a big PR with many resources. We ask you to - only submit **1 resource at a time**. - - [ ] __Acceptance tests__: New resources should include acceptance tests - covering their behavior. See [Writing Acceptance - Tests](#writing-acceptance-tests) below for a detailed guide on how to - approach these. - - [ ] __Resource Naming__: Resources should be named `aws__`, - using underscores (`_`) as the separator. Resources are namespaced with the - service name to allow easier searching of related resources, to align - the resource naming with the service for [Customizing Endpoints](https://www.terraform.io/docs/providers/aws/guides/custom-service-endpoints.html#available-endpoint-customizations), - and to prevent future conflicts with new AWS services/resources. - For reference: - - - `service` is the AWS short service name that matches the entry in - `endpointServiceNames` (created via the [New Service](#new-service) - section) - - `name` represents the conceptual infrastructure represented by the - create, read, update, and delete methods of the service API. It should - be a singular noun. For example, in an API that has methods such as - `CreateThing`, `DeleteThing`, `DescribeThing`, and `ModifyThing` the name - of the resource would end in `_thing`. - - - [ ] __Arguments_and_Attributes__: The HCL for arguments and attributes should - mimic the types and structs presented by the AWS API. API arguments should be - converted from `CamelCase` to `camel_case`. - - [ ] __Documentation__: Each resource gets a page in the Terraform - documentation. The [Terraform website][website] source is in this - repo and includes instructions for getting a local copy of the site up and - running if you'd like to preview your changes. For a resource, you'll want - to add a new file in the appropriate place and add a link to the sidebar for - that page. - - [ ] __Well-formed Code__: Do your best to follow existing conventions you - see in the codebase, and ensure your code is formatted with `go fmt`. (The - Travis CI build will fail if `go fmt` has not been run on incoming code.) - The PR reviewers can help out on this front, and may provide comments with - suggestions on how to improve the code. - - [ ] __Vendor updates__: Create a separate PR if you are adding to the vendor - folder. This is to avoid conflicts as the vendor versions tend to be fast- - moving targets. We will plan to merge the PR with this change first. - -#### New Service - -Implementing a new AWS service gives Terraform the ability to manage resources in -a whole new API. It's a larger undertaking, but brings major new functionality -into Terraform. - -- [ ] __Service Client__: Before new resources are submitted, we request - a separate pull request containing just the new AWS Go SDK service client. - Doing so will pull the AWS Go SDK service code into the project at the - current version. Since the AWS Go SDK is updated frequently, these pull - requests can easily have merge conflicts or be out of date. The maintainers - prioritize reviewing and merging these quickly to prevent those situations. - - To add the AWS Go SDK service client: - - - In `aws/provider.go` Add a new service entry to `endpointServiceNames`. - This service name should match the AWS Go SDK or AWS CLI service name. - - In `aws/config.go`: Add a new import for the AWS Go SDK code. e.g. - `github.com/aws/aws-sdk-go/service/quicksight` - - In `aws/config.go`: Add a new `{SERVICE}conn` field to the `AWSClient` - struct for the service client. The service name should match the name - in `endpointServiceNames`. e.g. `quicksightconn *quicksight.QuickSight` - - In `aws/config.go`: Create the new service client in the `{SERVICE}conn` - field in the `AWSClient` instantiation within `Client()`. e.g. - `quicksightconn: quicksight.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["quicksight"])})),` - - In `website/allowed-subcategories.txt`: Add a name acceptable for the documentation navigation. - - In `website/docs/guides/custom-service-endpoints.html.md`: Add the service - name in the list of customizable endpoints. - - In `.hashibot.hcl`: Add the new service to automated issue and pull request labeling. e.g. with the `quicksight` service - - ```hcl - behavior "regexp_issue_labeler_v2" "service_labels" { - # ... other configuration ... - - label_map = { - # ... other services ... - "service/quicksight" = [ - "aws_quicksight_", - ], - # ... other services ... - } - } - - behavior "pull_request_path_labeler" "service_labels" - # ... other configuration ... - - label_map = { - # ... other services ... - "service/quicksight" = [ - "**/*_quicksight_*", - "**/quicksight_*", - ], - # ... other services ... - } - } - ``` - - - Run the following then submit the pull request: - - ```sh - go test ./aws - go mod tidy - go mod vendor - ``` - -- [ ] __Initial Resource__: Some services can be big and it can be - difficult for both reviewer & author to go through long feedback cycles - on a big PR with many resources. Often feedback items in one resource - will also need to be applied in other resources. We prefer you to submit - the necessary minimum in a single PR, ideally **just the first resource** - of the service. - -The initial resource and changes afterwards should follow the other sections -of this guide as appropriate. - -#### New Region - -While region validation is automatically added with SDK updates, new regions -are generally limited in which services they support. Below are some -manually sourced values from documentation. - - - [ ] Check [Regions and Endpoints ELB regions](https://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) and add Route53 Hosted Zone ID if available to `aws/data_source_aws_elb_hosted_zone_id.go` - - [ ] Check [Regions and Endpoints S3 website endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_website_region_endpoints) and add Route53 Hosted Zone ID if available to `aws/hosted_zones.go` - - [ ] Check [CloudTrail Supported Regions docs](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html#cloudtrail-supported-regions) and add AWS Account ID if available to `aws/data_source_aws_cloudtrail_service_account.go` - - [ ] Check [Elastic Load Balancing Access Logs docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) and add Elastic Load Balancing Account ID if available to `aws/data_source_aws_elb_service_account.go` - - [ ] Check [Redshift Database Audit Logging docs](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions) and add AWS Account ID if available to `aws/data_source_aws_redshift_service_account.go` - - [ ] Check [Regions and Endpoints Elastic Beanstalk](https://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) and add Route53 Hosted Zone ID if available to `aws/data_source_aws_elastic_beanstalk_hosted_zone.go` - -### Common Review Items - -The Terraform AWS Provider follows common practices to ensure consistent and -reliable implementations across all resources in the project. While there may be -older resource and testing code that predates these guidelines, new submissions -are generally expected to adhere to these items to maintain Terraform Provider -quality. For any guidelines listed, contributors are encouraged to ask any -questions and community reviewers are encouraged to provide review suggestions -based on these guidelines to speed up the review and merge process. - -#### Go Coding Style - -The following Go language resources provide common coding preferences that may be referenced during review, if not automatically handled by the project's linting tools. - -- [Effective Go](https://golang.org/doc/effective_go.html) -- [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) - -#### Resource Contribution Guidelines - -The following resource checks need to be addressed before your contribution can be merged. The exclusion of any applicable check may result in a delayed time to merge. - -- [ ] __Passes Testing__: All code and documentation changes must pass unit testing, code linting, and website link testing. Resource code changes must pass all acceptance testing for the resource. -- [ ] __Avoids API Calls Across Account, Region, and Service Boundaries__: Resources should not implement cross-account, cross-region, or cross-service API calls. -- [ ] __Avoids Optional and Required for Non-Configurable Attributes__: Resource schema definitions for read-only attributes should not include `Optional: true` or `Required: true`. -- [ ] __Avoids resource.Retry() without resource.RetryableError()__: Resource logic should only implement [`resource.Retry()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#Retry) if there is a retryable condition (e.g. `return resource.RetryableError(err)`). -- [ ] __Avoids Resource Read Function in Data Source Read Function__: Data sources should fully implement their own resource `Read` functionality including duplicating `d.Set()` calls. -- [ ] __Avoids Reading Schema Structure in Resource Code__: The resource `Schema` should not be read in resource `Create`/`Read`/`Update`/`Delete` functions to perform looping or otherwise complex attribute logic. Use [`d.Get()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Get) and [`d.Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) directly with individual attributes instead. -- [ ] __Avoids ResourceData.GetOkExists()__: Resource logic should avoid using [`ResourceData.GetOkExists()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.GetOkExists) as its expected functionality is not guaranteed in all scenarios. -- [ ] __Implements Read After Create and Update__: Except where API eventual consistency prohibits immediate reading of resources or updated attributes, resource `Create` and `Update` functions should return the resource `Read` function. -- [ ] __Implements Immediate Resource ID Set During Create__: Immediately after calling the API creation function, the resource ID should be set with [`d.SetId()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.SetId) before other API operations or returning the `Read` function. -- [ ] __Implements Attribute Refreshes During Read__: All attributes available in the API should have [`d.Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) called their values in the Terraform state during the `Read` function. -- [ ] __Implements Error Checks with Non-Primative Attribute Refreshes__: When using [`d.Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) with non-primative types (`schema.TypeList`, `schema.TypeSet`, or `schema.TypeMap`), perform error checking to [prevent issues where the code is not properly able to refresh the Terraform state](https://www.terraform.io/docs/extend/best-practices/detecting-drift.html#error-checking-aggregate-types). -- [ ] __Implements Import Acceptance Testing and Documentation__: Support for resource import (`Importer` in resource schema) must include `ImportState` acceptance testing (see also the [Acceptance Testing Guidelines](#acceptance-testing-guidelines) below) and `## Import` section in resource documentation. -- [ ] __Implements Customizable Timeouts Documentation__: Support for customizable timeouts (`Timeouts` in resource schema) must include `## Timeouts` section in resource documentation. -- [ ] __Implements State Migration When Adding New Virtual Attribute__: For new "virtual" attributes (those only in Terraform and not in the API), the schema should implement [State Migration](https://www.terraform.io/docs/extend/resources.html#state-migrations) to prevent differences for existing configurations that upgrade. -- [ ] __Uses AWS Go SDK Constants__: Many AWS services provide string constants for value enumerations, error codes, and status types. See also the "Constants" sections under each of the service packages in the [AWS Go SDK documentation](https://docs.aws.amazon.com/sdk-for-go/api/). -- [ ] __Uses AWS Go SDK Pointer Conversion Functions__: Many APIs return pointer types and these functions return the zero value for the type if the pointer is `nil`. This prevents potential panics from unchecked `*` pointer dereferences and can eliminate boilerplate `nil` checking in many cases. See also the [`aws` package in the AWS Go SDK documentation](https://docs.aws.amazon.com/sdk-for-go/api/aws/). -- [ ] __Uses AWS Go SDK Types__: Use available SDK structs instead of implementing custom types with indirection. -- [ ] __Uses TypeList and MaxItems: 1__: Configuration block attributes (e.g. `Type: schema.TypeList` or `Type: schema.TypeSet` with `Elem: &schema.Resource{...}`) that can only have one block should use `Type: schema.TypeList` and `MaxItems: 1` in the schema definition. -- [ ] __Uses Existing Validation Functions__: Schema definitions including `ValidateFunc` for attribute validation should use available [Terraform `helper/validation` package](https://godoc.org/github.com/hashicorp/terraform/helper/validation) functions. `All()`/`Any()` can be used for combining multiple validation function behaviors. -- [ ] __Uses isResourceTimeoutError() with resource.Retry()__: Resource logic implementing [`resource.Retry()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#Retry) should error check with `isResourceTimeoutError(err error)` and potentially unset the error before returning the error. For example: - - ```go - var output *kms.CreateKeyOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { - var err error - - output, err = conn.CreateKey(input) - - /* ... */ - - return nil - }) - - if isResourceTimeoutError(err) { - output, err = conn.CreateKey(input) - } - - if err != nil { - return fmt.Errorf("error creating KMS External Key: %s", err) - } - ``` - -- [ ] __Uses resource.NotFoundError__: Custom errors for missing resources should use [`resource.NotFoundError`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#NotFoundError). -- [ ] __Uses resource.UniqueId()__: API fields for concurrency protection such as `CallerReference` and `IdempotencyToken` should use [`resource.UniqueId()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#UniqueId). The implementation includes a monotonic counter which is safer for concurrent operations than solutions such as `time.Now()`. -- [ ] __Skips Exists Function__: Implementing a resource `Exists` function is extraneous as it often duplicates resource `Read` functionality. Ensure `d.SetId("")` is used to appropriately trigger resource recreation in the resource `Read` function. -- [ ] __Skips id Attribute__: The `id` attribute is implicit for all Terraform resources and does not need to be defined in the schema. - -The below are style-based items that _may_ be noted during review and are recommended for simplicity, consistency, and quality assurance: - -- [ ] __Avoids CustomizeDiff__: Usage of `CustomizeDiff` is generally discouraged. -- [ ] __Implements Error Message Context__: Returning errors from resource `Create`, `Read`, `Update`, and `Delete` functions should include additional messaging about the location or cause of the error for operators and code maintainers by wrapping with [`fmt.Errorf()`](https://godoc.org/golang.org/x/exp/errors/fmt#Errorf). - - An example `Delete` API error: `return fmt.Errorf("error deleting {SERVICE} {THING} (%s): %s", d.Id(), err)` - - An example `d.Set()` error: `return fmt.Errorf("error setting {ATTRIBUTE}: %s", err)` -- [ ] __Implements arn Attribute__: APIs that return an Amazon Resource Name (ARN), should implement `arn` as an attribute. -- [ ] __Implements Warning Logging With Resource State Removal__: If a resource is removed outside of Terraform (e.g. via different tool, API, or web UI), `d.SetId("")` and `return nil` can be used in the resource `Read` function to trigger resource recreation. When this occurs, a warning log message should be printed beforehand: `log.Printf("[WARN] {SERVICE} {THING} (%s) not found, removing from state", d.Id())` -- [ ] __Uses isAWSErr() with AWS Go SDK Error Objects__: Use the available `isAWSErr(err error, code string, message string)` helper function instead of the `awserr` package to compare error code and message contents. -- [ ] __Uses %s fmt Verb with AWS Go SDK Objects__: AWS Go SDK objects implement `String()` so using the `%v`, `%#v`, or `%+v` fmt verbs with the object are extraneous or provide unhelpful detail. -- [ ] __Uses Elem with TypeMap__: While provider schema validation does not error when the `Elem` configuration is not present with `Type: schema.TypeMap` attributes, including the explicit `Elem: &schema.Schema{Type: schema.TypeString}` is recommended. -- [ ] __Uses American English for Attribute Naming__: For any ambiguity with attribute naming, prefer American English over British English. e.g. `color` instead of `colour`. -- [ ] __Skips Timestamp Attributes__: Generally, creation and modification dates from the API should be omitted from the schema. -- [ ] __Skips Error() Call with AWS Go SDK Error Objects__: Error objects do not need to have `Error()` called. - -#### Acceptance Testing Guidelines - -The below are required items that will be noted during submission review and prevent immediate merging: - -- [ ] __Implements CheckDestroy__: Resource testing should include a `CheckDestroy` function (typically named `testAccCheckAws{SERVICE}{RESOURCE}Destroy`) that calls the API to verify that the Terraform resource has been deleted or disassociated as appropriate. More information about `CheckDestroy` functions can be found in the [Extending Terraform TestCase documentation](https://www.terraform.io/docs/extend/testing/acceptance-tests/testcase.html#checkdestroy). -- [ ] __Implements Exists Check Function__: Resource testing should include a `TestCheckFunc` function (typically named `testAccCheckAws{SERVICE}{RESOURCE}Exists`) that calls the API to verify that the Terraform resource has been created or associated as appropriate. Preferably, this function will also accept a pointer to an API object representing the Terraform resource from the API response that can be set for potential usage in later `TestCheckFunc`. More information about these functions can be found in the [Extending Terraform Custom Check Functions documentation](https://www.terraform.io/docs/extend/testing/acceptance-tests/testcase.html#checkdestroy). -- [ ] __Excludes Provider Declarations__: Test configurations should not include `provider "aws" {...}` declarations. If necessary, only the provider declarations in `provider_test.go` should be used for multiple account/region or otherwise specialized testing. -- [ ] __Passes in us-west-2 Region__: Tests default to running in `us-west-2` and at a minimum should pass in that region or include necessary `PreCheck` functions to skip the test when ran outside an expected environment. -- [ ] __Uses resource.ParallelTest__: Tests should utilize [`resource.ParallelTest()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#ParallelTest) instead of [`resource.Test()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#Test) except where serialized testing is absolutely required. -- [ ] __Uses fmt.Sprintf()__: Test configurations preferably should to be separated into their own functions (typically named `testAccAws{SERVICE}{RESOURCE}Config{PURPOSE}`) that call [`fmt.Sprintf()`](https://golang.org/pkg/fmt/#Sprintf) for variable injection or a string `const` for completely static configurations. Test configurations should avoid `var` or other variable injection functionality such as [`text/template`](https://golang.org/pkg/text/template/). -- [ ] __Uses Randomized Infrastructure Naming__: Test configurations that utilize resources where a unique name is required should generate a random name. Typically this is created via `rName := acctest.RandomWithPrefix("tf-acc-test")` in the acceptance test function before generating the configuration. - -For resources that support import, the additional item below is required that will be noted during submission review and prevent immediate merging: - -- [ ] __Implements ImportState Testing__: Tests should include an additional `TestStep` configuration that verifies resource import via `ImportState: true` and `ImportStateVerify: true`. This `TestStep` should be added to all possible tests for the resource to ensure that all infrastructure configurations are properly imported into Terraform. - -The below are style-based items that _may_ be noted during review and are recommended for simplicity, consistency, and quality assurance: - -- [ ] __Uses Builtin Check Functions__: Tests should utilize already available check functions, e.g. `resource.TestCheckResourceAttr()`, to verify values in the Terraform state over creating custom `TestCheckFunc`. More information about these functions can be found in the [Extending Terraform Builtin Check Functions documentation](https://www.terraform.io/docs/extend/testing/acceptance-tests/teststep.html#builtin-check-functions). -- [ ] __Uses TestCheckResoureAttrPair() for Data Sources__: Tests should utilize [`resource.TestCheckResourceAttrPair()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#TestCheckResourceAttrPair) to verify values in the Terraform state for data sources attributes to compare them with their expected resource attributes. -- [ ] __Excludes Timeouts Configurations__: Test configurations should not include `timeouts {...}` configuration blocks except for explicit testing of customizable timeouts (typically very short timeouts with `ExpectError`). -- [ ] __Implements Default and Zero Value Validation__: The basic test for a resource (typically named `TestAccAws{SERVICE}{RESOURCE}_basic`) should utilize available check functions, e.g. `resource.TestCheckResourceAttr()`, to verify default and zero values in the Terraform state for all attributes. Empty/missing configuration blocks can be verified with `resource.TestCheckResourceAttr(resourceName, "{ATTRIBUTE}.#", "0")` and empty maps with `resource.TestCheckResourceAttr(resourceName, "{ATTRIBUTE}.%", "0")` - -The below are location-based items that _may_ be noted during review and are recommended for consistency with testing flexibility. Resource testing is expected to pass across multiple AWS environments supported by the Terraform AWS Provider (e.g. AWS Standard and AWS GovCloud (US)). Contributors are not expected or required to perform testing outside of AWS Standard, e.g. running only in the `us-west-2` region is perfectly acceptable, however these are provided for reference: - -- [ ] __Uses aws_ami Data Source__: Any hardcoded AMI ID configuration, e.g. `ami-12345678`, should be replaced with the [`aws_ami` data source](https://www.terraform.io/docs/providers/aws/d/ami.html) pointing to an Amazon Linux image. A common pattern is a configuration like the below, which will likely be moved into a common configuration function in the future: - - ```hcl - data "aws_ami" "amzn-ami-minimal-hvm-ebs" { - most_recent = true - owners = ["amazon"] - - filter { - name = "name" - values = ["amzn-ami-minimal-hvm-*"] - } - filter { - name = "root-device-type" - values = ["ebs"] - } - } - ``` - -- [ ] __Uses aws_availability_zones Data Source__: Any hardcoded AWS Availability Zone configuration, e.g. `us-west-2a`, should be replaced with the [`aws_availability_zones` data source](https://www.terraform.io/docs/providers/aws/d/availability_zones.html). A common pattern is declaring `data "aws_availability_zones" "current" {}` and referencing it via `data.aws_availability_zones.current.names[0]` or `data.aws_availability_zones.current.names[count.index]` in resources utilizing `count`. -- [ ] __Uses aws_region Data Source__: Any hardcoded AWS Region configuration, e.g. `us-west-2`, should be replaced with the [`aws_region` data source](https://www.terraform.io/docs/providers/aws/d/region.html). A common pattern is declaring `data "aws_region" "current" {}` and referencing it via `data.aws_region.current.name` -- [ ] __Uses aws_partition Data Source__: Any hardcoded AWS Partition configuration, e.g. the `aws` in a `arn:aws:SERVICE:REGION:ACCOUNT:RESOURCE` ARN, should be replaced with the [`aws_partition` data source](https://www.terraform.io/docs/providers/aws/d/partition.html). A common pattern is declaring `data "aws_partition" "current" {}` and referencing it via `data.aws_partition.current.partition` -- [ ] __Uses Builtin ARN Check Functions__: Tests should utilize available ARN check functions, e.g. `testAccMatchResourceAttrRegionalARN()`, to validate ARN attribute values in the Terraform state over `resource.TestCheckResourceAttrSet()` and `resource.TestMatchResourceAttr()` -- [ ] __Uses testAccCheckResourceAttrAccountID()__: Tests should utilize the available AWS Account ID check function, `testAccCheckResourceAttrAccountID()` to validate account ID attribute values in the Terraform state over `resource.TestCheckResourceAttrSet()` and `resource.TestMatchResourceAttr()` - -### Writing Acceptance Tests - -Terraform includes an acceptance test harness that does most of the repetitive -work involved in testing a resource. For additional information about testing -Terraform Providers, see the [Extending Terraform documentation](https://www.terraform.io/docs/extend/testing/index.html). - -#### Acceptance Tests Often Cost Money to Run - -Because acceptance tests create real resources, they often cost money to run. -Because the resources only exist for a short period of time, the total amount -of money required is usually a relatively small. Nevertheless, we don't want -financial limitations to be a barrier to contribution, so if you are unable to -pay to run acceptance tests for your contribution, mention this in your -pull request. We will happily accept "best effort" implementations of -acceptance tests and run them for you on our side. This might mean that your PR -takes a bit longer to merge, but it most definitely is not a blocker for -contributions. - -#### Running an Acceptance Test - -Acceptance tests can be run using the `testacc` target in the Terraform -`Makefile`. The individual tests to run can be controlled using a regular -expression. Prior to running the tests provider configuration details such as -access keys must be made available as environment variables. - -For example, to run an acceptance test against the Amazon Web Services -provider, the following environment variables must be set: - -```sh -# Using a profile -export AWS_PROFILE=... -# Otherwise -export AWS_ACCESS_KEY_ID=... -export AWS_SECRET_ACCESS_KEY=... -export AWS_DEFAULT_REGION=... -``` - -Please note that the default region for the testing is `us-west-2` and must be -overriden via the `AWS_DEFAULT_REGION` environment variable, if necessary. This -is especially important for testing AWS GovCloud (US), which requires: - -```sh -export AWS_DEFAULT_REGION=us-gov-west-1 -``` - -Tests can then be run by specifying the target provider and a regular -expression defining the tests to run: - -```sh -$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchDashboard_update' -==> Checking that code complies with gofmt requirements... -TF_ACC=1 go test ./aws -v -run=TestAccAWSCloudWatchDashboard_update -timeout 120m -=== RUN TestAccAWSCloudWatchDashboard_update ---- PASS: TestAccAWSCloudWatchDashboard_update (26.56s) -PASS -ok github.com/terraform-providers/terraform-provider-aws/aws 26.607s -``` - -Entire resource test suites can be targeted by using the naming convention to -write the regular expression. For example, to run all tests of the -`aws_cloudwatch_dashboard` resource rather than just the update test, you can start -testing like this: - -```sh -$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchDashboard' -==> Checking that code complies with gofmt requirements... -TF_ACC=1 go test ./aws -v -run=TestAccAWSCloudWatchDashboard -timeout 120m -=== RUN TestAccAWSCloudWatchDashboard_importBasic ---- PASS: TestAccAWSCloudWatchDashboard_importBasic (15.06s) -=== RUN TestAccAWSCloudWatchDashboard_basic ---- PASS: TestAccAWSCloudWatchDashboard_basic (12.70s) -=== RUN TestAccAWSCloudWatchDashboard_update ---- PASS: TestAccAWSCloudWatchDashboard_update (27.81s) -PASS -ok github.com/terraform-providers/terraform-provider-aws/aws 55.619s -``` - -#### Writing an Acceptance Test - -Terraform has a framework for writing acceptance tests which minimises the -amount of boilerplate code necessary to use common testing patterns. The entry -point to the framework is the `resource.ParallelTest()` function. - -Tests are divided into `TestStep`s. Each `TestStep` proceeds by applying some -Terraform configuration using the provider under test, and then verifying that -results are as expected by making assertions using the provider API. It is -common for a single test function to exercise both the creation of and updates -to a single resource. Most tests follow a similar structure. - -1. Pre-flight checks are made to ensure that sufficient provider configuration - is available to be able to proceed - for example in an acceptance test - targeting AWS, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` must be set prior - to running acceptance tests. This is common to all tests exercising a single - provider. - -Each `TestStep` is defined in the call to `resource.ParallelTest()`. Most assertion -functions are defined out of band with the tests. This keeps the tests -readable, and allows reuse of assertion functions across different tests of the -same type of resource. The definition of a complete test looks like this: - -```go -func TestAccAWSCloudWatchDashboard_basic(t *testing.T) { - var dashboard cloudwatch.GetDashboardOutput - rInt := acctest.RandInt() - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCloudWatchDashboardDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSCloudWatchDashboardConfig(rInt), - Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchDashboardExists("aws_cloudwatch_dashboard.foobar", &dashboard), - resource.TestCheckResourceAttr("aws_cloudwatch_dashboard.foobar", "dashboard_name", testAccAWSCloudWatchDashboardName(rInt)), - ), - }, - }, - }) -} -``` - -When executing the test, the following steps are taken for each `TestStep`: - -1. The Terraform configuration required for the test is applied. This is - responsible for configuring the resource under test, and any dependencies it - may have. For example, to test the `aws_cloudwatch_dashboard` resource, a valid configuration with the requisite fields is required. This results in configuration which looks like this: - - ```hcl - resource "aws_cloudwatch_dashboard" "foobar" { - dashboard_name = "terraform-test-dashboard-%d" - dashboard_body = < - -- [Pull Requests](#pull-requests) - - [Pull Request Review Process](#pull-request-review-process) - - [Dependency Updates](#dependency-updates) - - [AWS Go SDK Updates](#aws-go-sdk-updates) - - [golangci-lint Updates](#golangci-lint-updates) - - [Terraform Plugin SDK Updates](#terraform-plugin-sdk-updates) - - [tfproviderdocs Updates](#tfproviderdocs-updates) - - [tfproviderlint Updates](#tfproviderlint-updates) - - [yaml.v2 Updates](#yaml-v2-updates) - - [Pull Request Merge Process](#pull-request-merge-process) - - [Pull Request Types to CHANGELOG](#pull-request-types-to-changelog) -- [Release Process](#release-process) - - - -## Pull Requests - -### Pull Request Review Process - -Notes for each type of pull request are (or will be) available in subsections below. - -- If you plan to be responsible for the pull request through the merge/closure process, assign it to yourself -- Add `bug`, `enhancement`, `new-data-source`, `new-resource`, or `technical-debt` labels to match expectations from change -- Perform a quick scan of open issues and ensure they are referenced in the pull request description (e.g. `Closes #1234`, `Relates #5678`). Edit the description yourself and mention this to the author: - -```markdown -This pull request appears to be related to/solve #1234, so I have edited the pull request description to denote the issue reference. -``` - -- Review the contents of the pull request and ensure the change follows the relevant section of the [Contributing Guide](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#checklists-for-contribution) -- If the change is not acceptable, leave a long form comment about the reasoning and close the pull request -- If the change is acceptable with modifications, leave a pull request review marked using the `Request Changes` option (for maintainer pull requests with minor modification requests, giving feedback with the `Approve` option is recommended so they do not need to wait for another round of review) -- If the author is unresponsive for changes (by default we give two weeks), determine importance and level of effort to finish the pull request yourself including their commits or close the pull request -- Run relevant acceptance testing ([locally](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#running-an-acceptance-test) or in TeamCity) against AWS Commercial and AWS GovCloud (US) to ensure no new failures are being introduced -- Approve the pull request with a comment outlining what steps you took that ensure the change is acceptable, e.g. acceptance testing output - -``````markdown -Looks good, thanks @username! :rocket: - -Output from acceptance testing in AWS Commercial: - -``` ---- PASS: TestAcc... ---- PASS: TestAcc... -``` - -Output from acceptance testing in AWS GovCloud (US): - -``` ---- PASS: TestAcc... ---- PASS: TestAcc... -``` -`````` - -#### Dependency Updates - -##### AWS Go SDK Updates - -Almost exclusively, `github.com/aws/aws-sdk-go` updates are additive in nature. It is generally safe to only scan through them before approving and merging. If you have any concerns about any of the service client updates such as suspicious code removals in the update, or deprecations introduced, run the acceptance testing for potentially affected resources before merging. - -Authentication changes: - -Occassionally, there will be changes listed in the authentication pieces of the AWS Go SDK codebase, e.g. changes to `aws/session`. The AWS Go SDK `CHANGELOG` should include a relevant description of these changes under a heading such as `SDK Enhancements` or `SDK Bug Fixes`. If they seem worthy of a callout in the Terraform AWS Provider `CHANGELOG`, then upon merging we should include a similar message prefixed with the `provider` subsystem, e.g. `* provider: ...`. - -Additionally, if a `CHANGELOG` addition seemed appropriate, this dependency and version should also be updated in the Terraform S3 Backend, which currently lives in Terraform Core. An example of this can be found with https://github.com/terraform-providers/terraform-provider-aws/pull/9305 and https://github.com/hashicorp/terraform/pull/22055. - -CloudFront changes: - -CloudFront service client updates have previously caused an issue when a new field introduced in the SDK was not included with Terraform and caused all requests to error (https://github.com/terraform-providers/terraform-provider-aws/issues/4091). As a precaution, if you see CloudFront updates, run all the CloudFront resource acceptance testing before merging (`TestAccAWSCloudFront`). - -New Regions: - -These are added to the AWS Go SDK `aws/endpoints/defaults.go` file and generally noted in the AWS Go SDK `CHANGELOG` as `aws/endpoints: Updated Regions`. Since April 2019, new regions added to AWS now require being explicitly enabled before they can be used. Examples of this can be found when `me-south-1` was announced: - -- [Terraform AWS Provider issue](https://github.com/terraform-providers/terraform-provider-aws/issues/9545) -- [Terraform AWS Provider AWS Go SDK update pull request](https://github.com/terraform-providers/terraform-provider-aws/pull/9538) -- [Terraform AWS Provider data source update pull request](https://github.com/terraform-providers/terraform-provider-aws/pull/9547) -- [Terraform S3 Backend issue](https://github.com/hashicorp/terraform/issues/22254) -- [Terraform S3 Backend pull request](https://github.com/hashicorp/terraform/pull/22253) - -Typically our process for new regions is as follows: - -- Create new (if not existing) Terraform AWS Provider issue: Support Automatic Region Validation for `XX-XXXXX-#` (Location) -- Create new (if not existing) Terraform S3 Backend issue: backend/s3: Support Automatic Region Validation for `XX-XXXXX-#` (Location) -- [Enable the new region in an AWS testing account](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable) and verify AWS Go SDK update works with the new region with `export AWS_DEFAULT_REGION=XX-XXXXX-#` with the new region and run the `TestAccDataSourceAwsRegion_` acceptance testing or by building the provider and testing a configuration like the following: - -```hcl -provider "aws" { - region = "me-south-1" -} - -data "aws_region" "current" {} - -output "region" { - value = data.aws_region.current.name -} -``` - -- Merge AWS Go SDK update in Terraform AWS Provider and close issue with the following information: - -``````markdown -Support for automatic validation of this new region has been merged and will release with version of the Terraform AWS Provider, later this week. - ---- - -Please note that this new region requires [a manual process to enable](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). Once enabled in the console, it takes a few minutes for everything to work properly. - -If the region is not enabled properly, or the enablement process is still in progress, you can receive errors like these: - -```console -$ terraform apply - -Error: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid. - status code: 403, request id: 142f947b-b2c3-11e9-9959-c11ab17bcc63 - - on main.tf line 1, in provider "aws": - 1: provider "aws" { -``` - ---- - -To use this new region before support has been added to Terraform AWS Provider version in use, you must disable the provider's automatic region validation via: - -```hcl -provider "aws" { - # ... potentially other configuration ... - - region = "me-south-1" - skip_region_validation = true -} -``` -`````` - -- Update the Terraform AWS Provider `CHANGELOG` with the following: - -```markdown -NOTES: - -* provider: Region validation now automatically supports the new `XX-XXXXX-#` (Location) region. For AWS operations to work in the new region, the region must be explicitly enabled as outlined in the [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). When the region is not enabled, the Terraform AWS Provider will return errors during credential validation (e.g. `error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid`) or AWS operations will throw their own errors (e.g. `data.aws_availability_zones.current: Error fetching Availability Zones: AuthFailure: AWS was not able to validate the provided access credentials`). [GH-####] - -ENHANCEMENTS: - -* provider: Support automatic region validation for `XX-XXXXX-#` [GH-####] -``` - -- Follow the [Contributing Guide](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#new-region) to submit updates for various data sources to support the new region -- Submit the dependency update to the Terraform S3 Backend by running the following: - -```shell -go get github.com/aws/aws-sdk-go@v#.#.# -go mod tidy -go mod vendor -``` - -- Create a S3 Bucket in the new region and verify AWS Go SDK update works with new region by building the Terraform S3 Backend and testing a configuration like the following: - -```hcl -terraform { - backend "s3" { - bucket = "XXX" - key = "test" - region = "me-south-1" - } -} - -output "test" { - value = timestamp() -} -``` - -- After approval, merge AWS Go SDK update in Terraform S3 Backend and close issue with the following information: - -``````markdown -Support for automatic validation of this new region has been merged and will release with the next version of the Terraform. - -This was verified on a build of Terraform with the update: - -```hcl -terraform { - backend "s3" { - bucket = "XXX" - key = "test" - region = "me-south-1" - } -} - -output "test" { - value = timestamp() -} -``` - -Outputs: - -```console -$ terraform init -... -Terraform has been successfully initialized! -``` - ---- - -Please note that this new region requires [a manual process to enable](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). Once enabled in the console, it takes a few minutes for everything to work properly. - -If the region is not enabled properly, or the enablement process is still in progress, you can receive errors like these: - -```console -$ terraform init - -Initializing the backend... - -Error: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid. -``` - ---- - -To use this new region before this update is released, you must disable the Terraform S3 Backend's automatic region validation via: - -```hcl -terraform { - # ... potentially other configuration ... - - backend "s3" { - # ... other configuration ... - - region = "me-south-1" - skip_region_validation = true - } -} -``` -`````` - -- Update the Terraform S3 Backend `CHANGELOG` with the following: - -```markdown -NOTES: - -* backend/s3: Region validation now automatically supports the new `XX-XXXXX-#` (Location) region. For AWS operations to work in the new region, the region must be explicitly enabled as outlined in the [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). When the region is not enabled, the Terraform S3 Backend will return errors during credential validation (e.g. `error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid`). [GH-####] - -ENHANCEMENTS: - -* backend/s3: Support automatic region validation for `XX-XXXXX-#` [GH-####] -``` - -##### golangci-lint Updates - -Merge if CI passes. - -##### Terraform Plugin SDK Updates - -Except for trivial changes, run the full acceptance testing suite against the pull request and verify there are no new or unexpected failures. - -##### tfproviderdocs Updates - -Merge if CI passes. - -##### tfproviderlint Updates - -Merge if CI passes. - -##### yaml.v2 Updates - -Run the acceptance testing pattern, `TestAccAWSCloudFormationStack(_dataSource)?_yaml`, and merge if passing. - -### Pull Request Merge Process - -- Add this pull request to the upcoming release milestone -- Add any linked issues that will be closed by the pull request to the same upcoming release milestone -- Merge the pull request -- Delete the branch (if the branch is on this repository) -- Determine if the pull request should have a CHANGELOG entry by reviewing the [Pull Request Types to CHANGELOG section](#pull-request-types-to-changelog). If so, update the repository `CHANGELOG.md` by directly committing to the `master` branch (e.g. editing the file in the GitHub web interface). See also the [Extending Terraform documentation](https://www.terraform.io/docs/extend/best-practices/versioning.html) for more information about the expected CHANGELOG format. -- Leave a comment on any issues closed by the pull request noting that it has been merged and when to expect the release containing it, e.g. - -```markdown -The fix for this has been merged and will release with version X.Y.Z of the Terraform AWS Provider, expected in the XXX timeframe. -``` - -### Pull Request Types to CHANGELOG - -The CHANGELOG is intended to show operator-impacting changes to the codebase for a particular version. If every change or commit to the code resulted in an entry, the CHANGELOG would become less useful for operators. The lists below are general guidelines on when a decision needs to be made to decide whether a change should have an entry. - -Changes that should have a CHANGELOG entry: - -- New Resources and Data Sources -- New full-length documentation guides (e.g. EKS Getting Started Guide, IAM Policy Documents with Terraform) -- Resource and provider bug fixes -- Resource and provider enhancements -- Deprecations -- Removals - -Changes that may have a CHANGELOG entry: - -- Dependency updates: If the update contains relevant bug fixes or enhancements that affect operators, those should be called out. - -Changes that should _not_ have a CHANGELOG entry: - -- Resource and provider documentation updates -- Testing updates - -## Release Process - -- Create a milestone for the next release after this release (generally, the next milestone will be a minor version increase unless previously decided for a major or patch version) -- Check the existing release milestone for open items and either work through them or move them to the next milestone -- Run the HashiCorp (non-OSS) TeamCity release job with the `DEPLOYMENT_TARGET_VERSION` matching the expected release milestone and `DEPLOYMENT_NEXT_VERSION` matching the next release milestone -- Wait for the TeamCity release job and CircleCI website deployment jobs to complete either by watching the build logs or Slack notifications -- Close the release milestone -- Create a new GitHub release with the release title exactly matching the tag and milestone (e.g. `v2.22.0`) and copy the notes from the CHANGELOG to the release notes. This will trigger [HashiBot](https://github.com/apps/hashibot) release comments. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2ad1f40c11c..2d7f686e259 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ - + diff --git a/.github/workflows/changelog_checks.yml b/.github/workflows/changelog.yml similarity index 56% rename from .github/workflows/changelog_checks.yml rename to .github/workflows/changelog.yml index d8dcdac3a82..8fe5ae26cfd 100644 --- a/.github/workflows/changelog_checks.yml +++ b/.github/workflows/changelog.yml @@ -1,12 +1,20 @@ name: CHANGELOG Checks on: + push: + branches: + - master pull_request: paths: - CHANGELOG.md +env: + GO_VERSION: "1.14" + GO111MODULE: on + jobs: - PRCheck: - name: PR Check + comment: + if: github.event_name == 'pull_request' && !contains(fromJSON('["bflad", "breathingdust", "ewbankkit", "gdavison", "maryelizbeth"]'), github.actor) + name: Comment runs-on: ubuntu-latest steps: - name: PR Comment @@ -22,3 +30,18 @@ jobs: Remove any changes to the `CHANGELOG.md` file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request. - name: Fail the check run: exit 1 + misspell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - run: go install github.com/client9/misspell/cmd/misspell + - run: misspell -error -source text CHANGELOG.md diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml new file mode 100644 index 00000000000..d27bca365fa --- /dev/null +++ b/.github/workflows/examples.yml @@ -0,0 +1,70 @@ +name: Examples Checks +on: + push: + branches: + - master + pull_request: + paths: + - examples/** + +env: + AWS_DEFAULT_REGION: us-west-2 + TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/.terraform.d/plugin-cache + +jobs: + terraform: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go_version: ["1.14"] + terraform_version: ["0.11.14", "0.12.24"] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go_version }} + - name: go build + run: | + GOOS=$(go env GOOS) + GOARCH=$(go env GOARCH) + # Substitute as latest release + VERSION=$(git describe --abbrev=0 --match='v*.*.*' --tags || echo -n "v99.99.99") + go build -o ${TF_PLUGIN_CACHE_DIR}/${GOOS}_${GOARCH}/terraform-provider-aws_${VERSION}_x4 . + - uses: hashicorp/setup-terraform@v1 + with: + terraform_version: ${{ matrix.terraform_version }} + - name: terraform + run: | + for DIR in $(find ./examples -type f -name '*.tf' -exec dirname {} \; | sort -u); do + if [ ${{ matrix.terraform_version }} = 0.11.14 ]; then + if [ $DIR = ./examples/eks-getting-started ]; then + # Skip example already converted to Terraform 0.12 and later syntax + continue + elif [ $DIR = ./examples/two-tier ]; then + # 0.11 validation requires file path to exist + mkdir -p ~/.ssh + touch ~/.ssh/terraform-provider-aws-example.pub + fi + fi + pushd $DIR + if [ -f terraform.template.tfvars ]; then + cp terraform.template.tfvars terraform.tfvars + fi + echo; echo -e "\e[1;35m===> Initializing Example: $DIR <===\e[0m"; echo + terraform init + # Prefer Terraform 0.12 and later format checking to prevent conflicts + if [ ${{ matrix.terraform_version }} != 0.11.14 ]; then + echo; echo -e "\e[1;35m===> Format Checking Example: $DIR <===\e[0m"; echo + terraform fmt -check + fi + echo; echo -e "\e[1;35m===> Validating Example: $DIR <===\e[0m"; echo + terraform validate + popd + done diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 1e09218e851..4253aebf217 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -7,16 +7,8 @@ jobs: - uses: actions/checkout@v1.0.0 - name: Apply Issue Triage Label uses: actions/github@v1.0.0 - if: github.event.action == 'opened' + if: github.event.action == 'opened' && !contains(fromJSON('["bflad", "breathingdust", "ewbankkit", "gdavison", "maryelizbeth"]'), github.actor) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: args: label needs-triage - - - name: Add new issue into Triage Board - uses: alex-page/github-project-automation-plus@v0.1.1 - if: github.event.action == 'opened' - with: - project: AWS Provider Triage - column: Needs Triage - repo-token: ${{ secrets.GITHUB_ACTIONS_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000..95375328b77 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +name: "Stale issues and pull requests" +on: + schedule: + - cron: "40 17 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 720 + days-before-close: 30 + exempt-issue-label: 'needs-triage' + exempt-pr-label: 'needs-triage' + operations-per-run: 100 + stale-issue-label: 'stale' + stale-issue-message: | + Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. + + If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! + stale-pr-label: 'stale' + stale-pr-message: | + Marking this pull request as stale due to inactivity. This helps our maintainers find and focus on the active pull requests. If this pull request receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. + + If this pull request was automatically closed and you feel this pull request should be reopened, we encourage creating a new pull request linking back to this one for added context. Thank you! diff --git a/.github/workflows/terraform_provider.yml b/.github/workflows/terraform_provider.yml new file mode 100644 index 00000000000..f78b3634495 --- /dev/null +++ b/.github/workflows/terraform_provider.yml @@ -0,0 +1,257 @@ +name: Terraform Provider Checks + +on: + push: + branches: + - master + pull_request: + paths: + - .github/workflows/terraform_provider.yml + - .golangci.yml + - aws/** + - awsproviderlint/** + - docs/index.md + - docs/data-sources/** + - docs/guides/** + - docs/resources/** + - go.sum + - GNUmakefile + - main.go + - staticcheck.conf + - website/** + +env: + AWS_DEFAULT_REGION: us-west-2 + GO_VERSION: "1.14" + GO111MODULE: on + TERRAFORM_VERSION: "0.12.25" + +jobs: + go_mod_download: + name: go mod download + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - uses: actions/cache@v2 + continue-on-error: true + id: cache-go-pkg-mod + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - if: steps.cache-go-pkg-mod.outputs.cache-hit != 'true' || steps.cache-go-pkg-mod.outcome == 'failure' + run: go mod download + + go_build: + name: go build + needs: [go_mod_download] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + continue-on-error: true + id: cache-terraform-plugin-dir + timeout-minutes: 2 + with: + path: terraform-plugin-dir + key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' + name: go env + run: | + echo "::set-env name=GOCACHE::$(go env GOCACHE)" + - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' + uses: actions/cache@v2 + with: + path: ${{ env.GOCACHE }} + key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' + name: go build + run: go build -o terraform-plugin-dir/terraform-provider-aws_v99.99.99_x4 . + + terraform_providers_schema: + name: terraform providers schema + needs: [go_build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + continue-on-error: true + id: cache-terraform-providers-schema + timeout-minutes: 2 + with: + path: terraform-providers-schema + key: ${{ runner.os }}-terraform-providers-schema-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' + uses: actions/cache@v2 + timeout-minutes: 2 + with: + path: terraform-plugin-dir + key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' + uses: hashicorp/setup-terraform@v1 + with: + terraform_version: ${{ env.TERRAFORM_VERSION }} + terraform_wrapper: false + - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' + name: terraform init + run: | + # We need a file to initialize the provider + echo 'data "aws_partition" "example" {}' > example.tf + terraform init -plugin-dir terraform-plugin-dir + - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' + name: terraform providers schema + run: | + mkdir terraform-providers-schema + terraform providers schema -json > terraform-providers-schema/schema.json + + awsproviderlint: + needs: [go_build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: go env + run: | + echo "::set-env name=GOCACHE::$(go env GOCACHE)" + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ${{ env.GOCACHE }} + key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - run: go install ./awsproviderlint + - name: awsproviderlint + run: make awsproviderlint + + go_generate: + name: go generate + needs: [go_build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: go env + run: | + echo "::set-env name=GOCACHE::$(go env GOCACHE)" + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ${{ env.GOCACHE }} + key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - run: go generate ./... + - name: Check for Git Differences + run: | + git diff --compact-summary --exit-code || \ + (echo; echo "Unexpected difference in directories after code generation. Run 'make gen' command and commit."; exit 1) + + go_test: + name: go test + needs: [go_build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: go env + run: | + echo "::set-env name=GOCACHE::$(go env GOCACHE)" + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ${{ env.GOCACHE }} + key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - run: go test ./... -timeout=120s + + golangci-lint: + needs: [go_build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - name: go env + run: | + echo "::set-env name=GOCACHE::$(go env GOCACHE)" + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ${{ env.GOCACHE }} + key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint + - run: golangci-lint run ./aws/... + + tfproviderdocs: + needs: [terraform_providers_schema] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + - uses: actions/cache@v2 + continue-on-error: true + timeout-minutes: 2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} + - run: go install github.com/bflad/tfproviderdocs + - uses: actions/cache@v2 + timeout-minutes: 2 + with: + path: terraform-providers-schema + key: ${{ runner.os }}-terraform-providers-schema-${{ hashFiles('go.sum') }}-${{ hashFiles('aws/**') }} + - name: tfproviderdocs check + run: | + tfproviderdocs check \ + -allowed-resource-subcategories-file website/allowed-subcategories.txt \ + -ignore-file-missing-data-sources aws_alb,aws_alb_listener,aws_alb_target_group \ + -ignore-file-missing-resources aws_alb,aws_alb_listener,aws_alb_listener_certificate,aws_alb_listener_rule,aws_alb_target_group,aws_alb_target_group_attachment \ + -ignore-side-navigation-data-sources aws_alb,aws_alb_listener,aws_alb_target_group,aws_kms_secret \ + -provider-name aws \ + -providers-schema-json terraform-providers-schema/schema.json \ + -require-resource-subcategory diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 00000000000..e975771e984 --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,21 @@ +name: Website Checks +on: + push: + branches: + - master + pull_request: + paths: + - website/docs/** + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + config-file: '.markdownlinkcheck.json' + folder-path: 'website/docs' + file-extension: '.markdown' diff --git a/.gitignore b/.gitignore index 53849c06c32..519507f6f27 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ website/node_modules *.test *.iml log.txt - +markdown-link-check*.txt website/vendor # Test exclusions diff --git a/.hashibot.hcl b/.hashibot.hcl index 997c3f348e9..e12b23d12e2 100644 --- a/.hashibot.hcl +++ b/.hashibot.hcl @@ -1,5 +1,5 @@ poll "closed_issue_locker" "locker" { - schedule = "0 50 14 * * *" + schedule = "0 10 17 * * *" closed_for = "720h" # 30 days max_issues = 500 sleep_between_issues = "5s" @@ -11,21 +11,6 @@ poll "closed_issue_locker" "locker" { EOF } -poll "stale_issue_closer" "closer" { - schedule = "0 22 23 * * *" - no_reply_in_last = "2160h" # 90 days - max_issues = 500 - sleep_between_issues = "5s" - created_after = "2019-06-01" - exclude_labels = ["needs-triage", "technical-debt"] - extra_search_params = "reactions:<20 no:milestone no:assignee" - message = <<-EOF - I'm going to close this issue due to inactivity (_90 days_ without response ⏳ ). This helps our maintainers find and focus on the active issues. - - If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! - EOF -} - behavior "deprecated_import_commenter" "hashicorp_terraform" { import_regexp = "github.com/hashicorp/terraform/" marker_label = "terraform-plugin-sdk-migration" @@ -51,7 +36,8 @@ behavior "deprecated_import_commenter" "hashicorp_terraform" { } behavior "opened_pull_request_labeler" "triage" { - labels = ["needs-triage"] + labels = ["needs-triage"] + skip_collaborators = true } queued_behavior "release_commenter" "releases" { @@ -242,9 +228,11 @@ behavior "regexp_issue_labeler_v2" "service_labels" { "aws_main_route_table_association", "aws_network_interface", "aws_placement_group", + "aws_prefix_list", "aws_spot", "aws_route(\"|`|$)", "aws_vpn_", + "aws_volume_attachment", ], "service/ecr" = [ "aws_ecr_", @@ -344,6 +332,9 @@ behavior "regexp_issue_labeler_v2" "service_labels" { "service/kinesisanalytics" = [ "aws_kinesis_analytics_", ], + "service/kinesisanalyticsv2" = [ + "aws_kinesisanalyticsv2_", + ], "service/kms" = [ "aws_kms_", ], @@ -395,6 +386,9 @@ behavior "regexp_issue_labeler_v2" "service_labels" { "service/neptune" = [ "aws_neptune_", ], + "service/networkmanager" = [ + "aws_networkmanager_", + ], "service/opsworks" = [ "aws_opsworks_", ], @@ -440,7 +434,7 @@ behavior "regexp_issue_labeler_v2" "service_labels" { "aws_route53_([^d]|d[^o]|do[^m]|dom[^a]|doma[^i]|domai[^n]|domain[^s]|domains[^_]|[^r]|r[^e]|re[^s]|res[^o]|reso[^l]|resol[^v]|resolv[^e]|resolve[^r]|resolver[^_])", ], "service/route53domains" = [ - "aws_route53_domains_", + "aws_route53domains_", ], "service/route53resolver" = [ "aws_route53_resolver_", @@ -503,6 +497,9 @@ behavior "regexp_issue_labeler_v2" "service_labels" { "service/swf" = [ "aws_swf_", ], + "service/synthetics" = [ + "aws_synthetics_", + ], "service/transfer" = [ "aws_transfer_", ], @@ -535,6 +532,11 @@ behavior "pull_request_path_labeler" "service_labels" { label_map = { # label provider related changes "provider" = [ + "*.md", + ".github/**/*", + ".gitignore", + ".go-version", + ".hashibot.hcl", "aws/auth_helpers.go", "aws/awserr.go", "aws/config.go", @@ -542,8 +544,16 @@ behavior "pull_request_path_labeler" "service_labels" { "aws/*_aws_ip_ranges*", "aws/*_aws_partition*", "aws/*_aws_region*", + "aws/internal/flatmap/*", + "aws/internal/keyvaluetags/*", + "aws/internal/naming/*", "aws/provider.go", "aws/utils.go", + "docs/*.md", + "docs/contributing/**/*", + "GNUmakefile", + "infrastructure/**/*", + "main.go", "renovate.json", "website/docs/index.html.markdown", "website/**/arn*", @@ -551,10 +561,20 @@ behavior "pull_request_path_labeler" "service_labels" { "website/**/partition*", "website/**/region*" ] - # label test related changes + "documentation" = [ + "docs/**/*", + "*.md", + ] + "examples" = [ + "examples/**/*", + ] "tests" = [ "**/*_test.go", + "**/testdata/**/*", + "**/test-fixtures/**/*", + ".github/workflows/*", ".gometalinter.json", + ".markdownlinkcheck.json", ".markdownlint.yml", ".travis.yml", "staticcheck.conf" @@ -793,6 +813,7 @@ behavior "pull_request_path_labeler" "service_labels" { "aws/*_aws_network_acl*", "aws/*_aws_network_interface*", "aws/*_aws_placement_group*", + "aws/*_aws_prefix_list*", "aws/*_aws_route_table*", "aws/*_aws_route.*", "aws/*_aws_security_group*", @@ -801,6 +822,7 @@ behavior "pull_request_path_labeler" "service_labels" { "aws/*_aws_subnet*", "aws/*_aws_vpc*", "aws/*_aws_vpn*", + "aws/*_aws_volume_attachment*", "website/**/availability_zone*", "website/**/customer_gateway*", "website/**/default_network_acl*", @@ -821,6 +843,7 @@ behavior "pull_request_path_labeler" "service_labels" { "website/**/network_acl*", "website/**/network_interface*", "website/**/placement_group*", + "website/**/prefix_list*", "website/**/route_table*", "website/**/route.*", "website/**/security_group*", @@ -828,7 +851,8 @@ behavior "pull_request_path_labeler" "service_labels" { "website/**/spot_*", "website/**/subnet*", "website/**/vpc*", - "website/**/vpn*" + "website/**/vpn*", + "website/**/volume_attachment*" ] "service/ecr" = [ "**/*_ecr_*", @@ -963,6 +987,10 @@ behavior "pull_request_path_labeler" "service_labels" { "**/*_kinesis_analytics_*", "**/kinesis_analytics_*" ] + "service/kinesisanalyticsv2" = [ + "**/*_kinesisanalyticsv2_*", + "**/kinesisanalyticsv2_*" + ] "service/kms" = [ "**/*_kms_*", "**/kms_*" @@ -1031,6 +1059,10 @@ behavior "pull_request_path_labeler" "service_labels" { "**/*_neptune_*", "**/neptune_*" ] + "service/networkmanager" = [ + "**/*_networkmanager_*", + "**/networkmanager_*" + ] "service/opsworks" = [ "**/*_opsworks_*", "**/opsworks_*" @@ -1094,8 +1126,8 @@ behavior "pull_request_path_labeler" "service_labels" { "**/route53_zone*" ] "service/route53domains" = [ - "**/*_route53_domains_*", - "**/route53_domains_*" + "**/*_route53domains_*", + "**/route53domains_*" ] "service/route53resolver" = [ "**/*_route53_resolver_*", @@ -1179,6 +1211,10 @@ behavior "pull_request_path_labeler" "service_labels" { "**/*_swf_*", "**/swf_*" ] + "service/synthetics" = [ + "**/*_synthetics_*", + "**/synthetics_*" + ] "service/transfer" = [ "**/*_transfer_*", "**/transfer_*" diff --git a/.markdownlinkcheck.json b/.markdownlinkcheck.json new file mode 100644 index 00000000000..03d4284040a --- /dev/null +++ b/.markdownlinkcheck.json @@ -0,0 +1,33 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http(s)?://(?!(docs\\.aws\\.amazon\\.com|github.com|(www\\.)?terraform\\.io))" + } + ], + "replacementPatterns": [ + { + "pattern": "^(/docs/(?!providers/aws/))", + "replacement": "https://terraform.io$1" + }, + { + "pattern": "^(?!http(s)?://)(.*)\\.html(#.*)?$", + "replacement": "$2.html.markdown$3" + }, + { + "pattern": "^/docs/providers/aws/", + "replacement": "file:///github/workspace/website/docs/" + }, + { + "pattern": "^file:///github/workspace/website/docs/guides/(.*)\\.markdown(#.*)?$", + "replacement": "file:///github/workspace/website/docs/guides/$1.md$2" + }, + { + "pattern": "^file:///github/workspace/website/docs/d/(cognito_user_pools)\\.html\\.markdown(#.*)?$", + "replacement": "file:///github/workspace/website/docs/d/$1.markdown$2" + }, + { + "pattern": "^file:///github/workspace/website/docs/r/(cognito_identity_pool|cognito_user_pool|iam_role_policy_attachment|iam_user_policy_attachment|network_interface|ram_principal_association|ram_resource_share|ram_resource_share_accepter)\\.html\\.markdown(#.*)?$", + "replacement": "file:///github/workspace/website/docs/r/$1.markdown$2" + } + ] +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e1828f301..b3bbc4245e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,467 @@ -## 2.54.0 (Unreleased) +## 2.66.0 (Unreleased) FEATURES: -* **New Resource:** `aws_kinesis_video_stream` [GH-8291] +* **New Data Source:** `aws_wafv2_rule_group` [GH-12790] +* **New Resource:** `aws_wafv2_rule_group` [GH-12677] BUG FIXES: -* resource/aws_ebs_snapshot_copy: Return API errors instead of panic if unable to read snapshot [GH-12283] +* resource/aws_autoscaling_group: Allow `on_demand_base_capacity` to be set to 0 [GH-13623] +* resource/aws_autoscaling_group: Add `Computed` field to `instances_distribution` and it's sub-fields `on_demand_allocation_strategy`, `on_demand_base_capacity`, `on_demand_percentage_above_base_capacity`, and `spot_allocation_strategy` [GH-13623] +* resource/aws_autoscaling_group: Remove `Default` field from `instances_distribution` sub-fields `on_demand_allocation_strategy`, `on_demand_percentage_above_base_capacity`, and `spot_allocation_strategy` [GH-13623] +* resource/aws_batch_job_definition: Prevent differences when no `command` is specified in container properties [GH-13634] +* resource/aws_instance: Continue supporting empty string (`""`) `private_ip` argument [GH-13640] + +## 2.65.0 (June 04, 2020) + +ENHANCEMENTS: + +* resource/aws_acm_certificate: Add `status` attribute ([#13513](https://github.com/terraform-providers/terraform-provider-aws/issues/13513)) +* resource/aws_directory_servicedirectory: Add `availability_zones` attribute to `vpc_settings` block ([#12654](https://github.com/terraform-providers/terraform-provider-aws/issues/12654)) +* resource/aws_directory_servicedirectory: Add `availability_zones` attribute to `connect_settings` block ([#12654](https://github.com/terraform-providers/terraform-provider-aws/issues/12654)) +* resource/aws_directory_servicedirectory: Add plan time validation to `customer_dns_ips` in `connect_settings` block ([#12654](https://github.com/terraform-providers/terraform-provider-aws/issues/12654)) +* resource/aws_ec2_client_vpn_endpoint: Add `arn` attribute and plan time validation to `root_certificate_chain_arn` (in `authentication_options` block), `client_cidr_block`, and `server_certificate_arn` [[#13601](https://github.com/terraform-providers/terraform-provider-aws/issues/13601)] +* resource/aws_instance: Add plan time validation to `volume_type`(in `ebs_block_device` and `root_block_device` blocks), `private_ip`, `ipv6_addresses`, and `tenancy` ([#13033](https://github.com/terraform-providers/terraform-provider-aws/issues/13033)) +* resource/aws_lb_listener_rule: Add support for multiple, weighted target groups in `forward` rules ([#12574](https://github.com/terraform-providers/terraform-provider-aws/issues/12574)) +* resource/aws_lb_listener: Add support for multiple, weighted target groups in default actions ([#12574](https://github.com/terraform-providers/terraform-provider-aws/issues/12574)) +* resource/aws_workspaces_ip_group: Add plan-time validation for `rules.source` ([#13178](https://github.com/terraform-providers/terraform-provider-aws/issues/13178)) + +BUG FIXES: + +* resource/aws_acm_certificate: Detect `AMAZON_ISSUED` type `validation_method` value directly from API response instead of custom logic ([#13513](https://github.com/terraform-providers/terraform-provider-aws/issues/13513)) +* resource/aws_acm_certificate: Increase deletion retries from 10 minutes to 20 minutes (better support API Gateway Custom Domain deletion) ([#13513](https://github.com/terraform-providers/terraform-provider-aws/issues/13513)) +* resource/aws_apigatewayv2_stage: Prevent perpetual plan differences with `default_route_settings.logging_level` argument for HTTP APIs ([#12904](https://github.com/terraform-providers/terraform-provider-aws/issues/12904)) +* resource/aws_appmesh_route: Allow configuration of `spec` `http_route` `action` `weighted_target` `weight` argument to be 0 ([#13539](https://github.com/terraform-providers/terraform-provider-aws/issues/13539)) +* resource/aws_autoscaling_group: Prevent crash with `tags` argument containing boolean values in Terraform 0.11 and earlier ([#13604](https://github.com/terraform-providers/terraform-provider-aws/issues/13604)) +* resource/aws_dynamodb_table: Prevent multiple replica creation/deletion errors ([#13523](https://github.com/terraform-providers/terraform-provider-aws/issues/13523)) +* resource/aws_instance: Prevent perpetual plan differences, forcing replacement, with `ebs_block_device` configuration blocks [[#13589](https://github.com/terraform-providers/terraform-provider-aws/issues/13589)] +* resource/aws_kinesis_firehose_delivery_stream: Correctly set `kinesis_source_configuration` during import to prevent resource recreation ([#13536](https://github.com/terraform-providers/terraform-provider-aws/issues/13536)) +* resource/aws_ses_configuration_set: Prevent `Provider produced inconsistent result after apply` errors during creation or import [[#12024](https://github.com/terraform-providers/terraform-provider-aws/issues/12024)] +* resource/aws_workspaces_ip_group: Remove resource from state if deleted outside of Terraform ([#13178](https://github.com/terraform-providers/terraform-provider-aws/issues/13178)) + +## 2.64.0 (May 28, 2020) + +ENHANCEMENTS: + +* data-source/aws_directory_service_directory: `connect_settings` `connect_ips` attribute now set ([#13395](https://github.com/terraform-providers/terraform-provider-aws/issues/13395)) +* resource/aws_directory_service_directory: `connect_settings` `connect_ips` attribute now set ([#13395](https://github.com/terraform-providers/terraform-provider-aws/issues/13395)) +* resource/aws_iot_topic_rule: Add `step_functions` configuration block ([#13520](https://github.com/terraform-providers/terraform-provider-aws/issues/13520)) +* resource/aws_ses_event_destination: Support resource import ([#13464](https://github.com/terraform-providers/terraform-provider-aws/issues/13464)) + +BUG FIXES: + +* data-source/aws_elasticsearch_domain: `processing` is now correctly set ([#13397](https://github.com/terraform-providers/terraform-provider-aws/issues/13397)) +* resource/aws_acm_certificate: Update pending DNS validation record creation time from 1 minute to 5 minutes (better support for certificates with high amount of Subject Alternative Names) ([#12371](https://github.com/terraform-providers/terraform-provider-aws/issues/12371)) +* resource/aws_api_gateway_method_settings: `settings` now properly set ([#13403](https://github.com/terraform-providers/terraform-provider-aws/issues/13403)) +* resource/aws_autoscaling_group: Ignore ordering differences for `tags` argument (prevent unexpected differences from version 2.63.0) ([#13515](https://github.com/terraform-providers/terraform-provider-aws/issues/13515)) +* resource/aws_codebuild_project: Enable drift detection for `environment_variable` argument ([#6427](https://github.com/terraform-providers/terraform-provider-aws/issues/6427)) +* resource/aws_codebuild_project: Prevent `inconsistent final plan` errors with `source` configuration block ([#10615](https://github.com/terraform-providers/terraform-provider-aws/issues/10615)) +* resource/aws_ecs_task_definition: Ensure `efs_volume_configuration` changes are properly detected ([#12571](https://github.com/terraform-providers/terraform-provider-aws/issues/12571)] / [[#12751](https://github.com/terraform-providers/terraform-provider-aws/issues/12751)) +* resource/aws_lb_cookie_stickiness_policy: `cookie_expiration_policy` now properly set ([#13418](https://github.com/terraform-providers/terraform-provider-aws/issues/13418)) +* resource/aws_lightsail_instance: `ram_size` now properly set ([#13430](https://github.com/terraform-providers/terraform-provider-aws/issues/13430)) +* resource/aws_load_balancer_backend_server_policy: `instance_port` now properly set ([#13418](https://github.com/terraform-providers/terraform-provider-aws/issues/13418)) +* resource/aws_load_balancer_listener_policy: `load_balancer_port` now properly set ([#13418](https://github.com/terraform-providers/terraform-provider-aws/issues/13418)) +* resource/aws_opsworks_application: `environment` `secure` now properly set ([#13435](https://github.com/terraform-providers/terraform-provider-aws/issues/13435)) +* resource/aws_security_group_rule: Correctly set `description` after state refresh when `source_security_group_id` refers to a security group across accounts ([#13364](https://github.com/terraform-providers/terraform-provider-aws/issues/13364)) +* resource/aws_ses_active_receipt_rule_set: Recreate resource when destroyed outside of Terraform ([#9086](https://github.com/terraform-providers/terraform-provider-aws/issues/9086)) +* resource/aws_ses_event_destination: Correctly refresh entire resource state (prevent unexpected differences from version 2.63.0 and properly perform drift detection) ([#13464](https://github.com/terraform-providers/terraform-provider-aws/issues/13464)) +* resource/aws_ses_receipt_rule: Recreate resource when destroyed outside of Terraform ([#9086](https://github.com/terraform-providers/terraform-provider-aws/issues/9086)) +* resource/aws_sns_topic: Attributes of type `schema.TypeInt` are now correctly set ([#13437](https://github.com/terraform-providers/terraform-provider-aws/issues/13437)) + +## 2.63.0 (May 22, 2020) + +FEATURES: + +* **New Data Source:** `aws_efs_access_point` ([#11965](https://github.com/terraform-providers/terraform-provider-aws/issues/11965)) +* **New Data Source:** `aws_wafv2_ip_set` ([#12788](https://github.com/terraform-providers/terraform-provider-aws/issues/12788)) +* **New Data Source:** `aws_wafv2_regex_pattern_set` ([#12789](https://github.com/terraform-providers/terraform-provider-aws/issues/12789)) +* **New Resource:** `aws_efs_access_point` ([#11965](https://github.com/terraform-providers/terraform-provider-aws/issues/11965)) +* **New Resource:** `aws_efs_file_system_policy` ([#11960](https://github.com/terraform-providers/terraform-provider-aws/issues/11960)) +* **New Resource:** `aws_wafv2_ip_set` ([#12119](https://github.com/terraform-providers/terraform-provider-aws/issues/12119)) +* **New Resource:** `aws_wafv2_regex_pattern_set` ([#12284](https://github.com/terraform-providers/terraform-provider-aws/issues/12284)) + +ENHANCEMENTS: + +* resource/aws_ssm_document: Add `document_version` attribute ([#13438](https://github.com/terraform-providers/terraform-provider-aws/issues/13438)) +* data-source/aws_ram_resource_share: Add `owning_account_id` attribute ([#13402](https://github.com/terraform-providers/terraform-provider-aws/issues/13402)) +* data-source/aws_lb: Add `ip_address_type` attribute ([#13400](https://github.com/terraform-providers/terraform-provider-aws/issues/13400)) +* data-source/aws_lb_target_group: Add `load_balancing_algorithm_type` attribute ([#13400](https://github.com/terraform-providers/terraform-provider-aws/issues/13400)) +* data-source/aws_rds_cluster: `backtrack_window` attribute now available ([#13362](https://github.com/terraform-providers/terraform-provider-aws/issues/13362)) +* resource/aws_codebuild_webhook: Support `COMMIT_MESSAGE` value in filter types ([#13436](https://github.com/terraform-providers/terraform-provider-aws/issues/13436)) +* resource/aws_cognito_identity_pool_roles_attachment: Add import support ([#13440](https://github.com/terraform-providers/terraform-provider-aws/issues/13440)) +* resource/aws_ecs_service: Add `force_new_deployment` argument ([#13376](https://github.com/terraform-providers/terraform-provider-aws/issues/13376)) +* resource/aws_ecs_service: Support in-place updates for `ordered_placement_strategy` and `placement_constraints` ([#13376](https://github.com/terraform-providers/terraform-provider-aws/issues/13376)) +* resource/aws_eks_node_group: Add `force_update_version` argument ([#13414](https://github.com/terraform-providers/terraform-provider-aws/issues/13414)) +* resource/aws_glue_connection: Add `arn` argument ([#13404](https://github.com/terraform-providers/terraform-provider-aws/issues/13404)) +* resource/aws_iot_topic_rule: Add `tags` argument ([#13293](https://github.com/terraform-providers/terraform-provider-aws/issues/13293)) + +BUG FIXES: + +* resource/aws_ssm_activation: `expired` now properly set ([#13438](https://github.com/terraform-providers/terraform-provider-aws/issues/13438)) +* resource/aws_redshift_security_group: The resource is now importable ([#13431](https://github.com/terraform-providers/terraform-provider-aws/issues/13431)) +* resource/cloudwatch_log_metric_filter: `metric_transformation` `default_value` now properly set ([#13411](https://github.com/terraform-providers/terraform-provider-aws/issues/13411)) +* data-source/aws_db_instance: `auto_minor_version_upgrade` attribute now properly set ([#13362](https://github.com/terraform-providers/terraform-provider-aws/issues/13362)) +* resource/aws_autoscaling_group: `tags` `propagate_at_launch` attribute now properly set ([#13360](https://github.com/terraform-providers/terraform-provider-aws/issues/13360)) +* resource/aws_eks_node_group: Only pass `release_version` value during `UpdateNodegroupVersion` if changed ([#13407](https://github.com/terraform-providers/terraform-provider-aws/issues/13407)) +* resource/aws_network_acl: Fix issue with updating subnet associations returning `InvalidAssociationID.NotFound` ([#13382](https://github.com/terraform-providers/terraform-provider-aws/issues/13382)) + +## 2.62.0 (May 15, 2020) + +FEATURES: + +* **New Resource:** `aws_workspaces_workspace` ([#11608](https://github.com/terraform-providers/terraform-provider-aws/issues/11608)) + +ENHANCEMENTS: + +* resource/aws_appsync_resolver: Add `cache_config` configuration block ([#12747](https://github.com/terraform-providers/terraform-provider-aws/issues/12747)) +* resource/aws_codebuild_project: Support `git_submodules_config` with `GITHUB` and `GITHUB_ENTERPRISE` source types ([#13285](https://github.com/terraform-providers/terraform-provider-aws/issues/13285)) +* resource/aws_codebuild_project: Support `SECRETS_MANAGER` environment variable type ([#12572](https://github.com/terraform-providers/terraform-provider-aws/issues/12572)) +* resource/aws_datasync_task: Support `ONLY_FILES_TRANSFERRED` value in `verify_mode` argument ([#12897](https://github.com/terraform-providers/terraform-provider-aws/issues/12897)) +* resource/aws_iot_topic_rule: Add `dynamodbv2` configuration block ([#7469](https://github.com/terraform-providers/terraform-provider-aws/issues/7469)) +* resource/aws_iot_topic_rule: Add `iot_analytics` configuration block ([#9859](https://github.com/terraform-providers/terraform-provider-aws/issues/9859)) +* resource/aws_iot_topic_rule: Add `iot_events` configuration block ([#9890](https://github.com/terraform-providers/terraform-provider-aws/issues/9890)) +* resource/aws_iot_topic_rule: Add `operation` argument to `dynamodb` configuration block ([#12714](https://github.com/terraform-providers/terraform-provider-aws/issues/12714)) +* resource/aws_iot_topic_rule: Add `qos` argument `republish` configuration block ([#12869](https://github.com/terraform-providers/terraform-provider-aws/issues/12869)) + +BUG FIXES: + +* resource/aws_codebuild_project: Allow empty value (`""`) environment variables ([#11572](https://github.com/terraform-providers/terraform-provider-aws/issues/11572)) +* resource/aws_security_group_rule: Prevent recreation when `source_security_group_id` refers to a security group across accounts ([#11809](https://github.com/terraform-providers/terraform-provider-aws/issues/11809)) + +## 2.61.0 (May 08, 2020) + +FEATURES: + +* **New Data Source:** `aws_ec2_coip_pool` ([#12852](https://github.com/terraform-providers/terraform-provider-aws/issues/12852)) +* **New Data Source:** `aws_ec2_coip_pools` ([#12852](https://github.com/terraform-providers/terraform-provider-aws/issues/12852)) +* **New Data Source:** `aws_ec2_local_gateway` ([#12764](https://github.com/terraform-providers/terraform-provider-aws/issues/12764)) +* **New Data Source:** `aws_ec2_local_gateways` ([#12764](https://github.com/terraform-providers/terraform-provider-aws/issues/12764)) +* **New Data Source:** `aws_ec2_local_gateway_route_table` ([#13002](https://github.com/terraform-providers/terraform-provider-aws/issues/13002)) +* **New Data Source:** `aws_ec2_local_gateway_route_tables` ([#13002](https://github.com/terraform-providers/terraform-provider-aws/issues/13002)) +* **New Resource:** `aws_ec2_transit_gateway_peering_attachment_accepter` ([#11185](https://github.com/terraform-providers/terraform-provider-aws/issues/11185)) + +ENHANCEMENTS: + +* data-source/aws_ebs_volume: Add `multi_attach_enabled` attribute ([#13108](https://github.com/terraform-providers/terraform-provider-aws/issues/13108)) +* data-source/aws_efs_file_system: Add `size_in_bytes` attribute ([#13125](https://github.com/terraform-providers/terraform-provider-aws/issues/13125)) +* data-source/aws_eip: Add `customer_owned_ip` and `customer_owned_ipv4_pool` attributes ([#12862](https://github.com/terraform-providers/terraform-provider-aws/issues/12862)) +* data-source/aws_launch_template: add `partition_number` attribute ([#11655](https://github.com/terraform-providers/terraform-provider-aws/issues/11655)) +* resource/aws_api_gateway_deployment: Add `triggers` argument ([#13054](https://github.com/terraform-providers/terraform-provider-aws/issues/13054)) +* resource/aws_apigatewayv2_deployment: Add `triggers` argument ([#13055](https://github.com/terraform-providers/terraform-provider-aws/issues/13055)) +* resource/aws_ebs_volume: Add `multi_attach_enabled` attribute ([#13108](https://github.com/terraform-providers/terraform-provider-aws/issues/13108)) +* resource/aws_eip: Add `customer_owned_ip` attribute and `customer_owned_ipv4_pool` argument ([#12862](https://github.com/terraform-providers/terraform-provider-aws/issues/12862)) +* resource/aws_glue_connection: Support `KAFKA` for `connection_type` argument ([#13141](https://github.com/terraform-providers/terraform-provider-aws/issues/13141)) +* resource/aws_launch_template: add `partition_number` attribute ([#11655](https://github.com/terraform-providers/terraform-provider-aws/issues/11655)) +* resource/aws_launch_template: add `plan time validation to `volume_type`, `spot_instance_type`, `ipv6_addresses`, `ipv4_addresses`, `private_ip_address` ([#11655](https://github.com/terraform-providers/terraform-provider-aws/issues/11655)) +* resource/aws_workspaces_directory: Add output attributes for `workspace_security_group_id`, `iam_role_id`, `registration_code`, `directory_name`, `directory_type`, `customer_user_name`, `alias`, `ip_group_ids` and `dns_ip_addresses` ([#13089](https://github.com/terraform-providers/terraform-provider-aws/issues/13089)) + +BUG FIXES: + +* resource/aws_workspaces_directory: Fixes error when removing tags ([#13089](https://github.com/terraform-providers/terraform-provider-aws/issues/13089)) + +## 2.60.0 (May 01, 2020) + +NOTES: + +* provider: Region validation now automatically supports the new `eu-south-1` (Europe (Milan)) region. For AWS operations to work in the new region, the region must be explicitly enabled as outlined in the [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). When the region is not enabled, the Terraform AWS Provider will return errors during credential validation (e.g. `error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid`) or AWS operations will throw their own errors (e.g. `data.aws_availability_zones.current: Error fetching Availability Zones: AuthFailure: AWS was not able to validate the provided access credentials`). ([#12970](https://github.com/terraform-providers/terraform-provider-aws/issues/12970)) +* provider: Ignore tags functionality across all data sources and resources (except `aws_autoscaling_group`) via the provider-level `ignore_tags` configuration block has been enabled and this functionality is no longer considered in preview. ([#13039](https://github.com/terraform-providers/terraform-provider-aws/issues/13039)) + +FEATURES: + +* **New Data Source:** `aws_backup_plan` ([#13035](https://github.com/terraform-providers/terraform-provider-aws/issues/13035)) +* **New Data Source:** `aws_backup_selection` ([#13035](https://github.com/terraform-providers/terraform-provider-aws/issues/13035)) +* **New Data Source:** `aws_backup_vault` ([#13035](https://github.com/terraform-providers/terraform-provider-aws/issues/13035)) +* **New Data Source:** `aws_ec2_transit_gateway_peering_attachment` ([#11162](https://github.com/terraform-providers/terraform-provider-aws/issues/11162)) +* **New Resource:** `aws_ec2_transit_gateway_peering_attachment` ([#11162](https://github.com/terraform-providers/terraform-provider-aws/issues/11162)) +* **New Resource:** `aws_guardduty_organization_admin_account` ([#13034](https://github.com/terraform-providers/terraform-provider-aws/issues/13034)) +* **New Resource:** `aws_guardduty_organization_configuration` ([#13034](https://github.com/terraform-providers/terraform-provider-aws/issues/13034)) + +ENHANCEMENTS: + +* data-source/aws_cloudtrail_service_account: Support `eu-south-1` region ([#13061](https://github.com/terraform-providers/terraform-provider-aws/issues/13061)) +* data-source/aws_ebs_volume: Add `outpost_arn` attribute ([#12439](https://github.com/terraform-providers/terraform-provider-aws/issues/12439)) +* data-source/aws_elastic_beanstalk_hosted_zone: Support `eu-south-1` region ([#13061](https://github.com/terraform-providers/terraform-provider-aws/issues/13061)) +* data-source/aws_elb_hosted_zone_id: Add `us-gov-east-1` and `us-gov-west-1` region values ([#12976](https://github.com/terraform-providers/terraform-provider-aws/issues/12976)) +* data-source/aws_elb_hosted_zone_id: Support `eu-south-1` region ([#13061](https://github.com/terraform-providers/terraform-provider-aws/issues/13061)) +* data-source/aws_elb_service_account: Support `eu-south-1` region ([#13061](https://github.com/terraform-providers/terraform-provider-aws/issues/13061)) +* data-source/aws_instance: Add `outpost_arn` attribute ([#12330](https://github.com/terraform-providers/terraform-provider-aws/issues/12330)) +* data-source/aws_network_interface: Add `outpost_arn` attribute ([#12440](https://github.com/terraform-providers/terraform-provider-aws/issues/12440)) +* data-source/aws_s3_bucket: Support `eu-south-1` region for `hosted_zone_id` attribute ([#13061](https://github.com/terraform-providers/terraform-provider-aws/issues/13061)) +* data-source/aws_subnet: Add `outposts_arn` attribute ([#12097](https://github.com/terraform-providers/terraform-provider-aws/issues/12097)) +* provider: Support automatic region validation for `eu-south-1` ([#12970](https://github.com/terraform-providers/terraform-provider-aws/issues/12970)) +* provider: Implement ignore tags functionality across all data sources and resources (except `aws_autoscaling_group`) ([#13039](https://github.com/terraform-providers/terraform-provider-aws/issues/13039)) +* resource/aws_api_gateway_stage: Ignore `NotFoundException` error on destroy ([#12826](https://github.com/terraform-providers/terraform-provider-aws/issues/12826)) +* resource/aws_db_snapshot: Support import ([#12978](https://github.com/terraform-providers/terraform-provider-aws/issues/12978)) +* resource/aws_default_route_table: Add plan-time validation to `cidr_block` and `ipv6_cidr_block` arguments ([#12858](https://github.com/terraform-providers/terraform-provider-aws/issues/12858)) +* resource/aws_default_route_table: Support import ([#13030](https://github.com/terraform-providers/terraform-provider-aws/issues/13030)) +* resource/aws_dms_endpoint: Add `kafka_settings` configuration block and `kafka` to `engine_name` argument validation ([#12835](https://github.com/terraform-providers/terraform-provider-aws/issues/12835)) +* resource/aws_ebs_volume: Add `outpost_arn` argument ([#12439](https://github.com/terraform-providers/terraform-provider-aws/issues/12439)) +* resource/aws_elasticsearch_domain: Support customizable update timeout ([#12916](https://github.com/terraform-providers/terraform-provider-aws/issues/12916)) +* resource/aws_glue_connection: Support `MONGODB` for `connection_type` argument ([#13011](https://github.com/terraform-providers/terraform-provider-aws/issues/13011)) +* resource/aws_key_pair: Support tag-on-create ([#12962](https://github.com/terraform-providers/terraform-provider-aws/issues/12962)) +* resource/aws_instance: Add `outpost_arn` attribute ([#12330](https://github.com/terraform-providers/terraform-provider-aws/issues/12330)) +* resource/aws_mq_broker: Support import ([#11841](https://github.com/terraform-providers/terraform-provider-aws/issues/11841)) +* resource/aws_network_interface: Add `outpost_arn` attribute ([#12440](https://github.com/terraform-providers/terraform-provider-aws/issues/12440)) +* resource/aws_placement_group: Support tag-on-create ([#12963](https://github.com/terraform-providers/terraform-provider-aws/issues/12963)) +* resource/aws_route_table: Add plan-time validation to `cidr_block` and `ipv6_cidr_block` arguments ([#12858](https://github.com/terraform-providers/terraform-provider-aws/issues/12858)) +* resource/aws_route53_health_check: Support plan-time validation for `reference_name` argument ([#12873](https://github.com/terraform-providers/terraform-provider-aws/issues/12873)) +* resource/aws_s3_bucket: Support `eu-south-1` region for `hosted_zone_id` attribute ([#13061](https://github.com/terraform-providers/terraform-provider-aws/issues/13061)) +* resource/aws_spot_fleet_request: Add `launch_template_config` configuration block (Support EC2 Launch Templates) ([#12732](https://github.com/terraform-providers/terraform-provider-aws/issues/12732)) +* resource/aws_spot_fleet_request: Support import ([#12767](https://github.com/terraform-providers/terraform-provider-aws/issues/12767)) +* resource/aws_storagegateway_gateway: Add `gateway_vpc_endpoint` argument ([#9966](https://github.com/terraform-providers/terraform-provider-aws/issues/9966)) +* resource/aws_storagegateway_smb_file_share: Add `path` attribute ([#12623](https://github.com/terraform-providers/terraform-provider-aws/issues/12623)) +* resource/aws_subnet: Add `outposts_arn` argument ([#12097](https://github.com/terraform-providers/terraform-provider-aws/issues/12097)) +* resource/aws_wafregional_xss_match_set: Add plan-time validation for `xss_match_tuple` configuration block arguments ([#13024](https://github.com/terraform-providers/terraform-provider-aws/issues/13024)) + +BUG FIXES: + +* data-source/aws_api_gateway_rest_api: Prevent error with VPC Endpoint configured APIs ([#12825](https://github.com/terraform-providers/terraform-provider-aws/issues/12825)) +* resource/aws_appautoscaling_scheduled_action: Prevent error on refresh with multiple resources using the same scheduled action name ([#12699](https://github.com/terraform-providers/terraform-provider-aws/issues/12699)) +* resource/aws_batch_job_queue: Prevent panic when `ComputeEnvironmentOrder` is updated outside Terraform ([#12632](https://github.com/terraform-providers/terraform-provider-aws/issues/12632)) +* resource/aws_default_route_table: Proper tag on resource creation ([#12858](https://github.com/terraform-providers/terraform-provider-aws/issues/12858)) +* resource/aws_efs_file_system: Prevent panic with empty `lifecycle_policy` configuration block ([#12640](https://github.com/terraform-providers/terraform-provider-aws/issues/12640)) +* resource/aws_fsx_windows_file_system: Prevent panic when update includes `self_managed_active_directory` settings ([#12630](https://github.com/terraform-providers/terraform-provider-aws/issues/12630)) +* resource/aws_glue_catalog_table: Prevent various panics with empty configuration blocks ([#12611](https://github.com/terraform-providers/terraform-provider-aws/issues/12611)) +* resource/aws_kinesis_firehose_delivery_stream: Prevent panic with empty `processing_configuration` configuration block ([#12613](https://github.com/terraform-providers/terraform-provider-aws/issues/12613)) +* resource/aws_kms_external_key: Prevent `MalformedPolicyDocumentException` errors on creation by retrying for up to 2 minutes to wait for IAM change propagation ([#12863](https://github.com/terraform-providers/terraform-provider-aws/issues/12863)) +* resource/aws_kms_key: Prevent `MalformedPolicyDocumentException` errors on creation by retrying for up to 2 minutes to wait for IAM change propagation ([#12863](https://github.com/terraform-providers/terraform-provider-aws/issues/12863)) +* resource/aws_lb_listener: Prevent panics on creation and refresh when API throttled ([#12617](https://github.com/terraform-providers/terraform-provider-aws/issues/12617)) +* resource/aws_route53_zone: Prevent panic with APIs missing `ChangeInfo` during creation (best effort fix for LocalStack) ([#12634](https://github.com/terraform-providers/terraform-provider-aws/issues/12634)) +* resource/aws_storagegateway_gateway: Perform multiple connectivity checks after activation to wait if the underlying server (e.g. EC2 Instance) is automatically rebooted ([#12772](https://github.com/terraform-providers/terraform-provider-aws/issues/12772)) +* resource/aws_storagegateway_gateway: Retry 504 status code on activation ([#12773](https://github.com/terraform-providers/terraform-provider-aws/issues/12773)) +* resource/aws_wafregional_xss_match_set: Prevent crash with `xss_match_tuple` configuration block since version 2.59.0 ([#13024](https://github.com/terraform-providers/terraform-provider-aws/issues/13024)) + +## 2.59.0 (April 23, 2020) + +NOTES: + +* provider: Region validation now automatically supports the new `af-south-1` (Africa (Cape Town)) region. For AWS operations to work in the new region, the region must be explicitly enabled as outlined in the [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). When the region is not enabled, the Terraform AWS Provider will return errors during credential validation (e.g. `error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid`) or AWS operations will throw their own errors (e.g. `data.aws_availability_zones.current: Error fetching Availability Zones: AuthFailure: AWS was not able to validate the provided access credentials`). ([#12715](https://github.com/terraform-providers/terraform-provider-aws/issues/12715)) +* resource/aws_iam_user: The additional `force_destroy` behavior for handling signing certificates requires two additional IAM permissions (`iam:ListSigningCertificates` and `iam:DeleteSigningCertificate`). Restrictive IAM permissions for Terraform runs may require updates. ([#10542](https://github.com/terraform-providers/terraform-provider-aws/issues/10542)) +* resource/aws_rds_cluster: Due to recent API support for Aurora MySQL 5.7 and PostgreSQL Global Clusters which implemented the engine mode as `provisioned` instead of the previous `global` for Aurora MySQL 5.6, the resource now requires the `DescribeGlobalClusters` API call. Restrictive IAM permissions may require updates. ([#12867](https://github.com/terraform-providers/terraform-provider-aws/issues/12867)) + +FEATURES: + +* **New Resource:** `aws_apigatewayv2_api_mapping` ([#9461](https://github.com/terraform-providers/terraform-provider-aws/issues/9461)) +* **New Resource:** `aws_apigatewayv2_vpc_link` ([#12577](https://github.com/terraform-providers/terraform-provider-aws/issues/12577)) + +ENHANCEMENTS: + +* data_source/aws_acm_certificate: Add `tags` output ([#11659](https://github.com/terraform-providers/terraform-provider-aws/issues/11659)) +* data-source/aws_cloudtrail_service_account: Support `af-south-1` region ([#12967](https://github.com/terraform-providers/terraform-provider-aws/issues/12967)) +* data-source/aws_elastic_beanstalk_hosted_zone: Support `af-south-1` region ([#12967](https://github.com/terraform-providers/terraform-provider-aws/issues/12967)) +* data-source/aws_elb_hosted_zone_id: Support `af-south-1` region ([#12967](https://github.com/terraform-providers/terraform-provider-aws/issues/12967)) +* data-source/aws_elb_service_account: Support `af-south-1` region ([#12967](https://github.com/terraform-providers/terraform-provider-aws/issues/12967)) +* data-source/aws_s3_bucket: Support `af-south-1` region for `hosted_zone_id` attribute ([#12967](https://github.com/terraform-providers/terraform-provider-aws/issues/12967)) +* provider: Support automatic region validation for `af-south-1` ([#12715](https://github.com/terraform-providers/terraform-provider-aws/issues/12715)) +* resource/aws_apigatewayv2_api: Add `cors_configuration`, `credentials_arn`, `route_key` and `target` attributes ([#12452](https://github.com/terraform-providers/terraform-provider-aws/issues/12452)) +* resource/aws_appsync_graphql_api: Add `log_config` configuration block `exclude_verbose_content` argument ([#12884](https://github.com/terraform-providers/terraform-provider-aws/issues/12884)) +* resource/aws_config_configuration_recorder: Prevent error during deletion operation when resource is missing ([#12734](https://github.com/terraform-providers/terraform-provider-aws/issues/12734)) +* resource/aws_default_network_acl: Support import ([#12924](https://github.com/terraform-providers/terraform-provider-aws/issues/12924)) +* resource/aws_lambda_alias: Suppress differences for equivalent `function_name` argument values of name versus ARN ([#12902](https://github.com/terraform-providers/terraform-provider-aws/issues/12902)) +* resource/aws_network_acl_rule: Support import ([#12921](https://github.com/terraform-providers/terraform-provider-aws/issues/12921)) +* resource/aws_route: Add plan-time validation for `destination_cidr_block` and `destination_ipv6_cidr_block` arguments ([#12890](https://github.com/terraform-providers/terraform-provider-aws/issues/12890)) +* resource/aws_s3_bucket: Support `af-south-1` region for `hosted_zone_id` attribute ([#12967](https://github.com/terraform-providers/terraform-provider-aws/issues/12967)) +* resource/aws_service_discovery_private_dns_namespace: Support import ([#12929](https://github.com/terraform-providers/terraform-provider-aws/issues/12929)) +* resource/aws_ssm_activation: Support import ([#12933](https://github.com/terraform-providers/terraform-provider-aws/issues/12933)) +* resource/aws_ssm_maintenance_window_target: Add plan-time validation to `resource_type` argument ([#11783](https://github.com/terraform-providers/terraform-provider-aws/issues/11783)) +* resource/aws_ssm_maintenance_window_target: Support import ([#12935](https://github.com/terraform-providers/terraform-provider-aws/issues/12935)) +* resource/aws_volume_attachment: Support import ([#12948](https://github.com/terraform-providers/terraform-provider-aws/issues/12948)) +* resource/aws_waf_ipset: Add plan-time validation for `ip_set_descriptors` configuration block arguments ([#12775](https://github.com/terraform-providers/terraform-provider-aws/issues/12775)) +* resource/aws_waf_sql_injection_match_set: Support import ([#11657](https://github.com/terraform-providers/terraform-provider-aws/issues/11657)) +* resource/aws_waf_xss_match_set: Add plan-time validation for `xss_match_tuples` configuration block arguments ([#12777](https://github.com/terraform-providers/terraform-provider-aws/issues/12777)) +* resource/aws_wafregional_web_acl: Add plan-time validation to various arguments ([#12793](https://github.com/terraform-providers/terraform-provider-aws/issues/12793)) + +BUG FIXES: + +* data-source/aws_launch_template: Prevent type error with `network_interfaces` `associate_public_ip_address` attribute ([#12936](https://github.com/terraform-providers/terraform-provider-aws/issues/12936)) +* resource/aws_glue_security_configuration: Prevent empty string KMS Key ARN in S3 Encryption settings ([#12898](https://github.com/terraform-providers/terraform-provider-aws/issues/12898)) +* resource/aws_iam_user: Ensure `force_destroy` argument removes signing certificates when enabled ([#10542](https://github.com/terraform-providers/terraform-provider-aws/issues/10542)) +* resource/aws_rds_cluster: Prevent unexpected `global_cluster_identifier` differences and deletion error with `aurora-mysql` and `aurora-postgresql` Global Cluster members ([#12867](https://github.com/terraform-providers/terraform-provider-aws/issues/12867)) +* resource/aws_route: Prevent not found after creation error with `destination_ipv6_cidr_block` set to `::0/0` ([#12890](https://github.com/terraform-providers/terraform-provider-aws/issues/12890)) + +## 2.58.0 (April 16, 2020) + +FEATURES: + +* **New Data Source:** `aws_regions` ([#12269](https://github.com/terraform-providers/terraform-provider-aws/issues/12269)) +* **New Resource:** `aws_apigatewayv2_deployment` ([#9245](https://github.com/terraform-providers/terraform-provider-aws/issues/9245)) +* **New Resource:** `aws_apigatewayv2_domain_name` ([#9391](https://github.com/terraform-providers/terraform-provider-aws/issues/9391)) +* **New Resource:** `aws_apigatewayv2_integration_response` ([#9365](https://github.com/terraform-providers/terraform-provider-aws/issues/9365)) +* **New Resource:** `aws_apigatewayv2_route` ([#8881](https://github.com/terraform-providers/terraform-provider-aws/issues/8881)) +* **New Resource:** `aws_apigatewayv2_route_response` ([#9373](https://github.com/terraform-providers/terraform-provider-aws/issues/9373)) +* **New Resource:** `aws_apigatewayv2_stage` ([#9232](https://github.com/terraform-providers/terraform-provider-aws/issues/9232)) +* **New Resource:** `aws_dms_event_subscription` ([#7170](https://github.com/terraform-providers/terraform-provider-aws/issues/7170)) + +ENHANCEMENTS: + +* data-source/aws_dynamodb_table: Add `replica` attribute (initial support for Global Tables V2 (version 2019.11.21)) ([#12342](https://github.com/terraform-providers/terraform-provider-aws/issues/12342)) +* data-source/aws_instance: Exports `volume_name` for `root_block_device` ([#12620](https://github.com/terraform-providers/terraform-provider-aws/issues/12620)) +* resource/aws_backup_plan: Add `rule` configuration block `copy_action` configuration block (support cross region copy) ([#11923](https://github.com/terraform-providers/terraform-provider-aws/issues/11923)) +* resource/aws_cognito_identity_provider: Support plan-time validation for `idp_identifiers`, `provider_name`, and `provider_type` arguments ([#10705](https://github.com/terraform-providers/terraform-provider-aws/issues/10705)) +* resource/aws_dms_endpoint: Add `elasticsearch_settings` configuration block and `elasticsearch` to `engine_name` validation (support Elasticsearch endpoints) ([#11792](https://github.com/terraform-providers/terraform-provider-aws/issues/11792)) +* resource/aws_dms_endpoint: Add `kinesis_settings` configuration block and `kinesis` to `engine_name` validation (support Kinesis endpoints) ([#8633](https://github.com/terraform-providers/terraform-provider-aws/issues/8633)) +* resource/aws_dynamodb_table: Add `replica` configuration block (initial support for Global Tables V2 (version 2019.11.21)) ([#12342](https://github.com/terraform-providers/terraform-provider-aws/issues/12342)) +* resource/aws_ec2_client_vpn_endpoint: Allow two `authentication_options` configuration blocks ([#12819](https://github.com/terraform-providers/terraform-provider-aws/issues/12819)) +* resource/aws_instance: Allow changing root volume size without re-creating resource ([#12620](https://github.com/terraform-providers/terraform-provider-aws/issues/12620)) +* resource/aws_instance: Exports `volume_name` for `root_block_device` ([#12620](https://github.com/terraform-providers/terraform-provider-aws/issues/12620)) + +BUG FIXES: + +* resource/aws_dlm_lifecycle_policy: Ensure plan-time validation for `times` argument only allows 24 hour format ([#12800](https://github.com/terraform-providers/terraform-provider-aws/issues/12800)) + +## 2.57.0 (April 09, 2020) + +BREAKING CHANGES: + +* provider: The configuration for the preview ignore tags functionality has been updated to include a wrapping configuration block. For example: + +```hcl +provider "aws" { + ignore_tags { + keys = ["TagKey1"] + } +} +``` + +FEATURES: + +* **New Data Source:** `aws_cloudfront_distribution` ([#6468](https://github.com/terraform-providers/terraform-provider-aws/issues/6468)) +* **New Resource:** `aws_apigatewayv2_authorizer` ([#9228](https://github.com/terraform-providers/terraform-provider-aws/issues/9228)) +* **New Resource:** `aws_apigatewayv2_integration` ([#8949](https://github.com/terraform-providers/terraform-provider-aws/issues/8949)) +* **New Resource:** `aws_apigatewayv2_model` ([#8912](https://github.com/terraform-providers/terraform-provider-aws/issues/8912)) + +ENHANCEMENTS: + +* data-source/aws_lambda_layer_version: Support plan-time validation for `compatible_runtime` argument `dotnetcore3.1` value (support .NET Core 3.1) ([#12712](https://github.com/terraform-providers/terraform-provider-aws/issues/12712)) +* resource/aws_cloudhsm_v2_cluster: Support tag-on-create ([#11683](https://github.com/terraform-providers/terraform-provider-aws/issues/11683)) +* resource/aws_docdb_cluster: Add `deletion_protection` argument ([#12650](https://github.com/terraform-providers/terraform-provider-aws/issues/12650)) +* resource/aws_egress_only_internet_gateway: Add `tags` argument ([#11568](https://github.com/terraform-providers/terraform-provider-aws/issues/11568)) +* resource/aws_lambda_function: Support plan-time validation for `runtime` argument `dotnetcore3.1` value (support .NET Core 3.1) ([#12712](https://github.com/terraform-providers/terraform-provider-aws/issues/12712)) +* resource/aws_lambda_layer_version: Support plan-time validation for `compatible_runtimes` argument `dotnetcore3.1` value (support .NET Core 3.1) ([#12712](https://github.com/terraform-providers/terraform-provider-aws/issues/12712)) +* resource/aws_rds_global_cluster: Add `aurora-postgresql` to `engine` argument plan-time validation ([#12401](https://github.com/terraform-providers/terraform-provider-aws/issues/12401)) +* resource/aws_redshift_snapshot_copy_grant: Support resource import ([#10350](https://github.com/terraform-providers/terraform-provider-aws/issues/10350)) +* resource/aws_spot_fleet_request: Add `tags` argument (support tagging of Spot Fleet Request itself) ([#12295](https://github.com/terraform-providers/terraform-provider-aws/issues/12295)) +* resource/aws_spot_fleet_request: Support plan-time validation for `launch_specification` configuration block `ebs_block_device` `volume_type`, `iam_instance_profile_arn`, `placement_tenancy`, and `root_block_device` `volume_type` arguments ([#12295](https://github.com/terraform-providers/terraform-provider-aws/issues/12295)) +* resource/aws_spot_fleet_request: Support plan-time validation for `allocation_strategy`, `instance_interruption_behaviour`, and `target_group_arns` arguments ([#12295](https://github.com/terraform-providers/terraform-provider-aws/issues/12295)) +* service/ec2: Prevent eventual consistency errors tagging resources on creation ([#12735](https://github.com/terraform-providers/terraform-provider-aws/issues/12735)) + +BUG FIXES: + +* resource/aws_appautoscaling_policy: Fix error when importing DynamoDB Table Index policy ([#11232](https://github.com/terraform-providers/terraform-provider-aws/issues/11232)) +* resource/aws_db_instance: Allow creating read replica into RAM shared Subnet with VPC Security Group ([#12700](https://github.com/terraform-providers/terraform-provider-aws/issues/12700)) +* resource/aws_kms_key: Prevent eventual consistency related errors on creation ([#12738](https://github.com/terraform-providers/terraform-provider-aws/issues/12738)) +* resource/aws_lb_target_group: Automatically propose resource recreation for TCP `protocol` Target Groups when `health_check` configuration block `interval`, `protocol`, or `timeout` argument values are updated ([#4568](https://github.com/terraform-providers/terraform-provider-aws/issues/4568)) + +## 2.56.0 (April 03, 2020) + +NOTES: + +* resource/aws_emr_cluster: The bug fix in this release will potentially re-create EMR Clusters with multiple bootstrap actions, since bootstrap actions cannot be modified in place. To avoid re-creation, temporarily add the [`ignore_changes` lifecycle configuration argument](https://www.terraform.io/docs/configuration/resources.html#ignore_changes) and/or update the order in your Terraform configuration. + +ENHANCEMENTS: + +* data-source/aws_launch_template: Add `hibernation_options` attribute ([#12492](https://github.com/terraform-providers/terraform-provider-aws/issues/12492)) +* resource/aws_codepipeline: Adds cross-region action support ([#12549](https://github.com/terraform-providers/terraform-provider-aws/issues/12549)) +* resource/aws_dx_connection: Support `2Gbps` and `5Gbps` values in plan-time validation for `bandwidth` argument ([#12559](https://github.com/terraform-providers/terraform-provider-aws/issues/12559)) +* resource/aws_dx_lag: Support `2Gbps` and `5Gbps` values in plan-time validation for `bandwidth` argument ([#12559](https://github.com/terraform-providers/terraform-provider-aws/issues/12559)) +* resource/aws_elastic_transcoder_preset: Support plan-time validation for `role` argument ([#12575](https://github.com/terraform-providers/terraform-provider-aws/issues/12575)) +* resource/aws_kms_grant: Support resource import ([#11991](https://github.com/terraform-providers/terraform-provider-aws/issues/11991)) +* resource/aws_launch_template: Add `hibernation_options` configuration block ([#12492](https://github.com/terraform-providers/terraform-provider-aws/issues/12492)) + +BUG FIXES: + +* resource/aws_codedeploy_deployment_group: Fix `blue_green_deployment_config` updates for ECS ([#11885](https://github.com/terraform-providers/terraform-provider-aws/issues/11885)) +* resource/aws_emr_cluster: Now properly sets the order when multiple bootstrap actions are defined +* resource/aws_kms_grant: Remove resource from Terraform state instead of error if removed outside Terraform ([#12560](https://github.com/terraform-providers/terraform-provider-aws/issues/12560)) +* resource/aws_s3_bucket: Prevent various panics with empty configuration blocks ([#12614](https://github.com/terraform-providers/terraform-provider-aws/issues/12614)) +* resource/aws_volume_attachment: Ensure any error is shown while waiting for volume to detach ([#12596](https://github.com/terraform-providers/terraform-provider-aws/issues/12596)) + +## 2.55.0 (March 27, 2020) + +FEATURES: + +* **New Resource:** `aws_ec2_availability_zone_group` ([#12400](https://github.com/terraform-providers/terraform-provider-aws/issues/12400)) + +ENHANCEMENTS: + +* data-source/aws_availability_zone: Add `all_availability_zones` and `filter` arguments ([#12400](https://github.com/terraform-providers/terraform-provider-aws/issues/12400)) +* data-source/aws_availability_zone: Add `group_name`, `network_border_group`, and `opt_in_status` attributes ([#12400](https://github.com/terraform-providers/terraform-provider-aws/issues/12400)) +* data-source/aws_availability_zones: Add `all_availability_zones` and `filter` arguments ([#12400](https://github.com/terraform-providers/terraform-provider-aws/issues/12400)) +* data-source/aws_availability_zones: Add `group_names` attribute ([#12400](https://github.com/terraform-providers/terraform-provider-aws/issues/12400)) +* data-source/aws_ec2_transit_gateway_dx_gateway_attachement: Add `filter` and `tags` arguments ([#12516](https://github.com/terraform-providers/terraform-provider-aws/issues/12516)) +* data-source/aws_ec2_transit_gateway_vpn_attachment: Add `filter` and `tags` arguments ([#12415](https://github.com/terraform-providers/terraform-provider-aws/issues/12415)) +* data-source/aws_instance: Add `metadata_options` attribute ([#12491](https://github.com/terraform-providers/terraform-provider-aws/issues/12491)) +* data-source/aws_launch_template: Add `filter` and `tags` arguments ([#12403](https://github.com/terraform-providers/terraform-provider-aws/issues/12403)) +* data-source/aws_launch_template: Add `metadata_options` attribute ([#12491](https://github.com/terraform-providers/terraform-provider-aws/issues/12491)) +* data-source/aws_prefix_list: Add `filter` argument ([#12416](https://github.com/terraform-providers/terraform-provider-aws/issues/12416)) +* data-source/aws_vpc_endpoint_service: Add `filter` and `tags` arguments ([#12404](https://github.com/terraform-providers/terraform-provider-aws/issues/12404)) +* resource/aws_athena_workgroup: Add `force_destroy` argument ([#12254](https://github.com/terraform-providers/terraform-provider-aws/issues/12254)) +* resource/aws_cloudwatch_log_metric_filter: Support resource import ([#11992](https://github.com/terraform-providers/terraform-provider-aws/issues/11992)) +* resource/aws_flow_log: Add `max_aggregation_interval` argument ([#12483](https://github.com/terraform-providers/terraform-provider-aws/issues/12483)) +* resource/aws_instance: Add `metadata_options` configuration block (support IMDSv2) ([#12491](https://github.com/terraform-providers/terraform-provider-aws/issues/12491)) +* resource/aws_launch_template: Add `metadata_options` configuration block (support IMDSv2) ([#12491](https://github.com/terraform-providers/terraform-provider-aws/issues/12491)) +* resource/aws_msk_cluster: Add `logging_info` configuration block (support CloudWatch, Firehose, and S3 logging) ([#12215](https://github.com/terraform-providers/terraform-provider-aws/issues/12215)) +* resource/aws_mq_configuration: Support plan-time validation for `engine_type` argument ([#11843](https://github.com/terraform-providers/terraform-provider-aws/issues/11843)) +* resource/aws_route53_health_check: A dd plan-time validation to `insufficient_data_health_status` ([#12305](https://github.com/terraform-providers/terraform-provider-aws/issues/12305)) +* resource/aws_storagegateway_nfs_file_share: Add `path` attribute ([#12530](https://github.com/terraform-providers/terraform-provider-aws/issues/12530)) + +BUG FIXES: + +* resource/aws_db_instance: Allow restoring from snapshot into RAM shared Subnet with VPC Security Group ([#12447](https://github.com/terraform-providers/terraform-provider-aws/issues/12447)) +* resource/aws_mq_configuration: Remove extraneous `ListTags` API call during refresh ([#11843](https://github.com/terraform-providers/terraform-provider-aws/issues/11843)) +* resource/aws_neptune_cluster_instance: Add missing `configuring-log-exports` as allowed pending state ([#12079](https://github.com/terraform-providers/terraform-provider-aws/issues/12079)) +* resource/aws_route53_health_check: Do not recreate health check when using compressed ipv6 address ([#12305](https://github.com/terraform-providers/terraform-provider-aws/issues/12305)) + +## 2.54.0 (March 19, 2020) + +FEATURES: + +* **New Resource:** `aws_kinesis_video_stream` ([#8291](https://github.com/terraform-providers/terraform-provider-aws/issues/8291)) +* **New Resource:** `aws_securityhub_member` ([#6975](https://github.com/terraform-providers/terraform-provider-aws/issues/6975)) + +ENHANCEMENTS: + +* data-source/aws_iam_role: Add `tags` attribute ([#12349](https://github.com/terraform-providers/terraform-provider-aws/issues/12349)) +* data-source/aws_lb: Add `drop_invalid_header_fields` attribute ([#11257](https://github.com/terraform-providers/terraform-provider-aws/issues/11257)) +* provider: Support AWS shared configuration file `duration_seconds` setting for assume role ([#12359](https://github.com/terraform-providers/terraform-provider-aws/issues/12359)) +* resource/aws_backup_plan: Support resource import ([#12381](https://github.com/terraform-providers/terraform-provider-aws/issues/12381)) +* resource/aws_cognito_user_pool: Add `email_configuration` configuration block `from_email_address` argument ([#11607](https://github.com/terraform-providers/terraform-provider-aws/issues/11607)) +* resource/aws_cognito_user_pool: Add `username_configuration` configuration block (Support case insensitive usernames) ([#12317](https://github.com/terraform-providers/terraform-provider-aws/issues/12317)) +* resource/aws_cognito_user_pool_client: Add `analytics_configuration` configuration block (Support Pinpoint analytics) ([#11762](https://github.com/terraform-providers/terraform-provider-aws/issues/11762)) +* resource/aws_cognito_user_pool_client: Add `prevent_user_existence_errors` argument ([#11604](https://github.com/terraform-providers/terraform-provider-aws/issues/11604)) +* resource/aws_dlm_lifecycle_policy: Support plan-time validation for 1 hour schedules in `policy_details` `schedule` `create_rule` `interval` argument ([#12327](https://github.com/terraform-providers/terraform-provider-aws/issues/12327)) +* resource/aws_inspector_assessment_template: Add `tags` argument ([#12375](https://github.com/terraform-providers/terraform-provider-aws/issues/12375)) +* resource/aws_inspector_assessment_template: Support resource import ([#12375](https://github.com/terraform-providers/terraform-provider-aws/issues/12375)) +* resource/aws_lambda_function: Support plan-time validation for `handler` argument ([#12411](https://github.com/terraform-providers/terraform-provider-aws/issues/12411)) +* resource/aws_lb: Add `drop_invalid_header_fields` argument ([#11257](https://github.com/terraform-providers/terraform-provider-aws/issues/11257)) +* resource/aws_nat_gateway: Support tag-on-create ([#12347](https://github.com/terraform-providers/terraform-provider-aws/issues/12347)) +* resource/aws_opsworks_application: Support resource import ([#12383](https://github.com/terraform-providers/terraform-provider-aws/issues/12383)) +* resource/aws_opsworks_application: Add plan-time validation to `data_source_arn` and `data_source_type` arguments and `app_source` configuration block `type` argument ([#12383](https://github.com/terraform-providers/terraform-provider-aws/issues/12383)) +* resource/aws_opsworks_custom_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_ganglia_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_haproxy_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_java_app_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_memcached_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_mysql_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_nodejs_app_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_php_app_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_rails_app_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_opsworks_static_web_layer: Add `tags` argument, `arn` attribute, and plan-time validation to `custom_instance_profile_arn` argument ([#11667](https://github.com/terraform-providers/terraform-provider-aws/issues/11667)) +* resource/aws_vpc_dhcp_options_association: Support resource import ([#7252](https://github.com/terraform-providers/terraform-provider-aws/issues/7252)) + +BUG FIXES: + +* resource/aws_api_gateway_rest_api: Ignore ordering differences for `endpoint_configuration` configuration block `vpc_endpoint_ids` argument ([#12350](https://github.com/terraform-providers/terraform-provider-aws/issues/12350)) +* resource/aws_backup_selection: Automatically retry on additional IAM Role eventual consistency error ([#10687](https://github.com/terraform-providers/terraform-provider-aws/issues/10687)) +* resource/aws_backup_vault: Remove resource from Terraform state when deleted outside Terraform ([#11845](https://github.com/terraform-providers/terraform-provider-aws/issues/11845)) +* resource/aws_cognito_user_pool_client: Ignore ordering differences for `callback_urls`, `logout_urls`, and `supported_identity_providers` arguments ([#12388](https://github.com/terraform-providers/terraform-provider-aws/issues/12388)) +* resource/aws_ebs_snapshot_copy: Return API errors instead of panic if unable to read snapshot ([#12283](https://github.com/terraform-providers/terraform-provider-aws/issues/12283)) +* resource/aws_kinesis_stream: Ensure `kms_key_id` argument in-place updates complete successfully ([#12008](https://github.com/terraform-providers/terraform-provider-aws/issues/12008)) +* resource/aws_lambda_alias: Propose resource recreation for `function_name` argument updates ([#11170](https://github.com/terraform-providers/terraform-provider-aws/issues/11170)) +* resource/aws_opsworks_application: Mark `app_source` configuration block `ssh_key` argument as sensitive ([#11984](https://github.com/terraform-providers/terraform-provider-aws/issues/11984)) +* resource/aws_opsworks_stack: Mark `custom_cookbooks_source` configuration block `ssh_key` argument as sensitive ([#11984](https://github.com/terraform-providers/terraform-provider-aws/issues/11984)) +* resource/aws_s3_bucket: Retry `NoSuchBucket` error when setting tags during resource creation ([#12418](https://github.com/terraform-providers/terraform-provider-aws/issues/12418)) ## 2.53.0 (March 12, 2020) @@ -3201,7 +3656,7 @@ BUG FIXES: NOTES: -This release is happening outside the normal release schedule to accomodate a crash fix for the `aws_lb_target_group` resource. It appears an ELBv2 service update rolling out currently is the root cause. The potential for this crash has been present since the initial resource in Terraform 0.7.7 and all versions of the AWS provider up to v1.13.0. +This release is happening outside the normal release schedule to accommodate a crash fix for the `aws_lb_target_group` resource. It appears an ELBv2 service update rolling out currently is the root cause. The potential for this crash has been present since the initial resource in Terraform 0.7.7 and all versions of the AWS provider up to v1.13.0. FEATURES: @@ -3513,7 +3968,7 @@ BUG FIXES: * resource/aws_appautoscaling_policy: Support additional predefined metric types in validation [[#3122](https://github.com/terraform-providers/terraform-provider-aws/issues/3122)]] * resource/aws_dynamodb_table: Recognize changes in `non_key_attributes` ([#3136](https://github.com/terraform-providers/terraform-provider-aws/issues/3136)) * resource/aws_ebs_snapshot: Fix `kms_key_id` attribute handling ([#3085](https://github.com/terraform-providers/terraform-provider-aws/issues/3085)) -* resource/aws_eip_assocation: Retry association for pending instances ([#3072](https://github.com/terraform-providers/terraform-provider-aws/issues/3072)) +* resource/aws_eip_association: Retry association for pending instances ([#3072](https://github.com/terraform-providers/terraform-provider-aws/issues/3072)) * resource/aws_elastic_beanstalk_application: Prevent crash on reading missing application ([#3171](https://github.com/terraform-providers/terraform-provider-aws/issues/3171)) * resource/aws_kinesis_firehose_delivery_stream: Prevent panic on missing S3 configuration prefix ([#3073](https://github.com/terraform-providers/terraform-provider-aws/issues/3073)) * resource/aws_lambda_function: Retry updates for IAM eventual consistency ([#3116](https://github.com/terraform-providers/terraform-provider-aws/issues/3116)) diff --git a/GNUmakefile b/GNUmakefile index fa14c06fa14..bbb8e0b31c0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -54,10 +54,14 @@ docscheck: -allowed-resource-subcategories-file website/allowed-subcategories.txt \ -ignore-side-navigation-data-sources aws_alb,aws_alb_listener,aws_alb_target_group,aws_kms_secret \ -require-resource-subcategory + @misspell -error -source text CHANGELOG.md -lint: - @echo "==> Checking source code against linters..." +lint: golangci-lint awsproviderlint + +golangci-lint: @golangci-lint run ./$(PKG_NAME)/... + +awsproviderlint: @awsproviderlint \ -c 1 \ -AT001 \ @@ -66,10 +70,16 @@ lint: -AT006 \ -AT007 \ -AT008 \ + -AWSAT001 \ -AWSR001 \ + -AWSR002 \ -R002 \ + -R003 \ -R004 \ -R006 \ + -R007 \ + -R008 \ + -R009 \ -R012 \ -R013 \ -R014 \ @@ -78,6 +88,7 @@ lint: -S003 \ -S004 \ -S005 \ + -S006 \ -S007 \ -S008 \ -S009 \ @@ -89,8 +100,13 @@ lint: -S015 \ -S016 \ -S017 \ + -S018 \ -S019 \ + -S020 \ -S021 \ + -S022 \ + -S023 \ + -S024 \ -S025 \ -S026 \ -S027 \ @@ -101,9 +117,13 @@ lint: -S032 \ -S033 \ -S034 \ + -S035 \ + -S036 \ + -S037 \ -V002 \ -V003 \ -V004 \ + -V005 \ -V006 \ -V007 \ -V008 \ @@ -131,6 +151,9 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) endif @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) +website-link-check: + @scripts/markdown-link-check.sh + website-lint: @echo "==> Checking website against linters..." @misspell -error -source=text website/ || (echo; \ @@ -160,5 +183,5 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) endif @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) -.PHONY: build gen sweep test testacc fmt fmtcheck lint tools test-compile website website-lint website-lint-fix website-test depscheck docscheck +.PHONY: awsproviderlint build gen golangci-lint sweep test testacc fmt fmtcheck lint tools test-compile website website-link-check website-lint website-lint-fix website-test depscheck docscheck diff --git a/README.md b/README.md index fb6fcab76e3..95c58fa9378 100644 --- a/README.md +++ b/README.md @@ -1,82 +1,49 @@ -Terraform Provider for AWS -================== + + Terraform logo + -- Website: https://www.terraform.io -- [![Gitter chat](https://badges.gitter.im/hashicorp-terraform/Lobby.png)](https://gitter.im/hashicorp-terraform/Lobby) -- Mailing list: [Google Groups](http://groups.google.com/group/terraform-tool) +# Terraform Provider for AWS - +[![Build Status][travis-badge]][travis] +[![Forums][discuss-badge]][discuss] -Requirements ------------- +[travis-badge]: https://api.travis-ci.org/terraform-providers/terraform-provider-aws.svg?branch=master +[travis]: https://travis-ci.org/github/terraform-providers/terraform-provider-aws +[discuss-badge]: https://img.shields.io/badge/discuss-terraform--aws-623CE4.svg?style=flat +[discuss]: https://discuss.hashicorp.com/c/terraform-providers/tf-aws/ -- [Terraform](https://www.terraform.io/downloads.html) 0.10+ -- [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin) +- Website: [terraform.io](https://terraform.io) +- Tutorials: [learn.hashicorp.com](https://learn.hashicorp.com/terraform?track=getting-started#getting-started) +- Forum: [discuss.hashicorp.com](https://discuss.hashicorp.com/c/terraform-providers/tf-aws/) +- Chat: [gitter](https://gitter.im/hashicorp-terraform/Lobby) +- Mailing List: [Google Groups](http://groups.google.com/group/terraform-tool) -Developing the Provider ---------------------- +The Terraform AWS provider is a plugin for Terraform that allows for the full lifecycle management of AWS resources. +This provider is maintained internally by the HashiCorp AWS Provider team. -If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (please check the [requirements](https://github.com/terraform-providers/terraform-provider-aws#requirements) before proceeding). +Please note: We take Terraform's security and our users' trust very seriously. If you believe you have found a security issue in the Terraform AWS Provider, please responsibly disclose by contacting us at security@hashicorp.com. -*Note:* This project uses [Go Modules](https://blog.golang.org/using-go-modules) making it safe to work with it outside of your existing [GOPATH](http://golang.org/doc/code.html#GOPATH). The instructions that follow assume a directory in your home directory outside of the standard GOPATH (i.e `$HOME/development/terraform-providers/`). +## Quick Starts -Clone repository to: `$HOME/development/terraform-providers/` +- [Using the provider](https://www.terraform.io/docs/providers/aws/index.html) +- [Provider development](docs/DEVELOPMENT.md) -```sh -$ mkdir -p $HOME/development/terraform-providers/; cd $HOME/development/terraform-providers/ -$ git clone git@github.com:terraform-providers/terraform-provider-aws -... -``` +## Documentation -Enter the provider directory and run `make tools`. This will install the needed tools for the provider. +Full, comprehensive documentation is available on the Terraform website: -```sh -$ make tools -``` +https://terraform.io/docs/providers/aws/index.html -To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. +## Roadmap -```sh -$ make build -... -$ $GOPATH/bin/terraform-provider-aws -... -``` +Our roadmap for expanding support in Terraform for AWS resources can be found in our [Roadmap](ROADMAP.md) which is published quarterly. -Using the Provider ----------------------- +## Frequently Asked Questions -To use a released provider in your Terraform environment, run [`terraform init`](https://www.terraform.io/docs/commands/init.html) and Terraform will automatically install the provider. To specify a particular provider version when installing released providers, see the [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#version-provider-versions). +Responses to our most frequently asked questions can be found in our [FAQ](docs/FAQ.md ) -To instead use a custom-built provider in your Terraform environment (e.g. the provider binary from the build instructions above), follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-plugins) After placing the custom-built provider into your plugins directory, run `terraform init` to initialize it. +## Contributing -For either installation method, documentation about the provider specific configuration options can be found on the [provider's website](https://www.terraform.io/docs/providers/aws/index.html). - -Testing the Provider ---------------------------- - -In order to test the provider, you can run `make test`. - -*Note:* Make sure no `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` variables are set, and there's no `[default]` section in the AWS credentials file `~/.aws/credentials`. - -```sh -$ make test -``` - -In order to run the full suite of Acceptance tests, run `make testacc`. - -*Note:* Acceptance tests create real resources, and often cost money to run. Please read [Running an Acceptance Test](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#running-an-acceptance-test) in the contribution guidelines for more information on usage. - -```sh -$ make testacc -``` - -Contributing ---------------------------- - -Terraform is the work of thousands of contributors. We appreciate your help! - -To contribute, please read the contribution guidelines: [Contributing to Terraform - AWS Provider](.github/CONTRIBUTING.md) - -Issues on GitHub are intended to be related to bugs or feature requests with provider codebase. See https://www.terraform.io/docs/extend/community/index.html for a list of community resources to ask questions about Terraform. +The Terraform AWS Provider is the work of thousands of contributors. We appreciate your help! +To contribute, please read the contribution guidelines: [Contributing to Terraform - AWS Provider](docs/CONTRIBUTING.md) diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 00000000000..c65b2f7cd12 --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,94 @@ +# Q2 2020 Roadmap + +Each quarter the team will highlight areas of focus for our work and upcoming research. + +We select items for inclusion in the roadmap from the Top 10 Community Issues, [core services](docs/CORE_SERVICES.md), and internal priorities. When community pull requests exist for a given item, we will prioritize working with the original authors to include their contributions. If the author can no longer take on the implementation, HashiCorp will complete any additional work needed. + +Each weekly release will include necessary tasks that lead to the completion of the stated goals as well as community pull requests, enhancements, and features that are not highlighted in the roadmap. + +To make contribution easier, we’ll be using the [`Help Wanted`](https://github.com/terraform-providers/terraform-provider-aws/labels/help%20wanted) tag to point to issues we’d like to include in this quarter’s series of releases. + +This quarter (May-July ‘20) we will be prioritizing the following areas of work: + +## Currently In Progress + +### 3.0.0 + +Milestone: [v3.0.0](https://github.com/terraform-providers/terraform-provider-aws/milestone/70) + +Each year the TF AWS Provider team releases a major version. [Major releases](https://www.terraform.io/docs/extend/best-practices/versioning.html#example-major-number-increments) include code removals, deprecations, and breaking changes. A corresponding “upgrade guide” will be published alongside the release. + +We'll be updating the linked milestone as we work to finalize and complete v3.0.0. + +### WAFv2 + +Issue: [#11046](https://github.com/terraform-providers/terraform-provider-aws/issues/11046) + +_AWS WAFv2 is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to Amazon CloudFront, an Amazon API Gateway API, or an Application Load Balancer._ + +Support for WAFv2 functionality will be wholly separate from WAF “Classic”. We’ll focus on enabling community contributions to WAFv2 first. If there is not a community contribution, HashiCorp will work to add the missing resource or data source. + +Support for WAFv2 will include: + +#### Resources + +* aws_wafv2_ip_set +* aws_wafv2_regex_pattern_set +* aws_wafv2_rule_group +* aws_wafv2_web_acl +* aws_wafv2_web_acl_association + +#### Data Sources + +* aws_wafv2_ip_set +* aws_wafv2_regex_pattern_set +* aws_wafv2_rule_group +* aws_wafv2_web_acl + +### Amazon Lex + +Issue: [#905](https://github.com/terraform-providers/terraform-provider-aws/issues/905) + +_Amazon Lex is a service for building conversational interfaces into any application using voice and text. Amazon Lex provides the advanced deep learning functionalities of automatic speech recognition (ASR) for converting speech to text, and natural language understanding (NLU) to recognize the intent of the text, to enable you to build applications with highly engaging user experiences and lifelike conversational interactions._ + +We’ll focus on enabling community contributions to Lex first. If there is not a community contribution, HashiCorp will work to add the missing resource or data source. + +Support for Amazon Lex will include: + +#### Resources + +* aws_lex_slot_type +* aws_lex_intent +* aws_lex_bot +* aws_lex_bot_alias + +#### Data Sources + +* aws_lex_slot_type +* aws_lex_intent +* aws_lex_bot +* aws_lex_bot_alias + +### AWS Certificate Manager + +Issue: [#8531](https://github.com/terraform-providers/terraform-provider-aws/issues/8531) + +_AWS Certificate Manager is a service that allows you to easily provision, manage, and deploy public and private Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services and your internal connected resources._ + +After evaluating the issue linked above, we concluded that the ACM resource was in need of a redesign. We’ll be prioritizing redesigning and updating the resource while we tackle the open bug reports and enhancements. Our research and redesign work will be tracked [here](https://github.com/terraform-providers/terraform-provider-aws/issues/13053). + +## Research Topics + +Research topics include features, architectural changes, and ideas that we are pursuing in the longer term that may significantly impact the core user experience of the AWS provider. Research topics are discovery only and are not guaranteed to be included in a future release. + +### Global Default Tags + +Issue: [#7926](https://github.com/terraform-providers/terraform-provider-aws/issues/7926) + +We’ve been evaluating how users approach tagging their infrastructure in Terraform and the systems and practices that may interact with TF when it comes to tagging. The [initial discussions](https://github.com/hashicorp/terraform/issues/20866) led us to prioritize functionality that allows users to ignore specific tags globally in the AWS provider. As a complement to that feature, we are exploring the ability to supply global default tags to resources defined by the AWS Provider. + +We are interested in your thoughts and feedback about this proposal and encourage you to comment on the issue linked above or schedule time with @maryelizbeth via the link on her [GitHub profile](https://github.com/maryelizbeth) to discuss. + +## Disclosures + +The product-development initiatives in this document reflect HashiCorp's current plans and are subject to change and/or cancellation in HashiCorp's sole discretion. diff --git a/aws/autoscaling_tags.go b/aws/autoscaling_tags.go index ffc74eba9b2..91eecc5fbca 100644 --- a/aws/autoscaling_tags.go +++ b/aws/autoscaling_tags.go @@ -80,12 +80,12 @@ func setAutoscalingTags(conn *autoscaling.AutoScaling, d *schema.ResourceData) e removeTags = append(removeTags, r...) oraw, nraw = d.GetChange("tags") - old, err = autoscalingTagsFromList(oraw.([]interface{}), resourceID) + old, err = autoscalingTagsFromList(oraw.(*schema.Set).List(), resourceID) if err != nil { return err } - new, err = autoscalingTagsFromList(nraw.([]interface{}), resourceID) + new, err = autoscalingTagsFromList(nraw.(*schema.Set).List(), resourceID) if err != nil { return err } @@ -165,7 +165,7 @@ func autoscalingTagsFromList(vs []interface{}, resourceID string) ([]*autoscalin result := make([]*autoscaling.Tag, 0, len(vs)) for _, tag := range vs { attr, ok := tag.(map[string]interface{}) - if !ok { + if !ok || len(attr) == 0 { continue } @@ -248,14 +248,21 @@ func autoscalingTagFromMap(attr map[string]interface{}, resourceID string) (*aut return t, nil } -// autoscalingTagDescriptionsToSlice turns the list of tags into a slice. -func autoscalingTagDescriptionsToSlice(ts []*autoscaling.TagDescription) []map[string]interface{} { +// autoscalingTagDescriptionsToSlice turns the list of tags into a slice. If +// forceStrings is true, all values are converted to strings +func autoscalingTagDescriptionsToSlice(ts []*autoscaling.TagDescription, forceStrings bool) []map[string]interface{} { tags := make([]map[string]interface{}, 0, len(ts)) for _, t := range ts { + var propagateAtLaunch interface{} + if forceStrings { + propagateAtLaunch = strconv.FormatBool(aws.BoolValue(t.PropagateAtLaunch)) + } else { + propagateAtLaunch = aws.BoolValue(t.PropagateAtLaunch) + } tags = append(tags, map[string]interface{}{ - "key": *t.Key, - "value": *t.Value, - "propagate_at_launch": *t.PropagateAtLaunch, + "key": aws.StringValue(t.Key), + "value": aws.StringValue(t.Value), + "propagate_at_launch": propagateAtLaunch, }) } diff --git a/aws/aws_sweeper_test.go b/aws/aws_sweeper_test.go index 126a5ef7081..b9a63816ea6 100644 --- a/aws/aws_sweeper_test.go +++ b/aws/aws_sweeper_test.go @@ -8,13 +8,22 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) +// sweeperAwsClients is a shared cache of regional AWSClient +// This prevents client re-initialization for every resource with no benefit. +var sweeperAwsClients map[string]interface{} + func TestMain(m *testing.M) { + sweeperAwsClients = make(map[string]interface{}) resource.TestMain(m) } // sharedClientForRegion returns a common AWSClient setup needed for the sweeper // functions for a given region func sharedClientForRegion(region string) (interface{}, error) { + if client, ok := sweeperAwsClients[region]; ok { + return client, nil + } + if os.Getenv("AWS_PROFILE") == "" && (os.Getenv("AWS_ACCESS_KEY_ID") == "" || os.Getenv("AWS_SECRET_ACCESS_KEY") == "") { return nil, fmt.Errorf("must provide environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or environment variable AWS_PROFILE") } @@ -30,5 +39,7 @@ func sharedClientForRegion(region string) (interface{}, error) { return nil, fmt.Errorf("error getting AWS client") } + sweeperAwsClients[region] = client + return client, nil } diff --git a/aws/config.go b/aws/config.go index 1e448089c00..d42325cedd7 100644 --- a/aws/config.go +++ b/aws/config.go @@ -105,6 +105,7 @@ import ( "github.com/aws/aws-sdk-go/service/mediastoredata" "github.com/aws/aws-sdk-go/service/mq" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/aws/aws-sdk-go/service/networkmanager" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" "github.com/aws/aws-sdk-go/service/personalize" @@ -117,6 +118,7 @@ import ( "github.com/aws/aws-sdk-go/service/redshift" "github.com/aws/aws-sdk-go/service/resourcegroups" "github.com/aws/aws-sdk-go/service/route53" + "github.com/aws/aws-sdk-go/service/route53domains" "github.com/aws/aws-sdk-go/service/route53resolver" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3control" @@ -137,6 +139,7 @@ import ( "github.com/aws/aws-sdk-go/service/storagegateway" "github.com/aws/aws-sdk-go/service/sts" "github.com/aws/aws-sdk-go/service/swf" + "github.com/aws/aws-sdk-go/service/synthetics" "github.com/aws/aws-sdk-go/service/transfer" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" @@ -167,10 +170,9 @@ type Config struct { AllowedAccountIds []string ForbiddenAccountIds []string - Endpoints map[string]string - IgnoreTagPrefixes []string - IgnoreTags []string - Insecure bool + Endpoints map[string]string + IgnoreTagsConfig *keyvaluetags.IgnoreConfig + Insecure bool SkipCredsValidation bool SkipGetEC2Platforms bool @@ -254,8 +256,7 @@ type AWSClient struct { guarddutyconn *guardduty.GuardDuty greengrassconn *greengrass.Greengrass iamconn *iam.IAM - ignoreTagPrefixes keyvaluetags.KeyValueTags - ignoreTags keyvaluetags.KeyValueTags + IgnoreTagsConfig *keyvaluetags.IgnoreConfig imagebuilderconn *imagebuilder.Imagebuilder inspectorconn *inspector.Inspector iotconn *iot.IoT @@ -284,6 +285,7 @@ type AWSClient struct { mediastoredataconn *mediastoredata.MediaStoreData mqconn *mq.MQ neptuneconn *neptune.Neptune + networkmanagerconn *networkmanager.NetworkManager opsworksconn *opsworks.OpsWorks organizationsconn *organizations.Organizations partition string @@ -298,6 +300,7 @@ type AWSClient struct { redshiftconn *redshift.Redshift region string resourcegroupsconn *resourcegroups.ResourceGroups + route53domainsconn *route53domains.Route53Domains route53resolverconn *route53resolver.Route53Resolver s3conn *s3.S3 s3connUriCleaningDisabled *s3.S3 @@ -320,6 +323,7 @@ type AWSClient struct { stsconn *sts.STS supportedplatforms []string swfconn *swf.SWF + syntheticsconn *synthetics.Synthetics terraformVersion string transferconn *transfer.Transfer wafconn *waf.WAF @@ -472,8 +476,7 @@ func (c *Config) Client() (interface{}, error) { guarddutyconn: guardduty.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["guardduty"])})), greengrassconn: greengrass.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["greengrass"])})), iamconn: iam.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["iam"])})), - ignoreTagPrefixes: keyvaluetags.New(c.IgnoreTagPrefixes), - ignoreTags: keyvaluetags.New(c.IgnoreTags), + IgnoreTagsConfig: c.IgnoreTagsConfig, imagebuilderconn: imagebuilder.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["imagebuilder"])})), inspectorconn: inspector.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["inspector"])})), iotconn: iot.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["iot"])})), @@ -481,7 +484,7 @@ func (c *Config) Client() (interface{}, error) { ioteventsconn: iotevents.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["iotevents"])})), kafkaconn: kafka.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kafka"])})), kinesisanalyticsconn: kinesisanalytics.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kinesisanalytics"])})), - kinesisanalyticsv2conn: kinesisanalyticsv2.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kinesisanalytics"])})), + kinesisanalyticsv2conn: kinesisanalyticsv2.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kinesisanalyticsv2"])})), kinesisconn: kinesis.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kinesis"])})), kinesisvideoconn: kinesisvideo.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kinesisvideo"])})), kmsconn: kms.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["kms"])})), @@ -501,6 +504,7 @@ func (c *Config) Client() (interface{}, error) { mediastoredataconn: mediastoredata.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["mediastoredata"])})), mqconn: mq.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["mq"])})), neptuneconn: neptune.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["neptune"])})), + networkmanagerconn: networkmanager.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["networkmanager"])})), opsworksconn: opsworks.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["opsworks"])})), organizationsconn: organizations.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["organizations"])})), partition: partition, @@ -514,6 +518,7 @@ func (c *Config) Client() (interface{}, error) { redshiftconn: redshift.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["redshift"])})), region: c.Region, resourcegroupsconn: resourcegroups.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["resourcegroups"])})), + route53domainsconn: route53domains.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["route53domains"])})), route53resolverconn: route53resolver.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["route53resolver"])})), s3controlconn: s3control.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["s3control"])})), sagemakerconn: sagemaker.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["sagemaker"])})), @@ -532,6 +537,7 @@ func (c *Config) Client() (interface{}, error) { storagegatewayconn: storagegateway.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["storagegateway"])})), stsconn: sts.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["sts"])})), swfconn: swf.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["swf"])})), + syntheticsconn: synthetics.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["synthetics"])})), terraformVersion: c.terraformVersion, transferconn: transfer.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["transfer"])})), wafconn: waf.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["waf"])})), @@ -709,6 +715,22 @@ func (c *Config) Client() (interface{}, error) { } }) + client.wafv2conn.Handlers.Retry.PushBack(func(r *request.Request) { + if isAWSErr(r.Error, wafv2.ErrCodeWAFInternalErrorException, "Retry your request") { + r.Retryable = aws.Bool(true) + } + + if r.Operation.Name == "CreateIPSet" || r.Operation.Name == "CreateRegexPatternSet" || r.Operation.Name == "CreateRuleGroup" { + // WAFv2 supports tag on create which can result in the below error codes according to the documentation + if isAWSErr(r.Error, wafv2.ErrCodeWAFTagOperationException, "Retry your request") { + r.Retryable = aws.Bool(true) + } + if isAWSErr(err, wafv2.ErrCodeWAFTagOperationInternalErrorException, "Retry your request") { + r.Retryable = aws.Bool(true) + } + } + }) + if !c.SkipGetEC2Platforms { supportedPlatforms, err := GetSupportedEC2Platforms(client.ec2conn) if err != nil { diff --git a/aws/data_source_aws_acm_certificate.go b/aws/data_source_aws_acm_certificate.go index a5180b77651..7c97530d794 100644 --- a/aws/data_source_aws_acm_certificate.go +++ b/aws/data_source_aws_acm_certificate.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/acm" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) func dataSourceAwsAcmCertificate() *schema.Resource { @@ -53,12 +54,14 @@ func dataSourceAwsAcmCertificate() *schema.Resource { Optional: true, Default: false, }, + "tags": tagsSchemaComputed(), }, } } func dataSourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).acmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &acm.ListCertificatesInput{} @@ -74,7 +77,7 @@ func dataSourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) e statusStrings := statuses.([]interface{}) params.CertificateStatuses = expandStringList(statusStrings) } else { - params.CertificateStatuses = []*string{aws.String("ISSUED")} + params.CertificateStatuses = []*string{aws.String(acm.CertificateStatusIssued)} } var arns []*string @@ -169,6 +172,16 @@ func dataSourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) e d.SetId(time.Now().UTC().String()) d.Set("arn", matchedCertificate.CertificateArn) + tags, err := keyvaluetags.AcmListTags(conn, aws.StringValue(matchedCertificate.CertificateArn)) + + if err != nil { + return fmt.Errorf("error listing tags for ACM Certificate (%s): %s", d.Id(), err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + return nil } diff --git a/aws/data_source_aws_acm_certificate_test.go b/aws/data_source_aws_acm_certificate_test.go index b8fc4f7f8a9..3e17c7981c8 100644 --- a/aws/data_source_aws_acm_certificate_test.go +++ b/aws/data_source_aws_acm_certificate_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/service/acm" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -41,36 +42,42 @@ func TestAccAWSAcmCertificateDataSource_singleIssued(t *testing.T) { { Config: testAccCheckAwsAcmCertificateDataSourceConfig(domain), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithStatus(domain, acm.CertificateStatusIssued), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithTypes(domain, acm.CertificateTypeAmazonIssued), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithMostRecent(domain, true), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithMostRecentAndStatus(domain, acm.CertificateStatusIssued, true), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithMostRecentAndTypes(domain, acm.CertificateTypeAmazonIssued, true), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, @@ -119,18 +126,21 @@ func TestAccAWSAcmCertificateDataSource_multipleIssued(t *testing.T) { { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithMostRecent(domain, true), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithMostRecentAndStatus(domain, acm.CertificateStatusIssued, true), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, { Config: testAccCheckAwsAcmCertificateDataSourceConfigWithMostRecentAndTypes(domain, acm.CertificateTypeAmazonIssued, true), Check: resource.ComposeTestCheckFunc( + //lintignore:AWSAT001 resource.TestMatchResourceAttr(resourceName, "arn", arnRe), ), }, @@ -182,15 +192,17 @@ func TestAccAWSAcmCertificateDataSource_KeyTypes(t *testing.T) { dataSourceName := "data.aws_acm_certificate.test" key := tlsRsaPrivateKeyPem(4096) certificate := tlsRsaX509SelfSignedCertificatePem(key, "example.com") + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccAwsAcmCertificateDataSourceConfigKeyTypes(tlsPemEscapeNewlines(certificate), tlsPemEscapeNewlines(key)), + Config: testAccAwsAcmCertificateDataSourceConfigKeyTypes(tlsPemEscapeNewlines(certificate), tlsPemEscapeNewlines(key), rName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrPair(resourceName, "arn", dataSourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "tags", dataSourceName, "tags"), ), }, }, @@ -252,16 +264,20 @@ data "aws_acm_certificate" "test" { `, domain, certType, mostRecent) } -func testAccAwsAcmCertificateDataSourceConfigKeyTypes(certificate, key string) string { +func testAccAwsAcmCertificateDataSourceConfigKeyTypes(certificate, key, rName string) string { return fmt.Sprintf(` resource "aws_acm_certificate" "test" { certificate_body = "%[1]s" private_key = "%[2]s" + + tags = { + Name = %[3]q + } } data "aws_acm_certificate" "test" { domain = "${aws_acm_certificate.test.domain_name}" key_types = ["RSA_4096"] } -`, certificate, key) +`, certificate, key, rName) } diff --git a/aws/data_source_aws_acmpca_certificate_authority.go b/aws/data_source_aws_acmpca_certificate_authority.go index f9cf1659f81..f8af0c9a27e 100644 --- a/aws/data_source_aws_acmpca_certificate_authority.go +++ b/aws/data_source_aws_acmpca_certificate_authority.go @@ -95,6 +95,7 @@ func dataSourceAwsAcmpcaCertificateAuthority() *schema.Resource { func dataSourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).acmpcaconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig certificateAuthorityArn := d.Get("arn").(string) describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ @@ -169,7 +170,7 @@ func dataSourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta in return fmt.Errorf("error listing tags for ACMPCA Certificate Authority (%s): %s", certificateAuthorityArn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ami.go b/aws/data_source_aws_ami.go index 2f255d3bf72..f244ad4bae4 100644 --- a/aws/data_source_aws_ami.go +++ b/aws/data_source_aws_ami.go @@ -25,20 +25,17 @@ func dataSourceAwsAmi() *schema.Resource { "executable_users": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "name_regex": { Type: schema.TypeString, Optional: true, - ForceNew: true, ValidateFunc: validation.StringIsValidRegExp, }, "most_recent": { Type: schema.TypeBool, Optional: true, Default: false, - ForceNew: true, }, "owners": { Type: schema.TypeList, @@ -152,6 +149,7 @@ func dataSourceAwsAmi() *schema.Resource { "ebs": { Type: schema.TypeMap, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, @@ -176,6 +174,7 @@ func dataSourceAwsAmi() *schema.Resource { "state_reason": { Type: schema.TypeMap, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "tags": tagsSchemaComputed(), }, @@ -185,6 +184,7 @@ func dataSourceAwsAmi() *schema.Resource { // dataSourceAwsAmiDescriptionRead performs the AMI lookup. func dataSourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &ec2.DescribeImagesInput{ Owners: expandStringList(d.Get("owners").([]interface{})), @@ -240,11 +240,11 @@ func dataSourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { }) } - return amiDescriptionAttributes(d, filteredImages[0]) + return amiDescriptionAttributes(d, filteredImages[0], ignoreTagsConfig) } // populate the numerous fields that the image description returns. -func amiDescriptionAttributes(d *schema.ResourceData, image *ec2.Image) error { +func amiDescriptionAttributes(d *schema.ResourceData, image *ec2.Image, ignoreTagsConfig *keyvaluetags.IgnoreConfig) error { // Simple attributes first d.SetId(*image.ImageId) d.Set("architecture", image.Architecture) @@ -291,7 +291,7 @@ func amiDescriptionAttributes(d *schema.ResourceData, image *ec2.Image) error { if err := d.Set("state_reason", amiStateReason(image.StateReason)); err != nil { return err } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(image.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(image.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } return nil diff --git a/aws/data_source_aws_ami_ids.go b/aws/data_source_aws_ami_ids.go index a872c0f2848..5002ab05f6e 100644 --- a/aws/data_source_aws_ami_ids.go +++ b/aws/data_source_aws_ami_ids.go @@ -23,13 +23,11 @@ func dataSourceAwsAmiIds() *schema.Resource { "executable_users": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "name_regex": { Type: schema.TypeString, Optional: true, - ForceNew: true, ValidateFunc: validation.StringIsValidRegExp, }, "owners": { diff --git a/aws/data_source_aws_api_gateway_api_key.go b/aws/data_source_aws_api_gateway_api_key.go index 8b9618a3fd6..5af057c4a62 100644 --- a/aws/data_source_aws_api_gateway_api_key.go +++ b/aws/data_source_aws_api_gateway_api_key.go @@ -50,6 +50,8 @@ func dataSourceAwsApiGatewayApiKey() *schema.Resource { func dataSourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + apiKey, err := conn.GetApiKey(&apigateway.GetApiKeyInput{ ApiKey: aws.String(d.Get("id").(string)), IncludeValue: aws.Bool(true), @@ -67,7 +69,7 @@ func dataSourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) d.Set("enabled", apiKey.Enabled) d.Set("last_updated_date", aws.TimeValue(apiKey.LastUpdatedDate).Format(time.RFC3339)) - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(apiKey.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(apiKey.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } return nil diff --git a/aws/data_source_aws_api_gateway_rest_api.go b/aws/data_source_aws_api_gateway_rest_api.go index 84ec05a4db5..f6d74b4edb8 100644 --- a/aws/data_source_aws_api_gateway_rest_api.go +++ b/aws/data_source_aws_api_gateway_rest_api.go @@ -59,7 +59,7 @@ func dataSourceAwsApiGatewayRestApi() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, }, "vpc_endpoint_ids": { - Type: schema.TypeList, + Type: schema.TypeSet, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -77,6 +77,8 @@ func dataSourceAwsApiGatewayRestApi() *schema.Resource { func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + params := &apigateway.GetRestApisInput{} target := d.Get("name") @@ -127,7 +129,7 @@ func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error setting endpoint_configuration: %s", err) } - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(match.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(match.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } 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 a35ba5f2951..05cfeea8091 100644 --- a/aws/data_source_aws_api_gateway_rest_api_test.go +++ b/aws/data_source_aws_api_gateway_rest_api_test.go @@ -1,14 +1,13 @@ package aws import ( - "fmt" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) -func TestAccDataSourceAwsApiGatewayRestApi(t *testing.T) { +func TestAccDataSourceAwsApiGatewayRestApi_basic(t *testing.T) { rName := acctest.RandString(8) dataSourceName := "data.aws_api_gateway_rest_api.test" resourceName := "aws_api_gateway_rest_api.test" @@ -17,7 +16,10 @@ func TestAccDataSourceAwsApiGatewayRestApi(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccDataSourceAwsApiGatewayRestApiConfig(rName), + Config: composeConfig( + testAccAWSAPIGatewayRestAPIConfig_Name(rName), + testAccDataSourceAwsApiGatewayRestApiConfigName(), + ), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"), resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), @@ -36,14 +38,41 @@ func TestAccDataSourceAwsApiGatewayRestApi(t *testing.T) { }) } -func testAccDataSourceAwsApiGatewayRestApiConfig(r string) string { - return fmt.Sprintf(` -resource "aws_api_gateway_rest_api" "test" { - name = "%[1]s" +func TestAccDataSourceAwsApiGatewayRestApi_EndpointConfiguration_VpcEndpointIds(t *testing.T) { + rName := acctest.RandString(8) + dataSourceName := "data.aws_api_gateway_rest_api.test" + resourceName := "aws_api_gateway_rest_api.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: composeConfig( + testAccAWSAPIGatewayRestAPIConfig_VPCEndpointConfiguration(rName), + testAccDataSourceAwsApiGatewayRestApiConfigName(), + ), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"), + resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(dataSourceName, "root_resource_id", resourceName, "root_resource_id"), + resource.TestCheckResourceAttrPair(dataSourceName, "tags", resourceName, "tags"), + resource.TestCheckResourceAttrPair(dataSourceName, "description", resourceName, "description"), + resource.TestCheckResourceAttrPair(dataSourceName, "policy", resourceName, "policy"), + resource.TestCheckResourceAttrPair(dataSourceName, "api_key_source", resourceName, "api_key_source"), + resource.TestCheckResourceAttrPair(dataSourceName, "minimum_compression_size", resourceName, "minimum_compression_size"), + resource.TestCheckResourceAttrPair(dataSourceName, "binary_media_types", resourceName, "binary_media_types"), + resource.TestCheckResourceAttrPair(dataSourceName, "endpoint_configuration", resourceName, "endpoint_configuration"), + resource.TestCheckResourceAttrPair(dataSourceName, "execution_arn", resourceName, "execution_arn"), + ), + }, + }, + }) } +func testAccDataSourceAwsApiGatewayRestApiConfigName() string { + return ` data "aws_api_gateway_rest_api" "test" { - name = "${aws_api_gateway_rest_api.test.name}" + name = aws_api_gateway_rest_api.test.name } -`, r) +` } diff --git a/aws/data_source_aws_api_gateway_vpc_link.go b/aws/data_source_aws_api_gateway_vpc_link.go index 63c02fe78fb..4d1edd470ab 100644 --- a/aws/data_source_aws_api_gateway_vpc_link.go +++ b/aws/data_source_aws_api_gateway_vpc_link.go @@ -48,6 +48,8 @@ func dataSourceAwsApiGatewayVpcLink() *schema.Resource { func dataSourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + params := &apigateway.GetVpcLinksInput{} target := d.Get("name") @@ -81,7 +83,7 @@ func dataSourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{} d.Set("description", match.Description) d.Set("target_arns", flattenStringList(match.TargetArns)) - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(match.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(match.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_autoscaling_group.go b/aws/data_source_aws_autoscaling_group.go index 917e9c82559..9e908eb4103 100644 --- a/aws/data_source_aws_autoscaling_group.go +++ b/aws/data_source_aws_autoscaling_group.go @@ -18,7 +18,6 @@ func dataSourceAwsAutoscalingGroup() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "arn": { Type: schema.TypeString, diff --git a/aws/data_source_aws_autoscaling_group_test.go b/aws/data_source_aws_autoscaling_group_test.go index 85a5cbd0381..fdb44b0278e 100644 --- a/aws/data_source_aws_autoscaling_group_test.go +++ b/aws/data_source_aws_autoscaling_group_test.go @@ -60,6 +60,11 @@ data "aws_ami" "ubuntu" { data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_launch_configuration" "data_source_aws_autoscaling_group_test" { diff --git a/aws/data_source_aws_autoscaling_groups_test.go b/aws/data_source_aws_autoscaling_groups_test.go index b51e9ff755c..dfad46e0eab 100644 --- a/aws/data_source_aws_autoscaling_groups_test.go +++ b/aws/data_source_aws_autoscaling_groups_test.go @@ -92,7 +92,14 @@ data "aws_ami" "test_ami" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_launch_configuration" "foobar" { image_id = "${data.aws_ami.test_ami.id}" @@ -167,7 +174,14 @@ data "aws_ami" "test_ami" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_launch_configuration" "foobar" { image_id = "${data.aws_ami.test_ami.id}" diff --git a/aws/data_source_aws_availability_zone.go b/aws/data_source_aws_availability_zone.go index 3878aa75d34..15db6af609c 100644 --- a/aws/data_source_aws_availability_zone.go +++ b/aws/data_source_aws_availability_zone.go @@ -14,28 +14,41 @@ func dataSourceAwsAvailabilityZone() *schema.Resource { Read: dataSourceAwsAvailabilityZoneRead, Schema: map[string]*schema.Schema{ + "all_availability_zones": { + Type: schema.TypeBool, + Optional: true, + }, + "filter": ec2CustomFiltersSchema(), + "group_name": { + Type: schema.TypeString, + Computed: true, + }, "name": { Type: schema.TypeString, Optional: true, Computed: true, }, - - "region": { + "name_suffix": { Type: schema.TypeString, Computed: true, }, - - "name_suffix": { + "network_border_group": { + Type: schema.TypeString, + Computed: true, + }, + "opt_in_status": { + Type: schema.TypeString, + Computed: true, + }, + "region": { Type: schema.TypeString, Computed: true, }, - "state": { Type: schema.TypeString, Optional: true, Computed: true, }, - "zone_id": { Type: schema.TypeString, Optional: true, @@ -50,6 +63,10 @@ func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) req := &ec2.DescribeAvailabilityZonesInput{} + if v, ok := d.GetOk("all_availability_zones"); ok { + req.AllAvailabilityZones = aws.Bool(v.(bool)) + } + if v := d.Get("name").(string); v != "" { req.ZoneNames = []*string{aws.String(v)} } @@ -61,6 +78,13 @@ func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) "state": d.Get("state").(string), }, ) + + if filters, filtersOk := d.GetOk("filter"); filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + if len(req.Filters) == 0 { // Don't send an empty filters list; the EC2 API won't accept it. req.Filters = nil @@ -87,8 +111,11 @@ func dataSourceAwsAvailabilityZoneRead(d *schema.ResourceData, meta interface{}) nameSuffix := (*az.ZoneName)[len(*az.RegionName):] d.SetId(aws.StringValue(az.ZoneName)) + d.Set("group_name", az.GroupName) d.Set("name", az.ZoneName) d.Set("name_suffix", nameSuffix) + d.Set("network_border_group", az.NetworkBorderGroup) + d.Set("opt_in_status", az.OptInStatus) d.Set("region", az.RegionName) d.Set("state", az.State) d.Set("zone_id", az.ZoneId) diff --git a/aws/data_source_aws_availability_zone_test.go b/aws/data_source_aws_availability_zone_test.go index 10f63470d3b..0b897c762f5 100644 --- a/aws/data_source_aws_availability_zone_test.go +++ b/aws/data_source_aws_availability_zone_test.go @@ -1,43 +1,177 @@ package aws import ( + "fmt" + "regexp" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) -func TestAccDataSourceAwsAvailabilityZone(t *testing.T) { - ds1ResourceName := "data.aws_availability_zone.by_name" - ds2ResourceName := "data.aws_availability_zone.by_zone_id" +func TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones(t *testing.T) { + availabilityZonesDataSourceName := "data.aws_availability_zones.test" + dataSourceName := "data.aws_availability_zone.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccDataSourceAwsAvailabilityZoneConfig, + Config: testAccDataSourceAwsAvailabilityZoneConfigAllAvailabilityZones(), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(ds1ResourceName, "name", "us-west-2a"), - resource.TestCheckResourceAttr(ds1ResourceName, "name_suffix", "a"), - resource.TestCheckResourceAttr(ds1ResourceName, "region", "us-west-2"), - resource.TestCheckResourceAttrSet(ds1ResourceName, "zone_id"), - - resource.TestCheckResourceAttr(ds2ResourceName, "name", "us-west-2a"), - resource.TestCheckResourceAttr(ds2ResourceName, "name_suffix", "a"), - resource.TestCheckResourceAttr(ds2ResourceName, "region", "us-west-2"), - resource.TestCheckResourceAttrPair(ds2ResourceName, "zone_id", ds1ResourceName, "zone_id"), + resource.TestCheckResourceAttr(dataSourceName, "group_name", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "name", availabilityZonesDataSourceName, "names.0"), + resource.TestMatchResourceAttr(dataSourceName, "name_suffix", regexp.MustCompile(`^[a-z]$`)), + resource.TestCheckResourceAttr(dataSourceName, "network_border_group", testAccGetRegion()), + resource.TestCheckResourceAttr(dataSourceName, "opt_in_status", "opt-in-not-required"), + resource.TestCheckResourceAttr(dataSourceName, "region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "zone_id", availabilityZonesDataSourceName, "zone_ids.0"), ), }, }, }) } -const testAccDataSourceAwsAvailabilityZoneConfig = ` -data "aws_availability_zone" "by_name" { - name = "us-west-2a" +func TestAccDataSourceAwsAvailabilityZone_Filter(t *testing.T) { + availabilityZonesDataSourceName := "data.aws_availability_zones.test" + dataSourceName := "data.aws_availability_zone.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsAvailabilityZoneConfigFilter(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "group_name", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "name", availabilityZonesDataSourceName, "names.0"), + resource.TestMatchResourceAttr(dataSourceName, "name_suffix", regexp.MustCompile(`^[a-z]$`)), + resource.TestCheckResourceAttr(dataSourceName, "network_border_group", testAccGetRegion()), + resource.TestCheckResourceAttr(dataSourceName, "opt_in_status", "opt-in-not-required"), + resource.TestCheckResourceAttr(dataSourceName, "region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "zone_id", availabilityZonesDataSourceName, "zone_ids.0"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsAvailabilityZone_Name(t *testing.T) { + availabilityZonesDataSourceName := "data.aws_availability_zones.test" + dataSourceName := "data.aws_availability_zone.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsAvailabilityZoneConfigName(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "group_name", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "name", availabilityZonesDataSourceName, "names.0"), + resource.TestMatchResourceAttr(dataSourceName, "name_suffix", regexp.MustCompile(`^[a-z]$`)), + resource.TestCheckResourceAttr(dataSourceName, "network_border_group", testAccGetRegion()), + resource.TestCheckResourceAttr(dataSourceName, "opt_in_status", "opt-in-not-required"), + resource.TestCheckResourceAttr(dataSourceName, "region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "zone_id", availabilityZonesDataSourceName, "zone_ids.0"), + ), + }, + }, + }) } -data "aws_availability_zone" "by_zone_id" { - zone_id = "${data.aws_availability_zone.by_name.zone_id}" +func TestAccDataSourceAwsAvailabilityZone_ZoneId(t *testing.T) { + availabilityZonesDataSourceName := "data.aws_availability_zones.test" + dataSourceName := "data.aws_availability_zone.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsAvailabilityZoneConfigZoneId(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "group_name", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "name", availabilityZonesDataSourceName, "names.0"), + resource.TestMatchResourceAttr(dataSourceName, "name_suffix", regexp.MustCompile(`^[a-z]$`)), + resource.TestCheckResourceAttr(dataSourceName, "network_border_group", testAccGetRegion()), + resource.TestCheckResourceAttr(dataSourceName, "opt_in_status", "opt-in-not-required"), + resource.TestCheckResourceAttr(dataSourceName, "region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(dataSourceName, "zone_id", availabilityZonesDataSourceName, "zone_ids.0"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsAvailabilityZoneConfigAllAvailabilityZones() string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +data "aws_availability_zone" "test" { + all_availability_zones = true + name = data.aws_availability_zones.test.names[0] +} +`) +} + +func testAccDataSourceAwsAvailabilityZoneConfigFilter() string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +data "aws_availability_zone" "test" { + filter { + name = "zone-name" + values = [data.aws_availability_zones.test.names[0]] + } +} +`) +} + +func testAccDataSourceAwsAvailabilityZoneConfigName() string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +data "aws_availability_zone" "test" { + name = data.aws_availability_zones.test.names[0] +} +`) +} + +func testAccDataSourceAwsAvailabilityZoneConfigZoneId() string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +data "aws_availability_zone" "test" { + zone_id = data.aws_availability_zones.test.zone_ids[0] +} +`) } -` diff --git a/aws/data_source_aws_availability_zones.go b/aws/data_source_aws_availability_zones.go index b9e9526afea..bee053e1d9a 100644 --- a/aws/data_source_aws_availability_zones.go +++ b/aws/data_source_aws_availability_zones.go @@ -17,6 +17,10 @@ func dataSourceAwsAvailabilityZones() *schema.Resource { Read: dataSourceAwsAvailabilityZonesRead, Schema: map[string]*schema.Schema{ + "all_availability_zones": { + Type: schema.TypeBool, + Optional: true, + }, "blacklisted_names": { Type: schema.TypeSet, Optional: true, @@ -27,6 +31,12 @@ func dataSourceAwsAvailabilityZones() *schema.Resource { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "filter": ec2CustomFiltersSchema(), + "group_names": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "names": { Type: schema.TypeList, Computed: true, @@ -59,6 +69,10 @@ func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{} request := &ec2.DescribeAvailabilityZonesInput{} + if v, ok := d.GetOk("all_availability_zones"); ok { + request.AllAvailabilityZones = aws.Bool(v.(bool)) + } + if v, ok := d.GetOk("state"); ok { request.Filters = []*ec2.Filter{ { @@ -68,6 +82,17 @@ func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{} } } + if filters, filtersOk := d.GetOk("filter"); filtersOk { + request.Filters = append(request.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + + if len(request.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + request.Filters = nil + } + log.Printf("[DEBUG] Reading Availability Zones: %s", request) resp, err := conn.DescribeAvailabilityZones(request) if err != nil { @@ -80,9 +105,11 @@ func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{} blacklistedNames := d.Get("blacklisted_names").(*schema.Set) blacklistedZoneIDs := d.Get("blacklisted_zone_ids").(*schema.Set) + groupNames := schema.NewSet(schema.HashString, nil) names := []string{} zoneIds := []string{} for _, v := range resp.AvailabilityZones { + groupName := aws.StringValue(v.GroupName) name := aws.StringValue(v.ZoneName) zoneID := aws.StringValue(v.ZoneId) @@ -94,10 +121,17 @@ func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{} continue } + if !groupNames.Contains(groupName) { + groupNames.Add(groupName) + } + names = append(names, name) zoneIds = append(zoneIds, zoneID) } + if err := d.Set("group_names", groupNames); err != nil { + return fmt.Errorf("error setting group_names: %s", err) + } if err := d.Set("names", names); err != nil { return fmt.Errorf("Error setting Availability Zone names: %s", err) } diff --git a/aws/data_source_aws_availability_zones_test.go b/aws/data_source_aws_availability_zones_test.go index e5edde63fda..00877f12593 100644 --- a/aws/data_source_aws_availability_zones_test.go +++ b/aws/data_source_aws_availability_zones_test.go @@ -88,6 +88,23 @@ func TestAccAWSAvailabilityZones_basic(t *testing.T) { }) } +func TestAccAWSAvailabilityZones_AllAvailabilityZones(t *testing.T) { + dataSourceName := "data.aws_availability_zones.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsAvailabilityZonesConfigAllAvailabilityZones(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAvailabilityZonesMeta(dataSourceName), + ), + }, + }, + }) +} + func TestAccAWSAvailabilityZones_BlacklistedNames(t *testing.T) { allDataSourceName := "data.aws_availability_zones.all" blacklistedDataSourceName := "data.aws_availability_zones.test" @@ -124,6 +141,23 @@ func TestAccAWSAvailabilityZones_BlacklistedZoneIds(t *testing.T) { }) } +func TestAccAWSAvailabilityZones_Filter(t *testing.T) { + dataSourceName := "data.aws_availability_zones.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsAvailabilityZonesConfigFilter(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAvailabilityZonesMeta(dataSourceName), + ), + }, + }, + }) +} + func TestAccAWSAvailabilityZones_stateFilter(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -219,6 +253,22 @@ func testAccCheckAwsAvailabilityZoneState(n string) resource.TestCheckFunc { } func testAccCheckAwsAvailabilityZonesBuildAvailable(attrs map[string]string) ([]string, error) { + groupNames, groupNamesOk := attrs["group_names.#"] + + if !groupNamesOk { + return nil, fmt.Errorf("Availability Zone Group names list is missing.") + } + + groupNamesQty, err := strconv.Atoi(groupNames) + + if err != nil { + return nil, err + } + + if groupNamesQty < 1 { + return nil, fmt.Errorf("No Availability Zone Groups found in region, this is probably a bug.") + } + v, ok := attrs["names.#"] if !ok { return nil, fmt.Errorf("Available AZ name list is missing.") @@ -249,6 +299,14 @@ const testAccCheckAwsAvailabilityZonesConfig = ` data "aws_availability_zones" "availability_zones" { } ` +func testAccCheckAwsAvailabilityZonesConfigAllAvailabilityZones() string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + all_availability_zones = true +} +`) +} + func testAccCheckAwsAvailabilityZonesConfigBlacklistedNames() string { return fmt.Sprintf(` data "aws_availability_zones" "all" {} @@ -269,6 +327,17 @@ data "aws_availability_zones" "test" { `) } +func testAccCheckAwsAvailabilityZonesConfigFilter() string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + filter { + name = "state" + values = ["available"] + } +} +`) +} + const testAccCheckAwsAvailabilityZonesStateConfig = ` data "aws_availability_zones" "state_filter" { state = "available" diff --git a/aws/data_source_aws_backup_plan.go b/aws/data_source_aws_backup_plan.go new file mode 100644 index 00000000000..05e0a454019 --- /dev/null +++ b/aws/data_source_aws_backup_plan.go @@ -0,0 +1,64 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/backup" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsBackupPlan() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBackupPlanRead, + + Schema: map[string]*schema.Schema{ + "plan_id": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + "version": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsBackupPlanRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).backupconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + id := d.Get("plan_id").(string) + + resp, err := conn.GetBackupPlan(&backup.GetBackupPlanInput{ + BackupPlanId: aws.String(id), + }) + if err != nil { + return fmt.Errorf("Error getting Backup Plan: %v", err) + } + + d.SetId(aws.StringValue(resp.BackupPlanId)) + d.Set("arn", resp.BackupPlanArn) + d.Set("name", resp.BackupPlan.BackupPlanName) + d.Set("version", resp.VersionId) + + tags, err := keyvaluetags.BackupListTags(conn, aws.StringValue(resp.BackupPlanArn)) + if err != nil { + return fmt.Errorf("error listing tags for Backup Plan (%s): %s", id, err) + } + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_backup_plan_test.go b/aws/data_source_aws_backup_plan_test.go new file mode 100644 index 00000000000..1031b1954ff --- /dev/null +++ b/aws/data_source_aws_backup_plan_test.go @@ -0,0 +1,69 @@ +package aws + +import ( + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccAWSBackupPlanDataSource_basic(t *testing.T) { + datasourceName := "data.aws_backup_plan.test" + resourceName := "aws_backup_plan.test" + rInt := acctest.RandInt() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsBackupPlanDataSourceConfig_nonExistent, + ExpectError: regexp.MustCompile(`Error getting Backup Plan`), + }, + { + Config: testAccAwsBackupPlanDataSourceConfig_basic(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), + resource.TestCheckResourceAttrPair(datasourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(datasourceName, "version", resourceName, "version"), + resource.TestCheckResourceAttrPair(datasourceName, "tags.%", resourceName, "tags.%"), + ), + }, + }, + }) +} + +const testAccAwsBackupPlanDataSourceConfig_nonExistent = ` +data "aws_backup_plan" "test" { + plan_id = "tf-acc-test-does-not-exist" +}` + +func testAccAwsBackupPlanDataSourceConfig_basic(rInt int) string { + return fmt.Sprintf(` +resource "aws_backup_vault" "test" { + name = "tf_acc_test_backup_vault_%[1]d" +} + +resource "aws_backup_plan" "test" { + name = "tf_acc_test_backup_plan_%[1]d" + + rule { + rule_name = "tf_acc_test_backup_rule_%[1]d" + target_vault_name = "${aws_backup_vault.test.name}" + schedule = "cron(0 12 * * ? *)" + } + + tags = { + Name = "Value%[1]d" + Key2 = "Value2b" + Key3 = "Value3" + } +} + +data "aws_backup_plan" "test" { + plan_id = aws_backup_plan.test.id +} +`, rInt) +} diff --git a/aws/data_source_aws_backup_selection.go b/aws/data_source_aws_backup_selection.go new file mode 100644 index 00000000000..cb26f481592 --- /dev/null +++ b/aws/data_source_aws_backup_selection.go @@ -0,0 +1,64 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/backup" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func dataSourceAwsBackupSelection() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBackupSelectionRead, + + Schema: map[string]*schema.Schema{ + "plan_id": { + Type: schema.TypeString, + Required: true, + }, + "selection_id": { + Type: schema.TypeString, + Required: true, + }, + "iam_role_arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "resources": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsBackupSelectionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).backupconn + + input := &backup.GetBackupSelectionInput{ + BackupPlanId: aws.String(d.Get("plan_id").(string)), + SelectionId: aws.String(d.Get("selection_id").(string)), + } + + resp, err := conn.GetBackupSelection(input) + if err != nil { + return fmt.Errorf("Error getting Backup Selection: %s", err) + } + + d.SetId(aws.StringValue(resp.SelectionId)) + d.Set("iam_role_arn", resp.BackupSelection.IamRoleArn) + d.Set("name", resp.BackupSelection.SelectionName) + + if resp.BackupSelection.Resources != nil { + if err := d.Set("resources", aws.StringValueSlice(resp.BackupSelection.Resources)); err != nil { + return fmt.Errorf("error setting resources: %s", err) + } + } + + return nil +} diff --git a/aws/data_source_aws_backup_selection_test.go b/aws/data_source_aws_backup_selection_test.go new file mode 100644 index 00000000000..e7147ba2e8e --- /dev/null +++ b/aws/data_source_aws_backup_selection_test.go @@ -0,0 +1,86 @@ +package aws + +import ( + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccAWSBackupSelectionDataSource_basic(t *testing.T) { + datasourceName := "data.aws_backup_selection.test" + resourceName := "aws_backup_selection.test" + rInt := acctest.RandInt() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsBackupSelectionDataSourceConfig_nonExistent, + ExpectError: regexp.MustCompile(`Error getting Backup Selection`), + }, + { + Config: testAccAwsBackupSelectionDataSourceConfig_basic(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), + resource.TestCheckResourceAttrPair(datasourceName, "iam_role_arn", resourceName, "iam_role_arn"), + resource.TestCheckResourceAttrPair(datasourceName, "resources.#", resourceName, "resources.#"), + ), + }, + }, + }) +} + +const testAccAwsBackupSelectionDataSourceConfig_nonExistent = ` +data "aws_backup_selection" "test" { + plan_id = "tf-acc-test-does-not-exist" + selection_id = "tf-acc-test-dne" +}` + +func testAccAwsBackupSelectionDataSourceConfig_basic(rInt int) string { + return fmt.Sprintf(` +data "aws_caller_identity" "current" {} + +data "aws_partition" "current" {} + +data "aws_region" "current" {} + +resource "aws_backup_vault" "test" { + name = "tf_acc_test_backup_vault_%[1]d" +} + +resource "aws_backup_plan" "test" { + name = "tf_acc_test_backup_plan_%[1]d" + + rule { + rule_name = "tf_acc_test_backup_rule_%[1]d" + target_vault_name = "${aws_backup_vault.test.name}" + schedule = "cron(0 12 * * ? *)" + } +} + +resource "aws_backup_selection" "test" { + plan_id = "${aws_backup_plan.test.id}" + name = "tf_acc_test_backup_selection_%[1]d" + iam_role_arn = "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:role/service-role/AWSBackupDefaultServiceRole" + + selection_tag { + type = "STRINGEQUALS" + key = "foo" + value = "bar" + } + + resources = [ + "arn:${data.aws_partition.current.partition}:ec2:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:volume/" + ] +} + +data "aws_backup_selection" "test" { + plan_id = aws_backup_plan.test.id + selection_id = aws_backup_selection.test.id +} +`, rInt) +} diff --git a/aws/data_source_aws_backup_vault.go b/aws/data_source_aws_backup_vault.go new file mode 100644 index 00000000000..71a911d7f97 --- /dev/null +++ b/aws/data_source_aws_backup_vault.go @@ -0,0 +1,66 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/backup" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsBackupVault() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBackupVaultRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_arn": { + Type: schema.TypeString, + Computed: true, + }, + "recovery_points": { + Type: schema.TypeInt, + Computed: true, + }, + "tags": tagsSchemaComputed(), + }, + } +} + +func dataSourceAwsBackupVaultRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).backupconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + name := d.Get("name").(string) + input := &backup.DescribeBackupVaultInput{ + BackupVaultName: aws.String(name), + } + + resp, err := conn.DescribeBackupVault(input) + if err != nil { + return fmt.Errorf("Error getting Backup Vault: %v", err) + } + + d.SetId(aws.StringValue(resp.BackupVaultName)) + d.Set("arn", resp.BackupVaultArn) + d.Set("kms_key_arn", resp.EncryptionKeyArn) + d.Set("name", resp.BackupVaultName) + d.Set("recovery_points", resp.NumberOfRecoveryPoints) + + tags, err := keyvaluetags.BackupListTags(conn, aws.StringValue(resp.BackupVaultArn)) + if err != nil { + return fmt.Errorf("error listing tags for Backup Vault (%s): %s", name, err) + } + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_backup_vault_test.go b/aws/data_source_aws_backup_vault_test.go new file mode 100644 index 00000000000..49a804a327b --- /dev/null +++ b/aws/data_source_aws_backup_vault_test.go @@ -0,0 +1,60 @@ +package aws + +import ( + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccAWSBackupVaultDataSource_basic(t *testing.T) { + datasourceName := "data.aws_backup_vault.test" + resourceName := "aws_backup_vault.test" + rInt := acctest.RandInt() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsBackupVaultDataSourceConfig_nonExistent, + ExpectError: regexp.MustCompile(`Error getting Backup Vault`), + }, + { + Config: testAccAwsBackupVaultDataSourceConfig_basic(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), + resource.TestCheckResourceAttrPair(datasourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(datasourceName, "kms_key_arn", resourceName, "kms_key_arn"), + resource.TestCheckResourceAttrPair(datasourceName, "recovery_points", resourceName, "recovery_points"), + resource.TestCheckResourceAttrPair(datasourceName, "tags.%", resourceName, "tags.%"), + ), + }, + }, + }) +} + +const testAccAwsBackupVaultDataSourceConfig_nonExistent = ` +data "aws_backup_vault" "test" { + name = "tf-acc-test-does-not-exist" +} +` + +func testAccAwsBackupVaultDataSourceConfig_basic(rInt int) string { + return fmt.Sprintf(` +resource "aws_backup_vault" "test" { + name = "tf_acc_test_backup_vault_%d" + + tags = { + up = "down" + left = "right" + } +} + +data "aws_backup_vault" "test" { + name = aws_backup_vault.test.name +} +`, rInt) +} diff --git a/aws/data_source_aws_batch_compute_environment.go b/aws/data_source_aws_batch_compute_environment.go index f4dfc00b97a..96c5e8564c6 100644 --- a/aws/data_source_aws_batch_compute_environment.go +++ b/aws/data_source_aws_batch_compute_environment.go @@ -17,7 +17,6 @@ func dataSourceAwsBatchComputeEnvironment() *schema.Resource { "compute_environment_name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "arn": { diff --git a/aws/data_source_aws_batch_job_queue.go b/aws/data_source_aws_batch_job_queue.go index 2770d692d9e..5daa62fb8a3 100644 --- a/aws/data_source_aws_batch_job_queue.go +++ b/aws/data_source_aws_batch_job_queue.go @@ -17,7 +17,6 @@ func dataSourceAwsBatchJobQueue() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "arn": { diff --git a/aws/data_source_aws_billing_service_account_test.go b/aws/data_source_aws_billing_service_account_test.go index cd67dc9f8d6..6dea1876afc 100644 --- a/aws/data_source_aws_billing_service_account_test.go +++ b/aws/data_source_aws_billing_service_account_test.go @@ -7,6 +7,10 @@ import ( ) func TestAccAWSBillingServiceAccount_basic(t *testing.T) { + dataSourceName := "data.aws_billing_service_account.main" + + billingAccountID := "386209384616" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -14,8 +18,8 @@ func TestAccAWSBillingServiceAccount_basic(t *testing.T) { { Config: testAccCheckAwsBillingServiceAccountConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_billing_service_account.main", "id", "386209384616"), - resource.TestCheckResourceAttr("data.aws_billing_service_account.main", "arn", "arn:aws:iam::386209384616:root"), + resource.TestCheckResourceAttr(dataSourceName, "id", billingAccountID), + testAccCheckResourceAttrGlobalARNAccountID(dataSourceName, "arn", billingAccountID, "iam", "root"), ), }, }, diff --git a/aws/data_source_aws_caller_identity_test.go b/aws/data_source_aws_caller_identity_test.go index 5d065d3ca90..d9857323574 100644 --- a/aws/data_source_aws_caller_identity_test.go +++ b/aws/data_source_aws_caller_identity_test.go @@ -23,23 +23,6 @@ func TestAccAWSCallerIdentity_basic(t *testing.T) { }) } -// Protects against a panic in the AWS Provider configuration. -// See https://github.com/terraform-providers/terraform-provider-aws/pull/1227 -func TestAccAWSCallerIdentity_basic_panic(t *testing.T) { - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: testAccCheckAwsCallerIdentityConfig_basic_panic, - Check: resource.ComposeTestCheckFunc( - testAccCheckAwsCallerIdentityAccountId("data.aws_caller_identity.current"), - ), - }, - }, - }) -} - func testAccCheckAwsCallerIdentityAccountId(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -71,12 +54,3 @@ func testAccCheckAwsCallerIdentityAccountId(n string) resource.TestCheckFunc { const testAccCheckAwsCallerIdentityConfig_basic = ` data "aws_caller_identity" "current" { } ` - -const testAccCheckAwsCallerIdentityConfig_basic_panic = ` -provider "aws" { - assume_role { - } -} - -data "aws_caller_identity" "current" {} -` diff --git a/aws/data_source_aws_cloudformation_stack.go b/aws/data_source_aws_cloudformation_stack.go index d1182ef49e9..9255192ae8e 100644 --- a/aws/data_source_aws_cloudformation_stack.go +++ b/aws/data_source_aws_cloudformation_stack.go @@ -46,10 +46,12 @@ func dataSourceAwsCloudFormationStack() *schema.Resource { "parameters": { Type: schema.TypeMap, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "outputs": { Type: schema.TypeMap, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "timeout_in_minutes": { Type: schema.TypeInt, @@ -66,6 +68,8 @@ func dataSourceAwsCloudFormationStack() *schema.Resource { func dataSourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cfconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + name := d.Get("name").(string) input := &cloudformation.DescribeStacksInput{ StackName: aws.String(name), @@ -92,7 +96,7 @@ func dataSourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface } d.Set("parameters", flattenAllCloudFormationParameters(stack.Parameters)) - if err := d.Set("tags", keyvaluetags.CloudformationKeyValueTags(stack.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.CloudformationKeyValueTags(stack.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } d.Set("outputs", flattenCloudFormationOutputs(stack.Outputs)) diff --git a/aws/data_source_aws_cloudfront_distribution.go b/aws/data_source_aws_cloudfront_distribution.go new file mode 100644 index 00000000000..8cb071203cd --- /dev/null +++ b/aws/data_source_aws_cloudfront_distribution.go @@ -0,0 +1,96 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsCloudFrontDistribution() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCloudFrontDistributionRead, + + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "etag": { + Type: schema.TypeString, + Computed: true, + }, + "domain_name": { + Type: schema.TypeString, + Computed: true, + }, + "last_modified_time": { + Type: schema.TypeString, + Computed: true, + }, + "in_progress_validation_batches": { + Type: schema.TypeInt, + Computed: true, + }, + "hosted_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "tags": tagsSchema(), + }, + } +} + +func dataSourceAwsCloudFrontDistributionRead(d *schema.ResourceData, meta interface{}) error { + d.SetId(d.Get("id").(string)) + conn := meta.(*AWSClient).cloudfrontconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + input := &cloudfront.GetDistributionInput{ + Id: aws.String(d.Id()), + } + + output, err := conn.GetDistribution(input) + if err != nil { + return fmt.Errorf("error getting CloudFront Distribution (%s): %w", d.Id(), err) + } + if output == nil { + return fmt.Errorf("error getting CloudFront Distribution (%s): empty response", d.Id()) + } + d.Set("etag", output.ETag) + if distribution := output.Distribution; distribution != nil { + d.Set("arn", distribution.ARN) + d.Set("domain_name", distribution.DomainName) + d.Set("in_progress_validation_batches", distribution.InProgressInvalidationBatches) + d.Set("last_modified_time", aws.String(distribution.LastModifiedTime.String())) + d.Set("status", distribution.Status) + if distributionConfig := distribution.DistributionConfig; distributionConfig != nil { + d.Set("enabled", distributionConfig.Enabled) + } + } + tags, err := keyvaluetags.CloudfrontListTags(conn, d.Get("arn").(string)) + if err != nil { + return fmt.Errorf("error listing tags for CloudFront Distribution (%s): %w", d.Id(), err) + } + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("hosted_zone_id", cloudFrontRoute53ZoneID) + return nil +} diff --git a/aws/data_source_aws_cloudfront_distribution_test.go b/aws/data_source_aws_cloudfront_distribution_test.go new file mode 100644 index 00000000000..04de77aa303 --- /dev/null +++ b/aws/data_source_aws_cloudfront_distribution_test.go @@ -0,0 +1,41 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccAWSDataSourceCloudFrontDistribution_basic(t *testing.T) { + dataSourceName := "data.aws_cloudfront_distribution.test" + resourceName := "aws_cloudfront_distribution.s3_distribution" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudFrontDistributionData, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(dataSourceName, "domain_name", resourceName, "domain_name"), + resource.TestCheckResourceAttrPair(dataSourceName, "etag", resourceName, "etag"), + resource.TestCheckResourceAttrPair(dataSourceName, "hosted_zone_id", resourceName, "hosted_zone_id"), + resource.TestCheckResourceAttrPair(dataSourceName, "in_progress_validation_batches", resourceName, "in_progress_validation_batches"), + resource.TestCheckResourceAttrPair(dataSourceName, "last_modified_time", resourceName, "last_modified_time"), + resource.TestCheckResourceAttrPair(dataSourceName, "status", resourceName, "status"), + ), + }, + }, + }) +} + +var testAccAWSCloudFrontDistributionData = fmt.Sprintf(` +%s + +data aws_cloudfront_distribution test { + id = aws_cloudfront_distribution.s3_distribution.id +} +`, fmt.Sprintf(testAccAWSCloudFrontDistributionS3ConfigWithTags, acctest.RandInt(), originBucket, logBucket, testAccAWSCloudFrontDistributionRetainConfig())) diff --git a/aws/data_source_aws_cloudhsm2_cluster_test.go b/aws/data_source_aws_cloudhsm2_cluster_test.go index 0de8c6eea19..438bc9f7512 100644 --- a/aws/data_source_aws_cloudhsm2_cluster_test.go +++ b/aws/data_source_aws_cloudhsm2_cluster_test.go @@ -37,7 +37,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "cloudhsm_v2_test_vpc" { cidr_block = "10.0.0.0/16" diff --git a/aws/data_source_aws_cloudtrail_service_account.go b/aws/data_source_aws_cloudtrail_service_account.go index 6358368fcd6..46904ac39f5 100644 --- a/aws/data_source_aws_cloudtrail_service_account.go +++ b/aws/data_source_aws_cloudtrail_service_account.go @@ -11,6 +11,7 @@ import ( // See https://docs.aws.amazon.com/govcloud-us/latest/ug-east/verifying-cloudtrail.html // See https://docs.aws.amazon.com/govcloud-us/latest/ug-west/verifying-cloudtrail.html var cloudTrailServiceAccountPerRegionMap = map[string]string{ + "af-south-1": "525921808201", "ap-east-1": "119688915426", "ap-northeast-1": "216624486486", "ap-northeast-2": "492519147666", @@ -23,6 +24,7 @@ var cloudTrailServiceAccountPerRegionMap = map[string]string{ "cn-northwest-1": "681348832753", "eu-central-1": "035351147821", "eu-north-1": "829690693026", + "eu-south-1": "669305197877", "eu-west-1": "859597730677", "eu-west-2": "282025262664", "eu-west-3": "262312530599", diff --git a/aws/data_source_aws_cloudtrail_service_account_test.go b/aws/data_source_aws_cloudtrail_service_account_test.go index ff0b9506f32..dd2c157199b 100644 --- a/aws/data_source_aws_cloudtrail_service_account_test.go +++ b/aws/data_source_aws_cloudtrail_service_account_test.go @@ -1,7 +1,6 @@ package aws import ( - "fmt" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -10,6 +9,8 @@ import ( func TestAccAWSCloudTrailServiceAccount_basic(t *testing.T) { expectedAccountID := cloudTrailServiceAccountPerRegionMap[testAccGetRegion()] + dataSourceName := "data.aws_cloudtrail_service_account.main" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -17,8 +18,8 @@ func TestAccAWSCloudTrailServiceAccount_basic(t *testing.T) { { Config: testAccCheckAwsCloudTrailServiceAccountConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_cloudtrail_service_account.main", "id", expectedAccountID), - resource.TestCheckResourceAttr("data.aws_cloudtrail_service_account.main", "arn", fmt.Sprintf("arn:%s:iam::%s:root", testAccGetPartition(), expectedAccountID)), + resource.TestCheckResourceAttr(dataSourceName, "id", expectedAccountID), + testAccCheckResourceAttrGlobalARNAccountID(dataSourceName, "arn", expectedAccountID, "iam", "root"), ), }, }, @@ -28,6 +29,8 @@ func TestAccAWSCloudTrailServiceAccount_basic(t *testing.T) { func TestAccAWSCloudTrailServiceAccount_Region(t *testing.T) { expectedAccountID := cloudTrailServiceAccountPerRegionMap[testAccGetRegion()] + dataSourceName := "data.aws_cloudtrail_service_account.regional" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -35,8 +38,8 @@ func TestAccAWSCloudTrailServiceAccount_Region(t *testing.T) { { Config: testAccCheckAwsCloudTrailServiceAccountConfigRegion, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_cloudtrail_service_account.regional", "id", expectedAccountID), - resource.TestCheckResourceAttr("data.aws_cloudtrail_service_account.regional", "arn", fmt.Sprintf("arn:%s:iam::%s:root", testAccGetPartition(), expectedAccountID)), + resource.TestCheckResourceAttr(dataSourceName, "id", expectedAccountID), + testAccCheckResourceAttrGlobalARNAccountID(dataSourceName, "arn", expectedAccountID, "iam", "root"), ), }, }, diff --git a/aws/data_source_aws_cloudwatch_log_group.go b/aws/data_source_aws_cloudwatch_log_group.go index 0a317ea5ef5..d729a7756b7 100644 --- a/aws/data_source_aws_cloudwatch_log_group.go +++ b/aws/data_source_aws_cloudwatch_log_group.go @@ -40,6 +40,7 @@ func dataSourceAwsCloudwatchLogGroup() *schema.Resource { func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { name := d.Get("name").(string) conn := meta.(*AWSClient).cloudwatchlogsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig logGroup, err := lookupCloudWatchLogGroup(conn, name) if err != nil { @@ -61,7 +62,7 @@ func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error listing tags for CloudWatch Logs Group (%s): %s", name, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_codecommit_repository.go b/aws/data_source_aws_codecommit_repository.go index fbc3aa5bb16..10308b1f8fc 100644 --- a/aws/data_source_aws_codecommit_repository.go +++ b/aws/data_source_aws_codecommit_repository.go @@ -18,7 +18,6 @@ func dataSourceAwsCodeCommitRepository() *schema.Resource { "repository_name": { Type: schema.TypeString, Required: true, - ForceNew: true, ValidateFunc: validation.StringLenBetween(0, 100), }, diff --git a/aws/data_source_aws_common_schema.go b/aws/data_source_aws_common_schema.go index b0535be3ac2..3c0b9c73813 100644 --- a/aws/data_source_aws_common_schema.go +++ b/aws/data_source_aws_common_schema.go @@ -26,7 +26,6 @@ func dataSourceFiltersSchema() *schema.Schema { return &schema.Schema{ Type: schema.TypeSet, Optional: true, - ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { diff --git a/aws/data_source_aws_customer_gateway.go b/aws/data_source_aws_customer_gateway.go index 748ec6ce0b9..27a01479cfc 100644 --- a/aws/data_source_aws_customer_gateway.go +++ b/aws/data_source_aws_customer_gateway.go @@ -41,6 +41,8 @@ func dataSourceAwsCustomerGateway() *schema.Resource { func dataSourceAwsCustomerGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + input := ec2.DescribeCustomerGatewaysInput{} if v, ok := d.GetOk("filter"); ok { @@ -84,7 +86,7 @@ func dataSourceAwsCustomerGatewayRead(d *schema.ResourceData, meta interface{}) d.Set("bgp_asn", int(asn)) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(cg.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(cg.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags for EC2 Customer Gateway %q: %s", aws.StringValue(cg.CustomerGatewayId), err) } diff --git a/aws/data_source_aws_db_cluster_snapshot.go b/aws/data_source_aws_db_cluster_snapshot.go index 9b6913baa66..d05205b1db2 100644 --- a/aws/data_source_aws_db_cluster_snapshot.go +++ b/aws/data_source_aws_db_cluster_snapshot.go @@ -112,6 +112,7 @@ func dataSourceAwsDbClusterSnapshot() *schema.Resource { func dataSourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig clusterIdentifier, clusterIdentifierOk := d.GetOk("db_cluster_identifier") snapshotIdentifier, snapshotIdentifierOk := d.GetOk("db_cluster_snapshot_identifier") @@ -185,7 +186,7 @@ func dataSourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for RDS DB Cluster Snapshot (%s): %s", d.Get("db_cluster_snapshot_arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_db_cluster_snapshot_test.go b/aws/data_source_aws_db_cluster_snapshot_test.go index b34ae28184f..7401069cb9f 100644 --- a/aws/data_source_aws_db_cluster_snapshot_test.go +++ b/aws/data_source_aws_db_cluster_snapshot_test.go @@ -118,7 +118,14 @@ func testAccCheckAwsDbClusterSnapshotDataSourceExists(dataSourceName string) res func testAccCheckAwsDbClusterSnapshotDataSourceConfig_DbClusterSnapshotIdentifier(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" @@ -169,7 +176,14 @@ data "aws_db_cluster_snapshot" "test" { func testAccCheckAwsDbClusterSnapshotDataSourceConfig_DbClusterIdentifier(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" @@ -220,7 +234,14 @@ data "aws_db_cluster_snapshot" "test" { func testAccCheckAwsDbClusterSnapshotDataSourceConfig_MostRecent(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" diff --git a/aws/data_source_aws_db_instance.go b/aws/data_source_aws_db_instance.go index 4251d183ae9..b99b8a6ac1f 100644 --- a/aws/data_source_aws_db_instance.go +++ b/aws/data_source_aws_db_instance.go @@ -18,7 +18,6 @@ func dataSourceAwsDbInstance() *schema.Resource { "db_instance_identifier": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "tags": tagsSchemaComputed(), @@ -218,6 +217,7 @@ func dataSourceAwsDbInstance() *schema.Resource { func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig opts := &rds.DescribeDBInstancesInput{ DBInstanceIdentifier: aws.String(d.Get("db_instance_identifier").(string)), @@ -242,7 +242,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error d.SetId(d.Get("db_instance_identifier").(string)) d.Set("allocated_storage", dbInstance.AllocatedStorage) - d.Set("auto_minor_upgrade_enabled", dbInstance.AutoMinorVersionUpgrade) + d.Set("auto_minor_version_upgrade", dbInstance.AutoMinorVersionUpgrade) d.Set("availability_zone", dbInstance.AvailabilityZone) d.Set("backup_retention_period", dbInstance.BackupRetentionPeriod) d.Set("db_cluster_identifier", dbInstance.DBClusterIdentifier) @@ -323,7 +323,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for RDS DB Instance (%s): %s", d.Get("db_instance_arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_db_instance_test.go b/aws/data_source_aws_db_instance_test.go index a7d1d7e17f7..12eda9aa902 100644 --- a/aws/data_source_aws_db_instance_test.go +++ b/aws/data_source_aws_db_instance_test.go @@ -20,6 +20,7 @@ func TestAccAWSDbInstanceDataSource_basic(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttrSet("data.aws_db_instance.bar", "address"), resource.TestCheckResourceAttrSet("data.aws_db_instance.bar", "allocated_storage"), + resource.TestCheckResourceAttrSet("data.aws_db_instance.bar", "auto_minor_version_upgrade"), resource.TestCheckResourceAttrSet("data.aws_db_instance.bar", "db_instance_class"), resource.TestCheckResourceAttrSet("data.aws_db_instance.bar", "db_name"), resource.TestCheckResourceAttrSet("data.aws_db_instance.bar", "db_subnet_group"), diff --git a/aws/data_source_aws_db_snapshot.go b/aws/data_source_aws_db_snapshot.go index 90688fbee27..5729d29941a 100644 --- a/aws/data_source_aws_db_snapshot.go +++ b/aws/data_source_aws_db_snapshot.go @@ -20,39 +20,33 @@ func dataSourceAwsDbSnapshot() *schema.Resource { "db_instance_identifier": { Type: schema.TypeString, Optional: true, - ForceNew: true, }, "db_snapshot_identifier": { Type: schema.TypeString, Optional: true, - ForceNew: true, }, "snapshot_type": { Type: schema.TypeString, Optional: true, - ForceNew: true, }, "include_shared": { Type: schema.TypeBool, Optional: true, - ForceNew: true, Default: false, }, "include_public": { Type: schema.TypeBool, Optional: true, - ForceNew: true, Default: false, }, "most_recent": { Type: schema.TypeBool, Optional: true, Default: false, - ForceNew: true, }, //Computed values returned diff --git a/aws/data_source_aws_directory_service_directory.go b/aws/data_source_aws_directory_service_directory.go index f43fe3c7b60..659c4279546 100644 --- a/aws/data_source_aws_directory_service_directory.go +++ b/aws/data_source_aws_directory_service_directory.go @@ -2,9 +2,10 @@ package aws import ( "fmt" + "log" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" - "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/directoryservice" @@ -55,6 +56,11 @@ func dataSourceAwsDirectoryServiceDirectory() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "availability_zones": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, }, }, @@ -63,6 +69,12 @@ func dataSourceAwsDirectoryServiceDirectory() *schema.Resource { Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "connect_ips": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, "customer_username": { Type: schema.TypeString, Computed: true, @@ -83,6 +95,11 @@ func dataSourceAwsDirectoryServiceDirectory() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "availability_zones": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, }, }, @@ -118,6 +135,7 @@ func dataSourceAwsDirectoryServiceDirectory() *schema.Resource { func dataSourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig directoryID := d.Get("directory_id").(string) out, err := conn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ @@ -152,8 +170,15 @@ func dataSourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta int d.Set("size", dir.Size) d.Set("edition", dir.Edition) d.Set("type", dir.Type) - d.Set("vpc_settings", flattenDSVpcSettings(dir.VpcSettings)) - d.Set("connect_settings", flattenDSConnectSettings(dir.DnsIpAddrs, dir.ConnectSettings)) + + if err := d.Set("vpc_settings", flattenDSVpcSettings(dir.VpcSettings)); err != nil { + return fmt.Errorf("error setting VPC settings: %s", err) + } + + if err := d.Set("connect_settings", flattenDSConnectSettings(dir.DnsIpAddrs, dir.ConnectSettings)); err != nil { + return fmt.Errorf("error setting connect settings: %s", err) + } + d.Set("enable_sso", dir.SsoEnabled) if aws.StringValue(dir.Type) == directoryservice.DirectoryTypeAdconnector { @@ -167,7 +192,7 @@ func dataSourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta int return fmt.Errorf("error listing tags for Directory Service Directory (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_directory_service_directory_test.go b/aws/data_source_aws_directory_service_directory_test.go index 05ba19318e3..768e6c25b1a 100644 --- a/aws/data_source_aws_directory_service_directory_test.go +++ b/aws/data_source_aws_directory_service_directory_test.go @@ -2,9 +2,10 @@ package aws import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "testing" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) @@ -70,10 +71,37 @@ func TestAccDataSourceAwsDirectoryServiceDirectory_MicrosoftAD(t *testing.T) { }) } +func TestAccDataSourceAWSDirectoryServiceDirectory_connector(t *testing.T) { + resourceName := "aws_directory_service_directory.connector" + dataSourceName := "data.aws_directory_service_directory.test-ad-connector" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSDirectoryService(t) + testAccPreCheckAWSDirectoryServiceSimpleDirectory(t) + }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceDirectoryServiceDirectoryConfig_connector, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(dataSourceName, "connect_settings.0.connect_ips", resourceName, "connect_settings.0.connect_ips"), + ), + }, + }, + }) +} + func testAccDataSourceAwsDirectoryServiceDirectoryConfig_Prerequisites(adType string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "main" { @@ -154,3 +182,67 @@ data "aws_directory_service_directory" "test-microsoft-ad" { } `, alias) } + +const testAccDataSourceDirectoryServiceDirectoryConfig_connector = ` +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_directory_service_directory" "test" { + name = "corp.notexample.com" + password = "SuperSecretPassw0rd" + size = "Small" + + vpc_settings { + vpc_id = "${aws_vpc.main.id}" + subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + } +} + +resource "aws_directory_service_directory" "connector" { + name = "corp.notexample.com" + password = "SuperSecretPassw0rd" + size = "Small" + type = "ADConnector" + + connect_settings { + customer_dns_ips = aws_directory_service_directory.test.dns_ip_addresses + customer_username = "Administrator" + vpc_id = "${aws_vpc.main.id}" + subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + } +} + +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" + tags = { + Name = "terraform-testacc-directory-service-directory-connector" + } +} + +resource "aws_subnet" "foo" { + vpc_id = "${aws_vpc.main.id}" + availability_zone = "${data.aws_availability_zones.available.names[0]}" + cidr_block = "10.0.1.0/24" + tags = { + Name = "tf-acc-directory-service-directory-connector-foo" + } +} +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.main.id}" + availability_zone = "${data.aws_availability_zones.available.names[1]}" + cidr_block = "10.0.2.0/24" + tags = { + Name = "tf-acc-directory-service-directory-connector-test" + } +} + +data "aws_directory_service_directory" "test-ad-connector" { + directory_id = "${aws_directory_service_directory.connector.id}" +} +` diff --git a/aws/data_source_aws_dynamodb_table.go b/aws/data_source_aws_dynamodb_table.go index 77594acee11..80aaead1e79 100644 --- a/aws/data_source_aws_dynamodb_table.go +++ b/aws/data_source_aws_dynamodb_table.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) func dataSourceAwsDynamoDbTable() *schema.Resource { @@ -161,6 +162,18 @@ func dataSourceAwsDynamoDbTable() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "replica": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "server_side_encryption": { Type: schema.TypeList, Optional: true, @@ -201,6 +214,7 @@ func dataSourceAwsDynamoDbTable() *schema.Resource { func dataSourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dynamodbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ TableName: aws.String(d.Get("name").(string)), @@ -227,11 +241,15 @@ func dataSourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("error setting ttl: %s", err) } - tags, err := readDynamoDbTableTags(d.Get("arn").(string), conn) - if err != nil { - return err + tags, err := keyvaluetags.DynamodbListTags(conn, d.Get("arn").(string)) + + if err != nil && !isAWSErr(err, "UnknownOperationException", "Tagging is not currently supported in DynamoDB Local.") { + return fmt.Errorf("error listing tags for DynamoDB Table (%s): %s", d.Get("arn").(string), err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } - d.Set("tags", tags) pitrOut, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ TableName: aws.String(d.Id()), diff --git a/aws/data_source_aws_ebs_snapshot.go b/aws/data_source_aws_ebs_snapshot.go index 2d7fc22f952..5bd91216a67 100644 --- a/aws/data_source_aws_ebs_snapshot.go +++ b/aws/data_source_aws_ebs_snapshot.go @@ -22,24 +22,20 @@ func dataSourceAwsEbsSnapshot() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: false, - ForceNew: true, }, "owners": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "snapshot_ids": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "restorable_by_user_ids": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, //Computed values returned @@ -90,6 +86,7 @@ func dataSourceAwsEbsSnapshot() *schema.Resource { func dataSourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig restorableUsers, restorableUsersOk := d.GetOk("restorable_by_user_ids") filters, filtersOk := d.GetOk("filter") @@ -135,10 +132,10 @@ func dataSourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) erro } //Single Snapshot found so set to state - return snapshotDescriptionAttributes(d, resp.Snapshots[0]) + return snapshotDescriptionAttributes(d, resp.Snapshots[0], ignoreTagsConfig) } -func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapshot) error { +func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapshot, ignoreTagsConfig *keyvaluetags.IgnoreConfig) error { d.SetId(*snapshot.SnapshotId) d.Set("snapshot_id", snapshot.SnapshotId) d.Set("volume_id", snapshot.VolumeId) @@ -151,7 +148,7 @@ func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapsho d.Set("owner_id", snapshot.OwnerId) d.Set("owner_alias", snapshot.OwnerAlias) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(snapshot.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(snapshot.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ebs_snapshot_ids.go b/aws/data_source_aws_ebs_snapshot_ids.go index 03b014ca73a..7f23ed3816a 100644 --- a/aws/data_source_aws_ebs_snapshot_ids.go +++ b/aws/data_source_aws_ebs_snapshot_ids.go @@ -20,13 +20,11 @@ func dataSourceAwsEbsSnapshotIds() *schema.Resource { "owners": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "restorable_by_user_ids": { Type: schema.TypeList, Optional: true, - ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "ids": { diff --git a/aws/data_source_aws_ebs_snapshot_test.go b/aws/data_source_aws_ebs_snapshot_test.go index 8a02456f7fb..b1bd08121b3 100644 --- a/aws/data_source_aws_ebs_snapshot_test.go +++ b/aws/data_source_aws_ebs_snapshot_test.go @@ -88,7 +88,14 @@ func testAccCheckAwsEbsSnapshotDataSourceID(n string) resource.TestCheckFunc { } const testAccCheckAwsEbsSnapshotDataSourceConfig = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -106,7 +113,14 @@ data "aws_ebs_snapshot" "test" { ` const testAccCheckAwsEbsSnapshotDataSourceConfigFilter = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -127,7 +141,14 @@ data "aws_ebs_snapshot" "test" { ` const testAccCheckAwsEbsSnapshotDataSourceConfigMostRecent = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" diff --git a/aws/data_source_aws_ebs_volume.go b/aws/data_source_aws_ebs_volume.go index df47570a16a..d103ccdc38f 100644 --- a/aws/data_source_aws_ebs_volume.go +++ b/aws/data_source_aws_ebs_volume.go @@ -21,7 +21,6 @@ func dataSourceAwsEbsVolume() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: false, - ForceNew: true, }, "arn": { Type: schema.TypeString, @@ -39,6 +38,10 @@ func dataSourceAwsEbsVolume() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "multi_attach_enabled": { + Type: schema.TypeBool, + Computed: true, + }, "volume_type": { Type: schema.TypeString, Computed: true, @@ -55,6 +58,10 @@ func dataSourceAwsEbsVolume() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "outpost_arn": { + Type: schema.TypeString, + Computed: true, + }, "volume_id": { Type: schema.TypeString, Computed: true, @@ -141,8 +148,10 @@ func volumeDescriptionAttributes(d *schema.ResourceData, client *AWSClient, volu d.Set("size", volume.Size) d.Set("snapshot_id", volume.SnapshotId) d.Set("volume_type", volume.VolumeType) + d.Set("outpost_arn", volume.OutpostArn) + d.Set("multi_attach_enabled", volume.MultiAttachEnabled) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(volume.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(volume.Tags).IgnoreAws().IgnoreConfig(client.IgnoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ebs_volume_test.go b/aws/data_source_aws_ebs_volume_test.go index 3539896872a..53add3c5dab 100644 --- a/aws/data_source_aws_ebs_volume_test.go +++ b/aws/data_source_aws_ebs_volume_test.go @@ -9,6 +9,9 @@ import ( ) func TestAccAWSEbsVolumeDataSource_basic(t *testing.T) { + resourceName := "aws_ebs_volume.test" + dataSourceName := "data.aws_ebs_volume.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -16,11 +19,12 @@ func TestAccAWSEbsVolumeDataSource_basic(t *testing.T) { { Config: testAccCheckAwsEbsVolumeDataSourceConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEbsVolumeDataSourceID("data.aws_ebs_volume.ebs_volume"), - resource.TestCheckResourceAttrSet("data.aws_ebs_volume.ebs_volume", "arn"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "size", "40"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "tags.%", "1"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "tags.Name", "External Volume"), + testAccCheckAwsEbsVolumeDataSourceID(dataSourceName), + resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(dataSourceName, "size", resourceName, "size"), + resource.TestCheckResourceAttrPair(dataSourceName, "tags", resourceName, "tags"), + resource.TestCheckResourceAttrPair(dataSourceName, "outpost_arn", resourceName, "outpost_arn"), + resource.TestCheckResourceAttrPair(dataSourceName, "multi_attach_enabled", resourceName, "multi_attach_enabled"), ), }, }, @@ -28,6 +32,9 @@ func TestAccAWSEbsVolumeDataSource_basic(t *testing.T) { } func TestAccAWSEbsVolumeDataSource_multipleFilters(t *testing.T) { + resourceName := "aws_ebs_volume.test" + dataSourceName := "data.aws_ebs_volume.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -35,11 +42,10 @@ func TestAccAWSEbsVolumeDataSource_multipleFilters(t *testing.T) { { Config: testAccCheckAwsEbsVolumeDataSourceConfigWithMultipleFilters, Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEbsVolumeDataSourceID("data.aws_ebs_volume.ebs_volume"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "size", "10"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "volume_type", "gp2"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "tags.%", "1"), - resource.TestCheckResourceAttr("data.aws_ebs_volume.ebs_volume", "tags.Name", "External Volume 1"), + testAccCheckAwsEbsVolumeDataSourceID(dataSourceName), + resource.TestCheckResourceAttrPair(dataSourceName, "size", resourceName, "size"), + resource.TestCheckResourceAttr(dataSourceName, "volume_type", "gp2"), + resource.TestCheckResourceAttrPair(dataSourceName, "tags", resourceName, "tags"), ), }, }, @@ -61,9 +67,16 @@ func testAccCheckAwsEbsVolumeDataSourceID(n string) resource.TestCheckFunc { } const testAccCheckAwsEbsVolumeDataSourceConfig = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} -resource "aws_ebs_volume" "example" { +resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "gp2" size = 40 @@ -72,7 +85,7 @@ resource "aws_ebs_volume" "example" { } } -data "aws_ebs_volume" "ebs_volume" { +data "aws_ebs_volume" "test" { most_recent = true filter { name = "tag:Name" @@ -80,15 +93,22 @@ data "aws_ebs_volume" "ebs_volume" { } filter { name = "volume-type" - values = ["${aws_ebs_volume.example.type}"] + values = ["${aws_ebs_volume.test.type}"] } } ` const testAccCheckAwsEbsVolumeDataSourceConfigWithMultipleFilters = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} -resource "aws_ebs_volume" "external1" { +resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "gp2" size = 10 @@ -97,7 +117,7 @@ resource "aws_ebs_volume" "external1" { } } -data "aws_ebs_volume" "ebs_volume" { +data "aws_ebs_volume" "test" { most_recent = true filter { name = "tag:Name" @@ -105,11 +125,11 @@ data "aws_ebs_volume" "ebs_volume" { } filter { name = "size" - values = ["${aws_ebs_volume.external1.size}"] + values = ["${aws_ebs_volume.test.size}"] } filter { name = "volume-type" - values = ["${aws_ebs_volume.external1.type}"] + values = ["${aws_ebs_volume.test.type}"] } } ` diff --git a/aws/data_source_aws_ec2_coip_pool.go b/aws/data_source_aws_ec2_coip_pool.go new file mode 100644 index 00000000000..cdbb9f8d184 --- /dev/null +++ b/aws/data_source_aws_ec2_coip_pool.go @@ -0,0 +1,105 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2CoipPool() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2CoipPoolRead, + + Schema: map[string]*schema.Schema{ + "local_gateway_route_table_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "pool_cidrs": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + Set: schema.HashString, + }, + + "pool_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "tags": tagsSchemaComputed(), + + "filter": ec2CustomFiltersSchema(), + }, + } +} + +func dataSourceAwsEc2CoipPoolRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + req := &ec2.DescribeCoipPoolsInput{} + + if v, ok := d.GetOk("pool_id"); ok { + req.PoolIds = []*string{aws.String(v.(string))} + } + + filters := map[string]string{} + + if v, ok := d.GetOk("local_gateway_route_table_id"); ok { + filters["coip-pool.local-gateway-route-table-id"] = v.(string) + } + + req.Filters = buildEC2AttributeFilterList(filters) + + if tags, tagsOk := d.GetOk("tags"); tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + keyvaluetags.New(tags.(map[string]interface{})).Ec2Tags(), + )...) + } + + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] Reading AWS COIP Pool: %s", req) + resp, err := conn.DescribeCoipPools(req) + if err != nil { + return fmt.Errorf("error describing EC2 COIP Pools: %w", err) + } + if resp == nil || len(resp.CoipPools) == 0 { + return fmt.Errorf("no matching COIP Pool found") + } + if len(resp.CoipPools) > 1 { + return fmt.Errorf("multiple Coip Pools matched; use additional constraints to reduce matches to a single COIP Pool") + } + + coip := resp.CoipPools[0] + + d.SetId(aws.StringValue(coip.PoolId)) + + d.Set("local_gateway_route_table_id", coip.LocalGatewayRouteTableId) + + if err := d.Set("pool_cidrs", aws.StringValueSlice(coip.PoolCidrs)); err != nil { + return fmt.Errorf("error setting pool_cidrs: %s", err) + } + + d.Set("pool_id", coip.PoolId) + + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(coip.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_ec2_coip_pool_test.go b/aws/data_source_aws_ec2_coip_pool_test.go new file mode 100644 index 00000000000..607882a7b7f --- /dev/null +++ b/aws/data_source_aws_ec2_coip_pool_test.go @@ -0,0 +1,88 @@ +package aws + +import ( + "os" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAwsEc2CoipPool_Filter(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_coip_pool.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2CoipPoolDataSourceConfigFilter(), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_route_table_id", regexp.MustCompile(`^lgw-rtb-`)), + resource.TestMatchResourceAttr(dataSourceName, "pool_id", regexp.MustCompile(`^ipv4pool-coip-`)), + testCheckResourceAttrGreaterThanValue(dataSourceName, "pool_cidrs.#", "0"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsEc2CoipPool_Id(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_coip_pool.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2CoipPoolDataSourceConfigId(), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_route_table_id", regexp.MustCompile(`^lgw-rtb-`)), + resource.TestMatchResourceAttr(dataSourceName, "pool_id", regexp.MustCompile(`^ipv4pool-coip-`)), + testCheckResourceAttrGreaterThanValue(dataSourceName, "pool_cidrs.#", "0"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEc2CoipPoolDataSourceConfigFilter() string { + return ` +data "aws_ec2_coip_pools" "test" {} + +data "aws_ec2_coip_pool" "test" { + filter { + name = "coip-pool.pool-id" + values = [tolist(data.aws_ec2_coip_pools.test.pool_ids)[0]] + } +} +` +} + +func testAccDataSourceAwsEc2CoipPoolDataSourceConfigId() string { + return ` +data "aws_ec2_coip_pools" "test" {} + +data "aws_ec2_coip_pool" "test" { + pool_id = tolist(data.aws_ec2_coip_pools.test.pool_ids)[0] +} +` +} diff --git a/aws/data_source_aws_ec2_coip_pools.go b/aws/data_source_aws_ec2_coip_pools.go new file mode 100644 index 00000000000..fcd9904a9a8 --- /dev/null +++ b/aws/data_source_aws_ec2_coip_pools.go @@ -0,0 +1,75 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2CoipPools() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2CoipPoolsRead, + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "pool_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsEc2CoipPoolsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeCoipPoolsInput{} + + if tags, tagsOk := d.GetOk("tags"); tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + keyvaluetags.New(tags.(map[string]interface{})).Ec2Tags(), + )...) + } + + if filters, filtersOk := d.GetOk("filter"); filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeCoipPools %s\n", req) + resp, err := conn.DescribeCoipPools(req) + if err != nil { + return fmt.Errorf("error describing EC2 COIP Pools: %w", err) + } + + if resp == nil || len(resp.CoipPools) == 0 { + return fmt.Errorf("no matching Coip Pool found") + } + + coippools := make([]string, 0) + + for _, coippool := range resp.CoipPools { + coippools = append(coippools, aws.StringValue(coippool.PoolId)) + } + + d.SetId(time.Now().UTC().String()) + if err := d.Set("pool_ids", coippools); err != nil { + return fmt.Errorf("Error setting coip pool ids: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_ec2_coip_pools_test.go b/aws/data_source_aws_ec2_coip_pools_test.go new file mode 100644 index 00000000000..7263de157d5 --- /dev/null +++ b/aws/data_source_aws_ec2_coip_pools_test.go @@ -0,0 +1,79 @@ +package aws + +import ( + "os" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAwsEc2CoipPools_basic(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_coip_pools.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2CoipPoolsConfig(), + Check: resource.ComposeTestCheckFunc( + testCheckResourceAttrGreaterThanValue(dataSourceName, "pool_ids.#", "0"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsEc2CoipPools_Filter(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_coip_pools.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2CoipPoolsConfigFilter(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "pool_ids.#", "1"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEc2CoipPoolsConfig() string { + return ` +data "aws_ec2_coip_pools" "test" {} +` +} + +func testAccDataSourceAwsEc2CoipPoolsConfigFilter() string { + return ` +data "aws_ec2_coip_pools" "all" {} + +data "aws_ec2_coip_pools" "test" { + filter { + name = "coip-pool.pool-id" + values = [tolist(data.aws_ec2_coip_pools.all.pool_ids)[0]] + } +} +` +} diff --git a/aws/data_source_aws_ec2_instance_type_offering_test.go b/aws/data_source_aws_ec2_instance_type_offering_test.go index 5da0f721ed4..e19de44bd1b 100644 --- a/aws/data_source_aws_ec2_instance_type_offering_test.go +++ b/aws/data_source_aws_ec2_instance_type_offering_test.go @@ -100,6 +100,11 @@ func testAccAWSEc2InstanceTypeOfferingDataSourceConfigLocationType() string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } # Rather than hardcode an instance type in the testing, diff --git a/aws/data_source_aws_ec2_instance_type_offerings_test.go b/aws/data_source_aws_ec2_instance_type_offerings_test.go index f81bcd5872f..2f42bfb32fd 100644 --- a/aws/data_source_aws_ec2_instance_type_offerings_test.go +++ b/aws/data_source_aws_ec2_instance_type_offerings_test.go @@ -94,6 +94,11 @@ func testAccAWSEc2InstanceTypeOfferingsDataSourceConfigLocationType() string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_ec2_instance_type_offerings" "test" { diff --git a/aws/data_source_aws_ec2_local_gateway.go b/aws/data_source_aws_ec2_local_gateway.go new file mode 100644 index 00000000000..8fcbbe87814 --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateway.go @@ -0,0 +1,101 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2LocalGateway() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2LocalGatewayRead, + + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "outpost_arn": { + Type: schema.TypeString, + Computed: true, + }, + + "filter": ec2CustomFiltersSchema(), + + "state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "tags": tagsSchemaComputed(), + + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsEc2LocalGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + req := &ec2.DescribeLocalGatewaysInput{} + + if v, ok := d.GetOk("id"); ok { + req.LocalGatewayIds = []*string{aws.String(v.(string))} + } + + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "state": d.Get("state").(string), + }, + ) + + if tags, tagsOk := d.GetOk("tags"); tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + keyvaluetags.New(tags.(map[string]interface{})).Ec2Tags(), + )...) + } + + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] Reading AWS LOCAL GATEWAY: %s", req) + resp, err := conn.DescribeLocalGateways(req) + if err != nil { + return fmt.Errorf("error describing EC2 Local Gateways: %w", err) + } + if resp == nil || len(resp.LocalGateways) == 0 { + return fmt.Errorf("no matching Local Gateway found") + } + if len(resp.LocalGateways) > 1 { + return fmt.Errorf("multiple Local Gateways matched; use additional constraints to reduce matches to a single Local Gateway") + } + + localGateway := resp.LocalGateways[0] + + d.SetId(aws.StringValue(localGateway.LocalGatewayId)) + d.Set("outpost_arn", localGateway.OutpostArn) + d.Set("owner_id", localGateway.OwnerId) + d.Set("state", localGateway.State) + + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(localGateway.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_ec2_local_gateway_route_table.go b/aws/data_source_aws_ec2_local_gateway_route_table.go new file mode 100644 index 00000000000..7cf755b8a36 --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateway_route_table.go @@ -0,0 +1,104 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2LocalGatewayRouteTable() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2LocalGatewayRouteTableRead, + + Schema: map[string]*schema.Schema{ + "local_gateway_route_table_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "local_gateway_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "outpost_arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "tags": tagsSchemaComputed(), + + "filter": ec2CustomFiltersSchema(), + }, + } +} + +func dataSourceAwsEc2LocalGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + req := &ec2.DescribeLocalGatewayRouteTablesInput{} + + if v, ok := d.GetOk("local_gateway_route_table_id"); ok { + req.LocalGatewayRouteTableIds = []*string{aws.String(v.(string))} + } + + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "local-gateway-id": d.Get("local_gateway_id").(string), + "outpost-arn": d.Get("outpost_arn").(string), + "state": d.Get("state").(string), + }, + ) + + req.Filters = append(req.Filters, buildEC2TagFilterList( + keyvaluetags.New(d.Get("tags").(map[string]interface{})).Ec2Tags(), + )...) + + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] Reading AWS Local Gateway Route Table: %s", req) + resp, err := conn.DescribeLocalGatewayRouteTables(req) + if err != nil { + return fmt.Errorf("error describing EC2 Local Gateway Route Tables: %w", err) + } + if resp == nil || len(resp.LocalGatewayRouteTables) == 0 { + return fmt.Errorf("no matching Local Gateway Route Table found") + } + if len(resp.LocalGatewayRouteTables) > 1 { + return fmt.Errorf("multiple Local Gateway Route Tables matched; use additional constraints to reduce matches to a single Local Gateway Route Table") + } + + localgatewayroutetable := resp.LocalGatewayRouteTables[0] + + d.SetId(aws.StringValue(localgatewayroutetable.LocalGatewayRouteTableId)) + d.Set("local_gateway_id", localgatewayroutetable.LocalGatewayId) + d.Set("local_gateway_route_table_id", localgatewayroutetable.LocalGatewayRouteTableId) + d.Set("outpost_arn", localgatewayroutetable.OutpostArn) + d.Set("state", localgatewayroutetable.State) + + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(localgatewayroutetable.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_ec2_local_gateway_route_table_test.go b/aws/data_source_aws_ec2_local_gateway_route_table_test.go new file mode 100644 index 00000000000..a413f1cf582 --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateway_route_table_test.go @@ -0,0 +1,165 @@ +package aws + +import ( + "fmt" + "os" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAwsEc2LocalGatewayRouteTable_basic(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway_route_table.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayRouteTableConfigLocalGatewayRouteTableId(), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_id", regexp.MustCompile(`^lgw-`)), + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_route_table_id", regexp.MustCompile(`^lgw-rtb-`)), + resource.TestCheckResourceAttr(dataSourceName, "outpost_arn", outpostArn), + resource.TestCheckResourceAttr(dataSourceName, "state", "available"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsEc2LocalGatewayRouteTable_Filter(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway_route_table.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayRouteTableConfigFilter(outpostArn), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_id", regexp.MustCompile(`^lgw-`)), + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_route_table_id", regexp.MustCompile(`^lgw-rtb-`)), + resource.TestCheckResourceAttr(dataSourceName, "outpost_arn", outpostArn), + resource.TestCheckResourceAttr(dataSourceName, "state", "available"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsEc2LocalGatewayRouteTable_LocalGatewayId(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway_route_table.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayRouteTableConfigLocalGatewayId(), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_id", regexp.MustCompile(`^lgw-`)), + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_route_table_id", regexp.MustCompile(`^lgw-rtb-`)), + resource.TestCheckResourceAttr(dataSourceName, "outpost_arn", outpostArn), + resource.TestCheckResourceAttr(dataSourceName, "state", "available"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsEc2LocalGatewayRouteTable_OutpostArn(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway_route_table.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayRouteTableConfigOutpostArn(outpostArn), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_id", regexp.MustCompile(`^lgw-`)), + resource.TestMatchResourceAttr(dataSourceName, "local_gateway_route_table_id", regexp.MustCompile(`^lgw-rtb-`)), + resource.TestCheckResourceAttr(dataSourceName, "outpost_arn", outpostArn), + resource.TestCheckResourceAttr(dataSourceName, "state", "available"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEc2LocalGatewayRouteTableConfigFilter(outpostArn string) string { + return fmt.Sprintf(` +data "aws_ec2_local_gateway_route_table" "test" { + filter { + name = "outpost-arn" + values = [%[1]q] + } +} +`, outpostArn) +} + +func testAccDataSourceAwsEc2LocalGatewayRouteTableConfigLocalGatewayId() string { + return ` +data "aws_ec2_local_gateways" "test" {} + +data "aws_ec2_local_gateway_route_table" "test" { + local_gateway_id = tolist(data.aws_ec2_local_gateways.test.ids)[0] +} +` +} + +func testAccDataSourceAwsEc2LocalGatewayRouteTableConfigLocalGatewayRouteTableId() string { + return ` +data "aws_ec2_local_gateway_route_tables" "test" {} + +data "aws_ec2_local_gateway_route_table" "test" { + local_gateway_route_table_id = tolist(data.aws_ec2_local_gateway_route_tables.test.ids)[0] +} +` +} + +func testAccDataSourceAwsEc2LocalGatewayRouteTableConfigOutpostArn(outpostArn string) string { + return fmt.Sprintf(` +data "aws_ec2_local_gateway_route_table" "test" { + outpost_arn = %[1]q +} +`, outpostArn) +} diff --git a/aws/data_source_aws_ec2_local_gateway_route_tables.go b/aws/data_source_aws_ec2_local_gateway_route_tables.go new file mode 100644 index 00000000000..44391d85643 --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateway_route_tables.go @@ -0,0 +1,71 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2LocalGatewayRouteTables() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2LocalGatewayRouteTablesRead, + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsEc2LocalGatewayRouteTablesRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeLocalGatewayRouteTablesInput{} + + req.Filters = append(req.Filters, buildEC2TagFilterList( + keyvaluetags.New(d.Get("tags").(map[string]interface{})).Ec2Tags(), + )...) + + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeLocalGatewayRouteTables %s\n", req) + resp, err := conn.DescribeLocalGatewayRouteTables(req) + if err != nil { + return fmt.Errorf("error describing EC2 Local Gateway Route Tables: %w", err) + } + + if resp == nil || len(resp.LocalGatewayRouteTables) == 0 { + return fmt.Errorf("no matching Local Gateway Route Table found") + } + + localgatewayroutetables := make([]string, 0) + + for _, localgatewayroutetable := range resp.LocalGatewayRouteTables { + localgatewayroutetables = append(localgatewayroutetables, aws.StringValue(localgatewayroutetable.LocalGatewayRouteTableId)) + } + + d.SetId(time.Now().UTC().String()) + if err := d.Set("ids", localgatewayroutetables); err != nil { + return fmt.Errorf("Error setting local gateway route table ids: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_ec2_local_gateway_route_tables_test.go b/aws/data_source_aws_ec2_local_gateway_route_tables_test.go new file mode 100644 index 00000000000..8fabaf99170 --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateway_route_tables_test.go @@ -0,0 +1,79 @@ +package aws + +import ( + "os" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAwsEc2LocalGatewayRouteTables_basic(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway_route_tables.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayRouteTablesConfig(), + Check: resource.ComposeTestCheckFunc( + testCheckResourceAttrGreaterThanValue(dataSourceName, "ids.#", "0"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsEc2LocalGatewayRouteTables_Filter(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway_route_tables.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayRouteTablesConfigFilter(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "ids.#", "1"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEc2LocalGatewayRouteTablesConfig() string { + return ` +data "aws_ec2_local_gateway_route_tables" "test" {} +` +} + +func testAccDataSourceAwsEc2LocalGatewayRouteTablesConfigFilter() string { + return ` +data "aws_ec2_local_gateway_route_tables" "all" {} + +data "aws_ec2_local_gateway_route_tables" "test" { + filter { + name = "local-gateway-route-table-id" + values = [tolist(data.aws_ec2_local_gateway_route_tables.all.ids)[0]] + } +} +` +} diff --git a/aws/data_source_aws_ec2_local_gateway_test.go b/aws/data_source_aws_ec2_local_gateway_test.go new file mode 100644 index 00000000000..972a8f0c9bd --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateway_test.go @@ -0,0 +1,48 @@ +package aws + +import ( + "os" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAwsEc2LocalGateway_basic(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateway.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewayConfigId(), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "id", regexp.MustCompile(`^lgw-`)), + resource.TestCheckResourceAttr(dataSourceName, "outpost_arn", outpostArn), + testAccCheckResourceAttrAccountID(dataSourceName, "owner_id"), + resource.TestCheckResourceAttr(dataSourceName, "state", "available"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEc2LocalGatewayConfigId() string { + return ` +data "aws_ec2_local_gateways" "test" {} + +data "aws_ec2_local_gateway" "test" { + id = tolist(data.aws_ec2_local_gateways.test.ids)[0] +} +` +} diff --git a/aws/data_source_aws_ec2_local_gateways.go b/aws/data_source_aws_ec2_local_gateways.go new file mode 100644 index 00000000000..eba1a867ddf --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateways.go @@ -0,0 +1,75 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2LocalGateways() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2LocalGatewaysRead, + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsEc2LocalGatewaysRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeLocalGatewaysInput{} + + if tags, tagsOk := d.GetOk("tags"); tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + keyvaluetags.New(tags.(map[string]interface{})).Ec2Tags(), + )...) + } + + if filters, filtersOk := d.GetOk("filter"); filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeLocalGateways %s\n", req) + resp, err := conn.DescribeLocalGateways(req) + if err != nil { + return fmt.Errorf("error describing EC2 Local Gateways: %w", err) + } + + if resp == nil || len(resp.LocalGateways) == 0 { + return fmt.Errorf("no matching Local Gateways found") + } + + localgateways := make([]string, 0) + + for _, localgateway := range resp.LocalGateways { + localgateways = append(localgateways, aws.StringValue(localgateway.LocalGatewayId)) + } + + d.SetId(time.Now().UTC().String()) + if err := d.Set("ids", localgateways); err != nil { + return fmt.Errorf("Error setting local gateway ids: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_ec2_local_gateways_test.go b/aws/data_source_aws_ec2_local_gateways_test.go new file mode 100644 index 00000000000..7e8079739c0 --- /dev/null +++ b/aws/data_source_aws_ec2_local_gateways_test.go @@ -0,0 +1,40 @@ +package aws + +import ( + "os" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAwsEc2LocalGateways_basic(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + dataSourceName := "data.aws_ec2_local_gateways.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsEc2LocalGatewaysConfig(), + Check: resource.ComposeTestCheckFunc( + testCheckResourceAttrGreaterThanValue(dataSourceName, "ids.#", "0"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEc2LocalGatewaysConfig() string { + return ` +data "aws_ec2_local_gateways" "test" {} +` +} diff --git a/aws/data_source_aws_ec2_transit_gateway.go b/aws/data_source_aws_ec2_transit_gateway.go index a11a6f44b20..4c092513bad 100644 --- a/aws/data_source_aws_ec2_transit_gateway.go +++ b/aws/data_source_aws_ec2_transit_gateway.go @@ -72,6 +72,7 @@ func dataSourceAwsEc2TransitGateway() *schema.Resource { func dataSourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ec2.DescribeTransitGatewaysInput{} @@ -119,7 +120,7 @@ func dataSourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{} d.Set("owner_id", transitGateway.OwnerId) d.Set("propagation_default_route_table_id", transitGateway.Options.PropagationDefaultRouteTableId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGateway.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGateway.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment.go b/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment.go index 37f83b28a9a..0c6dac6f884 100644 --- a/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment.go +++ b/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment.go @@ -18,36 +18,55 @@ func dataSourceAwsEc2TransitGatewayDxGatewayAttachment() *schema.Resource { Schema: map[string]*schema.Schema{ "dx_gateway_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, "tags": tagsSchemaComputed(), "transit_gateway_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, + "filter": dataSourceFiltersSchema(), }, } } func dataSourceAwsEc2TransitGatewayDxGatewayAttachmentRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + dxGatewayId, dxGatewayIdOk := d.GetOk("dx_gateway_id") + transitGatewayId, transitGatewayIdOk := d.GetOk("transit_gateway_id") input := &ec2.DescribeTransitGatewayAttachmentsInput{ Filters: []*ec2.Filter{ - { - Name: aws.String("resource-id"), - Values: []*string{aws.String(d.Get("dx_gateway_id").(string))}, - }, { Name: aws.String("resource-type"), - Values: []*string{aws.String("direct-connect-gateway")}, // Not yet defined in ec2/api.go. - }, - { - Name: aws.String("transit-gateway-id"), - Values: []*string{aws.String(d.Get("transit_gateway_id").(string))}, + Values: []*string{aws.String(ec2.TransitGatewayAttachmentResourceTypeDirectConnectGateway)}, }, }, } + if filtersOk { + input.Filters = append(input.Filters, buildAwsDataSourceFilters(filters.(*schema.Set))...) + } + if tagsOk { + input.Filters = append(input.Filters, ec2TagFiltersFromMap(tags.(map[string]interface{}))...) + } + // to preserve original functionality + if dxGatewayIdOk { + input.Filters = append(input.Filters, &ec2.Filter{ + Name: aws.String("resource-id"), + Values: []*string{aws.String(dxGatewayId.(string))}, + }) + } + + if transitGatewayIdOk { + input.Filters = append(input.Filters, &ec2.Filter{ + Name: aws.String("transit-gateway-id"), + Values: []*string{aws.String(transitGatewayId.(string))}, + }) + } log.Printf("[DEBUG] Reading EC2 Transit Gateway Direct Connect Gateway Attachments: %s", input) output, err := conn.DescribeTransitGatewayAttachments(input) @@ -66,7 +85,7 @@ func dataSourceAwsEc2TransitGatewayDxGatewayAttachmentRead(d *schema.ResourceDat transitGatewayAttachment := output.TransitGatewayAttachments[0] - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayAttachment.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment_test.go b/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment_test.go index 323142186f0..adf5af3a8eb 100644 --- a/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment_test.go +++ b/aws/data_source_aws_ec2_transit_gateway_dx_gateway_attachment_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSEc2TransitGatewayDxGatewayAttachmentDataSource_TransitGatewayIdAndDxGatewayId(t *testing.T) { - rName := fmt.Sprintf("terraform-testacc-tgwdxgwattach-%d", acctest.RandInt()) + rName := acctest.RandomWithPrefix("tf-acc-test") rBgpAsn := randIntRange(64512, 65534) dataSourceName := "data.aws_ec2_transit_gateway_dx_gateway_attachment.test" transitGatewayResourceName := "aws_ec2_transit_gateway.test" @@ -24,7 +24,7 @@ func TestAccAWSEc2TransitGatewayDxGatewayAttachmentDataSource_TransitGatewayIdAn CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigTransitGatewayIdAndDxGatewayId(rName, rBgpAsn), + Config: testAccAWSEc2TransitGatewayDxAttachmentDataSourceConfig(rName, rBgpAsn), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"), resource.TestCheckResourceAttrPair(dataSourceName, "transit_gateway_id", transitGatewayResourceName, "id"), @@ -35,7 +35,34 @@ func TestAccAWSEc2TransitGatewayDxGatewayAttachmentDataSource_TransitGatewayIdAn }) } -func testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigTransitGatewayIdAndDxGatewayId(rName string, rBgpAsn int) string { +func TestAccAWSEc2TransitGatewayDxGatewayAttachmentDataSource_filter(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + rBgpAsn := randIntRange(64512, 65534) + dataSourceName := "data.aws_ec2_transit_gateway_dx_gateway_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + dxGatewayResourceName := "aws_dx_gateway.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayDxAttachmentDataSourceConfigFilter(rName, rBgpAsn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(dataSourceName, "transit_gateway_id", transitGatewayResourceName, "id"), + resource.TestCheckResourceAttrPair(dataSourceName, "dx_gateway_id", dxGatewayResourceName, "id"), + ), + }, + }, + }) +} + +func testAccAWSEc2TransitGatewayDxAttachmentDataSourceConfig(rName string, rBgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_gateway" "test" { name = %[1]q @@ -64,3 +91,35 @@ data "aws_ec2_transit_gateway_dx_gateway_attachment" "test" { } `, rName, rBgpAsn) } + +func testAccAWSEc2TransitGatewayDxAttachmentDataSourceConfigFilter(rName string, rBgpAsn int) string { + return fmt.Sprintf(` +resource "aws_dx_gateway" "test" { + name = %[1]q + amazon_side_asn = "%[2]d" +} + +resource "aws_ec2_transit_gateway" "test" { + tags = { + Name = %[1]q + } +} + +resource "aws_dx_gateway_association" "test" { + dx_gateway_id = "${aws_dx_gateway.test.id}" + associated_gateway_id = "${aws_ec2_transit_gateway.test.id}" + + allowed_prefixes = [ + "10.255.255.0/30", + "10.255.255.8/30", + ] +} + +data "aws_ec2_transit_gateway_dx_gateway_attachment" "test" { + filter { + name = "resource-id" + values = ["${aws_dx_gateway_association.test.dx_gateway_id}"] + } +} +`, rName, rBgpAsn) +} diff --git a/aws/data_source_aws_ec2_transit_gateway_peering_attachment.go b/aws/data_source_aws_ec2_transit_gateway_peering_attachment.go new file mode 100644 index 00000000000..2b00ec2b48b --- /dev/null +++ b/aws/data_source_aws_ec2_transit_gateway_peering_attachment.go @@ -0,0 +1,105 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEc2TransitGatewayPeeringAttachment() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEc2TransitGatewayPeeringAttachmentRead, + + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + "id": { + Type: schema.TypeString, + Optional: true, + }, + "peer_account_id": { + Type: schema.TypeString, + Computed: true, + }, + "peer_region": { + Type: schema.TypeString, + Computed: true, + }, + "peer_transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + "transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsEc2TransitGatewayPeeringAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + input := &ec2.DescribeTransitGatewayPeeringAttachmentsInput{} + + if v, ok := d.GetOk("id"); ok { + input.TransitGatewayAttachmentIds = aws.StringSlice([]string{v.(string)}) + } + + input.Filters = buildEC2CustomFilterList(d.Get("filter").(*schema.Set)) + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + input.Filters = append(input.Filters, ec2TagFiltersFromMap(v)...) + } + if len(input.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + input.Filters = nil + } + + log.Printf("[DEBUG] Reading EC2 Transit Gateway Peering Attachments: %s", input) + output, err := conn.DescribeTransitGatewayPeeringAttachments(input) + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Peering Attachments: %s", err) + } + + if output == nil || len(output.TransitGatewayPeeringAttachments) == 0 { + return errors.New("error reading EC2 Transit Gateway Peering Attachment: no results found") + } + + if len(output.TransitGatewayPeeringAttachments) > 1 { + return errors.New("error reading EC2 Transit Gateway Peering Attachment: multiple results found, try adjusting search criteria") + } + + transitGatewayPeeringAttachment := output.TransitGatewayPeeringAttachments[0] + + if transitGatewayPeeringAttachment == nil { + return errors.New("error reading EC2 Transit Gateway Peering Attachment: empty result") + } + + local := transitGatewayPeeringAttachment.RequesterTgwInfo + peer := transitGatewayPeeringAttachment.AccepterTgwInfo + + if aws.StringValue(transitGatewayPeeringAttachment.AccepterTgwInfo.OwnerId) == meta.(*AWSClient).accountid && aws.StringValue(transitGatewayPeeringAttachment.AccepterTgwInfo.Region) == meta.(*AWSClient).region { + local = transitGatewayPeeringAttachment.AccepterTgwInfo + peer = transitGatewayPeeringAttachment.RequesterTgwInfo + } + + d.Set("peer_account_id", peer.OwnerId) + d.Set("peer_region", peer.Region) + d.Set("peer_transit_gateway_id", peer.TransitGatewayId) + d.Set("transit_gateway_id", local.TransitGatewayId) + + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayPeeringAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.SetId(aws.StringValue(transitGatewayPeeringAttachment.TransitGatewayAttachmentId)) + + return nil +} diff --git a/aws/data_source_aws_ec2_transit_gateway_peering_attachment_test.go b/aws/data_source_aws_ec2_transit_gateway_peering_attachment_test.go new file mode 100644 index 00000000000..a35c66474e7 --- /dev/null +++ b/aws/data_source_aws_ec2_transit_gateway_peering_attachment_test.go @@ -0,0 +1,211 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_Filter_sameAccount(t *testing.T) { + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_ec2_transit_gateway_peering_attachment.test" + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigFilter_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(resourceName, "peer_account_id", dataSourceName, "peer_account_id"), + resource.TestCheckResourceAttrPair(resourceName, "peer_region", dataSourceName, "peer_region"), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", dataSourceName, "peer_transit_gateway_id"), + resource.TestCheckResourceAttrPair(resourceName, "tags.%", dataSourceName, "tags.%"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", dataSourceName, "transit_gateway_id"), + ), + }, + }, + }) +} +func TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_Filter_differentAccount(t *testing.T) { + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_ec2_transit_gateway_peering_attachment.test" + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigFilter_differentAccount(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "peer_region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(transitGatewayResourceName, "owner_id", dataSourceName, "peer_account_id"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", dataSourceName, "peer_transit_gateway_id"), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", dataSourceName, "transit_gateway_id"), + ), + }, + }, + }) +} +func TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_ID_sameAccount(t *testing.T) { + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_ec2_transit_gateway_peering_attachment.test" + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigID_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(resourceName, "peer_account_id", dataSourceName, "peer_account_id"), + resource.TestCheckResourceAttrPair(resourceName, "peer_region", dataSourceName, "peer_region"), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", dataSourceName, "peer_transit_gateway_id"), + resource.TestCheckResourceAttrPair(resourceName, "tags.%", dataSourceName, "tags.%"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", dataSourceName, "transit_gateway_id"), + ), + }, + }, + }) +} +func TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_ID_differentAccount(t *testing.T) { + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_ec2_transit_gateway_peering_attachment.test" + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigID_differentAccount(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "peer_region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(transitGatewayResourceName, "owner_id", dataSourceName, "peer_account_id"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", dataSourceName, "peer_transit_gateway_id"), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", dataSourceName, "transit_gateway_id"), + ), + }, + }, + }) +} +func TestAccAWSEc2TransitGatewayPeeringAttachmentDataSource_Tags(t *testing.T) { + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_ec2_transit_gateway_peering_attachment.test" + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigTags_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(resourceName, "peer_account_id", dataSourceName, "peer_account_id"), + resource.TestCheckResourceAttrPair(resourceName, "peer_region", dataSourceName, "peer_region"), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", dataSourceName, "peer_transit_gateway_id"), + resource.TestCheckResourceAttrPair(resourceName, "tags.%", dataSourceName, "tags.%"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", dataSourceName, "transit_gateway_id"), + ), + }, + }, + }) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigFilter_sameAccount(rName string) string { + return composeConfig( + testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName), + fmt.Sprintf(` +data "aws_ec2_transit_gateway_peering_attachment" "test" { + filter { + name = "transit-gateway-attachment-id" + values = ["${aws_ec2_transit_gateway_peering_attachment.test.id}"] + } +} +`)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigID_sameAccount(rName string) string { + return composeConfig( + testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName), + fmt.Sprintf(` +data "aws_ec2_transit_gateway_peering_attachment" "test" { + id = "${aws_ec2_transit_gateway_peering_attachment.test.id}" +} +`)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigTags_sameAccount(rName string) string { + return composeConfig( + testAccAWSEc2TransitGatewayPeeringAttachmentConfigTags1_sameAccount(rName, "Name", rName), + fmt.Sprintf(` +data "aws_ec2_transit_gateway_peering_attachment" "test" { + tags = { + Name = "${aws_ec2_transit_gateway_peering_attachment.test.tags["Name"]}" + } +} +`)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigFilter_differentAccount(rName string) string { + return composeConfig( + testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_differentAccount(rName), + fmt.Sprintf(` +data "aws_ec2_transit_gateway_peering_attachment" "test" { + provider = "aws.alternate" + filter { + name = "transit-gateway-attachment-id" + values = ["${aws_ec2_transit_gateway_peering_attachment.test.id}"] + } +} +`)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentDataSourceConfigID_differentAccount(rName string) string { + return composeConfig( + testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_differentAccount(rName), + fmt.Sprintf(` +data "aws_ec2_transit_gateway_peering_attachment" "test" { + provider = "aws.alternate" + id = "${aws_ec2_transit_gateway_peering_attachment.test.id}" +} +`)) +} diff --git a/aws/data_source_aws_ec2_transit_gateway_route_table.go b/aws/data_source_aws_ec2_transit_gateway_route_table.go index 4d9f7c5657d..98082192fa2 100644 --- a/aws/data_source_aws_ec2_transit_gateway_route_table.go +++ b/aws/data_source_aws_ec2_transit_gateway_route_table.go @@ -40,6 +40,7 @@ func dataSourceAwsEc2TransitGatewayRouteTable() *schema.Resource { func dataSourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ec2.DescribeTransitGatewayRouteTablesInput{} @@ -75,7 +76,7 @@ func dataSourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta i d.Set("default_association_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultAssociationRouteTable)) d.Set("default_propagation_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultPropagationRouteTable)) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayRouteTable.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayRouteTable.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go b/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go index 0c720a8eb31..155c188deef 100644 --- a/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go +++ b/aws/data_source_aws_ec2_transit_gateway_vpc_attachment.go @@ -53,6 +53,7 @@ func dataSourceAwsEc2TransitGatewayVpcAttachment() *schema.Resource { func dataSourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ec2.DescribeTransitGatewayVpcAttachmentsInput{} @@ -96,7 +97,7 @@ func dataSourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, met return fmt.Errorf("error setting subnet_ids: %s", err) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayVpcAttachment.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayVpcAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ec2_transit_gateway_vpc_attachment_test.go b/aws/data_source_aws_ec2_transit_gateway_vpc_attachment_test.go index 2a1651fdd65..1acb93589bb 100644 --- a/aws/data_source_aws_ec2_transit_gateway_vpc_attachment_test.go +++ b/aws/data_source_aws_ec2_transit_gateway_vpc_attachment_test.go @@ -63,6 +63,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -106,6 +111,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/data_source_aws_ec2_transit_gateway_vpn_attachment.go b/aws/data_source_aws_ec2_transit_gateway_vpn_attachment.go index 02bc3da6459..4a3ed475452 100644 --- a/aws/data_source_aws_ec2_transit_gateway_vpn_attachment.go +++ b/aws/data_source_aws_ec2_transit_gateway_vpn_attachment.go @@ -19,36 +19,55 @@ func dataSourceAwsEc2TransitGatewayVpnAttachment() *schema.Resource { "tags": tagsSchemaComputed(), "transit_gateway_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, "vpn_connection_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, + "filter": dataSourceFiltersSchema(), }, } } func dataSourceAwsEc2TransitGatewayVpnAttachmentRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + connectionId, connectionIdOk := d.GetOk("vpn_connection_id") + transitGatewayId, transitGatewayIdOk := d.GetOk("transit_gateway_id") input := &ec2.DescribeTransitGatewayAttachmentsInput{ Filters: []*ec2.Filter{ - { - Name: aws.String("resource-id"), - Values: []*string{aws.String(d.Get("vpn_connection_id").(string))}, - }, { Name: aws.String("resource-type"), Values: []*string{aws.String(ec2.TransitGatewayAttachmentResourceTypeVpn)}, }, - { - Name: aws.String("transit-gateway-id"), - Values: []*string{aws.String(d.Get("transit_gateway_id").(string))}, - }, }, } + if filtersOk { + input.Filters = append(input.Filters, buildAwsDataSourceFilters(filters.(*schema.Set))...) + } + if tagsOk { + input.Filters = append(input.Filters, ec2TagFiltersFromMap(tags.(map[string]interface{}))...) + } + if connectionIdOk { + input.Filters = append(input.Filters, &ec2.Filter{ + Name: aws.String("resource-id"), + Values: []*string{aws.String(connectionId.(string))}, + }) + } + + if transitGatewayIdOk { + input.Filters = append(input.Filters, &ec2.Filter{ + Name: aws.String("transit-gateway-id"), + Values: []*string{aws.String(transitGatewayId.(string))}, + }) + } + log.Printf("[DEBUG] Reading EC2 Transit Gateway VPN Attachments: %s", input) output, err := conn.DescribeTransitGatewayAttachments(input) @@ -66,7 +85,7 @@ func dataSourceAwsEc2TransitGatewayVpnAttachmentRead(d *schema.ResourceData, met transitGatewayAttachment := output.TransitGatewayAttachments[0] - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayAttachment.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ec2_transit_gateway_vpn_attachment_test.go b/aws/data_source_aws_ec2_transit_gateway_vpn_attachment_test.go index c8cfd12d7f4..95bbfe600cb 100644 --- a/aws/data_source_aws_ec2_transit_gateway_vpn_attachment_test.go +++ b/aws/data_source_aws_ec2_transit_gateway_vpn_attachment_test.go @@ -34,9 +34,39 @@ func TestAccAWSEc2TransitGatewayVpnAttachmentDataSource_TransitGatewayIdAndVpnCo }) } -func testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigTransitGatewayIdAndVpnConnectionId(rBgpAsn int) string { +func TestAccAWSEc2TransitGatewayVpnAttachmentDataSource_filter(t *testing.T) { + rBgpAsn := acctest.RandIntRange(64512, 65534) + dataSourceName := "data.aws_ec2_transit_gateway_vpn_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + vpnConnectionResourceName := "aws_vpn_connection.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEc2TransitGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigFilter(rBgpAsn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(dataSourceName, "transit_gateway_id", transitGatewayResourceName, "id"), + resource.TestCheckResourceAttrPair(dataSourceName, "vpn_connection_id", vpnConnectionResourceName, "id"), + ), + }, + }, + }) +} + +func testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigBase(rBgpAsn int) string { return fmt.Sprintf(` -resource "aws_ec2_transit_gateway" "test" {} +resource "aws_ec2_transit_gateway" "test" { + tags = { + Name = "tf-acc-test-ec2-vpn-connection-transit-gateway-id" + } +} resource "aws_customer_gateway" "test" { bgp_asn = %[1]d @@ -52,11 +82,30 @@ resource "aws_vpn_connection" "test" { customer_gateway_id = "${aws_customer_gateway.test.id}" transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" type = "${aws_customer_gateway.test.type}" + + tags = { + Name = "tf-acc-test-ec2-vpn-connection-transit-gateway-id" + } +} +`, rBgpAsn) } +func testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigTransitGatewayIdAndVpnConnectionId(rBgpAsn int) string { + return testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigBase(rBgpAsn) + fmt.Sprintf(` data "aws_ec2_transit_gateway_vpn_attachment" "test" { transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" vpn_connection_id = "${aws_vpn_connection.test.id}" } -`, rBgpAsn) +`) +} + +func testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigFilter(rBgpAsn int) string { + return testAccAWSEc2TransitGatewayVpnAttachmentDataSourceConfigBase(rBgpAsn) + fmt.Sprintf(` +data "aws_ec2_transit_gateway_vpn_attachment" "test" { + filter { + name = "resource-id" + values = ["${aws_vpn_connection.test.id}"] + } +} +`) } diff --git a/aws/data_source_aws_ecr_repository.go b/aws/data_source_aws_ecr_repository.go index 9bc8e4df698..6f3b8a95d43 100644 --- a/aws/data_source_aws_ecr_repository.go +++ b/aws/data_source_aws_ecr_repository.go @@ -18,7 +18,6 @@ func dataSourceAwsEcrRepository() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "arn": { Type: schema.TypeString, @@ -39,6 +38,7 @@ func dataSourceAwsEcrRepository() *schema.Resource { func dataSourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecrconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &ecr.DescribeRepositoriesInput{ RepositoryNames: aws.StringSlice([]string{d.Get("name").(string)}), @@ -69,7 +69,7 @@ func dataSourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("error listing tags for ECR Repository (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_ecr_repository_test.go b/aws/data_source_aws_ecr_repository_test.go index ec014c0203e..2458f5c1098 100644 --- a/aws/data_source_aws_ecr_repository_test.go +++ b/aws/data_source_aws_ecr_repository_test.go @@ -20,9 +20,9 @@ func TestAccAWSEcrDataSource_ecrRepository(t *testing.T) { { Config: testAccCheckAwsEcrRepositoryDataSourceConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:aws:ecr:[a-zA-Z]+-[a-zA-Z]+-\d+:\d+:repository/tf-acc-test-\d+$`)), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ecr", regexp.MustCompile(fmt.Sprintf("repository/%s$", rName))), resource.TestCheckResourceAttrSet(resourceName, "registry_id"), - resource.TestMatchResourceAttr(resourceName, "repository_url", regexp.MustCompile(`^\d+\.dkr\.ecr\.[a-zA-Z]+-[a-zA-Z]+-\d+\.amazonaws\.com/tf-acc-test-\d+$`)), + resource.TestMatchResourceAttr(resourceName, "repository_url", regexp.MustCompile(fmt.Sprintf(`^\d+\.dkr\.ecr\.%s\.amazonaws\.com/%s$`, testAccGetRegion(), rName))), resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), resource.TestCheckResourceAttr(resourceName, "tags.Usage", "original"), ), diff --git a/aws/data_source_aws_ecs_cluster.go b/aws/data_source_aws_ecs_cluster.go index 8ca184f05f9..bbeab1dff1c 100644 --- a/aws/data_source_aws_ecs_cluster.go +++ b/aws/data_source_aws_ecs_cluster.go @@ -17,7 +17,6 @@ func dataSourceAwsEcsCluster() *schema.Resource { "cluster_name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "arn": { diff --git a/aws/data_source_aws_ecs_container_definition.go b/aws/data_source_aws_ecs_container_definition.go index e275fffd438..eb769f395ef 100644 --- a/aws/data_source_aws_ecs_container_definition.go +++ b/aws/data_source_aws_ecs_container_definition.go @@ -18,12 +18,10 @@ func dataSourceAwsEcsContainerDefinition() *schema.Resource { "task_definition": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "container_name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, // Computed values. "image": { diff --git a/aws/data_source_aws_ecs_service.go b/aws/data_source_aws_ecs_service.go index 2a87cd1f77a..422018e2ec6 100644 --- a/aws/data_source_aws_ecs_service.go +++ b/aws/data_source_aws_ecs_service.go @@ -17,7 +17,6 @@ func dataSourceAwsEcsService() *schema.Resource { "service_name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "arn": { Type: schema.TypeString, @@ -26,7 +25,6 @@ func dataSourceAwsEcsService() *schema.Resource { "cluster_arn": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "desired_count": { Type: schema.TypeInt, diff --git a/aws/data_source_aws_ecs_task_definition.go b/aws/data_source_aws_ecs_task_definition.go index 8123a8b512f..3d3d8859dc0 100644 --- a/aws/data_source_aws_ecs_task_definition.go +++ b/aws/data_source_aws_ecs_task_definition.go @@ -17,7 +17,6 @@ func dataSourceAwsEcsTaskDefinition() *schema.Resource { "task_definition": { Type: schema.TypeString, Required: true, - ForceNew: true, }, // Computed values. "family": { diff --git a/aws/data_source_aws_ecs_task_definition_test.go b/aws/data_source_aws_ecs_task_definition_test.go index 8a840dd4ab6..82aa5fd16ca 100644 --- a/aws/data_source_aws_ecs_task_definition_test.go +++ b/aws/data_source_aws_ecs_task_definition_test.go @@ -10,6 +10,7 @@ import ( ) func TestAccAWSEcsDataSource_ecsTaskDefinition(t *testing.T) { + resourceName := "data.aws_ecs_task_definition.mongo" rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ @@ -19,11 +20,11 @@ func TestAccAWSEcsDataSource_ecsTaskDefinition(t *testing.T) { { Config: testAccCheckAwsEcsTaskDefinitionDataSourceConfig(rName), Check: resource.ComposeTestCheckFunc( - 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(fmt.Sprintf("^arn:[^:]+:iam::[^:]+:role/%s$", rName))), + resource.TestCheckResourceAttr(resourceName, "family", rName), + resource.TestCheckResourceAttr(resourceName, "network_mode", "bridge"), + resource.TestMatchResourceAttr(resourceName, "revision", regexp.MustCompile("^[1-9][0-9]*$")), + resource.TestCheckResourceAttr(resourceName, "status", "ACTIVE"), + resource.TestCheckResourceAttrPair(resourceName, "task_role_arn", "aws_iam_role.mongo_role", "arn"), ), }, }, diff --git a/aws/data_source_aws_efs_access_point.go b/aws/data_source_aws_efs_access_point.go new file mode 100644 index 00000000000..51a2e5030fb --- /dev/null +++ b/aws/data_source_aws_efs_access_point.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/efs" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func dataSourceAwsEfsAccessPoint() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEfsAccessPointRead, + + Schema: map[string]*schema.Schema{ + "access_point_id": { + Type: schema.TypeString, + Required: true, + }, + "file_system_arn": { + Type: schema.TypeString, + Computed: true, + }, + "file_system_id": { + Type: schema.TypeString, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "posix_user": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "gid": { + Type: schema.TypeInt, + Computed: true, + }, + "uid": { + Type: schema.TypeInt, + Computed: true, + }, + "secondary_gids": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeInt}, + Set: schema.HashInt, + Computed: true, + }, + }, + }, + }, + "root_directory": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "path": { + Type: schema.TypeString, + Computed: true, + }, + "creation_info": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "owner_gid": { + Type: schema.TypeInt, + Computed: true, + }, + "owner_uid": { + Type: schema.TypeInt, + Computed: true, + }, + "permissions": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "tags": tagsSchema(), + }, + } +} + +func dataSourceAwsEfsAccessPointRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).efsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + resp, err := conn.DescribeAccessPoints(&efs.DescribeAccessPointsInput{ + AccessPointId: aws.String(d.Get("access_point_id").(string)), + }) + if err != nil { + return fmt.Errorf("Error reading EFS access point %s: %s", d.Id(), err) + } + if len(resp.AccessPoints) != 1 { + return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(resp.AccessPoints)) + } + + ap := resp.AccessPoints[0] + + log.Printf("[DEBUG] Found EFS access point: %#v", ap) + + d.SetId(*ap.AccessPointId) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(ap.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("file_system_arn", fsARN) + d.Set("file_system_id", ap.FileSystemId) + d.Set("arn", ap.AccessPointArn) + d.Set("owner_id", ap.OwnerId) + + if err := d.Set("posix_user", flattenEfsAccessPointPosixUser(ap.PosixUser)); err != nil { + return fmt.Errorf("error setting posix user: %s", err) + } + + if err := d.Set("root_directory", flattenEfsAccessPointRootDirectory(ap.RootDirectory)); err != nil { + return fmt.Errorf("error setting root directory: %s", err) + } + + if err := d.Set("tags", keyvaluetags.EfsKeyValueTags(ap.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_efs_access_point_test.go b/aws/data_source_aws_efs_access_point_test.go new file mode 100644 index 00000000000..5b49bf1bcac --- /dev/null +++ b/aws/data_source_aws_efs_access_point_test.go @@ -0,0 +1,49 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccDataSourceAWSEFSAccessPoint_basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_efs_access_point.test" + resourceName := "aws_efs_access_point.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSEFSAccessPointConfig(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(dataSourceName, "owner_id", resourceName, "owner_id"), + resource.TestCheckResourceAttrPair(dataSourceName, "tags", resourceName, "tags"), + resource.TestCheckResourceAttrPair(dataSourceName, "posix_user", resourceName, "posix_user"), + resource.TestCheckResourceAttrPair(dataSourceName, "root_directory", resourceName, "root_directory"), + ), + }, + }, + }) +} + +func testAccDataSourceAWSEFSAccessPointConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = "%s" +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" +} + +data "aws_efs_access_point" "test" { + access_point_id = "${aws_efs_access_point.test.id}" +} +`, rName) +} diff --git a/aws/data_source_aws_efs_file_system.go b/aws/data_source_aws_efs_file_system.go index cbbaed6ddbb..e7cf6e66165 100644 --- a/aws/data_source_aws_efs_file_system.go +++ b/aws/data_source_aws_efs_file_system.go @@ -25,7 +25,6 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, ValidateFunc: validation.StringLenBetween(0, 64), }, "encrypted": { @@ -36,7 +35,6 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, }, "kms_key_id": { Type: schema.TypeString, @@ -59,6 +57,10 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Type: schema.TypeFloat, Computed: true, }, + "size_in_bytes": { + Type: schema.TypeInt, + Computed: true, + }, "lifecycle_policy": { Type: schema.TypeList, Computed: true, @@ -77,6 +79,7 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) error { efsconn := meta.(*AWSClient).efsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeEfsOpts := &efs.DescribeFileSystemsInput{} @@ -129,8 +132,11 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er d.Set("kms_key_id", fs.KmsKeyId) d.Set("provisioned_throughput_in_mibps", fs.ProvisionedThroughputInMibps) d.Set("throughput_mode", fs.ThroughputMode) + if fs.SizeInBytes != nil { + d.Set("size_in_bytes", fs.SizeInBytes.Value) + } - if err := d.Set("tags", keyvaluetags.EfsKeyValueTags(fs.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EfsKeyValueTags(fs.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -141,8 +147,9 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("Error describing lifecycle configuration for EFS file system (%s): %s", aws.StringValue(fs.FileSystemId), err) } - if err := resourceAwsEfsFileSystemSetLifecyclePolicy(d, res.LifecyclePolicies); err != nil { - return err + + if err := d.Set("lifecycle_policy", flattenEfsFileSystemLifecyclePolicies(res.LifecyclePolicies)); err != nil { + return fmt.Errorf("error setting lifecycle_policy: %s", err) } d.Set("dns_name", meta.(*AWSClient).RegionalHostname(fmt.Sprintf("%s.efs", aws.StringValue(fs.FileSystemId)))) diff --git a/aws/data_source_aws_efs_file_system_test.go b/aws/data_source_aws_efs_file_system_test.go index 70fb655bac4..f0dd41d7c47 100644 --- a/aws/data_source_aws_efs_file_system_test.go +++ b/aws/data_source_aws_efs_file_system_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -30,6 +31,7 @@ func TestAccDataSourceAwsEfsFileSystem_id(t *testing.T) { resource.TestCheckResourceAttrPair(dataSourceName, "provisioned_throughput_in_mibps", resourceName, "provisioned_throughput_in_mibps"), resource.TestCheckResourceAttrPair(dataSourceName, "throughput_mode", resourceName, "throughput_mode"), resource.TestCheckResourceAttrPair(dataSourceName, "lifecycle_policy", resourceName, "lifecycle_policy"), + resource.TestMatchResourceAttr(dataSourceName, "size_in_bytes", regexp.MustCompile(`^\d+$`)), ), }, }, @@ -58,6 +60,7 @@ func TestAccDataSourceAwsEfsFileSystem_name(t *testing.T) { resource.TestCheckResourceAttrPair(dataSourceName, "provisioned_throughput_in_mibps", resourceName, "provisioned_throughput_in_mibps"), resource.TestCheckResourceAttrPair(dataSourceName, "throughput_mode", resourceName, "throughput_mode"), resource.TestCheckResourceAttrPair(dataSourceName, "lifecycle_policy", resourceName, "lifecycle_policy"), + resource.TestMatchResourceAttr(dataSourceName, "size_in_bytes", regexp.MustCompile(`^\d+$`)), ), }, }, diff --git a/aws/data_source_aws_efs_mount_target.go b/aws/data_source_aws_efs_mount_target.go index 601dca8112a..5d95cdc9216 100644 --- a/aws/data_source_aws_efs_mount_target.go +++ b/aws/data_source_aws_efs_mount_target.go @@ -18,7 +18,6 @@ func dataSourceAwsEfsMountTarget() *schema.Resource { "mount_target_id": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "file_system_arn": { Type: schema.TypeString, diff --git a/aws/data_source_aws_eip.go b/aws/data_source_aws_eip.go index f77666b9225..f28f2d99556 100644 --- a/aws/data_source_aws_eip.go +++ b/aws/data_source_aws_eip.go @@ -63,6 +63,14 @@ func dataSourceAwsEip() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "customer_owned_ipv4_pool": { + Type: schema.TypeString, + Computed: true, + }, + "customer_owned_ip": { + Type: schema.TypeString, + Computed: true, + }, "tags": tagsSchemaComputed(), }, } @@ -70,6 +78,7 @@ func dataSourceAwsEip() *schema.Resource { func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &ec2.DescribeAddressesInput{} @@ -148,8 +157,10 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { } } d.Set("public_ipv4_pool", eip.PublicIpv4Pool) + d.Set("customer_owned_ipv4_pool", eip.CustomerOwnedIpv4Pool) + d.Set("customer_owned_ip", eip.CustomerOwnedIp) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(eip.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(eip.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index 78c61c4d2de..bce7029ff1b 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "os" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" @@ -155,6 +156,56 @@ func TestAccDataSourceAwsEip_Instance(t *testing.T) { }) } +func TestAccDataSourceAWSEIP_CustomerOwnedIpv4Pool(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + // Local Gateway Route Table ID filtering in DescribeCoipPools is not currently working + poolId := os.Getenv("AWS_COIP_POOL_ID") + if poolId == "" { + t.Skip( + "Environment variable AWS_COIP_POOL_ID is not set. " + + "This environment variable must be set to the ID of " + + "a deployed Coip Pool to enable this test.") + } + + dataSourceName := "data.aws_eip.test" + resourceName := "aws_eip.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSEIPConfigCustomerOwnedIpv4Pool(poolId), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(resourceName, "customer_owned_ipv4_pool", dataSourceName, "customer_owned_ipv4_pool"), + resource.TestCheckResourceAttrPair(resourceName, "customer_owned_ip", dataSourceName, "customer_owned_ip"), + ), + }, + }, + }) +} + +func testAccDataSourceAWSEIPConfigCustomerOwnedIpv4Pool(customerOwnedIpv4Pool string) string { + return fmt.Sprintf(` +resource "aws_eip" "test" { + customer_owned_ipv4_pool = %[1]q + vpc = true +} + +data "aws_eip" "test" { + id = aws_eip.test.id +} +`, customerOwnedIpv4Pool) +} + func testAccDataSourceAwsEipConfigFilter(rName string) string { return fmt.Sprintf(` resource "aws_eip" "test" { @@ -260,6 +311,11 @@ data "aws_availability_zones" "available" { # Error launching source instance: Unsupported: Your requested instance type (t2.micro) is not supported in your requested Availability Zone (us-west-2d). blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/data_source_aws_eks_cluster.go b/aws/data_source_aws_eks_cluster.go index f6decfa3c5d..9b45c094f24 100644 --- a/aws/data_source_aws_eks_cluster.go +++ b/aws/data_source_aws_eks_cluster.go @@ -69,7 +69,6 @@ func dataSourceAwsEksCluster() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ForceNew: true, ValidateFunc: validation.NoZeroValues, }, "platform_version": { @@ -134,6 +133,8 @@ func dataSourceAwsEksCluster() *schema.Resource { func dataSourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).eksconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + name := d.Get("name").(string) input := &eks.DescribeClusterInput{ @@ -173,7 +174,7 @@ func dataSourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error d.Set("role_arn", cluster.RoleArn) d.Set("status", cluster.Status) - if err := d.Set("tags", keyvaluetags.EksKeyValueTags(cluster.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EksKeyValueTags(cluster.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_eks_cluster_test.go b/aws/data_source_aws_eks_cluster_test.go index 6e7c8176518..964e1c3dc0a 100644 --- a/aws/data_source_aws_eks_cluster_test.go +++ b/aws/data_source_aws_eks_cluster_test.go @@ -15,9 +15,10 @@ func TestAccAWSEksClusterDataSource_basic(t *testing.T) { resourceName := "aws_eks_cluster.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEksClusterDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEksClusterDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEksClusterDataSourceConfig_Basic(rName), diff --git a/aws/data_source_aws_elastic_beanstalk_application.go b/aws/data_source_aws_elastic_beanstalk_application.go index c1d0a7d3ed8..01d55d1ffd8 100644 --- a/aws/data_source_aws_elastic_beanstalk_application.go +++ b/aws/data_source_aws_elastic_beanstalk_application.go @@ -20,7 +20,6 @@ func dataSourceAwsElasticBeanstalkApplication() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "description": { Type: schema.TypeString, diff --git a/aws/data_source_aws_elastic_beanstalk_hosted_zone.go b/aws/data_source_aws_elastic_beanstalk_hosted_zone.go index 9532043f18e..286653ab29b 100644 --- a/aws/data_source_aws_elastic_beanstalk_hosted_zone.go +++ b/aws/data_source_aws_elastic_beanstalk_hosted_zone.go @@ -8,6 +8,7 @@ import ( // See http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region var elasticBeanstalkHostedZoneIds = map[string]string{ + "af-south-1": "Z1EI3BVKMKK4AM", "ap-southeast-1": "Z16FZ9L249IFLT", "ap-southeast-2": "Z2PCDNR3VC2G1N", "ap-east-1": "ZPWYUBWRU171A", @@ -18,6 +19,7 @@ var elasticBeanstalkHostedZoneIds = map[string]string{ "ca-central-1": "ZJFCZL7SSZB5I", "eu-central-1": "Z1FRNW7UH4DEZJ", "eu-north-1": "Z23GO28BZ5AETM", + "eu-south-1": "Z10VDYYOA2JFKM", "eu-west-1": "Z2NYPWQ7DFZAZH", "eu-west-2": "Z1GKAAAUGATPF1", "eu-west-3": "Z5WN6GAYWG5OB", diff --git a/aws/data_source_aws_elastic_beanstalk_solution_stack.go b/aws/data_source_aws_elastic_beanstalk_solution_stack.go index 89c30a41c96..25c0ba94999 100644 --- a/aws/data_source_aws_elastic_beanstalk_solution_stack.go +++ b/aws/data_source_aws_elastic_beanstalk_solution_stack.go @@ -18,14 +18,12 @@ func dataSourceAwsElasticBeanstalkSolutionStack() *schema.Resource { "name_regex": { Type: schema.TypeString, Required: true, - ForceNew: true, ValidateFunc: validation.StringIsValidRegExp, }, "most_recent": { Type: schema.TypeBool, Optional: true, Default: false, - ForceNew: true, }, // Computed values. "name": { diff --git a/aws/data_source_aws_elasticache_cluster.go b/aws/data_source_aws_elasticache_cluster.go index 9b07c8b83c2..557f1c2b776 100644 --- a/aws/data_source_aws_elasticache_cluster.go +++ b/aws/data_source_aws_elasticache_cluster.go @@ -20,7 +20,6 @@ func dataSourceAwsElastiCacheCluster() *schema.Resource { "cluster_id": { Type: schema.TypeString, Required: true, - ForceNew: true, StateFunc: func(v interface{}) string { value := v.(string) return strings.ToLower(value) @@ -153,6 +152,7 @@ func dataSourceAwsElastiCacheCluster() *schema.Resource { func dataSourceAwsElastiCacheClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &elasticache.DescribeCacheClustersInput{ CacheClusterId: aws.String(d.Get("cluster_id").(string)), @@ -229,7 +229,7 @@ func dataSourceAwsElastiCacheClusterRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error listing tags for Elasticache Cluster (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_elasticache_replication_group_test.go b/aws/data_source_aws_elasticache_replication_group_test.go index c95fa027fa1..0472fd626c4 100644 --- a/aws/data_source_aws_elasticache_replication_group_test.go +++ b/aws/data_source_aws_elasticache_replication_group_test.go @@ -63,7 +63,14 @@ func TestAccDataSourceAwsElasticacheReplicationGroup_ClusterMode(t *testing.T) { func testAccDataSourceAwsElasticacheReplicationGroupConfig_basic(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_elasticache_replication_group" "test" { replication_group_id = %[1]q diff --git a/aws/data_source_aws_elasticsearch_domain.go b/aws/data_source_aws_elasticsearch_domain.go index c8fee7689f5..174219bf6f2 100644 --- a/aws/data_source_aws_elasticsearch_domain.go +++ b/aws/data_source_aws_elasticsearch_domain.go @@ -22,6 +22,7 @@ func dataSourceAwsElasticSearchDomain() *schema.Resource { "advanced_options": { Type: schema.TypeMap, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "domain_name": { Type: schema.TypeString, @@ -237,7 +238,7 @@ func dataSourceAwsElasticSearchDomain() *schema.Resource { Computed: true, }, "processing": { - Type: schema.TypeString, + Type: schema.TypeBool, Computed: true, }, @@ -248,6 +249,7 @@ func dataSourceAwsElasticSearchDomain() *schema.Resource { func dataSourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{}) error { esconn := meta.(*AWSClient).esconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &elasticsearchservice.DescribeElasticsearchDomainInput{ DomainName: aws.String(d.Get("domain_name").(string)), @@ -357,7 +359,7 @@ func dataSourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface return fmt.Errorf("error listing tags for Elasticsearch Cluster (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/data_source_aws_elasticsearch_domain_test.go b/aws/data_source_aws_elasticsearch_domain_test.go index 32b76b7c3fe..3343b813993 100644 --- a/aws/data_source_aws_elasticsearch_domain_test.go +++ b/aws/data_source_aws_elasticsearch_domain_test.go @@ -20,6 +20,7 @@ func TestAccAWSDataElasticsearchDomain_basic(t *testing.T) { { Config: testAccAWSElasticsearchDomainConfigWithDataSource(rInt), Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(datasourceName, "processing", "false"), resource.TestCheckResourceAttrPair(datasourceName, "elasticsearch_version", resourceName, "elasticsearch_version"), resource.TestCheckResourceAttrPair(datasourceName, "cluster_config.#", resourceName, "cluster_config.#"), resource.TestCheckResourceAttrPair(datasourceName, "cluster_config.0.instance_type", resourceName, "cluster_config.0.instance_type"), @@ -130,6 +131,11 @@ func testAccAWSElasticsearchDomainConfigAdvancedWithDataSource(rInt int) string return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_partition" "current" {} diff --git a/aws/data_source_aws_elb.go b/aws/data_source_aws_elb.go index b4d40db9728..a0e0e53959b 100644 --- a/aws/data_source_aws_elb.go +++ b/aws/data_source_aws_elb.go @@ -196,6 +196,8 @@ func dataSourceAwsElb() *schema.Resource { func dataSourceAwsElbRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + lbName := d.Get("name").(string) input := &elb.DescribeLoadBalancersInput{ @@ -221,5 +223,5 @@ func dataSourceAwsElbRead(d *schema.ResourceData, meta interface{}) error { } d.Set("arn", arn.String()) - return flattenAwsELbResource(d, meta.(*AWSClient).ec2conn, elbconn, resp.LoadBalancerDescriptions[0]) + return flattenAwsELbResource(d, meta.(*AWSClient).ec2conn, elbconn, resp.LoadBalancerDescriptions[0], ignoreTagsConfig) } diff --git a/aws/data_source_aws_elb_hosted_zone_id.go b/aws/data_source_aws_elb_hosted_zone_id.go index 9c88dae928b..e16d546f29f 100644 --- a/aws/data_source_aws_elb_hosted_zone_id.go +++ b/aws/data_source_aws_elb_hosted_zone_id.go @@ -9,6 +9,7 @@ import ( // See http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region // See https://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#elb_region var elbHostedZoneIdPerRegionMap = map[string]string{ + "af-south-1": "Z268VQBMOI5EKX", "ap-east-1": "Z3DQVH9N71FHZ0", "ap-northeast-1": "Z14GRHDCWA56QT", "ap-northeast-2": "ZWKZPGTI48KDX", @@ -21,6 +22,7 @@ var elbHostedZoneIdPerRegionMap = map[string]string{ "cn-northwest-1": "Z3BX2TMKNYI13Y", "eu-central-1": "Z215JYRZR1TBD5", "eu-north-1": "Z23TAZ6LKFMNIO", + "eu-south-1": "Z3ULH7SSC9OV64", "eu-west-1": "Z32O12XQLNTSW2", "eu-west-2": "ZHURV8PSTC4K8", "eu-west-3": "Z3Q77PNBQS71R4", @@ -28,6 +30,8 @@ var elbHostedZoneIdPerRegionMap = map[string]string{ "sa-east-1": "Z2P70J7HTTTPLU", "us-east-1": "Z35SXDOTRQ7X7K", "us-east-2": "Z3AADJGX6KTTL2", + "us-gov-east-1": "Z166TLBEWOO7G0", + "us-gov-west-1": "Z33AYJ8TM3BH4J", "us-west-1": "Z368ELLRRE2KJ0", "us-west-2": "Z1H1FL5HABSF5", } diff --git a/aws/data_source_aws_elb_service_account.go b/aws/data_source_aws_elb_service_account.go index e17424cda6b..4e6cb236e6c 100644 --- a/aws/data_source_aws_elb_service_account.go +++ b/aws/data_source_aws_elb_service_account.go @@ -9,6 +9,7 @@ import ( // See http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy var elbAccountIdPerRegionMap = map[string]string{ + "af-south-1": "098369216593", "ap-east-1": "754344448648", "ap-northeast-1": "582318560864", "ap-northeast-2": "600734575887", @@ -21,6 +22,7 @@ var elbAccountIdPerRegionMap = map[string]string{ "cn-northwest-1": "037604701340", "eu-central-1": "054676820928", "eu-north-1": "897822967062", + "eu-south-1": "635631232127", "eu-west-1": "156460612806", "eu-west-2": "652711504416", "eu-west-3": "009996457667", diff --git a/aws/data_source_aws_elb_service_account_test.go b/aws/data_source_aws_elb_service_account_test.go index 95d69a9d336..bba1292f988 100644 --- a/aws/data_source_aws_elb_service_account_test.go +++ b/aws/data_source_aws_elb_service_account_test.go @@ -7,6 +7,10 @@ import ( ) func TestAccAWSElbServiceAccount_basic(t *testing.T) { + expectedAccountID := elbAccountIdPerRegionMap[testAccGetRegion()] + + dataSourceName := "data.aws_elb_service_account.main" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -14,15 +18,28 @@ func TestAccAWSElbServiceAccount_basic(t *testing.T) { { Config: testAccCheckAwsElbServiceAccountConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_elb_service_account.main", "id", "797873946194"), - resource.TestCheckResourceAttr("data.aws_elb_service_account.main", "arn", "arn:aws:iam::797873946194:root"), + resource.TestCheckResourceAttr(dataSourceName, "id", expectedAccountID), + testAccCheckResourceAttrGlobalARNAccountID(dataSourceName, "arn", expectedAccountID, "iam", "root"), ), }, + }, + }) +} + +func TestAccAWSElbServiceAccount_Region(t *testing.T) { + expectedAccountID := elbAccountIdPerRegionMap[testAccGetRegion()] + + dataSourceName := "data.aws_elb_service_account.regional" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ { Config: testAccCheckAwsElbServiceAccountExplicitRegionConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_elb_service_account.regional", "id", "156460612806"), - resource.TestCheckResourceAttr("data.aws_elb_service_account.regional", "arn", "arn:aws:iam::156460612806:root"), + resource.TestCheckResourceAttr(dataSourceName, "id", expectedAccountID), + testAccCheckResourceAttrGlobalARNAccountID(dataSourceName, "arn", expectedAccountID, "iam", "root"), ), }, }, @@ -34,7 +51,9 @@ data "aws_elb_service_account" "main" { } ` const testAccCheckAwsElbServiceAccountExplicitRegionConfig = ` +data "aws_region" "current" {} + data "aws_elb_service_account" "regional" { - region = "eu-west-1" + region = "${data.aws_region.current.name}" } ` diff --git a/aws/data_source_aws_elb_test.go b/aws/data_source_aws_elb_test.go index 5adcf47bec7..f39d1cbf96d 100644 --- a/aws/data_source_aws_elb_test.go +++ b/aws/data_source_aws_elb_test.go @@ -63,7 +63,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "elb_test" { cidr_block = "10.0.0.0/16" diff --git a/aws/data_source_aws_guardduty_detector_test.go b/aws/data_source_aws_guardduty_detector_test.go index f118a3c5585..34d6ef37f95 100644 --- a/aws/data_source_aws_guardduty_detector_test.go +++ b/aws/data_source_aws_guardduty_detector_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) -func TestAccAWSGuarddutyDetectorDataSource_basic(t *testing.T) { +func testAccAWSGuarddutyDetectorDataSource_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -30,7 +30,7 @@ func TestAccAWSGuarddutyDetectorDataSource_basic(t *testing.T) { }) } -func TestAccAWSGuarddutyDetectorDataSource_explicit(t *testing.T) { +func testAccAWSGuarddutyDetectorDataSource_Id(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, diff --git a/aws/data_source_aws_iam_instance_profile_test.go b/aws/data_source_aws_iam_instance_profile_test.go index 46a7580d95c..fb1b0030735 100644 --- a/aws/data_source_aws_iam_instance_profile_test.go +++ b/aws/data_source_aws_iam_instance_profile_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" @@ -10,6 +9,8 @@ import ( ) func TestAccAWSDataSourceIAMInstanceProfile_basic(t *testing.T) { + resourceName := "data.aws_iam_instance_profile.test" + roleName := fmt.Sprintf("tf-acc-ds-instance-profile-role-%d", acctest.RandInt()) profileName := fmt.Sprintf("tf-acc-ds-instance-profile-%d", acctest.RandInt()) @@ -20,19 +21,11 @@ func TestAccAWSDataSourceIAMInstanceProfile_basic(t *testing.T) { { Config: testAccDatasourceAwsIamInstanceProfileConfig(roleName, profileName), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr( - "data.aws_iam_instance_profile.test", - "arn", - 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:[^:]+: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), + resource.TestCheckResourceAttrPair(resourceName, "arn", "aws_iam_instance_profile.test", "arn"), + resource.TestCheckResourceAttr(resourceName, "path", "/testpath/"), + resource.TestCheckResourceAttrPair(resourceName, "role_arn", "aws_iam_role.test", "arn"), + resource.TestCheckResourceAttrPair(resourceName, "role_id", "aws_iam_role.test", "unique_id"), + resource.TestCheckResourceAttr(resourceName, "role_name", roleName), ), }, }, diff --git a/aws/data_source_aws_iam_policy_document.go b/aws/data_source_aws_iam_policy_document.go index 7bdc56302ba..49f267393b9 100644 --- a/aws/data_source_aws_iam_policy_document.go +++ b/aws/data_source_aws_iam_policy_document.go @@ -2,6 +2,7 @@ package aws import ( "encoding/json" + "errors" "fmt" "strconv" "strings" @@ -242,7 +243,7 @@ func dataSourceAwsIamPolicyDocumentReplaceVarsInList(in interface{}, version str } return out, nil default: - panic("dataSourceAwsIamPolicyDocumentReplaceVarsInList: input not string nor []string") + return nil, errors.New("dataSourceAwsIamPolicyDocumentReplaceVarsInList: input not string nor []string") } } diff --git a/aws/data_source_aws_iam_policy_test.go b/aws/data_source_aws_iam_policy_test.go index 4628f5f2b1f..361827b2ba9 100644 --- a/aws/data_source_aws_iam_policy_test.go +++ b/aws/data_source_aws_iam_policy_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" @@ -10,6 +9,7 @@ import ( ) func TestAccAWSDataSourceIAMPolicy_basic(t *testing.T) { + resourceName := "data.aws_iam_policy.test" policyName := fmt.Sprintf("test-policy-%s", acctest.RandString(10)) resource.ParallelTest(t, resource.TestCase{ @@ -19,12 +19,11 @@ func TestAccAWSDataSourceIAMPolicy_basic(t *testing.T) { { Config: testAccAwsDataSourceIamPolicyConfig(policyName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_iam_policy.test", "name", policyName), - resource.TestCheckResourceAttr("data.aws_iam_policy.test", "description", "My test policy"), - resource.TestCheckResourceAttr("data.aws_iam_policy.test", "path", "/"), - resource.TestCheckResourceAttrSet("data.aws_iam_policy.test", "policy"), - resource.TestMatchResourceAttr("data.aws_iam_policy.test", "arn", - regexp.MustCompile(`^arn:[\w-]+:([a-zA-Z0-9\-])+:([a-z]{2}-(gov-)?[a-z]+-\d{1})?:(\d{12})?:(.*)$`)), + resource.TestCheckResourceAttr(resourceName, "name", policyName), + resource.TestCheckResourceAttr(resourceName, "description", "My test policy"), + resource.TestCheckResourceAttr(resourceName, "path", "/"), + resource.TestCheckResourceAttrSet(resourceName, "policy"), + resource.TestCheckResourceAttrPair(resourceName, "arn", "aws_iam_policy.test_policy", "arn"), ), }, }, diff --git a/aws/data_source_aws_iam_role.go b/aws/data_source_aws_iam_role.go index 1be2de616fb..9f3a41476d3 100644 --- a/aws/data_source_aws_iam_role.go +++ b/aws/data_source_aws_iam_role.go @@ -5,6 +5,8 @@ import ( "net/url" "time" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -66,12 +68,15 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "tags": tagsSchemaComputed(), }, } } func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + name := d.Get("name").(string) input := &iam.GetRoleInput{ @@ -96,6 +101,7 @@ func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { d.Set("permissions_boundary", output.Role.PermissionsBoundary.PermissionsBoundaryArn) } d.Set("unique_id", output.Role.RoleId) + d.Set("tags", keyvaluetags.IamKeyValueTags(output.Role.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()) assumRolePolicy, err := url.QueryUnescape(aws.StringValue(output.Role.AssumeRolePolicyDocument)) if err != nil { diff --git a/aws/data_source_aws_iam_role_test.go b/aws/data_source_aws_iam_role_test.go index 70d61784260..dabdcb2621a 100644 --- a/aws/data_source_aws_iam_role_test.go +++ b/aws/data_source_aws_iam_role_test.go @@ -28,6 +28,36 @@ func TestAccAWSDataSourceIAMRole_basic(t *testing.T) { resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"), resource.TestCheckResourceAttrPair(dataSourceName, "path", resourceName, "path"), resource.TestCheckResourceAttrPair(dataSourceName, "unique_id", resourceName, "unique_id"), + resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"), + ), + }, + }, + }) +} + +func TestAccAWSDataSourceIAMRole_tags(t *testing.T) { + roleName := acctest.RandomWithPrefix("tf-acc-test") + dataSourceName := "data.aws_iam_role.test" + resourceName := "aws_iam_role.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsIAMRoleConfig_tags(roleName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrPair(dataSourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(dataSourceName, "assume_role_policy", resourceName, "assume_role_policy"), + resource.TestCheckResourceAttrPair(dataSourceName, "create_date", resourceName, "create_date"), + resource.TestCheckResourceAttrPair(dataSourceName, "description", resourceName, "description"), + resource.TestCheckResourceAttrPair(dataSourceName, "max_session_duration", resourceName, "max_session_duration"), + resource.TestCheckResourceAttrPair(dataSourceName, "name", resourceName, "name"), + resource.TestCheckResourceAttrPair(dataSourceName, "path", resourceName, "path"), + resource.TestCheckResourceAttrPair(dataSourceName, "unique_id", resourceName, "unique_id"), + resource.TestCheckResourceAttr(dataSourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(dataSourceName, "tags.tag1", "test-value1"), + resource.TestCheckResourceAttr(dataSourceName, "tags.tag2", "test-value2"), ), }, }, @@ -63,3 +93,36 @@ data "aws_iam_role" "test" { } `, roleName) } + +func testAccAwsIAMRoleConfig_tags(roleName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "test" { + name = %q + + assume_role_policy = < 0 { + input := &inspector.SetTagsForResourceInput{ + ResourceArn: aws.String(identifier), + Tags: newTags.IgnoreAws().InspectorTags(), + } + + _, err := conn.SetTagsForResource(input) + + if err != nil { + return fmt.Errorf("error tagging resource (%s): %w", identifier, err) + } + } else if len(oldTags) > 0 { + input := &inspector.SetTagsForResourceInput{ + ResourceArn: aws.String(identifier), + } + + _, err := conn.SetTagsForResource(input) + + if err != nil { + return fmt.Errorf("error untagging resource (%s): %w", identifier, err) + } + } + + return nil +} diff --git a/aws/internal/keyvaluetags/key_value_tags.go b/aws/internal/keyvaluetags/key_value_tags.go index 76d31980852..58c27c34d73 100644 --- a/aws/internal/keyvaluetags/key_value_tags.go +++ b/aws/internal/keyvaluetags/key_value_tags.go @@ -1,5 +1,6 @@ //go:generate go run -tags generate generators/servicetags/main.go //go:generate go run -tags generate generators/listtags/main.go +//go:generate go run -tags generate generators/createtags/main.go //go:generate go run -tags generate generators/updatetags/main.go package keyvaluetags @@ -19,6 +20,12 @@ const ( RdsTagKeyPrefix = `rds:` ) +// IgnoreConfig contains various options for removing resource tags. +type IgnoreConfig struct { + Keys KeyValueTags + KeyPrefixes KeyValueTags +} + // KeyValueTags is a standard implementation for AWS key-value resource tags. // The AWS Go SDK is split into multiple service packages, each service with // its own Go struct type representing a resource tag. To standardize logic @@ -38,6 +45,18 @@ func (tags KeyValueTags) IgnoreAws() KeyValueTags { return result } +// IgnoreConfig returns any tags not removed by a given configuration. +func (tags KeyValueTags) IgnoreConfig(config *IgnoreConfig) KeyValueTags { + if config == nil { + return tags + } + + result := tags.IgnorePrefixes(config.KeyPrefixes) + result = result.Ignore(config.Keys) + + return result +} + // IgnoreElasticbeanstalk returns non-AWS and non-Elasticbeanstalk tag keys. func (tags KeyValueTags) IgnoreElasticbeanstalk() KeyValueTags { result := make(KeyValueTags) diff --git a/aws/internal/keyvaluetags/key_value_tags_test.go b/aws/internal/keyvaluetags/key_value_tags_test.go index 00010ab1d97..dedcc5acaae 100644 --- a/aws/internal/keyvaluetags/key_value_tags_test.go +++ b/aws/internal/keyvaluetags/key_value_tags_test.go @@ -60,6 +60,203 @@ func TestKeyValueTagsIgnoreAws(t *testing.T) { } } +func TestKeyValueTagsIgnoreConfig(t *testing.T) { + testCases := []struct { + name string + tags KeyValueTags + ignoreConfig *IgnoreConfig + want map[string]string + }{ + { + name: "empty config", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{}, + want: map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }, + }, + { + name: "no config", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: nil, + want: map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }, + }, + { + name: "no tags", + tags: New(map[string]string{}), + ignoreConfig: &IgnoreConfig{ + KeyPrefixes: New([]string{ + "key1", + "key2", + "key3", + }), + }, + want: map[string]string{}, + }, + { + name: "keys all matching", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + Keys: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + }, + want: map[string]string{}, + }, + { + name: "keys some matching", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + Keys: New(map[string]string{ + "key1": "value1", + }), + }, + want: map[string]string{ + "key2": "value2", + "key3": "value3", + }, + }, + { + name: "keys none matching", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + Keys: New(map[string]string{ + "key4": "value4", + "key5": "value5", + "key6": "value6", + }), + }, + want: map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }, + }, + { + name: "keys and key prefixes", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + Keys: New([]string{ + "key1", + }), + KeyPrefixes: New([]string{ + "key2", + }), + }, + want: map[string]string{ + "key3": "value3", + }, + }, + { + name: "key prefixes all exact", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + KeyPrefixes: New([]string{ + "key1", + "key2", + "key3", + }), + }, + want: map[string]string{}, + }, + { + name: "key prefixes all prefixed", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + KeyPrefixes: New([]string{ + "key", + }), + }, + want: map[string]string{}, + }, + { + name: "key prefixes some prefixed", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + KeyPrefixes: New([]string{ + "key1", + }), + }, + want: map[string]string{ + "key2": "value2", + "key3": "value3", + }, + }, + { + name: "key prefixes none prefixed", + tags: New(map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }), + ignoreConfig: &IgnoreConfig{ + KeyPrefixes: New([]string{ + "key4", + "key5", + "key6", + }), + }, + want: map[string]string{ + "key1": "value1", + "key2": "value2", + "key3": "value3", + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.name, func(t *testing.T) { + got := testCase.tags.IgnoreConfig(testCase.ignoreConfig) + + testKeyValueTagsVerifyMap(t, got.Map(), testCase.want) + }) + } +} + func TestKeyValueTagsIgnoreElasticbeanstalk(t *testing.T) { testCases := []struct { name string diff --git a/aws/internal/keyvaluetags/list_tags_gen.go b/aws/internal/keyvaluetags/list_tags_gen.go index 0aa7e650a53..5afc6631b3c 100644 --- a/aws/internal/keyvaluetags/list_tags_gen.go +++ b/aws/internal/keyvaluetags/list_tags_gen.go @@ -75,6 +75,7 @@ import ( "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mq" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/aws/aws-sdk-go/service/networkmanager" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" "github.com/aws/aws-sdk-go/service/pinpoint" @@ -1306,6 +1307,23 @@ func NeptuneListTags(conn *neptune.Neptune, identifier string) (KeyValueTags, er return NeptuneKeyValueTags(output.TagList), nil } +// NetworkmanagerListTags lists networkmanager service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func NetworkmanagerListTags(conn *networkmanager.NetworkManager, identifier string) (KeyValueTags, error) { + input := &networkmanager.ListTagsForResourceInput{ + ResourceArn: aws.String(identifier), + } + + output, err := conn.ListTagsForResource(input) + + if err != nil { + return New(nil), err + } + + return NetworkmanagerKeyValueTags(output.TagList), nil +} + // OpsworksListTags lists opsworks service tags. // The identifier is typically the Amazon Resource Name (ARN), although // it may also be a different identifier depending on the service. diff --git a/aws/internal/keyvaluetags/service_generation_customizations.go b/aws/internal/keyvaluetags/service_generation_customizations.go index a18d21b6978..cd798080c68 100644 --- a/aws/internal/keyvaluetags/service_generation_customizations.go +++ b/aws/internal/keyvaluetags/service_generation_customizations.go @@ -4,7 +4,6 @@ package keyvaluetags import ( "fmt" - "github.com/aws/aws-sdk-go/service/quicksight" "reflect" "github.com/aws/aws-sdk-go/service/accessanalyzer" @@ -83,10 +82,12 @@ import ( "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mq" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/aws/aws-sdk-go/service/networkmanager" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" "github.com/aws/aws-sdk-go/service/pinpoint" "github.com/aws/aws-sdk-go/service/qldb" + "github.com/aws/aws-sdk-go/service/quicksight" "github.com/aws/aws-sdk-go/service/ram" "github.com/aws/aws-sdk-go/service/rds" "github.com/aws/aws-sdk-go/service/redshift" @@ -102,6 +103,7 @@ import ( "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/storagegateway" "github.com/aws/aws-sdk-go/service/swf" + "github.com/aws/aws-sdk-go/service/synthetics" "github.com/aws/aws-sdk-go/service/transfer" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" @@ -268,6 +270,8 @@ func ServiceClientType(serviceName string) string { funcType = reflect.TypeOf(mq.New) case "neptune": funcType = reflect.TypeOf(neptune.New) + case "networkmanager": + funcType = reflect.TypeOf(networkmanager.New) case "opsworks": funcType = reflect.TypeOf(opsworks.New) case "organizations": @@ -308,6 +312,8 @@ func ServiceClientType(serviceName string) string { funcType = reflect.TypeOf(storagegateway.New) case "swf": funcType = reflect.TypeOf(swf.New) + case "synthetics": + funcType = reflect.TypeOf(synthetics.New) case "transfer": funcType = reflect.TypeOf(transfer.New) case "waf": @@ -325,6 +331,450 @@ func ServiceClientType(serviceName string) string { return funcType.Out(0).String() } +// ServiceListTagsFunction determines the service list tagging function. +func ServiceListTagsFunction(serviceName string) string { + switch serviceName { + case "acm": + return "ListTagsForCertificate" + case "acmpca": + return "ListTags" + case "apigatewayv2": + return "GetTags" + case "backup": + return "ListTags" + case "cloudhsmv2": + return "ListTags" + case "cloudtrail": + return "ListTags" + case "cloudwatchlogs": + return "ListTagsLogGroup" + case "dax": + return "ListTags" + case "directconnect": + return "DescribeTags" + case "dynamodb": + return "ListTagsOfResource" + case "efs": + return "DescribeTags" + case "elasticsearchservice": + return "ListTags" + case "elb": + return "DescribeTags" + case "elbv2": + return "DescribeTags" + case "firehose": + return "ListTagsForDeliveryStream" + case "glacier": + return "ListTagsForVault" + case "glue": + return "GetTags" + case "kinesis": + return "ListTagsForStream" + case "kinesisvideo": + return "ListTagsForStream" + case "kms": + return "ListResourceTags" + case "lambda": + return "ListTags" + case "mq": + return "ListTags" + case "opsworks": + return "ListTags" + case "redshift": + return "DescribeTags" + case "resourcegroups": + return "GetTags" + case "sagemaker": + return "ListTags" + case "sqs": + return "ListQueueTags" + case "workspaces": + return "DescribeTags" + default: + return "ListTagsForResource" + } +} + +// ServiceListTagsInputIdentifierField determines the service list tag identifier field. +func ServiceListTagsInputIdentifierField(serviceName string) string { + switch serviceName { + case "cloudtrail": + return "ResourceIdList" + case "directconnect": + return "ResourceArns" + case "efs": + return "FileSystemId" + case "workspaces": + return "ResourceId" + default: + return ServiceTagInputIdentifierField(serviceName) + } +} + +// ServiceListTagInputIdentifierRequiresSlice determines if the service list tagging resource field requires a slice. +func ServiceListTagsInputIdentifierRequiresSlice(serviceName string) string { + switch serviceName { + case "cloudtrail": + return "yes" + case "directconnect": + return "yes" + case "elb": + return "yes" + case "elbv2": + return "yes" + default: + return "" + } +} + +// ServiceListTagsInputResourceTypeField determines the service list tagging resource type field. +func ServiceListTagsInputResourceTypeField(serviceName string) string { + switch serviceName { + case "route53": + return "ResourceType" + case "ssm": + return "ResourceType" + default: + return "" + } +} + +// ServiceListTagsOutputTagsField determines the service list tag field. +func ServiceListTagsOutputTagsField(serviceName string) string { + switch serviceName { + case "cloudfront": + return "Tags.Items" + case "cloudhsmv2": + return "TagList" + case "cloudtrail": + return "ResourceTagList[0].TagsList" + case "databasemigrationservice": + return "TagList" + case "directconnect": + return "ResourceTags[0].Tags" + case "docdb": + return "TagList" + case "elasticache": + return "TagList" + case "elasticbeanstalk": + return "ResourceTags" + case "elasticsearchservice": + return "TagList" + case "elb": + return "TagDescriptions[0].Tags" + case "elbv2": + return "TagDescriptions[0].Tags" + case "mediaconvert": + return "ResourceTags.Tags" + case "neptune": + return "TagList" + case "networkmanager": + return "TagList" + case "pinpoint": + return "TagsModel.Tags" + case "rds": + return "TagList" + case "route53": + return "ResourceTagSet.Tags" + case "ssm": + return "TagList" + case "waf": + return "TagInfoForResource.TagList" + case "wafregional": + return "TagInfoForResource.TagList" + case "wafv2": + return "TagInfoForResource.TagList" + case "workspaces": + return "TagList" + default: + return "Tags" + } +} + +// ServiceResourceNotFoundErrorCode determines the error code of tagable resources when not found +func ServiceResourceNotFoundErrorCode(serviceName string) string { + switch serviceName { + default: + return "ResourceNotFoundException" + } +} + +// ServiceResourceNotFoundErrorCode determines the common substring of error codes of tagable resources when not found +// This value takes precedence over ServiceResourceNotFoundErrorCode when defined for a service. +func ServiceResourceNotFoundErrorCodeContains(serviceName string) string { + switch serviceName { + case "ec2": + return ".NotFound" + default: + return "" + } +} + +// ServiceRetryCreationOnResourceNotFound determines if tag creation should be retried when the tagable resource is not found +// This should only be used for services with eventual consistency considerations. +func ServiceRetryCreationOnResourceNotFound(serviceName string) string { + switch serviceName { + case "ec2": + return "yes" + default: + return "" + } +} + +// ServiceTagFunction determines the service tagging function. +func ServiceTagFunction(serviceName string) string { + switch serviceName { + case "acm": + return "AddTagsToCertificate" + case "acmpca": + return "TagCertificateAuthority" + case "cloudtrail": + return "AddTags" + case "cloudwatchlogs": + return "TagLogGroup" + case "databasemigrationservice": + return "AddTagsToResource" + case "datapipeline": + return "AddTags" + case "directoryservice": + return "AddTagsToResource" + case "docdb": + return "AddTagsToResource" + case "ec2": + return "CreateTags" + case "elasticache": + return "AddTagsToResource" + case "elasticbeanstalk": + return "UpdateTagsForResource" + case "elasticsearchservice": + return "AddTags" + case "elb": + return "AddTags" + case "elbv2": + return "AddTags" + case "emr": + return "AddTags" + case "firehose": + return "TagDeliveryStream" + case "glacier": + return "AddTagsToVault" + case "kinesis": + return "AddTagsToStream" + case "kinesisvideo": + return "TagStream" + case "medialive": + return "CreateTags" + case "mq": + return "CreateTags" + case "neptune": + return "AddTagsToResource" + case "rds": + return "AddTagsToResource" + case "redshift": + return "CreateTags" + case "resourcegroups": + return "Tag" + case "route53": + return "ChangeTagsForResource" + case "sagemaker": + return "AddTags" + case "sqs": + return "TagQueue" + case "ssm": + return "AddTagsToResource" + case "storagegateway": + return "AddTagsToResource" + case "workspaces": + return "CreateTags" + default: + return "TagResource" + } +} + +// ServiceTagFunctionBatchSize determines the batch size (if any) for tagging and untagging. +func ServiceTagFunctionBatchSize(serviceName string) string { + switch serviceName { + case "kinesis": + return "10" + default: + return "" + } +} + +// ServiceTagInputIdentifierField determines the service tag identifier field. +func ServiceTagInputIdentifierField(serviceName string) string { + switch serviceName { + case "acm": + return "CertificateArn" + case "acmpca": + return "CertificateAuthorityArn" + case "athena": + return "ResourceARN" + case "cloud9": + return "ResourceARN" + case "cloudfront": + return "Resource" + case "cloudhsmv2": + return "ResourceId" + case "cloudtrail": + return "ResourceId" + case "cloudwatch": + return "ResourceARN" + case "cloudwatchevents": + return "ResourceARN" + case "cloudwatchlogs": + return "LogGroupName" + case "codestarnotifications": + return "Arn" + case "datapipeline": + return "PipelineId" + case "dax": + return "ResourceName" + case "devicefarm": + return "ResourceARN" + case "directoryservice": + return "ResourceId" + case "docdb": + return "ResourceName" + case "ec2": + return "Resources" + case "efs": + return "ResourceId" + case "elasticache": + return "ResourceName" + case "elasticsearchservice": + return "ARN" + case "elb": + return "LoadBalancerNames" + case "elbv2": + return "ResourceArns" + case "emr": + return "ResourceId" + case "firehose": + return "DeliveryStreamName" + case "fsx": + return "ResourceARN" + case "gamelift": + return "ResourceARN" + case "glacier": + return "VaultName" + case "kinesis": + return "StreamName" + case "kinesisanalytics": + return "ResourceARN" + case "kinesisanalyticsv2": + return "ResourceARN" + case "kinesisvideo": + return "StreamARN" + case "kms": + return "KeyId" + case "lambda": + return "Resource" + case "lightsail": + return "ResourceName" + case "mediaconvert": + return "Arn" + case "mediastore": + return "Resource" + case "neptune": + return "ResourceName" + case "organizations": + return "ResourceId" + case "ram": + return "ResourceShareArn" + case "rds": + return "ResourceName" + case "redshift": + return "ResourceName" + case "resourcegroups": + return "Arn" + case "route53": + return "ResourceId" + case "secretsmanager": + return "SecretId" + case "sqs": + return "QueueUrl" + case "ssm": + return "ResourceId" + case "storagegateway": + return "ResourceARN" + case "transfer": + return "Arn" + case "waf": + return "ResourceARN" + case "wafregional": + return "ResourceARN" + case "wafv2": + return "ResourceARN" + case "workspaces": + return "ResourceId" + default: + return "ResourceArn" + } +} + +// ServiceTagInputIdentifierRequiresSlice determines if the service tagging resource field requires a slice. +func ServiceTagInputIdentifierRequiresSlice(serviceName string) string { + switch serviceName { + case "ec2": + return "yes" + case "elb": + return "yes" + case "elbv2": + return "yes" + default: + return "" + } +} + +// ServiceTagInputTagsField determines the service tagging tags field. +func ServiceTagInputTagsField(serviceName string) string { + switch serviceName { + case "cloudhsmv2": + return "TagList" + case "cloudtrail": + return "TagsList" + case "elasticbeanstalk": + return "TagsToAdd" + case "elasticsearchservice": + return "TagList" + case "glue": + return "TagsToAdd" + case "pinpoint": + return "TagsModel" + case "route53": + return "AddTags" + default: + return "Tags" + } +} + +// ServiceTagInputCustomValue determines any custom value for the service tagging tags field. +func ServiceTagInputCustomValue(serviceName string) string { + switch serviceName { + case "cloudfront": + return "&cloudfront.Tags{Items: updatedTags.IgnoreAws().CloudfrontTags()}" + case "kinesis": + return "aws.StringMap(updatedTags.IgnoreAws().Map())" + case "pinpoint": + return "&pinpoint.TagsModel{Tags: updatedTags.IgnoreAws().PinpointTags()}" + default: + return "" + } +} + +// ServiceTagInputResourceTypeField determines the service tagging resource type field. +func ServiceTagInputResourceTypeField(serviceName string) string { + switch serviceName { + case "route53": + return "ResourceType" + case "ssm": + return "ResourceType" + default: + return "" + } +} + func ServiceTagPackage(serviceName string) string { switch serviceName { case "wafregional": @@ -333,3 +783,191 @@ func ServiceTagPackage(serviceName string) string { return serviceName } } + +// ServiceTagKeyType determines the service tagging tag key type. +func ServiceTagKeyType(serviceName string) string { + switch serviceName { + case "elb": + return "TagKeyOnly" + default: + return "" + } +} + +// ServiceTagType determines the service tagging tag type. +func ServiceTagType(serviceName string) string { + switch serviceName { + case "appmesh": + return "TagRef" + case "datasync": + return "TagListEntry" + case "fms": + return "ResourceTag" + case "swf": + return "ResourceTag" + default: + return "Tag" + } +} + +// ServiceTagTypeKeyField determines the service tagging tag type key field. +func ServiceTagTypeKeyField(serviceName string) string { + switch serviceName { + case "kms": + return "TagKey" + default: + return "Key" + } +} + +// ServiceTagTypeValueField determines the service tagging tag type value field. +func ServiceTagTypeValueField(serviceName string) string { + switch serviceName { + case "kms": + return "TagValue" + default: + return "Value" + } +} + +// ServiceUntagFunction determines the service untagging function. +func ServiceUntagFunction(serviceName string) string { + switch serviceName { + case "acm": + return "RemoveTagsFromCertificate" + case "acmpca": + return "UntagCertificateAuthority" + case "cloudtrail": + return "RemoveTags" + case "cloudwatchlogs": + return "UntagLogGroup" + case "databasemigrationservice": + return "RemoveTagsFromResource" + case "datapipeline": + return "RemoveTags" + case "directoryservice": + return "RemoveTagsFromResource" + case "docdb": + return "RemoveTagsFromResource" + case "ec2": + return "DeleteTags" + case "elasticache": + return "RemoveTagsFromResource" + case "elasticbeanstalk": + return "UpdateTagsForResource" + case "elasticsearchservice": + return "RemoveTags" + case "elb": + return "RemoveTags" + case "elbv2": + return "RemoveTags" + case "emr": + return "RemoveTags" + case "firehose": + return "UntagDeliveryStream" + case "glacier": + return "RemoveTagsFromVault" + case "kinesis": + return "RemoveTagsFromStream" + case "kinesisvideo": + return "UntagStream" + case "medialive": + return "DeleteTags" + case "mq": + return "DeleteTags" + case "neptune": + return "RemoveTagsFromResource" + case "rds": + return "RemoveTagsFromResource" + case "redshift": + return "DeleteTags" + case "resourcegroups": + return "Untag" + case "route53": + return "ChangeTagsForResource" + case "sagemaker": + return "DeleteTags" + case "sqs": + return "UntagQueue" + case "ssm": + return "RemoveTagsFromResource" + case "storagegateway": + return "RemoveTagsFromResource" + case "workspaces": + return "DeleteTags" + default: + return "UntagResource" + } +} + +// ServiceUntagInputRequiresTagType determines if the service untagging requires full Tag type. +func ServiceUntagInputRequiresTagType(serviceName string) string { + switch serviceName { + case "acm": + return "yes" + case "acmpca": + return "yes" + case "cloudtrail": + return "yes" + case "ec2": + return "yes" + default: + return "" + } +} + +// ServiceUntagInputRequiresTagKeyType determines if a special type for the untagging function tag key field is needed. +func ServiceUntagInputRequiresTagKeyType(serviceName string) string { + switch serviceName { + case "elb": + return "yes" + default: + return "" + } +} + +// ServiceUntagInputTagsField determines the service untagging tags field. +func ServiceUntagInputTagsField(serviceName string) string { + switch serviceName { + case "acm": + return "Tags" + case "acmpca": + return "Tags" + case "backup": + return "TagKeyList" + case "cloudhsmv2": + return "TagKeyList" + case "cloudtrail": + return "TagsList" + case "cloudwatchlogs": + return "Tags" + case "datasync": + return "Keys" + case "ec2": + return "Tags" + case "elasticbeanstalk": + return "TagsToRemove" + case "elb": + return "Tags" + case "glue": + return "TagsToRemove" + case "kinesisvideo": + return "TagKeyList" + case "resourcegroups": + return "Keys" + case "route53": + return "RemoveTagKeys" + default: + return "TagKeys" + } +} + +// ServiceUntagInputCustomValue determines any custom value for the service untagging tags field. +func ServiceUntagInputCustomValue(serviceName string) string { + switch serviceName { + case "cloudfront": + return "&cloudfront.TagKeys{Items: aws.StringSlice(removedTags.IgnoreAws().Keys())}" + default: + return "" + } +} diff --git a/aws/internal/keyvaluetags/service_tags_gen.go b/aws/internal/keyvaluetags/service_tags_gen.go index d39d83a52b7..627f72f21fc 100644 --- a/aws/internal/keyvaluetags/service_tags_gen.go +++ b/aws/internal/keyvaluetags/service_tags_gen.go @@ -56,6 +56,7 @@ import ( "github.com/aws/aws-sdk-go/service/lightsail" "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/aws/aws-sdk-go/service/networkmanager" "github.com/aws/aws-sdk-go/service/organizations" "github.com/aws/aws-sdk-go/service/quicksight" "github.com/aws/aws-sdk-go/service/ram" @@ -431,6 +432,16 @@ func SqsKeyValueTags(tags map[string]*string) KeyValueTags { return New(tags) } +// SyntheticsTags returns synthetics service tags. +func (tags KeyValueTags) SyntheticsTags() map[string]*string { + return aws.StringMap(tags.Map()) +} + +// SyntheticsKeyValueTags creates KeyValueTags from synthetics service tags. +func SyntheticsKeyValueTags(tags map[string]*string) KeyValueTags { + return New(tags) +} + // []*SERVICE.Tag handling // AcmTags returns acm service tags. @@ -1852,6 +1863,33 @@ func NeptuneKeyValueTags(tags []*neptune.Tag) KeyValueTags { return New(m) } +// NetworkmanagerTags returns networkmanager service tags. +func (tags KeyValueTags) NetworkmanagerTags() []*networkmanager.Tag { + result := make([]*networkmanager.Tag, 0, len(tags)) + + for k, v := range tags.Map() { + tag := &networkmanager.Tag{ + Key: aws.String(k), + Value: aws.String(v), + } + + result = append(result, tag) + } + + return result +} + +// NetworkmanagerKeyValueTags creates KeyValueTags from networkmanager service tags. +func NetworkmanagerKeyValueTags(tags []*networkmanager.Tag) KeyValueTags { + m := make(map[string]*string, len(tags)) + + for _, tag := range tags { + m[aws.StringValue(tag.Key)] = tag.Value + } + + return New(m) +} + // OrganizationsTags returns organizations service tags. func (tags KeyValueTags) OrganizationsTags() []*organizations.Tag { result := make([]*organizations.Tag, 0, len(tags)) diff --git a/aws/internal/keyvaluetags/update_tags_gen.go b/aws/internal/keyvaluetags/update_tags_gen.go index 1d82f20021b..e987e0ad9a2 100644 --- a/aws/internal/keyvaluetags/update_tags_gen.go +++ b/aws/internal/keyvaluetags/update_tags_gen.go @@ -81,6 +81,7 @@ import ( "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mq" "github.com/aws/aws-sdk-go/service/neptune" + "github.com/aws/aws-sdk-go/service/networkmanager" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" "github.com/aws/aws-sdk-go/service/pinpoint" @@ -101,10 +102,12 @@ import ( "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/storagegateway" "github.com/aws/aws-sdk-go/service/swf" + "github.com/aws/aws-sdk-go/service/synthetics" "github.com/aws/aws-sdk-go/service/transfer" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/aws/aws-sdk-go/service/workspaces" ) // AccessanalyzerUpdateTags updates accessanalyzer service tags. @@ -2810,6 +2813,42 @@ func NeptuneUpdateTags(conn *neptune.Neptune, identifier string, oldTagsMap inte return nil } +// NetworkmanagerUpdateTags updates networkmanager service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func NetworkmanagerUpdateTags(conn *networkmanager.NetworkManager, identifier string, oldTagsMap interface{}, newTagsMap interface{}) error { + oldTags := New(oldTagsMap) + newTags := New(newTagsMap) + + if removedTags := oldTags.Removed(newTags); len(removedTags) > 0 { + input := &networkmanager.UntagResourceInput{ + ResourceArn: aws.String(identifier), + TagKeys: aws.StringSlice(removedTags.IgnoreAws().Keys()), + } + + _, err := conn.UntagResource(input) + + if err != nil { + return fmt.Errorf("error untagging resource (%s): %w", identifier, err) + } + } + + if updatedTags := oldTags.Updated(newTags); len(updatedTags) > 0 { + input := &networkmanager.TagResourceInput{ + ResourceArn: aws.String(identifier), + Tags: updatedTags.IgnoreAws().NetworkmanagerTags(), + } + + _, err := conn.TagResource(input) + + if err != nil { + return fmt.Errorf("error tagging resource (%s): %w", identifier, err) + } + } + + return nil +} + // OpsworksUpdateTags updates opsworks service tags. // The identifier is typically the Amazon Resource Name (ARN), although // it may also be a different identifier depending on the service. @@ -3532,6 +3571,42 @@ func SwfUpdateTags(conn *swf.SWF, identifier string, oldTagsMap interface{}, new return nil } +// SyntheticsUpdateTags updates synthetics service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func SyntheticsUpdateTags(conn *synthetics.Synthetics, identifier string, oldTagsMap interface{}, newTagsMap interface{}) error { + oldTags := New(oldTagsMap) + newTags := New(newTagsMap) + + if removedTags := oldTags.Removed(newTags); len(removedTags) > 0 { + input := &synthetics.UntagResourceInput{ + ResourceArn: aws.String(identifier), + TagKeys: aws.StringSlice(removedTags.IgnoreAws().Keys()), + } + + _, err := conn.UntagResource(input) + + if err != nil { + return fmt.Errorf("error untagging resource (%s): %w", identifier, err) + } + } + + if updatedTags := oldTags.Updated(newTags); len(updatedTags) > 0 { + input := &synthetics.TagResourceInput{ + ResourceArn: aws.String(identifier), + Tags: updatedTags.IgnoreAws().SyntheticsTags(), + } + + _, err := conn.TagResource(input) + + if err != nil { + return fmt.Errorf("error tagging resource (%s): %w", identifier, err) + } + } + + return nil +} + // TransferUpdateTags updates transfer service tags. // The identifier is typically the Amazon Resource Name (ARN), although // it may also be a different identifier depending on the service. @@ -3675,3 +3750,39 @@ func Wafv2UpdateTags(conn *wafv2.WAFV2, identifier string, oldTagsMap interface{ return nil } + +// WorkspacesUpdateTags updates workspaces service tags. +// The identifier is typically the Amazon Resource Name (ARN), although +// it may also be a different identifier depending on the service. +func WorkspacesUpdateTags(conn *workspaces.WorkSpaces, identifier string, oldTagsMap interface{}, newTagsMap interface{}) error { + oldTags := New(oldTagsMap) + newTags := New(newTagsMap) + + if removedTags := oldTags.Removed(newTags); len(removedTags) > 0 { + input := &workspaces.DeleteTagsInput{ + ResourceId: aws.String(identifier), + TagKeys: aws.StringSlice(removedTags.IgnoreAws().Keys()), + } + + _, err := conn.DeleteTags(input) + + if err != nil { + return fmt.Errorf("error untagging resource (%s): %w", identifier, err) + } + } + + if updatedTags := oldTags.Updated(newTags); len(updatedTags) > 0 { + input := &workspaces.CreateTagsInput{ + ResourceId: aws.String(identifier), + Tags: updatedTags.IgnoreAws().WorkspacesTags(), + } + + _, err := conn.CreateTags(input) + + if err != nil { + return fmt.Errorf("error tagging resource (%s): %w", identifier, err) + } + } + + return nil +} diff --git a/aws/internal/keyvaluetags/workspaces_tags.go b/aws/internal/keyvaluetags/workspaces_tags.go deleted file mode 100644 index ca902e9af36..00000000000 --- a/aws/internal/keyvaluetags/workspaces_tags.go +++ /dev/null @@ -1,49 +0,0 @@ -// +build !generate - -package keyvaluetags - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/workspaces" -) - -// Custom WorkSpaces tag service update functions using the same format as generated code. - -// WorkspacesUpdateTags updates WorkSpaces resource tags. -// The identifier is the resource ID. -func WorkspacesUpdateTags(conn *workspaces.WorkSpaces, identifier string, oldTagsMap interface{}, newTagsMap interface{}) error { - oldTags := New(oldTagsMap) - newTags := New(newTagsMap) - - // https://docs.aws.amazon.com/workspaces/latest/api/API_CreateTags.html - // "If you want to add new tags to a set of existing tags, you must submit all of the existing tags along with the new ones." - // This doesn't in fact seem to be correct... - - if len(newTags) > 0 { - input := &workspaces.CreateTagsInput{ - ResourceId: aws.String(identifier), - Tags: newTags.IgnoreAws().WorkspacesTags(), - } - - _, err := conn.CreateTags(input) - - if err != nil { - return fmt.Errorf("error tagging resource (%s): %w", identifier, err) - } - } else if len(oldTags) > 0 { - input := &workspaces.DeleteTagsInput{ - ResourceId: aws.String(identifier), - TagKeys: aws.StringSlice(oldTags.Keys()), - } - - _, err := conn.DeleteTags(input) - - if err != nil { - return fmt.Errorf("error untagging resource (%s): %w", identifier, err) - } - } - - return nil -} diff --git a/aws/internal/service/apigatewayv2/waiter/status.go b/aws/internal/service/apigatewayv2/waiter/status.go new file mode 100644 index 00000000000..5549c3ece82 --- /dev/null +++ b/aws/internal/service/apigatewayv2/waiter/status.go @@ -0,0 +1,56 @@ +package waiter + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +// DeploymentStatus fetches the Deployment and its Status +func DeploymentStatus(conn *apigatewayv2.ApiGatewayV2, apiId, deploymentId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &apigatewayv2.GetDeploymentInput{ + ApiId: aws.String(apiId), + DeploymentId: aws.String(deploymentId), + } + + output, err := conn.GetDeployment(input) + + if err != nil { + return nil, apigatewayv2.DeploymentStatusFailed, err + } + + // Error messages can also be contained in the response with FAILED status + + if aws.StringValue(output.DeploymentStatus) == apigatewayv2.DeploymentStatusFailed { + return output, apigatewayv2.DeploymentStatusFailed, fmt.Errorf("%s", aws.StringValue(output.DeploymentStatusMessage)) + } + + return output, aws.StringValue(output.DeploymentStatus), nil + } +} + +// VpcLinkStatus fetches the VPC Link and its Status +func VpcLinkStatus(conn *apigatewayv2.ApiGatewayV2, vpcLinkId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &apigatewayv2.GetVpcLinkInput{ + VpcLinkId: aws.String(vpcLinkId), + } + + output, err := conn.GetVpcLink(input) + + if err != nil { + return nil, apigatewayv2.VpcLinkStatusFailed, err + } + + // Error messages can also be contained in the response with FAILED status + + if aws.StringValue(output.VpcLinkStatus) == apigatewayv2.VpcLinkStatusFailed { + return output, apigatewayv2.VpcLinkStatusFailed, fmt.Errorf("%s", aws.StringValue(output.VpcLinkStatusMessage)) + } + + return output, aws.StringValue(output.VpcLinkStatus), nil + } +} diff --git a/aws/internal/service/apigatewayv2/waiter/waiter.go b/aws/internal/service/apigatewayv2/waiter/waiter.go new file mode 100644 index 00000000000..9611009c81a --- /dev/null +++ b/aws/internal/service/apigatewayv2/waiter/waiter.go @@ -0,0 +1,73 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for a Deployment to return Deployed + DeploymentDeployedTimeout = 5 * time.Minute + + // Maximum amount of time to wait for a VPC Link to return Available + VpcLinkAvailableTimeout = 10 * time.Minute + + // Maximum amount of time to wait for a VPC Link to return Deleted + VpcLinkDeletedTimeout = 10 * time.Minute +) + +// DeploymentDeployed waits for a Deployment to return Deployed +func DeploymentDeployed(conn *apigatewayv2.ApiGatewayV2, apiId, deploymentId string) (*apigatewayv2.GetDeploymentOutput, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{apigatewayv2.DeploymentStatusPending}, + Target: []string{apigatewayv2.DeploymentStatusDeployed}, + Refresh: DeploymentStatus(conn, apiId, deploymentId), + Timeout: DeploymentDeployedTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*apigatewayv2.GetDeploymentOutput); ok { + return v, err + } + + return nil, err +} + +// VpcLinkAvailable waits for a VPC Link to return Available +func VpcLinkAvailable(conn *apigatewayv2.ApiGatewayV2, vpcLinkId string) (*apigatewayv2.GetVpcLinkOutput, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{apigatewayv2.VpcLinkStatusPending}, + Target: []string{apigatewayv2.VpcLinkStatusAvailable}, + Refresh: VpcLinkStatus(conn, vpcLinkId), + Timeout: VpcLinkAvailableTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*apigatewayv2.GetVpcLinkOutput); ok { + return v, err + } + + return nil, err +} + +// VpcLinkAvailable waits for a VPC Link to return Deleted +func VpcLinkDeleted(conn *apigatewayv2.ApiGatewayV2, vpcLinkId string) (*apigatewayv2.GetVpcLinkOutput, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{apigatewayv2.VpcLinkStatusDeleting}, + Target: []string{apigatewayv2.VpcLinkStatusFailed}, + Refresh: VpcLinkStatus(conn, vpcLinkId), + Timeout: VpcLinkDeletedTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*apigatewayv2.GetVpcLinkOutput); ok { + return v, err + } + + return nil, err +} diff --git a/aws/internal/service/batch/equivalency/container_properties.go b/aws/internal/service/batch/equivalency/container_properties.go index 9df82b85748..4fec8fa760c 100644 --- a/aws/internal/service/batch/equivalency/container_properties.go +++ b/aws/internal/service/batch/equivalency/container_properties.go @@ -19,6 +19,11 @@ func (cp *containerProperties) Reduce() error { return aws.StringValue(cp.Environment[i].Name) < aws.StringValue(cp.Environment[j].Name) }) + // Prevent difference of API response that adds an empty array when not configured during the request + if len(cp.Command) == 0 { + cp.Command = nil + } + // Prevent difference of API response that adds an empty array when not configured during the request if len(cp.Environment) == 0 { cp.Environment = nil diff --git a/aws/internal/service/batch/equivalency/container_properties_test.go b/aws/internal/service/batch/equivalency/container_properties_test.go index 0255944352b..e6f6d96b3cc 100644 --- a/aws/internal/service/batch/equivalency/container_properties_test.go +++ b/aws/internal/service/batch/equivalency/container_properties_test.go @@ -205,6 +205,38 @@ func TestEquivalentBatchContainerPropertiesJSON(t *testing.T) { "vcpus": 8, "jobRoleArn": "arn:aws:iam::123456789012:role/example" } +`, + ExpectEquivalent: true, + }, + { + Name: "empty command, mountPoints, resourceRequirements, ulimits, volumes", + ApiJson: ` +{ + "image": "123.dkr.ecr.us-east-1.amazonaws.com/my-app", + "vcpus": 1, + "memory": 4096, + "command": [], + "jobRoleArn": "arn:aws:iam::123:role/role-test", + "volumes": [], + "environment": [{"name":"ENVIRONMENT","value":"test"}], + "mountPoints": [], + "ulimits": [], + "resourceRequirements": [] +} +`, + ConfigurationJson: ` +{ + "image": "123.dkr.ecr.us-east-1.amazonaws.com/my-app", + "memory": 4096, + "vcpus": 1, + "jobRoleArn": "arn:aws:iam::123:role/role-test", + "environment": [ + { + "name": "ENVIRONMENT", + "value": "test" + } + ] +} `, ExpectEquivalent: true, }, diff --git a/aws/internal/service/guardduty/waiter/status.go b/aws/internal/service/guardduty/waiter/status.go new file mode 100644 index 00000000000..33df4596100 --- /dev/null +++ b/aws/internal/service/guardduty/waiter/status.go @@ -0,0 +1,59 @@ +package waiter + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // AdminStatus NotFound + AdminStatusNotFound = "NotFound" + + // AdminStatus Unknown + AdminStatusUnknown = "Unknown" +) + +// AdminAccountAdminStatus fetches the AdminAccount and its AdminStatus +func AdminAccountAdminStatus(conn *guardduty.GuardDuty, adminAccountID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + adminAccount, err := getOrganizationAdminAccount(conn, adminAccountID) + + if err != nil { + return nil, AdminStatusUnknown, err + } + + if adminAccount == nil { + return adminAccount, AdminStatusNotFound, nil + } + + return adminAccount, aws.StringValue(adminAccount.AdminStatus), nil + } +} + +// TODO: Migrate to shared internal package for aws package and this package +func getOrganizationAdminAccount(conn *guardduty.GuardDuty, adminAccountID string) (*guardduty.AdminAccount, error) { + input := &guardduty.ListOrganizationAdminAccountsInput{} + var result *guardduty.AdminAccount + + err := conn.ListOrganizationAdminAccountsPages(input, func(page *guardduty.ListOrganizationAdminAccountsOutput, lastPage bool) bool { + if page == nil { + return !lastPage + } + + for _, adminAccount := range page.AdminAccounts { + if adminAccount == nil { + continue + } + + if aws.StringValue(adminAccount.AdminAccountId) == adminAccountID { + result = adminAccount + return false + } + } + + return !lastPage + }) + + return result, err +} diff --git a/aws/internal/service/guardduty/waiter/waiter.go b/aws/internal/service/guardduty/waiter/waiter.go new file mode 100644 index 00000000000..7124290afda --- /dev/null +++ b/aws/internal/service/guardduty/waiter/waiter.go @@ -0,0 +1,59 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for an AdminAccount to return Enabled + AdminAccountEnabledTimeout = 5 * time.Minute + + // Maximum amount of time to wait for an AdminAccount to return NotFound + AdminAccountNotFoundTimeout = 5 * time.Minute + + // Maximum amount of time to wait for membership to propagate + // When removing Organization Admin Accounts, there is eventual + // consistency even after the account is no longer listed. + // Reference error message: + // BadRequestException: The request is rejected because the current account cannot delete detector while it has invited or associated members. + MembershipPropagationTimeout = 2 * time.Minute +) + +// AdminAccountEnabled waits for an AdminAccount to return Enabled +func AdminAccountEnabled(conn *guardduty.GuardDuty, adminAccountID string) (*guardduty.AdminAccount, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{AdminStatusNotFound}, + Target: []string{guardduty.AdminStatusEnabled}, + Refresh: AdminAccountAdminStatus(conn, adminAccountID), + Timeout: AdminAccountNotFoundTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if output, ok := outputRaw.(*guardduty.AdminAccount); ok { + return output, err + } + + return nil, err +} + +// AdminAccountNotFound waits for an AdminAccount to return NotFound +func AdminAccountNotFound(conn *guardduty.GuardDuty, adminAccountID string) (*guardduty.AdminAccount, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{guardduty.AdminStatusDisableInProgress}, + Target: []string{AdminStatusNotFound}, + Refresh: AdminAccountAdminStatus(conn, adminAccountID), + Timeout: AdminAccountNotFoundTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if output, ok := outputRaw.(*guardduty.AdminAccount); ok { + return output, err + } + + return nil, err +} diff --git a/aws/internal/service/iam/waiter/waiter.go b/aws/internal/service/iam/waiter/waiter.go new file mode 100644 index 00000000000..7706bb6f2e5 --- /dev/null +++ b/aws/internal/service/iam/waiter/waiter.go @@ -0,0 +1,14 @@ +package waiter + +import ( + "time" +) + +const ( + // Maximum amount of time to wait for IAM changes to propagate + // This timeout should not be increased without strong consideration + // as this will negatively impact user experience when configurations + // have incorrect references or permissions. + // Reference: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency + PropagationTimeout = 2 * time.Minute +) diff --git a/aws/internal/service/kinesisanalytics/waiter/status.go b/aws/internal/service/kinesisanalytics/waiter/status.go new file mode 100644 index 00000000000..3620aa6455b --- /dev/null +++ b/aws/internal/service/kinesisanalytics/waiter/status.go @@ -0,0 +1,38 @@ +package waiter + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kinesisanalytics" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // ApplicationStatus NotFound + ApplicationStatusNotFound = "NotFound" + + // ApplicationStatus Unknown + ApplicationStatusUnknown = "Unknown" +) + +// ApplicationStatus fetches the Application and its Status +func ApplicationStatus(conn *kinesisanalytics.KinesisAnalytics, applicationName string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(applicationName), + } + + output, err := conn.DescribeApplication(input) + + if err != nil { + return nil, ApplicationStatusUnknown, err + } + + application := output.ApplicationDetail + + if application == nil { + return application, ApplicationStatusNotFound, nil + } + + return application, aws.StringValue(application.ApplicationStatus), nil + } +} diff --git a/aws/internal/service/kinesisanalytics/waiter/waiter.go b/aws/internal/service/kinesisanalytics/waiter/waiter.go new file mode 100644 index 00000000000..240de251295 --- /dev/null +++ b/aws/internal/service/kinesisanalytics/waiter/waiter.go @@ -0,0 +1,31 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/kinesisanalytics" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for an Application to be deleted + ApplicationDeletedTimeout = 20 * time.Minute +) + +// ApplicationDeleted waits for an Application to be deleted +func ApplicationDeleted(conn *kinesisanalytics.KinesisAnalytics, applicationName string) (*kinesisanalytics.ApplicationSummary, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{kinesisanalytics.ApplicationStatusRunning, kinesisanalytics.ApplicationStatusDeleting}, + Target: []string{ApplicationStatusNotFound}, + Refresh: ApplicationStatus(conn, applicationName), + Timeout: ApplicationDeletedTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*kinesisanalytics.ApplicationSummary); ok { + return v, err + } + + return nil, err +} diff --git a/aws/internal/service/kms/waiter/status.go b/aws/internal/service/kms/waiter/status.go new file mode 100644 index 00000000000..d0021759c22 --- /dev/null +++ b/aws/internal/service/kms/waiter/status.go @@ -0,0 +1,28 @@ +package waiter + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kms" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +// KeyState fetches the Key and its State +func KeyState(conn *kms.KMS, keyID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &kms.DescribeKeyInput{ + KeyId: aws.String(keyID), + } + + output, err := conn.DescribeKey(input) + + if err != nil { + return nil, kms.KeyStateUnavailable, err + } + + if output == nil || output.KeyMetadata == nil { + return output, kms.KeyStateUnavailable, nil + } + + return output, aws.StringValue(output.KeyMetadata.KeyState), nil + } +} diff --git a/aws/internal/service/kms/waiter/waiter.go b/aws/internal/service/kms/waiter/waiter.go new file mode 100644 index 00000000000..741178145c5 --- /dev/null +++ b/aws/internal/service/kms/waiter/waiter.go @@ -0,0 +1,34 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/kms" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for KeyState to return PendingDeletion + KeyStatePendingDeletionTimeout = 20 * time.Minute +) + +// KeyStatePendingDeletion waits for KeyState to return PendingDeletion +func KeyStatePendingDeletion(conn *kms.KMS, keyID string) (*kms.DescribeKeyOutput, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + kms.KeyStateDisabled, + kms.KeyStateEnabled, + }, + Target: []string{kms.KeyStatePendingDeletion}, + Refresh: KeyState(conn, keyID), + Timeout: KeyStatePendingDeletionTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if output, ok := outputRaw.(*kms.DescribeKeyOutput); ok { + return output, err + } + + return nil, err +} diff --git a/aws/internal/service/neptune/waiter/status.go b/aws/internal/service/neptune/waiter/status.go new file mode 100644 index 00000000000..9bd81125fb3 --- /dev/null +++ b/aws/internal/service/neptune/waiter/status.go @@ -0,0 +1,36 @@ +package waiter + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // EventSubscription NotFound + EventSubscriptionStatusNotFound = "NotFound" + + // EventSubscription Unknown + EventSubscriptionStatusUnknown = "Unknown" +) + +// EventSubscriptionStatus fetches the EventSubscription and its Status +func EventSubscriptionStatus(conn *neptune.Neptune, subscriptionName string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &neptune.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(subscriptionName), + } + + output, err := conn.DescribeEventSubscriptions(input) + + if err != nil { + return nil, EventSubscriptionStatusUnknown, err + } + + if len(output.EventSubscriptionsList) == 0 { + return nil, EventSubscriptionStatusNotFound, nil + } + + return output.EventSubscriptionsList[0], aws.StringValue(output.EventSubscriptionsList[0].Status), nil + } +} diff --git a/aws/internal/service/neptune/waiter/waiter.go b/aws/internal/service/neptune/waiter/waiter.go new file mode 100644 index 00000000000..63b287a6876 --- /dev/null +++ b/aws/internal/service/neptune/waiter/waiter.go @@ -0,0 +1,31 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/neptune" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for an EventSubscription to return Deleted + EventSubscriptionDeletedTimeout = 10 * time.Minute +) + +// DeploymentDeployed waits for a EventSubscription to return Deleted +func EventSubscriptionDeleted(conn *neptune.Neptune, subscriptionName string) (*neptune.EventSubscription, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{"deleting"}, + Target: []string{EventSubscriptionStatusNotFound}, + Refresh: EventSubscriptionStatus(conn, subscriptionName), + Timeout: EventSubscriptionDeletedTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*neptune.EventSubscription); ok { + return v, err + } + + return nil, err +} diff --git a/aws/internal/service/rds/waiter/status.go b/aws/internal/service/rds/waiter/status.go new file mode 100644 index 00000000000..62e70a79523 --- /dev/null +++ b/aws/internal/service/rds/waiter/status.go @@ -0,0 +1,36 @@ +package waiter + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // EventSubscription NotFound + EventSubscriptionStatusNotFound = "NotFound" + + // EventSubscription Unknown + EventSubscriptionStatusUnknown = "Unknown" +) + +// EventSubscriptionStatus fetches the EventSubscription and its Status +func EventSubscriptionStatus(conn *rds.RDS, subscriptionName string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &rds.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(subscriptionName), + } + + output, err := conn.DescribeEventSubscriptions(input) + + if err != nil { + return nil, EventSubscriptionStatusUnknown, err + } + + if len(output.EventSubscriptionsList) == 0 { + return nil, EventSubscriptionStatusNotFound, nil + } + + return output.EventSubscriptionsList[0], aws.StringValue(output.EventSubscriptionsList[0].Status), nil + } +} diff --git a/aws/internal/service/rds/waiter/waiter.go b/aws/internal/service/rds/waiter/waiter.go new file mode 100644 index 00000000000..482b98573ad --- /dev/null +++ b/aws/internal/service/rds/waiter/waiter.go @@ -0,0 +1,31 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for an EventSubscription to return Deleted + EventSubscriptionDeletedTimeout = 10 * time.Minute +) + +// DeploymentDeployed waits for a EventSubscription to return Deleted +func EventSubscriptionDeleted(conn *rds.RDS, subscriptionName string) (*rds.EventSubscription, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{"deleting"}, + Target: []string{EventSubscriptionStatusNotFound}, + Refresh: EventSubscriptionStatus(conn, subscriptionName), + Timeout: EventSubscriptionDeletedTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*rds.EventSubscription); ok { + return v, err + } + + return nil, err +} diff --git a/aws/internal/service/secretsmanager/waiter/waiter.go b/aws/internal/service/secretsmanager/waiter/waiter.go new file mode 100644 index 00000000000..087f9e82ee8 --- /dev/null +++ b/aws/internal/service/secretsmanager/waiter/waiter.go @@ -0,0 +1,10 @@ +package waiter + +import ( + "time" +) + +const ( + // Maximum amount of time to wait for Secrets Manager deletions to propagate + DeletionPropagationTimeout = 2 * time.Minute +) diff --git a/aws/internal/service/servicediscovery/waiter/status.go b/aws/internal/service/servicediscovery/waiter/status.go new file mode 100644 index 00000000000..be6d4cfcad6 --- /dev/null +++ b/aws/internal/service/servicediscovery/waiter/status.go @@ -0,0 +1,35 @@ +package waiter + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +// OperationStatus fetches the Operation and its Status +func OperationStatus(conn *servicediscovery.ServiceDiscovery, operationID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &servicediscovery.GetOperationInput{ + OperationId: aws.String(operationID), + } + + output, err := conn.GetOperation(input) + + if err != nil { + return nil, servicediscovery.OperationStatusFail, err + } + + // Error messages can also be contained in the response with FAIL status + // "ErrorCode":"CANNOT_CREATE_HOSTED_ZONE", + // "ErrorMessage":"The VPC that you chose, vpc-xxx in region xxx, is already associated with another private hosted zone that has an overlapping name space, xxx.. (Service: AmazonRoute53; Status Code: 400; Error Code: ConflictingDomainExists; Request ID: xxx)" + // "Status":"FAIL", + + if aws.StringValue(output.Operation.Status) == servicediscovery.OperationStatusFail { + return output, servicediscovery.OperationStatusFail, fmt.Errorf("%s: %s", aws.StringValue(output.Operation.ErrorCode), aws.StringValue(output.Operation.ErrorMessage)) + } + + return output, aws.StringValue(output.Operation.Status), nil + } +} diff --git a/aws/internal/service/servicediscovery/waiter/waiter.go b/aws/internal/service/servicediscovery/waiter/waiter.go new file mode 100644 index 00000000000..ccba30a9bdf --- /dev/null +++ b/aws/internal/service/servicediscovery/waiter/waiter.go @@ -0,0 +1,31 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for an Operation to return Success + OperationSuccessTimeout = 5 * time.Minute +) + +// OperationSuccess waits for an Operation to return Success +func OperationSuccess(conn *servicediscovery.ServiceDiscovery, operationID string) (*servicediscovery.GetOperationOutput, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, + Target: []string{servicediscovery.OperationStatusSuccess}, + Refresh: OperationStatus(conn, operationID), + Timeout: OperationSuccessTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if output, ok := outputRaw.(*servicediscovery.GetOperationOutput); ok { + return output, err + } + + return nil, err +} diff --git a/aws/internal/service/workspaces/waiter/status.go b/aws/internal/service/workspaces/waiter/status.go new file mode 100644 index 00000000000..06a3fd1bc6d --- /dev/null +++ b/aws/internal/service/workspaces/waiter/status.go @@ -0,0 +1,43 @@ +package waiter + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/workspaces" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func DirectoryState(conn *workspaces.WorkSpaces, directoryID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + output, err := conn.DescribeWorkspaceDirectories(&workspaces.DescribeWorkspaceDirectoriesInput{ + DirectoryIds: aws.StringSlice([]string{directoryID}), + }) + if err != nil { + return nil, workspaces.WorkspaceDirectoryStateError, err + } + + if len(output.Directories) == 0 { + return output, workspaces.WorkspaceDirectoryStateDeregistered, nil + } + + directory := output.Directories[0] + return directory, aws.StringValue(directory.State), nil + } +} + +func WorkspaceState(conn *workspaces.WorkSpaces, workspaceID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + output, err := conn.DescribeWorkspaces(&workspaces.DescribeWorkspacesInput{ + WorkspaceIds: aws.StringSlice([]string{workspaceID}), + }) + if err != nil { + return nil, workspaces.WorkspaceStateError, err + } + + if len(output.Workspaces) == 0 { + return nil, workspaces.WorkspaceStateTerminated, nil + } + + workspace := output.Workspaces[0] + return workspace, aws.StringValue(workspace.State), nil + } +} diff --git a/aws/internal/service/workspaces/waiter/waiter.go b/aws/internal/service/workspaces/waiter/waiter.go new file mode 100644 index 00000000000..28fd0fd2d73 --- /dev/null +++ b/aws/internal/service/workspaces/waiter/waiter.go @@ -0,0 +1,151 @@ +package waiter + +import ( + "time" + + "github.com/aws/aws-sdk-go/service/workspaces" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +const ( + // Maximum amount of time to wait for a Directory to return Registered + DirectoryRegisteredTimeout = 10 * time.Minute + + // Maximum amount of time to wait for a Directory to return Deregistered + DirectoryDeregisteredTimeout = 10 * time.Minute + + // Maximum amount of time to wait for a WorkSpace to return Available + WorkspaceAvailableTimeout = 30 * time.Minute + + // Maximum amount of time to wait for a WorkSpace while returning Updating + WorkspaceUpdatingTimeout = 10 * time.Minute + + // Amount of time to delay before checking WorkSpace when updating + WorkspaceUpdatingDelay = 1 * time.Minute + + // Maximum amount of time to wait for a WorkSpace to return Terminated + WorkspaceTerminatedTimeout = 10 * time.Minute +) + +func DirectoryRegistered(conn *workspaces.WorkSpaces, directoryID string) (*workspaces.WorkspaceDirectory, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + workspaces.WorkspaceDirectoryStateRegistering, + }, + Target: []string{workspaces.WorkspaceDirectoryStateRegistered}, + Refresh: DirectoryState(conn, directoryID), + Timeout: DirectoryRegisteredTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*workspaces.WorkspaceDirectory); ok { + return v, err + } + + return nil, err +} + +func DirectoryDeregistered(conn *workspaces.WorkSpaces, directoryID string) (*workspaces.WorkspaceDirectory, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + workspaces.WorkspaceDirectoryStateRegistering, + workspaces.WorkspaceDirectoryStateRegistered, + workspaces.WorkspaceDirectoryStateDeregistering, + }, + Target: []string{ + workspaces.WorkspaceDirectoryStateDeregistered, + }, + Refresh: DirectoryState(conn, directoryID), + Timeout: DirectoryDeregisteredTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*workspaces.WorkspaceDirectory); ok { + return v, err + } + + return nil, err +} + +func WorkspaceAvailable(conn *workspaces.WorkSpaces, workspaceID string) (*workspaces.Workspace, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + workspaces.WorkspaceStatePending, + workspaces.WorkspaceStateStarting, + }, + Target: []string{workspaces.WorkspaceStateAvailable}, + Refresh: WorkspaceState(conn, workspaceID), + Timeout: WorkspaceAvailableTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*workspaces.Workspace); ok { + return v, err + } + + return nil, err +} + +func WorkspaceTerminated(conn *workspaces.WorkSpaces, workspaceID string) (*workspaces.Workspace, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + workspaces.WorkspaceStatePending, + workspaces.WorkspaceStateAvailable, + workspaces.WorkspaceStateImpaired, + workspaces.WorkspaceStateUnhealthy, + workspaces.WorkspaceStateRebooting, + workspaces.WorkspaceStateStarting, + workspaces.WorkspaceStateRebuilding, + workspaces.WorkspaceStateRestoring, + workspaces.WorkspaceStateMaintenance, + workspaces.WorkspaceStateAdminMaintenance, + workspaces.WorkspaceStateSuspended, + workspaces.WorkspaceStateUpdating, + workspaces.WorkspaceStateStopping, + workspaces.WorkspaceStateStopped, + workspaces.WorkspaceStateTerminating, + workspaces.WorkspaceStateError, + }, + Target: []string{ + workspaces.WorkspaceStateTerminated, + }, + Refresh: WorkspaceState(conn, workspaceID), + Timeout: WorkspaceTerminatedTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*workspaces.Workspace); ok { + return v, err + } + + return nil, err +} + +func WorkspaceUpdated(conn *workspaces.WorkSpaces, workspaceID string) (*workspaces.Workspace, error) { + // OperationInProgressException: The properties of this WorkSpace are currently under modification. Please try again in a moment. + // AWS Workspaces service doesn't change instance status to "Updating" during property modification. Respective AWS Support feature request has been created. Meanwhile, artificial delay is placed here as a workaround. + stateConf := &resource.StateChangeConf{ + Pending: []string{ + workspaces.WorkspaceStateUpdating, + }, + Target: []string{ + workspaces.WorkspaceStateAvailable, + workspaces.WorkspaceStateStopped, + }, + Refresh: WorkspaceState(conn, workspaceID), + Delay: WorkspaceUpdatingDelay, + Timeout: WorkspaceUpdatingTimeout, + } + + outputRaw, err := stateConf.WaitForState() + + if v, ok := outputRaw.(*workspaces.Workspace); ok { + return v, err + } + + return nil, err +} diff --git a/aws/opsworks_layers.go b/aws/opsworks_layers.go index 8a447343483..53df0fb3559 100644 --- a/aws/opsworks_layers.go +++ b/aws/opsworks_layers.go @@ -5,13 +5,13 @@ import ( "log" "strconv" - "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/structure" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) // OpsWorks has a single concept of "layer" which represents several different @@ -59,8 +59,9 @@ func (lt *opsworksLayerType) SchemaResource() *schema.Resource { }, "custom_instance_profile_arn": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, }, "elastic_load_balancer": { @@ -208,6 +209,11 @@ func (lt *opsworksLayerType) SchemaResource() *schema.Resource { return hashcode.String(m["mount_point"].(string)) }, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), } if lt.CustomShortName { @@ -242,15 +248,19 @@ func (lt *opsworksLayerType) SchemaResource() *schema.Resource { return &schema.Resource{ Read: func(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).opsworksconn - return lt.Read(d, client) + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + return lt.Read(d, client, ignoreTagsConfig) }, Create: func(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).opsworksconn - return lt.Create(d, client) + return lt.Create(d, client, meta) }, Update: func(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).opsworksconn - return lt.Update(d, client) + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + return lt.Update(d, client, ignoreTagsConfig) }, Delete: func(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).opsworksconn @@ -264,7 +274,7 @@ func (lt *opsworksLayerType) SchemaResource() *schema.Resource { } } -func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWorks) error { +func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWorks, ignoreTagsConfig *keyvaluetags.IgnoreConfig) error { req := &opsworks.DescribeLayersInput{ LayerIds: []*string{ @@ -276,11 +286,9 @@ func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWo resp, err := client.DescribeLayers(req) if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - d.SetId("") - return nil - } + if isAWSErr(err, opsworks.ErrCodeResourceNotFoundException, "") { + d.SetId("") + return nil } return err } @@ -312,7 +320,10 @@ func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWo d.Set("custom_json", policy) } - lt.SetAttributeMap(d, layer.Attributes) + err = lt.SetAttributeMap(d, layer.Attributes) + if err != nil { + return err + } lt.SetLifecycleEventConfiguration(d, layer.LifecycleEventConfiguration) lt.SetCustomRecipes(d, layer.CustomRecipes) lt.SetVolumeConfigurations(d, layer.VolumeConfigurations) @@ -337,11 +348,28 @@ func (lt *opsworksLayerType) Read(d *schema.ResourceData, client *opsworks.OpsWo } } + arn := aws.StringValue(layer.Arn) + d.Set("arn", arn) + tags, err := keyvaluetags.OpsworksListTags(client, arn) + + if err != nil { + return fmt.Errorf("error listing tags for Opsworks Layer (%s): %s", arn, err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + return nil } -func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.OpsWorks) error { +func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.OpsWorks, meta interface{}) error { + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + attributes, err := lt.AttributeMap(d) + if err != nil { + return err + } req := &opsworks.CreateLayerInput{ AutoAssignElasticIps: aws.Bool(d.Get("auto_assign_elastic_ips").(bool)), AutoAssignPublicIps: aws.Bool(d.Get("auto_assign_public_ips").(bool)), @@ -356,7 +384,7 @@ func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.Ops Type: aws.String(lt.TypeName), StackId: aws.String(d.Get("stack_id").(string)), UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), + Attributes: attributes, VolumeConfigurations: lt.VolumeConfigurations(d), } @@ -390,11 +418,28 @@ func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.Ops } } - return lt.Read(d, client) -} + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "opsworks", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("layer/%s", d.Id()), + }.String() + + if v, ok := d.GetOk("tags"); ok { + if err := keyvaluetags.OpsworksUpdateTags(client, arn, nil, v.(map[string]interface{})); err != nil { + return fmt.Errorf("error updating Opsworks stack (%s) tags: %s", arn, err) + } + } -func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.OpsWorks) error { + return lt.Read(d, client, ignoreTagsConfig) +} +func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.OpsWorks, ignoreTagsConfig *keyvaluetags.IgnoreConfig) error { + attributes, err := lt.AttributeMap(d) + if err != nil { + return err + } req := &opsworks.UpdateLayerInput{ LayerId: aws.String(d.Id()), AutoAssignElasticIps: aws.Bool(d.Get("auto_assign_elastic_ips").(bool)), @@ -408,7 +453,7 @@ func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.Ops Name: aws.String(d.Get("name").(string)), Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), + Attributes: attributes, VolumeConfigurations: lt.VolumeConfigurations(d), } @@ -451,12 +496,21 @@ func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.Ops } } - _, err := client.UpdateLayer(req) + _, err = client.UpdateLayer(req) if err != nil { return err } - return lt.Read(d, client) + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + arn := d.Get("arn").(string) + if err := keyvaluetags.OpsworksUpdateTags(client, arn, o, n); err != nil { + return fmt.Errorf("error updating Opsworks Layer (%s) tags: %s", arn, err) + } + } + + return lt.Read(d, client, ignoreTagsConfig) } func (lt *opsworksLayerType) Delete(d *schema.ResourceData, client *opsworks.OpsWorks) error { @@ -470,7 +524,7 @@ func (lt *opsworksLayerType) Delete(d *schema.ResourceData, client *opsworks.Ops return err } -func (lt *opsworksLayerType) AttributeMap(d *schema.ResourceData) map[string]*string { +func (lt *opsworksLayerType) AttributeMap(d *schema.ResourceData) (map[string]*string, error) { attrs := map[string]*string{} for key, def := range lt.Attributes { @@ -492,14 +546,14 @@ func (lt *opsworksLayerType) AttributeMap(d *schema.ResourceData) map[string]*st } default: // should never happen - panic(fmt.Errorf("Unsupported OpsWorks layer attribute type")) + return nil, fmt.Errorf("Unsupported OpsWorks layer attribute type: %s", def.Type) } } - return attrs + return attrs, nil } -func (lt *opsworksLayerType) SetAttributeMap(d *schema.ResourceData, attrs map[string]*string) { +func (lt *opsworksLayerType) SetAttributeMap(d *schema.ResourceData, attrs map[string]*string) error { for key, def := range lt.Attributes { // Ignore write-only attributes; we'll just keep what we already have stored. // (The AWS API returns garbage placeholder values for these.) @@ -529,14 +583,15 @@ func (lt *opsworksLayerType) SetAttributeMap(d *schema.ResourceData, attrs map[s d.Set(key, boolValue) default: // should never happen - panic(fmt.Errorf("Unsupported OpsWorks layer attribute type")) + return fmt.Errorf("Unsupported OpsWorks layer attribute type: %s", def.Type) } - return + return nil } else { d.Set(key, nil) } } + return nil } func (lt *opsworksLayerType) LifecycleEventConfiguration(d *schema.ResourceData) *opsworks.LifecycleEventConfiguration { diff --git a/aws/provider.go b/aws/provider.go index ffcb3333fe3..8976fa96e4a 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" homedir "github.com/mitchellh/go-homedir" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) // Provider returns a terraform.ResourceProvider. @@ -90,20 +91,29 @@ func Provider() terraform.ResourceProvider { "endpoints": endpointsSchema(), - "ignore_tag_prefixes": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Description: "Resource tag key prefixes to ignore across all resources.", - }, - "ignore_tags": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - Description: "Resource tag keys to ignore across all resources.", + MaxItems: 1, + Description: "Configuration block with settings to ignore resource tags across all resources.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "keys": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + Description: "Resource tag keys to ignore across all resources.", + }, + "key_prefixes": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + Description: "Resource tag key prefixes to ignore across all resources.", + }, + }, + }, }, "insecure": { @@ -170,6 +180,9 @@ func Provider() terraform.ResourceProvider { "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), "aws_availability_zone": dataSourceAwsAvailabilityZone(), "aws_availability_zones": dataSourceAwsAvailabilityZones(), + "aws_backup_plan": dataSourceAwsBackupPlan(), + "aws_backup_selection": dataSourceAwsBackupSelection(), + "aws_backup_vault": dataSourceAwsBackupVault(), "aws_batch_compute_environment": dataSourceAwsBatchComputeEnvironment(), "aws_batch_job_queue": dataSourceAwsBatchJobQueue(), "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), @@ -177,6 +190,7 @@ func Provider() terraform.ResourceProvider { "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), "aws_cloudformation_export": dataSourceAwsCloudFormationExport(), "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), + "aws_cloudfront_distribution": dataSourceAwsCloudFrontDistribution(), "aws_cloudhsm_v2_cluster": dataSourceCloudHsmV2Cluster(), "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), @@ -195,10 +209,17 @@ func Provider() terraform.ResourceProvider { "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), "aws_ebs_volume": dataSourceAwsEbsVolume(), + "aws_ec2_coip_pool": dataSourceAwsEc2CoipPool(), + "aws_ec2_coip_pools": dataSourceAwsEc2CoipPools(), "aws_ec2_instance_type_offering": dataSourceAwsEc2InstanceTypeOffering(), "aws_ec2_instance_type_offerings": dataSourceAwsEc2InstanceTypeOfferings(), + "aws_ec2_local_gateway": dataSourceAwsEc2LocalGateway(), + "aws_ec2_local_gateways": dataSourceAwsEc2LocalGateways(), + "aws_ec2_local_gateway_route_table": dataSourceAwsEc2LocalGatewayRouteTable(), + "aws_ec2_local_gateway_route_tables": dataSourceAwsEc2LocalGatewayRouteTables(), "aws_ec2_transit_gateway": dataSourceAwsEc2TransitGateway(), "aws_ec2_transit_gateway_dx_gateway_attachment": dataSourceAwsEc2TransitGatewayDxGatewayAttachment(), + "aws_ec2_transit_gateway_peering_attachment": dataSourceAwsEc2TransitGatewayPeeringAttachment(), "aws_ec2_transit_gateway_route_table": dataSourceAwsEc2TransitGatewayRouteTable(), "aws_ec2_transit_gateway_vpc_attachment": dataSourceAwsEc2TransitGatewayVpcAttachment(), "aws_ec2_transit_gateway_vpn_attachment": dataSourceAwsEc2TransitGatewayVpnAttachment(), @@ -209,6 +230,7 @@ func Provider() terraform.ResourceProvider { "aws_ecs_service": dataSourceAwsEcsService(), "aws_ecs_task_definition": dataSourceAwsEcsTaskDefinition(), "aws_customer_gateway": dataSourceAwsCustomerGateway(), + "aws_efs_access_point": dataSourceAwsEfsAccessPoint(), "aws_efs_file_system": dataSourceAwsEfsFileSystem(), "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), "aws_eip": dataSourceAwsEip(), @@ -269,6 +291,7 @@ func Provider() terraform.ResourceProvider { "aws_redshift_cluster": dataSourceAwsRedshiftCluster(), "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), "aws_region": dataSourceAwsRegion(), + "aws_regions": dataSourceAwsRegions(), "aws_route": dataSourceAwsRoute(), "aws_route_table": dataSourceAwsRouteTable(), "aws_route_tables": dataSourceAwsRouteTables(), @@ -311,6 +334,9 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_rule": dataSourceAwsWafRegionalRule(), "aws_wafregional_rate_based_rule": dataSourceAwsWafRegionalRateBasedRule(), "aws_wafregional_web_acl": dataSourceAwsWafRegionalWebAcl(), + "aws_wafv2_ip_set": dataSourceAwsWafv2IPSet(), + "aws_wafv2_regex_pattern_set": dataSourceAwsWafv2RegexPatternSet(), + "aws_wafv2_rule_group": dataSourceAwsWafv2RuleGroup(), "aws_workspaces_bundle": dataSourceAwsWorkspaceBundle(), // Adding the Aliases for the ALB -> LB Rename @@ -355,6 +381,17 @@ func Provider() terraform.ResourceProvider { "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), "aws_apigatewayv2_api": resourceAwsApiGatewayV2Api(), + "aws_apigatewayv2_api_mapping": resourceAwsApiGatewayV2ApiMapping(), + "aws_apigatewayv2_authorizer": resourceAwsApiGatewayV2Authorizer(), + "aws_apigatewayv2_deployment": resourceAwsApiGatewayV2Deployment(), + "aws_apigatewayv2_domain_name": resourceAwsApiGatewayV2DomainName(), + "aws_apigatewayv2_integration": resourceAwsApiGatewayV2Integration(), + "aws_apigatewayv2_integration_response": resourceAwsApiGatewayV2IntegrationResponse(), + "aws_apigatewayv2_model": resourceAwsApiGatewayV2Model(), + "aws_apigatewayv2_route": resourceAwsApiGatewayV2Route(), + "aws_apigatewayv2_route_response": resourceAwsApiGatewayV2RouteResponse(), + "aws_apigatewayv2_stage": resourceAwsApiGatewayV2Stage(), + "aws_apigatewayv2_vpc_link": resourceAwsApiGatewayV2VpcLink(), "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), @@ -459,6 +496,7 @@ func Provider() terraform.ResourceProvider { "aws_dlm_lifecycle_policy": resourceAwsDlmLifecyclePolicy(), "aws_dms_certificate": resourceAwsDmsCertificate(), "aws_dms_endpoint": resourceAwsDmsEndpoint(), + "aws_dms_event_subscription": resourceAwsDmsEventSubscription(), "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), "aws_dms_replication_task": resourceAwsDmsReplicationTask(), @@ -491,6 +529,7 @@ func Provider() terraform.ResourceProvider { "aws_ebs_snapshot": resourceAwsEbsSnapshot(), "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ec2_availability_zone_group": resourceAwsEc2AvailabilityZoneGroup(), "aws_ec2_capacity_reservation": resourceAwsEc2CapacityReservation(), "aws_ec2_client_vpn_endpoint": resourceAwsEc2ClientVpnEndpoint(), "aws_ec2_client_vpn_network_association": resourceAwsEc2ClientVpnNetworkAssociation(), @@ -500,6 +539,8 @@ func Provider() terraform.ResourceProvider { "aws_ec2_traffic_mirror_target": resourceAwsEc2TrafficMirrorTarget(), "aws_ec2_traffic_mirror_session": resourceAwsEc2TrafficMirrorSession(), "aws_ec2_transit_gateway": resourceAwsEc2TransitGateway(), + "aws_ec2_transit_gateway_peering_attachment": resourceAwsEc2TransitGatewayPeeringAttachment(), + "aws_ec2_transit_gateway_peering_attachment_accepter": resourceAwsEc2TransitGatewayPeeringAttachmentAccepter(), "aws_ec2_transit_gateway_route": resourceAwsEc2TransitGatewayRoute(), "aws_ec2_transit_gateway_route_table": resourceAwsEc2TransitGatewayRouteTable(), "aws_ec2_transit_gateway_route_table_association": resourceAwsEc2TransitGatewayRouteTableAssociation(), @@ -513,7 +554,9 @@ func Provider() terraform.ResourceProvider { "aws_ecs_cluster": resourceAwsEcsCluster(), "aws_ecs_service": resourceAwsEcsService(), "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_access_point": resourceAwsEfsAccessPoint(), "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_file_system_policy": resourceAwsEfsFileSystemPolicy(), "aws_efs_mount_target": resourceAwsEfsMountTarget(), "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), "aws_eip": resourceAwsEip(), @@ -566,6 +609,8 @@ func Provider() terraform.ResourceProvider { "aws_guardduty_invite_accepter": resourceAwsGuardDutyInviteAccepter(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_organization_admin_account": resourceAwsGuardDutyOrganizationAdminAccount(), + "aws_guardduty_organization_configuration": resourceAwsGuardDutyOrganizationConfiguration(), "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), "aws_iam_access_key": resourceAwsIamAccessKey(), "aws_iam_account_alias": resourceAwsIamAccountAlias(), @@ -751,6 +796,7 @@ func Provider() terraform.ResourceProvider { "aws_default_security_group": resourceAwsDefaultSecurityGroup(), "aws_security_group_rule": resourceAwsSecurityGroupRule(), "aws_securityhub_account": resourceAwsSecurityHubAccount(), + "aws_securityhub_member": resourceAwsSecurityHubMember(), "aws_securityhub_product_subscription": resourceAwsSecurityHubProductSubscription(), "aws_securityhub_standards_subscription": resourceAwsSecurityHubStandardsSubscription(), "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), @@ -843,9 +889,13 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_wafv2_ip_set": resourceAwsWafv2IPSet(), + "aws_wafv2_regex_pattern_set": resourceAwsWafv2RegexPatternSet(), + "aws_wafv2_rule_group": resourceAwsWafv2RuleGroup(), "aws_worklink_fleet": resourceAwsWorkLinkFleet(), "aws_worklink_website_certificate_authority_association": resourceAwsWorkLinkWebsiteCertificateAuthorityAssociation(), "aws_workspaces_directory": resourceAwsWorkspacesDirectory(), + "aws_workspaces_workspace": resourceAwsWorkspacesWorkspace(), "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), "aws_batch_job_definition": resourceAwsBatchJobDefinition(), "aws_batch_job_queue": resourceAwsBatchJobQueue(), @@ -1036,6 +1086,7 @@ func init() { "kinesis_analytics", "kinesis", "kinesisanalytics", + "kinesisanalyticsv2", "kinesisvideo", "kms", "lakeformation", @@ -1054,6 +1105,7 @@ func init() { "mediastoredata", "mq", "neptune", + "networkmanager", "opsworks", "organizations", "personalize", @@ -1067,6 +1119,7 @@ func init() { "redshift", "resourcegroups", "route53", + "route53domains", "route53resolver", "s3", "s3control", @@ -1087,6 +1140,7 @@ func init() { "storagegateway", "sts", "swf", + "synthetics", "transfer", "waf", "wafregional", @@ -1107,6 +1161,7 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa Region: d.Get("region").(string), Endpoints: make(map[string]string), MaxRetries: d.Get("max_retries").(int), + IgnoreTagsConfig: expandProviderIgnoreTags(d.Get("ignore_tags").([]interface{})), Insecure: d.Get("insecure").(bool), SkipCredsValidation: d.Get("skip_credentials_validation").(bool), SkipGetEC2Platforms: d.Get("skip_get_ec2_platforms").(bool), @@ -1124,19 +1179,23 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa } config.CredsFilename = credsPath - assumeRoleList := d.Get("assume_role").(*schema.Set).List() + assumeRoleList := d.Get("assume_role").([]interface{}) if len(assumeRoleList) == 1 { - assumeRole := assumeRoleList[0].(map[string]interface{}) - config.AssumeRoleARN = assumeRole["role_arn"].(string) - config.AssumeRoleSessionName = assumeRole["session_name"].(string) - config.AssumeRoleExternalID = assumeRole["external_id"].(string) - - if v := assumeRole["policy"].(string); v != "" { - config.AssumeRolePolicy = v + if assumeRoleList[0] != nil { + assumeRole := assumeRoleList[0].(map[string]interface{}) + config.AssumeRoleARN = assumeRole["role_arn"].(string) + config.AssumeRoleSessionName = assumeRole["session_name"].(string) + config.AssumeRoleExternalID = assumeRole["external_id"].(string) + + if v := assumeRole["policy"].(string); v != "" { + config.AssumeRolePolicy = v + } + + log.Printf("[INFO] assume_role configuration set: (ARN: %q, SessionID: %q, ExternalID: %q, Policy: %q)", + config.AssumeRoleARN, config.AssumeRoleSessionName, config.AssumeRoleExternalID, config.AssumeRolePolicy) + } else { + log.Printf("[INFO] Empty assume_role block read from configuration") } - - log.Printf("[INFO] assume_role configuration set: (ARN: %q, SessionID: %q, ExternalID: %q, Policy: %q)", - config.AssumeRoleARN, config.AssumeRoleSessionName, config.AssumeRoleExternalID, config.AssumeRolePolicy) } else { log.Printf("[INFO] No assume_role block read from configuration") } @@ -1150,18 +1209,6 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa } } - if v, ok := d.GetOk("ignore_tag_prefixes"); ok { - for _, ignoreTagPrefixRaw := range v.(*schema.Set).List() { - config.IgnoreTagPrefixes = append(config.IgnoreTagPrefixes, ignoreTagPrefixRaw.(string)) - } - } - - if v, ok := d.GetOk("ignore_tags"); ok { - for _, ignoreTagRaw := range v.(*schema.Set).List() { - config.IgnoreTags = append(config.IgnoreTags, ignoreTagRaw.(string)) - } - } - if v, ok := d.GetOk("allowed_account_ids"); ok { for _, accountIDRaw := range v.(*schema.Set).List() { config.AllowedAccountIds = append(config.AllowedAccountIds, accountIDRaw.(string)) @@ -1182,7 +1229,7 @@ var awsMutexKV = mutexkv.NewMutexKV() func assumeRoleSchema() *schema.Schema { return &schema.Schema{ - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -1239,3 +1286,22 @@ func endpointsSchema() *schema.Schema { }, } } + +func expandProviderIgnoreTags(l []interface{}) *keyvaluetags.IgnoreConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + ignoreConfig := &keyvaluetags.IgnoreConfig{} + m := l[0].(map[string]interface{}) + + if v, ok := m["keys"].(*schema.Set); ok { + ignoreConfig.Keys = keyvaluetags.New(v.List()) + } + + if v, ok := m["key_prefixes"].(*schema.Set); ok { + ignoreConfig.KeyPrefixes = keyvaluetags.New(v.List()) + } + + return ignoreConfig +} diff --git a/aws/provider_test.go b/aws/provider_test.go index 63b57f08061..464fce84a60 100644 --- a/aws/provider_test.go +++ b/aws/provider_test.go @@ -9,15 +9,19 @@ import ( "strings" "testing" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/endpoints" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/organizations" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/structure" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) const rfc3339RegexPattern = `^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?([Zz]|([+-]([01][0-9]|2[0-3]):[0-5][0-9]))$` +const uuidRegexPattern = `[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[ab89][a-f0-9]{3}-[a-f0-9]{12}` var testAccProviders map[string]terraform.ResourceProvider var testAccProviderFactories func(providers *[]*schema.Provider) map[string]terraform.ResourceProviderFactory @@ -122,6 +126,20 @@ func testAccCheckResourceAttrRegionalARNNoAccount(resourceName, attributeName, a } } +// testAccCheckResourceAttrRegionalARNAccountID ensures the Terraform state exactly matches a formatted ARN with region and specific account ID +func testAccCheckResourceAttrRegionalARNAccountID(resourceName, attributeName, arnService, accountID, arnResource string) resource.TestCheckFunc { + return func(s *terraform.State) error { + attributeValue := arn.ARN{ + AccountID: accountID, + Partition: testAccGetPartition(), + Region: testAccGetRegion(), + Resource: arnResource, + Service: arnService, + }.String() + return resource.TestCheckResourceAttr(resourceName, attributeName, attributeValue)(s) + } +} + // testAccMatchResourceAttrRegionalARN ensures the Terraform state regexp matches a formatted ARN with region func testAccMatchResourceAttrRegionalARN(resourceName, attributeName, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -163,6 +181,27 @@ func testAccMatchResourceAttrRegionalARNNoAccount(resourceName, attributeName, a } } +// testAccMatchResourceAttrRegionalARNAccountID ensures the Terraform state regexp matches a formatted ARN with region and specific account ID +func testAccMatchResourceAttrRegionalARNAccountID(resourceName, attributeName, arnService, accountID string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc { + return func(s *terraform.State) error { + arnRegexp := arn.ARN{ + AccountID: accountID, + Partition: testAccGetPartition(), + Region: testAccGetRegion(), + Resource: arnResourceRegexp.String(), + Service: arnService, + }.String() + + attributeMatch, err := regexp.Compile(arnRegexp) + + if err != nil { + return fmt.Errorf("Unable to compile ARN regexp (%s): %s", arnRegexp, err) + } + + return resource.TestMatchResourceAttr(resourceName, attributeName, attributeMatch)(s) + } +} + // testAccMatchResourceAttrRegionalHostname ensures the Terraform state regexp matches a formatted DNS hostname with region and partition DNS suffix func testAccMatchResourceAttrRegionalHostname(resourceName, attributeName, serviceName string, hostnamePrefixRegexp *regexp.Regexp) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -203,6 +242,19 @@ func testAccCheckResourceAttrGlobalARNNoAccount(resourceName, attributeName, arn } } +// testAccCheckResourceAttrGlobalARNAccountID ensures the Terraform state exactly matches a formatted ARN without region and with specific account ID +func testAccCheckResourceAttrGlobalARNAccountID(resourceName, attributeName, accountID, arnService, arnResource string) resource.TestCheckFunc { + return func(s *terraform.State) error { + attributeValue := arn.ARN{ + AccountID: accountID, + Partition: testAccGetPartition(), + Resource: arnResource, + Service: arnService, + }.String() + return resource.TestCheckResourceAttr(resourceName, attributeName, attributeValue)(s) + } +} + // testAccMatchResourceAttrGlobalARN ensures the Terraform state regexp matches a formatted ARN without region func testAccMatchResourceAttrGlobalARN(resourceName, attributeName, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -275,6 +327,37 @@ func testAccCheckListHasSomeElementAttrPair(nameFirst string, resourceAttr strin } } +// testAccCheckResourceAttrEquivalentJSON is a TestCheckFunc that compares a JSON value with an expected value. Both JSON +// values are normalized before being compared. +func testAccCheckResourceAttrEquivalentJSON(resourceName, attributeName, expectedJSON string) resource.TestCheckFunc { + return func(s *terraform.State) error { + is, err := primaryInstanceState(s, resourceName) + if err != nil { + return err + } + + v, ok := is.Attributes[attributeName] + if !ok { + return fmt.Errorf("%s: No attribute %q found", resourceName, attributeName) + } + + vNormal, err := structure.NormalizeJsonString(v) + if err != nil { + return fmt.Errorf("%s: Error normalizing JSON in %q: %w", resourceName, attributeName, err) + } + + expectedNormal, err := structure.NormalizeJsonString(expectedJSON) + if err != nil { + return fmt.Errorf("Error normalizing expected JSON: %w", err) + } + + if vNormal != expectedNormal { + return fmt.Errorf("%s: Attribute %q expected\n%s\ngot\n%s", resourceName, attributeName, expectedJSON, v) + } + return nil + } +} + // Copied and inlined from the SDK testing code func primaryInstanceState(s *terraform.State, name string) (*terraform.InstanceState, error) { rs, ok := s.RootModule().Resources[name] @@ -291,7 +374,7 @@ func primaryInstanceState(s *terraform.State, name string) (*terraform.InstanceS } // testAccGetAccountID returns the account ID of testAccProvider -// Must be used returned within a resource.TestCheckFunc +// Must be used within a resource.TestCheckFunc func testAccGetAccountID() string { return testAccAwsProviderAccountID(testAccProvider) } @@ -312,6 +395,14 @@ func testAccGetAlternateRegion() string { return v } +func testAccGetThirdRegion() string { + v := os.Getenv("AWS_THIRD_REGION") + if v == "" { + return "us-east-2" + } + return v +} + func testAccGetPartition() string { if partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), testAccGetRegion()); ok { return partition.ID() @@ -333,6 +424,13 @@ func testAccGetAlternateRegionPartition() string { return "aws" } +func testAccGetThirdRegionPartition() string { + if partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), testAccGetThirdRegion()); ok { + return partition.ID() + } + return "aws" +} + func testAccAlternateAccountPreCheck(t *testing.T) { if os.Getenv("AWS_ALTERNATE_PROFILE") == "" && os.Getenv("AWS_ALTERNATE_ACCESS_KEY_ID") == "" { t.Fatal("AWS_ALTERNATE_ACCESS_KEY_ID or AWS_ALTERNATE_PROFILE must be set for acceptance tests") @@ -343,6 +441,7 @@ func testAccAlternateAccountPreCheck(t *testing.T) { } } +// Deprecated: Use testAccMultipleRegionPreCheck instead func testAccAlternateRegionPreCheck(t *testing.T) { if testAccGetRegion() == testAccGetAlternateRegion() { t.Fatal("AWS_DEFAULT_REGION and AWS_ALTERNATE_REGION must be set to different values for acceptance tests") @@ -381,6 +480,37 @@ func testAccPartitionHasServicePreCheck(serviceId string, t *testing.T) { } } +func testAccMultipleRegionPreCheck(t *testing.T, regions int) { + if testAccGetRegion() == testAccGetAlternateRegion() { + t.Fatal("AWS_DEFAULT_REGION and AWS_ALTERNATE_REGION must be set to different values for acceptance tests") + } + + if testAccGetPartition() != testAccGetAlternateRegionPartition() { + t.Fatalf("AWS_ALTERNATE_REGION partition (%s) does not match AWS_DEFAULT_REGION partition (%s)", testAccGetAlternateRegionPartition(), testAccGetPartition()) + } + + if regions >= 3 { + if testAccGetRegion() == testAccGetThirdRegion() { + t.Fatal("AWS_DEFAULT_REGION and AWS_THIRD_REGION must be set to different values for acceptance tests") + } + + if testAccGetAlternateRegion() == testAccGetThirdRegion() { + t.Fatal("AWS_ALTERNATE_REGION and AWS_THIRD_REGION must be set to different values for acceptance tests") + } + + if testAccGetPartition() != testAccGetThirdRegionPartition() { + t.Fatalf("AWS_THIRD_REGION partition (%s) does not match AWS_DEFAULT_REGION partition (%s)", testAccGetThirdRegionPartition(), testAccGetPartition()) + } + } + + if partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), testAccGetRegion()); ok { + if len(partition.Regions()) < regions { + t.Skipf("skipping tests; partition includes %d regions, %d expected", len(partition.Regions()), regions) + } + } +} + +// Deprecated: Use testAccMultipleRegionPreCheck instead. func testAccMultipleRegionsPreCheck(t *testing.T) { if partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), testAccGetRegion()); ok { if len(partition.Regions()) < 2 { @@ -402,6 +532,18 @@ func testAccOrganizationsAccountPreCheck(t *testing.T) { t.Skip("skipping tests; this AWS account must not be an existing member of an AWS Organization") } +func testAccOrganizationsEnabledPreCheck(t *testing.T) { + conn := testAccProvider.Meta().(*AWSClient).organizationsconn + input := &organizations.DescribeOrganizationInput{} + _, err := conn.DescribeOrganization(input) + if isAWSErr(err, organizations.ErrCodeAWSOrganizationsNotInUseException, "") { + t.Skip("this AWS account must be an existing member of an AWS Organization") + } + if err != nil { + t.Fatalf("error describing AWS Organization: %s", err) + } +} + func testAccAlternateAccountProviderConfig() string { //lintignore:AT004 return fmt.Sprintf(` @@ -427,6 +569,34 @@ provider "aws" { `, os.Getenv("AWS_ALTERNATE_ACCESS_KEY_ID"), os.Getenv("AWS_ALTERNATE_PROFILE"), testAccGetAlternateRegion(), os.Getenv("AWS_ALTERNATE_SECRET_ACCESS_KEY")) } +// When testing needs to distinguish a second region and second account in the same region +// e.g. cross-region functionality with RAM shared subnets +func testAccAlternateAccountAndAlternateRegionProviderConfig() string { + //lintignore:AT004 + return fmt.Sprintf(` +provider "aws" { + access_key = %[1]q + alias = "alternateaccountalternateregion" + profile = %[2]q + region = %[3]q + secret_key = %[4]q +} + +provider "aws" { + access_key = %[1]q + alias = "alternateaccountsameregion" + profile = %[2]q + secret_key = %[4]q +} + +provider "aws" { + alias = "sameaccountalternateregion" + region = %[3]q +} +`, os.Getenv("AWS_ALTERNATE_ACCESS_KEY_ID"), os.Getenv("AWS_ALTERNATE_PROFILE"), testAccGetAlternateRegion(), os.Getenv("AWS_ALTERNATE_SECRET_ACCESS_KEY")) +} + +// Deprecated: Use testAccMultipleRegionProviderConfig instead func testAccAlternateRegionProviderConfig() string { //lintignore:AT004 return fmt.Sprintf(` @@ -437,20 +607,48 @@ provider "aws" { `, testAccGetAlternateRegion()) } -func testAccProviderConfigIgnoreTagPrefixes1(keyPrefix1 string) string { +func testAccMultipleRegionProviderConfig(regions int) string { + var config strings.Builder + + //lintignore:AT004 + fmt.Fprintf(&config, ` +provider "aws" { + alias = "alternate" + region = %[1]q +} +`, testAccGetAlternateRegion()) + + if regions >= 3 { + //lintignore:AT004 + fmt.Fprintf(&config, ` +provider "aws" { + alias = "third" + region = %[1]q +} +`, testAccGetThirdRegion()) + } + + return config.String() +} + +func testAccProviderConfigIgnoreTagsKeyPrefixes1(keyPrefix1 string) string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { - ignore_tag_prefixes = [%[1]q] + ignore_tags { + key_prefixes = [%[1]q] + } } `, keyPrefix1) } -func testAccProviderConfigIgnoreTags1(key1 string) string { +func testAccProviderConfigIgnoreTagsKeys1(key1 string) string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { - ignore_tags = [%[1]q] + ignore_tags { + keys = [%[1]q] + } } `, key1) } @@ -510,6 +708,22 @@ func testAccAwsRegionProviderFunc(region string, providers *[]*schema.Provider) } } +func testAccCheckResourceDisappears(provider *schema.Provider, resource *schema.Resource, resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + resourceState, ok := s.RootModule().Resources[resourceName] + + if !ok { + return fmt.Errorf("resource not found: %s", resourceName) + } + + if resourceState.Primary.ID == "" { + return fmt.Errorf("resource ID missing: %s", resourceName) + } + + return resource.Delete(resource.Data(resourceState.Primary), provider.Meta()) + } +} + func testAccCheckWithProviders(f func(*terraform.State, *schema.Provider) error, providers *[]*schema.Provider) resource.TestCheckFunc { return func(s *terraform.State) error { numberOfProviders := len(*providers) @@ -585,6 +799,10 @@ func testSweepSkipSweepError(err error) bool { if isAWSErr(err, "InvalidAction", "is not valid") { return true } + // For example from GovCloud SES.SetActiveReceiptRuleSet. + if isAWSErr(err, "InvalidAction", "Unavailable Operation") { + return true + } return false } @@ -645,7 +863,7 @@ func TestAccAWSProvider_Endpoints_Deprecated(t *testing.T) { }) } -func TestAccAWSProvider_IgnoreTagPrefixes_None(t *testing.T) { +func TestAccAWSProvider_IgnoreTags_EmptyConfigurationBlock(t *testing.T) { var providers []*schema.Provider resource.ParallelTest(t, resource.TestCase{ @@ -654,16 +872,17 @@ func TestAccAWSProvider_IgnoreTagPrefixes_None(t *testing.T) { CheckDestroy: nil, Steps: []resource.TestStep{ { - Config: testAccAWSProviderConfigIgnoreTagPrefixes0(), + Config: testAccAWSProviderConfigIgnoreTagsEmptyConfigurationBlock(), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSProviderIgnoreTagPrefixes(&providers, []string{}), + testAccCheckAWSProviderIgnoreTagsKeys(&providers, []string{}), + testAccCheckAWSProviderIgnoreTagsKeyPrefixes(&providers, []string{}), ), }, }, }) } -func TestAccAWSProvider_IgnoreTagPrefixes_One(t *testing.T) { +func TestAccAWSProvider_IgnoreTags_KeyPrefixes_None(t *testing.T) { var providers []*schema.Provider resource.ParallelTest(t, resource.TestCase{ @@ -672,16 +891,16 @@ func TestAccAWSProvider_IgnoreTagPrefixes_One(t *testing.T) { CheckDestroy: nil, Steps: []resource.TestStep{ { - Config: testAccAWSProviderConfigIgnoreTagPrefixes1("test"), + Config: testAccAWSProviderConfigIgnoreTagsKeyPrefixes0(), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSProviderIgnoreTagPrefixes(&providers, []string{"test"}), + testAccCheckAWSProviderIgnoreTagsKeyPrefixes(&providers, []string{}), ), }, }, }) } -func TestAccAWSProvider_IgnoreTagPrefixes_Multiple(t *testing.T) { +func TestAccAWSProvider_IgnoreTags_KeyPrefixes_One(t *testing.T) { var providers []*schema.Provider resource.ParallelTest(t, resource.TestCase{ @@ -690,16 +909,16 @@ func TestAccAWSProvider_IgnoreTagPrefixes_Multiple(t *testing.T) { CheckDestroy: nil, Steps: []resource.TestStep{ { - Config: testAccAWSProviderConfigIgnoreTagPrefixes2("test1", "test2"), + Config: testAccAWSProviderConfigIgnoreTagsKeyPrefixes1("test"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSProviderIgnoreTagPrefixes(&providers, []string{"test1", "test2"}), + testAccCheckAWSProviderIgnoreTagsKeyPrefixes(&providers, []string{"test"}), ), }, }, }) } -func TestAccAWSProvider_IgnoreTags_None(t *testing.T) { +func TestAccAWSProvider_IgnoreTags_KeyPrefixes_Multiple(t *testing.T) { var providers []*schema.Provider resource.ParallelTest(t, resource.TestCase{ @@ -708,16 +927,16 @@ func TestAccAWSProvider_IgnoreTags_None(t *testing.T) { CheckDestroy: nil, Steps: []resource.TestStep{ { - Config: testAccAWSProviderConfigIgnoreTags0(), + Config: testAccAWSProviderConfigIgnoreTagsKeyPrefixes2("test1", "test2"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSProviderIgnoreTags(&providers, []string{}), + testAccCheckAWSProviderIgnoreTagsKeyPrefixes(&providers, []string{"test1", "test2"}), ), }, }, }) } -func TestAccAWSProvider_IgnoreTags_One(t *testing.T) { +func TestAccAWSProvider_IgnoreTags_Keys_None(t *testing.T) { var providers []*schema.Provider resource.ParallelTest(t, resource.TestCase{ @@ -726,16 +945,16 @@ func TestAccAWSProvider_IgnoreTags_One(t *testing.T) { CheckDestroy: nil, Steps: []resource.TestStep{ { - Config: testAccAWSProviderConfigIgnoreTags1("test"), + Config: testAccAWSProviderConfigIgnoreTagsKeys0(), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSProviderIgnoreTags(&providers, []string{"test"}), + testAccCheckAWSProviderIgnoreTagsKeys(&providers, []string{}), ), }, }, }) } -func TestAccAWSProvider_IgnoreTags_Multiple(t *testing.T) { +func TestAccAWSProvider_IgnoreTags_Keys_One(t *testing.T) { var providers []*schema.Provider resource.ParallelTest(t, resource.TestCase{ @@ -744,9 +963,27 @@ func TestAccAWSProvider_IgnoreTags_Multiple(t *testing.T) { CheckDestroy: nil, Steps: []resource.TestStep{ { - Config: testAccAWSProviderConfigIgnoreTags2("test1", "test2"), + Config: testAccAWSProviderConfigIgnoreTagsKeys1("test"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSProviderIgnoreTags(&providers, []string{"test1", "test2"}), + testAccCheckAWSProviderIgnoreTagsKeys(&providers, []string{"test"}), + ), + }, + }, + }) +} + +func TestAccAWSProvider_IgnoreTags_Keys_Multiple(t *testing.T) { + var providers []*schema.Provider + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: nil, + Steps: []resource.TestStep{ + { + Config: testAccAWSProviderConfigIgnoreTagsKeys2("test1", "test2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSProviderIgnoreTagsKeys(&providers, []string{"test1", "test2"}), ), }, }, @@ -813,6 +1050,24 @@ func TestAccAWSProvider_Region_AwsGovCloudUs(t *testing.T) { }) } +func TestAccAWSProvider_AssumeRole_Empty(t *testing.T) { + var providers []*schema.Provider + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: nil, + Steps: []resource.TestStep{ + { + Config: testAccCheckAWSProviderConfigAssumeRoleEmpty, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsCallerIdentityAccountId("data.aws_caller_identity.current"), + ), + }, + }, + }) +} + func testAccCheckAWSProviderDnsSuffix(providers *[]*schema.Provider, expectedDnsSuffix string) resource.TestCheckFunc { return func(s *terraform.State) error { if providers == nil { @@ -963,7 +1218,7 @@ func testAccCheckAWSProviderEndpointsDeprecated(providers *[]*schema.Provider) r } } -func testAccCheckAWSProviderIgnoreTagPrefixes(providers *[]*schema.Provider, expectedIgnoreTagPrefixes []string) resource.TestCheckFunc { +func testAccCheckAWSProviderIgnoreTagsKeyPrefixes(providers *[]*schema.Provider, expectedKeyPrefixes []string) resource.TestCheckFunc { return func(s *terraform.State) error { if providers == nil { return fmt.Errorf("no providers initialized") @@ -975,17 +1230,26 @@ func testAccCheckAWSProviderIgnoreTagPrefixes(providers *[]*schema.Provider, exp } providerClient := provider.Meta().(*AWSClient) + ignoreTagsConfig := providerClient.IgnoreTagsConfig - actualIgnoreTagPrefixes := providerClient.ignoreTagPrefixes.Keys() + if ignoreTagsConfig == nil || ignoreTagsConfig.KeyPrefixes == nil { + if len(expectedKeyPrefixes) != 0 { + return fmt.Errorf("expected key_prefixes (%d) length, got: 0", len(expectedKeyPrefixes)) + } + + continue + } - if len(actualIgnoreTagPrefixes) != len(expectedIgnoreTagPrefixes) { - return fmt.Errorf("expected ignore_tag_prefixes (%d) length, got: %d", len(expectedIgnoreTagPrefixes), len(actualIgnoreTagPrefixes)) + actualKeyPrefixes := ignoreTagsConfig.KeyPrefixes.Keys() + + if len(actualKeyPrefixes) != len(expectedKeyPrefixes) { + return fmt.Errorf("expected key_prefixes (%d) length, got: %d", len(expectedKeyPrefixes), len(actualKeyPrefixes)) } - for _, expectedElement := range expectedIgnoreTagPrefixes { + for _, expectedElement := range expectedKeyPrefixes { var found bool - for _, actualElement := range actualIgnoreTagPrefixes { + for _, actualElement := range actualKeyPrefixes { if actualElement == expectedElement { found = true break @@ -993,14 +1257,14 @@ func testAccCheckAWSProviderIgnoreTagPrefixes(providers *[]*schema.Provider, exp } if !found { - return fmt.Errorf("expected ignore_tag_prefixes element, but was missing: %s", expectedElement) + return fmt.Errorf("expected key_prefixes element, but was missing: %s", expectedElement) } } - for _, actualElement := range actualIgnoreTagPrefixes { + for _, actualElement := range actualKeyPrefixes { var found bool - for _, expectedElement := range expectedIgnoreTagPrefixes { + for _, expectedElement := range expectedKeyPrefixes { if actualElement == expectedElement { found = true break @@ -1008,7 +1272,7 @@ func testAccCheckAWSProviderIgnoreTagPrefixes(providers *[]*schema.Provider, exp } if !found { - return fmt.Errorf("unexpected ignore_tag_prefixes element: %s", actualElement) + return fmt.Errorf("unexpected key_prefixes element: %s", actualElement) } } } @@ -1017,7 +1281,7 @@ func testAccCheckAWSProviderIgnoreTagPrefixes(providers *[]*schema.Provider, exp } } -func testAccCheckAWSProviderIgnoreTags(providers *[]*schema.Provider, expectedIgnoreTags []string) resource.TestCheckFunc { +func testAccCheckAWSProviderIgnoreTagsKeys(providers *[]*schema.Provider, expectedKeys []string) resource.TestCheckFunc { return func(s *terraform.State) error { if providers == nil { return fmt.Errorf("no providers initialized") @@ -1029,17 +1293,26 @@ func testAccCheckAWSProviderIgnoreTags(providers *[]*schema.Provider, expectedIg } providerClient := provider.Meta().(*AWSClient) + ignoreTagsConfig := providerClient.IgnoreTagsConfig - actualIgnoreTags := providerClient.ignoreTags.Keys() + if ignoreTagsConfig == nil || ignoreTagsConfig.Keys == nil { + if len(expectedKeys) != 0 { + return fmt.Errorf("expected keys (%d) length, got: 0", len(expectedKeys)) + } - if len(actualIgnoreTags) != len(expectedIgnoreTags) { - return fmt.Errorf("expected ignore_tags (%d) length, got: %d", len(expectedIgnoreTags), len(actualIgnoreTags)) + continue } - for _, expectedElement := range expectedIgnoreTags { + actualKeys := ignoreTagsConfig.Keys.Keys() + + if len(actualKeys) != len(expectedKeys) { + return fmt.Errorf("expected keys (%d) length, got: %d", len(expectedKeys), len(actualKeys)) + } + + for _, expectedElement := range expectedKeys { var found bool - for _, actualElement := range actualIgnoreTags { + for _, actualElement := range actualKeys { if actualElement == expectedElement { found = true break @@ -1047,14 +1320,14 @@ func testAccCheckAWSProviderIgnoreTags(providers *[]*schema.Provider, expectedIg } if !found { - return fmt.Errorf("expected ignore_tags element, but was missing: %s", expectedElement) + return fmt.Errorf("expected keys element, but was missing: %s", expectedElement) } } - for _, actualElement := range actualIgnoreTags { + for _, actualElement := range actualKeys { var found bool - for _, expectedElement := range expectedIgnoreTags { + for _, expectedElement := range expectedKeys { if actualElement == expectedElement { found = true break @@ -1062,7 +1335,7 @@ func testAccCheckAWSProviderIgnoreTags(providers *[]*schema.Provider, expectedIg } if !found { - return fmt.Errorf("unexpected ignore_tags element: %s", actualElement) + return fmt.Errorf("unexpected keys element: %s", actualElement) } } } @@ -1093,6 +1366,35 @@ func testAccCheckAWSProviderPartition(providers *[]*schema.Provider, expectedPar } } +// testAccPreCheckHasDefaultVpcOrEc2Classic checks that the test region has a default VPC or has the EC2-Classic platform. +// This check is useful to ensure that an instance can be launched without specifying a subnet. +func testAccPreCheckHasDefaultVpcOrEc2Classic(t *testing.T) { + client := testAccProvider.Meta().(*AWSClient) + + if !testAccHasDefaultVpc(t) && !hasEc2Classic(client.supportedplatforms) { + t.Skipf("skipping tests; %s does not have a default VPC or EC2-Classic", client.region) + } +} + +func testAccHasDefaultVpc(t *testing.T) bool { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + resp, err := conn.DescribeAccountAttributes(&ec2.DescribeAccountAttributesInput{ + AttributeNames: aws.StringSlice([]string{ec2.AccountAttributeNameDefaultVpc}), + }) + if testAccPreCheckSkipError(err) || + len(resp.AccountAttributes) == 0 || + len(resp.AccountAttributes[0].AttributeValues) == 0 || + aws.StringValue(resp.AccountAttributes[0].AttributeValues[0].AttributeValue) == "none" { + return false + } + if err != nil { + t.Fatalf("error describing EC2 account attributes: %s", err) + } + + return true +} + func testAccAWSProviderConfigEndpoints(endpoints string) string { //lintignore:AT004 return fmt.Sprintf(` @@ -1114,7 +1416,26 @@ data "aws_arn" "test" { `, endpoints) } -func testAccAWSProviderConfigIgnoreTagPrefixes0() string { +func testAccAWSProviderConfigIgnoreTagsEmptyConfigurationBlock() string { + //lintignore:AT004 + return fmt.Sprintf(` +provider "aws" { + ignore_tags {} + + skip_credentials_validation = true + skip_get_ec2_platforms = true + skip_metadata_api_check = true + skip_requesting_account_id = true +} + +# Required to initialize the provider +data "aws_arn" "test" { + arn = "arn:aws:s3:::test" +} +`) +} + +func testAccAWSProviderConfigIgnoreTagsKeyPrefixes0() string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { @@ -1131,11 +1452,14 @@ data "aws_arn" "test" { `) } -func testAccAWSProviderConfigIgnoreTagPrefixes1(tagPrefix1 string) string { +func testAccAWSProviderConfigIgnoreTagsKeyPrefixes1(tagPrefix1 string) string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { - ignore_tag_prefixes = [%[1]q] + ignore_tags { + key_prefixes = [%[1]q] + } + skip_credentials_validation = true skip_get_ec2_platforms = true skip_metadata_api_check = true @@ -1149,11 +1473,14 @@ data "aws_arn" "test" { `, tagPrefix1) } -func testAccAWSProviderConfigIgnoreTagPrefixes2(tagPrefix1, tagPrefix2 string) string { +func testAccAWSProviderConfigIgnoreTagsKeyPrefixes2(tagPrefix1, tagPrefix2 string) string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { - ignore_tag_prefixes = [%[1]q, %[2]q] + ignore_tags { + key_prefixes = [%[1]q, %[2]q] + } + skip_credentials_validation = true skip_get_ec2_platforms = true skip_metadata_api_check = true @@ -1167,7 +1494,7 @@ data "aws_arn" "test" { `, tagPrefix1, tagPrefix2) } -func testAccAWSProviderConfigIgnoreTags0() string { +func testAccAWSProviderConfigIgnoreTagsKeys0() string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { @@ -1184,11 +1511,14 @@ data "aws_arn" "test" { `) } -func testAccAWSProviderConfigIgnoreTags1(tag1 string) string { +func testAccAWSProviderConfigIgnoreTagsKeys1(tag1 string) string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { - ignore_tags = [%[1]q] + ignore_tags { + keys = [%[1]q] + } + skip_credentials_validation = true skip_get_ec2_platforms = true skip_metadata_api_check = true @@ -1202,11 +1532,14 @@ data "aws_arn" "test" { `, tag1) } -func testAccAWSProviderConfigIgnoreTags2(tag1, tag2 string) string { +func testAccAWSProviderConfigIgnoreTagsKeys2(tag1, tag2 string) string { //lintignore:AT004 return fmt.Sprintf(` provider "aws" { - ignore_tags = [%[1]q, %[2]q] + ignore_tags { + keys = [%[1]q, %[2]q] + } + skip_credentials_validation = true skip_get_ec2_platforms = true skip_metadata_api_check = true @@ -1256,3 +1589,23 @@ provider "aws" { } `, os.Getenv("TF_ACC_ASSUME_ROLE_ARN"), policy) } + +const testAccCheckAWSProviderConfigAssumeRoleEmpty = ` +provider "aws" { + assume_role { + } +} + +data "aws_caller_identity" "current" {} +` + +// composeConfig can be called to concatenate multiple strings to build test configurations +func composeConfig(config ...string) string { + var str strings.Builder + + for _, conf := range config { + str.WriteString(conf) + } + + return str.String() +} diff --git a/aws/resource_aws_accessanalyzer_analyzer.go b/aws/resource_aws_accessanalyzer_analyzer.go index 8e656bebcd5..e28b9cfef05 100644 --- a/aws/resource_aws_accessanalyzer_analyzer.go +++ b/aws/resource_aws_accessanalyzer_analyzer.go @@ -70,6 +70,7 @@ func resourceAwsAccessAnalyzerAnalyzerCreate(d *schema.ResourceData, meta interf func resourceAwsAccessAnalyzerAnalyzerRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).accessanalyzerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &accessanalyzer.GetAnalyzerInput{ AnalyzerName: aws.String(d.Id()), @@ -94,7 +95,7 @@ func resourceAwsAccessAnalyzerAnalyzerRead(d *schema.ResourceData, meta interfac d.Set("analyzer_name", output.Analyzer.Name) d.Set("arn", output.Analyzer.Arn) - if err := d.Set("tags", keyvaluetags.AccessanalyzerKeyValueTags(output.Analyzer.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.AccessanalyzerKeyValueTags(output.Analyzer.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_acm_certificate.go b/aws/resource_aws_acm_certificate.go index 7aa96427671..a4fd78a2f23 100644 --- a/aws/resource_aws_acm_certificate.go +++ b/aws/resource_aws_acm_certificate.go @@ -15,6 +15,16 @@ import ( "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) +const ( + // Maximum amount of time for ACM Certificate cross-service reference propagation. + // Removal of ACM Certificates from API Gateway Custom Domains can take >15 minutes. + AcmCertificateCrossServicePropagationTimeout = 20 * time.Minute + + // Maximum amount of time for ACM Certificate asynchronous DNS validation record assignment. + // This timeout is unrelated to any creation or validation of those assigned DNS records. + AcmCertificateDnsValidationAssignmentTimeout = 5 * time.Minute +) + func resourceAwsAcmCertificate() *schema.Resource { return &schema.Resource{ Create: resourceAwsAcmCertificateCreate, @@ -143,6 +153,10 @@ func resourceAwsAcmCertificate() *schema.Resource { }, }, }, + "status": { + Type: schema.TypeString, + Computed: true, + }, "tags": tagsSchema(), }, } @@ -221,12 +235,13 @@ func resourceAwsAcmCertificateCreateRequested(d *schema.ResourceData, meta inter func resourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) error { acmconn := meta.(*AWSClient).acmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &acm.DescribeCertificateInput{ CertificateArn: aws.String(d.Id()), } - return resource.Retry(time.Duration(1)*time.Minute, func() *resource.RetryError { + return resource.Retry(AcmCertificateDnsValidationAssignmentTimeout, func() *resource.RetryError { resp, err := acmconn.DescribeCertificate(params) if err != nil { @@ -258,35 +273,37 @@ func resourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) err return resource.NonRetryableError(err) } - d.Set("validation_method", resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions, emailValidationOptions)) + d.Set("validation_method", resourceAwsAcmCertificateValidationMethod(resp.Certificate)) if err := d.Set("options", flattenAcmCertificateOptions(resp.Certificate.Options)); err != nil { return resource.NonRetryableError(fmt.Errorf("error setting certificate options: %s", err)) } + d.Set("status", resp.Certificate.Status) + tags, err := keyvaluetags.AcmListTags(acmconn, d.Id()) if err != nil { return resource.NonRetryableError(fmt.Errorf("error listing tags for ACM Certificate (%s): %s", d.Id(), err)) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return resource.NonRetryableError(fmt.Errorf("error setting tags: %s", err)) } return nil }) } -func resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions []map[string]interface{}, emailValidationOptions []string) string { - // The DescribeCertificate Response doesn't have information on what validation method was used - // so we need to guess from the validation options we see... - if len(domainValidationOptions) > 0 { - return acm.ValidationMethodDns - } else if len(emailValidationOptions) > 0 { - return acm.ValidationMethodEmail - } else { - return "NONE" +func resourceAwsAcmCertificateValidationMethod(certificate *acm.CertificateDetail) string { + if aws.StringValue(certificate.Type) == acm.CertificateTypeAmazonIssued { + for _, domainValidation := range certificate.DomainValidationOptions { + if domainValidation.ValidationMethod != nil { + return aws.StringValue(domainValidation.ValidationMethod) + } + } } + + return "NONE" } func resourceAwsAcmCertificateUpdate(d *schema.ResourceData, meta interface{}) error { @@ -344,8 +361,8 @@ func convertValidationOptions(certificate *acm.CertificateDetail) ([]map[string] emailValidationResult = append(emailValidationResult, *validationEmail) } } else if o.ValidationStatus == nil || aws.StringValue(o.ValidationStatus) == acm.DomainStatusPendingValidation { - log.Printf("[DEBUG] No validation options need to retry: %#v", o) - return nil, nil, fmt.Errorf("No validation options need to retry: %#v", o) + log.Printf("[DEBUG] Asynchronous ACM service domain validation assignment not complete, need to retry: %#v", o) + return nil, nil, fmt.Errorf("asynchronous ACM service domain validation assignment not complete, need to retry: %#v", o) } } case acm.CertificateTypePrivate: @@ -368,7 +385,7 @@ func resourceAwsAcmCertificateDelete(d *schema.ResourceData, meta interface{}) e CertificateArn: aws.String(d.Id()), } - err := resource.Retry(10*time.Minute, func() *resource.RetryError { + err := resource.Retry(AcmCertificateCrossServicePropagationTimeout, func() *resource.RetryError { _, err := acmconn.DeleteCertificate(params) if err != nil { if isAWSErr(err, acm.ErrCodeResourceInUseException, "") { diff --git a/aws/resource_aws_acm_certificate_test.go b/aws/resource_aws_acm_certificate_test.go index 0705c37800e..2f07b8861a5 100644 --- a/aws/resource_aws_acm_certificate_test.go +++ b/aws/resource_aws_acm_certificate_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "strconv" "strings" "testing" @@ -11,12 +12,75 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acm" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) -var certificateArnRegex = regexp.MustCompile(`^arn:aws:acm:[^:]+:[^:]+:certificate/.+$`) +func init() { + resource.AddTestSweepers("aws_acm_certificate", &resource.Sweeper{ + Name: "aws_acm_certificate", + F: testSweepAcmCertificates, + }) +} + +func testSweepAcmCertificates(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).acmconn + var sweeperErrs *multierror.Error + + err = conn.ListCertificatesPages(&acm.ListCertificatesInput{}, func(page *acm.ListCertificatesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, certificate := range page.CertificateSummaryList { + arn := aws.StringValue(certificate.CertificateArn) + + output, err := conn.DescribeCertificate(&acm.DescribeCertificateInput{ + CertificateArn: aws.String(arn), + }) + if err != nil { + sweeperErr := fmt.Errorf("error describing ACM certificate (%s): %w", arn, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if len(output.Certificate.InUseBy) > 0 { + log.Printf("[INFO] ACM certificate (%s) is in-use, skipping", arn) + continue + } + + log.Printf("[INFO] Deleting ACM certificate: %s", arn) + _, err = conn.DeleteCertificate(&acm.DeleteCertificateInput{ + CertificateArn: aws.String(arn), + }) + if err != nil { + sweeperErr := fmt.Errorf("error deleting ACM certificate (%s): %w", arn, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping ACM certificate sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + return fmt.Errorf("error retrieving ACM certificates: %s", err) + } + + return sweeperErrs.ErrorOrNil() +} func testAccAwsAcmCertificateDomainFromEnv(t *testing.T) string { rootDomain := os.Getenv("ACM_CERTIFICATE_ROOT_DOMAIN") @@ -64,9 +128,10 @@ func TestAccAWSAcmCertificate_emailValidation(t *testing.T) { { Config: testAccAcmCertificateConfig(domain, acm.ValidationMethodEmail), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", domain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "0"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), resource.TestMatchResourceAttr(resourceName, "validation_emails.0", regexp.MustCompile(`^[^@]+@.+$`)), resource.TestCheckResourceAttr(resourceName, "validation_method", acm.ValidationMethodEmail), @@ -95,13 +160,14 @@ func TestAccAWSAcmCertificate_dnsValidation(t *testing.T) { { Config: testAccAcmCertificateConfig(domain, acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", domain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", domain), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_method", acm.ValidationMethodDns), @@ -128,13 +194,14 @@ func TestAccAWSAcmCertificate_root(t *testing.T) { { Config: testAccAcmCertificateConfig(rootDomain, acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", rootDomain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", rootDomain), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_method", acm.ValidationMethodDns), @@ -162,9 +229,10 @@ func TestAccAWSAcmCertificate_privateCert(t *testing.T) { { Config: testAccAcmCertificateConfig_privateCert(rName), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", fmt.Sprintf("%s.terraformtesting.com", rName)), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "0"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusFailed), // FailureReason: PCA_INVALID_STATE (PCA State: PENDING_CERTIFICATE) resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_method", "NONE"), @@ -200,6 +268,7 @@ func TestAccAWSAcmCertificate_root_TrailingPeriod(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_method", acm.ValidationMethodDns), @@ -227,7 +296,7 @@ func TestAccAWSAcmCertificate_rootAndWildcardSan(t *testing.T) { { Config: testAccAcmCertificateConfig_subjectAlternativeNames(rootDomain, strconv.Quote(wildcardDomain), acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", rootDomain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "2"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", rootDomain), @@ -238,6 +307,7 @@ func TestAccAWSAcmCertificate_rootAndWildcardSan(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.1.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "1"), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.0", wildcardDomain), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), @@ -267,7 +337,7 @@ func TestAccAWSAcmCertificate_san_single(t *testing.T) { { Config: testAccAcmCertificateConfig_subjectAlternativeNames(domain, strconv.Quote(sanDomain), acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", domain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "2"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", domain), @@ -278,6 +348,7 @@ func TestAccAWSAcmCertificate_san_single(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.1.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "1"), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.0", sanDomain), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), @@ -308,7 +379,7 @@ func TestAccAWSAcmCertificate_san_multiple(t *testing.T) { { Config: testAccAcmCertificateConfig_subjectAlternativeNames(domain, fmt.Sprintf("%q, %q", sanDomain1, sanDomain2), acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", domain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "3"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", domain), @@ -323,6 +394,7 @@ func TestAccAWSAcmCertificate_san_multiple(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.2.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.2.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.2.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "2"), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.0", sanDomain1), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.1", sanDomain2), @@ -364,6 +436,7 @@ func TestAccAWSAcmCertificate_san_TrailingPeriod(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.1.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "1"), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.0", strings.TrimSuffix(sanDomain, ".")), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), @@ -392,13 +465,14 @@ func TestAccAWSAcmCertificate_wildcard(t *testing.T) { { Config: testAccAcmCertificateConfig(wildcardDomain, acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", wildcardDomain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", wildcardDomain), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_method", acm.ValidationMethodDns), @@ -426,7 +500,7 @@ func TestAccAWSAcmCertificate_wildcardAndRootSan(t *testing.T) { { Config: testAccAcmCertificateConfig_subjectAlternativeNames(wildcardDomain, strconv.Quote(rootDomain), acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", wildcardDomain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "2"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", wildcardDomain), @@ -437,6 +511,7 @@ func TestAccAWSAcmCertificate_wildcardAndRootSan(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_name"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.1.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.1.resource_record_value"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "1"), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.0", rootDomain), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), @@ -464,7 +539,7 @@ func TestAccAWSAcmCertificate_disableCTLogging(t *testing.T) { { Config: testAccAcmCertificateConfig_disableCTLogging(rootDomain, acm.ValidationMethodDns), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr(resourceName, "arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "acm", regexp.MustCompile("certificate/.+$")), resource.TestCheckResourceAttr(resourceName, "domain_name", rootDomain), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.domain_name", rootDomain), @@ -472,6 +547,7 @@ func TestAccAWSAcmCertificate_disableCTLogging(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "domain_validation_options.0.resource_record_type", "CNAME"), resource.TestCheckResourceAttrSet(resourceName, "domain_validation_options.0.resource_record_value"), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusPendingValidation), resource.TestCheckResourceAttr(resourceName, "validation_emails.#", "0"), resource.TestCheckResourceAttr(resourceName, "validation_method", acm.ValidationMethodDns), resource.TestCheckResourceAttr(resourceName, "options.#", "1"), @@ -547,6 +623,7 @@ func TestAccAWSAcmCertificate_imported_DomainName(t *testing.T) { { Config: testAccAcmCertificateConfigPrivateKey("example.com"), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusIssued), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestCheckResourceAttr(resourceName, "domain_name", "example.com"), ), @@ -554,6 +631,7 @@ func TestAccAWSAcmCertificate_imported_DomainName(t *testing.T) { { Config: testAccAcmCertificateConfigPrivateKey("example.org"), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusIssued), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestCheckResourceAttr(resourceName, "domain_name", "example.org"), ), @@ -582,6 +660,7 @@ func TestAccAWSAcmCertificate_imported_IpAddress(t *testing.T) { // Reference: h Config: testAccAcmCertificateConfigPrivateKey("1.2.3.4"), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "domain_name", ""), + resource.TestCheckResourceAttr(resourceName, "status", acm.CertificateStatusIssued), resource.TestCheckResourceAttr(resourceName, "subject_alternative_names.#", "0"), ), }, diff --git a/aws/resource_aws_acm_certificate_validation_test.go b/aws/resource_aws_acm_certificate_validation_test.go index d94a5147d53..7b39b0f0c0f 100644 --- a/aws/resource_aws_acm_certificate_validation_test.go +++ b/aws/resource_aws_acm_certificate_validation_test.go @@ -23,7 +23,7 @@ func TestAccAWSAcmCertificateValidation_basic(t *testing.T) { { Config: testAccAcmCertificateValidation_basic(rootDomain, domain), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, @@ -65,7 +65,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdns(t *testing.T) { { Config: testAccAcmCertificateValidation_validationRecordFqdnsOneRoute53Record(rootDomain, domain), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, @@ -100,7 +100,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsRoot(t *testing.T) { Config: testAccAcmCertificateValidation_validationRecordFqdnsOneRoute53Record(rootDomain, rootDomain), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, @@ -119,7 +119,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsRootAndWildcard(t * { Config: testAccAcmCertificateValidation_validationRecordFqdnsTwoRoute53Records(rootDomain, rootDomain, strconv.Quote(wildcardDomain)), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, @@ -139,7 +139,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsSan(t *testing.T) { { Config: testAccAcmCertificateValidation_validationRecordFqdnsTwoRoute53Records(rootDomain, domain, strconv.Quote(sanDomain)), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, @@ -158,7 +158,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsWildcard(t *testing { Config: testAccAcmCertificateValidation_validationRecordFqdnsOneRoute53Record(rootDomain, wildcardDomain), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, @@ -177,7 +177,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsWildcardAndRoot(t * { Config: testAccAcmCertificateValidation_validationRecordFqdnsTwoRoute53Records(rootDomain, wildcardDomain, strconv.Quote(rootDomain)), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_acm_certificate_validation.cert", "certificate_arn", certificateArnRegex), + testAccMatchResourceAttrRegionalARN("aws_acm_certificate_validation.cert", "certificate_arn", "acm", regexp.MustCompile("certificate/.+$")), ), }, }, diff --git a/aws/resource_aws_acmpca_certificate_authority.go b/aws/resource_aws_acmpca_certificate_authority.go index 29e02768d91..138e8232d48 100644 --- a/aws/resource_aws_acmpca_certificate_authority.go +++ b/aws/resource_aws_acmpca_certificate_authority.go @@ -328,6 +328,7 @@ func resourceAwsAcmpcaCertificateAuthorityCreate(d *schema.ResourceData, meta in func resourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).acmpcaconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), @@ -426,7 +427,7 @@ func resourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta inte return fmt.Errorf("error listing tags for ACMPCA Certificate Authority (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ami.go b/aws/resource_aws_ami.go index 81bd1322abb..9e25b346d2e 100644 --- a/aws/resource_aws_ami.go +++ b/aws/resource_aws_ami.go @@ -171,7 +171,6 @@ func resourceAwsAmi() *schema.Resource { "manage_ebs_snapshots": { Type: schema.TypeBool, Computed: true, - ForceNew: true, }, "name": { Type: schema.TypeString, @@ -280,7 +279,7 @@ func resourceAwsAmiCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(id) if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(client, id, nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(client, id, v); err != nil { return fmt.Errorf("error adding tags: %s", err) } } @@ -295,6 +294,8 @@ func resourceAwsAmiCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + id := d.Id() req := &ec2.DescribeImagesInput{ @@ -401,7 +402,7 @@ func resourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { d.Set("ebs_block_device", ebsBlockDevs) d.Set("ephemeral_block_device", ephemeralBlockDevs) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(image.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(image.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -411,8 +412,6 @@ func resourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsAmiUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).ec2conn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -431,11 +430,8 @@ func resourceAwsAmiUpdate(d *schema.ResourceData, meta interface{}) error { if err != nil { return err } - d.SetPartial("description") } - d.Partial(false) - return resourceAwsAmiRead(d, meta) } diff --git a/aws/resource_aws_ami_copy.go b/aws/resource_aws_ami_copy.go index 238bbfe1d91..c41c864f1d8 100644 --- a/aws/resource_aws_ami_copy.go +++ b/aws/resource_aws_ami_copy.go @@ -145,7 +145,6 @@ func resourceAwsAmiCopy() *schema.Resource { "manage_ebs_snapshots": { Type: schema.TypeBool, Computed: true, - ForceNew: true, }, "name": { Type: schema.TypeString, @@ -215,13 +214,10 @@ func resourceAwsAmiCopyCreate(d *schema.ResourceData, meta interface{}) error { id := *res.ImageId d.SetId(id) - d.Partial(true) // make sure we record the id even if the rest of this gets interrupted d.Set("manage_ebs_snapshots", true) - d.SetPartial("manage_ebs_snapshots") - d.Partial(false) if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(client, id, nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(client, id, v); err != nil { return fmt.Errorf("error adding tags: %s", err) } } diff --git a/aws/resource_aws_ami_copy_test.go b/aws/resource_aws_ami_copy_test.go index e15a31f9449..e51707437ab 100644 --- a/aws/resource_aws_ami_copy_test.go +++ b/aws/resource_aws_ami_copy_test.go @@ -211,7 +211,14 @@ func testAccCheckAWSAMICopyAttributes(image *ec2.Image, expectedName string) res func testAccAWSAMICopyConfigBase() string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_region" "current" {} resource "aws_ebs_volume" "test" { diff --git a/aws/resource_aws_ami_from_instance.go b/aws/resource_aws_ami_from_instance.go index fd9d4013426..5a4682dfabe 100644 --- a/aws/resource_aws_ami_from_instance.go +++ b/aws/resource_aws_ami_from_instance.go @@ -132,7 +132,6 @@ func resourceAwsAmiFromInstance() *schema.Resource { "manage_ebs_snapshots": { Type: schema.TypeBool, Computed: true, - ForceNew: true, }, "name": { Type: schema.TypeString, @@ -197,13 +196,10 @@ func resourceAwsAmiFromInstanceCreate(d *schema.ResourceData, meta interface{}) id := *res.ImageId d.SetId(id) - d.Partial(true) // make sure we record the id even if the rest of this gets interrupted d.Set("manage_ebs_snapshots", true) - d.SetPartial("manage_ebs_snapshots") - d.Partial(false) if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(client, id, nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(client, id, v); err != nil { return fmt.Errorf("error adding tags: %s", err) } } diff --git a/aws/resource_aws_ami_launch_permission.go b/aws/resource_aws_ami_launch_permission.go index aa5fa564e10..af47e3dea0a 100644 --- a/aws/resource_aws_ami_launch_permission.go +++ b/aws/resource_aws_ami_launch_permission.go @@ -13,7 +13,6 @@ import ( func resourceAwsAmiLaunchPermission() *schema.Resource { return &schema.Resource{ - Exists: resourceAwsAmiLaunchPermissionExists, Create: resourceAwsAmiLaunchPermissionCreate, Read: resourceAwsAmiLaunchPermissionRead, Delete: resourceAwsAmiLaunchPermissionDelete, @@ -47,14 +46,6 @@ func resourceAwsAmiLaunchPermission() *schema.Resource { } } -func resourceAwsAmiLaunchPermissionExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).ec2conn - - image_id := d.Get("image_id").(string) - account_id := d.Get("account_id").(string) - return hasLaunchPermission(conn, image_id, account_id) -} - func resourceAwsAmiLaunchPermissionCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn @@ -71,7 +62,7 @@ func resourceAwsAmiLaunchPermissionCreate(d *schema.ResourceData, meta interface }, }) if err != nil { - return fmt.Errorf("error creating ami launch permission: %s", err) + return fmt.Errorf("error creating AMI launch permission: %w", err) } d.SetId(fmt.Sprintf("%s-%s", image_id, account_id)) @@ -79,6 +70,18 @@ func resourceAwsAmiLaunchPermissionCreate(d *schema.ResourceData, meta interface } func resourceAwsAmiLaunchPermissionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + exists, err := hasLaunchPermission(conn, d.Get("image_id").(string), d.Get("account_id").(string)) + if err != nil { + return fmt.Errorf("error reading AMI launch permission (%s): %w", d.Id(), err) + } + if !exists { + log.Printf("[WARN] AMI launch permission (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return nil } @@ -98,7 +101,7 @@ func resourceAwsAmiLaunchPermissionDelete(d *schema.ResourceData, meta interface }, }) if err != nil { - return fmt.Errorf("error removing ami launch permission: %s", err) + return fmt.Errorf("error deleting AMI launch permission (%s): %w", d.Id(), err) } return nil diff --git a/aws/resource_aws_ami_test.go b/aws/resource_aws_ami_test.go index 3427dd4db3f..f40ed30281c 100644 --- a/aws/resource_aws_ami_test.go +++ b/aws/resource_aws_ami_test.go @@ -303,7 +303,14 @@ func testAccCheckAmiEbsBlockDevice(bd *ec2.BlockDeviceMapping, ed *ec2.EbsBlockD func testAccAmiConfig_base(rName string, size int) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "foo" { availability_zone = "${data.aws_availability_zones.available.names[0]}" diff --git a/aws/resource_aws_api_gateway_account_test.go b/aws/resource_aws_api_gateway_account_test.go index 3a56a2b3710..443fbda2124 100644 --- a/aws/resource_aws_api_gateway_account_test.go +++ b/aws/resource_aws_api_gateway_account_test.go @@ -18,8 +18,8 @@ func TestAccAWSAPIGatewayAccount_basic(t *testing.T) { firstName := fmt.Sprintf("tf_acc_api_gateway_cloudwatch_%d", rInt) secondName := fmt.Sprintf("tf_acc_api_gateway_cloudwatch_modified_%d", rInt) resourceName := "aws_api_gateway_account.test" - expectedRoleArn_first := regexp.MustCompile(":role/" + firstName + "$") - expectedRoleArn_second := regexp.MustCompile(":role/" + secondName + "$") + expectedRoleArn_first := regexp.MustCompile("role/" + firstName + "$") + expectedRoleArn_second := regexp.MustCompile("role/" + secondName + "$") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -31,7 +31,7 @@ func TestAccAWSAPIGatewayAccount_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAccountExists(resourceName, &conf), testAccCheckAWSAPIGatewayAccountCloudwatchRoleArn(&conf, expectedRoleArn_first), - resource.TestMatchResourceAttr(resourceName, "cloudwatch_role_arn", expectedRoleArn_first), + testAccMatchResourceAttrGlobalARN(resourceName, "cloudwatch_role_arn", "iam", expectedRoleArn_first), ), }, { @@ -45,14 +45,17 @@ func TestAccAWSAPIGatewayAccount_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAccountExists(resourceName, &conf), testAccCheckAWSAPIGatewayAccountCloudwatchRoleArn(&conf, expectedRoleArn_second), - resource.TestMatchResourceAttr(resourceName, "cloudwatch_role_arn", expectedRoleArn_second), + testAccMatchResourceAttrGlobalARN(resourceName, "cloudwatch_role_arn", "iam", expectedRoleArn_second), ), }, { Config: testAccAWSAPIGatewayAccountConfig_empty, Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAccountExists(resourceName, &conf), + // This resource does not un-set the value, so this will preserve the CloudWatch role ARN setting on the + // deployed resource, but will be empty in the Terraform state testAccCheckAWSAPIGatewayAccountCloudwatchRoleArn(&conf, expectedRoleArn_second), + resource.TestCheckResourceAttr(resourceName, "cloudwatch_role_arn", ""), ), }, }, diff --git a/aws/resource_aws_api_gateway_api_key.go b/aws/resource_aws_api_gateway_api_key.go index 6a32367c3b4..eba07fa80f3 100644 --- a/aws/resource_aws_api_gateway_api_key.go +++ b/aws/resource_aws_api_gateway_api_key.go @@ -110,6 +110,8 @@ func resourceAwsApiGatewayApiKeyCreate(d *schema.ResourceData, meta interface{}) func resourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + log.Printf("[DEBUG] Reading API Gateway API Key: %s", d.Id()) apiKey, err := conn.GetApiKey(&apigateway.GetApiKeyInput{ @@ -126,7 +128,7 @@ func resourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) e return err } - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(apiKey.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(apiKey.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_api_gateway_authorizer_test.go b/aws/resource_aws_api_gateway_authorizer_test.go index d4e0b6732d9..fc15c8ca4ce 100644 --- a/aws/resource_aws_api_gateway_authorizer_test.go +++ b/aws/resource_aws_api_gateway_authorizer_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "regexp" + "strconv" "testing" "github.com/aws/aws-sdk-go/aws" @@ -18,11 +19,10 @@ func TestAccAWSAPIGatewayAuthorizer_basic(t *testing.T) { apiGatewayName := acctest.RandomWithPrefix("tf-acctest-apigw") authorizerName := acctest.RandomWithPrefix("tf-acctest-igw-authorizer") lambdaName := acctest.RandomWithPrefix("tf-acctest-igw-auth-lambda") - resourceName := "aws_api_gateway_authorizer.acctest" - expectedAuthUri := regexp.MustCompile("arn:aws:apigateway:[a-z0-9-]+:lambda:path/2015-03-31/functions/" + - "arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:" + lambdaName + "/invocations") - expectedCreds := regexp.MustCompile("arn:aws:iam::[0-9]{12}:role/" + apiGatewayName + "_auth_invocation_role") + resourceName := "aws_api_gateway_authorizer.acctest" + lambdaResourceName := "aws_lambda_function.authorizer" + roleResourceName := "aws_iam_role.invocation_role" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -33,19 +33,12 @@ func TestAccAWSAPIGatewayAuthorizer_basic(t *testing.T) { Config: testAccAWSAPIGatewayAuthorizerConfig_lambda(apiGatewayName, authorizerName, lambdaName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAuthorizerExists(resourceName, &conf), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerUri(&conf, expectedAuthUri), - resource.TestMatchResourceAttr(resourceName, "authorizer_uri", expectedAuthUri), - testAccCheckAWSAPIGatewayAuthorizerIdentitySource(&conf, "method.request.header.Authorization"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), resource.TestCheckResourceAttr(resourceName, "identity_source", "method.request.header.Authorization"), - testAccCheckAWSAPIGatewayAuthorizerName(&conf, authorizerName), resource.TestCheckResourceAttr(resourceName, "name", authorizerName), - testAccCheckAWSAPIGatewayAuthorizerType(&conf, "TOKEN"), resource.TestCheckResourceAttr(resourceName, "type", "TOKEN"), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerCredentials(&conf, expectedCreds), - resource.TestMatchResourceAttr(resourceName, "authorizer_credentials", expectedCreds), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(&conf, aws.Int64(defaultAuthorizerTTL)), - resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", "300"), - testAccCheckAWSAPIGatewayAuthorizerIdentityValidationExpression(&conf, nil), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_credentials", roleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", strconv.Itoa(defaultAuthorizerTTL)), resource.TestCheckResourceAttr(resourceName, "identity_validation_expression", ""), ), }, @@ -59,19 +52,12 @@ func TestAccAWSAPIGatewayAuthorizer_basic(t *testing.T) { Config: testAccAWSAPIGatewayAuthorizerConfig_lambdaUpdate(apiGatewayName, authorizerName, lambdaName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAuthorizerExists(resourceName, &conf), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerUri(&conf, expectedAuthUri), - resource.TestMatchResourceAttr(resourceName, "authorizer_uri", expectedAuthUri), - testAccCheckAWSAPIGatewayAuthorizerIdentitySource(&conf, "method.request.header.Authorization"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), resource.TestCheckResourceAttr(resourceName, "identity_source", "method.request.header.Authorization"), - testAccCheckAWSAPIGatewayAuthorizerName(&conf, authorizerName+"_modified"), resource.TestCheckResourceAttr(resourceName, "name", authorizerName+"_modified"), - testAccCheckAWSAPIGatewayAuthorizerType(&conf, "TOKEN"), resource.TestCheckResourceAttr(resourceName, "type", "TOKEN"), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerCredentials(&conf, expectedCreds), - resource.TestMatchResourceAttr(resourceName, "authorizer_credentials", expectedCreds), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(&conf, aws.Int64(360)), - resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", "360"), - testAccCheckAWSAPIGatewayAuthorizerIdentityValidationExpression(&conf, aws.String(".*")), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_credentials", roleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", strconv.Itoa(360)), resource.TestCheckResourceAttr(resourceName, "identity_validation_expression", ".*"), ), }, @@ -83,6 +69,7 @@ func TestAccAWSAPIGatewayAuthorizer_cognito(t *testing.T) { apiGatewayName := acctest.RandomWithPrefix("tf-acctest-apigw") authorizerName := acctest.RandomWithPrefix("tf-acctest-igw-authorizer") cognitoName := acctest.RandomWithPrefix("tf-acctest-cognito-user-pool") + resourceName := "aws_api_gateway_authorizer.acctest" resource.ParallelTest(t, resource.TestCase{ @@ -94,6 +81,7 @@ func TestAccAWSAPIGatewayAuthorizer_cognito(t *testing.T) { Config: testAccAWSAPIGatewayAuthorizerConfig_cognito(apiGatewayName, authorizerName, cognitoName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", authorizerName+"-cognito"), + resource.TestCheckResourceAttr(resourceName, "type", "COGNITO_USER_POOLS"), resource.TestCheckResourceAttr(resourceName, "provider_arns.#", "2"), ), }, @@ -107,6 +95,7 @@ func TestAccAWSAPIGatewayAuthorizer_cognito(t *testing.T) { Config: testAccAWSAPIGatewayAuthorizerConfig_cognitoUpdate(apiGatewayName, authorizerName, cognitoName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", authorizerName+"-cognito-update"), + resource.TestCheckResourceAttr(resourceName, "type", "COGNITO_USER_POOLS"), resource.TestCheckResourceAttr(resourceName, "provider_arns.#", "3"), ), }, @@ -119,11 +108,10 @@ func TestAccAWSAPIGatewayAuthorizer_switchAuthType(t *testing.T) { authorizerName := acctest.RandomWithPrefix("tf-acctest-igw-authorizer") lambdaName := acctest.RandomWithPrefix("tf-acctest-igw-auth-lambda") cognitoName := acctest.RandomWithPrefix("tf-acctest-cognito-user-pool") - resourceName := "aws_api_gateway_authorizer.acctest" - expectedAuthUri := regexp.MustCompile("arn:aws:apigateway:[a-z0-9-]+:lambda:path/2015-03-31/functions/" + - "arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:" + lambdaName + "/invocations") - expectedCreds := regexp.MustCompile("arn:aws:iam::[0-9]{12}:role/" + apiGatewayName + "_auth_invocation_role") + resourceName := "aws_api_gateway_authorizer.acctest" + lambdaResourceName := "aws_lambda_function.authorizer" + roleResourceName := "aws_iam_role.invocation_role" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -135,8 +123,8 @@ func TestAccAWSAPIGatewayAuthorizer_switchAuthType(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", authorizerName), resource.TestCheckResourceAttr(resourceName, "type", "TOKEN"), - resource.TestMatchResourceAttr(resourceName, "authorizer_uri", expectedAuthUri), - resource.TestMatchResourceAttr(resourceName, "authorizer_credentials", expectedCreds), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_credentials", roleResourceName, "arn"), ), }, { @@ -158,8 +146,8 @@ func TestAccAWSAPIGatewayAuthorizer_switchAuthType(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "name", authorizerName+"_modified"), resource.TestCheckResourceAttr(resourceName, "type", "TOKEN"), - resource.TestMatchResourceAttr(resourceName, "authorizer_uri", expectedAuthUri), - resource.TestMatchResourceAttr(resourceName, "authorizer_credentials", expectedCreds), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_credentials", roleResourceName, "arn"), ), }, }, @@ -182,8 +170,7 @@ func TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL(t *testing.T) { Config: testAccAWSAPIGatewayAuthorizerConfig_lambda(apiGatewayName, authorizerName, lambdaName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAuthorizerExists(resourceName, &conf), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(&conf, aws.Int64(defaultAuthorizerTTL)), - resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", "300"), + resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", strconv.Itoa(defaultAuthorizerTTL)), ), }, { @@ -196,24 +183,21 @@ func TestAccAWSAPIGatewayAuthorizer_switchAuthorizerTTL(t *testing.T) { Config: testAccAWSAPIGatewayAuthorizerConfig_lambdaUpdate(apiGatewayName, authorizerName, lambdaName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAuthorizerExists(resourceName, &conf), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(&conf, aws.Int64(360)), - resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", "360"), + resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", strconv.Itoa(360)), ), }, { Config: testAccAWSAPIGatewayAuthorizerConfig_lambdaNoCache(apiGatewayName, authorizerName, lambdaName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAuthorizerExists(resourceName, &conf), - resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", "0"), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(&conf, aws.Int64(0)), + resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", strconv.Itoa(0)), ), }, { Config: testAccAWSAPIGatewayAuthorizerConfig_lambda(apiGatewayName, authorizerName, lambdaName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayAuthorizerExists(resourceName, &conf), - testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(&conf, aws.Int64(defaultAuthorizerTTL)), - resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", "300"), + resource.TestCheckResourceAttr(resourceName, "authorizer_result_ttl_in_seconds", strconv.Itoa(defaultAuthorizerTTL)), ), }, }, @@ -295,106 +279,6 @@ func testAccCheckAWSAPIGatewayAuthorizerDisappears(resourceName string) resource } } -func testAccCheckAWSAPIGatewayAuthorizerAuthorizerUri(conf *apigateway.Authorizer, expectedUri *regexp.Regexp) resource.TestCheckFunc { - return func(s *terraform.State) error { - if conf.AuthorizerUri == nil { - return fmt.Errorf("Empty AuthorizerUri, expected: %q", expectedUri) - } - - if !expectedUri.MatchString(*conf.AuthorizerUri) { - return fmt.Errorf("AuthorizerUri didn't match. Expected: %q, Given: %q", expectedUri, *conf.AuthorizerUri) - } - return nil - } -} - -func testAccCheckAWSAPIGatewayAuthorizerIdentitySource(conf *apigateway.Authorizer, expectedSource string) resource.TestCheckFunc { - return func(s *terraform.State) error { - if conf.IdentitySource == nil { - return fmt.Errorf("Empty IdentitySource, expected: %q", expectedSource) - } - if *conf.IdentitySource != expectedSource { - return fmt.Errorf("IdentitySource didn't match. Expected: %q, Given: %q", expectedSource, *conf.IdentitySource) - } - return nil - } -} - -func testAccCheckAWSAPIGatewayAuthorizerName(conf *apigateway.Authorizer, expectedName string) resource.TestCheckFunc { - return func(s *terraform.State) error { - if conf.Name == nil { - return fmt.Errorf("Empty Name, expected: %q", expectedName) - } - if *conf.Name != expectedName { - return fmt.Errorf("Name didn't match. Expected: %q, Given: %q", expectedName, *conf.Name) - } - return nil - } -} - -func testAccCheckAWSAPIGatewayAuthorizerType(conf *apigateway.Authorizer, expectedType string) resource.TestCheckFunc { - return func(s *terraform.State) error { - if conf.Type == nil { - return fmt.Errorf("Empty Type, expected: %q", expectedType) - } - if *conf.Type != expectedType { - return fmt.Errorf("Type didn't match. Expected: %q, Given: %q", expectedType, *conf.Type) - } - return nil - } -} - -func testAccCheckAWSAPIGatewayAuthorizerAuthorizerCredentials(conf *apigateway.Authorizer, expectedCreds *regexp.Regexp) resource.TestCheckFunc { - return func(s *terraform.State) error { - if conf.AuthorizerCredentials == nil { - return fmt.Errorf("Empty AuthorizerCredentials, expected: %q", expectedCreds) - } - if !expectedCreds.MatchString(*conf.AuthorizerCredentials) { - return fmt.Errorf("AuthorizerCredentials didn't match. Expected: %q, Given: %q", - expectedCreds, *conf.AuthorizerCredentials) - } - return nil - } -} - -func testAccCheckAWSAPIGatewayAuthorizerAuthorizerResultTtlInSeconds(conf *apigateway.Authorizer, expectedTtl *int64) resource.TestCheckFunc { - return func(s *terraform.State) error { - if expectedTtl == conf.AuthorizerResultTtlInSeconds { - return nil - } - if expectedTtl == nil && conf.AuthorizerResultTtlInSeconds != nil { - return fmt.Errorf("Expected empty AuthorizerResultTtlInSeconds, given: %d", *conf.AuthorizerResultTtlInSeconds) - } - if conf.AuthorizerResultTtlInSeconds == nil { - return fmt.Errorf("Empty AuthorizerResultTtlInSeconds, expected: %d", expectedTtl) - } - if *conf.AuthorizerResultTtlInSeconds != *expectedTtl { - return fmt.Errorf("AuthorizerResultTtlInSeconds didn't match. Expected: %d, Given: %d", - *expectedTtl, *conf.AuthorizerResultTtlInSeconds) - } - return nil - } -} - -func testAccCheckAWSAPIGatewayAuthorizerIdentityValidationExpression(conf *apigateway.Authorizer, expectedExpression *string) resource.TestCheckFunc { - return func(s *terraform.State) error { - if expectedExpression == conf.IdentityValidationExpression { - return nil - } - if expectedExpression == nil && conf.IdentityValidationExpression != nil { - return fmt.Errorf("Expected empty IdentityValidationExpression, given: %q", *conf.IdentityValidationExpression) - } - if conf.IdentityValidationExpression == nil { - return fmt.Errorf("Empty IdentityValidationExpression, expected: %q", *expectedExpression) - } - if *conf.IdentityValidationExpression != *expectedExpression { - return fmt.Errorf("IdentityValidationExpression didn't match. Expected: %q, Given: %q", - *expectedExpression, *conf.IdentityValidationExpression) - } - return nil - } -} - func testAccCheckAWSAPIGatewayAuthorizerExists(n string, res *apigateway.Authorizer) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -495,7 +379,7 @@ EOF resource "aws_iam_role_policy" "invocation_policy" { name = "default" - role = "${aws_iam_role.invocation_role.id}" + role = aws_iam_role.invocation_role.id policy = < 0 { for _, v := range new { operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), + Op: aws.String(apigateway.OpAdd), Path: aws.String(fmt.Sprintf("/%s/%s", prefix, escapeJsonPointer(v.(string)))), }) } @@ -362,7 +364,7 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api m := v.([]interface{})[0].(map[string]interface{}) operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("replace"), + Op: aws.String(apigateway.OpReplace), Path: aws.String("/endpointConfiguration/types/0"), Value: aws.String(m["types"].([]interface{})[0].(string)), }) @@ -373,12 +375,12 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api o, n := d.GetChange("endpoint_configuration.0.vpc_endpoint_ids") prefix := "/endpointConfiguration/vpcEndpointIds" - old := o.([]interface{}) - new := n.([]interface{}) + old := o.(*schema.Set).List() + new := n.(*schema.Set).List() for _, v := range old { operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("remove"), + Op: aws.String(apigateway.OpRemove), Path: aws.String(prefix), Value: aws.String(v.(string)), }) @@ -386,7 +388,7 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api for _, v := range new { operations = append(operations, &apigateway.PatchOperation{ - Op: aws.String("add"), + Op: aws.String(apigateway.OpAdd), Path: aws.String(prefix), Value: aws.String(v.(string)), }) @@ -467,7 +469,7 @@ func expandApiGatewayEndpointConfiguration(l []interface{}) *apigateway.Endpoint } if endpointIds, ok := m["vpc_endpoint_ids"]; ok { - endpointConfiguration.VpcEndpointIds = expandStringList(endpointIds.([]interface{})) + endpointConfiguration.VpcEndpointIds = expandStringSet(endpointIds.(*schema.Set)) } return endpointConfiguration @@ -483,7 +485,7 @@ func flattenApiGatewayEndpointConfiguration(endpointConfiguration *apigateway.En } if len(endpointConfiguration.VpcEndpointIds) > 0 { - m["vpc_endpoint_ids"] = flattenStringList(endpointConfiguration.VpcEndpointIds) + m["vpc_endpoint_ids"] = aws.StringValueSlice(endpointConfiguration.VpcEndpointIds) } return []interface{}{m} diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index cc5676fe041..f34a8a944fe 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -374,6 +374,26 @@ func TestAccAWSAPIGatewayRestApi_EndpointConfiguration_VPCEndpoint(t *testing.T) ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSAPIGatewayRestAPIConfig_VPCEndpointConfiguration2(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayRestAPIExists(resourceName, &restApi), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.0.types.#", "1"), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.0.types.0", "PRIVATE"), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.0.vpc_endpoint_ids.#", "2"), + ), + }, + { + Config: testAccAWSAPIGatewayRestAPIConfig_VPCEndpointConfiguration(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayRestAPIExists(resourceName, &restApi), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.0.types.#", "1"), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.0.types.0", "PRIVATE"), + resource.TestCheckResourceAttr(resourceName, "endpoint_configuration.0.vpc_endpoint_ids.#", "1"), + ), + }, }, }) } @@ -687,7 +707,14 @@ data "aws_security_group" "test" { name = "default" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" @@ -727,6 +754,85 @@ resource "aws_api_gateway_rest_api" "test" { `, rName) } +func testAccAWSAPIGatewayRestAPIConfig_VPCEndpointConfiguration2(rName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "11.0.0.0/16" + enable_dns_support = true + enable_dns_hostnames = true + + tags = { + Name = %[1]q + } +} + +data "aws_security_group" "test" { + vpc_id = "${aws_vpc.test.id}" + name = "default" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "${aws_vpc.test.cidr_block}" + availability_zone = "${data.aws_availability_zones.available.names[0]}" + + tags = { + Name = %[1]q + } +} + +data "aws_region" "current" {} + +resource "aws_vpc_endpoint" "test" { + vpc_id = "${aws_vpc.test.id}" + service_name = "com.amazonaws.${data.aws_region.current.name}.execute-api" + vpc_endpoint_type = "Interface" + private_dns_enabled = false + + subnet_ids = [ + "${aws_subnet.test.id}", + ] + + security_group_ids = [ + "${data.aws_security_group.test.id}", + ] +} + +resource "aws_vpc_endpoint" "test2" { + vpc_id = "${aws_vpc.test.id}" + service_name = "com.amazonaws.${data.aws_region.current.name}.execute-api" + vpc_endpoint_type = "Interface" + private_dns_enabled = false + + subnet_ids = [ + "${aws_subnet.test.id}", + ] + + security_group_ids = [ + "${data.aws_security_group.test.id}", + ] +} + +resource "aws_api_gateway_rest_api" "test" { + name = %[1]q + + endpoint_configuration { + types = ["PRIVATE"] + vpc_endpoint_ids = ["${aws_vpc_endpoint.test.id}", "${aws_vpc_endpoint.test2.id}"] + } +} +`, rName) +} + func testAccAWSAPIGatewayRestAPIConfigTags1(rName, tagKey1, tagValue1 string) string { return fmt.Sprintf(` resource "aws_api_gateway_rest_api" "test" { diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index c3dbf58b23a..96c6c62b146 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -114,6 +113,7 @@ func resourceAwsApiGatewayStage() *schema.Resource { "variables": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "tags": tagsSchema(), "xray_tracing_enabled": { @@ -131,8 +131,6 @@ func resourceAwsApiGatewayStage() *schema.Resource { func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn - d.Partial(true) - input := apigateway.CreateStageInput{ RestApiId: aws.String(d.Get("rest_api_id").(string)), StageName: aws.String(d.Get("stage_name").(string)), @@ -175,13 +173,6 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) d.SetId(fmt.Sprintf("ags-%s-%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string))) - d.SetPartial("rest_api_id") - d.SetPartial("stage_name") - d.SetPartial("deployment_id") - d.SetPartial("description") - d.SetPartial("variables") - d.SetPartial("xray_tracing_enabled") - if waitForCache && *out.CacheClusterStatus != apigateway.CacheClusterStatusNotAvailable { stateConf := &resource.StateChangeConf{ Pending: []string{ @@ -202,10 +193,6 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) } } - d.SetPartial("cache_cluster_enabled") - d.SetPartial("cache_cluster_size") - d.Partial(false) - if _, ok := d.GetOk("client_certificate_id"); ok { return resourceAwsApiGatewayStageUpdate(d, meta) } @@ -217,6 +204,7 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading API Gateway Stage %s", d.Id()) restApiId := d.Get("rest_api_id").(string) @@ -226,14 +214,17 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er StageName: aws.String(stageName), } stage, err := conn.GetStage(&input) + + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + log.Printf("[WARN] API Gateway Stage (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == apigateway.ErrCodeNotFoundException { - log.Printf("[WARN] API Gateway Stage (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } - return err + return fmt.Errorf("error getting API Gateway REST API (%s) Stage (%s): %w", restApiId, stageName, err) } + log.Printf("[DEBUG] Received API Gateway Stage: %s", stage) if err := d.Set("access_log_settings", flattenApiGatewayStageAccessLogSettings(stage.AccessLogSettings)); err != nil { @@ -255,7 +246,7 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er d.Set("documentation_version", stage.DocumentationVersion) d.Set("xray_tracing_enabled", stage.TracingEnabled) - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(stage.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(stage.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -288,8 +279,6 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn - d.Partial(true) - stageArn := arn.ARN{ Partition: meta.(*AWSClient).partition, Region: meta.(*AWSClient).region, @@ -395,12 +384,6 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Updating API Gateway Stage failed: %s", err) } - d.SetPartial("client_certificate_id") - d.SetPartial("deployment_id") - d.SetPartial("description") - d.SetPartial("xray_tracing_enabled") - d.SetPartial("variables") - if waitForCache && *out.CacheClusterStatus != apigateway.CacheClusterStatusNotAvailable { stateConf := &resource.StateChangeConf{ Pending: []string{ @@ -425,10 +408,6 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) } } - d.SetPartial("cache_cluster_enabled") - d.SetPartial("cache_cluster_size") - d.Partial(false) - return resourceAwsApiGatewayStageRead(d, meta) } @@ -487,8 +466,13 @@ func resourceAwsApiGatewayStageDelete(d *schema.ResourceData, meta interface{}) StageName: aws.String(d.Get("stage_name").(string)), } _, err := conn.DeleteStage(&input) + + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return nil + } + if err != nil { - return fmt.Errorf("Deleting API Gateway Stage failed: %s", err) + return fmt.Errorf("error deleting API Gateway REST API (%s) Stage (%s): %w", d.Get("rest_api_id").(string), d.Get("stage_name").(string), err) } return nil diff --git a/aws/resource_aws_api_gateway_stage_test.go b/aws/resource_aws_api_gateway_stage_test.go index 96c61130711..e9bd93e0183 100644 --- a/aws/resource_aws_api_gateway_stage_test.go +++ b/aws/resource_aws_api_gateway_stage_test.go @@ -77,11 +77,37 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { }) } +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12756 +func TestAccAWSAPIGatewayStage_disappears_ReferencingDeployment(t *testing.T) { + var stage apigateway.Stage + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_api_gateway_stage.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayStageDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayStageConfigReferencingDeployment(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayStageExists(resourceName, &stage), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSAPIGatewayStageImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { var conf apigateway.Stage rName := acctest.RandString(5) resourceName := "aws_api_gateway_stage.test" - logGroupArnRegex := regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:logs:[^:]+:[^:]+:log-group:foo-bar-%s$", rName)) clf := `$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId` json := `{ "requestId":"$context.requestId", "ip": "$context.identity.sourceIp", "caller":"$context.identity.caller", "user":"$context.identity.user", "requestTime":"$context.requestTime", "httpMethod":"$context.httpMethod", "resourcePath":"$context.resourcePath", "status":"$context.status", "protocol":"$context.protocol", "responseLength":"$context.responseLength" }` xml := ` $context.identity.sourceIp $context.identity.caller $context.identity.user $context.requestTime $context.httpMethod $context.resourcePath $context.status $context.protocol $context.responseLength ` @@ -98,7 +124,7 @@ func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { testAccCheckAWSAPIGatewayStageExists(resourceName, &conf), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/restapis/.+/stages/prod`)), resource.TestCheckResourceAttr(resourceName, "access_log_settings.#", "1"), - resource.TestMatchResourceAttr(resourceName, "access_log_settings.0.destination_arn", logGroupArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "access_log_settings.0.destination_arn", "logs", regexp.MustCompile(fmt.Sprintf("log-group:foo-bar-%s$", rName))), resource.TestCheckResourceAttr(resourceName, "access_log_settings.0.format", clf), ), }, @@ -109,7 +135,7 @@ func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { testAccCheckAWSAPIGatewayStageExists(resourceName, &conf), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/restapis/.+/stages/prod`)), resource.TestCheckResourceAttr(resourceName, "access_log_settings.#", "1"), - resource.TestMatchResourceAttr(resourceName, "access_log_settings.0.destination_arn", logGroupArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "access_log_settings.0.destination_arn", "logs", regexp.MustCompile(fmt.Sprintf("log-group:foo-bar-%s$", rName))), resource.TestCheckResourceAttr(resourceName, "access_log_settings.0.format", json), ), }, @@ -119,7 +145,7 @@ func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { testAccCheckAWSAPIGatewayStageExists(resourceName, &conf), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/restapis/.+/stages/prod`)), resource.TestCheckResourceAttr(resourceName, "access_log_settings.#", "1"), - resource.TestMatchResourceAttr(resourceName, "access_log_settings.0.destination_arn", logGroupArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "access_log_settings.0.destination_arn", "logs", regexp.MustCompile(fmt.Sprintf("log-group:foo-bar-%s$", rName))), resource.TestCheckResourceAttr(resourceName, "access_log_settings.0.format", xml), ), }, @@ -129,7 +155,7 @@ func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { testAccCheckAWSAPIGatewayStageExists(resourceName, &conf), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/restapis/.+/stages/prod`)), resource.TestCheckResourceAttr(resourceName, "access_log_settings.#", "1"), - resource.TestMatchResourceAttr(resourceName, "access_log_settings.0.destination_arn", logGroupArnRegex), + testAccMatchResourceAttrRegionalARN(resourceName, "access_log_settings.0.destination_arn", "logs", regexp.MustCompile(fmt.Sprintf("log-group:foo-bar-%s$", rName))), resource.TestCheckResourceAttr(resourceName, "access_log_settings.0.format", csv), ), }, @@ -338,6 +364,82 @@ resource "aws_api_gateway_deployment" "dev" { `, rName) } +func testAccAWSAPIGatewayStageConfigBaseDeploymentStageName(rName string, stageName string) string { + return fmt.Sprintf(` +resource "aws_api_gateway_rest_api" "test" { + name = %[1]q +} + +resource "aws_api_gateway_resource" "test" { + parent_id = aws_api_gateway_rest_api.test.root_resource_id + path_part = "test" + rest_api_id = aws_api_gateway_rest_api.test.id +} + +resource "aws_api_gateway_method" "test" { + authorization = "NONE" + http_method = "GET" + resource_id = aws_api_gateway_resource.test.id + rest_api_id = aws_api_gateway_rest_api.test.id +} + +resource "aws_api_gateway_method_response" "error" { + http_method = aws_api_gateway_method.test.http_method + resource_id = aws_api_gateway_resource.test.id + rest_api_id = aws_api_gateway_rest_api.test.id + status_code = "400" +} + +resource "aws_api_gateway_integration" "test" { + http_method = aws_api_gateway_method.test.http_method + integration_http_method = "GET" + resource_id = aws_api_gateway_resource.test.id + rest_api_id = aws_api_gateway_rest_api.test.id + type = "HTTP" + uri = "https://www.google.co.uk" +} + +resource "aws_api_gateway_integration_response" "test" { + http_method = aws_api_gateway_integration.test.http_method + resource_id = aws_api_gateway_resource.test.id + rest_api_id = aws_api_gateway_rest_api.test.id + status_code = aws_api_gateway_method_response.error.status_code +} + +resource "aws_api_gateway_deployment" "test" { + depends_on = [aws_api_gateway_integration.test] + + rest_api_id = aws_api_gateway_rest_api.test.id + stage_name = %[2]q +} +`, rName, stageName) +} + +func testAccAWSAPIGatewayStageConfigReferencingDeployment(rName string) string { + return composeConfig( + testAccAWSAPIGatewayStageConfigBaseDeploymentStageName(rName, ""), + ` +# Due to oddities with API Gateway, certain environments utilize +# a double deployment configuration. This can cause destroy errors. +resource "aws_api_gateway_stage" "test" { + deployment_id = aws_api_gateway_deployment.test.id + rest_api_id = aws_api_gateway_rest_api.test.id + stage_name = "test" + + lifecycle { + ignore_changes = [deployment_id] + } +} + +resource "aws_api_gateway_deployment" "test2" { + depends_on = [aws_api_gateway_integration.test] + + rest_api_id = aws_api_gateway_rest_api.test.id + stage_name = aws_api_gateway_stage.test.stage_name +} +`) +} + func testAccAWSAPIGatewayStageConfig_basic(rName string) string { return testAccAWSAPIGatewayStageConfig_base(rName) + ` resource "aws_api_gateway_stage" "test" { diff --git a/aws/resource_aws_api_gateway_usage_plan.go b/aws/resource_aws_api_gateway_usage_plan.go index 914f4393431..caa055e8d5c 100644 --- a/aws/resource_aws_api_gateway_usage_plan.go +++ b/aws/resource_aws_api_gateway_usage_plan.go @@ -55,7 +55,7 @@ func resourceAwsApiGatewayUsagePlan() *schema.Resource { }, "quota_settings": { - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, Optional: true, Elem: &schema.Resource{ @@ -85,7 +85,7 @@ func resourceAwsApiGatewayUsagePlan() *schema.Resource { }, "throttle_settings": { - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, Optional: true, Elem: &schema.Resource{ @@ -155,7 +155,7 @@ func resourceAwsApiGatewayUsagePlanCreate(d *schema.ResourceData, meta interface } if v, ok := d.GetOk("quota_settings"); ok { - settings := v.(*schema.Set).List() + settings := v.([]interface{}) q, ok := settings[0].(map[string]interface{}) if errors := validateApiGatewayUsagePlanQuotaSettings(q); len(errors) > 0 { @@ -184,7 +184,7 @@ func resourceAwsApiGatewayUsagePlanCreate(d *schema.ResourceData, meta interface } if v, ok := d.GetOk("throttle_settings"); ok { - settings := v.(*schema.Set).List() + settings := v.([]interface{}) q, ok := settings[0].(map[string]interface{}) if !ok { @@ -240,6 +240,8 @@ func resourceAwsApiGatewayUsagePlanCreate(d *schema.ResourceData, meta interface func resourceAwsApiGatewayUsagePlanRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + log.Printf("[DEBUG] Reading API Gateway Usage Plan: %s", d.Id()) up, err := conn.GetUsagePlan(&apigateway.GetUsagePlanInput{ @@ -254,7 +256,7 @@ func resourceAwsApiGatewayUsagePlanRead(d *schema.ResourceData, meta interface{} return err } - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(up.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(up.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -361,10 +363,7 @@ func resourceAwsApiGatewayUsagePlanUpdate(d *schema.ResourceData, meta interface if d.HasChange("throttle_settings") { o, n := d.GetChange("throttle_settings") - - os := o.(*schema.Set) - ns := n.(*schema.Set) - diff := ns.Difference(os).List() + diff := n.([]interface{}) // Handle Removal if len(diff) == 0 { @@ -409,10 +408,7 @@ func resourceAwsApiGatewayUsagePlanUpdate(d *schema.ResourceData, meta interface if d.HasChange("quota_settings") { o, n := d.GetChange("quota_settings") - - os := o.(*schema.Set) - ns := n.(*schema.Set) - diff := ns.Difference(os).List() + diff := n.([]interface{}) // Handle Removal if len(diff) == 0 { diff --git a/aws/resource_aws_api_gateway_usage_plan_test.go b/aws/resource_aws_api_gateway_usage_plan_test.go index 55db3d1c45a..e766f11d7be 100644 --- a/aws/resource_aws_api_gateway_usage_plan_test.go +++ b/aws/resource_aws_api_gateway_usage_plan_test.go @@ -230,8 +230,8 @@ func TestAccAWSAPIGatewayUsagePlan_throttling(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayUsagePlanExists(resourceName, &conf), resource.TestCheckResourceAttr(resourceName, "name", rName), - resource.TestCheckResourceAttr(resourceName, "throttle_settings.4173790118.burst_limit", "2"), - resource.TestCheckResourceAttr(resourceName, "throttle_settings.4173790118.rate_limit", "5"), + resource.TestCheckResourceAttr(resourceName, "throttle_settings.0.burst_limit", "2"), + resource.TestCheckResourceAttr(resourceName, "throttle_settings.0.rate_limit", "5"), ), }, { @@ -239,8 +239,8 @@ func TestAccAWSAPIGatewayUsagePlan_throttling(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayUsagePlanExists(resourceName, &conf), resource.TestCheckResourceAttr(resourceName, "name", rName), - resource.TestCheckResourceAttr(resourceName, "throttle_settings.1779463053.burst_limit", "3"), - resource.TestCheckResourceAttr(resourceName, "throttle_settings.1779463053.rate_limit", "6"), + resource.TestCheckResourceAttr(resourceName, "throttle_settings.0.burst_limit", "3"), + resource.TestCheckResourceAttr(resourceName, "throttle_settings.0.rate_limit", "6"), ), }, { @@ -270,7 +270,7 @@ func TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit(t *testing.T) { Config: testAccAWSApiGatewayUsagePlanThrottlingConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayUsagePlanExists(resourceName, &conf), - resource.TestCheckResourceAttr(resourceName, "throttle_settings.4173790118.rate_limit", "5"), + resource.TestCheckResourceAttr(resourceName, "throttle_settings.0.rate_limit", "5"), ), }, { @@ -310,9 +310,9 @@ func TestAccAWSAPIGatewayUsagePlan_quota(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayUsagePlanExists(resourceName, &conf), resource.TestCheckResourceAttr(resourceName, "name", rName), - resource.TestCheckResourceAttr(resourceName, "quota_settings.1956747625.limit", "100"), - resource.TestCheckResourceAttr(resourceName, "quota_settings.1956747625.offset", "6"), - resource.TestCheckResourceAttr(resourceName, "quota_settings.1956747625.period", "WEEK"), + resource.TestCheckResourceAttr(resourceName, "quota_settings.0.limit", "100"), + resource.TestCheckResourceAttr(resourceName, "quota_settings.0.offset", "6"), + resource.TestCheckResourceAttr(resourceName, "quota_settings.0.period", "WEEK"), ), }, { @@ -320,9 +320,9 @@ func TestAccAWSAPIGatewayUsagePlan_quota(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayUsagePlanExists(resourceName, &conf), resource.TestCheckResourceAttr(resourceName, "name", rName), - resource.TestCheckResourceAttr(resourceName, "quota_settings.3909168194.limit", "200"), - resource.TestCheckResourceAttr(resourceName, "quota_settings.3909168194.offset", "20"), - resource.TestCheckResourceAttr(resourceName, "quota_settings.3909168194.period", "MONTH"), + resource.TestCheckResourceAttr(resourceName, "quota_settings.0.limit", "200"), + resource.TestCheckResourceAttr(resourceName, "quota_settings.0.offset", "20"), + resource.TestCheckResourceAttr(resourceName, "quota_settings.0.period", "MONTH"), ), }, { diff --git a/aws/resource_aws_api_gateway_vpc_link.go b/aws/resource_aws_api_gateway_vpc_link.go index 2bb3828f51c..28720412ebb 100644 --- a/aws/resource_aws_api_gateway_vpc_link.go +++ b/aws/resource_aws_api_gateway_vpc_link.go @@ -33,7 +33,7 @@ func resourceAwsApiGatewayVpcLink() *schema.Resource { Optional: true, }, "target_arns": { - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, Required: true, ForceNew: true, @@ -54,7 +54,7 @@ func resourceAwsApiGatewayVpcLinkCreate(d *schema.ResourceData, meta interface{} input := &apigateway.CreateVpcLinkInput{ Name: aws.String(d.Get("name").(string)), - TargetArns: expandStringList(d.Get("target_arns").(*schema.Set).List()), + TargetArns: expandStringList(d.Get("target_arns").([]interface{})), Tags: tags, } if v, ok := d.GetOk("description"); ok { @@ -87,6 +87,7 @@ func resourceAwsApiGatewayVpcLinkCreate(d *schema.ResourceData, meta interface{} func resourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &apigateway.GetVpcLinkInput{ VpcLinkId: aws.String(d.Id()), @@ -102,7 +103,7 @@ func resourceAwsApiGatewayVpcLinkRead(d *schema.ResourceData, meta interface{}) return err } - if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(resp.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ApigatewayKeyValueTags(resp.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_api_gateway_vpc_link_test.go b/aws/resource_aws_api_gateway_vpc_link_test.go index 0094888a297..038db4e50da 100644 --- a/aws/resource_aws_api_gateway_vpc_link_test.go +++ b/aws/resource_aws_api_gateway_vpc_link_test.go @@ -213,7 +213,14 @@ resource "aws_vpc" "test" { } } -data "aws_availability_zones" "test" {} +data "aws_availability_zones" "test" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" diff --git a/aws/resource_aws_apigatewayv2_api.go b/aws/resource_aws_apigatewayv2_api.go index 995997f9036..67049184e0f 100644 --- a/aws/resource_aws_apigatewayv2_api.go +++ b/aws/resource_aws_apigatewayv2_api.go @@ -40,6 +40,53 @@ func resourceAwsApiGatewayV2Api() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "cors_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allow_credentials": { + Type: schema.TypeBool, + Optional: true, + }, + "allow_headers": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: hashStringCaseInsensitive, + }, + "allow_methods": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: hashStringCaseInsensitive, + }, + "allow_origins": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: hashStringCaseInsensitive, + }, + "expose_headers": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: hashStringCaseInsensitive, + }, + "max_age": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + "credentials_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, + }, "description": { Type: schema.TypeString, Optional: true, @@ -63,12 +110,22 @@ func resourceAwsApiGatewayV2Api() *schema.Resource { apigatewayv2.ProtocolTypeWebsocket, }, false), }, + "route_key": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "route_selection_expression": { Type: schema.TypeString, Optional: true, Default: "$request.method $request.path", }, "tags": tagsSchema(), + "target": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "version": { Type: schema.TypeString, Optional: true, @@ -90,12 +147,24 @@ func resourceAwsApiGatewayV2ApiCreate(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("api_key_selection_expression"); ok { req.ApiKeySelectionExpression = aws.String(v.(string)) } + if v, ok := d.GetOk("cors_configuration"); ok { + req.CorsConfiguration = expandApiGateway2CorsConfiguration(v.([]interface{})) + } + if v, ok := d.GetOk("credentials_arn"); ok { + req.CredentialsArn = aws.String(v.(string)) + } if v, ok := d.GetOk("description"); ok { req.Description = aws.String(v.(string)) } + if v, ok := d.GetOk("route_key"); ok { + req.RouteKey = aws.String(v.(string)) + } if v, ok := d.GetOk("route_selection_expression"); ok { req.RouteSelectionExpression = aws.String(v.(string)) } + if v, ok := d.GetOk("target"); ok { + req.Target = aws.String(v.(string)) + } if v, ok := d.GetOk("version"); ok { req.Version = aws.String(v.(string)) } @@ -113,6 +182,7 @@ func resourceAwsApiGatewayV2ApiCreate(d *schema.ResourceData, meta interface{}) func resourceAwsApiGatewayV2ApiRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.GetApi(&apigatewayv2.GetApiInput{ ApiId: aws.String(d.Id()), @@ -135,6 +205,9 @@ func resourceAwsApiGatewayV2ApiRead(d *schema.ResourceData, meta interface{}) er Resource: fmt.Sprintf("/apis/%s", d.Id()), }.String() d.Set("arn", apiArn) + if err := d.Set("cors_configuration", flattenApiGateway2CorsConfiguration(resp.CorsConfiguration)); err != nil { + return fmt.Errorf("error setting cors_configuration: %s", err) + } d.Set("description", resp.Description) executionArn := arn.ARN{ Partition: meta.(*AWSClient).partition, @@ -147,7 +220,7 @@ func resourceAwsApiGatewayV2ApiRead(d *schema.ResourceData, meta interface{}) er d.Set("name", resp.Name) d.Set("protocol_type", resp.ProtocolType) d.Set("route_selection_expression", resp.RouteSelectionExpression) - if err := d.Set("tags", keyvaluetags.Apigatewayv2KeyValueTags(resp.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Apigatewayv2KeyValueTags(resp.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } d.Set("version", resp.Version) @@ -158,7 +231,24 @@ func resourceAwsApiGatewayV2ApiRead(d *schema.ResourceData, meta interface{}) er func resourceAwsApiGatewayV2ApiUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigatewayv2conn - if d.HasChanges("api_key_selection_expression", "description", "name", "route_selection_expression", "version") { + deleteCorsConfiguration := false + if d.HasChange("cors_configuration") { + v := d.Get("cors_configuration") + if len(v.([]interface{})) == 0 { + deleteCorsConfiguration = true + + log.Printf("[DEBUG] Deleting CORS configuration for API Gateway v2 API (%s)", d.Id()) + _, err := conn.DeleteCorsConfiguration(&apigatewayv2.DeleteCorsConfigurationInput{ + ApiId: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("error deleting CORS configuration for API Gateway v2 API (%s): %s", d.Id(), err) + } + } + } + + if d.HasChanges("api_key_selection_expression", "description", "name", "route_selection_expression", "version") || + (d.HasChange("cors_configuration") && !deleteCorsConfiguration) { req := &apigatewayv2.UpdateApiInput{ ApiId: aws.String(d.Id()), } @@ -166,6 +256,9 @@ func resourceAwsApiGatewayV2ApiUpdate(d *schema.ResourceData, meta interface{}) if d.HasChange("api_key_selection_expression") { req.ApiKeySelectionExpression = aws.String(d.Get("api_key_selection_expression").(string)) } + if d.HasChange("cors_configuration") { + req.CorsConfiguration = expandApiGateway2CorsConfiguration(d.Get("cors_configuration").([]interface{})) + } if d.HasChange("description") { req.Description = aws.String(d.Get("description").(string)) } @@ -212,3 +305,48 @@ func resourceAwsApiGatewayV2ApiDelete(d *schema.ResourceData, meta interface{}) return nil } + +func expandApiGateway2CorsConfiguration(vConfiguration []interface{}) *apigatewayv2.Cors { + configuration := &apigatewayv2.Cors{} + + if len(vConfiguration) == 0 || vConfiguration[0] == nil { + return configuration + } + mConfiguration := vConfiguration[0].(map[string]interface{}) + + if vAllowCredentials, ok := mConfiguration["allow_credentials"].(bool); ok { + configuration.AllowCredentials = aws.Bool(vAllowCredentials) + } + if vAllowHeaders, ok := mConfiguration["allow_headers"].(*schema.Set); ok { + configuration.AllowHeaders = expandStringSet(vAllowHeaders) + } + if vAllowMethods, ok := mConfiguration["allow_methods"].(*schema.Set); ok { + configuration.AllowMethods = expandStringSet(vAllowMethods) + } + if vAllowOrigins, ok := mConfiguration["allow_origins"].(*schema.Set); ok { + configuration.AllowOrigins = expandStringSet(vAllowOrigins) + } + if vExposeHeaders, ok := mConfiguration["expose_headers"].(*schema.Set); ok { + configuration.ExposeHeaders = expandStringSet(vExposeHeaders) + } + if vMaxAge, ok := mConfiguration["max_age"].(int); ok { + configuration.MaxAge = aws.Int64(int64(vMaxAge)) + } + + return configuration +} + +func flattenApiGateway2CorsConfiguration(configuration *apigatewayv2.Cors) []interface{} { + if configuration == nil { + return []interface{}{} + } + + return []interface{}{map[string]interface{}{ + "allow_credentials": aws.BoolValue(configuration.AllowCredentials), + "allow_headers": flattenCaseInsensitiveStringSet(configuration.AllowHeaders), + "allow_methods": flattenCaseInsensitiveStringSet(configuration.AllowMethods), + "allow_origins": flattenCaseInsensitiveStringSet(configuration.AllowOrigins), + "expose_headers": flattenCaseInsensitiveStringSet(configuration.ExposeHeaders), + "max_age": int(aws.Int64Value(configuration.MaxAge)), + }} +} diff --git a/aws/resource_aws_apigatewayv2_api_mapping.go b/aws/resource_aws_apigatewayv2_api_mapping.go new file mode 100644 index 00000000000..38eede5f4b1 --- /dev/null +++ b/aws/resource_aws_apigatewayv2_api_mapping.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func resourceAwsApiGatewayV2ApiMapping() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsApiGatewayV2ApiMappingCreate, + Read: resourceAwsApiGatewayV2ApiMappingRead, + Update: resourceAwsApiGatewayV2ApiMappingUpdate, + Delete: resourceAwsApiGatewayV2ApiMappingDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsApiGatewayV2ApiMappingImport, + }, + + Schema: map[string]*schema.Schema{ + "api_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "api_mapping_key": { + Type: schema.TypeString, + Optional: true, + }, + "domain_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "stage": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func resourceAwsApiGatewayV2ApiMappingCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + req := &apigatewayv2.CreateApiMappingInput{ + ApiId: aws.String(d.Get("api_id").(string)), + DomainName: aws.String(d.Get("domain_name").(string)), + Stage: aws.String(d.Get("stage").(string)), + } + if v, ok := d.GetOk("api_mapping_key"); ok { + req.ApiMappingKey = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating API Gateway v2 API mapping: %s", req) + resp, err := conn.CreateApiMapping(req) + if err != nil { + return fmt.Errorf("error creating API Gateway v2 API mapping: %s", err) + } + + d.SetId(aws.StringValue(resp.ApiMappingId)) + + return resourceAwsApiGatewayV2ApiMappingRead(d, meta) +} + +func resourceAwsApiGatewayV2ApiMappingRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + resp, err := conn.GetApiMapping(&apigatewayv2.GetApiMappingInput{ + ApiMappingId: aws.String(d.Id()), + DomainName: aws.String(d.Get("domain_name").(string)), + }) + if isAWSErr(err, apigatewayv2.ErrCodeNotFoundException, "") { + log.Printf("[WARN] API Gateway v2 API mapping (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { + return fmt.Errorf("error reading API Gateway v2 API mapping: %s", err) + } + + d.Set("api_id", resp.ApiId) + d.Set("api_mapping_key", resp.ApiMappingKey) + d.Set("stage", resp.Stage) + + return nil +} + +func resourceAwsApiGatewayV2ApiMappingUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + req := &apigatewayv2.UpdateApiMappingInput{ + ApiId: aws.String(d.Get("api_id").(string)), + ApiMappingId: aws.String(d.Id()), + DomainName: aws.String(d.Get("domain_name").(string)), + } + if d.HasChange("api_mapping_key") { + req.ApiMappingKey = aws.String(d.Get("api_mapping_key").(string)) + } + if d.HasChange("stage") { + req.Stage = aws.String(d.Get("stage").(string)) + } + + log.Printf("[DEBUG] Updating API Gateway v2 API mapping: %s", req) + _, err := conn.UpdateApiMapping(req) + if err != nil { + return fmt.Errorf("error updating API Gateway v2 API mapping: %s", err) + } + + return resourceAwsApiGatewayV2ApiMappingRead(d, meta) +} + +func resourceAwsApiGatewayV2ApiMappingDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + log.Printf("[DEBUG] Deleting API Gateway v2 API mapping (%s)", d.Id()) + _, err := conn.DeleteApiMapping(&apigatewayv2.DeleteApiMappingInput{ + ApiMappingId: aws.String(d.Id()), + DomainName: aws.String(d.Get("domain_name").(string)), + }) + if isAWSErr(err, apigatewayv2.ErrCodeNotFoundException, "") { + return nil + } + if err != nil { + return fmt.Errorf("error deleting API Gateway v2 API mapping: %s", err) + } + + return nil +} + +func resourceAwsApiGatewayV2ApiMappingImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + parts := strings.Split(d.Id(), "/") + if len(parts) != 2 { + return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'api-mapping-id/domain-name'", d.Id()) + } + + d.SetId(parts[0]) + d.Set("domain_name", parts[1]) + + return []*schema.ResourceData{d}, nil +} diff --git a/aws/resource_aws_apigatewayv2_api_mapping_test.go b/aws/resource_aws_apigatewayv2_api_mapping_test.go new file mode 100644 index 00000000000..8658caea03c --- /dev/null +++ b/aws/resource_aws_apigatewayv2_api_mapping_test.go @@ -0,0 +1,286 @@ +package aws + +import ( + "fmt" + "log" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acm" + "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +// These tests need to be serialized, else resources get orphaned after "TooManyRequests" errors. +func TestAccAWSAPIGatewayV2ApiMapping(t *testing.T) { + var certificateArn string + rName := acctest.RandomWithPrefix("tf-acc-test") + + // Create an ACM certificate to be used by all the tests. + // It is created outside the Terraform configurations because deletion + // of CloudFront distribution backing the API Gateway domain name is asynchronous + // and can take up to 60 minutes and the distribution keeps the certificate alive. + t.Run("createCertificate", func(t *testing.T) { + testAccAWSAPIGatewayV2ApiMapping_createCertificate(t, rName, &certificateArn) + }) + + testCases := map[string]func(t *testing.T, rName string, certificateArn *string){ + "basic": testAccAWSAPIGatewayV2ApiMapping_basic, + "disappears": testAccAWSAPIGatewayV2ApiMapping_disappears, + "ApiMappingKey": testAccAWSAPIGatewayV2ApiMapping_ApiMappingKey, + } + for name, tc := range testCases { + tc := tc + t.Run(name, func(t *testing.T) { + tc(t, rName, &certificateArn) + }) + } +} + +func testAccAWSAPIGatewayV2ApiMapping_createCertificate(t *testing.T, rName string, certificateArn *string) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: nil, + Steps: []resource.TestStep{ + { + Config: "# Dummy config.", + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiMappingCreateCertificate(rName, certificateArn), + ), + }, + }, + }) + + log.Printf("[INFO] Created ACM certificate %s", *certificateArn) +} + +func testAccAWSAPIGatewayV2ApiMapping_basic(t *testing.T, rName string, certificateArn *string) { + var domainName string + var v apigatewayv2.GetApiMappingOutput + resourceName := "aws_apigatewayv2_api_mapping.test" + domainNameResourceName := "aws_apigatewayv2_domain_name.test" + stageResourceName := "aws_apigatewayv2_stage.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2ApiMappingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2ApiMappingConfig_basic(rName, *certificateArn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiMappingExists(resourceName, &domainName, &v), + resource.TestCheckResourceAttrPair(resourceName, "domain_name", domainNameResourceName, "domain_name"), + resource.TestCheckResourceAttrPair(resourceName, "stage", stageResourceName, "name")), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSAPIGatewayV2ApiMappingImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccAWSAPIGatewayV2ApiMapping_disappears(t *testing.T, rName string, certificateArn *string) { + var domainName string + var v apigatewayv2.GetApiMappingOutput + resourceName := "aws_apigatewayv2_api_mapping.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2ApiMappingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2ApiMappingConfig_basic(rName, *certificateArn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiMappingExists(resourceName, &domainName, &v), + testAccCheckAWSAPIGatewayV2ApiMappingDisappears(&domainName, &v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccAWSAPIGatewayV2ApiMapping_ApiMappingKey(t *testing.T, rName string, certificateArn *string) { + var domainName string + var v apigatewayv2.GetApiMappingOutput + resourceName := "aws_apigatewayv2_api_mapping.test" + domainNameResourceName := "aws_apigatewayv2_domain_name.test" + stageResourceName := "aws_apigatewayv2_stage.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2ApiMappingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2ApiMappingConfig_apiMappingKey(rName, *certificateArn, "$context.domainName"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiMappingExists(resourceName, &domainName, &v), + resource.TestCheckResourceAttr(resourceName, "api_mapping_key", "$context.domainName"), + resource.TestCheckResourceAttrPair(resourceName, "domain_name", domainNameResourceName, "domain_name"), + resource.TestCheckResourceAttrPair(resourceName, "stage", stageResourceName, "name")), + }, + { + Config: testAccAWSAPIGatewayV2ApiMappingConfig_apiMappingKey(rName, *certificateArn, "$context.apiId"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiMappingExists(resourceName, &domainName, &v), + resource.TestCheckResourceAttr(resourceName, "api_mapping_key", "$context.apiId"), + resource.TestCheckResourceAttrPair(resourceName, "domain_name", domainNameResourceName, "domain_name"), + resource.TestCheckResourceAttrPair(resourceName, "stage", stageResourceName, "name")), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSAPIGatewayV2ApiMappingImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSAPIGatewayV2ApiMappingCreateCertificate(rName string, certificateArn *string) resource.TestCheckFunc { + return func(s *terraform.State) error { + privateKey := tlsRsaPrivateKeyPem(2048) + certificate := tlsRsaX509SelfSignedCertificatePem(privateKey, fmt.Sprintf("%s.example.com", rName)) + + conn := testAccProvider.Meta().(*AWSClient).acmconn + + output, err := conn.ImportCertificate(&acm.ImportCertificateInput{ + Certificate: []byte(certificate), + PrivateKey: []byte(privateKey), + Tags: keyvaluetags.New(map[string]interface{}{ + "Name": rName, + }).IgnoreAws().AcmTags(), + }) + if err != nil { + return err + } + + *certificateArn = *output.CertificateArn + + return nil + } +} + +func testAccCheckAWSAPIGatewayV2ApiMappingDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_apigatewayv2_api_mapping" { + continue + } + + _, err := conn.GetApiMapping(&apigatewayv2.GetApiMappingInput{ + ApiMappingId: aws.String(rs.Primary.ID), + DomainName: aws.String(rs.Primary.Attributes["domain_name"]), + }) + if isAWSErr(err, apigatewayv2.ErrCodeNotFoundException, "") { + continue + } + if err != nil { + return err + } + + return fmt.Errorf("API Gateway v2 API mapping %s still exists", rs.Primary.ID) + } + + return nil +} + +func testAccCheckAWSAPIGatewayV2ApiMappingDisappears(domainName *string, v *apigatewayv2.GetApiMappingOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + _, err := conn.DeleteApiMapping(&apigatewayv2.DeleteApiMappingInput{ + ApiMappingId: v.ApiMappingId, + DomainName: domainName, + }) + + return err + } +} + +func testAccCheckAWSAPIGatewayV2ApiMappingExists(n string, vDomainName *string, v *apigatewayv2.GetApiMappingOutput) 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 API Gateway v2 API mapping ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + domainName := aws.String(rs.Primary.Attributes["domain_name"]) + resp, err := conn.GetApiMapping(&apigatewayv2.GetApiMappingInput{ + ApiMappingId: aws.String(rs.Primary.ID), + DomainName: domainName, + }) + if err != nil { + return err + } + + *vDomainName = *domainName + *v = *resp + + return nil + } +} + +func testAccAWSAPIGatewayV2ApiMappingImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not Found: %s", resourceName) + } + + return fmt.Sprintf("%s/%s", rs.Primary.ID, rs.Primary.Attributes["domain_name"]), nil + } +} + +func testAccAWSAPIGatewayV2ApiMappingConfig_base(rName, certificateArn string) string { + return fmt.Sprintf(` +resource "aws_apigatewayv2_domain_name" "test" { + domain_name = "%[1]s.example.com" + + domain_name_configuration { + certificate_arn = %[2]q + endpoint_type = "REGIONAL" + security_policy = "TLS_1_2" + } +} +`, rName, certificateArn) +} + +func testAccAWSAPIGatewayV2ApiMappingConfig_basic(rName, certificateArn string) string { + return testAccAWSAPIGatewayV2ApiMappingConfig_base(rName, certificateArn) + testAccAWSAPIGatewayV2StageConfig_basicWebSocket(rName) + fmt.Sprintf(` +resource "aws_apigatewayv2_api_mapping" "test" { + api_id = "${aws_apigatewayv2_api.test.id}" + domain_name = "${aws_apigatewayv2_domain_name.test.id}" + stage = "${aws_apigatewayv2_stage.test.id}" +} +`) +} + +func testAccAWSAPIGatewayV2ApiMappingConfig_apiMappingKey(rName, certificateArn, apiMappingKey string) string { + return testAccAWSAPIGatewayV2ApiMappingConfig_base(rName, certificateArn) + testAccAWSAPIGatewayV2StageConfig_basicWebSocket(rName) + fmt.Sprintf(` +resource "aws_apigatewayv2_api_mapping" "test" { + api_id = "${aws_apigatewayv2_api.test.id}" + domain_name = "${aws_apigatewayv2_domain_name.test.id}" + stage = "${aws_apigatewayv2_stage.test.id}" + + api_mapping_key = %[1]q +} +`, apiMappingKey) +} diff --git a/aws/resource_aws_apigatewayv2_api_test.go b/aws/resource_aws_apigatewayv2_api_test.go index d3de86eead7..f95bfd8cea0 100644 --- a/aws/resource_aws_apigatewayv2_api_test.go +++ b/aws/resource_aws_apigatewayv2_api_test.go @@ -18,6 +18,9 @@ func init() { resource.AddTestSweepers("aws_apigatewayv2_api", &resource.Sweeper{ Name: "aws_apigatewayv2_api", F: testSweepAPIGatewayV2Apis, + Dependencies: []string{ + "aws_apigatewayv2_domain_name", + }, }) } @@ -82,6 +85,7 @@ func TestAccAWSAPIGatewayV2Api_basicWebSocket(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", ""), testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), resource.TestCheckResourceAttr(resourceName, "name", rName), @@ -117,6 +121,7 @@ func TestAccAWSAPIGatewayV2Api_basicHttp(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", ""), testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), resource.TestCheckResourceAttr(resourceName, "name", rName), @@ -175,6 +180,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$context.authorizer.usageIdentifierKey"), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", "test description"), testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), resource.TestCheckResourceAttr(resourceName, "name", rName1), @@ -189,6 +195,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", ""), resource.TestCheckResourceAttr(resourceName, "name", rName1), resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeWebsocket), @@ -202,6 +209,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$context.authorizer.usageIdentifierKey"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", "test description"), resource.TestCheckResourceAttr(resourceName, "name", rName2), resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.body.service"), @@ -214,6 +222,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$context.authorizer.usageIdentifierKey"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", "test description"), resource.TestCheckResourceAttr(resourceName, "name", rName1), resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.body.service"), @@ -248,6 +257,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesHttp(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", "test description"), testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), resource.TestCheckResourceAttr(resourceName, "name", rName1), @@ -262,6 +272,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesHttp(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", ""), resource.TestCheckResourceAttr(resourceName, "name", rName1), resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeHttp), @@ -275,6 +286,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesHttp(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", "test description"), resource.TestCheckResourceAttr(resourceName, "name", rName2), resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.method $request.path"), @@ -287,6 +299,7 @@ func TestAccAWSAPIGatewayV2Api_AllAttributesHttp(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", "test description"), resource.TestCheckResourceAttr(resourceName, "name", rName1), resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.method $request.path"), @@ -320,6 +333,7 @@ func TestAccAWSAPIGatewayV2Api_Tags(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", ""), testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), resource.TestCheckResourceAttr(resourceName, "name", rName), @@ -341,6 +355,7 @@ func TestAccAWSAPIGatewayV2Api_Tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), resource.TestCheckResourceAttr(resourceName, "description", ""), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeWebsocket), @@ -353,6 +368,142 @@ func TestAccAWSAPIGatewayV2Api_Tags(t *testing.T) { }) } +func TestAccAWSAPIGatewayV2Api_CorsConfiguration(t *testing.T) { + var v apigatewayv2.GetApiOutput + resourceName := "aws_apigatewayv2_api.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2ApiDestroy, + DisableBinaryDriver: true, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2ApiConfig_corsConfiguration(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), + resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), + resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_credentials", "false"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_headers.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_headers.2053999599", "Authorization"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_methods.#", "2"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_methods.4248514160", "GET"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_methods.2928708052", "put"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_origins.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_origins.89023941", "https://www.example.com"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.expose_headers.#", "0"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.max_age", "0"), + resource.TestCheckResourceAttr(resourceName, "description", ""), + testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeHttp), + resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.method $request.path"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "version", ""), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSAPIGatewayV2ApiConfig_corsConfigurationUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), + resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), + resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_credentials", "true"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_headers.#", "0"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_methods.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_methods.163128923", "*"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_origins.#", "2"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_origins.1868318776", "HTTP://WWW.EXAMPLE.ORG"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.allow_origins.3551736600", "https://example.io"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.expose_headers.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.expose_headers.115091893", "X-Api-Id"), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.0.max_age", "500"), + resource.TestCheckResourceAttr(resourceName, "description", ""), + testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeHttp), + resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.method $request.path"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "version", ""), + ), + }, + { + Config: testAccAWSAPIGatewayV2ApiConfig_basicHttp(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), + resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), + resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), + resource.TestCheckResourceAttr(resourceName, "description", ""), + testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeHttp), + resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.method $request.path"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "version", ""), + ), + }, + }, + }) +} + +func TestAccAWSAPIGatewayV2Api_QuickCreate(t *testing.T) { + var v apigatewayv2.GetApiOutput + resourceName := "aws_apigatewayv2_api.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2ApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2ApiConfig_quickCreate(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2ApiExists(resourceName, &v), + testAccCheckAWSAPIGatewayV2ApiQuickCreateIntegration(resourceName, "HTTP_PROXY", "http://www.example.com/"), + testAccCheckAWSAPIGatewayV2ApiQuickCreateRoute(resourceName, "GET /pets"), + testAccCheckAWSAPIGatewayV2ApiQuickCreateStage(resourceName, "$default"), + resource.TestCheckResourceAttrSet(resourceName, "api_endpoint"), + resource.TestCheckResourceAttr(resourceName, "api_key_selection_expression", "$request.header.x-api-key"), + testAccMatchResourceAttrRegionalARNNoAccount(resourceName, "arn", "apigateway", regexp.MustCompile(`/apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "cors_configuration.#", "0"), + resource.TestCheckResourceAttr(resourceName, "description", ""), + testAccMatchResourceAttrRegionalARN(resourceName, "execution_arn", "execute-api", regexp.MustCompile(`.+`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "protocol_type", apigatewayv2.ProtocolTypeHttp), + resource.TestCheckResourceAttr(resourceName, "route_key", "GET /pets"), + resource.TestCheckResourceAttr(resourceName, "route_selection_expression", "$request.method $request.path"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "target", "http://www.example.com/"), + resource.TestCheckResourceAttr(resourceName, "version", ""), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "route_key", + "target", + }, + }, + }, + }) +} + func testAccCheckAWSAPIGatewayV2ApiDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn @@ -415,6 +566,105 @@ func testAccCheckAWSAPIGatewayV2ApiExists(n string, v *apigatewayv2.GetApiOutput } } +func testAccCheckAWSAPIGatewayV2ApiQuickCreateIntegration(n, expectedType, expectedUri string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No API Gateway v2 API ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + resp, err := conn.GetIntegrations(&apigatewayv2.GetIntegrationsInput{ + ApiId: aws.String(rs.Primary.ID), + }) + if err != nil { + return err + } + + if got := len(resp.Items); got != 1 { + return fmt.Errorf("Incorrect number of integrations: %d", got) + } + + if got := aws.StringValue(resp.Items[0].IntegrationType); got != expectedType { + return fmt.Errorf("Incorrect integration type. Expected: %s, got: %s", expectedType, got) + } + if got := aws.StringValue(resp.Items[0].IntegrationUri); got != expectedUri { + return fmt.Errorf("Incorrect integration URI. Expected: %s, got: %s", expectedUri, got) + } + + return nil + } +} + +func testAccCheckAWSAPIGatewayV2ApiQuickCreateRoute(n, expectedRouteKey string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No API Gateway v2 API ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + resp, err := conn.GetRoutes(&apigatewayv2.GetRoutesInput{ + ApiId: aws.String(rs.Primary.ID), + }) + if err != nil { + return err + } + + if got := len(resp.Items); got != 1 { + return fmt.Errorf("Incorrect number of routes: %d", got) + } + + if got := aws.StringValue(resp.Items[0].RouteKey); got != expectedRouteKey { + return fmt.Errorf("Incorrect route key. Expected: %s, got: %s", expectedRouteKey, got) + } + + return nil + } +} + +func testAccCheckAWSAPIGatewayV2ApiQuickCreateStage(n, expectedName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No API Gateway v2 API ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + resp, err := conn.GetStages(&apigatewayv2.GetStagesInput{ + ApiId: aws.String(rs.Primary.ID), + }) + if err != nil { + return err + } + + if got := len(resp.Items); got != 1 { + return fmt.Errorf("Incorrect number of stages: %d", got) + } + + if got := aws.StringValue(resp.Items[0].StageName); got != expectedName { + return fmt.Errorf("Incorrect stage name. Expected: %s, got: %s", expectedName, got) + } + + return nil + } +} + func testAccAWSAPIGatewayV2ApiConfig_basicWebSocket(rName string) string { return fmt.Sprintf(` resource "aws_apigatewayv2_api" "test" { @@ -472,3 +722,46 @@ resource "aws_apigatewayv2_api" "test" { } `, rName) } + +func testAccAWSAPIGatewayV2ApiConfig_corsConfiguration(rName string) string { + return fmt.Sprintf(` +resource "aws_apigatewayv2_api" "test" { + name = %[1]q + protocol_type = "HTTP" + + cors_configuration { + allow_headers = ["Authorization"] + allow_methods = ["GET", "put"] + allow_origins = ["https://www.example.com"] + } +} +`, rName) +} + +func testAccAWSAPIGatewayV2ApiConfig_corsConfigurationUpdated(rName string) string { + return fmt.Sprintf(` +resource "aws_apigatewayv2_api" "test" { + name = %[1]q + protocol_type = "HTTP" + + cors_configuration { + allow_credentials = true + allow_methods = ["*"] + allow_origins = ["HTTP://WWW.EXAMPLE.ORG", "https://example.io"] + expose_headers = ["X-Api-Id"] + max_age = 500 + } +} +`, rName) +} + +func testAccAWSAPIGatewayV2ApiConfig_quickCreate(rName string) string { + return fmt.Sprintf(` +resource "aws_apigatewayv2_api" "test" { + name = %[1]q + protocol_type = "HTTP" + target = "http://www.example.com/" + route_key = "GET /pets" +} +`, rName) +} diff --git a/aws/resource_aws_apigatewayv2_authorizer.go b/aws/resource_aws_apigatewayv2_authorizer.go new file mode 100644 index 00000000000..e761cbf2ca6 --- /dev/null +++ b/aws/resource_aws_apigatewayv2_authorizer.go @@ -0,0 +1,234 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAwsApiGatewayV2Authorizer() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsApiGatewayV2AuthorizerCreate, + Read: resourceAwsApiGatewayV2AuthorizerRead, + Update: resourceAwsApiGatewayV2AuthorizerUpdate, + Delete: resourceAwsApiGatewayV2AuthorizerDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsApiGatewayV2AuthorizerImport, + }, + + Schema: map[string]*schema.Schema{ + "api_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "authorizer_credentials_arn": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + "authorizer_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + apigatewayv2.AuthorizerTypeJwt, + apigatewayv2.AuthorizerTypeRequest, + }, false), + }, + "authorizer_uri": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 2048), + }, + "identity_sources": { + Type: schema.TypeSet, + Required: true, + MinItems: 1, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "jwt_configuration": { + Type: schema.TypeList, + Optional: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "audience": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "issuer": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 128), + }, + }, + } +} + +func resourceAwsApiGatewayV2AuthorizerCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + req := &apigatewayv2.CreateAuthorizerInput{ + ApiId: aws.String(d.Get("api_id").(string)), + AuthorizerType: aws.String(d.Get("authorizer_type").(string)), + IdentitySource: expandStringSet(d.Get("identity_sources").(*schema.Set)), + Name: aws.String(d.Get("name").(string)), + } + if v, ok := d.GetOk("authorizer_credentials_arn"); ok { + req.AuthorizerCredentialsArn = aws.String(v.(string)) + } + if v, ok := d.GetOk("authorizer_uri"); ok { + req.AuthorizerUri = aws.String(v.(string)) + } + if v, ok := d.GetOk("jwt_configuration"); ok { + req.JwtConfiguration = expandApiGateway2JwtConfiguration(v.([]interface{})) + } + + log.Printf("[DEBUG] Creating API Gateway v2 authorizer: %s", req) + resp, err := conn.CreateAuthorizer(req) + if err != nil { + return fmt.Errorf("error creating API Gateway v2 authorizer: %s", err) + } + + d.SetId(aws.StringValue(resp.AuthorizerId)) + + return resourceAwsApiGatewayV2AuthorizerRead(d, meta) +} + +func resourceAwsApiGatewayV2AuthorizerRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + resp, err := conn.GetAuthorizer(&apigatewayv2.GetAuthorizerInput{ + ApiId: aws.String(d.Get("api_id").(string)), + AuthorizerId: aws.String(d.Id()), + }) + if isAWSErr(err, apigatewayv2.ErrCodeNotFoundException, "") { + log.Printf("[WARN] API Gateway v2 authorizer (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { + return fmt.Errorf("error reading API Gateway v2 authorizer: %s", err) + } + + d.Set("authorizer_credentials_arn", resp.AuthorizerCredentialsArn) + d.Set("authorizer_type", resp.AuthorizerType) + d.Set("authorizer_uri", resp.AuthorizerUri) + if err := d.Set("identity_sources", flattenStringSet(resp.IdentitySource)); err != nil { + return fmt.Errorf("error setting identity_sources: %s", err) + } + if err := d.Set("jwt_configuration", flattenApiGateway2JwtConfiguration(resp.JwtConfiguration)); err != nil { + return fmt.Errorf("error setting jwt_configuration: %s", err) + } + d.Set("name", resp.Name) + + return nil +} + +func resourceAwsApiGatewayV2AuthorizerUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + req := &apigatewayv2.UpdateAuthorizerInput{ + ApiId: aws.String(d.Get("api_id").(string)), + AuthorizerId: aws.String(d.Id()), + } + if d.HasChange("authorizer_credentials_arn") { + req.AuthorizerCredentialsArn = aws.String(d.Get("authorizer_credentials_arn").(string)) + } + if d.HasChange("authorizer_type") { + req.AuthorizerType = aws.String(d.Get("authorizer_type").(string)) + } + if d.HasChange("authorizer_uri") { + req.AuthorizerUri = aws.String(d.Get("authorizer_uri").(string)) + } + if d.HasChange("identity_sources") { + req.IdentitySource = expandStringSet(d.Get("identity_sources").(*schema.Set)) + } + if d.HasChange("name") { + req.Name = aws.String(d.Get("name").(string)) + } + if d.HasChange("jwt_configuration") { + req.JwtConfiguration = expandApiGateway2JwtConfiguration(d.Get("jwt_configuration").([]interface{})) + } + + log.Printf("[DEBUG] Updating API Gateway v2 authorizer: %s", req) + _, err := conn.UpdateAuthorizer(req) + if err != nil { + return fmt.Errorf("error updating API Gateway v2 authorizer: %s", err) + } + + return resourceAwsApiGatewayV2AuthorizerRead(d, meta) +} + +func resourceAwsApiGatewayV2AuthorizerDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigatewayv2conn + + log.Printf("[DEBUG] Deleting API Gateway v2 authorizer (%s)", d.Id()) + _, err := conn.DeleteAuthorizer(&apigatewayv2.DeleteAuthorizerInput{ + ApiId: aws.String(d.Get("api_id").(string)), + AuthorizerId: aws.String(d.Id()), + }) + if isAWSErr(err, apigatewayv2.ErrCodeNotFoundException, "") { + return nil + } + if err != nil { + return fmt.Errorf("error deleting API Gateway v2 authorizer: %s", err) + } + + return nil +} + +func resourceAwsApiGatewayV2AuthorizerImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + parts := strings.Split(d.Id(), "/") + if len(parts) != 2 { + return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'api-id/authorizer-id'", d.Id()) + } + + d.SetId(parts[1]) + d.Set("api_id", parts[0]) + + return []*schema.ResourceData{d}, nil +} + +func expandApiGateway2JwtConfiguration(vConfiguration []interface{}) *apigatewayv2.JWTConfiguration { + configuration := &apigatewayv2.JWTConfiguration{} + + if len(vConfiguration) == 0 || vConfiguration[0] == nil { + return configuration + } + mConfiguration := vConfiguration[0].(map[string]interface{}) + + if vAudience, ok := mConfiguration["audience"].(*schema.Set); ok && vAudience.Len() > 0 { + configuration.Audience = expandStringSet(vAudience) + } + if vIssuer, ok := mConfiguration["issuer"].(string); ok && vIssuer != "" { + configuration.Issuer = aws.String(vIssuer) + } + + return configuration +} + +func flattenApiGateway2JwtConfiguration(configuration *apigatewayv2.JWTConfiguration) []interface{} { + if configuration == nil { + return []interface{}{} + } + + return []interface{}{map[string]interface{}{ + "audience": flattenStringSet(configuration.Audience), + "issuer": aws.StringValue(configuration.Issuer), + }} +} diff --git a/aws/resource_aws_apigatewayv2_authorizer_test.go b/aws/resource_aws_apigatewayv2_authorizer_test.go new file mode 100644 index 00000000000..6135f2e4a37 --- /dev/null +++ b/aws/resource_aws_apigatewayv2_authorizer_test.go @@ -0,0 +1,385 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigatewayv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAWSAPIGatewayV2Authorizer_basic(t *testing.T) { + var apiId string + var v apigatewayv2.GetAuthorizerOutput + resourceName := "aws_apigatewayv2_authorizer.test" + lambdaResourceName := "aws_lambda_function.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2AuthorizerDestroy, + DisableBinaryDriver: true, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + resource.TestCheckResourceAttr(resourceName, "authorizer_credentials_arn", ""), + resource.TestCheckResourceAttr(resourceName, "authorizer_type", "REQUEST"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.645907014", "route.request.header.Auth"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSAPIGatewayV2AuthorizerImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAPIGatewayV2Authorizer_disappears(t *testing.T) { + var apiId string + var v apigatewayv2.GetAuthorizerOutput + resourceName := "aws_apigatewayv2_authorizer.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2AuthorizerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + testAccCheckAWSAPIGatewayV2AuthorizerDisappears(&apiId, &v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSAPIGatewayV2Authorizer_Credentials(t *testing.T) { + var apiId string + var v apigatewayv2.GetAuthorizerOutput + resourceName := "aws_apigatewayv2_authorizer.test" + iamRoleResourceName := "aws_iam_role.test" + lambdaResourceName := "aws_lambda_function.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2AuthorizerDestroy, + DisableBinaryDriver: true, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_credentials(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_credentials_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "authorizer_type", "REQUEST"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.645907014", "route.request.header.Auth"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSAPIGatewayV2AuthorizerImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_credentialsUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_credentials_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "authorizer_type", "REQUEST"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.#", "2"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.645907014", "route.request.header.Auth"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.4138478046", "route.request.querystring.Name"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("%s-updated", rName)), + ), + }, + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + resource.TestCheckResourceAttr(resourceName, "authorizer_credentials_arn", ""), + resource.TestCheckResourceAttr(resourceName, "authorizer_type", "REQUEST"), + resource.TestCheckResourceAttrPair(resourceName, "authorizer_uri", lambdaResourceName, "invoke_arn"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.645907014", "route.request.header.Auth"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + }, + }) +} + +func TestAccAWSAPIGatewayV2Authorizer_JWT(t *testing.T) { + var apiId string + var v apigatewayv2.GetAuthorizerOutput + resourceName := "aws_apigatewayv2_authorizer.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayV2AuthorizerDestroy, + DisableBinaryDriver: true, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_jwt(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + resource.TestCheckResourceAttr(resourceName, "authorizer_credentials_arn", ""), + resource.TestCheckResourceAttr(resourceName, "authorizer_type", "JWT"), + resource.TestCheckResourceAttr(resourceName, "authorizer_uri", ""), + resource.TestCheckResourceAttr(resourceName, "identity_sources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.2786136151", "$request.header.Authorization"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.0.audience.#", "1"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.0.audience.1785148924", "test"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSAPIGatewayV2AuthorizerImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSAPIGatewayV2AuthorizerConfig_jwtUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayV2AuthorizerExists(resourceName, &apiId, &v), + resource.TestCheckResourceAttr(resourceName, "authorizer_credentials_arn", ""), + resource.TestCheckResourceAttr(resourceName, "authorizer_type", "JWT"), + resource.TestCheckResourceAttr(resourceName, "authorizer_uri", ""), + resource.TestCheckResourceAttr(resourceName, "identity_sources.#", "1"), + resource.TestCheckResourceAttr(resourceName, "identity_sources.2786136151", "$request.header.Authorization"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.0.audience.#", "2"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.0.audience.1785148924", "test"), + resource.TestCheckResourceAttr(resourceName, "jwt_configuration.0.audience.2323796166", "testing"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + }, + }) +} + +func testAccCheckAWSAPIGatewayV2AuthorizerDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_apigatewayv2_authorizer" { + continue + } + + _, err := conn.GetAuthorizer(&apigatewayv2.GetAuthorizerInput{ + ApiId: aws.String(rs.Primary.Attributes["api_id"]), + AuthorizerId: aws.String(rs.Primary.ID), + }) + if isAWSErr(err, apigatewayv2.ErrCodeNotFoundException, "") { + continue + } + if err != nil { + return err + } + + return fmt.Errorf("API Gateway v2 authorizer %s still exists", rs.Primary.ID) + } + + return nil +} + +func testAccCheckAWSAPIGatewayV2AuthorizerDisappears(apiId *string, v *apigatewayv2.GetAuthorizerOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + _, err := conn.DeleteAuthorizer(&apigatewayv2.DeleteAuthorizerInput{ + ApiId: apiId, + AuthorizerId: v.AuthorizerId, + }) + + return err + } +} + +func testAccCheckAWSAPIGatewayV2AuthorizerExists(n string, vApiId *string, v *apigatewayv2.GetAuthorizerOutput) 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 API Gateway v2 authorizer ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).apigatewayv2conn + + apiId := aws.String(rs.Primary.Attributes["api_id"]) + resp, err := conn.GetAuthorizer(&apigatewayv2.GetAuthorizerInput{ + ApiId: apiId, + AuthorizerId: aws.String(rs.Primary.ID), + }) + if err != nil { + return err + } + + *vApiId = *apiId + *v = *resp + + return nil + } +} + +func testAccAWSAPIGatewayV2AuthorizerImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not Found: %s", resourceName) + } + + return fmt.Sprintf("%s/%s", rs.Primary.Attributes["api_id"], rs.Primary.ID), nil + } +} + +func testAccAWSAPIGatewayV2AuthorizerConfig_baseWebSocket(rName string) string { + return baseAccAWSLambdaConfig(rName, rName, rName) + fmt.Sprintf(` +resource "aws_lambda_function" "test" { + filename = "test-fixtures/lambdatest.zip" + function_name = %[1]q + role = "${aws_iam_role.iam_for_lambda.arn}" + handler = "index.handler" + runtime = "nodejs10.x" +} + +resource "aws_apigatewayv2_api" "test" { + name = %[1]q + protocol_type = "WEBSOCKET" + route_selection_expression = "$request.body.action" +} + +resource "aws_iam_role" "test" { + name = "%[1]s_auth_invocation_role" + path = "/" + + assume_role_policy = < 0 && vHealthCheck[0] != nil { - mHealthCheck := vHealthCheck[0].(map[string]interface{}) - if v, ok := mHealthCheck["healthy_threshold"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - if v, ok := mHealthCheck["interval_millis"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - if v, ok := mHealthCheck["path"].(string); ok { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - // Don't include "port" in the hash as it's Optional/Computed. - // If present it must match the "port_mapping.port" value, so changes will be detected. - if v, ok := mHealthCheck["protocol"].(string); ok { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - if v, ok := mHealthCheck["timeout_millis"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - if v, ok := mHealthCheck["unhealthy_threshold"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - } - if vPortMapping, ok := mListener["port_mapping"].([]interface{}); ok && len(vPortMapping) > 0 && vPortMapping[0] != nil { - mPortMapping := vPortMapping[0].(map[string]interface{}) - if v, ok := mPortMapping["port"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - if v, ok := mPortMapping["protocol"].(string); ok { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - return hashcode.String(buf.String()) -} diff --git a/aws/resource_aws_appmesh_virtual_node_test.go b/aws/resource_aws_appmesh_virtual_node_test.go index f6ea0eac6f5..12e5020a2a7 100644 --- a/aws/resource_aws_appmesh_virtual_node_test.go +++ b/aws/resource_aws_appmesh_virtual_node_test.go @@ -176,9 +176,10 @@ func testAccAwsAppmeshVirtualNode_listenerHealthChecks(t *testing.T) { vnName := acctest.RandomWithPrefix("tf-acc-test") resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAppmeshVirtualNodeDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAppmeshVirtualNodeDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAppmeshVirtualNodeConfig_listenerHealthChecks(meshName, vnName), @@ -191,17 +192,17 @@ func testAccAwsAppmeshVirtualNode_listenerHealthChecks(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "spec.0.backend.2622272660.virtual_service.#", "1"), resource.TestCheckResourceAttr(resourceName, "spec.0.backend.2622272660.virtual_service.0.virtual_service_name", "servicea.simpleapp.local"), resource.TestCheckResourceAttr(resourceName, "spec.0.listener.#", "1"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.#", "1"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.healthy_threshold", "3"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.interval_millis", "5000"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.path", "/ping"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.port", "8080"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.protocol", "http"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.timeout_millis", "2000"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.health_check.0.unhealthy_threshold", "5"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.port_mapping.#", "1"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.port_mapping.0.port", "8080"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.433446196.port_mapping.0.protocol", "http"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.#", "1"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.healthy_threshold", "3"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.interval_millis", "5000"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.path", "/ping"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.port", "8080"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.protocol", "http"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.timeout_millis", "2000"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.unhealthy_threshold", "5"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.port_mapping.#", "1"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.port_mapping.0.port", "8080"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.port_mapping.0.protocol", "http"), resource.TestCheckResourceAttr(resourceName, "spec.0.logging.#", "0"), resource.TestCheckResourceAttr(resourceName, "spec.0.service_discovery.#", "1"), resource.TestCheckResourceAttr(resourceName, "spec.0.service_discovery.0.dns.#", "1"), @@ -224,16 +225,16 @@ func testAccAwsAppmeshVirtualNode_listenerHealthChecks(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "spec.0.backend.2025248115.virtual_service.#", "1"), resource.TestCheckResourceAttr(resourceName, "spec.0.backend.2025248115.virtual_service.0.virtual_service_name", "serviced.simpleapp.local"), resource.TestCheckResourceAttr(resourceName, "spec.0.listener.#", "1"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.#", "1"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.0.healthy_threshold", "4"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.0.interval_millis", "7000"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.0.port", "8081"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.0.protocol", "tcp"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.0.timeout_millis", "3000"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.health_check.0.unhealthy_threshold", "9"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.port_mapping.#", "1"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.port_mapping.0.port", "8081"), - resource.TestCheckResourceAttr(resourceName, "spec.0.listener.3446683576.port_mapping.0.protocol", "http"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.#", "1"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.healthy_threshold", "4"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.interval_millis", "7000"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.port", "8081"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.protocol", "tcp"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.timeout_millis", "3000"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.health_check.0.unhealthy_threshold", "9"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.port_mapping.#", "1"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.port_mapping.0.port", "8081"), + resource.TestCheckResourceAttr(resourceName, "spec.0.listener.0.port_mapping.0.protocol", "http"), resource.TestCheckResourceAttr(resourceName, "spec.0.logging.#", "0"), resource.TestCheckResourceAttr(resourceName, "spec.0.service_discovery.#", "1"), resource.TestCheckResourceAttr(resourceName, "spec.0.service_discovery.0.dns.#", "1"), diff --git a/aws/resource_aws_appmesh_virtual_router.go b/aws/resource_aws_appmesh_virtual_router.go index 9081e50667b..3d3f9b90e78 100644 --- a/aws/resource_aws_appmesh_virtual_router.go +++ b/aws/resource_aws_appmesh_virtual_router.go @@ -1,7 +1,6 @@ package aws import ( - "bytes" "fmt" "log" "strings" @@ -9,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" @@ -59,7 +57,7 @@ func resourceAwsAppmeshVirtualRouter() *schema.Resource { }, "listener": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MinItems: 1, MaxItems: 1, @@ -91,7 +89,6 @@ func resourceAwsAppmeshVirtualRouter() *schema.Resource { }, }, }, - Set: appmeshVirtualRouterListenerHash, }, }, }, @@ -140,6 +137,7 @@ func resourceAwsAppmeshVirtualRouterCreate(d *schema.ResourceData, meta interfac func resourceAwsAppmeshVirtualRouterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appmeshconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeVirtualRouter(&appmesh.DescribeVirtualRouterInput{ MeshName: aws.String(d.Get("mesh_name").(string)), @@ -176,7 +174,7 @@ func resourceAwsAppmeshVirtualRouterRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error listing tags for App Mesh virtual router (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -257,18 +255,3 @@ func resourceAwsAppmeshVirtualRouterImport(d *schema.ResourceData, meta interfac return []*schema.ResourceData{d}, nil } - -func appmeshVirtualRouterListenerHash(vListener interface{}) int { - var buf bytes.Buffer - mListener := vListener.(map[string]interface{}) - if vPortMapping, ok := mListener["port_mapping"].([]interface{}); ok && len(vPortMapping) > 0 && vPortMapping[0] != nil { - mPortMapping := vPortMapping[0].(map[string]interface{}) - if v, ok := mPortMapping["port"].(int); ok { - buf.WriteString(fmt.Sprintf("%d-", v)) - } - if v, ok := mPortMapping["protocol"].(string); ok { - buf.WriteString(fmt.Sprintf("%s-", v)) - } - } - return hashcode.String(buf.String()) -} diff --git a/aws/resource_aws_appmesh_virtual_router_test.go b/aws/resource_aws_appmesh_virtual_router_test.go index 46d1d2d922c..346968426c2 100644 --- a/aws/resource_aws_appmesh_virtual_router_test.go +++ b/aws/resource_aws_appmesh_virtual_router_test.go @@ -106,11 +106,11 @@ func testAccAwsAppmeshVirtualRouter_basic(t *testing.T) { resource.TestCheckResourceAttr( resourceName, "spec.0.listener.#", "1"), resource.TestCheckResourceAttr( - resourceName, "spec.0.listener.2279702354.port_mapping.#", "1"), + resourceName, "spec.0.listener.0.port_mapping.#", "1"), resource.TestCheckResourceAttr( - resourceName, "spec.0.listener.2279702354.port_mapping.0.port", "8080"), + resourceName, "spec.0.listener.0.port_mapping.0.port", "8080"), resource.TestCheckResourceAttr( - resourceName, "spec.0.listener.2279702354.port_mapping.0.protocol", "http"), + resourceName, "spec.0.listener.0.port_mapping.0.protocol", "http"), resource.TestCheckResourceAttrSet( resourceName, "created_date"), resource.TestCheckResourceAttrSet( @@ -133,11 +133,11 @@ func testAccAwsAppmeshVirtualRouter_basic(t *testing.T) { resource.TestCheckResourceAttr( resourceName, "spec.0.listener.#", "1"), resource.TestCheckResourceAttr( - resourceName, "spec.0.listener.563508454.port_mapping.#", "1"), + resourceName, "spec.0.listener.0.port_mapping.#", "1"), resource.TestCheckResourceAttr( - resourceName, "spec.0.listener.563508454.port_mapping.0.port", "8081"), + resourceName, "spec.0.listener.0.port_mapping.0.port", "8081"), resource.TestCheckResourceAttr( - resourceName, "spec.0.listener.563508454.port_mapping.0.protocol", "http"), + resourceName, "spec.0.listener.0.port_mapping.0.protocol", "http"), ), }, { diff --git a/aws/resource_aws_appmesh_virtual_service.go b/aws/resource_aws_appmesh_virtual_service.go index 367e5dcb88d..1332f725d30 100644 --- a/aws/resource_aws_appmesh_virtual_service.go +++ b/aws/resource_aws_appmesh_virtual_service.go @@ -135,6 +135,7 @@ func resourceAwsAppmeshVirtualServiceCreate(d *schema.ResourceData, meta interfa func resourceAwsAppmeshVirtualServiceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appmeshconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeVirtualService(&appmesh.DescribeVirtualServiceInput{ MeshName: aws.String(d.Get("mesh_name").(string)), @@ -171,7 +172,7 @@ func resourceAwsAppmeshVirtualServiceRead(d *schema.ResourceData, meta interface return fmt.Errorf("error listing tags for App Mesh virtual service (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_appsync_graphql_api.go b/aws/resource_aws_appsync_graphql_api.go index 3a765373b6f..e91676547a7 100644 --- a/aws/resource_aws_appsync_graphql_api.go +++ b/aws/resource_aws_appsync_graphql_api.go @@ -131,6 +131,11 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { appsync.FieldLogLevelNone, }, false), }, + "exclude_verbose_content": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, }, }, }, @@ -255,6 +260,7 @@ func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{} func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &appsync.GetGraphqlApiInput{ ApiId: aws.String(d.Id()), @@ -296,7 +302,7 @@ func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error setting uris: %s", err) } - if err := d.Set("tags", keyvaluetags.AppsyncKeyValueTags(resp.GraphqlApi.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.AppsyncKeyValueTags(resp.GraphqlApi.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -387,6 +393,7 @@ func expandAppsyncGraphqlApiLogConfig(l []interface{}) *appsync.LogConfig { logConfig := &appsync.LogConfig{ CloudWatchLogsRoleArn: aws.String(m["cloudwatch_logs_role_arn"].(string)), FieldLogLevel: aws.String(m["field_log_level"].(string)), + ExcludeVerboseContent: aws.Bool(m["exclude_verbose_content"].(bool)), } return logConfig @@ -503,6 +510,7 @@ func flattenAppsyncGraphqlApiLogConfig(logConfig *appsync.LogConfig) []interface m := map[string]interface{}{ "cloudwatch_logs_role_arn": aws.StringValue(logConfig.CloudWatchLogsRoleArn), "field_log_level": aws.StringValue(logConfig.FieldLogLevel), + "exclude_verbose_content": aws.BoolValue(logConfig.ExcludeVerboseContent), } return []interface{}{m} diff --git a/aws/resource_aws_appsync_graphql_api_test.go b/aws/resource_aws_appsync_graphql_api_test.go index 32ea7e36301..3c693fa804b 100644 --- a/aws/resource_aws_appsync_graphql_api_test.go +++ b/aws/resource_aws_appsync_graphql_api_test.go @@ -332,6 +332,7 @@ func TestAccAWSAppsyncGraphqlApi_LogConfig(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ALL"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.exclude_verbose_content", "false"), ), }, { @@ -361,6 +362,7 @@ func TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ALL"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.exclude_verbose_content", "false"), ), }, { @@ -370,6 +372,7 @@ func TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ERROR"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.exclude_verbose_content", "false"), ), }, { @@ -379,6 +382,7 @@ func TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "NONE"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.exclude_verbose_content", "false"), ), }, { @@ -390,6 +394,47 @@ func TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel(t *testing.T) { }) } +func TestAccAWSAppsyncGraphqlApi_LogConfig_ExcludeVerboseContent(t *testing.T) { + var api1, api2 appsync.GraphqlApi + rName := acctest.RandomWithPrefix("tf-acc-test") + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSAppSync(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_LogConfig_ExcludeVerboseContent(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName, &api1), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ALL"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.exclude_verbose_content", "false"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_LogConfig_ExcludeVerboseContent(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName, &api2), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ALL"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.exclude_verbose_content", "true"), + ), + }, + + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_AuthTTL(t *testing.T) { var api1, api2 appsync.GraphqlApi rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1047,6 +1092,47 @@ resource "aws_appsync_graphql_api" "test" { `, rName, rName, fieldLogLevel) } +func testAccAppsyncGraphqlApiConfig_LogConfig_ExcludeVerboseContent(rName string, excludeVerboseContent bool) string { + return fmt.Sprintf(` +data "aws_partition" "current" {} + +resource "aws_iam_role" "test" { + name = %q + + assume_role_policy = < 0 { + rule.CopyActions = vCopyActions + } + rules = append(rules, rule) } return rules } +func expandBackupPlanCopyActions(actionList []interface{}) []*backup.CopyAction { + actions := []*backup.CopyAction{} + + for _, i := range actionList { + item := i.(map[string]interface{}) + action := &backup.CopyAction{} + + action.DestinationBackupVaultArn = aws.String(item["destination_vault_arn"].(string)) + action.Lifecycle = expandBackupPlanLifecycle(item["lifecycle"].([]interface{})) + + actions = append(actions, action) + } + + return actions +} + +func expandBackupPlanLifecycle(l []interface{}) *backup.Lifecycle { + lifecycle := new(backup.Lifecycle) + + for _, i := range l { + lc := i.(map[string]interface{}) + if vDeleteAfter, ok := lc["delete_after"]; ok && vDeleteAfter.(int) > 0 { + lifecycle.DeleteAfterDays = aws.Int64(int64(vDeleteAfter.(int))) + } + if vMoveToColdStorageAfterDays, ok := lc["cold_storage_after"]; ok && vMoveToColdStorageAfterDays.(int) > 0 { + lifecycle.MoveToColdStorageAfterDays = aws.Int64(int64(vMoveToColdStorageAfterDays.(int))) + } + } + + return lifecycle +} + func flattenBackupPlanRules(rules []*backup.Rule) *schema.Set { vRules := []interface{}{} @@ -263,12 +333,50 @@ func flattenBackupPlanRules(rules []*backup.Rule) *schema.Set { } } + mRule["copy_action"] = flattenBackupPlanCopyActions(rule.CopyActions) + vRules = append(vRules, mRule) } return schema.NewSet(backupBackupPlanHash, vRules) } +func flattenBackupPlanCopyActions(copyActions []*backup.CopyAction) []interface{} { + if len(copyActions) == 0 { + return nil + } + + var tfList []interface{} + + for _, copyAction := range copyActions { + if copyAction == nil { + continue + } + + tfMap := map[string]interface{}{ + "destination_vault_arn": aws.StringValue(copyAction.DestinationBackupVaultArn), + "lifecycle": flattenBackupPlanCopyActionLifecycle(copyAction.Lifecycle), + } + + tfList = append(tfList, tfMap) + } + + return tfList +} + +func flattenBackupPlanCopyActionLifecycle(copyActionLifecycle *backup.Lifecycle) []interface{} { + if copyActionLifecycle == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "delete_after": aws.Int64Value(copyActionLifecycle.DeleteAfterDays), + "cold_storage_after": aws.Int64Value(copyActionLifecycle.MoveToColdStorageAfterDays), + } + + return []interface{}{m} +} + func backupBackupPlanHash(vRule interface{}) int { var buf bytes.Buffer @@ -305,5 +413,26 @@ func backupBackupPlanHash(vRule interface{}) int { } } + if vCopyActions, ok := mRule["copy_action"].(*schema.Set); ok && vCopyActions.Len() > 0 { + for _, a := range vCopyActions.List() { + action := a.(map[string]interface{}) + if mLifecycle, ok := action["lifecycle"].([]interface{}); ok { + for _, l := range mLifecycle { + lifecycle := l.(map[string]interface{}) + if v, ok := lifecycle["delete_after"].(int); ok { + buf.WriteString(fmt.Sprintf("%d-", v)) + } + if v, ok := lifecycle["cold_storage_after"].(int); ok { + buf.WriteString(fmt.Sprintf("%d-", v)) + } + } + } + + if v, ok := action["destination_vault_arn"].(string); ok { + buf.WriteString(fmt.Sprintf("%s-", v)) + } + } + } + return hashcode.String(buf.String()) } diff --git a/aws/resource_aws_backup_plan_test.go b/aws/resource_aws_backup_plan_test.go index 7ce2dab20c5..028771c64a5 100644 --- a/aws/resource_aws_backup_plan_test.go +++ b/aws/resource_aws_backup_plan_test.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/backup" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) @@ -39,6 +40,11 @@ func TestAccAwsBackupPlan_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "version"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -66,6 +72,11 @@ func TestAccAwsBackupPlan_withTags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.Key2", "Value2a"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccAwsBackupPlanConfig_tagsUpdated(rName), Check: resource.ComposeTestCheckFunc( @@ -124,6 +135,11 @@ func TestAccAwsBackupPlan_withRules(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccAwsBackupPlanConfig_threeRules(rName), Check: resource.ComposeTestCheckFunc( @@ -190,6 +206,11 @@ func TestAccAwsBackupPlan_withLifecycle(t *testing.T) { testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "recovery_point_tags.%", "0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccAwsBackupPlanConfig_lifecycleDeleteAfterOnly(rName), Check: resource.ComposeTestCheckFunc( @@ -259,6 +280,11 @@ func TestAccAwsBackupPlan_withRecoveryPointTags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccAwsBackupPlanConfig_recoveryPointTagsUpdated(rName), Check: resource.ComposeTestCheckFunc( @@ -294,6 +320,136 @@ func TestAccAwsBackupPlan_withRecoveryPointTags(t *testing.T) { }) } +func TestAccAwsBackupPlan_Rule_CopyAction_SameRegion(t *testing.T) { + var plan backup.GetBackupPlanOutput + ruleNameMap := map[string]string{} + resourceName := "aws_backup_plan.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBackup(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsBackupPlanDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsBackupPlanConfigRuleCopyAction(rName, 30, 180), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsBackupPlanExists(resourceName, &plan, &ruleNameMap), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "rule_name", rName), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.cold_storage_after", "30"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.delete_after", "180"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "copy_action.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAwsBackupPlanConfigRuleCopyAction(rName, 60, 365), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsBackupPlanExists(resourceName, &plan, &ruleNameMap), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "rule_name", rName), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.cold_storage_after", "30"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.delete_after", "180"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "copy_action.#", "1"), + ), + }, + { + Config: testAccAwsBackupPlanConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsBackupPlanExists(resourceName, &plan, &ruleNameMap), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "rule_name", rName), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.#", "0"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "copy_action.#", "0"), + ), + }, + }, + }) +} + +func TestAccAwsBackupPlan_Rule_CopyAction_Multiple(t *testing.T) { + var plan backup.GetBackupPlanOutput + ruleNameMap := map[string]string{} + resourceName := "aws_backup_plan.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBackup(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsBackupPlanDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsBackupPlanConfigRuleCopyActionMultiple(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsBackupPlanExists(resourceName, &plan, &ruleNameMap), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "rule_name", rName), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.cold_storage_after", "30"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.delete_after", "180"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "copy_action.#", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion(t *testing.T) { + var providers []*schema.Provider + var plan backup.GetBackupPlanOutput + ruleNameMap := map[string]string{} + resourceName := "aws_backup_plan.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSBackup(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAwsBackupPlanDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsBackupPlanConfigRuleCopyActionCrossRegion(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsBackupPlanExists(resourceName, &plan, &ruleNameMap), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "rule_name", rName), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.#", "1"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.cold_storage_after", "30"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "lifecycle.0.delete_after", "180"), + testAccCheckAwsBackupPlanRuleAttr(resourceName, &ruleNameMap, rName, "copy_action.#", "1"), + ), + }, + { + Config: testAccAwsBackupPlanConfigRuleCopyActionCrossRegion(rName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAwsBackupPlan_disappears(t *testing.T) { var plan backup.GetBackupPlanOutput ruleNameMap := map[string]string{} @@ -309,7 +465,7 @@ func TestAccAwsBackupPlan_disappears(t *testing.T) { Config: testAccAwsBackupPlanConfig_basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsBackupPlanExists(resourceName, &plan, &ruleNameMap), - testAccCheckAwsBackupPlanDisappears(&plan), + testAccCheckResourceDisappears(testAccProvider, resourceAwsBackupPlan(), resourceName), ), ExpectNonEmptyPlan: true, }, @@ -340,20 +496,6 @@ func testAccCheckAwsBackupPlanDestroy(s *terraform.State) error { return nil } -func testAccCheckAwsBackupPlanDisappears(backupPlan *backup.GetBackupPlanOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := testAccProvider.Meta().(*AWSClient).backupconn - - input := &backup.DeleteBackupPlanInput{ - BackupPlanId: backupPlan.BackupPlanId, - } - - _, err := conn.DeleteBackupPlan(input) - - return err - } -} - func testAccCheckAwsBackupPlanExists(name string, plan *backup.GetBackupPlanOutput, ruleNameMap *map[string]string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).backupconn @@ -625,3 +767,125 @@ resource "aws_backup_plan" "test" { } `, rName) } + +func testAccAwsBackupPlanConfigRuleCopyAction(rName string, coldStorageAfter int, deleteAfter int) string { + return fmt.Sprintf(` +resource "aws_backup_vault" "test" { + name = "%[1]s-1" +} + +resource "aws_backup_vault" "test2" { + name = "%[1]s-2" +} + +resource "aws_backup_plan" "test" { + name = %[1]q + + rule { + rule_name = %[1]q + target_vault_name = aws_backup_vault.test.name + schedule = "cron(0 12 * * ? *)" + + lifecycle { + cold_storage_after = 30 + delete_after = 180 + } + + copy_action { + lifecycle { + cold_storage_after = %[2]d + delete_after = %[3]d + } + + destination_vault_arn = aws_backup_vault.test2.arn + } + } +} +`, rName, coldStorageAfter, deleteAfter) +} + +func testAccAwsBackupPlanConfigRuleCopyActionMultiple(rName string) string { + return fmt.Sprintf(` +resource "aws_backup_vault" "test" { + name = "%[1]s-1" +} + +resource "aws_backup_vault" "test2" { + name = "%[1]s-2" +} + +resource "aws_backup_vault" "test3" { + name = "%[1]s-3" +} + +resource "aws_backup_plan" "test" { + name = %[1]q + + rule { + rule_name = %[1]q + target_vault_name = aws_backup_vault.test.name + schedule = "cron(0 12 * * ? *)" + + lifecycle { + cold_storage_after = 30 + delete_after = 180 + } + + copy_action { + lifecycle { + cold_storage_after = 30 + delete_after = 180 + } + + destination_vault_arn = aws_backup_vault.test2.arn + } + + copy_action { + lifecycle { + cold_storage_after = 60 + delete_after = 365 + } + + destination_vault_arn = aws_backup_vault.test3.arn + } + } +} +`, rName) +} + +func testAccAwsBackupPlanConfigRuleCopyActionCrossRegion(rName string) string { + return testAccAlternateRegionProviderConfig() + fmt.Sprintf(` +resource "aws_backup_vault" "test" { + name = "%[1]s-1" +} + +resource "aws_backup_vault" "test2" { + provider = "aws.alternate" + name = "%[1]s-2" +} + +resource "aws_backup_plan" "test" { + name = %[1]q + + rule { + rule_name = %[1]q + target_vault_name = "${aws_backup_vault.test.name}" + schedule = "cron(0 12 * * ? *)" + + lifecycle { + cold_storage_after = 30 + delete_after = 180 + } + + copy_action { + lifecycle { + cold_storage_after = 30 + delete_after = 180 + } + + destination_vault_arn = "${aws_backup_vault.test2.arn}" + } + } +} +`, rName) +} diff --git a/aws/resource_aws_backup_selection.go b/aws/resource_aws_backup_selection.go index 255e019602d..db0fadcc4cb 100644 --- a/aws/resource_aws_backup_selection.go +++ b/aws/resource_aws_backup_selection.go @@ -105,6 +105,14 @@ func resourceAwsBackupSelectionCreate(d *schema.ResourceData, meta interface{}) // Retry on the following error: // InvalidParameterValueException: IAM Role arn:aws:iam::123456789012:role/XXX cannot be assumed by AWS Backup if isAWSErr(err, backup.ErrCodeInvalidParameterValueException, "cannot be assumed") { + log.Printf("[DEBUG] Received %s, retrying create backup selection.", err) + return resource.RetryableError(err) + } + + // Retry on the following error: + // InvalidParameterValueException: IAM Role arn:aws:iam::123456789012:role/XXX is not authorized to call tag:GetResources + if isAWSErr(err, backup.ErrCodeInvalidParameterValueException, "is not authorized to call") { + log.Printf("[DEBUG] Received %s, retrying create backup selection.", err) return resource.RetryableError(err) } diff --git a/aws/resource_aws_backup_selection_test.go b/aws/resource_aws_backup_selection_test.go index 59c8bb24392..647c83f05fa 100644 --- a/aws/resource_aws_backup_selection_test.go +++ b/aws/resource_aws_backup_selection_test.go @@ -39,6 +39,8 @@ func TestAccAwsBackupSelection_basic(t *testing.T) { func TestAccAwsBackupSelection_disappears(t *testing.T) { var selection1 backup.GetBackupSelectionOutput rInt := acctest.RandInt() + resourceName := "aws_backup_selection.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBackup(t) }, Providers: testAccProviders, @@ -47,8 +49,8 @@ func TestAccAwsBackupSelection_disappears(t *testing.T) { { Config: testAccBackupSelectionConfigBasic(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsBackupSelectionExists("aws_backup_selection.test", &selection1), - testAccCheckAwsBackupSelectionDisappears(&selection1), + testAccCheckAwsBackupSelectionExists(resourceName, &selection1), + testAccCheckResourceDisappears(testAccProvider, resourceAwsBackupSelection(), resourceName), ), ExpectNonEmptyPlan: true, }, @@ -190,21 +192,6 @@ func testAccCheckAwsBackupSelectionExists(name string, selection *backup.GetBack } } -func testAccCheckAwsBackupSelectionDisappears(selection *backup.GetBackupSelectionOutput) resource.TestCheckFunc { - return func(s *terraform.State) error { - conn := testAccProvider.Meta().(*AWSClient).backupconn - - input := &backup.DeleteBackupSelectionInput{ - BackupPlanId: selection.BackupPlanId, - SelectionId: selection.SelectionId, - } - - _, err := conn.DeleteBackupSelection(input) - - return err - } -} - func testAccCheckAwsBackupSelectionRecreated(t *testing.T, before, after *backup.GetBackupSelectionOutput) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -306,6 +293,11 @@ func testAccBackupSelectionConfigWithResources(rInt int) string { return testAccBackupSelectionConfigBase(rInt) + fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_ebs_volume" "test" { diff --git a/aws/resource_aws_backup_vault.go b/aws/resource_aws_backup_vault.go index 75b2c3d9b25..2dd312d8e72 100644 --- a/aws/resource_aws_backup_vault.go +++ b/aws/resource_aws_backup_vault.go @@ -73,6 +73,7 @@ func resourceAwsBackupVaultCreate(d *schema.ResourceData, meta interface{}) erro func resourceAwsBackupVaultRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).backupconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &backup.DescribeBackupVaultInput{ BackupVaultName: aws.String(d.Id()), @@ -84,6 +85,12 @@ func resourceAwsBackupVaultRead(d *schema.ResourceData, meta interface{}) error d.SetId("") return nil } + if isAWSErr(err, "AccessDeniedException", "") { + log.Printf("[WARN] Backup Vault %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { return fmt.Errorf("error reading Backup Vault (%s): %s", d.Id(), err) } @@ -96,7 +103,7 @@ func resourceAwsBackupVaultRead(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("error listing tags for Backup Vault (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_backup_vault_test.go b/aws/resource_aws_backup_vault_test.go index a2136d6fabd..5ce6282c93f 100644 --- a/aws/resource_aws_backup_vault_test.go +++ b/aws/resource_aws_backup_vault_test.go @@ -110,6 +110,28 @@ func TestAccAwsBackupVault_withTags(t *testing.T) { }) } +func TestAccAwsBackupVault_disappears(t *testing.T) { + var vault backup.DescribeBackupVaultOutput + + rInt := acctest.RandInt() + resourceName := "aws_backup_vault.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBackup(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsBackupVaultDestroy, + Steps: []resource.TestStep{ + { + Config: testAccBackupVaultConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsBackupVaultExists(resourceName, &vault), + testAccCheckResourceDisappears(testAccProvider, resourceAwsBackupVault(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckAwsBackupVaultDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).backupconn for _, rs := range s.RootModule().Resources { diff --git a/aws/resource_aws_batch_job_definition_test.go b/aws/resource_aws_batch_job_definition_test.go index c63f1ee04e5..cf1c29f69d3 100644 --- a/aws/resource_aws_batch_job_definition_test.go +++ b/aws/resource_aws_batch_job_definition_test.go @@ -2,16 +2,72 @@ package aws import ( "fmt" + "log" "reflect" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_batch_job_definition", &resource.Sweeper{ + Name: "aws_batch_job_definition", + F: testSweepBatchJobDefinitions, + Dependencies: []string{ + "aws_batch_job_queue", + }, + }) +} + +func testSweepBatchJobDefinitions(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).batchconn + input := &batch.DescribeJobDefinitionsInput{ + Status: aws.String("ACTIVE"), + } + var sweeperErrs *multierror.Error + + err = conn.DescribeJobDefinitionsPages(input, func(page *batch.DescribeJobDefinitionsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, jobDefinition := range page.JobDefinitions { + arn := aws.StringValue(jobDefinition.JobDefinitionArn) + + log.Printf("[INFO] Deleting Batch Job Definition: %s", arn) + _, err := conn.DeregisterJobDefinition(&batch.DeregisterJobDefinitionInput{ + JobDefinition: aws.String(arn), + }) + if err != nil { + sweeperErr := fmt.Errorf("error deleting Batch Job Definition (%s): %w", arn, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Batch Job Definitions sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Batch Job Definitions: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSBatchJobDefinition_basic(t *testing.T) { var jd batch.JobDefinition rName := acctest.RandomWithPrefix("tf-acc-test") diff --git a/aws/resource_aws_batch_job_queue.go b/aws/resource_aws_batch_job_queue.go index f9f2fb6bb50..a6935d7670b 100644 --- a/aws/resource_aws_batch_job_queue.go +++ b/aws/resource_aws_batch_job_queue.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "sort" "time" "github.com/aws/aws-sdk-go/aws" @@ -105,10 +106,16 @@ func resourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) erro d.Set("arn", jq.JobQueueArn) - computeEnvironments := make([]string, len(jq.ComputeEnvironmentOrder)) + computeEnvironments := make([]string, 0, len(jq.ComputeEnvironmentOrder)) + + sort.Slice(jq.ComputeEnvironmentOrder, func(i, j int) bool { + return aws.Int64Value(jq.ComputeEnvironmentOrder[i].Order) < aws.Int64Value(jq.ComputeEnvironmentOrder[j].Order) + }) + for _, computeEnvironmentOrder := range jq.ComputeEnvironmentOrder { - computeEnvironments[aws.Int64Value(computeEnvironmentOrder.Order)] = aws.StringValue(computeEnvironmentOrder.ComputeEnvironment) + computeEnvironments = append(computeEnvironments, aws.StringValue(computeEnvironmentOrder.ComputeEnvironment)) } + if err := d.Set("compute_environments", computeEnvironments); err != nil { return fmt.Errorf("error setting compute_environments: %s", err) } diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index 931ccfebd74..515d6ce2df5 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -3,8 +3,6 @@ package aws import ( "fmt" "log" - "strconv" - "strings" "testing" "github.com/aws/aws-sdk-go/aws" @@ -57,20 +55,24 @@ func testSweepBatchJobQueues(region string) error { } func TestAccAWSBatchJobQueue_basic(t *testing.T) { - var jq batch.JobQueueDetail - ri := acctest.RandInt() - config := fmt.Sprintf(testAccBatchJobQueueBasic, ri) - resourceName := "aws_batch_job_queue.test_queue" + var jobQueue1 batch.JobQueueDetail + resourceName := "aws_batch_job_queue.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBatch(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchJobQueueDestroy, Steps: []resource.TestStep{ { - Config: config, + Config: testAccBatchJobQueueConfigState(rName, batch.JQStateEnabled), Check: resource.ComposeTestCheckFunc( - testAccCheckBatchJobQueueExists(resourceName, &jq), - testAccCheckBatchJobQueueAttributes(&jq), + testAccCheckBatchJobQueueExists(resourceName, &jobQueue1), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "batch", fmt.Sprintf("job-queue/%s", rName)), + resource.TestCheckResourceAttr(resourceName, "compute_environments.#", "1"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "priority", "1"), + resource.TestCheckResourceAttr(resourceName, "state", batch.JQStateEnabled), ), }, { @@ -84,8 +86,8 @@ func TestAccAWSBatchJobQueue_basic(t *testing.T) { func TestAccAWSBatchJobQueue_disappears(t *testing.T) { var jobQueue1 batch.JobQueueDetail - resourceName := "aws_batch_job_queue.test_queue" - rInt := acctest.RandInt() + resourceName := "aws_batch_job_queue.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBatch(t) }, @@ -93,7 +95,7 @@ func TestAccAWSBatchJobQueue_disappears(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, Steps: []resource.TestStep{ { - Config: fmt.Sprintf(testAccBatchJobQueueBasic, rInt), + Config: testAccBatchJobQueueConfigState(rName, batch.JQStateEnabled), Check: resource.ComposeTestCheckFunc( testAccCheckBatchJobQueueExists(resourceName, &jobQueue1), testAccCheckBatchJobQueueDisappears(&jobQueue1), @@ -104,29 +106,88 @@ func TestAccAWSBatchJobQueue_disappears(t *testing.T) { }) } -func TestAccAWSBatchJobQueue_update(t *testing.T) { - var jq batch.JobQueueDetail - ri := acctest.RandInt() - config := fmt.Sprintf(testAccBatchJobQueueBasic, ri) - updateConfig := fmt.Sprintf(testAccBatchJobQueueUpdate, ri) - resourceName := "aws_batch_job_queue.test_queue" +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/8083 +func TestAccAWSBatchJobQueue_ComputeEnvironments_ExternalOrderUpdate(t *testing.T) { + var jobQueue1 batch.JobQueueDetail + resourceName := "aws_batch_job_queue.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBatch(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckBatchJobQueueDestroy, + Steps: []resource.TestStep{ + { + Config: testAccBatchJobQueueConfigState(rName, batch.JQStateEnabled), + Check: resource.ComposeTestCheckFunc( + testAccCheckBatchJobQueueExists(resourceName, &jobQueue1), + testAccCheckBatchJobQueueComputeEnvironmentOrderUpdate(&jobQueue1), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSBatchJobQueue_Priority(t *testing.T) { + var jobQueue1, jobQueue2 batch.JobQueueDetail + resourceName := "aws_batch_job_queue.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBatch(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchJobQueueDestroy, Steps: []resource.TestStep{ { - Config: config, + Config: testAccBatchJobQueueConfigPriority(rName, 1), Check: resource.ComposeTestCheckFunc( - testAccCheckBatchJobQueueExists(resourceName, &jq), - testAccCheckBatchJobQueueAttributes(&jq), + testAccCheckBatchJobQueueExists(resourceName, &jobQueue1), + resource.TestCheckResourceAttr(resourceName, "priority", "1"), ), }, { - Config: updateConfig, + Config: testAccBatchJobQueueConfigPriority(rName, 2), Check: resource.ComposeTestCheckFunc( - testAccCheckBatchJobQueueExists(resourceName, &jq), - testAccCheckBatchJobQueueAttributes(&jq), + testAccCheckBatchJobQueueExists(resourceName, &jobQueue2), + resource.TestCheckResourceAttr(resourceName, "priority", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSBatchJobQueue_State(t *testing.T) { + var jobQueue1, jobQueue2 batch.JobQueueDetail + resourceName := "aws_batch_job_queue.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBatch(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckBatchJobQueueDestroy, + Steps: []resource.TestStep{ + { + Config: testAccBatchJobQueueConfigState(rName, batch.JQStateDisabled), + Check: resource.ComposeTestCheckFunc( + testAccCheckBatchJobQueueExists(resourceName, &jobQueue1), + resource.TestCheckResourceAttr(resourceName, "state", batch.JQStateDisabled), + ), + }, + { + Config: testAccBatchJobQueueConfigState(rName, batch.JQStateEnabled), + Check: resource.ComposeTestCheckFunc( + testAccCheckBatchJobQueueExists(resourceName, &jobQueue2), + resource.TestCheckResourceAttr(resourceName, "state", batch.JQStateEnabled), ), }, { @@ -165,33 +226,6 @@ func testAccCheckBatchJobQueueExists(n string, jq *batch.JobQueueDetail) resourc } } -func testAccCheckBatchJobQueueAttributes(jq *batch.JobQueueDetail) resource.TestCheckFunc { - return func(s *terraform.State) error { - if !strings.HasPrefix(*jq.JobQueueName, "tf_acctest_batch_job_queue") { - return fmt.Errorf("Bad Job Queue name: %s", *jq.JobQueueName) - } - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_batch_job_queue" { - continue - } - if *jq.JobQueueArn != rs.Primary.Attributes["arn"] { - return fmt.Errorf("Bad Job Queue ARN\n\t expected: %s\n\tgot: %s\n", rs.Primary.Attributes["arn"], *jq.JobQueueArn) - } - if *jq.State != rs.Primary.Attributes["state"] { - return fmt.Errorf("Bad Job Queue State\n\t expected: %s\n\tgot: %s\n", rs.Primary.Attributes["state"], *jq.State) - } - priority, err := strconv.ParseInt(rs.Primary.Attributes["priority"], 10, 64) - if err != nil { - return err - } - if *jq.Priority != priority { - return fmt.Errorf("Bad Job Queue Priority\n\t expected: %s\n\tgot: %d\n", rs.Primary.Attributes["priority"], *jq.Priority) - } - } - return nil - } -} - func testAccCheckBatchJobQueueDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_batch_job_queue" { @@ -223,41 +257,46 @@ func testAccCheckBatchJobQueueDisappears(jobQueue *batch.JobQueueDetail) resourc } } -const testAccBatchJobQueueBaseConfig = ` -########## ecs_instance_role ########## +// testAccCheckBatchJobQueueComputeEnvironmentOrderUpdate simulates the change of a Compute Environment Order +// An external update to the Batch Job Queue (e.g. console) may trigger changes to the value of the Order +// parameter that do not affect the operation of the queue itself, but the resource logic needs to handle. +// For example, Terraform may set a single Compute Environment with Order 0, but the console updates it to 1. +func testAccCheckBatchJobQueueComputeEnvironmentOrderUpdate(jobQueue *batch.JobQueueDetail) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).batchconn -resource "aws_iam_role" "ecs_instance_role" { - name = "ecs_instance_role_%[1]d" - assume_role_policy = < 0 { + input.TagList = keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().Cloudhsmv2Tags() + } + backupId := d.Get("source_backup_identifier").(string) if len(backupId) != 0 { input.SourceBackupId = aws.String(backupId) @@ -211,17 +215,12 @@ func resourceAwsCloudHsmV2ClusterCreate(d *schema.ResourceData, meta interface{} } } - if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Cloudhsmv2UpdateTags(conn, d.Id(), nil, v); err != nil { - return fmt.Errorf("error updating tags: %s", err) - } - } - return resourceAwsCloudHsmV2ClusterRead(d, meta) } func resourceAwsCloudHsmV2ClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudhsmv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig cluster, err := describeCloudHsmV2Cluster(conn, d.Id()) @@ -251,13 +250,7 @@ func resourceAwsCloudHsmV2ClusterRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error saving Subnet IDs to state for CloudHSMv2 Cluster (%s): %s", d.Id(), err) } - tags, err := keyvaluetags.Cloudhsmv2ListTags(conn, d.Id()) - - if err != nil { - return fmt.Errorf("error listing tags for resource (%s): %s", d.Id(), err) - } - - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Cloudhsmv2KeyValueTags(cluster.TagList).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -314,12 +307,12 @@ func resourceAwsCloudHsmV2ClusterDelete(d *schema.ResourceData, meta interface{} func readCloudHsmV2ClusterCertificates(cluster *cloudhsmv2.Cluster) []map[string]interface{} { certs := map[string]interface{}{} if cluster.Certificates != nil { - if aws.StringValue(cluster.State) == "UNINITIALIZED" { + if aws.StringValue(cluster.State) == cloudhsmv2.ClusterStateUninitialized { certs["cluster_csr"] = aws.StringValue(cluster.Certificates.ClusterCsr) certs["aws_hardware_certificate"] = aws.StringValue(cluster.Certificates.AwsHardwareCertificate) certs["hsm_certificate"] = aws.StringValue(cluster.Certificates.HsmCertificate) certs["manufacturer_hardware_certificate"] = aws.StringValue(cluster.Certificates.ManufacturerHardwareCertificate) - } else if aws.StringValue(cluster.State) == "ACTIVE" { + } else if aws.StringValue(cluster.State) == cloudhsmv2.ClusterStateActive { certs["cluster_certificate"] = aws.StringValue(cluster.Certificates.ClusterCertificate) } } diff --git a/aws/resource_aws_cloudhsm2_cluster_test.go b/aws/resource_aws_cloudhsm2_cluster_test.go index f2ace54485f..95ecda274d8 100644 --- a/aws/resource_aws_cloudhsm2_cluster_test.go +++ b/aws/resource_aws_cloudhsm2_cluster_test.go @@ -84,6 +84,8 @@ func testSweepCloudhsmv2Clusters(region string) error { } func TestAccAWSCloudHsmV2Cluster_basic(t *testing.T) { + resourceName := "aws_cloudhsm_v2_cluster.cluster" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -92,16 +94,16 @@ func TestAccAWSCloudHsmV2Cluster_basic(t *testing.T) { { Config: testAccAWSCloudHsmV2ClusterConfig(), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCloudHsmV2ClusterExists("aws_cloudhsm_v2_cluster.cluster"), - resource.TestCheckResourceAttrSet("aws_cloudhsm_v2_cluster.cluster", "cluster_id"), - resource.TestCheckResourceAttrSet("aws_cloudhsm_v2_cluster.cluster", "vpc_id"), - resource.TestCheckResourceAttrSet("aws_cloudhsm_v2_cluster.cluster", "security_group_id"), - resource.TestCheckResourceAttrSet("aws_cloudhsm_v2_cluster.cluster", "cluster_state"), - resource.TestCheckResourceAttr("aws_cloudhsm_v2_cluster.cluster", "tags.%", "0"), + testAccCheckAWSCloudHsmV2ClusterExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "vpc_id"), + resource.TestCheckResourceAttrSet(resourceName, "security_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "cluster_state"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { - ResourceName: "aws_cloudhsm_v2_cluster.cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"cluster_certificates"}, @@ -161,7 +163,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "cloudhsm_v2_test_vpc" { cidr_block = "10.0.0.0/16" @@ -232,7 +241,7 @@ func testAccCheckAWSCloudHsmV2ClusterDestroy(s *terraform.State) error { return err } - if cluster != nil && aws.StringValue(cluster.State) != "DELETED" { + if cluster != nil && aws.StringValue(cluster.State) != cloudhsmv2.ClusterStateDeleted { return fmt.Errorf("CloudHSM cluster still exists %s", cluster) } } diff --git a/aws/resource_aws_cloudhsm2_hsm_test.go b/aws/resource_aws_cloudhsm2_hsm_test.go index 82ae0970c87..6f30a4105cc 100644 --- a/aws/resource_aws_cloudhsm2_hsm_test.go +++ b/aws/resource_aws_cloudhsm2_hsm_test.go @@ -42,7 +42,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "cloudhsm_v2_test_vpc" { cidr_block = "10.0.0.0/16" diff --git a/aws/resource_aws_cloudtrail.go b/aws/resource_aws_cloudtrail.go index ea77b28319f..26dd93dfe9a 100644 --- a/aws/resource_aws_cloudtrail.go +++ b/aws/resource_aws_cloudtrail.go @@ -224,6 +224,7 @@ func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsCloudTrailRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudtrailconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := cloudtrail.DescribeTrailsInput{ TrailNameList: []*string{ @@ -277,7 +278,7 @@ func resourceAwsCloudTrailRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for Cloudtrail (%s): %s", *trail.TrailARN, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_cloudtrail_test.go b/aws/resource_aws_cloudtrail_test.go index 72b518357b2..a642e27e7e8 100644 --- a/aws/resource_aws_cloudtrail_test.go +++ b/aws/resource_aws_cloudtrail_test.go @@ -9,11 +9,88 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudtrail" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_cloudtrail", &resource.Sweeper{ + Name: "aws_cloudtrail", + F: testSweepCloudTrails, + }) +} + +func testSweepCloudTrails(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).cloudtrailconn + var sweeperErrs *multierror.Error + + err = conn.ListTrailsPages(&cloudtrail.ListTrailsInput{}, func(page *cloudtrail.ListTrailsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, trail := range page.Trails { + name := aws.StringValue(trail.Name) + + if name == "AWSMacieTrail-DO-NOT-EDIT" { + log.Printf("[INFO] Skipping AWSMacieTrail-DO-NOT-EDIT for Macie Classic, which is not automatically recreated by the service") + continue + } + + output, err := conn.DescribeTrails(&cloudtrail.DescribeTrailsInput{ + TrailNameList: aws.StringSlice([]string{name}), + }) + if err != nil { + sweeperErr := fmt.Errorf("error describing CloudTrail (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if len(output.TrailList) == 0 { + log.Printf("[INFO] CloudTrail (%s) not found, skipping", name) + continue + } + + if aws.BoolValue(output.TrailList[0].IsOrganizationTrail) { + log.Printf("[INFO] CloudTrail (%s) is an organization trail, skipping", name) + continue + } + + log.Printf("[INFO] Deleting CloudTrail: %s", name) + _, err = conn.DeleteTrail(&cloudtrail.DeleteTrailInput{ + Name: aws.String(name), + }) + if isAWSErr(err, cloudtrail.ErrCodeTrailNotFoundException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting CloudTrail (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping CloudTrail sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving CloudTrails: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSCloudTrail(t *testing.T) { testCases := map[string]map[string]func(t *testing.T){ "Trail": { @@ -60,7 +137,7 @@ func testAccAWSCloudTrail_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "include_global_service_events", "true"), resource.TestCheckResourceAttr(resourceName, "is_organization_trail", "false"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -75,7 +152,7 @@ func testAccAWSCloudTrail_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "s3_key_prefix", "prefix"), resource.TestCheckResourceAttr(resourceName, "include_global_service_events", "false"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, }, @@ -133,9 +210,9 @@ func testAccAWSCloudTrail_enable_logging(t *testing.T) { testAccCheckCloudTrailExists(resourceName, &trail), // AWS will create the trail with logging turned off. // Test that "enable_logging" default works. - testAccCheckCloudTrailLoggingEnabled(resourceName, true, &trail), + testAccCheckCloudTrailLoggingEnabled(resourceName, true), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -147,18 +224,18 @@ func testAccAWSCloudTrail_enable_logging(t *testing.T) { Config: testAccAWSCloudTrailConfigModified(cloudTrailRandInt), Check: resource.ComposeTestCheckFunc( testAccCheckCloudTrailExists(resourceName, &trail), - testAccCheckCloudTrailLoggingEnabled(resourceName, false, &trail), + testAccCheckCloudTrailLoggingEnabled(resourceName, false), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { Config: testAccAWSCloudTrailConfig(cloudTrailRandInt), Check: resource.ComposeTestCheckFunc( testAccCheckCloudTrailExists(resourceName, &trail), - testAccCheckCloudTrailLoggingEnabled(resourceName, true, &trail), + testAccCheckCloudTrailLoggingEnabled(resourceName, true), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, }, @@ -181,7 +258,7 @@ func testAccAWSCloudTrail_is_multi_region(t *testing.T) { testAccCheckCloudTrailExists(resourceName, &trail), resource.TestCheckResourceAttr(resourceName, "is_multi_region_trail", "false"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -190,7 +267,7 @@ func testAccAWSCloudTrail_is_multi_region(t *testing.T) { testAccCheckCloudTrailExists(resourceName, &trail), resource.TestCheckResourceAttr(resourceName, "is_multi_region_trail", "true"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -204,7 +281,7 @@ func testAccAWSCloudTrail_is_multi_region(t *testing.T) { testAccCheckCloudTrailExists(resourceName, &trail), resource.TestCheckResourceAttr(resourceName, "is_multi_region_trail", "false"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, }, @@ -227,7 +304,7 @@ func testAccAWSCloudTrail_is_organization(t *testing.T) { testAccCheckCloudTrailExists(resourceName, &trail), resource.TestCheckResourceAttr(resourceName, "is_organization_trail", "true"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -241,7 +318,7 @@ func testAccAWSCloudTrail_is_organization(t *testing.T) { testAccCheckCloudTrailExists(resourceName, &trail), resource.TestCheckResourceAttr(resourceName, "is_organization_trail", "false"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, }, @@ -265,7 +342,7 @@ func testAccAWSCloudTrail_logValidation(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "s3_key_prefix", ""), resource.TestCheckResourceAttr(resourceName, "include_global_service_events", "true"), testAccCheckCloudTrailLogValidationEnabled(resourceName, true, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -280,7 +357,7 @@ func testAccAWSCloudTrail_logValidation(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "s3_key_prefix", ""), resource.TestCheckResourceAttr(resourceName, "include_global_service_events", "true"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, }, @@ -290,8 +367,9 @@ func testAccAWSCloudTrail_logValidation(t *testing.T) { func testAccAWSCloudTrail_kmsKey(t *testing.T) { var trail cloudtrail.Trail cloudTrailRandInt := acctest.RandInt() - keyRegex := regexp.MustCompile(`^arn:aws:([a-zA-Z0-9\-])+:([a-z]{2}-[a-z]+-\d{1})?:(\d{12})?:(.*)$`) + resourceName := "aws_cloudtrail.foobar" + kmsResourceName := "aws_kms_key.foo" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -305,7 +383,7 @@ func testAccAWSCloudTrail_kmsKey(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "s3_key_prefix", ""), resource.TestCheckResourceAttr(resourceName, "include_global_service_events", "true"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - resource.TestMatchResourceAttr(resourceName, "kms_key_id", keyRegex), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_id", kmsResourceName, "arn"), ), }, { @@ -338,7 +416,7 @@ func testAccAWSCloudTrail_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.Foo", "moo"), resource.TestCheckResourceAttr(resourceName, "tags.Pooh", "hi"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -356,7 +434,7 @@ func testAccAWSCloudTrail_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.Moo", "boom"), resource.TestCheckResourceAttr(resourceName, "tags.Pooh", "hi"), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, { @@ -366,7 +444,7 @@ func testAccAWSCloudTrail_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), testAccCheckCloudTrailLoadTags(&trail, &trailTagsModified), testAccCheckCloudTrailLogValidationEnabled(resourceName, false, &trail), - testAccCheckCloudTrailKmsKeyIdEquals(resourceName, "", &trail), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), ), }, }, @@ -477,7 +555,7 @@ func testAccCheckCloudTrailExists(n string, trail *cloudtrail.Trail) resource.Te } } -func testAccCheckCloudTrailLoggingEnabled(n string, desired bool, trail *cloudtrail.Trail) resource.TestCheckFunc { +func testAccCheckCloudTrailLoggingEnabled(n string, desired bool) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -532,43 +610,6 @@ func testAccCheckCloudTrailLogValidationEnabled(n string, desired bool, trail *c } } -func testAccCheckCloudTrailKmsKeyIdEquals(n string, desired string, trail *cloudtrail.Trail) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - if desired != "" && trail.KmsKeyId == nil { - return fmt.Errorf("No KmsKeyId attribute present in trail: %s, expected %s", - trail, desired) - } - - // work around string pointer - var kmsKeyIdInString string - if trail.KmsKeyId == nil { - kmsKeyIdInString = "" - } else { - kmsKeyIdInString = *trail.KmsKeyId - } - - if kmsKeyIdInString != desired { - return fmt.Errorf("Expected KMS Key ID %q to equal %q", - *trail.KmsKeyId, desired) - } - - kmsKeyId, ok := rs.Primary.Attributes["kms_key_id"] - if desired != "" && !ok { - return fmt.Errorf("No kms_key_id attribute defined for %s", n) - } - if kmsKeyId != desired { - return fmt.Errorf("Expected KMS Key ID %q, saved %q", desired, kmsKeyId) - } - - return nil - } -} - func testAccCheckAWSCloudTrailDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).cloudtrailconn diff --git a/aws/resource_aws_cloudwatch_dashboard.go b/aws/resource_aws_cloudwatch_dashboard.go index a7ff5aac312..04d742bed41 100644 --- a/aws/resource_aws_cloudwatch_dashboard.go +++ b/aws/resource_aws_cloudwatch_dashboard.go @@ -34,7 +34,7 @@ func resourceAwsCloudWatchDashboard() *schema.Resource { "dashboard_body": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_cloudwatch_event_rule.go b/aws/resource_aws_cloudwatch_event_rule.go index 62a58bfc86d..ce6098b2360 100644 --- a/aws/resource_aws_cloudwatch_event_rule.go +++ b/aws/resource_aws_cloudwatch_event_rule.go @@ -132,6 +132,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface func resourceAwsCloudWatchEventRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatcheventsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := events.DescribeRuleInput{ Name: aws.String(d.Id()), @@ -177,7 +178,7 @@ func resourceAwsCloudWatchEventRuleRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for CloudWatch Event Rule (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_cloudwatch_event_target.go b/aws/resource_aws_cloudwatch_event_target.go index 9e559012e15..46fc9003207 100644 --- a/aws/resource_aws_cloudwatch_event_target.go +++ b/aws/resource_aws_cloudwatch_event_target.go @@ -215,6 +215,7 @@ func resourceAwsCloudWatchEventTarget() *schema.Resource { "input_paths": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "input_template": { Type: schema.TypeString, diff --git a/aws/resource_aws_cloudwatch_event_target_test.go b/aws/resource_aws_cloudwatch_event_target_test.go index 9fcef6210bb..d2938b3a9d6 100644 --- a/aws/resource_aws_cloudwatch_event_target_test.go +++ b/aws/resource_aws_cloudwatch_event_target_test.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -90,6 +89,8 @@ func testSweepCloudWatchEventTargets(region string) error { } func TestAccAWSCloudWatchEventTarget_basic(t *testing.T) { + resourceName := "aws_cloudwatch_event_target.test" + var target events.Target rName1 := acctest.RandString(5) rName2 := acctest.RandString(5) @@ -107,27 +108,25 @@ func TestAccAWSCloudWatchEventTarget_basic(t *testing.T) { { Config: testAccAWSCloudWatchEventTargetConfig(ruleName, snsTopicName1, targetID1), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.moobar", &target), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.moobar", "rule", ruleName), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.moobar", "target_id", targetID1), - resource.TestMatchResourceAttr("aws_cloudwatch_event_target.moobar", "arn", - regexp.MustCompile(fmt.Sprintf(":%s$", snsTopicName1))), + testAccCheckCloudWatchEventTargetExists(resourceName, &target), + resource.TestCheckResourceAttr(resourceName, "rule", ruleName), + resource.TestCheckResourceAttr(resourceName, "target_id", targetID1), + resource.TestCheckResourceAttrPair(resourceName, "arn", "aws_sns_topic.test", "arn"), ), }, { Config: testAccAWSCloudWatchEventTargetConfig(ruleName, snsTopicName2, targetID2), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.moobar", &target), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.moobar", "rule", ruleName), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.moobar", "target_id", targetID2), - resource.TestMatchResourceAttr("aws_cloudwatch_event_target.moobar", "arn", - regexp.MustCompile(fmt.Sprintf(":%s$", snsTopicName2))), + testAccCheckCloudWatchEventTargetExists(resourceName, &target), + resource.TestCheckResourceAttr(resourceName, "rule", ruleName), + resource.TestCheckResourceAttr(resourceName, "target_id", targetID2), + resource.TestCheckResourceAttrPair(resourceName, "arn", "aws_sns_topic.test", "arn"), ), }, { - ResourceName: "aws_cloudwatch_event_target.moobar", + ResourceName: resourceName, ImportState: true, - ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.moobar"), + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc(resourceName), ImportStateVerify: true, }, }, @@ -135,6 +134,8 @@ func TestAccAWSCloudWatchEventTarget_basic(t *testing.T) { } func TestAccAWSCloudWatchEventTarget_missingTargetId(t *testing.T) { + resourceName := "aws_cloudwatch_event_target.test" + var target events.Target rName := acctest.RandString(5) ruleName := fmt.Sprintf("tf-acc-cw-event-rule-missing-target-id-%s", rName) @@ -148,16 +149,15 @@ func TestAccAWSCloudWatchEventTarget_missingTargetId(t *testing.T) { { Config: testAccAWSCloudWatchEventTargetConfigMissingTargetId(ruleName, snsTopicName), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.moobar", &target), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.moobar", "rule", ruleName), - resource.TestMatchResourceAttr("aws_cloudwatch_event_target.moobar", "arn", - regexp.MustCompile(fmt.Sprintf(":%s$", snsTopicName))), + testAccCheckCloudWatchEventTargetExists(resourceName, &target), + resource.TestCheckResourceAttr(resourceName, "rule", ruleName), + resource.TestCheckResourceAttrPair(resourceName, "arn", "aws_sns_topic.test", "arn"), ), }, { - ResourceName: "aws_cloudwatch_event_target.moobar", + ResourceName: resourceName, ImportState: true, - ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.moobar"), + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc(resourceName), ImportStateVerify: true, }, }, @@ -165,6 +165,7 @@ func TestAccAWSCloudWatchEventTarget_missingTargetId(t *testing.T) { } func TestAccAWSCloudWatchEventTarget_full(t *testing.T) { + resourceName := "aws_cloudwatch_event_target.test" var target events.Target rName := acctest.RandString(5) ruleName := fmt.Sprintf("tf-acc-cw-event-rule-full-%s", rName) @@ -179,19 +180,18 @@ func TestAccAWSCloudWatchEventTarget_full(t *testing.T) { { Config: testAccAWSCloudWatchEventTargetConfig_full(ruleName, targetID, ssmDocumentName), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.foobar", &target), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.foobar", "rule", ruleName), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.foobar", "target_id", targetID), - resource.TestMatchResourceAttr("aws_cloudwatch_event_target.foobar", "arn", - regexp.MustCompile("^arn:aws:kinesis:.*:stream/tf_ssm_Document")), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.foobar", "input", "{ \"source\": [\"aws.cloudtrail\"] }\n"), - resource.TestCheckResourceAttr("aws_cloudwatch_event_target.foobar", "input_path", ""), + testAccCheckCloudWatchEventTargetExists(resourceName, &target), + resource.TestCheckResourceAttr(resourceName, "rule", ruleName), + resource.TestCheckResourceAttr(resourceName, "target_id", targetID), + resource.TestCheckResourceAttrPair(resourceName, "arn", "aws_kinesis_stream.test", "arn"), + resource.TestCheckResourceAttr(resourceName, "input", "{ \"source\": [\"aws.cloudtrail\"] }\n"), + resource.TestCheckResourceAttr(resourceName, "input_path", ""), ), }, { - ResourceName: "aws_cloudwatch_event_target.foobar", + ResourceName: resourceName, ImportState: true, - ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc("aws_cloudwatch_event_target.foobar"), + ImportStateIdFunc: testAccAWSCloudWatchEventTargetImportStateIdFunc(resourceName), ImportStateVerify: true, }, }, @@ -426,18 +426,18 @@ func testAccAWSCloudWatchEventTargetImportStateIdFunc(resourceName string) resou func testAccAWSCloudWatchEventTargetConfig(ruleName, snsTopicName, targetID string) string { return fmt.Sprintf(` -resource "aws_cloudwatch_event_rule" "foo" { +resource "aws_cloudwatch_event_rule" "test" { name = "%s" schedule_expression = "rate(1 hour)" } -resource "aws_cloudwatch_event_target" "moobar" { - rule = "${aws_cloudwatch_event_rule.foo.name}" +resource "aws_cloudwatch_event_target" "test" { + rule = "${aws_cloudwatch_event_rule.test.name}" target_id = "%s" - arn = "${aws_sns_topic.moon.arn}" + arn = "${aws_sns_topic.test.arn}" } -resource "aws_sns_topic" "moon" { +resource "aws_sns_topic" "test" { name = "%s" } `, ruleName, targetID, snsTopicName) @@ -445,17 +445,17 @@ resource "aws_sns_topic" "moon" { func testAccAWSCloudWatchEventTargetConfigMissingTargetId(ruleName, snsTopicName string) string { return fmt.Sprintf(` -resource "aws_cloudwatch_event_rule" "foo" { +resource "aws_cloudwatch_event_rule" "test" { name = "%s" schedule_expression = "rate(1 hour)" } -resource "aws_cloudwatch_event_target" "moobar" { - rule = "${aws_cloudwatch_event_rule.foo.name}" - arn = "${aws_sns_topic.moon.arn}" +resource "aws_cloudwatch_event_target" "test" { + rule = "${aws_cloudwatch_event_rule.test.name}" + arn = "${aws_sns_topic.test.arn}" } -resource "aws_sns_topic" "moon" { +resource "aws_sns_topic" "test" { name = "%s" } `, ruleName, snsTopicName) @@ -463,7 +463,7 @@ resource "aws_sns_topic" "moon" { func testAccAWSCloudWatchEventTargetConfig_full(ruleName, targetName, rName string) string { return fmt.Sprintf(` -resource "aws_cloudwatch_event_rule" "foo" { +resource "aws_cloudwatch_event_rule" "test" { name = "%s" schedule_expression = "rate(1 hour)" role_arn = "${aws_iam_role.role.arn}" @@ -512,18 +512,18 @@ resource "aws_iam_role_policy" "test_policy" { EOF } -resource "aws_cloudwatch_event_target" "foobar" { - rule = "${aws_cloudwatch_event_rule.foo.name}" +resource "aws_cloudwatch_event_target" "test" { + rule = "${aws_cloudwatch_event_rule.test.name}" target_id = "%s" input = <:", d.Id()) + } + logGroupName := idParts[0] + name := idParts[1] + d.Set("log_group_name", logGroupName) + d.Set("name", name) + d.SetId(name) + return []*schema.ResourceData{d}, nil +} diff --git a/aws/resource_aws_cloudwatch_log_metric_filter_test.go b/aws/resource_aws_cloudwatch_log_metric_filter_test.go index c7073a8efd4..79e54a44703 100644 --- a/aws/resource_aws_cloudwatch_log_metric_filter_test.go +++ b/aws/resource_aws_cloudwatch_log_metric_filter_test.go @@ -14,6 +14,7 @@ import ( func TestAccAWSCloudWatchLogMetricFilter_basic(t *testing.T) { var mf cloudwatchlogs.MetricFilter rInt := acctest.RandInt() + resourceName := "aws_cloudwatch_log_metric_filter.foobar" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -23,15 +24,15 @@ func TestAccAWSCloudWatchLogMetricFilter_basic(t *testing.T) { { Config: testAccAWSCloudWatchLogMetricFilterConfig(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchLogMetricFilterExists("aws_cloudwatch_log_metric_filter.foobar", &mf), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "name", fmt.Sprintf("MyAppAccessCount-%d", rInt)), + testAccCheckCloudWatchLogMetricFilterExists(resourceName, &mf), + resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("MyAppAccessCount-%d", rInt)), testAccCheckCloudWatchLogMetricFilterName(&mf, fmt.Sprintf("MyAppAccessCount-%d", rInt)), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "pattern", ""), + resource.TestCheckResourceAttr(resourceName, "pattern", ""), testAccCheckCloudWatchLogMetricFilterPattern(&mf, ""), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "log_group_name", fmt.Sprintf("MyApp/access-%d.log", rInt)), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.name", "EventCount"), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.namespace", "YourNamespace"), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.value", "1"), + resource.TestCheckResourceAttr(resourceName, "log_group_name", fmt.Sprintf("MyApp/access-%d.log", rInt)), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.name", "EventCount"), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.namespace", "YourNamespace"), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.value", "1"), testAccCheckCloudWatchLogMetricFilterTransformation(&mf, &cloudwatchlogs.MetricTransformation{ MetricName: aws.String("EventCount"), MetricNamespace: aws.String("YourNamespace"), @@ -39,19 +40,25 @@ func TestAccAWSCloudWatchLogMetricFilter_basic(t *testing.T) { }), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSCloudwatchLogMetricFilterImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, { Config: testAccAWSCloudWatchLogMetricFilterConfigModified(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchLogMetricFilterExists("aws_cloudwatch_log_metric_filter.foobar", &mf), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "name", fmt.Sprintf("MyAppAccessCount-%d", rInt)), + testAccCheckCloudWatchLogMetricFilterExists(resourceName, &mf), + resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("MyAppAccessCount-%d", rInt)), testAccCheckCloudWatchLogMetricFilterName(&mf, fmt.Sprintf("MyAppAccessCount-%d", rInt)), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "pattern", "{ $.errorCode = \"AccessDenied\" }"), + resource.TestCheckResourceAttr(resourceName, "pattern", "{ $.errorCode = \"AccessDenied\" }"), testAccCheckCloudWatchLogMetricFilterPattern(&mf, "{ $.errorCode = \"AccessDenied\" }"), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "log_group_name", fmt.Sprintf("MyApp/access-%d.log", rInt)), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.name", "AccessDeniedCount"), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.namespace", "MyNamespace"), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.value", "2"), - resource.TestCheckResourceAttr("aws_cloudwatch_log_metric_filter.foobar", "metric_transformation.0.default_value", "1"), + resource.TestCheckResourceAttr(resourceName, "log_group_name", fmt.Sprintf("MyApp/access-%d.log", rInt)), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.name", "AccessDeniedCount"), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.namespace", "MyNamespace"), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.value", "2"), + resource.TestCheckResourceAttr(resourceName, "metric_transformation.0.default_value", "1"), testAccCheckCloudWatchLogMetricFilterTransformation(&mf, &cloudwatchlogs.MetricTransformation{ MetricName: aws.String("AccessDeniedCount"), MetricNamespace: aws.String("MyNamespace"), @@ -134,7 +141,7 @@ func testAccCheckCloudWatchLogMetricFilterExists(n string, mf *cloudwatchlogs.Me } conn := testAccProvider.Meta().(*AWSClient).cloudwatchlogsconn - metricFilter, err := lookupCloudWatchLogMetricFilter(conn, rs.Primary.ID, rs.Primary.Attributes["log_group_name"], nil) + metricFilter, err := lookupCloudWatchLogMetricFilter(conn, rs.Primary.Attributes["name"], rs.Primary.Attributes["log_group_name"], nil) if err != nil { return err } @@ -153,7 +160,7 @@ func testAccCheckAWSCloudWatchLogMetricFilterDestroy(s *terraform.State) error { continue } - _, err := lookupCloudWatchLogMetricFilter(conn, rs.Primary.ID, rs.Primary.Attributes["log_group_name"], nil) + _, err := lookupCloudWatchLogMetricFilter(conn, rs.Primary.Attributes["name"], rs.Primary.Attributes["log_group_name"], nil) if err == nil { return fmt.Errorf("MetricFilter Still Exists: %s", rs.Primary.ID) } @@ -242,3 +249,14 @@ resource "aws_cloudwatch_log_group" "mama" { } `, rInt, rInt) } + +func testAccAWSCloudwatchLogMetricFilterImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return rs.Primary.Attributes["log_group_name"] + ":" + rs.Primary.Attributes["name"], nil + } +} diff --git a/aws/resource_aws_cloudwatch_metric_alarm.go b/aws/resource_aws_cloudwatch_metric_alarm.go index e1025068d5f..aecc3289b6e 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/aws/resource_aws_cloudwatch_metric_alarm.go @@ -71,6 +71,7 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { "dimensions": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "metric_name": { Type: schema.TypeString, @@ -163,6 +164,7 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Type: schema.TypeMap, Optional: true, ConflictsWith: []string{"metric_query"}, + Elem: &schema.Schema{Type: schema.TypeString}, }, "insufficient_data_actions": { Type: schema.TypeSet, @@ -250,6 +252,7 @@ func resourceAwsCloudWatchMetricAlarmCreate(d *schema.ResourceData, meta interfa func resourceAwsCloudWatchMetricAlarmRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatchconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := getAwsCloudWatchMetricAlarm(d, meta) if err != nil { @@ -329,7 +332,7 @@ func resourceAwsCloudWatchMetricAlarmRead(d *schema.ResourceData, meta interface return fmt.Errorf("error listing tags for CloudWatch Metric Alarm (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 45b4093e0e7..a7cc67af904 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -5,7 +5,6 @@ import ( "fmt" "log" "regexp" - "strconv" "time" "github.com/aws/aws-sdk-go/aws" @@ -160,7 +159,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { Computed: true, }, "environment": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -178,7 +177,6 @@ func resourceAwsCodeBuildProject() *schema.Resource { "environment_variable": { Type: schema.TypeList, Optional: true, - Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { @@ -195,6 +193,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ codebuild.EnvironmentVariableTypePlaintext, codebuild.EnvironmentVariableTypeParameterStore, + codebuild.EnvironmentVariableTypeSecretsManager, }, false), Default: codebuild.EnvironmentVariableTypePlaintext, }, @@ -256,7 +255,6 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, }, }, - Set: resourceAwsCodeBuildProjectEnvironmentHash, }, "logs_config": { Type: schema.TypeList, @@ -396,7 +394,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "auth": { - Type: schema.TypeSet, + Type: schema.TypeList, + MaxItems: 1, + Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "resource": { @@ -413,8 +413,6 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, }, }, - Optional: true, - Set: resourceAwsCodeBuildProjectSourceAuthHash, }, "buildspec": { Type: schema.TypeString, @@ -474,11 +472,15 @@ func resourceAwsCodeBuildProject() *schema.Resource { Required: true, }, "source": { - Type: schema.TypeSet, + Type: schema.TypeList, + MaxItems: 1, + Required: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "auth": { - Type: schema.TypeSet, + Type: schema.TypeList, + MaxItems: 1, + Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "resource": { @@ -495,8 +497,6 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, }, }, - Optional: true, - Set: resourceAwsCodeBuildProjectSourceAuthHash, }, "buildspec": { Type: schema.TypeString, @@ -547,9 +547,6 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, }, }, - Required: true, - MaxItems: 1, - Set: resourceAwsCodeBuildProjectSourceHash, }, "source_version": { Type: schema.TypeString, @@ -634,7 +631,7 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) if aws.StringValue(projectSource.Type) == codebuild.SourceTypeNoSource { if aws.StringValue(projectSource.Buildspec) == "" { - return fmt.Errorf("`build_spec` must be set when source's `type` is `NO_SOURCE`") + return fmt.Errorf("`buildspec` must be set when source's `type` is `NO_SOURCE`") } if aws.StringValue(projectSource.Location) != "" { @@ -715,7 +712,7 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error creating CodeBuild project: %s", err) } - d.SetId(*resp.Project.Arn) + d.SetId(aws.StringValue(resp.Project.Arn)) return resourceAwsCodeBuildProjectRead(d, meta) } @@ -812,7 +809,7 @@ func expandProjectCache(s []interface{}) *codebuild.ProjectCache { } func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironment { - configs := d.Get("environment").(*schema.Set).List() + configs := d.Get("environment").([]interface{}) envConfig := configs[0].(map[string]interface{}) @@ -870,7 +867,7 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm projectEnvironmentVar.Name = &v } - if v := config["value"].(string); v != "" { + if v, ok := config["value"].(string); ok { projectEnvironmentVar.Value = &v } @@ -1006,7 +1003,7 @@ func expandProjectSecondarySources(d *schema.ResourceData) []*codebuild.ProjectS } func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { - configs := d.Get("source").(*schema.Set).List() + configs := d.Get("source").([]interface{}) data := configs[0].(map[string]interface{}) return expandProjectSourceData(data) @@ -1036,10 +1033,10 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) } - if v, ok := data["auth"]; ok { - if len(v.(*schema.Set).List()) > 0 { - auth := v.(*schema.Set).List()[0].(map[string]interface{}) - + // Probe data for auth details (max of 1 auth per ProjectSource object) + if v, ok := data["auth"]; ok && len(v.([]interface{})) > 0 { + if auths := v.([]interface{}); auths[0] != nil { + auth := auths[0].(map[string]interface{}) projectSource.Auth = &codebuild.SourceAuth{ Type: aws.String(auth["type"].(string)), Resource: aws.String(auth["resource"].(string)), @@ -1047,8 +1044,8 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc } } - // Only valid for CODECOMMIT source types. - if sourceType == codebuild.SourceTypeCodecommit { + // Only valid for CODECOMMIT, GITHUB, GITHUB_ENTERPRISE source types. + if sourceType == codebuild.SourceTypeCodecommit || sourceType == codebuild.SourceTypeGithub || sourceType == codebuild.SourceTypeGithubEnterprise { if v, ok := data["git_submodules_config"]; ok && len(v.([]interface{})) > 0 { config := v.([]interface{})[0].(map[string]interface{}) @@ -1067,6 +1064,7 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codebuildconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.BatchGetProjects(&codebuild.BatchGetProjectsInput{ Names: []*string{ @@ -1091,7 +1089,7 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error setting artifacts: %s", err) } - if err := d.Set("environment", schema.NewSet(resourceAwsCodeBuildProjectEnvironmentHash, flattenAwsCodeBuildProjectEnvironment(project.Environment))); err != nil { + if err := d.Set("environment", flattenAwsCodeBuildProjectEnvironment(project.Environment)); err != nil { return fmt.Errorf("error setting environment: %s", err) } @@ -1135,7 +1133,7 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e d.Set("badge_url", "") } - if err := d.Set("tags", keyvaluetags.CodebuildKeyValueTags(project.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.CodebuildKeyValueTags(project.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -1328,38 +1326,38 @@ func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) func flattenAwsCodeBuildProjectArtifactsData(artifacts codebuild.ProjectArtifacts) map[string]interface{} { values := map[string]interface{}{} - values["type"] = *artifacts.Type + values["type"] = aws.StringValue(artifacts.Type) if artifacts.ArtifactIdentifier != nil { - values["artifact_identifier"] = *artifacts.ArtifactIdentifier + values["artifact_identifier"] = aws.StringValue(artifacts.ArtifactIdentifier) } if artifacts.EncryptionDisabled != nil { - values["encryption_disabled"] = *artifacts.EncryptionDisabled + values["encryption_disabled"] = aws.BoolValue(artifacts.EncryptionDisabled) } if artifacts.OverrideArtifactName != nil { - values["override_artifact_name"] = *artifacts.OverrideArtifactName + values["override_artifact_name"] = aws.BoolValue(artifacts.OverrideArtifactName) } if artifacts.Location != nil { - values["location"] = *artifacts.Location + values["location"] = aws.StringValue(artifacts.Location) } if artifacts.Name != nil { - values["name"] = *artifacts.Name + values["name"] = aws.StringValue(artifacts.Name) } if artifacts.NamespaceType != nil { - values["namespace_type"] = *artifacts.NamespaceType + values["namespace_type"] = aws.StringValue(artifacts.NamespaceType) } if artifacts.Packaging != nil { - values["packaging"] = *artifacts.Packaging + values["packaging"] = aws.StringValue(artifacts.Packaging) } if artifacts.Path != nil { - values["path"] = *artifacts.Path + values["path"] = aws.StringValue(artifacts.Path) } return values } @@ -1381,12 +1379,12 @@ func flattenAwsCodebuildProjectCache(cache *codebuild.ProjectCache) []interface{ func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnvironment) []interface{} { envConfig := map[string]interface{}{} - envConfig["type"] = *environment.Type - envConfig["compute_type"] = *environment.ComputeType - envConfig["image"] = *environment.Image + envConfig["type"] = aws.StringValue(environment.Type) + envConfig["compute_type"] = aws.StringValue(environment.ComputeType) + envConfig["image"] = aws.StringValue(environment.Image) envConfig["certificate"] = aws.StringValue(environment.Certificate) - envConfig["privileged_mode"] = *environment.PrivilegedMode - envConfig["image_pull_credentials_type"] = *environment.ImagePullCredentialsType + envConfig["privileged_mode"] = aws.BoolValue(environment.PrivilegedMode) + envConfig["image_pull_credentials_type"] = aws.StringValue(environment.ImagePullCredentialsType) envConfig["registry_credential"] = flattenAwsCodebuildRegistryCredential(environment.RegistryCredential) @@ -1441,7 +1439,7 @@ func flattenAwsCodeBuildProjectSourceData(source *codebuild.ProjectSource) inter m["git_submodules_config"] = flattenAwsCodebuildProjectGitSubmodulesConfig(source.GitSubmodulesConfig) if source.Auth != nil { - m["auth"] = schema.NewSet(resourceAwsCodeBuildProjectSourceAuthHash, []interface{}{sourceAuthToMap(source.Auth)}) + m["auth"] = []interface{}{sourceAuthToMap(source.Auth)} } if source.SourceIdentifier != nil { m["source_identifier"] = aws.StringValue(source.SourceIdentifier) @@ -1466,7 +1464,7 @@ func flattenAwsCodeBuildVpcConfig(vpcConfig *codebuild.VpcConfig) []interface{} if vpcConfig != nil { values := map[string]interface{}{} - values["vpc_id"] = *vpcConfig.VpcId + values["vpc_id"] = aws.StringValue(vpcConfig.VpcId) values["subnets"] = schema.NewSet(schema.HashString, flattenStringList(vpcConfig.Subnets)) values["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)) @@ -1514,107 +1512,16 @@ func resourceAwsCodeBuildProjectArtifactsHash(v interface{}) int { return hashcode.String(buf.String()) } -func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - environmentType := m["type"].(string) - computeType := m["compute_type"].(string) - image := m["image"].(string) - privilegedMode := m["privileged_mode"].(bool) - imagePullCredentialsType := m["image_pull_credentials_type"].(string) - environmentVariables := m["environment_variable"].([]interface{}) - buf.WriteString(fmt.Sprintf("%s-", environmentType)) - buf.WriteString(fmt.Sprintf("%s-", computeType)) - buf.WriteString(fmt.Sprintf("%s-", image)) - buf.WriteString(fmt.Sprintf("%t-", privilegedMode)) - buf.WriteString(fmt.Sprintf("%s-", imagePullCredentialsType)) - if v, ok := m["certificate"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["registry_credential"]; ok && len(v.([]interface{})) > 0 && v.([]interface{})[0] != nil { - m := v.([]interface{})[0].(map[string]interface{}) - - if v, ok := m["credential"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - - if v, ok := m["credential_provider"]; ok && v.(string) != "" { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - } - for _, e := range environmentVariables { - if e != nil { // Old statefiles might have nil values in them - ev := e.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s:", ev["name"].(string))) - // type is sometimes not returned by the API - if v, ok := ev["type"]; ok { - buf.WriteString(fmt.Sprintf("%s:", v.(string))) - } - buf.WriteString(fmt.Sprintf("%s-", ev["value"].(string))) - } - } - - return hashcode.String(buf.String()) -} - -func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - if v, ok := m["source_identifier"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) - } - if v, ok := m["buildspec"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["location"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["git_clone_depth"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) - } - if v, ok := m["git_submodules_config"]; ok && len(v.([]interface{})) > 0 && v.([]interface{})[0] != nil { - m := v.([]interface{})[0].(map[string]interface{}) - - if v, ok := m["fetch_submodules"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) - } - } - if v, ok := m["insecure_ssl"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) - } - if v, ok := m["report_build_status"]; ok { - buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) - } - - return hashcode.String(buf.String()) -} - -func resourceAwsCodeBuildProjectSourceAuthHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - - if m["resource"] != nil { - buf.WriteString(fmt.Sprintf("%s-", m["resource"].(string))) - } - - return hashcode.String(buf.String()) -} - func environmentVariablesToMap(environmentVariables []*codebuild.EnvironmentVariable) []interface{} { envVariables := []interface{}{} if len(environmentVariables) > 0 { for _, env := range environmentVariables { item := map[string]interface{}{} - item["name"] = *env.Name - item["value"] = *env.Value + item["name"] = aws.StringValue(env.Name) + item["value"] = aws.StringValue(env.Value) if env.Type != nil { - item["type"] = *env.Type + item["type"] = aws.StringValue(env.Type) } envVariables = append(envVariables, item) } @@ -1626,10 +1533,10 @@ func environmentVariablesToMap(environmentVariables []*codebuild.EnvironmentVari func sourceAuthToMap(sourceAuth *codebuild.SourceAuth) map[string]interface{} { auth := map[string]interface{}{} - auth["type"] = *sourceAuth.Type + auth["type"] = aws.StringValue(sourceAuth.Type) if sourceAuth.Resource != nil { - auth["resource"] = *sourceAuth.Resource + auth["resource"] = aws.StringValue(sourceAuth.Resource) } return auth diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 7e9b5a95713..3ad5b58d9ca 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -42,7 +42,9 @@ func testAccAWSCodeBuildGitHubSourceLocationFromEnv() string { func TestAccAWSCodeBuildProject_basic(t *testing.T) { var project codebuild.Project rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + roleResourceName := "aws_iam_role.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, @@ -59,26 +61,26 @@ func TestAccAWSCodeBuildProject_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "build_timeout", "60"), resource.TestCheckResourceAttr(resourceName, "queued_timeout", "480"), resource.TestCheckResourceAttr(resourceName, "cache.#", "1"), - resource.TestCheckResourceAttr(resourceName, "cache.0.type", "NO_CACHE"), + resource.TestCheckResourceAttr(resourceName, "cache.0.type", codebuild.CacheTypeNoCache), resource.TestCheckResourceAttr(resourceName, "description", ""), - resource.TestMatchResourceAttr(resourceName, "encryption_key", regexp.MustCompile(`^arn:[^:]+:kms:[^:]+:[^:]+:alias/aws/s3$`)), + testAccCheckResourceAttrRegionalARN(resourceName, "encryption_key", "kms", "alias/aws/s3"), resource.TestCheckResourceAttr(resourceName, "environment.#", "1"), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.compute_type", "BUILD_GENERAL1_SMALL"), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.environment_variable.#", "0"), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.image", "2"), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.privileged_mode", "false"), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.type", "LINUX_CONTAINER"), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.image_pull_credentials_type", "CODEBUILD"), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", "ENABLED"), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", "DISABLED"), - resource.TestMatchResourceAttr(resourceName, "service_role", regexp.MustCompile(`^arn:[^:]+:iam::[^:]+:role/tf-acc-test-[0-9]+$`)), + resource.TestCheckResourceAttr(resourceName, "environment.0.compute_type", codebuild.ComputeTypeBuildGeneral1Small), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.#", "0"), + resource.TestCheckResourceAttr(resourceName, "environment.0.image", "2"), + resource.TestCheckResourceAttr(resourceName, "environment.0.privileged_mode", "false"), + resource.TestCheckResourceAttr(resourceName, "environment.0.type", codebuild.EnvironmentTypeLinuxContainer), + resource.TestCheckResourceAttr(resourceName, "environment.0.image_pull_credentials_type", codebuild.ImagePullCredentialsTypeCodebuild), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", codebuild.LogsConfigStatusTypeEnabled), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", codebuild.LogsConfigStatusTypeDisabled), + resource.TestCheckResourceAttrPair(resourceName, "service_role", roleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "source.#", "1"), - resource.TestCheckResourceAttr(resourceName, "source.1441597390.auth.#", "0"), - resource.TestCheckResourceAttr(resourceName, "source.1441597390.git_clone_depth", "0"), - resource.TestCheckResourceAttr(resourceName, "source.1441597390.insecure_ssl", "false"), - resource.TestCheckResourceAttr(resourceName, "source.1441597390.location", "https://github.com/hashibot-test/aws-test.git"), - resource.TestCheckResourceAttr(resourceName, "source.1441597390.report_build_status", "false"), - resource.TestCheckResourceAttr(resourceName, "source.1441597390.type", "GITHUB"), + resource.TestCheckResourceAttr(resourceName, "source.0.auth.#", "0"), + resource.TestCheckResourceAttr(resourceName, "source.0.git_clone_depth", "0"), + resource.TestCheckResourceAttr(resourceName, "source.0.insecure_ssl", "false"), + resource.TestCheckResourceAttr(resourceName, "source.0.location", "https://github.com/hashibot-test/aws-test.git"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "false"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "GITHUB"), resource.TestCheckResourceAttr(resourceName, "vpc_config.#", "0"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), @@ -200,11 +202,11 @@ func TestAccAWSCodeBuildProject_Cache(t *testing.T) { ExpectError: regexp.MustCompile(`cache location is required when cache type is "S3"`), }, { - Config: testAccAWSCodeBuildProjectConfig_Cache(rName, "", "NO_CACHE"), + Config: testAccAWSCodeBuildProjectConfig_Cache(rName, "", codebuild.CacheTypeNoCache), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), resource.TestCheckResourceAttr(resourceName, "cache.#", "1"), - resource.TestCheckResourceAttr(resourceName, "cache.0.type", "NO_CACHE"), + resource.TestCheckResourceAttr(resourceName, "cache.0.type", codebuild.CacheTypeNoCache), ), }, { @@ -217,7 +219,7 @@ func TestAccAWSCodeBuildProject_Cache(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), resource.TestCheckResourceAttr(resourceName, "cache.#", "1"), - resource.TestCheckResourceAttr(resourceName, "cache.0.type", "NO_CACHE"), + resource.TestCheckResourceAttr(resourceName, "cache.0.type", codebuild.CacheTypeNoCache), ), }, { @@ -243,7 +245,7 @@ func TestAccAWSCodeBuildProject_Cache(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), resource.TestCheckResourceAttr(resourceName, "cache.#", "1"), - resource.TestCheckResourceAttr(resourceName, "cache.0.type", "NO_CACHE"), + resource.TestCheckResourceAttr(resourceName, "cache.0.type", codebuild.CacheTypeNoCache), ), }, { @@ -350,10 +352,9 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable(t *testing.T) { CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_One(rName), + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_One(rName, "KEY1", "VALUE1"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project1), - resource.TestCheckResourceAttr(resourceName, "environment.1380979031.environment_variable.#", "1"), ), }, { @@ -362,10 +363,9 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Two(rName), + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Two(rName, "KEY1", "VALUE1UPDATED", "KEY2", "VALUE2"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project2), - resource.TestCheckResourceAttr(resourceName, "environment.4178155002.environment_variable.#", "2"), ), }, { @@ -377,7 +377,7 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Zero(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project3), - resource.TestCheckResourceAttr(resourceName, "environment.2300252877.environment_variable.#", "0"), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.#", "0"), ), }, { @@ -400,11 +400,11 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type(t *testing. CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Type(rName, "PLAINTEXT"), + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Type(rName, codebuild.EnvironmentVariableTypePlaintext), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "environment.4178155002.environment_variable.0.type", "PLAINTEXT"), - resource.TestCheckResourceAttr(resourceName, "environment.4178155002.environment_variable.1.type", "PLAINTEXT"), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.0.type", codebuild.EnvironmentVariableTypePlaintext), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.1.type", codebuild.EnvironmentVariableTypePlaintext), ), }, { @@ -413,13 +413,68 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type(t *testing. ImportStateVerify: true, }, { - Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Type(rName, "PARAMETER_STORE"), + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Type(rName, codebuild.EnvironmentVariableTypeParameterStore), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.0.type", codebuild.EnvironmentVariableTypePlaintext), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.1.type", codebuild.EnvironmentVariableTypeParameterStore), + ), + }, + { + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_Type(rName, codebuild.EnvironmentVariableTypeSecretsManager), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "environment.1701234421.environment_variable.0.type", "PLAINTEXT"), - resource.TestCheckResourceAttr(resourceName, "environment.1701234421.environment_variable.1.type", "PARAMETER_STORE"), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.0.type", codebuild.EnvironmentVariableTypePlaintext), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.1.type", codebuild.EnvironmentVariableTypeSecretsManager), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Value(t *testing.T) { + var project1, project2, project3 codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_One(rName, "KEY1", ""), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project1), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_One(rName, "KEY1", "VALUE1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project2), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCodeBuildProjectConfig_Environment_EnvironmentVariable_One(rName, "KEY1", ""), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project3), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -463,28 +518,28 @@ func TestAccAWSCodeBuildProject_LogsConfig_CloudWatchLogs(t *testing.T) { CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_LogsConfig_CloudWatchLogs(rName, "ENABLED", "group-name", ""), + Config: testAccAWSCodeBuildProjectConfig_LogsConfig_CloudWatchLogs(rName, codebuild.LogsConfigStatusTypeEnabled, "group-name", ""), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", codebuild.LogsConfigStatusTypeEnabled), resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.group_name", "group-name"), resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.stream_name", ""), ), }, { - Config: testAccAWSCodeBuildProjectConfig_LogsConfig_CloudWatchLogs(rName, "ENABLED", "group-name", "stream-name"), + Config: testAccAWSCodeBuildProjectConfig_LogsConfig_CloudWatchLogs(rName, codebuild.LogsConfigStatusTypeEnabled, "group-name", "stream-name"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", codebuild.LogsConfigStatusTypeEnabled), resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.group_name", "group-name"), resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.stream_name", "stream-name"), ), }, { - Config: testAccAWSCodeBuildProjectConfig_LogsConfig_CloudWatchLogs(rName, "DISABLED", "", ""), + Config: testAccAWSCodeBuildProjectConfig_LogsConfig_CloudWatchLogs(rName, codebuild.LogsConfigStatusTypeDisabled, "", ""), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.cloudwatch_logs.0.status", codebuild.LogsConfigStatusTypeDisabled), ), }, { @@ -508,28 +563,28 @@ func TestAccAWSCodeBuildProject_LogsConfig_S3Logs(t *testing.T) { CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_LogsConfig_S3Logs(rName, bName, "ENABLED", bName+"/build-log", false), + Config: testAccAWSCodeBuildProjectConfig_LogsConfig_S3Logs(rName, bName, codebuild.LogsConfigStatusTypeEnabled, bName+"/build-log", false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", codebuild.LogsConfigStatusTypeEnabled), resource.TestMatchResourceAttr(resourceName, "logs_config.0.s3_logs.0.location", regexp.MustCompile(`tf-acc-test-bucket-[0-9]+/build-log$`)), resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.encryption_disabled", "false"), ), }, { - Config: testAccAWSCodeBuildProjectConfig_LogsConfig_S3Logs(rName, bName, "ENABLED", bName+"/build-log", true), + Config: testAccAWSCodeBuildProjectConfig_LogsConfig_S3Logs(rName, bName, codebuild.LogsConfigStatusTypeEnabled, bName+"/build-log", true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", codebuild.LogsConfigStatusTypeEnabled), resource.TestMatchResourceAttr(resourceName, "logs_config.0.s3_logs.0.location", regexp.MustCompile(`tf-acc-test-bucket-[0-9]+/build-log$`)), resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.encryption_disabled", "true"), ), }, { - Config: testAccAWSCodeBuildProjectConfig_LogsConfig_S3Logs(rName, bName, "DISABLED", "", false), + Config: testAccAWSCodeBuildProjectConfig_LogsConfig_S3Logs(rName, bName, codebuild.LogsConfigStatusTypeDisabled, "", false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "logs_config.0.s3_logs.0.status", codebuild.LogsConfigStatusTypeDisabled), ), }, { @@ -559,9 +614,9 @@ func TestAccAWSCodeBuildProject_Source_Auth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_Auth(rName, "FAKERESOURCE1", "OAUTH"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3680505372.auth.#", "1"), - resource.TestCheckResourceAttr(resourceName, "source.3680505372.auth.2706882902.resource", "FAKERESOURCE1"), - resource.TestCheckResourceAttr(resourceName, "source.3680505372.auth.2706882902.type", "OAUTH"), + resource.TestCheckResourceAttr(resourceName, "source.0.auth.#", "1"), + resource.TestCheckResourceAttr(resourceName, "source.0.auth.0.resource", "FAKERESOURCE1"), + resource.TestCheckResourceAttr(resourceName, "source.0.auth.0.type", "OAUTH"), ), }, { @@ -587,7 +642,7 @@ func TestAccAWSCodeBuildProject_Source_GitCloneDepth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_GitCloneDepth(rName, 1), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.1181740906.git_clone_depth", "1"), + resource.TestCheckResourceAttr(resourceName, "source.0.git_clone_depth", "1"), ), }, { @@ -599,14 +654,49 @@ func TestAccAWSCodeBuildProject_Source_GitCloneDepth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_GitCloneDepth(rName, 2), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.974047921.git_clone_depth", "2"), + resource.TestCheckResourceAttr(resourceName, "source.0.git_clone_depth", "2"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_GitSubmodulesConfig_CodeCommit(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig_CodeCommit(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.0.git_submodules_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "source.0.git_submodules_config.0.fetch_submodules", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig_CodeCommit(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.0.git_submodules_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "source.0.git_submodules_config.0.fetch_submodules", "false"), ), }, }, }) } -func TestAccAWSCodeBuildProject_Source_GitSubmodulesConfig(t *testing.T) { +func TestAccAWSCodeBuildProject_Source_GitSubmodulesConfig_GitHub(t *testing.T) { var project codebuild.Project rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" @@ -617,11 +707,9 @@ func TestAccAWSCodeBuildProject_Source_GitSubmodulesConfig(t *testing.T) { CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig(rName, true), + Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig_GitHub(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3389748318.git_submodules_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "source.3389748318.git_submodules_config.0.fetch_submodules", "true"), ), }, { @@ -630,18 +718,16 @@ func TestAccAWSCodeBuildProject_Source_GitSubmodulesConfig(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig(rName, false), + Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig_GitHub(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3338377709.git_submodules_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "source.3338377709.git_submodules_config.0.fetch_submodules", "false"), ), }, }, }) } -func TestAccAWSCodeBuildProject_SecondarySources_GitSubmodulesConfig(t *testing.T) { +func TestAccAWSCodeBuildProject_Source_GitSubmodulesConfig_GitHubEnterprise(t *testing.T) { var project codebuild.Project rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" @@ -652,13 +738,9 @@ func TestAccAWSCodeBuildProject_SecondarySources_GitSubmodulesConfig(t *testing. CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig(rName, true), + Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig_GitHubEnterprise(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.2336845252.git_submodules_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.2336845252.git_submodules_config.0.fetch_submodules", "true"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.2080741754.git_submodules_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.2080741754.git_submodules_config.0.fetch_submodules", "true"), ), }, { @@ -667,13 +749,111 @@ func TestAccAWSCodeBuildProject_SecondarySources_GitSubmodulesConfig(t *testing. ImportStateVerify: true, }, { - Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig(rName, false), + Config: testAccAWSCodeBuildProjectConfig_Source_GitSubmodulesConfig_GitHubEnterprise(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_SecondarySources_GitSubmodulesConfig_CodeCommit(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig_CodeCommit(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.1861191586.git_submodules_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.1861191586.git_submodules_config.0.fetch_submodules", "true"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.55827772.git_submodules_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.55827772.git_submodules_config.0.fetch_submodules", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig_CodeCommit(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.1497918817.git_submodules_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.1497918817.git_submodules_config.0.fetch_submodules", "false"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.1887486300.git_submodules_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.1887486300.git_submodules_config.0.fetch_submodules", "false"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_SecondarySources_GitSubmodulesConfig_GitHub(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig_GitHub(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig_GitHub(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_SecondarySources_GitSubmodulesConfig_GitHubEnterprise(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig_GitHubEnterprise(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCodeBuildProjectConfig_SecondarySources_GitSubmodulesConfig_GitHubEnterprise(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.3511868825.git_submodules_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.3511868825.git_submodules_config.0.fetch_submodules", "false"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.1651171204.git_submodules_config.#", "1"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.1651171204.git_submodules_config.0.fetch_submodules", "false"), ), }, }, @@ -694,7 +874,7 @@ func TestAccAWSCodeBuildProject_Source_InsecureSSL(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_InsecureSSL(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.1976396802.insecure_ssl", "true"), + resource.TestCheckResourceAttr(resourceName, "source.0.insecure_ssl", "true"), ), }, { @@ -706,7 +886,7 @@ func TestAccAWSCodeBuildProject_Source_InsecureSSL(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_InsecureSSL(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3680505372.insecure_ssl", "false"), + resource.TestCheckResourceAttr(resourceName, "source.0.insecure_ssl", "false"), ), }, }, @@ -727,7 +907,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus_Bitbucket(t *testing.T) Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus_Bitbucket(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.2876219937.report_build_status", "true"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "true"), ), }, { @@ -739,7 +919,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus_Bitbucket(t *testing.T) Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus_Bitbucket(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3210444828.report_build_status", "false"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "false"), ), }, }, @@ -760,7 +940,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHub(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus_GitHub(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.4215890488.report_build_status", "true"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "true"), ), }, { @@ -772,7 +952,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHub(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus_GitHub(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3680505372.report_build_status", "false"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "false"), ), }, }, @@ -793,7 +973,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHubEnterprise(t *tes Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus_GitHubEnterprise(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.2964899175.report_build_status", "true"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "true"), ), }, { @@ -805,7 +985,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHubEnterprise(t *tes Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus_GitHubEnterprise(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.553628638.report_build_status", "false"), + resource.TestCheckResourceAttr(resourceName, "source.0.report_build_status", "false"), ), }, }, @@ -826,7 +1006,7 @@ func TestAccAWSCodeBuildProject_Source_Type_Bitbucket(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_Type_Bitbucket(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3210444828.type", "BITBUCKET"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "BITBUCKET"), ), }, { @@ -852,7 +1032,7 @@ func TestAccAWSCodeBuildProject_Source_Type_CodeCommit(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_Type_CodeCommit(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3715340088.type", "CODECOMMIT"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "CODECOMMIT"), ), }, { @@ -878,7 +1058,7 @@ func TestAccAWSCodeBuildProject_Source_Type_CodePipeline(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_Type_CodePipeline(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.2280907000.type", "CODEPIPELINE"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "CODEPIPELINE"), ), }, { @@ -904,7 +1084,7 @@ func TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_Type_GitHubEnterprise(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.553628638.type", "GITHUB_ENTERPRISE"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "GITHUB_ENTERPRISE"), ), }, { @@ -961,7 +1141,7 @@ phases: Config: testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName, "", rBuildspec), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.2726343112.type", "NO_SOURCE"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "NO_SOURCE"), ), }, { @@ -989,7 +1169,7 @@ phases: Steps: []resource.TestStep{ { Config: testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName, "", ""), - ExpectError: regexp.MustCompile("`build_spec` must be set when source's `type` is `NO_SOURCE`"), + ExpectError: regexp.MustCompile("`buildspec` must be set when source's `type` is `NO_SOURCE`"), }, { Config: testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName, "location", rBuildspec), @@ -1097,12 +1277,12 @@ func TestAccAWSCodeBuildProject_WindowsContainer(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), resource.TestCheckResourceAttr(resourceName, "environment.#", "1"), - resource.TestCheckResourceAttr(resourceName, "environment.2306861956.compute_type", "BUILD_GENERAL1_MEDIUM"), - resource.TestCheckResourceAttr(resourceName, "environment.2306861956.environment_variable.#", "0"), - resource.TestCheckResourceAttr(resourceName, "environment.2306861956.image", "2"), - resource.TestCheckResourceAttr(resourceName, "environment.2306861956.privileged_mode", "false"), - resource.TestCheckResourceAttr(resourceName, "environment.2306861956.image_pull_credentials_type", "CODEBUILD"), - resource.TestCheckResourceAttr(resourceName, "environment.2306861956.type", "WINDOWS_CONTAINER"), + resource.TestCheckResourceAttr(resourceName, "environment.0.compute_type", codebuild.ComputeTypeBuildGeneral1Medium), + resource.TestCheckResourceAttr(resourceName, "environment.0.environment_variable.#", "0"), + resource.TestCheckResourceAttr(resourceName, "environment.0.image", "2"), + resource.TestCheckResourceAttr(resourceName, "environment.0.privileged_mode", "false"), + resource.TestCheckResourceAttr(resourceName, "environment.0.image_pull_credentials_type", codebuild.ImagePullCredentialsTypeCodebuild), + resource.TestCheckResourceAttr(resourceName, "environment.0.type", codebuild.EnvironmentTypeWindowsContainer), ), }, { @@ -1510,9 +1690,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_ArtifactIdentifier(t *testing hash2 := artifactHash(artifactIdentifier2, "false", bName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_ArtifactIdentifier(rName, bName, artifactIdentifier1), @@ -1549,9 +1730,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_OverrideArtifactName(t *testi hash2 := artifactHash("secondaryArtifact1", "false", bName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_OverrideArtifactName(rName, bName, true), @@ -1588,9 +1770,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_EncryptionDisabled(t *testing hash2 := artifactHash("secondaryArtifact1", "false", bName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_EncryptionDisabled(rName, bName, true), @@ -1628,9 +1811,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_Location(t *testing.T) { hash2 := artifactHash("secondaryArtifact1", "false", bName2, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_Location(rName, bName), @@ -1710,9 +1894,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_NamespaceType(t *testing.T) { hash2 := artifactHash("secondaryArtifact1", "false", rName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_NamespaceType(rName, codebuild.ArtifactNamespaceBuildId), @@ -1748,9 +1933,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_Packaging(t *testing.T) { hash2 := artifactHash("secondaryArtifact1", "false", rName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_Packaging(rName, codebuild.ArtifactPackagingZip), @@ -1789,9 +1975,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_Path(t *testing.T) { hash2 := artifactHash("secondaryArtifact1", "false", rName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, path2, codebuild.ArtifactsTypeS3) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_Path(rName, path1), @@ -1829,9 +2016,10 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts_Type(t *testing.T) { hash1 := artifactHash("secondaryArtifact1", "false", bName, codebuild.ArtifactNamespaceNone, "false", codebuild.ArtifactPackagingNone, "", type1) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodebuildProjectConfig_SecondaryArtifacts_Type(rName, bName, type1), @@ -1856,17 +2044,18 @@ func TestAccAWSCodeBuildProject_SecondarySources_CodeCommit(t *testing.T) { resourceName := "aws_codebuild_project.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodeBuild(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCodeBuildProjectConfig_SecondarySources_CodeCommit(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3715340088.type", "CODECOMMIT"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.493771744.source_identifier", "secondarySource1"), - resource.TestCheckResourceAttr(resourceName, "secondary_sources.1385902896.source_identifier", "secondarySource2"), + resource.TestCheckResourceAttr(resourceName, "source.0.type", "CODECOMMIT"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.2212771807.source_identifier", "secondarySource1"), + resource.TestCheckResourceAttr(resourceName, "secondary_sources.3160583991.source_identifier", "secondarySource2"), ), }, { @@ -2049,7 +2238,7 @@ EOF } resource "aws_iam_role_policy" "test" { - role = "${aws_iam_role.test.name}" + role = aws_iam_role.test.name policy = < 0 { action.RunOrder = aws.Int64(int64(ro)) } + r := data["region"].(string) + if r != "" { + action.Region = aws.String(r) + } + ns := data["namespace"].(string) + if len(ns) > 0 { + action.Namespace = aws.String(ns) + } actions = append(actions, &action) } return actions @@ -360,6 +438,14 @@ func flattenAwsCodePipelineStageActions(actions []*codepipeline.ActionDeclaratio values["run_order"] = int(*action.RunOrder) } + if action.Region != nil { + values["region"] = *action.Region + } + + if action.Namespace != nil { + values["namespace"] = aws.StringValue(action.Namespace) + } + actionsList = append(actionsList, values) } return actionsList @@ -426,6 +512,8 @@ func flattenAwsCodePipelineActionsInputArtifacts(artifacts []*codepipeline.Input func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + resp, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ Name: aws.String(d.Id()), }) @@ -443,8 +531,14 @@ func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error metadata := resp.Metadata pipeline := resp.Pipeline - if err := d.Set("artifact_store", flattenAwsCodePipelineArtifactStore(pipeline.ArtifactStore)); err != nil { - return err + if pipeline.ArtifactStore != nil { + if err := d.Set("artifact_store", flattenAwsCodePipelineArtifactStore(pipeline.ArtifactStore)); err != nil { + return err + } + } else if pipeline.ArtifactStores != nil { + if err := d.Set("artifact_store", flattenAwsCodePipelineArtifactStores(pipeline.ArtifactStores)); err != nil { + return err + } } if err := d.Set("stage", flattenAwsCodePipelineStages(pipeline.Stages)); err != nil { @@ -462,7 +556,7 @@ func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for Codepipeline (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -472,11 +566,14 @@ func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error func resourceAwsCodePipelineUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn - pipeline := expandAwsCodePipeline(d) + pipeline, err := expandAwsCodePipeline(d) + if err != nil { + return err + } params := &codepipeline.UpdatePipelineInput{ Pipeline: pipeline, } - _, err := conn.UpdatePipeline(params) + _, err = conn.UpdatePipeline(params) if err != nil { return fmt.Errorf( diff --git a/aws/resource_aws_codepipeline_test.go b/aws/resource_aws_codepipeline_test.go index 22bb36b486a..e55e613136c 100644 --- a/aws/resource_aws_codepipeline_test.go +++ b/aws/resource_aws_codepipeline_test.go @@ -10,14 +10,12 @@ import ( "github.com/aws/aws-sdk-go/service/codepipeline" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccAWSCodePipeline_basic(t *testing.T) { - if os.Getenv("GITHUB_TOKEN") == "" { - t.Skip("Environment variable GITHUB_TOKEN is not set") - } - + var p1, p2 codepipeline.PipelineDeclaration name := acctest.RandString(10) resourceName := "aws_codepipeline.test" @@ -29,12 +27,46 @@ func TestAccAWSCodePipeline_basic(t *testing.T) { { Config: testAccAWSCodePipelineConfig_basic(name), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), - resource.TestMatchResourceAttr(resourceName, "arn", - regexp.MustCompile(fmt.Sprintf("^arn:aws:codepipeline:[^:]+:[0-9]{12}:test-pipeline-%s", name))), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.type", "S3"), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.encryption_key.0.id", "1234"), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.encryption_key.0.type", "KMS"), + testAccCheckAWSCodePipelineExists(resourceName, &p1), + resource.TestCheckResourceAttrPair(resourceName, "role_arn", "aws_iam_role.codepipeline_role", "arn"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "codepipeline", regexp.MustCompile(fmt.Sprintf("test-pipeline-%s", name))), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "1"), + + resource.TestCheckResourceAttr(resourceName, "stage.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "stage.0.name", "Source"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.name", "Source"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.category", "Source"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.owner", "ThirdParty"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.provider", "GitHub"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.version", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.input_artifacts.#", "0"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.output_artifacts.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.output_artifacts.0", "test"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.%", "3"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.Owner", "lifesum-terraform"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.Repo", "test"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.Branch", "master"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.role_arn", ""), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.run_order", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.region", ""), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.category", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.owner", "AWS"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.provider", "CodeBuild"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.version", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.input_artifacts.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.input_artifacts.0", "test"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.output_artifacts.#", "0"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.configuration.%", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.configuration.ProjectName", "test"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.role_arn", ""), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.run_order", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", ""), ), }, { @@ -45,21 +77,41 @@ func TestAccAWSCodePipeline_basic(t *testing.T) { { Config: testAccAWSCodePipelineConfig_basicUpdated(name), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.type", "S3"), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.encryption_key.0.id", "4567"), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.encryption_key.0.type", "KMS"), + testAccCheckAWSCodePipelineExists(resourceName, &p2), + + resource.TestCheckResourceAttr(resourceName, "stage.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "stage.0.name", "Source"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.name", "Source"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.input_artifacts.#", "0"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.output_artifacts.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.output_artifacts.0", "artifacts"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.%", "3"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.Owner", "test-terraform"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.Repo", "test-repo"), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.configuration.Branch", "stable"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.input_artifacts.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.input_artifacts.0", "artifacts"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.configuration.%", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.configuration.ProjectName", "test"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAWSCodePipeline_emptyArtifacts(t *testing.T) { - if os.Getenv("GITHUB_TOKEN") == "" { - t.Skip("Environment variable GITHUB_TOKEN is not set") - } - +func TestAccAWSCodePipeline_emptyStageArtifacts(t *testing.T) { + var p codepipeline.PipelineDeclaration name := acctest.RandString(10) resourceName := "aws_codepipeline.test" @@ -69,12 +121,12 @@ func TestAccAWSCodePipeline_emptyArtifacts(t *testing.T) { CheckDestroy: testAccCheckAWSCodePipelineDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodePipelineConfig_emptyArtifacts(name), + Config: testAccAWSCodePipelineConfig_emptyStageArtifacts(name), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), - resource.TestMatchResourceAttr(resourceName, "arn", - regexp.MustCompile(fmt.Sprintf("^arn:aws:codepipeline:[^:]+:[0-9]{12}:test-pipeline-%s", name))), - resource.TestCheckResourceAttr(resourceName, "artifact_store.0.type", "S3"), + testAccCheckAWSCodePipelineExists(resourceName, &p), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "codepipeline", regexp.MustCompile(fmt.Sprintf("test-pipeline-%s$", name))), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.#", "2"), resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "1"), resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), @@ -96,10 +148,7 @@ func TestAccAWSCodePipeline_emptyArtifacts(t *testing.T) { } func TestAccAWSCodePipeline_deployWithServiceRole(t *testing.T) { - if os.Getenv("GITHUB_TOKEN") == "" { - t.Skip("Environment variable GITHUB_TOKEN is not set") - } - + var p codepipeline.PipelineDeclaration name := acctest.RandString(10) resourceName := "aws_codepipeline.test" @@ -111,12 +160,10 @@ func TestAccAWSCodePipeline_deployWithServiceRole(t *testing.T) { { Config: testAccAWSCodePipelineConfig_deployWithServiceRole(name), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), + testAccCheckAWSCodePipelineExists(resourceName, &p), resource.TestCheckResourceAttr(resourceName, "stage.2.name", "Deploy"), resource.TestCheckResourceAttr(resourceName, "stage.2.action.0.category", "Deploy"), - resource.TestMatchResourceAttr( - resourceName, "stage.2.action.0.role_arn", - regexp.MustCompile("^arn:aws:iam::[0-9]{12}:role/codepipeline-action-role.*")), + resource.TestCheckResourceAttrPair(resourceName, "stage.2.action.0.role_arn", "aws_iam_role.codepipeline_action_role", "arn"), ), }, { @@ -129,10 +176,7 @@ func TestAccAWSCodePipeline_deployWithServiceRole(t *testing.T) { } func TestAccAWSCodePipeline_tags(t *testing.T) { - if os.Getenv("GITHUB_TOKEN") == "" { - t.Skip("Environment variable GITHUB_TOKEN is not set") - } - + var p1, p2, p3 codepipeline.PipelineDeclaration name := acctest.RandString(10) resourceName := "aws_codepipeline.test" @@ -144,7 +188,7 @@ func TestAccAWSCodePipeline_tags(t *testing.T) { { Config: testAccAWSCodePipelineConfigWithTags(name, "tag1value", "tag2value"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), + testAccCheckAWSCodePipelineExists(resourceName, &p1), resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), resource.TestCheckResourceAttr(resourceName, "tags.Name", fmt.Sprintf("test-pipeline-%s", name)), resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), @@ -159,7 +203,7 @@ func TestAccAWSCodePipeline_tags(t *testing.T) { { Config: testAccAWSCodePipelineConfigWithTags(name, "tag1valueUpdate", "tag2valueUpdate"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), + testAccCheckAWSCodePipelineExists(resourceName, &p2), resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), resource.TestCheckResourceAttr(resourceName, "tags.Name", fmt.Sprintf("test-pipeline-%s", name)), resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1valueUpdate"), @@ -174,7 +218,7 @@ func TestAccAWSCodePipeline_tags(t *testing.T) { { Config: testAccAWSCodePipelineConfig_basic(name), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodePipelineExists(resourceName), + testAccCheckAWSCodePipelineExists(resourceName, &p3), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, @@ -182,7 +226,199 @@ func TestAccAWSCodePipeline_tags(t *testing.T) { }) } -func testAccCheckAWSCodePipelineExists(n string) resource.TestCheckFunc { +func TestAccAWSCodePipeline_multiregion_basic(t *testing.T) { + var p codepipeline.PipelineDeclaration + resourceName := "aws_codepipeline.test" + var providers []*schema.Provider + + name := acctest.RandString(10) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + testAccPreCheckAWSCodePipeline(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineConfig_multiregion(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.name", fmt.Sprintf("%s-Build", testAccGetAlternateRegion())), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.region", testAccGetAlternateRegion()), + ), + }, + { + Config: testAccAWSCodePipelineConfig_multiregion(name), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSCodePipeline_multiregion_Update(t *testing.T) { + var p1, p2 codepipeline.PipelineDeclaration + resourceName := "aws_codepipeline.test" + var providers []*schema.Provider + + name := acctest.RandString(10) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + testAccPreCheckAWSCodePipeline(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineConfig_multiregion(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p1), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.name", fmt.Sprintf("%s-Build", testAccGetAlternateRegion())), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.region", testAccGetAlternateRegion()), + ), + }, + { + Config: testAccAWSCodePipelineConfig_multiregionUpdated(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p2), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "BuildUpdated"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.name", fmt.Sprintf("%s-BuildUpdated", testAccGetAlternateRegion())), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.region", testAccGetAlternateRegion()), + ), + }, + { + Config: testAccAWSCodePipelineConfig_multiregionUpdated(name), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSCodePipeline_multiregion_ConvertSingleRegion(t *testing.T) { + var p1, p2 codepipeline.PipelineDeclaration + resourceName := "aws_codepipeline.test" + var providers []*schema.Provider + + name := acctest.RandString(10) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + testAccPreCheckAWSCodePipeline(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineConfig_basic(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p1), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "1"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", ""), + ), + }, + { + Config: testAccAWSCodePipelineConfig_multiregion(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p2), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.name", fmt.Sprintf("%s-Build", testAccGetAlternateRegion())), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.1.region", testAccGetAlternateRegion()), + ), + }, + { + Config: testAccAWSCodePipelineConfig_backToBasic(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p1), + resource.TestCheckResourceAttr(resourceName, "artifact_store.#", "1"), + + resource.TestCheckResourceAttr(resourceName, "stage.1.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.name", "Build"), + resource.TestCheckResourceAttr(resourceName, "stage.1.action.0.region", testAccGetRegion()), + ), + }, + { + Config: testAccAWSCodePipelineConfig_backToBasic(name), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSCodePipelineWithNamespace(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + + var p1 codepipeline.PipelineDeclaration + name := acctest.RandString(10) + resourceName := "aws_codepipeline.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCodePipeline(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineConfigWithNamespace(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists(resourceName, &p1), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "codepipeline", regexp.MustCompile(fmt.Sprintf("test-pipeline-%s", name))), + resource.TestCheckResourceAttr(resourceName, "stage.0.action.0.namespace", "SourceVariables"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSCodePipelineExists(n string, pipeline *codepipeline.PipelineDeclaration) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -195,11 +431,16 @@ func testAccCheckAWSCodePipelineExists(n string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*AWSClient).codepipelineconn - _, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ + out, err := conn.GetPipeline(&codepipeline.GetPipelineInput{ Name: aws.String(rs.Primary.ID), }) + if err != nil { + return err + } - return err + *pipeline = *out.Pipeline + + return nil } } @@ -218,13 +459,20 @@ func testAccCheckAWSCodePipelineDestroy(s *terraform.State) error { if err == nil { return fmt.Errorf("Expected AWS CodePipeline to be gone, but was still found") } - return nil + if isAWSErr(err, "PipelineNotFoundException", "") { + continue + } + return err } - return fmt.Errorf("Default error in CodePipeline Test") + return nil } func testAccPreCheckAWSCodePipeline(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + conn := testAccProvider.Meta().(*AWSClient).codepipelineconn input := &codepipeline.ListPipelinesInput{} @@ -240,13 +488,8 @@ func testAccPreCheckAWSCodePipeline(t *testing.T) { } } -func testAccAWSCodePipelineConfig_basic(rName string) string { +func testAccAWSCodePipelineServiceIAMRole(rName string) string { return fmt.Sprintf(` -resource "aws_s3_bucket" "foo" { - bucket = "tf-test-pipeline-%s" - acl = "private" -} - resource "aws_iam_role" "codepipeline_role" { name = "codepipeline-role-%s" @@ -282,8 +525,8 @@ resource "aws_iam_role_policy" "codepipeline_policy" { "s3:GetBucketVersioning" ], "Resource": [ - "${aws_s3_bucket.foo.arn}", - "${aws_s3_bucket.foo.arn}/*" + "${aws_s3_bucket.test.arn}", + "${aws_s3_bucket.test.arn}/*" ] }, { @@ -298,67 +541,11 @@ resource "aws_iam_role_policy" "codepipeline_policy" { } EOF } - -resource "aws_codepipeline" "test" { - name = "test-pipeline-%s" - role_arn = "${aws_iam_role.codepipeline_role.arn}" - - artifact_store { - location = "${aws_s3_bucket.foo.bucket}" - type = "S3" - - encryption_key { - id = "1234" - type = "KMS" - } - } - - stage { - name = "Source" - - action { - name = "Source" - category = "Source" - owner = "ThirdParty" - provider = "GitHub" - version = "1" - output_artifacts = ["test"] - - configuration = { - Owner = "lifesum-terraform" - Repo = "test" - Branch = "master" - } - } - } - - stage { - name = "Build" - - action { - name = "Build" - category = "Build" - owner = "AWS" - provider = "CodeBuild" - input_artifacts = ["test"] - version = "1" - - configuration = { - ProjectName = "test" - } - } - } -} -`, rName, rName, rName) +`, rName) } -func testAccAWSCodePipelineConfig_basicUpdated(rName string) string { +func testAccAWSCodePipelineServiceIAMRoleWithAssumeRole(rName string) string { return fmt.Sprintf(` -resource "aws_s3_bucket" "foo" { - bucket = "tf-test-pipeline-%s" - acl = "private" -} - resource "aws_iam_role" "codepipeline_role" { name = "codepipeline-role-%s" @@ -394,8 +581,8 @@ resource "aws_iam_role_policy" "codepipeline_policy" { "s3:GetBucketVersioning" ], "Resource": [ - "${aws_s3_bucket.foo.arn}", - "${aws_s3_bucket.foo.arn}/*" + "${aws_s3_bucket.test.arn}", + "${aws_s3_bucket.test.arn}/*" ] }, { @@ -405,22 +592,36 @@ resource "aws_iam_role_policy" "codepipeline_policy" { "codebuild:StartBuild" ], "Resource": "*" + }, + { + "Effect": "Allow", + "Action": [ + "sts:AssumeRole" + ], + "Resource": "${aws_iam_role.codepipeline_action_role.arn}" } ] } EOF } +`, rName) +} +func testAccAWSCodePipelineConfig_basic(rName string) string { + return composeConfig( + testAccAWSCodePipelineS3DefaultBucket(rName), + testAccAWSCodePipelineServiceIAMRole(rName), + fmt.Sprintf(` resource "aws_codepipeline" "test" { name = "test-pipeline-%s" role_arn = "${aws_iam_role.codepipeline_role.arn}" artifact_store { - location = "${aws_s3_bucket.foo.bucket}" + location = "${aws_s3_bucket.test.bucket}" type = "S3" encryption_key { - id = "4567" + id = "1234" type = "KMS" } } @@ -434,12 +635,12 @@ resource "aws_codepipeline" "test" { owner = "ThirdParty" provider = "GitHub" version = "1" - output_artifacts = ["bar"] + output_artifacts = ["test"] configuration = { - Owner = "foo-terraform" - Repo = "bar" - Branch = "stable" + Owner = "lifesum-terraform" + Repo = "test" + Branch = "master" } } } @@ -452,83 +653,88 @@ resource "aws_codepipeline" "test" { category = "Build" owner = "AWS" provider = "CodeBuild" - input_artifacts = ["bar"] + input_artifacts = ["test"] version = "1" configuration = { - ProjectName = "foo" + ProjectName = "test" } } } } -`, rName, rName, rName) -} - -func testAccAWSCodePipelineConfig_emptyArtifacts(rName string) string { - return fmt.Sprintf(` -resource "aws_s3_bucket" "foo" { - bucket = "tf-test-pipeline-%s" - acl = "private" +`, rName)) } -resource "aws_iam_role" "codepipeline_role" { - name = "codepipeline-role-%s" +func testAccAWSCodePipelineConfig_basicUpdated(rName string) string { + return composeConfig( + testAccAWSCodePipelineS3DefaultBucket(rName), + testAccAWSCodePipelineS3Bucket("updated", rName), + testAccAWSCodePipelineServiceIAMRole(rName), + fmt.Sprintf(` +resource "aws_codepipeline" "test" { + name = "test-pipeline-%s" + role_arn = "${aws_iam_role.codepipeline_role.arn}" - assume_role_policy = <", "DEVELOPER"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "email_configuration.#", "1"), resource.TestCheckResourceAttr(resourceName, "email_configuration.0.reply_to_email_address", replyTo), resource.TestCheckResourceAttr(resourceName, "email_configuration.0.email_sending_account", "DEVELOPER"), resource.TestCheckResourceAttr(resourceName, "email_configuration.0.source_arn", sourceARN), + resource.TestCheckResourceAttr(resourceName, "email_configuration.0.from_email_address", "John Smith "), ), }, }, @@ -776,9 +778,10 @@ func TestAccAWSCognitoUserPool_withAliasAttributes(t *testing.T) { resourceName := "aws_cognito_user_pool.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCognitoIdentityProvider(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCognitoIdentityProvider(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCognitoUserPoolConfig_withAliasAttributes(name), @@ -851,6 +854,40 @@ func TestAccAWSCognitoUserPool_withPasswordPolicy(t *testing.T) { }) } +func TestAccAWSCognitoUserPool_withUsernameConfiguration(t *testing.T) { + name := acctest.RandString(5) + resourceName := "aws_cognito_user_pool.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCognitoIdentityProvider(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCognitoUserPoolConfig_withUsernameConfiguration(name), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserPoolExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "username_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "username_configuration.0.case_sensitive", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSCognitoUserPoolConfig_withUsernameConfigurationUpdated(name), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserPoolExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "username_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "username_configuration.0.case_sensitive", "false"), + ), + }, + }, + }) +} + func TestAccAWSCognitoUserPool_withLambdaConfig(t *testing.T) { name := acctest.RandString(5) resourceName := "aws_cognito_user_pool.test" @@ -907,9 +944,10 @@ func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { resourceName := "aws_cognito_user_pool.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCognitoIdentityProvider(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSCognitoIdentityProvider(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSCognitoUserPoolConfig_withSchemaAttributes(name), @@ -1473,7 +1511,7 @@ resource "aws_cognito_user_pool" "test" { `, name, tagKey1, tagValue1, tagKey2, tagValue2) } -func testAccAWSCognitoUserPoolConfig_withEmailConfiguration(name, email, arn, account string) string { +func testAccAWSCognitoUserPoolConfig_withEmailConfiguration(name, email, arn, from, account string) string { return fmt.Sprintf(` resource "aws_cognito_user_pool" "test" { name = "terraform-test-pool-%[1]s" @@ -1482,9 +1520,10 @@ resource "aws_cognito_user_pool" "test" { email_configuration { reply_to_email_address = %[2]q source_arn = %[3]q - email_sending_account = %[4]q + from_email_address = %[4]q + email_sending_account = %[5]q } - }`, name, email, arn, account) + }`, name, email, arn, from, account) } func testAccAWSCognitoUserPoolConfig_withAliasAttributes(name string) string { @@ -1563,6 +1602,30 @@ resource "aws_cognito_user_pool" "test" { `, name) } +func testAccAWSCognitoUserPoolConfig_withUsernameConfiguration(name string) string { + return fmt.Sprintf(` +resource "aws_cognito_user_pool" "test" { + name = "terraform-test-pool-%s" + + username_configuration { + case_sensitive = true + } +} +`, name) +} + +func testAccAWSCognitoUserPoolConfig_withUsernameConfigurationUpdated(name string) string { + return fmt.Sprintf(` +resource "aws_cognito_user_pool" "test" { + name = "terraform-test-pool-%s" + + username_configuration { + case_sensitive = false + } +} +`, name) +} + func testAccAWSCognitoUserPoolConfig_withLambdaConfig(name string) string { return fmt.Sprintf(` resource "aws_iam_role" "test" { diff --git a/aws/resource_aws_config_aggregate_authorization.go b/aws/resource_aws_config_aggregate_authorization.go index 8eb59b988c2..7f6663ece8e 100644 --- a/aws/resource_aws_config_aggregate_authorization.go +++ b/aws/resource_aws_config_aggregate_authorization.go @@ -67,6 +67,7 @@ func resourceAwsConfigAggregateAuthorizationPut(d *schema.ResourceData, meta int func resourceAwsConfigAggregateAuthorizationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).configconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig accountId, region, err := resourceAwsConfigAggregateAuthorizationParseID(d.Id()) if err != nil { @@ -103,7 +104,7 @@ func resourceAwsConfigAggregateAuthorizationRead(d *schema.ResourceData, meta in return fmt.Errorf("error listing tags for Config Aggregate Authorization (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_config_aggregate_authorization_test.go b/aws/resource_aws_config_aggregate_authorization_test.go index 4d84475ab40..f2990534e1e 100644 --- a/aws/resource_aws_config_aggregate_authorization_test.go +++ b/aws/resource_aws_config_aggregate_authorization_test.go @@ -61,6 +61,8 @@ func TestAccAWSConfigAggregateAuthorization_basic(t *testing.T) { rString := acctest.RandStringFromCharSet(12, "0123456789") resourceName := "aws_config_aggregate_authorization.example" + region := "eu-west-1" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -70,8 +72,8 @@ func TestAccAWSConfigAggregateAuthorization_basic(t *testing.T) { Config: testAccAWSConfigAggregateAuthorizationConfig_basic(rString), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "account_id", rString), - resource.TestCheckResourceAttr(resourceName, "region", "eu-west-1"), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:aws:config:[\w-]+:\d{12}:aggregation-authorization/\d{12}/[\w-]+$`)), + resource.TestCheckResourceAttr(resourceName, "region", region), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "config", regexp.MustCompile(fmt.Sprintf(`aggregation-authorization/%s/%s$`, rString, region))), ), }, { diff --git a/aws/resource_aws_config_config_rule.go b/aws/resource_aws_config_config_rule.go index 2c552a85f32..83605a1dc40 100644 --- a/aws/resource_aws_config_config_rule.go +++ b/aws/resource_aws_config_config_rule.go @@ -49,7 +49,7 @@ func resourceAwsConfigConfigRule() *schema.Resource { "input_parameters": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "maximum_execution_frequency": { Type: schema.TypeString, @@ -205,6 +205,7 @@ func resourceAwsConfigConfigRulePut(d *schema.ResourceData, meta interface{}) er func resourceAwsConfigConfigRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).configconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig out, err := conn.DescribeConfigRules(&configservice.DescribeConfigRulesInput{ ConfigRuleNames: []*string{aws.String(d.Id())}, @@ -252,7 +253,7 @@ func resourceAwsConfigConfigRuleRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error listing tags for Config Config Rule (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_config_config_rule_test.go b/aws/resource_aws_config_config_rule_test.go index fba3f26499f..c57cbfe1bdb 100644 --- a/aws/resource_aws_config_config_rule_test.go +++ b/aws/resource_aws_config_config_rule_test.go @@ -41,22 +41,21 @@ func testAccConfigConfigRule_ownerAws(t *testing.T) { var cr configservice.ConfigRule rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_config_config_rule.test" - expectedArn := regexp.MustCompile("arn:aws:config:[a-z0-9-]+:[0-9]{12}:config-rule/config-rule-([a-z0-9]+)") - expectedRuleId := regexp.MustCompile("config-rule-[a-z0-9]+") resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckConfigConfigRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckConfigConfigRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccConfigConfigRuleConfig_ownerAws(rName), Check: resource.ComposeTestCheckFunc( testAccCheckConfigConfigRuleExists(resourceName, &cr), testAccCheckConfigConfigRuleName(resourceName, rName, &cr), - resource.TestMatchResourceAttr(resourceName, "arn", expectedArn), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "config", regexp.MustCompile("config-rule/config-rule-[a-z0-9]+$")), resource.TestCheckResourceAttr(resourceName, "name", rName), - resource.TestMatchResourceAttr(resourceName, "rule_id", expectedRuleId), + resource.TestMatchResourceAttr(resourceName, "rule_id", regexp.MustCompile("config-rule-[a-z0-9]+$")), resource.TestCheckResourceAttr(resourceName, "description", "Terraform Acceptance tests"), resource.TestCheckResourceAttr(resourceName, "source.#", "1"), resource.TestCheckResourceAttr(resourceName, "source.0.owner", "AWS"), @@ -75,38 +74,37 @@ func testAccConfigConfigRule_ownerAws(t *testing.T) { func testAccConfigConfigRule_customlambda(t *testing.T) { var cr configservice.ConfigRule rInt := acctest.RandInt() + resourceName := "aws_config_config_rule.test" expectedName := fmt.Sprintf("tf-acc-test-%d", rInt) path := "test-fixtures/lambdatest.zip" - expectedArn := regexp.MustCompile("arn:aws:config:[a-z0-9-]+:[0-9]{12}:config-rule/config-rule-([a-z0-9]+)") - expectedFunctionArn := regexp.MustCompile(fmt.Sprintf("arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:tf_acc_lambda_awsconfig_%d", rInt)) - expectedRuleId := regexp.MustCompile("config-rule-[a-z0-9]+") resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckConfigConfigRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckConfigConfigRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccConfigConfigRuleConfig_customLambda(rInt, path), Check: resource.ComposeTestCheckFunc( - testAccCheckConfigConfigRuleExists("aws_config_config_rule.foo", &cr), - testAccCheckConfigConfigRuleName("aws_config_config_rule.foo", expectedName, &cr), - resource.TestMatchResourceAttr("aws_config_config_rule.foo", "arn", expectedArn), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "name", expectedName), - resource.TestMatchResourceAttr("aws_config_config_rule.foo", "rule_id", expectedRuleId), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "description", "Terraform Acceptance tests"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "maximum_execution_frequency", "Six_Hours"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "source.#", "1"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "source.0.owner", "CUSTOM_LAMBDA"), - resource.TestMatchResourceAttr("aws_config_config_rule.foo", "source.0.source_identifier", expectedFunctionArn), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "source.0.source_detail.#", "1"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "source.0.source_detail.3026922761.event_source", "aws.config"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "source.0.source_detail.3026922761.message_type", "ConfigurationSnapshotDeliveryCompleted"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "source.0.source_detail.3026922761.maximum_execution_frequency", ""), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "scope.#", "1"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "scope.0.tag_key", "IsTemporary"), - resource.TestCheckResourceAttr("aws_config_config_rule.foo", "scope.0.tag_value", "yes"), + testAccCheckConfigConfigRuleExists(resourceName, &cr), + testAccCheckConfigConfigRuleName(resourceName, expectedName, &cr), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "config", regexp.MustCompile("config-rule/config-rule-[a-z0-9]+$")), + resource.TestCheckResourceAttr(resourceName, "name", expectedName), + resource.TestMatchResourceAttr(resourceName, "rule_id", regexp.MustCompile("config-rule-[a-z0-9]+$")), + resource.TestCheckResourceAttr(resourceName, "description", "Terraform Acceptance tests"), + resource.TestCheckResourceAttr(resourceName, "maximum_execution_frequency", "Six_Hours"), + resource.TestCheckResourceAttr(resourceName, "source.#", "1"), + resource.TestCheckResourceAttr(resourceName, "source.0.owner", "CUSTOM_LAMBDA"), + resource.TestCheckResourceAttrPair(resourceName, "source.0.source_identifier", "aws_lambda_function.f", "arn"), + resource.TestCheckResourceAttr(resourceName, "source.0.source_detail.#", "1"), + resource.TestCheckResourceAttr(resourceName, "source.0.source_detail.3026922761.event_source", "aws.config"), + resource.TestCheckResourceAttr(resourceName, "source.0.source_detail.3026922761.message_type", "ConfigurationSnapshotDeliveryCompleted"), + resource.TestCheckResourceAttr(resourceName, "source.0.source_detail.3026922761.maximum_execution_frequency", ""), + resource.TestCheckResourceAttr(resourceName, "scope.#", "1"), + resource.TestCheckResourceAttr(resourceName, "scope.0.tag_key", "IsTemporary"), + resource.TestCheckResourceAttr(resourceName, "scope.0.tag_value", "yes"), ), }, }, @@ -136,7 +134,7 @@ func testAccConfigConfigRule_importAws(t *testing.T) { } func testAccConfigConfigRule_importLambda(t *testing.T) { - resourceName := "aws_config_config_rule.foo" + resourceName := "aws_config_config_rule.test" rInt := acctest.RandInt() path := "test-fixtures/lambdatest.zip" @@ -430,7 +428,7 @@ PARAMS func testAccConfigConfigRuleConfig_customLambda(randInt int, path string) string { return fmt.Sprintf(` -resource "aws_config_config_rule" "foo" { +resource "aws_config_config_rule" "test" { name = "tf-acc-test-%d" description = "Terraform Acceptance tests" maximum_execution_frequency = "Six_Hours" diff --git a/aws/resource_aws_config_configuration_aggregator.go b/aws/resource_aws_config_configuration_aggregator.go index 8c1bac5fe19..81a6a5574a9 100644 --- a/aws/resource_aws_config_configuration_aggregator.go +++ b/aws/resource_aws_config_configuration_aggregator.go @@ -151,6 +151,8 @@ func resourceAwsConfigConfigurationAggregatorPut(d *schema.ResourceData, meta in func resourceAwsConfigConfigurationAggregatorRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).configconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + req := &configservice.DescribeConfigurationAggregatorsInput{ ConfigurationAggregatorNames: []*string{aws.String(d.Id())}, } @@ -189,7 +191,7 @@ func resourceAwsConfigConfigurationAggregatorRead(d *schema.ResourceData, meta i return fmt.Errorf("error listing tags for Config Configuration Aggregator (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_config_configuration_aggregator_test.go b/aws/resource_aws_config_configuration_aggregator_test.go index a6e65d76750..464357f0c87 100644 --- a/aws/resource_aws_config_configuration_aggregator_test.go +++ b/aws/resource_aws_config_configuration_aggregator_test.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -75,7 +74,7 @@ func TestAccAWSConfigConfigurationAggregator_account(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "account_aggregation_source.#", "1"), resource.TestCheckResourceAttr(resourceName, "account_aggregation_source.0.account_ids.#", "1"), - resource.TestMatchResourceAttr(resourceName, "account_aggregation_source.0.account_ids.0", regexp.MustCompile(`^\d{12}$`)), + testAccCheckResourceAttrAccountID(resourceName, "account_aggregation_source.0.account_ids.0"), resource.TestCheckResourceAttr(resourceName, "account_aggregation_source.0.regions.#", "1"), resource.TestCheckResourceAttr(resourceName, "account_aggregation_source.0.regions.0", "us-west-2"), ), @@ -106,7 +105,7 @@ func TestAccAWSConfigConfigurationAggregator_organization(t *testing.T) { testAccCheckAWSConfigConfigurationAggregatorName(resourceName, rName, &ca), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "organization_aggregation_source.#", "1"), - resource.TestMatchResourceAttr(resourceName, "organization_aggregation_source.0.role_arn", regexp.MustCompile(`^arn:aws:iam::\d+:role/`)), + resource.TestCheckResourceAttrPair(resourceName, "organization_aggregation_source.0.role_arn", "aws_iam_role.r", "arn"), resource.TestCheckResourceAttr(resourceName, "organization_aggregation_source.0.all_regions", "true"), ), }, diff --git a/aws/resource_aws_config_configuration_recorder.go b/aws/resource_aws_config_configuration_recorder.go index e5787e156e1..aa05a0e3ca7 100644 --- a/aws/resource_aws_config_configuration_recorder.go +++ b/aws/resource_aws_config_configuration_recorder.go @@ -8,7 +8,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/configservice" ) @@ -99,7 +98,7 @@ func resourceAwsConfigConfigurationRecorderRead(d *schema.ResourceData, meta int } out, err := conn.DescribeConfigurationRecorders(&input) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchConfigurationRecorderException" { + if isAWSErr(err, configservice.ErrCodeNoSuchConfigurationRecorderException, "") { log.Printf("[WARN] Configuration Recorder %q is gone (NoSuchConfigurationRecorderException)", d.Id()) d.SetId("") return nil @@ -142,8 +141,9 @@ func resourceAwsConfigConfigurationRecorderDelete(d *schema.ResourceData, meta i } _, err := conn.DeleteConfigurationRecorder(&input) if err != nil { - return fmt.Errorf("Deleting Configuration Recorder failed: %s", err) + if !isAWSErr(err, configservice.ErrCodeNoSuchConfigurationRecorderException, "") { + return fmt.Errorf("Deleting Configuration Recorder failed: %s", err) + } } - return nil } diff --git a/aws/resource_aws_config_configuration_recorder_status.go b/aws/resource_aws_config_configuration_recorder_status.go index ed0cfbd51c2..34afae3bb84 100644 --- a/aws/resource_aws_config_configuration_recorder_status.go +++ b/aws/resource_aws_config_configuration_recorder_status.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/configservice" ) @@ -79,12 +78,10 @@ func resourceAwsConfigConfigurationRecorderStatusRead(d *schema.ResourceData, me } statusOut, err := conn.DescribeConfigurationRecorderStatus(&statusInput) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchConfigurationRecorderException" { - log.Printf("[WARN] Configuration Recorder (status) %q is gone (NoSuchConfigurationRecorderException)", name) - d.SetId("") - return nil - } + if isAWSErr(err, configservice.ErrCodeNoSuchConfigurationRecorderException, "") { + log.Printf("[WARN] Configuration Recorder (status) %q is gone (NoSuchConfigurationRecorderException)", name) + d.SetId("") + return nil } return fmt.Errorf("Failed describing Configuration Recorder %q status: %s", name, err) diff --git a/aws/resource_aws_config_configuration_recorder_test.go b/aws/resource_aws_config_configuration_recorder_test.go index 7b7baf1c2e3..d724e815bad 100644 --- a/aws/resource_aws_config_configuration_recorder_test.go +++ b/aws/resource_aws_config_configuration_recorder_test.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -69,6 +68,8 @@ func testAccConfigConfigurationRecorder_basic(t *testing.T) { expectedName := fmt.Sprintf("tf-acc-test-%d", rInt) expectedRoleName := fmt.Sprintf("tf-acc-test-awsconfig-%d", rInt) + resourceName := "aws_config_configuration_recorder.foo" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -77,13 +78,10 @@ func testAccConfigConfigurationRecorder_basic(t *testing.T) { { Config: testAccConfigConfigurationRecorderConfig_basic(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckConfigConfigurationRecorderExists("aws_config_configuration_recorder.foo", &cr), - testAccCheckConfigConfigurationRecorderName("aws_config_configuration_recorder.foo", expectedName, &cr), - testAccCheckConfigConfigurationRecorderRoleArn("aws_config_configuration_recorder.foo", - regexp.MustCompile(`arn:aws:iam::[0-9]{12}:role/`+expectedRoleName), &cr), - resource.TestCheckResourceAttr("aws_config_configuration_recorder.foo", "name", expectedName), - resource.TestMatchResourceAttr("aws_config_configuration_recorder.foo", "role_arn", - regexp.MustCompile(`arn:aws:iam::[0-9]{12}:role/`+expectedRoleName)), + testAccCheckConfigConfigurationRecorderExists(resourceName, &cr), + testAccCheckConfigConfigurationRecorderName(resourceName, expectedName, &cr), + testAccCheckResourceAttrGlobalARN(resourceName, "role_arn", "iam", fmt.Sprintf("role/%s", expectedRoleName)), + resource.TestCheckResourceAttr(resourceName, "name", expectedName), ), }, }, @@ -96,6 +94,8 @@ func testAccConfigConfigurationRecorder_allParams(t *testing.T) { expectedName := fmt.Sprintf("tf-acc-test-%d", rInt) expectedRoleName := fmt.Sprintf("tf-acc-test-awsconfig-%d", rInt) + resourceName := "aws_config_configuration_recorder.foo" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -104,17 +104,14 @@ func testAccConfigConfigurationRecorder_allParams(t *testing.T) { { Config: testAccConfigConfigurationRecorderConfig_allParams(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckConfigConfigurationRecorderExists("aws_config_configuration_recorder.foo", &cr), - testAccCheckConfigConfigurationRecorderName("aws_config_configuration_recorder.foo", expectedName, &cr), - testAccCheckConfigConfigurationRecorderRoleArn("aws_config_configuration_recorder.foo", - regexp.MustCompile(`arn:aws:iam::[0-9]{12}:role/`+expectedRoleName), &cr), - resource.TestCheckResourceAttr("aws_config_configuration_recorder.foo", "name", expectedName), - resource.TestMatchResourceAttr("aws_config_configuration_recorder.foo", "role_arn", - regexp.MustCompile(`arn:aws:iam::[0-9]{12}:role/`+expectedRoleName)), - resource.TestCheckResourceAttr("aws_config_configuration_recorder.foo", "recording_group.#", "1"), - resource.TestCheckResourceAttr("aws_config_configuration_recorder.foo", "recording_group.0.all_supported", "false"), - resource.TestCheckResourceAttr("aws_config_configuration_recorder.foo", "recording_group.0.include_global_resource_types", "false"), - resource.TestCheckResourceAttr("aws_config_configuration_recorder.foo", "recording_group.0.resource_types.#", "2"), + testAccCheckConfigConfigurationRecorderExists(resourceName, &cr), + testAccCheckConfigConfigurationRecorderName(resourceName, expectedName, &cr), + testAccCheckResourceAttrGlobalARN(resourceName, "role_arn", "iam", fmt.Sprintf("role/%s", expectedRoleName)), + resource.TestCheckResourceAttr(resourceName, "name", expectedName), + resource.TestCheckResourceAttr(resourceName, "recording_group.#", "1"), + resource.TestCheckResourceAttr(resourceName, "recording_group.0.all_supported", "false"), + resource.TestCheckResourceAttr(resourceName, "recording_group.0.include_global_resource_types", "false"), + resource.TestCheckResourceAttr(resourceName, "recording_group.0.resource_types.#", "2"), ), }, }, @@ -159,22 +156,6 @@ func testAccCheckConfigConfigurationRecorderName(n string, desired string, obj * } } -func testAccCheckConfigConfigurationRecorderRoleArn(n string, desired *regexp.Regexp, obj *configservice.ConfigurationRecorder) resource.TestCheckFunc { - return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - if !desired.MatchString(*obj.RoleARN) { - return fmt.Errorf("Expected configuration recorder %q role ARN to match %q, given: %q", - n, desired.String(), *obj.RoleARN) - } - - return nil - } -} - func testAccCheckConfigConfigurationRecorderExists(n string, obj *configservice.ConfigurationRecorder) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/aws/resource_aws_config_delivery_channel_test.go b/aws/resource_aws_config_delivery_channel_test.go index 2097f487b42..e48d9b4d559 100644 --- a/aws/resource_aws_config_delivery_channel_test.go +++ b/aws/resource_aws_config_delivery_channel_test.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "regexp" "testing" "time" @@ -97,11 +96,11 @@ func testAccConfigDeliveryChannel_basic(t *testing.T) { } func testAccConfigDeliveryChannel_allParams(t *testing.T) { + resourceName := "aws_config_delivery_channel.foo" var dc configservice.DeliveryChannel rInt := acctest.RandInt() expectedName := fmt.Sprintf("tf-acc-test-awsconfig-%d", rInt) expectedBucketName := fmt.Sprintf("tf-acc-test-awsconfig-%d", rInt) - expectedSnsTopicArn := regexp.MustCompile(fmt.Sprintf("arn:aws:sns:[a-z0-9-]+:[0-9]{12}:tf-acc-test-%d", rInt)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -111,13 +110,13 @@ func testAccConfigDeliveryChannel_allParams(t *testing.T) { { Config: testAccConfigDeliveryChannelConfig_allParams(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckConfigDeliveryChannelExists("aws_config_delivery_channel.foo", &dc), - testAccCheckConfigDeliveryChannelName("aws_config_delivery_channel.foo", expectedName, &dc), - resource.TestCheckResourceAttr("aws_config_delivery_channel.foo", "name", expectedName), - resource.TestCheckResourceAttr("aws_config_delivery_channel.foo", "s3_bucket_name", expectedBucketName), - resource.TestCheckResourceAttr("aws_config_delivery_channel.foo", "s3_key_prefix", "one/two/three"), - resource.TestMatchResourceAttr("aws_config_delivery_channel.foo", "sns_topic_arn", expectedSnsTopicArn), - resource.TestCheckResourceAttr("aws_config_delivery_channel.foo", "snapshot_delivery_properties.0.delivery_frequency", "Six_Hours"), + testAccCheckConfigDeliveryChannelExists(resourceName, &dc), + testAccCheckConfigDeliveryChannelName(resourceName, expectedName, &dc), + resource.TestCheckResourceAttr(resourceName, "name", expectedName), + resource.TestCheckResourceAttr(resourceName, "s3_bucket_name", expectedBucketName), + resource.TestCheckResourceAttr(resourceName, "s3_key_prefix", "one/two/three"), + resource.TestCheckResourceAttrPair(resourceName, "sns_topic_arn", "aws_sns_topic.t", "arn"), + resource.TestCheckResourceAttr(resourceName, "snapshot_delivery_properties.0.delivery_frequency", "Six_Hours"), ), }, }, diff --git a/aws/resource_aws_config_organization_custom_rule.go b/aws/resource_aws_config_organization_custom_rule.go index c4ddc2fd56e..04f3941bee5 100644 --- a/aws/resource_aws_config_organization_custom_rule.go +++ b/aws/resource_aws_config_organization_custom_rule.go @@ -53,7 +53,7 @@ func resourceAwsConfigOrganizationCustomRule() *schema.Resource { DiffSuppressFunc: suppressEquivalentJsonDiffs, ValidateFunc: validation.All( validation.StringLenBetween(0, 2048), - validation.ValidateJsonString, + validation.StringIsJSON, ), }, "lambda_function_arn": { diff --git a/aws/resource_aws_config_organization_managed_rule.go b/aws/resource_aws_config_organization_managed_rule.go index b37f6d7999d..0868caedf79 100644 --- a/aws/resource_aws_config_organization_managed_rule.go +++ b/aws/resource_aws_config_organization_managed_rule.go @@ -53,7 +53,7 @@ func resourceAwsConfigOrganizationManagedRule() *schema.Resource { DiffSuppressFunc: suppressEquivalentJsonDiffs, ValidateFunc: validation.All( validation.StringLenBetween(0, 2048), - validation.ValidateJsonString, + validation.StringIsJSON, ), }, "maximum_execution_frequency": { diff --git a/aws/resource_aws_customer_gateway.go b/aws/resource_aws_customer_gateway.go index a1e1ea6a2b2..5427250f038 100644 --- a/aws/resource_aws_customer_gateway.go +++ b/aws/resource_aws_customer_gateway.go @@ -100,7 +100,7 @@ func resourceAwsCustomerGatewayCreate(d *schema.ResourceData, meta interface{}) } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 Customer Gateway (%s) tags: %s", d.Id(), err) } } @@ -170,6 +170,7 @@ func resourceAwsCustomerGatewayExists(vpnType, ipAddress string, bgpAsn int, con func resourceAwsCustomerGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig gatewayFilter := &ec2.Filter{ Name: aws.String("customer-gateway-id"), @@ -203,7 +204,7 @@ func resourceAwsCustomerGatewayRead(d *schema.ResourceData, meta interface{}) er d.Set("ip_address", customerGateway.IpAddress) d.Set("type", customerGateway.Type) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(customerGateway.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(customerGateway.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datapipeline_pipeline.go b/aws/resource_aws_datapipeline_pipeline.go index 193c92d8d62..41195f5b8ae 100644 --- a/aws/resource_aws_datapipeline_pipeline.go +++ b/aws/resource_aws_datapipeline_pipeline.go @@ -68,6 +68,7 @@ func resourceAwsDataPipelinePipelineCreate(d *schema.ResourceData, meta interfac func resourceAwsDataPipelinePipelineRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datapipelineconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig v, err := resourceAwsDataPipelinePipelineRetrieve(d.Id(), conn) if isAWSErr(err, datapipeline.ErrCodePipelineNotFoundException, "") || isAWSErr(err, datapipeline.ErrCodePipelineDeletedException, "") || v == nil { @@ -81,7 +82,7 @@ func resourceAwsDataPipelinePipelineRead(d *schema.ResourceData, meta interface{ d.Set("name", v.Name) d.Set("description", v.Description) - if err := d.Set("tags", keyvaluetags.DatapipelineKeyValueTags(v.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.DatapipelineKeyValueTags(v.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_agent.go b/aws/resource_aws_datasync_agent.go index 00d20efd745..5046e40bda3 100644 --- a/aws/resource_aws_datasync_agent.go +++ b/aws/resource_aws_datasync_agent.go @@ -169,6 +169,7 @@ func resourceAwsDataSyncAgentCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsDataSyncAgentRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datasyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &datasync.DescribeAgentInput{ AgentArn: aws.String(d.Id()), @@ -196,7 +197,7 @@ func resourceAwsDataSyncAgentRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("error listing tags for DataSync Agent (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_location_efs.go b/aws/resource_aws_datasync_location_efs.go index 63997c02fed..e30d4c6a9c8 100644 --- a/aws/resource_aws_datasync_location_efs.go +++ b/aws/resource_aws_datasync_location_efs.go @@ -103,6 +103,7 @@ func resourceAwsDataSyncLocationEfsCreate(d *schema.ResourceData, meta interface func resourceAwsDataSyncLocationEfsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datasyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &datasync.DescribeLocationEfsInput{ LocationArn: aws.String(d.Id()), @@ -142,7 +143,7 @@ func resourceAwsDataSyncLocationEfsRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for DataSync Location EFS (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_location_nfs.go b/aws/resource_aws_datasync_location_nfs.go index a8a782867b2..1f6b3fd455b 100644 --- a/aws/resource_aws_datasync_location_nfs.go +++ b/aws/resource_aws_datasync_location_nfs.go @@ -96,6 +96,7 @@ func resourceAwsDataSyncLocationNfsCreate(d *schema.ResourceData, meta interface func resourceAwsDataSyncLocationNfsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datasyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &datasync.DescribeLocationNfsInput{ LocationArn: aws.String(d.Id()), @@ -135,7 +136,7 @@ func resourceAwsDataSyncLocationNfsRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for DataSync Location NFS (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_location_s3.go b/aws/resource_aws_datasync_location_s3.go index 72203bad8f3..9a3c8e4b1fb 100644 --- a/aws/resource_aws_datasync_location_s3.go +++ b/aws/resource_aws_datasync_location_s3.go @@ -126,6 +126,7 @@ func resourceAwsDataSyncLocationS3Create(d *schema.ResourceData, meta interface{ func resourceAwsDataSyncLocationS3Read(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datasyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &datasync.DescribeLocationS3Input{ LocationArn: aws.String(d.Id()), @@ -165,7 +166,7 @@ func resourceAwsDataSyncLocationS3Read(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for DataSync Location S3 (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_location_smb.go b/aws/resource_aws_datasync_location_smb.go index 6acc75790a7..9768a87db0f 100644 --- a/aws/resource_aws_datasync_location_smb.go +++ b/aws/resource_aws_datasync_location_smb.go @@ -131,6 +131,7 @@ func resourceAwsDataSyncLocationSmbCreate(d *schema.ResourceData, meta interface func resourceAwsDataSyncLocationSmbRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datasyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &datasync.DescribeLocationSmbInput{ LocationArn: aws.String(d.Id()), @@ -178,7 +179,7 @@ func resourceAwsDataSyncLocationSmbRead(d *schema.ResourceData, meta interface{} d.Set("subdirectory", subdirectory) - if err := d.Set("tags", keyvaluetags.DatasyncKeyValueTags(tagsOutput.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.DatasyncKeyValueTags(tagsOutput.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_task.go b/aws/resource_aws_datasync_task.go index a36d73385c1..9b5a76452a6 100644 --- a/aws/resource_aws_datasync_task.go +++ b/aws/resource_aws_datasync_task.go @@ -139,6 +139,7 @@ func resourceAwsDataSyncTask() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ datasync.VerifyModeNone, datasync.VerifyModePointInTimeConsistent, + datasync.VerifyModeOnlyFilesTransferred, }, false), }, }, @@ -231,6 +232,7 @@ func resourceAwsDataSyncTaskCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsDataSyncTaskRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).datasyncconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &datasync.DescribeTaskInput{ TaskArn: aws.String(d.Id()), @@ -266,7 +268,7 @@ func resourceAwsDataSyncTaskRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for DataSync Task (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_datasync_task_test.go b/aws/resource_aws_datasync_task_test.go index d1471807c44..1e406ed45d2 100644 --- a/aws/resource_aws_datasync_task_test.go +++ b/aws/resource_aws_datasync_task_test.go @@ -421,7 +421,7 @@ func TestAccAWSDataSyncTask_DefaultSyncOptions_Uid(t *testing.T) { } func TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode(t *testing.T) { - var task1, task2 datasync.DescribeTaskOutput + var task1, task2, task3 datasync.DescribeTaskOutput rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_datasync_task.test" @@ -452,6 +452,15 @@ func TestAccAWSDataSyncTask_DefaultSyncOptions_VerifyMode(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "options.0.verify_mode", "POINT_IN_TIME_CONSISTENT"), ), }, + { + Config: testAccAWSDataSyncTaskConfigDefaultSyncOptionsVerifyMode(rName, "ONLY_FILES_TRANSFERRED"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDataSyncTaskExists(resourceName, &task3), + testAccCheckAWSDataSyncTaskNotRecreated(&task2, &task3), + resource.TestCheckResourceAttr(resourceName, "options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "options.0.verify_mode", "ONLY_FILES_TRANSFERRED"), + ), + }, }, }) } diff --git a/aws/resource_aws_dax_cluster.go b/aws/resource_aws_dax_cluster.go index 35f240a2ff6..63af0594cf9 100644 --- a/aws/resource_aws_dax_cluster.go +++ b/aws/resource_aws_dax_cluster.go @@ -271,6 +271,8 @@ func resourceAwsDaxClusterCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsDaxClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).daxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + req := &dax.DescribeClustersInput{ ClusterNames: []*string{aws.String(d.Id())}, } @@ -335,7 +337,7 @@ func resourceAwsDaxClusterRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for DAX Cluster (%s): %s", aws.StringValue(c.ClusterArn), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_db_cluster_snapshot.go b/aws/resource_aws_db_cluster_snapshot.go index 8a0d1d82deb..c07fae4abf2 100644 --- a/aws/resource_aws_db_cluster_snapshot.go +++ b/aws/resource_aws_db_cluster_snapshot.go @@ -131,6 +131,7 @@ func resourceAwsDbClusterSnapshotCreate(d *schema.ResourceData, meta interface{} func resourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &rds.DescribeDBClusterSnapshotsInput{ DBClusterSnapshotIdentifier: aws.String(d.Id()), @@ -177,7 +178,7 @@ func resourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for RDS DB Cluster Snapshot (%s): %s", d.Get("db_cluster_snapshot_arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -193,8 +194,6 @@ func resourceAwsdbClusterSnapshotUpdate(d *schema.ResourceData, meta interface{} if err := keyvaluetags.RdsUpdateTags(conn, d.Get("db_cluster_snapshot_arn").(string), o, n); err != nil { return fmt.Errorf("error updating RDS DB Cluster Snapshot (%s) tags: %s", d.Get("db_cluster_snapshot_arn").(string), err) } - - d.SetPartial("tags") } return nil diff --git a/aws/resource_aws_db_cluster_snapshot_test.go b/aws/resource_aws_db_cluster_snapshot_test.go index fbb6f4cefda..c459c82cb7d 100644 --- a/aws/resource_aws_db_cluster_snapshot_test.go +++ b/aws/resource_aws_db_cluster_snapshot_test.go @@ -2,16 +2,78 @@ package aws import ( "fmt" + "log" "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_db_cluster_snapshot", &resource.Sweeper{ + Name: "aws_db_cluster_snapshot", + F: testSweepDbClusterSnapshots, + }) +} + +func testSweepDbClusterSnapshots(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).rdsconn + input := &rds.DescribeDBClusterSnapshotsInput{ + // "InvalidDBClusterSnapshotStateFault: Only manual snapshots may be deleted." + Filters: []*rds.Filter{{ + Name: aws.String("snapshot-type"), + Values: aws.StringSlice([]string{"manual"}), + }}, + } + var sweeperErrs *multierror.Error + + for { + output, err := conn.DescribeDBClusterSnapshots(input) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping RDS DB Cluster Snapshots sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving RDS DB Cluster Snapshots: %w", err)) + return sweeperErrs + } + + for _, dbClusterSnapshot := range output.DBClusterSnapshots { + id := aws.StringValue(dbClusterSnapshot.DBClusterSnapshotIdentifier) + + log.Printf("[INFO] Deleting RDS DB Cluster Snapshot: %s", id) + _, err := conn.DeleteDBClusterSnapshot(&rds.DeleteDBClusterSnapshotInput{ + DBClusterSnapshotIdentifier: aws.String(id), + }) + if isAWSErr(err, rds.ErrCodeDBClusterSnapshotNotFoundFault, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting RDS DB Cluster Snapshot (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + if aws.StringValue(output.Marker) == "" { + break + } + input.Marker = output.Marker + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSDBClusterSnapshot_basic(t *testing.T) { var dbClusterSnapshot rds.DBClusterSnapshot rName := acctest.RandomWithPrefix("tf-acc-test") @@ -28,7 +90,7 @@ func TestAccAWSDBClusterSnapshot_basic(t *testing.T) { testAccCheckDbClusterSnapshotExists(resourceName, &dbClusterSnapshot), resource.TestCheckResourceAttrSet(resourceName, "allocated_storage"), resource.TestCheckResourceAttrSet(resourceName, "availability_zones.#"), - resource.TestMatchResourceAttr(resourceName, "db_cluster_snapshot_arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:\d{12}:cluster-snapshot:.+`)), + testAccMatchResourceAttrRegionalARN(resourceName, "db_cluster_snapshot_arn", "rds", regexp.MustCompile(fmt.Sprintf("cluster-snapshot:%s$", rName))), resource.TestCheckResourceAttrSet(resourceName, "engine"), resource.TestCheckResourceAttrSet(resourceName, "engine_version"), resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), @@ -164,13 +226,20 @@ func testAccCheckDbClusterSnapshotExists(resourceName string, dbClusterSnapshot func testAccAwsDbClusterSnapshotConfig(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" tags = { - Name = %q + Name = %[1]q } } @@ -182,17 +251,17 @@ resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" tags = { - Name = %q + Name = %[1]q } } resource "aws_db_subnet_group" "test" { - name = %q + name = %[1]q subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] } resource "aws_rds_cluster" "test" { - cluster_identifier = %q + cluster_identifier = %[1]q db_subnet_group_name = "${aws_db_subnet_group.test.name}" master_password = "barbarbarbar" master_username = "foo" @@ -201,20 +270,27 @@ resource "aws_rds_cluster" "test" { resource "aws_db_cluster_snapshot" "test" { db_cluster_identifier = "${aws_rds_cluster.test.id}" - db_cluster_snapshot_identifier = %q + db_cluster_snapshot_identifier = %[1]q } -`, rName, rName, rName, rName, rName) +`, rName) } func testAccAwsDbClusterSnapshotConfigTags1(rName, tagKey1, tagValue1 string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" tags = { - Name = %q + Name = %[1]q } } @@ -226,17 +302,17 @@ resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" tags = { - Name = %q + Name = %[1]q } } resource "aws_db_subnet_group" "test" { - name = %q + name = %[1]q subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] } resource "aws_rds_cluster" "test" { - cluster_identifier = %q + cluster_identifier = %[1]q db_subnet_group_name = "${aws_db_subnet_group.test.name}" master_password = "barbarbarbar" master_username = "foo" @@ -245,23 +321,30 @@ resource "aws_rds_cluster" "test" { resource "aws_db_cluster_snapshot" "test" { db_cluster_identifier = "${aws_rds_cluster.test.id}" - db_cluster_snapshot_identifier = %q + db_cluster_snapshot_identifier = %[1]q tags = { - %q = %q + %[2]q = %[3]q } } -`, rName, rName, rName, rName, rName, tagKey1, tagValue1) +`, rName, tagKey1, tagValue1) } func testAccAwsDbClusterSnapshotConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" tags = { - Name = %q + Name = %[1]q } } @@ -273,17 +356,17 @@ resource "aws_subnet" "test" { vpc_id = "${aws_vpc.test.id}" tags = { - Name = %q + Name = %[1]q } } resource "aws_db_subnet_group" "test" { - name = %q + name = %[1]q subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] } resource "aws_rds_cluster" "test" { - cluster_identifier = %q + cluster_identifier = %[1]q db_subnet_group_name = "${aws_db_subnet_group.test.name}" master_password = "barbarbarbar" master_username = "foo" @@ -292,11 +375,11 @@ resource "aws_rds_cluster" "test" { resource "aws_db_cluster_snapshot" "test" { db_cluster_identifier = "${aws_rds_cluster.test.id}" - db_cluster_snapshot_identifier = %q + db_cluster_snapshot_identifier = %[1]q tags = { - %q = %q - %q = %q + %[2]q = %[3]q + %[4]q = %[5]q } } -`, rName, rName, rName, rName, rName, tagKey1, tagValue1, tagKey2, tagValue2) +`, rName, tagKey1, tagValue1, tagKey2, tagValue2) } diff --git a/aws/resource_aws_db_event_subscription.go b/aws/resource_aws_db_event_subscription.go index bcb8b1840cc..0cb0edbbb2e 100644 --- a/aws/resource_aws_db_event_subscription.go +++ b/aws/resource_aws_db_event_subscription.go @@ -149,6 +149,7 @@ func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Id(), conn) @@ -197,7 +198,7 @@ func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for RDS Event Subscription (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -236,7 +237,6 @@ func resourceAwsDbEventSubscriptionRetrieve(name string, conn *rds.RDS) (*rds.Ev func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn - d.Partial(true) requestUpdate := false req := &rds.ModifyEventSubscriptionInput{ @@ -293,10 +293,6 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface if err != nil { return fmt.Errorf("Modifying RDS Event Subscription %s failed: %s", d.Id(), err) } - d.SetPartial("event_categories") - d.SetPartial("enabled") - d.SetPartial("sns_topic") - d.SetPartial("source_type") } if d.HasChange("tags") { @@ -305,8 +301,6 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface if err := keyvaluetags.RdsUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating RDS Event Subscription (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } if d.HasChange("source_ids") { @@ -348,11 +342,8 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface } } } - d.SetPartial("source_ids") } - d.Partial(false) - return nil } diff --git a/aws/resource_aws_db_event_subscription_test.go b/aws/resource_aws_db_event_subscription_test.go index 102b68c7d47..5d52b3328e9 100644 --- a/aws/resource_aws_db_event_subscription_test.go +++ b/aws/resource_aws_db_event_subscription_test.go @@ -2,17 +2,82 @@ package aws import ( "fmt" + "log" "regexp" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/rds/waiter" ) +func init() { + resource.AddTestSweepers("aws_db_event_subscription", &resource.Sweeper{ + Name: "aws_db_event_subscription", + F: testSweepDbEventSubscriptions, + }) +} + +func testSweepDbEventSubscriptions(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).rdsconn + var sweeperErrs *multierror.Error + + err = conn.DescribeEventSubscriptionsPages(&rds.DescribeEventSubscriptionsInput{}, func(page *rds.DescribeEventSubscriptionsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, eventSubscription := range page.EventSubscriptionsList { + name := aws.StringValue(eventSubscription.CustSubscriptionId) + + log.Printf("[INFO] Deleting RDS Event Subscription: %s", name) + _, err = conn.DeleteEventSubscription(&rds.DeleteEventSubscriptionInput{ + SubscriptionName: aws.String(name), + }) + if isAWSErr(err, rds.ErrCodeSubscriptionNotFoundFault, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting RDS Event Subscription (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + _, err = waiter.EventSubscriptionDeleted(conn, name) + if isAWSErr(err, rds.ErrCodeSubscriptionNotFoundFault, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error waiting for RDS Event Subscription (%s) deletion: %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping RDS Event Subscriptions sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving RDS Event Subscriptions: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { var v rds.EventSubscription rInt := acctest.RandInt() @@ -28,7 +93,7 @@ func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists(resourceName, &v), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:rds:[^:]+:[^:]+:es:%s$", subscriptionName))), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "rds", regexp.MustCompile(fmt.Sprintf("es:%s$", subscriptionName))), resource.TestCheckResourceAttr(resourceName, "enabled", "true"), resource.TestCheckResourceAttr(resourceName, "source_type", "db-instance"), resource.TestCheckResourceAttr(resourceName, "name", subscriptionName), @@ -93,14 +158,10 @@ func TestAccAWSDBEventSubscription_withPrefix(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfigWithPrefix(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "enabled", "true"), - resource.TestCheckResourceAttr( - resourceName, "source_type", "db-instance"), - resource.TestMatchResourceAttr( - resourceName, "name", startsWithPrefix), - resource.TestCheckResourceAttr( - resourceName, "tags.Name", "name"), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "source_type", "db-instance"), + resource.TestMatchResourceAttr(resourceName, "name", startsWithPrefix), + resource.TestCheckResourceAttr(resourceName, "tags.Name", "name"), ), }, }, @@ -122,14 +183,10 @@ func TestAccAWSDBEventSubscription_withSourceIds(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfigWithSourceIds(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "enabled", "true"), - resource.TestCheckResourceAttr( - resourceName, "source_type", "db-parameter-group"), - resource.TestCheckResourceAttr( - resourceName, "name", fmt.Sprintf("tf-acc-test-rds-event-subs-with-ids-%d", rInt)), - resource.TestCheckResourceAttr( - resourceName, "source_ids.#", "1"), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "source_type", "db-parameter-group"), + resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("tf-acc-test-rds-event-subs-with-ids-%d", rInt)), + resource.TestCheckResourceAttr(resourceName, "source_ids.#", "1"), ), }, { @@ -142,14 +199,10 @@ func TestAccAWSDBEventSubscription_withSourceIds(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfigUpdateSourceIds(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "enabled", "true"), - resource.TestCheckResourceAttr( - resourceName, "source_type", "db-parameter-group"), - resource.TestCheckResourceAttr( - resourceName, "name", fmt.Sprintf("tf-acc-test-rds-event-subs-with-ids-%d", rInt)), - resource.TestCheckResourceAttr( - resourceName, "source_ids.#", "2"), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "source_type", "db-parameter-group"), + resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("tf-acc-test-rds-event-subs-with-ids-%d", rInt)), + resource.TestCheckResourceAttr(resourceName, "source_ids.#", "2"), ), }, }, @@ -171,12 +224,9 @@ func TestAccAWSDBEventSubscription_categoryUpdate(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "enabled", "true"), - resource.TestCheckResourceAttr( - resourceName, "source_type", "db-instance"), - resource.TestCheckResourceAttr( - resourceName, "name", fmt.Sprintf("tf-acc-test-rds-event-subs-%d", rInt)), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "source_type", "db-instance"), + resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("tf-acc-test-rds-event-subs-%d", rInt)), ), }, { @@ -189,10 +239,8 @@ func TestAccAWSDBEventSubscription_categoryUpdate(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfigUpdateCategories(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "enabled", "true"), - resource.TestCheckResourceAttr( - resourceName, "source_type", "db-instance"), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "source_type", "db-instance"), ), }, }, @@ -275,11 +323,11 @@ func testAccCheckAWSDBEventSubscriptionDisappears(eventSubscription *rds.EventSu func testAccAWSDBEventSubscriptionConfig(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { - name = "tf-acc-test-rds-event-subs-sns-topic-%d" + name = "tf-acc-test-rds-event-subs-sns-topic-%[1]d" } resource "aws_db_event_subscription" "test" { - name = "tf-acc-test-rds-event-subs-%d" + name = "tf-acc-test-rds-event-subs-%[1]d" sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "db-instance" @@ -295,7 +343,7 @@ resource "aws_db_event_subscription" "test" { Name = "name" } } -`, rInt, rInt) +`, rInt) } func testAccAWSDBEventSubscriptionConfigWithPrefix(rInt int) string { @@ -327,11 +375,11 @@ resource "aws_db_event_subscription" "test" { func testAccAWSDBEventSubscriptionConfigUpdate(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { - name = "tf-acc-test-rds-event-subs-sns-topic-%d" + name = "tf-acc-test-rds-event-subs-sns-topic-%[1]d" } resource "aws_db_event_subscription" "test" { - name = "tf-acc-test-rds-event-subs-%d" + name = "tf-acc-test-rds-event-subs-%[1]d" sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" enabled = false source_type = "db-parameter-group" @@ -344,23 +392,23 @@ resource "aws_db_event_subscription" "test" { Name = "new-name" } } -`, rInt, rInt) +`, rInt) } func testAccAWSDBEventSubscriptionConfigWithSourceIds(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { - name = "tf-acc-test-rds-event-subs-sns-topic-%d" + name = "tf-acc-test-rds-event-subs-sns-topic-%[1]d" } resource "aws_db_parameter_group" "test" { - name = "db-parameter-group-event-%d" + name = "db-parameter-group-event-%[1]d" family = "mysql5.6" description = "Test parameter group for terraform" } resource "aws_db_event_subscription" "test" { - name = "tf-acc-test-rds-event-subs-with-ids-%d" + name = "tf-acc-test-rds-event-subs-with-ids-%[1]d" sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "db-parameter-group" source_ids = ["${aws_db_parameter_group.test.id}"] @@ -373,29 +421,29 @@ resource "aws_db_event_subscription" "test" { Name = "name" } } -`, rInt, rInt, rInt) +`, rInt) } func testAccAWSDBEventSubscriptionConfigUpdateSourceIds(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { - name = "tf-acc-test-rds-event-subs-sns-topic-%d" + name = "tf-acc-test-rds-event-subs-sns-topic-%[1]d" } resource "aws_db_parameter_group" "test" { - name = "db-parameter-group-event-%d" + name = "db-parameter-group-event-%[1]d" family = "mysql5.6" description = "Test parameter group for terraform" } resource "aws_db_parameter_group" "test2" { - name = "db-parameter-group-event-2-%d" + name = "db-parameter-group-event-2-%[1]d" family = "mysql5.6" description = "Test parameter group for terraform" } resource "aws_db_event_subscription" "test" { - name = "tf-acc-test-rds-event-subs-with-ids-%d" + name = "tf-acc-test-rds-event-subs-with-ids-%[1]d" sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "db-parameter-group" source_ids = ["${aws_db_parameter_group.test.id}", "${aws_db_parameter_group.test2.id}"] @@ -408,17 +456,17 @@ resource "aws_db_event_subscription" "test" { Name = "name" } } -`, rInt, rInt, rInt, rInt) +`, rInt) } func testAccAWSDBEventSubscriptionConfigUpdateCategories(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { - name = "tf-acc-test-rds-event-subs-sns-topic-%d" + name = "tf-acc-test-rds-event-subs-sns-topic-%[1]d" } resource "aws_db_event_subscription" "test" { - name = "tf-acc-test-rds-event-subs-%d" + name = "tf-acc-test-rds-event-subs-%[1]d" sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "db-instance" @@ -430,5 +478,5 @@ resource "aws_db_event_subscription" "test" { Name = "name" } } -`, rInt, rInt) +`, rInt) } diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 8cdfef1f3e2..56921e6fe65 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -380,7 +380,6 @@ func resourceAwsDbInstance() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, }, "auto_minor_version_upgrade": { @@ -642,8 +641,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - modifyDbInstanceInput.VpcSecurityGroupIds = expandStringSet(attr) - requiresModifyDbInstance = true + opts.VpcSecurityGroupIds = expandStringSet(attr) } if attr, ok := d.GetOk("performance_insights_enabled"); ok { @@ -736,19 +734,11 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.VpcSecurityGroupIds = s + opts.VpcSecurityGroupIds = expandStringSet(attr) } if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.DBSecurityGroups = s + opts.DBSecurityGroups = expandStringSet(attr) } if attr, ok := d.GetOk("storage_type"); ok { opts.StorageType = aws.String(attr.(string)) @@ -1008,8 +998,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - modifyDbInstanceInput.VpcSecurityGroupIds = expandStringSet(attr) - requiresModifyDbInstance = true + opts.VpcSecurityGroupIds = expandStringSet(attr) } if attr, ok := d.GetOk("performance_insights_enabled"); ok { @@ -1113,19 +1102,11 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.VpcSecurityGroupIds = s + opts.VpcSecurityGroupIds = expandStringSet(attr) } if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - var s []*string - for _, v := range attr.List() { - s = append(s, aws.String(v.(string))) - } - opts.DBSecurityGroups = s + opts.DBSecurityGroups = expandStringSet(attr) } if attr, ok := d.GetOk("storage_type"); ok { opts.StorageType = aws.String(attr.(string)) @@ -1276,7 +1257,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { - v, err := resourceAwsDbInstanceRetrieve(d.Id(), meta.(*AWSClient).rdsconn) + conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + v, err := resourceAwsDbInstanceRetrieve(d.Id(), conn) if err != nil { return err @@ -1357,10 +1341,6 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("domain_iam_role_name", v.DomainMemberships[0].IAMRoleName) } - // list tags for resource - // set tags - conn := meta.(*AWSClient).rdsconn - arn := aws.StringValue(v.DBInstanceArn) d.Set("arn", arn) @@ -1370,7 +1350,7 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for RDS DB Instance (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -1470,81 +1450,64 @@ func waitUntilAwsDbInstanceIsDeleted(id string, conn *rds.RDS, timeout time.Dura func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn - d.Partial(true) - req := &rds.ModifyDBInstanceInput{ ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), DBInstanceIdentifier: aws.String(d.Id()), } - d.SetPartial("apply_immediately") - if !aws.BoolValue(req.ApplyImmediately) { log.Println("[INFO] Only settings updating, instance changes will be applied in next maintenance window") } requestUpdate := false if d.HasChange("allocated_storage") || d.HasChange("iops") { - d.SetPartial("allocated_storage") - d.SetPartial("iops") req.Iops = aws.Int64(int64(d.Get("iops").(int))) req.AllocatedStorage = aws.Int64(int64(d.Get("allocated_storage").(int))) requestUpdate = true } if d.HasChange("allow_major_version_upgrade") { - d.SetPartial("allow_major_version_upgrade") req.AllowMajorVersionUpgrade = aws.Bool(d.Get("allow_major_version_upgrade").(bool)) // Having allowing_major_version_upgrade by itself should not trigger ModifyDBInstance // as it results in InvalidParameterCombination: No modifications were requested } if d.HasChange("backup_retention_period") { - d.SetPartial("backup_retention_period") req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) requestUpdate = true } if d.HasChange("copy_tags_to_snapshot") { - d.SetPartial("copy_tags_to_snapshot") req.CopyTagsToSnapshot = aws.Bool(d.Get("copy_tags_to_snapshot").(bool)) requestUpdate = true } if d.HasChange("ca_cert_identifier") { - d.SetPartial("ca_cert_identifier") req.CACertificateIdentifier = aws.String(d.Get("ca_cert_identifier").(string)) requestUpdate = true } if d.HasChange("deletion_protection") { - d.SetPartial("deletion_protection") req.DeletionProtection = aws.Bool(d.Get("deletion_protection").(bool)) requestUpdate = true } if d.HasChange("instance_class") { - d.SetPartial("instance_class") req.DBInstanceClass = aws.String(d.Get("instance_class").(string)) requestUpdate = true } if d.HasChange("parameter_group_name") { - d.SetPartial("parameter_group_name") req.DBParameterGroupName = aws.String(d.Get("parameter_group_name").(string)) requestUpdate = true } if d.HasChange("engine_version") { - d.SetPartial("engine_version") req.EngineVersion = aws.String(d.Get("engine_version").(string)) req.AllowMajorVersionUpgrade = aws.Bool(d.Get("allow_major_version_upgrade").(bool)) requestUpdate = true } if d.HasChange("backup_window") { - d.SetPartial("backup_window") req.PreferredBackupWindow = aws.String(d.Get("backup_window").(string)) requestUpdate = true } if d.HasChange("maintenance_window") { - d.SetPartial("maintenance_window") req.PreferredMaintenanceWindow = aws.String(d.Get("maintenance_window").(string)) requestUpdate = true } if d.HasChange("max_allocated_storage") { - d.SetPartial("max_allocated_storage") mas := d.Get("max_allocated_storage").(int) // The API expects the max allocated storage value to be set to the allocated storage @@ -1558,22 +1521,18 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } if d.HasChange("password") { - d.SetPartial("password") req.MasterUserPassword = aws.String(d.Get("password").(string)) requestUpdate = true } if d.HasChange("multi_az") { - d.SetPartial("multi_az") req.MultiAZ = aws.Bool(d.Get("multi_az").(bool)) requestUpdate = true } if d.HasChange("publicly_accessible") { - d.SetPartial("publicly_accessible") req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) requestUpdate = true } if d.HasChange("storage_type") { - d.SetPartial("storage_type") req.StorageType = aws.String(d.Get("storage_type").(string)) requestUpdate = true @@ -1582,19 +1541,16 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error } } if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) requestUpdate = true } if d.HasChange("monitoring_role_arn") { - d.SetPartial("monitoring_role_arn") req.MonitoringRoleArn = aws.String(d.Get("monitoring_role_arn").(string)) requestUpdate = true } if d.HasChange("monitoring_interval") { - d.SetPartial("monitoring_interval") req.MonitoringInterval = aws.Int64(int64(d.Get("monitoring_interval").(int))) requestUpdate = true } @@ -1614,24 +1570,20 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("option_group_name") { - d.SetPartial("option_group_name") req.OptionGroupName = aws.String(d.Get("option_group_name").(string)) requestUpdate = true } if d.HasChange("port") { - d.SetPartial("port") req.DBPortNumber = aws.Int64(int64(d.Get("port").(int))) requestUpdate = true } if d.HasChange("db_subnet_group_name") { - d.SetPartial("db_subnet_group_name") req.DBSubnetGroupName = aws.String(d.Get("db_subnet_group_name").(string)) requestUpdate = true } if d.HasChange("enabled_cloudwatch_logs_exports") { - d.SetPartial("enabled_cloudwatch_logs_exports") req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) requestUpdate = true } @@ -1642,24 +1594,19 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("domain") || d.HasChange("domain_iam_role_name") { - d.SetPartial("domain") - d.SetPartial("domain_iam_role_name") req.Domain = aws.String(d.Get("domain").(string)) req.DomainIAMRoleName = aws.String(d.Get("domain_iam_role_name").(string)) requestUpdate = true } if d.HasChange("performance_insights_enabled") || d.HasChange("performance_insights_kms_key_id") || d.HasChange("performance_insights_retention_period") { - d.SetPartial("performance_insights_enabled") req.EnablePerformanceInsights = aws.Bool(d.Get("performance_insights_enabled").(bool)) if v, ok := d.GetOk("performance_insights_kms_key_id"); ok { - d.SetPartial("performance_insights_kms_key_id") req.PerformanceInsightsKMSKeyId = aws.String(v.(string)) } if v, ok := d.GetOk("performance_insights_retention_period"); ok { - d.SetPartial("performance_insights_retention_period") req.PerformanceInsightsRetentionPeriod = aws.Int64(int64(v.(int))) } @@ -1729,11 +1676,8 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error updating RDS DB Instance (%s) tags: %s", d.Get("arn").(string), err) } - d.SetPartial("tags") } - d.Partial(false) - return resourceAwsDbInstanceRead(d, meta) } diff --git a/aws/resource_aws_db_instance_migrate.go b/aws/resource_aws_db_instance_migrate.go index 52e5ddd28de..51b5800b46c 100644 --- a/aws/resource_aws_db_instance_migrate.go +++ b/aws/resource_aws_db_instance_migrate.go @@ -283,7 +283,6 @@ func resourceAwsDbInstanceResourceV0() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, }, "auto_minor_version_upgrade": { diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 22819b8be8e..91548dcc777 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/aws/aws-sdk-go/aws" @@ -305,6 +306,86 @@ func TestAccAWSDBInstance_AllowMajorVersionUpgrade(t *testing.T) { }) } +func TestAccAWSDBInstance_DbSubnetGroupName(t *testing.T) { + var dbInstance rds.DBInstance + var dbSubnetGroup rds.DBSubnetGroup + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_DbSubnetGroupName(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(resourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_DbSubnetGroupName_RamShared(t *testing.T) { + var dbInstance rds.DBInstance + var dbSubnetGroup rds.DBSubnetGroup + var providers []*schema.Provider + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccAlternateAccountPreCheck(t) + testAccOrganizationsEnabledPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_DbSubnetGroupName_RamShared(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(dbSubnetGroupResourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_DbSubnetGroupName_VpcSecurityGroupIds(t *testing.T) { + var dbInstance rds.DBInstance + var dbSubnetGroup rds.DBSubnetGroup + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_DbSubnetGroupName_VpcSecurityGroupIds(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(resourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + func TestAccAWSDBInstance_DeletionProtection(t *testing.T) { var dbInstance rds.DBInstance @@ -676,6 +757,98 @@ func TestAccAWSDBInstance_ReplicateSourceDb_BackupWindow(t *testing.T) { }) } +func TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName(t *testing.T) { + var dbInstance rds.DBInstance + var dbSubnetGroup rds.DBSubnetGroup + var providers []*schema.Provider + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_ReplicateSourceDb_DbSubnetGroupName(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(resourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_RamShared(t *testing.T) { + var dbInstance rds.DBInstance + var dbSubnetGroup rds.DBSubnetGroup + var providers []*schema.Provider + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + testAccAlternateAccountPreCheck(t) + testAccOrganizationsEnabledPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_ReplicateSourceDb_DbSubnetGroupName_RamShared(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(dbSubnetGroupResourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_ReplicateSourceDb_DbSubnetGroupName_VpcSecurityGroupIds(t *testing.T) { + var dbInstance rds.DBInstance + var dbSubnetGroup rds.DBSubnetGroup + var providers []*schema.Provider + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_ReplicateSourceDb_DbSubnetGroupName_VpcSecurityGroupIds(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(resourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + func TestAccAWSDBInstance_ReplicateSourceDb_DeletionProtection(t *testing.T) { t.Skip("CreateDBInstanceReadReplica API currently ignores DeletionProtection=true with SourceDBInstanceIdentifier set") // --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_DeletionProtection (1624.88s) @@ -1213,6 +1386,101 @@ func TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow(t *testing.T) { }) } +func TestAccAWSDBInstance_SnapshotIdentifier_DbSubnetGroupName(t *testing.T) { + var dbInstance, sourceDbInstance rds.DBInstance + var dbSnapshot rds.DBSnapshot + var dbSubnetGroup rds.DBSubnetGroup + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + sourceDbResourceName := "aws_db_instance.source" + snapshotResourceName := "aws_db_snapshot.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_SnapshotIdentifier_DbSubnetGroupName(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(sourceDbResourceName, &sourceDbInstance), + testAccCheckDbSnapshotExists(snapshotResourceName, &dbSnapshot), + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(resourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_SnapshotIdentifier_DbSubnetGroupName_RamShared(t *testing.T) { + var dbInstance, sourceDbInstance rds.DBInstance + var dbSnapshot rds.DBSnapshot + var dbSubnetGroup rds.DBSubnetGroup + var providers []*schema.Provider + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + sourceDbResourceName := "aws_db_instance.source" + snapshotResourceName := "aws_db_snapshot.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccAlternateAccountPreCheck(t) + testAccOrganizationsEnabledPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_SnapshotIdentifier_DbSubnetGroupName_RamShared(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(sourceDbResourceName, &sourceDbInstance), + testAccCheckDbSnapshotExists(snapshotResourceName, &dbSnapshot), + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(dbSubnetGroupResourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_SnapshotIdentifier_DbSubnetGroupName_VpcSecurityGroupIds(t *testing.T) { + var dbInstance, sourceDbInstance rds.DBInstance + var dbSnapshot rds.DBSnapshot + var dbSubnetGroup rds.DBSubnetGroup + + rName := acctest.RandomWithPrefix("tf-acc-test") + dbSubnetGroupResourceName := "aws_db_subnet_group.test" + sourceDbResourceName := "aws_db_instance.source" + snapshotResourceName := "aws_db_snapshot.test" + resourceName := "aws_db_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfig_SnapshotIdentifier_DbSubnetGroupName_VpcSecurityGroupIds(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(sourceDbResourceName, &sourceDbInstance), + testAccCheckDbSnapshotExists(snapshotResourceName, &dbSnapshot), + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), + testAccCheckDBSubnetGroupExists(resourceName, &dbSubnetGroup), + resource.TestCheckResourceAttrPair(resourceName, "db_subnet_group_name", dbSubnetGroupResourceName, "name"), + ), + }, + }, + }) +} + func TestAccAWSDBInstance_SnapshotIdentifier_DeletionProtection(t *testing.T) { var dbInstance, sourceDbInstance rds.DBInstance var dbSnapshot rds.DBSnapshot @@ -2713,14 +2981,6 @@ func TestAccAWSDBInstance_CACertificateIdentifier(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, Steps: []resource.TestStep{ - { - Config: fmt.Sprintf(testAccAWSDBInstanceConfigWithCACertificateIdentifier, "rds-ca-2015"), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDBInstanceExists(resourceName, &dbInstance), - resource.TestCheckResourceAttr(resourceName, "ca_cert_identifier", "rds-ca-2015"), - ), - }, - // Ensure we are able to modify the CACertIdentifier { Config: fmt.Sprintf(testAccAWSDBInstanceConfigWithCACertificateIdentifier, "rds-ca-2019"), Check: resource.ComposeTestCheckFunc( @@ -2901,7 +3161,7 @@ resource "aws_db_instance" "bar" { func testAccAWSDBInstanceConfig_FinalSnapshotIdentifier_SkipFinalSnapshot() string { return fmt.Sprintf(` resource "aws_db_instance" "snapshot" { - identifier = "tf-test-%d" + identifier = "tf-acc-test-%[1]d" allocated_storage = 5 engine = "mysql" @@ -2917,7 +3177,7 @@ resource "aws_db_instance" "snapshot" { parameter_group_name = "default.mysql5.6" skip_final_snapshot = true - final_snapshot_identifier = "foobarbaz-test-terraform-final-snapshot-1" + final_snapshot_identifier = "tf-acc-test-%[1]d" } `, acctest.RandInt()) } @@ -2931,8 +3191,8 @@ resource "aws_s3_bucket" "xtrabackup" { resource "aws_s3_bucket_object" "xtrabackup_db" { bucket = "${aws_s3_bucket.xtrabackup.id}" key = "%s/mysql-5-6-xtrabackup.tar.gz" - source = "../files/mysql-5-6-xtrabackup.tar.gz" - etag = "${filemd5("../files/mysql-5-6-xtrabackup.tar.gz")}" + source = "./testdata/mysql-5-6-xtrabackup.tar.gz" + etag = "${filemd5("./testdata/mysql-5-6-xtrabackup.tar.gz")}" } resource "aws_iam_role" "rds_s3_access_role" { @@ -3825,7 +4085,7 @@ resource "aws_vpc" "foo" { } resource "aws_db_subnet_group" "rds_one" { - name = "tf_acc_test_%d" + name = "tf_acc_test_%[1]d" description = "db subnets for rds_one" subnet_ids = ["${aws_subnet.main.id}", "${aws_subnet.other.id}"] @@ -3854,7 +4114,7 @@ resource "aws_subnet" "other" { resource "aws_db_instance" "mssql" { allocated_storage = 20 engine = "sqlserver-ex" - identifier = "tf-test-mssql-%d" + identifier = "tf-test-mssql-%[1]d" instance_class = "db.t2.micro" password = "somecrazypassword" skip_final_snapshot = true @@ -3863,11 +4123,11 @@ resource "aws_db_instance" "mssql" { resource "aws_db_snapshot" "mssql-snap" { db_instance_identifier = "${aws_db_instance.mssql.id}" - db_snapshot_identifier = "mssql-snap" + db_snapshot_identifier = "tf-acc-test-%[1]d" } resource "aws_db_instance" "mssql_restore" { - identifier = "tf-test-mssql-%d-restore" + identifier = "tf-test-mssql-%[1]d-restore" db_subnet_group_name = "${aws_db_subnet_group.rds_one.name}" @@ -3888,7 +4148,7 @@ resource "aws_db_instance" "mssql_restore" { } resource "aws_security_group" "rds-mssql" { - name = "tf-rds-mssql-test-%d" + name = "tf-rds-mssql-test-%[1]d" description = "TF Testing" vpc_id = "${aws_vpc.foo.id}" @@ -3917,7 +4177,7 @@ resource "aws_directory_service_directory" "foo" { } resource "aws_iam_role" "role" { - name = "tf-acc-db-instance-mssql-domain-role-%d" + name = "tf-acc-db-instance-mssql-domain-role-%[1]d" assume_role_policy = < 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding tags: %s", err) + } + } + return resourceAwsRouteTableUpdate(d, meta) } diff --git a/aws/resource_aws_default_route_table_test.go b/aws/resource_aws_default_route_table_test.go index dc6d2490697..5b648aa1d90 100644 --- a/aws/resource_aws_default_route_table_test.go +++ b/aws/resource_aws_default_route_table_test.go @@ -6,8 +6,8 @@ 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-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) @@ -43,6 +43,12 @@ func TestAccAWSDefaultRouteTable_basic(t *testing.T) { resource.TestCheckResourceAttrPair(resourceName, "vpc_id", vpcResourceName, "id"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSDefaultRouteTableImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, }, }) } @@ -73,26 +79,33 @@ func TestAccAWSDefaultRouteTable_disappears_Vpc(t *testing.T) { func TestAccAWSDefaultRouteTable_Route(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_default_route_table.foo" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_default_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckDefaultRouteTableDestroy, Steps: []resource.TestStep{ { Config: testAccDefaultRouteTableConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists("aws_default_route_table.foo", &v), - testAccCheckResourceAttrAccountID("aws_default_route_table.foo", "owner_id"), + testAccCheckRouteTableExists(resourceName, &v), + testAccCheckResourceAttrAccountID(resourceName, "owner_id"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSDefaultRouteTableImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, { Config: testAccDefaultRouteTableConfig_noRouteBlock, Check: resource.ComposeTestCheckFunc( // The route block from the previous step should still be // present, because no blocks means "ignore existing blocks". - resource.TestCheckResourceAttr("aws_default_route_table.foo", "route.#", "1"), + resource.TestCheckResourceAttr(resourceName, "route.#", "1"), ), }, { @@ -100,7 +113,7 @@ func TestAccAWSDefaultRouteTable_Route(t *testing.T) { Check: resource.ComposeTestCheckFunc( // This config uses attribute syntax to set zero routes // explicitly, so should remove the one we created before. - resource.TestCheckResourceAttr("aws_default_route_table.foo", "route.#", "0"), + resource.TestCheckResourceAttr(resourceName, "route.#", "0"), ), }, }, @@ -109,10 +122,11 @@ func TestAccAWSDefaultRouteTable_Route(t *testing.T) { func TestAccAWSDefaultRouteTable_swap(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_default_route_table.foo" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_default_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckDefaultRouteTableDestroy, Steps: []resource.TestStep{ @@ -120,9 +134,15 @@ func TestAccAWSDefaultRouteTable_swap(t *testing.T) { Config: testAccDefaultRouteTable_change, Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists( - "aws_default_route_table.foo", &v), + resourceName, &v), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSDefaultRouteTableImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, // This config will swap out the original Default Route Table and replace // it with the custom route table. While this is not advised, it's a @@ -133,7 +153,7 @@ func TestAccAWSDefaultRouteTable_swap(t *testing.T) { Config: testAccDefaultRouteTable_change_mod, Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists( - "aws_default_route_table.foo", &v), + resourceName, &v), ), ExpectNonEmptyPlan: true, }, @@ -156,16 +176,23 @@ func TestAccAWSDefaultRouteTable_Route_TransitGatewayID(t *testing.T) { testAccCheckRouteTableExists(resourceName, &routeTable1), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSDefaultRouteTableImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, }, }) } func TestAccAWSDefaultRouteTable_vpc_endpoint(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_default_route_table.foo" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_default_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckDefaultRouteTableDestroy, Steps: []resource.TestStep{ @@ -173,7 +200,52 @@ func TestAccAWSDefaultRouteTable_vpc_endpoint(t *testing.T) { Config: testAccDefaultRouteTable_vpc_endpoint, Check: resource.ComposeTestCheckFunc( testAccCheckRouteTableExists( - "aws_default_route_table.foo", &v), + resourceName, &v), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSDefaultRouteTableImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSDefaultRouteTable_tags(t *testing.T) { + var routeTable ec2.RouteTable + resourceName := "aws_default_route_table.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRouteTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDefaultRouteTableConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckRouteTableExists(resourceName, &routeTable), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccDefaultRouteTableConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckRouteTableExists(resourceName, &routeTable), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccDefaultRouteTableConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckRouteTableExists(resourceName, &routeTable), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), ), }, }, @@ -201,11 +273,7 @@ func testAccCheckDefaultRouteTableDestroy(s *terraform.State) error { } // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidRouteTableID.NotFound" { + if !isAWSErr(err, "InvalidRouteTableID.NotFound", "") { return err } } @@ -434,12 +502,20 @@ resource "aws_subnet" "test" { } } -resource "aws_ec2_transit_gateway" "test" {} +resource "aws_ec2_transit_gateway" "test" { + tags = { + Name = "tf-acc-test-ec2-default-route-table-transit-gateway-id" + } +} resource "aws_ec2_transit_gateway_vpc_attachment" "test" { subnet_ids = ["${aws_subnet.test.id}"] transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" vpc_id = "${aws_vpc.test.id}" + + tags = { + Name = "tf-acc-test-ec2-default-route-table-transit-gateway-id" + } } resource "aws_default_route_table" "test" { @@ -454,40 +530,96 @@ resource "aws_default_route_table" "test" { } const testAccDefaultRouteTable_vpc_endpoint = ` +data "aws_region" "current" {} + resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" tags = { - Name = "terraform-testacc-default-route-table-vpc-endpoint" - } + Name = "terraform-testacc-default-route-table-vpc-endpoint" + } } resource "aws_internet_gateway" "igw" { - vpc_id = "${aws_vpc.test.id}" + vpc_id = "${aws_vpc.test.id}" tags = { - Name = "test" - } + Name = "terraform-testacc-default-route-table-vpc-endpoint" + } } resource "aws_vpc_endpoint" "s3" { - vpc_id = "${aws_vpc.test.id}" - service_name = "com.amazonaws.us-west-2.s3" - route_table_ids = [ - "${aws_vpc.test.default_route_table_id}" - ] + vpc_id = "${aws_vpc.test.id}" + service_name = "com.amazonaws.${data.aws_region.current.name}.s3" + route_table_ids = ["${aws_vpc.test.default_route_table_id}"] + + tags = { + Name = "terraform-testacc-default-route-table-vpc-endpoint" + } } resource "aws_default_route_table" "foo" { - default_route_table_id = "${aws_vpc.test.default_route_table_id}" + default_route_table_id = "${aws_vpc.test.default_route_table_id}" tags = { Name = "test" - } + } - route { - cidr_block = "0.0.0.0/0" - gateway_id = "${aws_internet_gateway.igw.id}" - } + route { + cidr_block = "0.0.0.0/0" + gateway_id = "${aws_internet_gateway.igw.id}" + } } ` + +func testAccDefaultRouteTableConfigTags1(rName, tagKey1, tagValue1 string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = %[1]q + } +} + +resource "aws_default_route_table" "test" { + default_route_table_id = aws_vpc.test.default_route_table_id + + tags = { + %[2]q = %[3]q + } +} +`, rName, tagKey1, tagValue1) +} + +func testAccDefaultRouteTableConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = %[1]q + } +} + +resource "aws_default_route_table" "test" { + default_route_table_id = aws_vpc.test.default_route_table_id + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, rName, tagKey1, tagValue1, tagKey2, tagValue2) +} + +func testAccAWSDefaultRouteTableImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return rs.Primary.Attributes["vpc_id"], nil + } +} diff --git a/aws/resource_aws_default_security_group.go b/aws/resource_aws_default_security_group.go index c07640206ec..b6076f721e5 100644 --- a/aws/resource_aws_default_security_group.go +++ b/aws/resource_aws_default_security_group.go @@ -92,7 +92,7 @@ func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interfac log.Printf("[INFO] Default Security Group ID: %s", d.Id()) if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 Default Security Group (%s) tags: %s", d.Id(), err) } } diff --git a/aws/resource_aws_default_security_group_test.go b/aws/resource_aws_default_security_group_test.go index 4cf3e0392f0..c9a51338c0d 100644 --- a/aws/resource_aws_default_security_group_test.go +++ b/aws/resource_aws_default_security_group_test.go @@ -15,10 +15,11 @@ func TestAccAWSDefaultSecurityGroup_basic(t *testing.T) { var group ec2.SecurityGroup resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_default_security_group.web", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDefaultSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_default_security_group.web", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDefaultSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDefaultSecurityGroupConfig, @@ -49,10 +50,11 @@ func TestAccAWSDefaultSecurityGroup_classic(t *testing.T) { var group ec2.SecurityGroup resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_default_security_group.web", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDefaultSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_default_security_group.web", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDefaultSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDefaultSecurityGroupConfig_classic, diff --git a/aws/resource_aws_directory_service_conditional_forwarder_test.go b/aws/resource_aws_directory_service_conditional_forwarder_test.go index 8ecc90621d8..f0d0c3e4148 100644 --- a/aws/resource_aws_directory_service_conditional_forwarder_test.go +++ b/aws/resource_aws_directory_service_conditional_forwarder_test.go @@ -138,6 +138,11 @@ func testAccDirectoryServiceConditionalForwarderConfig(ip1, ip2 string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_directory_service_directory" "bar" { diff --git a/aws/resource_aws_directory_service_directory.go b/aws/resource_aws_directory_service_directory.go index 75e5933c8a0..a32c9e00349 100644 --- a/aws/resource_aws_directory_service_directory.go +++ b/aws/resource_aws_directory_service_directory.go @@ -82,6 +82,11 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { Required: true, ForceNew: true, }, + "availability_zones": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, }, }, @@ -92,6 +97,12 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "connect_ips": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, "customer_username": { Type: schema.TypeString, Required: true, @@ -101,8 +112,11 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { Type: schema.TypeSet, Required: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.IsIPAddress, + }, + Set: schema.HashString, }, "subnet_ids": { Type: schema.TypeSet, @@ -116,6 +130,11 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { Required: true, ForceNew: true, }, + "availability_zones": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, }, }, @@ -147,6 +166,7 @@ func resourceAwsDirectoryServiceDirectory() *schema.Resource { directoryservice.DirectoryTypeAdconnector, directoryservice.DirectoryTypeMicrosoftAd, directoryservice.DirectoryTypeSimpleAd, + directoryservice.DirectoryTypeSharedMicrosoftAd, }, false), }, "edition": { @@ -314,8 +334,6 @@ func createActiveDirectoryService(dsconn *directoryservice.DirectoryService, d * } func enableDirectoryServiceSso(dsconn *directoryservice.DirectoryService, d *schema.ResourceData) error { - d.SetPartial("enable_sso") - if v, ok := d.GetOk("enable_sso"); ok && v.(bool) { log.Printf("[DEBUG] Enabling SSO for DS directory %q", d.Id()) if _, err := dsconn.EnableSso(&directoryservice.EnableSsoInput{ @@ -388,8 +406,6 @@ func resourceAwsDirectoryServiceDirectoryCreate(d *schema.ResourceData, meta int } if v, ok := d.GetOk("alias"); ok { - d.SetPartial("alias") - input := directoryservice.CreateAliasInput{ DirectoryId: aws.String(d.Id()), Alias: aws.String(v.(string)), @@ -436,6 +452,7 @@ func resourceAwsDirectoryServiceDirectoryUpdate(d *schema.ResourceData, meta int func resourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta interface{}) error { dsconn := meta.(*AWSClient).dsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(d.Id())}, @@ -460,17 +477,24 @@ func resourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta inter d.Set("description", dir.Description) if *dir.Type == directoryservice.DirectoryTypeAdconnector { - d.Set("dns_ip_addresses", schema.NewSet(schema.HashString, flattenStringList(dir.ConnectSettings.ConnectIps))) + d.Set("dns_ip_addresses", flattenStringSet(dir.ConnectSettings.ConnectIps)) } else { - d.Set("dns_ip_addresses", schema.NewSet(schema.HashString, flattenStringList(dir.DnsIpAddrs))) + d.Set("dns_ip_addresses", flattenStringSet(dir.DnsIpAddrs)) } d.Set("name", dir.Name) d.Set("short_name", dir.ShortName) d.Set("size", dir.Size) d.Set("edition", dir.Edition) d.Set("type", dir.Type) - d.Set("vpc_settings", flattenDSVpcSettings(dir.VpcSettings)) - d.Set("connect_settings", flattenDSConnectSettings(dir.DnsIpAddrs, dir.ConnectSettings)) + + if err := d.Set("vpc_settings", flattenDSVpcSettings(dir.VpcSettings)); err != nil { + return fmt.Errorf("error setting VPC settings: %s", err) + } + + if err := d.Set("connect_settings", flattenDSConnectSettings(dir.DnsIpAddrs, dir.ConnectSettings)); err != nil { + return fmt.Errorf("error setting connect settings: %s", err) + } + d.Set("enable_sso", dir.SsoEnabled) if aws.StringValue(dir.Type) == directoryservice.DirectoryTypeAdconnector { @@ -485,7 +509,7 @@ func resourceAwsDirectoryServiceDirectoryRead(d *schema.ResourceData, meta inter return fmt.Errorf("error listing tags for Directory Service Directory (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_directory_service_directory_test.go b/aws/resource_aws_directory_service_directory_test.go index c1796200c19..7f66ef0c36b 100644 --- a/aws/resource_aws_directory_service_directory_test.go +++ b/aws/resource_aws_directory_service_directory_test.go @@ -72,6 +72,7 @@ func testSweepDirectoryServiceDirectories(region string) error { } func TestAccAWSDirectoryServiceDirectory_basic(t *testing.T) { + var ds directoryservice.DirectoryDescription resourceName := "aws_directory_service_directory.test" resource.ParallelTest(t, resource.TestCase{ @@ -86,8 +87,8 @@ func TestAccAWSDirectoryServiceDirectory_basic(t *testing.T) { { Config: testAccDirectoryServiceDirectoryConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test"), - resource.TestCheckResourceAttrSet("aws_directory_service_directory.test", "security_group_id"), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttrSet(resourceName, "security_group_id"), ), }, { @@ -103,6 +104,7 @@ func TestAccAWSDirectoryServiceDirectory_basic(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_tags(t *testing.T) { + var ds directoryservice.DirectoryDescription resourceName := "aws_directory_service_directory.test" resource.ParallelTest(t, resource.TestCase{ @@ -117,10 +119,10 @@ func TestAccAWSDirectoryServiceDirectory_tags(t *testing.T) { { Config: testAccDirectoryServiceDirectoryTagsConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.%", "2"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.foo", "test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.project", "test"), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.foo", "test"), + resource.TestCheckResourceAttr(resourceName, "tags.project", "test"), ), }, { @@ -134,19 +136,19 @@ func TestAccAWSDirectoryServiceDirectory_tags(t *testing.T) { { Config: testAccDirectoryServiceDirectoryUpdateTagsConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.%", "3"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.foo", "test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.project", "test2"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.fizz", "buzz"), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), + resource.TestCheckResourceAttr(resourceName, "tags.foo", "test"), + resource.TestCheckResourceAttr(resourceName, "tags.project", "test2"), + resource.TestCheckResourceAttr(resourceName, "tags.fizz", "buzz"), ), }, { Config: testAccDirectoryServiceDirectoryRemoveTagsConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "tags.foo", "test"), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.foo", "test"), ), }, }, @@ -154,6 +156,7 @@ func TestAccAWSDirectoryServiceDirectory_tags(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_microsoft(t *testing.T) { + var ds directoryservice.DirectoryDescription resourceName := "aws_directory_service_directory.test" resource.ParallelTest(t, resource.TestCase{ @@ -164,8 +167,8 @@ func TestAccAWSDirectoryServiceDirectory_microsoft(t *testing.T) { { Config: testAccDirectoryServiceDirectoryConfig_microsoft, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "edition", directoryservice.DirectoryEditionEnterprise), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttr(resourceName, "edition", directoryservice.DirectoryEditionEnterprise), ), }, { @@ -181,6 +184,7 @@ func TestAccAWSDirectoryServiceDirectory_microsoft(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_microsoftStandard(t *testing.T) { + var ds directoryservice.DirectoryDescription resourceName := "aws_directory_service_directory.test" resource.ParallelTest(t, resource.TestCase{ @@ -191,8 +195,8 @@ func TestAccAWSDirectoryServiceDirectory_microsoftStandard(t *testing.T) { { Config: testAccDirectoryServiceDirectoryConfig_microsoftStandard, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test"), - resource.TestCheckResourceAttr("aws_directory_service_directory.test", "edition", directoryservice.DirectoryEditionStandard), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttr(resourceName, "edition", directoryservice.DirectoryEditionStandard), ), }, { @@ -208,6 +212,7 @@ func TestAccAWSDirectoryServiceDirectory_microsoftStandard(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_connector(t *testing.T) { + var ds directoryservice.DirectoryDescription resourceName := "aws_directory_service_directory.test" resource.ParallelTest(t, resource.TestCase{ @@ -222,8 +227,9 @@ func TestAccAWSDirectoryServiceDirectory_connector(t *testing.T) { { Config: testAccDirectoryServiceDirectoryConfig_connector, Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.connector"), - resource.TestCheckResourceAttrSet("aws_directory_service_directory.connector", "security_group_id"), + testAccCheckServiceDirectoryExists(resourceName, &ds), + resource.TestCheckResourceAttrSet(resourceName, "security_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "connect_settings.0.connect_ips.#"), ), }, { @@ -239,8 +245,9 @@ func TestAccAWSDirectoryServiceDirectory_connector(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_withAliasAndSso(t *testing.T) { + var ds directoryservice.DirectoryDescription alias := acctest.RandomWithPrefix("tf-acc-test") - resourceName := "aws_directory_service_directory.test2" + resourceName := "aws_directory_service_directory.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { @@ -254,9 +261,9 @@ func TestAccAWSDirectoryServiceDirectory_withAliasAndSso(t *testing.T) { { Config: testAccDirectoryServiceDirectoryConfig_withAlias(alias), Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test2"), - testAccCheckServiceDirectoryAlias("aws_directory_service_directory.test2", alias), - testAccCheckServiceDirectorySso("aws_directory_service_directory.test2", false), + testAccCheckServiceDirectoryExists(resourceName, &ds), + testAccCheckServiceDirectoryAlias(resourceName, alias), + testAccCheckServiceDirectorySso(resourceName, false), ), }, { @@ -270,17 +277,17 @@ func TestAccAWSDirectoryServiceDirectory_withAliasAndSso(t *testing.T) { { Config: testAccDirectoryServiceDirectoryConfig_withSso(alias), Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test2"), - testAccCheckServiceDirectoryAlias("aws_directory_service_directory.test2", alias), - testAccCheckServiceDirectorySso("aws_directory_service_directory.test2", true), + testAccCheckServiceDirectoryExists(resourceName, &ds), + testAccCheckServiceDirectoryAlias(resourceName, alias), + testAccCheckServiceDirectorySso(resourceName, true), ), }, { Config: testAccDirectoryServiceDirectoryConfig_withSso_modified(alias), Check: resource.ComposeTestCheckFunc( - testAccCheckServiceDirectoryExists("aws_directory_service_directory.test2"), - testAccCheckServiceDirectoryAlias("aws_directory_service_directory.test2", alias), - testAccCheckServiceDirectorySso("aws_directory_service_directory.test2", false), + testAccCheckServiceDirectoryExists(resourceName, &ds), + testAccCheckServiceDirectoryAlias(resourceName, alias), + testAccCheckServiceDirectorySso(resourceName, false), ), }, }, @@ -288,7 +295,7 @@ func TestAccAWSDirectoryServiceDirectory_withAliasAndSso(t *testing.T) { } func testAccCheckDirectoryServiceDirectoryDestroy(s *terraform.State) error { - dsconn := testAccProvider.Meta().(*AWSClient).dsconn + conn := testAccProvider.Meta().(*AWSClient).dsconn for _, rs := range s.RootModule().Resources { if rs.Type != "aws_directory_service_directory" { @@ -298,9 +305,9 @@ func testAccCheckDirectoryServiceDirectoryDestroy(s *terraform.State) error { input := directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(rs.Primary.ID)}, } - out, err := dsconn.DescribeDirectories(&input) + out, err := conn.DescribeDirectories(&input) - if isAWSErr(err, "EntityDoesNotExistException", "") { + if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { continue } @@ -316,7 +323,32 @@ func testAccCheckDirectoryServiceDirectoryDestroy(s *terraform.State) error { return nil } -func testAccCheckServiceDirectoryExists(name string) resource.TestCheckFunc { +func TestAccAWSDirectoryServiceDirectory_disappears(t *testing.T) { + var ds directoryservice.DirectoryDescription + resourceName := "aws_directory_service_directory.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSDirectoryService(t) + testAccPreCheckAWSDirectoryServiceSimpleDirectory(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDirectoryServiceDirectoryConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckServiceDirectoryExists(resourceName, &ds), + testAccCheckResourceDisappears(testAccProvider, resourceAwsDirectoryServiceDirectory(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckServiceDirectoryExists(name string, ds *directoryservice.DirectoryDescription) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[name] if !ok { @@ -327,8 +359,8 @@ func testAccCheckServiceDirectoryExists(name string) resource.TestCheckFunc { return fmt.Errorf("No ID is set") } - dsconn := testAccProvider.Meta().(*AWSClient).dsconn - out, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ + conn := testAccProvider.Meta().(*AWSClient).dsconn + out, err := conn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(rs.Primary.ID)}, }) @@ -345,6 +377,8 @@ func testAccCheckServiceDirectoryExists(name string) resource.TestCheckFunc { *out.DirectoryDescriptions[0].DirectoryId, rs.Primary.ID) } + *ds = *out.DirectoryDescriptions[0] + return nil } } @@ -360,8 +394,8 @@ func testAccCheckServiceDirectoryAlias(name, alias string) resource.TestCheckFun return fmt.Errorf("No ID is set") } - dsconn := testAccProvider.Meta().(*AWSClient).dsconn - out, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ + conn := testAccProvider.Meta().(*AWSClient).dsconn + out, err := conn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(rs.Primary.ID)}, }) @@ -389,8 +423,8 @@ func testAccCheckServiceDirectorySso(name string, ssoEnabled bool) resource.Test return fmt.Errorf("No ID is set") } - dsconn := testAccProvider.Meta().(*AWSClient).dsconn - out, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ + conn := testAccProvider.Meta().(*AWSClient).dsconn + out, err := conn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ DirectoryIds: []*string{aws.String(rs.Primary.ID)}, }) @@ -446,39 +480,33 @@ func testAccPreCheckAWSDirectoryServiceSimpleDirectory(t *testing.T) { } } -const testAccDirectoryServiceDirectoryConfig = ` +const testAccDirectoryServiceDirectoryConfigBase = ` data "aws_availability_zones" "available" { state = "available" -} - -resource "aws_directory_service_directory" "test" { - name = "corp.notexample.com" - password = "SuperSecretPassw0rd" - size = "Small" - vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] } } -resource "aws_vpc" "main" { +resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" tags = { - Name = "terraform-testacc-directory-service-directory" + Name = "terraform-testacc-directory-service-directory-tags" } } -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" +resource "aws_subnet" "test1" { + vpc_id = "${aws_vpc.test.id}" availability_zone = "${data.aws_availability_zones.available.names[0]}" cidr_block = "10.0.1.0/24" tags = { Name = "tf-acc-directory-service-directory-foo" } } -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" +resource "aws_subnet" "test2" { + vpc_id = "${aws_vpc.test.id}" availability_zone = "${data.aws_availability_zones.available.names[1]}" cidr_block = "10.0.2.0/24" tags = { @@ -487,245 +515,114 @@ resource "aws_subnet" "test" { } ` -const testAccDirectoryServiceDirectoryTagsConfig = ` -data "aws_availability_zones" "available" { - state = "available" -} - +const testAccDirectoryServiceDirectoryConfig = testAccDirectoryServiceDirectoryConfigBase + ` resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } - - tags = { - foo = "test" - project = "test" - } } +` -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-tags" - } -} +const testAccDirectoryServiceDirectoryTagsConfig = testAccDirectoryServiceDirectoryConfigBase + ` +resource "aws_directory_service_directory" "test" { + name = "corp.notexample.com" + password = "SuperSecretPassw0rd" + size = "Small" -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-tags-foo" + vpc_settings { + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" + tags = { - Name = "tf-acc-directory-service-directory-tags-test" + foo = "test" + project = "test" } } ` -const testAccDirectoryServiceDirectoryUpdateTagsConfig = ` -data "aws_availability_zones" "available" { - state = "available" -} - +const testAccDirectoryServiceDirectoryUpdateTagsConfig = testAccDirectoryServiceDirectoryConfigBase + ` resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } - tags = { - foo = "test" - project = "test2" - fizz = "buzz" - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-tags" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-tags-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" tags = { - Name = "tf-acc-directory-service-directory-tags-test" + foo = "test" + project = "test2" + fizz = "buzz" } } ` -const testAccDirectoryServiceDirectoryRemoveTagsConfig = ` -data "aws_availability_zones" "available" { - state = "available" -} - +const testAccDirectoryServiceDirectoryRemoveTagsConfig = testAccDirectoryServiceDirectoryConfigBase + ` resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } - tags = { - foo = "test" - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-tags" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-tags-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" tags = { - Name = "tf-acc-directory-service-directory-tags-test" + foo = "test" } } ` -const testAccDirectoryServiceDirectoryConfig_connector = ` -data "aws_availability_zones" "available" { - state = "available" -} - -resource "aws_directory_service_directory" "test" { +const testAccDirectoryServiceDirectoryConfig_connector = testAccDirectoryServiceDirectoryConfigBase + ` +resource "aws_directory_service_directory" "base" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } -resource "aws_directory_service_directory" "connector" { +resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" type = "ADConnector" connect_settings { - customer_dns_ips = aws_directory_service_directory.test.dns_ip_addresses + customer_dns_ips = aws_directory_service_directory.base.dns_ip_addresses customer_username = "Administrator" - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-connector" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-connector-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-acc-directory-service-directory-connector-test" + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } ` -const testAccDirectoryServiceDirectoryConfig_microsoft = ` -data "aws_availability_zones" "available" { - state = "available" -} - +const testAccDirectoryServiceDirectoryConfig_microsoft = testAccDirectoryServiceDirectoryConfigBase + ` resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" type = "MicrosoftAD" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-microsoft" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-microsoft-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-acc-directory-service-directory-microsoft-test" + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } ` -const testAccDirectoryServiceDirectoryConfig_microsoftStandard = ` -data "aws_availability_zones" "available" { - state = "available" -} - +const testAccDirectoryServiceDirectoryConfig_microsoftStandard = testAccDirectoryServiceDirectoryConfigBase + ` resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" @@ -733,87 +630,31 @@ resource "aws_directory_service_directory" "test" { edition = "Standard" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-microsoft" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-microsoft-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-acc-directory-service-directory-microsoft-test" + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } ` func testAccDirectoryServiceDirectoryConfig_withAlias(alias string) string { - return fmt.Sprintf(` -data "aws_availability_zones" "available" { - state = "available" -} - -resource "aws_directory_service_directory" "test2" { + return testAccDirectoryServiceDirectoryConfigBase + fmt.Sprintf(` +resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" alias = %[1]q vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-with-alias" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-with-alias-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-acc-directory-service-directory-with-alias-test" + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } `, alias) } func testAccDirectoryServiceDirectoryConfig_withSso(alias string) string { - return fmt.Sprintf(` -data "aws_availability_zones" "available" { - state = "available" -} - -resource "aws_directory_service_directory" "test2" { + return testAccDirectoryServiceDirectoryConfigBase + fmt.Sprintf(` +resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" @@ -821,44 +662,16 @@ resource "aws_directory_service_directory" "test2" { enable_sso = true vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-with-sso" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-with-sso-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-acc-directory-service-directory-with-sso-test" + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } `, alias) } func testAccDirectoryServiceDirectoryConfig_withSso_modified(alias string) string { - return fmt.Sprintf(` -data "aws_availability_zones" "available" { - state = "available" -} - -resource "aws_directory_service_directory" "test2" { + return testAccDirectoryServiceDirectoryConfigBase + fmt.Sprintf(` +resource "aws_directory_service_directory" "test" { name = "corp.notexample.com" password = "SuperSecretPassw0rd" size = "Small" @@ -866,32 +679,8 @@ resource "aws_directory_service_directory" "test2" { enable_sso = false vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.test.id}"] - } -} - -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-directory-service-directory-with-sso-modified" - } -} - -resource "aws_subnet" "foo" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-acc-directory-service-directory-with-sso-foo" - } -} -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "${data.aws_availability_zones.available.names[1]}" - cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-acc-directory-service-directory-with-sso-test" + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] } } `, alias) diff --git a/aws/resource_aws_directory_service_log_subscription_test.go b/aws/resource_aws_directory_service_log_subscription_test.go index 4f628e573a5..0b455330f94 100644 --- a/aws/resource_aws_directory_service_log_subscription_test.go +++ b/aws/resource_aws_directory_service_log_subscription_test.go @@ -105,6 +105,11 @@ func testAccDirectoryServiceLogSubscriptionConfig(logGroupName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_directory_service_directory" "bar" { diff --git a/aws/resource_aws_dlm_lifecycle_policy.go b/aws/resource_aws_dlm_lifecycle_policy.go index 8b4f1e305bd..3a99a9662a4 100644 --- a/aws/resource_aws_dlm_lifecycle_policy.go +++ b/aws/resource_aws_dlm_lifecycle_policy.go @@ -70,7 +70,7 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource { "interval": { Type: schema.TypeInt, Required: true, - ValidateFunc: validation.IntInSlice([]int{2, 3, 4, 6, 8, 12, 24}), + ValidateFunc: validation.IntInSlice([]int{1, 2, 3, 4, 6, 8, 12, 24}), }, "interval_unit": { Type: schema.TypeString, @@ -87,7 +87,7 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource { MaxItems: 1, Elem: &schema.Schema{ Type: schema.TypeString, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"), "see https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html#dlm-Type-CreateRule-Times"), + ValidateFunc: validation.StringMatch(regexp.MustCompile("^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"), "see https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html#dlm-Type-CreateRule-Times"), }, }, }, @@ -115,6 +115,7 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource { "tags_to_add": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, @@ -122,6 +123,7 @@ func resourceAwsDlmLifecyclePolicy() *schema.Resource { "target_tags": { Type: schema.TypeMap, Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, @@ -167,6 +169,7 @@ func resourceAwsDlmLifecyclePolicyCreate(d *schema.ResourceData, meta interface{ func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dlmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[INFO] Reading DLM lifecycle policy: %s", d.Id()) out, err := conn.GetLifecyclePolicy(&dlm.GetLifecyclePolicyInput{ @@ -191,7 +194,7 @@ func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error setting policy details %s", err) } - if err := d.Set("tags", keyvaluetags.DlmKeyValueTags(out.Policy.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.DlmKeyValueTags(out.Policy.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dms_endpoint.go b/aws/resource_aws_dms_endpoint.go index 7aadf3eb708..3be6a980bed 100644 --- a/aws/resource_aws_dms_endpoint.go +++ b/aws/resource_aws_dms_endpoint.go @@ -37,6 +37,54 @@ func resourceAwsDmsEndpoint() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "elasticsearch_settings": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "endpoint_uri": { + Type: schema.TypeString, + Required: true, + // API returns this error with ModifyEndpoint: + // InvalidParameterCombinationException: Elasticsearch endpoint cant be modified. + ForceNew: true, + }, + "error_retry_duration": { + Type: schema.TypeInt, + Optional: true, + Default: 300, + ValidateFunc: validation.IntAtLeast(0), + // API returns this error with ModifyEndpoint: + // InvalidParameterCombinationException: Elasticsearch endpoint cant be modified. + ForceNew: true, + }, + "full_load_error_percentage": { + Type: schema.TypeInt, + Optional: true, + Default: 10, + ValidateFunc: validation.IntBetween(0, 100), + // API returns this error with ModifyEndpoint: + // InvalidParameterCombinationException: Elasticsearch endpoint cant be modified. + ForceNew: true, + }, + "service_access_role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + // API returns this error with ModifyEndpoint: + // InvalidParameterCombinationException: Elasticsearch endpoint cant be modified. + ForceNew: true, + }, + }, + }, + }, "endpoint_arn": { Type: schema.TypeString, Computed: true, @@ -47,10 +95,6 @@ func resourceAwsDmsEndpoint() *schema.Resource { ForceNew: true, ValidateFunc: validateDmsEndpointId, }, - "service_access_role": { - Type: schema.TypeString, - Optional: true, - }, "endpoint_type": { Type: schema.TypeString, Required: true, @@ -69,6 +113,9 @@ func resourceAwsDmsEndpoint() *schema.Resource { "db2", "docdb", "dynamodb", + "elasticsearch", + "kafka", + "kinesis", "mariadb", "mongodb", "mysql", @@ -85,6 +132,65 @@ func resourceAwsDmsEndpoint() *schema.Resource { Computed: true, Optional: true, }, + "kafka_settings": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "broker": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + "topic": { + Type: schema.TypeString, + Optional: true, + Default: "kafka-default-topic", + }, + }, + }, + }, + "kinesis_settings": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "message_format": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + dms.MessageFormatValueJson, + dms.MessageFormatValueJsonUnformatted, + }, false), + Default: dms.MessageFormatValueJson, + }, + "service_access_role_arn": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + "stream_arn": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + }, + }, + }, "kms_key_arn": { Type: schema.TypeString, Computed: true, @@ -92,36 +198,6 @@ func resourceAwsDmsEndpoint() *schema.Resource { ForceNew: true, ValidateFunc: validateArn, }, - "password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - }, - "server_name": { - Type: schema.TypeString, - Optional: true, - }, - "ssl_mode": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - dms.DmsSslModeValueNone, - dms.DmsSslModeValueRequire, - dms.DmsSslModeValueVerifyCa, - dms.DmsSslModeValueVerifyFull, - }, false), - }, - "tags": tagsSchema(), - "username": { - Type: schema.TypeString, - Optional: true, - }, - // With default values as per https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html "mongodb_settings": { Type: schema.TypeList, Optional: true, @@ -167,6 +243,15 @@ func resourceAwsDmsEndpoint() *schema.Resource { }, }, }, + "password": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "port": { + Type: schema.TypeInt, + Optional: true, + }, "s3_settings": { Type: schema.TypeList, Optional: true, @@ -217,6 +302,30 @@ func resourceAwsDmsEndpoint() *schema.Resource { }, }, }, + "server_name": { + Type: schema.TypeString, + Optional: true, + }, + "service_access_role": { + Type: schema.TypeString, + Optional: true, + }, + "ssl_mode": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + dms.DmsSslModeValueNone, + dms.DmsSslModeValueRequire, + dms.DmsSslModeValueVerifyCa, + dms.DmsSslModeValueVerifyFull, + }, false), + }, + "tags": tagsSchema(), + "username": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -237,6 +346,24 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro request.DynamoDbSettings = &dms.DynamoDbSettings{ ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), } + case "elasticsearch": + request.ElasticsearchSettings = &dms.ElasticsearchSettings{ + ServiceAccessRoleArn: aws.String(d.Get("elasticsearch_settings.0.service_access_role_arn").(string)), + EndpointUri: aws.String(d.Get("elasticsearch_settings.0.endpoint_uri").(string)), + ErrorRetryDuration: aws.Int64(int64(d.Get("elasticsearch_settings.0.error_retry_duration").(int))), + FullLoadErrorPercentage: aws.Int64(int64(d.Get("elasticsearch_settings.0.full_load_error_percentage").(int))), + } + case "kafka": + request.KafkaSettings = &dms.KafkaSettings{ + Broker: aws.String(d.Get("kafka_settings.0.broker").(string)), + Topic: aws.String(d.Get("kafka_settings.0.topic").(string)), + } + case "kinesis": + request.KinesisSettings = &dms.KinesisSettings{ + MessageFormat: aws.String(d.Get("kinesis_settings.0.message_format").(string)), + ServiceAccessRoleArn: aws.String(d.Get("kinesis_settings.0.service_access_role_arn").(string)), + StreamArn: aws.String(d.Get("kinesis_settings.0.stream_arn").(string)), + } case "mongodb": request.MongoDbSettings = &dms.MongoDbSettings{ Username: aws.String(d.Get("username").(string)), @@ -321,6 +448,7 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro func resourceAwsDmsEndpointRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dmsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig response, err := conn.DescribeEndpoints(&dms.DescribeEndpointsInput{ Filters: []*dms.Filter{ @@ -350,7 +478,7 @@ func resourceAwsDmsEndpointRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for DMS Endpoint (%s): %s", d.Get("endpoint_arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -419,6 +547,46 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } hasChanges = true } + case "elasticsearch": + if d.HasChanges( + "elasticsearch_settings.0.endpoint_uri", + "elasticsearch_settings.0.error_retry_duration", + "elasticsearch_settings.0.full_load_error_percentage", + "elasticsearch_settings.0.service_access_role_arn") { + request.ElasticsearchSettings = &dms.ElasticsearchSettings{ + ServiceAccessRoleArn: aws.String(d.Get("elasticsearch_settings.0.service_access_role_arn").(string)), + EndpointUri: aws.String(d.Get("elasticsearch_settings.0.endpoint_uri").(string)), + ErrorRetryDuration: aws.Int64(int64(d.Get("elasticsearch_settings.0.error_retry_duration").(int))), + FullLoadErrorPercentage: aws.Int64(int64(d.Get("elasticsearch_settings.0.full_load_error_percentage").(int))), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) + hasChanges = true + } + case "kafka": + if d.HasChanges( + "kafka_settings.0.broker", + "kafka_settings.0.topic") { + request.KafkaSettings = &dms.KafkaSettings{ + Broker: aws.String(d.Get("kafka_settings.0.broker").(string)), + Topic: aws.String(d.Get("kafka_settings.0.topic").(string)), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) + hasChanges = true + } + case "kinesis": + if d.HasChanges( + "kinesis_settings.0.service_access_role_arn", + "kinesis_settings.0.stream_arn") { + // Intentionally omitting MessageFormat, because it's rejected on ModifyEndpoint calls. + // "An error occurred (InvalidParameterValueException) when calling the ModifyEndpoint + // operation: Message format cannot be modified for kinesis endpoints." + request.KinesisSettings = &dms.KinesisSettings{ + ServiceAccessRoleArn: aws.String(d.Get("kinesis_settings.0.service_access_role_arn").(string)), + StreamArn: aws.String(d.Get("kinesis_settings.0.stream_arn").(string)), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 'kinesis') + hasChanges = true + } case "mongodb": if d.HasChange("username") || d.HasChange("password") || @@ -548,6 +716,18 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi } else { d.Set("service_access_role", "") } + case "elasticsearch": + if err := d.Set("elasticsearch_settings", flattenDmsElasticsearchSettings(endpoint.ElasticsearchSettings)); err != nil { + return fmt.Errorf("Error setting elasticsearch for DMS: %s", err) + } + case "kafka": + if err := d.Set("kafka_settings", flattenDmsKafkaSettings(endpoint.KafkaSettings)); err != nil { + return fmt.Errorf("Error setting kafka_settings for DMS: %s", err) + } + case "kinesis": + if err := d.Set("kinesis_settings", flattenDmsKinesisSettings(endpoint.KinesisSettings)); err != nil { + return fmt.Errorf("Error setting kinesis_settings for DMS: %s", err) + } case "mongodb": if endpoint.MongoDbSettings != nil { d.Set("username", endpoint.MongoDbSettings.Username) @@ -581,6 +761,48 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi return nil } +func flattenDmsElasticsearchSettings(settings *dms.ElasticsearchSettings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "endpoint_uri": aws.StringValue(settings.EndpointUri), + "error_retry_duration": aws.Int64Value(settings.ErrorRetryDuration), + "full_load_error_percentage": aws.Int64Value(settings.FullLoadErrorPercentage), + "service_access_role_arn": aws.StringValue(settings.ServiceAccessRoleArn), + } + + return []map[string]interface{}{m} +} + +func flattenDmsKafkaSettings(settings *dms.KafkaSettings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "broker": aws.StringValue(settings.Broker), + "topic": aws.StringValue(settings.Topic), + } + + return []map[string]interface{}{m} +} + +func flattenDmsKinesisSettings(settings *dms.KinesisSettings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "message_format": aws.StringValue(settings.MessageFormat), + "service_access_role_arn": aws.StringValue(settings.ServiceAccessRoleArn), + "stream_arn": aws.StringValue(settings.StreamArn), + } + + return []map[string]interface{}{m} +} + func flattenDmsMongoDbSettings(settings *dms.MongoDbSettings) []map[string]interface{} { if settings == nil { return []map[string]interface{}{} diff --git a/aws/resource_aws_dms_endpoint_test.go b/aws/resource_aws_dms_endpoint_test.go index c2d11a14a4d..2c951e13c00 100644 --- a/aws/resource_aws_dms_endpoint_test.go +++ b/aws/resource_aws_dms_endpoint_test.go @@ -128,6 +128,218 @@ func TestAccAwsDmsEndpoint_DynamoDb(t *testing.T) { }) } +func TestAccAwsDmsEndpoint_Elasticsearch(t *testing.T) { + resourceName := "aws_dms_endpoint.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointElasticsearchConfig(rName), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.endpoint_uri", "search-estest.us-west-2.es.amazonaws.com"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.full_load_error_percentage", "10"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.error_retry_duration", "300"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + }, + }) +} + +func TestAccAwsDmsEndpoint_Elasticsearch_ErrorRetryDuration(t *testing.T) { + resourceName := "aws_dms_endpoint.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointElasticsearchConfigErrorRetryDuration(rName, 60), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.error_retry_duration", "60"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + // Resource needs additional creation retry handling for the following: + // Error creating DMS endpoint: ResourceAlreadyExistsFault: ReplicationEndpoint "xxx" already in use + // { + // Config: dmsEndpointElasticsearchConfigErrorRetryDuration(rName, 120), + // Check: resource.ComposeTestCheckFunc( + // checkDmsEndpointExists(resourceName), + // resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.#", "1"), + // resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.error_retry_duration", "120"), + // ), + // }, + }, + }) +} + +func TestAccAwsDmsEndpoint_Elasticsearch_FullLoadErrorPercentage(t *testing.T) { + resourceName := "aws_dms_endpoint.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointElasticsearchConfigFullLoadErrorPercentage(rName, 1), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.full_load_error_percentage", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + // Resource needs additional creation retry handling for the following: + // Error creating DMS endpoint: ResourceAlreadyExistsFault: ReplicationEndpoint "xxx" already in use + // { + // Config: dmsEndpointElasticsearchConfigFullLoadErrorPercentage(rName, 2), + // Check: resource.ComposeTestCheckFunc( + // checkDmsEndpointExists(resourceName), + // resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.#", "1"), + // resource.TestCheckResourceAttr(resourceName, "elasticsearch_settings.0.full_load_error_percentage", "2"), + // ), + // }, + }, + }) +} + +func TestAccAwsDmsEndpoint_Kafka_Broker(t *testing.T) { + resourceName := "aws_dms_endpoint.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointKafkaConfigBroker(rName, "ec2-12-345-678-901.compute-1.amazonaws.com:2345"), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.0.broker", "ec2-12-345-678-901.compute-1.amazonaws.com:2345"), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.0.topic", "kafka-default-topic"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + { + Config: dmsEndpointKafkaConfigBroker(rName, "ec2-12-345-678-901.compute-1.amazonaws.com:3456"), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.0.broker", "ec2-12-345-678-901.compute-1.amazonaws.com:3456"), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.0.topic", "kafka-default-topic"), + ), + }, + }, + }) +} + +func TestAccAwsDmsEndpoint_Kafka_Topic(t *testing.T) { + resourceName := "aws_dms_endpoint.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointKafkaConfigTopic(rName, "topic1"), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.0.topic", "topic1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + { + Config: dmsEndpointKafkaConfigTopic(rName, "topic2"), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kafka_settings.0.topic", "topic2"), + ), + }, + }, + }) +} + +func TestAccAwsDmsEndpoint_Kinesis(t *testing.T) { + resourceName := "aws_dms_endpoint.dms_endpoint" + randId := acctest.RandString(8) + "-kinesis" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointKinesisConfig(randId), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "kinesis_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kinesis_settings.0.message_format", "json"), + resource.TestCheckResourceAttrPair(resourceName, "kinesis_settings.0.stream_arn", "aws_kinesis_stream.stream1", "arn"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + { + Config: dmsEndpointKinesisConfigUpdate(randId), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "kinesis_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kinesis_settings.0.message_format", "json"), + resource.TestCheckResourceAttrPair(resourceName, "kinesis_settings.0.stream_arn", "aws_kinesis_stream.stream2", "arn"), + ), + }, + }, + }) +} + func TestAccAwsDmsEndpoint_MongoDb(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-mongodb" @@ -623,6 +835,273 @@ EOF `, randId) } +func dmsEndpointElasticsearchConfigBase(rName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "test" { + name = %[1]q + + assume_role_policy = < 0 { + return fmt.Errorf("DMS event subscription still exists: %s", rs.Primary.ID) + } + } + + return nil +} + +func testAccCheckDmsEventSubscriptionDisappears(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + resource := resourceAwsDmsEventSubscription() + + return resource.Delete(resource.Data(rs.Primary), testAccProvider.Meta()) + } +} + +func testAccCheckDmsEventSubscriptionExists(n string, eventSubscription *dms.EventSubscription) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).dmsconn + resp, err := conn.DescribeEventSubscriptions(&dms.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(rs.Primary.ID), + }) + + if err != nil { + return fmt.Errorf("DMS event subscription error: %v", err) + } + + if resp == nil || len(resp.EventSubscriptionsList) == 0 || resp.EventSubscriptionsList[0] == nil { + return fmt.Errorf("DMS event subscription not found") + } + + *eventSubscription = *resp.EventSubscriptionsList[0] + + return nil + } +} + +func testAccDmsEventSubscriptionConfigBase(rName string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +data "aws_partition" "current" {} + +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = %[1]q + } +} + +resource "aws_subnet" "test" { + count = 2 + + availability_zone = data.aws_availability_zones.available.names[count.index] + cidr_block = "10.1.${count.index}.0/24" + vpc_id = aws_vpc.test.id + + tags = { + Name = aws_vpc.test.tags["Name"] + } +} + +resource "aws_dms_replication_subnet_group" "test" { + replication_subnet_group_description = %[1]q + replication_subnet_group_id = %[1]q + subnet_ids = aws_subnet.test[*].id +} + +resource "aws_dms_replication_instance" "test" { + apply_immediately = true + replication_instance_class = data.aws_partition.current.partition == "aws" ? "dms.t2.micro" : "dms.c4.large" + replication_instance_id = %[1]q + replication_subnet_group_id = aws_dms_replication_subnet_group.test.replication_subnet_group_id +} + +resource "aws_sns_topic" "test" { + name = %[1]q +} +`, rName) +} + +func testAccDmsEventSubscriptionConfigEnabled(rName string, enabled bool) string { + return composeConfig( + testAccDmsEventSubscriptionConfigBase(rName), + fmt.Sprintf(` +resource "aws_dms_event_subscription" "test" { + name = %[1]q + enabled = %[2]t + event_categories = ["creation", "failure"] + source_type = "replication-instance" + source_ids = [aws_dms_replication_instance.test.replication_instance_id] + sns_topic_arn = aws_sns_topic.test.arn +} +`, rName, enabled)) +} + +func testAccDmsEventSubscriptionConfigEventCategories2(rName string, eventCategory1 string, eventCategory2 string) string { + return composeConfig( + testAccDmsEventSubscriptionConfigBase(rName), + fmt.Sprintf(` +resource "aws_dms_event_subscription" "test" { + name = %[1]q + enabled = false + event_categories = [%[2]q, %[3]q] + source_type = "replication-instance" + source_ids = [aws_dms_replication_instance.test.replication_instance_id] + sns_topic_arn = aws_sns_topic.test.arn +} +`, rName, eventCategory1, eventCategory2)) +} + +func testAccDmsEventSubscriptionConfigTags1(rName, tagKey1, tagValue1 string) string { + return composeConfig( + testAccDmsEventSubscriptionConfigBase(rName), + fmt.Sprintf(` +resource "aws_dms_event_subscription" "test" { + name = %[1]q + enabled = true + event_categories = ["creation", "failure"] + source_type = "replication-instance" + source_ids = [aws_dms_replication_instance.test.replication_instance_id] + sns_topic_arn = aws_sns_topic.test.arn + + tags = { + %[2]q = %[3]q + } +} +`, rName, tagKey1, tagValue1)) +} + +func testAccDmsEventSubscriptionConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return composeConfig( + testAccDmsEventSubscriptionConfigBase(rName), + fmt.Sprintf(` +resource "aws_dms_event_subscription" "test" { + name = %[1]q + enabled = true + event_categories = ["creation", "failure"] + source_type = "replication-instance" + source_ids = [aws_dms_replication_instance.test.replication_instance_id] + sns_topic_arn = aws_sns_topic.test.arn + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, rName, tagKey1, tagValue1, tagKey2, tagValue2)) +} diff --git a/aws/resource_aws_dms_replication_instance.go b/aws/resource_aws_dms_replication_instance.go index 2cf3d06a0e2..0ec11e7f246 100644 --- a/aws/resource_aws_dms_replication_instance.go +++ b/aws/resource_aws_dms_replication_instance.go @@ -192,6 +192,7 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf func resourceAwsDmsReplicationInstanceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dmsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig response, err := conn.DescribeReplicationInstances(&dms.DescribeReplicationInstancesInput{ Filters: []*dms.Filter{ @@ -257,7 +258,7 @@ func resourceAwsDmsReplicationInstanceRead(d *schema.ResourceData, meta interfac return fmt.Errorf("error listing tags for DMS Replication Instance (%s): %s", d.Get("replication_instance_arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dms_replication_instance_test.go b/aws/resource_aws_dms_replication_instance_test.go index e83893b08ef..4ed59901e0d 100644 --- a/aws/resource_aws_dms_replication_instance_test.go +++ b/aws/resource_aws_dms_replication_instance_test.go @@ -684,7 +684,14 @@ resource "aws_dms_replication_instance" "test" { func testAccAWSDmsReplicationInstanceConfig_AvailabilityZone(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_partition" "current" {} @@ -778,7 +785,14 @@ resource "aws_dms_replication_instance" "test" { func testAccAWSDmsReplicationInstanceConfig_ReplicationSubnetGroupId(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_partition" "current" {} @@ -852,7 +866,14 @@ resource "aws_dms_replication_instance" "test" { func testAccAWSDmsReplicationInstanceConfig_VpcSecurityGroupIds(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_partition" "current" {} diff --git a/aws/resource_aws_dms_replication_subnet_group.go b/aws/resource_aws_dms_replication_subnet_group.go index d30ad01ee52..268f277da3e 100644 --- a/aws/resource_aws_dms_replication_subnet_group.go +++ b/aws/resource_aws_dms_replication_subnet_group.go @@ -75,6 +75,7 @@ func resourceAwsDmsReplicationSubnetGroupCreate(d *schema.ResourceData, meta int func resourceAwsDmsReplicationSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dmsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig response, err := conn.DescribeReplicationSubnetGroups(&dms.DescribeReplicationSubnetGroupsInput{ Filters: []*dms.Filter{ @@ -114,7 +115,7 @@ func resourceAwsDmsReplicationSubnetGroupRead(d *schema.ResourceData, meta inter return fmt.Errorf("error listing tags for DMS Replication Subnet Group (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dms_replication_task.go b/aws/resource_aws_dms_replication_task.go index b8ee831df9c..53cfa1dd1d6 100644 --- a/aws/resource_aws_dms_replication_task.go +++ b/aws/resource_aws_dms_replication_task.go @@ -60,7 +60,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "replication_task_settings": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "source_endpoint_arn": { @@ -72,7 +72,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "table_mappings": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "tags": tagsSchema(), @@ -141,6 +141,7 @@ func resourceAwsDmsReplicationTaskCreate(d *schema.ResourceData, meta interface{ func resourceAwsDmsReplicationTaskRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dmsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig response, err := conn.DescribeReplicationTasks(&dms.DescribeReplicationTasksInput{ Filters: []*dms.Filter{ @@ -170,7 +171,7 @@ func resourceAwsDmsReplicationTaskRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for DMS Replication Task (%s): %s", d.Get("replication_task_arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_docdb_cluster.go b/aws/resource_aws_docdb_cluster.go index 6a50c6e7f62..036a20292f2 100644 --- a/aws/resource_aws_docdb_cluster.go +++ b/aws/resource_aws_docdb_cluster.go @@ -160,7 +160,6 @@ func resourceAwsDocDBCluster() *schema.Resource { "snapshot_identifier": { Type: schema.TypeString, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, }, "port": { @@ -237,6 +236,11 @@ func resourceAwsDocDBCluster() *schema.Resource { }, }, + "deletion_protection": { + Type: schema.TypeBool, + Optional: true, + }, + "tags": tagsSchema(), }, } @@ -279,6 +283,7 @@ func resourceAwsDocDBClusterCreate(d *schema.ResourceData, meta interface{}) err DBClusterIdentifier: aws.String(identifier), Engine: aws.String(d.Get("engine").(string)), SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Tags: tags, } @@ -361,6 +366,7 @@ func resourceAwsDocDBClusterCreate(d *schema.ResourceData, meta interface{}) err Engine: aws.String(d.Get("engine").(string)), MasterUserPassword: aws.String(d.Get("master_password").(string)), MasterUsername: aws.String(d.Get("master_username").(string)), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Tags: tags, } @@ -478,6 +484,7 @@ func resourceAwsDocDBClusterCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsDocDBClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).docdbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &docdb.DescribeDBClustersInput{ DBClusterIdentifier: aws.String(d.Id()), @@ -551,6 +558,7 @@ func resourceAwsDocDBClusterRead(d *schema.ResourceData, meta interface{}) error d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) d.Set("reader_endpoint", dbc.ReaderEndpoint) d.Set("storage_encrypted", dbc.StorageEncrypted) + d.Set("deletion_protection", dbc.DeletionProtection) var vpcg []string for _, g := range dbc.VpcSecurityGroups { @@ -566,7 +574,7 @@ func resourceAwsDocDBClusterRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for DocumentDB Cluster (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -617,17 +625,20 @@ func resourceAwsDocDBClusterUpdate(d *schema.ResourceData, meta interface{}) err } if d.HasChange("db_cluster_parameter_group_name") { - d.SetPartial("db_cluster_parameter_group_name") req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) requestUpdate = true } if d.HasChange("enabled_cloudwatch_logs_exports") { - d.SetPartial("enabled_cloudwatch_logs_exports") req.CloudwatchLogsExportConfiguration = buildDocDBCloudwatchLogsExportConfiguration(d) requestUpdate = true } + if d.HasChange("deletion_protection") { + req.DeletionProtection = aws.Bool(d.Get("deletion_protection").(bool)) + requestUpdate = true + } + if requestUpdate { err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.ModifyDBCluster(req) @@ -669,7 +680,6 @@ func resourceAwsDocDBClusterUpdate(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("error updating DocumentDB Cluster (%s) tags: %s", d.Get("arn").(string), err) } - d.SetPartial("tags") } return resourceAwsDocDBClusterRead(d, meta) diff --git a/aws/resource_aws_docdb_cluster_instance.go b/aws/resource_aws_docdb_cluster_instance.go index 8ddf4ac2b44..e71e44dceb3 100644 --- a/aws/resource_aws_docdb_cluster_instance.go +++ b/aws/resource_aws_docdb_cluster_instance.go @@ -248,7 +248,10 @@ func resourceAwsDocDBClusterInstanceCreate(d *schema.ResourceData, meta interfac } func resourceAwsDocDBClusterInstanceRead(d *schema.ResourceData, meta interface{}) error { - db, err := resourceAwsDocDBInstanceRetrieve(d.Id(), meta.(*AWSClient).docdbconn) + conn := meta.(*AWSClient).docdbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + db, err := resourceAwsDocDBInstanceRetrieve(d.Id(), conn) // Errors from this helper are always reportable if err != nil { return fmt.Errorf("Error on retrieving DocDB Cluster Instance (%s): %s", d.Id(), err) @@ -261,7 +264,6 @@ func resourceAwsDocDBClusterInstanceRead(d *schema.ResourceData, meta interface{ } // Retrieve DB Cluster information, to determine if this Instance is a writer - conn := meta.(*AWSClient).docdbconn resp, err := conn.DescribeDBClusters(&docdb.DescribeDBClustersInput{ DBClusterIdentifier: db.DBClusterIdentifier, }) @@ -320,7 +322,7 @@ func resourceAwsDocDBClusterInstanceRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error listing tags for DocumentDB Cluster Instance (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -342,25 +344,21 @@ func resourceAwsDocDBClusterInstanceUpdate(d *schema.ResourceData, meta interfac } if d.HasChange("preferred_maintenance_window") { - d.SetPartial("preferred_maintenance_window") req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) requestUpdate = true } if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) requestUpdate = true } if d.HasChange("promotion_tier") { - d.SetPartial("promotion_tier") req.PromotionTier = aws.Int64(int64(d.Get("promotion_tier").(int))) requestUpdate = true } if d.HasChange("ca_cert_identifier") { - d.SetPartial("ca_cert_identifier") req.CACertificateIdentifier = aws.String(d.Get("ca_cert_identifier").(string)) requestUpdate = true } @@ -410,7 +408,6 @@ func resourceAwsDocDBClusterInstanceUpdate(d *schema.ResourceData, meta interfac return fmt.Errorf("error updating DocumentDB Cluster Instance (%s) tags: %s", d.Get("arn").(string), err) } - d.SetPartial("tags") } return resourceAwsDocDBClusterInstanceRead(d, meta) diff --git a/aws/resource_aws_docdb_cluster_instance_test.go b/aws/resource_aws_docdb_cluster_instance_test.go index e3552389ca3..7cdbc29fef5 100644 --- a/aws/resource_aws_docdb_cluster_instance_test.go +++ b/aws/resource_aws_docdb_cluster_instance_test.go @@ -327,7 +327,14 @@ resource "aws_docdb_cluster_instance" "cluster_instances" { func testAccAWSDocDBClusterInstanceConfig_az(n int) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_docdb_cluster" "default" { cluster_identifier = "tf-docdb-cluster-test-%d" diff --git a/aws/resource_aws_docdb_cluster_parameter_group.go b/aws/resource_aws_docdb_cluster_parameter_group.go index 1cfc3153130..e4f402569ff 100644 --- a/aws/resource_aws_docdb_cluster_parameter_group.go +++ b/aws/resource_aws_docdb_cluster_parameter_group.go @@ -126,6 +126,7 @@ func resourceAwsDocDBClusterParameterGroupCreate(d *schema.ResourceData, meta in func resourceAwsDocDBClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).docdbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeOpts := &docdb.DescribeDBClusterParameterGroupsInput{ DBClusterParameterGroupName: aws.String(d.Id()), @@ -172,7 +173,7 @@ func resourceAwsDocDBClusterParameterGroupRead(d *schema.ResourceData, meta inte return fmt.Errorf("error listing tags for DocumentDB Cluster Parameter Group (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -182,8 +183,6 @@ func resourceAwsDocDBClusterParameterGroupRead(d *schema.ResourceData, meta inte func resourceAwsDocDBClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).docdbconn - d.Partial(true) - if d.HasChange("parameter") { o, n := d.GetChange("parameter") if o == nil { @@ -227,7 +226,6 @@ func resourceAwsDocDBClusterParameterGroupUpdate(d *schema.ResourceData, meta in return fmt.Errorf("Error modifying DocDB Cluster Parameter Group: %s", err) } } - d.SetPartial("parameter") } } @@ -237,12 +235,8 @@ func resourceAwsDocDBClusterParameterGroupUpdate(d *schema.ResourceData, meta in if err := keyvaluetags.DocdbUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating DocumentDB Cluster Parameter Group (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } - d.Partial(false) - return resourceAwsDocDBClusterParameterGroupRead(d, meta) } diff --git a/aws/resource_aws_docdb_cluster_parameter_group_test.go b/aws/resource_aws_docdb_cluster_parameter_group_test.go index e163b65380c..f7697e7f0e2 100644 --- a/aws/resource_aws_docdb_cluster_parameter_group_test.go +++ b/aws/resource_aws_docdb_cluster_parameter_group_test.go @@ -15,6 +15,7 @@ import ( func TestAccAWSDocDBClusterParameterGroup_basic(t *testing.T) { var v docdb.DBClusterParameterGroup + resourceName := "aws_docdb_cluster_parameter_group.bar" parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) @@ -26,22 +27,18 @@ func TestAccAWSDocDBClusterParameterGroup_basic(t *testing.T) { { Config: testAccAWSDocDBClusterParameterGroupConfig(parameterGroupName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestMatchResourceAttr( - "aws_docdb_cluster_parameter_group.bar", "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:rds:[^:]+:\\d{12}:cluster-pg:%s", parameterGroupName))), - resource.TestCheckResourceAttr( - "aws_docdb_cluster_parameter_group.bar", "name", parameterGroupName), - resource.TestCheckResourceAttr( - "aws_docdb_cluster_parameter_group.bar", "family", "docdb3.6"), - resource.TestCheckResourceAttr( - "aws_docdb_cluster_parameter_group.bar", "description", "Managed by Terraform"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.#", "0"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.%", "0"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "rds", regexp.MustCompile(fmt.Sprintf("cluster-pg:%s$", parameterGroupName))), + resource.TestCheckResourceAttr(resourceName, "name", parameterGroupName), + resource.TestCheckResourceAttr(resourceName, "family", "docdb3.6"), + resource.TestCheckResourceAttr(resourceName, "description", "Managed by Terraform"), + resource.TestCheckResourceAttr(resourceName, "parameter.#", "0"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { - ResourceName: "aws_docdb_cluster_parameter_group.bar", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -61,8 +58,7 @@ func TestAccAWSDocDBClusterParameterGroup_namePrefix(t *testing.T) { Config: testAccAWSDocDBClusterParameterGroupConfig_namePrefix, Check: resource.ComposeTestCheckFunc( testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.test", &v), - resource.TestMatchResourceAttr( - "aws_docdb_cluster_parameter_group.test", "name", regexp.MustCompile("^tf-test-")), + resource.TestMatchResourceAttr("aws_docdb_cluster_parameter_group.test", "name", regexp.MustCompile("^tf-test-")), ), }, { @@ -100,6 +96,7 @@ func TestAccAWSDocDBClusterParameterGroup_generatedName(t *testing.T) { func TestAccAWSDocDBClusterParameterGroup_Description(t *testing.T) { var v docdb.DBClusterParameterGroup + resourceName := "aws_docdb_cluster_parameter_group.bar" parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) @@ -111,13 +108,13 @@ func TestAccAWSDocDBClusterParameterGroup_Description(t *testing.T) { { Config: testAccAWSDocDBClusterParameterGroupConfig_Description(parameterGroupName, "custom description"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "description", "custom description"), + resource.TestCheckResourceAttr(resourceName, "description", "custom description"), ), }, { - ResourceName: "aws_docdb_cluster_parameter_group.bar", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -127,6 +124,7 @@ func TestAccAWSDocDBClusterParameterGroup_Description(t *testing.T) { func TestAccAWSDocDBClusterParameterGroup_disappears(t *testing.T) { var v docdb.DBClusterParameterGroup + resourceName := "aws_docdb_cluster_parameter_group.bar" parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) @@ -138,7 +136,7 @@ func TestAccAWSDocDBClusterParameterGroup_disappears(t *testing.T) { { Config: testAccAWSDocDBClusterParameterGroupConfig(parameterGroupName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupDisappears(&v), ), ExpectNonEmptyPlan: true, @@ -149,39 +147,41 @@ func TestAccAWSDocDBClusterParameterGroup_disappears(t *testing.T) { func TestAccAWSDocDBClusterParameterGroup_Parameter(t *testing.T) { var v docdb.DBClusterParameterGroup + resourceName := "aws_docdb_cluster_parameter_group.bar" parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-tf-%d", acctest.RandInt()) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDocDBClusterParameterGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDocDBClusterParameterGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDocDBClusterParameterGroupConfig_Parameter(parameterGroupName, "tls", "disabled"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.#", "1"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.3297634353.apply_method", "pending-reboot"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.3297634353.name", "tls"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.3297634353.value", "disabled"), + resource.TestCheckResourceAttr(resourceName, "parameter.#", "1"), + resource.TestCheckResourceAttr(resourceName, "parameter.3297634353.apply_method", "pending-reboot"), + resource.TestCheckResourceAttr(resourceName, "parameter.3297634353.name", "tls"), + resource.TestCheckResourceAttr(resourceName, "parameter.3297634353.value", "disabled"), ), }, { - ResourceName: "aws_docdb_cluster_parameter_group.bar", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, { Config: testAccAWSDocDBClusterParameterGroupConfig_Parameter(parameterGroupName, "tls", "enabled"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.#", "1"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.4005179180.apply_method", "pending-reboot"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.4005179180.name", "tls"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "parameter.4005179180.value", "enabled"), + resource.TestCheckResourceAttr(resourceName, "parameter.#", "1"), + resource.TestCheckResourceAttr(resourceName, "parameter.4005179180.apply_method", "pending-reboot"), + resource.TestCheckResourceAttr(resourceName, "parameter.4005179180.name", "tls"), + resource.TestCheckResourceAttr(resourceName, "parameter.4005179180.value", "enabled"), ), }, }, @@ -190,6 +190,7 @@ func TestAccAWSDocDBClusterParameterGroup_Parameter(t *testing.T) { func TestAccAWSDocDBClusterParameterGroup_Tags(t *testing.T) { var v docdb.DBClusterParameterGroup + resourceName := "aws_docdb_cluster_parameter_group.bar" parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-tf-%d", acctest.RandInt()) @@ -201,33 +202,33 @@ func TestAccAWSDocDBClusterParameterGroup_Tags(t *testing.T) { { Config: testAccAWSDocDBClusterParameterGroupConfig_Tags(parameterGroupName, "key1", "value1"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), ), }, { - ResourceName: "aws_docdb_cluster_parameter_group.bar", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, { Config: testAccAWSDocDBClusterParameterGroupConfig_Tags(parameterGroupName, "key1", "value2"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.key1", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value2"), ), }, { Config: testAccAWSDocDBClusterParameterGroupConfig_Tags(parameterGroupName, "key2", "value2"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDocDBClusterParameterGroupExists("aws_docdb_cluster_parameter_group.bar", &v), + testAccCheckAWSDocDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDocDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_docdb_cluster_parameter_group.bar", "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), ), }, }, diff --git a/aws/resource_aws_docdb_cluster_snapshot_test.go b/aws/resource_aws_docdb_cluster_snapshot_test.go index c85fe8f90a2..6afa257748a 100644 --- a/aws/resource_aws_docdb_cluster_snapshot_test.go +++ b/aws/resource_aws_docdb_cluster_snapshot_test.go @@ -110,7 +110,14 @@ func testAccCheckDocDBClusterSnapshotExists(resourceName string, dbClusterSnapsh func testAccAwsDocDBClusterSnapshotConfig(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "192.168.0.0/16" diff --git a/aws/resource_aws_docdb_cluster_test.go b/aws/resource_aws_docdb_cluster_test.go index 18087a3c920..222a33cc854 100644 --- a/aws/resource_aws_docdb_cluster_test.go +++ b/aws/resource_aws_docdb_cluster_test.go @@ -43,6 +43,7 @@ func TestAccAWSDocDBCluster_basic(t *testing.T) { "enabled_cloudwatch_logs_exports.0", "audit"), resource.TestCheckResourceAttr(resourceName, "enabled_cloudwatch_logs_exports.1", "profiler"), + resource.TestCheckResourceAttr(resourceName, "deletion_protection", "false"), ), }, { @@ -407,6 +408,59 @@ func TestAccAWSDocDBCluster_Port(t *testing.T) { }) } +func TestAccAWSDocDBCluster_deleteProtection(t *testing.T) { + var dbCluster docdb.DBCluster + resourceName := "aws_docdb_cluster.default" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckDocDBClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDocDBClusterConfigDeleteProtection(true), + Check: resource.ComposeTestCheckFunc( + testAccCheckDocDBClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "deletion_protection", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "apply_immediately", + "cluster_identifier_prefix", + "final_snapshot_identifier", + "master_password", + "skip_final_snapshot", + }, + }, + { + Config: testAccDocDBClusterConfigDeleteProtection(false), + Check: resource.ComposeTestCheckFunc( + testAccCheckDocDBClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "deletion_protection", "false"), + ), + }, + { + Config: testAccDocDBClusterConfigDeleteProtection(true), + Check: resource.ComposeTestCheckFunc( + testAccCheckDocDBClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "deletion_protection", "true"), + ), + }, + { + Config: testAccDocDBClusterConfigDeleteProtection(false), + Check: resource.ComposeTestCheckFunc( + testAccCheckDocDBClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "deletion_protection", "false"), + ), + }, + }, + }) +} + func testAccCheckDocDBClusterDestroy(s *terraform.State) error { return testAccCheckDocDBClusterDestroyWithProvider(s, testAccProvider) } @@ -729,7 +783,14 @@ resource "aws_docdb_cluster" "default" { func testAccDocDBClusterConfig_Port(rInt, port int) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_docdb_cluster" "test" { availability_zones = ["${data.aws_availability_zones.available.names[0]}", "${data.aws_availability_zones.available.names[1]}", "${data.aws_availability_zones.available.names[2]}"] @@ -743,3 +804,15 @@ resource "aws_docdb_cluster" "test" { } `, rInt, port) } + +func testAccDocDBClusterConfigDeleteProtection(isProtected bool) string { + return fmt.Sprintf(` +resource "aws_docdb_cluster" "default" { + cluster_identifier_prefix = "tf-test-" + master_username = "root" + master_password = "password" + skip_final_snapshot = true + deletion_protection = %t +} +`, isProtected) +} diff --git a/aws/resource_aws_docdb_subnet_group.go b/aws/resource_aws_docdb_subnet_group.go index 568013c5c40..a8d94ba4f1b 100644 --- a/aws/resource_aws_docdb_subnet_group.go +++ b/aws/resource_aws_docdb_subnet_group.go @@ -99,6 +99,7 @@ func resourceAwsDocDBSubnetGroupCreate(d *schema.ResourceData, meta interface{}) func resourceAwsDocDBSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).docdbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeOpts := docdb.DescribeDBSubnetGroupsInput{ DBSubnetGroupName: aws.String(d.Id()), @@ -141,7 +142,7 @@ func resourceAwsDocDBSubnetGroupRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error listing tags for DocumentDB Subnet Group (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -175,8 +176,6 @@ func resourceAwsDocDBSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) if err := keyvaluetags.DocdbUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating DocumentDB Subnet Group (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } return resourceAwsDocDBSubnetGroupRead(d, meta) diff --git a/aws/resource_aws_dx_connection.go b/aws/resource_aws_dx_connection.go index 8ca031fa588..21d557406b4 100644 --- a/aws/resource_aws_dx_connection.go +++ b/aws/resource_aws_dx_connection.go @@ -87,6 +87,7 @@ func resourceAwsDxConnectionCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeConnections(&directconnect.DescribeConnectionsInput{ ConnectionId: aws.String(d.Id()), @@ -139,7 +140,7 @@ func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for Direct Connect connection (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_gateway_association_proposal_test.go b/aws/resource_aws_dx_gateway_association_proposal_test.go index ddaae34bef0..3f0d79c1e8c 100644 --- a/aws/resource_aws_dx_gateway_association_proposal_test.go +++ b/aws/resource_aws_dx_gateway_association_proposal_test.go @@ -163,8 +163,9 @@ func TestAccAwsDxGatewayAssociationProposal_basicTransitGateway(t *testing.T) { testAccPreCheck(t) testAccAlternateAccountPreCheck(t) }, - ProviderFactories: testAccProviderFactories(&providers), - CheckDestroy: testAccCheckAwsDxGatewayAssociationProposalDestroy, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAwsDxGatewayAssociationProposalDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationProposalConfig_basicTransitGateway(rName, rBgpAsn), diff --git a/aws/resource_aws_dx_gateway_association_test.go b/aws/resource_aws_dx_gateway_association_test.go index 897eb9e400a..4699619c7d2 100644 --- a/aws/resource_aws_dx_gateway_association_test.go +++ b/aws/resource_aws_dx_gateway_association_test.go @@ -189,9 +189,10 @@ func TestAccAwsDxGatewayAssociation_deprecatedSingleAccount(t *testing.T) { rBgpAsn := randIntRange(64512, 65534) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_deprecatedSingleAccount(rName, rBgpAsn), @@ -221,9 +222,10 @@ func TestAccAwsDxGatewayAssociation_basicVpnGatewaySingleAccount(t *testing.T) { rBgpAsn := randIntRange(64512, 65534) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_basicVpnGatewaySingleAccount(rName, rBgpAsn), @@ -270,8 +272,9 @@ func TestAccAwsDxGatewayAssociation_basicVpnGatewayCrossAccount(t *testing.T) { testAccPreCheck(t) testAccAlternateAccountPreCheck(t) }, - ProviderFactories: testAccProviderFactories(&providers), - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_basicVpnGatewayCrossAccount(rName, rBgpAsn), @@ -301,9 +304,10 @@ func TestAccAwsDxGatewayAssociation_basicTransitGatewaySingleAccount(t *testing. rBgpAsn := randIntRange(64512, 65534) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_basicTransitGatewaySingleAccount(rName, rBgpAsn), @@ -351,8 +355,9 @@ func TestAccAwsDxGatewayAssociation_basicTransitGatewayCrossAccount(t *testing.T testAccPreCheck(t) testAccAlternateAccountPreCheck(t) }, - ProviderFactories: testAccProviderFactories(&providers), - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_basicTransitGatewayCrossAccount(rName, rBgpAsn), @@ -383,9 +388,10 @@ func TestAccAwsDxGatewayAssociation_multiVpnGatewaysSingleAccount(t *testing.T) rBgpAsn := randIntRange(64512, 65534) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_multiVpnGatewaysSingleAccount(rName1, rName2, rBgpAsn), @@ -412,9 +418,10 @@ func TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewaySingleAccount(t *te rBgpAsn := randIntRange(64512, 65534) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_allowedPrefixesVpnGatewaySingleAccount(rName, rBgpAsn), @@ -453,8 +460,9 @@ func TestAccAwsDxGatewayAssociation_allowedPrefixesVpnGatewayCrossAccount(t *tes testAccPreCheck(t) testAccAlternateAccountPreCheck(t) }, - ProviderFactories: testAccProviderFactories(&providers), - CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccDxGatewayAssociationConfig_allowedPrefixesVpnGatewayCrossAccount(rName, rBgpAsn), diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index 42531d1d30c..2cd8915ce71 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -100,6 +100,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { @@ -129,7 +130,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceDa return fmt.Errorf("error listing tags for Direct Connect hosted private virtual interface (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index bc106c0bb96..4d7d1e2a9e4 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -75,6 +75,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceD func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { @@ -103,7 +104,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceDat return fmt.Errorf("error listing tags for Direct Connect hosted public virtual interface (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_hosted_transit_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_transit_virtual_interface_accepter.go index cd118fb9451..0e7e13313f2 100644 --- a/aws/resource_aws_dx_hosted_transit_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_transit_virtual_interface_accepter.go @@ -81,6 +81,7 @@ func resourceAwsDxHostedTransitVirtualInterfaceAccepterCreate(d *schema.Resource func resourceAwsDxHostedTransitVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { @@ -108,7 +109,7 @@ func resourceAwsDxHostedTransitVirtualInterfaceAccepterRead(d *schema.ResourceDa return fmt.Errorf("error listing tags for Direct Connect hosted transit virtual interface (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_lag.go b/aws/resource_aws_dx_lag.go index 44acba3bd7f..28ae8174a3f 100644 --- a/aws/resource_aws_dx_lag.go +++ b/aws/resource_aws_dx_lag.go @@ -106,6 +106,7 @@ func resourceAwsDxLagCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeLags(&directconnect.DescribeLagsInput{ LagId: aws.String(d.Id()), @@ -158,7 +159,7 @@ func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for Direct Connect LAG (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 6dbc9bb2575..215fd778ee9 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -174,6 +174,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { @@ -214,7 +215,7 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter return fmt.Errorf("error listing tags for Direct Connect private virtual interface (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_public_virtual_interface.go b/aws/resource_aws_dx_public_virtual_interface.go index 0df67b4db8c..c90fc922745 100644 --- a/aws/resource_aws_dx_public_virtual_interface.go +++ b/aws/resource_aws_dx_public_virtual_interface.go @@ -148,6 +148,7 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { @@ -187,7 +188,7 @@ func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interf return fmt.Errorf("error listing tags for Direct Connect public virtual interface (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dx_transit_virtual_interface.go b/aws/resource_aws_dx_transit_virtual_interface.go index c28817d2b85..5cdce7774ff 100644 --- a/aws/resource_aws_dx_transit_virtual_interface.go +++ b/aws/resource_aws_dx_transit_virtual_interface.go @@ -155,6 +155,7 @@ func resourceAwsDxTransitVirtualInterfaceCreate(d *schema.ResourceData, meta int func resourceAwsDxTransitVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { @@ -194,7 +195,7 @@ func resourceAwsDxTransitVirtualInterfaceRead(d *schema.ResourceData, meta inter return fmt.Errorf("error listing tags for Direct Connect transit virtual interface (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_dynamodb_global_table_test.go b/aws/resource_aws_dynamodb_global_table_test.go index ac7d8fca887..307d162a2be 100644 --- a/aws/resource_aws_dynamodb_global_table_test.go +++ b/aws/resource_aws_dynamodb_global_table_test.go @@ -40,8 +40,7 @@ func TestAccAWSDynamoDbGlobalTable_basic(t *testing.T) { testAccCheckAwsDynamoDbGlobalTableExists(resourceName), resource.TestCheckResourceAttr(resourceName, "name", tableName), resource.TestCheckResourceAttr(resourceName, "replica.#", "1"), - resource.TestMatchResourceAttr(resourceName, "arn", - regexp.MustCompile("^arn:aws:dynamodb::[0-9]{12}:global-table/[a-z0-9-]+$")), + testAccMatchResourceAttrGlobalARN(resourceName, "arn", "dynamodb", regexp.MustCompile("global-table/[a-z0-9-]+$")), ), }, { diff --git a/aws/resource_aws_dynamodb_table.go b/aws/resource_aws_dynamodb_table.go index 83e71b6b9a3..c2a65e2bb82 100644 --- a/aws/resource_aws_dynamodb_table.go +++ b/aws/resource_aws_dynamodb_table.go @@ -279,6 +279,18 @@ func resourceAwsDynamoDbTable() *schema.Resource { }, }, }, + "replica": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region_name": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, } } @@ -418,6 +430,12 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er } } + if v := d.Get("replica").(*schema.Set); v.Len() > 0 { + if err := createDynamoDbReplicas(d.Id(), v.List(), d.Timeout(schema.TimeoutCreate), conn); err != nil { + return fmt.Errorf("error creating DynamoDB Table (%s) replicas: %s", d.Id(), err) + } + } + return resourceAwsDynamoDbTableRead(d, meta) } @@ -595,11 +613,41 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er } } + if d.HasChange("replica") { + if err := updateDynamoDbReplica(d, conn); err != nil { + return fmt.Errorf("error updating DynamoDB Table (%s) replica: %s", d.Id(), err) + } + } + return resourceAwsDynamoDbTableRead(d, meta) } +func updateDynamoDbReplica(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { + oRaw, nRaw := d.GetChange("replica") + o := oRaw.(*schema.Set) + n := nRaw.(*schema.Set) + + removed := o.Difference(n).List() + added := n.Difference(o).List() + + if len(added) > 0 { + if err := createDynamoDbReplicas(d.Id(), added, d.Timeout(schema.TimeoutUpdate), conn); err != nil { + return err + } + } + + if len(removed) > 0 { + if err := deleteDynamoDbReplicas(d.Id(), removed, d.Timeout(schema.TimeoutUpdate), conn); err != nil { + return err + } + } + + return nil +} + func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dynamodbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ TableName: aws.String(d.Id()), @@ -629,12 +677,15 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("error setting ttl: %s", err) } - tags, err := readDynamoDbTableTags(d.Get("arn").(string), conn) - if err != nil { - return err + tags, err := keyvaluetags.DynamodbListTags(conn, d.Get("arn").(string)) + + if err != nil && !isAWSErr(err, "UnknownOperationException", "Tagging is not currently supported in DynamoDB Local.") { + return fmt.Errorf("error listing tags for DynamoDB Table (%s): %s", d.Get("arn").(string), err) } - d.Set("tags", tags) + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } pitrOut, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ TableName: aws.String(d.Id()), @@ -652,6 +703,12 @@ func resourceAwsDynamoDbTableDelete(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] DynamoDB delete table: %s", d.Id()) + if replicas := d.Get("replica").(*schema.Set).List(); len(replicas) > 0 { + if err := deleteDynamoDbReplicas(d.Id(), replicas, d.Timeout(schema.TimeoutDelete), conn); err != nil { + return fmt.Errorf("error deleting DynamoDB Table (%s) replicas: %s", d.Id(), err) + } + } + err := deleteAwsDynamoDbTable(d.Id(), conn) if err != nil { if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "Requested resource not found: Table: ") { @@ -702,6 +759,69 @@ func deleteAwsDynamoDbTable(tableName string, conn *dynamodb.DynamoDB) error { return err } +func deleteDynamoDbReplicas(tableName string, tfList []interface{}, timeout time.Duration, conn *dynamodb.DynamoDB) error { + for _, tfMapRaw := range tfList { + tfMap, ok := tfMapRaw.(map[string]interface{}) + + if !ok { + continue + } + + var regionName string + + if v, ok := tfMap["region_name"].(string); ok { + regionName = v + } + + if regionName == "" { + continue + } + + input := &dynamodb.UpdateTableInput{ + TableName: aws.String(tableName), + ReplicaUpdates: []*dynamodb.ReplicationGroupUpdate{ + { + Delete: &dynamodb.DeleteReplicationGroupMemberAction{ + RegionName: aws.String(regionName), + }, + }, + }, + } + + err := resource.Retry(20*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateTable(input) + if err != nil { + if isAWSErr(err, "ThrottlingException", "") { + return resource.RetryableError(err) + } + if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "can be created, updated, or deleted simultaneously") { + return resource.RetryableError(err) + } + if isAWSErr(err, dynamodb.ErrCodeResourceInUseException, "") { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.UpdateTable(input) + } + + if err != nil { + return fmt.Errorf("error deleting DynamoDB Table (%s) replica (%s): %s", tableName, regionName, err) + } + + if err := waitForDynamoDbReplicaDeleteToBeCompleted(tableName, regionName, timeout, conn); err != nil { + return fmt.Errorf("error waiting for DynamoDB Table (%s) replica (%s) deletion: %s", tableName, regionName, err) + } + } + + return nil +} + func waitForDynamodbTableDeletion(conn *dynamodb.DynamoDB, tableName string, timeout time.Duration) error { stateConf := &resource.StateChangeConf{ Pending: []string{ @@ -738,6 +858,150 @@ func waitForDynamodbTableDeletion(conn *dynamodb.DynamoDB, tableName string, tim return err } +func waitForDynamoDbReplicaUpdateToBeCompleted(tableName string, region string, timeout time.Duration, conn *dynamodb.DynamoDB) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + dynamodb.ReplicaStatusCreating, + dynamodb.ReplicaStatusUpdating, + dynamodb.ReplicaStatusDeleting, + }, + Target: []string{ + dynamodb.ReplicaStatusActive, + }, + Timeout: timeout, + Refresh: func() (interface{}, string, error) { + result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ + TableName: aws.String(tableName), + }) + if err != nil { + return 42, "", err + } + log.Printf("[DEBUG] DynamoDB replicas: %s", result.Table.Replicas) + + var targetReplica *dynamodb.ReplicaDescription + + for _, replica := range result.Table.Replicas { + if aws.StringValue(replica.RegionName) == region { + targetReplica = replica + break + } + } + + if targetReplica == nil { + return result, dynamodb.ReplicaStatusCreating, nil + } + + return result, aws.StringValue(targetReplica.ReplicaStatus), nil + }, + } + _, err := stateConf.WaitForState() + + return err +} + +func waitForDynamoDbReplicaDeleteToBeCompleted(tableName string, region string, timeout time.Duration, conn *dynamodb.DynamoDB) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + dynamodb.ReplicaStatusCreating, + dynamodb.ReplicaStatusUpdating, + dynamodb.ReplicaStatusDeleting, + dynamodb.ReplicaStatusActive, + }, + Target: []string{""}, + Timeout: timeout, + Refresh: func() (interface{}, string, error) { + result, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ + TableName: aws.String(tableName), + }) + if err != nil { + return 42, "", err + } + + log.Printf("[DEBUG] all replicas for waiting: %s", result.Table.Replicas) + var targetReplica *dynamodb.ReplicaDescription + + for _, replica := range result.Table.Replicas { + if aws.StringValue(replica.RegionName) == region { + targetReplica = replica + break + } + } + + if targetReplica == nil { + return result, "", nil + } + + return result, aws.StringValue(targetReplica.ReplicaStatus), nil + }, + } + _, err := stateConf.WaitForState() + + return err +} + +func createDynamoDbReplicas(tableName string, tfList []interface{}, timeout time.Duration, conn *dynamodb.DynamoDB) error { + for _, tfMapRaw := range tfList { + tfMap, ok := tfMapRaw.(map[string]interface{}) + + if !ok { + continue + } + + var regionName string + + if v, ok := tfMap["region_name"].(string); ok { + regionName = v + } + + if regionName == "" { + continue + } + + input := &dynamodb.UpdateTableInput{ + TableName: aws.String(tableName), + ReplicaUpdates: []*dynamodb.ReplicationGroupUpdate{ + { + Create: &dynamodb.CreateReplicationGroupMemberAction{ + RegionName: aws.String(regionName), + }, + }, + }, + } + + err := resource.Retry(20*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateTable(input) + if err != nil { + if isAWSErr(err, "ThrottlingException", "") { + return resource.RetryableError(err) + } + if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "can be created, updated, or deleted simultaneously") { + return resource.RetryableError(err) + } + if isAWSErr(err, dynamodb.ErrCodeResourceInUseException, "") { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.UpdateTable(input) + } + + if err != nil { + return fmt.Errorf("error creating DynamoDB Table (%s) replica (%s): %s", tableName, regionName, err) + } + + if err := waitForDynamoDbReplicaUpdateToBeCompleted(tableName, regionName, timeout, conn); err != nil { + return fmt.Errorf("error waiting for DynamoDB Table (%s) replica (%s) creation: %s", tableName, regionName, err) + } + } + + return nil +} + func updateDynamoDbTimeToLive(tableName string, ttlList []interface{}, conn *dynamodb.DynamoDB) error { ttlMap := ttlList[0].(map[string]interface{}) @@ -799,23 +1063,6 @@ func updateDynamoDbPITR(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { return nil } -func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]string, error) { - output, err := conn.ListTagsOfResource(&dynamodb.ListTagsOfResourceInput{ - ResourceArn: aws.String(arn), - }) - - // Do not fail if interfacing with dynamodb-local - if err != nil && !isAWSErr(err, "UnknownOperationException", "Tagging is not currently supported in DynamoDB Local.") { - return nil, fmt.Errorf("Error reading tags from dynamodb resource: %s", err) - } - - result := keyvaluetags.DynamodbKeyValueTags(output.Tags).IgnoreAws().Map() - - // TODO Read NextToken if available - - return result, nil -} - // Waiters func waitForDynamoDbGSIToBeActive(tableName string, gsiName string, timeout time.Duration, conn *dynamodb.DynamoDB) error { diff --git a/aws/resource_aws_dynamodb_table_test.go b/aws/resource_aws_dynamodb_table_test.go index 21b37ad009e..dd3060b22e5 100644 --- a/aws/resource_aws_dynamodb_table_test.go +++ b/aws/resource_aws_dynamodb_table_test.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) @@ -325,9 +326,10 @@ func TestAccAWSDynamoDbTable_basic(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDynamoDbConfig_basic(rName), @@ -679,9 +681,10 @@ func TestAccAWSDynamoDbTable_gsiUpdateCapacity(t *testing.T) { name := acctest.RandString(10) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDynamoDbConfigGsiUpdate(name), @@ -724,9 +727,10 @@ func TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes(t *testing.T) { name := acctest.RandString(10) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDynamoDbConfigGsiUpdate(name), @@ -801,9 +805,10 @@ func TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes(t *testing.T) { name := acctest.RandString(10) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDynamoDbConfigGsiUpdatedOtherAttributes(name), @@ -1382,6 +1387,96 @@ func testAccCheckAWSDynamoDbTableDisappears(table *dynamodb.DescribeTableOutput) } } +func TestAccAWSDynamoDbTable_Replica_Multiple(t *testing.T) { + var table dynamodb.DescribeTableOutput + var providers []*schema.Provider + resourceName := "aws_dynamodb_table.test" + tableName := acctest.RandomWithPrefix("TerraformTestTable-") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionPreCheck(t, 3) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDynamoDbTableConfigReplica2(tableName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists(resourceName, &table), + resource.TestCheckResourceAttr(resourceName, "replica.#", "2"), + ), + }, + { + Config: testAccAWSDynamoDbTableConfigReplica2(tableName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSDynamoDbTableConfigReplica0(tableName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists(resourceName, &table), + resource.TestCheckResourceAttr(resourceName, "replica.#", "0"), + ), + }, + { + Config: testAccAWSDynamoDbTableConfigReplica2(tableName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists(resourceName, &table), + resource.TestCheckResourceAttr(resourceName, "replica.#", "2"), + ), + }, + }, + }) +} + +func TestAccAWSDynamoDbTable_Replica_Single(t *testing.T) { + var conf dynamodb.DescribeTableOutput + var providers []*schema.Provider + resourceName := "aws_dynamodb_table.test" + tableName := acctest.RandomWithPrefix("TerraformTestTable-") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionPreCheck(t, 2) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDynamoDbTableConfigReplica1(tableName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "replica.#", "1"), + ), + }, + { + Config: testAccAWSDynamoDbTableConfigReplica1(tableName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSDynamoDbTableConfigReplica0(tableName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "replica.#", "0"), + ), + }, + { + Config: testAccAWSDynamoDbTableConfigReplica1(tableName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "replica.#", "1"), + ), + }, + }, + }) +} + func dynamoDbGetGSIIndex(gsiList *[]*dynamodb.GlobalSecondaryIndexDescription, target string) int { for idx, gsiObject := range *gsiList { if *gsiObject.IndexName == target { @@ -2083,3 +2178,84 @@ resource "aws_dynamodb_table" "test" { } `, rName, attrName1, attrType1, attrName2, attrType2, hashKey, rangeKey) } + +func testAccAWSDynamoDbTableConfigReplica0(rName string) string { + return composeConfig( + testAccMultipleRegionProviderConfig(3), // Prevent "Provider configuration not present" errors + fmt.Sprintf(` +resource "aws_dynamodb_table" "test" { + name = %[1]q + hash_key = "TestTableHashKey" + billing_mode = "PAY_PER_REQUEST" + stream_enabled = true + stream_view_type = "NEW_AND_OLD_IMAGES" + + attribute { + name = "TestTableHashKey" + type = "S" + } +} +`, rName)) +} + +func testAccAWSDynamoDbTableConfigReplica1(rName string) string { + return composeConfig( + testAccMultipleRegionProviderConfig(3), // Prevent "Provider configuration not present" errors + fmt.Sprintf(` +data "aws_region" "alternate" { + provider = "aws.alternate" +} + +resource "aws_dynamodb_table" "test" { + name = %[1]q + hash_key = "TestTableHashKey" + billing_mode = "PAY_PER_REQUEST" + stream_enabled = true + stream_view_type = "NEW_AND_OLD_IMAGES" + + attribute { + name = "TestTableHashKey" + type = "S" + } + + replica { + region_name = data.aws_region.alternate.name + } +} +`, rName)) +} + +func testAccAWSDynamoDbTableConfigReplica2(rName string) string { + return composeConfig( + testAccMultipleRegionProviderConfig(3), + fmt.Sprintf(` +data "aws_region" "alternate" { + provider = "aws.alternate" +} + +data "aws_region" "third" { + provider = "aws.third" +} + +resource "aws_dynamodb_table" "test" { + name = %[1]q + hash_key = "TestTableHashKey" + billing_mode = "PAY_PER_REQUEST" + stream_enabled = true + stream_view_type = "NEW_AND_OLD_IMAGES" + + attribute { + name = "TestTableHashKey" + type = "S" + } + + replica { + region_name = data.aws_region.alternate.name + } + + replica { + region_name = data.aws_region.third.name + } +} +`, rName)) +} diff --git a/aws/resource_aws_ebs_snapshot.go b/aws/resource_aws_ebs_snapshot.go index 994db2d237d..b84b41f06b6 100644 --- a/aws/resource_aws_ebs_snapshot.go +++ b/aws/resource_aws_ebs_snapshot.go @@ -109,6 +109,7 @@ func resourceAwsEbsSnapshotCreate(d *schema.ResourceData, meta interface{}) erro func resourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &ec2.DescribeSnapshotsInput{ SnapshotIds: []*string{aws.String(d.Id())}, @@ -139,7 +140,7 @@ func resourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) error d.Set("kms_key_id", snapshot.KmsKeyId) d.Set("volume_size", snapshot.VolumeSize) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(snapshot.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(snapshot.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ebs_snapshot_copy.go b/aws/resource_aws_ebs_snapshot_copy.go index ee63ddc1584..163cf18259f 100644 --- a/aws/resource_aws_ebs_snapshot_copy.go +++ b/aws/resource_aws_ebs_snapshot_copy.go @@ -105,6 +105,7 @@ func resourceAwsEbsSnapshotCopyCreate(d *schema.ResourceData, meta interface{}) func resourceAwsEbsSnapshotCopyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &ec2.DescribeSnapshotsInput{ SnapshotIds: []*string{aws.String(d.Id())}, @@ -131,7 +132,7 @@ func resourceAwsEbsSnapshotCopyRead(d *schema.ResourceData, meta interface{}) er d.Set("kms_key_id", snapshot.KmsKeyId) d.Set("volume_size", snapshot.VolumeSize) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(snapshot.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(snapshot.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ebs_snapshot_copy_test.go b/aws/resource_aws_ebs_snapshot_copy_test.go index d2c0fe4da26..031271fc3c5 100644 --- a/aws/resource_aws_ebs_snapshot_copy_test.go +++ b/aws/resource_aws_ebs_snapshot_copy_test.go @@ -235,6 +235,11 @@ func testAccCheckEbsSnapshotCopyExists(n string, v *ec2.Snapshot) resource.TestC const testAccAwsEbsSnapshotCopyConfig = ` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "current" {} @@ -266,6 +271,11 @@ func testAccAwsEbsSnapshotCopyConfigTags1(tagKey1, tagValue1 string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "current" {} @@ -299,6 +309,11 @@ func testAccAwsEbsSnapshotCopyConfigTags2(tagKey1, tagValue1, tagKey2, tagValue2 return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "current" {} @@ -332,6 +347,11 @@ resource "aws_ebs_snapshot_copy" "test" { const testAccAwsEbsSnapshotCopyConfigWithDescription = ` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "current" {} @@ -369,6 +389,11 @@ var testAccAwsEbsSnapshotCopyConfigWithRegions = testAccAlternateRegionProviderC data "aws_availability_zones" "alternate_available" { provider = "aws.alternate" state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "alternate" { @@ -407,6 +432,11 @@ resource "aws_ebs_snapshot_copy" "test" { const testAccAwsEbsSnapshotCopyConfigWithKms = ` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "current" {} diff --git a/aws/resource_aws_ebs_volume.go b/aws/resource_aws_ebs_volume.go index 89add9e1a8b..62c02c61d15 100644 --- a/aws/resource_aws_ebs_volume.go +++ b/aws/resource_aws_ebs_volume.go @@ -56,6 +56,11 @@ func resourceAwsEbsVolume() *schema.Resource { ForceNew: true, ValidateFunc: validateArn, }, + "multi_attach_enabled": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, "size": { Type: schema.TypeInt, Optional: true, @@ -67,6 +72,12 @@ func resourceAwsEbsVolume() *schema.Resource { Computed: true, ForceNew: true, }, + "outpost_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, + }, "type": { Type: schema.TypeString, Optional: true, @@ -96,6 +107,12 @@ func resourceAwsEbsVolumeCreate(d *schema.ResourceData, meta interface{}) error if value, ok := d.GetOk("snapshot_id"); ok { request.SnapshotId = aws.String(value.(string)) } + if value, ok := d.GetOk("multi_attach_enabled"); ok { + request.MultiAttachEnabled = aws.Bool(value.(bool)) + } + if value, ok := d.GetOk("outpost_arn"); ok { + request.OutpostArn = aws.String(value.(string)) + } // IOPs are only valid, and required for, storage type io1. The current minimu // is 100. Instead of a hard validation we we only apply the IOPs to the @@ -108,9 +125,9 @@ func resourceAwsEbsVolumeCreate(d *schema.ResourceData, meta interface{}) error } iops := d.Get("iops").(int) - if t != "io1" && iops > 0 { - log.Printf("[WARN] IOPs is only valid for storate type io1 for EBS Volumes") - } else if t == "io1" { + if t != ec2.VolumeTypeIo1 && iops > 0 { + log.Printf("[WARN] IOPs is only valid on IO1 storage type for EBS Volumes") + } else if t == ec2.VolumeTypeIo1 { // We add the iops value without validating it's size, to allow AWS to // enforce a size requirement (currently 100) request.Iops = aws.Int64(int64(iops)) @@ -126,8 +143,8 @@ func resourceAwsEbsVolumeCreate(d *schema.ResourceData, meta interface{}) error log.Println("[DEBUG] Waiting for Volume to become available") stateConf := &resource.StateChangeConf{ - Pending: []string{"creating"}, - Target: []string{"available"}, + Pending: []string{ec2.VolumeStateCreating}, + Target: []string{ec2.VolumeStateAvailable}, Refresh: volumeStateRefreshFunc(conn, *result.VolumeId), Timeout: 5 * time.Minute, Delay: 10 * time.Second, @@ -176,8 +193,8 @@ func resourceAWSEbsVolumeUpdate(d *schema.ResourceData, meta interface{}) error } stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "modifying"}, - Target: []string{"available", "in-use"}, + Pending: []string{ec2.VolumeStateCreating, ec2.VolumeModificationStateModifying}, + Target: []string{ec2.VolumeStateAvailable, ec2.VolumeStateInUse}, Refresh: volumeStateRefreshFunc(conn, *result.VolumeModification.VolumeId), Timeout: 5 * time.Minute, Delay: 10 * time.Second, @@ -230,6 +247,7 @@ func volumeStateRefreshFunc(conn *ec2.EC2, volumeID string) resource.StateRefres func resourceAwsEbsVolumeRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig request := &ec2.DescribeVolumesInput{ VolumeIds: []*string{aws.String(d.Id())}, @@ -237,7 +255,7 @@ func resourceAwsEbsVolumeRead(d *schema.ResourceData, meta interface{}) error { response, err := conn.DescribeVolumes(request) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVolume.NotFound" { + if isAWSErr(err, "InvalidVolume.NotFound", "") { d.SetId("") return nil } @@ -264,8 +282,10 @@ func resourceAwsEbsVolumeRead(d *schema.ResourceData, meta interface{}) error { d.Set("kms_key_id", aws.StringValue(volume.KmsKeyId)) d.Set("size", aws.Int64Value(volume.Size)) d.Set("snapshot_id", aws.StringValue(volume.SnapshotId)) + d.Set("outpost_arn", aws.StringValue(volume.OutpostArn)) + d.Set("multi_attach_enabled", volume.MultiAttachEnabled) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(volume.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(volume.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index be65651d090..bb0bf6d7c52 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "os" "regexp" "testing" @@ -87,6 +88,8 @@ func TestAccAWSEBSVolume_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "size", "1"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestCheckResourceAttr(resourceName, "type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "outpost_arn", ""), + resource.TestCheckResourceAttr(resourceName, "multi_attach_enabled", "false"), ), }, { @@ -311,6 +314,88 @@ func TestAccAWSEBSVolume_withTags(t *testing.T) { }) } +func TestAccAWSEBSVolume_multiAttach(t *testing.T) { + var v ec2.Volume + resourceName := "aws_ebs_volume.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEbsVolumeConfigMultiAttach(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckVolumeExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "multi_attach_enabled", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEBSVolume_outpost(t *testing.T) { + var v ec2.Volume + resourceName := "aws_ebs_volume.test" + + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEbsVolumeConfigOutpost(outpostArn), + Check: resource.ComposeTestCheckFunc( + testAccCheckVolumeExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "outpost_arn", outpostArn), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEBSVolume_disappears(t *testing.T) { + var v ec2.Volume + resourceName := "aws_ebs_volume.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEbsVolumeConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVolumeExists(resourceName, &v), + testAccCheckResourceDisappears(testAccProvider, resourceAwsEbsVolume(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckVolumeDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -372,7 +457,14 @@ func testAccCheckVolumeExists(n string, v *ec2.Volume) resource.TestCheckFunc { } const testAccAwsEbsVolumeConfig = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -423,7 +515,14 @@ resource "aws_instance" "test" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { depends_on = ["aws_instance.test"] @@ -498,7 +597,14 @@ resource "aws_volume_attachment" "test" { ` const testAccAwsEbsVolumeConfigUpdateSize = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -511,7 +617,14 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigUpdateType = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -524,7 +637,14 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithIops = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -538,7 +658,14 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithIopsUpdated = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -573,7 +700,14 @@ resource "aws_kms_key" "test" { POLICY } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -584,7 +718,14 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithTags = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -596,7 +737,14 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithNoIops = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ebs_volume" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -608,3 +756,43 @@ resource "aws_ebs_volume" "test" { } } ` + +func testAccAwsEbsVolumeConfigOutpost(outpostArn string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" {} + +resource "aws_ebs_volume" "test" { + availability_zone = "${data.aws_availability_zones.available.names[0]}" + size = 1 + outpost_arn = "%s" + tags = { + Name = "tf-acc-volume-outpost" + } +} +`, outpostArn) +} + +func testAccAwsEbsVolumeConfigMultiAttach(rName string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_ebs_volume" "test" { + availability_zone = "${data.aws_availability_zones.available.names[0]}" + type = "io1" + multi_attach_enabled = true + size = 4 + iops = 100 + + tags = { + Name = %[1]q + } +} +`, rName) +} diff --git a/aws/resource_aws_ec2_availability_zone_group.go b/aws/resource_aws_ec2_availability_zone_group.go new file mode 100644 index 00000000000..afa320795ee --- /dev/null +++ b/aws/resource_aws_ec2_availability_zone_group.go @@ -0,0 +1,188 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAwsEc2AvailabilityZoneGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2AvailabilityZoneGroupCreate, + Read: resourceAwsEc2AvailabilityZoneGroupRead, + Update: resourceAwsEc2AvailabilityZoneGroupUpdate, + Delete: schema.Noop, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + d.Set("group_name", d.Id()) + + return []*schema.ResourceData{d}, nil + }, + }, + + Schema: map[string]*schema.Schema{ + "group_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "opt_in_status": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.AvailabilityZoneOptInStatusOptedIn, + ec2.AvailabilityZoneOptInStatusNotOptedIn, + }, false), + }, + }, + } +} + +func resourceAwsEc2AvailabilityZoneGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + configurationOptInStatus := d.Get("opt_in_status").(string) + + d.SetId(d.Get("group_name").(string)) + + if err := resourceAwsEc2AvailabilityZoneGroupRead(d, meta); err != nil { + return err + } + + apiOptInStatus := d.Get("opt_in_status").(string) + + if apiOptInStatus != configurationOptInStatus { + input := &ec2.ModifyAvailabilityZoneGroupInput{ + GroupName: aws.String(d.Id()), + OptInStatus: aws.String(configurationOptInStatus), + } + + if _, err := conn.ModifyAvailabilityZoneGroup(input); err != nil { + return fmt.Errorf("error modifying EC2 Availability Zone Group (%s): %w", d.Id(), err) + } + + if err := waitForEc2AvailabilityZoneGroupOptInStatus(conn, d.Id(), configurationOptInStatus); err != nil { + return fmt.Errorf("error waiting for EC2 Availability Zone Group (%s) opt-in status update: %w", d.Id(), err) + } + } + + return resourceAwsEc2AvailabilityZoneGroupRead(d, meta) +} + +func resourceAwsEc2AvailabilityZoneGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + availabilityZone, err := ec2DescribeAvailabilityZoneGroup(conn, d.Id()) + + if err != nil { + return fmt.Errorf("error describing EC2 Availability Zone Group (%s): %w", d.Id(), err) + } + + if aws.StringValue(availabilityZone.OptInStatus) == ec2.AvailabilityZoneOptInStatusOptInNotRequired { + return fmt.Errorf("unnecessary handling of EC2 Availability Zone Group (%s), status: %s", d.Id(), ec2.AvailabilityZoneOptInStatusOptInNotRequired) + } + + d.Set("group_name", availabilityZone.GroupName) + d.Set("opt_in_status", availabilityZone.OptInStatus) + + return nil +} + +func resourceAwsEc2AvailabilityZoneGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + optInStatus := d.Get("opt_in_status").(string) + + input := &ec2.ModifyAvailabilityZoneGroupInput{ + GroupName: aws.String(d.Id()), + OptInStatus: aws.String(optInStatus), + } + + if _, err := conn.ModifyAvailabilityZoneGroup(input); err != nil { + return fmt.Errorf("error modifying EC2 Availability Zone Group (%s): %w", d.Id(), err) + } + + if err := waitForEc2AvailabilityZoneGroupOptInStatus(conn, d.Id(), optInStatus); err != nil { + return fmt.Errorf("error waiting for EC2 Availability Zone Group (%s) opt-in status update: %w", d.Id(), err) + } + + return resourceAwsEc2AvailabilityZoneGroupRead(d, meta) +} + +func ec2DescribeAvailabilityZoneGroup(conn *ec2.EC2, groupName string) (*ec2.AvailabilityZone, error) { + input := &ec2.DescribeAvailabilityZonesInput{ + AllAvailabilityZones: aws.Bool(true), + Filters: []*ec2.Filter{ + { + Name: aws.String("group-name"), + Values: aws.StringSlice([]string{groupName}), + }, + }, + } + + output, err := conn.DescribeAvailabilityZones(input) + + if err != nil { + return nil, err + } + + if output == nil || len(output.AvailabilityZones) == 0 { + return nil, nil + } + + for _, availabilityZone := range output.AvailabilityZones { + if availabilityZone == nil { + continue + } + + if aws.StringValue(availabilityZone.GroupName) == groupName { + return availabilityZone, nil + } + } + + return nil, nil +} + +func ec2AvailabilityZoneGroupOptInStatusRefreshFunc(conn *ec2.EC2, groupName string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + availabilityZone, err := ec2DescribeAvailabilityZoneGroup(conn, groupName) + + if err != nil { + return nil, "", fmt.Errorf("error describing EC2 Availability Zone Group (%s): %w", groupName, err) + } + + if availabilityZone == nil { + return nil, "", fmt.Errorf("error describing EC2 Availability Zone Group (%s): not found", groupName) + } + + return availabilityZone, aws.StringValue(availabilityZone.OptInStatus), nil + } +} + +func waitForEc2AvailabilityZoneGroupOptInStatus(conn *ec2.EC2, groupName string, optInStatus string) error { + pending := ec2.AvailabilityZoneOptInStatusNotOptedIn + + if optInStatus == ec2.AvailabilityZoneOptInStatusNotOptedIn { + pending = ec2.AvailabilityZoneOptInStatusOptedIn + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{pending}, + Target: []string{optInStatus}, + Refresh: ec2AvailabilityZoneGroupOptInStatusRefreshFunc(conn, groupName), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 2 * time.Second, + ContinuousTargetOccurence: 3, + } + + log.Printf("[DEBUG] Waiting for EC2 Availability Zone Group (%s) opt-in status update", groupName) + _, err := stateConf.WaitForState() + + return err +} diff --git a/aws/resource_aws_ec2_availability_zone_group_test.go b/aws/resource_aws_ec2_availability_zone_group_test.go new file mode 100644 index 00000000000..4bb8bfe1ce1 --- /dev/null +++ b/aws/resource_aws_ec2_availability_zone_group_test.go @@ -0,0 +1,102 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" +) + +func TestAccAWSEc2AvailabilityZoneGroup_OptInStatus(t *testing.T) { + resourceName := "aws_ec2_availability_zone_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2AvailabilityZoneGroup(t) }, + Providers: testAccProviders, + CheckDestroy: nil, + Steps: []resource.TestStep{ + { + Config: testAccEc2AvailabilityZoneGroupConfigOptInStatus(ec2.AvailabilityZoneOptInStatusOptedIn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "opt_in_status", ec2.AvailabilityZoneOptInStatusOptedIn), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + // InvalidOptInStatus: Opting out of Local Zones is not currently supported. Contact AWS Support for additional assistance. + /* + { + Config: testAccEc2AvailabilityZoneGroupConfigOptInStatus(ec2.AvailabilityZoneOptInStatusNotOptedIn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "opt_in_status", ec2.AvailabilityZoneOptInStatusNotOptedIn), + ), + }, + { + Config: testAccEc2AvailabilityZoneGroupConfigOptInStatus(ec2.AvailabilityZoneOptInStatusOptedIn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "opt_in_status", ec2.AvailabilityZoneOptInStatusOptedIn), + ), + }, + */ + }, + }) +} + +func testAccPreCheckAWSEc2AvailabilityZoneGroup(t *testing.T) { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + input := &ec2.DescribeAvailabilityZonesInput{ + AllAvailabilityZones: aws.Bool(true), + Filters: []*ec2.Filter{ + { + Name: aws.String("opt-in-status"), + Values: aws.StringSlice([]string{ + ec2.AvailabilityZoneOptInStatusNotOptedIn, + ec2.AvailabilityZoneOptInStatusOptedIn, + }), + }, + }, + } + + output, err := conn.DescribeAvailabilityZones(input) + + if testAccPreCheckSkipError(err) { + t.Skipf("skipping acceptance testing: %s", err) + } + + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } + + if output == nil || len(output.AvailabilityZones) == 0 || output.AvailabilityZones[0] == nil { + t.Skipf("skipping acceptance testing: no opt-in EC2 Availability Zone Groups found") + } +} + +func testAccEc2AvailabilityZoneGroupConfigOptInStatus(optInStatus string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" { + all_availability_zones = true + + # Filter to one Availability Zone Group per Region as Local Zones become available + # e.g. ensure there are not two us-west-2-XXX when adding to this list + filter { + name = "group-name" + values = [ + "us-west-2-lax-1", + ] + } +} + +resource "aws_ec2_availability_zone_group" "test" { + # The above group-name filter should ensure one Availability Zone Group per Region + group_name = tolist(data.aws_availability_zones.test.group_names)[0] + opt_in_status = %[1]q +} +`, optInStatus) +} diff --git a/aws/resource_aws_ec2_capacity_reservation.go b/aws/resource_aws_ec2_capacity_reservation.go index 973f3a4ddf2..19d2a30ee4a 100644 --- a/aws/resource_aws_ec2_capacity_reservation.go +++ b/aws/resource_aws_ec2_capacity_reservation.go @@ -156,6 +156,7 @@ func resourceAwsEc2CapacityReservationCreate(d *schema.ResourceData, meta interf func resourceAwsEc2CapacityReservationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeCapacityReservations(&ec2.DescribeCapacityReservationsInput{ CapacityReservationIds: []*string{aws.String(d.Id())}, @@ -197,7 +198,7 @@ func resourceAwsEc2CapacityReservationRead(d *schema.ResourceData, meta interfac d.Set("instance_platform", reservation.InstancePlatform) d.Set("instance_type", reservation.InstanceType) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(reservation.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(reservation.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_capacity_reservation_test.go b/aws/resource_aws_ec2_capacity_reservation_test.go index 09e3c7f5a53..7473731107c 100644 --- a/aws/resource_aws_ec2_capacity_reservation_test.go +++ b/aws/resource_aws_ec2_capacity_reservation_test.go @@ -466,7 +466,14 @@ func testAccPreCheckAWSEc2CapacityReservation(t *testing.T) { } const testAccEc2CapacityReservationConfig = ` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -478,7 +485,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_ebsOptimized(ebsOptimized bool) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -492,7 +506,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_endDate(endDate string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -507,7 +528,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_endDateType(endDateType string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -521,7 +549,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_ephemeralStorage(ephemeralStorage bool) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -535,7 +570,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_instanceCount(instanceCount int) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -548,7 +590,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_instanceMatchCriteria(instanceMatchCriteria string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -562,7 +611,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_instanceType(instanceType string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -575,7 +631,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_tags_single(tag1Key, tag1Value string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -592,7 +655,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_tags_multiple(tag1Key, tag1Value, tag2Key, tag2Value string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -610,7 +680,14 @@ resource "aws_ec2_capacity_reservation" "test" { func testAccEc2CapacityReservationConfig_tenancy(tenancy string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" diff --git a/aws/resource_aws_ec2_client_vpn_endpoint.go b/aws/resource_aws_ec2_client_vpn_endpoint.go index cb1e7cca2ef..bc34139e0fc 100644 --- a/aws/resource_aws_ec2_client_vpn_endpoint.go +++ b/aws/resource_aws_ec2_client_vpn_endpoint.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-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -27,9 +28,10 @@ func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { Optional: true, }, "client_cidr_block": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.IsCIDR, }, "dns_servers": { Type: schema.TypeSet, @@ -37,8 +39,9 @@ func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, }, "server_certificate_arn": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, }, "split_tunnel": { Type: schema.TypeBool, @@ -58,7 +61,7 @@ func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { "authentication_options": { Type: schema.TypeList, Required: true, - MaxItems: 1, + MaxItems: 2, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { @@ -76,9 +79,10 @@ func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { ForceNew: true, }, "root_certificate_chain_arn": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, }, }, }, @@ -113,6 +117,10 @@ func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { Computed: true, }, "tags": tagsSchema(), + "arn": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -137,26 +145,16 @@ func resourceAwsEc2ClientVpnEndpointCreate(d *schema.ResourceData, meta interfac } if v, ok := d.GetOk("authentication_options"); ok { - authOptsSet := v.([]interface{}) - attrs := authOptsSet[0].(map[string]interface{}) + authOptions := v.([]interface{}) + authRequests := make([]*ec2.ClientVpnAuthenticationRequest, 0, len(authOptions)) - authOptsReq := &ec2.ClientVpnAuthenticationRequest{ - Type: aws.String(attrs["type"].(string)), - } + for _, authOpt := range authOptions { + auth := authOpt.(map[string]interface{}) - if attrs["type"].(string) == "certificate-authentication" { - authOptsReq.MutualAuthentication = &ec2.CertificateAuthenticationRequest{ - ClientRootCertificateChainArn: aws.String(attrs["root_certificate_chain_arn"].(string)), - } + authReq := expandEc2ClientVpnAuthenticationRequest(auth) + authRequests = append(authRequests, authReq) } - - if attrs["type"].(string) == "directory-service-authentication" { - authOptsReq.ActiveDirectory = &ec2.DirectoryServiceAuthenticationRequest{ - DirectoryId: aws.String(attrs["active_directory_id"].(string)), - } - } - - req.AuthenticationOptions = []*ec2.ClientVpnAuthenticationRequest{authOptsReq} + req.AuthenticationOptions = authRequests } if v, ok := d.GetOk("connection_log_options"); ok { @@ -191,6 +189,8 @@ func resourceAwsEc2ClientVpnEndpointCreate(d *schema.ResourceData, meta interfac func resourceAwsEc2ClientVpnEndpointRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + var err error result, err := conn.DescribeClientVpnEndpoints(&ec2.DescribeClientVpnEndpointsInput{ @@ -242,11 +242,21 @@ func resourceAwsEc2ClientVpnEndpointRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error setting connection_log_options: %s", err) } - err = d.Set("tags", keyvaluetags.Ec2KeyValueTags(result.ClientVpnEndpoints[0].Tags).IgnoreAws().Map()) + err = d.Set("tags", keyvaluetags.Ec2KeyValueTags(result.ClientVpnEndpoints[0].Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()) if err != nil { return fmt.Errorf("error setting tags: %s", err) } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("client-vpn-endpoint/%s", d.Id()), + }.String() + + d.Set("arn", arn) + return nil } @@ -266,8 +276,6 @@ func resourceAwsEc2ClientVpnEndpointDelete(d *schema.ResourceData, meta interfac func resourceAwsEc2ClientVpnEndpointUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - d.Partial(true) - req := &ec2.ModifyClientVpnEndpointInput{ ClientVpnEndpointId: aws.String(d.Id()), } @@ -334,7 +342,6 @@ func resourceAwsEc2ClientVpnEndpointUpdate(d *schema.ResourceData, meta interfac } } - d.Partial(false) return resourceAwsEc2ClientVpnEndpointRead(d, meta) } @@ -351,13 +358,38 @@ func flattenConnLoggingConfig(lopts *ec2.ConnectionLogResponseOptions) []map[str } func flattenAuthOptsConfig(aopts []*ec2.ClientVpnAuthentication) []map[string]interface{} { - m := make(map[string]interface{}) - if aopts[0].MutualAuthentication != nil { - m["root_certificate_chain_arn"] = *aopts[0].MutualAuthentication.ClientRootCertificateChain + result := make([]map[string]interface{}, 0, len(aopts)) + for _, aopt := range aopts { + r := map[string]interface{}{ + "type": aws.StringValue(aopt.Type), + } + if aopt.MutualAuthentication != nil { + r["root_certificate_chain_arn"] = aws.StringValue(aopt.MutualAuthentication.ClientRootCertificateChain) + } + if aopt.ActiveDirectory != nil { + r["active_directory_id"] = aws.StringValue(aopt.ActiveDirectory.DirectoryId) + } + result = append([]map[string]interface{}{r}, result...) + } + return result +} + +func expandEc2ClientVpnAuthenticationRequest(data map[string]interface{}) *ec2.ClientVpnAuthenticationRequest { + req := &ec2.ClientVpnAuthenticationRequest{ + Type: aws.String(data["type"].(string)), } - if aopts[0].ActiveDirectory != nil { - m["active_directory_id"] = *aopts[0].ActiveDirectory.DirectoryId + + if data["type"].(string) == ec2.ClientVpnAuthenticationTypeCertificateAuthentication { + req.MutualAuthentication = &ec2.CertificateAuthenticationRequest{ + ClientRootCertificateChainArn: aws.String(data["root_certificate_chain_arn"].(string)), + } } - m["type"] = *aopts[0].Type - return []map[string]interface{}{m} + + if data["type"].(string) == ec2.ClientVpnAuthenticationTypeDirectoryServiceAuthentication { + req.ActiveDirectory = &ec2.DirectoryServiceAuthenticationRequest{ + DirectoryId: aws.String(data["active_directory_id"].(string)), + } + } + + return req } diff --git a/aws/resource_aws_ec2_client_vpn_endpoint_test.go b/aws/resource_aws_ec2_client_vpn_endpoint_test.go index c2ce2d7076f..fd80deda7dd 100644 --- a/aws/resource_aws_ec2_client_vpn_endpoint_test.go +++ b/aws/resource_aws_ec2_client_vpn_endpoint_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -74,6 +75,7 @@ func testSweepEc2ClientVpnEndpoints(region string) error { func TestAccAwsEc2ClientVpnEndpoint_basic(t *testing.T) { rStr := acctest.RandString(5) + resourceName := "aws_ec2_client_vpn_endpoint.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -83,15 +85,16 @@ func TestAccAwsEc2ClientVpnEndpoint_basic(t *testing.T) { { Config: testAccEc2ClientVpnEndpointConfig(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), - resource.TestCheckResourceAttr("aws_ec2_client_vpn_endpoint.test", "authentication_options.#", "1"), - resource.TestCheckResourceAttr("aws_ec2_client_vpn_endpoint.test", "authentication_options.0.type", "certificate-authentication"), - resource.TestCheckResourceAttr("aws_ec2_client_vpn_endpoint.test", "status", ec2.ClientVpnEndpointStatusCodePendingAssociate), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`client-vpn-endpoint/cvpn-endpoint-.+`)), + resource.TestCheckResourceAttr(resourceName, "authentication_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "authentication_options.0.type", "certificate-authentication"), + resource.TestCheckResourceAttr(resourceName, "status", ec2.ClientVpnEndpointStatusCodePendingAssociate), ), }, { - ResourceName: "aws_ec2_client_vpn_endpoint.test", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -101,6 +104,7 @@ func TestAccAwsEc2ClientVpnEndpoint_basic(t *testing.T) { func TestAccAwsEc2ClientVpnEndpoint_disappears(t *testing.T) { rStr := acctest.RandString(5) + resourceName := "aws_ec2_client_vpn_endpoint.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -110,8 +114,8 @@ func TestAccAwsEc2ClientVpnEndpoint_disappears(t *testing.T) { { Config: testAccEc2ClientVpnEndpointConfig(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), - testAccCheckAwsEc2ClientVpnEndpointDisappears("aws_ec2_client_vpn_endpoint.test"), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), + testAccCheckResourceDisappears(testAccProvider, resourceAwsEc2ClientVpnEndpoint(), resourceName), ), ExpectNonEmptyPlan: true, }, @@ -121,6 +125,7 @@ func TestAccAwsEc2ClientVpnEndpoint_disappears(t *testing.T) { func TestAccAwsEc2ClientVpnEndpoint_msAD(t *testing.T) { rStr := acctest.RandString(5) + resourceName := "aws_ec2_client_vpn_endpoint.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -130,14 +135,42 @@ func TestAccAwsEc2ClientVpnEndpoint_msAD(t *testing.T) { { Config: testAccEc2ClientVpnEndpointConfigWithMicrosoftAD(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), - resource.TestCheckResourceAttr("aws_ec2_client_vpn_endpoint.test", "authentication_options.#", "1"), - resource.TestCheckResourceAttr("aws_ec2_client_vpn_endpoint.test", "authentication_options.0.type", "directory-service-authentication"), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "authentication_options.0.type", "directory-service-authentication"), ), }, { - ResourceName: "aws_ec2_client_vpn_endpoint.test", + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsEc2ClientVpnEndpoint_mutualAuthAndMsAD(t *testing.T) { + rStr := acctest.RandString(5) + resourceName := "aws_ec2_client_vpn_endpoint.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsEc2ClientVpnEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccEc2ClientVpnEndpointConfigWithMutualAuthAndMicrosoftAD(rStr), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_options.#", "2"), + resource.TestCheckResourceAttr(resourceName, "authentication_options.0.type", "directory-service-authentication"), + resource.TestCheckResourceAttr(resourceName, "authentication_options.1.type", "certificate-authentication"), + ), + }, + + { + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -147,6 +180,7 @@ func TestAccAwsEc2ClientVpnEndpoint_msAD(t *testing.T) { func TestAccAwsEc2ClientVpnEndpoint_withLogGroup(t *testing.T) { rStr := acctest.RandString(5) + resourceName := "aws_ec2_client_vpn_endpoint.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -156,19 +190,19 @@ func TestAccAwsEc2ClientVpnEndpoint_withLogGroup(t *testing.T) { { Config: testAccEc2ClientVpnEndpointConfig(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), ), }, { Config: testAccEc2ClientVpnEndpointConfigWithLogGroup(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), ), }, { - ResourceName: "aws_ec2_client_vpn_endpoint.test", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -178,6 +212,7 @@ func TestAccAwsEc2ClientVpnEndpoint_withLogGroup(t *testing.T) { func TestAccAwsEc2ClientVpnEndpoint_withDNSServers(t *testing.T) { rStr := acctest.RandString(5) + resourceName := "aws_ec2_client_vpn_endpoint.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -187,19 +222,19 @@ func TestAccAwsEc2ClientVpnEndpoint_withDNSServers(t *testing.T) { { Config: testAccEc2ClientVpnEndpointConfig(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), ), }, { Config: testAccEc2ClientVpnEndpointConfigWithDNSServers(rStr), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsEc2ClientVpnEndpointExists("aws_ec2_client_vpn_endpoint.test"), + testAccCheckAwsEc2ClientVpnEndpointExists(resourceName), ), }, { - ResourceName: "aws_ec2_client_vpn_endpoint.test", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -224,6 +259,11 @@ func TestAccAwsEc2ClientVpnEndpoint_tags(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.Usage", "original"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccEc2ClientVpnEndpointConfig_tagsChanged(rStr), Check: resource.ComposeTestCheckFunc( @@ -297,25 +337,6 @@ func testAccCheckAwsEc2ClientVpnEndpointDestroy(s *terraform.State) error { return nil } -func testAccCheckAwsEc2ClientVpnEndpointDisappears(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).ec2conn - - input := &ec2.DeleteClientVpnEndpointInput{ - ClientVpnEndpointId: aws.String(rs.Primary.ID), - } - - _, err := conn.DeleteClientVpnEndpoint(input) - - return err - } -} - func testAccCheckAwsEc2ClientVpnEndpointExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { _, ok := s.RootModule().Resources[name] @@ -339,6 +360,46 @@ resource "aws_acm_certificate" "test" { `, tlsPemEscapeNewlines(certificate), tlsPemEscapeNewlines(key)) } +func testAccEc2ClientVpnEndpointMsADBase() string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_subnet" "test1" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.0.1.0/24" + availability_zone = "${data.aws_availability_zones.available.names[0]}" +} + +resource "aws_subnet" "test2" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.0.2.0/24" + availability_zone = "${data.aws_availability_zones.available.names[1]}" +} + +resource "aws_directory_service_directory" "test" { + name = "corp.notexample.com" + password = "SuperSecretPassw0rd" + type = "MicrosoftAD" + + vpc_settings { + vpc_id = "${aws_vpc.test.id}" + subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] + } +} +`) +} + func testAccEc2ClientVpnEndpointConfig(rName string) string { return testAccEc2ClientVpnEndpointConfigAcmCertificateBase() + fmt.Sprintf(` resource "aws_ec2_client_vpn_endpoint" "test" { @@ -410,36 +471,27 @@ resource "aws_ec2_client_vpn_endpoint" "test" { } func testAccEc2ClientVpnEndpointConfigWithMicrosoftAD(rName string) string { - return testAccEc2ClientVpnEndpointConfigAcmCertificateBase() + fmt.Sprintf(` -data "aws_availability_zones" "available" {} - -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" -} - -resource "aws_subnet" "test1" { - vpc_id = "${aws_vpc.test.id}" - cidr_block = "10.0.1.0/24" - availability_zone = "${data.aws_availability_zones.available.names[0]}" -} - -resource "aws_subnet" "test2" { - vpc_id = "${aws_vpc.test.id}" - cidr_block = "10.0.2.0/24" - availability_zone = "${data.aws_availability_zones.available.names[1]}" -} + return testAccEc2ClientVpnEndpointConfigAcmCertificateBase() + + testAccEc2ClientVpnEndpointMsADBase() + fmt.Sprintf(` +resource "aws_ec2_client_vpn_endpoint" "test" { + description = "terraform-testacc-clientvpn-%s" + server_certificate_arn = "${aws_acm_certificate.test.arn}" + client_cidr_block = "10.0.0.0/16" -resource "aws_directory_service_directory" "test" { - name = "corp.notexample.com" - password = "SuperSecretPassw0rd" - type = "MicrosoftAD" + authentication_options { + type = "directory-service-authentication" + active_directory_id = "${aws_directory_service_directory.test.id}" + } - vpc_settings { - vpc_id = "${aws_vpc.test.id}" - subnet_ids = ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"] + connection_log_options { + enabled = false } } +`, rName) +} +func testAccEc2ClientVpnEndpointConfigWithMutualAuthAndMicrosoftAD(rName string) string { + return testAccEc2ClientVpnEndpointConfigAcmCertificateBase() + testAccEc2ClientVpnEndpointMsADBase() + fmt.Sprintf(` resource "aws_ec2_client_vpn_endpoint" "test" { description = "terraform-testacc-clientvpn-%s" server_certificate_arn = "${aws_acm_certificate.test.arn}" @@ -450,6 +502,11 @@ resource "aws_ec2_client_vpn_endpoint" "test" { active_directory_id = "${aws_directory_service_directory.test.id}" } + authentication_options { + type = "certificate-authentication" + root_certificate_chain_arn = "${aws_acm_certificate.test.arn}" + } + connection_log_options { enabled = false } diff --git a/aws/resource_aws_ec2_client_vpn_network_association_test.go b/aws/resource_aws_ec2_client_vpn_network_association_test.go index ee7f733ab9e..7d69dc7619d 100644 --- a/aws/resource_aws_ec2_client_vpn_network_association_test.go +++ b/aws/resource_aws_ec2_client_vpn_network_association_test.go @@ -152,6 +152,11 @@ data "aws_availability_zones" "available" { # InvalidParameterValue: AZ us-west-2d is not currently supported. Please choose another az in this region blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/resource_aws_ec2_fleet.go b/aws/resource_aws_ec2_fleet.go index 5eaf702df93..6a94cca4a16 100644 --- a/aws/resource_aws_ec2_fleet.go +++ b/aws/resource_aws_ec2_fleet.go @@ -350,6 +350,7 @@ func resourceAwsEc2FleetCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsEc2FleetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ec2.DescribeFleetsInput{ FleetIds: []*string{aws.String(d.Id())}, @@ -431,7 +432,7 @@ func resourceAwsEc2FleetRead(d *schema.ResourceData, meta interface{}) error { d.Set("terminate_instances_with_expiration", fleet.TerminateInstancesWithExpiration) d.Set("type", fleet.Type) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(fleet.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(fleet.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_fleet_test.go b/aws/resource_aws_ec2_fleet_test.go index 2ee8f058d69..20ce10cbae9 100644 --- a/aws/resource_aws_ec2_fleet_test.go +++ b/aws/resource_aws_ec2_fleet_test.go @@ -1474,7 +1474,14 @@ resource "aws_ec2_fleet" "test" { func testAccAWSEc2FleetConfig_LaunchTemplateConfig_Override_AvailabilityZone(rName string, availabilityZoneIndex int) string { return testAccAWSEc2FleetConfig_BaseLaunchTemplate(rName) + fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_fleet" "test" { launch_template_config { diff --git a/aws/resource_aws_ec2_traffic_mirror_filter.go b/aws/resource_aws_ec2_traffic_mirror_filter.go index ad1fc33333e..0a3809c8814 100644 --- a/aws/resource_aws_ec2_traffic_mirror_filter.go +++ b/aws/resource_aws_ec2_traffic_mirror_filter.go @@ -115,6 +115,7 @@ func resourceAwsEc2TrafficMirrorFilterUpdate(d *schema.ResourceData, meta interf func resourceAwsEc2TrafficMirrorFilterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ec2.DescribeTrafficMirrorFiltersInput{ TrafficMirrorFilterIds: aws.StringSlice([]string{d.Id()}), @@ -141,7 +142,7 @@ func resourceAwsEc2TrafficMirrorFilterRead(d *schema.ResourceData, meta interfac trafficMirrorFilter := out.TrafficMirrorFilters[0] d.Set("description", trafficMirrorFilter.Description) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(trafficMirrorFilter.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(trafficMirrorFilter.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_traffic_mirror_session.go b/aws/resource_aws_ec2_traffic_mirror_session.go index 7f11187998c..49970292c07 100644 --- a/aws/resource_aws_ec2_traffic_mirror_session.go +++ b/aws/resource_aws_ec2_traffic_mirror_session.go @@ -172,6 +172,7 @@ func resourceAwsEc2TrafficMirrorSessionUpdate(d *schema.ResourceData, meta inter func resourceAwsEc2TrafficMirrorSessionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig sessionId := d.Id() input := &ec2.DescribeTrafficMirrorSessionsInput{ @@ -207,7 +208,7 @@ func resourceAwsEc2TrafficMirrorSessionRead(d *schema.ResourceData, meta interfa d.Set("packet_length", session.PacketLength) d.Set("virtual_network_id", session.VirtualNetworkId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(session.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(session.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_traffic_mirror_session_test.go b/aws/resource_aws_ec2_traffic_mirror_session_test.go index 434c48ff192..dfa43b39db6 100644 --- a/aws/resource_aws_ec2_traffic_mirror_session_test.go +++ b/aws/resource_aws_ec2_traffic_mirror_session_test.go @@ -196,6 +196,11 @@ func testAccTrafficMirrorSessionConfigBase(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "azs" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_ami" "amzn-linux" { diff --git a/aws/resource_aws_ec2_traffic_mirror_target.go b/aws/resource_aws_ec2_traffic_mirror_target.go index d76946afac1..feb367fb90a 100644 --- a/aws/resource_aws_ec2_traffic_mirror_target.go +++ b/aws/resource_aws_ec2_traffic_mirror_target.go @@ -95,6 +95,7 @@ func resourceAwsEc2TrafficMirrorTargetUpdate(d *schema.ResourceData, meta interf func resourceAwsEc2TrafficMirrorTargetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig targetId := d.Id() input := &ec2.DescribeTrafficMirrorTargetsInput{ @@ -123,7 +124,7 @@ func resourceAwsEc2TrafficMirrorTargetRead(d *schema.ResourceData, meta interfac d.Set("network_interface_id", target.NetworkInterfaceId) d.Set("network_load_balancer_arn", target.NetworkLoadBalancerArn) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(target.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(target.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_traffic_mirror_target_test.go b/aws/resource_aws_ec2_traffic_mirror_target_test.go index 3ddd2921f83..e7cf61520bf 100644 --- a/aws/resource_aws_ec2_traffic_mirror_target_test.go +++ b/aws/resource_aws_ec2_traffic_mirror_target_test.go @@ -28,13 +28,12 @@ func TestAccAWSEc2TrafficMirrorTarget_nlb(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2TrafficMirrorTargetDestroy, Steps: []resource.TestStep{ - //create { Config: testAccTrafficMirrorTargetConfigNlb(rName, description), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEc2TrafficMirrorTargetExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "description", description), - resource.TestMatchResourceAttr(resourceName, "network_load_balancer_arn", regexp.MustCompile("arn:aws:elasticloadbalancing:.*")), + resource.TestCheckResourceAttrPair(resourceName, "network_load_balancer_arn", "aws_lb.lb", "arn"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, @@ -61,7 +60,6 @@ func TestAccAWSEc2TrafficMirrorTarget_eni(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2TrafficMirrorTargetDestroy, Steps: []resource.TestStep{ - //create { Config: testAccTrafficMirrorTargetConfigEni(rName, description), Check: resource.ComposeTestCheckFunc( @@ -200,6 +198,11 @@ func testAccTrafficMirrorTargetConfigBase(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "azs" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "vpc" { diff --git a/aws/resource_aws_ec2_transit_gateway.go b/aws/resource_aws_ec2_transit_gateway.go index d3d61582b0b..a9ef4791175 100644 --- a/aws/resource_aws_ec2_transit_gateway.go +++ b/aws/resource_aws_ec2_transit_gateway.go @@ -145,6 +145,7 @@ func resourceAwsEc2TransitGatewayCreate(d *schema.ResourceData, meta interface{} func resourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig transitGateway, err := ec2DescribeTransitGateway(conn, d.Id()) @@ -185,7 +186,7 @@ func resourceAwsEc2TransitGatewayRead(d *schema.ResourceData, meta interface{}) d.Set("owner_id", transitGateway.OwnerId) d.Set("propagation_default_route_table_id", transitGateway.Options.PropagationDefaultRouteTableId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGateway.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGateway.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -231,6 +232,10 @@ func resourceAwsEc2TransitGatewayDelete(d *schema.ResourceData, meta interface{} return resource.RetryableError(err) } + if isAWSErr(err, "IncorrectState", "has non-deleted Transit Gateway Cross Region Peering Attachments") { + return resource.RetryableError(err) + } + if err != nil { return resource.NonRetryableError(err) } diff --git a/aws/resource_aws_ec2_transit_gateway_peering_attachment.go b/aws/resource_aws_ec2_transit_gateway_peering_attachment.go new file mode 100644 index 00000000000..fca4bf559f9 --- /dev/null +++ b/aws/resource_aws_ec2_transit_gateway_peering_attachment.go @@ -0,0 +1,158 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func resourceAwsEc2TransitGatewayPeeringAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayPeeringAttachmentCreate, + Read: resourceAwsEc2TransitGatewayPeeringAttachmentRead, + Update: resourceAwsEc2TransitGatewayPeeringAttachmentUpdate, + Delete: resourceAwsEc2TransitGatewayPeeringAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "peer_account_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ValidateFunc: validateAwsAccountId, + }, + "peer_region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "peer_transit_gateway_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "tags": tagsSchema(), + "transit_gateway_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + peerAccountId := meta.(*AWSClient).accountid + if v, ok := d.GetOk("peer_account_id"); ok { + peerAccountId = v.(string) + } + input := &ec2.CreateTransitGatewayPeeringAttachmentInput{ + PeerAccountId: aws.String(peerAccountId), + PeerRegion: aws.String(d.Get("peer_region").(string)), + PeerTransitGatewayId: aws.String(d.Get("peer_transit_gateway_id").(string)), + TagSpecifications: ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypeTransitGatewayAttachment), + TransitGatewayId: aws.String(d.Get("transit_gateway_id").(string)), + } + + log.Printf("[DEBUG] Creating EC2 Transit Gateway Peering Attachment: %s", input) + output, err := conn.CreateTransitGatewayPeeringAttachment(input) + if err != nil { + return fmt.Errorf("error creating EC2 Transit Gateway Peering Attachment: %s", err) + } + + d.SetId(aws.StringValue(output.TransitGatewayPeeringAttachment.TransitGatewayAttachmentId)) + + if err := waitForEc2TransitGatewayPeeringAttachmentCreation(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Peering Attachment (%s) availability: %s", d.Id(), err) + } + + return resourceAwsEc2TransitGatewayPeeringAttachmentRead(d, meta) +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + transitGatewayPeeringAttachment, err := ec2DescribeTransitGatewayPeeringAttachment(conn, d.Id()) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway Peering Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Peering Attachment: %s", err) + } + + if transitGatewayPeeringAttachment == nil { + log.Printf("[WARN] EC2 Transit Gateway Peering Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if aws.StringValue(transitGatewayPeeringAttachment.State) == ec2.TransitGatewayAttachmentStateDeleting || aws.StringValue(transitGatewayPeeringAttachment.State) == ec2.TransitGatewayAttachmentStateDeleted { + log.Printf("[WARN] EC2 Transit Gateway Peering Attachment (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(transitGatewayPeeringAttachment.State)) + d.SetId("") + return nil + } + + d.Set("peer_account_id", transitGatewayPeeringAttachment.AccepterTgwInfo.OwnerId) + d.Set("peer_region", transitGatewayPeeringAttachment.AccepterTgwInfo.Region) + d.Set("peer_transit_gateway_id", transitGatewayPeeringAttachment.AccepterTgwInfo.TransitGatewayId) + d.Set("transit_gateway_id", transitGatewayPeeringAttachment.RequesterTgwInfo.TransitGatewayId) + + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayPeeringAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Peering Attachment (%s) tags: %s", d.Id(), err) + } + } + + return nil +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DeleteTransitGatewayPeeringAttachmentInput{ + TransitGatewayAttachmentId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting EC2 Transit Gateway Peering Attachment (%s): %s", d.Id(), input) + _, err := conn.DeleteTransitGatewayPeeringAttachment(input) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Transit Gateway Peering Attachment: %s", err) + } + + if err := waitForEc2TransitGatewayPeeringAttachmentDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Peering Attachment (%s) deletion: %s", d.Id(), err) + } + + return nil +} diff --git a/aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter.go b/aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter.go new file mode 100644 index 00000000000..59ac333781f --- /dev/null +++ b/aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter.go @@ -0,0 +1,176 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func resourceAwsEc2TransitGatewayPeeringAttachmentAccepter() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2TransitGatewayPeeringAttachmentAccepterCreate, + Read: resourceAwsEc2TransitGatewayPeeringAttachmentAccepterRead, + Update: resourceAwsEc2TransitGatewayPeeringAttachmentAccepterUpdate, + Delete: resourceAwsEc2TransitGatewayPeeringAttachmentAccepterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "peer_account_id": { + Type: schema.TypeString, + Computed: true, + }, + "peer_region": { + Type: schema.TypeString, + Computed: true, + }, + "peer_transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), + "transit_gateway_attachment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "transit_gateway_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentAccepterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.AcceptTransitGatewayPeeringAttachmentInput{ + TransitGatewayAttachmentId: aws.String(d.Get("transit_gateway_attachment_id").(string)), + } + + log.Printf("[DEBUG] Accepting EC2 Transit Gateway Peering Attachment: %s", input) + output, err := conn.AcceptTransitGatewayPeeringAttachment(input) + if err != nil { + return fmt.Errorf("error accepting EC2 Transit Gateway Peering Attachment: %s", err) + } + + d.SetId(aws.StringValue(output.TransitGatewayPeeringAttachment.TransitGatewayAttachmentId)) + + if err := waitForEc2TransitGatewayPeeringAttachmentAcceptance(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Peering Attachment (%s) availability: %s", d.Id(), err) + } + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Peering Attachment (%s) tags: %s", d.Id(), err) + } + } + + return resourceAwsEc2TransitGatewayPeeringAttachmentAccepterRead(d, meta) +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentAccepterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + transitGatewayPeeringAttachment, err := ec2DescribeTransitGatewayPeeringAttachment(conn, d.Id()) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + log.Printf("[WARN] EC2 Transit Gateway Peering Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Transit Gateway Peering Attachment: %s", err) + } + + if transitGatewayPeeringAttachment == nil { + log.Printf("[WARN] EC2 Transit Gateway Peering Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + recreationStates := map[string]bool{ + ec2.TransitGatewayAttachmentStateDeleted: true, + ec2.TransitGatewayAttachmentStateDeleting: true, + ec2.TransitGatewayAttachmentStateFailed: true, + ec2.TransitGatewayAttachmentStateFailing: true, + ec2.TransitGatewayAttachmentStateRejected: true, + ec2.TransitGatewayAttachmentStateRejecting: true, + } + if _, ok := recreationStates[aws.StringValue(transitGatewayPeeringAttachment.State)]; ok { + log.Printf("[WARN] EC2 Transit Gateway Peering Attachment (%s) in state (%s), removing from state", d.Id(), aws.StringValue(transitGatewayPeeringAttachment.State)) + d.SetId("") + return nil + } + + transitGatewayID := aws.StringValue(transitGatewayPeeringAttachment.AccepterTgwInfo.TransitGatewayId) + transitGateway, err := ec2DescribeTransitGateway(conn, transitGatewayID) + if err != nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): %s", transitGatewayID, err) + } + + if transitGateway.Options == nil { + return fmt.Errorf("error describing EC2 Transit Gateway (%s): missing options", transitGatewayID) + } + + d.Set("peer_account_id", transitGatewayPeeringAttachment.RequesterTgwInfo.OwnerId) + d.Set("peer_region", transitGatewayPeeringAttachment.RequesterTgwInfo.Region) + d.Set("peer_transit_gateway_id", transitGatewayPeeringAttachment.RequesterTgwInfo.TransitGatewayId) + + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayPeeringAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("transit_gateway_attachment_id", transitGatewayPeeringAttachment.TransitGatewayAttachmentId) + d.Set("transit_gateway_id", transitGatewayPeeringAttachment.AccepterTgwInfo.TransitGatewayId) + + return nil +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentAccepterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating EC2 Transit Gateway Peering Attachment (%s) tags: %s", d.Id(), err) + } + } + + return nil +} + +func resourceAwsEc2TransitGatewayPeeringAttachmentAccepterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DeleteTransitGatewayPeeringAttachmentInput{ + TransitGatewayAttachmentId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting EC2 Transit Gateway Peering Attachment (%s): %s", d.Id(), input) + _, err := conn.DeleteTransitGatewayPeeringAttachment(input) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Transit Gateway Peering Attachment: %s", err) + } + + if err := waitForEc2TransitGatewayPeeringAttachmentDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for EC2 Transit Gateway Peering Attachment (%s) deletion: %s", d.Id(), err) + } + + return nil +} diff --git a/aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter_test.go b/aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter_test.go new file mode 100644 index 00000000000..7ef25573463 --- /dev/null +++ b/aws/resource_aws_ec2_transit_gateway_peering_attachment_accepter_test.go @@ -0,0 +1,224 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +func TestAccAWSEc2TransitGatewayPeeringAttachmentAccepter_basic_sameAccount(t *testing.T) { + var providers []*schema.Provider + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + resourceName := "aws_ec2_transit_gateway_peering_attachment_accepter.test" + peeringAttachmentName := "aws_ec2_transit_gateway_peering_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + transitGatewayResourceNamePeer := "aws_ec2_transit_gateway.peer" + rName := fmt.Sprintf("tf-testacc-tgwpeerattach-%s", acctest.RandString(8)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_basic_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttrPair(resourceName, "peer_account_id", transitGatewayResourceNamePeer, "owner_id"), + resource.TestCheckResourceAttr(resourceName, "peer_region", testAccGetAlternateRegion()), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", transitGatewayResourceNamePeer, "id"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", transitGatewayResourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_attachment_id", peeringAttachmentName, "id"), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_basic_sameAccount(rName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEc2TransitGatewayPeeringAttachmentAccepter_Tags_sameAccount(t *testing.T) { + var providers []*schema.Provider + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + resourceName := "aws_ec2_transit_gateway_peering_attachment_accepter.test" + rName := fmt.Sprintf("tf-testacc-tgwpeerattach-%s", acctest.RandString(8)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_tags_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttr(resourceName, "tags.%", "4"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + resource.TestCheckResourceAttr(resourceName, "tags.Side", "Accepter"), + resource.TestCheckResourceAttr(resourceName, "tags.Key1", "Value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", "Value2a"), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_tagsUpdated_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttr(resourceName, "tags.%", "4"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + resource.TestCheckResourceAttr(resourceName, "tags.Side", "Accepter"), + resource.TestCheckResourceAttr(resourceName, "tags.Key3", "Value3"), + resource.TestCheckResourceAttr(resourceName, "tags.Key2", "Value2b"), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_tagsUpdated_sameAccount(rName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEc2TransitGatewayPeeringAttachmentAccepter_basic_differentAccount(t *testing.T) { + var providers []*schema.Provider + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + resourceName := "aws_ec2_transit_gateway_peering_attachment_accepter.test" + peeringAttachmentName := "aws_ec2_transit_gateway_peering_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + transitGatewayResourceNamePeer := "aws_ec2_transit_gateway.peer" + rName := fmt.Sprintf("tf-testacc-tgwpeerattach-%s", acctest.RandString(8)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccAlternateAccountPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_basic_differentAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttrPair(resourceName, "peer_account_id", transitGatewayResourceNamePeer, "owner_id"), + resource.TestCheckResourceAttr(resourceName, "peer_region", testAccGetAlternateRegion()), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", transitGatewayResourceNamePeer, "id"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", transitGatewayResourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_attachment_id", peeringAttachmentName, "id"), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_basic_differentAccount(rName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfigBase(rName string) string { + return fmt.Sprintf(` +data "aws_region" "current" {} + +resource "aws_ec2_transit_gateway" "test" { + tags = { + Name = %[1]q + } +} + +resource "aws_ec2_transit_gateway" "peer" { + provider = "aws.alternate" + + tags = { + Name = %[1]q + } +} +resource "aws_ec2_transit_gateway_peering_attachment" "test" { + provider = "aws.alternate" + + peer_account_id = aws_ec2_transit_gateway.test.owner_id + peer_region = data.aws_region.current.name + peer_transit_gateway_id = aws_ec2_transit_gateway.test.id + transit_gateway_id = aws_ec2_transit_gateway.peer.id +} +`, rName) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_basic_sameAccount(rName string) string { + return composeConfig( + testAccAlternateRegionProviderConfig(), + testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfigBase(rName), + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment_accepter" "test" { + transit_gateway_attachment_id = aws_ec2_transit_gateway_peering_attachment.test.id +} +`)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_tags_sameAccount(rName string) string { + return composeConfig( + testAccAlternateRegionProviderConfig(), + testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfigBase(rName), + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment_accepter" "test" { + transit_gateway_attachment_id = aws_ec2_transit_gateway_peering_attachment.test.id + tags = { + Name = %[1]q + Side = "Accepter" + Key1 = "Value1" + Key2 = "Value2a" + } +} +`, rName)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_tagsUpdated_sameAccount(rName string) string { + return composeConfig( + testAccAlternateRegionProviderConfig(), + testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfigBase(rName), + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment_accepter" "test" { + transit_gateway_attachment_id = aws_ec2_transit_gateway_peering_attachment.test.id + tags = { + Name = %[1]q + Side = "Accepter" + Key3 = "Value3" + Key2 = "Value2b" + } +} +`, rName)) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfig_basic_differentAccount(rName string) string { + return composeConfig( + testAccAlternateAccountAlternateRegionProviderConfig(), + testAccAWSEc2TransitGatewayPeeringAttachmentAccepterConfigBase(rName), + ` +resource "aws_ec2_transit_gateway_peering_attachment_accepter" "test" { + transit_gateway_attachment_id = aws_ec2_transit_gateway_peering_attachment.test.id +} +`) +} diff --git a/aws/resource_aws_ec2_transit_gateway_peering_attachment_test.go b/aws/resource_aws_ec2_transit_gateway_peering_attachment_test.go new file mode 100644 index 00000000000..51d73597036 --- /dev/null +++ b/aws/resource_aws_ec2_transit_gateway_peering_attachment_test.go @@ -0,0 +1,401 @@ +package aws + +import ( + "fmt" + "log" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func init() { + resource.AddTestSweepers("aws_ec2_transit_gateway_peering_attachment", &resource.Sweeper{ + Name: "aws_ec2_transit_gateway_peering_attachment", + F: testSweepEc2TransitGatewayPeeringAttachments, + }) +} + +func testSweepEc2TransitGatewayPeeringAttachments(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).ec2conn + input := &ec2.DescribeTransitGatewayPeeringAttachmentsInput{} + var sweeperErrs *multierror.Error + + err = conn.DescribeTransitGatewayPeeringAttachmentsPages(input, + func(page *ec2.DescribeTransitGatewayPeeringAttachmentsOutput, lastPage bool) bool { + for _, transitGatewayPeeringAttachment := range page.TransitGatewayPeeringAttachments { + if aws.StringValue(transitGatewayPeeringAttachment.State) == ec2.TransitGatewayAttachmentStateDeleted { + continue + } + + id := aws.StringValue(transitGatewayPeeringAttachment.TransitGatewayAttachmentId) + + input := &ec2.DeleteTransitGatewayPeeringAttachmentInput{ + TransitGatewayAttachmentId: aws.String(id), + } + + log.Printf("[INFO] Deleting EC2 Transit Gateway Peering Attachment: %s", id) + _, err := conn.DeleteTransitGatewayPeeringAttachment(input) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + continue + } + + if err != nil { + sweeperErr := fmt.Errorf("error deleting EC2 Transit Gateway Peering Attachment (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if err := waitForEc2TransitGatewayPeeringAttachmentDeletion(conn, id); err != nil { + sweeperErr := fmt.Errorf("error waiting for EC2 Transit Gateway Peering Attachment (%s) deletion: %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + return !lastPage + }) + + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 Transit Gateway Peering Attachment sweep for %s: %s", region, err) + return nil + } + + if err != nil { + return fmt.Errorf("error retrieving EC2 Transit Gateway Peering Attachments: %s", err) + } + + return sweeperErrs.ErrorOrNil() +} + +func TestAccAWSEc2TransitGatewayPeeringAttachment_basic(t *testing.T) { + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + transitGatewayResourceNamePeer := "aws_ec2_transit_gateway.peer" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + testAccCheckResourceAttrAccountID(resourceName, "peer_account_id"), + resource.TestCheckResourceAttr(resourceName, "peer_region", testAccGetAlternateRegion()), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", transitGatewayResourceNamePeer, "id"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", transitGatewayResourceName, "id"), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEc2TransitGatewayPeeringAttachment_disappears(t *testing.T) { + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + testAccCheckAWSEc2TransitGatewayPeeringAttachmentDisappears(&transitGatewayPeeringAttachment), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSEc2TransitGatewayPeeringAttachment_Tags_sameAccount(t *testing.T) { + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigTags1_sameAccount(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigTags1_sameAccount(rName, "key1", "value1"), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigTags2_sameAccount(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + }, + }) +} + +func TestAccAWSEc2TransitGatewayPeeringAttachment_differentAccount(t *testing.T) { + var transitGatewayPeeringAttachment ec2.TransitGatewayPeeringAttachment + var providers []*schema.Provider + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ec2_transit_gateway_peering_attachment.test" + transitGatewayResourceName := "aws_ec2_transit_gateway.test" + transitGatewayResourceNamePeer := "aws_ec2_transit_gateway.peer" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSEc2TransitGateway(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_differentAccount(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName, &transitGatewayPeeringAttachment), + // Test that the peer account ID != the primary (request) account ID + func(s *terraform.State) error { + if testAccCheckResourceAttrAccountID(resourceName, "peer_account_id") == nil { + return fmt.Errorf("peer_account_id attribute incorrectly to the requester's account ID") + } + return nil + }, + resource.TestCheckResourceAttr(resourceName, "peer_region", testAccGetAlternateRegion()), + resource.TestCheckResourceAttrPair(resourceName, "peer_transit_gateway_id", transitGatewayResourceNamePeer, "id"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(resourceName, "transit_gateway_id", transitGatewayResourceName, "id"), + ), + }, + { + Config: testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_differentAccount(rName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSEc2TransitGatewayPeeringAttachmentExists(resourceName string, transitGatewayPeeringAttachment *ec2.TransitGatewayPeeringAttachment) 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 EC2 Transit Gateway Peering Attachment ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + attachment, err := ec2DescribeTransitGatewayPeeringAttachment(conn, rs.Primary.ID) + + if err != nil { + return err + } + + if attachment == nil { + return fmt.Errorf("EC2 Transit Gateway Peering Attachment not found") + } + + if aws.StringValue(attachment.State) != ec2.TransitGatewayAttachmentStateAvailable && aws.StringValue(attachment.State) != ec2.TransitGatewayAttachmentStatePendingAcceptance { + return fmt.Errorf("EC2 Transit Gateway Peering Attachment (%s) exists in non-available/pending acceptance (%s) state", rs.Primary.ID, aws.StringValue(attachment.State)) + } + + *transitGatewayPeeringAttachment = *attachment + + return nil + } +} + +func testAccCheckAWSEc2TransitGatewayPeeringAttachmentDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_ec2_transit_gateway_peering_attachment" { + continue + } + + peeringAttachment, err := ec2DescribeTransitGatewayPeeringAttachment(conn, rs.Primary.ID) + + if isAWSErr(err, "InvalidTransitGatewayAttachmentID.NotFound", "") { + continue + } + + if err != nil { + return err + } + + if peeringAttachment == nil { + continue + } + + if aws.StringValue(peeringAttachment.State) != ec2.TransitGatewayAttachmentStateDeleted { + return fmt.Errorf("EC2 Transit Gateway Peering Attachment (%s) still exists in non-deleted (%s) state", rs.Primary.ID, aws.StringValue(peeringAttachment.State)) + } + } + + return nil +} + +func testAccCheckAWSEc2TransitGatewayPeeringAttachmentDisappears(transitGatewayPeeringAttachment *ec2.TransitGatewayPeeringAttachment) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + input := &ec2.DeleteTransitGatewayPeeringAttachmentInput{ + TransitGatewayAttachmentId: transitGatewayPeeringAttachment.TransitGatewayAttachmentId, + } + + if _, err := conn.DeleteTransitGatewayPeeringAttachment(input); err != nil { + return err + } + + return waitForEc2TransitGatewayPeeringAttachmentDeletion(conn, aws.StringValue(transitGatewayPeeringAttachment.TransitGatewayAttachmentId)) + } +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfig_base(rName string) string { + return fmt.Sprintf(` +resource "aws_ec2_transit_gateway" "test" { + tags = { + Name = %[1]q + } +} + +resource "aws_ec2_transit_gateway" "peer" { + provider = "aws.alternate" + + tags = { + Name = %[1]q + } +} +`, rName) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfig_sameAccount_base(rName string) string { + return testAccAlternateRegionProviderConfig() + testAccAWSEc2TransitGatewayPeeringAttachmentConfig_base(rName) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfig_differentAccount_base(rName string) string { + return testAccAlternateAccountAlternateRegionProviderConfig() + testAccAWSEc2TransitGatewayPeeringAttachmentConfig_base(rName) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_sameAccount(rName string) string { + return testAccAWSEc2TransitGatewayPeeringAttachmentConfig_sameAccount_base(rName) + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment" "test" { + peer_region = %[1]q + peer_transit_gateway_id = "${aws_ec2_transit_gateway.peer.id}" + transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" +} +`, testAccGetAlternateRegion()) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfigBasic_differentAccount(rName string) string { + return testAccAWSEc2TransitGatewayPeeringAttachmentConfig_differentAccount_base(rName) + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment" "test" { + peer_account_id = "${aws_ec2_transit_gateway.peer.owner_id}" + peer_region = %[1]q + peer_transit_gateway_id = "${aws_ec2_transit_gateway.peer.id}" + transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" +} +`, testAccGetAlternateRegion()) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfigTags1_sameAccount(rName, tagKey1, tagValue1 string) string { + return testAccAWSEc2TransitGatewayPeeringAttachmentConfig_sameAccount_base(rName) + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment" "test" { + peer_region = %[1]q + peer_transit_gateway_id = "${aws_ec2_transit_gateway.peer.id}" + transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" + + tags = { + Name = %[2]q + %[3]s = %[4]q + } +} +`, testAccGetAlternateRegion(), rName, tagKey1, tagValue1) +} + +func testAccAWSEc2TransitGatewayPeeringAttachmentConfigTags2_sameAccount(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAWSEc2TransitGatewayPeeringAttachmentConfig_sameAccount_base(rName) + fmt.Sprintf(` +resource "aws_ec2_transit_gateway_peering_attachment" "test" { + peer_region = %[1]q + peer_transit_gateway_id = "${aws_ec2_transit_gateway.peer.id}" + transit_gateway_id = "${aws_ec2_transit_gateway.test.id}" + + tags = { + Name = %[2]q + %[3]s = %[4]q + %[5]s = %[6]q + } +} +`, testAccGetAlternateRegion(), rName, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_ec2_transit_gateway_route_table.go b/aws/resource_aws_ec2_transit_gateway_route_table.go index 5b20ae467c1..f19e19546ee 100644 --- a/aws/resource_aws_ec2_transit_gateway_route_table.go +++ b/aws/resource_aws_ec2_transit_gateway_route_table.go @@ -66,6 +66,7 @@ func resourceAwsEc2TransitGatewayRouteTableCreate(d *schema.ResourceData, meta i func resourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig transitGatewayRouteTable, err := ec2DescribeTransitGatewayRouteTable(conn, d.Id()) @@ -94,7 +95,7 @@ func resourceAwsEc2TransitGatewayRouteTableRead(d *schema.ResourceData, meta int d.Set("default_association_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultAssociationRouteTable)) d.Set("default_propagation_route_table", aws.BoolValue(transitGatewayRouteTable.DefaultPropagationRouteTable)) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayRouteTable.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayRouteTable.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_transit_gateway_route_test.go b/aws/resource_aws_ec2_transit_gateway_route_test.go index bf5c2de6518..e51161a9a3c 100644 --- a/aws/resource_aws_ec2_transit_gateway_route_test.go +++ b/aws/resource_aws_ec2_transit_gateway_route_test.go @@ -209,6 +209,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/resource_aws_ec2_transit_gateway_test.go b/aws/resource_aws_ec2_transit_gateway_test.go index b824ec5d07b..1c0a8b4c684 100644 --- a/aws/resource_aws_ec2_transit_gateway_test.go +++ b/aws/resource_aws_ec2_transit_gateway_test.go @@ -20,6 +20,7 @@ func init() { Dependencies: []string{ "aws_dx_gateway_association", "aws_ec2_transit_gateway_vpc_attachment", + "aws_ec2_transit_gateway_peering_attachment", "aws_vpn_connection", }, }) diff --git a/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go b/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go index 29f41e961eb..0b241e7e2ee 100644 --- a/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go +++ b/aws/resource_aws_ec2_transit_gateway_vpc_attachment.go @@ -130,6 +130,7 @@ func resourceAwsEc2TransitGatewayVpcAttachmentCreate(d *schema.ResourceData, met func resourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig transitGatewayVpcAttachment, err := ec2DescribeTransitGatewayVpcAttachment(conn, d.Id()) @@ -194,7 +195,7 @@ func resourceAwsEc2TransitGatewayVpcAttachmentRead(d *schema.ResourceData, meta return fmt.Errorf("error setting subnet_ids: %s", err) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayVpcAttachment.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayVpcAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter.go b/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter.go index bb2fc407e65..c12bd7ad9b8 100644 --- a/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter.go +++ b/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter.go @@ -87,7 +87,7 @@ func resourceAwsEc2TransitGatewayVpcAttachmentAccepterCreate(d *schema.ResourceD } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error updating EC2 Transit Gateway VPC Attachment (%s) tags: %s", d.Id(), err) } } @@ -114,6 +114,7 @@ func resourceAwsEc2TransitGatewayVpcAttachmentAccepterCreate(d *schema.ResourceD func resourceAwsEc2TransitGatewayVpcAttachmentAccepterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig transitGatewayVpcAttachment, err := ec2DescribeTransitGatewayVpcAttachment(conn, d.Id()) @@ -172,7 +173,7 @@ func resourceAwsEc2TransitGatewayVpcAttachmentAccepterRead(d *schema.ResourceDat return fmt.Errorf("error setting subnet_ids: %s", err) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayVpcAttachment.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(transitGatewayVpcAttachment.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go b/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go index 77858422334..ca9c284ead8 100644 --- a/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go +++ b/aws/resource_aws_ec2_transit_gateway_vpc_attachment_accepter_test.go @@ -195,6 +195,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_ec2_transit_gateway" "test" { diff --git a/aws/resource_aws_ec2_transit_gateway_vpc_attachment_test.go b/aws/resource_aws_ec2_transit_gateway_vpc_attachment_test.go index fcce2d89056..b7bea1599a8 100644 --- a/aws/resource_aws_ec2_transit_gateway_vpc_attachment_test.go +++ b/aws/resource_aws_ec2_transit_gateway_vpc_attachment_test.go @@ -547,6 +547,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -583,6 +588,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -620,6 +630,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -659,6 +674,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_organizations_organization" "test" {} @@ -721,6 +741,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -759,6 +784,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -797,6 +827,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -837,6 +872,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -878,6 +918,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -919,6 +964,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -956,6 +1006,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/resource_aws_ecr_lifecycle_policy.go b/aws/resource_aws_ecr_lifecycle_policy.go index 3ff36581c5c..643a5e15593 100644 --- a/aws/resource_aws_ecr_lifecycle_policy.go +++ b/aws/resource_aws_ecr_lifecycle_policy.go @@ -27,7 +27,7 @@ func resourceAwsEcrLifecyclePolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "registry_id": { diff --git a/aws/resource_aws_ecr_repository.go b/aws/resource_aws_ecr_repository.go index ac9ad614b6b..6c4a4a7a0e1 100644 --- a/aws/resource_aws_ecr_repository.go +++ b/aws/resource_aws_ecr_repository.go @@ -110,6 +110,7 @@ func resourceAwsEcrRepositoryCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecrconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading ECR repository %s", d.Id()) var out *ecr.DescribeRepositoriesOutput @@ -162,7 +163,7 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("error listing tags for ECR Repository (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ecr_repository_test.go b/aws/resource_aws_ecr_repository_test.go index 3c54a6476cb..a0bd6dfb695 100644 --- a/aws/resource_aws_ecr_repository_test.go +++ b/aws/resource_aws_ecr_repository_test.go @@ -2,15 +2,71 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecr" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_ecr_repository", &resource.Sweeper{ + Name: "aws_ecr_repository", + F: testSweepEcrRepositories, + }) +} + +func testSweepEcrRepositories(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).ecrconn + + var errors error + err = conn.DescribeRepositoriesPages(&ecr.DescribeRepositoriesInput{}, func(page *ecr.DescribeRepositoriesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, repository := range page.Repositories { + repositoryName := aws.StringValue(repository.RepositoryName) + log.Printf("[INFO] Deleting ECR repository: %s", repositoryName) + + shouldForce := true + _, err = conn.DeleteRepository(&ecr.DeleteRepositoryInput{ + // We should probably sweep repositories even if there are images. + Force: &shouldForce, + RegistryId: repository.RegistryId, + RepositoryName: repository.RepositoryName, + }) + if err != nil { + if !isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + sweeperErr := fmt.Errorf("Error deleting ECR repository (%s): %w", repositoryName, err) + log.Printf("[ERROR] %s", sweeperErr) + errors = multierror.Append(errors, sweeperErr) + } + continue + } + } + + return !isLast + }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping ECR repository sweep for %s: %s", region, err) + return nil + } + errors = multierror.Append(errors, fmt.Errorf("Error retreiving ECR repositories: %w", err)) + } + + return errors +} + func TestAccAWSEcrRepository_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_ecr_repository.default" diff --git a/aws/resource_aws_ecs_capacity_provider.go b/aws/resource_aws_ecs_capacity_provider.go index 2907693e4a0..8d806d293d1 100644 --- a/aws/resource_aws_ecs_capacity_provider.go +++ b/aws/resource_aws_ecs_capacity_provider.go @@ -132,6 +132,7 @@ func resourceAwsEcsCapacityProviderCreate(d *schema.ResourceData, meta interface func resourceAwsEcsCapacityProviderRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ecs.DescribeCapacityProvidersInput{ CapacityProviders: []*string{aws.String(d.Id())}, @@ -161,7 +162,7 @@ func resourceAwsEcsCapacityProviderRead(d *schema.ResourceData, meta interface{} d.Set("arn", provider.CapacityProviderArn) d.Set("name", provider.Name) - if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(provider.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(provider.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ecs_capacity_provider_test.go b/aws/resource_aws_ecs_capacity_provider_test.go index 0c8aaa1f6a2..f31b9a331f3 100644 --- a/aws/resource_aws_ecs_capacity_provider_test.go +++ b/aws/resource_aws_ecs_capacity_provider_test.go @@ -210,7 +210,14 @@ data "aws_ami" "test" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_launch_template" "test" { image_id = data.aws_ami.test.id diff --git a/aws/resource_aws_ecs_cluster.go b/aws/resource_aws_ecs_cluster.go index c8bd30dabdf..533914c6808 100644 --- a/aws/resource_aws_ecs_cluster.go +++ b/aws/resource_aws_ecs_cluster.go @@ -146,6 +146,7 @@ func resourceAwsEcsClusterCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &ecs.DescribeClustersInput{ Clusters: []*string{aws.String(d.Id())}, @@ -220,7 +221,7 @@ func resourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error setting setting: %s", err) } - if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(cluster.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(cluster.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ecs_cluster_test.go b/aws/resource_aws_ecs_cluster_test.go index c5703eca95a..29104b6f89f 100644 --- a/aws/resource_aws_ecs_cluster_test.go +++ b/aws/resource_aws_ecs_cluster_test.go @@ -217,7 +217,6 @@ func TestAccAWSEcsCluster_CapacityProviders(t *testing.T) { func TestAccAWSEcsCluster_CapacityProvidersUpdate(t *testing.T) { var cluster1 ecs.Cluster rName := acctest.RandomWithPrefix("tf-acc-test") - providerName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_ecs_cluster.test" resource.ParallelTest(t, resource.TestCase{ @@ -226,7 +225,7 @@ func TestAccAWSEcsCluster_CapacityProvidersUpdate(t *testing.T) { CheckDestroy: testAccCheckAWSEcsClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEcsClusterCapacityProvidersFargate(rName, providerName), + Config: testAccAWSEcsClusterCapacityProvidersFargate(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsClusterExists(resourceName, &cluster1), ), @@ -238,13 +237,13 @@ func TestAccAWSEcsCluster_CapacityProvidersUpdate(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAWSEcsClusterCapacityProvidersFargateSpot(rName, providerName), + Config: testAccAWSEcsClusterCapacityProvidersFargateSpot(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsClusterExists(resourceName, &cluster1), ), }, { - Config: testAccAWSEcsClusterCapacityProvidersFargateBoth(rName, providerName), + Config: testAccAWSEcsClusterCapacityProvidersFargateBoth(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsClusterExists(resourceName, &cluster1), ), @@ -256,7 +255,6 @@ func TestAccAWSEcsCluster_CapacityProvidersUpdate(t *testing.T) { func TestAccAWSEcsCluster_CapacityProvidersNoStrategy(t *testing.T) { var cluster1 ecs.Cluster rName := acctest.RandomWithPrefix("tf-acc-test") - providerName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_ecs_cluster.test" resource.ParallelTest(t, resource.TestCase{ @@ -265,7 +263,7 @@ func TestAccAWSEcsCluster_CapacityProvidersNoStrategy(t *testing.T) { CheckDestroy: testAccCheckAWSEcsClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName, providerName), + Config: testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsClusterExists(resourceName, &cluster1), ), @@ -277,7 +275,7 @@ func TestAccAWSEcsCluster_CapacityProvidersNoStrategy(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName, providerName), + Config: testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsClusterExists(resourceName, &cluster1), ), @@ -292,9 +290,10 @@ func TestAccAWSEcsCluster_containerInsights(t *testing.T) { resourceName := "aws_ecs_cluster.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcsClusterDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsClusterDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEcsClusterConfig(rName), @@ -490,7 +489,7 @@ resource "aws_ecs_cluster" "test" { `, rName) } -func testAccAWSEcsClusterCapacityProvidersFargate(rName, providerName string) string { +func testAccAWSEcsClusterCapacityProvidersFargate(rName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "test" { name = %[1]q @@ -506,7 +505,7 @@ resource "aws_ecs_cluster" "test" { `, rName) } -func testAccAWSEcsClusterCapacityProvidersFargateSpot(rName, providerName string) string { +func testAccAWSEcsClusterCapacityProvidersFargateSpot(rName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "test" { name = %[1]q @@ -522,7 +521,7 @@ resource "aws_ecs_cluster" "test" { `, rName) } -func testAccAWSEcsClusterCapacityProvidersFargateBoth(rName, providerName string) string { +func testAccAWSEcsClusterCapacityProvidersFargateBoth(rName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "test" { name = %[1]q @@ -538,7 +537,7 @@ resource "aws_ecs_cluster" "test" { `, rName) } -func testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName, providerName string) string { +func testAccAWSEcsClusterCapacityProvidersFargateNoStrategy(rName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "test" { name = %[1]q @@ -548,7 +547,7 @@ resource "aws_ecs_cluster" "test" { `, rName) } -func testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName, providerName string) string { +func testAccAWSEcsClusterCapacityProvidersFargateSpotNoStrategy(rName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "test" { name = %[1]q diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 1f8ab812de1..f93857b1db7 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -89,6 +89,11 @@ func resourceAwsEcsService() *schema.Resource { Default: false, }, + "force_new_deployment": { + Type: schema.TypeBool, + Optional: true, + }, + "health_check_grace_period_seconds": { Type: schema.TypeInt, Optional: true, @@ -272,18 +277,15 @@ func resourceAwsEcsService() *schema.Resource { "ordered_placement_strategy": { Type: schema.TypeList, Optional: true, - ForceNew: true, MaxItems: 5, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, - ForceNew: true, Required: true, }, "field": { Type: schema.TypeString, - ForceNew: true, Optional: true, StateFunc: func(v interface{}) string { value := v.(string) @@ -302,13 +304,11 @@ func resourceAwsEcsService() *schema.Resource { "placement_constraints": { Type: schema.TypeSet, Optional: true, - ForceNew: true, MaxItems: 10, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, - ForceNew: true, Required: true, ValidateFunc: validation.StringInSlice([]string{ ecs.PlacementConstraintTypeDistinctInstance, @@ -317,7 +317,6 @@ func resourceAwsEcsService() *schema.Resource { }, "expression": { Type: schema.TypeString, - ForceNew: true, Optional: true, }, }, @@ -342,7 +341,7 @@ func resourceAwsEcsService() *schema.Resource { }, "service_registries": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, MaxItems: 1, @@ -458,35 +457,25 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error if v, ok := d.GetOk("ordered_placement_strategy"); ok { ps, err := expandPlacementStrategy(v.([]interface{})) + if err != nil { return err } + input.PlacementStrategy = ps } - constraints := d.Get("placement_constraints").(*schema.Set).List() - if len(constraints) > 0 { - var pc []*ecs.PlacementConstraint - for _, raw := range constraints { - p := raw.(map[string]interface{}) - t := p["type"].(string) - e := p["expression"].(string) - if err := validateAwsEcsPlacementConstraint(t, e); err != nil { - return err - } - constraint := &ecs.PlacementConstraint{ - Type: aws.String(t), - } - if e != "" { - constraint.Expression = aws.String(e) - } + if v, ok := d.Get("placement_constraints").(*schema.Set); ok { + pc, err := expandPlacementConstraints(v.List()) - pc = append(pc, constraint) + if err != nil { + return err } + input.PlacementConstraints = pc } - serviceRegistries := d.Get("service_registries").(*schema.Set).List() + serviceRegistries := d.Get("service_registries").([]interface{}) if len(serviceRegistries) > 0 { srs := make([]*ecs.ServiceRegistry, 0, len(serviceRegistries)) for _, v := range serviceRegistries { @@ -553,6 +542,7 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading ECS service %s", d.Id()) input := ecs.DescribeServicesInput{ @@ -685,7 +675,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error setting service_registries for (%s): %s", d.Id(), err) } - if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(service.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(service.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -796,6 +786,40 @@ func flattenEcsCapacityProviderStrategy(cps []*ecs.CapacityProviderStrategyItem) return results } +func expandPlacementConstraints(tfList []interface{}) ([]*ecs.PlacementConstraint, error) { + if len(tfList) == 0 { + return nil, nil + } + + var result []*ecs.PlacementConstraint + + for _, tfMapRaw := range tfList { + if tfMapRaw == nil { + continue + } + + tfMap := tfMapRaw.(map[string]interface{}) + + apiObject := &ecs.PlacementConstraint{} + + if v, ok := tfMap["expression"].(string); ok && v != "" { + apiObject.Expression = aws.String(v) + } + + if v, ok := tfMap["type"].(string); ok && v != "" { + apiObject.Type = aws.String(v) + } + + if err := validateAwsEcsPlacementConstraint(aws.StringValue(apiObject.Type), aws.StringValue(apiObject.Expression)); err != nil { + return result, err + } + + result = append(result, apiObject) + } + + return result, nil +} + func flattenServicePlacementConstraints(pcs []*ecs.PlacementConstraint) []map[string]interface{} { if len(pcs) == 0 { return nil @@ -888,8 +912,9 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error updateService := false input := ecs.UpdateServiceInput{ - Service: aws.String(d.Id()), - Cluster: aws.String(d.Get("cluster").(string)), + Cluster: aws.String(d.Get("cluster").(string)), + ForceNewDeployment: aws.Bool(d.Get("force_new_deployment").(bool)), + Service: aws.String(d.Id()), } schedulingStrategy := d.Get("scheduling_strategy").(string) @@ -916,6 +941,40 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error } } + if d.HasChange("ordered_placement_strategy") { + updateService = true + // Reference: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html#ECS-UpdateService-request-placementStrategy + // To remove an existing placement strategy, specify an empty object. + input.PlacementStrategy = []*ecs.PlacementStrategy{} + + if v, ok := d.GetOk("ordered_placement_strategy"); ok && len(v.([]interface{})) > 0 { + ps, err := expandPlacementStrategy(v.([]interface{})) + + if err != nil { + return err + } + + input.PlacementStrategy = ps + } + } + + if d.HasChange("placement_constraints") { + updateService = true + // Reference: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html#ECS-UpdateService-request-placementConstraints + // To remove all existing placement constraints, specify an empty array. + input.PlacementConstraints = []*ecs.PlacementConstraint{} + + if v, ok := d.Get("placement_constraints").(*schema.Set); ok && v.Len() > 0 { + pc, err := expandPlacementConstraints(v.List()) + + if err != nil { + return err + } + + input.PlacementConstraints = pc + } + } + if d.HasChange("platform_version") { updateService = true input.PlatformVersion = aws.String(d.Get("platform_version").(string)) diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 53f43dc934a..450f3c4786d 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -617,8 +617,44 @@ func TestAccAWSEcsService_withMultipleTargetGroups(t *testing.T) { }, }) } + +func TestAccAWSEcsService_withForceNewDeployment(t *testing.T) { + var service1, service2 ecs.Service + resourceName := "aws_ecs_service.mongo" + rString := acctest.RandString(8) + + clusterName := fmt.Sprintf("tf-acc-cluster-svc-w-ps-%s", rString) + tdName := fmt.Sprintf("tf-acc-td-svc-w-ps-%s", rString) + svcName := fmt.Sprintf("tf-acc-svc-w-ps-%s", rString) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsServiceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEcsService(clusterName, tdName, svcName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsServiceExists(resourceName, &service1), + resource.TestCheckResourceAttr(resourceName, "ordered_placement_strategy.#", "0"), + ), + }, + { + Config: testAccAWSEcsServiceWithForceNewDeployment(clusterName, tdName, svcName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsServiceExists(resourceName, &service2), + testAccCheckAWSEcsServiceNotRecreated(&service1, &service2), + resource.TestCheckResourceAttr(resourceName, "ordered_placement_strategy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "ordered_placement_strategy.0.type", "binpack"), + resource.TestCheckResourceAttr(resourceName, "ordered_placement_strategy.0.field", "memory"), + ), + }, + }, + }) +} + func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { - var service ecs.Service + var service1, service2, service3, service4 ecs.Service rString := acctest.RandString(8) clusterName := fmt.Sprintf("tf-acc-cluster-svc-w-ps-%s", rString) @@ -633,14 +669,15 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { { Config: testAccAWSEcsService(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service1), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "0"), ), }, { Config: testAccAWSEcsServiceWithPlacementStrategy(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service2), + testAccCheckAWSEcsServiceNotRecreated(&service1, &service2), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "1"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "binpack"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", "memory"), @@ -649,7 +686,8 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { { Config: testAccAWSEcsServiceWithRandomPlacementStrategy(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service3), + testAccCheckAWSEcsServiceNotRecreated(&service2, &service3), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "1"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "random"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", ""), @@ -658,7 +696,8 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { { Config: testAccAWSEcsServiceWithMultiPlacementStrategy(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service4), + testAccCheckAWSEcsServiceNotRecreated(&service3, &service4), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "2"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "binpack"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", "memory"), @@ -671,7 +710,7 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { } func TestAccAWSEcsService_withPlacementConstraints(t *testing.T) { - var service ecs.Service + var service1, service2 ecs.Service rString := acctest.RandString(8) clusterName := fmt.Sprintf("tf-acc-cluster-svc-w-pc-%s", rString) @@ -686,7 +725,15 @@ func TestAccAWSEcsService_withPlacementConstraints(t *testing.T) { { Config: testAccAWSEcsServiceWithPlacementConstraint(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service1), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "placement_constraints.#", "1"), + ), + }, + { + Config: testAccAWSEcsServiceWithPlacementConstraintEmptyExpression(clusterName, tdName, svcName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service2), + testAccCheckAWSEcsServiceNotRecreated(&service1, &service2), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "placement_constraints.#", "1"), ), }, @@ -1186,6 +1233,16 @@ func testAccCheckAWSEcsServiceDisappears(service *ecs.Service) resource.TestChec } } +func testAccCheckAWSEcsServiceNotRecreated(i, j *ecs.Service) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.TimeValue(i.CreatedAt) != aws.TimeValue(j.CreatedAt) { + return fmt.Errorf("ECS Service (%s) unexpectedly recreated", aws.StringValue(j.ServiceArn)) + } + + return nil + } +} + func testAccAWSEcsService(clusterName, tdName, svcName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "default" { @@ -1405,6 +1462,43 @@ resource "aws_vpc" "main" { `, tdName, svcName, sgName) } +func testAccAWSEcsServiceWithForceNewDeployment(clusterName, tdName, svcName string) string { + return fmt.Sprintf(` +resource "aws_ecs_cluster" "default" { + name = "%s" +} + +resource "aws_ecs_task_definition" "mongo" { + family = "%s" + + container_definitions = < 0 { var pc []*ecs.TaskDefinitionPlacementConstraint @@ -425,6 +449,7 @@ func resourceAwsEcsTaskDefinitionCreate(d *schema.ResourceData, meta interface{} func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading task definition %s", d.Id()) out, err := conn.DescribeTaskDefinition(&ecs.DescribeTaskDefinitionInput{ @@ -467,7 +492,7 @@ func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) d.Set("ipc_mode", taskDefinition.IpcMode) d.Set("pid_mode", taskDefinition.PidMode) - if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(out.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EcsKeyValueTags(out.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -475,6 +500,10 @@ func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error setting volume: %s", err) } + if err := d.Set("inference_accelerator", flattenEcsInferenceAccelerators(taskDefinition.InferenceAccelerators)); err != nil { + return fmt.Errorf("error setting inference accelerators: %s", err) + } + if err := d.Set("placement_constraints", flattenPlacementConstraints(taskDefinition.PlacementConstraints)); err != nil { log.Printf("[ERR] Error setting placement_constraints for (%s): %s", d.Id(), err) } @@ -560,5 +589,45 @@ func resourceAwsEcsTaskDefinitionVolumeHash(v interface{}) int { m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["host_path"].(string))) + + if v, ok := m["efs_volume_configuration"]; ok && len(v.([]interface{})) > 0 && v.([]interface{})[0] != nil { + m := v.([]interface{})[0].(map[string]interface{}) + + if v, ok := m["file_system_id"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + + if v, ok := m["root_directory"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + } + return hashcode.String(buf.String()) } + +func flattenEcsInferenceAccelerators(list []*ecs.InferenceAccelerator) []map[string]interface{} { + result := make([]map[string]interface{}, 0, len(list)) + for _, iAcc := range list { + l := map[string]interface{}{ + "device_name": *iAcc.DeviceName, + "device_type": *iAcc.DeviceType, + } + + result = append(result, l) + } + return result +} + +func expandEcsInferenceAccelerators(configured []interface{}) []*ecs.InferenceAccelerator { + iAccs := make([]*ecs.InferenceAccelerator, 0, len(configured)) + for _, lRaw := range configured { + data := lRaw.(map[string]interface{}) + l := &ecs.InferenceAccelerator{ + DeviceName: aws.String(data["device_name"].(string)), + DeviceType: aws.String(data["device_type"].(string)), + } + iAccs = append(iAccs, l) + } + + return iAccs +} diff --git a/aws/resource_aws_ecs_task_definition_test.go b/aws/resource_aws_ecs_task_definition_test.go index 867eb51550f..38a9c18829c 100644 --- a/aws/resource_aws_ecs_task_definition_test.go +++ b/aws/resource_aws_ecs_task_definition_test.go @@ -2,16 +2,69 @@ package aws import ( "fmt" + "log" "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_ecs_task_definition", &resource.Sweeper{ + Name: "aws_ecs_task_definition", + F: testSweepEcsTaskDefinitions, + Dependencies: []string{ + "aws_ecs_service", + }, + }) +} + +func testSweepEcsTaskDefinitions(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).ecsconn + var sweeperErrs *multierror.Error + + err = conn.ListTaskDefinitionsPages(&ecs.ListTaskDefinitionsInput{}, func(page *ecs.ListTaskDefinitionsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, taskDefinitionArn := range page.TaskDefinitionArns { + arn := aws.StringValue(taskDefinitionArn) + + log.Printf("[INFO] Deleting ECS Task Definition: %s", arn) + _, err := conn.DeregisterTaskDefinition(&ecs.DeregisterTaskDefinitionInput{ + TaskDefinition: aws.String(arn), + }) + if err != nil { + sweeperErr := fmt.Errorf("error deleting ECS Task Definition (%s): %w", arn, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping ECS Task Definitions sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving ECS Task Definitions: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSEcsTaskDefinition_basic(t *testing.T) { var def ecs.TaskDefinition @@ -82,25 +135,16 @@ func TestAccAWSEcsTaskDefinition_withDockerVolume(t *testing.T) { resourceName := "aws_ecs_task_definition.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEcsTaskDefinitionWithDockerVolumes(tdName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsTaskDefinitionExists(resourceName, &def), resource.TestCheckResourceAttr(resourceName, "volume.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.scope", "shared"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.autoprovision", "true"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.driver", "local"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.driver_opts.%", "2"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.driver_opts.uid", "1000"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.driver_opts.device", "tmpfs"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.labels.%", "2"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.labels.stack", "april"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.labels.environment", "test"), ), }, { @@ -120,18 +164,16 @@ func TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig(t *testing.T) { resourceName := "aws_ecs_task_definition.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEcsTaskDefinitionWithDockerVolumesMinimalConfig(tdName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsTaskDefinitionExists(resourceName, &def), resource.TestCheckResourceAttr(resourceName, "volume.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.scope", "task"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.driver", "local"), ), }, { @@ -149,20 +191,18 @@ func TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal(t *testing.T) { tdName := acctest.RandomWithPrefix("tf-acc-td-with-efs-volume-min") resourceName := "aws_ecs_task_definition.test" - efsResourceName := "aws_efs_file_system.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEcsTaskDefinitionWithEFSVolumeMinimal(tdName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsTaskDefinitionExists(resourceName, &def), resource.TestCheckResourceAttr(resourceName, "volume.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.efs_volume_configuration.#", "1"), - resource.TestCheckResourceAttrPair(resourceName, "volume.584193650.efs_volume_configuration.0.file_system_id", efsResourceName, "id"), ), }, { @@ -180,21 +220,18 @@ func TestAccAWSEcsTaskDefinition_withEFSVolume(t *testing.T) { tdName := acctest.RandomWithPrefix("tf-acc-td-with-efs-volume") resourceName := "aws_ecs_task_definition.test" - efsResourceName := "aws_efs_file_system.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEcsTaskDefinitionWithEFSVolume(tdName, "/home/test"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsTaskDefinitionExists(resourceName, &def), resource.TestCheckResourceAttr(resourceName, "volume.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.efs_volume_configuration.#", "1"), - resource.TestCheckResourceAttrPair(resourceName, "volume.584193650.efs_volume_configuration.0.file_system_id", efsResourceName, "id"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.efs_volume_configuration.0.root_directory", "/home/test"), ), }, { @@ -214,9 +251,10 @@ func TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume(t *testing.T) { resourceName := "aws_ecs_task_definition.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEcsTaskDefinitionWithTaskScopedDockerVolume(tdName), @@ -224,8 +262,6 @@ func TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume(t *testing.T) { testAccCheckAWSEcsTaskDefinitionExists(resourceName, &def), testAccCheckAWSTaskDefinitionDockerVolumeConfigurationAutoprovisionNil(&def), resource.TestCheckResourceAttr(resourceName, "volume.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.#", "1"), - resource.TestCheckResourceAttr(resourceName, "volume.584193650.docker_volume_configuration.0.scope", "task"), ), }, { @@ -679,6 +715,34 @@ func TestAccAWSEcsTaskDefinition_ProxyConfiguration(t *testing.T) { }) } +func TestAccAWSEcsTaskDefinition_inferenceAccelerator(t *testing.T) { + var def ecs.TaskDefinition + + tdName := acctest.RandomWithPrefix("tf-acc-td-basic") + resourceName := "aws_ecs_task_definition.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEcsTaskDefinitionConfigInferenceAccelerator(tdName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsTaskDefinitionExists(resourceName, &def), + resource.TestCheckResourceAttr(resourceName, "inference_accelerator.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSEcsTaskDefinitionImportStateIdFunc(resourceName), + ImportStateVerify: true, + }, + }, + }) +} + func testAccAWSEcsTaskDefinitionConfigProxyConfiguration(rName string, containerName string, proxyType string, ignoredUid string, ignoredGid string, appPorts string, proxyIngressPort string, proxyEgressPort string, egressIgnoredPorts string, egressIgnoredIPs string) string { @@ -1253,7 +1317,7 @@ TASK_DEFINITION func testAccAWSEcsTaskDefinitionWithScratchVolume(tdName string) string { return fmt.Sprintf(` resource "aws_ecs_task_definition" "test" { - family = "%s" + family = %[1]q container_definitions = < 0 { + return false + } + return true +} + +func expandEfsAccessPointPosixUser(pUser []interface{}) *efs.PosixUser { + if len(pUser) < 1 || pUser[0] == nil { + return nil + } + + m := pUser[0].(map[string]interface{}) + + posixUser := &efs.PosixUser{ + Gid: aws.Int64(int64(m["gid"].(int))), + Uid: aws.Int64(int64(m["uid"].(int))), + } + + if v, ok := m["secondary_gids"].(*schema.Set); ok && len(v.List()) > 0 { + posixUser.SecondaryGids = expandInt64Set(v) + } + + return posixUser +} + +func expandEfsAccessPointRootDirectory(rDir []interface{}) *efs.RootDirectory { + if len(rDir) < 1 || rDir[0] == nil { + return nil + } + + m := rDir[0].(map[string]interface{}) + + rootDir := &efs.RootDirectory{} + + if v, ok := m["path"]; ok { + rootDir.Path = aws.String(v.(string)) + } + + if v, ok := m["creation_info"]; ok { + rootDir.CreationInfo = expandEfsAccessPointRootDirectoryCreationInfo(v.([]interface{})) + } + + return rootDir +} + +func expandEfsAccessPointRootDirectoryCreationInfo(cInfo []interface{}) *efs.CreationInfo { + if len(cInfo) < 1 || cInfo[0] == nil { + return nil + } + + m := cInfo[0].(map[string]interface{}) + + creationInfo := &efs.CreationInfo{ + OwnerGid: aws.Int64(int64(m["owner_gid"].(int))), + OwnerUid: aws.Int64(int64(m["owner_uid"].(int))), + Permissions: aws.String(m["permissions"].(string)), + } + + return creationInfo +} + +func flattenEfsAccessPointPosixUser(posixUser *efs.PosixUser) []interface{} { + if posixUser == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "gid": aws.Int64Value(posixUser.Gid), + "uid": aws.Int64Value(posixUser.Uid), + "secondary_gids": aws.Int64ValueSlice(posixUser.SecondaryGids), + } + + return []interface{}{m} +} + +func flattenEfsAccessPointRootDirectory(rDir *efs.RootDirectory) []interface{} { + if rDir == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "path": aws.StringValue(rDir.Path), + "creation_info": flattenEfsAccessPointRootDirectoryCreationInfo(rDir.CreationInfo), + } + + return []interface{}{m} +} + +func flattenEfsAccessPointRootDirectoryCreationInfo(cInfo *efs.CreationInfo) []interface{} { + if cInfo == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "owner_gid": aws.Int64Value(cInfo.OwnerGid), + "owner_uid": aws.Int64Value(cInfo.OwnerUid), + "permissions": aws.StringValue(cInfo.Permissions), + } + + return []interface{}{m} +} diff --git a/aws/resource_aws_efs_access_point_test.go b/aws/resource_aws_efs_access_point_test.go new file mode 100644 index 00000000000..665fa6eb05b --- /dev/null +++ b/aws/resource_aws_efs_access_point_test.go @@ -0,0 +1,476 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/efs" + + multierror "github.com/hashicorp/go-multierror" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func init() { + resource.AddTestSweepers("aws_efs_access_point", &resource.Sweeper{ + Name: "aws_efs_access_point", + F: testSweepEfsAccessPoints, + }) +} + +func testSweepEfsAccessPoints(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).efsconn + + var errors error + input := &efs.DescribeFileSystemsInput{} + err = conn.DescribeFileSystemsPages(input, func(page *efs.DescribeFileSystemsOutput, lastPage bool) bool { + for _, filesystem := range page.FileSystems { + id := aws.StringValue(filesystem.FileSystemId) + log.Printf("[INFO] Deleting access points for EFS File System: %s", id) + + var errors error + input := &efs.DescribeAccessPointsInput{ + FileSystemId: filesystem.FileSystemId, + } + for { + out, err := conn.DescribeAccessPoints(input) + if err != nil { + errors = multierror.Append(errors, fmt.Errorf("error retrieving EFS access points on File System %q: %w", id, err)) + break + } + + if out == nil || len(out.AccessPoints) == 0 { + log.Printf("[INFO] No EFS access points to sweep on File System %q", id) + break + } + + for _, AccessPoint := range out.AccessPoints { + id := aws.StringValue(AccessPoint.AccessPointId) + + log.Printf("[INFO] Deleting EFS access point: %s", id) + _, err := conn.DeleteAccessPoint(&efs.DeleteAccessPointInput{ + AccessPointId: AccessPoint.AccessPointId, + }) + if err != nil { + errors = multierror.Append(errors, fmt.Errorf("error deleting EFS access point %q: %w", id, err)) + continue + } + + err = waitForDeleteEfsAccessPoint(conn, id, 10*time.Minute) + if err != nil { + errors = multierror.Append(errors, fmt.Errorf("error waiting for EFS access point %q to delete: %w", id, err)) + continue + } + } + + if out.NextToken == nil { + break + } + input.NextToken = out.NextToken + } + } + return true + }) + if err != nil { + errors = multierror.Append(errors, fmt.Errorf("error retrieving EFS File Systems: %w", err)) + } + + return errors +} + +func TestAccAWSEFSAccessPoint_basic(t *testing.T) { + var ap efs.AccessPointDescription + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_efs_access_point.test" + fsResourceName := "aws_efs_file_system.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttrPair(resourceName, "file_system_arn", fsResourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "file_system_id", fsResourceName, "id"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticfilesystem", regexp.MustCompile(`access-point/fsap-.+`)), + resource.TestCheckResourceAttrSet(resourceName, "owner_id"), + resource.TestCheckResourceAttr(resourceName, "tags.#", "0"), + resource.TestCheckResourceAttr(resourceName, "posix_user.#", "0"), + resource.TestCheckResourceAttr(resourceName, "root_directory.#", "1"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.path", "/"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEFSAccessPoint_root_directory(t *testing.T) { + var ap efs.AccessPointDescription + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_efs_access_point.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfigRootDirectory(rName, "/home/test"), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "root_directory.#", "1"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.path", "/home/test"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.creation_info.#", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEFSAccessPoint_root_directory_creation_info(t *testing.T) { + var ap efs.AccessPointDescription + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_efs_access_point.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfigRootDirectoryCreationInfo(rName, "/home/test"), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "root_directory.#", "1"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.path", "/home/test"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.creation_info.#", "1"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.creation_info.0.owner_gid", "1001"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.creation_info.0.owner_uid", "1001"), + resource.TestCheckResourceAttr(resourceName, "root_directory.0.creation_info.0.permissions", "755"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEFSAccessPoint_posix_user(t *testing.T) { + var ap efs.AccessPointDescription + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_efs_access_point.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfigPosixUser(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "posix_user.#", "1"), + resource.TestCheckResourceAttr(resourceName, "posix_user.0.gid", "1001"), + resource.TestCheckResourceAttr(resourceName, "posix_user.0.uid", "1001"), + resource.TestCheckResourceAttr(resourceName, "posix_user.0.secondary_gids.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEFSAccessPoint_posix_user_secondary_gids(t *testing.T) { + var ap efs.AccessPointDescription + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_efs_access_point.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfigPosixUserSecondaryGids(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "posix_user.#", "1"), + resource.TestCheckResourceAttr(resourceName, "posix_user.0.gid", "1001"), + resource.TestCheckResourceAttr(resourceName, "posix_user.0.uid", "1001"), + resource.TestCheckResourceAttr(resourceName, "posix_user.0.secondary_gids.#", "1")), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEFSAccessPoint_tags(t *testing.T) { + var ap efs.AccessPointDescription + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_efs_access_point.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSEFSAccessPointConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSEFSAccessPointConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func TestAccAWSEFSAccessPoint_disappears(t *testing.T) { + var ap efs.AccessPointDescription + resourceName := "aws_efs_access_point.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsAccessPointDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSAccessPointConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsAccessPointExists(resourceName, &ap), + testAccCheckResourceDisappears(testAccProvider, resourceAwsEfsAccessPoint(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckEfsAccessPointDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).efsconn + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_efs_access_point" { + continue + } + + resp, err := conn.DescribeAccessPoints(&efs.DescribeAccessPointsInput{ + AccessPointId: aws.String(rs.Primary.ID), + }) + if err != nil { + if isAWSErr(err, efs.ErrCodeAccessPointNotFound, "") { + continue + } + return fmt.Errorf("Error describing EFS access point in tests: %s", err) + } + if len(resp.AccessPoints) > 0 { + return fmt.Errorf("EFS access point %q still exists", rs.Primary.ID) + } + } + + return nil +} + +func testAccCheckEfsAccessPointExists(resourceID string, mount *efs.AccessPointDescription) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceID] + if !ok { + return fmt.Errorf("Not found: %s", resourceID) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + fs, ok := s.RootModule().Resources[resourceID] + if !ok { + return fmt.Errorf("Not found: %s", resourceID) + } + + conn := testAccProvider.Meta().(*AWSClient).efsconn + mt, err := conn.DescribeAccessPoints(&efs.DescribeAccessPointsInput{ + AccessPointId: aws.String(fs.Primary.ID), + }) + if err != nil { + return err + } + + if *mt.AccessPoints[0].AccessPointId != fs.Primary.ID { + return fmt.Errorf("access point ID mismatch: %q != %q", + *mt.AccessPoints[0].AccessPointId, fs.Primary.ID) + } + + *mount = *mt.AccessPoints[0] + + return nil + } +} + +func testAccAWSEFSAccessPointConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = "%s" +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" +} +`, rName) +} + +func testAccAWSEFSAccessPointConfigRootDirectory(rName, dir string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = %[1]q +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + root_directory { + path = %[2]q + } +} +`, rName, dir) +} + +func testAccAWSEFSAccessPointConfigRootDirectoryCreationInfo(rName, dir string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = %[1]q +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + root_directory { + path = %[2]q + creation_info { + owner_gid = 1001 + owner_uid = 1001 + permissions = "755" + } + } +} +`, rName, dir) +} + +func testAccAWSEFSAccessPointConfigPosixUser(rName string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = "%s" +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + posix_user { + gid = 1001 + uid = 1001 + } +} +`, rName) +} + +func testAccAWSEFSAccessPointConfigPosixUserSecondaryGids(rName string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = "%s" +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + posix_user { + gid = 1001 + uid = 1001 + secondary_gids = [1002] + } +} +`, rName) +} + +func testAccAWSEFSAccessPointConfigTags1(rName, tagKey1, tagValue1 string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = %[1]q +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + + tags = { + %[2]q = %[3]q + } +} +`, rName, tagKey1, tagValue1) +} + +func testAccAWSEFSAccessPointConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = %[1]q +} + +resource "aws_efs_access_point" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, rName, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_efs_file_system.go b/aws/resource_aws_efs_file_system.go index 54e9e8b3130..edb5027f5ef 100644 --- a/aws/resource_aws_efs_file_system.go +++ b/aws/resource_aws_efs_file_system.go @@ -103,7 +103,7 @@ func resourceAwsEfsFileSystem() *schema.Resource { Schema: map[string]*schema.Schema{ "transition_to_ia": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validation.StringInSlice([]string{ efs.TransitionToIARulesAfter7Days, efs.TransitionToIARulesAfter14Days, @@ -187,7 +187,7 @@ func resourceAwsEfsFileSystemCreate(d *schema.ResourceData, meta interface{}) er if hasLifecyclePolicy { _, err := conn.PutLifecycleConfiguration(&efs.PutLifecycleConfigurationInput{ FileSystemId: aws.String(d.Id()), - LifecyclePolicies: resourceAwsEfsFileSystemLifecyclePolicy(d.Get("lifecycle_policy").([]interface{})), + LifecyclePolicies: expandEfsFileSystemLifecyclePolicies(d.Get("lifecycle_policy").([]interface{})), }) if err != nil { return fmt.Errorf("Error creating lifecycle policy for EFS file system %q: %s", @@ -234,10 +234,19 @@ func resourceAwsEfsFileSystemUpdate(d *schema.ResourceData, meta interface{}) er } if d.HasChange("lifecycle_policy") { - _, err := conn.PutLifecycleConfiguration(&efs.PutLifecycleConfigurationInput{ + input := &efs.PutLifecycleConfigurationInput{ FileSystemId: aws.String(d.Id()), - LifecyclePolicies: resourceAwsEfsFileSystemLifecyclePolicy(d.Get("lifecycle_policy").([]interface{})), - }) + LifecyclePolicies: expandEfsFileSystemLifecyclePolicies(d.Get("lifecycle_policy").([]interface{})), + } + + // Prevent the following error during removal: + // InvalidParameter: 1 validation error(s) found. + // - missing required field, PutLifecycleConfigurationInput.LifecyclePolicies. + if input.LifecyclePolicies == nil { + input.LifecyclePolicies = []*efs.LifecyclePolicy{} + } + + _, err := conn.PutLifecycleConfiguration(input) if err != nil { return fmt.Errorf("Error updating lifecycle policy for EFS file system %q: %s", d.Id(), err.Error()) @@ -257,6 +266,7 @@ func resourceAwsEfsFileSystemUpdate(d *schema.ResourceData, meta interface{}) er func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).efsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeFileSystems(&efs.DescribeFileSystemsInput{ FileSystemId: aws.String(d.Id()), @@ -303,7 +313,7 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro d.Set("provisioned_throughput_in_mibps", fs.ProvisionedThroughputInMibps) d.Set("throughput_mode", fs.ThroughputMode) - if err := d.Set("tags", keyvaluetags.EfsKeyValueTags(fs.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EfsKeyValueTags(fs.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -316,8 +326,9 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("Error describing lifecycle configuration for EFS file system (%s): %s", aws.StringValue(fs.FileSystemId), err) } - if err := resourceAwsEfsFileSystemSetLifecyclePolicy(d, res.LifecyclePolicies); err != nil { - return err + + if err := d.Set("lifecycle_policy", flattenEfsFileSystemLifecyclePolicies(res.LifecyclePolicies)); err != nil { + return fmt.Errorf("error setting lifecycle_policy: %s", err) } return nil @@ -402,36 +413,44 @@ func resourceEfsFileSystemCreateUpdateRefreshFunc(id string, conn *efs.EFS) reso } } -func resourceAwsEfsFileSystemSetLifecyclePolicy(d *schema.ResourceData, lp []*efs.LifecyclePolicy) error { - log.Printf("[DEBUG] lifecycle pols: %s %d", lp, len(lp)) - if len(lp) == 0 { - d.Set("lifecycle_policy", nil) - return nil - } - newLP := make([]*map[string]interface{}, len(lp)) - - for i := 0; i < len(lp); i++ { - config := lp[i] - data := make(map[string]interface{}) - newLP[i] = &data - if config.TransitionToIA != nil { - data["transition_to_ia"] = *config.TransitionToIA +func flattenEfsFileSystemLifecyclePolicies(apiObjects []*efs.LifecyclePolicy) []interface{} { + var tfList []interface{} + + for _, apiObject := range apiObjects { + if apiObject == nil { + continue } - log.Printf("[DEBUG] lp: %s", data) - } - if err := d.Set("lifecycle_policy", newLP); err != nil { - return fmt.Errorf("error setting lifecycle_policy: %s", err) + tfMap := make(map[string]interface{}) + + if apiObject.TransitionToIA != nil { + tfMap["transition_to_ia"] = aws.StringValue(apiObject.TransitionToIA) + } + + tfList = append(tfList, tfMap) } - return nil + + return tfList } -func resourceAwsEfsFileSystemLifecyclePolicy(lcPol []interface{}) []*efs.LifecyclePolicy { - result := make([]*efs.LifecyclePolicy, len(lcPol)) +func expandEfsFileSystemLifecyclePolicies(tfList []interface{}) []*efs.LifecyclePolicy { + var apiObjects []*efs.LifecyclePolicy + + for _, tfMapRaw := range tfList { + tfMap, ok := tfMapRaw.(map[string]interface{}) - for i := 0; i < len(lcPol); i++ { - lp := lcPol[i].(map[string]interface{}) - result[i] = &efs.LifecyclePolicy{TransitionToIA: aws.String(lp["transition_to_ia"].(string))} + if !ok { + continue + } + + apiObject := &efs.LifecyclePolicy{} + + if v, ok := tfMap["transition_to_ia"].(string); ok && v != "" { + apiObject.TransitionToIA = aws.String(v) + } + + apiObjects = append(apiObjects, apiObject) } - return result + + return apiObjects } diff --git a/aws/resource_aws_efs_file_system_policy.go b/aws/resource_aws_efs_file_system_policy.go new file mode 100644 index 00000000000..5bb677ea172 --- /dev/null +++ b/aws/resource_aws_efs_file_system_policy.go @@ -0,0 +1,100 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/efs" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" +) + +func resourceAwsEfsFileSystemPolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEfsFileSystemPolicyPut, + Read: resourceAwsEfsFileSystemPolicyRead, + Update: resourceAwsEfsFileSystemPolicyPut, + Delete: resourceAwsEfsFileSystemPolicyDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "file_system_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "policy": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringIsJSON, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + }, + }, + } +} + +func resourceAwsEfsFileSystemPolicyPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).efsconn + + fsId := d.Get("file_system_id").(string) + input := &efs.PutFileSystemPolicyInput{ + FileSystemId: aws.String(fsId), + Policy: aws.String(d.Get("policy").(string)), + } + log.Printf("[DEBUG] Adding EFS File System Policy: %#v", input) + _, err := conn.PutFileSystemPolicy(input) + if err != nil { + return fmt.Errorf("error creating EFS File System Policy %q: %s", d.Id(), err.Error()) + } + + d.SetId(fsId) + + return resourceAwsEfsFileSystemPolicyRead(d, meta) +} + +func resourceAwsEfsFileSystemPolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).efsconn + + var policyRes *efs.DescribeFileSystemPolicyOutput + policyRes, err := conn.DescribeFileSystemPolicy(&efs.DescribeFileSystemPolicyInput{ + FileSystemId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, efs.ErrCodeFileSystemNotFound, "") { + log.Printf("[WARN] EFS File System (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if isAWSErr(err, efs.ErrCodePolicyNotFound, "") { + log.Printf("[WARN] EFS File System Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error describing policy for EFS file system (%s): %s", d.Id(), err) + } + + d.Set("file_system_id", policyRes.FileSystemId) + d.Set("policy", policyRes.Policy) + + return nil +} + +func resourceAwsEfsFileSystemPolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).efsconn + + log.Printf("[DEBUG] Deleting EFS File System Policy: %s", d.Id()) + _, err := conn.DeleteFileSystemPolicy(&efs.DeleteFileSystemPolicyInput{ + FileSystemId: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("error deleting EFS File System Policy: %s with err %s", d.Id(), err.Error()) + } + + log.Printf("[DEBUG] EFS File System Policy %q deleted.", d.Id()) + + return nil +} diff --git a/aws/resource_aws_efs_file_system_policy_test.go b/aws/resource_aws_efs_file_system_policy_test.go new file mode 100644 index 00000000000..442f12b7fa9 --- /dev/null +++ b/aws/resource_aws_efs_file_system_policy_test.go @@ -0,0 +1,191 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/efs" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAWSEFSFileSystemPolicy_basic(t *testing.T) { + var desc efs.DescribeFileSystemPolicyOutput + resourceName := "aws_efs_file_system_policy.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsFileSystemDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSFileSystemPolicyConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsFileSystemPolicy(resourceName, &desc), + resource.TestCheckResourceAttrSet(resourceName, "policy"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSEFSFileSystemPolicyConfigUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsFileSystemPolicy(resourceName, &desc), + resource.TestCheckResourceAttrSet(resourceName, "policy"), + ), + }, + }, + }) +} + +func TestAccAWSEFSFileSystemPolicy_disappears(t *testing.T) { + var desc efs.DescribeFileSystemPolicyOutput + resourceName := "aws_efs_file_system_policy.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckEfsFileSystemPolicyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEFSFileSystemPolicyConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckEfsFileSystemPolicy(resourceName, &desc), + testAccCheckResourceDisappears(testAccProvider, resourceAwsEfsFileSystemPolicy(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckEfsFileSystemPolicyDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).efsconn + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_efs_file_system_policy" { + continue + } + + resp, err := conn.DescribeFileSystemPolicy(&efs.DescribeFileSystemPolicyInput{ + FileSystemId: aws.String(rs.Primary.ID), + }) + if err != nil { + if isAWSErr(err, efs.ErrCodeFileSystemNotFound, "") || + isAWSErr(err, efs.ErrCodePolicyNotFound, "") { + return nil + } + return fmt.Errorf("error describing EFS file system policy in tests: %s", err) + } + if resp != nil { + return fmt.Errorf("EFS file system policy %q still exists", rs.Primary.ID) + } + } + + return nil +} + +func testAccCheckEfsFileSystemPolicy(resourceID string, efsFsPolicy *efs.DescribeFileSystemPolicyOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceID] + if !ok { + return fmt.Errorf("Not found: %s", resourceID) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).efsconn + fs, err := conn.DescribeFileSystemPolicy(&efs.DescribeFileSystemPolicyInput{ + FileSystemId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + *efsFsPolicy = *fs + + return nil + } +} + +func testAccAWSEFSFileSystemPolicyConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_efs_file_system" "test" { + creation_token = %q +} + +resource "aws_efs_file_system_policy" "test" { + file_system_id = "${aws_efs_file_system.test.id}" + + policy = < 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding tags: %s", err) + } + } + return resourceAwsEgressOnlyInternetGatewayRead(d, meta) } func resourceAwsEgressOnlyInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig var req = &ec2.DescribeEgressOnlyInternetGatewaysInput{ EgressOnlyInternetGatewayIds: []*string{aws.String(d.Id())}, @@ -85,6 +95,10 @@ func resourceAwsEgressOnlyInternetGatewayRead(d *schema.ResourceData, meta inter d.Set("vpc_id", igw.Attachments[0].VpcId) } + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(igw.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + return nil } @@ -99,6 +113,20 @@ func getEc2EgressOnlyInternetGateway(id string, resp *ec2.DescribeEgressOnlyInte return nil } +func resourceAwsEgressOnlyInternetGatewayUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating Egress Only Internet Gateway (%s) tags: %s", d.Id(), err) + } + } + + return resourceAwsEgressOnlyInternetGatewayRead(d, meta) +} + func resourceAwsEgressOnlyInternetGatewayDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn diff --git a/aws/resource_aws_egress_only_internet_gateway_test.go b/aws/resource_aws_egress_only_internet_gateway_test.go index 49ebe1cc81c..68c9637b002 100644 --- a/aws/resource_aws_egress_only_internet_gateway_test.go +++ b/aws/resource_aws_egress_only_internet_gateway_test.go @@ -85,6 +85,50 @@ func TestAccAWSEgressOnlyInternetGateway_basic(t *testing.T) { }) } +func TestAccAWSEgressOnlyInternetGateway_Tags(t *testing.T) { + var v ec2.EgressOnlyInternetGateway + resourceName := "aws_egress_only_internet_gateway.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEgressOnlyInternetGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEgressOnlyInternetGatewayConfigTags1("key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEgressOnlyInternetGatewayExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSEgressOnlyInternetGatewayConfigTags2("key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEgressOnlyInternetGatewayExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSEgressOnlyInternetGatewayConfigTags1("key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEgressOnlyInternetGatewayExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + func testAccCheckAWSEgressOnlyInternetGatewayDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -152,3 +196,44 @@ resource "aws_egress_only_internet_gateway" "test" { vpc_id = "${aws_vpc.test.id}" } ` + +func testAccAWSEgressOnlyInternetGatewayConfigTags1(tagKey1, tagValue1 string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-egress-only-igw-tags" + } +} + +resource "aws_egress_only_internet_gateway" "test" { + vpc_id = aws_vpc.test.id + + tags = { + %[1]q = %[2]q + } +} +`, tagKey1, tagValue1) +} + +func testAccAWSEgressOnlyInternetGatewayConfigTags2(tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-egress-only-igw-tags" + } +} + +resource "aws_egress_only_internet_gateway" "test" { + vpc_id = aws_vpc.test.id + + tags = { + %[1]q = %[2]q + %[3]q = %[4]q + } +} +`, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_eip.go b/aws/resource_aws_eip.go index 3efe2d4fe94..d639fd393ae 100644 --- a/aws/resource_aws_eip.go +++ b/aws/resource_aws_eip.go @@ -91,6 +91,16 @@ func resourceAwsEip() *schema.Resource { Optional: true, }, + "customer_owned_ipv4_pool": { + Type: schema.TypeString, + Optional: true, + }, + + "customer_owned_ip": { + Type: schema.TypeString, + Computed: true, + }, + "public_ipv4_pool": { Type: schema.TypeString, Optional: true, @@ -120,6 +130,10 @@ func resourceAwsEipCreate(d *schema.ResourceData, meta interface{}) error { allocOpts.PublicIpv4Pool = aws.String(v.(string)) } + if v, ok := d.GetOk("customer_owned_ipv4_pool"); ok { + allocOpts.CustomerOwnedIpv4Pool = aws.String(v.(string)) + } + log.Printf("[DEBUG] EIP create configuration: %#v", allocOpts) allocResp, err := ec2conn.AllocateAddress(allocOpts) if err != nil { @@ -143,7 +157,7 @@ func resourceAwsEipCreate(d *schema.ResourceData, meta interface{}) error { log.Printf("[INFO] EIP ID: %s (domain: %v)", d.Id(), *allocResp.Domain) if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(ec2conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(ec2conn, d.Id(), v); err != nil { return fmt.Errorf("error adding tags: %s", err) } } @@ -153,6 +167,7 @@ func resourceAwsEipCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { ec2conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig domain := resourceAwsEipDomain(d) id := d.Id() @@ -257,6 +272,8 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { } } d.Set("public_ipv4_pool", address.PublicIpv4Pool) + d.Set("customer_owned_ipv4_pool", address.CustomerOwnedIpv4Pool) + d.Set("customer_owned_ip", address.CustomerOwnedIp) // On import (domain never set, which it must've been if we created), // set the 'vpc' attribute depending on if we're in a VPC. @@ -273,7 +290,7 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { d.SetId(*address.AllocationId) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(address.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(address.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -358,7 +375,7 @@ func resourceAwsEipUpdate(d *schema.ResourceData, meta interface{}) error { } } - if d.HasChange("tags") { + if d.HasChange("tags") && !d.IsNewResource() { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(ec2conn, d.Id(), o, n); err != nil { return fmt.Errorf("error updating EIP (%s) tags: %s", d.Id(), err) diff --git a/aws/resource_aws_eip_association_test.go b/aws/resource_aws_eip_association_test.go index ae6a795d6aa..97558a60066 100644 --- a/aws/resource_aws_eip_association_test.go +++ b/aws/resource_aws_eip_association_test.go @@ -123,7 +123,7 @@ func TestAccAWSEIPAssociation_ec2Classic(t *testing.T) { testAccCheckAWSEIPAssociationExists(resourceName, &a), resource.TestCheckResourceAttrSet(resourceName, "public_ip"), resource.TestCheckResourceAttr(resourceName, "allocation_id", ""), - testAccCheckAWSEIPAssociationHasIpBasedId(resourceName, &a), + testAccCheckAWSEIPAssociationHasIpBasedId(resourceName), ), }, { @@ -230,7 +230,7 @@ func testAccCheckAWSEIPAssociationExists(name string, res *ec2.Address) resource } } -func testAccCheckAWSEIPAssociationHasIpBasedId(name string, res *ec2.Address) resource.TestCheckFunc { +func testAccCheckAWSEIPAssociationHasIpBasedId(name string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[name] if !ok { @@ -283,7 +283,12 @@ func testAccCheckAWSEIPAssociationDestroy(s *terraform.State) error { const testAccAWSEIPAssociationConfig = ` data "aws_availability_zones" "available" { - state = "available" + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -353,7 +358,12 @@ resource "aws_network_interface" "test" { const testAccAWSEIPAssociationConfigDisappears = ` data "aws_availability_zones" "available" { - state = "available" + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_ami" "amzn-ami-minimal-pv" { @@ -405,7 +415,12 @@ provider "aws" { resource "aws_eip" "test" {} data "aws_availability_zones" "available" { - state = "available" + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_ami" "ubuntu" { diff --git a/aws/resource_aws_eip_test.go b/aws/resource_aws_eip_test.go index 3cd06a1090c..dadb43ffc0c 100644 --- a/aws/resource_aws_eip_test.go +++ b/aws/resource_aws_eip_test.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "os" + "regexp" "strings" "testing" @@ -521,6 +522,51 @@ func testAccCheckAWSEIPDestroy(s *terraform.State) error { return nil } +func TestAccAWSEIP_CustomerOwnedIpv4Pool(t *testing.T) { + // Hide Outposts testing behind consistent environment variable + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + // Local Gateway Route Table ID filtering in DescribeCoipPools is not currently working + poolId := os.Getenv("AWS_COIP_POOL_ID") + if poolId == "" { + t.Skip( + "Environment variable AWS_COIP_POOL_ID is not set. " + + "This environment variable must be set to the ID of " + + "a deployed Coip Pool to enable this test.") + } + + var conf ec2.Address + resourceName := "aws_eip.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEIPDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEIPConfigCustomerOwnedIpv4Pool(poolId), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEIPExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "customer_owned_ipv4_pool", poolId), + resource.TestMatchResourceAttr(resourceName, "customer_owned_ip", regexp.MustCompile(`\d+\.\d+\.\d+\.\d+`)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAWSEIPAttributes(conf *ec2.Address) resource.TestCheckFunc { return func(s *terraform.State) error { if *conf.PublicIp == "" { @@ -903,7 +949,12 @@ resource "aws_eip" "test" { const testAccAWSEIPNetworkInterfaceConfig = ` data "aws_availability_zones" "available" { - state = "available" + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -942,6 +993,11 @@ resource "aws_eip" "test" { const testAccAWSEIPMultiNetworkInterfaceConfig = ` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -1122,3 +1178,12 @@ resource "aws_eip" "test" { instance = "${aws_instance.test.id}" } ` + +func testAccAWSEIPConfigCustomerOwnedIpv4Pool(customerOwnedIpv4Pool string) string { + return fmt.Sprintf(` +resource "aws_eip" "test" { + customer_owned_ipv4_pool = %[1]q + vpc = true +} +`, customerOwnedIpv4Pool) +} diff --git a/aws/resource_aws_eks_cluster.go b/aws/resource_aws_eks_cluster.go index d9d71d4cbc6..f631489d408 100644 --- a/aws/resource_aws_eks_cluster.go +++ b/aws/resource_aws_eks_cluster.go @@ -282,6 +282,7 @@ func resourceAwsEksClusterCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).eksconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &eks.DescribeClusterInput{ Name: aws.String(d.Id()), @@ -328,7 +329,7 @@ func resourceAwsEksClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("role_arn", cluster.RoleArn) d.Set("status", cluster.Status) - if err := d.Set("tags", keyvaluetags.EksKeyValueTags(cluster.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EksKeyValueTags(cluster.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_eks_cluster_test.go b/aws/resource_aws_eks_cluster_test.go index 80c1e8d8e40..42784d56dc9 100644 --- a/aws/resource_aws_eks_cluster_test.go +++ b/aws/resource_aws_eks_cluster_test.go @@ -81,7 +81,7 @@ func TestAccAWSEksCluster_basic(t *testing.T) { Config: testAccAWSEksClusterConfig_Required(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEksClusterExists(resourceName, &cluster), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:eks:[^:]+:[^:]+:cluster/%s$", rName))), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "eks", regexp.MustCompile(fmt.Sprintf("cluster/%s$", rName))), resource.TestCheckResourceAttr(resourceName, "certificate_authority.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "certificate_authority.0.data"), resource.TestMatchResourceAttr(resourceName, "endpoint", regexp.MustCompile(`^https://`)), @@ -90,7 +90,7 @@ func TestAccAWSEksCluster_basic(t *testing.T) { resource.TestMatchResourceAttr(resourceName, "identity.0.oidc.0.issuer", regexp.MustCompile(`^https://`)), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestMatchResourceAttr(resourceName, "platform_version", regexp.MustCompile(`^eks\.\d+$`)), - resource.TestMatchResourceAttr(resourceName, "role_arn", regexp.MustCompile(fmt.Sprintf("%s$", rName))), + resource.TestCheckResourceAttrPair(resourceName, "role_arn", "aws_iam_role.test", "arn"), resource.TestCheckResourceAttr(resourceName, "status", eks.ClusterStatusActive), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), resource.TestMatchResourceAttr(resourceName, "version", regexp.MustCompile(`^\d+\.\d+$`)), @@ -183,9 +183,10 @@ func TestAccAWSEksCluster_Logging(t *testing.T) { resourceName := "aws_eks_cluster.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEksClusterDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEksClusterDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSEksClusterConfig_Logging(rName, []string{"api"}), @@ -518,7 +519,14 @@ func testAccPreCheckAWSEks(t *testing.T) { func testAccAWSEksClusterConfig_Base(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_iam_role" "test" { name = "%s" diff --git a/aws/resource_aws_eks_fargate_profile.go b/aws/resource_aws_eks_fargate_profile.go index 939dda3bc66..ef195e73cd1 100644 --- a/aws/resource_aws_eks_fargate_profile.go +++ b/aws/resource_aws_eks_fargate_profile.go @@ -152,6 +152,7 @@ func resourceAwsEksFargateProfileCreate(d *schema.ResourceData, meta interface{} func resourceAwsEksFargateProfileRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).eksconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig clusterName, fargateProfileName, err := resourceAwsEksFargateProfileParseId(d.Id()) if err != nil { @@ -198,7 +199,7 @@ func resourceAwsEksFargateProfileRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error setting subnets: %s", err) } - if err := d.Set("tags", keyvaluetags.EksKeyValueTags(fargateProfile.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EksKeyValueTags(fargateProfile.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_eks_fargate_profile_test.go b/aws/resource_aws_eks_fargate_profile_test.go index 50617362970..342cf3acb7d 100644 --- a/aws/resource_aws_eks_fargate_profile_test.go +++ b/aws/resource_aws_eks_fargate_profile_test.go @@ -348,6 +348,11 @@ func testAccAWSEksFargateProfileConfigBase(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_partition" "current" {} diff --git a/aws/resource_aws_eks_node_group.go b/aws/resource_aws_eks_node_group.go index 6b298f05184..3673139caf0 100644 --- a/aws/resource_aws_eks_node_group.go +++ b/aws/resource_aws_eks_node_group.go @@ -58,8 +58,12 @@ func resourceAwsEksNodeGroup() *schema.Resource { Computed: true, ForceNew: true, }, + "force_update_version": { + Type: schema.TypeBool, + Optional: true, + }, "instance_types": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Computed: true, ForceNew: true, @@ -201,8 +205,8 @@ func resourceAwsEksNodeGroupCreate(d *schema.ResourceData, meta interface{}) err input.DiskSize = aws.Int64(int64(v.(int))) } - if v := d.Get("instance_types").(*schema.Set); v.Len() > 0 { - input.InstanceTypes = expandStringSet(v) + if v := d.Get("instance_types").([]interface{}); len(v) > 0 { + input.InstanceTypes = expandStringList(v) } if v := d.Get("labels").(map[string]interface{}); len(v) > 0 { @@ -255,6 +259,7 @@ func resourceAwsEksNodeGroupCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsEksNodeGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).eksconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig clusterName, nodeGroupName, err := resourceAwsEksNodeGroupParseId(d.Id()) if err != nil { @@ -320,7 +325,7 @@ func resourceAwsEksNodeGroupRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error setting subnets: %s", err) } - if err := d.Set("tags", keyvaluetags.EksKeyValueTags(nodeGroup.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EksKeyValueTags(nodeGroup.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -373,11 +378,11 @@ func resourceAwsEksNodeGroupUpdate(d *schema.ResourceData, meta interface{}) err input := &eks.UpdateNodegroupVersionInput{ ClientRequestToken: aws.String(resource.UniqueId()), ClusterName: aws.String(clusterName), - Force: aws.Bool(false), + Force: aws.Bool(d.Get("force_update_version").(bool)), NodegroupName: aws.String(nodeGroupName), } - if v, ok := d.GetOk("release_version"); ok { + if v, ok := d.GetOk("release_version"); ok && d.HasChange("release_version") { input.ReleaseVersion = aws.String(v.(string)) } diff --git a/aws/resource_aws_eks_node_group_test.go b/aws/resource_aws_eks_node_group_test.go index 4c77c3d1805..265c88c09f1 100644 --- a/aws/resource_aws_eks_node_group_test.go +++ b/aws/resource_aws_eks_node_group_test.go @@ -198,6 +198,40 @@ func TestAccAWSEksNodeGroup_DiskSize(t *testing.T) { }) } +func TestAccAWSEksNodeGroup_ForceUpdateVersion(t *testing.T) { + var nodeGroup1 eks.Nodegroup + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_eks_node_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEksNodeGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEksNodeGroupConfigForceUpdateVersion(rName, "1.15"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksNodeGroupExists(resourceName, &nodeGroup1), + resource.TestCheckResourceAttr(resourceName, "version", "1.15"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_update_version"}, + }, + { + Config: testAccAWSEksNodeGroupConfigForceUpdateVersion(rName, "1.16"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksNodeGroupExists(resourceName, &nodeGroup1), + resource.TestCheckResourceAttr(resourceName, "version", "1.16"), + ), + }, + }, + }) +} + func TestAccAWSEksNodeGroup_InstanceTypes(t *testing.T) { var nodeGroup1 eks.Nodegroup rName := acctest.RandomWithPrefix("tf-acc-test") @@ -271,6 +305,7 @@ func TestAccAWSEksNodeGroup_Labels(t *testing.T) { func TestAccAWSEksNodeGroup_ReleaseVersion(t *testing.T) { var nodeGroup1 eks.Nodegroup rName := acctest.RandomWithPrefix("tf-acc-test") + ssmParameterDataSourceName := "data.aws_ssm_parameter.test" resourceName := "aws_eks_node_group.test" resource.ParallelTest(t, resource.TestCase{ @@ -279,10 +314,10 @@ func TestAccAWSEksNodeGroup_ReleaseVersion(t *testing.T) { CheckDestroy: testAccCheckAWSEksNodeGroupDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEksNodeGroupConfigReleaseVersion(rName, "1.14.8-20191213"), + Config: testAccAWSEksNodeGroupConfigReleaseVersion(rName, "1.15"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEksNodeGroupExists(resourceName, &nodeGroup1), - resource.TestCheckResourceAttr(resourceName, "release_version", "1.14.8-20191213"), + resource.TestCheckResourceAttrPair(resourceName, "release_version", ssmParameterDataSourceName, "value"), ), }, { @@ -290,6 +325,13 @@ func TestAccAWSEksNodeGroup_ReleaseVersion(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSEksNodeGroupConfigReleaseVersion(rName, "1.16"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksNodeGroupExists(resourceName, &nodeGroup1), + resource.TestCheckResourceAttrPair(resourceName, "release_version", ssmParameterDataSourceName, "value"), + ), + }, }, }) } @@ -520,10 +562,10 @@ func TestAccAWSEksNodeGroup_Version(t *testing.T) { CheckDestroy: testAccCheckAWSEksNodeGroupDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEksNodeGroupConfigVersion(rName, "1.14"), + Config: testAccAWSEksNodeGroupConfigVersion(rName, "1.15"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEksNodeGroupExists(resourceName, &nodeGroup1), - resource.TestCheckResourceAttr(resourceName, "version", "1.14"), + resource.TestCheckResourceAttr(resourceName, "version", "1.15"), ), }, { @@ -531,6 +573,13 @@ func TestAccAWSEksNodeGroup_Version(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSEksNodeGroupConfigVersion(rName, "1.16"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksNodeGroupExists(resourceName, &nodeGroup1), + resource.TestCheckResourceAttr(resourceName, "version", "1.16"), + ), + }, }, }) } @@ -637,10 +686,15 @@ func testAccCheckAWSEksNodeGroupDisappears(nodeGroup *eks.Nodegroup) resource.Te } } -func testAccAWSEksNodeGroupConfigBase(rName string) string { +func testAccAWSEksNodeGroupConfigBaseIamAndVpc(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_partition" "current" {} @@ -754,16 +808,23 @@ resource "aws_security_group" "test" { resource "aws_subnet" "test" { count = 2 - availability_zone = data.aws_availability_zones.available.names[count.index] - cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) - vpc_id = aws_vpc.test.id + availability_zone = data.aws_availability_zones.available.names[count.index] + cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index) + map_public_ip_on_launch = true + vpc_id = aws_vpc.test.id tags = { Name = "tf-acc-test-eks-node-group" "kubernetes.io/cluster/%[1]s" = "shared" } } +`, rName) +} +func testAccAWSEksNodeGroupConfigBase(rName string) string { + return composeConfig( + testAccAWSEksNodeGroupConfigBaseIamAndVpc(rName), + fmt.Sprintf(` resource "aws_eks_cluster" "test" { name = %[1]q role_arn = aws_iam_role.cluster.arn @@ -778,7 +839,29 @@ resource "aws_eks_cluster" "test" { "aws_main_route_table_association.test", ] } -`, rName) +`, rName)) +} + +func testAccAWSEksNodeGroupConfigBaseVersion(rName string, version string) string { + return composeConfig( + testAccAWSEksNodeGroupConfigBaseIamAndVpc(rName), + fmt.Sprintf(` +resource "aws_eks_cluster" "test" { + name = %[1]q + role_arn = aws_iam_role.cluster.arn + version = %[2]q + + vpc_config { + subnet_ids = aws_subnet.test[*].id + } + + depends_on = [ + "aws_iam_role_policy_attachment.cluster-AmazonEKSClusterPolicy", + "aws_iam_role_policy_attachment.cluster-AmazonEKSServicePolicy", + "aws_main_route_table_association.test", + ] +} +`, rName, version)) } func testAccAWSEksNodeGroupConfigNodeGroupName(rName string) string { @@ -852,6 +935,31 @@ resource "aws_eks_node_group" "test" { `, rName, diskSize) } +func testAccAWSEksNodeGroupConfigForceUpdateVersion(rName, version string) string { + return testAccAWSEksNodeGroupConfigBaseVersion(rName, version) + fmt.Sprintf(` +resource "aws_eks_node_group" "test" { + cluster_name = aws_eks_cluster.test.name + force_update_version = true + node_group_name = %[1]q + node_role_arn = aws_iam_role.node.arn + subnet_ids = aws_subnet.test[*].id + version = aws_eks_cluster.test.version + + scaling_config { + desired_size = 1 + max_size = 1 + min_size = 1 + } + + depends_on = [ + "aws_iam_role_policy_attachment.node-AmazonEKSWorkerNodePolicy", + "aws_iam_role_policy_attachment.node-AmazonEKS_CNI_Policy", + "aws_iam_role_policy_attachment.node-AmazonEC2ContainerRegistryReadOnly", + ] +} +`, rName) +} + func testAccAWSEksNodeGroupConfigInstanceTypes1(rName, instanceType1 string) string { return testAccAWSEksNodeGroupConfigBase(rName) + fmt.Sprintf(` resource "aws_eks_node_group" "test" { @@ -931,14 +1039,19 @@ resource "aws_eks_node_group" "test" { `, rName, labelKey1, labelValue1, labelKey2, labelValue2) } -func testAccAWSEksNodeGroupConfigReleaseVersion(rName, releaseVersion string) string { - return testAccAWSEksNodeGroupConfigBase(rName) + fmt.Sprintf(` +func testAccAWSEksNodeGroupConfigReleaseVersion(rName string, version string) string { + return testAccAWSEksNodeGroupConfigBaseVersion(rName, version) + fmt.Sprintf(` +data "aws_ssm_parameter" "test" { + name = "/aws/service/eks/optimized-ami/${aws_eks_cluster.test.version}/amazon-linux-2/recommended/release_version" +} + resource "aws_eks_node_group" "test" { cluster_name = aws_eks_cluster.test.name node_group_name = %[1]q node_role_arn = aws_iam_role.node.arn - release_version = %[2]q + release_version = data.aws_ssm_parameter.test.value subnet_ids = aws_subnet.test[*].id + version = aws_eks_cluster.test.version scaling_config { desired_size = 1 @@ -952,7 +1065,7 @@ resource "aws_eks_node_group" "test" { "aws_iam_role_policy_attachment.node-AmazonEC2ContainerRegistryReadOnly", ] } -`, rName, releaseVersion) +`, rName) } func testAccAWSEksNodeGroupConfigRemoteAccessEc2SshKey(rName string) string { @@ -1099,13 +1212,13 @@ resource "aws_eks_node_group" "test" { } func testAccAWSEksNodeGroupConfigVersion(rName, version string) string { - return testAccAWSEksNodeGroupConfigBase(rName) + fmt.Sprintf(` + return testAccAWSEksNodeGroupConfigBaseVersion(rName, version) + fmt.Sprintf(` resource "aws_eks_node_group" "test" { cluster_name = aws_eks_cluster.test.name node_group_name = %[1]q node_role_arn = aws_iam_role.node.arn subnet_ids = aws_subnet.test[*].id - version = %[2]q + version = aws_eks_cluster.test.version scaling_config { desired_size = 1 @@ -1119,5 +1232,5 @@ resource "aws_eks_node_group" "test" { "aws_iam_role_policy_attachment.node-AmazonEC2ContainerRegistryReadOnly", ] } -`, rName, version) +`, rName) } diff --git a/aws/resource_aws_elastic_beanstalk_application.go b/aws/resource_aws_elastic_beanstalk_application.go index a8566ab6582..6501ac55961 100644 --- a/aws/resource_aws_elastic_beanstalk_application.go +++ b/aws/resource_aws_elastic_beanstalk_application.go @@ -211,6 +211,7 @@ func resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkCo func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticbeanstalkconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig var app *elasticbeanstalk.ApplicationDescription err := resource.Retry(30*time.Second, func() *resource.RetryError { @@ -256,7 +257,7 @@ func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta int return fmt.Errorf("error listing tags for Elastic Beanstalk Application (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreElasticbeanstalk().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreElasticbeanstalk().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_elastic_beanstalk_application_test.go b/aws/resource_aws_elastic_beanstalk_application_test.go index 258adb0f2b0..a7485c58f39 100644 --- a/aws/resource_aws_elastic_beanstalk_application_test.go +++ b/aws/resource_aws_elastic_beanstalk_application_test.go @@ -6,14 +6,13 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elasticbeanstalk" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) -// initialize sweeper func init() { resource.AddTestSweepers("aws_elastic_beanstalk_application", &resource.Sweeper{ Name: "aws_elastic_beanstalk_application", @@ -35,7 +34,7 @@ func testSweepElasticBeanstalkApplications(region string) error { log.Printf("[WARN] Skipping Elastic Beanstalk Application sweep for %s: %s", region, err) return nil } - return fmt.Errorf("Error retrieving beanstalk application: %s", err) + return fmt.Errorf("error retrieving beanstalk application: %w", err) } if len(resp.Applications) == 0 { @@ -43,23 +42,24 @@ func testSweepElasticBeanstalkApplications(region string) error { return nil } + var errors error for _, bsa := range resp.Applications { + applicationName := aws.StringValue(bsa.ApplicationName) _, err := beanstalkconn.DeleteApplication( &elasticbeanstalk.DeleteApplicationInput{ ApplicationName: bsa.ApplicationName, }) if err != nil { - elasticbeanstalkerr, ok := err.(awserr.Error) - if ok && (elasticbeanstalkerr.Code() == "InvalidConfiguration.NotFound" || elasticbeanstalkerr.Code() == "ValidationError") { - log.Printf("[DEBUG] beanstalk application (%s) not found", *bsa.ApplicationName) - return nil + if isAWSErr(err, "InvalidConfiguration.NotFound", "") || isAWSErr(err, "ValidationError", "") { + log.Printf("[DEBUG] beanstalk application %q not found", applicationName) + continue } - return err + errors = multierror.Append(fmt.Errorf("error deleting Elastic Beanstalk Application %q: %w", applicationName, err)) } } - return nil + return errors } func TestAccAWSElasticBeanstalkApplication_basic(t *testing.T) { @@ -87,9 +87,10 @@ func TestAccAWSElasticBeanstalkApplication_basic(t *testing.T) { func testAccBeanstalkAppImportConfig(name string) string { return fmt.Sprintf(` resource "aws_elastic_beanstalk_application" "tftest" { - name = "%s" - description = "tf-test-desc" - }`, name) + name = "%s" + description = "tf-test-desc" +} +`, name) } func TestAccAWSBeanstalkApp_basic(t *testing.T) { @@ -243,16 +244,10 @@ func testAccCheckBeanstalkAppDestroy(s *terraform.State) error { if len(resp.Applications) > 0 { return fmt.Errorf("Elastic Beanstalk Application still exists.") } - return nil } - // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidBeanstalkAppID.NotFound" { + if !isAWSErr(err, "InvalidBeanstalkAppID.NotFound", "") { return err } } @@ -292,7 +287,7 @@ func testAccCheckBeanstalkAppExists(n string, app *elasticbeanstalk.ApplicationD func testAccBeanstalkAppConfig(rName string) string { return fmt.Sprintf(` resource "aws_elastic_beanstalk_application" "tftest" { - name = "%s" + name = "%s" description = "tf-test-desc" } `, rName) diff --git a/aws/resource_aws_elastic_beanstalk_application_version.go b/aws/resource_aws_elastic_beanstalk_application_version.go index c269e3e5716..4fc8c9afff9 100644 --- a/aws/resource_aws_elastic_beanstalk_application_version.go +++ b/aws/resource_aws_elastic_beanstalk_application_version.go @@ -94,6 +94,7 @@ func resourceAwsElasticBeanstalkApplicationVersionCreate(d *schema.ResourceData, func resourceAwsElasticBeanstalkApplicationVersionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticbeanstalkconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeApplicationVersions(&elasticbeanstalk.DescribeApplicationVersionsInput{ ApplicationName: aws.String(d.Get("application").(string)), @@ -124,7 +125,7 @@ func resourceAwsElasticBeanstalkApplicationVersionRead(d *schema.ResourceData, m return fmt.Errorf("error listing tags for Elastic Beanstalk Application version (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreElasticbeanstalk().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreElasticbeanstalk().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_elastic_beanstalk_configuration_template_test.go b/aws/resource_aws_elastic_beanstalk_configuration_template_test.go index 2cd57a18c96..e860944ca73 100644 --- a/aws/resource_aws_elastic_beanstalk_configuration_template_test.go +++ b/aws/resource_aws_elastic_beanstalk_configuration_template_test.go @@ -52,9 +52,10 @@ func TestAccAWSBeanstalkConfigurationTemplate_Setting(t *testing.T) { var config elasticbeanstalk.ConfigurationSettingsDescription resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckBeanstalkConfigurationTemplateDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckBeanstalkConfigurationTemplateDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccBeanstalkConfigurationTemplateConfig_Setting(acctest.RandString(5)), diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index 5814852c248..f78928942e6 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -237,7 +237,7 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i if cnamePrefix != "" { if tier != "WebServer" { - return fmt.Errorf("Cannot set cname_prefix for tier: %s.", tier) + return fmt.Errorf("cannot set cname_prefix for tier: %s", tier) } createOpts.CNAMEPrefix = aws.String(cnamePrefix) } @@ -296,21 +296,9 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i log.Printf("[WARN] Error parsing poll_interval, using default backoff") } - stateConf := &resource.StateChangeConf{ - Pending: []string{"Launching", "Updating"}, - Target: []string{"Ready"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() + err = waitForElasticBeanstalkEnvironmentReady(conn, d.Id(), waitForReadyTimeOut, pollInterval, t) if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become ready: %s", - d.Id(), err) + return fmt.Errorf("Error waiting for Elastic Beanstalk Environment (%s) to become ready: %w", d.Id(), err) } envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) @@ -327,12 +315,12 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticbeanstalkconn - envId := d.Id() + envID := d.Id() var hasChange bool updateOpts := elasticbeanstalk.UpdateEnvironmentInput{ - EnvironmentId: aws.String(envId), + EnvironmentId: aws.String(envID), } if d.HasChange("description") { @@ -450,17 +438,7 @@ func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta i log.Printf("[WARN] Error parsing poll_interval, using default backoff") } - stateConf := &resource.StateChangeConf{ - Pending: []string{"Launching", "Updating"}, - Target: []string{"Ready"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() + err = waitForElasticBeanstalkEnvironmentReady(conn, d.Id(), waitForReadyTimeOut, pollInterval, t) if err != nil { return fmt.Errorf( "Error waiting for Elastic Beanstalk Environment (%s) to become ready: %s", @@ -496,21 +474,9 @@ func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta i log.Printf("[WARN] Error parsing poll_interval, using default backoff") } - stateConf := &resource.StateChangeConf{ - Pending: []string{"Launching", "Updating"}, - Target: []string{"Ready"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() + err = waitForElasticBeanstalkEnvironmentReady(conn, d.Id(), waitForReadyTimeOut, pollInterval, t) if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become ready: %s", - d.Id(), err) + return fmt.Errorf("error waiting for Elastic Beanstalk Environment %q to become ready: %w", d.Id(), err) } envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) @@ -527,13 +493,14 @@ func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta i func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticbeanstalkconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig - envId := d.Id() + envID := d.Id() log.Printf("[DEBUG] Elastic Beanstalk environment read %s: id %s", d.Get("name").(string), d.Id()) resp, err := conn.DescribeEnvironments(&elasticbeanstalk.DescribeEnvironmentsInput{ - EnvironmentIds: []*string{aws.String(envId)}, + EnvironmentIds: []*string{aws.String(envID)}, }) if err != nil { @@ -559,7 +526,7 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int } resources, err := conn.DescribeEnvironmentResources(&elasticbeanstalk.DescribeEnvironmentResourcesInput{ - EnvironmentId: aws.String(envId), + EnvironmentId: aws.String(envID), }) if err != nil { @@ -650,7 +617,7 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int return fmt.Errorf("error listing tags for Elastic Beanstalk environment (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreElasticbeanstalk().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreElasticbeanstalk().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -756,20 +723,6 @@ func resourceAwsElasticBeanstalkEnvironmentSettingsRead(d *schema.ResourceData, func resourceAwsElasticBeanstalkEnvironmentDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticbeanstalkconn - opts := elasticbeanstalk.TerminateEnvironmentInput{ - EnvironmentId: aws.String(d.Id()), - TerminateResources: aws.Bool(true), - } - - // Get the current time to filter getBeanstalkEnvironmentErrors messages - t := time.Now() - log.Printf("[DEBUG] Elastic Beanstalk Environment terminate opts: %s", opts) - _, err := conn.TerminateEnvironment(&opts) - - if err != nil { - return err - } - waitForReadyTimeOut, err := time.ParseDuration(d.Get("wait_for_ready_timeout").(string)) if err != nil { return err @@ -780,11 +733,36 @@ func resourceAwsElasticBeanstalkEnvironmentDelete(d *schema.ResourceData, meta i log.Printf("[WARN] Error parsing poll_interval, using default backoff") } + // The Environment needs to be in a Ready state before it can be terminated + err = waitForElasticBeanstalkEnvironmentReadyIgnoreErrorEvents(conn, d.Id(), waitForReadyTimeOut, pollInterval) + if err != nil { + return fmt.Errorf("error waiting for Elastic Beanstalk Environment %q to be ready before terminating: %w", d.Id(), err) + } + + return deleteElasticBeanstalkEnvironment(conn, d.Id(), waitForReadyTimeOut, pollInterval) +} + +func deleteElasticBeanstalkEnvironment(conn *elasticbeanstalk.ElasticBeanstalk, id string, timeout, pollInterval time.Duration) error { + opts := elasticbeanstalk.TerminateEnvironmentInput{ + EnvironmentId: aws.String(id), + TerminateResources: aws.Bool(true), + } + log.Printf("[DEBUG] Elastic Beanstalk Environment terminate opts: %s", opts) + + _, err := conn.TerminateEnvironment(&opts) + if err != nil { + if isAWSErr(err, "InvalidConfiguration.NotFound", "") || isAWSErr(err, "ValidationError", "") { + log.Printf("[DEBUG] Elastic Beanstalk Environment %q not found", id) + return nil + } + return err + } + stateConf := &resource.StateChangeConf{ Pending: []string{"Terminating"}, Target: []string{"Terminated"}, - Refresh: environmentStateRefreshFunc(conn, d.Id(), t), - Timeout: waitForReadyTimeOut, + Refresh: elasticBeanstalkEnvironmentIgnoreErrorEventsStateRefreshFunc(conn, id), + Timeout: timeout, Delay: 10 * time.Second, PollInterval: pollInterval, MinTimeout: 3 * time.Second, @@ -792,32 +770,52 @@ func resourceAwsElasticBeanstalkEnvironmentDelete(d *schema.ResourceData, meta i _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become terminated: %s", - d.Id(), err) + return fmt.Errorf("error waiting for Elastic Beanstalk Environment %q to become terminated: %w", id, err) } - envErrors, err := getBeanstalkEnvironmentErrors(conn, d.Id(), t) - if err != nil { - return err + return nil +} + +func waitForElasticBeanstalkEnvironmentReady(conn *elasticbeanstalk.ElasticBeanstalk, id string, timeout, pollInterval time.Duration, startTime time.Time) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"Launching", "Updating"}, + Target: []string{"Ready"}, + Refresh: elasticBeanstalkEnvironmentStateRefreshFunc(conn, id, startTime), + Timeout: timeout, + Delay: 10 * time.Second, + PollInterval: pollInterval, + MinTimeout: 3 * time.Second, } - if envErrors != nil { - return envErrors + + _, err := stateConf.WaitForState() + return err +} + +func waitForElasticBeanstalkEnvironmentReadyIgnoreErrorEvents(conn *elasticbeanstalk.ElasticBeanstalk, id string, timeout, pollInterval time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"Launching", "Updating"}, + Target: []string{"Ready"}, + Refresh: elasticBeanstalkEnvironmentIgnoreErrorEventsStateRefreshFunc(conn, id), + Timeout: timeout, + Delay: 10 * time.Second, + PollInterval: pollInterval, + MinTimeout: 3 * time.Second, } - return nil + _, err := stateConf.WaitForState() + return err } -// environmentStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// elasticBeanstalkEnvironmentStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch // the creation of the Beanstalk Environment -func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, environmentId string, t time.Time) resource.StateRefreshFunc { +func elasticBeanstalkEnvironmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, environmentID string, t time.Time) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := conn.DescribeEnvironments(&elasticbeanstalk.DescribeEnvironmentsInput{ - EnvironmentIds: []*string{aws.String(environmentId)}, + EnvironmentIds: []*string{aws.String(environmentID)}, }) if err != nil { log.Printf("[Err] Error waiting for Elastic Beanstalk Environment state: %s", err) - return -1, "failed", fmt.Errorf("Error waiting for Elastic Beanstalk Environment state: %s", err) + return -1, "failed", fmt.Errorf("error waiting for Elastic Beanstalk Environment state: %w", err) } if resp == nil || len(resp.Environments) == 0 { @@ -828,7 +826,7 @@ func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, enviro var env *elasticbeanstalk.EnvironmentDescription for _, e := range resp.Environments { - if environmentId == *e.EnvironmentId { + if environmentID == aws.StringValue(e.EnvironmentId) { env = e } } @@ -837,7 +835,7 @@ func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, enviro return -1, "failed", fmt.Errorf("Error finding Elastic Beanstalk Environment, environment not found") } - envErrors, err := getBeanstalkEnvironmentErrors(conn, environmentId, t) + envErrors, err := getBeanstalkEnvironmentErrors(conn, environmentID, t) if err != nil { return -1, "failed", err } @@ -845,7 +843,38 @@ func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, enviro return -1, "failed", envErrors } - return env, *env.Status, nil + return env, aws.StringValue(env.Status), nil + } +} + +func elasticBeanstalkEnvironmentIgnoreErrorEventsStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, environmentID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeEnvironments(&elasticbeanstalk.DescribeEnvironmentsInput{ + EnvironmentIds: []*string{aws.String(environmentID)}, + }) + if err != nil { + log.Printf("[Err] Error waiting for Elastic Beanstalk Environment state: %s", err) + return -1, "failed", fmt.Errorf("error waiting for Elastic Beanstalk Environment state: %w", err) + } + + if resp == nil || len(resp.Environments) == 0 { + // Sometimes AWS just has consistency issues and doesn't see + // our instance yet. Return an empty state. + return nil, "", nil + } + + var env *elasticbeanstalk.EnvironmentDescription + for _, e := range resp.Environments { + if environmentID == aws.StringValue(e.EnvironmentId) { + env = e + } + } + + if env == nil { + return -1, "failed", fmt.Errorf("Error finding Elastic Beanstalk Environment, environment not found") + } + + return env, aws.StringValue(env.Status), nil } } @@ -970,9 +999,11 @@ func (e beanstalkEnvironmentError) Error() string { type beanstalkEnvironmentErrors []*beanstalkEnvironmentError -func (e beanstalkEnvironmentErrors) Len() int { return len(e) } -func (e beanstalkEnvironmentErrors) Swap(i, j int) { e[i], e[j] = e[j], e[i] } -func (e beanstalkEnvironmentErrors) Less(i, j int) bool { return e[i].eventDate.Before(*e[j].eventDate) } +func (e beanstalkEnvironmentErrors) Len() int { return len(e) } +func (e beanstalkEnvironmentErrors) Swap(i, j int) { e[i], e[j] = e[j], e[i] } +func (e beanstalkEnvironmentErrors) Less(i, j int) bool { + return e[i].eventDate.Before(*e[j].eventDate) +} func getBeanstalkEnvironmentErrors(conn *elasticbeanstalk.ElasticBeanstalk, environmentId string, t time.Time) (*multierror.Error, error) { environmentErrors, err := conn.DescribeEvents(&elasticbeanstalk.DescribeEventsInput{ @@ -982,7 +1013,7 @@ func getBeanstalkEnvironmentErrors(conn *elasticbeanstalk.ElasticBeanstalk, envi }) if err != nil { - return nil, fmt.Errorf("Unable to get Elastic Beanstalk Evironment events: %s", err) + return nil, fmt.Errorf("unable to get Elastic Beanstalk Environment events: %w", err) } var events beanstalkEnvironmentErrors diff --git a/aws/resource_aws_elastic_beanstalk_environment_test.go b/aws/resource_aws_elastic_beanstalk_environment_test.go index 8c30d5acbe6..0dd82b45002 100644 --- a/aws/resource_aws_elastic_beanstalk_environment_test.go +++ b/aws/resource_aws_elastic_beanstalk_environment_test.go @@ -10,15 +10,14 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elasticbeanstalk" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) -// initialize sweeper func init() { resource.AddTestSweepers("aws_elastic_beanstalk_environment", &resource.Sweeper{ Name: "aws_elastic_beanstalk_environment", @@ -29,7 +28,7 @@ func init() { func testSweepElasticBeanstalkEnvironments(region string) error { client, err := sharedClientForRegion(region) if err != nil { - return fmt.Errorf("error getting client: %s", err) + return fmt.Errorf("error getting client: %w", err) } beanstalkconn := client.(*AWSClient).elasticbeanstalkconn @@ -42,7 +41,7 @@ func testSweepElasticBeanstalkEnvironments(region string) error { log.Printf("[WARN] Skipping Elastic Beanstalk Environment sweep for %s: %s", region, err) return nil } - return fmt.Errorf("Error retrieving beanstalk environment: %s", err) + return fmt.Errorf("error retrieving beanstalk environment: %w", err) } if len(resp.Environments) == 0 { @@ -50,50 +49,21 @@ func testSweepElasticBeanstalkEnvironments(region string) error { return nil } + var errors error for _, bse := range resp.Environments { - log.Printf("Trying to terminate (%s) (%s)", *bse.EnvironmentName, *bse.EnvironmentId) - - _, err := beanstalkconn.TerminateEnvironment( - &elasticbeanstalk.TerminateEnvironmentInput{ - EnvironmentId: bse.EnvironmentId, - TerminateResources: aws.Bool(true), - }) + environmentName := aws.StringValue(bse.EnvironmentName) + environmentID := aws.StringValue(bse.EnvironmentId) + log.Printf("Trying to terminate (%s) (%s)", environmentName, environmentID) + err := deleteElasticBeanstalkEnvironment(beanstalkconn, environmentID, 5*time.Minute, 10*time.Second) if err != nil { - elasticbeanstalkerr, ok := err.(awserr.Error) - if ok && (elasticbeanstalkerr.Code() == "InvalidConfiguration.NotFound" || elasticbeanstalkerr.Code() == "ValidationError") { - log.Printf("[DEBUG] beanstalk environment (%s) not found", *bse.EnvironmentName) - return nil - } - - return err - } - - waitForReadyTimeOut, _ := time.ParseDuration("5m") - pollInterval, _ := time.ParseDuration("10s") - - // poll for deletion - t := time.Now() - stateConf := &resource.StateChangeConf{ - Pending: []string{"Terminating"}, - Target: []string{"Terminated"}, - Refresh: environmentStateRefreshFunc(beanstalkconn, *bse.EnvironmentId, t), - Timeout: waitForReadyTimeOut, - Delay: 10 * time.Second, - PollInterval: pollInterval, - MinTimeout: 3 * time.Second, + errors = multierror.Append(fmt.Errorf("error deleting Elastic Beanstalk Environment %q: %w", environmentID, err)) } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Elastic Beanstalk Environment (%s) to become terminated: %s", - *bse.EnvironmentId, err) - } - log.Printf("> Terminated (%s) (%s)", *bse.EnvironmentName, *bse.EnvironmentId) + log.Printf("> Terminated (%s) (%s)", environmentName, environmentID) } - return nil + return errors } func TestAccAWSBeanstalkEnv_basic(t *testing.T) { @@ -106,7 +76,7 @@ func TestAccAWSBeanstalkEnv_basic(t *testing.T) { beanstalkElbNameRegexp := regexp.MustCompile("awseb.+?EBLoa[^,]+") beanstalkInstancesNameRegexp := regexp.MustCompile("i-([0-9a-fA-F]{8}|[0-9a-fA-F]{17})") beanstalkLcNameRegexp := regexp.MustCompile("awseb.+?AutoScalingLaunch[^,]+") - beanstalkEndpointUrl := regexp.MustCompile("awseb.+?EBLoa[^,].+?elb.amazonaws.com") + beanstalkEndpointURL := regexp.MustCompile("awseb.+?EBLoa[^,].+?elb.amazonaws.com") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -119,7 +89,7 @@ func TestAccAWSBeanstalkEnv_basic(t *testing.T) { testAccCheckBeanstalkEnvExists(resourceName, &app), testAccCheckResourceAttrRegionalARN(resourceName, "arn", "elasticbeanstalk", fmt.Sprintf("environment/%s/%s", rName, rName)), resource.TestMatchResourceAttr(resourceName, "autoscaling_groups.0", beanstalkAsgNameRegexp), - resource.TestMatchResourceAttr(resourceName, "endpoint_url", beanstalkEndpointUrl), + resource.TestMatchResourceAttr(resourceName, "endpoint_url", beanstalkEndpointURL), resource.TestMatchResourceAttr(resourceName, "instances.0", beanstalkInstancesNameRegexp), resource.TestMatchResourceAttr(resourceName, "launch_configurations.0", beanstalkLcNameRegexp), resource.TestMatchResourceAttr(resourceName, "load_balancers.0", beanstalkElbNameRegexp), @@ -483,7 +453,7 @@ func TestAccAWSBeanstalkEnv_platformArn(t *testing.T) { Config: testAccBeanstalkEnvConfig_platform_arn(rName), Check: resource.ComposeTestCheckFunc( testAccCheckBeanstalkEnvExists(resourceName, &app), - testAccCheckResourceAttrRegionalARNNoAccount(resourceName, "platform_arn", "elasticbeanstalk", "platform/Python 3.6 running on 64bit Amazon Linux/2.9.4"), + testAccCheckResourceAttrRegionalARNNoAccount(resourceName, "platform_arn", "elasticbeanstalk", "platform/Python 3.6 running on 64bit Amazon Linux/2.9.6"), ), }, { @@ -544,7 +514,7 @@ func testAccVerifyBeanstalkConfig(env *elasticbeanstalk.EnvironmentDescription, sort.Strings(testStrings) sort.Strings(expected) if !reflect.DeepEqual(testStrings, expected) { - return fmt.Errorf("Error matching strings, expected:\n\n%#v\n\ngot:\n\n%#v\n", testStrings, foundEnvs) + return fmt.Errorf("error matching strings, expected:\n\n%#v\n\ngot:\n\n%#v", testStrings, foundEnvs) } return nil @@ -567,23 +537,18 @@ func testAccCheckBeanstalkEnvDestroy(s *terraform.State) error { if err == nil { switch { case len(resp.Environments) > 1: - return fmt.Errorf("Error %d environments match, expected 1", len(resp.Environments)) + return fmt.Errorf("error %d environments match, expected 1", len(resp.Environments)) case len(resp.Environments) == 1: if *resp.Environments[0].Status == "Terminated" { return nil } - return fmt.Errorf("Elastic Beanstalk ENV still exists.") + return fmt.Errorf("Elastic Beanstalk ENV still exists") default: return nil } } - // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidBeanstalkEnvID.NotFound" { + if !isAWSErr(err, "InvalidBeanstalkEnvID.NotFound", "") { return err } } @@ -746,10 +711,10 @@ func describeBeanstalkEnv(conn *elasticbeanstalk.ElasticBeanstalk, return &elasticbeanstalk.EnvironmentDescription{}, err } if len(resp.Environments) == 0 { - return &elasticbeanstalk.EnvironmentDescription{}, fmt.Errorf("Elastic Beanstalk ENV not found.") + return &elasticbeanstalk.EnvironmentDescription{}, fmt.Errorf("Elastic Beanstalk ENV not found") } if len(resp.Environments) > 1 { - return &elasticbeanstalk.EnvironmentDescription{}, fmt.Errorf("Found %d environments, expected 1.", len(resp.Environments)) + return &elasticbeanstalk.EnvironmentDescription{}, fmt.Errorf("found %d environments, expected 1", len(resp.Environments)) } return resp.Environments[0], nil } @@ -762,6 +727,11 @@ data "aws_availability_zones" "available" { # after waiting upwards of one hour to initialize the Auto Scaling Group. blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_elastic_beanstalk_solution_stack" "test" { @@ -852,7 +822,7 @@ func testAccBeanstalkEnvConfig_platform_arn(rName string) string { resource "aws_elastic_beanstalk_environment" "test" { application = aws_elastic_beanstalk_application.test.name name = %[1]q - platform_arn = "arn:${data.aws_partition.current.partition}:elasticbeanstalk:${data.aws_region.current.name}::platform/Python 3.6 running on 64bit Amazon Linux/2.9.4" + platform_arn = "arn:${data.aws_partition.current.partition}:elasticbeanstalk:${data.aws_region.current.name}::platform/Python 3.6 running on 64bit Amazon Linux/2.9.6" setting { namespace = "aws:ec2:vpc" diff --git a/aws/resource_aws_elastic_transcoder_pipeline.go b/aws/resource_aws_elastic_transcoder_pipeline.go index 69c22a2c1eb..a0aedfecf2b 100644 --- a/aws/resource_aws_elastic_transcoder_pipeline.go +++ b/aws/resource_aws_elastic_transcoder_pipeline.go @@ -6,7 +6,6 @@ import ( "regexp" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elastictranscoder" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -36,7 +35,7 @@ func resourceAwsElasticTranscoderPipeline() *schema.Resource { // ContentConfig also requires ThumbnailConfig "content_config": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Computed: true, MaxItems: 1, @@ -103,7 +102,7 @@ func resourceAwsElasticTranscoderPipeline() *schema.Resource { }, "notifications": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -139,12 +138,13 @@ func resourceAwsElasticTranscoderPipeline() *schema.Resource { }, "role": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, }, "thumbnail_config": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Computed: true, MaxItems: 1, @@ -191,18 +191,21 @@ func resourceAwsElasticTranscoderPipeline() *schema.Resource { } func resourceAwsElasticTranscoderPipelineCreate(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn + conn := meta.(*AWSClient).elastictranscoderconn req := &elastictranscoder.CreatePipelineInput{ - AwsKmsKeyArn: getStringPtr(d, "aws_kms_key_arn"), + AwsKmsKeyArn: aws.String(d.Get("aws_kms_key_arn").(string)), ContentConfig: expandETPiplineOutputConfig(d, "content_config"), InputBucket: aws.String(d.Get("input_bucket").(string)), Notifications: expandETNotifications(d), - OutputBucket: getStringPtr(d, "output_bucket"), - Role: getStringPtr(d, "role"), + Role: aws.String(d.Get("role").(string)), ThumbnailConfig: expandETPiplineOutputConfig(d, "thumbnail_config"), } + if v, ok := d.GetOk("output_bucket"); ok && v.(string) != "" { + req.OutputBucket = aws.String(v.(string)) + } + if name, ok := d.GetOk("name"); ok { req.Name = aws.String(name.(string)) } else { @@ -217,7 +220,7 @@ func resourceAwsElasticTranscoderPipelineCreate(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Elastic Transcoder Pipeline create opts: %s", req) - resp, err := elastictranscoderconn.CreatePipeline(req) + resp, err := conn.CreatePipeline(req) if err != nil { return fmt.Errorf("Error creating Elastic Transcoder Pipeline: %s", err) } @@ -232,22 +235,22 @@ func resourceAwsElasticTranscoderPipelineCreate(d *schema.ResourceData, meta int } func expandETNotifications(d *schema.ResourceData) *elastictranscoder.Notifications { - set, ok := d.GetOk("notifications") + list, ok := d.GetOk("notifications") if !ok { return nil } - s := set.(*schema.Set).List() - if len(s) == 0 { + l := list.([]interface{}) + if len(l) == 0 { return nil } - if s[0] == nil { - log.Printf("[ERR] First element of Notifications set is nil") + if l[0] == nil { + log.Printf("[ERR] First element of Notifications list is nil") return nil } - rN := s[0].(map[string]interface{}) + rN := l[0].(map[string]interface{}) return &elastictranscoder.Notifications{ Completed: aws.String(rN["completed"].(string)), @@ -276,31 +279,32 @@ func flattenETNotifications(n *elastictranscoder.Notifications) []map[string]int return nil } - m := setMap(make(map[string]interface{})) + result := map[string]interface{}{ + "completed": aws.StringValue(n.Completed), + "error": aws.StringValue(n.Error), + "progressing": aws.StringValue(n.Progressing), + "warning": aws.StringValue(n.Warning), + } - m.SetString("completed", n.Completed) - m.SetString("error", n.Error) - m.SetString("progressing", n.Progressing) - m.SetString("warning", n.Warning) - return m.MapList() + return []map[string]interface{}{result} } func expandETPiplineOutputConfig(d *schema.ResourceData, key string) *elastictranscoder.PipelineOutputConfig { - set, ok := d.GetOk(key) + list, ok := d.GetOk(key) if !ok { return nil } - s := set.(*schema.Set) - if s == nil || s.Len() == 0 { + l := list.([]interface{}) + if len(l) == 0 { return nil } - cc := s.List()[0].(map[string]interface{}) + cc := l[0].(map[string]interface{}) cfg := &elastictranscoder.PipelineOutputConfig{ - Bucket: getStringPtr(cc, "bucket"), - StorageClass: getStringPtr(cc, "storage_class"), + Bucket: aws.String(cc["bucket"].(string)), + StorageClass: aws.String(cc["storage_class"].(string)), } switch key { @@ -314,12 +318,16 @@ func expandETPiplineOutputConfig(d *schema.ResourceData, key string) *elastictra } func flattenETPipelineOutputConfig(cfg *elastictranscoder.PipelineOutputConfig) []map[string]interface{} { - m := setMap(make(map[string]interface{})) + if cfg == nil { + return nil + } - m.SetString("bucket", cfg.Bucket) - m.SetString("storage_class", cfg.StorageClass) + result := map[string]interface{}{ + "bucket": aws.StringValue(cfg.Bucket), + "storage_class": aws.StringValue(cfg.StorageClass), + } - return m.MapList() + return []map[string]interface{}{result} } func expandETPermList(permissions *schema.Set) []*elastictranscoder.Permission { @@ -334,8 +342,8 @@ func expandETPermList(permissions *schema.Set) []*elastictranscoder.Permission { perm := &elastictranscoder.Permission{ Access: expandStringList(m["access"].([]interface{})), - Grantee: getStringPtr(p, "grantee"), - GranteeType: getStringPtr(p, "grantee_type"), + Grantee: aws.String(m["grantee"].(string)), + GranteeType: aws.String(m["grantee_type"].(string)), } perms = append(perms, perm) @@ -347,25 +355,26 @@ func flattenETPermList(perms []*elastictranscoder.Permission) []map[string]inter var set []map[string]interface{} for _, p := range perms { - m := setMap(make(map[string]interface{})) - m.Set("access", flattenStringList(p.Access)) - m.SetString("grantee", p.Grantee) - m.SetString("grantee_type", p.GranteeType) + result := map[string]interface{}{ + "access": flattenStringList(p.Access), + "grantee": aws.StringValue(p.Grantee), + "grantee_type": aws.StringValue(p.GranteeType), + } - set = append(set, m) + set = append(set, result) } return set } func resourceAwsElasticTranscoderPipelineUpdate(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn + conn := meta.(*AWSClient).elastictranscoderconn req := &elastictranscoder.UpdatePipelineInput{ Id: aws.String(d.Id()), } if d.HasChange("aws_kms_key_arn") { - req.AwsKmsKeyArn = getStringPtr(d, "aws_kms_key_arn") + req.AwsKmsKeyArn = aws.String(d.Get("aws_kms_key_arn").(string)) } if d.HasChange("content_config") { @@ -373,11 +382,11 @@ func resourceAwsElasticTranscoderPipelineUpdate(d *schema.ResourceData, meta int } if d.HasChange("input_bucket") { - req.InputBucket = getStringPtr(d, "input_bucket") + req.InputBucket = aws.String(d.Get("input_bucket").(string)) } if d.HasChange("name") { - req.Name = getStringPtr(d, "name") + req.Name = aws.String(d.Get("name").(string)) } if d.HasChange("notifications") { @@ -385,7 +394,7 @@ func resourceAwsElasticTranscoderPipelineUpdate(d *schema.ResourceData, meta int } if d.HasChange("role") { - req.Role = getStringPtr(d, "role") + req.Role = aws.String(d.Get("role").(string)) } if d.HasChange("thumbnail_config") { @@ -393,7 +402,7 @@ func resourceAwsElasticTranscoderPipelineUpdate(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Updating Elastic Transcoder Pipeline: %#v", req) - output, err := elastictranscoderconn.UpdatePipeline(req) + output, err := conn.UpdatePipeline(req) if err != nil { return fmt.Errorf("Error updating Elastic Transcoder pipeline: %s", err) } @@ -406,14 +415,15 @@ func resourceAwsElasticTranscoderPipelineUpdate(d *schema.ResourceData, meta int } func resourceAwsElasticTranscoderPipelineRead(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn + conn := meta.(*AWSClient).elastictranscoderconn - resp, err := elastictranscoderconn.ReadPipeline(&elastictranscoder.ReadPipelineInput{ + resp, err := conn.ReadPipeline(&elastictranscoder.ReadPipelineInput{ Id: aws.String(d.Id()), }) if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "ResourceNotFoundException" { + if isAWSErr(err, elastictranscoder.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] No such resource found for Elastic Transcoder Pipeline (%s)", d.Id()) d.SetId("") return nil } @@ -478,10 +488,10 @@ func resourceAwsElasticTranscoderPipelineRead(d *schema.ResourceData, meta inter } func resourceAwsElasticTranscoderPipelineDelete(d *schema.ResourceData, meta interface{}) error { - elastictranscoderconn := meta.(*AWSClient).elastictranscoderconn + conn := meta.(*AWSClient).elastictranscoderconn log.Printf("[DEBUG] Elastic Transcoder Delete Pipeline: %s", d.Id()) - _, err := elastictranscoderconn.DeletePipeline(&elastictranscoder.DeletePipelineInput{ + _, err := conn.DeletePipeline(&elastictranscoder.DeletePipelineInput{ Id: aws.String(d.Id()), }) if err != nil { diff --git a/aws/resource_aws_elastic_transcoder_pipeline_test.go b/aws/resource_aws_elastic_transcoder_pipeline_test.go index 7498c4d375a..4cf938f6c19 100644 --- a/aws/resource_aws_elastic_transcoder_pipeline_test.go +++ b/aws/resource_aws_elastic_transcoder_pipeline_test.go @@ -6,8 +6,6 @@ import ( "sort" "testing" - "regexp" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elastictranscoder" @@ -18,12 +16,12 @@ import ( func TestAccAWSElasticTranscoderPipeline_basic(t *testing.T) { pipeline := &elastictranscoder.Pipeline{} - resourceName := "aws_elastictranscoder_pipeline.bar" + resourceName := "aws_elastictranscoder_pipeline.test" rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSElasticTranscoder(t) }, - IDRefreshName: "aws_elastictranscoder_pipeline.bar", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckElasticTranscoderPipelineDestroy, Steps: []resource.TestStep{ @@ -44,51 +42,61 @@ func TestAccAWSElasticTranscoderPipeline_basic(t *testing.T) { func TestAccAWSElasticTranscoderPipeline_kmsKey(t *testing.T) { pipeline := &elastictranscoder.Pipeline{} - ri := acctest.RandInt() - config := fmt.Sprintf(awsElasticTranscoderPipelineConfigKmsKey, ri, ri, ri) - keyRegex := regexp.MustCompile(`^arn:aws:([a-zA-Z0-9\-])+:([a-z]{2}-[a-z]+-\d{1})?:(\d{12})?:(.*)$`) + resourceName := "aws_elastictranscoder_pipeline.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + keyResourceName := "aws_kms_key.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSElasticTranscoder(t) }, - IDRefreshName: "aws_elastictranscoder_pipeline.bar", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckElasticTranscoderPipelineDestroy, Steps: []resource.TestStep{ { - Config: config, + Config: awsElasticTranscoderPipelineConfigKmsKey(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticTranscoderPipelineExists("aws_elastictranscoder_pipeline.bar", pipeline), - resource.TestMatchResourceAttr("aws_elastictranscoder_pipeline.bar", "aws_kms_key_arn", keyRegex), + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, pipeline), + resource.TestCheckResourceAttrPair(resourceName, "aws_kms_key_arn", keyResourceName, "arn"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } func TestAccAWSElasticTranscoderPipeline_notifications(t *testing.T) { pipeline := elastictranscoder.Pipeline{} + resourceName := "aws_elastictranscoder_pipeline.test" - rInt := acctest.RandInt() + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSElasticTranscoder(t) }, - IDRefreshName: "aws_elastictranscoder_pipeline.bar", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckElasticTranscoderPipelineDestroy, Steps: []resource.TestStep{ { - Config: awsElasticTranscoderNotifications(rInt), + Config: awsElasticTranscoderNotifications(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticTranscoderPipelineExists("aws_elastictranscoder_pipeline.bar", &pipeline), + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, &pipeline), testAccCheckAWSElasticTranscoderPipeline_notifications(&pipeline, []string{"warning", "completed"}), ), }, - + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, // update and check that we have 1 less notification { - Config: awsElasticTranscoderNotifications_update(rInt), + Config: awsElasticTranscoderNotifications_update(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticTranscoderPipelineExists("aws_elastictranscoder_pipeline.bar", &pipeline), + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, &pipeline), testAccCheckAWSElasticTranscoderPipeline_notifications(&pipeline, []string{"completed"}), ), }, @@ -132,25 +140,31 @@ func testAccCheckAWSElasticTranscoderPipeline_notifications( func TestAccAWSElasticTranscoderPipeline_withContentConfig(t *testing.T) { pipeline := &elastictranscoder.Pipeline{} + resourceName := "aws_elastictranscoder_pipeline.test" - rInt := acctest.RandInt() + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSElasticTranscoder(t) }, - IDRefreshName: "aws_elastictranscoder_pipeline.bar", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckElasticTranscoderPipelineDestroy, Steps: []resource.TestStep{ { - Config: awsElasticTranscoderPipelineWithContentConfig(rInt), + Config: awsElasticTranscoderPipelineWithContentConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticTranscoderPipelineExists("aws_elastictranscoder_pipeline.bar", pipeline), + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, pipeline), ), }, { - Config: awsElasticTranscoderPipelineWithContentConfigUpdate(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: awsElasticTranscoderPipelineWithContentConfigUpdate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticTranscoderPipelineExists("aws_elastictranscoder_pipeline.bar", pipeline), + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, pipeline), ), }, }, @@ -159,21 +173,49 @@ func TestAccAWSElasticTranscoderPipeline_withContentConfig(t *testing.T) { func TestAccAWSElasticTranscoderPipeline_withPermissions(t *testing.T) { pipeline := &elastictranscoder.Pipeline{} + resourceName := "aws_elastictranscoder_pipeline.test" - rInt := acctest.RandInt() + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSElasticTranscoder(t) }, - IDRefreshName: "aws_elastictranscoder_pipeline.baz", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckElasticTranscoderPipelineDestroy, Steps: []resource.TestStep{ { - Config: awsElasticTranscoderPipelineWithPerms(rInt), + Config: awsElasticTranscoderPipelineWithPerms(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticTranscoderPipelineExists("aws_elastictranscoder_pipeline.baz", pipeline), + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, pipeline), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSElasticTranscoderPipeline_disappears(t *testing.T) { + pipeline := &elastictranscoder.Pipeline{} + resourceName := "aws_elastictranscoder_pipeline.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSElasticTranscoder(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckElasticTranscoderPipelineDestroy, + Steps: []resource.TestStep{ + { + Config: awsElasticTranscoderPipelineConfigBasic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticTranscoderPipelineExists(resourceName, pipeline), + testAccCheckAWSElasticTranscoderPipelineDisappears(pipeline), + ), + ExpectNonEmptyPlan: true, + }, }, }) } @@ -205,6 +247,18 @@ func testAccCheckAWSElasticTranscoderPipelineExists(n string, res *elastictransc } } +func testAccCheckAWSElasticTranscoderPipelineDisappears(res *elastictranscoder.Pipeline) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).elastictranscoderconn + + _, err := conn.DeletePipeline(&elastictranscoder.DeletePipelineInput{ + Id: res.Id, + }) + + return err + } +} + func testAccCheckElasticTranscoderPipelineDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).elastictranscoderconn @@ -254,14 +308,14 @@ func testAccPreCheckAWSElasticTranscoder(t *testing.T) { func awsElasticTranscoderPipelineConfigBasic(rName string) string { return fmt.Sprintf(` -resource "aws_elastictranscoder_pipeline" "bar" { - input_bucket = "${aws_s3_bucket.test_bucket.bucket}" - output_bucket = "${aws_s3_bucket.test_bucket.bucket}" +resource "aws_elastictranscoder_pipeline" "test" { + input_bucket = "${aws_s3_bucket.test.bucket}" + output_bucket = "${aws_s3_bucket.test.bucket}" name = %[1]q - role = "${aws_iam_role.test_role.arn}" + role = "${aws_iam_role.test.arn}" } -resource "aws_iam_role" "test_role" { +resource "aws_iam_role" "test" { name = %[1]q assume_role_policy = < 0 && coreInstanceType != "" { coreInstanceGroupConfig := &emr.InstanceGroupConfig{ InstanceCount: aws.Int64(int64(d.Get("core_instance_count").(int))), - InstanceRole: aws.String("CORE"), + InstanceRole: aws.String(emr.InstanceRoleTypeCore), InstanceType: aws.String(d.Get("core_instance_type").(string)), } instanceConfig.InstanceGroups = append(instanceConfig.InstanceGroups, coreInstanceGroupConfig) @@ -860,7 +861,7 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error } if v, ok := d.GetOk("bootstrap_action"); ok { - bootstrapActions := v.(*schema.Set).List() + bootstrapActions := v.([]interface{}) params.BootstrapActions = expandBootstrapActions(bootstrapActions) } if v, ok := d.GetOk("step"); ok { @@ -961,6 +962,7 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { emrconn := meta.(*AWSClient).emrconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &emr.DescribeClusterInput{ ClusterId: aws.String(d.Id()), @@ -1037,7 +1039,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error setting master_instance_group: %s", err) } - if err := d.Set("tags", keyvaluetags.EmrKeyValueTags(cluster.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.EmrKeyValueTags(cluster.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error settings tags: %s", err) } @@ -1125,10 +1127,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).emrconn - d.Partial(true) - if d.HasChange("core_instance_count") { - d.SetPartial("core_instance_count") log.Printf("[DEBUG] Modify EMR cluster") groups, err := fetchAllEMRInstanceGroups(conn, d.Id()) if err != nil { @@ -1182,7 +1181,6 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("visible_to_all_users") { - d.SetPartial("visible_to_all_users") _, errModify := conn.SetVisibleToAllUsers(&emr.SetVisibleToAllUsersInput{ JobFlowIds: []*string{aws.String(d.Id())}, VisibleToAllUsers: aws.Bool(d.Get("visible_to_all_users").(bool)), @@ -1194,7 +1192,6 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("termination_protection") { - d.SetPartial("termination_protection") _, errModify := conn.SetTerminationProtection(&emr.SetTerminationProtectionInput{ JobFlowIds: []*string{aws.String(d.Id())}, TerminationProtected: aws.Bool(d.Get("termination_protection").(bool)), @@ -1354,7 +1351,6 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("step_concurrency_level") { - d.SetPartial("step_concurrency_level") _, errModify := conn.ModifyCluster(&emr.ModifyClusterInput{ ClusterId: aws.String(d.Id()), StepConcurrencyLevel: aws.Int64(int64(d.Get("step_concurrency_level").(int))), @@ -1365,8 +1361,6 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } } - d.Partial(false) - return resourceAwsEMRClusterRead(d, meta) } @@ -1425,9 +1419,14 @@ func resourceAwsEMRClusterDelete(d *schema.ResourceData, meta interface{}) error } func countEMRRemainingInstances(resp *emr.ListInstancesOutput, emrClusterId string) int { + if resp == nil { + log.Printf("[ERROR] response is nil") + return 0 + } + instanceCount := len(resp.Instances) - if resp == nil || instanceCount == 0 { + if instanceCount == 0 { log.Printf("[DEBUG] No instances found for EMR Cluster (%s)", emrClusterId) return 0 } diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index 7b8c0075c05..65ea77d7b80 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "reflect" "regexp" "testing" "time" @@ -80,23 +79,27 @@ func testSweepEmrClusters(region string) error { func TestAccAWSEMRCluster_basic(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig(r), + Config: testAccAWSEmrClusterConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "scale_down_behavior", "TERMINATE_AT_TASK_COMPLETION"), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "step.#", "0"), - resource.TestCheckResourceAttrSet("aws_emr_cluster.tf-test-cluster", "arn"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "scale_down_behavior", "TERMINATE_AT_TASK_COMPLETION"), + resource.TestCheckResourceAttr(resourceName, "step.#", "0"), + resource.TestCheckResourceAttrSet(resourceName, "arn"), + resource.TestCheckNoResourceAttr(resourceName, "additional_info"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.#", "0"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -107,22 +110,32 @@ func TestAccAWSEMRCluster_basic(t *testing.T) { func TestAccAWSEMRCluster_additionalInfo(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + expectedJSON := ` +{ + "instanceAwsClientConfiguration": { + "proxyPort": 8099, + "proxyHost": "myproxy.example.com" + } +}` + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigAdditionalInfo(r), + Config: testAccAWSEmrClusterConfigAdditionalInfo(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "scale_down_behavior", "TERMINATE_AT_TASK_COMPLETION"), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "step.#", "0"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "scale_down_behavior", "TERMINATE_AT_TASK_COMPLETION"), + resource.TestCheckResourceAttr(resourceName, "step.#", "0"), + testAccCheckResourceAttrEquivalentJSON(resourceName, "additional_info", expectedJSON), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps", "additional_info"}, @@ -133,16 +146,18 @@ func TestAccAWSEMRCluster_additionalInfo(t *testing.T) { func TestAccAWSEMRCluster_disappears(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig(r), + Config: testAccAWSEmrClusterConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), testAccCheckAWSEmrClusterDisappears(&cluster), ), ExpectNonEmptyPlan: true, @@ -153,22 +168,24 @@ func TestAccAWSEMRCluster_disappears(t *testing.T) { func TestAccAWSEMRCluster_configurationsJson(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigConfigurationsJson(r), + Config: testAccAWSEmrClusterConfigConfigurationsJson(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestMatchResourceAttr("aws_emr_cluster.tf-test-cluster", "configurations_json", + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestMatchResourceAttr(resourceName, "configurations_json", regexp.MustCompile("{\"JAVA_HOME\":\"/usr/lib/jvm/java-1.8.0\".+")), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -258,17 +275,14 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_AutoscalingPolicy(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster1), resource.TestCheckResourceAttr(resourceName, "core_instance_group.#", "1"), - resource.TestMatchResourceAttr(resourceName, "core_instance_group.0.autoscaling_policy", regexp.MustCompile(`"MaxCapacity": ?2`)), + testAccCheckResourceAttrEquivalentJSON(resourceName, "core_instance_group.0.autoscaling_policy", autoscalingPolicy1), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupAutoscalingPolicy(rName, autoscalingPolicy2), @@ -276,7 +290,7 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_AutoscalingPolicy(t *testing.T) { testAccCheckAWSEmrClusterExists(resourceName, &cluster2), testAccCheckAWSEmrClusterNotRecreated(&cluster1, &cluster2), resource.TestCheckResourceAttr(resourceName, "core_instance_group.#", "1"), - resource.TestMatchResourceAttr(resourceName, "core_instance_group.0.autoscaling_policy", regexp.MustCompile(`"MaxCapacity": ?3`)), + testAccCheckResourceAttrEquivalentJSON(resourceName, "core_instance_group.0.autoscaling_policy", autoscalingPolicy2), ), }, { @@ -311,13 +325,10 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_BidPrice(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupBidPrice(rName, "0.51"), @@ -351,13 +362,10 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_InstanceCount(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupInstanceCount(rName, 1), @@ -400,13 +408,10 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_InstanceType(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupInstanceType(rName, "m4.xlarge"), @@ -439,13 +444,10 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_Migration_CoreInstanceType(t *testin ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupInstanceType(rName, "m4.large"), @@ -478,13 +480,10 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_Migration_InstanceGroup(t *testing.T ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupInstanceType(rName, "m4.large"), @@ -518,13 +517,10 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_Name(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigCoreInstanceGroupName(rName, "name2"), @@ -541,22 +537,23 @@ func TestAccAWSEMRCluster_CoreInstanceGroup_Name(t *testing.T) { func TestAccAWSEMRCluster_instance_group(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigInstanceGroups(r), + Config: testAccAWSEmrClusterConfigInstanceGroups(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "instance_group.#", "2"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "instance_group.#", "2"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -567,22 +564,23 @@ func TestAccAWSEMRCluster_instance_group(t *testing.T) { func TestAccAWSEMRCluster_instance_group_names(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigInstanceGroupsName(r), + Config: testAccAWSEmrClusterConfigInstanceGroupsName(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "instance_group.#", "3"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "instance_group.#", "3"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -593,30 +591,30 @@ func TestAccAWSEMRCluster_instance_group_names(t *testing.T) { func TestAccAWSEMRCluster_instance_group_update(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigInstanceGroups(r), + Config: testAccAWSEmrClusterConfigInstanceGroups(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "instance_group.#", "2"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "instance_group.#", "2"), ), }, { - Config: testAccAWSEmrClusterConfigInstanceGroupsUpdate(r), + Config: testAccAWSEmrClusterConfigInstanceGroupsUpdate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "instance_group.#", "2"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "instance_group.#", "2"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -627,22 +625,23 @@ func TestAccAWSEMRCluster_instance_group_update(t *testing.T) { func TestAccAWSEMRCluster_instance_group_EBSVolumeType_st1(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigInstanceGroups_st1(r), + Config: testAccAWSEmrClusterConfigInstanceGroups_st1(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "instance_group.#", "2"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "instance_group.#", "2"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -653,26 +652,28 @@ func TestAccAWSEMRCluster_instance_group_EBSVolumeType_st1(t *testing.T) { func TestAccAWSEMRCluster_updateAutoScalingPolicy(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigInstanceGroups_st1(r), + Config: testAccAWSEmrClusterConfigInstanceGroups_st1(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), ), }, { - Config: testAccAWSEmrClusterConfigInstanceGroups_updateAutoScalingPolicy(r), + Config: testAccAWSEmrClusterConfigInstanceGroups_updateAutoScalingPolicy(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -725,25 +726,26 @@ func TestAccAWSEMRCluster_Ec2Attributes_DefaultManagedSecurityGroups(t *testing. func TestAccAWSEMRCluster_Kerberos_ClusterDedicatedKdc(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() - password := fmt.Sprintf("NeverKeepPasswordsInPlainText%d!", r) + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") + password := fmt.Sprintf("NeverKeepPasswordsInPlainText%s!", rName) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig_Kerberos_ClusterDedicatedKdc(r, password), + Config: testAccAWSEmrClusterConfig_Kerberos_ClusterDedicatedKdc(rName, password), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "kerberos_attributes.#", "1"), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "kerberos_attributes.0.kdc_admin_password", password), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "kerberos_attributes.0.realm", "EC2.INTERNAL"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "kerberos_attributes.#", "1"), + resource.TestCheckResourceAttr(resourceName, "kerberos_attributes.0.kdc_admin_password", password), + resource.TestCheckResourceAttr(resourceName, "kerberos_attributes.0.realm", "EC2.INTERNAL"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps", "kerberos_attributes.0.kdc_admin_password"}, @@ -771,13 +773,10 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_BidPrice(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigMasterInstanceGroupBidPrice(rName, "0.51"), @@ -811,13 +810,10 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_InstanceCount(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigMasterInstanceGroupInstanceCount(rName, 1), @@ -851,13 +847,10 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_InstanceType(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigMasterInstanceGroupInstanceType(rName, "m4.xlarge"), @@ -890,13 +883,10 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_Migration_InstanceGroup(t *testing ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigMasterInstanceGroupInstanceType(rName, "m4.large"), @@ -929,13 +919,10 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_Migration_MasterInstanceType(t *te ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigMasterInstanceGroupInstanceType(rName, "m4.large"), @@ -969,13 +956,10 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_Name(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { Config: testAccAWSEmrClusterConfigMasterInstanceGroupName(rName, "name2"), @@ -992,18 +976,23 @@ func TestAccAWSEMRCluster_MasterInstanceGroup_Name(t *testing.T) { func TestAccAWSEMRCluster_security_config(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig_SecurityConfiguration(r), - Check: testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), + Config: testAccAWSEmrClusterConfig_SecurityConfiguration(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttrPair(resourceName, "security_configuration", "aws_emr_security_configuration.foo", "name"), + ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1014,16 +1003,16 @@ func TestAccAWSEMRCluster_security_config(t *testing.T) { func TestAccAWSEMRCluster_Step_Basic(t *testing.T) { var cluster emr.Cluster - rInt := acctest.RandInt() - resourceName := "aws_emr_cluster.tf-test-cluster" + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig_Step_Single(rInt), + Config: testAccAWSEmrClusterConfig_Step_Single(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, "step.#", "1"), @@ -1036,7 +1025,7 @@ func TestAccAWSEMRCluster_Step_Basic(t *testing.T) { ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1047,16 +1036,16 @@ func TestAccAWSEMRCluster_Step_Basic(t *testing.T) { func TestAccAWSEMRCluster_Step_ConfigMode(t *testing.T) { var cluster1, cluster2, cluster3 emr.Cluster - rInt := acctest.RandInt() - resourceName := "aws_emr_cluster.tf-test-cluster" + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig_Step_Single(rInt), + Config: testAccAWSEmrClusterConfig_Step_Single(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster1), resource.TestCheckResourceAttr(resourceName, "step.#", "1"), @@ -1069,7 +1058,7 @@ func TestAccAWSEMRCluster_Step_ConfigMode(t *testing.T) { ImportStateVerifyIgnore: []string{"cluster_state", "configurations", "keep_job_flow_alive_when_no_steps"}, }, { - Config: testAccAWSEmrClusterConfig_Step_NoBlocks(rInt), + Config: testAccAWSEmrClusterConfig_Step_NoBlocks(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster2), resource.TestCheckResourceAttr(resourceName, "step.#", "1"), @@ -1082,7 +1071,7 @@ func TestAccAWSEMRCluster_Step_ConfigMode(t *testing.T) { ImportStateVerifyIgnore: []string{"cluster_state", "configurations", "keep_job_flow_alive_when_no_steps"}, }, { - Config: testAccAWSEmrClusterConfig_Step_Zeroed(rInt), + Config: testAccAWSEmrClusterConfig_Step_Zeroed(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster3), resource.TestCheckResourceAttr(resourceName, "step.#", "0"), @@ -1100,16 +1089,16 @@ func TestAccAWSEMRCluster_Step_ConfigMode(t *testing.T) { func TestAccAWSEMRCluster_Step_Multiple(t *testing.T) { var cluster emr.Cluster - rInt := acctest.RandInt() - resourceName := "aws_emr_cluster.tf-test-cluster" + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig_Step_Multiple(rInt), + Config: testAccAWSEmrClusterConfig_Step_Multiple(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster), resource.TestCheckResourceAttr(resourceName, "step.#", "2"), @@ -1126,7 +1115,7 @@ func TestAccAWSEMRCluster_Step_Multiple(t *testing.T) { ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1137,26 +1126,9 @@ func TestAccAWSEMRCluster_Step_Multiple(t *testing.T) { func TestAccAWSEMRCluster_bootstrap_ordering(t *testing.T) { var cluster emr.Cluster + resourceName := "aws_emr_cluster.test" rName := acctest.RandomWithPrefix("tf-emr-bootstrap") - argsInts := []string{ - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - } - - argsStrings := []string{ - "instance.isMaster=true", - "echo running on master node", - } - resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -1166,7 +1138,67 @@ func TestAccAWSEMRCluster_bootstrap_ordering(t *testing.T) { Config: testAccAWSEmrClusterConfig_bootstrap(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists(resourceName, &cluster), - testAccCheck_bootstrap_order(&cluster, argsInts, argsStrings), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.name", "runif"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.path", "s3://elasticmapreduce/bootstrap-actions/run-if"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.#", "2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.0", "instance.isMaster=true"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.1", "echo running on master node"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.name", "test"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.path", fmt.Sprintf("s3://%s/testscript.sh", rName)), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.args.#", "10"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, + }, + { + Config: testAccAWSEmrClusterConfig_bootstrapAdd(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.#", "3"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.name", "runif"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.path", "s3://elasticmapreduce/bootstrap-actions/run-if"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.#", "2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.0", "instance.isMaster=true"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.1", "echo running on master node"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.name", "test"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.path", fmt.Sprintf("s3://%s/testscript.sh", rName)), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.args.#", "10"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.name", "runif-2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.path", "s3://elasticmapreduce/bootstrap-actions/run-if"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.args.#", "2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.args.0", "instance.isMaster=true"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.args.1", "echo also running on master node"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, + }, + { + Config: testAccAWSEmrClusterConfig_bootstrapReorder(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.#", "3"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.name", "runif"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.path", "s3://elasticmapreduce/bootstrap-actions/run-if"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.#", "2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.0", "instance.isMaster=true"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.0.args.1", "echo running on master node"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.name", "test"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.path", fmt.Sprintf("s3://%s/testscript.sh", rName)), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.2.args.#", "10"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.name", "runif-2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.path", "s3://elasticmapreduce/bootstrap-actions/run-if"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.args.#", "2"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.args.0", "instance.isMaster=true"), + resource.TestCheckResourceAttr(resourceName, "bootstrap_action.1.args.1", "echo also running on master node"), ), }, { @@ -1181,49 +1213,44 @@ func TestAccAWSEMRCluster_bootstrap_ordering(t *testing.T) { func TestAccAWSEMRCluster_terminationProtected(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigTerminationPolicy(r, "false"), + Config: testAccAWSEmrClusterConfigTerminationPolicy(rName, "false"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "termination_protection", "false"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "termination_protection", "false"), ), }, { - Config: testAccAWSEmrClusterConfigTerminationPolicy(r, "true"), + Config: testAccAWSEmrClusterConfigTerminationPolicy(rName, "true"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "termination_protection", "true"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "termination_protection", "true"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "kerberos_attributes.0.kdc_admin_password", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { //Need to turn off termination_protection to allow the job to be deleted - Config: testAccAWSEmrClusterConfigTerminationPolicy(r, "false"), + Config: testAccAWSEmrClusterConfigTerminationPolicy(rName, "false"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "termination_protection", "false"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "termination_protection", "false"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1234,22 +1261,23 @@ func TestAccAWSEMRCluster_terminationProtected(t *testing.T) { func TestAccAWSEMRCluster_keepJob(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig_keepJob(r, "false"), + Config: testAccAWSEmrClusterConfig_keepJob(rName, "false"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "keep_job_flow_alive_when_no_steps", "false"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "keep_job_flow_alive_when_no_steps", "false"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1260,40 +1288,36 @@ func TestAccAWSEMRCluster_keepJob(t *testing.T) { func TestAccAWSEMRCluster_visibleToAllUsers(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig(r), + Config: testAccAWSEmrClusterConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "visible_to_all_users", "true"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "visible_to_all_users", "true"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "configurations", - "kerberos_attributes.0.kdc_admin_password", - "keep_job_flow_alive_when_no_steps", - }, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, }, { - Config: testAccAWSEmrClusterConfigVisibleToAllUsersUpdated(r), + Config: testAccAWSEmrClusterConfigVisibleToAllUsersUpdated(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "visible_to_all_users", "false"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "visible_to_all_users", "false"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1304,23 +1328,24 @@ func TestAccAWSEMRCluster_visibleToAllUsers(t *testing.T) { func TestAccAWSEMRCluster_s3Logging(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() - bucketName := fmt.Sprintf("s3n://tf-acc-test-%d/", r) + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") + bucketName := fmt.Sprintf("s3n://%s/", rName) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigS3Logging(r), + Config: testAccAWSEmrClusterConfigS3Logging(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "log_uri", bucketName), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "log_uri", bucketName), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1331,41 +1356,36 @@ func TestAccAWSEMRCluster_s3Logging(t *testing.T) { func TestAccAWSEMRCluster_tags(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig(r), + Config: testAccAWSEmrClusterConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "tags.%", "4"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.role", "rolename"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.dns_zone", "env_zone"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.env", "env"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.name", "name-env")), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "tags.%", "4"), + resource.TestCheckResourceAttr(resourceName, "tags.role", "rolename"), + resource.TestCheckResourceAttr(resourceName, "tags.dns_zone", "env_zone"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "env"), + resource.TestCheckResourceAttr(resourceName, "tags.name", "name-env")), }, { - Config: testAccAWSEmrClusterConfigUpdatedTags(r), + Config: testAccAWSEmrClusterConfigUpdatedTags(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "tags.%", "3"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.dns_zone", "new_zone"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.Env", "production"), - resource.TestCheckResourceAttr( - "aws_emr_cluster.tf-test-cluster", "tags.name", "name-env"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), + resource.TestCheckResourceAttr(resourceName, "tags.dns_zone", "new_zone"), + resource.TestCheckResourceAttr(resourceName, "tags.Env", "production"), + resource.TestCheckResourceAttr(resourceName, "tags.name", "name-env"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1376,28 +1396,30 @@ func TestAccAWSEMRCluster_tags(t *testing.T) { func TestAccAWSEMRCluster_root_volume_size(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfig(r), + Config: testAccAWSEmrClusterConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "ebs_root_volume_size", "21"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "ebs_root_volume_size", "21"), ), }, { - Config: testAccAWSEmrClusterConfigUpdatedRootVolumeSize(r), + Config: testAccAWSEmrClusterConfigUpdatedRootVolumeSize(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "ebs_root_volume_size", "48"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "ebs_root_volume_size", "48"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1441,21 +1463,23 @@ func TestAccAWSEMRCluster_step_concurrency_level(t *testing.T) { func TestAccAWSEMRCluster_custom_ami_id(t *testing.T) { var cluster emr.Cluster - r := acctest.RandInt() + + resourceName := "aws_emr_cluster.tf-test-cluster" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEmrClusterConfigCustomAmiID(r), + Config: testAccAWSEmrClusterConfigCustomAmiID(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttrSet("aws_emr_cluster.tf-test-cluster", "custom_ami_id"), + testAccCheckAWSEmrClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttrSet(resourceName, "custom_ami_id"), ), }, { - ResourceName: "aws_emr_cluster.tf-test-cluster", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, ImportStateVerifyIgnore: []string{"configurations", "keep_job_flow_alive_when_no_steps"}, @@ -1464,45 +1488,6 @@ func TestAccAWSEMRCluster_custom_ami_id(t *testing.T) { }) } -func testAccCheck_bootstrap_order(cluster *emr.Cluster, argsInts, argsStrings []string) resource.TestCheckFunc { - return func(s *terraform.State) error { - - emrconn := testAccProvider.Meta().(*AWSClient).emrconn - req := emr.ListBootstrapActionsInput{ - ClusterId: cluster.Id, - } - - resp, err := emrconn.ListBootstrapActions(&req) - if err != nil { - return fmt.Errorf("Error listing boostrap actions in test: %s", err) - } - - // make sure we actually checked something - var ran bool - for _, ba := range resp.BootstrapActions { - // assume name matches the config - rArgs := aws.StringValueSlice(ba.Args) - if *ba.Name == "test" { - ran = true - if !reflect.DeepEqual(argsInts, rArgs) { - return fmt.Errorf("Error matching Bootstrap args:\n\texpected: %#v\n\tgot: %#v", argsInts, rArgs) - } - } else if *ba.Name == "runif" { - ran = true - if !reflect.DeepEqual(argsStrings, rArgs) { - return fmt.Errorf("Error matching Bootstrap args:\n\texpected: %#v\n\tgot: %#v", argsStrings, rArgs) - } - } - } - - if !ran { - return fmt.Errorf("Expected to compare bootstrap actions, but no checks were ran") - } - - return nil - } -} - func testAccCheckAWSEmrDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).emrconn @@ -1741,103 +1726,153 @@ func testAccEmrDeleteManagedSecurityGroup(conn *ec2.EC2, securityGroup *ec2.Secu return err } -func testAccAWSEmrClusterConfigBaseVpc(mapPublicIpOnLaunch bool) string { - return fmt.Sprintf(` -data "aws_availability_zones" "available" { - # Many instance types are not available in this availability zone - blacklisted_zone_ids = ["usw2-az4"] - state = "available" +func testAccAWSEmrComposeConfig(mapPublicIPOnLaunch bool, config ...string) string { + return composeConfig(append(config, testAccAWSEmrClusterConfigBaseVpc(mapPublicIPOnLaunch))...) } -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - enable_dns_hostnames = true +func testAccAWSEmrClusterConfig_bootstrap(r string) string { + return testAccAWSEmrComposeConfig(false, + testAccAWSEmrClusterConfigIAMServiceRoleBase(r), + testAccAWSEmrClusterConfigIAMInstanceProfileBase(r), + testAccAWSEmrClusterConfigBootstrapActionBucket(r), + fmt.Sprintf(` +resource "aws_emr_cluster" "test" { + name = "%[1]s" + release_label = "emr-5.0.0" + applications = ["Hadoop", "Hive"] + log_uri = "s3n://terraform/testlog/" + master_instance_type = "c4.large" + core_instance_type = "c4.large" + core_instance_count = 1 - tags = { - Name = "tf-acc-test-emr-cluster" - } -} + service_role = "${aws_iam_role.emr_service.arn}" + depends_on = [ + "aws_route_table_association.test", + "aws_iam_role_policy_attachment.emr_service", + "aws_iam_role_policy_attachment.emr_instance_profile", + ] -resource "aws_internet_gateway" "test" { - vpc_id = "${aws_vpc.test.id}" - - tags = { - Name = "tf-acc-test-emr-cluster" - } -} - -resource "aws_security_group" "test" { - vpc_id = "${aws_vpc.test.id}" - - ingress { - from_port = 0 - protocol = "-1" - self = true - to_port = 0 + ec2_attributes { + subnet_id = "${aws_subnet.test.id}" + emr_managed_master_security_group = "${aws_security_group.test.id}" + emr_managed_slave_security_group = "${aws_security_group.test.id}" + instance_profile = "${aws_iam_instance_profile.emr_instance_profile.arn}" } - egress { - cidr_blocks = ["0.0.0.0/0"] - from_port = 0 - protocol = "-1" - to_port = 0 + bootstrap_action { + path = "s3://elasticmapreduce/bootstrap-actions/run-if" + name = "runif" + args = ["instance.isMaster=true", "echo running on master node"] } - tags = { - Name = "tf-acc-test-emr-cluster" - } + bootstrap_action { + path = "s3://${aws_s3_bucket_object.testobject.bucket}/${aws_s3_bucket_object.testobject.key}" + name = "test" - # EMR will modify ingress rules - lifecycle { - ignore_changes = ["ingress"] + args = ["1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + ] } } +`, r), + ) +} -resource "aws_subnet" "test" { - availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.0.0/24" - map_public_ip_on_launch = %[1]t - vpc_id = "${aws_vpc.test.id}" +func testAccAWSEmrClusterConfig_bootstrapAdd(r string) string { + return testAccAWSEmrComposeConfig(false, + testAccAWSEmrClusterConfigIAMServiceRoleBase(r), + testAccAWSEmrClusterConfigIAMInstanceProfileBase(r), + testAccAWSEmrClusterConfigBootstrapActionBucket(r), + fmt.Sprintf(` +resource "aws_emr_cluster" "test" { + name = "%[1]s" + release_label = "emr-5.0.0" + applications = ["Hadoop", "Hive"] + log_uri = "s3n://terraform/testlog/" + master_instance_type = "c4.large" + core_instance_type = "c4.large" + core_instance_count = 1 - tags = { - Name = "tf-acc-test-emr-cluster" - } -} + service_role = "${aws_iam_role.emr_service.arn}" + depends_on = [ + "aws_route_table_association.test", + "aws_iam_role_policy_attachment.emr_service", + "aws_iam_role_policy_attachment.emr_instance_profile", + ] -resource "aws_route_table" "test" { - vpc_id = "${aws_vpc.test.id}" + ec2_attributes { + subnet_id = "${aws_subnet.test.id}" + emr_managed_master_security_group = "${aws_security_group.test.id}" + emr_managed_slave_security_group = "${aws_security_group.test.id}" + instance_profile = "${aws_iam_instance_profile.emr_instance_profile.arn}" + } - route { - cidr_block = "0.0.0.0/0" - gateway_id = "${aws_internet_gateway.test.id}" + bootstrap_action { + path = "s3://elasticmapreduce/bootstrap-actions/run-if" + name = "runif" + args = ["instance.isMaster=true", "echo running on master node"] } -} + bootstrap_action { + path = "s3://${aws_s3_bucket_object.testobject.bucket}/${aws_s3_bucket_object.testobject.key}" + name = "test" -resource "aws_route_table_association" "test" { - route_table_id = "${aws_route_table.test.id}" - subnet_id = "${aws_subnet.test.id}" + args = ["1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + ] + } + bootstrap_action { + path = "s3://elasticmapreduce/bootstrap-actions/run-if" + name = "runif-2" + args = ["instance.isMaster=true", "echo also running on master node"] + } } -`, mapPublicIpOnLaunch) +`, r), + ) } -func testAccAWSEmrClusterConfig_bootstrap(r string) string { - return testAccAWSEmrClusterConfigBaseVpc(false) + fmt.Sprintf(` +func testAccAWSEmrClusterConfig_bootstrapReorder(r string) string { + return testAccAWSEmrComposeConfig(false, + testAccAWSEmrClusterConfigIAMServiceRoleBase(r), + testAccAWSEmrClusterConfigIAMInstanceProfileBase(r), + testAccAWSEmrClusterConfigBootstrapActionBucket(r), + fmt.Sprintf(` resource "aws_emr_cluster" "test" { - name = "%s" + name = "%[1]s" release_label = "emr-5.0.0" applications = ["Hadoop", "Hive"] log_uri = "s3n://terraform/testlog/" master_instance_type = "c4.large" core_instance_type = "c4.large" core_instance_count = 1 - service_role = "${aws_iam_role.iam_emr_default_role.arn}" - depends_on = ["aws_route_table_association.test"] + + service_role = "${aws_iam_role.emr_service.arn}" + depends_on = [ + "aws_route_table_association.test", + "aws_iam_role_policy_attachment.emr_service", + "aws_iam_role_policy_attachment.emr_instance_profile", + ] ec2_attributes { subnet_id = "${aws_subnet.test.id}" emr_managed_master_security_group = "${aws_security_group.test.id}" emr_managed_slave_security_group = "${aws_security_group.test.id}" - instance_profile = "${aws_iam_instance_profile.emr_profile.arn}" + instance_profile = "${aws_iam_instance_profile.emr_instance_profile.arn}" } bootstrap_action { @@ -1846,6 +1881,12 @@ resource "aws_emr_cluster" "test" { args = ["instance.isMaster=true", "echo running on master node"] } + bootstrap_action { + path = "s3://elasticmapreduce/bootstrap-actions/run-if" + name = "runif-2" + args = ["instance.isMaster=true", "echo also running on master node"] + } + bootstrap_action { path = "s3://${aws_s3_bucket_object.testobject.bucket}/${aws_s3_bucket_object.testobject.key}" name = "test" @@ -1863,202 +1904,257 @@ resource "aws_emr_cluster" "test" { ] } } - -resource "aws_iam_instance_profile" "emr_profile" { - name = "%s_profile" - role = "${aws_iam_role.iam_emr_profile_role.name}" +`, r), + ) } -resource "aws_iam_role" "iam_emr_default_role" { - name = "%s_default_role" +func testAccAWSEmrClusterConfig(r string) string { + return testAccAWSEmrComposeConfig(false, + testAccAWSEmrClusterConfigIAMServiceRoleBase(r), + testAccAWSEmrClusterConfigIAMInstanceProfileBase(r), + testAccAWSEmrClusterConfigIAMAutoscalingRole(r), + fmt.Sprintf(` +resource "aws_emr_cluster" "tf-test-cluster" { + name = "%[1]s" + release_label = "emr-4.6.0" + applications = ["Spark"] - assume_role_policy = < 0 { opts.TagSpecifications = ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypeVpcFlowLog) } @@ -180,6 +194,7 @@ func resourceAwsLogFlowCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig opts := &ec2.DescribeFlowLogsInput{ FlowLogIds: []*string{aws.String(d.Id())}, @@ -205,6 +220,7 @@ func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { d.Set("log_group_name", fl.LogGroupName) d.Set("iam_role_arn", fl.DeliverLogsPermissionArn) d.Set("log_format", fl.LogFormat) + d.Set("max_aggregation_interval", fl.MaxAggregationInterval) var resourceKey string if strings.HasPrefix(*fl.ResourceId, "vpc-") { resourceKey = "vpc_id" @@ -217,7 +233,7 @@ func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { d.Set(resourceKey, fl.ResourceId) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(fl.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(fl.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_flow_log_test.go b/aws/resource_aws_flow_log_test.go index 67207403aee..9b5d912f930 100644 --- a/aws/resource_aws_flow_log_test.go +++ b/aws/resource_aws_flow_log_test.go @@ -2,16 +2,69 @@ package aws import ( "fmt" + "log" "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_flow_log", &resource.Sweeper{ + Name: "aws_flow_log", + F: testSweepFlowLogs, + }) +} + +func testSweepFlowLogs(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).ec2conn + var sweeperErrs *multierror.Error + + err = conn.DescribeFlowLogsPages(&ec2.DescribeFlowLogsInput{}, func(page *ec2.DescribeFlowLogsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, flowLog := range page.FlowLogs { + id := aws.StringValue(flowLog.FlowLogId) + + log.Printf("[INFO] Deleting Flow Log: %s", id) + _, err := conn.DeleteFlowLogs(&ec2.DeleteFlowLogsInput{ + FlowLogIds: aws.StringSlice([]string{id}), + }) + if isAWSErr(err, "InvalidFlowLogId.NotFound", "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting Flow Log (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Flow Logs sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Flow Logs: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSFlowLog_VPCID(t *testing.T) { var flowLog ec2.FlowLog cloudwatchLogGroupResourceName := "aws_cloudwatch_log_group.test" @@ -34,6 +87,7 @@ func TestAccAWSFlowLog_VPCID(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "log_destination", ""), resource.TestCheckResourceAttr(resourceName, "log_destination_type", "cloud-watch-logs"), resource.TestCheckResourceAttrPair(resourceName, "log_group_name", cloudwatchLogGroupResourceName, "name"), + resource.TestCheckResourceAttr(resourceName, "max_aggregation_interval", "600"), resource.TestCheckResourceAttr(resourceName, "traffic_type", "ALL"), resource.TestCheckResourceAttrPair(resourceName, "vpc_id", vpcResourceName, "id"), ), @@ -105,6 +159,7 @@ func TestAccAWSFlowLog_SubnetID(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "log_destination", ""), resource.TestCheckResourceAttr(resourceName, "log_destination_type", "cloud-watch-logs"), resource.TestCheckResourceAttrPair(resourceName, "log_group_name", cloudwatchLogGroupResourceName, "name"), + resource.TestCheckResourceAttr(resourceName, "max_aggregation_interval", "600"), resource.TestCheckResourceAttrPair(resourceName, "subnet_id", subnetResourceName, "id"), resource.TestCheckResourceAttr(resourceName, "traffic_type", "ALL"), ), @@ -195,6 +250,33 @@ func TestAccAWSFlowLog_LogDestinationType_S3_Invalid(t *testing.T) { }) } +func TestAccAWSFlowLog_LogDestinationType_MaxAggregationInterval(t *testing.T) { + var flowLog ec2.FlowLog + resourceName := "aws_flow_log.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckFlowLogDestroy, + Steps: []resource.TestStep{ + { + Config: testAccFlowLogConfig_MaxAggregationInterval(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckFlowLogExists(resourceName, &flowLog), + testAccCheckAWSFlowLogAttributes(&flowLog), + resource.TestCheckResourceAttr(resourceName, "max_aggregation_interval", "60"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSFlowLog_tags(t *testing.T) { var flowLog ec2.FlowLog resourceName := "aws_flow_log.test" @@ -491,6 +573,7 @@ resource "aws_flow_log" "test" { } `, rName) } + func testAccFlowLogConfig_LogFormat(rName string) string { return testAccFlowLogConfigBase(rName) + fmt.Sprintf(` resource "aws_iam_role" "test" { @@ -523,7 +606,7 @@ resource "aws_s3_bucket" "test" { bucket = %[1]q force_destroy = true } - + resource "aws_flow_log" "test" { log_destination = "${aws_s3_bucket.test.arn}" @@ -621,3 +704,43 @@ resource "aws_flow_log" "test" { } `, rName, tagKey1, tagValue1, tagKey2, tagValue2) } + +func testAccFlowLogConfig_MaxAggregationInterval(rName string) string { + return testAccFlowLogConfigBase(rName) + fmt.Sprintf(` +resource "aws_iam_role" "test" { + name = %[1]q + + assume_role_policy = < 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 128), + validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]*$`), "must match [\\w+=,.@-]"), + ), }, "name_prefix": { @@ -65,19 +57,10 @@ func resourceAwsIamInstanceProfile() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8196-L8201 - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters, name is limited to 128", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 64), + validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]*$`), "must match [\\w+=,.@-]"), + ), }, "path": { @@ -197,8 +180,6 @@ func instanceProfileSetRoles(d *schema.ResourceData, iamconn *iam.IAM) error { currentRoles := schema.CopySet(oldRoles) - d.Partial(true) - for _, role := range oldRoles.Difference(newRoles).List() { err := instanceProfileRemoveRole(iamconn, d.Id(), role.(string)) if err != nil { @@ -206,7 +187,6 @@ func instanceProfileSetRoles(d *schema.ResourceData, iamconn *iam.IAM) error { } currentRoles.Remove(role) d.Set("roles", currentRoles) - d.SetPartial("roles") } for _, role := range newRoles.Difference(oldRoles).List() { @@ -216,11 +196,8 @@ func instanceProfileSetRoles(d *schema.ResourceData, iamconn *iam.IAM) error { } currentRoles.Add(role) d.Set("roles", currentRoles) - d.SetPartial("roles") } - d.Partial(false) - return nil } @@ -246,8 +223,6 @@ func instanceProfileRemoveAllRoles(d *schema.ResourceData, iamconn *iam.IAM) err func resourceAwsIamInstanceProfileUpdate(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn - d.Partial(true) - if d.HasChange("role") { oldRole, newRole := d.GetChange("role") @@ -264,16 +239,12 @@ func resourceAwsIamInstanceProfileUpdate(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error adding role %s to IAM instance profile %s: %s", newRole.(string), d.Id(), err) } } - - d.SetPartial("role") } if d.HasChange("roles") { return instanceProfileSetRoles(d, iamconn) } - d.Partial(false) - return nil } diff --git a/aws/resource_aws_iam_openid_connect_provider.go b/aws/resource_aws_iam_openid_connect_provider.go index 2f6f6523306..c146bf3ff16 100644 --- a/aws/resource_aws_iam_openid_connect_provider.go +++ b/aws/resource_aws_iam_openid_connect_provider.go @@ -2,9 +2,9 @@ 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/iam" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -16,7 +16,6 @@ func resourceAwsIamOpenIDConnectProvider() *schema.Resource { Read: resourceAwsIamOpenIDConnectProviderRead, Update: resourceAwsIamOpenIDConnectProviderUpdate, Delete: resourceAwsIamOpenIDConnectProviderDelete, - Exists: resourceAwsIamOpenIDConnectProviderExists, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -59,10 +58,10 @@ func resourceAwsIamOpenIDConnectProviderCreate(d *schema.ResourceData, meta inte out, err := iamconn.CreateOpenIDConnectProvider(input) if err != nil { - return err + return fmt.Errorf("error creating IAM OIDC Provider: %w", err) } - d.SetId(*out.OpenIDConnectProviderArn) + d.SetId(aws.StringValue(out.OpenIDConnectProviderArn)) return resourceAwsIamOpenIDConnectProviderRead(d, meta) } @@ -74,8 +73,13 @@ func resourceAwsIamOpenIDConnectProviderRead(d *schema.ResourceData, meta interf OpenIDConnectProviderArn: aws.String(d.Id()), } out, err := iamconn.GetOpenIDConnectProvider(input) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM OIDC Provider (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } if err != nil { - return err + return fmt.Errorf("error reading IAM OIDC Provider (%s): %w", d.Id(), err) } d.Set("arn", d.Id()) @@ -97,7 +101,7 @@ func resourceAwsIamOpenIDConnectProviderUpdate(d *schema.ResourceData, meta inte _, err := iamconn.UpdateOpenIDConnectProviderThumbprint(input) if err != nil { - return err + return fmt.Errorf("error updating IAM OIDC Provider (%s) thumbprint: %w", d.Id(), err) } } @@ -111,30 +115,12 @@ func resourceAwsIamOpenIDConnectProviderDelete(d *schema.ResourceData, meta inte OpenIDConnectProviderArn: aws.String(d.Id()), } _, err := iamconn.DeleteOpenIDConnectProvider(input) - - if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "NoSuchEntity" { - return nil - } - return fmt.Errorf("Error deleting platform application %s", err) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil } - - return nil -} - -func resourceAwsIamOpenIDConnectProviderExists(d *schema.ResourceData, meta interface{}) (bool, error) { - iamconn := meta.(*AWSClient).iamconn - - input := &iam.GetOpenIDConnectProviderInput{ - OpenIDConnectProviderArn: aws.String(d.Id()), - } - _, err := iamconn.GetOpenIDConnectProvider(input) if err != nil { - if err, ok := err.(awserr.Error); ok && err.Code() == "NoSuchEntity" { - return false, nil - } - return true, err + return fmt.Errorf("error deleting IAM OIDC Provider (%s): %w", d.Id(), err) } - return true, nil + return nil } diff --git a/aws/resource_aws_iam_policy.go b/aws/resource_aws_iam_policy.go index 79185240f4a..f51a2a61524 100644 --- a/aws/resource_aws_iam_policy.go +++ b/aws/resource_aws_iam_policy.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) func resourceAwsIamPolicy() *schema.Resource { @@ -47,38 +48,20 @@ func resourceAwsIamPolicy() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 128 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 128 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 128), + validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]*$`), "must match [\\w+=,.@-]"), + ), }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 96 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 96 characters, name is limited to 128", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 96), + validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]*$`), "must match [\\w+=,.@-]"), + ), }, "arn": { Type: schema.TypeString, diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index 60f03f8dc02..1fe4d34ec99 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -43,19 +43,10 @@ func resourceAwsIamRole() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 64), + validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]*$`), "must match [\\w+=,.@-]"), + ), }, "name_prefix": { @@ -63,19 +54,10 @@ func resourceAwsIamRole() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 - value := v.(string) - if len(value) > 32 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters, name is limited to 64", k)) - } - if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must match [\\w+=,.@-]", k)) - } - return - }, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 32), + validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]*$`), "must match [\\w+=,.@-]"), + ), }, "path": { @@ -101,7 +83,7 @@ func resourceAwsIamRole() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "force_detach_policies": { @@ -190,6 +172,7 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsIamRoleRead(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig request := &iam.GetRoleInput{ RoleName: aws.String(d.Id()), @@ -226,7 +209,7 @@ func resourceAwsIamRoleRead(d *schema.ResourceData, meta interface{}) error { } d.Set("unique_id", role.RoleId) - if err := d.Set("tags", keyvaluetags.IamKeyValueTags(role.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.IamKeyValueTags(role.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index ab53ef0ae1b..345b1d8f9a3 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -53,7 +53,7 @@ func testSweepIamRoles(region string) error { prefixes := []string{ "ecs_instance_role", "ecs_tf", - "EMR_AutoScaling_DefaultRole", + "EMR_AutoScaling_DefaultRole_", "iam_emr", "terraform-", "test", diff --git a/aws/resource_aws_iam_saml_provider.go b/aws/resource_aws_iam_saml_provider.go index d114c881c00..d33c5a89c72 100644 --- a/aws/resource_aws_iam_saml_provider.go +++ b/aws/resource_aws_iam_saml_provider.go @@ -3,13 +3,12 @@ package aws import ( "fmt" "log" - "regexp" + "strings" "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) @@ -47,14 +46,14 @@ func resourceAwsIamSamlProvider() *schema.Resource { } func resourceAwsIamSamlProviderCreate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn + conn := meta.(*AWSClient).iamconn input := &iam.CreateSAMLProviderInput{ Name: aws.String(d.Get("name").(string)), SAMLMetadataDocument: aws.String(d.Get("saml_metadata_document").(string)), } - out, err := iamconn.CreateSAMLProvider(input) + out, err := conn.CreateSAMLProvider(input) if err != nil { return err } @@ -65,14 +64,14 @@ func resourceAwsIamSamlProviderCreate(d *schema.ResourceData, meta interface{}) } func resourceAwsIamSamlProviderRead(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn + conn := meta.(*AWSClient).iamconn input := &iam.GetSAMLProviderInput{ SAMLProviderArn: aws.String(d.Id()), } - out, err := iamconn.GetSAMLProvider(input) + out, err := conn.GetSAMLProvider(input) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { log.Printf("[WARN] IAM SAML Provider %q not found.", d.Id()) d.SetId("") return nil @@ -81,7 +80,7 @@ func resourceAwsIamSamlProviderRead(d *schema.ResourceData, meta interface{}) er } d.Set("arn", d.Id()) - name, err := extractNameFromIAMSamlProviderArn(d.Id(), meta.(*AWSClient).partition) + name, err := extractNameFromIAMSamlProviderArn(d.Id()) if err != nil { return err } @@ -93,13 +92,13 @@ func resourceAwsIamSamlProviderRead(d *schema.ResourceData, meta interface{}) er } func resourceAwsIamSamlProviderUpdate(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn + conn := meta.(*AWSClient).iamconn input := &iam.UpdateSAMLProviderInput{ SAMLProviderArn: aws.String(d.Id()), SAMLMetadataDocument: aws.String(d.Get("saml_metadata_document").(string)), } - _, err := iamconn.UpdateSAMLProvider(input) + _, err := conn.UpdateSAMLProvider(input) if err != nil { return err } @@ -108,22 +107,23 @@ func resourceAwsIamSamlProviderUpdate(d *schema.ResourceData, meta interface{}) } func resourceAwsIamSamlProviderDelete(d *schema.ResourceData, meta interface{}) error { - iamconn := meta.(*AWSClient).iamconn + conn := meta.(*AWSClient).iamconn input := &iam.DeleteSAMLProviderInput{ SAMLProviderArn: aws.String(d.Id()), } - _, err := iamconn.DeleteSAMLProvider(input) + _, err := conn.DeleteSAMLProvider(input) return err } -func extractNameFromIAMSamlProviderArn(arn, partition string) (string, error) { - // arn:aws:iam::123456789012:saml-provider/tf-salesforce-test - r := regexp.MustCompile(fmt.Sprintf("^arn:%s:iam::[0-9]{12}:saml-provider/(.+)$", partition)) - submatches := r.FindStringSubmatch(arn) - if len(submatches) != 2 { - return "", fmt.Errorf("Unable to extract name from a given ARN: %q", arn) +func extractNameFromIAMSamlProviderArn(samlArn string) (string, error) { + parsedArn, err := arn.Parse(samlArn) + if err != nil { + return "", fmt.Errorf("Unable to extract name from a given ARN: %q", samlArn) } - return submatches[1], nil + + name := strings.TrimPrefix(parsedArn.Resource, "saml-provider/") + + return name, nil } diff --git a/aws/resource_aws_iam_saml_provider_test.go b/aws/resource_aws_iam_saml_provider_test.go index 28b60b6f8ab..fe6aadf2b64 100644 --- a/aws/resource_aws_iam_saml_provider_test.go +++ b/aws/resource_aws_iam_saml_provider_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -24,6 +25,7 @@ func TestAccAWSIAMSamlProvider_basic(t *testing.T) { Config: testAccIAMSamlProviderConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckIAMSamlProviderExists(resourceName), + testAccMatchResourceAttrGlobalARN(resourceName, "arn", "iam", regexp.MustCompile(`saml-provider/.+`)), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttrSet(resourceName, "saml_metadata_document"), ), @@ -45,8 +47,29 @@ func TestAccAWSIAMSamlProvider_basic(t *testing.T) { }) } +func TestAccAWSIAMSamlProvider_disappears(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_saml_provider.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckIAMSamlProviderDestroy, + Steps: []resource.TestStep{ + { + Config: testAccIAMSamlProviderConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckIAMSamlProviderExists(resourceName), + testAccCheckResourceDisappears(testAccProvider, resourceAwsIamSamlProvider(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckIAMSamlProviderDestroy(s *terraform.State) error { - iamconn := testAccProvider.Meta().(*AWSClient).iamconn + conn := testAccProvider.Meta().(*AWSClient).iamconn for _, rs := range s.RootModule().Resources { if rs.Type != "aws_iam_saml_provider" { @@ -56,7 +79,7 @@ func testAccCheckIAMSamlProviderDestroy(s *terraform.State) error { input := &iam.GetSAMLProviderInput{ SAMLProviderArn: aws.String(rs.Primary.ID), } - out, err := iamconn.GetSAMLProvider(input) + out, err := conn.GetSAMLProvider(input) if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { continue @@ -85,8 +108,8 @@ func testAccCheckIAMSamlProviderExists(id string) resource.TestCheckFunc { return fmt.Errorf("No ID is set") } - iamconn := testAccProvider.Meta().(*AWSClient).iamconn - _, err := iamconn.GetSAMLProvider(&iam.GetSAMLProviderInput{ + conn := testAccProvider.Meta().(*AWSClient).iamconn + _, err := conn.GetSAMLProvider(&iam.GetSAMLProviderInput{ SAMLProviderArn: aws.String(rs.Primary.ID), }) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index 79d0fede53b..438c7165d8c 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -43,9 +43,12 @@ func resourceAwsIamUser() *schema.Resource { Computed: true, }, "name": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsIamUserName, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringMatch( + regexp.MustCompile(`^[0-9A-Za-z=,.@\-_+]+$`), + fmt.Sprintf("must only contain alphanumeric characters, hyphens, underscores, commas, periods, @ symbols, plus and equals signs"), + ), }, "path": { Type: schema.TypeString, @@ -99,6 +102,7 @@ func resourceAwsIamUserCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsIamUserRead(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig request := &iam.GetUserInput{ UserName: aws.String(d.Id()), @@ -128,7 +132,7 @@ func resourceAwsIamUserRead(d *schema.ResourceData, meta interface{}) error { } d.Set("unique_id", output.User.UserId) - if err := d.Set("tags", keyvaluetags.IamKeyValueTags(output.User.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.IamKeyValueTags(output.User.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -224,6 +228,10 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { if err := deleteAwsIamUserLoginProfile(iamconn, d.Id()); err != nil { return fmt.Errorf("error removing IAM User (%s) login profile: %s", d.Id(), err) } + + if err := deleteAwsIamUserSigningCertificates(iamconn, d.Id()); err != nil { + return fmt.Errorf("error removing IAM User (%s) signing certificate: %s", d.Id(), err) + } } deleteUserInput := &iam.DeleteUserInput{ @@ -244,16 +252,6 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { return nil } -func validateAwsIamUserName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z=,.@\-_+]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters, hyphens, underscores, commas, periods, @ symbols, plus and equals signs allowed in %q: %q", - k, value)) - } - return -} - func deleteAwsIamUserGroupMemberships(conn *iam.IAM, username string) error { var groups []string listGroups := &iam.ListGroupsForUserInput{ @@ -436,3 +434,33 @@ func deleteAwsIamUserAccessKeys(svc *iam.IAM, username string) error { return nil } + +func deleteAwsIamUserSigningCertificates(svc *iam.IAM, userName string) error { + var certificateIDList []string + + listInput := &iam.ListSigningCertificatesInput{ + UserName: aws.String(userName), + } + err := svc.ListSigningCertificatesPages(listInput, + func(page *iam.ListSigningCertificatesOutput, lastPage bool) bool { + for _, c := range page.Certificates { + certificateIDList = append(certificateIDList, aws.StringValue(c.CertificateId)) + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("Error removing signing certificates of user %s: %s", userName, err) + } + + for _, c := range certificateIDList { + _, err := svc.DeleteSigningCertificate(&iam.DeleteSigningCertificateInput{ + CertificateId: aws.String(c), + UserName: aws.String(userName), + }) + if err != nil { + return fmt.Errorf("Error deleting signing certificate %s: %s", c, err) + } + } + + return nil +} diff --git a/aws/resource_aws_iam_user_login_profile.go b/aws/resource_aws_iam_user_login_profile.go index b56e4ee9d20..38ff10a3277 100644 --- a/aws/resource_aws_iam_user_login_profile.go +++ b/aws/resource_aws_iam_user_login_profile.go @@ -3,6 +3,7 @@ package aws import ( "bytes" "crypto/rand" + "errors" "fmt" "log" "math/big" @@ -76,7 +77,7 @@ const ( // generateIAMPassword generates a random password of a given length, matching the // most restrictive iam password policy. -func generateIAMPassword(length int) string { +func generateIAMPassword(length int) (string, error) { const charset = charLower + charUpper + charNumbers + charSymbols result := make([]byte, length) @@ -93,10 +94,10 @@ func generateIAMPassword(length int) string { for i := range result { r, err := rand.Int(rand.Reader, charsetSize) if err != nil { - panic(err) + return "", err } if !r.IsInt64() { - panic("rand.Int() not representable as an Int64") + return "", errors.New("rand.Int() not representable as an Int64") } result[i] = charset[r.Int64()] @@ -106,10 +107,10 @@ func generateIAMPassword(length int) string { continue } - return string(result) + return string(result), nil } - panic("failed to generate acceptable password") + return "", errors.New("failed to generate acceptable password") } // Check the generated password contains all character classes listed in the @@ -132,7 +133,10 @@ func resourceAwsIamUserLoginProfileCreate(d *schema.ResourceData, meta interface passwordResetRequired := d.Get("password_reset_required").(bool) passwordLength := d.Get("password_length").(int) - initialPassword := generateIAMPassword(passwordLength) + initialPassword, err := generateIAMPassword(passwordLength) + if err != nil { + return err + } fingerprint, encrypted, err := encryption.EncryptValue(encryptionKey, initialPassword, "Password") if err != nil { diff --git a/aws/resource_aws_iam_user_login_profile_test.go b/aws/resource_aws_iam_user_login_profile_test.go index e7b42be88a9..9dbef6998a9 100644 --- a/aws/resource_aws_iam_user_login_profile_test.go +++ b/aws/resource_aws_iam_user_login_profile_test.go @@ -19,12 +19,18 @@ import ( ) func TestGenerateIAMPassword(t *testing.T) { - p := generateIAMPassword(6) + p, err := generateIAMPassword(6) + if err != nil { + t.Fatalf(err.Error()) + } if len(p) != 6 { t.Fatalf("expected a 6 character password, got: %q", p) } - p = generateIAMPassword(128) + p, err = generateIAMPassword(128) + if err != nil { + t.Fatalf(err.Error()) + } if len(p) != 128 { t.Fatalf("expected a 128 character password, got: %q", p) } @@ -257,9 +263,13 @@ func testDecryptPasswordAndTest(nProfile, nAccessKey, key string) resource.TestC return resource.Retry(2*time.Minute, func() *resource.RetryError { iamAsCreatedUser := iam.New(iamAsCreatedUserSession) + newPassword, err := generateIAMPassword(20) + if err != nil { + return resource.NonRetryableError(err) + } _, err = iamAsCreatedUser.ChangePassword(&iam.ChangePasswordInput{ OldPassword: aws.String(decryptedPassword.String()), - NewPassword: aws.String(generateIAMPassword(20)), + NewPassword: aws.String(newPassword), }) if err != nil { // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. diff --git a/aws/resource_aws_iam_user_test.go b/aws/resource_aws_iam_user_test.go index eb6e2dad797..59ee3591481 100644 --- a/aws/resource_aws_iam_user_test.go +++ b/aws/resource_aws_iam_user_test.go @@ -18,43 +18,6 @@ import ( "github.com/pquerna/otp/totp" ) -func TestValidateIamUserName(t *testing.T) { - validNames := []string{ - "test-user", - "test_user", - "testuser123", - "TestUser", - "Test-User", - "test.user", - "test.123,user", - "testuser@hashicorp", - "test+user@hashicorp.com", - } - for _, v := range validNames { - _, errors := validateAwsIamUserName(v, "name") - if len(errors) != 0 { - t.Fatalf("%q should be a valid IAM User name: %q", v, errors) - } - } - - invalidNames := []string{ - "!", - "/", - " ", - ":", - ";", - "test name", - "/slash-at-the-beginning", - "slash-at-the-end/", - } - for _, v := range invalidNames { - _, errors := validateAwsIamUserName(v, "name") - if len(errors) == 0 { - t.Fatalf("%q should be an invalid IAM User name", v) - } - } -} - func init() { resource.AddTestSweepers("aws_iam_user", &resource.Sweeper{ Name: "aws_iam_user", @@ -408,6 +371,35 @@ func TestAccAWSUser_ForceDestroy_SSHKey(t *testing.T) { }) } +func TestAccAWSUser_ForceDestroy_SigningCertificate(t *testing.T) { + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserConfigForceDestroy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + testAccCheckAWSUserUploadSigningCertificate(&user), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "force_destroy"}, + }, + }, + }) +} + func TestAccAWSUser_nameChange(t *testing.T) { var conf iam.GetUserOutput @@ -713,9 +705,12 @@ func testAccCheckAWSUserCreatesAccessKey(getUserOutput *iam.GetUserOutput) resou func testAccCheckAWSUserCreatesLoginProfile(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { return func(s *terraform.State) error { iamconn := testAccProvider.Meta().(*AWSClient).iamconn - + password, err := generateIAMPassword(32) + if err != nil { + return err + } input := &iam.CreateLoginProfileInput{ - Password: aws.String(generateIAMPassword(32)), + Password: aws.String(password), UserName: getUserOutput.User.UserName, } @@ -791,6 +786,27 @@ func testAccCheckAWSUserUploadsSSHKey(getUserOutput *iam.GetUserOutput) resource } } +func testAccCheckAWSUserUploadSigningCertificate(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + iamconn := testAccProvider.Meta().(*AWSClient).iamconn + + signingCertificate, err := ioutil.ReadFile("./test-fixtures/iam-ssl-unix-line-endings.pem") + if err != nil { + return fmt.Errorf("error reading signing certificate fixture: %s", err) + } + input := &iam.UploadSigningCertificateInput{ + CertificateBody: aws.String(string(signingCertificate)), + UserName: getUserOutput.User.UserName, + } + + if _, err := iamconn.UploadSigningCertificate(input); err != nil { + return fmt.Errorf("error uploading IAM User (%s) Signing Certificate : %s", aws.StringValue(getUserOutput.User.UserName), err) + } + + return nil + } +} + func testAccAWSUserConfig(rName, path string) string { return fmt.Sprintf(` resource "aws_iam_user" "user" { diff --git a/aws/resource_aws_inspector_assessment_template.go b/aws/resource_aws_inspector_assessment_template.go index a00f4da565b..0acc5b589b9 100644 --- a/aws/resource_aws_inspector_assessment_template.go +++ b/aws/resource_aws_inspector_assessment_template.go @@ -1,19 +1,25 @@ 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/aws/awserr" "github.com/aws/aws-sdk-go/service/inspector" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) func resourceAWSInspectorAssessmentTemplate() *schema.Resource { return &schema.Resource{ Create: resourceAwsInspectorAssessmentTemplateCreate, Read: resourceAwsInspectorAssessmentTemplateRead, + Update: resourceAwsInspectorAssessmentTemplateUpdate, Delete: resourceAwsInspectorAssessmentTemplateDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -29,7 +35,6 @@ func resourceAWSInspectorAssessmentTemplate() *schema.Resource { "arn": { Type: schema.TypeString, Computed: true, - ForceNew: true, }, "duration": { Type: schema.TypeInt, @@ -43,6 +48,7 @@ func resourceAWSInspectorAssessmentTemplate() *schema.Resource { Required: true, ForceNew: true, }, + "tags": tagsSchema(), }, } } @@ -50,57 +56,86 @@ func resourceAWSInspectorAssessmentTemplate() *schema.Resource { func resourceAwsInspectorAssessmentTemplateCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).inspectorconn - rules := []*string{} - if attr := d.Get("rules_package_arns").(*schema.Set); attr.Len() > 0 { - rules = expandStringList(attr.List()) + req := &inspector.CreateAssessmentTemplateInput{ + AssessmentTargetArn: aws.String(d.Get("target_arn").(string)), + AssessmentTemplateName: aws.String(d.Get("name").(string)), + DurationInSeconds: aws.Int64(int64(d.Get("duration").(int))), + RulesPackageArns: expandStringSet(d.Get("rules_package_arns").(*schema.Set)), } - targetArn := d.Get("target_arn").(string) - templateName := d.Get("name").(string) - duration := int64(d.Get("duration").(int)) - - resp, err := conn.CreateAssessmentTemplate(&inspector.CreateAssessmentTemplateInput{ - AssessmentTargetArn: aws.String(targetArn), - AssessmentTemplateName: aws.String(templateName), - DurationInSeconds: aws.Int64(duration), - RulesPackageArns: rules, - }) + log.Printf("[DEBUG] Creating Inspector assessment template: %s", req) + resp, err := conn.CreateAssessmentTemplate(req) if err != nil { - return err + return fmt.Errorf("error creating Inspector assessment template: %s", err) } - log.Printf("[DEBUG] Inspector Assessment Template %s created", *resp.AssessmentTemplateArn) - d.Set("arn", resp.AssessmentTemplateArn) + d.SetId(aws.StringValue(resp.AssessmentTemplateArn)) - d.SetId(*resp.AssessmentTemplateArn) + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.InspectorUpdateTags(conn, d.Id(), nil, v); err != nil { + return fmt.Errorf("error adding Inspector assessment template (%s) tags: %s", d.Id(), err) + } + } return resourceAwsInspectorAssessmentTemplateRead(d, meta) } func resourceAwsInspectorAssessmentTemplateRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).inspectorconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeAssessmentTemplates(&inspector.DescribeAssessmentTemplatesInput{ - AssessmentTemplateArns: []*string{ - aws.String(d.Id()), - }, - }, - ) + AssessmentTemplateArns: aws.StringSlice([]string{d.Id()}), + }) if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "InvalidInputException" { - return nil - } else { - log.Printf("[ERROR] Error finding Inspector Assessment Template: %s", err) - return err - } + return fmt.Errorf("error reading Inspector assessment template (%s): %s", d.Id(), err) + } + + if resp.AssessmentTemplates == nil || len(resp.AssessmentTemplates) == 0 { + log.Printf("[WARN] Inspector assessment template (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + template := resp.AssessmentTemplates[0] + + arn := aws.StringValue(template.Arn) + d.Set("arn", arn) + d.Set("duration", template.DurationInSeconds) + d.Set("name", template.Name) + d.Set("target_arn", template.AssessmentTargetArn) + + if err := d.Set("rules_package_arns", flattenStringSet(template.RulesPackageArns)); err != nil { + return fmt.Errorf("error setting rules_package_arns: %s", err) } - if resp.AssessmentTemplates != nil && len(resp.AssessmentTemplates) > 0 { - d.Set("name", resp.AssessmentTemplates[0].Name) + tags, err := keyvaluetags.InspectorListTags(conn, arn) + + if err != nil { + return fmt.Errorf("error listing tags for Inspector assessment template (%s): %s", arn, err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) } + return nil } +func resourceAwsInspectorAssessmentTemplateUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).inspectorconn + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.InspectorUpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating Inspector assessment template (%s) tags: %s", d.Id(), err) + } + } + + return resourceAwsInspectorAssessmentTemplateRead(d, meta) +} + func resourceAwsInspectorAssessmentTemplateDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).inspectorconn @@ -108,13 +143,7 @@ func resourceAwsInspectorAssessmentTemplateDelete(d *schema.ResourceData, meta i AssessmentTemplateArn: aws.String(d.Id()), }) if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "AssessmentRunInProgressException" { - log.Printf("[ERROR] Assement Run in progress: %s", err) - return err - } else { - log.Printf("[ERROR] Error deleting Assement Template: %s", err) - return err - } + return fmt.Errorf("error deleting Inspector assessment template (%s): %s", d.Id(), err) } return nil diff --git a/aws/resource_aws_inspector_assessment_template_test.go b/aws/resource_aws_inspector_assessment_template_test.go index c447db6a0c2..23467b63042 100644 --- a/aws/resource_aws_inspector_assessment_template_test.go +++ b/aws/resource_aws_inspector_assessment_template_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -13,7 +14,9 @@ import ( ) func TestAccAWSInspectorTemplate_basic(t *testing.T) { - rInt := acctest.RandInt() + var v inspector.AssessmentTemplate + resourceName := "aws_inspector_assessment_template.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,15 +24,93 @@ func TestAccAWSInspectorTemplate_basic(t *testing.T) { CheckDestroy: testAccCheckAWSInspectorTemplateDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSInspectorTemplateAssessment(rInt), + Config: testAccAWSInspectorTemplateAssessmentBasic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSInspectorTemplateExists("aws_inspector_assessment_template.foo"), + testAccCheckAWSInspectorTemplateExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "inspector", regexp.MustCompile(`target/.+/template/.+`)), + resource.TestCheckResourceAttr(resourceName, "duration", "3600"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttrPair(resourceName, "rules_package_arns.#", "data.aws_inspector_rules_packages.available", "arns.#"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrPair(resourceName, "target_arn", "aws_inspector_assessment_target.test", "arn"), ), }, { - Config: testAccCheckAWSInspectorTemplatetModified(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSInspectorTemplate_disappears(t *testing.T) { + var v inspector.AssessmentTemplate + resourceName := "aws_inspector_assessment_template.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSInspectorTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSInspectorTemplateAssessmentBasic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSInspectorTemplateExists("aws_inspector_assessment_template.foo"), + testAccCheckAWSInspectorTemplateExists(resourceName, &v), + testAccCheckAWSInspectorTemplateDisappears(&v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSInspectorTemplate_tags(t *testing.T) { + var v inspector.AssessmentTemplate + resourceName := "aws_inspector_assessment_template.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSInspectorTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSInspectorTemplateAssessmentTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSInspectorTemplateExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSInspectorTemplateAssessmentTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSInspectorTemplateExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSInspectorTemplateAssessmentTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSInspectorTemplateExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSInspectorTemplateAssessmentBasic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSInspectorTemplateExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, }, @@ -66,69 +147,109 @@ func testAccCheckAWSInspectorTemplateDestroy(s *terraform.State) error { return nil } -func testAccCheckAWSInspectorTemplateExists(name string) resource.TestCheckFunc { +func testAccCheckAWSInspectorTemplateDisappears(v *inspector.AssessmentTemplate) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).inspectorconn + + _, err := conn.DeleteAssessmentTemplate(&inspector.DeleteAssessmentTemplateInput{ + AssessmentTemplateArn: v.Arn, + }) + if err != nil { + return err + } + + return nil + } +} + +func testAccCheckAWSInspectorTemplateExists(name string, v *inspector.AssessmentTemplate) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + if rs.Primary.ID == "" { + return fmt.Errorf("No Inspector assessment template ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).inspectorconn + + resp, err := conn.DescribeAssessmentTemplates(&inspector.DescribeAssessmentTemplatesInput{ + AssessmentTemplateArns: aws.StringSlice([]string{rs.Primary.ID}), + }) + if err != nil { + return err + } + + if resp.AssessmentTemplates == nil || len(resp.AssessmentTemplates) == 0 { + return fmt.Errorf("Inspector assessment template not found") + } + + *v = *resp.AssessmentTemplates[0] + return nil } } -func testAccAWSInspectorTemplateAssessment(rInt int) string { +func testAccAWSInspectorTemplateAssessmentBase(rName string) string { return fmt.Sprintf(` -resource "aws_inspector_resource_group" "foo" { +data "aws_inspector_rules_packages" "available" {} + +resource "aws_inspector_resource_group" "test" { tags = { - Name = "tf-acc-test-%d" + Name = %[1]q } } -resource "aws_inspector_assessment_target" "foo" { - name = "tf-acc-test-basic-%d" - resource_group_arn = "${aws_inspector_resource_group.foo.arn}" +resource "aws_inspector_assessment_target" "test" { + name = %[1]q + resource_group_arn = "${aws_inspector_resource_group.test.arn}" +} +`, rName) } -resource "aws_inspector_assessment_template" "foo" { - name = "tf-acc-test-basic-tpl-%d" - target_arn = "${aws_inspector_assessment_target.foo.arn}" +func testAccAWSInspectorTemplateAssessmentBasic(rName string) string { + return testAccAWSInspectorTemplateAssessmentBase(rName) + fmt.Sprintf(` +resource "aws_inspector_assessment_template" "test" { + name = %[1]q + target_arn = "${aws_inspector_assessment_target.test.arn}" duration = 3600 - rules_package_arns = [ - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p", - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc", - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD", - ] + rules_package_arns = "${data.aws_inspector_rules_packages.available.arns}" } -`, rInt, rInt, rInt) +`, rName) } -func testAccCheckAWSInspectorTemplatetModified(rInt int) string { - return fmt.Sprintf(` -resource "aws_inspector_resource_group" "foo" { +func testAccAWSInspectorTemplateAssessmentTags1(rName, tagKey1, tagValue1 string) string { + return testAccAWSInspectorTemplateAssessmentBase(rName) + fmt.Sprintf(` +resource "aws_inspector_assessment_template" "test" { + name = %[1]q + target_arn = "${aws_inspector_assessment_target.test.arn}" + duration = 3600 + + rules_package_arns = "${data.aws_inspector_rules_packages.available.arns}" + tags = { - Name = "tf-acc-test-%d" + %[2]q = %[3]q } } - -resource "aws_inspector_assessment_target" "foo" { - name = "tf-acc-test-basic-%d" - resource_group_arn = "${aws_inspector_resource_group.foo.arn}" +`, rName, tagKey1, tagValue1) } -resource "aws_inspector_assessment_template" "foo" { - name = "tf-acc-test-basic-tpl-%d" - target_arn = "${aws_inspector_assessment_target.foo.arn}" +func testAccAWSInspectorTemplateAssessmentTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAWSInspectorTemplateAssessmentBase(rName) + fmt.Sprintf(` +resource "aws_inspector_assessment_template" "test" { + name = %[1]q + target_arn = "${aws_inspector_assessment_target.test.arn}" duration = 3600 - rules_package_arns = [ - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p", - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc", - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", - "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD", - ] + rules_package_arns = "${data.aws_inspector_rules_packages.available.arns}" + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } } -`, rInt, rInt, rInt) +`, rName, tagKey1, tagValue1, tagKey2, tagValue2) } diff --git a/aws/resource_aws_inspector_resource_group.go b/aws/resource_aws_inspector_resource_group.go index 37c6739fdab..4508a3b7523 100644 --- a/aws/resource_aws_inspector_resource_group.go +++ b/aws/resource_aws_inspector_resource_group.go @@ -20,6 +20,7 @@ func resourceAWSInspectorResourceGroup() *schema.Resource { ForceNew: true, Required: true, Type: schema.TypeMap, + Elem: &schema.Schema{Type: schema.TypeString}, }, "arn": { Type: schema.TypeString, @@ -76,6 +77,7 @@ func resourceAwsInspectorResourceGroupRead(d *schema.ResourceData, meta interfac resourceGroup := resp.ResourceGroups[0] d.Set("arn", resourceGroup.Arn) + //lintignore:AWSR002 if err := d.Set("tags", flattenInspectorResourceGroupTags(resourceGroup.Tags)); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_inspector_resource_group_test.go b/aws/resource_aws_inspector_resource_group_test.go index 02ed90200b9..be94b4c5d86 100644 --- a/aws/resource_aws_inspector_resource_group_test.go +++ b/aws/resource_aws_inspector_resource_group_test.go @@ -34,7 +34,7 @@ func TestAccAWSInspectorResourceGroup_basic(t *testing.T) { testAccCheckAWSInspectorResourceGroupExists(resourceName, &v2), testAccMatchResourceAttrRegionalARN(resourceName, "arn", "inspector", regexp.MustCompile(`resourcegroup/.+`)), resource.TestCheckResourceAttr(resourceName, "tags.Name", "bar"), - testAccCheckAWSInspectorResourceGroupRecreated(t, &v1, &v2), + testAccCheckAWSInspectorResourceGroupRecreated(&v1, &v2), ), }, }, @@ -69,7 +69,7 @@ func testAccCheckAWSInspectorResourceGroupExists(name string, rg *inspector.Reso } } -func testAccCheckAWSInspectorResourceGroupRecreated(t *testing.T, v1, v2 *inspector.ResourceGroup) resource.TestCheckFunc { +func testAccCheckAWSInspectorResourceGroupRecreated(v1, v2 *inspector.ResourceGroup) resource.TestCheckFunc { return func(s *terraform.State) error { if v2.CreatedAt.Equal(*v1.CreatedAt) { return fmt.Errorf("Inspector resource group not recreated when changing tags") diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 529b6a37f82..fdc7b543da3 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -13,7 +13,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -109,6 +108,10 @@ func resourceAwsInstance() *schema.Resource { Optional: true, ForceNew: true, Computed: true, + ValidateFunc: validation.Any( + validation.StringIsEmpty, + validation.IsIPv4Address, + ), }, "source_dest_check": { @@ -185,6 +188,11 @@ func resourceAwsInstance() *schema.Resource { Computed: true, }, + "outpost_arn": { + Type: schema.TypeString, + Computed: true, + }, + "network_interface_id": { Type: schema.TypeString, Computed: true, @@ -283,7 +291,8 @@ func resourceAwsInstance() *schema.Resource { Computed: true, ForceNew: true, Elem: &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeString, + ValidateFunc: validation.IsIPv6Address, }, }, @@ -292,6 +301,11 @@ func resourceAwsInstance() *schema.Resource { Optional: true, Computed: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.TenancyDedicated, + ec2.TenancyDefault, + ec2.TenancyHost, + }, false), }, "host_id": { Type: schema.TypeString, @@ -377,6 +391,13 @@ func resourceAwsInstance() *schema.Resource { Optional: true, Computed: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.VolumeTypeStandard, + ec2.VolumeTypeIo1, + ec2.VolumeTypeGp2, + ec2.VolumeTypeSc1, + ec2.VolumeTypeSt1, + }, false), }, "volume_id": { @@ -443,7 +464,11 @@ func resourceAwsInstance() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: true, - ForceNew: true, + }, + + "device_name": { + Type: schema.TypeString, + Computed: true, }, "encrypted": { @@ -464,7 +489,6 @@ func resourceAwsInstance() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, - ForceNew: true, DiffSuppressFunc: iopsDiffSuppressFunc, }, @@ -472,14 +496,19 @@ func resourceAwsInstance() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, - ForceNew: true, }, "volume_type": { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.VolumeTypeStandard, + ec2.VolumeTypeIo1, + ec2.VolumeTypeGp2, + ec2.VolumeTypeSc1, + ec2.VolumeTypeSt1, + }, false), }, "volume_id": { @@ -524,6 +553,35 @@ func resourceAwsInstance() *schema.Resource { }, }, }, + + "metadata_options": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "http_endpoint": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ec2.InstanceMetadataEndpointStateEnabled, ec2.InstanceMetadataEndpointStateDisabled}, false), + }, + "http_tokens": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ec2.HttpTokensStateOptional, ec2.HttpTokensStateRequired}, false), + }, + "http_put_response_hop_limit": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.IntBetween(1, 64), + }, + }, + }, + }, }, } } @@ -572,6 +630,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { CreditSpecification: instanceOpts.CreditSpecification, CpuOptions: instanceOpts.CpuOptions, HibernationOptions: instanceOpts.HibernationOptions, + MetadataOptions: instanceOpts.MetadataOptions, TagSpecifications: tagSpecifications, } @@ -609,7 +668,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { // where a user uses group ids in security_groups for the Default VPC. // See https://github.com/hashicorp/terraform/issues/3798 if isAWSErr(err, "InvalidParameterValue", "groupId is invalid") { - return fmt.Errorf("Error launching instance, possible mismatch of Security Group IDs and Names. See AWS Instance docs here: %s.\n\n\tAWS Error: %s", "https://terraform.io/docs/providers/aws/r/instance.html", err.(awserr.Error).Message()) + return fmt.Errorf("Error launching instance, possible mismatch of Security Group IDs and Names. See AWS Instance docs here: %s.\n\n\tAWS Error: %w", "https://terraform.io/docs/providers/aws/r/instance.html", err) } if err != nil { return fmt.Errorf("Error launching source instance: %s", err) @@ -619,21 +678,21 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { } instance := runResp.Instances[0] - log.Printf("[INFO] Instance ID: %s", *instance.InstanceId) + log.Printf("[INFO] Instance ID: %s", aws.StringValue(instance.InstanceId)) // Store the resulting ID so we can look this up later - d.SetId(*instance.InstanceId) + d.SetId(aws.StringValue(instance.InstanceId)) // Wait for the instance to become running so we can get some attributes // that aren't available until later. log.Printf( "[DEBUG] Waiting for instance (%s) to become running", - *instance.InstanceId) + aws.StringValue(instance.InstanceId)) stateConf := &resource.StateChangeConf{ - Pending: []string{"pending"}, - Target: []string{"running"}, - Refresh: InstanceStateRefreshFunc(conn, *instance.InstanceId, []string{"terminated", "shutting-down"}), + Pending: []string{ec2.InstanceStateNamePending}, + Target: []string{ec2.InstanceStateNameRunning}, + Refresh: InstanceStateRefreshFunc(conn, aws.StringValue(instance.InstanceId), []string{ec2.InstanceStateNameTerminated, ec2.InstanceStateNameShuttingDown}), Timeout: d.Timeout(schema.TimeoutCreate), Delay: 10 * time.Second, MinTimeout: 3 * time.Second, @@ -643,7 +702,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf( "Error waiting for instance (%s) to become ready: %s", - *instance.InstanceId, err) + aws.StringValue(instance.InstanceId), err) } instance = instanceRaw.(*ec2.Instance) @@ -652,12 +711,12 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { if instance.PublicIpAddress != nil { d.SetConnInfo(map[string]string{ "type": "ssh", - "host": *instance.PublicIpAddress, + "host": aws.StringValue(instance.PublicIpAddress), }) } else if instance.PrivateIpAddress != nil { d.SetConnInfo(map[string]string{ "type": "ssh", - "host": *instance.PrivateIpAddress, + "host": aws.StringValue(instance.PrivateIpAddress), }) } @@ -667,14 +726,13 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) + instance, err := resourceAwsInstanceFindByID(conn, d.Id()) if err != nil { // If the instance was not found, return nil so that we can show // that the instance is gone. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { + if isAWSErr(err, "InvalidInstanceID.NotFound", "") { d.SetId("") return nil } @@ -684,16 +742,14 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { } // If nothing was found, then return no state - if len(resp.Reservations) == 0 { + if instance == nil { d.SetId("") return nil } - instance := resp.Reservations[0].Instances[0] - if instance.State != nil { // If the instance is terminated, then it is gone - if *instance.State.Name == "terminated" { + if aws.StringValue(instance.State.Name) == ec2.InstanceStateNameTerminated { d.SetId("") return nil } @@ -723,6 +779,10 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("hibernation", instance.HibernationOptions.Configured) } + if err := d.Set("metadata_options", flattenEc2InstanceMetadataOptions(instance.MetadataOptions)); err != nil { + return fmt.Errorf("error setting metadata_options: %s", err) + } + d.Set("ami", instance.ImageId) d.Set("instance_type", instance.InstanceType) d.Set("key_name", instance.KeyName) @@ -730,6 +790,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("public_ip", instance.PublicIpAddress) d.Set("private_dns", instance.PrivateDnsName) d.Set("private_ip", instance.PrivateIpAddress) + d.Set("outpost_arn", instance.OutpostArn) d.Set("iam_instance_profile", iamInstanceProfileArnToName(instance.IamInstanceProfile)) // Set configured Network Interface Device Index Slice @@ -751,16 +812,16 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { var networkInterfaces []map[string]interface{} for _, iNi := range instance.NetworkInterfaces { ni := make(map[string]interface{}) - if *iNi.Attachment.DeviceIndex == 0 { + if aws.Int64Value(iNi.Attachment.DeviceIndex) == 0 { primaryNetworkInterface = *iNi } // If the attached network device is inside our configuration, refresh state with values found. // Otherwise, assume the network device was attached via an outside resource. for _, index := range configuredDeviceIndexes { - if index == int(*iNi.Attachment.DeviceIndex) { - ni["device_index"] = *iNi.Attachment.DeviceIndex - ni["network_interface_id"] = *iNi.NetworkInterfaceId - ni["delete_on_termination"] = *iNi.Attachment.DeleteOnTermination + if index == int(aws.Int64Value(iNi.Attachment.DeviceIndex)) { + ni["device_index"] = aws.Int64Value(iNi.Attachment.DeviceIndex) + ni["network_interface_id"] = aws.StringValue(iNi.NetworkInterfaceId) + ni["delete_on_termination"] = aws.BoolValue(iNi.Attachment.DeleteOnTermination) } } // Don't add empty network interfaces to schema @@ -790,7 +851,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("associate_public_ip_address", primaryNetworkInterface.Association != nil) for _, address := range primaryNetworkInterface.Ipv6Addresses { - ipv6Addresses = append(ipv6Addresses, *address.Ipv6Address) + ipv6Addresses = append(ipv6Addresses, aws.StringValue(address.Ipv6Address)) } } else { @@ -805,16 +866,16 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { } d.Set("ebs_optimized", instance.EbsOptimized) - if instance.SubnetId != nil && *instance.SubnetId != "" { + if aws.StringValue(instance.SubnetId) != "" { d.Set("source_dest_check", instance.SourceDestCheck) } if instance.Monitoring != nil && instance.Monitoring.State != nil { - monitoringState := *instance.Monitoring.State - d.Set("monitoring", monitoringState == "enabled" || monitoringState == "pending") + monitoringState := aws.StringValue(instance.Monitoring.State) + d.Set("monitoring", monitoringState == ec2.MonitoringStateEnabled || monitoringState == ec2.MonitoringStatePending) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(instance.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(instance.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -877,7 +938,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { if b64 { d.Set("user_data_base64", attr.UserData.Value) } else { - d.Set("user_data", userDataHashSum(*attr.UserData.Value)) + d.Set("user_data", userDataHashSum(aws.StringValue(attr.UserData.Value))) } } } @@ -899,7 +960,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { } if d.Get("get_password_data").(bool) { - passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) + passwordData, err := getAwsEc2InstancePasswordData(aws.StringValue(instance.InstanceId), conn) if err != nil { return err } @@ -915,16 +976,12 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - d.Partial(true) - if d.HasChange("tags") && !d.IsNewResource() { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { return fmt.Errorf("error updating tags: %s", err) } - - d.SetPartial("tags") } if d.HasChange("volume_tags") && !d.IsNewResource() { @@ -940,8 +997,6 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error updating volume_tags (%s): %s", volumeId, err) } } - - d.SetPartial("volume_tags") } if d.HasChange("iam_instance_profile") && !d.IsNewResource() { @@ -1043,14 +1098,12 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { }, }) if err != nil { - if ec2err, ok := err.(awserr.Error); ok { - // Tolerate InvalidParameterCombination error in Classic, otherwise - // return the error - if ec2err.Code() != "InvalidParameterCombination" { - return err - } - log.Printf("[WARN] Attempted to modify SourceDestCheck on non VPC instance: %s", ec2err.Message()) + // Tolerate InvalidParameterCombination error in Classic, otherwise + // return the error + if !isAWSErr(err, "InvalidParameterCombination", "") { + return err } + log.Printf("[WARN] Attempted to modify SourceDestCheck on non VPC instance: %s", err) } } } @@ -1072,16 +1125,13 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { // Thus, we need to actually modify the primary network interface for the new security groups, as the primary // network interface is where we modify/create security group assignments during Create. log.Printf("[INFO] Modifying `vpc_security_group_ids` on Instance %q", d.Id()) - instances, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(d.Id())}, - }) + instance, err := resourceAwsInstanceFindByID(conn, d.Id()) if err != nil { - return err + return fmt.Errorf("error retrieving instance %q: %w", d.Id(), err) } - instance := instances.Reservations[0].Instances[0] var primaryInterface ec2.InstanceNetworkInterface for _, ni := range instance.NetworkInterfaces { - if *ni.Attachment.DeviceIndex == 0 { + if aws.Int64Value(ni.Attachment.DeviceIndex) == 0 { primaryInterface = *ni } } @@ -1134,9 +1184,9 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "stopped"}, - Target: []string{"running"}, - Refresh: InstanceStateRefreshFunc(conn, d.Id(), []string{"terminated"}), + Pending: []string{ec2.InstanceStateNamePending, ec2.InstanceStateNameStopped}, + Target: []string{ec2.InstanceStateNameRunning}, + Refresh: InstanceStateRefreshFunc(conn, d.Id(), []string{ec2.InstanceStateNameTerminated}), Timeout: d.Timeout(schema.TimeoutUpdate), Delay: 10 * time.Second, MinTimeout: 3 * time.Second, @@ -1211,11 +1261,101 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } + if d.HasChange("metadata_options") && !d.IsNewResource() { + if v, ok := d.GetOk("metadata_options"); ok { + if mo, ok := v.([]interface{})[0].(map[string]interface{}); ok { + log.Printf("[DEBUG] Modifying metadata options for Instance (%s)", d.Id()) + input := &ec2.ModifyInstanceMetadataOptionsInput{ + InstanceId: aws.String(d.Id()), + HttpEndpoint: aws.String(mo["http_endpoint"].(string)), + } + if mo["http_endpoint"].(string) == ec2.InstanceMetadataEndpointStateEnabled { + // These parameters are not allowed unless HttpEndpoint is enabled + input.HttpTokens = aws.String(mo["http_tokens"].(string)) + input.HttpPutResponseHopLimit = aws.Int64(int64(mo["http_put_response_hop_limit"].(int))) + } + _, err := conn.ModifyInstanceMetadataOptions(input) + if err != nil { + return fmt.Errorf("Error updating metadata options: %s", err) + } + } + } + } + + if d.HasChange("root_block_device.0") && !d.IsNewResource() { + volumeID := d.Get("root_block_device.0.volume_id").(string) + + input := ec2.ModifyVolumeInput{ + VolumeId: aws.String(volumeID), + } + modifyVolume := false + + if d.HasChange("root_block_device.0.volume_size") { + if v, ok := d.Get("root_block_device.0.volume_size").(int); ok && v != 0 { + modifyVolume = true + input.Size = aws.Int64(int64(v)) + } + } + if d.HasChange("root_block_device.0.volume_type") { + if v, ok := d.Get("root_block_device.0.volume_type").(string); ok && v != "" { + modifyVolume = true + input.VolumeType = aws.String(v) + } + } + if d.HasChange("root_block_device.0.iops") { + if v, ok := d.Get("root_block_device.0.iops").(int); ok && v != 0 { + modifyVolume = true + input.Iops = aws.Int64(int64(v)) + } + } + if modifyVolume { + _, err := conn.ModifyVolume(&input) + if err != nil { + return fmt.Errorf("error modifying EC2 Volume %q: %w", volumeID, err) + } + + // The volume is useable once the state is "optimizing", but will not be at full performance. + // Optimization can take hours. e.g. a full 1 TiB drive takes approximately 6 hours to optimize, + // according to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.VolumeModificationStateModifying}, + Target: []string{ec2.VolumeModificationStateCompleted, ec2.VolumeModificationStateOptimizing}, + Refresh: VolumeStateRefreshFunc(conn, volumeID, ec2.VolumeModificationStateFailed), + Timeout: d.Timeout(schema.TimeoutUpdate), + Delay: 30 * time.Second, + MinTimeout: 30 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for EC2 volume (%s) to be modified: %w", volumeID, err) + } + } + + if d.HasChange("root_block_device.0.delete_on_termination") { + deviceName := d.Get("root_block_device.0.device_name").(string) + if v, ok := d.Get("root_block_device.0.delete_on_termination").(bool); ok { + _, err := conn.ModifyInstanceAttribute(&ec2.ModifyInstanceAttributeInput{ + InstanceId: aws.String(d.Id()), + BlockDeviceMappings: []*ec2.InstanceBlockDeviceMappingSpecification{ + { + DeviceName: aws.String(deviceName), + Ebs: &ec2.EbsInstanceBlockDeviceSpecification{ + DeleteOnTermination: aws.Bool(v), + }, + }, + }, + }) + if err != nil { + return fmt.Errorf("error modifying delete on termination attribute for EC2 instance %q block device %q: %w", d.Id(), deviceName, err) + } + } + } + } + // TODO(mitchellh): wait for the attributes we modified to // persist the change... - d.Partial(false) - return resourceAwsInstanceRead(d, meta) } @@ -1235,45 +1375,67 @@ func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { // an EC2 instance. func InstanceStateRefreshFunc(conn *ec2.EC2, instanceID string, failStates []string) resource.StateRefreshFunc { return func() (interface{}, string, error) { - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(instanceID)}, - }) + instance, err := resourceAwsInstanceFindByID(conn, instanceID) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { - // Set this to nil as if we didn't find anything. - resp = nil - } else { + if !isAWSErr(err, "InvalidInstanceID.NotFound", "") { log.Printf("Error on InstanceStateRefresh: %s", err) return nil, "", err } } - if resp == nil || len(resp.Reservations) == 0 || len(resp.Reservations[0].Instances) == 0 { + if instance == nil || instance.State == nil { // Sometimes AWS just has consistency issues and doesn't see // our instance yet. Return an empty state. return nil, "", nil } - i := resp.Reservations[0].Instances[0] - state := *i.State.Name + state := aws.StringValue(instance.State.Name) for _, failState := range failStates { if state == failState { - return i, state, fmt.Errorf("Failed to reach target state. Reason: %s", - stringifyStateReason(i.StateReason)) + return instance, state, fmt.Errorf("Failed to reach target state. Reason: %s", + stringifyStateReason(instance.StateReason)) } } + return instance, state, nil + } +} + +// VolumeStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// an EC2 root device volume. +func VolumeStateRefreshFunc(conn *ec2.EC2, volumeID, failState string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeVolumesModifications(&ec2.DescribeVolumesModificationsInput{ + VolumeIds: []*string{aws.String(volumeID)}, + }) + if err != nil { + if isAWSErr(err, "InvalidVolumeID.NotFound", "does not exist") { + return nil, "", nil + } + log.Printf("Error on VolumeStateRefresh: %s", err) + return nil, "", err + } + if resp == nil || len(resp.VolumesModifications) == 0 || resp.VolumesModifications[0] == nil { + return nil, "", nil + } + + i := resp.VolumesModifications[0] + state := aws.StringValue(i.ModificationState) + if state == failState { + return i, state, fmt.Errorf("Failed to reach target state. Reason: %s", aws.StringValue(i.StatusMessage)) + } + return i, state, nil } } func stringifyStateReason(sr *ec2.StateReason) string { if sr.Message != nil { - return *sr.Message + return aws.StringValue(sr.Message) } if sr.Code != nil { - return *sr.Code + return aws.StringValue(sr.Code) } return sr.String() @@ -1285,6 +1447,20 @@ func readBlockDevices(d *schema.ResourceData, instance *ec2.Instance, conn *ec2. return err } + // This handles cases where the root device block is of type "EBS" + // and #readBlockDevicesFromInstance only returns 1 reference to a block-device + // stored in ibds["root"] + if _, ok := d.GetOk("ebs_block_device"); ok { + if len(ibds["ebs"].([]map[string]interface{})) == 0 { + ebs := make(map[string]interface{}) + for k, v := range ibds["root"].(map[string]interface{}) { + ebs[k] = v + } + ebs["snapshot_id"] = ibds["snapshot_id"] + ibds["ebs"] = append(ibds["ebs"].([]map[string]interface{}), ebs) + } + } + if err := d.Set("ebs_block_device", ibds["ebs"]); err != nil { return err } @@ -1351,7 +1527,7 @@ func readBlockDevicesFromInstance(instance *ec2.Instance, conn *ec2.EC2) (map[st instanceBlockDevices := make(map[string]*ec2.InstanceBlockDeviceMapping) for _, bd := range instance.BlockDeviceMappings { if bd.Ebs != nil { - instanceBlockDevices[*bd.Ebs.VolumeId] = bd + instanceBlockDevices[aws.StringValue(bd.Ebs.VolumeId)] = bd } } @@ -1374,43 +1550,50 @@ func readBlockDevicesFromInstance(instance *ec2.Instance, conn *ec2.EC2) (map[st } for _, vol := range volResp.Volumes { - instanceBd := instanceBlockDevices[*vol.VolumeId] + instanceBd := instanceBlockDevices[aws.StringValue(vol.VolumeId)] bd := make(map[string]interface{}) - bd["volume_id"] = *vol.VolumeId + bd["volume_id"] = aws.StringValue(vol.VolumeId) if instanceBd.Ebs != nil && instanceBd.Ebs.DeleteOnTermination != nil { - bd["delete_on_termination"] = *instanceBd.Ebs.DeleteOnTermination + bd["delete_on_termination"] = aws.BoolValue(instanceBd.Ebs.DeleteOnTermination) } if vol.Size != nil { - bd["volume_size"] = *vol.Size + bd["volume_size"] = aws.Int64Value(vol.Size) } if vol.VolumeType != nil { - bd["volume_type"] = *vol.VolumeType + bd["volume_type"] = aws.StringValue(vol.VolumeType) } if vol.Iops != nil { - bd["iops"] = *vol.Iops + bd["iops"] = aws.Int64Value(vol.Iops) } if vol.Encrypted != nil { - bd["encrypted"] = *vol.Encrypted + bd["encrypted"] = aws.BoolValue(vol.Encrypted) } if vol.KmsKeyId != nil { - bd["kms_key_id"] = *vol.KmsKeyId + bd["kms_key_id"] = aws.StringValue(vol.KmsKeyId) + } + if instanceBd.DeviceName != nil { + bd["device_name"] = aws.StringValue(instanceBd.DeviceName) } if blockDeviceIsRoot(instanceBd, instance) { blockDevices["root"] = bd } else { - if instanceBd.DeviceName != nil { - bd["device_name"] = *instanceBd.DeviceName - } if vol.SnapshotId != nil { - bd["snapshot_id"] = *vol.SnapshotId + bd["snapshot_id"] = aws.StringValue(vol.SnapshotId) } blockDevices["ebs"] = append(blockDevices["ebs"].([]map[string]interface{}), bd) } } + // If we determine the root device is the only block device mapping + // in the instance (including ephemerals) after returning from this function, + // we'll need to set the ebs_block_device as a clone of the root device + // with the snapshot_id populated; thus, we store the ID for safe-keeping + if blockDevices["root"] != nil && len(blockDevices["ebs"].([]map[string]interface{})) == 0 { + blockDevices["snapshot_id"] = volResp.Volumes[0].SnapshotId + } return blockDevices, nil } @@ -1418,7 +1601,7 @@ func readBlockDevicesFromInstance(instance *ec2.Instance, conn *ec2.EC2) (map[st func blockDeviceIsRoot(bd *ec2.InstanceBlockDeviceMapping, instance *ec2.Instance) bool { return bd.DeviceName != nil && instance.RootDeviceName != nil && - *bd.DeviceName == *instance.RootDeviceName + aws.StringValue(bd.DeviceName) == aws.StringValue(instance.RootDeviceName) } func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) { @@ -1443,7 +1626,7 @@ func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) { rootDeviceName := image.RootDeviceName // Instance store backed AMIs do not provide a root device name. - if *image.RootDeviceType == ec2.DeviceTypeInstanceStore { + if aws.StringValue(image.RootDeviceType) == ec2.DeviceTypeInstanceStore { return nil, nil } @@ -1544,8 +1727,7 @@ func buildNetworkInterfaceOpts(d *schema.ResourceData, groups []*string, nInterf return networkInterfaces } -func readBlockDeviceMappingsFromConfig( - d *schema.ResourceData, conn *ec2.EC2) ([]*ec2.BlockDeviceMapping, error) { +func readBlockDeviceMappingsFromConfig(d *schema.ResourceData, conn *ec2.EC2) ([]*ec2.BlockDeviceMapping, error) { blockDevices := make([]*ec2.BlockDeviceMapping, 0) if v, ok := d.GetOk("ebs_block_device"); ok { @@ -1616,9 +1798,6 @@ func readBlockDeviceMappingsFromConfig( if v, ok := d.GetOk("root_block_device"); ok { vL := v.([]interface{}) - if len(vL) > 1 { - return nil, errors.New("Cannot specify more than one root_block_device.") - } for _, v := range vL { bd := v.(map[string]interface{}) ebs := &ec2.EbsBlockDevice{ @@ -1641,16 +1820,16 @@ func readBlockDeviceMappingsFromConfig( ebs.VolumeType = aws.String(v) } - if v, ok := bd["iops"].(int); ok && v > 0 && *ebs.VolumeType == "io1" { + if v, ok := bd["iops"].(int); ok && v > 0 && aws.StringValue(ebs.VolumeType) == ec2.VolumeTypeIo1 { // Only set the iops attribute if the volume type is io1. Setting otherwise // can trigger a refresh/plan loop based on the computed value that is given // from AWS, and prevent us from specifying 0 as a valid iops. // See https://github.com/hashicorp/terraform/pull/4146 // See https://github.com/hashicorp/terraform/issues/7765 ebs.Iops = aws.Int64(int64(v)) - } else if v, ok := bd["iops"].(int); ok && v > 0 && *ebs.VolumeType != "io1" { + } else if v, ok := bd["iops"].(int); ok && v > 0 && aws.StringValue(ebs.VolumeType) != ec2.VolumeTypeIo1 { // Message user about incompatibility - log.Print("[WARN] IOPs is only valid for storate type io1 for EBS Volumes") + log.Print("[WARN] IOPs is only valid on IO1 storage type for EBS Volumes") } if dn, err := fetchRootDeviceName(d.Get("ami").(string), conn); err == nil { @@ -1698,22 +1877,22 @@ func readVolumeTags(conn *ec2.EC2, instanceId string) ([]*ec2.Tag, error) { // config determine which one to use in Plan and Apply. func readSecurityGroups(d *schema.ResourceData, instance *ec2.Instance, conn *ec2.EC2) error { // An instance with a subnet is in a VPC; an instance without a subnet is in EC2-Classic. - hasSubnet := instance.SubnetId != nil && *instance.SubnetId != "" + hasSubnet := aws.StringValue(instance.SubnetId) != "" useID, useName := hasSubnet, !hasSubnet // If the instance is in a VPC, find out if that VPC is Default to determine // whether to store names. - if instance.VpcId != nil && *instance.VpcId != "" { + if aws.StringValue(instance.VpcId) != "" { out, err := conn.DescribeVpcs(&ec2.DescribeVpcsInput{ VpcIds: []*string{instance.VpcId}, }) if err != nil { - log.Printf("[WARN] Unable to describe VPC %q: %s", *instance.VpcId, err) + log.Printf("[WARN] Unable to describe VPC %q: %s", aws.StringValue(instance.VpcId), err) } else if len(out.Vpcs) == 0 { // This may happen in Eucalyptus Cloud log.Printf("[WARN] Unable to retrieve VPCs") } else { - isInDefaultVpc := *out.Vpcs[0].IsDefault + isInDefaultVpc := aws.BoolValue(out.Vpcs[0].IsDefault) useName = isInDefaultVpc } } @@ -1722,7 +1901,7 @@ func readSecurityGroups(d *schema.ResourceData, instance *ec2.Instance, conn *ec if useID { sgs := make([]string, 0, len(instance.SecurityGroups)) for _, sg := range instance.SecurityGroups { - sgs = append(sgs, *sg.GroupId) + sgs = append(sgs, aws.StringValue(sg.GroupId)) } log.Printf("[DEBUG] Setting Security Group IDs: %#v", sgs) if err := d.Set("vpc_security_group_ids", sgs); err != nil { @@ -1736,7 +1915,7 @@ func readSecurityGroups(d *schema.ResourceData, instance *ec2.Instance, conn *ec if useName { sgs := make([]string, 0, len(instance.SecurityGroups)) for _, sg := range instance.SecurityGroups { - sgs = append(sgs, *sg.GroupName) + sgs = append(sgs, aws.StringValue(sg.GroupName)) } log.Printf("[DEBUG] Setting Security Group Names: %#v", sgs) if err := d.Set("security_groups", sgs); err != nil { @@ -1766,11 +1945,11 @@ func getAwsEc2InstancePasswordData(instanceID string, conn *ec2.EC2) (string, er return resource.NonRetryableError(err) } - if resp.PasswordData == nil || *resp.PasswordData == "" { + if resp.PasswordData == nil || aws.StringValue(resp.PasswordData) == "" { return resource.RetryableError(fmt.Errorf("Password data is blank for instance ID: %s", instanceID)) } - passwordData = strings.TrimSpace(*resp.PasswordData) + passwordData = strings.TrimSpace(aws.StringValue(resp.PasswordData)) log.Printf("[INFO] Password data read for instance %s", instanceID) return nil @@ -1780,10 +1959,10 @@ func getAwsEc2InstancePasswordData(instanceID string, conn *ec2.EC2) (string, er if err != nil { return "", fmt.Errorf("Error getting password data: %s", err) } - if resp.PasswordData == nil || *resp.PasswordData == "" { + if resp.PasswordData == nil || aws.StringValue(resp.PasswordData) == "" { return "", fmt.Errorf("Password data is blank for instance ID: %s", instanceID) } - passwordData = strings.TrimSpace(*resp.PasswordData) + passwordData = strings.TrimSpace(aws.StringValue(resp.PasswordData)) } if err != nil { return "", err @@ -1815,6 +1994,7 @@ type awsInstanceOpts struct { CreditSpecification *ec2.CreditSpecificationRequest CpuOptions *ec2.CpuOptionsRequest HibernationOptions *ec2.HibernationOptionsRequest + MetadataOptions *ec2.InstanceMetadataOptionsRequest } func buildAwsInstanceOpts( @@ -1827,6 +2007,7 @@ func buildAwsInstanceOpts( EBSOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), ImageID: aws.String(d.Get("ami").(string)), InstanceType: aws.String(instanceType), + MetadataOptions: expandEc2InstanceMetadataOptions(d.Get("metadata_options").([]interface{})), } // Set default cpu_credits as Unlimited for T3 instance type @@ -1943,7 +2124,7 @@ func buildAwsInstanceOpts( opts.PrivateIPAddress = aws.String(v.(string)) } if opts.SubnetID != nil && - *opts.SubnetID != "" { + aws.StringValue(opts.SubnetID) != "" { opts.SecurityGroupIDs = groups } else { opts.SecurityGroups = groups @@ -1993,7 +2174,7 @@ func awsTerminateInstance(conn *ec2.EC2, id string, timeout time.Duration) error InstanceIds: []*string{aws.String(id)}, } if _, err := conn.TerminateInstances(req); err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { + if isAWSErr(err, "InvalidInstanceID.NotFound", "") { return nil } return err @@ -2006,8 +2187,9 @@ func waitForInstanceStopping(conn *ec2.EC2, id string, timeout time.Duration) er log.Printf("[DEBUG] Waiting for instance (%s) to become stopped", id) stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, - Target: []string{"stopped"}, + Pending: []string{ec2.InstanceStateNamePending, ec2.InstanceStateNameRunning, + ec2.InstanceStateNameShuttingDown, ec2.InstanceStateNameStopped, ec2.InstanceStateNameStopping}, + Target: []string{ec2.InstanceStateNameStopped}, Refresh: InstanceStateRefreshFunc(conn, id, []string{}), Timeout: timeout, Delay: 10 * time.Second, @@ -2027,8 +2209,9 @@ func waitForInstanceDeletion(conn *ec2.EC2, id string, timeout time.Duration) er log.Printf("[DEBUG] Waiting for instance (%s) to become terminated", id) stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, - Target: []string{"terminated"}, + Pending: []string{ec2.InstanceStateNamePending, ec2.InstanceStateNameRunning, + ec2.InstanceStateNameShuttingDown, ec2.InstanceStateNameStopped, ec2.InstanceStateNameStopping}, + Target: []string{ec2.InstanceStateNameTerminated}, Refresh: InstanceStateRefreshFunc(conn, id, []string{}), Timeout: timeout, Delay: 10 * time.Second, @@ -2048,7 +2231,7 @@ func iamInstanceProfileArnToName(ip *ec2.IamInstanceProfile) string { if ip == nil || ip.Arn == nil { return "" } - parts := strings.Split(*ip.Arn, "/") + parts := strings.Split(aws.StringValue(ip.Arn), "/") return parts[len(parts)-1] } @@ -2101,3 +2284,79 @@ func getCreditSpecifications(conn *ec2.EC2, instanceId string) ([]map[string]int return creditSpecifications, nil } + +func expandEc2InstanceMetadataOptions(l []interface{}) *ec2.InstanceMetadataOptionsRequest { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + opts := &ec2.InstanceMetadataOptionsRequest{ + HttpEndpoint: aws.String(m["http_endpoint"].(string)), + } + + if m["http_endpoint"].(string) == ec2.InstanceMetadataEndpointStateEnabled { + // These parameters are not allowed unless HttpEndpoint is enabled + + if v, ok := m["http_tokens"].(string); ok && v != "" { + opts.HttpTokens = aws.String(v) + } + + if v, ok := m["http_put_response_hop_limit"].(int); ok && v != 0 { + opts.HttpPutResponseHopLimit = aws.Int64(int64(v)) + } + } + + return opts +} + +func flattenEc2InstanceMetadataOptions(opts *ec2.InstanceMetadataOptionsResponse) []interface{} { + if opts == nil { + return nil + } + + m := map[string]interface{}{ + "http_endpoint": aws.StringValue(opts.HttpEndpoint), + "http_put_response_hop_limit": aws.Int64Value(opts.HttpPutResponseHopLimit), + "http_tokens": aws.StringValue(opts.HttpTokens), + } + + return []interface{}{m} +} + +// resourceAwsInstanceFindByID returns the EC2 instance by ID +// * If the instance is found, returns the instance and nil +// * If no instance is found, returns nil and nil +// * If an error occurs, returns nil and the error +func resourceAwsInstanceFindByID(conn *ec2.EC2, id string) (*ec2.Instance, error) { + instances, err := resourceAwsInstanceFind(conn, &ec2.DescribeInstancesInput{ + InstanceIds: aws.StringSlice([]string{id}), + }) + if err != nil { + return nil, err + } + + if len(instances) == 0 { + return nil, nil + } + + return instances[0], nil +} + +// resourceAwsInstanceFind returns EC2 instances matching the input parameters +// * If instances are found, returns a slice of instances and nil +// * If no instances are found, returns an empty slice and nil +// * If an error occurs, returns nil and the error +func resourceAwsInstanceFind(conn *ec2.EC2, params *ec2.DescribeInstancesInput) ([]*ec2.Instance, error) { + resp, err := conn.DescribeInstances(params) + if err != nil { + return nil, err + } + + if len(resp.Reservations) == 0 { + return []*ec2.Instance{}, nil + } + + return resp.Reservations[0].Instances, nil +} diff --git a/aws/resource_aws_instance_migrate.go b/aws/resource_aws_instance_migrate.go index 17065d1e79c..7aaf212f19d 100644 --- a/aws/resource_aws_instance_migrate.go +++ b/aws/resource_aws_instance_migrate.go @@ -45,9 +45,7 @@ func migrateAwsInstanceStateV0toV1(is *terraform.InstanceState) (*terraform.Inst is.Attributes["root_block_device.#"] = "0" } for _, oldBd := range oldBds { - if err := writeV1BlockDevice(is, oldBd); err != nil { - return is, err - } + writeV1BlockDevice(is, oldBd) } log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) return is, nil @@ -76,7 +74,7 @@ func readV0BlockDevices(is *terraform.InstanceState) (map[string]map[string]stri } func writeV1BlockDevice( - is *terraform.InstanceState, oldBd map[string]string) error { + is *terraform.InstanceState, oldBd map[string]string) { code := hashcode.String(oldBd["device_name"]) bdType := "ebs_block_device" if vn, ok := oldBd["virtual_name"]; ok && strings.HasPrefix(vn, "ephemeral") { @@ -107,5 +105,4 @@ func writeV1BlockDevice( countAttr := fmt.Sprintf("%s.#", bdType) count, _ := strconv.Atoi(is.Attributes[countAttr]) is.Attributes[countAttr] = strconv.Itoa(count + 1) - return nil } diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index 952ae4c8e96..c7942d053e1 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -6,11 +6,11 @@ import ( "os" "reflect" "regexp" + "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" @@ -159,8 +159,7 @@ func TestAccAWSInstance_inDefaultVpcBySgName(t *testing.T) { { Config: testAccInstanceConfigInDefaultVpcBySgName(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), + testAccCheckInstanceExists(resourceName, &v), ), }, { @@ -185,8 +184,7 @@ func TestAccAWSInstance_inDefaultVpcBySgId(t *testing.T) { { Config: testAccInstanceConfigInDefaultVpcBySgId(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), + testAccCheckInstanceExists(resourceName, &v), ), }, { @@ -216,8 +214,7 @@ func TestAccAWSInstance_inEc2Classic(t *testing.T) { { Config: testAccInstanceConfigInEc2Classic(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), + testAccCheckInstanceExists(resourceName, &v), ), }, { @@ -260,7 +257,7 @@ func TestAccAWSInstance_basic(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, Steps: []resource.TestStep{ - // Create a volume to cover #1249 + // Create a volume to cover https://github.com/hashicorp/terraform/issues/1249 { // Need a resource in this config so the provisioner will be available Config: testAccInstanceConfig_pre(rInt), @@ -277,19 +274,13 @@ func TestAccAWSInstance_basic(t *testing.T) { { Config: testAccInstanceConfig(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), + testAccCheckInstanceExists(resourceName, &v), testCheck(rInt), - resource.TestCheckResourceAttr( - resourceName, - "user_data", - "3dc39dda39be1205215e776bad998da361a5955d"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.#", "0"), - resource.TestMatchResourceAttr( - resourceName, - "arn", - regexp.MustCompile(`^arn:[^:]+:ec2:[^:]+:\d{12}:instance/i-.+`)), + resource.TestCheckResourceAttr(resourceName, "user_data", "3dc39dda39be1205215e776bad998da361a5955d"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.#", "0"), // This is an instance store AMI + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.#", "0"), + resource.TestCheckResourceAttr(resourceName, "outpost_arn", ""), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`instance/i-[a-z0-9]+`)), ), }, { @@ -303,15 +294,10 @@ func TestAccAWSInstance_basic(t *testing.T) { { Config: testAccInstanceConfig(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), + testAccCheckInstanceExists(resourceName, &v), testCheck(rInt), - resource.TestCheckResourceAttr( - resourceName, - "user_data", - "3dc39dda39be1205215e776bad998da361a5955d"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user_data", "3dc39dda39be1205215e776bad998da361a5955d"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.#", "0"), ), }, // Clean up volume created above @@ -333,9 +319,10 @@ func TestAccAWSInstance_EbsBlockDevice_KmsKeyArn(t *testing.T) { resourceName := "aws_instance.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckInstanceDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccInstanceConfigEbsBlockDeviceKmsKeyArn, @@ -392,12 +379,8 @@ func TestAccAWSInstance_userDataBase64(t *testing.T) { { Config: testAccInstanceConfigWithUserDataBase64(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, - "user_data_base64", - "aGVsbG8gd29ybGQ="), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "user_data_base64", "aGVsbG8gd29ybGQ="), ), }, { @@ -441,18 +424,12 @@ func TestAccAWSInstance_GP2IopsDevice(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccInstanceGP2IopsDevice, - //Config: testAccInstanceConfigBlockDevices, Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.#", "1"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_size", "11"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_type", "gp2"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.iops", "100"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "root_block_device.#", "1"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", "11"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.iops", "100"), testCheck(), ), }, @@ -531,60 +508,41 @@ func TestAccAWSInstance_blockDevices(t *testing.T) { } } + rootVolumeSize := "11" + resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - IDRefreshIgnore: []string{"ephemeral_block_device"}, - Providers: testAccProviders, - CheckDestroy: testAccCheckInstanceDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + IDRefreshIgnore: []string{"ephemeral_block_device"}, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccInstanceConfigBlockDevices, + Config: testAccAwsEc2InstanceConfigBlockDevices(rootVolumeSize), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.#", "1"), - resource.TestMatchResourceAttr( - resourceName, "root_block_device.0.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_size", "11"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_type", "gp2"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.#", "3"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2576023345.device_name", "/dev/sdb"), - resource.TestMatchResourceAttr( - resourceName, "ebs_block_device.2576023345.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2576023345.volume_size", "9"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2576023345.volume_type", "gp2"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2554893574.device_name", "/dev/sdc"), - resource.TestMatchResourceAttr( - resourceName, "ebs_block_device.2554893574.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2554893574.volume_size", "10"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2554893574.volume_type", "io1"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2554893574.iops", "100"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2634515331.device_name", "/dev/sdd"), - resource.TestMatchResourceAttr( - resourceName, "ebs_block_device.2634515331.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2634515331.encrypted", "true"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.2634515331.volume_size", "12"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.#", "1"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.1692014856.device_name", "/dev/sde"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.1692014856.virtual_name", "ephemeral0"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "root_block_device.#", "1"), + resource.TestMatchResourceAttr(resourceName, "root_block_device.0.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", rootVolumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.#", "3"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.device_name", "/dev/sdb"), + resource.TestMatchResourceAttr(resourceName, "ebs_block_device.2576023345.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_size", "9"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.device_name", "/dev/sdc"), + resource.TestMatchResourceAttr(resourceName, "ebs_block_device.2554893574.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_type", "io1"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.iops", "100"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.device_name", "/dev/sdd"), + resource.TestMatchResourceAttr(resourceName, "ebs_block_device.2634515331.volume_id", regexp.MustCompile("vol-[a-z0-9]+")), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.encrypted", "true"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.volume_size", "12"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.#", "1"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.1692014856.device_name", "/dev/sde"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.1692014856.virtual_name", "ephemeral0"), testCheck(), ), }, @@ -621,18 +579,12 @@ func TestAccAWSInstance_rootInstanceStore(t *testing.T) { instance_type = "m3.medium" }`, Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "ami", "ami-44c36524"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.#", "0"), - resource.TestCheckResourceAttr( - resourceName, "ebs_optimized", "false"), - resource.TestCheckResourceAttr( - resourceName, "instance_type", "m3.medium"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.#", "0"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "ami", "ami-44c36524"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.#", "0"), + resource.TestCheckResourceAttr(resourceName, "ebs_optimized", "false"), + resource.TestCheckResourceAttr(resourceName, "instance_type", "m3.medium"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.#", "0"), ), }, { @@ -676,11 +628,12 @@ func TestAccAWSInstance_noAMIEphemeralDevices(t *testing.T) { } resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - IDRefreshIgnore: []string{"ephemeral_block_device"}, - Providers: testAccProviders, - CheckDestroy: testAccCheckInstanceDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + IDRefreshIgnore: []string{"ephemeral_block_device"}, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: ` @@ -704,32 +657,19 @@ func TestAccAWSInstance_noAMIEphemeralDevices(t *testing.T) { } }`, Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "ami", "ami-01f05461"), - resource.TestCheckResourceAttr( - resourceName, "ebs_optimized", "false"), - resource.TestCheckResourceAttr( - resourceName, "instance_type", "c3.large"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.#", "1"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_size", "11"), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_type", "gp2"), - resource.TestCheckResourceAttr( - resourceName, "ebs_block_device.#", "0"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.#", "2"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.172787947.device_name", "/dev/sdb"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.172787947.no_device", "true"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.3336996981.device_name", "/dev/sdc"), - resource.TestCheckResourceAttr( - resourceName, "ephemeral_block_device.3336996981.no_device", "true"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "ami", "ami-01f05461"), + resource.TestCheckResourceAttr(resourceName, "ebs_optimized", "false"), + resource.TestCheckResourceAttr(resourceName, "instance_type", "c3.large"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.#", "1"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", "11"), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.#", "0"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.#", "2"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.172787947.device_name", "/dev/sdb"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.172787947.no_device", "true"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.3336996981.device_name", "/dev/sdc"), + resource.TestCheckResourceAttr(resourceName, "ephemeral_block_device.3336996981.no_device", "true"), testCheck(), ), }, @@ -864,12 +804,8 @@ func TestAccAWSInstance_vpc(t *testing.T) { { Config: testAccInstanceConfigVPC(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, - "user_data", - "562a3e32810edf6ff09994f050f12e799452379d"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "user_data", "562a3e32810edf6ff09994f050f12e799452379d"), ), }, { @@ -882,10 +818,17 @@ func TestAccAWSInstance_vpc(t *testing.T) { }) } -func TestAccAWSInstance_placementGroup(t *testing.T) { +func TestAccAWSInstance_outpost(t *testing.T) { var v ec2.Instance resourceName := "aws_instance.test" - rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -895,14 +838,40 @@ func TestAccAWSInstance_placementGroup(t *testing.T) { CheckDestroy: testAccCheckInstanceDestroy, Steps: []resource.TestStep{ { - Config: testAccInstanceConfigPlacementGroup(rName), + Config: testAccInstanceConfigOutpost(outpostArn), Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists( resourceName, &v), resource.TestCheckResourceAttr( - resourceName, - "placement_group", - rName), + resourceName, "outpost_arn", outpostArn), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSInstance_placementGroup(t *testing.T) { + var v ec2.Instance + resourceName := "aws_instance.test" + rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + IDRefreshIgnore: []string{"associate_public_ip_address"}, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfigPlacementGroup(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "placement_group", rName), ), }, { @@ -927,12 +896,8 @@ func TestAccAWSInstance_ipv6_supportAddressCount(t *testing.T) { { Config: testAccInstanceConfigIpv6Support(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, - "ipv6_address_count", - "1"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "ipv6_address_count", "1"), ), }, { @@ -973,12 +938,8 @@ func TestAccAWSInstance_ipv6_supportAddressCountWithIpv4(t *testing.T) { { Config: testAccInstanceConfigIpv6SupportWithIpv4(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, - "ipv6_address_count", - "1"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "ipv6_address_count", "1"), ), }, { @@ -1006,10 +967,8 @@ func TestAccAWSInstance_multipleRegions(t *testing.T) { { Config: testAccInstanceConfigMultipleRegions, Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExistsWithProvider(resourceName, &v, - testAccAwsRegionProviderFunc("us-west-2", &providers)), - testAccCheckInstanceExistsWithProvider("aws_instance.test2", &v, - testAccAwsRegionProviderFunc("us-east-1", &providers)), + testAccCheckInstanceExistsWithProvider(resourceName, &v, testAccAwsRegionProviderFunc("us-west-2", &providers)), + testAccCheckInstanceExistsWithProvider("aws_instance.test2", &v, testAccAwsRegionProviderFunc("us-east-1", &providers)), ), }, }, @@ -1031,8 +990,7 @@ func TestAccAWSInstance_NetworkInstanceSecurityGroups(t *testing.T) { { Config: testAccInstanceNetworkInstanceSecurityGroups(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), + testAccCheckInstanceExists(resourceName, &v), ), }, { @@ -1058,12 +1016,9 @@ func TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups(t *testing.T) { { Config: testAccInstanceNetworkInstanceVPCSecurityGroupIDs(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "security_groups.#", "0"), - resource.TestCheckResourceAttr( - resourceName, "vpc_security_group_ids.#", "1"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "vpc_security_group_ids.#", "1"), ), }, { @@ -1074,12 +1029,9 @@ func TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups(t *testing.T) { { Config: testAccInstanceNetworkInstanceVPCRemoveSecurityGroupIDs(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "security_groups.#", "0"), - resource.TestCheckResourceAttr( - resourceName, "vpc_security_group_ids.#", "1"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "vpc_security_group_ids.#", "1"), ), ExpectError: regexp.MustCompile(`VPC-based instances require at least one security group to be attached`), }, @@ -1101,12 +1053,9 @@ func TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs(t *testing.T) { { Config: testAccInstanceNetworkInstanceVPCSecurityGroupIDs(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "security_groups.#", "0"), - resource.TestCheckResourceAttr( - resourceName, "vpc_security_group_ids.#", "1"), + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "vpc_security_group_ids.#", "1"), ), }, { @@ -1165,8 +1114,7 @@ func TestAccAWSInstance_volumeTags(t *testing.T) { Config: testAccCheckInstanceConfigNoVolumeTags, Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(resourceName, &v), - resource.TestCheckNoResourceAttr( - resourceName, "volume_tags"), + resource.TestCheckNoResourceAttr(resourceName, "volume_tags"), ), }, { @@ -1179,30 +1127,24 @@ func TestAccAWSInstance_volumeTags(t *testing.T) { Config: testAccCheckInstanceConfigWithVolumeTags, Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "volume_tags.%", "1"), - resource.TestCheckResourceAttr( - resourceName, "volume_tags.Name", "acceptance-test-volume-tag"), + resource.TestCheckResourceAttr(resourceName, "volume_tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "volume_tags.Name", "acceptance-test-volume-tag"), ), }, { Config: testAccCheckInstanceConfigWithVolumeTagsUpdate, Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "volume_tags.%", "2"), - resource.TestCheckResourceAttr( - resourceName, "volume_tags.Name", "acceptance-test-volume-tag"), - resource.TestCheckResourceAttr( - resourceName, "volume_tags.Environment", "dev"), + resource.TestCheckResourceAttr(resourceName, "volume_tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "volume_tags.Name", "acceptance-test-volume-tag"), + resource.TestCheckResourceAttr(resourceName, "volume_tags.Environment", "dev"), ), }, { Config: testAccCheckInstanceConfigNoVolumeTags, Check: resource.ComposeTestCheckFunc( testAccCheckInstanceExists(resourceName, &v), - resource.TestCheckNoResourceAttr( - resourceName, "volume_tags"), + resource.TestCheckNoResourceAttr(resourceName, "volume_tags"), ), }, }, @@ -1402,6 +1344,45 @@ func TestAccAWSInstance_associatePublicIPAndPrivateIP(t *testing.T) { }) } +// Allow Empty Private IP +// https://github.com/terraform-providers/terraform-provider-aws/issues/13626 +func TestAccAWSInstance_Empty_PrivateIP(t *testing.T) { + var v ec2.Instance + resourceName := "aws_instance.test" + rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + testCheckPrivateIP := func() resource.TestCheckFunc { + return func(*terraform.State) error { + if aws.StringValue(v.PrivateIpAddress) == "" { + return fmt.Errorf("bad computed private IP: %s", aws.StringValue(v.PrivateIpAddress)) + } + + return nil + } + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfigEmptyPrivateIP(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + testCheckPrivateIP(), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + // Guard against regression with KeyPairs // https://github.com/hashicorp/terraform/issues/2302 func TestAccAWSInstance_keyPairCheck(t *testing.T) { @@ -1440,91 +1421,457 @@ func TestAccAWSInstance_keyPairCheck(t *testing.T) { }) } -func TestAccAWSInstance_rootBlockDeviceMismatch(t *testing.T) { - var v ec2.Instance +func TestAccAWSInstance_rootBlockDeviceMismatch(t *testing.T) { + var v ec2.Instance + resourceName := "aws_instance.test" + rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfigRootBlockDeviceMismatch(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", "13"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"root_block_device"}, + }, + }, + }) +} + +// This test reproduces the bug here: +// https://github.com/hashicorp/terraform/issues/1752 +// +// I wish there were a way to exercise resources built with helper.Schema in a +// unit context, in which case this test could be moved there, but for now this +// will cover the bugfix. +// +// The following triggers "diffs didn't match during apply" without the fix in to +// set NewRemoved on the .# field when it changes to 0. +func TestAccAWSInstance_forceNewAndTagsDrift(t *testing.T) { + var v ec2.Instance + resourceName := "aws_instance.test" + rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfigForceNewAndTagsDrift(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + driftTags(&v), + ), + ExpectNonEmptyPlan: true, + }, + { + Config: testAccInstanceConfigForceNewAndTagsDrift_Update(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSInstance_changeInstanceType(t *testing.T) { + var before ec2.Instance + var after ec2.Instance + resourceName := "aws_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfigWithSmallInstanceType, + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &before), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccInstanceConfigUpdateInstanceType, + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &after), + testAccCheckInstanceNotRecreated(t, &before, &after), + ), + }, + }, + }) +} + +func TestAccAWSInstance_EbsRootDevice_basic(t *testing.T) { + var instance ec2.Instance + resourceName := "aws_instance.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEc2InstanceEbsRootDeviceBasic(), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &instance), + resource.TestCheckResourceAttr(resourceName, "root_block_device.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.delete_on_termination"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.encrypted"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.iops"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.volume_size"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.volume_type"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.volume_id"), + resource.TestCheckResourceAttrSet(resourceName, "root_block_device.0.device_name"), + ), + }, + }, + }) +} + +func TestAccAWSInstance_EbsRootDevice_ModifySize(t *testing.T) { + var original ec2.Instance + var updated ec2.Instance + resourceName := "aws_instance.test" + + deleteOnTermination := "true" + volumeType := "gp2" + + originalSize := "30" + updatedSize := "32" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEc2InstanceRootBlockDevice(originalSize, deleteOnTermination, volumeType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &original), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", originalSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", deleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", volumeType), + ), + }, + { + Config: testAccAwsEc2InstanceRootBlockDevice(updatedSize, deleteOnTermination, volumeType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &updated), + testAccCheckInstanceNotRecreated(t, &original, &updated), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", updatedSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", deleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", volumeType), + ), + }, + }, + }) +} +func TestAccAWSInstance_EbsRootDevice_ModifyType(t *testing.T) { + var original ec2.Instance + var updated ec2.Instance + resourceName := "aws_instance.test" + + volumeSize := "30" + deleteOnTermination := "true" + + originalType := "gp2" + updatedType := "io1" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEc2InstanceRootBlockDevice(volumeSize, deleteOnTermination, originalType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &original), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", volumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", deleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", originalType), + ), + }, + { + Config: testAccAwsEc2InstanceRootBlockDevice(volumeSize, deleteOnTermination, updatedType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &updated), + testAccCheckInstanceNotRecreated(t, &original, &updated), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", volumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", deleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", updatedType), + ), + }, + }, + }) +} + +func TestAccAWSInstance_EbsRootDevice_ModifyIOPS(t *testing.T) { + var original ec2.Instance + var updated ec2.Instance + resourceName := "aws_instance.test" + + volumeSize := "30" + deleteOnTermination := "true" + volumeType := "io1" + + originalIOPS := "100" + updatedIOPS := "200" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEc2InstanceRootBlockDeviceWithIOPS(volumeSize, deleteOnTermination, volumeType, originalIOPS), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &original), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", volumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", deleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", volumeType), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.iops", originalIOPS), + ), + }, + { + Config: testAccAwsEc2InstanceRootBlockDeviceWithIOPS(volumeSize, deleteOnTermination, volumeType, updatedIOPS), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &updated), + testAccCheckInstanceNotRecreated(t, &original, &updated), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", volumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", deleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", volumeType), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.iops", updatedIOPS), + ), + }, + }, + }) +} + +func TestAccAWSInstance_EbsRootDevice_ModifyDeleteOnTermination(t *testing.T) { + var original ec2.Instance + var updated ec2.Instance + resourceName := "aws_instance.test" + + volumeSize := "30" + volumeType := "gp2" + + originalDeleteOnTermination := "false" + updatedDeleteOnTermination := "true" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEc2InstanceRootBlockDevice(volumeSize, originalDeleteOnTermination, volumeType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &original), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", volumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", originalDeleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", volumeType), + ), + }, + { + Config: testAccAwsEc2InstanceRootBlockDevice(volumeSize, updatedDeleteOnTermination, volumeType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &updated), + testAccCheckInstanceNotRecreated(t, &original, &updated), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", volumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", updatedDeleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", volumeType), + ), + }, + }, + }) +} + +func TestAccAWSInstance_EbsRootDevice_ModifyAll(t *testing.T) { + var original ec2.Instance + var updated ec2.Instance + resourceName := "aws_instance.test" + + originalSize := "30" + updatedSize := "32" + + originalType := "gp2" + updatedType := "io1" + + updatedIOPS := "200" + + originalDeleteOnTermination := "false" + updatedDeleteOnTermination := "true" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEc2InstanceRootBlockDevice(originalSize, originalDeleteOnTermination, originalType), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &original), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", originalSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", originalDeleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", originalType), + ), + }, + { + Config: testAccAwsEc2InstanceRootBlockDeviceWithIOPS(updatedSize, updatedDeleteOnTermination, updatedType, updatedIOPS), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &updated), + testAccCheckInstanceNotRecreated(t, &original, &updated), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", updatedSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", updatedDeleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_type", updatedType), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.iops", updatedIOPS), + ), + }, + }, + }) +} + +func TestAccAWSInstance_EbsRootDevice_MultipleBlockDevices_ModifySize(t *testing.T) { + var before ec2.Instance + var after ec2.Instance resourceName := "aws_instance.test" - rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + deleteOnTermination := "true" + + originalRootVolumeSize := "10" + updatedRootVolumeSize := "14" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckInstanceDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccInstanceConfigRootBlockDeviceMismatch(rName), + Config: testAccAwsEc2InstanceConfigBlockDevicesWithDeleteOnTerminate(originalRootVolumeSize, deleteOnTermination), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists(resourceName, &v), - resource.TestCheckResourceAttr( - resourceName, "root_block_device.0.volume_size", "13"), + testAccCheckInstanceExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", originalRootVolumeSize), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_size", "9"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.volume_size", "12"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"root_block_device"}, + Config: testAccAwsEc2InstanceConfigBlockDevicesWithDeleteOnTerminate(updatedRootVolumeSize, deleteOnTermination), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &after), + testAccCheckInstanceNotRecreated(t, &before, &after), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", updatedRootVolumeSize), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_size", "9"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.volume_size", "12"), + ), }, }, }) } -// This test reproduces the bug here: -// https://github.com/hashicorp/terraform/issues/1752 -// -// I wish there were a way to exercise resources built with helper.Schema in a -// unit context, in which case this test could be moved there, but for now this -// will cover the bugfix. -// -// The following triggers "diffs didn't match during apply" without the fix in to -// set NewRemoved on the .# field when it changes to 0. -func TestAccAWSInstance_forceNewAndTagsDrift(t *testing.T) { - var v ec2.Instance +func TestAccAWSInstance_EbsRootDevice_MultipleBlockDevices_ModifyDeleteOnTermination(t *testing.T) { + var before ec2.Instance + var after ec2.Instance resourceName := "aws_instance.test" - rName := fmt.Sprintf("tf-testacc-instance-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + + rootVolumeSize := "10" + + originalDeleteOnTermination := "false" + updatedDeleteOnTermination := "true" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckInstanceDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccInstanceConfigForceNewAndTagsDrift(rName), + Config: testAccAwsEc2InstanceConfigBlockDevicesWithDeleteOnTerminate(rootVolumeSize, originalDeleteOnTermination), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists(resourceName, &v), - driftTags(&v), + testAccCheckInstanceExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", rootVolumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", originalDeleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_size", "9"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.volume_size", "12"), ), - ExpectNonEmptyPlan: true, }, { - Config: testAccInstanceConfigForceNewAndTagsDrift_Update(rName), + Config: testAccAwsEc2InstanceConfigBlockDevicesWithDeleteOnTerminate(rootVolumeSize, updatedDeleteOnTermination), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists(resourceName, &v), + testAccCheckInstanceExists(resourceName, &after), + testAccCheckInstanceNotRecreated(t, &before, &after), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.volume_size", rootVolumeSize), + resource.TestCheckResourceAttr(resourceName, "root_block_device.0.delete_on_termination", updatedDeleteOnTermination), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_size", "9"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2634515331.volume_size", "12"), ), }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, }, }) } -func TestAccAWSInstance_changeInstanceType(t *testing.T) { - var before ec2.Instance - var after ec2.Instance +// Test to validate fix for GH-ISSUE #1318 (dynamic ebs_block_devices forcing replacement after state refresh) +func TestAccAWSInstance_EbsRootDevice_MultipleDynamicEBSBlockDevices(t *testing.T) { + var instance ec2.Instance + resourceName := "aws_instance.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckInstanceDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccInstanceConfigWithSmallInstanceType, + Config: testAccAwsEc2InstanceConfigDynamicEBSBlockDevices, Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists(resourceName, &before), + testAccCheckInstanceExists(resourceName, &instance), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.#", "3"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.delete_on_termination", "true"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.device_name", "/dev/sdc"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.iops", "100"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2554893574.volume_type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.delete_on_termination", "true"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.device_name", "/dev/sdb"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.iops", "100"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2576023345.volume_type", "gp2"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2613854568.delete_on_termination", "true"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2613854568.device_name", "/dev/sda"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2613854568.encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2613854568.iops", "100"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2613854568.volume_size", "10"), + resource.TestCheckResourceAttr(resourceName, "ebs_block_device.2613854568.volume_type", "gp2"), ), }, { @@ -1532,14 +1879,6 @@ func TestAccAWSInstance_changeInstanceType(t *testing.T) { ImportState: true, ImportStateVerify: true, }, - { - Config: testAccInstanceConfigUpdateInstanceType, - Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists(resourceName, &after), - testAccCheckInstanceNotRecreated( - t, &before, &after), - ), - }, }, }) } @@ -2529,6 +2868,50 @@ func TestAccAWSInstance_hibernation(t *testing.T) { }) } +func TestAccAWSInstance_metadataOptions(t *testing.T) { + var v ec2.Instance + resourceName := "aws_instance.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + // No subnet_id specified requires default VPC or EC2-Classic. + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckHasDefaultVpcOrEc2Classic(t) + }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfigMetadataOptions(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "metadata_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_endpoint", "disabled"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_tokens", "optional"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_put_response_hop_limit", "1"), + ), + }, + { + Config: testAccInstanceConfigMetadataOptionsUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "metadata_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_endpoint", "enabled"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_tokens", "required"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_put_response_hop_limit", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckInstanceNotRecreated(t *testing.T, before, after *ec2.Instance) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -2562,21 +2945,15 @@ func testAccCheckInstanceDestroyWithProvider(s *terraform.State, provider *schem } // Try to find the resource - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(rs.Primary.ID)}, - }) + instance, err := resourceAwsInstanceFindByID(conn, rs.Primary.ID) if err == nil { - for _, r := range resp.Reservations { - for _, i := range r.Instances { - if i.State != nil && *i.State.Name != "terminated" { - return fmt.Errorf("Found unterminated instance: %s", i) - } - } + if instance.State != nil && *instance.State.Name != "terminated" { + return fmt.Errorf("Found unterminated instance: %s", rs.Primary.ID) } } // Verify the error is what we want - if ae, ok := err.(awserr.Error); ok && ae.Code() == "InvalidInstanceID.NotFound" { + if isAWSErr(err, "InvalidInstanceID.NotFound", "") { continue } @@ -2604,15 +2981,13 @@ func testAccCheckInstanceExistsWithProvider(n string, i *ec2.Instance, providerF provider := providerF() conn := provider.Meta().(*AWSClient).ec2conn - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(rs.Primary.ID)}, - }) + instance, err := resourceAwsInstanceFindByID(conn, rs.Primary.ID) if err != nil { return err } - if len(resp.Reservations) > 0 { - *i = *resp.Reservations[0].Instances[0] + if instance != nil { + *i = *instance return nil } @@ -2636,34 +3011,18 @@ func testAccCheckInstanceDisappears(conf *ec2.Instance) resource.TestCheckFunc { } } -func testAccCheckStopInstance(conf *ec2.Instance) resource.TestCheckFunc { +func testAccCheckStopInstance(instance *ec2.Instance) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn params := &ec2.StopInstancesInput{ - InstanceIds: []*string{conf.InstanceId}, + InstanceIds: []*string{instance.InstanceId}, } if _, err := conn.StopInstances(params); err != nil { return err } - return waitForInstanceStopping(conn, *conf.InstanceId, 10*time.Minute) - } -} - -func TestInstanceTenancySchema(t *testing.T) { - actualSchema := resourceAwsInstance().Schema["tenancy"] - expectedSchema := &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - } - if !reflect.DeepEqual(actualSchema, expectedSchema) { - t.Fatalf( - "Got:\n\n%#v\n\nExpected:\n\n%#v\n", - actualSchema, - expectedSchema) + return waitForInstanceStopping(conn, *instance.InstanceId, 10*time.Minute) } } @@ -2736,6 +3095,12 @@ func testAccInstanceConfigInDefaultVpcBySgName(rName string) string { data "aws_availability_zones" "current" { # Exclude usw2-az4 (us-west-2d) as it has limited instance types. blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_vpc" "default" { @@ -2762,6 +3127,12 @@ func testAccInstanceConfigInDefaultVpcBySgId(rName string) string { data "aws_availability_zones" "current" { # Exclude usw2-az4 (us-west-2d) as it has limited instance types. blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_vpc" "default" { @@ -2950,7 +3321,70 @@ resource "aws_instance" "test" { } ` -const testAccInstanceConfigBlockDevices = ` +func testAccAwsEc2InstanceEbsRootDeviceBasic() string { + return composeConfig(testAccAwsEc2InstanceAmiWithEbsRootVolume, ` +resource "aws_instance" "test" { + ami = data.aws_ami.ami.id + + instance_type = "m3.medium" +} +`) +} + +func testAccAwsEc2InstanceRootBlockDevice(size, delete, volumeType string) string { + return testAccAwsEc2InstanceRootBlockDeviceWithIOPS(size, delete, volumeType, "") +} + +func testAccAwsEc2InstanceRootBlockDeviceWithIOPS(size, delete, volumeType, iops string) string { + if iops == "" { + iops = "null" + } + return composeConfig(testAccAwsEc2InstanceAmiWithEbsRootVolume, + fmt.Sprintf(` +resource "aws_instance" "test" { + ami = data.aws_ami.ami.id + + instance_type = "m3.medium" + + root_block_device { + volume_size = %[1]s + delete_on_termination = %[2]s + volume_type = %[3]q + iops = %[4]s + } +} +`, size, delete, volumeType, iops)) +} + +const testAccAwsEc2InstanceAmiWithEbsRootVolume = ` +data "aws_ami" "ami" { + owners = ["amazon"] + most_recent = true + + filter { + name = "name" + values = ["amzn2-ami-*"] + } + filter { + name = "root-device-type" + values = ["ebs"] + } + filter { + name = "architecture" + values = ["x86_64"] + } +} +` + +func testAccAwsEc2InstanceConfigBlockDevices(size string) string { + return testAccAwsEc2InstanceConfigBlockDevicesWithDeleteOnTerminate(size, "") +} + +func testAccAwsEc2InstanceConfigBlockDevicesWithDeleteOnTerminate(size, delete string) string { + if delete == "" { + delete = "null" + } + return fmt.Sprintf(` resource "aws_instance" "test" { # us-west-2 ami = "ami-55a7ea65" @@ -2961,8 +3395,9 @@ resource "aws_instance" "test" { instance_type = "m3.medium" root_block_device { - volume_type = "gp2" - volume_size = 11 + volume_type = "gp2" + volume_size = %[1]s + delete_on_termination = %[2]s } ebs_block_device { @@ -2989,7 +3424,8 @@ resource "aws_instance" "test" { virtual_name = "ephemeral0" } } -` +`, size, delete) +} func testAccInstanceConfigSourceDestEnable(rName string) string { return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceVpcConfig(rName, false) + fmt.Sprintf(` @@ -3037,6 +3473,41 @@ resource "aws_instance" "test" { `) } +func testAccInstanceConfigOutpost(outpostArn string) string { + return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceOutpostConfig(outpostArn) + fmt.Sprintf(` +resource "aws_instance" "test" { + ami = "${data.aws_ami.amzn-ami-minimal-hvm-ebs.id}" + instance_type = "m5.large" + subnet_id = "${aws_subnet.test.id}" + + root_block_device { + volume_type = "gp2" + volume_size = 8 + } +} +`) +} + +func testAccAwsInstanceOutpostConfig(outpostArn string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "current" { + # Exclude usw2-az4 (us-west-2d) as it has limited instance types. + blacklisted_zone_ids = ["usw2-az4"] +} + +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_subnet" "test" { + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.test.id}" + availability_zone = "${data.aws_availability_zones.current.names[0]}" + outpost_arn = "%s" +} +`, outpostArn) +} + func testAccInstanceConfigPlacementGroup(rName string) string { return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceVpcConfig(rName, false) + fmt.Sprintf(` resource "aws_placement_group" "test" { @@ -3438,6 +3909,17 @@ resource "aws_instance" "test" { `) } +func testAccInstanceConfigEmptyPrivateIP(rName string) string { + return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceVpcConfig(rName, false) + fmt.Sprintf(` +resource "aws_instance" "test" { + ami = "${data.aws_ami.amzn-ami-minimal-hvm-ebs.id}" + instance_type = "t2.micro" + subnet_id = "${aws_subnet.test.id}" + private_ip = "" +} +`) +} + func testAccInstanceConfigAssociatePublicIPAndPrivateIP(rName string) string { return testAccLatestAmazonLinuxHvmEbsAmiConfig() + testAccAwsInstanceVpcConfig(rName, false) + fmt.Sprintf(` resource "aws_instance" "test" { @@ -4123,6 +4605,12 @@ func testAccAwsInstanceVpcConfig(rName string, mapPublicIpOnLaunch bool) string data "aws_availability_zones" "current" { # Exclude usw2-az4 (us-west-2d) as it has limited instance types. blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -4188,6 +4676,12 @@ func testAccAwsInstanceVpcIpv6Config(rName string) string { data "aws_availability_zones" "current" { # Exclude usw2-az4 (us-west-2d) as it has limited instance types. blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -4223,7 +4717,7 @@ data "aws_ami" "amzn-ami-minimal-hvm-ebs" { name = "name" values = ["amzn-ami-minimal-hvm-*"] } - + filter { name = "root-device-type" values = ["ebs"] @@ -4261,3 +4755,82 @@ resource "aws_instance" "test" { } `, hibernation) } + +func testAccInstanceConfigMetadataOptions(rName string) string { + return composeConfig( + testAccLatestAmazonLinuxHvmEbsAmiConfig(), + testAccAvailableEc2InstanceTypeForRegion("t3.micro", "t2.micro"), + fmt.Sprintf(` +resource "aws_instance" "test" { + ami = data.aws_ami.amzn-ami-minimal-hvm-ebs.id + instance_type = data.aws_ec2_instance_type_offering.available.instance_type + + tags = { + Name = %[1]q + } + + metadata_options { + http_endpoint = "disabled" + } +} + +data "aws_instance" "test" { + instance_id = aws_instance.test.id +} +`, rName)) +} + +func testAccInstanceConfigMetadataOptionsUpdated(rName string) string { + return composeConfig( + testAccLatestAmazonLinuxHvmEbsAmiConfig(), + testAccAvailableEc2InstanceTypeForRegion("t3.micro", "t2.micro"), + fmt.Sprintf(` +resource "aws_instance" "test" { + ami = data.aws_ami.amzn-ami-minimal-hvm-ebs.id + instance_type = data.aws_ec2_instance_type_offering.available.instance_type + + tags = { + Name = %[1]q + } + + metadata_options { + http_endpoint = "enabled" + http_tokens = "required" + http_put_response_hop_limit = 2 + } +} +`, rName)) +} + +// testAccAvailableEc2InstanceTypeForRegion returns the configuration for a data source that describes +// the first available EC2 instance type offering in the current region from a list of preferred instance types. +// The data source is named 'available'. +func testAccAvailableEc2InstanceTypeForRegion(preferredInstanceTypes ...string) string { + return fmt.Sprintf(` +data "aws_ec2_instance_type_offering" "available" { + filter { + name = "instance-type" + values = ["%[1]v"] + } + + preferred_instance_types = ["%[1]v"] +} +`, strings.Join(preferredInstanceTypes, "\", \"")) +} + +const testAccAwsEc2InstanceConfigDynamicEBSBlockDevices = ` +resource "aws_instance" "test" { + ami = "ami-55a7ea65" + instance_type = "m3.medium" + + dynamic "ebs_block_device" { + for_each = ["a", "b", "c"] + iterator = device + content { + device_name = format("/dev/sd%s", device.value) + volume_size = "10" + volume_type = "gp2" + } + } +} +` diff --git a/aws/resource_aws_internet_gateway.go b/aws/resource_aws_internet_gateway.go index 5b08a669957..2d5ff0f2ebe 100644 --- a/aws/resource_aws_internet_gateway.go +++ b/aws/resource_aws_internet_gateway.go @@ -75,7 +75,7 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{}) } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 Internet Gateway (%s) tags: %s", d.Id(), err) } } @@ -91,6 +91,7 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{}) func resourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig igRaw, _, err := IGStateRefreshFunc(conn, d.Id())() if err != nil { @@ -110,7 +111,7 @@ func resourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) er d.Set("vpc_id", ig.Attachments[0].VpcId) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(ig.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(ig.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_iot_role_alias_test.go b/aws/resource_aws_iot_role_alias_test.go index 087574c660f..ff5b70c6b6f 100644 --- a/aws/resource_aws_iot_role_alias_test.go +++ b/aws/resource_aws_iot_role_alias_test.go @@ -15,6 +15,9 @@ func TestAccAWSIotRoleAlias_basic(t *testing.T) { alias := acctest.RandomWithPrefix("RoleAlias-") alias2 := acctest.RandomWithPrefix("RoleAlias2-") + resourceName := "aws_iot_role_alias.ra" + resourceName2 := "aws_iot_role_alias.ra2" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -23,51 +26,46 @@ func TestAccAWSIotRoleAlias_basic(t *testing.T) { { Config: testAccAWSIotRoleAliasConfig(alias), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra"), - testAccCheckResourceAttrRegionalARN("aws_iot_role_alias.ra", "arn", "iot", fmt.Sprintf("rolealias/%s", alias)), - resource.TestCheckResourceAttr( - "aws_iot_role_alias.ra", "credential_duration", "3600"), + testAccCheckAWSIotRoleAliasExists(resourceName), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "iot", fmt.Sprintf("rolealias/%s", alias)), + resource.TestCheckResourceAttr(resourceName, "credential_duration", "3600"), ), }, { Config: testAccAWSIotRoleAliasConfigUpdate1(alias, alias2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra"), - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra2"), - testAccCheckResourceAttrRegionalARN("aws_iot_role_alias.ra", "arn", "iot", fmt.Sprintf("rolealias/%s", alias)), - resource.TestCheckResourceAttr( - "aws_iot_role_alias.ra", "credential_duration", "1800"), + testAccCheckAWSIotRoleAliasExists(resourceName), + testAccCheckAWSIotRoleAliasExists(resourceName2), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "iot", fmt.Sprintf("rolealias/%s", alias)), + resource.TestCheckResourceAttr(resourceName, "credential_duration", "1800"), ), }, { Config: testAccAWSIotRoleAliasConfigUpdate2(alias2), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra2"), - ), + Check: resource.ComposeTestCheckFunc(testAccCheckAWSIotRoleAliasExists(resourceName2)), }, { Config: testAccAWSIotRoleAliasConfigUpdate3(alias2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra2"), + testAccCheckAWSIotRoleAliasExists(resourceName2), ), ExpectError: regexp.MustCompile("Role alias .+? already exists for this account"), }, { Config: testAccAWSIotRoleAliasConfigUpdate4(alias2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra2"), + testAccCheckAWSIotRoleAliasExists(resourceName2), ), }, { Config: testAccAWSIotRoleAliasConfigUpdate5(alias2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotRoleAliasExists("aws_iot_role_alias.ra2"), - resource.TestMatchResourceAttr( - "aws_iot_role_alias.ra2", "role_arn", regexp.MustCompile(".+?bogus")), + testAccCheckAWSIotRoleAliasExists(resourceName2), + testAccMatchResourceAttrGlobalARN(resourceName2, "role_arn", "iam", regexp.MustCompile("role/rolebogus")), ), }, { - ResourceName: "aws_iot_role_alias.ra2", + ResourceName: resourceName2, ImportState: true, ImportStateVerify: true, }, diff --git a/aws/resource_aws_iot_thing.go b/aws/resource_aws_iot_thing.go index 19c4b44d1c9..c6d76ab45fb 100644 --- a/aws/resource_aws_iot_thing.go +++ b/aws/resource_aws_iot_thing.go @@ -30,6 +30,7 @@ func resourceAwsIotThing() *schema.Resource { "attributes": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "thing_type_name": { Type: schema.TypeString, diff --git a/aws/resource_aws_iot_topic_rule.go b/aws/resource_aws_iot_topic_rule.go index fdfc27bf4b6..ca0d756d716 100644 --- a/aws/resource_aws_iot_topic_rule.go +++ b/aws/resource_aws_iot_topic_rule.go @@ -1,11 +1,13 @@ package aws import ( - "log" + "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) func resourceAwsIotTopicRule() *schema.Resource { @@ -20,27 +22,9 @@ func resourceAwsIotTopicRule() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateIoTTopicRuleName, - }, - "description": { - Type: schema.TypeString, - Optional: true, - }, - "enabled": { - Type: schema.TypeBool, - Required: true, - }, - "sql": { - Type: schema.TypeString, - Required: true, - }, - "sql_version": { + "arn": { Type: schema.TypeString, - Required: true, + Computed: true, }, "cloudwatch_alarm": { Type: schema.TypeSet, @@ -102,6 +86,10 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "description": { + Type: schema.TypeString, + Optional: true, + }, "dynamodb": { Type: schema.TypeSet, Optional: true, @@ -119,6 +107,15 @@ func resourceAwsIotTopicRule() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "operation": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + "DELETE", + "INSERT", + "UPDATE", + }, false), + }, "payload_field": { Type: schema.TypeString, Optional: true, @@ -147,6 +144,32 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "dynamodbv2": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "put_item": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "table_name": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, "elasticsearch": { Type: schema.TypeSet, Optional: true, @@ -177,6 +200,10 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "enabled": { + Type: schema.TypeBool, + Required: true, + }, "firehose": { Type: schema.TypeSet, Optional: true, @@ -199,6 +226,44 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "iot_analytics": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "channel_name": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + "iot_events": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "input_name": { + Type: schema.TypeString, + Required: true, + }, + "message_id": { + Type: schema.TypeString, + Optional: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, "kinesis": { Type: schema.TypeSet, Optional: true, @@ -233,11 +298,23 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateIoTTopicRuleName, + }, "republish": { Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "qos": { + Type: schema.TypeInt, + Optional: true, + Default: 0, + ValidateFunc: validation.IntBetween(0, 1), + }, "role_arn": { Type: schema.TypeString, Required: true, @@ -271,6 +348,27 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "step_functions": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "execution_name_prefix": { + Type: schema.TypeString, + Optional: true, + }, + "state_machine_name": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, "sns": { Type: schema.TypeSet, Optional: true, @@ -294,6 +392,14 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, + "sql": { + Type: schema.TypeString, + Required: true, + }, + "sql_version": { + Type: schema.TypeString, + Required: true, + }, "sqs": { Type: schema.TypeSet, Optional: true, @@ -315,303 +421,1400 @@ func resourceAwsIotTopicRule() *schema.Resource { }, }, }, - "arn": { - Type: schema.TypeString, - Computed: true, - }, + "tags": tagsSchema(), }, } } -func createTopicRulePayload(d *schema.ResourceData) *iot.TopicRulePayload { - cloudwatchAlarmActions := d.Get("cloudwatch_alarm").(*schema.Set).List() - cloudwatchMetricActions := d.Get("cloudwatch_metric").(*schema.Set).List() - dynamoDbActions := d.Get("dynamodb").(*schema.Set).List() - elasticsearchActions := d.Get("elasticsearch").(*schema.Set).List() - firehoseActions := d.Get("firehose").(*schema.Set).List() - kinesisActions := d.Get("kinesis").(*schema.Set).List() - lambdaActions := d.Get("lambda").(*schema.Set).List() - republishActions := d.Get("republish").(*schema.Set).List() - s3Actions := d.Get("s3").(*schema.Set).List() - snsActions := d.Get("sns").(*schema.Set).List() - sqsActions := d.Get("sqs").(*schema.Set).List() - - numActions := len(cloudwatchAlarmActions) + len(cloudwatchMetricActions) + - len(dynamoDbActions) + len(elasticsearchActions) + len(firehoseActions) + - len(kinesisActions) + len(lambdaActions) + len(republishActions) + - len(s3Actions) + len(snsActions) + len(sqsActions) - actions := make([]*iot.Action, numActions) - - i := 0 - // Add Cloudwatch Alarm actions - for _, a := range cloudwatchAlarmActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - CloudwatchAlarm: &iot.CloudwatchAlarmAction{ - AlarmName: aws.String(raw["alarm_name"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - StateReason: aws.String(raw["state_reason"].(string)), - StateValue: aws.String(raw["state_value"].(string)), - }, - } - i++ +func resourceAwsIotTopicRuleCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + ruleName := d.Get("name").(string) + + input := &iot.CreateTopicRuleInput{ + RuleName: aws.String(ruleName), + Tags: aws.String(keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().UrlEncode()), + TopicRulePayload: expandIotTopicRulePayload(d), } - // Add Cloudwatch Metric actions - for _, a := range cloudwatchMetricActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - CloudwatchMetric: &iot.CloudwatchMetricAction{ - MetricName: aws.String(raw["metric_name"].(string)), - MetricNamespace: aws.String(raw["metric_namespace"].(string)), - MetricUnit: aws.String(raw["metric_unit"].(string)), - MetricValue: aws.String(raw["metric_value"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - }, - } - if v, ok := raw["metric_timestamp"].(string); ok && v != "" { - act.CloudwatchMetric.MetricTimestamp = aws.String(v) - } - actions[i] = act - i++ + _, err := conn.CreateTopicRule(input) + + if err != nil { + return fmt.Errorf("error creating IoT Topic Rule (%s): %w", ruleName, err) } - // Add DynamoDB actions - for _, a := range dynamoDbActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - DynamoDB: &iot.DynamoDBAction{ - HashKeyField: aws.String(raw["hash_key_field"].(string)), - HashKeyValue: aws.String(raw["hash_key_value"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - TableName: aws.String(raw["table_name"].(string)), - }, - } - if v, ok := raw["hash_key_type"].(string); ok && v != "" { - act.DynamoDB.HashKeyType = aws.String(v) - } - if v, ok := raw["range_key_type"].(string); ok && v != "" { - act.DynamoDB.RangeKeyType = aws.String(v) - } - if v, ok := raw["range_key_field"].(string); ok && v != "" { - act.DynamoDB.RangeKeyField = aws.String(v) - } - if v, ok := raw["range_key_value"].(string); ok && v != "" { - act.DynamoDB.RangeKeyValue = aws.String(v) - } - if v, ok := raw["payload_field"].(string); ok && v != "" { - act.DynamoDB.PayloadField = aws.String(v) - } - actions[i] = act - i++ + d.SetId(ruleName) + + return resourceAwsIotTopicRuleRead(d, meta) +} + +func resourceAwsIotTopicRuleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + input := &iot.GetTopicRuleInput{ + RuleName: aws.String(d.Id()), } - // Add Elasticsearch actions + out, err := conn.GetTopicRule(input) - for _, a := range elasticsearchActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Elasticsearch: &iot.ElasticsearchAction{ - Endpoint: aws.String(raw["endpoint"].(string)), - Id: aws.String(raw["id"].(string)), - Index: aws.String(raw["index"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - Type: aws.String(raw["type"].(string)), - }, - } - i++ + if err != nil { + return fmt.Errorf("error getting IoT Topic Rule (%s): %w", d.Id(), err) } - // Add Firehose actions + d.Set("arn", out.RuleArn) + d.Set("name", out.Rule.RuleName) + d.Set("description", out.Rule.Description) + d.Set("enabled", !aws.BoolValue(out.Rule.RuleDisabled)) + d.Set("sql", out.Rule.Sql) + d.Set("sql_version", out.Rule.AwsIotSqlVersion) + + tags, err := keyvaluetags.IotListTags(conn, aws.StringValue(out.RuleArn)) - for _, a := range firehoseActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - Firehose: &iot.FirehoseAction{ - DeliveryStreamName: aws.String(raw["delivery_stream_name"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - }, - } - if v, ok := raw["separator"].(string); ok && v != "" { - act.Firehose.Separator = aws.String(raw["separator"].(string)) - } - actions[i] = act - i++ + if err != nil { + return fmt.Errorf("error listing tags for IoT Topic Rule (%s): %w", aws.StringValue(out.RuleArn), err) } - // Add Kinesis actions + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } - for _, a := range kinesisActions { - raw := a.(map[string]interface{}) - act := &iot.Action{ - Kinesis: &iot.KinesisAction{ - RoleArn: aws.String(raw["role_arn"].(string)), - StreamName: aws.String(raw["stream_name"].(string)), - }, - } - if v, ok := raw["partition_key"].(string); ok && v != "" { - act.Kinesis.PartitionKey = aws.String(v) - } - actions[i] = act - i++ + if err := d.Set("cloudwatch_alarm", flattenIotCloudWatchAlarmActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting cloudwatch_alarm: %w", err) } - // Add Lambda actions + if err := d.Set("cloudwatch_metric", flattenIotCloudwatchMetricActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting cloudwatch_metric: %w", err) + } - for _, a := range lambdaActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Lambda: &iot.LambdaAction{ - FunctionArn: aws.String(raw["function_arn"].(string)), - }, - } - i++ + if err := d.Set("dynamodb", flattenIotDynamoDbActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting dynamodb: %w", err) } - // Add Republish actions + if err := d.Set("dynamodbv2", flattenIotDynamoDbv2Actions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting dynamodbv2: %w", err) + } - for _, a := range republishActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Republish: &iot.RepublishAction{ - RoleArn: aws.String(raw["role_arn"].(string)), - Topic: aws.String(raw["topic"].(string)), - }, - } - i++ + if err := d.Set("elasticsearch", flattenIotElasticsearchActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting elasticsearch: %w", err) } - // Add S3 actions + if err := d.Set("firehose", flattenIotFirehoseActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting firehose: %w", err) + } - for _, a := range s3Actions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - S3: &iot.S3Action{ - BucketName: aws.String(raw["bucket_name"].(string)), - Key: aws.String(raw["key"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - }, - } - i++ + if err := d.Set("iot_analytics", flattenIotIotAnalyticsActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting iot_analytics: %w", err) } - // Add SNS actions + if err := d.Set("iot_events", flattenIotIotEventsActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting iot_events: %w", err) + } - for _, a := range snsActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Sns: &iot.SnsAction{ - RoleArn: aws.String(raw["role_arn"].(string)), - TargetArn: aws.String(raw["target_arn"].(string)), - MessageFormat: aws.String(raw["message_format"].(string)), - }, - } - i++ + if err := d.Set("kinesis", flattenIotKinesisActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting kinesis: %w", err) } - // Add SQS actions + if err := d.Set("lambda", flattenIotLambdaActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting lambda: %w", err) + } - for _, a := range sqsActions { - raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ - Sqs: &iot.SqsAction{ - QueueUrl: aws.String(raw["queue_url"].(string)), - RoleArn: aws.String(raw["role_arn"].(string)), - UseBase64: aws.Bool(raw["use_base64"].(bool)), - }, - } - i++ + if err := d.Set("republish", flattenIotRepublishActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting republish: %w", err) } - return &iot.TopicRulePayload{ - Description: aws.String(d.Get("description").(string)), - RuleDisabled: aws.Bool(!d.Get("enabled").(bool)), - Sql: aws.String(d.Get("sql").(string)), - AwsIotSqlVersion: aws.String(d.Get("sql_version").(string)), - Actions: actions, + if err := d.Set("s3", flattenIotS3Actions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting s3: %w", err) + } + + if err := d.Set("sns", flattenIotSnsActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting sns: %w", err) + } + + if err := d.Set("sqs", flattenIotSqsActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting sqs: %w", err) + } + + if err := d.Set("step_functions", flattenIotStepFunctionsActions(out.Rule.Actions)); err != nil { + return fmt.Errorf("error setting step_functions: %w", err) } + + return nil } -func resourceAwsIotTopicRuleCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsIotTopicRuleUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).iotconn - ruleName := d.Get("name").(string) + if d.HasChanges( + "cloudwatch_alarm", + "cloudwatch_metric", + "description", + "dynamodb", + "dynamodbv2", + "elasticsearch", + "enabled", + "firehose", + "iot_analytics", + "iot_events", + "kinesis", + "lambda", + "republish", + "s3", + "step_functions", + "sns", + "sql", + "sql_version", + "sqs", + ) { + input := &iot.ReplaceTopicRuleInput{ + RuleName: aws.String(d.Get("name").(string)), + TopicRulePayload: expandIotTopicRulePayload(d), + } - params := &iot.CreateTopicRuleInput{ - RuleName: aws.String(ruleName), - TopicRulePayload: createTopicRulePayload(d), - } - log.Printf("[DEBUG] Creating IoT Topic Rule: %s", params) - _, err := conn.CreateTopicRule(params) + _, err := conn.ReplaceTopicRule(input) - if err != nil { - return err + if err != nil { + return fmt.Errorf("error updating IoT Topic Rule (%s): %w", d.Id(), err) + } } - d.SetId(ruleName) + if d.HasChange("tags") { + o, n := d.GetChange("tags") + + if err := keyvaluetags.IotUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating tags: %s", err) + } + } return resourceAwsIotTopicRuleRead(d, meta) } -func resourceAwsIotTopicRuleRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsIotTopicRuleDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).iotconn - params := &iot.GetTopicRuleInput{ + input := &iot.DeleteTopicRuleInput{ RuleName: aws.String(d.Id()), } - log.Printf("[DEBUG] Reading IoT Topic Rule: %s", params) - out, err := conn.GetTopicRule(params) + + _, err := conn.DeleteTopicRule(input) if err != nil { - return err + return fmt.Errorf("error deleting IoT Topic Rule (%s): %w", d.Id(), err) } - d.Set("arn", out.RuleArn) - d.Set("name", out.Rule.RuleName) - d.Set("description", out.Rule.Description) - d.Set("enabled", !(*out.Rule.RuleDisabled)) - d.Set("sql", out.Rule.Sql) - d.Set("sql_version", out.Rule.AwsIotSqlVersion) - d.Set("cloudwatch_alarm", flattenIoTRuleCloudWatchAlarmActions(out.Rule.Actions)) - d.Set("cloudwatch_metric", flattenIoTRuleCloudWatchMetricActions(out.Rule.Actions)) - d.Set("dynamodb", flattenIoTRuleDynamoDbActions(out.Rule.Actions)) - d.Set("elasticsearch", flattenIoTRuleElasticSearchActions(out.Rule.Actions)) - d.Set("firehose", flattenIoTRuleFirehoseActions(out.Rule.Actions)) - d.Set("kinesis", flattenIoTRuleKinesisActions(out.Rule.Actions)) - d.Set("lambda", flattenIoTRuleLambdaActions(out.Rule.Actions)) - d.Set("republish", flattenIoTRuleRepublishActions(out.Rule.Actions)) - d.Set("s3", flattenIoTRuleS3Actions(out.Rule.Actions)) - d.Set("sns", flattenIoTRuleSnsActions(out.Rule.Actions)) - d.Set("sqs", flattenIoTRuleSqsActions(out.Rule.Actions)) - return nil } -func resourceAwsIotTopicRuleUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn +func expandIotPutItemInput(tfList []interface{}) *iot.PutItemInput { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.PutItemInput{} + tfMap := tfList[0].(map[string]interface{}) - params := &iot.ReplaceTopicRuleInput{ - RuleName: aws.String(d.Get("name").(string)), - TopicRulePayload: createTopicRulePayload(d), + if v, ok := tfMap["table_name"].(string); ok && v != "" { + apiObject.TableName = aws.String(v) } - log.Printf("[DEBUG] Updating IoT Topic Rule: %s", params) - _, err := conn.ReplaceTopicRule(params) - if err != nil { - return err + return apiObject +} + +func expandIotCloudwatchAlarmAction(tfList []interface{}) *iot.CloudwatchAlarmAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil } - return resourceAwsIotTopicRuleRead(d, meta) + apiObject := &iot.CloudwatchAlarmAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["alarm_name"].(string); ok && v != "" { + apiObject.AlarmName = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["state_reason"].(string); ok && v != "" { + apiObject.StateReason = aws.String(v) + } + + if v, ok := tfMap["state_value"].(string); ok && v != "" { + apiObject.StateValue = aws.String(v) + } + + return apiObject } -func resourceAwsIotTopicRuleDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn +func expandIotCloudwatchMetricAction(tfList []interface{}) *iot.CloudwatchMetricAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } - params := &iot.DeleteTopicRuleInput{ - RuleName: aws.String(d.Id()), + apiObject := &iot.CloudwatchMetricAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["metric_name"].(string); ok && v != "" { + apiObject.MetricName = aws.String(v) + } + + if v, ok := tfMap["metric_namespace"].(string); ok && v != "" { + apiObject.MetricNamespace = aws.String(v) + } + + if v, ok := tfMap["metric_timestamp"].(string); ok && v != "" { + apiObject.MetricTimestamp = aws.String(v) + } + + if v, ok := tfMap["metric_unit"].(string); ok && v != "" { + apiObject.MetricUnit = aws.String(v) + } + + if v, ok := tfMap["metric_value"].(string); ok && v != "" { + apiObject.MetricValue = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + return apiObject +} + +func expandIotDynamoDBAction(tfList []interface{}) *iot.DynamoDBAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.DynamoDBAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["hash_key_field"].(string); ok && v != "" { + apiObject.HashKeyField = aws.String(v) + } + + if v, ok := tfMap["hash_key_type"].(string); ok && v != "" { + apiObject.HashKeyType = aws.String(v) + } + + if v, ok := tfMap["hash_key_value"].(string); ok && v != "" { + apiObject.HashKeyValue = aws.String(v) + } + + if v, ok := tfMap["operation"].(string); ok && v != "" { + apiObject.Operation = aws.String(v) + } + + if v, ok := tfMap["payload_field"].(string); ok && v != "" { + apiObject.PayloadField = aws.String(v) + } + + if v, ok := tfMap["range_key_field"].(string); ok && v != "" { + apiObject.RangeKeyField = aws.String(v) + } + + if v, ok := tfMap["range_key_type"].(string); ok && v != "" { + apiObject.RangeKeyType = aws.String(v) + } + + if v, ok := tfMap["range_key_value"].(string); ok && v != "" { + apiObject.RangeKeyValue = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["table_name"].(string); ok && v != "" { + apiObject.TableName = aws.String(v) + } + + return apiObject +} + +func expandIotDynamoDBv2Action(tfList []interface{}) *iot.DynamoDBv2Action { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.DynamoDBv2Action{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["put_item"].([]interface{}); ok { + apiObject.PutItem = expandIotPutItemInput(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + return apiObject +} + +func expandIotElasticsearchAction(tfList []interface{}) *iot.ElasticsearchAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.ElasticsearchAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["endpoint"].(string); ok && v != "" { + apiObject.Endpoint = aws.String(v) + } + + if v, ok := tfMap["id"].(string); ok && v != "" { + apiObject.Id = aws.String(v) + } + + if v, ok := tfMap["index"].(string); ok && v != "" { + apiObject.Index = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["type"].(string); ok && v != "" { + apiObject.Type = aws.String(v) + } + + return apiObject +} + +func expandIotFirehoseAction(tfList []interface{}) *iot.FirehoseAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.FirehoseAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["delivery_stream_name"].(string); ok && v != "" { + apiObject.DeliveryStreamName = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["separator"].(string); ok && v != "" { + apiObject.Separator = aws.String(v) + } + + return apiObject +} + +func expandIotIotAnalyticsAction(tfList []interface{}) *iot.IotAnalyticsAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.IotAnalyticsAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["channel_name"].(string); ok && v != "" { + apiObject.ChannelName = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + return apiObject +} + +func expandIotIotEventsAction(tfList []interface{}) *iot.IotEventsAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.IotEventsAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["input_name"].(string); ok && v != "" { + apiObject.InputName = aws.String(v) + } + + if v, ok := tfMap["message_id"].(string); ok && v != "" { + apiObject.MessageId = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + return apiObject +} + +func expandIotKinesisAction(tfList []interface{}) *iot.KinesisAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.KinesisAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["partition_key"].(string); ok && v != "" { + apiObject.PartitionKey = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["stream_name"].(string); ok && v != "" { + apiObject.StreamName = aws.String(v) + } + + return apiObject +} + +func expandIotLambdaAction(tfList []interface{}) *iot.LambdaAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.LambdaAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["function_arn"].(string); ok && v != "" { + apiObject.FunctionArn = aws.String(v) + } + + return apiObject +} + +func expandIotRepublishAction(tfList []interface{}) *iot.RepublishAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.RepublishAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["qos"].(int); ok { + apiObject.Qos = aws.Int64(int64(v)) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["topic"].(string); ok && v != "" { + apiObject.Topic = aws.String(v) + } + + return apiObject +} + +func expandIotS3Action(tfList []interface{}) *iot.S3Action { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.S3Action{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["bucket_name"].(string); ok && v != "" { + apiObject.BucketName = aws.String(v) + } + + if v, ok := tfMap["key"].(string); ok && v != "" { + apiObject.Key = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + return apiObject +} + +func expandIotSnsAction(tfList []interface{}) *iot.SnsAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.SnsAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["message_format"].(string); ok && v != "" { + apiObject.MessageFormat = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["target_arn"].(string); ok && v != "" { + apiObject.TargetArn = aws.String(v) + } + + return apiObject +} + +func expandIotSqsAction(tfList []interface{}) *iot.SqsAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.SqsAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["queue_url"].(string); ok && v != "" { + apiObject.QueueUrl = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + if v, ok := tfMap["use_base64"].(bool); ok { + apiObject.UseBase64 = aws.Bool(v) + } + + return apiObject +} + +func expandIotStepFunctionsAction(tfList []interface{}) *iot.StepFunctionsAction { + if len(tfList) == 0 || tfList[0] == nil { + return nil + } + + apiObject := &iot.StepFunctionsAction{} + tfMap := tfList[0].(map[string]interface{}) + + if v, ok := tfMap["execution_name_prefix"].(string); ok && v != "" { + apiObject.ExecutionNamePrefix = aws.String(v) + } + + if v, ok := tfMap["state_machine_name"].(string); ok && v != "" { + apiObject.StateMachineName = aws.String(v) + } + + if v, ok := tfMap["role_arn"].(string); ok && v != "" { + apiObject.RoleArn = aws.String(v) + } + + return apiObject +} + +func expandIotTopicRulePayload(d *schema.ResourceData) *iot.TopicRulePayload { + var actions []*iot.Action + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("cloudwatch_alarm").(*schema.Set).List() { + action := expandIotCloudwatchAlarmAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{CloudwatchAlarm: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("cloudwatch_metric").(*schema.Set).List() { + action := expandIotCloudwatchMetricAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{CloudwatchMetric: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("dynamodb").(*schema.Set).List() { + action := expandIotDynamoDBAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{DynamoDB: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("dynamodbv2").(*schema.Set).List() { + action := expandIotDynamoDBv2Action([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{DynamoDBv2: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("elasticsearch").(*schema.Set).List() { + action := expandIotElasticsearchAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Elasticsearch: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("firehose").(*schema.Set).List() { + action := expandIotFirehoseAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Firehose: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("iot_analytics").(*schema.Set).List() { + action := expandIotIotAnalyticsAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{IotAnalytics: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("iot_events").(*schema.Set).List() { + action := expandIotIotEventsAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{IotEvents: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("kinesis").(*schema.Set).List() { + action := expandIotKinesisAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Kinesis: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("lambda").(*schema.Set).List() { + action := expandIotLambdaAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Lambda: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("republish").(*schema.Set).List() { + action := expandIotRepublishAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Republish: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("s3").(*schema.Set).List() { + action := expandIotS3Action([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{S3: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("sns").(*schema.Set).List() { + action := expandIotSnsAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Sns: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("sqs").(*schema.Set).List() { + action := expandIotSqsAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{Sqs: action}) + } + + // Legacy root attribute handling + for _, tfMapRaw := range d.Get("step_functions").(*schema.Set).List() { + action := expandIotStepFunctionsAction([]interface{}{tfMapRaw}) + + if action == nil { + continue + } + + actions = append(actions, &iot.Action{StepFunctions: action}) + } + + // Prevent sending empty Actions: + // - missing required field, CreateTopicRuleInput.TopicRulePayload.Actions + if len(actions) == 0 { + actions = []*iot.Action{} + } + + return &iot.TopicRulePayload{ + Actions: actions, + AwsIotSqlVersion: aws.String(d.Get("sql_version").(string)), + Description: aws.String(d.Get("description").(string)), + RuleDisabled: aws.Bool(!d.Get("enabled").(bool)), + Sql: aws.String(d.Get("sql").(string)), + } +} + +func flattenIotCloudwatchAlarmAction(apiObject *iot.CloudwatchAlarmAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.AlarmName; v != nil { + tfMap["alarm_name"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.StateReason; v != nil { + tfMap["state_reason"] = aws.StringValue(v) + } + + if v := apiObject.StateValue; v != nil { + tfMap["state_value"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotCloudWatchAlarmActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.CloudwatchAlarm; v != nil { + results = append(results, flattenIotCloudwatchAlarmAction(v)...) + } + } + + return results +} + +// Legacy root attribute handling +func flattenIotCloudwatchMetricActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.CloudwatchMetric; v != nil { + results = append(results, flattenIotCloudwatchMetricAction(v)...) + } + } + + return results +} + +func flattenIotCloudwatchMetricAction(apiObject *iot.CloudwatchMetricAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.MetricName; v != nil { + tfMap["metric_name"] = aws.StringValue(v) + } + + if v := apiObject.MetricNamespace; v != nil { + tfMap["metric_namespace"] = aws.StringValue(v) + } + + if v := apiObject.MetricTimestamp; v != nil { + tfMap["metric_timestamp"] = aws.StringValue(v) + } + + if v := apiObject.MetricUnit; v != nil { + tfMap["metric_unit"] = aws.StringValue(v) + } + + if v := apiObject.MetricValue; v != nil { + tfMap["metric_value"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotDynamoDbActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.DynamoDB; v != nil { + results = append(results, flattenIotDynamoDBAction(v)...) + } + } + + return results +} + +func flattenIotDynamoDBAction(apiObject *iot.DynamoDBAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.HashKeyField; v != nil { + tfMap["hash_key_field"] = aws.StringValue(v) + } + + if v := apiObject.HashKeyType; v != nil { + tfMap["hash_key_type"] = aws.StringValue(v) + } + + if v := apiObject.HashKeyValue; v != nil { + tfMap["hash_key_value"] = aws.StringValue(v) + } + + if v := apiObject.PayloadField; v != nil { + tfMap["payload_field"] = aws.StringValue(v) + } + + if v := apiObject.Operation; v != nil { + tfMap["operation"] = aws.StringValue(v) + } + + if v := apiObject.RangeKeyField; v != nil { + tfMap["range_key_field"] = aws.StringValue(v) + } + + if v := apiObject.RangeKeyType; v != nil { + tfMap["range_key_type"] = aws.StringValue(v) + } + + if v := apiObject.RangeKeyValue; v != nil { + tfMap["range_key_value"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.TableName; v != nil { + tfMap["table_name"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotDynamoDbv2Actions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.DynamoDBv2; v != nil { + results = append(results, flattenIotDynamoDBv2Action(v)...) + } + } + + return results +} + +func flattenIotDynamoDBv2Action(apiObject *iot.DynamoDBv2Action) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.PutItem; v != nil { + tfMap["put_item"] = flattenIotPutItemInput(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotElasticsearchActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Elasticsearch; v != nil { + results = append(results, flattenIotElasticsearchAction(v)...) + } + } + + return results +} + +func flattenIotElasticsearchAction(apiObject *iot.ElasticsearchAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.Endpoint; v != nil { + tfMap["endpoint"] = aws.StringValue(v) + } + + if v := apiObject.Id; v != nil { + tfMap["id"] = aws.StringValue(v) + } + + if v := apiObject.Index; v != nil { + tfMap["index"] = aws.StringValue(v) + } + + if v := apiObject.Type; v != nil { + tfMap["type"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotFirehoseActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Firehose; v != nil { + results = append(results, flattenIotFirehoseAction(v)...) + } + } + + return results +} + +func flattenIotFirehoseAction(apiObject *iot.FirehoseAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.DeliveryStreamName; v != nil { + tfMap["delivery_stream_name"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.Separator; v != nil { + tfMap["separator"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotIotAnalyticsActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.IotAnalytics; v != nil { + results = append(results, flattenIotIotAnalyticsAction(v)...) + } + } + + return results +} + +func flattenIotIotAnalyticsAction(apiObject *iot.IotAnalyticsAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.ChannelName; v != nil { + tfMap["channel_name"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotIotEventsActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.IotEvents; v != nil { + results = append(results, flattenIotIotEventsAction(v)...) + } + } + + return results +} + +func flattenIotIotEventsAction(apiObject *iot.IotEventsAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.InputName; v != nil { + tfMap["input_name"] = aws.StringValue(v) + } + + if v := apiObject.MessageId; v != nil { + tfMap["message_id"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotKinesisActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Kinesis; v != nil { + results = append(results, flattenIotKinesisAction(v)...) + } + } + + return results +} + +func flattenIotKinesisAction(apiObject *iot.KinesisAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.PartitionKey; v != nil { + tfMap["partition_key"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.StreamName; v != nil { + tfMap["stream_name"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotLambdaActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Lambda; v != nil { + results = append(results, flattenIotLambdaAction(v)...) + } + } + + return results +} + +func flattenIotLambdaAction(apiObject *iot.LambdaAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.FunctionArn; v != nil { + tfMap["function_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +func flattenIotPutItemInput(apiObject *iot.PutItemInput) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.TableName; v != nil { + tfMap["table_name"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotRepublishActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Republish; v != nil { + results = append(results, flattenIotRepublishAction(v)...) + } + } + + return results +} + +func flattenIotRepublishAction(apiObject *iot.RepublishAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.Qos; v != nil { + tfMap["qos"] = aws.Int64Value(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.Topic; v != nil { + tfMap["topic"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotS3Actions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.S3; v != nil { + results = append(results, flattenIotS3Action(v)...) + } + } + + return results +} + +func flattenIotS3Action(apiObject *iot.S3Action) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.BucketName; v != nil { + tfMap["bucket_name"] = aws.StringValue(v) + } + + if v := apiObject.Key; v != nil { + tfMap["key"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotSnsActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Sns; v != nil { + results = append(results, flattenIotSnsAction(v)...) + } + } + + return results +} + +func flattenIotSnsAction(apiObject *iot.SnsAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.MessageFormat; v != nil { + tfMap["message_format"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.TargetArn; v != nil { + tfMap["target_arn"] = aws.StringValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotSqsActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.Sqs; v != nil { + results = append(results, flattenIotSqsAction(v)...) + } + } + + return results +} + +func flattenIotSqsAction(apiObject *iot.SqsAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.QueueUrl; v != nil { + tfMap["queue_url"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) + } + + if v := apiObject.UseBase64; v != nil { + tfMap["use_base64"] = aws.BoolValue(v) + } + + return []interface{}{tfMap} +} + +// Legacy root attribute handling +func flattenIotStepFunctionsActions(actions []*iot.Action) []interface{} { + results := make([]interface{}, 0) + + for _, action := range actions { + if action == nil { + continue + } + + if v := action.StepFunctions; v != nil { + results = append(results, flattenIotStepFunctionsAction(v)...) + } + } + + return results +} + +func flattenIotStepFunctionsAction(apiObject *iot.StepFunctionsAction) []interface{} { + if apiObject == nil { + return nil + } + + tfMap := make(map[string]interface{}) + + if v := apiObject.ExecutionNamePrefix; v != nil { + tfMap["execution_name_prefix"] = aws.StringValue(v) + } + + if v := apiObject.StateMachineName; v != nil { + tfMap["state_machine_name"] = aws.StringValue(v) + } + + if v := apiObject.RoleArn; v != nil { + tfMap["role_arn"] = aws.StringValue(v) } - log.Printf("[DEBUG] Deleting IoT Topic Rule: %s", params) - _, err := conn.DeleteTopicRule(params) - return err + return []interface{}{tfMap} } diff --git a/aws/resource_aws_iot_topic_rule_test.go b/aws/resource_aws_iot_topic_rule_test.go index 4ebbed7c95b..c1f205f4e77 100644 --- a/aws/resource_aws_iot_topic_rule_test.go +++ b/aws/resource_aws_iot_topic_rule_test.go @@ -2,14 +2,71 @@ package aws import ( "fmt" + "log" "testing" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_iot_topic_rule", &resource.Sweeper{ + Name: "aws_iot_topic_rule", + F: testSweepIotTopicRules, + }) +} + +func testSweepIotTopicRules(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).iotconn + input := &iot.ListTopicRulesInput{} + var sweeperErrs *multierror.Error + + for { + output, err := conn.ListTopicRules(input) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping IoT Topic Rules sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving IoT Topic Rules: %w", err)) + return sweeperErrs + } + + for _, rule := range output.Rules { + name := aws.StringValue(rule.RuleName) + + log.Printf("[INFO] Deleting IoT Topic Rule: %s", name) + _, err := conn.DeleteTopicRule(&iot.DeleteTopicRuleInput{ + RuleName: aws.String(name), + }) + if isAWSErr(err, iot.ErrCodeUnauthorizedException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting IoT Topic Rule (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + if aws.StringValue(output.NextToken) == "" { + break + } + input.NextToken = output.NextToken + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSIoTTopicRule_basic(t *testing.T) { rName := acctest.RandString(5) resourceName := "aws_iot_topic_rule.rule" @@ -22,12 +79,13 @@ func TestAccAWSIoTTopicRule_basic(t *testing.T) { { Config: testAccAWSIoTTopicRule_basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), resource.TestCheckResourceAttr("aws_iot_topic_rule.rule", "name", fmt.Sprintf("test_rule_%s", rName)), resource.TestCheckResourceAttr("aws_iot_topic_rule.rule", "description", "Example rule"), resource.TestCheckResourceAttr("aws_iot_topic_rule.rule", "enabled", "true"), resource.TestCheckResourceAttr("aws_iot_topic_rule.rule", "sql", "SELECT * FROM 'topic/test'"), resource.TestCheckResourceAttr("aws_iot_topic_rule.rule", "sql_version", "2015-10-08"), + resource.TestCheckResourceAttr("aws_iot_topic_rule.rule", "tags.%", "0"), ), }, { @@ -51,7 +109,7 @@ func TestAccAWSIoTTopicRule_cloudwatchalarm(t *testing.T) { { Config: testAccAWSIoTTopicRule_cloudwatchalarm(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -75,7 +133,7 @@ func TestAccAWSIoTTopicRule_cloudwatchmetric(t *testing.T) { { Config: testAccAWSIoTTopicRule_cloudwatchmetric(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -99,7 +157,7 @@ func TestAccAWSIoTTopicRule_dynamodb(t *testing.T) { { Config: testAccAWSIoTTopicRule_dynamodb(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -110,7 +168,25 @@ func TestAccAWSIoTTopicRule_dynamodb(t *testing.T) { { Config: testAccAWSIoTTopicRule_dynamodb_rangekeys(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), + ), + }, + }, + }) +} + +func TestAccAWSIoTTopicRule_dynamoDbv2(t *testing.T) { + rName := acctest.RandString(5) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIoTTopicRule_dynamoDbv2(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, }, @@ -129,7 +205,7 @@ func TestAccAWSIoTTopicRule_elasticsearch(t *testing.T) { { Config: testAccAWSIoTTopicRule_elasticsearch(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -153,7 +229,7 @@ func TestAccAWSIoTTopicRule_firehose(t *testing.T) { { Config: testAccAWSIoTTopicRule_firehose(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -177,7 +253,7 @@ func TestAccAWSIoTTopicRule_firehose_separator(t *testing.T) { { Config: testAccAWSIoTTopicRule_firehose_separator(rName, "\n"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -188,7 +264,7 @@ func TestAccAWSIoTTopicRule_firehose_separator(t *testing.T) { { Config: testAccAWSIoTTopicRule_firehose_separator(rName, ","), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, }, @@ -207,7 +283,7 @@ func TestAccAWSIoTTopicRule_kinesis(t *testing.T) { { Config: testAccAWSIoTTopicRule_kinesis(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -231,7 +307,7 @@ func TestAccAWSIoTTopicRule_lambda(t *testing.T) { { Config: testAccAWSIoTTopicRule_lambda(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -255,7 +331,31 @@ func TestAccAWSIoTTopicRule_republish(t *testing.T) { { Config: testAccAWSIoTTopicRule_republish(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSIoTTopicRule_republish_with_qos(t *testing.T) { + rName := acctest.RandString(5) + resourceName := "aws_iot_topic_rule.rule" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIoTTopicRule_republish_with_qos(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -279,7 +379,7 @@ func TestAccAWSIoTTopicRule_s3(t *testing.T) { { Config: testAccAWSIoTTopicRule_s3(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -303,7 +403,7 @@ func TestAccAWSIoTTopicRule_sns(t *testing.T) { { Config: testAccAWSIoTTopicRule_sns(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -327,7 +427,7 @@ func TestAccAWSIoTTopicRule_sqs(t *testing.T) { { Config: testAccAWSIoTTopicRule_sqs(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIoTTopicRuleExists_basic("aws_iot_topic_rule.rule"), + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), ), }, { @@ -339,6 +439,109 @@ func TestAccAWSIoTTopicRule_sqs(t *testing.T) { }) } +func TestAccAWSIoTTopicRule_step_functions(t *testing.T) { + rName := acctest.RandString(5) + resourceName := "aws_iot_topic_rule.rule" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIoTTopicRule_step_functions(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSIoTTopicRule_iot_analytics(t *testing.T) { + rName := acctest.RandString(5) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIoTTopicRule_iot_analytics(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), + ), + }, + }, + }) +} + +func TestAccAWSIoTTopicRule_iot_events(t *testing.T) { + rName := acctest.RandString(5) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIoTTopicRule_iot_events(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists("aws_iot_topic_rule.rule"), + ), + }, + }, + }) +} + +func TestAccAWSIoTTopicRule_Tags(t *testing.T) { + rName := acctest.RandString(5) + resourceName := "aws_iot_topic_rule.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIoTTopicRuleTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSIoTTopicRuleTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSIoTTopicRuleTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIoTTopicRuleExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + func testAccCheckAWSIoTTopicRuleDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).iotconn @@ -347,7 +550,9 @@ func testAccCheckAWSIoTTopicRuleDestroy(s *terraform.State) error { continue } - out, err := conn.ListTopicRules(&iot.ListTopicRulesInput{}) + input := &iot.ListTopicRulesInput{} + + out, err := conn.ListTopicRules(input) if err != nil { return err @@ -364,14 +569,29 @@ func testAccCheckAWSIoTTopicRuleDestroy(s *terraform.State) error { return nil } -func testAccCheckAWSIoTTopicRuleExists_basic(name string) resource.TestCheckFunc { +func testAccCheckAWSIoTTopicRuleExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } - return nil + conn := testAccProvider.Meta().(*AWSClient).iotconn + input := &iot.ListTopicRulesInput{} + + output, err := conn.ListTopicRules(input) + + if err != nil { + return err + } + + for _, rule := range output.Rules { + if aws.StringValue(rule.RuleName) == rs.Primary.ID { + return nil + } + } + + return fmt.Errorf("IoT Topic Rule (%s) not found", rs.Primary.ID) } } @@ -467,6 +687,26 @@ resource "aws_iot_topic_rule" "rule" { `, rName) } +func testAccAWSIoTTopicRule_dynamoDbv2(rName string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "rule" { + name = "test_rule_%[1]s" + description = "Example rule" + enabled = true + sql = "SELECT field as column_name FROM 'topic/test'" + sql_version = "2015-10-08" + + dynamodbv2 { + put_item { + table_name = "test" + } + + role_arn = aws_iam_role.iot_role.arn + } +} +`, rName) +} + func testAccAWSIoTTopicRule_dynamodb(rName string) string { return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` resource "aws_iot_topic_rule" "rule" { @@ -481,7 +721,7 @@ resource "aws_iot_topic_rule" "rule" { hash_key_value = "hash_key_value" payload_field = "payload_field" role_arn = "${aws_iam_role.iot_role.arn}" - table_name = "table_name" + table_name = "table_name" } } `, rName) @@ -504,7 +744,8 @@ resource "aws_iot_topic_rule" "rule" { range_key_value = "range_key_value" range_key_type = "STRING" role_arn = "${aws_iam_role.iot_role.arn}" - table_name = "table_name" + table_name = "table_name" + operation = "INSERT" } } `, rName) @@ -617,6 +858,24 @@ resource "aws_iot_topic_rule" "rule" { `, rName) } +func testAccAWSIoTTopicRule_republish_with_qos(rName string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "rule" { + name = "test_rule_%[1]s" + description = "Example rule" + enabled = true + sql = "SELECT * FROM 'topic/test'" + sql_version = "2015-10-08" + + republish { + role_arn = "${aws_iam_role.iot_role.arn}" + topic = "mytopic" + qos = 1 + } +} +`, rName) +} + func testAccAWSIoTTopicRule_s3(rName string) string { return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` resource "aws_iot_topic_rule" "rule" { @@ -669,3 +928,87 @@ resource "aws_iot_topic_rule" "rule" { } `, rName) } + +func testAccAWSIoTTopicRule_step_functions(rName string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "rule" { + name = "test_rule_%[1]s" + description = "Example rule" + enabled = true + sql = "SELECT * FROM 'topic/test'" + sql_version = "2015-10-08" + + step_functions { + execution_name_prefix = "myprefix" + state_machine_name = "mystatemachine" + role_arn = "${aws_iam_role.iot_role.arn}" + } +} +`, rName) +} + +func testAccAWSIoTTopicRule_iot_analytics(rName string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "rule" { + name = "test_rule_%[1]s" + description = "Example rule" + enabled = true + sql = "SELECT * FROM 'topic/test'" + sql_version = "2015-10-08" + + iot_analytics { + channel_name = "fakedata" + role_arn = "${aws_iam_role.iot_role.arn}" + } +} +`, rName) +} + +func testAccAWSIoTTopicRule_iot_events(rName string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "rule" { + name = "test_rule_%[1]s" + description = "Example rule" + enabled = true + sql = "SELECT * FROM 'topic/test'" + sql_version = "2015-10-08" + + iot_events { + input_name = "fake_input_name" + role_arn = "${aws_iam_role.iot_role.arn}" + message_id = "fake_message_id" + } +} +`, rName) +} + +func testAccAWSIoTTopicRuleTags1(rName, tagKey1, tagValue1 string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "test" { + name = "test_rule_%[1]s" + enabled = true + sql = "SELECT * FROM 'topic/test'" + sql_version = "2015-10-08" + + tags = { + %[2]q = %[3]q + } +} +`, rName, tagKey1, tagValue1) +} + +func testAccAWSIoTTopicRuleTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return fmt.Sprintf(testAccAWSIoTTopicRuleRole+` +resource "aws_iot_topic_rule" "test" { + name = "test_rule_%[1]s" + enabled = true + sql = "SELECT * FROM 'topic/test'" + sql_version = "2015-10-08" + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, rName, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_key_pair.go b/aws/resource_aws_key_pair.go index c8e9f1fbfc6..8ff134a3e8c 100644 --- a/aws/resource_aws_key_pair.go +++ b/aws/resource_aws_key_pair.go @@ -4,14 +4,12 @@ import ( "fmt" "strings" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" ) func resourceAwsKeyPair() *schema.Resource { @@ -87,6 +85,7 @@ func resourceAwsKeyPairCreate(d *schema.ResourceData, meta interface{}) error { req := &ec2.ImportKeyPairInput{ KeyName: aws.String(keyName), PublicKeyMaterial: []byte(publicKey), + TagSpecifications: ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypeKeyPair), } resp, err := conn.ImportKeyPair(req) if err != nil { @@ -95,41 +94,19 @@ func resourceAwsKeyPairCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(*resp.KeyName) - if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - readReq := &ec2.DescribeKeyPairsInput{ - KeyNames: []*string{aws.String(d.Id())}, - } - readResp, err := conn.DescribeKeyPairs(readReq) - if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidKeyPair.NotFound" { - d.SetId("") - return nil - } - return fmt.Errorf("Error retrieving KeyPair: %s", err) - } - - for _, keyPair := range readResp.KeyPairs { - if *keyPair.KeyName == d.Id() { - if err := keyvaluetags.Ec2UpdateTags(conn, aws.StringValue(keyPair.KeyPairId), nil, v); err != nil { - return fmt.Errorf("error adding tags: %s", err) - } - } - } - - } return resourceAwsKeyPairRead(d, meta) } func resourceAwsKeyPairRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + req := &ec2.DescribeKeyPairsInput{ KeyNames: []*string{aws.String(d.Id())}, } resp, err := conn.DescribeKeyPairs(req) if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "InvalidKeyPair.NotFound" { + if isAWSErr(err, "InvalidKeyPair.NotFound", "") { d.SetId("") return nil } @@ -141,7 +118,7 @@ func resourceAwsKeyPairRead(d *schema.ResourceData, meta interface{}) error { d.Set("key_name", keyPair.KeyName) d.Set("fingerprint", keyPair.KeyFingerprint) d.Set("key_pair_id", keyPair.KeyPairId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(keyPair.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(keyPair.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } return nil diff --git a/aws/resource_aws_key_pair_test.go b/aws/resource_aws_key_pair_test.go index 143f3734a62..9ef05cdc3fc 100644 --- a/aws/resource_aws_key_pair_test.go +++ b/aws/resource_aws_key_pair_test.go @@ -8,7 +8,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-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -61,7 +60,7 @@ func testSweepKeyPairs(region string) error { func TestAccAWSKeyPair_basic(t *testing.T) { var keyPair ec2.KeyPairInfo fingerprint := "d7:ff:a6:63:18:64:9c:57:a1:ee:ca:a4:ad:c2:81:62" - resourceName := "aws_key_pair.a_key_pair" + resourceName := "aws_key_pair.test" rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ @@ -90,7 +89,7 @@ func TestAccAWSKeyPair_basic(t *testing.T) { func TestAccAWSKeyPair_tags(t *testing.T) { var keyPair ec2.KeyPairInfo - resourceName := "aws_key_pair.a_key_pair" + resourceName := "aws_key_pair.test" rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ @@ -135,7 +134,7 @@ func TestAccAWSKeyPair_tags(t *testing.T) { func TestAccAWSKeyPair_generatedName(t *testing.T) { var keyPair ec2.KeyPairInfo - resourceName := "aws_key_pair.a_key_pair" + resourceName := "aws_key_pair.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -162,11 +161,11 @@ func TestAccAWSKeyPair_generatedName(t *testing.T) { func TestAccAWSKeyPair_namePrefix(t *testing.T) { var keyPair ec2.KeyPairInfo - resourceName := "aws_key_pair.a_key_pair" + resourceName := "aws_key_pair.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_key_pair.a_key_pair", + IDRefreshName: resourceName, IDRefreshIgnore: []string{"key_name_prefix"}, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKeyPairDestroy, @@ -191,7 +190,7 @@ func TestAccAWSKeyPair_namePrefix(t *testing.T) { func TestAccAWSKeyPair_disappears(t *testing.T) { var keyPair ec2.KeyPairInfo - resourceName := "aws_key_pair.a_key_pair" + resourceName := "aws_key_pair.test" rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ @@ -230,12 +229,7 @@ func testAccCheckAWSKeyPairDestroy(s *terraform.State) error { return nil } - // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidKeyPair.NotFound" { + if !isAWSErr(err, "InvalidKeyPair.NotFound", "") { return err } } @@ -308,7 +302,7 @@ func testAccCheckAWSKeyPairExists(n string, res *ec2.KeyPairInfo) resource.TestC func testAccAWSKeyPairConfig(rName string) string { return fmt.Sprintf(` -resource "aws_key_pair" "a_key_pair" { +resource "aws_key_pair" "test" { key_name = %[1]q public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" } @@ -317,7 +311,7 @@ resource "aws_key_pair" "a_key_pair" { func testAccAWSKeyPairConfigTags1(rName, tagKey1, tagValue1 string) string { return fmt.Sprintf(` -resource "aws_key_pair" "a_key_pair" { +resource "aws_key_pair" "test" { key_name = %[1]q public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" @@ -330,7 +324,7 @@ resource "aws_key_pair" "a_key_pair" { func testAccAWSKeyPairConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { return fmt.Sprintf(` -resource "aws_key_pair" "a_key_pair" { +resource "aws_key_pair" "test" { key_name = %[1]q public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" @@ -343,13 +337,13 @@ resource "aws_key_pair" "a_key_pair" { } const testAccAWSKeyPairConfig_generatedName = ` -resource "aws_key_pair" "a_key_pair" { +resource "aws_key_pair" "test" { public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" } ` const testAccCheckAWSKeyPairPrefixNameConfig = ` -resource "aws_key_pair" "a_key_pair" { +resource "aws_key_pair" "test" { key_name_prefix = "baz-" public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" } diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index d55dc37259a..40497926e25 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -631,6 +631,8 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kinesisanalyticsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + name := d.Get("name").(string) describeOpts := &kinesisanalytics.DescribeApplicationInput{ @@ -678,7 +680,7 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int return fmt.Errorf("error listing tags for Kinesis Analytics Application (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -702,10 +704,7 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i CurrentApplicationVersionId: aws.Int64(int64(version)), } - applicationUpdate, err := createApplicationUpdateOpts(d) - if err != nil { - return err - } + applicationUpdate := createApplicationUpdateOpts(d) if !reflect.DeepEqual(applicationUpdate, &kinesisanalytics.ApplicationUpdate{}) { updateApplicationOpts.SetApplicationUpdate(applicationUpdate) @@ -1083,7 +1082,7 @@ func expandKinesisAnalyticsReferenceData(rd map[string]interface{}) *kinesisanal return referenceData } -func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { +func createApplicationUpdateOpts(d *schema.ResourceData) *kinesisanalytics.ApplicationUpdate { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} if d.HasChange("code") { @@ -1152,7 +1151,7 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl } } - return applicationUpdate, nil + return applicationUpdate } func expandKinesisAnalyticsInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate { diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 36bf1348106..1ae5e8c1bc2 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -2,15 +2,102 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kinesisanalytics" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kinesisanalytics/waiter" ) +func init() { + resource.AddTestSweepers("aws_kinesis_analytics_application", &resource.Sweeper{ + Name: "aws_kinesis_analytics_application", + F: testSweepKinesisAnalyticsApplications, + }) +} + +func testSweepKinesisAnalyticsApplications(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).kinesisanalyticsconn + input := &kinesisanalytics.ListApplicationsInput{} + var sweeperErrs *multierror.Error + + for { + output, err := conn.ListApplications(input) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Kinesis Analytics Application sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Kinesis Analytics Applications: %w", err)) + return sweeperErrs + } + + var name string + for _, applicationSummary := range output.ApplicationSummaries { + name = aws.StringValue(applicationSummary.ApplicationName) + + output, err := conn.DescribeApplication(&kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(name), + }) + if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error describing Kinesis Analytics Application (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if output.ApplicationDetail == nil { + continue + } + + log.Printf("[INFO] Deleting Kinesis Analytics Application: %s", name) + _, err = conn.DeleteApplication(&kinesisanalytics.DeleteApplicationInput{ + ApplicationName: aws.String(name), + CreateTimestamp: output.ApplicationDetail.CreateTimestamp, + }) + if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting Kinesis Analytics Application (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + _, err = waiter.ApplicationDeleted(conn, name) + if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error waiting for Kinesis Analytics Application (%s) to be deleted: %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + if !aws.BoolValue(output.HasMoreApplications) { + break + } + input.ExclusiveStartApplicationName = aws.String(name) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSKinesisAnalyticsApplication_basic(t *testing.T) { var application kinesisanalytics.ApplicationDetail resName := "aws_kinesis_analytics_application.test" diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 74d24732cb0..b14703ffda3 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -1,7 +1,6 @@ package aws import ( - "bytes" "fmt" "log" "strings" @@ -10,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/firehose" - "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -23,7 +21,7 @@ const ( func cloudWatchLoggingOptionsSchema() *schema.Schema { return &schema.Schema{ - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, Optional: true, Computed: true, @@ -76,7 +74,7 @@ func s3ConfigurationSchema() *schema.Schema { "compression_format": { Type: schema.TypeString, Optional: true, - Default: "UNCOMPRESSED", + Default: firehose.CompressionFormatUncompressed, }, "kms_key_arn": { @@ -126,26 +124,18 @@ func processingConfigurationSchema() *schema.Schema { "parameter_name": { Type: schema.TypeString, Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "LambdaArn" && value != "NumberOfRetries" && value != "RoleArn" && value != "BufferSizeInMBs" && value != "BufferIntervalInSeconds" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'LambdaArn', 'NumberOfRetries', 'RoleArn', 'BufferSizeInMBs', 'BufferIntervalInSeconds'", k)) - } - return - }, + ValidateFunc: validation.StringInSlice([]string{ + firehose.ProcessorParameterNameLambdaArn, + firehose.ProcessorParameterNameNumberOfRetries, + firehose.ProcessorParameterNameRoleArn, + firehose.ProcessorParameterNameBufferSizeInMbs, + firehose.ProcessorParameterNameBufferIntervalInSeconds, + }, false), }, "parameter_value": { - Type: schema.TypeString, - Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 1 || len(value) > 512 { - errors = append(errors, fmt.Errorf( - "%q must be at least one character long and at most 512 characters long", k)) - } - return - }, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 512), }, }, }, @@ -153,14 +143,9 @@ func processingConfigurationSchema() *schema.Schema { "type": { Type: schema.TypeString, Required: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "Lambda" { - errors = append(errors, fmt.Errorf( - "%q must be 'Lambda'", k)) - } - return - }, + ValidateFunc: validation.StringInSlice([]string{ + firehose.ProcessorTypeLambda, + }, false), }, }, }, @@ -170,20 +155,9 @@ func processingConfigurationSchema() *schema.Schema { } } -func cloudwatchLoggingOptionsHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%t-", m["enabled"].(bool))) - if m["enabled"].(bool) { - buf.WriteString(fmt.Sprintf("%s-", m["log_group_name"].(string))) - buf.WriteString(fmt.Sprintf("%s-", m["log_stream_name"].(string))) - } - return hashcode.String(buf.String()) -} - -func flattenCloudwatchLoggingOptions(clo *firehose.CloudWatchLoggingOptions) *schema.Set { +func flattenCloudwatchLoggingOptions(clo *firehose.CloudWatchLoggingOptions) []interface{} { if clo == nil { - return schema.NewSet(cloudwatchLoggingOptionsHash, []interface{}{}) + return []interface{}{} } cloudwatchLoggingOptions := map[string]interface{}{ @@ -193,7 +167,7 @@ func flattenCloudwatchLoggingOptions(clo *firehose.CloudWatchLoggingOptions) *sc cloudwatchLoggingOptions["log_group_name"] = aws.StringValue(clo.LogGroupName) cloudwatchLoggingOptions["log_stream_name"] = aws.StringValue(clo.LogStreamName) } - return schema.NewSet(cloudwatchLoggingOptionsHash, []interface{}{cloudwatchLoggingOptions}) + return []interface{}{cloudwatchLoggingOptions} } func flattenFirehoseElasticsearchConfiguration(description *firehose.ElasticsearchDestinationDescription) []map[string]interface{} { @@ -597,6 +571,19 @@ func flattenProcessingConfiguration(pc *firehose.ProcessingConfiguration, roleAr return processingConfiguration } +func flattenFirehoseKinesisSourceConfiguration(desc *firehose.KinesisStreamSourceDescription) []interface{} { + if desc == nil { + return []interface{}{} + } + + mDesc := map[string]interface{}{ + "kinesis_stream_arn": aws.StringValue(desc.KinesisStreamARN), + "role_arn": aws.StringValue(desc.RoleARN), + } + + return []interface{}{mDesc} +} + func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.DeliveryStreamDescription) error { d.Set("version_id", s.VersionId) d.Set("arn", s.DeliveryStreamARN) @@ -612,6 +599,12 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De return fmt.Errorf("error setting server_side_encryption: %s", err) } + if s.Source != nil { + if err := d.Set("kinesis_source_configuration", flattenFirehoseKinesisSourceConfiguration(s.Source.KinesisStreamSourceDescription)); err != nil { + return fmt.Errorf("error setting kinesis_source_configuration: %s", err) + } + } + if len(s.Destinations) > 0 { destination := s.Destinations[0] if destination.RedshiftDestinationDescription != nil { @@ -652,6 +645,7 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De } d.Set("destination_id", destination.DestinationId) } + return nil } @@ -682,17 +676,10 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { MigrateState: resourceAwsKinesisFirehoseMigrateState, Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters", k)) - } - return - }, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 64), }, "tags": tagsSchema(), @@ -747,14 +734,13 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { value := v.(string) return strings.ToLower(value) }, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "s3" && value != "extended_s3" && value != "redshift" && value != "elasticsearch" && value != "splunk" { - errors = append(errors, fmt.Errorf( - "%q must be one of 's3', 'extended_s3', 'redshift', 'elasticsearch', 'splunk'", k)) - } - return - }, + ValidateFunc: validation.StringInSlice([]string{ + "elasticsearch", + "extended_s3", + "redshift", + "s3", + "splunk", + }, false), }, "s3_configuration": s3ConfigurationSchema(), @@ -786,7 +772,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { "compression_format": { Type: schema.TypeString, Optional: true, - Default: "UNCOMPRESSED", + Default: firehose.CompressionFormatUncompressed, }, "data_format_conversion_configuration": { @@ -1071,15 +1057,11 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { "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 - }, + Default: firehose.S3BackupModeDisabled, + ValidateFunc: validation.StringInSlice([]string{ + firehose.S3BackupModeDisabled, + firehose.S3BackupModeEnabled, + }, false), }, "s3_backup_configuration": s3ConfigurationSchema(), @@ -1123,15 +1105,11 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { "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 - }, + Default: firehose.S3BackupModeDisabled, + ValidateFunc: validation.StringInSlice([]string{ + firehose.S3BackupModeDisabled, + firehose.S3BackupModeEnabled, + }, false), }, "s3_backup_configuration": s3ConfigurationSchema(), @@ -1217,15 +1195,14 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { "index_rotation_period": { Type: schema.TypeString, Optional: true, - Default: "OneDay", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "NoRotation" && value != "OneHour" && value != "OneDay" && value != "OneWeek" && value != "OneMonth" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'NoRotation', 'OneHour', 'OneDay', 'OneWeek', 'OneMonth'", k)) - } - return - }, + Default: firehose.ElasticsearchIndexRotationPeriodOneDay, + ValidateFunc: validation.StringInSlice([]string{ + firehose.ElasticsearchIndexRotationPeriodNoRotation, + firehose.ElasticsearchIndexRotationPeriodOneHour, + firehose.ElasticsearchIndexRotationPeriodOneDay, + firehose.ElasticsearchIndexRotationPeriodOneWeek, + firehose.ElasticsearchIndexRotationPeriodOneMonth, + }, false), }, "retry_duration": { @@ -1251,15 +1228,11 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeString, ForceNew: true, Optional: true, - Default: "FailedDocumentsOnly", - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != "FailedDocumentsOnly" && value != "AllDocuments" { - errors = append(errors, fmt.Errorf( - "%q must be one of 'FailedDocumentsOnly', 'AllDocuments'", k)) - } - return - }, + Default: firehose.ElasticsearchS3BackupModeFailedDocumentsOnly, + ValidateFunc: validation.StringInSlice([]string{ + firehose.ElasticsearchS3BackupModeFailedDocumentsOnly, + firehose.ElasticsearchS3BackupModeAllDocuments, + }, false), }, "type_name": { @@ -1304,14 +1277,10 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeString, Optional: true, Default: firehose.HECEndpointTypeRaw, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != firehose.HECEndpointTypeRaw && value != firehose.HECEndpointTypeEvent { - errors = append(errors, fmt.Errorf( - "%q must be one of 'Raw', 'Event'", k)) - } - return - }, + ValidateFunc: validation.StringInSlice([]string{ + firehose.HECEndpointTypeRaw, + firehose.HECEndpointTypeEvent, + }, false), }, "hec_token": { @@ -1323,14 +1292,10 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeString, Optional: true, Default: firehose.SplunkS3BackupModeFailedEventsOnly, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value != firehose.SplunkS3BackupModeFailedEventsOnly && value != firehose.SplunkS3BackupModeAllEvents { - errors = append(errors, fmt.Errorf( - "%q must be one of 'FailedEventsOnly', 'AllEvents'", k)) - } - return - }, + ValidateFunc: validation.StringInSlice([]string{ + firehose.SplunkS3BackupModeFailedEventsOnly, + firehose.SplunkS3BackupModeAllEvents, + }, false), }, "retry_duration": { @@ -1728,7 +1693,7 @@ func expandFirehoseSchemaConfiguration(l []interface{}) *firehose.SchemaConfigur func extractProcessingConfiguration(s3 map[string]interface{}) *firehose.ProcessingConfiguration { config := s3["processing_configuration"].([]interface{}) - if len(config) == 0 { + if len(config) == 0 || config[0] == nil { // It is possible to just pass nil here, but this seems to be the // canonical form that AWS uses, and is less likely to produce diffs. return &firehose.ProcessingConfiguration{ @@ -1804,7 +1769,7 @@ func extractEncryptionConfiguration(s3 map[string]interface{}) *firehose.Encrypt } func extractCloudWatchLoggingConfiguration(s3 map[string]interface{}) *firehose.CloudWatchLoggingOptions { - config := s3["cloudwatch_logging_options"].(*schema.Set).List() + config := s3["cloudwatch_logging_options"].([]interface{}) if len(config) == 0 { return nil } @@ -2356,6 +2321,7 @@ func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta func resourceAwsKinesisFirehoseDeliveryStreamRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).firehoseconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig sn := d.Get("name").(string) resp, err := conn.DescribeDeliveryStream(&firehose.DescribeDeliveryStreamInput{ @@ -2383,7 +2349,7 @@ func resourceAwsKinesisFirehoseDeliveryStreamRead(d *schema.ResourceData, meta i return fmt.Errorf("error listing tags for Kinesis Firehose Delivery Stream (%s): %s", sn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 482c24edb1b..f2f788a0732 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -125,6 +125,36 @@ func TestAccAWSKinesisFirehoseDeliveryStream_basic(t *testing.T) { }) } +func TestAccAWSKinesisFirehoseDeliveryStream_disappears(t *testing.T) { + resourceName := "aws_kinesis_firehose_delivery_stream.test" + rInt := acctest.RandInt() + + funcName := fmt.Sprintf("aws_kinesis_firehose_ds_import_%d", rInt) + policyName := fmt.Sprintf("tf_acc_policy_%d", rInt) + roleName := fmt.Sprintf("tf_acc_role_%d", rInt) + var stream firehose.DeliveryStreamDescription + + config := testAccFirehoseAWSLambdaConfigBasic(funcName, policyName, roleName) + + fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3basic, + rInt, rInt, rInt, rInt) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisFirehoseDeliveryStreamExists(resourceName, &stream), + testAccCheckResourceDisappears(testAccProvider, resourceAwsKinesisFirehoseDeliveryStream(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func TestAccAWSKinesisFirehoseDeliveryStream_s3basic(t *testing.T) { var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() @@ -709,6 +739,35 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix(t *tes }) } +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12600 +func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ProcessingConfiguration_Empty(t *testing.T) { + var stream firehose.DeliveryStreamDescription + rInt := acctest.RandInt() + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_kinesis_firehose_delivery_stream.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, + Steps: []resource.TestStep{ + { + Config: testAccKinesisFirehoseDeliveryStreamConfig_ExtendedS3_ProcessingConfiguration_Empty(rName, rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisFirehoseDeliveryStreamExists(resourceName, &stream), + resource.TestCheckResourceAttr(resourceName, "extended_s3_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "extended_s3_configuration.0.processing_configuration.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn(t *testing.T) { rString := acctest.RandString(8) funcName := fmt.Sprintf("aws_kinesis_firehose_delivery_stream_test_%s", rString) @@ -732,7 +791,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckKinesisFirehoseDeliveryStreamExists(resourceName, &stream), testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(&stream, nil, nil, nil, nil, nil), - resource.TestMatchResourceAttr(resourceName, "extended_s3_configuration.0.kms_key_arn", regexp.MustCompile(`^arn:[^:]+:kms:[^:]+:[^:]+:key/.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "extended_s3_configuration.0.kms_key_arn", "aws_kms_key.test", "arn"), ), }, { @@ -833,20 +892,39 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates(t *testing.T) { }) } -func TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates(t *testing.T) { +func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_KinesisStreamSource(t *testing.T) { var stream firehose.DeliveryStreamDescription + ri := acctest.RandInt() + resourceName := "aws_kinesis_firehose_delivery_stream.test" + config := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3_KinesisStreamSource, + ri, ri, ri, ri, ri, ri, ri) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisFirehoseDeliveryStreamExists(resourceName, &stream), + testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(&stream, nil, nil, nil, nil, nil), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} +func TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates(t *testing.T) { + var stream firehose.DeliveryStreamDescription + rInt := acctest.RandInt() + rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - 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 := testAccFirehoseAWSLambdaConfigBasic(funcName, policyName, roleName) + - fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_RedshiftUpdates, - ri, ri, ri, ri, ri) updatedRedshiftConfig := &firehose.RedshiftDestinationDescription{ CopyCommand: &firehose.CopyCommand{ @@ -875,7 +953,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates(t *testing.T) CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, Steps: []resource.TestStep{ { - Config: preConfig, + Config: testAccKinesisFirehoseDeliveryStreamRedshiftConfig(rName, rInt), Check: resource.ComposeTestCheckFunc( testAccCheckKinesisFirehoseDeliveryStreamExists(resourceName, &stream), testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(&stream, nil, nil, nil, nil, nil), @@ -888,7 +966,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates(t *testing.T) ImportStateVerifyIgnore: []string{"redshift_configuration.0.password"}, }, { - Config: postConfig, + Config: testAccKinesisFirehoseDeliveryStreamRedshiftConfigUpdates(rName, rInt), Check: resource.ComposeTestCheckFunc( testAccCheckKinesisFirehoseDeliveryStreamExists(resourceName, &stream), testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(&stream, nil, nil, updatedRedshiftConfig, nil, nil), @@ -1081,7 +1159,7 @@ func testAccCheckKinesisFirehoseDeliveryStreamExists(n string, stream *firehose. func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.DeliveryStreamDescription, s3config interface{}, extendedS3config interface{}, redshiftConfig interface{}, elasticsearchConfig interface{}, splunkConfig interface{}) resource.TestCheckFunc { return func(s *terraform.State) error { - if !strings.HasPrefix(*stream.DeliveryStreamName, "terraform-kinesis-firehose") { + if !strings.HasPrefix(*stream.DeliveryStreamName, "terraform-kinesis-firehose") && !strings.HasPrefix(*stream.DeliveryStreamName, "tf-acc-test") { return fmt.Errorf("Bad Stream name: %s", *stream.DeliveryStreamName) } for _, rs := range s.RootModule().Resources { @@ -1692,6 +1770,21 @@ resource "aws_kinesis_firehose_delivery_stream" "test" { } ` +var testAccKinesisFirehoseDeliveryStreamConfig_extendedS3_KinesisStreamSource = testAccKinesisFirehoseDeliveryStreamBaseConfig + testAccFirehoseKinesisStreamSource + ` +resource "aws_kinesis_firehose_delivery_stream" "test" { + depends_on = ["aws_iam_role_policy.firehose", "aws_iam_role_policy.kinesis_source"] + name = "terraform-kinesis-firehose-basictest-%d" + kinesis_source_configuration { + kinesis_stream_arn = "${aws_kinesis_stream.source.arn}" + role_arn = "${aws_iam_role.kinesis_source.arn}" + } + destination = "extended_s3" + extended_s3_configuration { + role_arn = "${aws_iam_role.firehose.arn}" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + } +}` + func testAccKinesisFirehoseDeliveryStreamConfig_ExtendedS3_DataFormatConversionConfiguration_Enabled(rName string, rInt int, enabled bool) string { return fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamBaseConfig, rInt, rInt, rInt) + fmt.Sprintf(` resource "aws_glue_catalog_database" "test" { @@ -1995,6 +2088,24 @@ resource "aws_kinesis_firehose_delivery_stream" "test" { `, rName, errorOutputPrefix) } +func testAccKinesisFirehoseDeliveryStreamConfig_ExtendedS3_ProcessingConfiguration_Empty(rName string, rInt int) string { + return fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamBaseConfig, rInt, rInt, rInt) + fmt.Sprintf(` +resource "aws_kinesis_firehose_delivery_stream" "test" { + destination = "extended_s3" + name = %[1]q + + extended_s3_configuration { + bucket_arn = aws_s3_bucket.bucket.arn + role_arn = aws_iam_role.firehose.arn + + processing_configuration {} + } + + depends_on = ["aws_iam_role_policy.firehose"] +} +`, rName) +} + var testAccKinesisFirehoseDeliveryStreamConfig_extendedS3KmsKeyArn = testAccKinesisFirehoseDeliveryStreamBaseConfig + ` resource "aws_kms_key" "test" { description = "Terraform acc test %s" @@ -2072,72 +2183,131 @@ resource "aws_kinesis_firehose_delivery_stream" "test" { } ` -var testAccKinesisFirehoseDeliveryStreamBaseRedshiftConfig = testAccKinesisFirehoseDeliveryStreamBaseConfig + ` -resource "aws_redshift_cluster" "test_cluster" { - cluster_identifier = "tf-redshift-cluster-%d" - database_name = "test" - master_username = "testuser" - master_password = "T3stPass" - node_type = "dc1.large" - cluster_type = "single-node" - skip_final_snapshot = true -}` +func testAccKinesisFirehoseDeliveryStreamRedshiftConfigBase(rName string, rInt int) string { + return composeConfig( + fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamBaseConfig, rInt, rInt, rInt), + fmt.Sprintf(` +data "aws_availability_zones" "current" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = %[1]q + } +} + +resource "aws_subnet" "test" { + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.test.id}" + availability_zone = "${data.aws_availability_zones.current.names[0]}" + + tags = { + Name = %[1]q + } +} + +resource "aws_redshift_subnet_group" "test" { + name = %[1]q + description = "test" + subnet_ids = ["${aws_subnet.test.id}"] + } + +resource "aws_redshift_cluster" "test" { + cluster_identifier = %[1]q + availability_zone = "${data.aws_availability_zones.current.names[0]}" + database_name = "test" + master_username = "testuser" + master_password = "T3stPass" + node_type = "dc1.large" + cluster_type = "single-node" + skip_final_snapshot = true + cluster_subnet_group_name = "${aws_redshift_subnet_group.test.id}" + publicly_accessible = false +} +`, rName)) +} -var testAccKinesisFirehoseDeliveryStreamConfig_RedshiftBasic = testAccKinesisFirehoseDeliveryStreamBaseRedshiftConfig + ` +func testAccKinesisFirehoseDeliveryStreamRedshiftConfig(rName string, rInt int) string { + return composeConfig( + testAccKinesisFirehoseDeliveryStreamRedshiftConfigBase(rName, rInt), + fmt.Sprintf(` resource "aws_kinesis_firehose_delivery_stream" "test" { - depends_on = ["aws_iam_role_policy.firehose", "aws_redshift_cluster.test_cluster"] - name = "terraform-kinesis-firehose-basicredshifttest-%d" + name = %[1]q destination = "redshift" + s3_configuration { - role_arn = "${aws_iam_role.firehose.arn}" + role_arn = "${aws_iam_role.firehose.arn}" bucket_arn = "${aws_s3_bucket.bucket.arn}" } + redshift_configuration { - role_arn = "${aws_iam_role.firehose.arn}" - cluster_jdbcurl = "jdbc:redshift://${aws_redshift_cluster.test_cluster.endpoint}/${aws_redshift_cluster.test_cluster.database_name}" - username = "testuser" - password = "T3stPass" + role_arn = "${aws_iam_role.firehose.arn}" + cluster_jdbcurl = "jdbc:redshift://${aws_redshift_cluster.test.endpoint}/${aws_redshift_cluster.test.database_name}" + username = "testuser" + password = "T3stPass" data_table_name = "test-table" } -}` +} +`, rName)) +} -var testAccKinesisFirehoseDeliveryStreamConfig_RedshiftUpdates = testAccKinesisFirehoseDeliveryStreamBaseRedshiftConfig + ` +func testAccKinesisFirehoseDeliveryStreamRedshiftConfigUpdates(rName string, rInt int) string { + return composeConfig( + testAccFirehoseAWSLambdaConfigBasic(rName, rName, rName), + testAccKinesisFirehoseDeliveryStreamRedshiftConfigBase(rName, rInt), + fmt.Sprintf(` resource "aws_kinesis_firehose_delivery_stream" "test" { - depends_on = ["aws_iam_role_policy.firehose", "aws_redshift_cluster.test_cluster"] - name = "terraform-kinesis-firehose-basicredshifttest-%d" + name = %[1]q destination = "redshift" + 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" } + redshift_configuration { - role_arn = "${aws_iam_role.firehose.arn}" - cluster_jdbcurl = "jdbc:redshift://${aws_redshift_cluster.test_cluster.endpoint}/${aws_redshift_cluster.test_cluster.database_name}" - username = "testuser" - password = "T3stPass" - s3_backup_mode = "Enabled" + role_arn = "${aws_iam_role.firehose.arn}" + cluster_jdbcurl = "jdbc:redshift://${aws_redshift_cluster.test.endpoint}/${aws_redshift_cluster.test.database_name}" + username = "testuser" + password = "T3stPass" + s3_backup_mode = "Enabled" + s3_backup_configuration { - role_arn = "${aws_iam_role.firehose.arn}" + role_arn = "${aws_iam_role.firehose.arn}" bucket_arn = "${aws_s3_bucket.bucket.arn}" } - data_table_name = "test-table" - copy_options = "GZIP" + + 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_name = "LambdaArn" parameter_value = "${aws_lambda_function.lambda_function_test.arn}:$LATEST" } } } } -}` +} +`, rName)) +} var testAccKinesisFirehoseDeliveryStreamConfig_SplunkBasic = testAccKinesisFirehoseDeliveryStreamBaseConfig + ` resource "aws_kinesis_firehose_delivery_stream" "test" { diff --git a/aws/resource_aws_kinesis_stream.go b/aws/resource_aws_kinesis_stream.go index af9717dbbc9..ba5c287cdfb 100644 --- a/aws/resource_aws_kinesis_stream.go +++ b/aws/resource_aws_kinesis_stream.go @@ -180,6 +180,8 @@ func resourceAwsKinesisStreamUpdate(d *schema.ResourceData, meta interface{}) er func resourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kinesisconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + sn := d.Get("name").(string) state, err := readKinesisStreamState(conn, sn) @@ -212,7 +214,7 @@ func resourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("error listing tags for Kinesis Stream (%s): %s", sn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -322,13 +324,14 @@ func updateKinesisShardCount(conn *kinesis.Kinesis, d *schema.ResourceData) erro func updateKinesisStreamEncryption(conn *kinesis.Kinesis, d *schema.ResourceData) error { sn := d.Get("name").(string) - // If this is not a new resource AND there is no change to encryption_type or kms_key_id - // return nil - if !d.IsNewResource() && (!d.HasChange("encryption_type") || !d.HasChange("kms_key_id")) { + // If this is not a new resource and there is no change to encryption_type and kms_key_id + if !d.IsNewResource() && !d.HasChange("encryption_type") && !d.HasChange("kms_key_id") { return nil } oldType, newType := d.GetChange("encryption_type") + oldKey, newKey := d.GetChange("kms_key_id") + if oldType.(string) != "" && oldType.(string) != "NONE" { // This means that we have an old encryption type - i.e. Encryption is enabled and we want to change it // The quirk about this API is that, when we are disabling the StreamEncryption @@ -339,8 +342,6 @@ func updateKinesisStreamEncryption(conn *kinesis.Kinesis, d *schema.ResourceData // We get the following error // // InvalidArgumentException: Encryption type cannot be NONE. - oldKey, _ := d.GetChange("kms_key_id") - oldType, _ := d.GetChange("encryption_type") log.Printf("[INFO] Stopping Stream Encryption for %s", sn) params := &kinesis.StopStreamEncryptionInput{ @@ -353,6 +354,10 @@ func updateKinesisStreamEncryption(conn *kinesis.Kinesis, d *schema.ResourceData if err != nil { return err } + + if err := waitForKinesisToBeActive(conn, d.Timeout(schema.TimeoutUpdate), sn); err != nil { + return err + } } if newType.(string) != "NONE" { @@ -364,29 +369,16 @@ func updateKinesisStreamEncryption(conn *kinesis.Kinesis, d *schema.ResourceData params := &kinesis.StartStreamEncryptionInput{ StreamName: aws.String(sn), EncryptionType: aws.String(newType.(string)), - KeyId: aws.String(d.Get("kms_key_id").(string)), + KeyId: aws.String(newKey.(string)), } _, err := conn.StartStreamEncryption(params) if err != nil { return err } - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{"UPDATING"}, - Target: []string{"ACTIVE"}, - Refresh: streamStateRefreshFunc(conn, sn), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err := stateConf.WaitForState() - if err != nil { - return fmt.Errorf( - "Error waiting for Stream (%s) to be ACTIVE: %s", - sn, err) + if err := waitForKinesisToBeActive(conn, d.Timeout(schema.TimeoutUpdate), sn); err != nil { + return err + } } return nil diff --git a/aws/resource_aws_kinesis_stream_test.go b/aws/resource_aws_kinesis_stream_test.go index 9a9502b9030..c8a192c059f 100644 --- a/aws/resource_aws_kinesis_stream_test.go +++ b/aws/resource_aws_kinesis_stream_test.go @@ -542,6 +542,32 @@ func testAccCheckKinesisStreamTags(n string, tagCount int) resource.TestCheckFun } } +func TestAccAWSKinesisStream_UpdateKmsKeyId(t *testing.T) { + var stream kinesis.StreamDescription + rInt := acctest.RandInt() + resourceName := "aws_kinesis_stream.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisStreamDestroy, + Steps: []resource.TestStep{ + { + Config: testAccKinesisStreamUpdateKmsKeyId(rInt, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisStreamExists(resourceName, &stream), + ), + }, + { + Config: testAccKinesisStreamUpdateKmsKeyId(rInt, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisStreamExists(resourceName, &stream), + ), + }, + }, + }) +} + func testAccKinesisStreamConfig(rInt int) string { return fmt.Sprintf(` resource "aws_kinesis_stream" "test" { @@ -736,3 +762,25 @@ resource "aws_kinesis_stream" "test" { } `, rInt) } + +func testAccKinesisStreamUpdateKmsKeyId(rInt int, key int) string { + return fmt.Sprintf(` + +resource "aws_kms_key" "key1" { + description = "KMS key 1" + deletion_window_in_days = 10 +} + +resource "aws_kms_key" "key2" { + description = "KMS key 2" + deletion_window_in_days = 10 +} + +resource "aws_kinesis_stream" "test" { + name = "test_stream-%d" + shard_count = 1 + encryption_type = "KMS" + kms_key_id = aws_kms_key.key%d.id +} +`, rInt, key) +} diff --git a/aws/resource_aws_kinesis_video_stream.go b/aws/resource_aws_kinesis_video_stream.go index 33d41bdf752..ebf9642a783 100644 --- a/aws/resource_aws_kinesis_video_stream.go +++ b/aws/resource_aws_kinesis_video_stream.go @@ -137,6 +137,7 @@ func resourceAwsKinesisVideoStreamCreate(d *schema.ResourceData, meta interface{ func resourceAwsKinesisVideoStreamRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kinesisvideoconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig descOpts := &kinesisvideo.DescribeStreamInput{ StreamARN: aws.String(d.Id()), @@ -169,7 +170,7 @@ func resourceAwsKinesisVideoStreamRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for Kinesis Video Stream (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_kinesis_video_stream_test.go b/aws/resource_aws_kinesis_video_stream_test.go index e434366be44..4c45067fc76 100644 --- a/aws/resource_aws_kinesis_video_stream_test.go +++ b/aws/resource_aws_kinesis_video_stream_test.go @@ -156,7 +156,7 @@ func TestAccAWSKinesisVideoStream_disappears(t *testing.T) { Config: testAccKinesisVideoStreamConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckKinesisVideoStreamExists(resourceName, &stream), - testAccCheckKinesisVideoStreamDisappears(resourceName, &stream), + testAccCheckKinesisVideoStreamDisappears(resourceName), ), ExpectNonEmptyPlan: true, }, @@ -164,7 +164,7 @@ func TestAccAWSKinesisVideoStream_disappears(t *testing.T) { }) } -func testAccCheckKinesisVideoStreamDisappears(resourceName string, stream *kinesisvideo.StreamInfo) resource.TestCheckFunc { +func testAccCheckKinesisVideoStreamDisappears(resourceName string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).kinesisvideoconn diff --git a/aws/resource_aws_kms_external_key.go b/aws/resource_aws_kms_external_key.go index 981bfffd4b1..fd571b491a4 100644 --- a/aws/resource_aws_kms_external_key.go +++ b/aws/resource_aws_kms_external_key.go @@ -17,6 +17,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/structure" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" + iamwaiter "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/iam/waiter" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kms/waiter" ) func resourceAwsKmsExternalKey() *schema.Resource { @@ -76,7 +78,7 @@ func resourceAwsKmsExternalKey() *schema.Resource { DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, ValidateFunc: validation.All( validation.StringLenBetween(0, 32768), - validation.ValidateJsonString, + validation.StringIsJSON, ), }, "tags": tagsSchema(), @@ -110,7 +112,7 @@ func resourceAwsKmsExternalKeyCreate(d *schema.ResourceData, meta interface{}) e } var output *kms.CreateKeyOutput - err := resource.Retry(1*time.Minute, func() *resource.RetryError { + err := resource.Retry(iamwaiter.PropagationTimeout, func() *resource.RetryError { var err error output, err = conn.CreateKey(input) @@ -158,6 +160,7 @@ func resourceAwsKmsExternalKeyCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsKmsExternalKeyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kmsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &kms.DescribeKeyInput{ KeyId: aws.String(d.Id()), @@ -241,7 +244,7 @@ func resourceAwsKmsExternalKeyRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("error listing tags for KMS Key (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -332,11 +335,17 @@ func resourceAwsKmsExternalKeyDelete(d *schema.ResourceData, meta interface{}) e } if err != nil { - return fmt.Errorf("error scheduling KMS External Key (%s) deletion: %s", d.Id(), err) + return fmt.Errorf("error scheduling deletion for KMS Key (%s): %w", d.Id(), err) + } + + _, err = waiter.KeyStatePendingDeletion(conn, d.Id()) + + if isAWSErr(err, kms.ErrCodeNotFoundException, "") { + return nil } - if err := waitForKmsKeyScheduleDeletion(conn, d.Id()); err != nil { - return fmt.Errorf("error waiting for KMS External Key (%s) deletion scheduling: %s", d.Id(), err) + if err != nil { + return fmt.Errorf("error waiting for KMS Key (%s) to schedule deletion: %w", d.Id(), err) } return nil @@ -440,39 +449,3 @@ func importKmsExternalKeyMaterial(conn *kms.KMS, keyID, keyMaterialBase64, valid return nil } - -func waitForKmsKeyScheduleDeletion(conn *kms.KMS, keyID string) error { - // Wait for propagation since KMS is eventually consistent - input := &kms.DescribeKeyInput{ - KeyId: aws.String(keyID), - } - - wait := resource.StateChangeConf{ - Pending: []string{kms.KeyStateDisabled, kms.KeyStateEnabled}, - Target: []string{kms.KeyStatePendingDeletion}, - Timeout: 20 * time.Minute, - MinTimeout: 2 * time.Second, - ContinuousTargetOccurence: 10, - Refresh: func() (interface{}, string, error) { - output, err := conn.DescribeKey(input) - - if isAWSErr(err, kms.ErrCodeNotFoundException, "") { - return 42, kms.KeyStatePendingDeletion, nil - } - - if err != nil { - return nil, kms.KeyStateUnavailable, err - } - - if output == nil || output.KeyMetadata == nil { - return 42, kms.KeyStatePendingDeletion, nil - } - - return output, aws.StringValue(output.KeyMetadata.KeyState), nil - }, - } - - _, err := wait.WaitForState() - - return err -} diff --git a/aws/resource_aws_kms_external_key_test.go b/aws/resource_aws_kms_external_key_test.go index a7f4e61e984..10c309cbad2 100644 --- a/aws/resource_aws_kms_external_key_test.go +++ b/aws/resource_aws_kms_external_key_test.go @@ -10,7 +10,8 @@ import ( "github.com/aws/aws-sdk-go/service/kms" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/jen20/awspolicyequivalence" + awspolicy "github.com/jen20/awspolicyequivalence" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kms/waiter" ) func TestAccAWSKmsExternalKey_basic(t *testing.T) { @@ -483,7 +484,9 @@ func testAccCheckAWSKmsExternalKeyDisappears(key *kms.KeyMetadata) resource.Test return err } - return waitForKmsKeyScheduleDeletion(conn, aws.StringValue(key.KeyId)) + _, err = waiter.KeyStatePendingDeletion(conn, aws.StringValue(key.KeyId)) + + return err } } diff --git a/aws/resource_aws_kms_grant.go b/aws/resource_aws_kms_grant.go index f66ea30e65b..b1cda29b6d4 100644 --- a/aws/resource_aws_kms_grant.go +++ b/aws/resource_aws_kms_grant.go @@ -23,7 +23,19 @@ func resourceAwsKmsGrant() *schema.Resource { Create: resourceAwsKmsGrantCreate, Read: resourceAwsKmsGrantRead, Delete: resourceAwsKmsGrantDelete, - Exists: resourceAwsKmsGrantExists, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + keyId, grantId, err := decodeKmsGrantId(d.Id()) + if err != nil { + return nil, err + } + d.Set("key_id", keyId) + d.Set("grant_id", grantId) + d.SetId(fmt.Sprintf("%s:%s", keyId, grantId)) + + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "name": { @@ -196,6 +208,11 @@ func resourceAwsKmsGrantRead(d *schema.ResourceData, meta interface{}) error { grant, err := findKmsGrantByIdWithRetry(conn, keyId, grantId) if err != nil { + if isResourceNotFoundError(err) { + log.Printf("[WARN] %s KMS grant id not found for key id %s, removing from state file", grantId, keyId) + d.SetId("") + return nil + } return err } @@ -281,27 +298,6 @@ func resourceAwsKmsGrantDelete(d *schema.ResourceData, meta interface{}) error { return err } -func resourceAwsKmsGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).kmsconn - - keyId, grantId, err := decodeKmsGrantId(d.Id()) - if err != nil { - return false, err - } - - log.Printf("[DEBUG] Looking for Grant: %s", grantId) - grant, err := findKmsGrantByIdWithRetry(conn, keyId, grantId) - - if err != nil { - return true, err - } - if grant != nil { - return true, err - } - - return false, nil -} - func getKmsGrantById(grants []*kms.GrantListEntry, grantIdentifier string) *kms.GrantListEntry { for _, grant := range grants { if *grant.GrantId == grantIdentifier { @@ -533,16 +529,16 @@ func flattenKmsGrantConstraints(constraint *kms.GrantConstraints) *schema.Set { func decodeKmsGrantId(id string) (string, string, error) { if strings.HasPrefix(id, "arn:aws") { - arn_parts := strings.Split(id, "/") - if len(arn_parts) != 2 { + arnParts := strings.Split(id, "/") + if len(arnParts) != 2 { return "", "", fmt.Errorf("unexpected format of ARN (%q), expected KeyID:GrantID", id) } - arn_prefix := arn_parts[0] - parts := strings.Split(arn_parts[1], ":") + arnPrefix := arnParts[0] + parts := strings.Split(arnParts[1], ":") if len(parts) != 2 { return "", "", fmt.Errorf("unexpected format of ID (%q), expected KeyID:GrantID", id) } - return fmt.Sprintf("%s/%s", arn_prefix, parts[0]), parts[1], nil + return fmt.Sprintf("%s/%s", arnPrefix, parts[0]), parts[1], nil } else { parts := strings.Split(id, ":") if len(parts) != 2 { diff --git a/aws/resource_aws_kms_grant_test.go b/aws/resource_aws_kms_grant_test.go index b275d962c71..efd905ad9a0 100644 --- a/aws/resource_aws_kms_grant_test.go +++ b/aws/resource_aws_kms_grant_test.go @@ -3,67 +3,84 @@ package aws import ( "fmt" "testing" - "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kms" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccAWSKmsGrant_Basic(t *testing.T) { - timestamp := time.Now().Format(time.RFC1123) + resourceName := "aws_kms_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSKmsGrantDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSKmsGrantDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSKmsGrant_Basic("basic", timestamp, "\"Encrypt\", \"Decrypt\""), + Config: testAccAWSKmsGrant_Basic(rName, "\"Encrypt\", \"Decrypt\""), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSKmsGrantExists("aws_kms_grant.basic"), - resource.TestCheckResourceAttr("aws_kms_grant.basic", "name", "basic"), - resource.TestCheckResourceAttr("aws_kms_grant.basic", "operations.#", "2"), - resource.TestCheckResourceAttr("aws_kms_grant.basic", "operations.2238845196", "Encrypt"), - resource.TestCheckResourceAttr("aws_kms_grant.basic", "operations.1237510779", "Decrypt"), - resource.TestCheckResourceAttrSet("aws_kms_grant.basic", "grantee_principal"), - resource.TestCheckResourceAttrSet("aws_kms_grant.basic", "key_id"), + testAccCheckAWSKmsGrantExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "operations.#", "2"), + resource.TestCheckResourceAttr(resourceName, "operations.2238845196", "Encrypt"), + resource.TestCheckResourceAttr(resourceName, "operations.1237510779", "Decrypt"), + resource.TestCheckResourceAttrSet(resourceName, "grantee_principal"), + resource.TestCheckResourceAttrSet(resourceName, "key_id"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"grant_token", "retire_on_delete"}, + }, }, }) } func TestAccAWSKmsGrant_withConstraints(t *testing.T) { - timestamp := time.Now().Format(time.RFC1123) + resourceName := "aws_kms_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSKmsGrantDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSKmsGrantDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSKmsGrant_withConstraints("withConstraintsEq", timestamp, "encryption_context_equals", `foo = "bar" + Config: testAccAWSKmsGrant_withConstraints(rName, "encryption_context_equals", `foo = "bar" baz = "kaz"`), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSKmsGrantExists("aws_kms_grant.withConstraintsEq"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsEq", "name", "withConstraintsEq"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsEq", "constraints.#", "1"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsEq", "constraints.449762259.encryption_context_equals.%", "2"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsEq", "constraints.449762259.encryption_context_equals.baz", "kaz"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsEq", "constraints.449762259.encryption_context_equals.foo", "bar"), + testAccCheckAWSKmsGrantExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "constraints.#", "1"), + resource.TestCheckResourceAttr(resourceName, "constraints.449762259.encryption_context_equals.%", "2"), + resource.TestCheckResourceAttr(resourceName, "constraints.449762259.encryption_context_equals.baz", "kaz"), + resource.TestCheckResourceAttr(resourceName, "constraints.449762259.encryption_context_equals.foo", "bar"), ), }, { - Config: testAccAWSKmsGrant_withConstraints("withConstraintsSub", timestamp, "encryption_context_subset", `foo = "bar" + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"grant_token", "retire_on_delete"}, + }, + { + Config: testAccAWSKmsGrant_withConstraints(rName, "encryption_context_subset", `foo = "bar" baz = "kaz"`), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSKmsGrantExists("aws_kms_grant.withConstraintsSub"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsSub", "name", "withConstraintsSub"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsSub", "constraints.#", "1"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsSub", "constraints.2645649985.encryption_context_subset.%", "2"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsSub", "constraints.2645649985.encryption_context_subset.baz", "kaz"), - resource.TestCheckResourceAttr("aws_kms_grant.withConstraintsSub", "constraints.2645649985.encryption_context_subset.foo", "bar"), + testAccCheckAWSKmsGrantExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "constraints.#", "1"), + resource.TestCheckResourceAttr(resourceName, "constraints.2645649985.encryption_context_subset.%", "2"), + resource.TestCheckResourceAttr(resourceName, "constraints.2645649985.encryption_context_subset.baz", "kaz"), + resource.TestCheckResourceAttr(resourceName, "constraints.2645649985.encryption_context_subset.foo", "bar"), ), }, }, @@ -71,7 +88,8 @@ func TestAccAWSKmsGrant_withConstraints(t *testing.T) { } func TestAccAWSKmsGrant_withRetiringPrincipal(t *testing.T) { - timestamp := time.Now().Format(time.RFC1123) + resourceName := "aws_kms_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -79,18 +97,25 @@ func TestAccAWSKmsGrant_withRetiringPrincipal(t *testing.T) { CheckDestroy: testAccCheckAWSKmsGrantDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSKmsGrant_withRetiringPrincipal("withRetiringPrincipal", timestamp), + Config: testAccAWSKmsGrant_withRetiringPrincipal(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSKmsGrantExists("aws_kms_grant.withRetiringPrincipal"), - resource.TestCheckResourceAttrSet("aws_kms_grant.withRetiringPrincipal", "retiring_principal"), + testAccCheckAWSKmsGrantExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "retiring_principal"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"grant_token", "retire_on_delete"}, + }, }, }) } func TestAccAWSKmsGrant_bare(t *testing.T) { - timestamp := time.Now().Format(time.RFC1123) + resourceName := "aws_kms_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -98,20 +123,59 @@ func TestAccAWSKmsGrant_bare(t *testing.T) { CheckDestroy: testAccCheckAWSKmsGrantDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSKmsGrant_bare("bare", timestamp), + Config: testAccAWSKmsGrant_bare(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSKmsGrantExists("aws_kms_grant.bare"), - resource.TestCheckNoResourceAttr("aws_kms_grant.bare", "name"), - resource.TestCheckNoResourceAttr("aws_kms_grant.bare", "constraints.#"), - resource.TestCheckNoResourceAttr("aws_kms_grant.bare", "retiring_principal"), + testAccCheckAWSKmsGrantExists(resourceName), + resource.TestCheckNoResourceAttr(resourceName, "name"), + resource.TestCheckNoResourceAttr(resourceName, "constraints.#"), + resource.TestCheckNoResourceAttr(resourceName, "retiring_principal"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"grant_token", "retire_on_delete"}, + }, }, }) } func TestAccAWSKmsGrant_ARN(t *testing.T) { - timestamp := time.Now().Format(time.RFC1123) + resourceName := "aws_kms_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSKmsGrantDestroy, + DisableBinaryDriver: true, + Steps: []resource.TestStep{ + { + Config: testAccAWSKmsGrant_ARN(rName, "\"Encrypt\", \"Decrypt\""), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSKmsGrantExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "operations.#", "2"), + resource.TestCheckResourceAttr(resourceName, "operations.2238845196", "Encrypt"), + resource.TestCheckResourceAttr(resourceName, "operations.1237510779", "Decrypt"), + resource.TestCheckResourceAttrSet(resourceName, "grantee_principal"), + resource.TestCheckResourceAttrSet(resourceName, "key_id"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"grant_token", "retire_on_delete"}, + }, + }, + }) +} + +func TestAccAWSKmsGrant_disappears(t *testing.T) { + resourceName := "aws_kms_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -119,16 +183,12 @@ func TestAccAWSKmsGrant_ARN(t *testing.T) { CheckDestroy: testAccCheckAWSKmsGrantDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSKmsGrant_ARN("arn", timestamp, "\"Encrypt\", \"Decrypt\""), + Config: testAccAWSKmsGrant_Basic(rName, "\"Encrypt\", \"Decrypt\""), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSKmsGrantExists("aws_kms_grant.arn"), - resource.TestCheckResourceAttr("aws_kms_grant.arn", "name", "arn"), - resource.TestCheckResourceAttr("aws_kms_grant.arn", "operations.#", "2"), - resource.TestCheckResourceAttr("aws_kms_grant.arn", "operations.2238845196", "Encrypt"), - resource.TestCheckResourceAttr("aws_kms_grant.arn", "operations.1237510779", "Decrypt"), - resource.TestCheckResourceAttrSet("aws_kms_grant.arn", "grantee_principal"), - resource.TestCheckResourceAttrSet("aws_kms_grant.arn", "key_id"), + testAccCheckAWSKmsGrantExists(resourceName), + testAccCheckAWSKmsGrantDisappears(resourceName), ), + ExpectNonEmptyPlan: true, }, }, }) @@ -160,140 +220,107 @@ func testAccCheckAWSKmsGrantExists(name string) resource.TestCheckFunc { } } -func testAccAWSKmsGrant_Basic(rName string, timestamp string, operations string) string { - return fmt.Sprintf(` -resource "aws_kms_key" "tf-acc-test-key" { - description = "Terraform acc test key %s" - deletion_window_in_days = 7 -} +func testAccCheckAWSKmsGrantDisappears(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) + } -%s + conn := testAccProvider.Meta().(*AWSClient).kmsconn -resource "aws_iam_role" "tf-acc-test-role" { - name = "%s" - path = "/service-role/" - assume_role_policy = "${data.aws_iam_policy_document.assumerole-policy-template.json}" -} + revokeInput := kms.RevokeGrantInput{ + GrantId: aws.String(rs.Primary.Attributes["grant_id"]), + KeyId: aws.String(rs.Primary.Attributes["key_id"]), + } -resource "aws_kms_grant" "%[4]s" { - name = "%[4]s" - key_id = "${aws_kms_key.tf-acc-test-key.key_id}" - grantee_principal = "${aws_iam_role.tf-acc-test-role.arn}" - operations = [ %[5]s ] -} -`, timestamp, staticAssumeRolePolicyString, acctest.RandomWithPrefix("tf-acc-test-kms-grant-role"), rName, operations) + _, err := conn.RevokeGrant(&revokeInput) + return err + } } -func testAccAWSKmsGrant_withConstraints(rName string, timestamp string, constraintName string, encryptionContext string) string { +func testAccAWSKmsGrantConfigBase(rName string) string { return fmt.Sprintf(` -resource "aws_kms_key" "tf-acc-test-key" { - description = "Terraform acc test key %s" +resource "aws_kms_key" "test" { + description = "Terraform acc test key %[1]s" deletion_window_in_days = 7 } -%s +data "aws_iam_policy_document" "test" { + statement { + effect = "Allow" + actions = [ "sts:AssumeRole" ] + principals { + type = "Service" + identifiers = [ "ec2.amazonaws.com" ] + } + } +} -resource "aws_iam_role" "tf-acc-test-role" { - name = "%s" +resource "aws_iam_role" "test" { + name = %[1]q path = "/service-role/" - assume_role_policy = "${data.aws_iam_policy_document.assumerole-policy-template.json}" + assume_role_policy = "${data.aws_iam_policy_document.test.json}" +} +`, rName) } -resource "aws_kms_grant" "%[4]s" { - name = "%[4]s" - key_id = "${aws_kms_key.tf-acc-test-key.key_id}" - grantee_principal = "${aws_iam_role.tf-acc-test-role.arn}" +func testAccAWSKmsGrant_Basic(rName string, operations string) string { + return testAccAWSKmsGrantConfigBase(rName) + fmt.Sprintf(` +resource "aws_kms_grant" "test" { + name = %[1]q + key_id = "${aws_kms_key.test.key_id}" + grantee_principal = "${aws_iam_role.test.arn}" + operations = [ %[2]s ] +} +`, rName, operations) +} + +func testAccAWSKmsGrant_withConstraints(rName string, constraintName string, encryptionContext string) string { + return testAccAWSKmsGrantConfigBase(rName) + fmt.Sprintf(` +resource "aws_kms_grant" "test" { + name = "%[1]s" + key_id = "${aws_kms_key.test.key_id}" + grantee_principal = "${aws_iam_role.test.arn}" operations = [ "RetireGrant", "DescribeKey" ] constraints { - %[5]s = { - %[6]s + %[2]s = { + %[3]s } } } -`, timestamp, staticAssumeRolePolicyString, acctest.RandomWithPrefix("tf-acc-test-kms-grant-role"), rName, constraintName, encryptionContext) +`, rName, constraintName, encryptionContext) } -func testAccAWSKmsGrant_withRetiringPrincipal(rName string, timestamp string) string { - return fmt.Sprintf(` -resource "aws_kms_key" "tf-acc-test-key" { - description = "Terraform acc test key %s" - deletion_window_in_days = 7 -} - -%s - -resource "aws_iam_role" "tf-acc-test-role" { - name = "%s" - path = "/service-role/" - assume_role_policy = "${data.aws_iam_policy_document.assumerole-policy-template.json}" -} - -resource "aws_kms_grant" "%[4]s" { - name = "%[4]s" - key_id = "${aws_kms_key.tf-acc-test-key.key_id}" - grantee_principal = "${aws_iam_role.tf-acc-test-role.arn}" +func testAccAWSKmsGrant_withRetiringPrincipal(rName string) string { + return testAccAWSKmsGrantConfigBase(rName) + fmt.Sprintf(` +resource "aws_kms_grant" "test" { + name = "%[1]s" + key_id = "${aws_kms_key.test.key_id}" + grantee_principal = "${aws_iam_role.test.arn}" operations = ["ReEncryptTo", "CreateGrant"] - retiring_principal = "${aws_iam_role.tf-acc-test-role.arn}" -} -`, timestamp, staticAssumeRolePolicyString, acctest.RandomWithPrefix("tf-acc-test-kms-grant-role"), rName) -} - -func testAccAWSKmsGrant_bare(rName string, timestamp string) string { - return fmt.Sprintf(` -resource "aws_kms_key" "tf-acc-test-key" { - description = "Terraform acc test key %s" - deletion_window_in_days = 7 + retiring_principal = "${aws_iam_role.test.arn}" } - -%s - -resource "aws_iam_role" "tf-acc-test-role" { - name = "%s" - path = "/service-role/" - assume_role_policy = "${data.aws_iam_policy_document.assumerole-policy-template.json}" +`, rName) } -resource "aws_kms_grant" "%s" { - key_id = "${aws_kms_key.tf-acc-test-key.key_id}" - grantee_principal = "${aws_iam_role.tf-acc-test-role.arn}" +func testAccAWSKmsGrant_bare(rName string) string { + return testAccAWSKmsGrantConfigBase(rName) + fmt.Sprintf(` +resource "aws_kms_grant" "test" { + key_id = "${aws_kms_key.test.key_id}" + grantee_principal = "${aws_iam_role.test.arn}" operations = ["ReEncryptTo", "CreateGrant"] } -`, timestamp, staticAssumeRolePolicyString, acctest.RandomWithPrefix("tf-acc-test-kms-grant-role"), rName) -} - -const staticAssumeRolePolicyString = ` -data "aws_iam_policy_document" "assumerole-policy-template" { - statement { - effect = "Allow" - actions = [ "sts:AssumeRole" ] - principals { - type = "Service" - identifiers = [ "ec2.amazonaws.com" ] - } - } -} -` - -func testAccAWSKmsGrant_ARN(rName string, timestamp string, operations string) string { - return fmt.Sprintf(` -resource "aws_kms_key" "tf-acc-test-key" { - description = "Terraform acc test key %s" - deletion_window_in_days = 7 -} - -%s - -resource "aws_iam_role" "tf-acc-test-role" { - name = "%s" - path = "/service-role/" - assume_role_policy = "${data.aws_iam_policy_document.assumerole-policy-template.json}" +`) } -resource "aws_kms_grant" "%[4]s" { - name = "%[4]s" - key_id = "${aws_kms_key.tf-acc-test-key.arn}" - grantee_principal = "${aws_iam_role.tf-acc-test-role.arn}" - operations = [ %[5]s ] +func testAccAWSKmsGrant_ARN(rName string, operations string) string { + return testAccAWSKmsGrantConfigBase(rName) + fmt.Sprintf(` +resource "aws_kms_grant" "test" { + name = "%[1]s" + key_id = "${aws_kms_key.test.arn}" + grantee_principal = "${aws_iam_role.test.arn}" + operations = [ %[2]s ] } -`, timestamp, staticAssumeRolePolicyString, acctest.RandomWithPrefix("tf-acc-test-kms-grant-role"), rName, operations) +`, rName, operations) } diff --git a/aws/resource_aws_kms_key.go b/aws/resource_aws_kms_key.go index 13f1d664000..38d89ba8f05 100644 --- a/aws/resource_aws_kms_key.go +++ b/aws/resource_aws_kms_key.go @@ -13,6 +13,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/structure" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" + iamwaiter "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/iam/waiter" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kms/waiter" ) func resourceAwsKmsKey() *schema.Resource { @@ -21,7 +23,6 @@ func resourceAwsKmsKey() *schema.Resource { Read: resourceAwsKmsKeyRead, Update: resourceAwsKmsKeyUpdate, Delete: resourceAwsKmsKeyDelete, - Exists: resourceAwsKmsKeyExists, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -71,7 +72,7 @@ func resourceAwsKmsKey() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "is_enabled": { @@ -117,7 +118,7 @@ func resourceAwsKmsKeyCreate(d *schema.ResourceData, meta interface{}) error { // The KMS service's awareness of principals is limited by "eventual consistency". // They acknowledge this here: // http://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html - err := resource.Retry(30*time.Second, func() *resource.RetryError { + err := resource.Retry(iamwaiter.PropagationTimeout, func() *resource.RetryError { var err error resp, err = conn.CreateKey(req) if isAWSErr(err, kms.ErrCodeMalformedPolicyDocumentException, "") { @@ -135,11 +136,24 @@ func resourceAwsKmsKeyCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(aws.StringValue(resp.KeyMetadata.KeyId)) d.Set("key_id", resp.KeyMetadata.KeyId) - return resourceAwsKmsKeyUpdate(d, meta) + if enableKeyRotation := d.Get("enable_key_rotation").(bool); enableKeyRotation { + if err := updateKmsKeyRotationStatus(conn, d); err != nil { + return err + } + } + + if enabled := d.Get("is_enabled").(bool); !enabled { + if err := updateKmsKeyStatus(conn, d.Id(), enabled); err != nil { + return err + } + } + + return resourceAwsKmsKeyRead(d, meta) } func resourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kmsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &kms.DescribeKeyInput{ KeyId: aws.String(d.Id()), @@ -202,12 +216,31 @@ func resourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { krs, _ := out.(*kms.GetKeyRotationStatusOutput) d.Set("enable_key_rotation", krs.KeyRotationEnabled) - tags, err := keyvaluetags.KmsListTags(conn, d.Id()) + var tags keyvaluetags.KeyValueTags + err = resource.Retry(2*time.Minute, func() *resource.RetryError { + var err error + tags, err = keyvaluetags.KmsListTags(conn, d.Id()) + + if d.IsNewResource() && isAWSErr(err, kms.ErrCodeNotFoundException, "") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isResourceTimeoutError(err) { + tags, err = keyvaluetags.KmsListTags(conn, d.Id()) + } + if err != nil { return fmt.Errorf("error listing tags for KMS Key (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -217,8 +250,7 @@ func resourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsKmsKeyUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kmsconn - // We expect new keys to be enabled already - if d.HasChange("is_enabled") && d.Get("is_enabled").(bool) && !d.IsNewResource() { + if d.HasChange("is_enabled") && d.Get("is_enabled").(bool) { // Enable before any attributes will be modified if err := updateKmsKeyStatus(conn, d.Id(), d.Get("is_enabled").(bool)); err != nil { return err @@ -271,9 +303,8 @@ func resourceAwsKmsKeyDescriptionUpdate(conn *kms.KMS, d *schema.ResourceData) e Description: aws.String(description), KeyId: aws.String(keyId), } - _, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.UpdateKeyDescription(req) - }) + _, err := conn.UpdateKeyDescription(req) + return err } @@ -291,9 +322,8 @@ func resourceAwsKmsKeyPolicyUpdate(conn *kms.KMS, d *schema.ResourceData) error Policy: aws.String(policy), PolicyName: aws.String("default"), } - _, err = retryOnAwsCode("NotFoundException", func() (interface{}, error) { - return conn.PutKeyPolicy(req) - }) + _, err = conn.PutKeyPolicy(req) + return err } @@ -433,30 +463,6 @@ func handleKeyRotation(conn *kms.KMS, shouldEnableRotation bool, keyId *string) return err } -func resourceAwsKmsKeyExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).kmsconn - - req := &kms.DescribeKeyInput{ - KeyId: aws.String(d.Id()), - } - resp, err := conn.DescribeKey(req) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NotFoundException" { - return false, nil - } - } - return false, err - } - metadata := resp.KeyMetadata - - if *metadata.KeyState == "PendingDeletion" { - return false, nil - } - - return true, nil -} - func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kmsconn keyId := d.Get("key_id").(string) @@ -468,39 +474,24 @@ func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error { req.PendingWindowInDays = aws.Int64(int64(v.(int))) } _, err := conn.ScheduleKeyDeletion(req) - if err != nil { - return err + + if isAWSErr(err, kms.ErrCodeNotFoundException, "") { + return nil } - // Wait for propagation since KMS is eventually consistent - wait := resource.StateChangeConf{ - Pending: []string{kms.KeyStateEnabled, kms.KeyStateDisabled}, - Target: []string{kms.KeyStatePendingDeletion}, - Timeout: 20 * time.Minute, - MinTimeout: 2 * time.Second, - ContinuousTargetOccurence: 10, - Refresh: func() (interface{}, string, error) { - log.Printf("[DEBUG] Checking if KMS key %s state is PendingDeletion", keyId) - resp, err := conn.DescribeKey(&kms.DescribeKeyInput{ - KeyId: aws.String(keyId), - }) - if err != nil { - return resp, "Failed", err - } + if err != nil { + return fmt.Errorf("error scheduling deletion for KMS Key (%s): %w", d.Id(), err) + } - metadata := *resp.KeyMetadata - log.Printf("[DEBUG] KMS key %s state is %s, retrying", keyId, *metadata.KeyState) + _, err = waiter.KeyStatePendingDeletion(conn, d.Id()) - return resp, *metadata.KeyState, nil - }, + if isAWSErr(err, kms.ErrCodeNotFoundException, "") { + return nil } - _, err = wait.WaitForState() if err != nil { - return fmt.Errorf("Failed deactivating KMS key %s: %s", keyId, err) + return fmt.Errorf("error waiting for KMS Key (%s) to schedule deletion: %w", d.Id(), err) } - log.Printf("[DEBUG] KMS Key %s deactivated.", keyId) - return nil } diff --git a/aws/resource_aws_kms_key_test.go b/aws/resource_aws_kms_key_test.go index 3272c7dda24..3aab3fea5ae 100644 --- a/aws/resource_aws_kms_key_test.go +++ b/aws/resource_aws_kms_key_test.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/jen20/awspolicyequivalence" + awspolicy "github.com/jen20/awspolicyequivalence" ) func init() { @@ -173,6 +173,59 @@ func TestAccAWSKmsKey_policy(t *testing.T) { }) } +func TestAccAWSKmsKey_Policy_IamRole(t *testing.T) { + var key kms.KeyMetadata + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_kms_key.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSKmsKeyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSKmsKeyConfigPolicyIamRole(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSKmsKeyExists(resourceName, &key), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_window_in_days"}, + }, + }, + }) +} + +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/7646 +func TestAccAWSKmsKey_Policy_IamServiceLinkedRole(t *testing.T) { + var key kms.KeyMetadata + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_kms_key.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSKmsKeyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSKmsKeyConfigPolicyIamServiceLinkedRole(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSKmsKeyExists(resourceName, &key), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_window_in_days"}, + }, + }, + }) +} + func TestAccAWSKmsKey_isEnabled(t *testing.T) { var key1, key2, key3 kms.KeyMetadata rName := fmt.Sprintf("tf-testacc-kms-key-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) @@ -417,6 +470,110 @@ POLICY `, rName) } +func testAccAWSKmsKeyConfigPolicyIamRole(rName string) string { + return fmt.Sprintf(` +data "aws_partition" "current" {} + +resource "aws_iam_role" "test" { + name = %[1]q + + assume_role_policy = jsonencode({ + Statement = [{ + Action = "sts:AssumeRole" + Effect = "Allow" + Principal = { + Service = "ec2.${data.aws_partition.current.dns_suffix}" + } + }] + Version = "2012-10-17" + }) +} + +resource "aws_kms_key" "test" { + description = %[1]q + deletion_window_in_days = 7 + + policy = jsonencode({ + Id = "kms-tf-1" + Statement = [ + { + Action = "kms:*" + Effect = "Allow" + Principal = { + AWS = "*" + } + Resource = "*" + Sid= "Enable IAM User Permissions" + }, + { + Action = [ + "kms:Encrypt", + "kms:Decrypt", + "kms:ReEncrypt*", + "kms:GenerateDataKey*", + "kms:DescribeKey", + ] + Effect = "Allow" + Principal = { + AWS = [aws_iam_role.test.arn] + } + Resource = "*" + Sid = "Enable IAM User Permissions" + }, + ] + Version = "2012-10-17" +}) +} +`, rName) +} + +func testAccAWSKmsKeyConfigPolicyIamServiceLinkedRole(rName string) string { + return fmt.Sprintf(` +data "aws_partition" "current" {} + +resource "aws_iam_service_linked_role" "test" { + aws_service_name = "autoscaling.${data.aws_partition.current.dns_suffix}" + custom_suffix = %[1]q +} + +resource "aws_kms_key" "test" { + description = %[1]q + deletion_window_in_days = 7 + + policy = jsonencode({ + Id = "kms-tf-1" + Statement = [ + { + Action = "kms:*" + Effect = "Allow" + Principal = { + AWS = "*" + } + Resource = "*" + Sid= "Enable IAM User Permissions" + }, + { + Action = [ + "kms:Encrypt", + "kms:Decrypt", + "kms:ReEncrypt*", + "kms:GenerateDataKey*", + "kms:DescribeKey", + ] + Effect = "Allow" + Principal = { + AWS = [aws_iam_service_linked_role.test.arn] + } + Resource = "*" + Sid = "Enable IAM User Permissions" + }, + ] + Version = "2012-10-17" +}) +} +`, rName) +} + func testAccAWSKmsKey_removedPolicy(rName string) string { return fmt.Sprintf(` resource "aws_kms_key" "test" { diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index 069a951d3e4..50ec672a2c6 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -29,6 +29,14 @@ func resourceAwsLambdaAlias() *schema.Resource { "function_name": { Type: schema.TypeString, Required: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Using function name or ARN should not be shown as a diff. + // Try to convert the old and new values from ARN to function name + oldFunctionName, oldFunctionNameErr := getFunctionNameFromLambdaArn(old) + newFunctionName, newFunctionNameErr := getFunctionNameFromLambdaArn(new) + return (oldFunctionName == new && oldFunctionNameErr == nil) || (newFunctionName == old && newFunctionNameErr == nil) + }, }, "function_version": { Type: schema.TypeString, diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index 92a1bfc4592..1a5126fc464 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -14,7 +13,7 @@ import ( func TestAccAWSLambdaAlias_basic(t *testing.T) { var conf lambda.AliasConfiguration - resourceName := "aws_lambda_alias.lambda_alias_test" + resourceName := "aws_lambda_alias.test" rString := acctest.RandString(8) roleName := fmt.Sprintf("tf_acc_role_lambda_alias_basic_%s", rString) @@ -23,6 +22,8 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) + functionArnResourcePart := fmt.Sprintf("function:%s:%s", funcName, aliasName) + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -32,10 +33,10 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists(resourceName, &conf), - testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasAttributes(&conf), testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(&conf), - testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", fmt.Sprintf("function:%s:%s", funcName, aliasName)), - resource.TestMatchResourceAttr(resourceName, "invoke_arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:apigateway:[^:]+:lambda:path/2015-03-31/functions/arn:[^:]+:lambda:[^:]+:[^:]+:function:%s:%s/invocations$", funcName, aliasName))), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", functionArnResourcePart), + testAccCheckAwsLambdaAliasInvokeArn(resourceName, &conf), ), }, { @@ -44,13 +45,17 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { ImportStateId: fmt.Sprintf("%s/%s", funcName, aliasName), ImportStateVerify: true, }, + { + Config: testAccAwsLambdaAliasConfigUsingFunctionName(roleName, policyName, attachmentName, funcName, aliasName), + PlanOnly: true, + }, }, }) } func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { var conf lambda.AliasConfiguration - resourceName := "aws_lambda_alias.lambda_alias_test" + resourceName := "aws_lambda_alias.test" rString := acctest.RandString(8) roleName := fmt.Sprintf("tf_acc_role_lambda_alias_basic_%s", rString) @@ -60,6 +65,9 @@ func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) aliasNameUpdate := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", acctest.RandString(8)) + functionArnResourcePart := fmt.Sprintf("function:%s:%s", funcName, aliasName) + functionArnResourcePartUpdate := fmt.Sprintf("function:%s:%s", funcName, aliasNameUpdate) + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -69,16 +77,16 @@ func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists(resourceName, &conf), - testAccCheckAwsLambdaAttributes(&conf), - testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", fmt.Sprintf("function:%s:%s", funcName, aliasName)), + testAccCheckAwsLambdaAliasAttributes(&conf), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", functionArnResourcePart), ), }, { Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasNameUpdate), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists(resourceName, &conf), - testAccCheckAwsLambdaAttributes(&conf), - testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", fmt.Sprintf("function:%s:%s", funcName, aliasNameUpdate)), + testAccCheckAwsLambdaAliasAttributes(&conf), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", functionArnResourcePartUpdate), ), }, }, @@ -87,7 +95,7 @@ func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { var conf lambda.AliasConfiguration - resourceName := "aws_lambda_alias.lambda_alias_test" + resourceName := "aws_lambda_alias.test" rString := acctest.RandString(8) roleName := fmt.Sprintf("tf_acc_role_lambda_alias_basic_%s", rString) @@ -96,6 +104,8 @@ func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) + functionArnResourcePart := fmt.Sprintf("function:%s:%s", funcName, aliasName) + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -105,26 +115,26 @@ func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists(resourceName, &conf), - testAccCheckAwsLambdaAttributes(&conf), - testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", fmt.Sprintf("function:%s:%s", funcName, aliasName)), + testAccCheckAwsLambdaAliasAttributes(&conf), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", functionArnResourcePart), ), }, { Config: testAccAwsLambdaAliasConfigWithRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists(resourceName, &conf), - testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasAttributes(&conf), testAccCheckAwsLambdaAliasRoutingConfigExists(&conf), - testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", fmt.Sprintf("function:%s:%s", funcName, aliasName)), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", functionArnResourcePart), ), }, { Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists(resourceName, &conf), - testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasAttributes(&conf), testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(&conf), - testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", fmt.Sprintf("function:%s:%s", funcName, aliasName)), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "lambda", functionArnResourcePart), ), }, }, @@ -181,7 +191,7 @@ func testAccCheckAwsLambdaAliasExists(n string, mapping *lambda.AliasConfigurati } } -func testAccCheckAwsLambdaAttributes(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { +func testAccCheckAwsLambdaAliasAttributes(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { return func(s *terraform.State) error { name := *mapping.Name arn := *mapping.AliasArn @@ -195,6 +205,13 @@ func testAccCheckAwsLambdaAttributes(mapping *lambda.AliasConfiguration) resourc } } +func testAccCheckAwsLambdaAliasInvokeArn(name string, mapping *lambda.AliasConfiguration) resource.TestCheckFunc { + return func(s *terraform.State) error { + arn := aws.StringValue(mapping.AliasArn) + return testAccCheckResourceAttrRegionalARNAccountID(name, "invoke_arn", "apigateway", "lambda", fmt.Sprintf("path/2015-03-31/functions/%s/invocations", arn))(s) + } +} + func testAccCheckAwsLambdaAliasRoutingConfigExists(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { return func(s *terraform.State) error { routingConfig := mapping.RoutingConfig @@ -220,7 +237,7 @@ func testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(mapping *lambda.AliasCo } } -func testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { +func testAccAwsLambdaAliasBaseConfig(roleName, policyName, attachmentName string) string { return fmt.Sprintf(` resource "aws_iam_role" "iam_for_lambda" { name = "%s" @@ -268,8 +285,14 @@ resource "aws_iam_policy_attachment" "policy_attachment_for_role" { roles = ["${aws_iam_role.iam_for_lambda.name}"] policy_arn = "${aws_iam_policy.policy_for_role.arn}" } +`, roleName, policyName, attachmentName) +} -resource "aws_lambda_function" "lambda_function_test_create" { +func testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { + return composeConfig( + testAccAwsLambdaAliasBaseConfig(roleName, policyName, attachmentName), + fmt.Sprintf(` +resource "aws_lambda_function" "test" { filename = "test-fixtures/lambdatest.zip" function_name = "%s" role = "${aws_iam_role.iam_for_lambda.arn}" @@ -279,65 +302,43 @@ resource "aws_lambda_function" "lambda_function_test_create" { publish = "true" } -resource "aws_lambda_alias" "lambda_alias_test" { +resource "aws_lambda_alias" "test" { name = "%s" description = "a sample description" - function_name = "${aws_lambda_function.lambda_function_test_create.arn}" + function_name = "${aws_lambda_function.test.arn}" function_version = "1" } -`, roleName, policyName, attachmentName, funcName, aliasName) +`, funcName, aliasName)) } -func testAccAwsLambdaAliasConfigWithRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { - return fmt.Sprintf(` -resource "aws_iam_role" "iam_for_lambda" { - name = "%s" - - assume_role_policy = < 0 && m[0] != nil { @@ -1211,6 +1354,10 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate } } + if v, ok := d.GetOk("hibernation_options"); ok { + opts.HibernationOptions = expandLaunchTemplateHibernationOptions(v.([]interface{})) + } + if v, ok := d.GetOk("tag_specifications"); ok { var tagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest t := v.([]interface{}) @@ -1560,5 +1707,9 @@ func readPlacementFromConfig(p map[string]interface{}) *ec2.LaunchTemplatePlacem placement.Tenancy = aws.String(v) } + if v, ok := p["partition_number"].(int); ok && v != 0 { + placement.PartitionNumber = aws.Int64(int64(v)) + } + return placement } diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index c60669b05cd..413599fb214 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -89,7 +90,7 @@ func TestAccAWSLaunchTemplate_basic(t *testing.T) { testAccCheckAWSLaunchTemplateExists(resourceName, &template), resource.TestCheckResourceAttr(resourceName, "default_version", "1"), resource.TestCheckResourceAttr(resourceName, "latest_version", "1"), - resource.TestCheckResourceAttrSet(resourceName, "arn"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`launch-template/.+`)), resource.TestCheckResourceAttr(resourceName, "ebs_optimized", ""), resource.TestCheckResourceAttr(resourceName, "elastic_inference_accelerator.#", "0"), ), @@ -636,6 +637,34 @@ func TestAccAWSLaunchTemplate_networkInterface(t *testing.T) { }) } +func TestAccAWSLaunchTemplate_networkInterfaceAddresses(t *testing.T) { + var template ec2.LaunchTemplate + resourceName := "aws_launch_template.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_networkInterfaceAddresses, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "network_interfaces.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "network_interfaces.0.network_interface_id"), + resource.TestCheckResourceAttr(resourceName, "network_interfaces.0.associate_public_ip_address", ""), + resource.TestCheckResourceAttr(resourceName, "network_interfaces.0.ipv4_addresses.#", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSLaunchTemplate_associatePublicIPAddress(t *testing.T) { var template ec2.LaunchTemplate rName := acctest.RandomWithPrefix("tf-acc-test") @@ -685,6 +714,39 @@ func TestAccAWSLaunchTemplate_associatePublicIPAddress(t *testing.T) { }) } +func TestAccAWSLaunchTemplate_placement_partitionNum(t *testing.T) { + var template ec2.LaunchTemplate + resourceName := "aws_launch_template.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfigPartition(rName, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "placement.0.partition_number", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSLaunchTemplateConfigPartition(rName, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "placement.0.partition_number", "2"), + ), + }, + }, + }) +} + func TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses(t *testing.T) { var template ec2.LaunchTemplate rName := acctest.RandomWithPrefix("tf-acc-test") @@ -808,6 +870,75 @@ func TestAccAWSLaunchTemplate_licenseSpecification(t *testing.T) { }) } +func TestAccAWSLaunchTemplate_metadataOptions(t *testing.T) { + var template ec2.LaunchTemplate + resourceName := "aws_launch_template.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_metadataOptions(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "metadata_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_endpoint", "enabled"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_tokens", "required"), + resource.TestCheckResourceAttr(resourceName, "metadata_options.0.http_put_response_hop_limit", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSLaunchTemplate_hibernation(t *testing.T) { + var template ec2.LaunchTemplate + resourceName := "aws_launch_template.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfigHibernation(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "hibernation_options.0.configured", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSLaunchTemplateConfigHibernation(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "hibernation_options.0.configured", "false"), + ), + }, + { + Config: testAccAWSLaunchTemplateConfigHibernation(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resourceName, &template), + resource.TestCheckResourceAttr(resourceName, "hibernation_options.0.configured", "true"), + ), + }, + }, + }) +} + func testAccCheckAWSLaunchTemplateExists(n string, t *ec2.LaunchTemplate) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -921,7 +1052,14 @@ data "aws_ami" "test" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_launch_template" "test" { image_id = "${data.aws_ami.test.id}" @@ -971,7 +1109,14 @@ data "aws_ami" "test" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_launch_template" "test" { image_id = "${data.aws_ami.test.id}" @@ -1115,7 +1260,14 @@ resource "aws_launch_template" "test" { func testAccAWSLaunchTemplateConfig_capacityReservation_target(rInt int) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_ec2_capacity_reservation" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" @@ -1224,6 +1376,52 @@ resource "aws_launch_template" "test" { `, rName) } +func testAccAWSLaunchTemplateConfigPartition(rName string, partNum int) string { + return fmt.Sprintf(` +resource "aws_placement_group" "test" { + name = %[1]q + strategy = "partition" +} + +resource "aws_launch_template" "test" { + name = %[1]q + + placement { + group_name = "${aws_placement_group.test.name}" + partition_number = %[2]d + } + + tags = { + Name = %[1]q + } +} +`, rName, partNum) +} + +const testAccAWSLaunchTemplateConfig_networkInterfaceAddresses = ` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.1.0.0/24" +} + +resource "aws_network_interface" "test" { + subnet_id = "${aws_subnet.test.id}" +} + +resource "aws_launch_template" "test" { + name = "network-interface-launch-template" + + network_interfaces { + network_interface_id = "${aws_network_interface.test.id}" + ipv4_addresses = ["10.1.0.10", "10.1.0.11"] + } +} +` + func testAccAWSLaunchTemplateConfig_associatePublicIpAddress(rName, associatePublicIPAddress string) string { return fmt.Sprintf(` resource "aws_vpc" "test" { @@ -1283,7 +1481,14 @@ resource "aws_launch_template" "test" { instance_type = "t2.micro" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_autoscaling_group" "bar" { availability_zones = ["${data.aws_availability_zones.available.names[0]}"] @@ -1314,7 +1519,14 @@ resource "aws_launch_template" "test" { instance_type = "t2.nano" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_autoscaling_group" "bar" { availability_zones = ["${data.aws_availability_zones.available.names[0]}"] @@ -1352,7 +1564,14 @@ resource "aws_launch_template" "test" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_autoscaling_group" "test" { availability_zones = ["${data.aws_availability_zones.available.names[0]}"] @@ -1392,7 +1611,14 @@ resource "aws_launch_template" "test" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_autoscaling_group" "test" { availability_zones = ["${data.aws_availability_zones.available.names[0]}"] @@ -1406,3 +1632,29 @@ resource "aws_autoscaling_group" "test" { } } ` + +func testAccAWSLaunchTemplateConfig_metadataOptions(rName string) string { + return fmt.Sprintf(` +resource "aws_launch_template" "test" { + name = %[1]q + + metadata_options { + http_endpoint = "enabled" + http_tokens = "required" + http_put_response_hop_limit = 2 + } +} +`, rName) +} + +func testAccAWSLaunchTemplateConfigHibernation(rName string, enabled bool) string { + return fmt.Sprintf(` +resource "aws_launch_template" "test" { + name = %[1]q + + hibernation_options { + configured = %[2]t + } +} +`, rName, enabled) +} diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index ab1e84bf2f8..1b1abe80443 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -171,6 +171,13 @@ func resourceAwsLb() *schema.Resource { DiffSuppressFunc: suppressIfLBType(elbv2.LoadBalancerTypeEnumNetwork), }, + "drop_invalid_header_fields": { + Type: schema.TypeBool, + Optional: true, + Default: false, + DiffSuppressFunc: suppressIfLBType("network"), + }, + "enable_cross_zone_load_balancing": { Type: schema.TypeBool, Optional: true, @@ -408,6 +415,14 @@ func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { Value: aws.String(strconv.FormatBool(d.Get("enable_http2").(bool))), }) } + + if d.HasChange("drop_invalid_header_fields") || d.IsNewResource() { + attributes = append(attributes, &elbv2.LoadBalancerAttribute{ + Key: aws.String("routing.http.drop_invalid_header_fields.enabled"), + Value: aws.String(strconv.FormatBool(d.Get("drop_invalid_header_fields").(bool))), + }) + } + case elbv2.LoadBalancerTypeEnumNetwork: if d.HasChange("enable_cross_zone_load_balancing") || d.IsNewResource() { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ @@ -698,6 +713,7 @@ func lbSuffixFromARN(arn *string) string { // flattenAwsLbResource takes a *elbv2.LoadBalancer and populates all respective resource fields. func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.LoadBalancer) error { elbconn := meta.(*AWSClient).elbv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig d.Set("arn", lb.LoadBalancerArn) d.Set("arn_suffix", lbSuffixFromARN(lb.LoadBalancerArn)) @@ -724,7 +740,7 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo return fmt.Errorf("error listing tags for (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -756,6 +772,10 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo } log.Printf("[DEBUG] Setting ALB Timeout Seconds: %d", timeout) d.Set("idle_timeout", timeout) + case "routing.http.drop_invalid_header_fields.enabled": + dropInvalidHeaderFieldsEnabled := aws.StringValue(attr.Value) == "true" + log.Printf("[DEBUG] Setting LB Invalid Header Fields Enabled: %t", dropInvalidHeaderFieldsEnabled) + d.Set("drop_invalid_header_fields", dropInvalidHeaderFieldsEnabled) case "deletion_protection.enabled": protectionEnabled := aws.StringValue(attr.Value) == "true" log.Printf("[DEBUG] Setting LB Deletion Protection Enabled: %t", protectionEnabled) diff --git a/aws/resource_aws_lb_cookie_stickiness_policy.go b/aws/resource_aws_lb_cookie_stickiness_policy.go index ec1c169d863..77fad73af6f 100644 --- a/aws/resource_aws_lb_cookie_stickiness_policy.go +++ b/aws/resource_aws_lb_cookie_stickiness_policy.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strconv" "strings" "github.com/aws/aws-sdk-go/aws" @@ -129,7 +130,11 @@ func resourceAwsLBCookieStickinessPolicyRead(d *schema.ResourceData, meta interf if *cookieAttr.AttributeName != "CookieExpirationPeriod" { return fmt.Errorf("Unable to find cookie expiration period.") } - d.Set("cookie_expiration_period", cookieAttr.AttributeValue) + cookieVal, err := strconv.Atoi(aws.StringValue(cookieAttr.AttributeValue)) + if err != nil { + return fmt.Errorf("Error parsing cookie expiration period: %s", err) + } + d.Set("cookie_expiration_period", cookieVal) d.Set("name", policyName) d.Set("load_balancer", lbName) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index 5f4b6f380ba..019242c8e0b 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -103,13 +103,64 @@ func resourceAwsLbListener() *schema.Resource { "target_group_arn": { Type: schema.TypeString, Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("forward"), + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumForward), + }, + + "forward": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumForward), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "target_group": { + Type: schema.TypeSet, + MinItems: 2, + MaxItems: 5, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + }, + "weight": { + Type: schema.TypeInt, + ValidateFunc: validation.IntBetween(0, 999), + Default: 1, + Optional: true, + }, + }, + }, + }, + "stickiness": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressMissingOptionalConfigurationBlock, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "duration": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 604800), + }, + }, + }, + }, + }, + }, }, "redirect": { Type: schema.TypeList, Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("redirect"), + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumRedirect), MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -163,7 +214,7 @@ func resourceAwsLbListener() *schema.Resource { "fixed_response": { Type: schema.TypeList, Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("fixed-response"), + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumFixedResponse), MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -197,13 +248,14 @@ func resourceAwsLbListener() *schema.Resource { "authenticate_cognito": { Type: schema.TypeList, Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-cognito"), + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateCognito), MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "authentication_request_extra_params": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "on_unauthenticated_request": { Type: schema.TypeString, @@ -249,13 +301,14 @@ func resourceAwsLbListener() *schema.Resource { "authenticate_oidc": { Type: schema.TypeList, Optional: true, - DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-oidc"), + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateOidc), MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "authentication_request_extra_params": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "authorization_endpoint": { Type: schema.TypeString, @@ -369,10 +422,12 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error } switch defaultActionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) + case elbv2.ActionTypeEnumForward: + if err := lbListenerRuleActionForward(defaultActionMap, action); err != nil { + return err + } - case "redirect": + case elbv2.ActionTypeEnumRedirect: redirectList := defaultActionMap["redirect"].([]interface{}) if len(redirectList) == 1 { @@ -390,7 +445,7 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") } - case "fixed-response": + case elbv2.ActionTypeEnumFixedResponse: fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) if len(fixedResponseList) == 1 { @@ -496,15 +551,15 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error }) if isResourceTimeoutError(err) { - _, err = elbconn.CreateListener(params) + resp, err = elbconn.CreateListener(params) } if err != nil { - return fmt.Errorf("Error creating LB Listener: %s", err) + return fmt.Errorf("error creating ELBv2 Listener: %s", err) } - if len(resp.Listeners) == 0 { - return errors.New("Error creating LB Listener: no listeners returned in response") + if resp == nil || len(resp.Listeners) == 0 { + return fmt.Errorf("error creating ELBv2 Listener: no listeners returned in response") } d.SetId(*resp.Listeners[0].ListenerArn) @@ -533,7 +588,7 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { }) if isResourceTimeoutError(err) { - _, err = elbconn.DescribeListeners(request) + resp, err = elbconn.DescribeListeners(request) } if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { @@ -543,14 +598,25 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { } if err != nil { - return fmt.Errorf("Error retrieving Listener: %s", err) + return fmt.Errorf("error describing ELBv2 Listener (%s): %s", d.Id(), err) } - if len(resp.Listeners) != 1 { - return fmt.Errorf("Error retrieving Listener %q", d.Id()) + if resp == nil { + return fmt.Errorf("error describing ELBv2 Listener (%s): empty response", d.Id()) } - listener := resp.Listeners[0] + var listener *elbv2.Listener + + for _, l := range resp.Listeners { + if aws.StringValue(l.ListenerArn) == d.Id() { + listener = l + break + } + } + + if listener == nil { + return fmt.Errorf("error describing ELBv2 Listener (%s): not found in response", d.Id()) + } d.Set("arn", listener.ListenerArn) d.Set("load_balancer_arn", listener.LoadBalancerArn) @@ -572,10 +638,33 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { defaultActionMap["order"] = aws.Int64Value(defaultAction.Order) switch aws.StringValue(defaultAction.Type) { - case "forward": - defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) + case elbv2.ActionTypeEnumForward: + if aws.StringValue(defaultAction.TargetGroupArn) != "" { + defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) + } else { + targetGroups := make([]map[string]interface{}, 0, len(defaultAction.ForwardConfig.TargetGroups)) + for _, targetGroup := range defaultAction.ForwardConfig.TargetGroups { + targetGroups = append(targetGroups, + map[string]interface{}{ + "arn": aws.StringValue(targetGroup.TargetGroupArn), + "weight": aws.Int64Value(targetGroup.Weight), + }, + ) + } + defaultActionMap["forward"] = []map[string]interface{}{ + { + "target_group": targetGroups, + "stickiness": []map[string]interface{}{ + { + "enabled": aws.BoolValue(defaultAction.ForwardConfig.TargetGroupStickinessConfig.Enabled), + "duration": aws.Int64Value(defaultAction.ForwardConfig.TargetGroupStickinessConfig.DurationSeconds), + }, + }, + }, + } + } - case "redirect": + case elbv2.ActionTypeEnumRedirect: defaultActionMap["redirect"] = []map[string]interface{}{ { "host": aws.StringValue(defaultAction.RedirectConfig.Host), @@ -587,7 +676,7 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { }, } - case "fixed-response": + case elbv2.ActionTypeEnumFixedResponse: defaultActionMap["fixed_response"] = []map[string]interface{}{ { "content_type": aws.StringValue(defaultAction.FixedResponseConfig.ContentType), @@ -596,7 +685,7 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { }, } - case "authenticate-cognito": + case elbv2.ActionTypeEnumAuthenticateCognito: authenticationRequestExtraParams := make(map[string]interface{}) for key, value := range defaultAction.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { authenticationRequestExtraParams[key] = aws.StringValue(value) @@ -614,7 +703,7 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { }, } - case "authenticate-oidc": + case elbv2.ActionTypeEnumAuthenticateOidc: authenticationRequestExtraParams := make(map[string]interface{}) for key, value := range defaultAction.AuthenticateOidcConfig.AuthenticationRequestExtraParams { authenticationRequestExtraParams[key] = aws.StringValue(value) @@ -687,10 +776,12 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } switch defaultActionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) + case elbv2.ActionTypeEnumForward: + if err := lbListenerRuleActionForward(defaultActionMap, action); err != nil { + return err + } - case "redirect": + case elbv2.ActionTypeEnumRedirect: redirectList := defaultActionMap["redirect"].([]interface{}) if len(redirectList) == 1 { @@ -708,7 +799,7 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") } - case "fixed-response": + case elbv2.ActionTypeEnumFixedResponse: fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) if len(fixedResponseList) == 1 { @@ -723,7 +814,7 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } - case "authenticate-cognito": + case elbv2.ActionTypeEnumAuthenticateCognito: authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) if len(authenticateCognitoList) == 1 { @@ -757,7 +848,7 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") } - case "authenticate-oidc": + case elbv2.ActionTypeEnumAuthenticateOidc: authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) if len(authenticateOidcList) == 1 { diff --git a/aws/resource_aws_lb_listener_certificate_test.go b/aws/resource_aws_lb_listener_certificate_test.go index 89848cc0114..90473f16098 100644 --- a/aws/resource_aws_lb_listener_certificate_test.go +++ b/aws/resource_aws_lb_listener_certificate_test.go @@ -162,7 +162,14 @@ func testAccCheckAwsLbListenerCertificateNotExists(name string) resource.TestChe func testAccLbListenerCertificateConfigLbListenerBase(rName, key, certificate string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" diff --git a/aws/resource_aws_lb_listener_rule.go b/aws/resource_aws_lb_listener_rule.go index 3b7c9c8adc1..dd76a7e2833 100644 --- a/aws/resource_aws_lb_listener_rule.go +++ b/aws/resource_aws_lb_listener_rule.go @@ -71,13 +71,64 @@ func resourceAwsLbbListenerRule() *schema.Resource { "target_group_arn": { Type: schema.TypeString, Optional: true, - DiffSuppressFunc: suppressIfActionTypeNot("forward"), + DiffSuppressFunc: suppressIfActionTypeNot(elbv2.ActionTypeEnumForward), + }, + + "forward": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfActionTypeNot(elbv2.ActionTypeEnumForward), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "target_group": { + Type: schema.TypeSet, + MinItems: 2, + MaxItems: 5, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + }, + "weight": { + Type: schema.TypeInt, + ValidateFunc: validation.IntBetween(0, 999), + Default: 1, + Optional: true, + }, + }, + }, + }, + "stickiness": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressMissingOptionalConfigurationBlock, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "duration": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 604800), + }, + }, + }, + }, + }, + }, }, "redirect": { Type: schema.TypeList, Optional: true, - DiffSuppressFunc: suppressIfActionTypeNot("redirect"), + DiffSuppressFunc: suppressIfActionTypeNot(elbv2.ActionTypeEnumRedirect), MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -131,7 +182,7 @@ func resourceAwsLbbListenerRule() *schema.Resource { "fixed_response": { Type: schema.TypeList, Optional: true, - DiffSuppressFunc: suppressIfActionTypeNot("fixed-response"), + DiffSuppressFunc: suppressIfActionTypeNot(elbv2.ActionTypeEnumFixedResponse), MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -172,6 +223,7 @@ func resourceAwsLbbListenerRule() *schema.Resource { "authentication_request_extra_params": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "on_unauthenticated_request": { Type: schema.TypeString, @@ -224,6 +276,7 @@ func resourceAwsLbbListenerRule() *schema.Resource { "authentication_request_extra_params": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "authorization_endpoint": { Type: schema.TypeString, @@ -557,10 +610,12 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e } switch actionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(actionMap["target_group_arn"].(string)) + case elbv2.ActionTypeEnumForward: + if err := lbListenerRuleActionForward(actionMap, action); err != nil { + return err + } - case "redirect": + case elbv2.ActionTypeEnumRedirect: redirectList := actionMap["redirect"].([]interface{}) if len(redirectList) == 1 { @@ -578,7 +633,7 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") } - case "fixed-response": + case elbv2.ActionTypeEnumFixedResponse: fixedResponseList := actionMap["fixed_response"].([]interface{}) if len(fixedResponseList) == 1 { @@ -593,7 +648,7 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } - case "authenticate-cognito": + case elbv2.ActionTypeEnumAuthenticateCognito: authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) if len(authenticateCognitoList) == 1 { @@ -627,7 +682,7 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") } - case "authenticate-oidc": + case elbv2.ActionTypeEnumAuthenticateOidc: authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) if len(authenticateOidcList) == 1 { @@ -786,10 +841,33 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err actionMap["order"] = aws.Int64Value(action.Order) switch actionMap["type"] { - case "forward": - actionMap["target_group_arn"] = aws.StringValue(action.TargetGroupArn) + case elbv2.ActionTypeEnumForward: + if aws.StringValue(action.TargetGroupArn) != "" { + actionMap["target_group_arn"] = aws.StringValue(action.TargetGroupArn) + } else { + targetGroups := make([]map[string]interface{}, 0, len(action.ForwardConfig.TargetGroups)) + for _, targetGroup := range action.ForwardConfig.TargetGroups { + targetGroups = append(targetGroups, + map[string]interface{}{ + "arn": aws.StringValue(targetGroup.TargetGroupArn), + "weight": aws.Int64Value(targetGroup.Weight), + }, + ) + } + actionMap["forward"] = []map[string]interface{}{ + { + "target_group": targetGroups, + "stickiness": []map[string]interface{}{ + { + "enabled": aws.BoolValue(action.ForwardConfig.TargetGroupStickinessConfig.Enabled), + "duration": aws.Int64Value(action.ForwardConfig.TargetGroupStickinessConfig.DurationSeconds), + }, + }, + }, + } + } - case "redirect": + case elbv2.ActionTypeEnumRedirect: actionMap["redirect"] = []map[string]interface{}{ { "host": aws.StringValue(action.RedirectConfig.Host), @@ -801,7 +879,7 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err }, } - case "fixed-response": + case elbv2.ActionTypeEnumFixedResponse: actionMap["fixed_response"] = []map[string]interface{}{ { "content_type": aws.StringValue(action.FixedResponseConfig.ContentType), @@ -810,7 +888,7 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err }, } - case "authenticate-cognito": + case elbv2.ActionTypeEnumAuthenticateCognito: authenticationRequestExtraParams := make(map[string]interface{}) for key, value := range action.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { authenticationRequestExtraParams[key] = aws.StringValue(value) @@ -829,7 +907,7 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err }, } - case "authenticate-oidc": + case elbv2.ActionTypeEnumAuthenticateOidc: authenticationRequestExtraParams := make(map[string]interface{}) for key, value := range action.AuthenticateOidcConfig.AuthenticationRequestExtraParams { authenticationRequestExtraParams[key] = aws.StringValue(value) @@ -928,8 +1006,6 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - d.Partial(true) - if d.HasChange("priority") { params := &elbv2.SetRulePrioritiesInput{ RulePriorities: []*elbv2.RulePriorityPair{ @@ -944,8 +1020,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e if err != nil { return err } - - d.SetPartial("priority") } requestUpdate := false @@ -969,10 +1043,12 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e } switch actionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(actionMap["target_group_arn"].(string)) + case elbv2.ActionTypeEnumForward: + if err := lbListenerRuleActionForward(actionMap, action); err != nil { + return err + } - case "redirect": + case elbv2.ActionTypeEnumRedirect: redirectList := actionMap["redirect"].([]interface{}) if len(redirectList) == 1 { @@ -990,7 +1066,7 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") } - case "fixed-response": + case elbv2.ActionTypeEnumFixedResponse: fixedResponseList := actionMap["fixed_response"].([]interface{}) if len(fixedResponseList) == 1 { @@ -1005,7 +1081,7 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } - case "authenticate-cognito": + case elbv2.ActionTypeEnumAuthenticateCognito: authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) if len(authenticateCognitoList) == 1 { @@ -1039,7 +1115,7 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") } - case "authenticate-oidc": + case elbv2.ActionTypeEnumAuthenticateOidc: authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) if len(authenticateOidcList) == 1 { @@ -1080,7 +1156,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e params.Actions[i] = action } requestUpdate = true - d.SetPartial("action") } if d.HasChange("condition") { @@ -1090,7 +1165,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e return err } requestUpdate = true - d.SetPartial("condition") } if requestUpdate { @@ -1104,8 +1178,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e } } - d.Partial(false) - return resourceAwsLbListenerRuleRead(d, meta) } @@ -1304,3 +1376,40 @@ func lbListenerRuleConditions(conditions []interface{}) ([]*elbv2.RuleCondition, } return elbConditions, nil } + +func lbListenerRuleActionForward(actionMap map[string]interface{}, action *elbv2.Action) error { + forwardList := actionMap["forward"].([]interface{}) + targetGroupArn := actionMap["target_group_arn"].(string) + + if targetGroupArn != "" { + action.TargetGroupArn = aws.String(targetGroupArn) + } else if len(forwardList) == 1 { + forwardMap := forwardList[0].(map[string]interface{}) + targetGroupsInput := forwardMap["target_group"].(*schema.Set).List() + weightedTargetGroups := make([]*elbv2.TargetGroupTuple, len(targetGroupsInput)) + + for i, input := range targetGroupsInput { + weightedTargetGroup := input.(map[string]interface{}) + weightedTargetGroups[i] = &elbv2.TargetGroupTuple{ + TargetGroupArn: aws.String(weightedTargetGroup["arn"].(string)), + Weight: aws.Int64(int64(weightedTargetGroup["weight"].(int))), + } + } + + action.ForwardConfig = &elbv2.ForwardActionConfig{ + TargetGroups: weightedTargetGroups, + } + + stickinessInput := forwardMap["stickiness"].([]interface{}) + if len(stickinessInput) != 0 { + stickyInputMap := stickinessInput[0].(map[string]interface{}) + action.ForwardConfig.TargetGroupStickinessConfig = &elbv2.TargetGroupStickinessConfig{ + Enabled: aws.Bool(stickyInputMap["enabled"].(bool)), + DurationSeconds: aws.Int64(int64(stickyInputMap["duration"].(int))), + } + } + } else { + return errors.New("for actions of type 'forward', you must specify a 'forward' block or 'target_group_arn'") + } + return nil +} diff --git a/aws/resource_aws_lb_listener_rule_test.go b/aws/resource_aws_lb_listener_rule_test.go index f0d5dc0e52b..f575a138c22 100644 --- a/aws/resource_aws_lb_listener_rule_test.go +++ b/aws/resource_aws_lb_listener_rule_test.go @@ -56,40 +56,123 @@ func TestLBListenerARNFromRuleARN(t *testing.T) { func TestAccAWSLBListenerRule_basic(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) - targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" + targetGroupResourceName := "aws_lb_target_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_basic(lbName, targetGroupName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.type", "forward"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "action.0.target_group_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.authenticate_cognito.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.authenticate_oidc.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.447032695.values.#", "1"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "condition.447032695.values.0"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "forward"), + resource.TestCheckResourceAttrPair(resourceName, "action.0.target_group_arn", targetGroupResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.values.0", "/static/*"), + ), + }, + }, + }) +} + +func TestAccAWSLBListenerRule_forwardWeighted(t *testing.T) { + var conf elbv2.Rule + lbName := fmt.Sprintf("testrule-weighted-%s", acctest.RandString(13)) + targetGroupName1 := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) + targetGroupName2 := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) + + resourceName := "aws_lb_listener_rule.weighted" + frontEndListenerResourceName := "aws_lb_listener.front_end" + targetGroup1ResourceName := "aws_lb_target_group.test1" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerRuleConfig_forwardWeighted(lbName, targetGroupName1, targetGroupName2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "forward"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.0.target_group.#", "2"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.0.stickiness.0.enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.0.stickiness.0.duration", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + ), + }, + { + Config: testAccAWSLBListenerRuleConfig_changeForwardWeightedStickiness(lbName, targetGroupName1, targetGroupName2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "forward"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.0.target_group.#", "2"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.0.stickiness.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "action.0.forward.0.stickiness.0.duration", "3600"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + ), + }, + { + Config: testAccAWSLBListenerRuleConfig_changeForwardWeightedToBasic(lbName, targetGroupName1, targetGroupName2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "forward"), + resource.TestCheckResourceAttrPair(resourceName, "action.0.target_group_arn", targetGroup1ResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), ), }, }, @@ -98,40 +181,44 @@ func TestAccAWSLBListenerRule_basic(t *testing.T) { func TestAccAWSLBListenerRuleBackwardsCompatibility(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) - targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) + + resourceName := "aws_alb_listener_rule.static" + frontEndListenerResourceName := "aws_alb_listener.front_end" + targetGroupResourceName := "aws_alb_target_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_alb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfigBackwardsCompatibility(lbName, targetGroupName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_alb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.type", "forward"), - resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "action.0.target_group_arn"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.redirect.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.fixed_response.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.authenticate_cognito.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.authenticate_oidc.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.447032695.values.#", "1"), - resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "condition.447032695.values.0"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "forward"), + resource.TestCheckResourceAttrPair(resourceName, "action.0.target_group_arn", targetGroupResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.447032695.values.0", "/static/*"), ), }, }, @@ -140,36 +227,38 @@ func TestAccAWSLBListenerRuleBackwardsCompatibility(t *testing.T) { func TestAccAWSLBListenerRule_redirect(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-redirect-%s", acctest.RandStringFromCharSet(14, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-redirect-%s", acctest.RandString(14)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_redirect(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.type", "redirect"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.target_group_arn", ""), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.0.host", "#{host}"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.0.path", "/#{path}"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.0.port", "443"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.0.protocol", "HTTPS"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.0.query", "#{query}"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.0.status_code", "HTTP_301"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.authenticate_cognito.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.authenticate_oidc.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "redirect"), + resource.TestCheckResourceAttr(resourceName, "action.0.target_group_arn", ""), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.0.host", "#{host}"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.0.path", "/#{path}"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.0.port", "443"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.0.protocol", "HTTPS"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.0.query", "#{query}"), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.0.status_code", "HTTP_301"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), ), }, }, @@ -178,33 +267,35 @@ func TestAccAWSLBListenerRule_redirect(t *testing.T) { func TestAccAWSLBListenerRule_fixedResponse(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-fixedresponse-%s", acctest.RandStringFromCharSet(9, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-fixedresponse-%s", acctest.RandString(9)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_fixedResponse(lbName, "Fixed response content"), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.type", "fixed-response"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.target_group_arn", ""), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.0.content_type", "text/plain"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.0.message_body", "Fixed response content"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.0.status_code", "200"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.authenticate_cognito.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.authenticate_oidc.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "fixed-response"), + resource.TestCheckResourceAttr(resourceName, "action.0.target_group_arn", ""), + resource.TestCheckResourceAttr(resourceName, "action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.#", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.0.content_type", "text/plain"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.0.message_body", "Fixed response content"), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.0.status_code", "200"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.#", "0"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), ), }, }, @@ -214,26 +305,27 @@ func TestAccAWSLBListenerRule_fixedResponse(t *testing.T) { // Updating Action breaks Condition change logic GH-11323 and GH-11362 func TestAccAWSLBListenerRule_updateFixedResponse(t *testing.T) { var rule elbv2.Rule - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + + resourceName := "aws_lb_listener_rule.static" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_fixedResponse(lbName, "Fixed Response 1"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &rule), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.0.message_body", "Fixed Response 1"), + testAccCheckAWSLBListenerRuleExists(resourceName, &rule), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.0.message_body", "Fixed Response 1"), ), }, { Config: testAccAWSLBListenerRuleConfig_fixedResponse(lbName, "Fixed Response 2"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &rule), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.fixed_response.0.message_body", "Fixed Response 2"), + testAccCheckAWSLBListenerRuleExists(resourceName, &rule), + resource.TestCheckResourceAttr(resourceName, "action.0.fixed_response.0.message_body", "Fixed Response 2"), ), }, }, @@ -242,27 +334,28 @@ func TestAccAWSLBListenerRule_updateFixedResponse(t *testing.T) { func TestAccAWSLBListenerRule_updateRulePriority(t *testing.T) { var rule elbv2.Rule - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) - targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) + + resourceName := "aws_lb_listener_rule.static" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_basic(lbName, targetGroupName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &rule), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), + testAccCheckAWSLBListenerRuleExists(resourceName, &rule), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), ), }, { Config: testAccAWSLBListenerRuleConfig_updateRulePriority(lbName, targetGroupName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &rule), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "101"), + testAccCheckAWSLBListenerRuleExists(resourceName, &rule), + resource.TestCheckResourceAttr(resourceName, "priority", "101"), ), }, }, @@ -271,25 +364,26 @@ func TestAccAWSLBListenerRule_updateRulePriority(t *testing.T) { func TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew(t *testing.T) { var before, after elbv2.Rule - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) - targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) + + resourceName := "aws_lb_listener_rule.static" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_basic(lbName, targetGroupName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &before), + testAccCheckAWSLBListenerRuleExists(resourceName, &before), ), }, { Config: testAccAWSLBListenerRuleConfig_changeRuleArn(lbName, targetGroupName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &after), + testAccCheckAWSLBListenerRuleExists(resourceName, &after), testAccCheckAWSLbListenerRuleRecreated(t, &before, &after), ), }, @@ -298,8 +392,8 @@ func TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew(t *testing.T) { } func TestAccAWSLBListenerRule_multipleConditionThrowsError(t *testing.T) { - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) - targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -316,14 +410,13 @@ func TestAccAWSLBListenerRule_multipleConditionThrowsError(t *testing.T) { func TestAccAWSLBListenerRule_priority(t *testing.T) { var rule elbv2.Rule - lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) - targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandString(13)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandString(10)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.first", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_priorityFirst(lbName, targetGroupName), @@ -392,33 +485,39 @@ func TestAccAWSLBListenerRule_cognito(t *testing.T) { var conf elbv2.Rule key := tlsRsaPrivateKeyPem(2048) certificate := tlsRsaX509SelfSignedCertificatePem(key, "example.com") - rName := acctest.RandomWithPrefix("tf-acc-test") + lbName := acctest.RandomWithPrefix("tf-acc-test") + + resourceName := "aws_lb_listener_rule.cognito" + frontEndListenerResourceName := "aws_lb_listener.front_end" + targetGroupResourceName := "aws_lb_target_group.test" + cognitoPoolResourceName := "aws_cognito_user_pool.test" + cognitoPoolClientResourceName := "aws_cognito_user_pool_client.test" + cognitoPoolDomainResourceName := "aws_cognito_user_pool_domain.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.cognito", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLBListenerRuleConfig_cognito(rName, key, certificate), + Config: testAccAWSLBListenerRuleConfig_cognito(lbName, key, certificate), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.cognito", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.type", "authenticate-cognito"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_client_id"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_domain"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.authentication_request_extra_params.%", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.authentication_request_extra_params.param", "test"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.order", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.type", "forward"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.1.target_group_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "condition.#", "1"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "authenticate-cognito"), + resource.TestCheckResourceAttrPair(resourceName, "action.0.authenticate_cognito.0.user_pool_arn", cognitoPoolResourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "action.0.authenticate_cognito.0.user_pool_client_id", cognitoPoolClientResourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "action.0.authenticate_cognito.0.user_pool_domain", cognitoPoolDomainResourceName, "domain"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.0.authentication_request_extra_params.%", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_cognito.0.authentication_request_extra_params.param", "test"), + resource.TestCheckResourceAttr(resourceName, "action.1.order", "2"), + resource.TestCheckResourceAttr(resourceName, "action.1.type", "forward"), + resource.TestCheckResourceAttrPair(resourceName, "action.1.target_group_arn", targetGroupResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), ), }, }, @@ -429,36 +528,39 @@ func TestAccAWSLBListenerRule_oidc(t *testing.T) { var conf elbv2.Rule key := tlsRsaPrivateKeyPem(2048) certificate := tlsRsaX509SelfSignedCertificatePem(key, "example.com") - rName := acctest.RandomWithPrefix("tf-acc-test") + lbName := acctest.RandomWithPrefix("tf-acc-test") + + resourceName := "aws_lb_listener_rule.oidc" + frontEndListenerResourceName := "aws_lb_listener.front_end" + targetGroupResourceName := "aws_lb_target_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.oidc", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLBListenerRuleConfig_oidc(rName, key, certificate), + Config: testAccAWSLBListenerRuleConfig_oidc(lbName, key, certificate), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.oidc", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.type", "authenticate-oidc"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authorization_endpoint", "https://example.com/authorization_endpoint"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.client_id", "s6BhdRkqt3"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.client_secret", "7Fjfp0ZBr1KtDRbnfVdmIw"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.issuer", "https://example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.token_endpoint", "https://example.com/token_endpoint"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.user_info_endpoint", "https://example.com/user_info_endpoint"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authentication_request_extra_params.%", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authentication_request_extra_params.param", "test"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.order", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.type", "forward"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "action.1.target_group_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "condition.#", "1"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.type", "authenticate-oidc"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.authorization_endpoint", "https://example.com/authorization_endpoint"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.client_id", "s6BhdRkqt3"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.client_secret", "7Fjfp0ZBr1KtDRbnfVdmIw"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.issuer", "https://example.com"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.token_endpoint", "https://example.com/token_endpoint"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.user_info_endpoint", "https://example.com/user_info_endpoint"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.authentication_request_extra_params.%", "1"), + resource.TestCheckResourceAttr(resourceName, "action.0.authenticate_oidc.0.authentication_request_extra_params.param", "test"), + resource.TestCheckResourceAttr(resourceName, "action.1.order", "2"), + resource.TestCheckResourceAttr(resourceName, "action.1.type", "forward"), + resource.TestCheckResourceAttrPair(resourceName, "action.1.target_group_arn", targetGroupResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), ), }, }, @@ -570,36 +672,39 @@ func TestAccAWSLBListenerRule_conditionAttributesCount(t *testing.T) { func TestAccAWSLBListenerRule_conditionHostHeader(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-hostHeader-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-hostHeader-%s", acctest.RandString(12)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionHostHeader(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.field", "host-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.host_header.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.host_header.0.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.host_header.0.values.3069857465", "example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.host_header.0.values.785793723", "www.example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.values.0", "example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1089289132.values.1", "www.example.com"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.field", "host-header"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.host_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.host_header.0.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.host_header.0.values.3069857465", "example.com"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.host_header.0.values.785793723", "www.example.com"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.values.0", "example.com"), + resource.TestCheckResourceAttr(resourceName, "condition.1089289132.values.1", "www.example.com"), ), }, }, @@ -608,34 +713,37 @@ func TestAccAWSLBListenerRule_conditionHostHeader(t *testing.T) { func TestAccAWSLBListenerRule_conditionHostHeader_deprecated(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-hostHeader-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-hostHeader-%s", acctest.RandString(12)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionHostHeader_deprecated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.field", "host-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.0.values.3069857465", "example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.values.0", "example.com"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.field", "host-header"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.0.values.3069857465", "example.com"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.values.0", "example.com"), ), }, }, @@ -644,46 +752,49 @@ func TestAccAWSLBListenerRule_conditionHostHeader_deprecated(t *testing.T) { func TestAccAWSLBListenerRule_conditionHttpHeader(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-httpHeader-%s", acctest.RandStringFromCharSet(12, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-httpHeader-%s", acctest.RandString(12)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionHttpHeader(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.field", "http-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.http_header.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.http_header.0.http_header_name", "X-Forwarded-For"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.http_header.0.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.http_header.0.values.2895841407", "10.0.0.*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.http_header.0.values.35666611", "192.168.1.*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.168627567.values.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.field", "http-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.http_header.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.http_header.0.http_header_name", "Zz9~|_^.-+*'&%$#!0aA"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.http_header.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.http_header.0.values.1801271041", "RFC7230 Validity"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4090220723.values.#", "0"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.field", "http-header"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.http_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.http_header.0.http_header_name", "X-Forwarded-For"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.http_header.0.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.http_header.0.values.2895841407", "10.0.0.*"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.http_header.0.values.35666611", "192.168.1.*"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.168627567.values.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.field", "http-header"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.http_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.http_header.0.http_header_name", "Zz9~|_^.-+*'&%$#!0aA"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.http_header.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.http_header.0.values.1801271041", "RFC7230 Validity"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4090220723.values.#", "0"), ), }, }, @@ -706,34 +817,37 @@ func TestAccAWSLBListenerRule_conditionHttpHeader_invalid(t *testing.T) { func TestAccAWSLBListenerRule_conditionHttpRequestMethod(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-httpRequest-%s", acctest.RandStringFromCharSet(11, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-httpRequest-%s", acctest.RandString(11)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionHttpRequestMethod(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.field", "http-request-method"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.http_request_method.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.http_request_method.0.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.http_request_method.0.values.1805413626", "GET"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.http_request_method.0.values.1814004025", "POST"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2223521492.values.#", "0"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.field", "http-request-method"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.http_request_method.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.http_request_method.0.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.http_request_method.0.values.1805413626", "GET"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.http_request_method.0.values.1814004025", "POST"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2223521492.values.#", "0"), ), }, }, @@ -742,36 +856,39 @@ func TestAccAWSLBListenerRule_conditionHttpRequestMethod(t *testing.T) { func TestAccAWSLBListenerRule_conditionPathPattern(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-pathPattern-%s", acctest.RandStringFromCharSet(11, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-pathPattern-%s", acctest.RandString(11)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionPathPattern(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.path_pattern.0.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.path_pattern.0.values.1764929539", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.values.0", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.values.1", "/public/*"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.path_pattern.0.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.path_pattern.0.values.1764929539", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.values.0", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.values.1", "/public/*"), ), }, }, @@ -780,34 +897,37 @@ func TestAccAWSLBListenerRule_conditionPathPattern(t *testing.T) { func TestAccAWSLBListenerRule_conditionPathPattern_deprecated(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-pathPattern-%s", acctest.RandStringFromCharSet(11, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-pathPattern-%s", acctest.RandString(11)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionPathPattern_deprecated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.0", "/public/*"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.0", "/public/*"), ), }, }, @@ -816,55 +936,58 @@ func TestAccAWSLBListenerRule_conditionPathPattern_deprecated(t *testing.T) { func TestAccAWSLBListenerRule_conditionUpdatePathPattern_deprecated(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-pathPattern-%s", acctest.RandStringFromCharSet(11, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-pathPattern-%s", acctest.RandString(11)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionPathPattern_deprecated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.0", "/public/*"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.0", "/public/*"), ), }, { Config: testAccAWSLBListenerRuleConfig_conditionPathPattern_deprecatedUpdated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.path_pattern.0.values.1764929539", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.values.0", "/cgi-bin/*"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.path_pattern.0.values.1764929539", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.values.0", "/cgi-bin/*"), ), }, { Config: testAccAWSLBListenerRuleConfig_conditionPathPattern_migrated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.path_pattern.0.values.1764929539", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.values.0", "/cgi-bin/*"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.path_pattern.0.values.1764929539", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.values.0", "/cgi-bin/*"), ), }, { Config: testAccAWSLBListenerRuleConfig_conditionPathPattern(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.path_pattern.0.values.1764929539", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.values.0", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2177156802.values.1", "/public/*"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.path_pattern.0.values.1764929539", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.values.0", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2177156802.values.1", "/public/*"), ), }, }, @@ -873,47 +996,50 @@ func TestAccAWSLBListenerRule_conditionUpdatePathPattern_deprecated(t *testing.T func TestAccAWSLBListenerRule_conditionQueryString(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-queryString-%s", acctest.RandStringFromCharSet(11, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-queryString-%s", acctest.RandString(11)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionQueryString(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.field", "query-string"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.query_string.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.query_string.167408634.key", ""), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.query_string.167408634.value", "surprise"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.query_string.4042884147.key", ""), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.query_string.4042884147.value", "blank"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.1697057359.values.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.field", "query-string"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.query_string.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.query_string.1123504603.key", "foo"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.query_string.1123504603.value", "baz"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.query_string.1278007785.key", "foo"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.query_string.1278007785.value", "bar"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.863121889.values.#", "0"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.field", "query-string"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.query_string.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.query_string.167408634.key", ""), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.query_string.167408634.value", "surprise"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.query_string.4042884147.key", ""), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.query_string.4042884147.value", "blank"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.1697057359.values.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.field", "query-string"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.query_string.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.query_string.1123504603.key", "foo"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.query_string.1123504603.value", "baz"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.query_string.1278007785.key", "foo"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.query_string.1278007785.value", "bar"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.863121889.values.#", "0"), ), }, }, @@ -922,34 +1048,37 @@ func TestAccAWSLBListenerRule_conditionQueryString(t *testing.T) { func TestAccAWSLBListenerRule_conditionSourceIp(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-sourceIp-%s", acctest.RandStringFromCharSet(14, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-sourceIp-%s", acctest.RandString(14)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionSourceIp(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.source_ip.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.source_ip.0.values.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.source_ip.0.values.1567875353", "dead:cafe::/64"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.source_ip.0.values.3901788224", "192.168.0.0/16"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3009583077.values.#", "0"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.source_ip.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.source_ip.0.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.source_ip.0.values.1567875353", "dead:cafe::/64"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.source_ip.0.values.3901788224", "192.168.0.0/16"), + resource.TestCheckResourceAttr(resourceName, "condition.3009583077.values.#", "0"), ), }, }, @@ -958,66 +1087,69 @@ func TestAccAWSLBListenerRule_conditionSourceIp(t *testing.T) { func TestAccAWSLBListenerRule_conditionUpdateMixed(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-mixed-%s", acctest.RandStringFromCharSet(17, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-mixed-%s", acctest.RandString(17)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionMixed(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.0", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.source_ip.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.source_ip.0.values.3901788224", "192.168.0.0/16"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.0", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.source_ip.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.source_ip.0.values.3901788224", "192.168.0.0/16"), ), }, { Config: testAccAWSLBListenerRuleConfig_conditionMixed_updated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.0", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2685063104.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2685063104.source_ip.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2685063104.source_ip.0.values.1567875353", "dead:cafe::/64"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.0", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2685063104.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.2685063104.source_ip.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2685063104.source_ip.0.values.1567875353", "dead:cafe::/64"), ), }, { Config: testAccAWSLBListenerRuleConfig_conditionMixed_updated2(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.path_pattern.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.path_pattern.0.values.1764929539", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.3300407761.values.0", "/cgi-bin/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2685063104.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2685063104.source_ip.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2685063104.source_ip.0.values.1567875353", "dead:cafe::/64"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "2"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.path_pattern.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.path_pattern.0.values.1764929539", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.3300407761.values.0", "/cgi-bin/*"), + resource.TestCheckResourceAttr(resourceName, "condition.2685063104.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.2685063104.source_ip.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2685063104.source_ip.0.values.1567875353", "dead:cafe::/64"), ), }, }, @@ -1026,76 +1158,79 @@ func TestAccAWSLBListenerRule_conditionUpdateMixed(t *testing.T) { func TestAccAWSLBListenerRule_conditionMultiple(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-condMulti-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-condMulti-%s", acctest.RandString(13)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionMultiple(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "5"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.field", "http-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_header.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_header.0.http_header_name", "X-Forwarded-For"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_header.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_header.0.values.35666611", "192.168.1.*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.values.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.source_ip.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.source_ip.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.source_ip.0.values.3901788224", "192.168.0.0/16"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.values.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.field", "http-request-method"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.http_request_method.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.http_request_method.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.http_request_method.0.values.1805413626", "GET"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.values.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.host_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.0", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.field", "host-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.0.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.0.values.3069857465", "example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.http_header.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.http_request_method.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.path_pattern.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.query_string.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.source_ip.#", "0"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.values.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.values.0", "example.com"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "priority", "100"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "5"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.field", "http-header"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_header.0.http_header_name", "X-Forwarded-For"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_header.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_header.0.values.35666611", "192.168.1.*"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.values.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.source_ip.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.source_ip.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.source_ip.0.values.3901788224", "192.168.0.0/16"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.values.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.field", "http-request-method"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.http_request_method.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.http_request_method.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.http_request_method.0.values.1805413626", "GET"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.values.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.host_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.0", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.field", "host-header"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.0.values.3069857465", "example.com"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.http_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.http_request_method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.path_pattern.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.source_ip.#", "0"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.values.0", "example.com"), ), }, }, @@ -1104,58 +1239,61 @@ func TestAccAWSLBListenerRule_conditionMultiple(t *testing.T) { func TestAccAWSLBListenerRule_conditionUpdateMultiple(t *testing.T) { var conf elbv2.Rule - lbName := fmt.Sprintf("testrule-condMulti-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) + lbName := fmt.Sprintf("testrule-condMulti-%s", acctest.RandString(13)) + + resourceName := "aws_lb_listener_rule.static" + frontEndListenerResourceName := "aws_lb_listener.front_end" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_lb_listener_rule.static", - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSLBListenerRuleConfig_conditionMultiple(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "5"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.field", "http-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_header.0.http_header_name", "X-Forwarded-For"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.139999317.http_header.0.values.35666611", "192.168.1.*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2986919393.source_ip.0.values.3901788224", "192.168.0.0/16"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.field", "http-request-method"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.4038921246.http_request_method.0.values.1805413626", "GET"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.837782343.values.0", "/public/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.field", "host-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.host_header.0.values.3069857465", "example.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.887624213.values.0", "example.com"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "5"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.field", "http-header"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_header.0.http_header_name", "X-Forwarded-For"), + resource.TestCheckResourceAttr(resourceName, "condition.139999317.http_header.0.values.35666611", "192.168.1.*"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.2986919393.source_ip.0.values.3901788224", "192.168.0.0/16"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.field", "http-request-method"), + resource.TestCheckResourceAttr(resourceName, "condition.4038921246.http_request_method.0.values.1805413626", "GET"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.path_pattern.0.values.1973895062", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.837782343.values.0", "/public/*"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.field", "host-header"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.host_header.0.values.3069857465", "example.com"), + resource.TestCheckResourceAttr(resourceName, "condition.887624213.values.0", "example.com"), ), }, { Config: testAccAWSLBListenerRuleConfig_conditionMultiple_updated(lbName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.static", &conf), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "arn"), - resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.#", "5"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.451778491.field", "http-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.451778491.http_header.0.http_header_name", "X-Forwarded-For"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.451778491.http_header.0.values.6718698", "192.168.2.*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2188908858.field", "source-ip"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.2188908858.source_ip.0.values.766747311", "192.168.0.0/24"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.736971867.field", "http-request-method"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.736971867.http_request_method.0.values.1814004025", "POST"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.941005625.field", "path-pattern"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.941005625.path_pattern.0.values.188114058", "/public/2/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.941005625.values.0", "/public/2/*"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.923495315.field", "host-header"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.923495315.host_header.0.values.854267206", "foobar.com"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "condition.923495315.values.0", "foobar.com"), + testAccCheckAWSLBListenerRuleExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile(fmt.Sprintf(`listener-rule/app/%s/.+$`, lbName))), + resource.TestCheckResourceAttrPair(resourceName, "listener_arn", frontEndListenerResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "condition.#", "5"), + resource.TestCheckResourceAttr(resourceName, "condition.451778491.field", "http-header"), + resource.TestCheckResourceAttr(resourceName, "condition.451778491.http_header.0.http_header_name", "X-Forwarded-For"), + resource.TestCheckResourceAttr(resourceName, "condition.451778491.http_header.0.values.6718698", "192.168.2.*"), + resource.TestCheckResourceAttr(resourceName, "condition.2188908858.field", "source-ip"), + resource.TestCheckResourceAttr(resourceName, "condition.2188908858.source_ip.0.values.766747311", "192.168.0.0/24"), + resource.TestCheckResourceAttr(resourceName, "condition.736971867.field", "http-request-method"), + resource.TestCheckResourceAttr(resourceName, "condition.736971867.http_request_method.0.values.1814004025", "POST"), + resource.TestCheckResourceAttr(resourceName, "condition.941005625.field", "path-pattern"), + resource.TestCheckResourceAttr(resourceName, "condition.941005625.path_pattern.0.values.188114058", "/public/2/*"), + resource.TestCheckResourceAttr(resourceName, "condition.941005625.values.0", "/public/2/*"), + resource.TestCheckResourceAttr(resourceName, "condition.923495315.field", "host-header"), + resource.TestCheckResourceAttr(resourceName, "condition.923495315.host_header.0.values.854267206", "foobar.com"), + resource.TestCheckResourceAttr(resourceName, "condition.923495315.values.0", "foobar.com"), ), }, }, @@ -1326,7 +1464,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1439,7 +1584,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1487,6 +1639,442 @@ resource "aws_security_group" "alb_test" { `, lbName, targetGroupName) } +func testAccAWSLBListenerRuleConfig_forwardWeighted(lbName, targetGroupName1 string, targetGroupName2 string) string { + return fmt.Sprintf(` +resource "aws_lb_listener_rule" "weighted" { + listener_arn = "${aws_lb_listener.front_end.arn}" + priority = 100 + + action { + type = "forward" + forward { + target_group { + arn = "${aws_lb_target_group.test1.arn}" + weight = 1 + } + target_group { + arn = "${aws_lb_target_group.test2.arn}" + weight = 1 + } + } + } + + condition { + field = "path-pattern" + values = ["/weighted/*"] + } +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTP" + port = "80" + + default_action { + target_group_arn = "${aws_lb_target_group.test1.arn}" + type = "forward" + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +resource "aws_lb_target_group" "test1" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_lb_target_group" "test2" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-listener-rule-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-listener-rule-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, targetGroupName1, targetGroupName2) +} + +func testAccAWSLBListenerRuleConfig_changeForwardWeightedStickiness(lbName, targetGroupName1 string, targetGroupName2 string) string { + return fmt.Sprintf(` +resource "aws_lb_listener_rule" "weighted" { + listener_arn = "${aws_lb_listener.front_end.arn}" + priority = 100 + + action { + type = "forward" + forward { + target_group { + arn = "${aws_lb_target_group.test1.arn}" + weight = 1 + } + target_group { + arn = "${aws_lb_target_group.test2.arn}" + weight = 1 + } + stickiness { + enabled = true + duration = 3600 + } + } + } + + condition { + field = "path-pattern" + values = ["/weighted/*"] + } +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTP" + port = "80" + + default_action { + target_group_arn = "${aws_lb_target_group.test1.arn}" + type = "forward" + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +resource "aws_lb_target_group" "test1" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_lb_target_group" "test2" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-listener-rule-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-listener-rule-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, targetGroupName1, targetGroupName2) +} + +func testAccAWSLBListenerRuleConfig_changeForwardWeightedToBasic(lbName, targetGroupName1 string, targetGroupName2 string) string { + return fmt.Sprintf(` +resource "aws_lb_listener_rule" "weighted" { + listener_arn = "${aws_lb_listener.front_end.arn}" + priority = 100 + + action { + type = "forward" + target_group_arn = "${aws_lb_target_group.test1.arn}" + } + + condition { + field = "path-pattern" + values = ["/weighted/*"] + } +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTP" + port = "80" + + default_action { + target_group_arn = "${aws_lb_target_group.test1.arn}" + type = "forward" + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +resource "aws_lb_target_group" "test1" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_lb_target_group" "test2" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-listener-rule-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-listener-rule-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, targetGroupName1, targetGroupName2) +} + func testAccAWSLBListenerRuleConfigBackwardsCompatibility(lbName, targetGroupName string) string { return fmt.Sprintf(` resource "aws_alb_listener_rule" "static" { @@ -1552,7 +2140,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1657,7 +2252,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1762,7 +2364,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1875,7 +2484,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1999,7 +2615,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2097,7 +2720,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2381,7 +3011,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2540,7 +3177,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2594,7 +3238,14 @@ variable "rName" { default = %[1]q } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_lb_listener_rule" "test" { listener_arn = "${aws_lb_listener.test.arn}" @@ -2879,7 +3530,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" diff --git a/aws/resource_aws_lb_listener_test.go b/aws/resource_aws_lb_listener_test.go index 2bc2ca19c4d..1d17b6c0be6 100644 --- a/aws/resource_aws_lb_listener_test.go +++ b/aws/resource_aws_lb_listener_test.go @@ -3,6 +3,7 @@ package aws import ( "errors" "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -43,6 +44,79 @@ func TestAccAWSLBListener_basic(t *testing.T) { }) } +func TestAccAWSLBListener_forwardWeighted(t *testing.T) { + var conf elbv2.Listener + resourceName := "aws_lb_listener.weighted" + lbName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) + targetGroupName1 := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + targetGroupName2 := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBListenerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerConfig_forwardWeighted(lbName, targetGroupName1, targetGroupName2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "load_balancer_arn", "elasticloadbalancing", regexp.MustCompile("loadbalancer/.+$")), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile("listener/.+$")), + resource.TestCheckResourceAttr(resourceName, "protocol", "HTTP"), + resource.TestCheckResourceAttr(resourceName, "port", "80"), + resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "forward"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.#", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.0.target_group.#", "2"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.0.stickiness.0.enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.0.stickiness.0.duration", "0"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.fixed_response.#", "0"), + ), + }, + { + Config: testAccAWSLBListenerConfig_changeForwardWeightedStickiness(lbName, targetGroupName1, targetGroupName2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "load_balancer_arn", "elasticloadbalancing", regexp.MustCompile("loadbalancer/.+$")), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile("listener/.+$")), + resource.TestCheckResourceAttr(resourceName, "protocol", "HTTP"), + resource.TestCheckResourceAttr(resourceName, "port", "80"), + resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "forward"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.#", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.0.target_group.#", "2"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.0.stickiness.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.forward.0.stickiness.0.duration", "3600"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.fixed_response.#", "0"), + ), + }, + { + Config: testAccAWSLBListenerConfig_changeForwardWeightedToBasic(lbName, targetGroupName1, targetGroupName2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerExists(resourceName, &conf), + testAccMatchResourceAttrRegionalARN(resourceName, "load_balancer_arn", "elasticloadbalancing", regexp.MustCompile("loadbalancer/.+$")), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "elasticloadbalancing", regexp.MustCompile("listener/.+$")), + resource.TestCheckResourceAttr(resourceName, "protocol", "HTTP"), + resource.TestCheckResourceAttr(resourceName, "port", "80"), + resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "forward"), + resource.TestCheckResourceAttrSet(resourceName, "default_action.0.target_group_arn"), + testAccMatchResourceAttrRegionalARN(resourceName, "default_action.0.target_group_arn", "elasticloadbalancing", regexp.MustCompile("targetgroup/.+$")), + resource.TestCheckResourceAttrPair(resourceName, "default_action.0.target_group_arn", "aws_lb_target_group.test1", "arn"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.redirect.#", "0"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.fixed_response.#", "0"), + ), + }, + }, + }) +} + func TestAccAWSLBListener_basicUdp(t *testing.T) { var conf elbv2.Listener lbName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) @@ -500,7 +574,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -548,6 +629,397 @@ resource "aws_security_group" "alb_test" { `, lbName, targetGroupName) } +func testAccAWSLBListenerConfig_forwardWeighted(lbName, targetGroupName1 string, targetGroupName2 string) string { + return fmt.Sprintf(` +resource "aws_lb_listener" "weighted" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTP" + port = "80" + + default_action { + type = "forward" + forward { + target_group { + arn = "${aws_lb_target_group.test1.arn}" + weight = 1 + } + target_group { + arn = "${aws_lb_target_group.test2.arn}" + weight = 1 + } + } + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +resource "aws_lb_target_group" "test1" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_lb_target_group" "test2" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-listener-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-listener-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, targetGroupName1, targetGroupName2) +} + +func testAccAWSLBListenerConfig_changeForwardWeightedStickiness(lbName, targetGroupName1 string, targetGroupName2 string) string { + return fmt.Sprintf(` +resource "aws_lb_listener" "weighted" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTP" + port = "80" + + default_action { + type = "forward" + forward { + target_group { + arn = "${aws_lb_target_group.test1.arn}" + weight = 1 + } + target_group { + arn = "${aws_lb_target_group.test2.arn}" + weight = 1 + } + stickiness { + enabled = true + duration = 3600 + } + } + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +resource "aws_lb_target_group" "test1" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_lb_target_group" "test2" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-listener-rule-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-listener-rule-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, targetGroupName1, targetGroupName2) +} + +func testAccAWSLBListenerConfig_changeForwardWeightedToBasic(lbName, targetGroupName1 string, targetGroupName2 string) string { + return fmt.Sprintf(` +resource "aws_lb_listener" "weighted" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTP" + port = "80" + + default_action { + target_group_arn = "${aws_lb_target_group.test1.arn}" + type = "forward" + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +resource "aws_lb_target_group" "test1" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_lb_target_group" "test2" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-listener-rule-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-listener-rule-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, targetGroupName1, targetGroupName2) +} + func testAccAWSLBListenerConfig_basicUdp(lbName, targetGroupName string) string { return fmt.Sprintf(` resource "aws_lb_listener" "front_end" { @@ -592,7 +1064,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -674,7 +1153,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -776,7 +1262,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -840,7 +1333,14 @@ resource "aws_iam_server_certificate" "test_cert" { func testAccAWSLBListenerConfig_Protocol_Tls(rName, key, certificate string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_acm_certificate" "test" { certificate_body = "%[2]s" @@ -949,7 +1449,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1034,7 +1541,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1115,7 +1629,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" @@ -1242,7 +1763,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" @@ -1324,7 +1852,14 @@ variable "rName" { default = %[1]q } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_lb_listener" "test" { load_balancer_arn = "${aws_lb.test.id}" diff --git a/aws/resource_aws_lb_ssl_negotiation_policy.go b/aws/resource_aws_lb_ssl_negotiation_policy.go index 17e6af10534..842080af6fb 100644 --- a/aws/resource_aws_lb_ssl_negotiation_policy.go +++ b/aws/resource_aws_lb_ssl_negotiation_policy.go @@ -139,15 +139,25 @@ func resourceAwsLBSSLNegotiationPolicyRead(d *schema.ResourceData, meta interfac return fmt.Errorf("Unable to find policy %#v", getResp.PolicyDescriptions) } - // We can get away with this because there's only one policy returned - policyDesc := getResp.PolicyDescriptions[0] - attributes := flattenPolicyAttributes(policyDesc.PolicyAttributeDescriptions) - d.Set("attributes", attributes) - d.Set("name", policyName) d.Set("load_balancer", lbName) d.Set("lb_port", lbPort) + // TODO: fix attribute + // This was previously erroneously setting "attributes", however this cannot + // be changed without introducing problematic side effects. The ELB service + // automatically expands the results to include all SSL attributes + // (unordered, so we'd need to switch to TypeSet anyways), which we would be + // quite impractical to force practitioners to write out and potentially + // update each time the API updates since there is nearly 100 attributes. + + // We can get away with this because there's only one policy returned + // policyDesc := getResp.PolicyDescriptions[0] + // attributes := flattenPolicyAttributes(policyDesc.PolicyAttributeDescriptions) + // if err := d.Set("attribute", attributes); err != nil { + // return fmt.Errorf("error setting attribute: %s", err) + // } + return nil } diff --git a/aws/resource_aws_lb_ssl_negotiation_policy_test.go b/aws/resource_aws_lb_ssl_negotiation_policy_test.go index ca8079aa07f..31f4b658e22 100644 --- a/aws/resource_aws_lb_ssl_negotiation_policy_test.go +++ b/aws/resource_aws_lb_ssl_negotiation_policy_test.go @@ -186,6 +186,11 @@ func testAccSslNegotiationPolicyConfig(rName, key, certificate string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_iam_server_certificate" "test" { diff --git a/aws/resource_aws_lb_target_group.go b/aws/resource_aws_lb_target_group.go index b26c8e7ea5c..31c71835e85 100644 --- a/aws/resource_aws_lb_target_group.go +++ b/aws/resource_aws_lb_target_group.go @@ -7,6 +7,7 @@ import ( "regexp" "strconv" "strings" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elbv2" @@ -495,9 +496,29 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er func resourceAwsLbTargetGroupDelete(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - _, err := elbconn.DeleteTargetGroup(&elbv2.DeleteTargetGroupInput{ + input := &elbv2.DeleteTargetGroupInput{ TargetGroupArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Target Group (%s): %s", d.Id(), input) + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + _, err := elbconn.DeleteTargetGroup(input) + + if isAWSErr(err, "ResourceInUse", "is currently in use by a listener or a rule") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil }) + + if isResourceTimeoutError(err) { + _, err = elbconn.DeleteTargetGroup(input) + } + if err != nil { return fmt.Errorf("Error deleting Target Group: %s", err) } @@ -567,6 +588,7 @@ func lbTargetGroupSuffixFromARN(arn *string) string { // flattenAwsLbTargetGroupResource takes a *elbv2.TargetGroup and populates all respective resource fields. func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, targetGroup *elbv2.TargetGroup) error { elbconn := meta.(*AWSClient).elbv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig d.Set("arn", targetGroup.TargetGroupArn) d.Set("arn_suffix", lbTargetGroupSuffixFromARN(targetGroup.TargetGroupArn)) @@ -656,7 +678,7 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t return fmt.Errorf("error listing tags for LB Target Group (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -755,16 +777,24 @@ func resourceAwsLbTargetGroupCustomizeDiff(diff *schema.ResourceDiff, v interfac if protocol == elbv2.ProtocolEnumTcp { if diff.HasChange("health_check.0.interval") { - old, new := diff.GetChange("health_check.0.interval") - return fmt.Errorf("Health check interval cannot be updated from %d to %d for TCP based Target Group %s,"+ - " use 'terraform taint' to recreate the resource if you wish", - old, new, diff.Id()) + if err := diff.ForceNew("health_check.0.interval"); err != nil { + return err + } + } + // The health_check configuration block protocol argument has Default: HTTP, however the block + // itself is Computed: true. When not configured, a TLS (Network LB) Target Group will default + // to health check protocol TLS. We do not want to trigger recreation in this scenario. + // ResourceDiff will show 0 changed keys for the configuration block, which we can use to ensure + // there was an actual change to trigger the ForceNew. + if diff.HasChange("health_check.0.protocol") && len(diff.GetChangedKeysPrefix("health_check.0")) != 0 { + if err := diff.ForceNew("health_check.0.protocol"); err != nil { + return err + } } if diff.HasChange("health_check.0.timeout") { - old, new := diff.GetChange("health_check.0.timeout") - return fmt.Errorf("Health check timeout cannot be updated from %d to %d for TCP based Target Group %s,"+ - " use 'terraform taint' to recreate the resource if you wish", - old, new, diff.Id()) + if err := diff.ForceNew("health_check.0.timeout"); err != nil { + return err + } } } return nil diff --git a/aws/resource_aws_lb_target_group_attachment_test.go b/aws/resource_aws_lb_target_group_attachment_test.go index 9d0bb230591..4a6ffa861e7 100644 --- a/aws/resource_aws_lb_target_group_attachment_test.go +++ b/aws/resource_aws_lb_target_group_attachment_test.go @@ -243,6 +243,11 @@ data "aws_availability_zones" "available" { # t2.micro instance type is not available in these Availability Zones blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_ami" "amzn-ami-minimal-hvm-ebs" { diff --git a/aws/resource_aws_lb_target_group_test.go b/aws/resource_aws_lb_target_group_test.go index d4547c45438..585a9d98ceb 100644 --- a/aws/resource_aws_lb_target_group_test.go +++ b/aws/resource_aws_lb_target_group_test.go @@ -192,7 +192,7 @@ func TestAccAWSLBTargetGroup_withoutHealthcheck(t *testing.T) { } func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { - var confBefore, confAfter elbv2.TargetGroup + var targetGroup1, targetGroup2, targetGroup3 elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resourceName := "aws_lb_target_group.test" @@ -205,7 +205,7 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { { Config: testAccAWSLBTargetGroupConfig_typeTCP(targetGroupName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBTargetGroupExists(resourceName, &confBefore), + testAccCheckAWSLBTargetGroupExists(resourceName, &targetGroup1), resource.TestCheckResourceAttrSet(resourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "name", targetGroupName), resource.TestCheckResourceAttr(resourceName, "port", "8082"), @@ -216,15 +216,15 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "health_check.#", "1"), resource.TestCheckResourceAttr(resourceName, "health_check.0.enabled", "true"), resource.TestCheckResourceAttr(resourceName, "health_check.0.interval", "10"), - testAccCheckAWSLBTargetGroupHealthCheckInterval(&confBefore, 10), + testAccCheckAWSLBTargetGroupHealthCheckInterval(&targetGroup1, 10), resource.TestCheckResourceAttr(resourceName, "health_check.0.port", "traffic-port"), resource.TestCheckResourceAttr(resourceName, "health_check.0.protocol", "TCP"), resource.TestCheckResourceAttr(resourceName, "health_check.0.timeout", "10"), - testAccCheckAWSLBTargetGroupHealthCheckTimeout(&confBefore, 10), + testAccCheckAWSLBTargetGroupHealthCheckTimeout(&targetGroup1, 10), resource.TestCheckResourceAttr(resourceName, "health_check.0.healthy_threshold", "3"), - testAccCheckAWSLBTargetGroupHealthyThreshold(&confBefore, 3), + testAccCheckAWSLBTargetGroupHealthyThreshold(&targetGroup1, 3), resource.TestCheckResourceAttr(resourceName, "health_check.0.unhealthy_threshold", "3"), - testAccCheckAWSLBTargetGroupUnhealthyThreshold(&confBefore, 3), + testAccCheckAWSLBTargetGroupUnhealthyThreshold(&targetGroup1, 3), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.Name", "TestAcc_networkLB_TargetGroup"), ), @@ -236,7 +236,8 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { { Config: testAccAWSLBTargetGroupConfig_typeTCPThresholdUpdated(targetGroupName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSLBTargetGroupExists(resourceName, &confAfter), + testAccCheckAWSLBTargetGroupExists(resourceName, &targetGroup2), + testAccCheckAWSLBTargetGroupNotRecreated(&targetGroup1, &targetGroup2), resource.TestCheckResourceAttrSet(resourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "name", targetGroupName), resource.TestCheckResourceAttr(resourceName, "port", "8082"), @@ -246,24 +247,57 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "health_check.#", "1"), resource.TestCheckResourceAttr(resourceName, "health_check.0.enabled", "true"), resource.TestCheckResourceAttr(resourceName, "health_check.0.interval", "10"), - testAccCheckAWSLBTargetGroupHealthCheckInterval(&confAfter, 10), + testAccCheckAWSLBTargetGroupHealthCheckInterval(&targetGroup2, 10), resource.TestCheckResourceAttr(resourceName, "health_check.0.port", "traffic-port"), resource.TestCheckResourceAttr(resourceName, "health_check.0.protocol", "TCP"), resource.TestCheckResourceAttr(resourceName, "health_check.0.timeout", "10"), - testAccCheckAWSLBTargetGroupHealthCheckTimeout(&confAfter, 10), + testAccCheckAWSLBTargetGroupHealthCheckTimeout(&targetGroup2, 10), resource.TestCheckResourceAttr(resourceName, "health_check.0.healthy_threshold", "5"), - testAccCheckAWSLBTargetGroupHealthyThreshold(&confAfter, 5), + testAccCheckAWSLBTargetGroupHealthyThreshold(&targetGroup2, 5), resource.TestCheckResourceAttr(resourceName, "health_check.0.unhealthy_threshold", "5"), - testAccCheckAWSLBTargetGroupUnhealthyThreshold(&confAfter, 5), + testAccCheckAWSLBTargetGroupUnhealthyThreshold(&targetGroup2, 5), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.Name", "TestAcc_networkLB_TargetGroup"), ), }, { Config: testAccAWSLBTargetGroupConfig_typeTCPIntervalUpdated(targetGroupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBTargetGroupExists(resourceName, &targetGroup3), + testAccCheckAWSLBTargetGroupRecreated(&targetGroup2, &targetGroup3), + ), + }, + }, + }) +} - ExpectNonEmptyPlan: true, - ExpectError: regexp.MustCompile("Health check interval cannot be updated"), +func TestAccAWSLBTargetGroup_Protocol_Tcp_HealthCheck_Protocol(t *testing.T) { + var targetGroup1, targetGroup2 elbv2.TargetGroup + targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + resourceName := "aws_lb_target_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBTargetGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBTargetGroupConfig_typeTCPIntervalUpdated(targetGroupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBTargetGroupExists(resourceName, &targetGroup1), + resource.TestCheckResourceAttr(resourceName, "health_check.#", "1"), + resource.TestCheckResourceAttr(resourceName, "health_check.0.protocol", "TCP"), + ), + }, + { + Config: testAccAWSLBTargetGroupConfig_typeTCP_HTTPHealthCheck(targetGroupName, "/", 5), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBTargetGroupExists(resourceName, &targetGroup2), + testAccCheckAWSLBTargetGroupRecreated(&targetGroup1, &targetGroup2), + resource.TestCheckResourceAttr(resourceName, "health_check.#", "1"), + resource.TestCheckResourceAttr(resourceName, "health_check.0.protocol", "HTTPS"), + ), }, }, }) @@ -1000,6 +1034,26 @@ func testAccCheckAWSLBTargetGroupExists(n string, res *elbv2.TargetGroup) resour } } +func testAccCheckAWSLBTargetGroupNotRecreated(i, j *elbv2.TargetGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(i.TargetGroupArn) != aws.StringValue(j.TargetGroupArn) { + return fmt.Errorf("ELBv2 Target Group (%s) unexpectedly recreated (%s)", aws.StringValue(i.TargetGroupArn), aws.StringValue(j.TargetGroupArn)) + } + + return nil + } +} + +func testAccCheckAWSLBTargetGroupRecreated(i, j *elbv2.TargetGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(i.TargetGroupArn) == aws.StringValue(j.TargetGroupArn) { + return fmt.Errorf("ELBv2 Target Group (%s) not recreated", aws.StringValue(i.TargetGroupArn)) + } + + return nil + } +} + func testAccCheckAWSLBTargetGroupHealthCheckEnabled(res *elbv2.TargetGroup, expected bool) resource.TestCheckFunc { return func(s *terraform.State) error { if res.HealthCheckEnabled == nil { diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index c7117fb763d..f1facebb960 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -413,6 +413,46 @@ func TestAccAWSLB_applicationLoadBalancer_updateHttp2(t *testing.T) { }) } +func TestAccAWSLB_applicationLoadBalancer_updateDropInvalidHeaderFields(t *testing.T) { + var pre, mid, post elbv2.LoadBalancer + lbName := fmt.Sprintf("testaccawsalb-headers-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_lb.lb_test", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBConfig_enableDropInvalidHeaderFields(lbName, false), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBExists("aws_lb.lb_test", &pre), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "routing.http.drop_invalid_header_fields.enabled", "false"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "drop_invalid_header_fields", "false"), + ), + }, + { + Config: testAccAWSLBConfig_enableDropInvalidHeaderFields(lbName, true), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBExists("aws_lb.lb_test", &mid), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "routing.http.drop_invalid_header_fields.enabled", "true"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "drop_invalid_header_fields", "true"), + testAccCheckAWSlbARNs(&pre, &mid), + ), + }, + { + Config: testAccAWSLBConfig_enableDropInvalidHeaderFields(lbName, false), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBExists("aws_lb.lb_test", &post), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "routing.http.drop_invalid_header_fields.enabled", "false"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "drop_invalid_header_fields", "false"), + testAccCheckAWSlbARNs(&mid, &post), + ), + }, + }, + }) +} + func TestAccAWSLB_applicationLoadBalancer_updateDeletionProtection(t *testing.T) { var pre, mid, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawsalb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) @@ -1269,7 +1309,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1340,7 +1387,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1388,6 +1442,84 @@ resource "aws_security_group" "alb_test" { `, lbName, http2) } +func testAccAWSLBConfig_enableDropInvalidHeaderFields(lbName string, dropInvalid bool) string { + return fmt.Sprintf(` +resource "aws_lb" "lb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id[0]}", "${aws_subnet.alb_test.*.id[1]}"] + + idle_timeout = 30 + enable_deletion_protection = false + + drop_invalid_header_fields = %t + + tags = { + Name = "TestAccAWSALB_basic" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags = { + Name = "terraform-testacc-lb-basic" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags = { + Name = "tf-acc-lb-basic-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "TestAccAWSALB_basic" + } +} +`, lbName, dropInvalid) +} + func testAccAWSLBConfig_enableDeletionProtection(lbName string, deletion_protection bool) string { return fmt.Sprintf(` resource "aws_lb" "lb_test" { @@ -1409,7 +1541,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1561,7 +1700,14 @@ resource "aws_subnet" "alb_test" { func testAccAWSLBConfig_networkLoadBalancerEIP(lbName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "main" { cidr_block = "10.10.0.0/16" @@ -1645,7 +1791,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1714,7 +1867,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1782,7 +1942,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1863,7 +2030,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -1939,7 +2113,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2007,7 +2188,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2057,7 +2245,14 @@ resource "aws_security_group" "alb_test" { func testAccAWSLBConfigALBAccessLogsBase(bucketName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_elb_service_account" "current" {} @@ -2134,7 +2329,14 @@ resource "aws_lb" "test" { func testAccAWSLBConfigNLBAccessLogsBase(bucketName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_elb_service_account" "current" {} @@ -2242,7 +2444,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" @@ -2287,7 +2496,14 @@ variable "subnets" { type = "list" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "alb_test" { cidr_block = "10.0.0.0/16" diff --git a/aws/resource_aws_licensemanager_license_configuration.go b/aws/resource_aws_licensemanager_license_configuration.go index 6e94dda4d9f..a87fd26aa49 100644 --- a/aws/resource_aws_licensemanager_license_configuration.go +++ b/aws/resource_aws_licensemanager_license_configuration.go @@ -105,6 +105,7 @@ func resourceAwsLicenseManagerLicenseConfigurationCreate(d *schema.ResourceData, func resourceAwsLicenseManagerLicenseConfigurationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).licensemanagerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.GetLicenseConfiguration(&licensemanager.GetLicenseConfigurationInput{ LicenseConfigurationArn: aws.String(d.Id()), @@ -128,7 +129,7 @@ func resourceAwsLicenseManagerLicenseConfigurationRead(d *schema.ResourceData, m } d.Set("name", resp.Name) - if err := d.Set("tags", keyvaluetags.LicensemanagerKeyValueTags(resp.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.LicensemanagerKeyValueTags(resp.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -138,20 +139,14 @@ func resourceAwsLicenseManagerLicenseConfigurationRead(d *schema.ResourceData, m func resourceAwsLicenseManagerLicenseConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).licensemanagerconn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") if err := keyvaluetags.LicensemanagerUpdateTags(conn, d.Id(), o, n); err != nil { return fmt.Errorf("error updating License Manager License Configuration (%s) tags: %s", d.Id(), err) } - - d.SetPartial("tags") } - d.Partial(false) - opts := &licensemanager.UpdateLicenseConfigurationInput{ LicenseConfigurationArn: aws.String(d.Id()), Name: aws.String(d.Get("name").(string)), diff --git a/aws/resource_aws_lightsail_instance.go b/aws/resource_aws_lightsail_instance.go index cbdab50b97b..dafe9a7a252 100644 --- a/aws/resource_aws_lightsail_instance.go +++ b/aws/resource_aws_lightsail_instance.go @@ -4,7 +4,6 @@ import ( "fmt" "log" "regexp" - "strconv" "time" "github.com/aws/aws-sdk-go/aws" @@ -89,7 +88,7 @@ func resourceAwsLightsailInstance() *schema.Resource { Computed: true, }, "ram_size": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, }, "ipv6_address": { @@ -172,6 +171,8 @@ func resourceAwsLightsailInstanceCreate(d *schema.ResourceData, meta interface{} func resourceAwsLightsailInstanceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).lightsailconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + resp, err := conn.GetInstance(&lightsail.GetInstanceInput{ InstanceName: aws.String(d.Id()), }) @@ -207,13 +208,13 @@ func resourceAwsLightsailInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("username", i.Username) d.Set("created_at", i.CreatedAt.Format(time.RFC3339)) d.Set("cpu_count", i.Hardware.CpuCount) - d.Set("ram_size", strconv.FormatFloat(*i.Hardware.RamSizeInGb, 'f', 0, 64)) + d.Set("ram_size", i.Hardware.RamSizeInGb) d.Set("ipv6_address", i.Ipv6Address) d.Set("is_static_ip", i.IsStaticIp) d.Set("private_ip_address", i.PrivateIpAddress) d.Set("public_ip_address", i.PublicIpAddress) - if err := d.Set("tags", keyvaluetags.LightsailKeyValueTags(i.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.LightsailKeyValueTags(i.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_lightsail_instance_test.go b/aws/resource_aws_lightsail_instance_test.go index 5c4b9b687eb..90f765ba790 100644 --- a/aws/resource_aws_lightsail_instance_test.go +++ b/aws/resource_aws_lightsail_instance_test.go @@ -91,6 +91,7 @@ func TestAccAWSLightsailInstance_basic(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "bundle_id"), resource.TestCheckResourceAttrSet("aws_lightsail_instance.lightsail_instance_test", "key_pair_name"), resource.TestCheckResourceAttr("aws_lightsail_instance.lightsail_instance_test", "tags.%", "0"), + resource.TestMatchResourceAttr("aws_lightsail_instance.lightsail_instance_test", "ram_size", regexp.MustCompile(`\d+(.\d+)?`)), ), }, }, @@ -296,6 +297,11 @@ func testAccAWSLightsailInstanceConfig_basic(lightsailName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_lightsail_instance" "lightsail_instance_test" { @@ -311,6 +317,11 @@ func testAccAWSLightsailInstanceConfig_tags1(lightsailName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_lightsail_instance" "lightsail_instance_test" { @@ -329,6 +340,11 @@ func testAccAWSLightsailInstanceConfig_tags2(lightsailName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_lightsail_instance" "lightsail_instance_test" { diff --git a/aws/resource_aws_lightsail_key_pair_test.go b/aws/resource_aws_lightsail_key_pair_test.go index 8796ba6eeab..dd34c3c2d82 100644 --- a/aws/resource_aws_lightsail_key_pair_test.go +++ b/aws/resource_aws_lightsail_key_pair_test.go @@ -46,7 +46,7 @@ func TestAccAWSLightsailKeyPair_publicKey(t *testing.T) { CheckDestroy: testAccCheckAWSLightsailKeyPairDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLightsailKeyPairConfig_imported(lightsailName, testLightsailKeyPairPubKey1), + Config: testAccAWSLightsailKeyPairConfig_imported(lightsailName, lightsailPubKey), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLightsailKeyPairExists("aws_lightsail_key_pair.lightsail_key_pair_test", &conf), resource.TestCheckResourceAttrSet("aws_lightsail_key_pair.lightsail_key_pair_test", "arn"), @@ -175,14 +175,14 @@ resource "aws_lightsail_key_pair" "lightsail_key_pair_test" { `, lightsailName) } -func testAccAWSLightsailKeyPairConfig_imported(lightsailName, key string) string { +func testAccAWSLightsailKeyPairConfig_imported(lightsailName, publicKey string) string { return fmt.Sprintf(` resource "aws_lightsail_key_pair" "lightsail_key_pair_test" { name = "%s" public_key = "%s" } -`, lightsailName, lightsailPubKey) +`, lightsailName, publicKey) } func testAccAWSLightsailKeyPairConfig_encrypted(lightsailName, key string) string { diff --git a/aws/resource_aws_lightsail_static_ip_attachment_test.go b/aws/resource_aws_lightsail_static_ip_attachment_test.go index 748cd540e41..731c310ca5f 100644 --- a/aws/resource_aws_lightsail_static_ip_attachment_test.go +++ b/aws/resource_aws_lightsail_static_ip_attachment_test.go @@ -138,6 +138,11 @@ func testAccAWSLightsailStaticIpAttachmentConfig_basic(staticIpName, instanceNam return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_lightsail_static_ip_attachment" "test" { diff --git a/aws/resource_aws_load_balancer_backend_server_policy.go b/aws/resource_aws_load_balancer_backend_server_policy.go index 2db9c73130d..e902dc085b3 100644 --- a/aws/resource_aws_load_balancer_backend_server_policy.go +++ b/aws/resource_aws_load_balancer_backend_server_policy.go @@ -100,7 +100,11 @@ func resourceAwsLoadBalancerBackendServerPoliciesRead(d *schema.ResourceData, me } d.Set("load_balancer_name", loadBalancerName) - d.Set("instance_port", instancePort) + instancePortVal, err := strconv.ParseInt(instancePort, 10, 64) + if err != nil { + return fmt.Errorf("error parsing instance port: %s", err) + } + d.Set("instance_port", instancePortVal) d.Set("policy_names", flattenStringList(policyNames)) return nil diff --git a/aws/resource_aws_load_balancer_backend_server_policy_test.go b/aws/resource_aws_load_balancer_backend_server_policy_test.go index 4bca3f03432..51e9f40c3ea 100644 --- a/aws/resource_aws_load_balancer_backend_server_policy_test.go +++ b/aws/resource_aws_load_balancer_backend_server_policy_test.go @@ -144,6 +144,11 @@ func testAccAWSLoadBalancerBackendServerPolicyConfig_basic0(rName, privateKey, p return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_iam_server_certificate" "test-iam-cert0" { @@ -206,6 +211,11 @@ func testAccAWSLoadBalancerBackendServerPolicyConfig_basic1(rName, privateKey1, return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_iam_server_certificate" "test-iam-cert0" { @@ -279,6 +289,11 @@ func testAccAWSLoadBalancerBackendServerPolicyConfig_basic2(rName, privateKey, c return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_iam_server_certificate" "test-iam-cert0" { diff --git a/aws/resource_aws_load_balancer_listener_policy.go b/aws/resource_aws_load_balancer_listener_policy.go index ff7ada242e7..da6b51582e9 100644 --- a/aws/resource_aws_load_balancer_listener_policy.go +++ b/aws/resource_aws_load_balancer_listener_policy.go @@ -100,7 +100,11 @@ func resourceAwsLoadBalancerListenerPoliciesRead(d *schema.ResourceData, meta in } d.Set("load_balancer_name", loadBalancerName) - d.Set("load_balancer_port", loadBalancerPort) + loadBalancerPortVal, err := strconv.ParseInt(loadBalancerPort, 10, 64) + if err != nil { + return fmt.Errorf("error parsing load balancer port: %s", err) + } + d.Set("load_balancer_port", loadBalancerPortVal) d.Set("policy_names", flattenStringList(policyNames)) return nil diff --git a/aws/resource_aws_main_route_table_association_test.go b/aws/resource_aws_main_route_table_association_test.go index e63a43e561b..bde058d9603 100644 --- a/aws/resource_aws_main_route_table_association_test.go +++ b/aws/resource_aws_main_route_table_association_test.go @@ -18,21 +18,13 @@ func TestAccAWSMainRouteTableAssociation_basic(t *testing.T) { { Config: testAccMainRouteTableAssociationConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckMainRouteTableAssociation( - "aws_main_route_table_association.foo", - "aws_vpc.foo", - "aws_route_table.foo", - ), + testAccCheckMainRouteTableAssociation("aws_main_route_table_association.foo", "aws_vpc.foo"), ), }, { Config: testAccMainRouteTableAssociationConfigUpdate, Check: resource.ComposeTestCheckFunc( - testAccCheckMainRouteTableAssociation( - "aws_main_route_table_association.foo", - "aws_vpc.foo", - "aws_route_table.bar", - ), + testAccCheckMainRouteTableAssociation("aws_main_route_table_association.foo", "aws_vpc.foo"), ), }, }, @@ -67,10 +59,7 @@ func testAccCheckMainRouteTableAssociationDestroy(s *terraform.State) error { return nil } -func testAccCheckMainRouteTableAssociation( - mainRouteTableAssociationResource string, - vpcResource string, - routeTableResource string) resource.TestCheckFunc { +func testAccCheckMainRouteTableAssociation(mainRouteTableAssociationResource string, vpcResource string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[mainRouteTableAssociationResource] if !ok { diff --git a/aws/resource_aws_media_convert_queue.go b/aws/resource_aws_media_convert_queue.go index b37bb18fc85..b1c6b541910 100644 --- a/aws/resource_aws_media_convert_queue.go +++ b/aws/resource_aws_media_convert_queue.go @@ -129,6 +129,8 @@ func resourceAwsMediaConvertQueueRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error getting Media Convert Account Client: %s", err) } + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + getOpts := &mediaconvert.GetQueueInput{ Name: aws.String(d.Id()), } @@ -159,7 +161,7 @@ func resourceAwsMediaConvertQueueRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for Media Convert Queue (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_media_package_channel.go b/aws/resource_aws_media_package_channel.go index ddf15202c49..1e211e12f25 100644 --- a/aws/resource_aws_media_package_channel.go +++ b/aws/resource_aws_media_package_channel.go @@ -96,6 +96,7 @@ func resourceAwsMediaPackageChannelCreate(d *schema.ResourceData, meta interface func resourceAwsMediaPackageChannelRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).mediapackageconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &mediapackage.DescribeChannelInput{ Id: aws.String(d.Id()), @@ -112,7 +113,7 @@ func resourceAwsMediaPackageChannelRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error setting hls_ingest: %s", err) } - if err := d.Set("tags", keyvaluetags.MediapackageKeyValueTags(resp.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.MediapackageKeyValueTags(resp.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_media_store_container.go b/aws/resource_aws_media_store_container.go index e25fae91700..fc1e1c85eb3 100644 --- a/aws/resource_aws_media_store_container.go +++ b/aws/resource_aws_media_store_container.go @@ -80,6 +80,7 @@ func resourceAwsMediaStoreContainerCreate(d *schema.ResourceData, meta interface func resourceAwsMediaStoreContainerRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).mediastoreconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &mediastore.DescribeContainerInput{ ContainerName: aws.String(d.Id()), @@ -105,7 +106,7 @@ func resourceAwsMediaStoreContainerRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for media store container (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_mq_broker.go b/aws/resource_aws_mq_broker.go index 00ef70f6f4f..8a47b3f7164 100644 --- a/aws/resource_aws_mq_broker.go +++ b/aws/resource_aws_mq_broker.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/mitchellh/copystructure" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -22,6 +23,9 @@ func resourceAwsMqBroker() *schema.Resource { Read: resourceAwsMqBrokerRead, Update: resourceAwsMqBrokerUpdate, Delete: resourceAwsMqBrokerDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "apply_immediately": { @@ -63,8 +67,12 @@ func resourceAwsMqBroker() *schema.Resource { "deployment_mode": { Type: schema.TypeString, Optional: true, - Default: "SINGLE_INSTANCE", + Default: mq.DeploymentModeSingleInstance, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + mq.DeploymentModeSingleInstance, + mq.DeploymentModeActiveStandbyMultiAz, + }, true), }, "encryption_options": { Type: schema.TypeList, @@ -94,6 +102,9 @@ func resourceAwsMqBroker() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + mq.EngineTypeActivemq, + }, true), }, "engine_version": { Type: schema.TypeString, @@ -142,6 +153,15 @@ func resourceAwsMqBroker() *schema.Resource { "day_of_week": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + mq.DayOfWeekSunday, + mq.DayOfWeekMonday, + mq.DayOfWeekTuesday, + mq.DayOfWeekWednesday, + mq.DayOfWeekThursday, + mq.DayOfWeekFriday, + mq.DayOfWeekSaturday, + }, true), }, "time_of_day": { Type: schema.TypeString, @@ -185,7 +205,11 @@ func resourceAwsMqBroker() *schema.Resource { }, "groups": { Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, + MaxItems: 20, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringLenBetween(2, 100), + }, Set: schema.HashString, Optional: true, }, @@ -196,8 +220,9 @@ func resourceAwsMqBroker() *schema.Resource { ValidateFunc: validateMqBrokerPassword, }, "username": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(2, 100), }, }, }, @@ -304,19 +329,20 @@ func resourceAwsMqBrokerCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).mqconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[INFO] Reading MQ Broker: %s", d.Id()) out, err := conn.DescribeBroker(&mq.DescribeBrokerInput{ BrokerId: aws.String(d.Id()), }) if err != nil { - if isAWSErr(err, "NotFoundException", "") { + if isAWSErr(err, mq.ErrCodeNotFoundException, "") { log.Printf("[WARN] MQ Broker %q not found, removing from state", d.Id()) d.SetId("") return nil } // API docs say a 404 can also return a 403 - if isAWSErr(err, "ForbiddenException", "Forbidden") { + if isAWSErr(err, mq.ErrCodeForbiddenException, "Forbidden") { log.Printf("[WARN] MQ Broker %q not found, removing from state", d.Id()) d.SetId("") return nil @@ -376,11 +402,7 @@ func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { return err } - tags, err := keyvaluetags.MqListTags(conn, aws.StringValue(out.BrokerArn)) - if err != nil { - return fmt.Errorf("error listing tags for MQ Broker (%s): %s", d.Id(), err) - } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.MqKeyValueTags(out.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_mq_broker_test.go b/aws/resource_aws_mq_broker_test.go index f904e01995e..a33a6635a55 100644 --- a/aws/resource_aws_mq_broker_test.go +++ b/aws/resource_aws_mq_broker_test.go @@ -234,68 +234,78 @@ func TestDiffAwsMqBrokerUsers(t *testing.T) { } func TestAccAWSMqBroker_basic(t *testing.T) { + var broker mq.DescribeBrokerResponse sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsMqBrokerDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMqBrokerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccMqBrokerConfig(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "auto_minor_version_upgrade", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.revision", regexp.MustCompile(`^[0-9]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "deployment_mode", "SINGLE_INSTANCE"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "encryption_options.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "encryption_options.0.use_aws_owned_key", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "host_instance_type", "mq.t2.micro"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.#", "1"), - resource.TestCheckResourceAttrSet("aws_mq_broker.test", "maintenance_window_start_time.0.day_of_week"), - resource.TestCheckResourceAttrSet("aws_mq_broker.test", "maintenance_window_start_time.0.time_of_day"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.0.general", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.0.audit", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.time_zone", "UTC"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "publicly_accessible", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "security_groups.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "subnet_ids.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.console_access", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.groups.#", "0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.username", "Test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.password", "TestTest1234"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "arn", - regexp.MustCompile("^arn:aws:mq:[a-z0-9-]+:[0-9]{12}:broker:[a-z0-9-]+:[a-f0-9-]+$")), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.console_url", + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "auto_minor_version_upgrade", "false"), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestMatchResourceAttr(resourceName, "configuration.0.revision", regexp.MustCompile(`^[0-9]+$`)), + resource.TestCheckResourceAttr(resourceName, "deployment_mode", "SINGLE_INSTANCE"), + resource.TestCheckResourceAttr(resourceName, "encryption_options.#", "1"), + resource.TestCheckResourceAttr(resourceName, "encryption_options.0.use_aws_owned_key", "true"), + resource.TestCheckResourceAttr(resourceName, "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "5.15.0"), + resource.TestCheckResourceAttr(resourceName, "host_instance_type", "mq.t2.micro"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "maintenance_window_start_time.0.day_of_week"), + resource.TestCheckResourceAttrSet(resourceName, "maintenance_window_start_time.0.time_of_day"), + resource.TestCheckResourceAttr(resourceName, "logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logs.0.general", "true"), + resource.TestCheckResourceAttr(resourceName, "logs.0.audit", "false"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.time_zone", "UTC"), + resource.TestCheckResourceAttr(resourceName, "publicly_accessible", "false"), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "1"), + resource.TestCheckResourceAttr(resourceName, "subnet_ids.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.console_access", "false"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.username", "Test"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.password", "TestTest1234"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "mq", regexp.MustCompile(`broker:+.`)), + resource.TestCheckResourceAttr(resourceName, "instances.#", "1"), + resource.TestMatchResourceAttr(resourceName, "instances.0.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.ip_address", + resource.TestMatchResourceAttr(resourceName, "instances.0.ip_address", regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.0.endpoints.#", "5"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), + resource.TestCheckResourceAttr(resourceName, "instances.0.endpoints.#", "5"), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, }, }) } func TestAccAWSMqBroker_allFieldsDefaultVpc(t *testing.T) { + var broker mq.DescribeBrokerResponse sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) cfgNameBefore := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) cfgNameAfter := fmt.Sprintf("tf-acc-test-updated-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" cfgBodyBefore := ` @@ -310,90 +320,96 @@ func TestAccAWSMqBroker_allFieldsDefaultVpc(t *testing.T) { ` resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsMqBrokerDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMqBrokerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccMqBrokerConfig_allFieldsDefaultVpc(sgName, cfgNameBefore, cfgBodyBefore, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "auto_minor_version_upgrade", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.0.revision", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "host_instance_type", "mq.t2.micro"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.day_of_week", "TUESDAY"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.time_of_day", "02:00"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.time_zone", "CET"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.0.general", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.0.audit", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "publicly_accessible", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "security_groups.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "subnet_ids.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.console_access", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.#", "3"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.2456940119", "first"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.3055489385", "second"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.607264868", "third"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.password", "SecondTestTest1234"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.username", "SecondTest"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.console_access", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.groups.#", "0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.password", "TestTest1234"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.username", "Test"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "arn", - regexp.MustCompile("^arn:aws:mq:[a-z0-9-]+:[0-9]{12}:broker:[a-z0-9-]+:[a-f0-9-]+$")), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.#", "2"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.console_url", + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "auto_minor_version_upgrade", "true"), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestCheckResourceAttr(resourceName, "configuration.0.revision", "2"), + resource.TestCheckResourceAttr(resourceName, "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), + resource.TestCheckResourceAttr(resourceName, "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "5.15.0"), + resource.TestCheckResourceAttr(resourceName, "host_instance_type", "mq.t2.micro"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.#", "1"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.day_of_week", "TUESDAY"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.time_of_day", "02:00"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.time_zone", "CET"), + resource.TestCheckResourceAttr(resourceName, "logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logs.0.general", "false"), + resource.TestCheckResourceAttr(resourceName, "logs.0.audit", "false"), + resource.TestCheckResourceAttr(resourceName, "publicly_accessible", "true"), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "2"), + resource.TestCheckResourceAttr(resourceName, "subnet_ids.#", "2"), + resource.TestCheckResourceAttr(resourceName, "user.#", "2"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.console_access", "true"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.#", "3"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.2456940119", "first"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.3055489385", "second"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.607264868", "third"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.password", "SecondTestTest1234"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.username", "SecondTest"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.console_access", "false"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.password", "TestTest1234"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.username", "Test"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "mq", regexp.MustCompile(`broker:+.`)), + resource.TestCheckResourceAttr(resourceName, "instances.#", "2"), + resource.TestMatchResourceAttr(resourceName, "instances.0.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.ip_address", + resource.TestMatchResourceAttr(resourceName, "instances.0.ip_address", regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.0.endpoints.#", "5"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.console_url", + resource.TestCheckResourceAttr(resourceName, "instances.0.endpoints.#", "5"), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.ip_address", + resource.TestMatchResourceAttr(resourceName, "instances.1.ip_address", regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.1.endpoints.#", "5"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), + resource.TestCheckResourceAttr(resourceName, "instances.1.endpoints.#", "5"), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, { // Update configuration in-place Config: testAccMqBrokerConfig_allFieldsDefaultVpc(sgName, cfgNameBefore, cfgBodyAfter, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.0.revision", "3"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestCheckResourceAttr(resourceName, "configuration.0.revision", "3"), ), }, { // Replace configuration Config: testAccMqBrokerConfig_allFieldsDefaultVpc(sgName, cfgNameAfter, cfgBodyAfter, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.0.revision", "2"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestCheckResourceAttr(resourceName, "configuration.0.revision", "2"), ), }, }, @@ -401,10 +417,12 @@ func TestAccAWSMqBroker_allFieldsDefaultVpc(t *testing.T) { } func TestAccAWSMqBroker_allFieldsCustomVpc(t *testing.T) { + var broker mq.DescribeBrokerResponse sgName := fmt.Sprintf("tf-acc-test-vpc-%s", acctest.RandString(5)) cfgNameBefore := fmt.Sprintf("tf-acc-test-vpc-%s", acctest.RandString(5)) cfgNameAfter := fmt.Sprintf("tf-acc-test-vpc-updated-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-vpc-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" cfgBodyBefore := ` @@ -419,90 +437,96 @@ func TestAccAWSMqBroker_allFieldsCustomVpc(t *testing.T) { ` resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsMqBrokerDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMqBrokerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccMqBrokerConfig_allFieldsCustomVpc(sgName, cfgNameBefore, cfgBodyBefore, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "auto_minor_version_upgrade", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.0.revision", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "host_instance_type", "mq.t2.micro"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.day_of_week", "TUESDAY"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.time_of_day", "02:00"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "maintenance_window_start_time.0.time_zone", "CET"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.0.general", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "logs.0.audit", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "publicly_accessible", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "security_groups.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "subnet_ids.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.console_access", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.#", "3"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.2456940119", "first"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.3055489385", "second"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.groups.607264868", "third"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.password", "SecondTestTest1234"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1344916805.username", "SecondTest"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.console_access", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.groups.#", "0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.password", "TestTest1234"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3793764891.username", "Test"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "arn", - regexp.MustCompile("^arn:aws:mq:[a-z0-9-]+:[0-9]{12}:broker:[a-z0-9-]+:[a-f0-9-]+$")), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.#", "2"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.console_url", + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "auto_minor_version_upgrade", "true"), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestCheckResourceAttr(resourceName, "configuration.0.revision", "2"), + resource.TestCheckResourceAttr(resourceName, "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), + resource.TestCheckResourceAttr(resourceName, "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "5.15.0"), + resource.TestCheckResourceAttr(resourceName, "host_instance_type", "mq.t2.micro"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.#", "1"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.day_of_week", "TUESDAY"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.time_of_day", "02:00"), + resource.TestCheckResourceAttr(resourceName, "maintenance_window_start_time.0.time_zone", "CET"), + resource.TestCheckResourceAttr(resourceName, "logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logs.0.general", "true"), + resource.TestCheckResourceAttr(resourceName, "logs.0.audit", "true"), + resource.TestCheckResourceAttr(resourceName, "publicly_accessible", "true"), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "2"), + resource.TestCheckResourceAttr(resourceName, "subnet_ids.#", "2"), + resource.TestCheckResourceAttr(resourceName, "user.#", "2"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.console_access", "true"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.#", "3"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.2456940119", "first"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.3055489385", "second"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.groups.607264868", "third"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.password", "SecondTestTest1234"), + resource.TestCheckResourceAttr(resourceName, "user.1344916805.username", "SecondTest"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.console_access", "false"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.password", "TestTest1234"), + resource.TestCheckResourceAttr(resourceName, "user.3793764891.username", "Test"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "mq", regexp.MustCompile(`broker:+.`)), + resource.TestCheckResourceAttr(resourceName, "instances.#", "2"), + resource.TestMatchResourceAttr(resourceName, "instances.0.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.ip_address", + resource.TestMatchResourceAttr(resourceName, "instances.0.ip_address", regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.0.endpoints.#", "5"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.console_url", + resource.TestCheckResourceAttr(resourceName, "instances.0.endpoints.#", "5"), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), + resource.TestMatchResourceAttr(resourceName, "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.ip_address", + resource.TestMatchResourceAttr(resourceName, "instances.1.ip_address", regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.1.endpoints.#", "5"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), - resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), + resource.TestCheckResourceAttr(resourceName, "instances.1.endpoints.#", "5"), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.2", regexp.MustCompile(`^stomp\+ssl://[a-z0-9-\.]+:61614$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.3", regexp.MustCompile(`^mqtt\+ssl://[a-z0-9-\.]+:8883$`)), + resource.TestMatchResourceAttr(resourceName, "instances.1.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, { // Update configuration in-place Config: testAccMqBrokerConfig_allFieldsCustomVpc(sgName, cfgNameBefore, cfgBodyAfter, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.0.revision", "3"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestCheckResourceAttr(resourceName, "configuration.0.revision", "3"), ), }, { // Replace configuration Config: testAccMqBrokerConfig_allFieldsCustomVpc(sgName, cfgNameAfter, cfgBodyAfter, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "broker_name", brokerName), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.#", "1"), - resource.TestMatchResourceAttr("aws_mq_broker.test", "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), - resource.TestCheckResourceAttr("aws_mq_broker.test", "configuration.0.revision", "2"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "broker_name", brokerName), + resource.TestCheckResourceAttr(resourceName, "configuration.#", "1"), + resource.TestMatchResourceAttr(resourceName, "configuration.0.id", regexp.MustCompile(`^c-[a-z0-9-]+$`)), + resource.TestCheckResourceAttr(resourceName, "configuration.0.revision", "2"), ), }, }, @@ -510,6 +534,7 @@ func TestAccAWSMqBroker_allFieldsCustomVpc(t *testing.T) { } func TestAccAWSMqBroker_EncryptionOptions_KmsKeyId(t *testing.T) { + var broker mq.DescribeBrokerResponse rName := acctest.RandomWithPrefix("tf-acc-test") kmsKeyResourceName := "aws_kms_key.test" resourceName := "aws_mq_broker.test" @@ -522,17 +547,24 @@ func TestAccAWSMqBroker_EncryptionOptions_KmsKeyId(t *testing.T) { { Config: testAccMqBrokerConfigEncryptionOptionsKmsKeyId(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists(resourceName), + testAccCheckAwsMqBrokerExists(resourceName, &broker), resource.TestCheckResourceAttr(resourceName, "encryption_options.#", "1"), resource.TestCheckResourceAttrPair(resourceName, "encryption_options.0.kms_key_id", kmsKeyResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "encryption_options.0.use_aws_owned_key", "false"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, }, }) } func TestAccAWSMqBroker_EncryptionOptions_UseAwsOwnedKey_Disabled(t *testing.T) { + var broker mq.DescribeBrokerResponse rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_mq_broker.test" @@ -544,16 +576,23 @@ func TestAccAWSMqBroker_EncryptionOptions_UseAwsOwnedKey_Disabled(t *testing.T) { Config: testAccMqBrokerConfigEncryptionOptionsUseAwsOwnedKey(rName, false), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists(resourceName), + testAccCheckAwsMqBrokerExists(resourceName, &broker), resource.TestCheckResourceAttr(resourceName, "encryption_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "encryption_options.0.use_aws_owned_key", "false"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, }, }) } func TestAccAWSMqBroker_EncryptionOptions_UseAwsOwnedKey_Enabled(t *testing.T) { + var broker mq.DescribeBrokerResponse rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_mq_broker.test" @@ -565,62 +604,77 @@ func TestAccAWSMqBroker_EncryptionOptions_UseAwsOwnedKey_Enabled(t *testing.T) { { Config: testAccMqBrokerConfigEncryptionOptionsUseAwsOwnedKey(rName, true), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists(resourceName), + testAccCheckAwsMqBrokerExists(resourceName, &broker), resource.TestCheckResourceAttr(resourceName, "encryption_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "encryption_options.0.use_aws_owned_key", "true"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, }, }) } func TestAccAWSMqBroker_updateUsers(t *testing.T) { + var broker mq.DescribeBrokerResponse sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsMqBrokerDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMqBrokerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccMqBrokerConfig_updateUsers1(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3400735725.console_access", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3400735725.groups.#", "0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3400735725.password", "TestTest1111"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.3400735725.username", "first"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "user.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.3400735725.console_access", "false"), + resource.TestCheckResourceAttr(resourceName, "user.3400735725.groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user.3400735725.password", "TestTest1111"), + resource.TestCheckResourceAttr(resourceName, "user.3400735725.username", "first"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, // Adding new user + modify existing { Config: testAccMqBrokerConfig_updateUsers2(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1074486012.console_access", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1074486012.groups.#", "0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1074486012.password", "TestTest2222"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1074486012.username", "second"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1166726986.console_access", "true"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1166726986.groups.#", "0"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1166726986.password", "TestTest1111updated"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.1166726986.username", "first"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "user.#", "2"), + resource.TestCheckResourceAttr(resourceName, "user.1074486012.console_access", "false"), + resource.TestCheckResourceAttr(resourceName, "user.1074486012.groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user.1074486012.password", "TestTest2222"), + resource.TestCheckResourceAttr(resourceName, "user.1074486012.username", "second"), + resource.TestCheckResourceAttr(resourceName, "user.1166726986.console_access", "true"), + resource.TestCheckResourceAttr(resourceName, "user.1166726986.groups.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user.1166726986.password", "TestTest1111updated"), + resource.TestCheckResourceAttr(resourceName, "user.1166726986.username", "first"), ), }, // Deleting user + modify existing { Config: testAccMqBrokerConfig_updateUsers3(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2244717082.console_access", "false"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2244717082.groups.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2244717082.groups.2282622326", "admin"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2244717082.password", "TestTest2222"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2244717082.username", "second"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "user.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.2244717082.console_access", "false"), + resource.TestCheckResourceAttr(resourceName, "user.2244717082.groups.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.2244717082.groups.2282622326", "admin"), + resource.TestCheckResourceAttr(resourceName, "user.2244717082.password", "TestTest2222"), + resource.TestCheckResourceAttr(resourceName, "user.2244717082.username", "second"), ), }, }, @@ -628,8 +682,10 @@ func TestAccAWSMqBroker_updateUsers(t *testing.T) { } func TestAccAWSMqBroker_updateTags(t *testing.T) { + var broker mq.DescribeBrokerResponse sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, @@ -639,28 +695,34 @@ func TestAccAWSMqBroker_updateTags(t *testing.T) { { Config: testAccMqBrokerConfig_updateTags1(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.env", "test"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "test"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, // Modify existing tags { Config: testAccMqBrokerConfig_updateTags2(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.%", "2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.env", "test2"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.role", "test-role"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "test2"), + resource.TestCheckResourceAttr(resourceName, "tags.role", "test-role"), ), }, // Deleting tags { Config: testAccMqBrokerConfig_updateTags3(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "tags.role", "test-role"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.role", "test-role"), ), }, }, @@ -668,26 +730,35 @@ func TestAccAWSMqBroker_updateTags(t *testing.T) { } func TestAccAWSMqBroker_updateSecurityGroup(t *testing.T) { + var broker mq.DescribeBrokerResponse sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsMqBrokerDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMqBrokerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccMqBrokerConfig(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "security_groups.#", "1"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "1"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"apply_immediately", "user"}, + }, { Config: testAccMqBrokerConfig_updateSecurityGroups(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "security_groups.#", "2"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "2"), ), }, // Trigger a reboot and ensure the password change was applied @@ -695,12 +766,35 @@ func TestAccAWSMqBroker_updateSecurityGroup(t *testing.T) { { Config: testAccMqBrokerConfig_updateUsersSecurityGroups(sgName, brokerName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqBrokerExists("aws_mq_broker.test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "security_groups.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.#", "1"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2209734970.username", "Test"), - resource.TestCheckResourceAttr("aws_mq_broker.test", "user.2209734970.password", "TestTest9999"), + testAccCheckAwsMqBrokerExists(resourceName, &broker), + resource.TestCheckResourceAttr(resourceName, "security_groups.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user.2209734970.username", "Test"), + resource.TestCheckResourceAttr(resourceName, "user.2209734970.password", "TestTest9999"), + ), + }, + }, + }) +} + +func TestAccAWSMqBroker_disappears(t *testing.T) { + var broker mq.DescribeBrokerResponse + sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_broker.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMqBrokerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccMqBrokerConfig(sgName, brokerName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsMqBrokerExists(resourceName, &broker), + testAccCheckAwsMqBrokerDisappears(&broker), ), + ExpectNonEmptyPlan: true, }, }, }) @@ -720,7 +814,7 @@ func testAccCheckAwsMqBrokerDestroy(s *terraform.State) error { _, err := conn.DescribeBroker(input) if err != nil { - if isAWSErr(err, "NotFoundException", "") { + if isAWSErr(err, mq.ErrCodeNotFoundException, "") { return nil } return err @@ -732,17 +826,43 @@ func testAccCheckAwsMqBrokerDestroy(s *terraform.State) error { return nil } -func testAccCheckAwsMqBrokerExists(name string) resource.TestCheckFunc { +func testAccCheckAwsMqBrokerExists(name string, broker *mq.DescribeBrokerResponse) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + if rs.Primary.ID == "" { + return fmt.Errorf("No MQ Broker is set") + } + + conn := testAccProvider.Meta().(*AWSClient).mqconn + resp, err := conn.DescribeBroker(&mq.DescribeBrokerInput{ + BrokerId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return fmt.Errorf("Error describing MQ Broker: %s", err.Error()) + } + + *broker = *resp + return nil } } +func testAccCheckAwsMqBrokerDisappears(broker *mq.DescribeBrokerResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).mqconn + _, err := conn.DeleteBroker(&mq.DeleteBrokerInput{ + BrokerId: broker.BrokerId, + }) + + return err + } +} + func testAccPreCheckAWSMq(t *testing.T) { conn := testAccProvider.Meta().(*AWSClient).mqconn @@ -845,7 +965,14 @@ resource "aws_mq_broker" "test" { func testAccMqBrokerConfig_allFieldsCustomVpc(sgName, cfgName, cfgBody, brokerName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "main" { cidr_block = "10.11.0.0/16" diff --git a/aws/resource_aws_mq_configuration.go b/aws/resource_aws_mq_configuration.go index 08afb2ec5bb..884cef2e971 100644 --- a/aws/resource_aws_mq_configuration.go +++ b/aws/resource_aws_mq_configuration.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mq" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -53,6 +54,9 @@ func resourceAwsMqConfiguration() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + mq.EngineTypeActivemq, + }, true), }, "engine_version": { Type: schema.TypeString, @@ -100,13 +104,14 @@ func resourceAwsMqConfigurationCreate(d *schema.ResourceData, meta interface{}) func resourceAwsMqConfigurationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).mqconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[INFO] Reading MQ Configuration %s", d.Id()) out, err := conn.DescribeConfiguration(&mq.DescribeConfigurationInput{ ConfigurationId: aws.String(d.Id()), }) if err != nil { - if isAWSErr(err, "NotFoundException", "") { + if isAWSErr(err, mq.ErrCodeNotFoundException, "") { log.Printf("[WARN] MQ Configuration %q not found, removing from state", d.Id()) d.SetId("") return nil @@ -136,11 +141,7 @@ func resourceAwsMqConfigurationRead(d *schema.ResourceData, meta interface{}) er d.Set("data", string(b)) - tags, err := keyvaluetags.MqListTags(conn, aws.StringValue(out.Arn)) - if err != nil { - return fmt.Errorf("error listing tags for MQ Configuration (%s): %s", d.Id(), err) - } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.MqKeyValueTags(out.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_mq_configuration_test.go b/aws/resource_aws_mq_configuration_test.go index ff9be2f1642..dff90f465fa 100644 --- a/aws/resource_aws_mq_configuration_test.go +++ b/aws/resource_aws_mq_configuration_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -13,6 +14,7 @@ import ( func TestAccAWSMqConfiguration_basic(t *testing.T) { configurationName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_configuration.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, @@ -22,25 +24,30 @@ func TestAccAWSMqConfiguration_basic(t *testing.T) { { Config: testAccMqConfigurationConfig(configurationName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqConfigurationExists("aws_mq_configuration.test"), - resource.TestCheckResourceAttrSet("aws_mq_configuration.test", "arn"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "description", "TfAccTest MQ Configuration"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "latest_revision", "2"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "name", configurationName), + testAccCheckAwsMqConfigurationExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "mq", regexp.MustCompile(`configuration:+.`)), + resource.TestCheckResourceAttr(resourceName, "description", "TfAccTest MQ Configuration"), + resource.TestCheckResourceAttr(resourceName, "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "5.15.0"), + resource.TestCheckResourceAttr(resourceName, "latest_revision", "2"), + resource.TestCheckResourceAttr(resourceName, "name", configurationName), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccMqConfigurationConfig_descriptionUpdated(configurationName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqConfigurationExists("aws_mq_configuration.test"), - resource.TestCheckResourceAttrSet("aws_mq_configuration.test", "arn"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "description", "TfAccTest MQ Configuration Updated"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "latest_revision", "3"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "name", configurationName), + testAccCheckAwsMqConfigurationExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "mq", regexp.MustCompile(`configuration:+.`)), + resource.TestCheckResourceAttr(resourceName, "description", "TfAccTest MQ Configuration Updated"), + resource.TestCheckResourceAttr(resourceName, "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "5.15.0"), + resource.TestCheckResourceAttr(resourceName, "latest_revision", "3"), + resource.TestCheckResourceAttr(resourceName, "name", configurationName), ), }, }, @@ -49,6 +56,7 @@ func TestAccAWSMqConfiguration_basic(t *testing.T) { func TestAccAWSMqConfiguration_withData(t *testing.T) { configurationName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_configuration.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, @@ -58,21 +66,27 @@ func TestAccAWSMqConfiguration_withData(t *testing.T) { { Config: testAccMqConfigurationWithDataConfig(configurationName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqConfigurationExists("aws_mq_configuration.test"), - resource.TestCheckResourceAttrSet("aws_mq_configuration.test", "arn"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "description", "TfAccTest MQ Configuration"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "latest_revision", "2"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "name", configurationName), + testAccCheckAwsMqConfigurationExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "mq", regexp.MustCompile(`configuration:+.`)), + resource.TestCheckResourceAttr(resourceName, "description", "TfAccTest MQ Configuration"), + resource.TestCheckResourceAttr(resourceName, "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "5.15.0"), + resource.TestCheckResourceAttr(resourceName, "latest_revision", "2"), + resource.TestCheckResourceAttr(resourceName, "name", configurationName), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } func TestAccAWSMqConfiguration_updateTags(t *testing.T) { configurationName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_mq_configuration.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMq(t) }, @@ -82,26 +96,31 @@ func TestAccAWSMqConfiguration_updateTags(t *testing.T) { { Config: testAccMqConfigurationConfig_updateTags1(configurationName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqConfigurationExists("aws_mq_configuration.test"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.env", "test"), + testAccCheckAwsMqConfigurationExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "test"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccMqConfigurationConfig_updateTags2(configurationName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqConfigurationExists("aws_mq_configuration.test"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.%", "2"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.env", "test2"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.role", "test-role"), + testAccCheckAwsMqConfigurationExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.env", "test2"), + resource.TestCheckResourceAttr(resourceName, "tags.role", "test-role"), ), }, { Config: testAccMqConfigurationConfig_updateTags3(configurationName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsMqConfigurationExists("aws_mq_configuration.test"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.%", "1"), - resource.TestCheckResourceAttr("aws_mq_configuration.test", "tags.role", "test-role"), + testAccCheckAwsMqConfigurationExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.role", "test-role"), ), }, }, @@ -122,7 +141,7 @@ func testAccCheckAwsMqConfigurationDestroy(s *terraform.State) error { _, err := conn.DescribeConfiguration(input) if err != nil { - if isAWSErr(err, "NotFoundException", "") { + if isAWSErr(err, mq.ErrCodeNotFoundException, "") { return nil } return err diff --git a/aws/resource_aws_msk_cluster.go b/aws/resource_aws_msk_cluster.go index 74ffbf6b31f..0330e580126 100644 --- a/aws/resource_aws_msk_cluster.go +++ b/aws/resource_aws_msk_cluster.go @@ -252,6 +252,83 @@ func resourceAwsMskCluster() *schema.Resource { }, }, }, + "logging_info": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressMissingOptionalConfigurationBlock, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "broker_logs": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_logs": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressMissingOptionalConfigurationBlock, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + "log_group": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "firehose": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressMissingOptionalConfigurationBlock, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + "delivery_stream": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "s3": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressMissingOptionalConfigurationBlock, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + "bucket": { + Type: schema.TypeString, + Optional: true, + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, "tags": tagsSchema(), "zookeeper_connect_string": { Type: schema.TypeString, @@ -274,6 +351,7 @@ func resourceAwsMskClusterCreate(d *schema.ResourceData, meta interface{}) error KafkaVersion: aws.String(d.Get("kafka_version").(string)), NumberOfBrokerNodes: aws.Int64(int64(d.Get("number_of_broker_nodes").(int))), OpenMonitoring: expandMskOpenMonitoring(d.Get("open_monitoring").([]interface{})), + LoggingInfo: expandMskLoggingInfo(d.Get("logging_info").([]interface{})), Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().KafkaTags(), } @@ -335,6 +413,7 @@ func waitForMskClusterCreation(conn *kafka.Kafka, arn string) error { func resourceAwsMskClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kafkaconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig out, err := conn.DescribeCluster(&kafka.DescribeClusterInput{ ClusterArn: aws.String(d.Id()), @@ -385,7 +464,7 @@ func resourceAwsMskClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("kafka_version", aws.StringValue(cluster.CurrentBrokerSoftwareInfo.KafkaVersion)) d.Set("number_of_broker_nodes", aws.Int64Value(cluster.NumberOfBrokerNodes)) - if err := d.Set("tags", keyvaluetags.KafkaKeyValueTags(cluster.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.KafkaKeyValueTags(cluster.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -393,6 +472,10 @@ func resourceAwsMskClusterRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error setting open_monitoring: %s", err) } + if err := d.Set("logging_info", flattenMskLoggingInfo(cluster.LoggingInfo)); err != nil { + return fmt.Errorf("error setting logging_info: %s", err) + } + d.Set("zookeeper_connect_string", aws.StringValue(cluster.ZookeeperConnectString)) return nil @@ -454,12 +537,13 @@ func resourceAwsMskClusterUpdate(d *schema.ResourceData, meta interface{}) error } } - if d.HasChange("enhanced_monitoring") || d.HasChange("open_monitoring") { + if d.HasChange("enhanced_monitoring") || d.HasChange("open_monitoring") || d.HasChange("logging_info") { input := &kafka.UpdateMonitoringInput{ ClusterArn: aws.String(d.Id()), CurrentVersion: aws.String(d.Get("current_version").(string)), EnhancedMonitoring: aws.String(d.Get("enhanced_monitoring").(string)), OpenMonitoring: expandMskOpenMonitoring(d.Get("open_monitoring").([]interface{})), + LoggingInfo: expandMskLoggingInfo(d.Get("logging_info").([]interface{})), } output, err := conn.UpdateMonitoring(input) @@ -672,6 +756,82 @@ func expandMskOpenMonitoringPrometheusNodeExporter(l []interface{}) *kafka.NodeE return nodeExporter } +func expandMskLoggingInfo(l []interface{}) *kafka.LoggingInfo { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + loggingInfo := &kafka.LoggingInfo{ + BrokerLogs: expandMskLoggingInfoBrokerLogs(m["broker_logs"].([]interface{})), + } + + return loggingInfo +} + +func expandMskLoggingInfoBrokerLogs(l []interface{}) *kafka.BrokerLogs { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + brokerLogs := &kafka.BrokerLogs{ + CloudWatchLogs: expandMskLoggingInfoBrokerLogsCloudWatchLogs(m["cloudwatch_logs"].([]interface{})), + Firehose: expandMskLoggingInfoBrokerLogsFirehose(m["firehose"].([]interface{})), + S3: expandMskLoggingInfoBrokerLogsS3(m["s3"].([]interface{})), + } + + return brokerLogs +} + +func expandMskLoggingInfoBrokerLogsCloudWatchLogs(l []interface{}) *kafka.CloudWatchLogs { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + cloudWatchLogs := &kafka.CloudWatchLogs{ + Enabled: aws.Bool(m["enabled"].(bool)), + LogGroup: aws.String(m["log_group"].(string)), + } + + return cloudWatchLogs +} + +func expandMskLoggingInfoBrokerLogsFirehose(l []interface{}) *kafka.Firehose { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + firehose := &kafka.Firehose{ + Enabled: aws.Bool(m["enabled"].(bool)), + DeliveryStream: aws.String(m["delivery_stream"].(string)), + } + + return firehose +} + +func expandMskLoggingInfoBrokerLogsS3(l []interface{}) *kafka.S3 { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + s3 := &kafka.S3{ + Enabled: aws.Bool(m["enabled"].(bool)), + Bucket: aws.String(m["bucket"].(string)), + Prefix: aws.String(m["prefix"].(string)), + } + + return s3 +} + func flattenMskBrokerNodeGroupInfo(b *kafka.BrokerNodeGroupInfo) []map[string]interface{} { if b == nil { @@ -804,6 +964,72 @@ func flattenMskOpenMonitoringPrometheusNodeExporter(e *kafka.NodeExporter) []map return []map[string]interface{}{m} } +func flattenMskLoggingInfo(e *kafka.LoggingInfo) []map[string]interface{} { + if e == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "broker_logs": flattenMskLoggingInfoBrokerLogs(e.BrokerLogs), + } + + return []map[string]interface{}{m} +} + +func flattenMskLoggingInfoBrokerLogs(e *kafka.BrokerLogs) []map[string]interface{} { + if e == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "cloudwatch_logs": flattenMskLoggingInfoBrokerLogsCloudWatchLogs(e.CloudWatchLogs), + "firehose": flattenMskLoggingInfoBrokerLogsFirehose(e.Firehose), + "s3": flattenMskLoggingInfoBrokerLogsS3(e.S3), + } + + return []map[string]interface{}{m} +} + +func flattenMskLoggingInfoBrokerLogsCloudWatchLogs(e *kafka.CloudWatchLogs) []map[string]interface{} { + if e == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "enabled": aws.BoolValue(e.Enabled), + "log_group": aws.StringValue(e.LogGroup), + } + + return []map[string]interface{}{m} +} + +func flattenMskLoggingInfoBrokerLogsFirehose(e *kafka.Firehose) []map[string]interface{} { + if e == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "enabled": aws.BoolValue(e.Enabled), + "delivery_stream": aws.StringValue(e.DeliveryStream), + } + + return []map[string]interface{}{m} +} + +func flattenMskLoggingInfoBrokerLogsS3(e *kafka.S3) []map[string]interface{} { + if e == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "enabled": aws.BoolValue(e.Enabled), + "bucket": aws.StringValue(e.Bucket), + "prefix": aws.StringValue(e.Prefix), + } + + return []map[string]interface{}{m} +} + func resourceAwsMskClusterDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).kafkaconn diff --git a/aws/resource_aws_msk_cluster_test.go b/aws/resource_aws_msk_cluster_test.go index 5cfacf4a664..9ba563e2b35 100644 --- a/aws/resource_aws_msk_cluster_test.go +++ b/aws/resource_aws_msk_cluster_test.go @@ -463,6 +463,58 @@ func TestAccAWSMskCluster_OpenMonitoring(t *testing.T) { }) } +func TestAccAWSMskCluster_LoggingInfo(t *testing.T) { + var cluster1, cluster2 kafka.ClusterInfo + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_msk_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSMsk(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckMskClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccMskClusterConfigLoggingInfo(rName, false, false, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckMskClusterExists(resourceName, &cluster1), + resource.TestCheckResourceAttr(resourceName, "logging_info.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.cloudwatch_logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.cloudwatch_logs.0.enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.firehose.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.firehose.0.enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.s3.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.s3.0.enabled", "false"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "bootstrap_brokers", // API may mutate ordering and selection of brokers to return + "bootstrap_brokers_tls", // API may mutate ordering and selection of brokers to return + }, + }, + { + Config: testAccMskClusterConfigLoggingInfo(rName, true, true, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckMskClusterExists(resourceName, &cluster2), + testAccCheckMskClusterNotRecreated(&cluster1, &cluster2), + resource.TestCheckResourceAttr(resourceName, "logging_info.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.cloudwatch_logs.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.cloudwatch_logs.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.firehose.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.firehose.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.s3.#", "1"), + resource.TestCheckResourceAttr(resourceName, "logging_info.0.broker_logs.0.s3.0.enabled", "true"), + ), + }, + }, + }) +} + func TestAccAWSMskCluster_Tags(t *testing.T) { var cluster kafka.ClusterInfo var td kafka.ListTagsForResourceOutput @@ -625,6 +677,11 @@ resource "aws_vpc" "example_vpc" { data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_subnet" "example_subnet_az1" { @@ -986,6 +1043,111 @@ resource "aws_msk_cluster" "test" { `, rName, jmxExporterEnabled, nodeExporterEnabled) } +func testAccMskClusterConfigLoggingInfo(rName string, cloudwatchLogsEnabled bool, firehoseEnabled bool, s3Enabled bool) string { + cloudwatchLogsLogGroup := "" + firehoseDeliveryStream := "" + s3Bucket := "" + + if cloudwatchLogsEnabled { + cloudwatchLogsLogGroup = "${aws_cloudwatch_log_group.test.name}" + } + if firehoseEnabled { + firehoseDeliveryStream = "${aws_kinesis_firehose_delivery_stream.test.name}" + } + if s3Enabled { + s3Bucket = "${aws_s3_bucket.bucket.id}" + } + + return testAccMskClusterBaseConfig() + fmt.Sprintf(` +resource "aws_cloudwatch_log_group" "test" { + name = "msk_broker_logs" +} + +resource "aws_s3_bucket" "bucket" { + bucket = "msk-broker-logs-test-bucket" + acl = "private" +} + +resource "aws_iam_role" "firehose_role" { + name = "firehose_test_role" + + assume_role_policy = < 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { - return fmt.Errorf("error adding EC2 NAT Gateway (%s) tags: %s", d.Id(), err) - } - } - return resourceAwsNatGatewayRead(d, meta) } func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig // Refresh the NAT Gateway state ngRaw, state, err := NGStateRefreshFunc(conn, d.Id())() @@ -109,9 +105,9 @@ func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { } status := map[string]bool{ - "deleted": true, - "deleting": true, - "failed": true, + ec2.NatGatewayStateDeleted: true, + ec2.NatGatewayStateDeleting: true, + ec2.NatGatewayStateFailed: true, } if _, ok := status[strings.ToLower(state)]; ngRaw == nil || ok { @@ -131,7 +127,7 @@ func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { d.Set("private_ip", address.PrivateIp) d.Set("public_ip", address.PublicIp) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(ng.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(ng.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -174,8 +170,8 @@ func resourceAwsNatGatewayDelete(d *schema.ResourceData, meta interface{}) error } stateConf := &resource.StateChangeConf{ - Pending: []string{"deleting"}, - Target: []string{"deleted"}, + Pending: []string{ec2.NatGatewayStateDeleting}, + Target: []string{ec2.NatGatewayStateDeleted}, Refresh: NGStateRefreshFunc(conn, d.Id()), Timeout: 30 * time.Minute, Delay: 10 * time.Second, @@ -199,7 +195,7 @@ func NGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { } resp, err := conn.DescribeNatGateways(opts) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "NatGatewayNotFound" { + if isAWSErr(err, "NatGatewayNotFound", "") { resp = nil } else { log.Printf("Error on NGStateRefresh: %s", err) diff --git a/aws/resource_aws_nat_gateway_test.go b/aws/resource_aws_nat_gateway_test.go index 0b3caa0da98..d041ad9f9e6 100644 --- a/aws/resource_aws_nat_gateway_test.go +++ b/aws/resource_aws_nat_gateway_test.go @@ -58,11 +58,11 @@ func testSweepNatGateways(region string) error { func TestAccAWSNatGateway_basic(t *testing.T) { var natGateway ec2.NatGateway - resourceName := "aws_nat_gateway.gateway" + resourceName := "aws_nat_gateway.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_nat_gateway.gateway", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckNatGatewayDestroy, Steps: []resource.TestStep{ @@ -70,6 +70,7 @@ func TestAccAWSNatGateway_basic(t *testing.T) { Config: testAccNatGatewayConfig, Check: resource.ComposeTestCheckFunc( testAccCheckNatGatewayExists(resourceName, &natGateway), + resource.TestCheckResourceAttr(resourceName, "tags.#", "0"), ), }, { @@ -83,7 +84,7 @@ func TestAccAWSNatGateway_basic(t *testing.T) { func TestAccAWSNatGateway_tags(t *testing.T) { var natGateway ec2.NatGateway - resourceName := "aws_nat_gateway.gateway" + resourceName := "aws_nat_gateway.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -91,28 +92,34 @@ func TestAccAWSNatGateway_tags(t *testing.T) { CheckDestroy: testAccCheckNatGatewayDestroy, Steps: []resource.TestStep{ { - Config: testAccNatGatewayConfigTags, + Config: testAccNatGatewayConfigTags1("key1", "value1"), Check: resource.ComposeTestCheckFunc( testAccCheckNatGatewayExists(resourceName, &natGateway), - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "terraform-testacc-nat-gw-tags"), - resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), ), }, - { - Config: testAccNatGatewayConfigTagsUpdate, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccNatGatewayConfigTags2("key1", "value1updated", "key2", "value2"), Check: resource.ComposeTestCheckFunc( testAccCheckNatGatewayExists(resourceName, &natGateway), resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "terraform-testacc-nat-gw-tags"), - resource.TestCheckResourceAttr(resourceName, "tags.bar", "baz"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, + Config: testAccNatGatewayConfigTags1("key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckNatGatewayExists(resourceName, &natGateway), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), }, }, }) @@ -132,9 +139,9 @@ func testAccCheckNatGatewayDestroy(s *terraform.State) error { }) if err == nil { status := map[string]bool{ - "deleted": true, - "deleting": true, - "failed": true, + ec2.NatGatewayStateDeleted: true, + ec2.NatGatewayStateDeleting: true, + ec2.NatGatewayStateFailed: true, } if _, ok := status[strings.ToLower(*resp.NatGateways[0].State)]; len(resp.NatGateways) > 0 && !ok { return fmt.Errorf("still exists") @@ -184,8 +191,8 @@ func testAccCheckNatGatewayExists(n string, ng *ec2.NatGateway) resource.TestChe } } -const testAccNatGatewayConfig = ` -resource "aws_vpc" "vpc" { +const testAccNatGatewayConfigBase = ` +resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" tags = { Name = "terraform-testacc-nat-gw-basic" @@ -193,8 +200,8 @@ resource "aws_vpc" "vpc" { } resource "aws_subnet" "private" { - vpc_id = "${aws_vpc.vpc.id}" - cidr_block = "10.0.1.0/24" + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.0.1.0/24" map_public_ip_on_launch = false tags = { Name = "tf-acc-nat-gw-basic-private" @@ -202,211 +209,60 @@ resource "aws_subnet" "private" { } resource "aws_subnet" "public" { - vpc_id = "${aws_vpc.vpc.id}" - cidr_block = "10.0.2.0/24" + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.0.2.0/24" map_public_ip_on_launch = true tags = { Name = "tf-acc-nat-gw-basic-public" } } -resource "aws_internet_gateway" "gw" { - vpc_id = "${aws_vpc.vpc.id}" +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" } -resource "aws_eip" "nat_gateway" { +resource "aws_eip" "test" { vpc = true } - -// Actual SUT -resource "aws_nat_gateway" "gateway" { - allocation_id = "${aws_eip.nat_gateway.id}" - subnet_id = "${aws_subnet.public.id}" - - tags = { - Name = "terraform-testacc-nat-gw-basic" - } - - depends_on = ["aws_internet_gateway.gw"] -} - -resource "aws_route_table" "private" { - vpc_id = "${aws_vpc.vpc.id}" - - route { - cidr_block = "0.0.0.0/0" - nat_gateway_id = "${aws_nat_gateway.gateway.id}" - } -} - -resource "aws_route_table_association" "private" { - subnet_id = "${aws_subnet.private.id}" - route_table_id = "${aws_route_table.private.id}" -} - -resource "aws_route_table" "public" { - vpc_id = "${aws_vpc.vpc.id}" - - route { - cidr_block = "0.0.0.0/0" - gateway_id = "${aws_internet_gateway.gw.id}" - } -} - -resource "aws_route_table_association" "public" { - subnet_id = "${aws_subnet.public.id}" - route_table_id = "${aws_route_table.public.id}" -} ` -const testAccNatGatewayConfigTags = ` -resource "aws_vpc" "vpc" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-nat-gw-tags" - } -} - -resource "aws_subnet" "private" { - vpc_id = "${aws_vpc.vpc.id}" - cidr_block = "10.0.1.0/24" - map_public_ip_on_launch = false - tags = { - Name = "tf-acc-nat-gw-tags-private" - } -} - -resource "aws_subnet" "public" { - vpc_id = "${aws_vpc.vpc.id}" - cidr_block = "10.0.2.0/24" - map_public_ip_on_launch = true - tags = { - Name = "tf-acc-nat-gw-tags-public" - } -} - -resource "aws_internet_gateway" "gw" { - vpc_id = "${aws_vpc.vpc.id}" -} - -resource "aws_eip" "nat_gateway" { - vpc = true -} - +const testAccNatGatewayConfig = testAccNatGatewayConfigBase + ` // Actual SUT -resource "aws_nat_gateway" "gateway" { - allocation_id = "${aws_eip.nat_gateway.id}" - subnet_id = "${aws_subnet.public.id}" +resource "aws_nat_gateway" "test" { + allocation_id = "${aws_eip.test.id}" + subnet_id = "${aws_subnet.public.id}" - tags = { - Name = "terraform-testacc-nat-gw-tags" - foo = "bar" - } - - depends_on = ["aws_internet_gateway.gw"] -} - -resource "aws_route_table" "private" { - vpc_id = "${aws_vpc.vpc.id}" - - route { - cidr_block = "0.0.0.0/0" - nat_gateway_id = "${aws_nat_gateway.gateway.id}" - } -} - -resource "aws_route_table_association" "private" { - subnet_id = "${aws_subnet.private.id}" - route_table_id = "${aws_route_table.private.id}" -} - -resource "aws_route_table" "public" { - vpc_id = "${aws_vpc.vpc.id}" - - route { - cidr_block = "0.0.0.0/0" - gateway_id = "${aws_internet_gateway.gw.id}" - } -} - -resource "aws_route_table_association" "public" { - subnet_id = "${aws_subnet.public.id}" - route_table_id = "${aws_route_table.public.id}" + depends_on = ["aws_internet_gateway.test"] } ` -const testAccNatGatewayConfigTagsUpdate = ` -resource "aws_vpc" "vpc" { - cidr_block = "10.0.0.0/16" - tags = { - Name = "terraform-testacc-nat-gw-tags" - } -} +func testAccNatGatewayConfigTags1(tagKey1, tagValue1 string) string { + return testAccNatGatewayConfigBase + fmt.Sprintf(` +resource "aws_nat_gateway" "test" { + allocation_id = "${aws_eip.test.id}" + subnet_id = "${aws_subnet.public.id}" -resource "aws_subnet" "private" { - vpc_id = "${aws_vpc.vpc.id}" - cidr_block = "10.0.1.0/24" - map_public_ip_on_launch = false - tags = { - Name = "tf-acc-nat-gw-tags-private" - } -} - -resource "aws_subnet" "public" { - vpc_id = "${aws_vpc.vpc.id}" - cidr_block = "10.0.2.0/24" - map_public_ip_on_launch = true tags = { - Name = "tf-acc-nat-gw-tags-public" + %[1]q = %[2]q } -} -resource "aws_internet_gateway" "gw" { - vpc_id = "${aws_vpc.vpc.id}" + depends_on = ["aws_internet_gateway.test"] } - -resource "aws_eip" "nat_gateway" { - vpc = true +`, tagKey1, tagValue1) } -// Actual SUT -resource "aws_nat_gateway" "gateway" { - allocation_id = "${aws_eip.nat_gateway.id}" - subnet_id = "${aws_subnet.public.id}" +func testAccNatGatewayConfigTags2(tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccNatGatewayConfigBase + fmt.Sprintf(` +resource "aws_nat_gateway" "test" { + allocation_id = "${aws_eip.test.id}" + subnet_id = "${aws_subnet.public.id}" tags = { - Name = "terraform-testacc-nat-gw-tags" - bar = "baz" + %[1]q = %[2]q + %[3]q = %[4]q } - depends_on = ["aws_internet_gateway.gw"] + depends_on = ["aws_internet_gateway.test"] } - -resource "aws_route_table" "private" { - vpc_id = "${aws_vpc.vpc.id}" - - route { - cidr_block = "0.0.0.0/0" - nat_gateway_id = "${aws_nat_gateway.gateway.id}" - } -} - -resource "aws_route_table_association" "private" { - subnet_id = "${aws_subnet.private.id}" - route_table_id = "${aws_route_table.private.id}" -} - -resource "aws_route_table" "public" { - vpc_id = "${aws_vpc.vpc.id}" - - route { - cidr_block = "0.0.0.0/0" - gateway_id = "${aws_internet_gateway.gw.id}" - } +`, tagKey1, tagValue1, tagKey2, tagValue2) } - -resource "aws_route_table_association" "public" { - subnet_id = "${aws_subnet.public.id}" - route_table_id = "${aws_route_table.public.id}" -} -` diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index 4283fe4e548..974f42ed00b 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -21,6 +21,8 @@ const ( // is not currently available in the AWS sdk-for-go // https://docs.aws.amazon.com/sdk-for-go/api/service/neptune/#pkg-constants CloudwatchLogsExportsAudit = "audit" + + neptuneDefaultPort = 8182 ) func resourceAwsNeptuneCluster() *schema.Resource { @@ -194,7 +196,7 @@ func resourceAwsNeptuneCluster() *schema.Resource { "port": { Type: schema.TypeInt, Optional: true, - Default: 8182, + Default: neptuneDefaultPort, ForceNew: true, }, @@ -244,7 +246,6 @@ func resourceAwsNeptuneCluster() *schema.Resource { "snapshot_identifier": { Type: schema.TypeString, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, }, "tags": tagsSchema(), @@ -469,6 +470,7 @@ func resourceAwsNeptuneClusterRead(d *schema.ResourceData, meta interface{}) err func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, dbc *neptune.DBCluster) error { conn := meta.(*AWSClient).neptuneconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { return fmt.Errorf("Error saving AvailabilityZones to state for Neptune Cluster (%s): %s", d.Id(), err) @@ -532,7 +534,7 @@ func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, return fmt.Errorf("error listing tags for Neptune Cluster (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -594,7 +596,6 @@ func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) e } if d.HasChange("neptune_cluster_parameter_group_name") { - d.SetPartial("neptune_cluster_parameter_group_name") req.DBClusterParameterGroupName = aws.String(d.Get("neptune_cluster_parameter_group_name").(string)) requestUpdate = true } @@ -681,7 +682,6 @@ func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error updating Neptune Cluster (%s) tags: %s", d.Get("arn").(string), err) } - d.SetPartial("tags") } return resourceAwsNeptuneClusterRead(d, meta) diff --git a/aws/resource_aws_neptune_cluster_instance.go b/aws/resource_aws_neptune_cluster_instance.go index 0db3d20cc49..3ae7e12a258 100644 --- a/aws/resource_aws_neptune_cluster_instance.go +++ b/aws/resource_aws_neptune_cluster_instance.go @@ -134,7 +134,7 @@ func resourceAwsNeptuneClusterInstance() *schema.Resource { "port": { Type: schema.TypeInt, Optional: true, - Default: 8182, + Default: neptuneDefaultPort, ForceNew: true, }, @@ -292,6 +292,8 @@ func resourceAwsNeptuneClusterInstanceRead(d *schema.ResourceData, meta interfac } conn := meta.(*AWSClient).neptuneconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ DBClusterIdentifier: db.DBClusterIdentifier, }) @@ -354,7 +356,7 @@ func resourceAwsNeptuneClusterInstanceRead(d *schema.ResourceData, meta interfac return fmt.Errorf("error listing tags for Neptune Cluster Instance (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -381,25 +383,21 @@ func resourceAwsNeptuneClusterInstanceUpdate(d *schema.ResourceData, meta interf } if d.HasChange("preferred_backup_window") { - d.SetPartial("preferred_backup_window") req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) requestUpdate = true } if d.HasChange("preferred_maintenance_window") { - d.SetPartial("preferred_maintenance_window") req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) requestUpdate = true } if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) requestUpdate = true } if d.HasChange("promotion_tier") { - d.SetPartial("promotion_tier") req.PromotionTier = aws.Int64(int64(d.Get("promotion_tier").(int))) requestUpdate = true } @@ -447,8 +445,6 @@ func resourceAwsNeptuneClusterInstanceUpdate(d *schema.ResourceData, meta interf if err := keyvaluetags.NeptuneUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Neptune Cluster Instance (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } return resourceAwsNeptuneClusterInstanceRead(d, meta) @@ -493,6 +489,7 @@ var resourceAwsNeptuneClusterInstanceCreateUpdatePendingStates = []string{ "renaming", "starting", "upgrading", + "configuring-log-exports", } var resourceAwsNeptuneClusterInstanceDeletePendingStates = []string{ diff --git a/aws/resource_aws_neptune_cluster_instance_test.go b/aws/resource_aws_neptune_cluster_instance_test.go index b54c2bd5e55..0fcd6bc3d41 100644 --- a/aws/resource_aws_neptune_cluster_instance_test.go +++ b/aws/resource_aws_neptune_cluster_instance_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "regexp" + "strconv" "strings" "testing" @@ -15,6 +16,13 @@ import ( func TestAccAWSNeptuneClusterInstance_basic(t *testing.T) { var v neptune.DBInstance + rInt := acctest.RandInt() + + resourceName := "aws_neptune_cluster_instance.cluster_instances" + clusterResourceName := "aws_neptune_cluster.default" + parameterGroupResourceName := "aws_neptune_parameter_group.test" + + clusterInstanceName := fmt.Sprintf("tf-cluster-instance-%d", rInt) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -22,40 +30,38 @@ func TestAccAWSNeptuneClusterInstance_basic(t *testing.T) { CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSNeptuneClusterInstanceConfig(acctest.RandInt()), + Config: testAccAWSNeptuneClusterInstanceConfig(clusterInstanceName, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.cluster_instances", &v), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), testAccCheckAWSNeptuneClusterInstanceAttributes(&v), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "address"), - resource.TestMatchResourceAttr("aws_neptune_cluster_instance.cluster_instances", "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:[^:]+:db:.+`)), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "auto_minor_version_upgrade", "true"), - resource.TestMatchResourceAttr("aws_neptune_cluster_instance.cluster_instances", "availability_zone", regexp.MustCompile(fmt.Sprintf("^%s", testAccGetRegion()))), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "cluster_identifier"), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "dbi_resource_id"), - resource.TestMatchResourceAttr("aws_neptune_cluster_instance.cluster_instances", "endpoint", regexp.MustCompile(`:8182$`)), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "engine", "neptune"), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "engine_version"), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "identifier"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "instance_class", "db.r4.large"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "kms_key_arn", ""), - resource.TestMatchResourceAttr("aws_neptune_cluster_instance.cluster_instances", "neptune_parameter_group_name", regexp.MustCompile(`^tf-cluster-test-group-`)), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "neptune_subnet_group_name", "default"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "port", "8182"), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "preferred_backup_window"), - resource.TestCheckResourceAttrSet("aws_neptune_cluster_instance.cluster_instances", "preferred_maintenance_window"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "promotion_tier", "3"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "publicly_accessible", "false"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "storage_encrypted", "false"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "tags.%", "0"), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "writer", "true"), + testAccCheckNeptuneClusterAddress(&v, resourceName, neptuneDefaultPort), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "rds", fmt.Sprintf("db:%s", clusterInstanceName)), + resource.TestCheckResourceAttr(resourceName, "auto_minor_version_upgrade", "true"), + resource.TestMatchResourceAttr(resourceName, "availability_zone", regexp.MustCompile(fmt.Sprintf("^%s[a-z]{1}$", testAccGetRegion()))), + resource.TestCheckResourceAttrPair(resourceName, "cluster_identifier", clusterResourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "dbi_resource_id"), + resource.TestCheckResourceAttr(resourceName, "engine", "neptune"), + resource.TestCheckResourceAttrSet(resourceName, "engine_version"), + resource.TestCheckResourceAttr(resourceName, "identifier", clusterInstanceName), + resource.TestCheckResourceAttr(resourceName, "instance_class", "db.r4.large"), + resource.TestCheckResourceAttr(resourceName, "kms_key_arn", ""), + resource.TestCheckResourceAttrPair(resourceName, "neptune_parameter_group_name", parameterGroupResourceName, "name"), + resource.TestCheckResourceAttr(resourceName, "neptune_subnet_group_name", "default"), + resource.TestCheckResourceAttrSet(resourceName, "preferred_backup_window"), + resource.TestCheckResourceAttrSet(resourceName, "preferred_maintenance_window"), + resource.TestCheckResourceAttr(resourceName, "promotion_tier", "3"), + resource.TestCheckResourceAttr(resourceName, "publicly_accessible", "false"), + resource.TestCheckResourceAttr(resourceName, "storage_encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "writer", "true"), ), }, { - Config: testAccAWSNeptuneClusterInstanceConfigModified(acctest.RandInt()), + Config: testAccAWSNeptuneClusterInstanceConfigModified(clusterInstanceName, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.cluster_instances", &v), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), testAccCheckAWSNeptuneClusterInstanceAttributes(&v), - resource.TestCheckResourceAttr("aws_neptune_cluster_instance.cluster_instances", "auto_minor_version_upgrade", "false"), + resource.TestCheckResourceAttr(resourceName, "auto_minor_version_upgrade", "false"), ), }, }, @@ -64,6 +70,10 @@ func TestAccAWSNeptuneClusterInstance_basic(t *testing.T) { func TestAccAWSNeptuneClusterInstance_withaz(t *testing.T) { var v neptune.DBInstance + rInt := acctest.RandInt() + + resourceName := "aws_neptune_cluster_instance.cluster_instances" + availabiltyZonesDataSourceName := "data.aws_availability_zones.available" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -71,11 +81,12 @@ func TestAccAWSNeptuneClusterInstance_withaz(t *testing.T) { CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSNeptuneClusterInstanceConfig_az(acctest.RandInt()), + Config: testAccAWSNeptuneClusterInstanceConfig_az(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.cluster_instances", &v), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), testAccCheckAWSNeptuneClusterInstanceAttributes(&v), - resource.TestMatchResourceAttr("aws_neptune_cluster_instance.cluster_instances", "availability_zone", regexp.MustCompile("^us-west-2[a-z]{1}$")), + resource.TestMatchResourceAttr(resourceName, "availability_zone", regexp.MustCompile(fmt.Sprintf("^%s[a-z]{1}$", testAccGetRegion()))), // NOPE + resource.TestCheckResourceAttrPair(resourceName, "availability_zone", availabiltyZonesDataSourceName, "names.0"), ), }, }, @@ -86,18 +97,21 @@ func TestAccAWSNeptuneClusterInstance_namePrefix(t *testing.T) { var v neptune.DBInstance rInt := acctest.RandInt() + resourceName := "aws_neptune_cluster_instance.test" + + namePrefix := "tf-cluster-instance-" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSNeptuneClusterInstanceConfig_namePrefix(rInt), + Config: testAccAWSNeptuneClusterInstanceConfig_namePrefix(namePrefix, rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.test", &v), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), testAccCheckAWSNeptuneClusterInstanceAttributes(&v), - resource.TestMatchResourceAttr( - "aws_neptune_cluster_instance.test", "identifier", regexp.MustCompile("^tf-cluster-instance-")), + resource.TestMatchResourceAttr(resourceName, "identifier", regexp.MustCompile(fmt.Sprintf("^%s", namePrefix))), ), }, }, @@ -108,6 +122,9 @@ func TestAccAWSNeptuneClusterInstance_withSubnetGroup(t *testing.T) { var v neptune.DBInstance rInt := acctest.RandInt() + resourceName := "aws_neptune_cluster_instance.test" + subnetGroupResourceName := "aws_neptune_subnet_group.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -116,10 +133,9 @@ func TestAccAWSNeptuneClusterInstance_withSubnetGroup(t *testing.T) { { Config: testAccAWSNeptuneClusterInstanceConfig_withSubnetGroup(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.test", &v), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), testAccCheckAWSNeptuneClusterInstanceAttributes(&v), - resource.TestCheckResourceAttr( - "aws_neptune_cluster_instance.test", "neptune_subnet_group_name", fmt.Sprintf("tf-test-%d", rInt)), + resource.TestCheckResourceAttrPair(resourceName, "neptune_subnet_group_name", subnetGroupResourceName, "name"), ), }, }, @@ -128,6 +144,9 @@ func TestAccAWSNeptuneClusterInstance_withSubnetGroup(t *testing.T) { func TestAccAWSNeptuneClusterInstance_generatedName(t *testing.T) { var v neptune.DBInstance + rInt := acctest.RandInt() + + resourceName := "aws_neptune_cluster_instance.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -135,12 +154,11 @@ func TestAccAWSNeptuneClusterInstance_generatedName(t *testing.T) { CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSNeptuneClusterInstanceConfig_generatedName(acctest.RandInt()), + Config: testAccAWSNeptuneClusterInstanceConfig_generatedName(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.test", &v), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), testAccCheckAWSNeptuneClusterInstanceAttributes(&v), - resource.TestMatchResourceAttr( - "aws_neptune_cluster_instance.test", "identifier", regexp.MustCompile("^tf-")), + resource.TestMatchResourceAttr(resourceName, "identifier", regexp.MustCompile("^tf-")), ), }, }, @@ -149,7 +167,10 @@ func TestAccAWSNeptuneClusterInstance_generatedName(t *testing.T) { func TestAccAWSNeptuneClusterInstance_kmsKey(t *testing.T) { var v neptune.DBInstance - keyRegex := regexp.MustCompile("^arn:aws:kms:") + rInt := acctest.RandInt() + + resourceName := "aws_neptune_cluster_instance.cluster_instances" + kmsKeyResourceName := "aws_kms_key.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -157,11 +178,10 @@ func TestAccAWSNeptuneClusterInstance_kmsKey(t *testing.T) { CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSNeptuneClusterInstanceConfigKmsKey(acctest.RandInt()), + Config: testAccAWSNeptuneClusterInstanceConfigKmsKey(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSNeptuneClusterInstanceExists("aws_neptune_cluster_instance.cluster_instances", &v), - resource.TestMatchResourceAttr( - "aws_neptune_cluster_instance.cluster_instances", "kms_key_arn", keyRegex), + testAccCheckAWSNeptuneClusterInstanceExists(resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_arn", kmsKeyResourceName, "arn"), ), }, }, @@ -214,24 +234,46 @@ func testAccCheckAWSNeptuneClusterInstanceAttributes(v *neptune.DBInstance) reso } } -func testAccAWSNeptuneClusterInstanceConfig(n int) string { - return fmt.Sprintf(` -resource "aws_neptune_cluster" "default" { - cluster_identifier = "tf-neptune-cluster-test-%d" - availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"] - skip_final_snapshot = true +func testAccCheckNeptuneClusterAddress(v *neptune.DBInstance, resourceName string, portNumber int) resource.TestCheckFunc { + return func(s *terraform.State) error { + address := aws.StringValue(v.Endpoint.Address) + if err := resource.TestCheckResourceAttr(resourceName, "address", address)(s); err != nil { + return err + } + + port := strconv.Itoa(portNumber) + if err := resource.TestCheckResourceAttr(resourceName, "port", port)(s); err != nil { + return err + } + + if err := resource.TestCheckResourceAttr(resourceName, "endpoint", fmt.Sprintf("%s:%s", address, port))(s); err != nil { + return err + } + + return nil + } } +func testAccAWSNeptuneClusterInstanceConfig(instanceName string, n int) string { + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` resource "aws_neptune_cluster_instance" "cluster_instances" { - identifier = "tf-cluster-instance-%d" + identifier = %[1]q cluster_identifier = "${aws_neptune_cluster.default.id}" instance_class = "db.r4.large" - neptune_parameter_group_name = "${aws_neptune_parameter_group.bar.name}" + neptune_parameter_group_name = "${aws_neptune_parameter_group.test.name}" promotion_tier = "3" } -resource "aws_neptune_parameter_group" "bar" { - name = "tf-cluster-test-group-%d" +resource "aws_neptune_cluster" "default" { + cluster_identifier = "tf-neptune-cluster-test-%[2]d" + availability_zones = local.availability_zone_names + skip_final_snapshot = true +} + +resource "aws_neptune_parameter_group" "test" { + name = "tf-cluster-test-group-%[2]d" family = "neptune1" parameter { @@ -240,31 +282,33 @@ resource "aws_neptune_parameter_group" "bar" { } tags = { - foo = "bar" + Name = "test" } } -`, n, n, n) -} - -func testAccAWSNeptuneClusterInstanceConfigModified(n int) string { - return fmt.Sprintf(` -resource "aws_neptune_cluster" "default" { - cluster_identifier = "tf-neptune-cluster-test-%d" - availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"] - skip_final_snapshot = true +`, instanceName, n)) } +func testAccAWSNeptuneClusterInstanceConfigModified(instanceName string, n int) string { + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` resource "aws_neptune_cluster_instance" "cluster_instances" { - identifier = "tf-cluster-instance-%d" + identifier = %[1]q cluster_identifier = "${aws_neptune_cluster.default.id}" instance_class = "db.r4.large" - neptune_parameter_group_name = "${aws_neptune_parameter_group.bar.name}" + neptune_parameter_group_name = "${aws_neptune_parameter_group.test.name}" auto_minor_version_upgrade = false promotion_tier = "3" } -resource "aws_neptune_parameter_group" "bar" { - name = "tf-cluster-test-group-%d" +resource "aws_neptune_cluster" "default" { + cluster_identifier = "tf-neptune-cluster-test-%[2]d" + availability_zones = local.availability_zone_names + skip_final_snapshot = true +} + +resource "aws_neptune_parameter_group" "test" { + name = "tf-cluster-test-group-%[2]d" family = "neptune1" parameter { @@ -273,33 +317,33 @@ resource "aws_neptune_parameter_group" "bar" { } tags = { - foo = "bar" + Name = "test" } } -`, n, n, n) +`, instanceName, n)) } func testAccAWSNeptuneClusterInstanceConfig_az(n int) string { - return fmt.Sprintf(` -data "aws_availability_zones" "available" {} - -resource "aws_neptune_cluster" "default" { - cluster_identifier = "tf-neptune-cluster-test-%d" - availability_zones = ["${data.aws_availability_zones.available.names[0]}", "${data.aws_availability_zones.available.names[1]}", "${data.aws_availability_zones.available.names[2]}"] - skip_final_snapshot = true -} - + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` resource "aws_neptune_cluster_instance" "cluster_instances" { - identifier = "tf-cluster-instance-%d" + identifier = "tf-cluster-instance-%[1]d" cluster_identifier = "${aws_neptune_cluster.default.id}" instance_class = "db.r4.large" - neptune_parameter_group_name = "${aws_neptune_parameter_group.bar.name}" + neptune_parameter_group_name = "${aws_neptune_parameter_group.test.name}" promotion_tier = "3" - availability_zone = "${data.aws_availability_zones.available.names[0]}" + availability_zone = data.aws_availability_zones.available.names[0] +} + +resource "aws_neptune_cluster" "default" { + cluster_identifier = "tf-neptune-cluster-test-%[1]d" + availability_zones = local.availability_zone_names + skip_final_snapshot = true } -resource "aws_neptune_parameter_group" "bar" { - name = "tf-cluster-test-group-%d" +resource "aws_neptune_parameter_group" "test" { + name = "tf-cluster-test-group-%[1]d" family = "neptune1" parameter { @@ -308,22 +352,24 @@ resource "aws_neptune_parameter_group" "bar" { } tags = { - foo = "bar" + Name = "test" } } -`, n, n, n) +`, n)) } func testAccAWSNeptuneClusterInstanceConfig_withSubnetGroup(n int) string { - return fmt.Sprintf(` + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` resource "aws_neptune_cluster_instance" "test" { - identifier = "tf-cluster-instance-%d" + identifier = "tf-cluster-instance-%[1]d" cluster_identifier = "${aws_neptune_cluster.test.id}" instance_class = "db.r4.large" } resource "aws_neptune_cluster" "test" { - cluster_identifier = "tf-neptune-cluster-%d" + cluster_identifier = "tf-neptune-cluster-%[1]d" neptune_subnet_group_name = "${aws_neptune_subnet_group.test.name}" skip_final_snapshot = true } @@ -357,22 +403,24 @@ resource "aws_subnet" "b" { } resource "aws_neptune_subnet_group" "test" { - name = "tf-test-%d" + name = "tf-test-%[1]d" subnet_ids = ["${aws_subnet.a.id}", "${aws_subnet.b.id}"] } -`, n, n, n) +`, n)) } -func testAccAWSNeptuneClusterInstanceConfig_namePrefix(n int) string { - return fmt.Sprintf(` +func testAccAWSNeptuneClusterInstanceConfig_namePrefix(namePrefix string, n int) string { + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` resource "aws_neptune_cluster_instance" "test" { - identifier_prefix = "tf-cluster-instance-" + identifier_prefix = %[1]q cluster_identifier = "${aws_neptune_cluster.test.id}" instance_class = "db.r4.large" } resource "aws_neptune_cluster" "test" { - cluster_identifier = "tf-neptune-cluster-%d" + cluster_identifier = "tf-neptune-cluster-%[2]d" neptune_subnet_group_name = "${aws_neptune_subnet_group.test.name}" skip_final_snapshot = true } @@ -406,21 +454,23 @@ resource "aws_subnet" "b" { } resource "aws_neptune_subnet_group" "test" { - name = "tf-test-%d" + name = "tf-test-%[2]d" subnet_ids = ["${aws_subnet.a.id}", "${aws_subnet.b.id}"] } -`, n, n) +`, namePrefix, n)) } func testAccAWSNeptuneClusterInstanceConfig_generatedName(n int) string { - return fmt.Sprintf(` + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` resource "aws_neptune_cluster_instance" "test" { cluster_identifier = "${aws_neptune_cluster.test.id}" instance_class = "db.r4.large" } resource "aws_neptune_cluster" "test" { - cluster_identifier = "tf-neptune-cluster-%d" + cluster_identifier = "tf-neptune-cluster-%[1]d" neptune_subnet_group_name = "${aws_neptune_subnet_group.test.name}" skip_final_snapshot = true } @@ -454,16 +504,18 @@ resource "aws_subnet" "b" { } resource "aws_neptune_subnet_group" "test" { - name = "tf-test-%d" + name = "tf-test-%[1]d" subnet_ids = ["${aws_subnet.a.id}", "${aws_subnet.b.id}"] } -`, n, n) +`, n)) } func testAccAWSNeptuneClusterInstanceConfigKmsKey(n int) string { - return fmt.Sprintf(` -resource "aws_kms_key" "foo" { - description = "Terraform acc test %d" + return composeConfig( + testAccAWSNeptuneClusterConfigBase, + fmt.Sprintf(` +resource "aws_kms_key" "test" { + description = "Terraform acc test %[1]d" policy = < 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding EC2 VPN Gateway (%s) tags: %s", d.Id(), err) + } + } // Update rules and subnet association once acl is created return resourceAwsNetworkAclUpdate(d, meta) @@ -183,6 +188,7 @@ func resourceAwsNetworkAclCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeNetworkAcls(&ec2.DescribeNetworkAclsInput{ NetworkAclIds: []*string{aws.String(d.Id())}, @@ -224,7 +230,7 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error { d.Set("vpc_id", networkAcl.VpcId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(networkAcl.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(networkAcl.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -251,7 +257,6 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - d.Partial(true) if d.HasChange("ingress") { err := updateNetworkAclEntries(d, "ingress", conn) @@ -298,13 +303,16 @@ func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error } 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) + log.Printf("[DEBUG] Replacing Network Acl Association (%s) with Default Network ACL ID (%s)", *association.NetworkAclAssociationId, *defaultAcl.NetworkAclId) _, err = conn.ReplaceNetworkAclAssociation(&ec2.ReplaceNetworkAclAssociationInput{ AssociationId: association.NetworkAclAssociationId, NetworkAclId: defaultAcl.NetworkAclId, }) if err != nil { - return err + if isAWSErr(err, "InvalidAssociationID.NotFound", "") { + continue + } + return fmt.Errorf("Error Replacing Default Network Acl Association: %s", err) } } } @@ -327,7 +335,7 @@ func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error } - if d.HasChange("tags") { + if d.HasChange("tags") && !d.IsNewResource() { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { @@ -335,7 +343,6 @@ func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error } } - d.Partial(false) return resourceAwsNetworkAclRead(d, meta) } diff --git a/aws/resource_aws_network_acl_rule.go b/aws/resource_aws_network_acl_rule.go index ae3a52a8e16..c8adab7a897 100644 --- a/aws/resource_aws_network_acl_rule.go +++ b/aws/resource_aws_network_acl_rule.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "strconv" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -19,6 +20,30 @@ func resourceAwsNetworkAclRule() *schema.Resource { Create: resourceAwsNetworkAclRuleCreate, Read: resourceAwsNetworkAclRuleRead, Delete: resourceAwsNetworkAclRuleDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 4 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" || idParts[3] == "" { + return nil, fmt.Errorf("unexpected format of ID (%q), expected NETWORK_ACL_ID:RULE_NUMBER:PROTOCOL:EGRESS", d.Id()) + } + networkAclID := idParts[0] + ruleNumber, err := strconv.Atoi(idParts[1]) + if err != nil { + return nil, err + } + protocol := idParts[2] + egress, err := strconv.ParseBool(idParts[3]) + if err != nil { + return nil, err + } + + d.Set("network_acl_id", networkAclID) + d.Set("rule_number", ruleNumber) + d.Set("egress", egress) + d.SetId(networkAclIdRuleNumberEgressHash(networkAclID, ruleNumber, egress, protocol)) + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "network_acl_id": { @@ -210,8 +235,8 @@ func resourceAwsNetworkAclRuleRead(d *schema.ResourceData, meta interface{}) err d.Set("ipv6_cidr_block", resp.Ipv6CidrBlock) d.Set("egress", resp.Egress) if resp.IcmpTypeCode != nil { - d.Set("icmp_code", resp.IcmpTypeCode.Code) - d.Set("icmp_type", resp.IcmpTypeCode.Type) + d.Set("icmp_code", strconv.FormatInt(aws.Int64Value(resp.IcmpTypeCode.Code), 10)) + d.Set("icmp_type", strconv.FormatInt(aws.Int64Value(resp.IcmpTypeCode.Type), 10)) } if resp.PortRange != nil { d.Set("from_port", resp.PortRange.From) diff --git a/aws/resource_aws_network_acl_rule_test.go b/aws/resource_aws_network_acl_rule_test.go index db9186ce841..60cdd3e134e 100644 --- a/aws/resource_aws_network_acl_rule_test.go +++ b/aws/resource_aws_network_acl_rule_test.go @@ -30,6 +30,24 @@ func TestAccAWSNetworkAclRule_basic(t *testing.T) { testAccCheckAWSNetworkAclRuleExists("aws_network_acl_rule.wibble", &networkAcl), ), }, + { + ResourceName: "aws_network_acl_rule.baz", + ImportState: true, + ImportStateIdFunc: testAccAWSNetworkAclRuleImportStateIdFunc("aws_network_acl_rule.baz", "tcp"), + ImportStateVerify: true, + }, + { + ResourceName: "aws_network_acl_rule.qux", + ImportState: true, + ImportStateIdFunc: testAccAWSNetworkAclRuleImportStateIdFunc("aws_network_acl_rule.qux", "icmp"), + ImportStateVerify: true, + }, + { + ResourceName: "aws_network_acl_rule.wibble", + ImportState: true, + ImportStateIdFunc: testAccAWSNetworkAclRuleImportStateIdFunc("aws_network_acl_rule.wibble", "icmp"), + ImportStateVerify: true, + }, }, }) } @@ -124,6 +142,12 @@ func TestAccAWSNetworkAclRule_ipv6(t *testing.T) { testAccCheckAWSNetworkAclRuleExists("aws_network_acl_rule.baz", &networkAcl), ), }, + { + ResourceName: "aws_network_acl_rule.baz", + ImportState: true, + ImportStateIdFunc: testAccAWSNetworkAclRuleImportStateIdFunc("aws_network_acl_rule.baz", "tcp"), + ImportStateVerify: true, + }, }, }) } @@ -144,6 +168,12 @@ func TestAccAWSNetworkAclRule_ipv6ICMP(t *testing.T) { testAccCheckAWSNetworkAclRuleExists(resourceName, &networkAcl), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSNetworkAclRuleImportStateIdFunc(resourceName, "58"), + ImportStateVerify: true, + }, }, }) } @@ -177,6 +207,12 @@ func TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate(t *testi testAccCheckAWSNetworkAclRuleExists(resourceName, &networkAcl), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSNetworkAclRuleImportStateIdFunc(resourceName, "tcp"), + ImportStateVerify: true, + }, }, }) } @@ -632,7 +668,6 @@ resource "aws_network_acl" "test" { } resource "aws_network_acl_rule" "test" { - from_port = -1 icmp_code = -1 icmp_type = -1 ipv6_cidr_block = "::/0" @@ -640,7 +675,6 @@ resource "aws_network_acl_rule" "test" { protocol = 58 rule_action = "allow" rule_number = 150 - to_port = -1 } `, rName, rName) } @@ -677,3 +711,21 @@ resource "aws_network_acl_rule" "test" { } `, ipv6Enabled) } + +func testAccAWSNetworkAclRuleImportStateIdFunc(resourceName, resourceProtocol string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("not found: %s", resourceName) + } + networkAclId := rs.Primary.Attributes["network_acl_id"] + ruleNumber := rs.Primary.Attributes["rule_number"] + protocol := rs.Primary.Attributes["protocol"] + // Ensure the resource's ID will be determined from the original protocol value set in the resource's config + if protocol != resourceProtocol { + protocol = resourceProtocol + } + egress := rs.Primary.Attributes["egress"] + return fmt.Sprintf("%s:%s:%s:%s", networkAclId, ruleNumber, protocol, egress), nil + } +} diff --git a/aws/resource_aws_network_acl_test.go b/aws/resource_aws_network_acl_test.go index df8bb42563f..f55382b2a06 100644 --- a/aws/resource_aws_network_acl_test.go +++ b/aws/resource_aws_network_acl_test.go @@ -256,10 +256,11 @@ func TestAccAWSNetworkAcl_EgressAndIngressRules(t *testing.T) { resourceName := "aws_network_acl.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSNetworkAclDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSNetworkAclEgressNIngressConfig, @@ -306,10 +307,11 @@ func TestAccAWSNetworkAcl_OnlyIngressRules_basic(t *testing.T) { resourceName := "aws_network_acl.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSNetworkAclDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSNetworkAclIngressConfig, @@ -344,10 +346,11 @@ func TestAccAWSNetworkAcl_OnlyIngressRules_update(t *testing.T) { resourceName := "aws_network_acl.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSNetworkAclDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSNetworkAclIngressConfig, @@ -589,10 +592,11 @@ func TestAccAWSNetworkAcl_ipv6Rules(t *testing.T) { resourceName := "aws_network_acl.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSNetworkAclDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSNetworkAclIpv6Config, @@ -648,10 +652,11 @@ func TestAccAWSNetworkAcl_ipv6VpcRules(t *testing.T) { resourceName := "aws_network_acl.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSNetworkAclDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSNetworkAclIpv6VpcConfig, diff --git a/aws/resource_aws_network_interface.go b/aws/resource_aws_network_interface.go index b568909a978..00ae2408bee 100644 --- a/aws/resource_aws_network_interface.go +++ b/aws/resource_aws_network_interface.go @@ -79,6 +79,11 @@ func resourceAwsNetworkInterface() *schema.Resource { Default: true, }, + "outpost_arn": { + Type: schema.TypeString, + Computed: true, + }, + "description": { Type: schema.TypeString, Optional: true, @@ -145,13 +150,20 @@ func resourceAwsNetworkInterfaceCreate(d *schema.ResourceData, meta interface{}) } d.SetId(*resp.NetworkInterface.NetworkInterfaceId) - log.Printf("[INFO] ENI ID: %s", d.Id()) + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding tags: %s", err) + } + } + return resourceAwsNetworkInterfaceUpdate(d, meta) } func resourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + describe_network_interfaces_request := &ec2.DescribeNetworkInterfacesInput{ NetworkInterfaceIds: []*string{aws.String(d.Id())}, } @@ -186,6 +198,7 @@ func resourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) e d.Set("private_dns_name", eni.PrivateDnsName) d.Set("mac_address", eni.MacAddress) d.Set("private_ip", eni.PrivateIpAddress) + d.Set("outpost_arn", eni.OutpostArn) if err := d.Set("private_ips", flattenNetworkInterfacesPrivateIPAddresses(eni.PrivateIpAddresses)); err != nil { return fmt.Errorf("error setting private_ips: %s", err) @@ -200,7 +213,7 @@ func resourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) e d.Set("source_dest_check", eni.SourceDestCheck) d.Set("subnet_id", eni.SubnetId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(eni.TagSet).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(eni.TagSet).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -261,7 +274,6 @@ func resourceAwsNetworkInterfaceDetach(oa *schema.Set, meta interface{}, eniId s func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - d.Partial(true) if d.HasChange("attachment") { oa, na := d.GetChange("attachment") @@ -285,8 +297,6 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error attaching ENI: %s", attach_err) } } - - d.SetPartial("attachment") } if d.HasChange("private_ips") { @@ -326,8 +336,6 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Failure to assign Private IPs: %s", err) } } - - d.SetPartial("private_ips") } // ModifyNetworkInterfaceAttribute needs to be called after creating an ENI @@ -342,8 +350,6 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Failure updating ENI: %s", err) } - - d.SetPartial("source_dest_check") } if d.HasChange("private_ips_count") && !d.IsNewResource() { @@ -384,8 +390,6 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Failure to unassign Private IPs: %s", err) } } - - d.SetPartial("private_ips_count") } } @@ -399,8 +403,6 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Failure updating ENI: %s", err) } - - d.SetPartial("security_groups") } if d.HasChange("description") { @@ -413,11 +415,9 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Failure updating ENI: %s", err) } - - d.SetPartial("description") } - if d.HasChange("tags") { + if d.HasChange("tags") && !d.IsNewResource() { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { @@ -425,8 +425,6 @@ func resourceAwsNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{}) } } - d.Partial(false) - return resourceAwsNetworkInterfaceRead(d, meta) } diff --git a/aws/resource_aws_network_interface_sg_attachment_test.go b/aws/resource_aws_network_interface_sg_attachment_test.go index 93fbc71981e..33f050da593 100644 --- a/aws/resource_aws_network_interface_sg_attachment_test.go +++ b/aws/resource_aws_network_interface_sg_attachment_test.go @@ -335,7 +335,14 @@ resource "aws_network_interface_sg_attachment" "test" { func testAccAwsNetworkInterfaceSGAttachmentConfigMultiple(rName string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_subnet" "test" { availability_zone = "${data.aws_availability_zones.available.names[0]}" diff --git a/aws/resource_aws_network_interface_test.go b/aws/resource_aws_network_interface_test.go index 76d6c2aade5..a7aa4362825 100644 --- a/aws/resource_aws_network_interface_test.go +++ b/aws/resource_aws_network_interface_test.go @@ -91,6 +91,8 @@ func TestAccAWSENI_basic(t *testing.T) { "aws_network_interface.bar", "tags.Name", "bar_interface"), resource.TestCheckResourceAttr( "aws_network_interface.bar", "description", "Managed by Terraform"), + resource.TestCheckResourceAttr( + "aws_network_interface.bar", "outpost_arn", ""), ), }, { diff --git a/aws/resource_aws_opsworks_application.go b/aws/resource_aws_opsworks_application.go index 1e5ba805801..11530759c24 100644 --- a/aws/resource_aws_opsworks_application.go +++ b/aws/resource_aws_opsworks_application.go @@ -6,7 +6,6 @@ import ( "strings" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" @@ -19,6 +18,10 @@ func resourceAwsOpsworksApplication() *schema.Resource { Read: resourceAwsOpsworksApplicationRead, Update: resourceAwsOpsworksApplicationUpdate, Delete: resourceAwsOpsworksApplicationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, @@ -76,6 +79,13 @@ func resourceAwsOpsworksApplication() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + opsworks.SourceTypeGit, + opsworks.SourceTypeSvn, + opsworks.SourceTypeArchive, + opsworks.SourceTypeS3, + "other", + }, false), }, "url": { @@ -100,26 +110,31 @@ func resourceAwsOpsworksApplication() *schema.Resource { }, "ssh_key": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Sensitive: true, }, }, }, }, - // AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, or RdsDbInstance. - // anything beside auto select will lead into failure in case the instance doesn't exist - // XXX: validation? "data_source_type": { Type: schema.TypeString, Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + "AutoSelectOpsworksMysqlInstance", + "OpsworksMysqlInstance", + "RdsDbInstance", + "None", + }, false), }, "data_source_database_name": { Type: schema.TypeString, Optional: true, }, "data_source_arn": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, }, "description": { Type: schema.TypeString, @@ -261,17 +276,16 @@ func resourceAwsOpsworksApplicationRead(d *schema.ResourceData, meta interface{} resp, err := client.DescribeApps(req) if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - log.Printf("[INFO] App not found: %s", d.Id()) - d.SetId("") - return nil - } + if isAWSErr(err, opsworks.ErrCodeResourceNotFoundException, "") { + log.Printf("[INFO] App not found: %s", d.Id()) + d.SetId("") + return nil } return err } app := resp.Apps[0] + log.Printf("[DEBUG] Opsworks Application: %#v", app) d.Set("name", app.Name) d.Set("stack_id", app.StackId) @@ -279,11 +293,18 @@ func resourceAwsOpsworksApplicationRead(d *schema.ResourceData, meta interface{} d.Set("description", app.Description) d.Set("domains", flattenStringList(app.Domains)) d.Set("enable_ssl", app.EnableSsl) - resourceAwsOpsworksSetApplicationSsl(d, app.SslConfiguration) - resourceAwsOpsworksSetApplicationSource(d, app.AppSource) + err = resourceAwsOpsworksSetApplicationSsl(d, app.SslConfiguration) + if err != nil { + return err + } + err = resourceAwsOpsworksSetApplicationSource(d, app.AppSource) + if err != nil { + return err + } resourceAwsOpsworksSetApplicationDataSources(d, app.DataSources) resourceAwsOpsworksSetApplicationEnvironmentVariable(d, app.Environment) resourceAwsOpsworksSetApplicationAttributes(d, app.Attributes) + return nil } @@ -366,37 +387,42 @@ func resourceAwsOpsworksApplicationDelete(d *schema.ResourceData, meta interface return err } -func resourceAwsOpsworksSetApplicationEnvironmentVariable(d *schema.ResourceData, v []*opsworks.EnvironmentVariable) { - log.Printf("[DEBUG] envs: %s %d", v, len(v)) - if len(v) == 0 { +func resourceAwsOpsworksFindEnvironmentVariable(key string, vs []*opsworks.EnvironmentVariable) *opsworks.EnvironmentVariable { + for _, v := range vs { + if aws.StringValue(v.Key) == key { + return v + } + } + return nil +} + +func resourceAwsOpsworksSetApplicationEnvironmentVariable(d *schema.ResourceData, vs []*opsworks.EnvironmentVariable) { + if len(vs) == 0 { d.Set("environment", nil) return } - newValue := make([]*map[string]interface{}, len(v)) - for i := 0; i < len(v); i++ { - config := v[i] - data := make(map[string]interface{}) - newValue[i] = &data - - if config.Key != nil { - data["key"] = *config.Key - } - if config.Value != nil { - data["value"] = *config.Value - } - if config.Secure != nil { - - if aws.BoolValue(config.Secure) { - data["secure"] = &opsworksTrueString - } else { - data["secure"] = &opsworksFalseString + // sensitive variables are returned obfuscated from the API, this creates a + // permadiff between the obfuscated API response and the config value. We + // start with the existing state so it can passthrough when the key is secure + values := d.Get("environment").(*schema.Set).List() + + for i := 0; i < len(values); i++ { + value := values[i].(map[string]interface{}) + if v := resourceAwsOpsworksFindEnvironmentVariable(value["key"].(string), vs); v != nil { + if !aws.BoolValue(v.Secure) { + value["secure"] = aws.BoolValue(v.Secure) + value["key"] = aws.StringValue(v.Key) + value["value"] = aws.StringValue(v.Value) + values[i] = value } + } else { + // delete if not found in API response + values = append(values[:i], values[i+1:]...) } - log.Printf("[DEBUG] v: %s", data) } - d.Set("environment", newValue) + d.Set("environment", values) } func resourceAwsOpsworksApplicationEnvironmentVariable(d *schema.ResourceData) []*opsworks.EnvironmentVariable { @@ -431,7 +457,7 @@ func resourceAwsOpsworksApplicationSource(d *schema.ResourceData) *opsworks.Sour } } -func resourceAwsOpsworksSetApplicationSource(d *schema.ResourceData, v *opsworks.Source) { +func resourceAwsOpsworksSetApplicationSource(d *schema.ResourceData, v *opsworks.Source) error { nv := make([]interface{}, 0, 1) if v != nil { m := make(map[string]interface{}) @@ -460,8 +486,9 @@ func resourceAwsOpsworksSetApplicationSource(d *schema.ResourceData, v *opsworks err := d.Set("app_source", nv) if err != nil { // should never happen - panic(err) + return err } + return nil } func resourceAwsOpsworksApplicationDataSources(d *schema.ResourceData) []*opsworks.DataSource { @@ -508,7 +535,7 @@ func resourceAwsOpsworksApplicationSsl(d *schema.ResourceData) *opsworks.SslConf } } -func resourceAwsOpsworksSetApplicationSsl(d *schema.ResourceData, v *opsworks.SslConfiguration) { +func resourceAwsOpsworksSetApplicationSsl(d *schema.ResourceData, v *opsworks.SslConfiguration) error { nv := make([]interface{}, 0, 1) set := false if v != nil { @@ -533,8 +560,9 @@ func resourceAwsOpsworksSetApplicationSsl(d *schema.ResourceData, v *opsworks.Ss err := d.Set("ssl_configuration", nv) if err != nil { // should never happen - panic(err) + return err } + return nil } func resourceAwsOpsworksApplicationAttributes(d *schema.ResourceData) map[string]*string { diff --git a/aws/resource_aws_opsworks_application_test.go b/aws/resource_aws_opsworks_application_test.go index 24f682c407c..d70312d9e89 100644 --- a/aws/resource_aws_opsworks_application_test.go +++ b/aws/resource_aws_opsworks_application_test.go @@ -6,134 +6,75 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) -func TestAccAWSOpsworksApplication(t *testing.T) { +func TestAccAWSOpsworksApplication_basic(t *testing.T) { var opsapp opsworks.App - rInt := acctest.RandInt() - name := fmt.Sprintf("tf-ops-acc-application-%d", rInt) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_application.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsOpsworksApplicationDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksApplicationDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAwsOpsworksApplicationCreate(name), + Config: testAccAwsOpsworksApplicationCreate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSOpsworksApplicationExists( - "aws_opsworks_application.tf-acc-app", &opsapp), + testAccCheckAWSOpsworksApplicationExists(resourceName, &opsapp), testAccCheckAWSOpsworksCreateAppAttributes(&opsapp), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "name", name, - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "type", "other", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "enable_ssl", "false", - ), - resource.TestCheckNoResourceAttr( - "aws_opsworks_application.tf-acc-app", "ssl_configuration", - ), - resource.TestCheckNoResourceAttr( - "aws_opsworks_application.tf-acc-app", "domains", - ), - resource.TestCheckNoResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.3077298702.key", "key1", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.3077298702.value", "value1", - ), - resource.TestCheckNoResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.3077298702.secret", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "document_root", "foo", - ), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "type", "other"), + resource.TestCheckResourceAttr(resourceName, "enable_ssl", "false"), + resource.TestCheckNoResourceAttr(resourceName, "ssl_configuration"), + resource.TestCheckNoResourceAttr(resourceName, "domains"), + resource.TestCheckNoResourceAttr(resourceName, "app_source"), + resource.TestCheckResourceAttr(resourceName, "environment.3077298702.key", "key1"), + resource.TestCheckResourceAttr(resourceName, "environment.3077298702.value", "value1"), + resource.TestCheckNoResourceAttr(resourceName, "environment.3077298702.secret"), + resource.TestCheckResourceAttr(resourceName, "document_root", "foo"), ), }, { - Config: testAccAwsOpsworksApplicationUpdate(name), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"environment.3077298702.key", "environment.#", + "environment.3077298702.secure", "environment.3077298702.value"}, + }, + { + Config: testAccAwsOpsworksApplicationUpdate(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSOpsworksApplicationExists( - "aws_opsworks_application.tf-acc-app", &opsapp), + testAccCheckAWSOpsworksApplicationExists(resourceName, &opsapp), testAccCheckAWSOpsworksUpdateAppAttributes(&opsapp), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "name", name, - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "type", "rails", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "enable_ssl", "true", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "ssl_configuration.0.certificate", "-----BEGIN CERTIFICATE-----\nMIIBkDCB+gIJALoScFD0sJq3MA0GCSqGSIb3DQEBBQUAMA0xCzAJBgNVBAYTAkRF\nMB4XDTE1MTIxOTIwMzU1MVoXDTE2MDExODIwMzU1MVowDTELMAkGA1UEBhMCREUw\ngZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKKQKbTTH/Julz16xY7ArYlzJYCP\nedTCx1bopuryCx/+d1gC94MtRdlPSpQl8mfc9iBdtXbJppp73Qh/DzLzO9Ns25xZ\n+kUQMhbIyLsaCBzuEGLgAaVdGpNvRBw++UoYtd0U7QczFAreTGLH8n8+FIzuI5Mc\n+MJ1TKbbt5gFfRSzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEALARo96wCDmaHKCaX\nS0IGLGnZCfiIUfCmBxOXBSJxDBwter95QHR0dMGxYIujee5n4vvavpVsqZnfMC3I\nOZWPlwiUJbNIpK+04Bg2vd5m/NMMrvi75RfmyeMtSfq/NrIX2Q3+nyWI7DLq7yZI\nV/YEvOqdAiy5NEWBztHx8HvB9G4=\n-----END CERTIFICATE-----", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "ssl_configuration.0.private_key", "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQCikCm00x/ybpc9esWOwK2JcyWAj3nUwsdW6Kbq8gsf/ndYAveD\nLUXZT0qUJfJn3PYgXbV2yaaae90Ifw8y8zvTbNucWfpFEDIWyMi7Gggc7hBi4AGl\nXRqTb0QcPvlKGLXdFO0HMxQK3kxix/J/PhSM7iOTHPjCdUym27eYBX0UswIDAQAB\nAoGBAIYcrvuqDboguI8U4TUjCkfSAgds1pLLWk79wu8jXkA329d1IyNKT0y3WIye\nPbyoEzmidZmZROQ/+ZsPz8c12Y0DrX73WSVzKNyJeP7XMk9HSzA1D9RX0U0S+5Kh\nFAMc2NEVVFIfQtVtoVmHdKDpnRYtOCHLW9rRpvqOOjd4mYk5AkEAzeiFr1mtlnsa\n67shMxzDaOTAFMchRz6G7aSovvCztxcB63ulFI/w9OTUMdTQ7ff7pet+lVihLc2W\nefIL0HvsjQJBAMocNTKaR/TnsV5GSk2kPAdR+zFP5sQy8sfMy0lEXTylc7zN4ajX\nMeHVoxp+GZgpfDcZ3ya808H1umyXh+xA1j8CQE9x9ZKQYT98RAjL7KVR5btk9w+N\nPTPF1j1+mHUDXfO4ds8qp6jlWKzEVXLcj7ghRADiebaZuaZ4eiSW1SQdjEkCQQC4\nwDhQ3X9RfEpCp3ZcqvjEqEg6t5N3XitYQPjDLN8eBRBbUsgpEy3iBuxl10eGNMX7\niIbYXlwkPYAArDPv3wT5AkAwp4vym+YKmDqh6gseKfRDuJqRiW9yD5A8VGr/w88k\n5rkuduVGP7tK3uIp00Its3aEyKF8mLGWYszVGeeLxAMH\n-----END RSA PRIVATE KEY-----", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "domains.0", "example.com", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "domains.1", "sub.example.com", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source.0.password", "", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source.0.revision", "master", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source.0.ssh_key", "", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source.0.type", "git", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source.0.url", "https://github.com/aws/example.git", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "app_source.0.username", "", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.2107898637.key", "key2", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.2107898637.value", "value2", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.2107898637.secure", "true", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.3077298702.key", "key1", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.3077298702.value", "value1", - ), - resource.TestCheckNoResourceAttr( - "aws_opsworks_application.tf-acc-app", "environment.3077298702.secret", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "document_root", "root", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "auto_bundle_on_deploy", "true", - ), - resource.TestCheckResourceAttr( - "aws_opsworks_application.tf-acc-app", "rails_env", "staging", - ), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "type", "rails"), + resource.TestCheckResourceAttr(resourceName, "enable_ssl", "true"), + resource.TestCheckResourceAttr(resourceName, "ssl_configuration.0.certificate", "-----BEGIN CERTIFICATE-----\nMIIBkDCB+gIJALoScFD0sJq3MA0GCSqGSIb3DQEBBQUAMA0xCzAJBgNVBAYTAkRF\nMB4XDTE1MTIxOTIwMzU1MVoXDTE2MDExODIwMzU1MVowDTELMAkGA1UEBhMCREUw\ngZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKKQKbTTH/Julz16xY7ArYlzJYCP\nedTCx1bopuryCx/+d1gC94MtRdlPSpQl8mfc9iBdtXbJppp73Qh/DzLzO9Ns25xZ\n+kUQMhbIyLsaCBzuEGLgAaVdGpNvRBw++UoYtd0U7QczFAreTGLH8n8+FIzuI5Mc\n+MJ1TKbbt5gFfRSzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEALARo96wCDmaHKCaX\nS0IGLGnZCfiIUfCmBxOXBSJxDBwter95QHR0dMGxYIujee5n4vvavpVsqZnfMC3I\nOZWPlwiUJbNIpK+04Bg2vd5m/NMMrvi75RfmyeMtSfq/NrIX2Q3+nyWI7DLq7yZI\nV/YEvOqdAiy5NEWBztHx8HvB9G4=\n-----END CERTIFICATE-----"), + resource.TestCheckResourceAttr(resourceName, "ssl_configuration.0.private_key", "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQCikCm00x/ybpc9esWOwK2JcyWAj3nUwsdW6Kbq8gsf/ndYAveD\nLUXZT0qUJfJn3PYgXbV2yaaae90Ifw8y8zvTbNucWfpFEDIWyMi7Gggc7hBi4AGl\nXRqTb0QcPvlKGLXdFO0HMxQK3kxix/J/PhSM7iOTHPjCdUym27eYBX0UswIDAQAB\nAoGBAIYcrvuqDboguI8U4TUjCkfSAgds1pLLWk79wu8jXkA329d1IyNKT0y3WIye\nPbyoEzmidZmZROQ/+ZsPz8c12Y0DrX73WSVzKNyJeP7XMk9HSzA1D9RX0U0S+5Kh\nFAMc2NEVVFIfQtVtoVmHdKDpnRYtOCHLW9rRpvqOOjd4mYk5AkEAzeiFr1mtlnsa\n67shMxzDaOTAFMchRz6G7aSovvCztxcB63ulFI/w9OTUMdTQ7ff7pet+lVihLc2W\nefIL0HvsjQJBAMocNTKaR/TnsV5GSk2kPAdR+zFP5sQy8sfMy0lEXTylc7zN4ajX\nMeHVoxp+GZgpfDcZ3ya808H1umyXh+xA1j8CQE9x9ZKQYT98RAjL7KVR5btk9w+N\nPTPF1j1+mHUDXfO4ds8qp6jlWKzEVXLcj7ghRADiebaZuaZ4eiSW1SQdjEkCQQC4\nwDhQ3X9RfEpCp3ZcqvjEqEg6t5N3XitYQPjDLN8eBRBbUsgpEy3iBuxl10eGNMX7\niIbYXlwkPYAArDPv3wT5AkAwp4vym+YKmDqh6gseKfRDuJqRiW9yD5A8VGr/w88k\n5rkuduVGP7tK3uIp00Its3aEyKF8mLGWYszVGeeLxAMH\n-----END RSA PRIVATE KEY-----"), + resource.TestCheckResourceAttr(resourceName, "domains.0", "example.com"), + resource.TestCheckResourceAttr(resourceName, "domains.1", "sub.example.com"), + resource.TestCheckResourceAttr(resourceName, "app_source.0.password", ""), + resource.TestCheckResourceAttr(resourceName, "app_source.0.revision", "master"), + resource.TestCheckResourceAttr(resourceName, "app_source.0.ssh_key", ""), + resource.TestCheckResourceAttr(resourceName, "app_source.0.type", "git"), + resource.TestCheckResourceAttr(resourceName, "app_source.0.url", "https://github.com/aws/example.git"), + resource.TestCheckResourceAttr(resourceName, "app_source.0.username", ""), + resource.TestCheckResourceAttr(resourceName, "environment.2107898637.key", "key2"), + resource.TestCheckResourceAttr(resourceName, "environment.2107898637.value", "value2"), + resource.TestCheckResourceAttr(resourceName, "environment.2107898637.secure", "true"), + resource.TestCheckResourceAttr(resourceName, "environment.3077298702.key", "key1"), + resource.TestCheckResourceAttr(resourceName, "environment.3077298702.value", "value1"), + resource.TestCheckNoResourceAttr(resourceName, "environment.3077298702.secret"), + resource.TestCheckResourceAttr(resourceName, "document_root", "root"), + resource.TestCheckResourceAttr(resourceName, "auto_bundle_on_deploy", "true"), + resource.TestCheckResourceAttr(resourceName, "rails_env", "staging"), ), }, }, @@ -184,7 +125,7 @@ func testAccCheckAWSOpsworksCreateAppAttributes( return fmt.Errorf("Unnexpected document root: %s", *opsapp.Attributes["DocumentRoot"]) } - if *opsapp.Type != "other" { + if *opsapp.Type != opsworks.AppTypeOther { return fmt.Errorf("Unnexpected type: %s", *opsapp.Type) } @@ -303,10 +244,8 @@ func testAccCheckAwsOpsworksApplicationDestroy(s *terraform.State) error { } } - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() != "ResourceNotFoundException" { - return err - } + if !isAWSErr(err, opsworks.ErrCodeResourceNotFoundException, "") { + return err } } @@ -316,7 +255,7 @@ func testAccCheckAwsOpsworksApplicationDestroy(s *terraform.State) error { func testAccAwsOpsworksApplicationCreate(name string) string { return testAccAwsOpsworksStackConfigVpcCreate(name) + fmt.Sprintf(` -resource "aws_opsworks_application" "tf-acc-app" { +resource "aws_opsworks_application" "test" { document_root = "foo" enable_ssl = false name = %q @@ -339,7 +278,7 @@ resource "aws_opsworks_application" "tf-acc-app" { func testAccAwsOpsworksApplicationUpdate(name string) string { return testAccAwsOpsworksStackConfigVpcCreate(name) + fmt.Sprintf(` -resource "aws_opsworks_application" "tf-acc-app" { +resource "aws_opsworks_application" "test" { auto_bundle_on_deploy = "true" document_root = "root" domains = ["example.com", "sub.example.com"] diff --git a/aws/resource_aws_opsworks_custom_layer.go b/aws/resource_aws_opsworks_custom_layer.go index 8fa04b9f4f9..9ab614525ab 100644 --- a/aws/resource_aws_opsworks_custom_layer.go +++ b/aws/resource_aws_opsworks_custom_layer.go @@ -1,12 +1,13 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksCustomLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "custom", + TypeName: opsworks.LayerTypeCustom, CustomShortName: true, // The "custom" layer type has no additional attributes diff --git a/aws/resource_aws_opsworks_custom_layer_test.go b/aws/resource_aws_opsworks_custom_layer_test.go index 4df56791fed..d44b280bcbf 100644 --- a/aws/resource_aws_opsworks_custom_layer_test.go +++ b/aws/resource_aws_opsworks_custom_layer_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/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -22,14 +21,15 @@ func TestAccAWSOpsworksCustomLayer_basic(t *testing.T) { resourceName := "aws_opsworks_custom_layer.tf-acc" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAwsOpsworksCustomLayerConfigVpcCreate(name), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSOpsworksCustomLayerExists(resourceName, &opslayer), + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), resource.TestCheckResourceAttr(resourceName, "name", name), resource.TestCheckResourceAttr(resourceName, "auto_assign_elastic_ips", "false"), resource.TestCheckResourceAttr(resourceName, "auto_healing", "true"), @@ -56,20 +56,65 @@ func TestAccAWSOpsworksCustomLayer_basic(t *testing.T) { }) } -func TestAccAWSOpsworksCustomLayer_noVPC(t *testing.T) { - stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) +func TestAccAWSOpsworksCustomLayer_tags(t *testing.T) { + name := acctest.RandomWithPrefix("tf-acc-test") var opslayer opsworks.Layer - resourceName := "aws_opsworks_custom_layer.tf-acc" + resourceName := "aws_opsworks_custom_layer.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksCustomLayerConfigTags1(name, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAwsOpsworksCustomLayerConfigTags2(name, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksCustomLayerConfigTags1(name, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func TestAccAWSOpsworksCustomLayer_noVPC(t *testing.T) { + stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) + var opslayer opsworks.Layer + resourceName := "aws_opsworks_custom_layer.tf-acc" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAwsOpsworksCustomLayerConfigNoVpcCreate(stackName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSOpsworksCustomLayerExists(resourceName, &opslayer), + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), testAccCheckAWSOpsworksCreateLayerAttributes(&opslayer, stackName), resource.TestCheckResourceAttr(resourceName, "name", stackName), resource.TestCheckResourceAttr(resourceName, "auto_assign_elastic_ips", "false"), @@ -118,8 +163,7 @@ func TestAccAWSOpsworksCustomLayer_noVPC(t *testing.T) { }) } -func testAccCheckAWSOpsworksCustomLayerExists( - n string, opslayer *opsworks.Layer) resource.TestCheckFunc { +func testAccCheckAWSOpsworksLayerExists(n string, opslayer *opsworks.Layer) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -212,10 +256,10 @@ func testAccCheckAWSOpsworksCreateLayerAttributes( } } -func testAccCheckAwsOpsworksCustomLayerDestroy(s *terraform.State) error { +func testAccCheckAwsOpsworksLayerDestroy(resourceType string, s *terraform.State) error { opsworksconn := testAccProvider.Meta().(*AWSClient).opsworksconn for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_opsworks_custom_layer" { + if rs.Type != resourceType { continue } req := &opsworks.DescribeLayersInput{ @@ -226,17 +270,18 @@ func testAccCheckAwsOpsworksCustomLayerDestroy(s *terraform.State) error { _, err := opsworksconn.DescribeLayers(req) if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - // not found, good to go - return nil - } + if isAWSErr(err, opsworks.ErrCodeResourceNotFoundException, "") { + return nil } return err } } - return fmt.Errorf("Fall through error on OpsWorks custom layer test") + return fmt.Errorf("Fall through error on OpsWorks layer test") +} + +func testAccCheckAwsOpsworksCustomLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_custom_layer", s) } func testAccAwsOpsworksCustomLayerSecurityGroups(name string) string { @@ -389,3 +434,80 @@ resource "aws_opsworks_custom_layer" "tf-acc" { %s `, name, testAccAwsOpsworksStackConfigNoVpcCreate(name), testAccAwsOpsworksCustomLayerSecurityGroups(name)) } + +func testAccAwsOpsworksCustomLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_custom_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + short_name = "tf-ops-acc-custom-layer" + auto_assign_public_ips = false + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + drain_elb_on_shutdown = true + instance_shutdown_timeout = 300 + + system_packages = [ + "git", + "golang", + ] + + ebs_volume { + type = "gp2" + number_of_disks = 2 + mount_point = "/home" + size = 100 + raid_level = 0 + } + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksCustomLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_custom_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + short_name = "tf-ops-acc-custom-layer" + auto_assign_public_ips = false + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + drain_elb_on_shutdown = true + instance_shutdown_timeout = 300 + + system_packages = [ + "git", + "golang", + ] + + ebs_volume { + type = "gp2" + number_of_disks = 2 + mount_point = "/home" + size = 100 + raid_level = 0 + } + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_ganglia_layer.go b/aws/resource_aws_opsworks_ganglia_layer.go index 071164fec9a..5dde96c656b 100644 --- a/aws/resource_aws_opsworks_ganglia_layer.go +++ b/aws/resource_aws_opsworks_ganglia_layer.go @@ -1,27 +1,28 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksGangliaLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "monitoring-master", + TypeName: opsworks.LayerTypeMonitoringMaster, DefaultLayerName: "Ganglia", Attributes: map[string]*opsworksLayerTypeAttribute{ "url": { - AttrName: "GangliaUrl", + AttrName: opsworks.LayerAttributesKeysGangliaUrl, Type: schema.TypeString, Default: "/ganglia", }, "username": { - AttrName: "GangliaUser", + AttrName: opsworks.LayerAttributesKeysGangliaUser, Type: schema.TypeString, Default: "opsworks", }, "password": { - AttrName: "GangliaPassword", + AttrName: opsworks.LayerAttributesKeysGangliaPassword, Type: schema.TypeString, Required: true, WriteOnly: true, diff --git a/aws/resource_aws_opsworks_ganglia_layer_test.go b/aws/resource_aws_opsworks_ganglia_layer_test.go new file mode 100644 index 00000000000..1eb81e70656 --- /dev/null +++ b/aws/resource_aws_opsworks_ganglia_layer_test.go @@ -0,0 +1,133 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAWSOpsworksGangliaLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_ganglia_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksGangliaLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksGangliaLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName), + ), + }, + }, + }) +} + +func TestAccAWSOpsworksGangliaLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_ganglia_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksGangliaLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksGangliaLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksGangliaLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksGangliaLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksGangliaLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_ganglia_layer", s) +} + +func testAccAwsOpsworksGangliaLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_ganglia_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + password = %[1]q + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksGangliaLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_ganglia_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + password = %[1]q + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksGangliaLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_ganglia_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + password = %[1]q + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_haproxy_layer.go b/aws/resource_aws_opsworks_haproxy_layer.go index 1aa77b30df8..04e30c0f962 100644 --- a/aws/resource_aws_opsworks_haproxy_layer.go +++ b/aws/resource_aws_opsworks_haproxy_layer.go @@ -1,43 +1,44 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksHaproxyLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "lb", + TypeName: opsworks.LayerTypeLb, DefaultLayerName: "HAProxy", Attributes: map[string]*opsworksLayerTypeAttribute{ "stats_enabled": { - AttrName: "EnableHaproxyStats", + AttrName: opsworks.LayerAttributesKeysEnableHaproxyStats, Type: schema.TypeBool, Default: true, }, "stats_url": { - AttrName: "HaproxyStatsUrl", + AttrName: opsworks.LayerAttributesKeysHaproxyStatsUrl, Type: schema.TypeString, Default: "/haproxy?stats", }, "stats_user": { - AttrName: "HaproxyStatsUser", + AttrName: opsworks.LayerAttributesKeysHaproxyStatsUser, Type: schema.TypeString, Default: "opsworks", }, "stats_password": { - AttrName: "HaproxyStatsPassword", + AttrName: opsworks.LayerAttributesKeysHaproxyStatsPassword, Type: schema.TypeString, WriteOnly: true, Required: true, }, "healthcheck_url": { - AttrName: "HaproxyHealthCheckUrl", + AttrName: opsworks.LayerAttributesKeysHaproxyHealthCheckUrl, Type: schema.TypeString, Default: "/", }, "healthcheck_method": { - AttrName: "HaproxyHealthCheckMethod", + AttrName: opsworks.LayerAttributesKeysHaproxyHealthCheckMethod, Type: schema.TypeString, Default: "OPTIONS", }, diff --git a/aws/resource_aws_opsworks_haproxy_layer_test.go b/aws/resource_aws_opsworks_haproxy_layer_test.go new file mode 100644 index 00000000000..4ae6e11cc32 --- /dev/null +++ b/aws/resource_aws_opsworks_haproxy_layer_test.go @@ -0,0 +1,133 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAWSOpsworksHAProxyLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_haproxy_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksHAProxyLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksHAProxyLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName), + ), + }, + }, + }) +} + +func TestAccAWSOpsworksHAProxyLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_haproxy_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksHAProxyLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksHAProxyLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksHAProxyLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksHAProxyLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksHAProxyLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_haproxy_layer", s) +} + +func testAccAwsOpsworksHAProxyLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_haproxy_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + stats_password = %[1]q + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksHAProxyLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_haproxy_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + stats_password = %[1]q + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksHAProxyLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_haproxy_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = %[1]q + stats_password = %[1]q + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_java_app_layer.go b/aws/resource_aws_opsworks_java_app_layer.go index 57db8e731de..018dbc4ddd3 100644 --- a/aws/resource_aws_opsworks_java_app_layer.go +++ b/aws/resource_aws_opsworks_java_app_layer.go @@ -1,37 +1,38 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksJavaAppLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "java-app", + TypeName: opsworks.LayerTypeJavaApp, DefaultLayerName: "Java App Server", Attributes: map[string]*opsworksLayerTypeAttribute{ "jvm_type": { - AttrName: "Jvm", + AttrName: opsworks.LayerAttributesKeysJvm, Type: schema.TypeString, Default: "openjdk", }, "jvm_version": { - AttrName: "JvmVersion", + AttrName: opsworks.LayerAttributesKeysJvmVersion, Type: schema.TypeString, Default: "7", }, "jvm_options": { - AttrName: "JvmOptions", + AttrName: opsworks.LayerAttributesKeysJvmOptions, Type: schema.TypeString, Default: "", }, "app_server": { - AttrName: "JavaAppServer", + AttrName: opsworks.LayerAttributesKeysJavaAppServer, Type: schema.TypeString, Default: "tomcat", }, "app_server_version": { - AttrName: "JavaAppServerVersion", + AttrName: opsworks.LayerAttributesKeysJavaAppServerVersion, Type: schema.TypeString, Default: "7", }, diff --git a/aws/resource_aws_opsworks_java_app_layer_test.go b/aws/resource_aws_opsworks_java_app_layer_test.go new file mode 100644 index 00000000000..b93107ed5ad --- /dev/null +++ b/aws/resource_aws_opsworks_java_app_layer_test.go @@ -0,0 +1,132 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` +// and `aws-opsworks-service-role`. + +func TestAccAWSOpsworksJavaAppLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_java_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksJavaAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksJavaAppLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName)), + }, + }, + }) +} + +func TestAccAWSOpsworksJavaAppLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_java_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksJavaAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksJavaAppLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksJavaAppLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksJavaAppLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksJavaAppLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_java_app_layer", s) +} + +func testAccAwsOpsworksJavaAppLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_java_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksJavaAppLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_java_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksJavaAppLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_java_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_memcached_layer.go b/aws/resource_aws_opsworks_memcached_layer.go index 4ac2ff4c0aa..9e1bb7deb89 100644 --- a/aws/resource_aws_opsworks_memcached_layer.go +++ b/aws/resource_aws_opsworks_memcached_layer.go @@ -1,17 +1,18 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksMemcachedLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "memcached", + TypeName: opsworks.LayerTypeMemcached, DefaultLayerName: "Memcached", Attributes: map[string]*opsworksLayerTypeAttribute{ "allocated_memory": { - AttrName: "MemcachedMemory", + AttrName: opsworks.LayerAttributesKeysMemcachedMemory, Type: schema.TypeInt, Default: 512, }, diff --git a/aws/resource_aws_opsworks_memcached_layer_test.go b/aws/resource_aws_opsworks_memcached_layer_test.go new file mode 100644 index 00000000000..aa3c0051f63 --- /dev/null +++ b/aws/resource_aws_opsworks_memcached_layer_test.go @@ -0,0 +1,132 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` +// and `aws-opsworks-service-role`. + +func TestAccAWSOpsworksMemcachedLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_memcached_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksMemcachedLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksMemcachedLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName)), + }, + }, + }) +} + +func TestAccAWSOpsworksMemcachedLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_memcached_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksMemcachedLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksMemcachedLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksMemcachedLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksMemcachedLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksMemcachedLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_memcached_layer", s) +} + +func testAccAwsOpsworksMemcachedLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_memcached_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksMemcachedLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_memcached_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksMemcachedLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_memcached_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_mysql_layer.go b/aws/resource_aws_opsworks_mysql_layer.go index b2076438e4b..c3d1d7b6c73 100644 --- a/aws/resource_aws_opsworks_mysql_layer.go +++ b/aws/resource_aws_opsworks_mysql_layer.go @@ -1,22 +1,23 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksMysqlLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "db-master", + TypeName: opsworks.LayerTypeDbMaster, DefaultLayerName: "MySQL", Attributes: map[string]*opsworksLayerTypeAttribute{ "root_password": { - AttrName: "MysqlRootPassword", + AttrName: opsworks.LayerAttributesKeysMysqlRootPassword, Type: schema.TypeString, WriteOnly: true, }, "root_password_on_all_instances": { - AttrName: "MysqlRootPasswordUbiquitous", + AttrName: opsworks.LayerAttributesKeysMysqlRootPasswordUbiquitous, Type: schema.TypeBool, Default: true, }, diff --git a/aws/resource_aws_opsworks_mysql_layer_test.go b/aws/resource_aws_opsworks_mysql_layer_test.go new file mode 100644 index 00000000000..f5506036739 --- /dev/null +++ b/aws/resource_aws_opsworks_mysql_layer_test.go @@ -0,0 +1,132 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` +// and `aws-opsworks-service-role`. + +func TestAccAWSOpsworksMysqlLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_mysql_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksMysqlLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksMysqlLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName)), + }, + }, + }) +} + +func TestAccAWSOpsworksMysqlLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_mysql_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksMysqlLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksMysqlLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksMysqlLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksMysqlLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksMysqlLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_mysql_layer", s) +} + +func testAccAwsOpsworksMysqlLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_mysql_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksMysqlLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_mysql_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksMysqlLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_mysql_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_nodejs_app_layer.go b/aws/resource_aws_opsworks_nodejs_app_layer.go index d790a92a2bb..c13be2f8a85 100644 --- a/aws/resource_aws_opsworks_nodejs_app_layer.go +++ b/aws/resource_aws_opsworks_nodejs_app_layer.go @@ -1,17 +1,18 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksNodejsAppLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "nodejs-app", + TypeName: opsworks.LayerTypeNodejsApp, DefaultLayerName: "Node.js App Server", Attributes: map[string]*opsworksLayerTypeAttribute{ "nodejs_version": { - AttrName: "NodejsVersion", + AttrName: opsworks.LayerAttributesKeysNodejsVersion, Type: schema.TypeString, Default: "0.10.38", }, diff --git a/aws/resource_aws_opsworks_nodejs_app_layer_test.go b/aws/resource_aws_opsworks_nodejs_app_layer_test.go new file mode 100644 index 00000000000..3f7c4d973cb --- /dev/null +++ b/aws/resource_aws_opsworks_nodejs_app_layer_test.go @@ -0,0 +1,132 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` +// and `aws-opsworks-service-role`. + +func TestAccAWSOpsworksNodejsAppLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_nodejs_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksNodejsAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksNodejsAppLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName)), + }, + }, + }) +} + +func TestAccAWSOpsworksNodejsAppLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_nodejs_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksNodejsAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksNodejsAppLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksNodejsAppLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksNodejsAppLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksNodejsAppLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_nodejs_app_layer", s) +} + +func testAccAwsOpsworksNodejsAppLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_nodejs_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksNodejsAppLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_nodejs_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksNodejsAppLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_nodejs_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_php_app_layer.go b/aws/resource_aws_opsworks_php_app_layer.go index a578adbe41b..82ee2d05d3d 100644 --- a/aws/resource_aws_opsworks_php_app_layer.go +++ b/aws/resource_aws_opsworks_php_app_layer.go @@ -1,12 +1,13 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksPhpAppLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "php-app", + TypeName: opsworks.LayerTypePhpApp, DefaultLayerName: "PHP App Server", Attributes: map[string]*opsworksLayerTypeAttribute{}, diff --git a/aws/resource_aws_opsworks_php_app_layer_test.go b/aws/resource_aws_opsworks_php_app_layer_test.go new file mode 100644 index 00000000000..731851b0800 --- /dev/null +++ b/aws/resource_aws_opsworks_php_app_layer_test.go @@ -0,0 +1,142 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` +// and `aws-opsworks-service-role`. + +func TestAccAWSOpsworksPhpAppLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_php_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksPhpAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksPhpAppLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName)), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSOpsworksPhpAppLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_php_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksPhpAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksPhpAppLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAwsOpsworksPhpAppLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksPhpAppLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksPhpAppLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_php_app_layer", s) +} + +func testAccAwsOpsworksPhpAppLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_php_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksPhpAppLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_php_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksPhpAppLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_php_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_opsworks_rails_app_layer.go b/aws/resource_aws_opsworks_rails_app_layer.go index cc9d424bb31..42898aabecd 100644 --- a/aws/resource_aws_opsworks_rails_app_layer.go +++ b/aws/resource_aws_opsworks_rails_app_layer.go @@ -1,42 +1,43 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksRailsAppLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "rails-app", + TypeName: opsworks.LayerTypeRailsApp, DefaultLayerName: "Rails App Server", Attributes: map[string]*opsworksLayerTypeAttribute{ "ruby_version": { - AttrName: "RubyVersion", + AttrName: opsworks.LayerAttributesKeysRubyVersion, Type: schema.TypeString, Default: "2.0.0", }, "app_server": { - AttrName: "RailsStack", + AttrName: opsworks.LayerAttributesKeysRailsStack, Type: schema.TypeString, Default: "apache_passenger", }, "passenger_version": { - AttrName: "PassengerVersion", + AttrName: opsworks.LayerAttributesKeysPassengerVersion, Type: schema.TypeString, Default: "4.0.46", }, "rubygems_version": { - AttrName: "RubygemsVersion", + AttrName: opsworks.LayerAttributesKeysRubygemsVersion, Type: schema.TypeString, Default: "2.2.2", }, "manage_bundler": { - AttrName: "ManageBundler", + AttrName: opsworks.LayerAttributesKeysManageBundler, Type: schema.TypeBool, Default: true, }, "bundler_version": { - AttrName: "BundlerVersion", + AttrName: opsworks.LayerAttributesKeysBundlerVersion, Type: schema.TypeString, Default: "1.5.3", }, diff --git a/aws/resource_aws_opsworks_rails_app_layer_test.go b/aws/resource_aws_opsworks_rails_app_layer_test.go index 50cec21ef8e..88cec67d60d 100644 --- a/aws/resource_aws_opsworks_rails_app_layer_test.go +++ b/aws/resource_aws_opsworks_rails_app_layer_test.go @@ -4,8 +4,6 @@ import ( "fmt" "testing" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -15,8 +13,10 @@ import ( // These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` // and `aws-opsworks-service-role`. -func TestAccAWSOpsworksRailsAppLayer(t *testing.T) { - stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) +func TestAccAWSOpsworksRailsAppLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_rails_app_layer.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -25,59 +25,70 @@ func TestAccAWSOpsworksRailsAppLayer(t *testing.T) { { Config: testAccAwsOpsworksRailsAppLayerConfigVpcCreate(stackName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_opsworks_rails_app_layer.tf-acc", "name", stackName, - ), - resource.TestCheckResourceAttr( - "aws_opsworks_rails_app_layer.tf-acc", "manage_bundler", "true", - ), + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName), + resource.TestCheckResourceAttr(resourceName, "manage_bundler", "true"), ), }, { Config: testAccAwsOpsworksRailsAppLayerNoManageBundlerConfigVpcCreate(stackName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_opsworks_rails_app_layer.tf-acc", "name", stackName, - ), - resource.TestCheckResourceAttr( - "aws_opsworks_rails_app_layer.tf-acc", "manage_bundler", "false", - ), + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName), + resource.TestCheckResourceAttr(resourceName, "manage_bundler", "false"), ), }, }, }) } -func testAccCheckAwsOpsworksRailsAppLayerDestroy(s *terraform.State) error { - opsworksconn := testAccProvider.Meta().(*AWSClient).opsworksconn - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_opsworks_rails_app_layer" { - continue - } - req := &opsworks.DescribeLayersInput{ - LayerIds: []*string{ - aws.String(rs.Primary.ID), +func TestAccAWSOpsworksRailsAppLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_rails_app_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksRailsAppLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksRailsAppLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAwsOpsworksRailsAppLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksRailsAppLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), }, - } - - _, err := opsworksconn.DescribeLayers(req) - if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceNotFoundException" { - // not found, good to go - return nil - } - } - return err - } - } - - return fmt.Errorf("Fall through error on OpsWorks custom layer test") + }, + }) +} + +func testAccCheckAwsOpsworksRailsAppLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_rails_app_layer", s) } func testAccAwsOpsworksRailsAppLayerConfigVpcCreate(name string) string { - return fmt.Sprintf(` -resource "aws_opsworks_rails_app_layer" "tf-acc" { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_rails_app_layer" "test" { stack_id = "${aws_opsworks_stack.tf-acc.id}" name = "%s" @@ -86,18 +97,14 @@ resource "aws_opsworks_rails_app_layer" "tf-acc" { "${aws_security_group.tf-ops-acc-layer2.id}", ] } - -%s - - -%s - -`, name, testAccAwsOpsworksStackConfigVpcCreate(name), testAccAwsOpsworksCustomLayerSecurityGroups(name)) +`, name) } func testAccAwsOpsworksRailsAppLayerNoManageBundlerConfigVpcCreate(name string) string { - return fmt.Sprintf(` -resource "aws_opsworks_rails_app_layer" "tf-acc" { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_rails_app_layer" "test" { stack_id = "${aws_opsworks_stack.tf-acc.id}" name = "%s" @@ -108,11 +115,46 @@ resource "aws_opsworks_rails_app_layer" "tf-acc" { manage_bundler = false } +`, name) +} + +func testAccAwsOpsworksRailsAppLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_rails_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] -%s + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} +func testAccAwsOpsworksRailsAppLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_rails_app_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" -%s + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] -`, name, testAccAwsOpsworksStackConfigVpcCreate(name), testAccAwsOpsworksCustomLayerSecurityGroups(name)) + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) } diff --git a/aws/resource_aws_opsworks_rds_db_instance.go b/aws/resource_aws_opsworks_rds_db_instance.go index 14ca6aebd3a..028f0c45bee 100644 --- a/aws/resource_aws_opsworks_rds_db_instance.go +++ b/aws/resource_aws_opsworks_rds_db_instance.go @@ -43,21 +43,16 @@ func resourceAwsOpsworksRdsDbInstance() *schema.Resource { func resourceAwsOpsworksRdsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).opsworksconn - d.Partial(true) - - d.SetPartial("rds_db_instance_arn") req := &opsworks.UpdateRdsDbInstanceInput{ RdsDbInstanceArn: aws.String(d.Get("rds_db_instance_arn").(string)), } requestUpdate := false if d.HasChange("db_user") { - d.SetPartial("db_user") req.DbUser = aws.String(d.Get("db_user").(string)) requestUpdate = true } if d.HasChange("db_password") { - d.SetPartial("db_password") req.DbPassword = aws.String(d.Get("db_password").(string)) requestUpdate = true } @@ -71,8 +66,6 @@ func resourceAwsOpsworksRdsDbInstanceUpdate(d *schema.ResourceData, meta interfa } } - d.Partial(false) - return resourceAwsOpsworksRdsDbInstanceRead(d, meta) } diff --git a/aws/resource_aws_opsworks_stack.go b/aws/resource_aws_opsworks_stack.go index 4e9eaf3266b..12ada7a149d 100644 --- a/aws/resource_aws_opsworks_stack.go +++ b/aws/resource_aws_opsworks_stack.go @@ -122,8 +122,9 @@ func resourceAwsOpsworksStack() *schema.Resource { }, "ssh_key": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Sensitive: true, }, }, }, @@ -234,7 +235,7 @@ func resourceAwsOpsworksStackCustomCookbooksSource(d *schema.ResourceData) *opsw } } -func resourceAwsOpsworksSetStackCustomCookbooksSource(d *schema.ResourceData, v *opsworks.Source) { +func resourceAwsOpsworksSetStackCustomCookbooksSource(d *schema.ResourceData, v *opsworks.Source) error { nv := make([]interface{}, 0, 1) if v != nil && v.Type != nil && *v.Type != "" { m := make(map[string]interface{}) @@ -263,12 +264,15 @@ func resourceAwsOpsworksSetStackCustomCookbooksSource(d *schema.ResourceData, v err := d.Set("custom_cookbooks_source", nv) if err != nil { // should never happen - panic(err) + return err } + return nil } func resourceAwsOpsworksStackRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient).opsworksconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + var conErr error if v := d.Get("stack_endpoint").(string); v != "" { client, conErr = opsworksConnForRegion(v, meta) @@ -365,7 +369,10 @@ func resourceAwsOpsworksStackRead(d *schema.ResourceData, meta interface{}) erro d.Set("berkshelf_version", stack.ChefConfiguration.BerkshelfVersion) d.Set("manage_berkshelf", stack.ChefConfiguration.ManageBerkshelf) } - resourceAwsOpsworksSetStackCustomCookbooksSource(d, stack.CustomCookbooksSource) + err := resourceAwsOpsworksSetStackCustomCookbooksSource(d, stack.CustomCookbooksSource) + if err != nil { + return err + } tags, err := keyvaluetags.OpsworksListTags(client, arn) @@ -373,7 +380,7 @@ func resourceAwsOpsworksStackRead(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("error listing tags for Opsworks stack (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_opsworks_stack_test.go b/aws/resource_aws_opsworks_stack_test.go index b69166597c0..6d32bb47fde 100644 --- a/aws/resource_aws_opsworks_stack_test.go +++ b/aws/resource_aws_opsworks_stack_test.go @@ -303,7 +303,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_profile" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, rName, rInt, rInt, rInt, rName) } @@ -389,7 +389,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_profile" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, rName, rInt, rInt, rInt, rName) } @@ -801,7 +801,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, name, name, name, name) } @@ -890,7 +890,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, name, name, name, name) } @@ -979,7 +979,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, name, name, name, name) } @@ -1111,7 +1111,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, name, name, name, name, name, name) } @@ -1219,7 +1219,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, name, name, name, name) } @@ -1331,7 +1331,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, name, name, name, name) } @@ -1450,7 +1450,7 @@ EOT resource "aws_iam_instance_profile" "opsworks_instance" { name = "%s_opsworks_instance" - roles = ["${aws_iam_role.opsworks_instance.name}"] + role = "${aws_iam_role.opsworks_instance.name}" } `, name, sshKey, name, name, name, name) } diff --git a/aws/resource_aws_opsworks_static_web_layer.go b/aws/resource_aws_opsworks_static_web_layer.go index baee9feba02..e05d71f6e40 100644 --- a/aws/resource_aws_opsworks_static_web_layer.go +++ b/aws/resource_aws_opsworks_static_web_layer.go @@ -1,12 +1,13 @@ package aws import ( + "github.com/aws/aws-sdk-go/service/opsworks" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceAwsOpsworksStaticWebLayer() *schema.Resource { layerType := &opsworksLayerType{ - TypeName: "web", + TypeName: opsworks.LayerTypeWeb, DefaultLayerName: "Static Web Server", Attributes: map[string]*opsworksLayerTypeAttribute{}, diff --git a/aws/resource_aws_opsworks_static_web_layer_test.go b/aws/resource_aws_opsworks_static_web_layer_test.go new file mode 100644 index 00000000000..8b7bebaeaac --- /dev/null +++ b/aws/resource_aws_opsworks_static_web_layer_test.go @@ -0,0 +1,142 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/service/opsworks" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +// These tests assume the existence of predefined Opsworks IAM roles named `aws-opsworks-ec2-role` +// and `aws-opsworks-service-role`. + +func TestAccAWSOpsworksStaticWebLayer_basic(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_static_web_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksStaticWebLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksStaticWebLayerConfigVpcCreate(stackName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "name", stackName)), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSOpsworksStaticWebLayer_tags(t *testing.T) { + var opslayer opsworks.Layer + stackName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_opsworks_static_web_layer.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOpsworksStaticWebLayerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOpsworksStaticWebLayerConfigTags1(stackName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAwsOpsworksStaticWebLayerConfigTags2(stackName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsOpsworksStaticWebLayerConfigTags1(stackName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSOpsworksLayerExists(resourceName, &opslayer), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccCheckAwsOpsworksStaticWebLayerDestroy(s *terraform.State) error { + return testAccCheckAwsOpsworksLayerDestroy("aws_opsworks_static_web_layer", s) +} + +func testAccAwsOpsworksStaticWebLayerConfigVpcCreate(name string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_static_web_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] +} +`, name) +} + +func testAccAwsOpsworksStaticWebLayerConfigTags1(name, tagKey1, tagValue1 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_static_web_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + } +} +`, name, tagKey1, tagValue1) +} + +func testAccAwsOpsworksStaticWebLayerConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsOpsworksStackConfigVpcCreate(name) + + testAccAwsOpsworksCustomLayerSecurityGroups(name) + + fmt.Sprintf(` +resource "aws_opsworks_static_web_layer" "test" { + stack_id = "${aws_opsworks_stack.tf-acc.id}" + name = "%s" + + custom_security_group_ids = [ + "${aws_security_group.tf-ops-acc-layer1.id}", + "${aws_security_group.tf-ops-acc-layer2.id}", + ] + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) +} diff --git a/aws/resource_aws_organizations_account.go b/aws/resource_aws_organizations_account.go index 952ef540be4..65473ad2c3f 100644 --- a/aws/resource_aws_organizations_account.go +++ b/aws/resource_aws_organizations_account.go @@ -54,10 +54,13 @@ func resourceAwsOrganizationsAccount() *schema.Resource { ValidateFunc: validation.StringLenBetween(1, 50), }, "email": { - ForceNew: true, - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsOrganizationsAccountEmail, + ForceNew: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.All( + validation.StringLenBetween(6, 64), + validation.StringMatch(regexp.MustCompile(`^[^\s@]+@[^\s@]+\.[^\s@]+$`), "must be a valid email address"), + ), }, "iam_user_access_to_billing": { ForceNew: true, @@ -69,7 +72,7 @@ func resourceAwsOrganizationsAccount() *schema.Resource { ForceNew: true, Type: schema.TypeString, Optional: true, - ValidateFunc: validateAwsOrganizationsAccountRoleName, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w+=,.@-]{1,64}$`), "must consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters"), }, "tags": tagsSchema(), }, @@ -175,6 +178,8 @@ func resourceAwsOrganizationsAccountCreate(d *schema.ResourceData, meta interfac func resourceAwsOrganizationsAccountRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).organizationsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + describeOpts := &organizations.DescribeAccountInput{ AccountId: aws.String(d.Id()), } @@ -216,7 +221,7 @@ func resourceAwsOrganizationsAccountRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error listing tags for AWS Organizations Account (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -299,36 +304,6 @@ func resourceAwsOrganizationsAccountStateRefreshFunc(conn *organizations.Organiz } } -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 -} - func resourceAwsOrganizationsAccountGetParentId(conn *organizations.Organizations, childId string) (string, error) { input := &organizations.ListParentsInput{ ChildId: aws.String(childId), diff --git a/aws/resource_aws_organizations_policy.go b/aws/resource_aws_organizations_policy.go index 739a7448a7a..0bd1bb7415a 100644 --- a/aws/resource_aws_organizations_policy.go +++ b/aws/resource_aws_organizations_policy.go @@ -31,7 +31,7 @@ func resourceAwsOrganizationsPolicy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "description": { Type: schema.TypeString, diff --git a/aws/resource_aws_organizations_policy_test.go b/aws/resource_aws_organizations_policy_test.go index e0d8b9d829b..09c4e470c05 100644 --- a/aws/resource_aws_organizations_policy_test.go +++ b/aws/resource_aws_organizations_policy_test.go @@ -28,7 +28,7 @@ func testAccAwsOrganizationsPolicy_basic(t *testing.T) { 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-.+$`)), + testAccMatchResourceAttrGlobalARN(resourceName, "arn", "organizations", regexp.MustCompile("policy/o-.+/service_control_policy/p-.+$")), resource.TestCheckResourceAttr(resourceName, "content", content1), resource.TestCheckResourceAttr(resourceName, "description", ""), resource.TestCheckResourceAttr(resourceName, "name", rName), diff --git a/aws/resource_aws_pinpoint_app.go b/aws/resource_aws_pinpoint_app.go index 17bbf4a5355..a22085d0a4c 100644 --- a/aws/resource_aws_pinpoint_app.go +++ b/aws/resource_aws_pinpoint_app.go @@ -225,6 +225,7 @@ func resourceAwsPinpointAppUpdate(d *schema.ResourceData, meta interface{}) erro func resourceAwsPinpointAppRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).pinpointconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[INFO] Reading Pinpoint App Attributes for %s", d.Id()) @@ -275,7 +276,7 @@ func resourceAwsPinpointAppRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for PinPoint Application (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_placement_group.go b/aws/resource_aws_placement_group.go index a2cd4874ed1..b7fe7931232 100644 --- a/aws/resource_aws_placement_group.go +++ b/aws/resource_aws_placement_group.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -54,8 +53,9 @@ func resourceAwsPlacementGroupCreate(d *schema.ResourceData, meta interface{}) e name := d.Get("name").(string) input := ec2.CreatePlacementGroupInput{ - GroupName: aws.String(name), - Strategy: aws.String(d.Get("strategy").(string)), + GroupName: aws.String(name), + Strategy: aws.String(d.Get("strategy").(string)), + TagSpecifications: ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypePlacementGroup), } log.Printf("[DEBUG] Creating EC2 Placement group: %s", input) _, err := conn.CreatePlacementGroup(&input) @@ -100,25 +100,13 @@ func resourceAwsPlacementGroupCreate(d *schema.ResourceData, meta interface{}) e d.SetId(name) - if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - input := ec2.DescribePlacementGroupsInput{ - GroupNames: []*string{aws.String(d.Id())}, - } - out, err := conn.DescribePlacementGroups(&input) - if err != nil { - return err - } - pg := out.PlacementGroups[0] - if err := keyvaluetags.Ec2UpdateTags(conn, aws.StringValue(pg.GroupId), nil, v); err != nil { - return fmt.Errorf("error adding tags: %s", err) - } - } - return resourceAwsPlacementGroupRead(d, meta) } func resourceAwsPlacementGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + input := ec2.DescribePlacementGroupsInput{ GroupNames: []*string{aws.String(d.Id())}, } @@ -139,7 +127,7 @@ func resourceAwsPlacementGroupRead(d *schema.ResourceData, meta interface{}) err d.Set("name", pg.GroupName) d.Set("strategy", pg.Strategy) d.Set("placement_group_id", pg.GroupId) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(pg.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(pg.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -183,11 +171,10 @@ func resourceAwsPlacementGroupDelete(d *schema.ResourceData, meta interface{}) e }) if err != nil { - awsErr := err.(awserr.Error) - if awsErr.Code() == "InvalidPlacementGroup.Unknown" { - return out, "deleted", nil + if isAWSErr(err, "InvalidPlacementGroup.Unknown", "") { + return out, ec2.PlacementGroupStateDeleted, nil } - return out, "", awsErr + return out, "", err } if len(out.PlacementGroups) == 0 { @@ -195,7 +182,7 @@ func resourceAwsPlacementGroupDelete(d *schema.ResourceData, meta interface{}) e } pg := out.PlacementGroups[0] - if *pg.State == "available" { + if *pg.State == ec2.PlacementGroupStateAvailable { log.Printf("[DEBUG] Accepted status when deleting EC2 Placement group: %q %v", d.Id(), *pg.State) } diff --git a/aws/resource_aws_placement_group_test.go b/aws/resource_aws_placement_group_test.go index 2d4be811cb7..7a1815bb0c1 100644 --- a/aws/resource_aws_placement_group_test.go +++ b/aws/resource_aws_placement_group_test.go @@ -4,12 +4,11 @@ import ( "fmt" "testing" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" ) func TestAccAWSPlacementGroup_basic(t *testing.T) { diff --git a/aws/resource_aws_proxy_protocol_policy.go b/aws/resource_aws_proxy_protocol_policy.go index 18c85f00627..94cf95823e0 100644 --- a/aws/resource_aws_proxy_protocol_policy.go +++ b/aws/resource_aws_proxy_protocol_policy.go @@ -59,10 +59,7 @@ func resourceAwsProxyProtocolPolicyCreate(d *schema.ResourceData, meta interface *input.PolicyName, err) } - // Assign the policy name for use later - d.Partial(true) d.SetId(fmt.Sprintf("%s:%s", *elbname, *input.PolicyName)) - d.SetPartial("load_balancer") log.Printf("[INFO] ELB PolicyName: %s", *input.PolicyName) return resourceAwsProxyProtocolPolicyUpdate(d, meta) @@ -119,7 +116,6 @@ func resourceAwsProxyProtocolPolicyUpdate(d *schema.ResourceData, meta interface backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) - d.Partial(true) if d.HasChange("instance_ports") { o, n := d.GetChange("instance_ports") os := o.(*schema.Set) @@ -147,8 +143,6 @@ func resourceAwsProxyProtocolPolicyUpdate(d *schema.ResourceData, meta interface return fmt.Errorf("Error setting policy for backend: %s", err) } } - - d.SetPartial("instance_ports") } return resourceAwsProxyProtocolPolicyRead(d, meta) diff --git a/aws/resource_aws_proxy_protocol_policy_test.go b/aws/resource_aws_proxy_protocol_policy_test.go index bc6fd392d3e..46212498ebd 100644 --- a/aws/resource_aws_proxy_protocol_policy_test.go +++ b/aws/resource_aws_proxy_protocol_policy_test.go @@ -14,9 +14,10 @@ import ( func TestAccAWSProxyProtocolPolicy_basic(t *testing.T) { lbName := fmt.Sprintf("tf-test-lb-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckProxyProtocolPolicyDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckProxyProtocolPolicyDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccProxyProtocolPolicyConfig(lbName), diff --git a/aws/resource_aws_qldb_ledger.go b/aws/resource_aws_qldb_ledger.go index 0ae4325454e..442b226e5ad 100644 --- a/aws/resource_aws_qldb_ledger.go +++ b/aws/resource_aws_qldb_ledger.go @@ -106,6 +106,7 @@ func resourceAwsQLDBLedgerCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsQLDBLedgerRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).qldbconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig // Refresh the QLDB state input := &qldb.DescribeLedgerInput{ @@ -145,7 +146,7 @@ func resourceAwsQLDBLedgerRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error listing tags for QLDB Ledger: %s", err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -155,9 +156,6 @@ func resourceAwsQLDBLedgerRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsQLDBLedgerUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).qldbconn - // Turn on partial mode - d.Partial(true) - if d.HasChange("deletion_protection") { val := d.Get("deletion_protection").(bool) modifyOpts := &qldb.UpdateLedgerInput{ @@ -171,8 +169,6 @@ func resourceAwsQLDBLedgerUpdate(d *schema.ResourceData, meta interface{}) error return err } - - d.SetPartial("deletion_protection") } if d.HasChange("tags") { @@ -182,7 +178,6 @@ func resourceAwsQLDBLedgerUpdate(d *schema.ResourceData, meta interface{}) error } } - d.Partial(false) return resourceAwsQLDBLedgerRead(d, meta) } diff --git a/aws/resource_aws_ram_resource_share.go b/aws/resource_aws_ram_resource_share.go index 2d649fb0d08..09443ae58b7 100644 --- a/aws/resource_aws_ram_resource_share.go +++ b/aws/resource_aws_ram_resource_share.go @@ -87,6 +87,7 @@ func resourceAwsRamResourceShareCreate(d *schema.ResourceData, meta interface{}) func resourceAwsRamResourceShareRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ramconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig request := &ram.GetResourceSharesInput{ ResourceShareArns: []*string{aws.String(d.Id())}, @@ -121,7 +122,7 @@ func resourceAwsRamResourceShareRead(d *schema.ResourceData, meta interface{}) e d.Set("name", resourceShare.Name) d.Set("allow_external_principals", resourceShare.AllowExternalPrincipals) - if err := d.Set("tags", keyvaluetags.RamKeyValueTags(resourceShare.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RamKeyValueTags(resourceShare.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ram_resource_share_accepter.go b/aws/resource_aws_ram_resource_share_accepter.go index 8a15023255a..e7dbbdfb17a 100644 --- a/aws/resource_aws_ram_resource_share_accepter.go +++ b/aws/resource_aws_ram_resource_share_accepter.go @@ -151,7 +151,7 @@ func resourceAwsRamResourceShareAccepterRead(d *schema.ResourceData, meta interf shares, err := conn.GetResourceShares(listResourceSharesInput) if err != nil { - return fmt.Errorf("Error retrieving resource shares: %s", err) + return fmt.Errorf("error retrieving resource shares: %w", err) } if len(shares.ResourceShares) != 1 { diff --git a/aws/resource_aws_ram_resource_share_accepter_test.go b/aws/resource_aws_ram_resource_share_accepter_test.go index ec93a33c892..3b668c05bbf 100644 --- a/aws/resource_aws_ram_resource_share_accepter_test.go +++ b/aws/resource_aws_ram_resource_share_accepter_test.go @@ -17,6 +17,8 @@ import ( func TestAccAwsRamResourceShareAccepter_basic(t *testing.T) { var providers []*schema.Provider resourceName := "aws_ram_resource_share_accepter.test" + principalAssociationResourceName := "aws_ram_principal_association.test" + shareName := fmt.Sprintf("tf-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resource.ParallelTest(t, resource.TestCase{ @@ -31,11 +33,11 @@ func TestAccAwsRamResourceShareAccepter_basic(t *testing.T) { Config: testAccAwsRamResourceShareAccepterBasic(shareName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsRamResourceShareAccepterExists(resourceName), - resource.TestMatchResourceAttr(resourceName, "share_arn", regexp.MustCompile(`^arn\:aws\:ram\:.*resource-share/.+$`)), - resource.TestMatchResourceAttr(resourceName, "invitation_arn", regexp.MustCompile(`^arn\:aws\:ram\:.*resource-share-invitation/.+$`)), - resource.TestMatchResourceAttr(resourceName, "share_id", regexp.MustCompile(`^rs-.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "share_arn", principalAssociationResourceName, "resource_share_arn"), + testAccMatchResourceAttrRegionalARNAccountID(resourceName, "invitation_arn", "ram", `\d{12}`, regexp.MustCompile(fmt.Sprintf("resource-share-invitation/%s$", uuidRegexPattern))), + resource.TestMatchResourceAttr(resourceName, "share_id", regexp.MustCompile(fmt.Sprintf(`^rs-%s$`, uuidRegexPattern))), resource.TestCheckResourceAttr(resourceName, "status", ram.ResourceShareStatusActive), - resource.TestMatchResourceAttr(resourceName, "receiver_account_id", regexp.MustCompile(`\d{12}`)), + testAccCheckResourceAttrAccountID(resourceName, "receiver_account_id"), resource.TestMatchResourceAttr(resourceName, "sender_account_id", regexp.MustCompile(`\d{12}`)), resource.TestCheckResourceAttr(resourceName, "share_name", shareName), resource.TestCheckResourceAttr(resourceName, "resources.%", "0"), @@ -106,6 +108,10 @@ func testAccCheckAwsRamResourceShareAccepterExists(name string) resource.TestChe func testAccAwsRamResourceShareAccepterBasic(shareName string) string { return testAccAlternateAccountProviderConfig() + fmt.Sprintf(` +resource "aws_ram_resource_share_accepter" "test" { + share_arn = "${aws_ram_principal_association.test.resource_share_arn}" +} + resource "aws_ram_resource_share" "test" { provider = "aws.alternate" @@ -125,9 +131,5 @@ resource "aws_ram_principal_association" "test" { } data "aws_caller_identity" "receiver" {} - -resource "aws_ram_resource_share_accepter" "test" { - share_arn = "${aws_ram_principal_association.test.resource_share_arn}" -} `, shareName) } diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index ad12871a893..05dbbe43f0a 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -299,7 +299,6 @@ func resourceAwsRDSCluster() *schema.Resource { "snapshot_identifier": { Type: schema.TypeString, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, }, "port": { @@ -928,6 +927,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &rds.DescribeDBClustersInput{ DBClusterIdentifier: aws.String(d.Id()), @@ -1042,17 +1042,19 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf("error listing tags for RDS Cluster (%s): %s", aws.StringValue(dbc.DBClusterArn), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } // Fetch and save Global Cluster if engine mode global d.Set("global_cluster_identifier", "") - if aws.StringValue(dbc.EngineMode) == "global" { + if aws.StringValue(dbc.EngineMode) == "global" || aws.StringValue(dbc.EngineMode) == "provisioned" { globalCluster, err := rdsDescribeGlobalClusterFromDbClusterARN(conn, aws.StringValue(dbc.DBClusterArn)) - if err != nil { + // Ignore the following API error for regions/partitions that do not support RDS Global Clusters: + // InvalidParameterValue: Access Denied to API Version: APIGlobalDatabases + if err != nil && !isAWSErr(err, "InvalidParameterValue", "Access Denied to API Version: APIGlobalDatabases") { return fmt.Errorf("error reading RDS Global Cluster information for DB Cluster (%s): %s", d.Id(), err) } @@ -1118,7 +1120,6 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("db_cluster_parameter_group_name") { - d.SetPartial("db_cluster_parameter_group_name") req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) requestUpdate = true } @@ -1134,19 +1135,16 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error } if d.HasChange("enabled_cloudwatch_logs_exports") { - d.SetPartial("enabled_cloudwatch_logs_exports") req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) requestUpdate = true } if d.HasChange("scaling_configuration") { - d.SetPartial("scaling_configuration") req.ScalingConfiguration = expandRdsClusterScalingConfiguration(d.Get("scaling_configuration").([]interface{}), d.Get("engine_mode").(string)) requestUpdate = true } if d.HasChange("enable_http_endpoint") { - d.SetPartial("enable_http_endpoint") req.EnableHttpEndpoint = aws.Bool(d.Get("enable_http_endpoint").(bool)) requestUpdate = true } @@ -1242,8 +1240,6 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error if err := keyvaluetags.RdsUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating tags: %s", err) - } else { - d.SetPartial("tags") } } diff --git a/aws/resource_aws_rds_cluster_endpoint.go b/aws/resource_aws_rds_cluster_endpoint.go index 844ca91d958..f5f2c073cd6 100644 --- a/aws/resource_aws_rds_cluster_endpoint.go +++ b/aws/resource_aws_rds_cluster_endpoint.go @@ -114,6 +114,7 @@ func resourceAwsRDSClusterEndpointCreate(d *schema.ResourceData, meta interface{ func resourceAwsRDSClusterEndpointRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &rds.DescribeDBClusterEndpointsInput{ DBClusterEndpointIdentifier: aws.String(d.Id()), @@ -164,7 +165,7 @@ func resourceAwsRDSClusterEndpointRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for RDS Cluster Endpoint (%s): %s", *arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index f3b1fb06788..f8ee14d79c6 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -398,6 +398,8 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) // Retrieve DB Cluster information, to determine if this Instance is a writer conn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + resp, err := conn.DescribeDBClusters(&rds.DescribeDBClustersInput{ DBClusterIdentifier: db.DBClusterIdentifier, }) @@ -463,7 +465,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("error listing tags for RDS Cluster Instance (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -490,17 +492,14 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ } if d.HasChange("monitoring_role_arn") { - d.SetPartial("monitoring_role_arn") req.MonitoringRoleArn = aws.String(d.Get("monitoring_role_arn").(string)) requestUpdate = true } if d.HasChange("performance_insights_enabled") || d.HasChange("performance_insights_kms_key_id") { - d.SetPartial("performance_insights_enabled") req.EnablePerformanceInsights = aws.Bool(d.Get("performance_insights_enabled").(bool)) if v, ok := d.GetOk("performance_insights_kms_key_id"); ok { - d.SetPartial("performance_insights_kms_key_id") req.PerformanceInsightsKMSKeyId = aws.String(v.(string)) } @@ -508,49 +507,41 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ } if d.HasChange("preferred_backup_window") { - d.SetPartial("preferred_backup_window") req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) requestUpdate = true } if d.HasChange("preferred_maintenance_window") { - d.SetPartial("preferred_maintenance_window") req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) requestUpdate = true } if d.HasChange("monitoring_interval") { - d.SetPartial("monitoring_interval") req.MonitoringInterval = aws.Int64(int64(d.Get("monitoring_interval").(int))) requestUpdate = true } if d.HasChange("auto_minor_version_upgrade") { - d.SetPartial("auto_minor_version_upgrade") req.AutoMinorVersionUpgrade = aws.Bool(d.Get("auto_minor_version_upgrade").(bool)) requestUpdate = true } if d.HasChange("copy_tags_to_snapshot") { - d.SetPartial("copy_tags_to_snapshot") req.CopyTagsToSnapshot = aws.Bool(d.Get("copy_tags_to_snapshot").(bool)) requestUpdate = true } if d.HasChange("promotion_tier") { - d.SetPartial("promotion_tier") req.PromotionTier = aws.Int64(int64(d.Get("promotion_tier").(int))) requestUpdate = true } if d.HasChange("publicly_accessible") { - d.SetPartial("publicly_accessible") req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) requestUpdate = true } if d.HasChange("ca_cert_identifier") { - d.SetPartial("ca_cert_identifier") req.CACertificateIdentifier = aws.String(d.Get("ca_cert_identifier").(string)) requestUpdate = true } diff --git a/aws/resource_aws_rds_cluster_instance_test.go b/aws/resource_aws_rds_cluster_instance_test.go index ea4e527ba27..075e80bb342 100644 --- a/aws/resource_aws_rds_cluster_instance_test.go +++ b/aws/resource_aws_rds_cluster_instance_test.go @@ -853,10 +853,10 @@ func TestAccAWSRDSClusterInstance_CACertificateIdentifier(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSRDSClusterInstanceConfig_CACertificateIdentifier(rName, "rds-ca-2015"), + Config: testAccAWSRDSClusterInstanceConfig_CACertificateIdentifier(rName, "rds-ca-2019"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterInstanceExists(resourceName, &dbInstance), - resource.TestCheckResourceAttr(resourceName, "ca_cert_identifier", "rds-ca-2015"), + resource.TestCheckResourceAttr(resourceName, "ca_cert_identifier", "rds-ca-2019"), ), }, { @@ -868,13 +868,6 @@ func TestAccAWSRDSClusterInstance_CACertificateIdentifier(t *testing.T) { "identifier_prefix", }, }, - { - Config: testAccAWSRDSClusterInstanceConfig_CACertificateIdentifier(rName, "rds-ca-2019"), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSClusterInstanceExists(resourceName, &dbInstance), - resource.TestCheckResourceAttr(resourceName, "ca_cert_identifier", "rds-ca-2019"), - ), - }, }, }) } @@ -955,7 +948,14 @@ resource "aws_db_parameter_group" "bar" { func testAccAWSClusterInstanceConfig_az(n int) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_rds_cluster" "default" { cluster_identifier = "tf-aurora-cluster-test-%d" diff --git a/aws/resource_aws_rds_cluster_parameter_group.go b/aws/resource_aws_rds_cluster_parameter_group.go index 221cf09c53c..ee38be2dc36 100644 --- a/aws/resource_aws_rds_cluster_parameter_group.go +++ b/aws/resource_aws_rds_cluster_parameter_group.go @@ -123,6 +123,7 @@ func resourceAwsRDSClusterParameterGroupCreate(d *schema.ResourceData, meta inte func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { rdsconn := meta.(*AWSClient).rdsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeOpts := rds.DescribeDBClusterParameterGroupsInput{ DBClusterParameterGroupName: aws.String(d.Id()), @@ -172,7 +173,7 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) } - if err := d.Set("tags", keyvaluetags.RdsKeyValueTags(resp.TagList).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RdsKeyValueTags(resp.TagList).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -182,8 +183,6 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { rdsconn := meta.(*AWSClient).rdsconn - d.Partial(true) - if d.HasChange("parameter") { o, n := d.GetChange("parameter") if o == nil { @@ -271,11 +270,8 @@ func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta inte if err := keyvaluetags.RdsUpdateTags(rdsconn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating RDS Cluster Parameter Group (%s) tags: %s", d.Id(), err) } - d.SetPartial("tags") } - d.Partial(false) - return resourceAwsRDSClusterParameterGroupRead(d, meta) } diff --git a/aws/resource_aws_rds_cluster_parameter_group_test.go b/aws/resource_aws_rds_cluster_parameter_group_test.go index fe93ba456bb..0097ea4fde2 100644 --- a/aws/resource_aws_rds_cluster_parameter_group_test.go +++ b/aws/resource_aws_rds_cluster_parameter_group_test.go @@ -89,36 +89,27 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDBClusterParameterGroupConfig(parameterGroupName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:\d{12}:cluster-pg:.+`)), - resource.TestCheckResourceAttr( - resourceName, "name", parameterGroupName), - resource.TestCheckResourceAttr( - resourceName, "family", "aurora5.6"), - resource.TestCheckResourceAttr( - resourceName, "description", "Test cluster parameter group for terraform"), - resource.TestCheckResourceAttr( - resourceName, "parameter.1708034931.name", "character_set_results"), - resource.TestCheckResourceAttr( - resourceName, "parameter.1708034931.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.name", "character_set_server"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.name", "character_set_client"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "tags.%", "1"), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "rds", fmt.Sprintf("cluster-pg:%s", parameterGroupName)), + resource.TestCheckResourceAttr(resourceName, "name", parameterGroupName), + resource.TestCheckResourceAttr(resourceName, "family", "aurora5.6"), + resource.TestCheckResourceAttr(resourceName, "description", "Test cluster parameter group for terraform"), + resource.TestCheckResourceAttr(resourceName, "parameter.1708034931.name", "character_set_results"), + resource.TestCheckResourceAttr(resourceName, "parameter.1708034931.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.name", "character_set_server"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.name", "character_set_client"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), ), }, { @@ -131,34 +122,20 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestCheckResourceAttr( - resourceName, "name", parameterGroupName), - resource.TestCheckResourceAttr( - resourceName, "family", "aurora5.6"), - resource.TestCheckResourceAttr( - resourceName, "description", "Test cluster parameter group for terraform"), - resource.TestCheckResourceAttr( - resourceName, "parameter.1706463059.name", "collation_connection"), - resource.TestCheckResourceAttr( - resourceName, "parameter.1706463059.value", "utf8_unicode_ci"), - resource.TestCheckResourceAttr( - resourceName, "parameter.1708034931.name", "character_set_results"), - resource.TestCheckResourceAttr( - resourceName, "parameter.1708034931.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.name", "character_set_server"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2475805061.name", "collation_server"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2475805061.value", "utf8_unicode_ci"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.name", "character_set_client"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "name", parameterGroupName), + resource.TestCheckResourceAttr(resourceName, "family", "aurora5.6"), + resource.TestCheckResourceAttr(resourceName, "description", "Test cluster parameter group for terraform"), + resource.TestCheckResourceAttr(resourceName, "parameter.1706463059.name", "collation_connection"), + resource.TestCheckResourceAttr(resourceName, "parameter.1706463059.value", "utf8_unicode_ci"), + resource.TestCheckResourceAttr(resourceName, "parameter.1708034931.name", "character_set_results"), + resource.TestCheckResourceAttr(resourceName, "parameter.1708034931.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.name", "character_set_server"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "parameter.2475805061.name", "collation_server"), + resource.TestCheckResourceAttr(resourceName, "parameter.2475805061.value", "utf8_unicode_ci"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.name", "character_set_client"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), ), }, { @@ -182,35 +159,26 @@ func TestAccAWSDBClusterParameterGroup_withApplyMethod(t *testing.T) { resourceName := "aws_rds_cluster_parameter_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSDBClusterParameterGroupConfigWithApplyMethod(parameterGroupName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBClusterParameterGroupExists(resourceName, &v), testAccCheckAWSDBClusterParameterGroupAttributes(&v, parameterGroupName), - resource.TestMatchResourceAttr( - resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:\d{12}:cluster-pg:.+`)), - resource.TestCheckResourceAttr( - resourceName, "name", parameterGroupName), - resource.TestCheckResourceAttr( - resourceName, "family", "aurora5.6"), - resource.TestCheckResourceAttr( - resourceName, "description", "Test cluster parameter group for terraform"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.name", "character_set_server"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2421266705.apply_method", "immediate"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.name", "character_set_client"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.value", "utf8"), - resource.TestCheckResourceAttr( - resourceName, "parameter.2478663599.apply_method", "pending-reboot"), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "rds", fmt.Sprintf("cluster-pg:%s", parameterGroupName)), + resource.TestCheckResourceAttr(resourceName, "name", parameterGroupName), + resource.TestCheckResourceAttr(resourceName, "family", "aurora5.6"), + resource.TestCheckResourceAttr(resourceName, "description", "Test cluster parameter group for terraform"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.name", "character_set_server"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "parameter.2421266705.apply_method", "immediate"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.name", "character_set_client"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.value", "utf8"), + resource.TestCheckResourceAttr(resourceName, "parameter.2478663599.apply_method", "pending-reboot"), ), }, { diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index 8b24ddd5f3f..09190f788d0 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -102,7 +102,7 @@ func testSweepRdsClusters(region string) error { func TestAccAWSRDSCluster_basic(t *testing.T) { var dbCluster rds.DBCluster - rInt := acctest.RandInt() + clusterName := acctest.RandomWithPrefix("tf-aurora-cluster") resourceName := "aws_rds_cluster.test" resource.ParallelTest(t, resource.TestCase{ @@ -111,10 +111,10 @@ func TestAccAWSRDSCluster_basic(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSClusterConfig(rInt), + Config: testAccAWSClusterConfig(clusterName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterExists(resourceName, &dbCluster), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:\d{12}:cluster:.+`)), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "rds", fmt.Sprintf("cluster:%s", clusterName)), resource.TestCheckResourceAttr(resourceName, "backtrack_window", "0"), resource.TestCheckResourceAttr(resourceName, "copy_tags_to_snapshot", "false"), resource.TestCheckResourceAttr(resourceName, "storage_encrypted", "false"), @@ -1074,7 +1074,7 @@ func TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance(t *testing.T) { }) } -func TestAccAWSRDSCluster_GlobalClusterIdentifier(t *testing.T) { +func TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global(t *testing.T) { var dbCluster1 rds.DBCluster rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1087,7 +1087,7 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier(rName), + Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterExists(resourceName, &dbCluster1), resource.TestCheckResourceAttrPair(resourceName, "global_cluster_identifier", globalClusterResourceName, "id"), @@ -1109,7 +1109,7 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier(t *testing.T) { }) } -func TestAccAWSRDSCluster_GlobalClusterIdentifier_Add(t *testing.T) { +func TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Add(t *testing.T) { var dbCluster1 rds.DBCluster rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1140,14 +1140,14 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier_Add(t *testing.T) { }, }, { - Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier(rName), + Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global(rName), ExpectError: regexp.MustCompile(`Existing RDS Clusters cannot be added to an existing RDS Global Cluster`), }, }, }) } -func TestAccAWSRDSCluster_GlobalClusterIdentifier_Remove(t *testing.T) { +func TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Remove(t *testing.T) { var dbCluster1 rds.DBCluster rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1160,7 +1160,7 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier_Remove(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier(rName), + Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterExists(resourceName, &dbCluster1), resource.TestCheckResourceAttrPair(resourceName, "global_cluster_identifier", globalClusterResourceName, "id"), @@ -1189,7 +1189,7 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier_Remove(t *testing.T) { }) } -func TestAccAWSRDSCluster_GlobalClusterIdentifier_Update(t *testing.T) { +func TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Update(t *testing.T) { var dbCluster1 rds.DBCluster rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1203,7 +1203,7 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier_Update(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_Update(rName, globalClusterResourceName1), + Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global_Update(rName, globalClusterResourceName1), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterExists(resourceName, &dbCluster1), resource.TestCheckResourceAttrPair(resourceName, "global_cluster_identifier", globalClusterResourceName1, "id"), @@ -1222,13 +1222,48 @@ func TestAccAWSRDSCluster_GlobalClusterIdentifier_Update(t *testing.T) { }, }, { - Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_Update(rName, globalClusterResourceName2), + Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global_Update(rName, globalClusterResourceName2), ExpectError: regexp.MustCompile(`Existing RDS Clusters cannot be migrated between existing RDS Global Clusters`), }, }, }) } +func TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Provisioned(t *testing.T) { + var dbCluster1 rds.DBCluster + + rName := acctest.RandomWithPrefix("tf-acc-test") + globalClusterResourceName := "aws_rds_global_cluster.test" + resourceName := "aws_rds_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSRdsGlobalCluster(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Provisioned(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster1), + resource.TestCheckResourceAttrPair(resourceName, "global_cluster_identifier", globalClusterResourceName, "id"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "apply_immediately", + "cluster_identifier_prefix", + "master_password", + "skip_final_snapshot", + "snapshot_identifier", + }, + }, + }, + }) +} + func TestAccAWSRDSCluster_Port(t *testing.T) { var dbCluster1, dbCluster2 rds.DBCluster rInt := acctest.RandInt() @@ -2106,23 +2141,28 @@ func TestAccAWSRDSCluster_EnableHttpEndpoint(t *testing.T) { }) } -func testAccAWSClusterConfig(n int) string { +func testAccAWSClusterConfig(rName string) string { return fmt.Sprintf(` resource "aws_rds_cluster" "test" { - cluster_identifier = "tf-aurora-cluster-%d" + cluster_identifier = %[1]q database_name = "mydb" master_username = "foo" master_password = "mustbeeightcharaters" db_cluster_parameter_group_name = "default.aurora5.6" skip_final_snapshot = true } -`, n) +`, rName) } func testAccAWSClusterConfig_AvailabilityZones(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_rds_cluster" "test" { @@ -2164,6 +2204,11 @@ func testAccAWSClusterConfig_DbSubnetGroupName(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_rds_cluster" "test" { @@ -2213,6 +2258,11 @@ func testAccAWSClusterConfig_s3Restore(bucketName string, bucketPrefix string, u return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_region" "current" {} @@ -2225,8 +2275,8 @@ resource "aws_s3_bucket" "xtrabackup" { resource "aws_s3_bucket_object" "xtrabackup_db" { bucket = "${aws_s3_bucket.xtrabackup.id}" key = "%[2]s/mysql-5-6-xtrabackup.tar.gz" - source = "../files/mysql-5-6-xtrabackup.tar.gz" - etag = "${filemd5("../files/mysql-5-6-xtrabackup.tar.gz")}" + source = "./testdata/mysql-5-6-xtrabackup.tar.gz" + etag = "${filemd5("./testdata/mysql-5-6-xtrabackup.tar.gz")}" } resource "aws_iam_role" "rds_s3_access_role" { @@ -2799,6 +2849,13 @@ func testAccAWSClusterConfigEncryptedCrossRegionReplica(n int) string { return testAccAlternateRegionProviderConfig() + fmt.Sprintf(` data "aws_availability_zones" "alternate" { provider = "aws.alternate" + + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } data "aws_caller_identity" "current" {} @@ -2935,6 +2992,11 @@ func testAccAWSRDSClusterConfig_EngineMode_Multimaster(rName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -2982,7 +3044,7 @@ resource "aws_rds_cluster" "test" { `, rName) } -func testAccAWSRDSClusterConfig_GlobalClusterIdentifier(rName string) string { +func testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global(rName string) string { return fmt.Sprintf(` resource "aws_rds_global_cluster" "test" { global_cluster_identifier = %q @@ -2999,7 +3061,7 @@ resource "aws_rds_cluster" "test" { `, rName, rName) } -func testAccAWSRDSClusterConfig_GlobalClusterIdentifier_Update(rName, globalClusterIdentifierResourceName string) string { +func testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Global_Update(rName, globalClusterIdentifierResourceName string) string { return fmt.Sprintf(` resource "aws_rds_global_cluster" "test" { count = 2 @@ -3018,6 +3080,26 @@ resource "aws_rds_cluster" "test" { `, rName, rName, globalClusterIdentifierResourceName) } +func testAccAWSRDSClusterConfig_GlobalClusterIdentifier_EngineMode_Provisioned(rName string) string { + return fmt.Sprintf(` +resource "aws_rds_global_cluster" "test" { + engine = "aurora-postgresql" + engine_version = "10.11" + global_cluster_identifier = %[1]q +} + +resource "aws_rds_cluster" "test" { + cluster_identifier = %[1]q + engine = aws_rds_global_cluster.test.engine + engine_version = aws_rds_global_cluster.test.engine_version + global_cluster_identifier = aws_rds_global_cluster.test.id + master_password = "barbarbarbar" + master_username = "foo" + skip_final_snapshot = true +} +`, rName) +} + func testAccAWSRDSClusterConfig_ScalingConfiguration(rName string, autoPause bool, maxCapacity, minCapacity, secondsUntilAutoPause int, timeoutAction string) string { return fmt.Sprintf(` resource "aws_rds_cluster" "test" { diff --git a/aws/resource_aws_rds_global_cluster.go b/aws/resource_aws_rds_global_cluster.go index 92f2117dafe..92d1734d182 100644 --- a/aws/resource_aws_rds_global_cluster.go +++ b/aws/resource_aws_rds_global_cluster.go @@ -45,6 +45,7 @@ func resourceAwsRDSGlobalCluster() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ "aurora", "aurora-mysql", + "aurora-postgresql", }, false), }, "engine_version": { diff --git a/aws/resource_aws_rds_global_cluster_test.go b/aws/resource_aws_rds_global_cluster_test.go index 02b83e26181..7ee3ccaa9d6 100644 --- a/aws/resource_aws_rds_global_cluster_test.go +++ b/aws/resource_aws_rds_global_cluster_test.go @@ -270,6 +270,32 @@ func TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL(t *testing.T) { }) } +func TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql(t *testing.T) { + var globalCluster1 rds.GlobalCluster + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_rds_global_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSRdsGlobalCluster(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRdsGlobalClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRdsGlobalClusterConfigEngineVersion(rName, "aurora-postgresql", "10.11"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRdsGlobalClusterExists(resourceName, &globalCluster1), + resource.TestCheckResourceAttr(resourceName, "engine_version", "10.11"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSRdsGlobalCluster_StorageEncrypted(t *testing.T) { var globalCluster1, globalCluster2 rds.GlobalCluster rName := acctest.RandomWithPrefix("tf-acc-test") diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 95051bd3f59..5455792ca51 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -39,17 +39,26 @@ func resourceAwsRedshiftCluster() *schema.Resource { }, "database_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateRedshiftClusterDbName, + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 64), + validation.StringMatch(regexp.MustCompile(`^[0-9a-z_$]+$`), "must contain only lowercase alphanumeric characters, underscores, and dollar signs"), + validation.StringMatch(regexp.MustCompile(`(?i)^[a-z_]`), "first character must be a letter or underscore"), + ), }, "cluster_identifier": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateRedshiftClusterIdentifier, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringMatch(regexp.MustCompile(`^[0-9a-z-]+$`), "must contain only lowercase alphanumeric characters and hyphens"), + validation.StringMatch(regexp.MustCompile(`(?i)^[a-z]`), "first character must be a letter"), + validation.StringDoesNotMatch(regexp.MustCompile(`--`), "cannot contain two consecutive hyphens"), + validation.StringDoesNotMatch(regexp.MustCompile(`-$`), "cannot end with a hyphen"), + ), }, "cluster_type": { Type: schema.TypeString, @@ -63,17 +72,27 @@ func resourceAwsRedshiftCluster() *schema.Resource { }, "master_username": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateRedshiftClusterMasterUsername, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 128), + validation.StringMatch(regexp.MustCompile(`^\w+$`), "must contain only alphanumeric characters"), + validation.StringMatch(regexp.MustCompile(`(?i)^[a-z_]`), "first character must be a letter"), + ), }, "master_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - ValidateFunc: validateRedshiftClusterMasterPassword, + Type: schema.TypeString, + Optional: true, + Sensitive: true, + ValidateFunc: validation.All( + validation.StringLenBetween(8, 64), + validation.StringMatch(regexp.MustCompile(`^.*[a-z].*`), "must contain at least one lowercase letter"), + validation.StringMatch(regexp.MustCompile(`^.*[A-Z].*`), "must contain at least one uppercase letter"), + validation.StringMatch(regexp.MustCompile(`^.*[0-9].*`), "must contain at least one number"), + validation.StringMatch(regexp.MustCompile(`^[^\@\/'" ]*$`), "cannot contain [/@\"' ]"), + ), }, "cluster_security_groups": { @@ -187,9 +206,14 @@ func resourceAwsRedshiftCluster() *schema.Resource { }, "final_snapshot_identifier": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validateRedshiftClusterFinalSnapshotIdentifier, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 255), + validation.StringMatch(regexp.MustCompile(`^[0-9A-Za-z-]+$`), "must only contain alphanumeric characters and hyphens"), + validation.StringDoesNotMatch(regexp.MustCompile(`--`), "cannot contain two consecutive hyphens"), + validation.StringDoesNotMatch(regexp.MustCompile(`-$`), "cannot end in a hyphen"), + ), }, "skip_final_snapshot": { @@ -520,6 +544,7 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[INFO] Reading Redshift Cluster Information: %s", d.Id()) resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ @@ -616,7 +641,7 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er d.Set("cluster_public_key", rsc.ClusterPublicKey) d.Set("cluster_revision_number", rsc.ClusterRevisionNumber) - if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(rsc.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(rsc.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -641,7 +666,6 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - d.Partial(true) if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -649,8 +673,6 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) if err := keyvaluetags.RedshiftUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Redshift Cluster (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } requestUpdate := false @@ -770,8 +792,6 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Error modifying Redshift Cluster IAM Roles (%s): %s", d.Id(), err) } - - d.SetPartial("iam_roles") } if requestUpdate || d.HasChange("iam_roles") { @@ -825,8 +845,6 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) } } - d.Partial(false) - return resourceAwsRedshiftClusterRead(d, meta) } @@ -969,104 +987,3 @@ func resourceAwsRedshiftClusterStateRefreshFunc(id string, conn *redshift.Redshi return rsc, *rsc.ClusterStatus, nil } } - -func validateRedshiftClusterIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - return -} - -func validateRedshiftClusterDbName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z_$]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters, underscores, and dollar signs are allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-zA-Z_]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter or underscore", k)) - } - if len(value) > 64 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 64 characters: %q", k, value)) - } - if value == "" { - errors = append(errors, fmt.Errorf( - "%q cannot be an empty string", k)) - } - - return -} - -func validateRedshiftClusterFinalSnapshotIdentifier(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters and hyphens allowed in %q", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q cannot end in a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf("%q cannot be more than 255 characters", k)) - } - return -} - -func validateRedshiftClusterMasterUsername(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^\w+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only alphanumeric characters in %q", k)) - } - if !regexp.MustCompile(`^[A-Za-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if len(value) > 128 { - errors = append(errors, fmt.Errorf("%q cannot be more than 128 characters", k)) - } - return -} - -func validateRedshiftClusterMasterPassword(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^.*[a-z].*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must contain at least one lowercase letter", k)) - } - if !regexp.MustCompile(`^.*[A-Z].*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must contain at least one uppercase letter", k)) - } - if !regexp.MustCompile(`^.*[0-9].*`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q must contain at least one number", k)) - } - if !regexp.MustCompile(`^[^\@\/'" ]*$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain [/@\"' ]", k)) - } - if len(value) < 8 { - errors = append(errors, fmt.Errorf("%q must be at least 8 characters", k)) - } - return -} diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 370e5a9ae01..f1c76e2cb6e 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -59,42 +59,6 @@ func testSweepRedshiftClusters(region string) error { return nil } -func TestValidateRedshiftClusterDbName(t *testing.T) { - validNames := []string{ - "testdbname", - "test_dbname", - "testdbname123", - "testdbname$hashicorp", - "_dbname", - } - for _, v := range validNames { - _, errors := validateRedshiftClusterDbName(v, "name") - if len(errors) != 0 { - t.Fatalf("%q should be a valid Redshift DBName: %q", v, errors) - } - } - - invalidNames := []string{ - "!", - "/", - " ", - ":", - ";", - "test name", - "/slash-at-the-beginning", - "slash-at-the-end/", - "", - acctest.RandStringFromCharSet(100, acctest.CharSetAlpha), - "TestDBname", - } - for _, v := range invalidNames { - _, errors := validateRedshiftClusterDbName(v, "name") - if len(errors) == 0 { - t.Fatalf("%q should be an invalid Redshift DBName", v) - } - } -} - func TestAccAWSRedshiftCluster_basic(t *testing.T) { var v redshift.Cluster @@ -164,9 +128,10 @@ func TestAccAWSRedshiftCluster_withFinalSnapshot(t *testing.T) { func TestAccAWSRedshiftCluster_kmsKey(t *testing.T) { var v redshift.Cluster + resourceName := "aws_redshift_cluster.default" + kmsResourceName := "aws_kms_key.foo" + ri := acctest.RandInt() - config := testAccAWSRedshiftClusterConfig_kmsKey(ri) - keyRegex := regexp.MustCompile(`^arn:aws:([a-zA-Z0-9\-])+:([a-z]{2}-[a-z]+-\d{1})?:(\d{12})?:(.*)$`) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -174,14 +139,12 @@ func TestAccAWSRedshiftCluster_kmsKey(t *testing.T) { CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, Steps: []resource.TestStep{ { - Config: config, + Config: testAccAWSRedshiftClusterConfig_kmsKey(ri), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v), - resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "cluster_type", "single-node"), - resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "publicly_accessible", "true"), - resource.TestMatchResourceAttr("aws_redshift_cluster.default", "kms_key_id", keyRegex), + testAccCheckAWSRedshiftClusterExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "cluster_type", "single-node"), + resource.TestCheckResourceAttr(resourceName, "publicly_accessible", "true"), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_id", kmsResourceName, "arn"), ), }, { @@ -747,146 +710,6 @@ func testAccCheckAWSRedshiftClusterAvailabilityZone(c *redshift.Cluster, value s } } -func TestResourceAWSRedshiftClusterIdentifierValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "tEsting", - ErrCount: 1, - }, - { - Value: "1testing", - ErrCount: 1, - }, - { - Value: "testing--123", - ErrCount: 1, - }, - { - Value: "testing!", - ErrCount: 1, - }, - { - Value: "testing-", - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftClusterIdentifier(tc.Value, "aws_redshift_cluster_identifier") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Cluster cluster_identifier to trigger a validation error") - } - } -} - -func TestResourceAWSRedshiftClusterFinalSnapshotIdentifierValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "testing--123", - ErrCount: 1, - }, - { - Value: "testing-", - ErrCount: 1, - }, - { - Value: "Testingq123!", - ErrCount: 1, - }, - { - Value: acctest.RandStringFromCharSet(256, acctest.CharSetAlpha), - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftClusterFinalSnapshotIdentifier(tc.Value, "aws_redshift_cluster_final_snapshot_identifier") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Cluster final_snapshot_identifier to trigger a validation error") - } - } -} - -func TestResourceAWSRedshiftClusterMasterUsernameValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "1Testing", - ErrCount: 1, - }, - { - Value: "Testing!!", - ErrCount: 1, - }, - { - Value: acctest.RandStringFromCharSet(129, acctest.CharSetAlpha), - ErrCount: 1, - }, - { - Value: "testing_testing123", - ErrCount: 0, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftClusterMasterUsername(tc.Value, "aws_redshift_cluster_master_username") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Cluster master_username to trigger a validation error") - } - } -} - -func TestResourceAWSRedshiftClusterMasterPasswordValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "1TESTING", - ErrCount: 1, - }, - { - Value: "1testing", - ErrCount: 1, - }, - { - Value: "TestTest", - ErrCount: 1, - }, - { - Value: "T3st", - ErrCount: 1, - }, - { - Value: "1Testing", - ErrCount: 0, - }, - { - Value: "1Testing@", - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftClusterMasterPassword(tc.Value, "aws_redshift_cluster_master_password") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Cluster master_password to trigger a validation error") - } - } -} - func testAccCheckAWSRedshiftClusterNotRecreated(i, j *redshift.Cluster) resource.TestCheckFunc { return func(s *terraform.State) error { // In lieu of some other uniquely identifying attribute from the API that always changes diff --git a/aws/resource_aws_redshift_event_subscription.go b/aws/resource_aws_redshift_event_subscription.go index 1b8c8f88427..24e7a9eee10 100644 --- a/aws/resource_aws_redshift_event_subscription.go +++ b/aws/resource_aws_redshift_event_subscription.go @@ -108,6 +108,7 @@ func resourceAwsRedshiftEventSubscriptionCreate(d *schema.ResourceData, meta int func resourceAwsRedshiftEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig arn := arn.ARN{ Partition: meta.(*AWSClient).partition, @@ -156,7 +157,7 @@ func resourceAwsRedshiftEventSubscriptionRead(d *schema.ResourceData, meta inter if err := d.Set("customer_aws_id", sub.CustomerAwsId); err != nil { return err } - if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(sub.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(sub.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -188,8 +189,6 @@ func resourceAwsRedshiftEventSubscriptionRetrieve(name string, conn *redshift.Re func resourceAwsRedshiftEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - d.Partial(true) - req := &redshift.ModifyEventSubscriptionInput{ SubscriptionName: aws.String(d.Id()), SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), @@ -212,12 +211,8 @@ func resourceAwsRedshiftEventSubscriptionUpdate(d *schema.ResourceData, meta int if err := keyvaluetags.RedshiftUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Redshift Event Subscription (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } - d.Partial(false) - return nil } diff --git a/aws/resource_aws_redshift_event_subscription_test.go b/aws/resource_aws_redshift_event_subscription_test.go index bf47f132fa0..b873820f40b 100644 --- a/aws/resource_aws_redshift_event_subscription_test.go +++ b/aws/resource_aws_redshift_event_subscription_test.go @@ -2,16 +2,68 @@ 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/redshift" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_redshift_event_subscription", &resource.Sweeper{ + Name: "aws_redshift_event_subscription", + F: testSweepRedshiftEventSubscriptions, + }) +} + +func testSweepRedshiftEventSubscriptions(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).redshiftconn + var sweeperErrs *multierror.Error + + err = conn.DescribeEventSubscriptionsPages(&redshift.DescribeEventSubscriptionsInput{}, func(page *redshift.DescribeEventSubscriptionsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, eventSubscription := range page.EventSubscriptionsList { + name := aws.StringValue(eventSubscription.CustSubscriptionId) + + log.Printf("[INFO] Deleting Redshift Event Subscription: %s", name) + _, err = conn.DeleteEventSubscription(&redshift.DeleteEventSubscriptionInput{ + SubscriptionName: aws.String(name), + }) + if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting Redshift Event Subscription (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Redshift Event Subscriptions sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Redshift Event Subscriptions: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSRedshiftEventSubscription_basicUpdate(t *testing.T) { var v redshift.EventSubscription rInt := acctest.RandInt() @@ -268,24 +320,17 @@ func testAccCheckAWSRedshiftEventSubscriptionDestroy(s *terraform.State) error { SubscriptionName: aws.String(rs.Primary.ID), }) - if ae, ok := err.(awserr.Error); ok && ae.Code() == "SubscriptionNotFound" { + if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { continue } - if err == nil { - if len(resp.EventSubscriptionsList) != 0 && - *resp.EventSubscriptionsList[0].CustSubscriptionId == rs.Primary.ID { - return fmt.Errorf("Event Subscription still exists") - } - } - - // Verify the error - newerr, ok := err.(awserr.Error) - if !ok { + if err != nil { return err } - if newerr.Code() != "SubscriptionNotFound" { - return err + + if len(resp.EventSubscriptionsList) != 0 && + *resp.EventSubscriptionsList[0].CustSubscriptionId == rs.Primary.ID { + return fmt.Errorf("Event Subscription still exists") } } diff --git a/aws/resource_aws_redshift_parameter_group.go b/aws/resource_aws_redshift_parameter_group.go index 8f417c9a16a..91aaaf941a8 100644 --- a/aws/resource_aws_redshift_parameter_group.go +++ b/aws/resource_aws_redshift_parameter_group.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/redshift" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -32,10 +33,16 @@ func resourceAwsRedshiftParameterGroup() *schema.Resource { }, "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validateRedshiftParamGroupName, + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 255), + validation.StringMatch(regexp.MustCompile(`^[0-9a-z-]+$`), "must contain only lowercase alphanumeric characters and hyphens"), + validation.StringMatch(regexp.MustCompile(`(?i)^[a-z]`), "first character must be a letter"), + validation.StringDoesNotMatch(regexp.MustCompile(`--`), "cannot contain two consecutive hyphens"), + validation.StringDoesNotMatch(regexp.MustCompile(`-$`), "cannot end with a hyphen"), + ), }, "family": { @@ -115,6 +122,7 @@ func resourceAwsRedshiftParameterGroupCreate(d *schema.ResourceData, meta interf func resourceAwsRedshiftParameterGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeOpts := redshift.DescribeClusterParameterGroupsInput{ ParameterGroupName: aws.String(d.Id()), @@ -144,7 +152,7 @@ func resourceAwsRedshiftParameterGroupRead(d *schema.ResourceData, meta interfac d.Set("name", describeResp.ParameterGroups[0].ParameterGroupName) d.Set("family", describeResp.ParameterGroups[0].ParameterGroupFamily) d.Set("description", describeResp.ParameterGroups[0].Description) - if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(describeResp.ParameterGroups[0].Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(describeResp.ParameterGroups[0].Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -165,8 +173,6 @@ func resourceAwsRedshiftParameterGroupRead(d *schema.ResourceData, meta interfac func resourceAwsRedshiftParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - d.Partial(true) - if d.HasChange("parameter") { o, n := d.GetChange("parameter") if o == nil { @@ -197,7 +203,6 @@ func resourceAwsRedshiftParameterGroupUpdate(d *schema.ResourceData, meta interf return fmt.Errorf("Error modifying Redshift Parameter Group: %s", err) } } - d.SetPartial("parameter") } if d.HasChange("tags") { @@ -206,11 +211,8 @@ func resourceAwsRedshiftParameterGroupUpdate(d *schema.ResourceData, meta interf if err := keyvaluetags.RedshiftUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Redshift Parameter Group (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } - d.Partial(false) return resourceAwsRedshiftParameterGroupRead(d, meta) } @@ -235,28 +237,3 @@ func resourceAwsRedshiftParameterHash(v interface{}) int { return hashcode.String(buf.String()) } - -func validateRedshiftParamGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if !regexp.MustCompile(`^[a-z]`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) - } - if regexp.MustCompile(`--`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) - } - if regexp.MustCompile(`-$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) - } - return -} diff --git a/aws/resource_aws_redshift_parameter_group_test.go b/aws/resource_aws_redshift_parameter_group_test.go index b03214142eb..ceb06ca29e8 100644 --- a/aws/resource_aws_redshift_parameter_group_test.go +++ b/aws/resource_aws_redshift_parameter_group_test.go @@ -43,9 +43,10 @@ func TestAccAWSRedshiftParameterGroup_withParameters(t *testing.T) { resourceName := "aws_redshift_parameter_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSRedshiftParameterGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftParameterGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSRedshiftParameterGroupConfig(rInt), @@ -159,46 +160,6 @@ func TestAccAWSRedshiftParameterGroup_withTags(t *testing.T) { }) } -func TestResourceAWSRedshiftParameterGroupNameValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "tEsting123", - ErrCount: 1, - }, - { - Value: "testing123!", - ErrCount: 1, - }, - { - Value: "1testing123", - ErrCount: 1, - }, - { - Value: "testing--123", - ErrCount: 1, - }, - { - Value: "testing123-", - ErrCount: 1, - }, - { - Value: acctest.RandStringFromCharSet(256, acctest.CharSetAlpha), - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftParamGroupName(tc.Value, "aws_redshift_parameter_group_name") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Parameter Group Name to trigger a validation error") - } - } -} - func testAccCheckAWSRedshiftParameterGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).redshiftconn diff --git a/aws/resource_aws_redshift_security_group.go b/aws/resource_aws_redshift_security_group.go index 57f4b2bfd59..871c37b2454 100644 --- a/aws/resource_aws_redshift_security_group.go +++ b/aws/resource_aws_redshift_security_group.go @@ -14,6 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) func resourceAwsRedshiftSecurityGroup() *schema.Resource { @@ -23,15 +24,19 @@ func resourceAwsRedshiftSecurityGroup() *schema.Resource { Update: resourceAwsRedshiftSecurityGroupUpdate, Delete: resourceAwsRedshiftSecurityGroupDelete, Importer: &schema.ResourceImporter{ - State: resourceAwsRedshiftClusterImport, + State: schema.ImportStatePassthrough, }, Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateRedshiftSecurityGroupName, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 255), + validation.StringNotInSlice([]string{"default"}, false), + validation.StringMatch(regexp.MustCompile(`^[0-9a-z-]+$`), "must contain only lowercase alphanumeric characters and hyphens"), + ), }, "description": { @@ -248,24 +253,6 @@ func resourceAwsRedshiftSecurityGroupRetrieve(d *schema.ResourceData, meta inter return resp.ClusterSecurityGroups[0], nil } -func validateRedshiftSecurityGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if value == "default" { - errors = append(errors, fmt.Errorf("the Redshift Security Group name cannot be %q", value)) - } - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q: %q", - k, value)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 32 characters: %q", k, value)) - } - return - -} - func resourceAwsRedshiftSecurityGroupIngressHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) diff --git a/aws/resource_aws_redshift_security_group_test.go b/aws/resource_aws_redshift_security_group_test.go index fedb7e97175..c2f018439b6 100644 --- a/aws/resource_aws_redshift_security_group_test.go +++ b/aws/resource_aws_redshift_security_group_test.go @@ -53,9 +53,10 @@ func TestAccAWSRedshiftSecurityGroup_ingressCidr(t *testing.T) { resourceName := "aws_redshift_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSRedshiftSecurityGroupConfig_ingressCidr(rInt), @@ -277,38 +278,6 @@ func testAccCheckAWSRedshiftSecurityGroupDestroy(s *terraform.State) error { return nil } -func TestResourceAWSRedshiftSecurityGroupNameValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "default", - ErrCount: 1, - }, - { - Value: "testing123%%", - ErrCount: 1, - }, - { - Value: "TestingSG", - ErrCount: 1, - }, - { - Value: acctest.RandStringFromCharSet(256, acctest.CharSetAlpha), - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftSecurityGroupName(tc.Value, "aws_redshift_security_group_name") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Security Group Name to trigger a validation error") - } - } -} - func testAccAWSRedshiftSecurityGroupConfig_ingressCidr(rInt int) string { return fmt.Sprintf(` resource "aws_redshift_security_group" "test" { diff --git a/aws/resource_aws_redshift_snapshot_copy_grant.go b/aws/resource_aws_redshift_snapshot_copy_grant.go index 56121723e0d..2f6296a6c3a 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -15,13 +15,14 @@ import ( func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { return &schema.Resource{ - // There is no API for updating/modifying grants, hence no Update - // Instead changes to most fields will force a new resource Create: resourceAwsRedshiftSnapshotCopyGrantCreate, Read: resourceAwsRedshiftSnapshotCopyGrantRead, Update: resourceAwsRedshiftSnapshotCopyGrantUpdate, Delete: resourceAwsRedshiftSnapshotCopyGrantDelete, - Exists: resourceAwsRedshiftSnapshotCopyGrantExists, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "arn": { @@ -73,26 +74,47 @@ func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta int log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrant.SnapshotCopyGrantName) d.SetId(grantName) + err = resource.Retry(3*time.Minute, func() *resource.RetryError { + var err error + var grant *redshift.SnapshotCopyGrant + grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName) + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") || grant == nil { + return resource.RetryableError(err) + } + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + if isResourceTimeoutError(err) { + _, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName) + if err != nil { + return err + } + } + return resourceAwsRedshiftSnapshotCopyGrantRead(d, meta) } func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig grantName := d.Id() log.Printf("[DEBUG] Looking for grant: %s", grantName) - grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) - if err != nil { - return err - } - - if grant == nil { - log.Printf("[WARN] %s Redshift snapshot copy grant not found, removing from state file", grantName) + grant, err := findAwsRedshiftSnapshotCopyGrant(conn, grantName) + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") || grant == nil { + log.Printf("[WARN] snapshot copy grant (%s) not found, removing from state", grantName) d.SetId("") return nil } + if err != nil { + return err + } + arn := arn.ARN{ Partition: meta.(*AWSClient).partition, Service: "redshift", @@ -105,7 +127,7 @@ func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta inter d.Set("kms_key_id", grant.KmsKeyId) d.Set("snapshot_copy_grant_name", grant.SnapshotCopyGrantName) - if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(grant.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(grant.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -115,20 +137,14 @@ func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta inter func resourceAwsRedshiftSnapshotCopyGrantUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") if err := keyvaluetags.RedshiftUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Redshift Snapshot Copy Grant (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } - d.Partial(false) - return resourceAwsRedshiftSnapshotCopyGrantRead(d, meta) } @@ -157,91 +173,25 @@ func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta int return err } -func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).redshiftconn - - grantName := d.Id() - - log.Printf("[DEBUG] Looking for Grant: %s", grantName) - grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) - - if err != nil { - return false, err - } - if grant != nil { - return true, err - } - - return false, nil -} - -func getAwsRedshiftSnapshotCopyGrant(grants []*redshift.SnapshotCopyGrant, grantName string) *redshift.SnapshotCopyGrant { - for _, grant := range grants { - if *grant.SnapshotCopyGrantName == grantName { - return grant - } - } - - return nil -} - -/* -In the functions below it is not possible to use retryOnAwsCodes function, as there -is no get grant call, so an error has to be created if the grant is or isn't returned -by the describe grants call when expected. -*/ - -// NB: This function only retries the grant not being returned and some edge cases, while AWS Errors -// are handled by the findAwsRedshiftSnapshotCopyGrant function -func findAwsRedshiftSnapshotCopyGrantWithRetry(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { - var grant *redshift.SnapshotCopyGrant - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - var err error - grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) - - if err != nil { - if serr, ok := err.(*resource.NotFoundError); ok { - // Force a retry if the grant should exist - return resource.RetryableError(serr) - } - - return resource.NonRetryableError(err) - } - - return nil - }) - if isResourceTimeoutError(err) { - grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) - } - if err != nil { - return nil, fmt.Errorf("Error finding snapshot copy grant: %s", err) - } - return grant, nil -} - // Used by the tests as well func waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn *redshift.Redshift, grantName string) error { - var grant *redshift.SnapshotCopyGrant err := resource.Retry(3*time.Minute, func() *resource.RetryError { var err error - grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) - if err != nil { - if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { - return nil - } + var grant *redshift.SnapshotCopyGrant + grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName) + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") || grant == nil { + return nil } - - if grant != nil { - // Force a retry if the grant still exists - return resource.RetryableError( - fmt.Errorf("[DEBUG] Grant still exists while expected to be deleted: %s", *grant.SnapshotCopyGrantName)) + if err != nil { + return resource.NonRetryableError(err) } - return resource.NonRetryableError(err) + return resource.RetryableError(fmt.Errorf("[DEBUG] Grant still exists while expected to be deleted: %s", grantName)) }) if isResourceTimeoutError(err) { - grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) - if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { + var grant *redshift.SnapshotCopyGrant + grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName) + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") || grant == nil { return nil } } @@ -251,20 +201,10 @@ func waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn *redshift.Redshift, gra return nil } -// The DescribeSnapshotCopyGrants API defaults to listing only 100 grants -// Use a marker to iterate over all grants in "pages" -// NB: This function only retries on AWS Errors -func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, marker *string) (*redshift.SnapshotCopyGrant, error) { +func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { input := redshift.DescribeSnapshotCopyGrantsInput{ - MaxRecords: aws.Int64(int64(100)), - } - - // marker and grant name are mutually exclusive - if marker != nil { - input.Marker = marker - } else { - input.SnapshotCopyGrantName = aws.String(grantName) + SnapshotCopyGrantName: aws.String(grantName), } out, err := conn.DescribeSnapshotCopyGrants(&input) @@ -273,16 +213,9 @@ func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, return nil, err } - grant := getAwsRedshiftSnapshotCopyGrant(out.SnapshotCopyGrants, grantName) - if grant != nil { - return grant, nil - } else if out.Marker != nil { - log.Printf("[DEBUG] Snapshot copy grant not found but marker returned, getting next page via marker: %s", aws.StringValue(out.Marker)) - return findAwsRedshiftSnapshotCopyGrant(conn, grantName, out.Marker) + if out == nil || len(out.SnapshotCopyGrants) == 0 { + return nil, nil } - return nil, &resource.NotFoundError{ - Message: fmt.Sprintf("[DEBUG] Grant %s not found", grantName), - LastRequest: input, - } + return out.SnapshotCopyGrants[0], nil } diff --git a/aws/resource_aws_redshift_snapshot_copy_grant_test.go b/aws/resource_aws_redshift_snapshot_copy_grant_test.go index ddea240dea1..6b94094f99e 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant_test.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { - + resourceName := "aws_redshift_snapshot_copy_grant.test" rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ @@ -23,53 +23,80 @@ func TestAccAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { { Config: testAccAWSRedshiftSnapshotCopyGrant_Basic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSRedshiftSnapshotCopyGrantExists("aws_redshift_snapshot_copy_grant.basic"), - resource.TestCheckResourceAttr("aws_redshift_snapshot_copy_grant.basic", "snapshot_copy_grant_name", rName), - resource.TestCheckResourceAttr("aws_redshift_snapshot_copy_grant.basic", "tags.Name", "tf-redshift-snapshot-copy-grant-basic"), - resource.TestCheckResourceAttrSet("aws_redshift_snapshot_copy_grant.basic", "kms_key_id"), + testAccCheckAWSRedshiftSnapshotCopyGrantExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "snapshot_copy_grant_name", rName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } func TestAccAWSRedshiftSnapshotCopyGrant_Update(t *testing.T) { - + resourceName := "aws_redshift_snapshot_copy_grant.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resourceName := "aws_redshift_snapshot_copy_grant.basic" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSnapshotCopyGrantDestroy, Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftSnapshotCopyGrantWithTags(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftSnapshotCopyGrantExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + resource.TestCheckResourceAttr(resourceName, "tags.Env", "Test"), + ), + }, { Config: testAccAWSRedshiftSnapshotCopyGrant_Basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRedshiftSnapshotCopyGrantExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "tf-redshift-snapshot-copy-grant-basic"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { Config: testAccAWSRedshiftSnapshotCopyGrantWithTags(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRedshiftSnapshotCopyGrantExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "tf-redshift-snapshot-copy-grant-basic"), - resource.TestCheckResourceAttr(resourceName, "tags.Env", "Production"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + resource.TestCheckResourceAttr(resourceName, "tags.Env", "Test"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSRedshiftSnapshotCopyGrant_disappears(t *testing.T) { + resourceName := "aws_redshift_snapshot_copy_grant.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftSnapshotCopyGrantDestroy, + Steps: []resource.TestStep{ { Config: testAccAWSRedshiftSnapshotCopyGrant_Basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRedshiftSnapshotCopyGrantExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "tags.%", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "tf-redshift-snapshot-copy-grant-basic"), + testAccCheckResourceDisappears(testAccProvider, resourceAwsRedshiftSnapshotCopyGrant(), resourceName), ), + ExpectNonEmptyPlan: true, }, }, }) @@ -128,24 +155,20 @@ func testAccCheckAWSRedshiftSnapshotCopyGrantExists(name string) resource.TestCh func testAccAWSRedshiftSnapshotCopyGrant_Basic(rName string) string { return fmt.Sprintf(` -resource "aws_redshift_snapshot_copy_grant" "basic" { - snapshot_copy_grant_name = "%s" - - tags = { - Name = "tf-redshift-snapshot-copy-grant-basic" - } +resource "aws_redshift_snapshot_copy_grant" "test" { + snapshot_copy_grant_name = %[1]q } `, rName) } func testAccAWSRedshiftSnapshotCopyGrantWithTags(rName string) string { return fmt.Sprintf(` -resource "aws_redshift_snapshot_copy_grant" "basic" { - snapshot_copy_grant_name = "%s" +resource "aws_redshift_snapshot_copy_grant" "test" { + snapshot_copy_grant_name = %[1]q tags = { - Name = "tf-redshift-snapshot-copy-grant-basic" - Env = "Production" + Name = %[1]q + Env = "Test" } } `, rName) diff --git a/aws/resource_aws_redshift_snapshot_schedule.go b/aws/resource_aws_redshift_snapshot_schedule.go index 05e83931209..97aaad450bc 100644 --- a/aws/resource_aws_redshift_snapshot_schedule.go +++ b/aws/resource_aws_redshift_snapshot_schedule.go @@ -97,6 +97,7 @@ func resourceAwsRedshiftSnapshotScheduleCreate(d *schema.ResourceData, meta inte func resourceAwsRedshiftSnapshotScheduleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig descOpts := &redshift.DescribeSnapshotSchedulesInput{ ScheduleIdentifier: aws.String(d.Id()), @@ -120,7 +121,7 @@ func resourceAwsRedshiftSnapshotScheduleRead(d *schema.ResourceData, meta interf return fmt.Errorf("Error setting definitions: %s", err) } - if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(snapshotSchedule.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(snapshotSchedule.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -139,7 +140,6 @@ func resourceAwsRedshiftSnapshotScheduleRead(d *schema.ResourceData, meta interf func resourceAwsRedshiftSnapshotScheduleUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - d.Partial(true) if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -147,8 +147,6 @@ func resourceAwsRedshiftSnapshotScheduleUpdate(d *schema.ResourceData, meta inte if err := keyvaluetags.RedshiftUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Redshift Snapshot Schedule (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } if d.HasChange("definitions") { @@ -165,7 +163,6 @@ func resourceAwsRedshiftSnapshotScheduleUpdate(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("Error modifying Redshift Snapshot Schedule %s: %s", d.Id(), err) } - d.SetPartial("definitions") } return resourceAwsRedshiftSnapshotScheduleRead(d, meta) diff --git a/aws/resource_aws_redshift_subnet_group.go b/aws/resource_aws_redshift_subnet_group.go index bb51c7d9816..33091d3533e 100644 --- a/aws/resource_aws_redshift_subnet_group.go +++ b/aws/resource_aws_redshift_subnet_group.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/redshift" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -29,10 +30,14 @@ func resourceAwsRedshiftSubnetGroup() *schema.Resource { }, "name": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - ValidateFunc: validateRedshiftSubnetGroupName, + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 255), + validation.StringMatch(regexp.MustCompile(`^[0-9a-z-]+$`), "must contain only lowercase alphanumeric characters and hyphens"), + validation.StringNotInSlice([]string{"default"}, false), + ), }, "description": { @@ -83,6 +88,7 @@ func resourceAwsRedshiftSubnetGroupCreate(d *schema.ResourceData, meta interface func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeOpts := redshift.DescribeClusterSubnetGroupsInput{ ClusterSubnetGroupName: aws.String(d.Id()), @@ -105,7 +111,7 @@ func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{} d.Set("name", d.Id()) d.Set("description", describeResp.ClusterSubnetGroups[0].Description) d.Set("subnet_ids", subnetIdsToSlice(describeResp.ClusterSubnetGroups[0].Subnets)) - if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(describeResp.ClusterSubnetGroups[0].Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.RedshiftKeyValueTags(describeResp.ClusterSubnetGroups[0].Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -124,7 +130,6 @@ func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{} func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - d.Partial(true) if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -132,8 +137,6 @@ func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface if err := keyvaluetags.RedshiftUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Redshift Subnet Group (%s) tags: %s", d.Get("arn").(string), err) } - - d.SetPartial("tags") } if d.HasChange("subnet_ids") || d.HasChange("description") { @@ -159,8 +162,6 @@ func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface } } - d.Partial(false) - return resourceAwsRedshiftSubnetGroupRead(d, meta) } @@ -184,20 +185,3 @@ func subnetIdsToSlice(subnetIds []*redshift.Subnet) []string { } return subnetsSlice } - -func validateRedshiftSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) - } - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - if regexp.MustCompile(`(?i)^default$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q is not allowed as %q", "Default", k)) - } - return -} diff --git a/aws/resource_aws_redshift_subnet_group_test.go b/aws/resource_aws_redshift_subnet_group_test.go index 20669c280ad..2604ca610a2 100644 --- a/aws/resource_aws_redshift_subnet_group_test.go +++ b/aws/resource_aws_redshift_subnet_group_test.go @@ -158,46 +158,6 @@ func TestAccAWSRedshiftSubnetGroup_tags(t *testing.T) { }) } -func TestResourceAWSRedshiftSubnetGroupNameValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - { - Value: "default", - ErrCount: 1, - }, - { - Value: "testing123%%", - ErrCount: 1, - }, - { - Value: "TestingSG", - ErrCount: 1, - }, - { - Value: "testing_123", - ErrCount: 1, - }, - { - Value: "testing.123", - ErrCount: 1, - }, - { - Value: acctest.RandStringFromCharSet(256, acctest.CharSetAlpha), - ErrCount: 1, - }, - } - - for _, tc := range cases { - _, errors := validateRedshiftSubnetGroupName(tc.Value, "aws_redshift_subnet_group_name") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the Redshift Subnet Group Name to trigger a validation error") - } - } -} - func testAccCheckRedshiftSubnetGroupDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).redshiftconn diff --git a/aws/resource_aws_resourcegroups_group.go b/aws/resource_aws_resourcegroups_group.go index 30ce602419e..f5da289eb1e 100644 --- a/aws/resource_aws_resourcegroups_group.go +++ b/aws/resource_aws_resourcegroups_group.go @@ -98,6 +98,7 @@ func resourceAwsResourceGroupsGroupCreate(d *schema.ResourceData, meta interface func resourceAwsResourceGroupsGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).resourcegroupsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig g, err := conn.GetGroup(&resourcegroups.GetGroupInput{ GroupName: aws.String(d.Id()), @@ -137,7 +138,7 @@ func resourceAwsResourceGroupsGroupRead(d *schema.ResourceData, meta interface{} if err != nil { return fmt.Errorf("error listing tags for resource (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_route.go b/aws/resource_aws_route.go index 891c5c2e5c2..c4cb8ac4369 100644 --- a/aws/resource_aws_route.go +++ b/aws/resource_aws_route.go @@ -8,11 +8,11 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) // How long to sleep if a limit-exceeded event happens @@ -27,7 +27,6 @@ func resourceAwsRoute() *schema.Resource { Read: resourceAwsRouteRead, Update: resourceAwsRouteUpdate, Delete: resourceAwsRouteDelete, - Exists: resourceAwsRouteExists, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { idParts := strings.Split(d.Id(), "_") @@ -54,14 +53,19 @@ func resourceAwsRoute() *schema.Resource { Schema: map[string]*schema.Schema{ "destination_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.IsCIDR, }, "destination_ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.IsCIDR, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return isIpv6CidrsEquals(old, new) + }, }, "destination_prefix_list_id": { @@ -281,6 +285,10 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { if v, ok := d.GetOk("destination_cidr_block"); ok { err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { route, err = resourceAwsRouteFindRoute(conn, d.Get("route_table_id").(string), v.(string), "") + if err == nil && route != nil { + return nil + } + return resource.RetryableError(err) }) if isResourceTimeoutError(err) { @@ -289,11 +297,18 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf("Error finding route after creating it: %s", err) } + if route == nil { + return fmt.Errorf("Unable to find matching route for Route Table (%s) and destination CIDR block (%s).", d.Get("route_table_id").(string), v) + } } if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { route, err = resourceAwsRouteFindRoute(conn, d.Get("route_table_id").(string), "", v.(string)) + if err == nil && route != nil { + return nil + } + return resource.RetryableError(err) }) if isResourceTimeoutError(err) { @@ -302,10 +317,14 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf("Error finding route after creating it: %s", err) } + if route == nil { + return fmt.Errorf("Unable to find matching route for Route Table (%s) and destination IPv6 CIDR block (%s).", d.Get("route_table_id").(string), v) + } } d.SetId(resourceAwsRouteID(d, route)) resourceAwsRouteSetResourceData(d, route) + return nil } @@ -317,16 +336,23 @@ func resourceAwsRouteRead(d *schema.ResourceData, meta interface{}) error { destinationIpv6CidrBlock := d.Get("destination_ipv6_cidr_block").(string) route, err := resourceAwsRouteFindRoute(conn, routeTableId, destinationCidrBlock, destinationIpv6CidrBlock) + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { + log.Printf("[WARN] Route Table (%s) not found, removing from state", routeTableId) + d.SetId("") + return nil + } if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { - log.Printf("[WARN] Route Table %q could not be found. Removing Route from state.", - routeTableId) - d.SetId("") - return nil - } return err } + + if route == nil { + log.Printf("[WARN] Matching route not found, removing from state") + d.SetId("") + return nil + } + resourceAwsRouteSetResourceData(d, route) + return nil } @@ -449,17 +475,18 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { } log.Printf("[DEBUG] Route delete opts: %s", deleteOpts) - var resp *ec2.DeleteRouteOutput err := resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { log.Printf("[DEBUG] Trying to delete route with opts %s", deleteOpts) var err error - resp, err = conn.DeleteRoute(deleteOpts) - log.Printf("[DEBUG] Route delete result: %s", resp) - + _, err = conn.DeleteRoute(deleteOpts) if err == nil { return nil } + if isAWSErr(err, "InvalidRoute.NotFound", "") { + return nil + } + if isAWSErr(err, "InvalidParameterException", "") { return resource.RetryableError(err) } @@ -467,7 +494,10 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { return resource.NonRetryableError(err) }) if isResourceTimeoutError(err) { - resp, err = conn.DeleteRoute(deleteOpts) + _, err = conn.DeleteRoute(deleteOpts) + } + if isAWSErr(err, "InvalidRoute.NotFound", "") { + return nil } if err != nil { return fmt.Errorf("Error deleting route: %s", err) @@ -475,48 +505,6 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { return nil } -func resourceAwsRouteExists(d *schema.ResourceData, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).ec2conn - routeTableId := d.Get("route_table_id").(string) - - findOpts := &ec2.DescribeRouteTablesInput{ - RouteTableIds: []*string{&routeTableId}, - } - - res, err := conn.DescribeRouteTables(findOpts) - if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { - log.Printf("[WARN] Route Table %q could not be found.", routeTableId) - return false, nil - } - return false, fmt.Errorf("Error while checking if route exists: %s", err) - } - - if len(res.RouteTables) < 1 || res.RouteTables[0] == nil { - log.Printf("[WARN] Route Table %q is gone, or route does not exist.", - routeTableId) - return false, nil - } - - if v, ok := d.GetOk("destination_cidr_block"); ok { - for _, route := range (*res.RouteTables[0]).Routes { - if route.DestinationCidrBlock != nil && *route.DestinationCidrBlock == v.(string) { - return true, nil - } - } - } - - if v, ok := d.GetOk("destination_ipv6_cidr_block"); ok { - for _, route := range (*res.RouteTables[0]).Routes { - if route.DestinationIpv6CidrBlock != nil && *route.DestinationIpv6CidrBlock == v.(string) { - return true, nil - } - } - } - - return false, nil -} - // Helper: Create an ID for a route func resourceAwsRouteID(d *schema.ResourceData, r *ec2.Route) string { @@ -527,7 +515,8 @@ func resourceAwsRouteID(d *schema.ResourceData, r *ec2.Route) string { return fmt.Sprintf("r-%s%d", d.Get("route_table_id").(string), hashcode.String(*r.DestinationCidrBlock)) } -// Helper: retrieve a route +// resourceAwsRouteFindRoute returns any route whose destination is the specified IPv4 or IPv6 CIDR block. +// Returns nil if the route table exists but no matching destination is found. func resourceAwsRouteFindRoute(conn *ec2.EC2, rtbid string, cidr string, ipv6cidr string) (*ec2.Route, error) { routeTableID := rtbid @@ -541,8 +530,7 @@ func resourceAwsRouteFindRoute(conn *ec2.EC2, rtbid string, cidr string, ipv6cid } if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { - return nil, fmt.Errorf("Route Table %q is gone, or route does not exist.", - routeTableID) + return nil, nil } if cidr != "" { @@ -552,22 +540,18 @@ func resourceAwsRouteFindRoute(conn *ec2.EC2, rtbid string, cidr string, ipv6cid } } - return nil, fmt.Errorf("Unable to find matching route for Route Table (%s) "+ - "and destination CIDR block (%s).", rtbid, cidr) + return nil, nil } if ipv6cidr != "" { for _, route := range (*resp.RouteTables[0]).Routes { - if route.DestinationIpv6CidrBlock != nil && *route.DestinationIpv6CidrBlock == ipv6cidr { + if route.DestinationIpv6CidrBlock != nil && isIpv6CidrsEquals(aws.StringValue(route.DestinationIpv6CidrBlock), ipv6cidr) { return route, nil } } - return nil, fmt.Errorf("Unable to find matching route for Route Table (%s) "+ - "and destination IPv6 CIDR block (%s).", rtbid, ipv6cidr) + return nil, nil } - return nil, fmt.Errorf("When trying to find a matching route for Route Table %q "+ - "you need to specify a CIDR block of IPv6 CIDR Block", rtbid) - + return nil, nil } diff --git a/aws/resource_aws_route53_health_check.go b/aws/resource_aws_route53_health_check.go index 3cf19ab7aaf..e3ed4e8aedd 100644 --- a/aws/resource_aws_route53_health_check.go +++ b/aws/resource_aws_route53_health_check.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "net" "strings" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -57,6 +58,9 @@ func resourceAwsRoute53HealthCheck() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return net.ParseIP(old).Equal(net.ParseIP(new)) + }, }, "fqdn": { Type: schema.TypeString, @@ -114,11 +118,22 @@ func resourceAwsRoute53HealthCheck() *schema.Resource { "insufficient_data_health_status": { Type: schema.TypeString, Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + route53.InsufficientDataHealthStatusHealthy, + route53.InsufficientDataHealthStatusLastKnownStatus, + route53.InsufficientDataHealthStatusUnhealthy, + }, true), }, "reference_name": { Type: schema.TypeString, Optional: true, ForceNew: true, + // The max length of the reference name is 64 characters for the API. + // Terraform appends a 37-character unique ID to the provided + // reference_name. This limits the length of the resource argument to 27. + // + // Example generated suffix: -terraform-20190122200019880700000001 + ValidateFunc: validation.StringLenBetween(0, (64 - resource.UniqueIDSuffixLength - 11)), }, "enable_sni": { Type: schema.TypeBool, @@ -322,6 +337,7 @@ func resourceAwsRoute53HealthCheckCreate(d *schema.ResourceData, meta interface{ func resourceAwsRoute53HealthCheckRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).r53conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig read, err := conn.GetHealthCheck(&route53.GetHealthCheckInput{HealthCheckId: aws.String(d.Id())}) if err != nil { @@ -370,7 +386,7 @@ func resourceAwsRoute53HealthCheckRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for Route53 Health Check (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_route53_health_check_test.go b/aws/resource_aws_route53_health_check_test.go index dd7f77eff86..58a6c0b8e4d 100644 --- a/aws/resource_aws_route53_health_check_test.go +++ b/aws/resource_aws_route53_health_check_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/service/route53" @@ -10,6 +11,7 @@ import ( ) func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -20,8 +22,9 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { { Config: testAccRoute53HealthCheckConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "measure_latency", "true"), + resource.TestCheckResourceAttr(resourceName, "port", "80"), resource.TestCheckResourceAttr(resourceName, "invert_healthcheck", "true"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), @@ -34,7 +37,7 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { { Config: testAccRoute53HealthCheckConfigUpdate, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "failure_threshold", "5"), resource.TestCheckResourceAttr(resourceName, "invert_healthcheck", "false"), ), @@ -44,6 +47,7 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { } func TestAccAWSRoute53HealthCheck_tags(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -54,7 +58,7 @@ func TestAccAWSRoute53HealthCheck_tags(t *testing.T) { { Config: testAccRoute53HealthCheckConfigTags1("key1", "value1"), Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), ), @@ -67,7 +71,7 @@ func TestAccAWSRoute53HealthCheck_tags(t *testing.T) { { Config: testAccRoute53HealthCheckConfigTags2("key1", "value1updated", "key2", "value2"), Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), @@ -76,7 +80,7 @@ func TestAccAWSRoute53HealthCheck_tags(t *testing.T) { { Config: testAccRoute53HealthCheckConfigTags1("key2", "value2"), Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), ), @@ -86,6 +90,7 @@ func TestAccAWSRoute53HealthCheck_tags(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withSearchString(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -96,7 +101,7 @@ func TestAccAWSRoute53HealthCheck_withSearchString(t *testing.T) { { Config: testAccRoute53HealthCheckConfigWithSearchString, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "invert_healthcheck", "false"), resource.TestCheckResourceAttr(resourceName, "search_string", "OK"), ), @@ -109,7 +114,7 @@ func TestAccAWSRoute53HealthCheck_withSearchString(t *testing.T) { { Config: testAccRoute53HealthCheckConfigWithSearchStringUpdate, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "invert_healthcheck", "true"), resource.TestCheckResourceAttr(resourceName, "search_string", "FAILED"), ), @@ -119,6 +124,7 @@ func TestAccAWSRoute53HealthCheck_withSearchString(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -128,7 +134,7 @@ func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) { { Config: testAccRoute53HealthCheckConfig_withChildHealthChecks, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), ), }, { @@ -141,6 +147,7 @@ func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withHealthCheckRegions(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -150,7 +157,7 @@ func TestAccAWSRoute53HealthCheck_withHealthCheckRegions(t *testing.T) { { Config: testAccRoute53HealthCheckConfig_withHealthCheckRegions, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "regions.#", "3"), ), }, @@ -164,6 +171,7 @@ func TestAccAWSRoute53HealthCheck_withHealthCheckRegions(t *testing.T) { } func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -173,7 +181,8 @@ func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) { { Config: testAccRoute53HealthCheckIpConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), + resource.TestCheckResourceAttr(resourceName, "ip_address", "1.2.3.4"), ), }, { @@ -185,7 +194,36 @@ func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) { }) } +func TestAccAWSRoute53HealthCheck_Ipv6Config(t *testing.T) { + var check route53.HealthCheck + resourceName := "aws_route53_health_check.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53HealthCheckDestroy, + Steps: []resource.TestStep{ + { + Config: testAccRoute53HealthCheckIpv6Config, + Check: resource.ComposeTestCheckFunc( + testAccCheckRoute53HealthCheckExists(resourceName, &check), + resource.TestCheckResourceAttr(resourceName, "ip_address", "1234:5678:9abc:6811:0:0:0:4"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccRoute53HealthCheckIpv6ExpandedConfig, + PlanOnly: true, + }, + }, + }) +} + func TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -195,7 +233,7 @@ func TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck(t *testing.T) { { Config: testAccRoute53HealthCheckCloudWatchAlarm, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "cloudwatch_alarm_name", "cloudwatch-healthcheck-alarm"), ), }, @@ -209,6 +247,7 @@ func TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withSNI(t *testing.T) { + var check route53.HealthCheck resourceName := "aws_route53_health_check.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -219,7 +258,7 @@ func TestAccAWSRoute53HealthCheck_withSNI(t *testing.T) { { Config: testAccRoute53HealthCheckConfigWithoutSNI, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "enable_sni", "true"), ), }, @@ -231,14 +270,14 @@ func TestAccAWSRoute53HealthCheck_withSNI(t *testing.T) { { Config: testAccRoute53HealthCheckConfigWithSNIDisabled, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "enable_sni", "false"), ), }, { Config: testAccRoute53HealthCheckConfigWithSNI, Check: resource.ComposeTestCheckFunc( - testAccCheckRoute53HealthCheckExists(resourceName), + testAccCheckRoute53HealthCheckExists(resourceName, &check), resource.TestCheckResourceAttr(resourceName, "enable_sni", "true"), ), }, @@ -246,6 +285,26 @@ func TestAccAWSRoute53HealthCheck_withSNI(t *testing.T) { }) } +func TestAccAWSRoute53HealthCheck_disappears(t *testing.T) { + var check route53.HealthCheck + resourceName := "aws_route53_health_check.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53HealthCheckDestroy, + Steps: []resource.TestStep{ + { + Config: testAccRoute53HealthCheckConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRoute53HealthCheckExists(resourceName, &check), + testAccCheckRoute53HealthCheckDisappears(&check), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckRoute53HealthCheckDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).r53conn @@ -274,7 +333,7 @@ func testAccCheckRoute53HealthCheckDestroy(s *terraform.State) error { return nil } -func testAccCheckRoute53HealthCheckExists(n string) resource.TestCheckFunc { +func testAccCheckRoute53HealthCheckExists(n string, hCheck *route53.HealthCheck) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).r53conn @@ -298,6 +357,7 @@ func testAccCheckRoute53HealthCheckExists(n string) resource.TestCheckFunc { for _, check := range resp.HealthChecks { if *check.Id == rs.Primary.ID { + *hCheck = *check return nil } @@ -306,6 +366,19 @@ func testAccCheckRoute53HealthCheckExists(n string) resource.TestCheckFunc { } } +func testAccCheckRoute53HealthCheckDisappears(hCheck *route53.HealthCheck) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).r53conn + input := &route53.DeleteHealthCheckInput{ + HealthCheckId: hCheck.Id, + } + log.Printf("[DEBUG] Deleting Route53 Health Check: %#v", input) + _, err := conn.DeleteHealthCheck(input) + + return err + } +} + const testAccRoute53HealthCheckConfig = ` resource "aws_route53_health_check" "test" { fqdn = "dev.notexample.com" @@ -386,6 +459,36 @@ resource "aws_route53_health_check" "test" { } ` +const testAccRoute53HealthCheckIpv6Config = ` +resource "aws_route53_health_check" "test" { + ip_address = "1234:5678:9abc:6811::4" + port = 80 + type = "HTTP" + resource_path = "/" + failure_threshold = "2" + request_interval = "30" + + tags = { + Name = "tf-test-health-check" + } +} +` + +const testAccRoute53HealthCheckIpv6ExpandedConfig = ` +resource "aws_route53_health_check" "test" { + ip_address = "1234:5678:9abc:6811:0:0:0:4" + port = 80 + type = "HTTP" + resource_path = "/" + failure_threshold = "2" + request_interval = "30" + + tags = { + Name = "tf-test-health-check" + } +} +` + const testAccRoute53HealthCheckConfig_withChildHealthChecks = ` resource "aws_route53_health_check" "child1" { fqdn = "child1.notexample.com" diff --git a/aws/resource_aws_route53_query_log_test.go b/aws/resource_aws_route53_query_log_test.go index c241a2df125..8a236e055e5 100644 --- a/aws/resource_aws_route53_query_log_test.go +++ b/aws/resource_aws_route53_query_log_test.go @@ -2,18 +2,72 @@ package aws import ( "fmt" + "log" "os" "strings" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/route53" - + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_route53_query_log", &resource.Sweeper{ + Name: "aws_route53_query_log", + F: testSweepRoute53QueryLogs, + }) +} + +func testSweepRoute53QueryLogs(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).r53conn + var sweeperErrs *multierror.Error + + err = conn.ListQueryLoggingConfigsPages(&route53.ListQueryLoggingConfigsInput{}, func(page *route53.ListQueryLoggingConfigsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, queryLoggingConfig := range page.QueryLoggingConfigs { + id := aws.StringValue(queryLoggingConfig.Id) + + log.Printf("[INFO] Deleting Route53 query logging configuration: %s", id) + _, err := conn.DeleteQueryLoggingConfig(&route53.DeleteQueryLoggingConfigInput{ + Id: aws.String(id), + }) + if isAWSErr(err, route53.ErrCodeNoSuchQueryLoggingConfig, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting Route53 query logging configuration (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + // In unsupported AWS partitions, the API may return an error even the SDK cannot handle. + // Reference: https://github.com/aws/aws-sdk-go/issues/3313 + if testSweepSkipSweepError(err) || isAWSErr(err, "SerializationError", "failed to unmarshal error message") || isAWSErr(err, "AccessDeniedException", "Unable to determine service/operation name to be authorized") { + log.Printf("[WARN] Skipping Route53 query logging configurations sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Route53 query logging configurations: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSRoute53QueryLog_Basic(t *testing.T) { // The underlying resources are sensitive to where they are located // Use us-east-1 for testing diff --git a/aws/resource_aws_route53_record_test.go b/aws/resource_aws_route53_record_test.go index 6c0f9e8b054..9bdbac17294 100644 --- a/aws/resource_aws_route53_record_test.go +++ b/aws/resource_aws_route53_record_test.go @@ -276,10 +276,11 @@ func TestAccAWSRoute53Record_spfSupport(t *testing.T) { resourceName := "aws_route53_record.default" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckRoute53RecordDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53RecordDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccRoute53RecordConfigSPF, @@ -304,10 +305,11 @@ func TestAccAWSRoute53Record_caaSupport(t *testing.T) { resourceName := "aws_route53_record.default" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckRoute53RecordDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53RecordDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccRoute53RecordConfigCAA, diff --git a/aws/resource_aws_route53_resolver_endpoint.go b/aws/resource_aws_route53_resolver_endpoint.go index 964debf93b4..95d6a86e5a8 100644 --- a/aws/resource_aws_route53_resolver_endpoint.go +++ b/aws/resource_aws_route53_resolver_endpoint.go @@ -139,6 +139,7 @@ func resourceAwsRoute53ResolverEndpointCreate(d *schema.ResourceData, meta inter func resourceAwsRoute53ResolverEndpointRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).route53resolverconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig epRaw, state, err := route53ResolverEndpointRefresh(conn, d.Id())() if err != nil { @@ -186,7 +187,7 @@ func resourceAwsRoute53ResolverEndpointRead(d *schema.ResourceData, meta interfa return fmt.Errorf("error listing tags for Route53 Resolver endpoint (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -196,7 +197,6 @@ func resourceAwsRoute53ResolverEndpointRead(d *schema.ResourceData, meta interfa func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).route53resolverconn - d.Partial(true) if d.HasChange("name") { req := &route53resolver.UpdateResolverEndpointInput{ ResolverEndpointId: aws.String(d.Id()), @@ -215,8 +215,6 @@ func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta inter if err != nil { return err } - - d.SetPartial("name") } if d.HasChange("ip_address") { @@ -260,8 +258,6 @@ func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta inter return err } } - - d.SetPartial("ip_address") } if d.HasChange("tags") { @@ -269,10 +265,8 @@ func resourceAwsRoute53ResolverEndpointUpdate(d *schema.ResourceData, meta inter if err := keyvaluetags.Route53resolverUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Route53 Resolver endpoint (%s) tags: %s", d.Get("arn").(string), err) } - d.SetPartial("tags") } - d.Partial(false) return resourceAwsRoute53ResolverEndpointRead(d, meta) } diff --git a/aws/resource_aws_route53_resolver_endpoint_test.go b/aws/resource_aws_route53_resolver_endpoint_test.go index 865c6161f9c..71506f58a92 100644 --- a/aws/resource_aws_route53_resolver_endpoint_test.go +++ b/aws/resource_aws_route53_resolver_endpoint_test.go @@ -221,7 +221,14 @@ resource "aws_vpc" "foo" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "sn1" { vpc_id = "${aws_vpc.foo.id}" diff --git a/aws/resource_aws_route53_resolver_rule.go b/aws/resource_aws_route53_resolver_rule.go index ca185e04851..0627220c3de 100644 --- a/aws/resource_aws_route53_resolver_rule.go +++ b/aws/resource_aws_route53_resolver_rule.go @@ -149,6 +149,7 @@ func resourceAwsRoute53ResolverRuleCreate(d *schema.ResourceData, meta interface func resourceAwsRoute53ResolverRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).route53resolverconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig ruleRaw, state, err := route53ResolverRuleRefresh(conn, d.Id())() if err != nil { @@ -178,7 +179,7 @@ func resourceAwsRoute53ResolverRuleRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("error listing tags for Route53 Resolver rule (%s): %s", d.Get("arn").(string), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -188,7 +189,6 @@ func resourceAwsRoute53ResolverRuleRead(d *schema.ResourceData, meta interface{} func resourceAwsRoute53ResolverRuleUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).route53resolverconn - d.Partial(true) if d.HasChange("name") || d.HasChange("resolver_endpoint_id") || d.HasChange("target_ip") { req := &route53resolver.UpdateResolverRuleInput{ ResolverRuleId: aws.String(d.Id()), @@ -216,10 +216,6 @@ func resourceAwsRoute53ResolverRuleUpdate(d *schema.ResourceData, meta interface if err != nil { return err } - - d.SetPartial("name") - d.SetPartial("resolver_endpoint_id") - d.SetPartial("target_ip") } if d.HasChange("tags") { @@ -227,10 +223,8 @@ func resourceAwsRoute53ResolverRuleUpdate(d *schema.ResourceData, meta interface if err := keyvaluetags.Route53resolverUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { return fmt.Errorf("error updating Route53 Resolver rule (%s) tags: %s", d.Get("arn").(string), err) } - d.SetPartial("tags") } - d.Partial(false) return resourceAwsRoute53ResolverRuleRead(d, meta) } diff --git a/aws/resource_aws_route53_resolver_rule_test.go b/aws/resource_aws_route53_resolver_rule_test.go index c1e37b17501..684c24645d8 100644 --- a/aws/resource_aws_route53_resolver_rule_test.go +++ b/aws/resource_aws_route53_resolver_rule_test.go @@ -207,9 +207,10 @@ func TestAccAwsRoute53ResolverRule_forward(t *testing.T) { name := fmt.Sprintf("terraform-testacc-r53-resolver-%d", acctest.RandInt()) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSRoute53Resolver(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckRoute53ResolverRuleDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSRoute53Resolver(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53ResolverRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccRoute53ResolverRuleConfig_forward(name), @@ -272,9 +273,10 @@ func TestAccAwsRoute53ResolverRule_forwardEndpointRecreate(t *testing.T) { name := fmt.Sprintf("terraform-testacc-r53-resolver-%d", acctest.RandInt()) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSRoute53Resolver(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckRoute53ResolverRuleDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSRoute53Resolver(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRoute53ResolverRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccRoute53ResolverRuleConfig_forward(name), @@ -507,7 +509,14 @@ resource "aws_vpc" "foo" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "sn1" { vpc_id = "${aws_vpc.foo.id}" diff --git a/aws/resource_aws_route53_zone.go b/aws/resource_aws_route53_zone.go index 83ab57f67eb..e12c609f489 100644 --- a/aws/resource_aws_route53_zone.go +++ b/aws/resource_aws_route53_zone.go @@ -142,8 +142,10 @@ func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) erro d.SetId(cleanZoneID(aws.StringValue(output.HostedZone.Id))) - if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { - return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) creation: %s", d.Id(), err) + if output.ChangeInfo != nil { + if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { + return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) creation: %s", d.Id(), err) + } } if err := keyvaluetags.Route53UpdateTags(conn, d.Id(), route53.TagResourceTypeHostedzone, map[string]interface{}{}, d.Get("tags").(map[string]interface{})); err != nil { @@ -166,6 +168,7 @@ func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) erro func resourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).r53conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &route53.GetHostedZoneInput{ Id: aws.String(d.Id()), @@ -231,7 +234,7 @@ func resourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("error listing tags for Route53 Hosted Zone (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -242,8 +245,6 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).r53conn region := meta.(*AWSClient).region - d.Partial(true) - if d.HasChange("comment") { input := route53.UpdateHostedZoneCommentInput{ Id: aws.String(d.Id()), @@ -255,8 +256,6 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro if err != nil { return fmt.Errorf("error updating Route53 Hosted Zone (%s) comment: %s", d.Id(), err) } - - d.SetPartial("comment") } if d.HasChange("tags") { @@ -298,12 +297,8 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro return err } } - - d.SetPartial("vpc") } - d.Partial(false) - return resourceAwsRoute53ZoneRead(d, meta) } diff --git a/aws/resource_aws_route_table.go b/aws/resource_aws_route_table.go index ecbf03b29ce..9ec855178cc 100644 --- a/aws/resource_aws_route_table.go +++ b/aws/resource_aws_route_table.go @@ -7,11 +7,11 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -50,13 +50,15 @@ func resourceAwsRouteTable() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cidr_block": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.IsCIDR, }, "ipv6_cidr_block": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.IsCIDR, }, "egress_only_gateway_id": { @@ -142,11 +144,18 @@ func resourceAwsRouteTableCreate(d *schema.ResourceData, meta interface{}) error d.Id(), err) } + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding tags: %s", err) + } + } + return resourceAwsRouteTableUpdate(d, meta) } func resourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig rtRaw, _, err := resourceAwsRouteTableStateRefreshFunc(conn, d.Id())() if err != nil { @@ -175,7 +184,7 @@ func resourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { continue } - if r.Origin != nil && *r.Origin == "EnableVgwRoutePropagation" { + if r.Origin != nil && *r.Origin == ec2.RouteOriginEnableVgwRoutePropagation { continue } @@ -219,7 +228,7 @@ func resourceAwsRouteTableRead(d *schema.ResourceData, meta interface{}) error { } d.Set("route", route) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(rt.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(rt.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -277,8 +286,7 @@ func resourceAwsRouteTableUpdate(d *schema.ResourceData, meta interface{}) error // If we get a Gateway.NotAttached, it is usually some // eventually consistency stuff. So we have to just wait a // bit... - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "Gateway.NotAttached" { + if isAWSErr(err, "Gateway.NotAttached", "") { time.Sleep(20 * time.Second) continue } @@ -405,7 +413,7 @@ func resourceAwsRouteTableUpdate(d *schema.ResourceData, meta interface{}) error } } - if d.HasChange("tags") { + if d.HasChange("tags") && !d.IsNewResource() { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { @@ -440,7 +448,7 @@ func resourceAwsRouteTableDelete(d *schema.ResourceData, meta interface{}) error // First check if the association ID is not found. If this // is the case, then it was already disassociated somehow, // and that is okay. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidAssociationID.NotFound" { + if isAWSErr(err, "InvalidAssociationID.NotFound", "") { err = nil } } @@ -455,8 +463,7 @@ func resourceAwsRouteTableDelete(d *schema.ResourceData, meta interface{}) error RouteTableId: aws.String(d.Id()), }) if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { return nil } @@ -541,7 +548,7 @@ func resourceAwsRouteTableStateRefreshFunc(conn *ec2.EC2, id string) resource.St RouteTableIds: []*string{aws.String(id)}, }) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidRouteTableID.NotFound" { + if isAWSErr(err, "InvalidRouteTableID.NotFound", "") { resp = nil } else { log.Printf("Error on RouteTableStateRefresh: %s", err) diff --git a/aws/resource_aws_route_table_test.go b/aws/resource_aws_route_table_test.go index 327774f58bc..40914d93893 100644 --- a/aws/resource_aws_route_table_test.go +++ b/aws/resource_aws_route_table_test.go @@ -7,7 +7,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-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" @@ -82,6 +81,7 @@ func testSweepRouteTables(region string) error { func TestAccAWSRouteTable_basic(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_route_table.test" testCheck := func(*terraform.State) error { if len(v.Routes) != 2 { @@ -128,31 +128,29 @@ func TestAccAWSRouteTable_basic(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, Steps: []resource.TestStep{ { Config: testAccRouteTableConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists( - "aws_route_table.foo", &v), + testAccCheckRouteTableExists(resourceName, &v), testCheck, - testAccCheckResourceAttrAccountID("aws_route_table.foo", "owner_id"), + testAccCheckResourceAttrAccountID(resourceName, "owner_id"), ), }, { - ResourceName: "aws_route_table.foo", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, { Config: testAccRouteTableConfigChange, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists( - "aws_route_table.foo", &v), + testAccCheckRouteTableExists(resourceName, &v), testCheckChange, - testAccCheckResourceAttrAccountID("aws_route_table.foo", "owner_id"), + testAccCheckResourceAttrAccountID(resourceName, "owner_id"), ), }, }, @@ -161,6 +159,7 @@ func TestAccAWSRouteTable_basic(t *testing.T) { func TestAccAWSRouteTable_instance(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_route_table.test" testCheck := func(*terraform.State) error { if len(v.Routes) != 2 { @@ -184,20 +183,19 @@ func TestAccAWSRouteTable_instance(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, Steps: []resource.TestStep{ { Config: testAccRouteTableConfigInstance, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists( - "aws_route_table.foo", &v), + testAccCheckRouteTableExists(resourceName, &v), testCheck, ), }, { - ResourceName: "aws_route_table.foo", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -207,6 +205,7 @@ func TestAccAWSRouteTable_instance(t *testing.T) { func TestAccAWSRouteTable_ipv6(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_route_table.test" testCheck := func(*terraform.State) error { // Expect 3: 2 IPv6 (local + all outbound) + 1 IPv4 @@ -219,19 +218,19 @@ func TestAccAWSRouteTable_ipv6(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, Steps: []resource.TestStep{ { Config: testAccRouteTableConfigIpv6, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists("aws_route_table.foo", &v), + testAccCheckRouteTableExists(resourceName, &v), testCheck, ), }, { - ResourceName: "aws_route_table.foo", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -240,8 +239,8 @@ func TestAccAWSRouteTable_ipv6(t *testing.T) { } func TestAccAWSRouteTable_tags(t *testing.T) { - var route_table ec2.RouteTable - resourceName := "aws_route_table.foo" + var routeTable ec2.RouteTable + resourceName := "aws_route_table.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -252,7 +251,7 @@ func TestAccAWSRouteTable_tags(t *testing.T) { { Config: testAccRouteTableConfigTags, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists(resourceName, &route_table), + testAccCheckRouteTableExists(resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.foo", "bar"), ), @@ -265,7 +264,7 @@ func TestAccAWSRouteTable_tags(t *testing.T) { { Config: testAccRouteTableConfigTagsUpdate, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists(resourceName, &route_table), + testAccCheckRouteTableExists(resourceName, &routeTable), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.bar", "baz"), ), @@ -276,9 +275,11 @@ func TestAccAWSRouteTable_tags(t *testing.T) { // For GH-13545, Fixes panic on an empty route config block func TestAccAWSRouteTable_panicEmptyRoute(t *testing.T) { + resourceName := "aws_route_table.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_route_table.foo", + IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, Steps: []resource.TestStep{ @@ -384,11 +385,7 @@ func testAccCheckRouteTableDestroy(s *terraform.State) error { } // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidRouteTableID.NotFound" { + if !isAWSErr(err, "InvalidRouteTableID.NotFound", "") { return err } } @@ -428,6 +425,7 @@ func testAccCheckRouteTableExists(n string, v *ec2.RouteTable) resource.TestChec // Right now there is no VPC Peering resource func TestAccAWSRouteTable_vpcPeering(t *testing.T) { var v ec2.RouteTable + resourceName := "aws_route_table.test" testCheck := func(*terraform.State) error { if len(v.Routes) != 2 { @@ -456,13 +454,12 @@ func TestAccAWSRouteTable_vpcPeering(t *testing.T) { { Config: testAccRouteTableVpcPeeringConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists( - "aws_route_table.foo", &v), + testAccCheckRouteTableExists(resourceName, &v), testCheck, ), }, { - ResourceName: "aws_route_table.foo", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -473,6 +470,7 @@ func TestAccAWSRouteTable_vpcPeering(t *testing.T) { func TestAccAWSRouteTable_vgwRoutePropagation(t *testing.T) { var v ec2.RouteTable var vgw ec2.VpnGateway + resourceName := "aws_route_table.test" testCheck := func(*terraform.State) error { if len(v.PropagatingVgws) != 1 { @@ -502,15 +500,13 @@ func TestAccAWSRouteTable_vgwRoutePropagation(t *testing.T) { { Config: testAccRouteTableVgwRoutePropagationConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckRouteTableExists( - "aws_route_table.foo", &v), - testAccCheckVpnGatewayExists( - "aws_vpn_gateway.foo", &vgw), + testAccCheckRouteTableExists(resourceName, &v), + testAccCheckVpnGatewayExists("aws_vpn_gateway.test", &vgw), testCheck, ), }, { - ResourceName: "aws_route_table.foo", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -519,82 +515,85 @@ func TestAccAWSRouteTable_vgwRoutePropagation(t *testing.T) { } const testAccRouteTableConfig = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table" - } +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-route-table" + } } -resource "aws_internet_gateway" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" - tags = { - Name = "terraform-testacc-route-table" - } + tags = { + Name = "terraform-testacc-route-table" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - route { - cidr_block = "10.2.0.0/16" - gateway_id = "${aws_internet_gateway.foo.id}" - } + route { + cidr_block = "10.2.0.0/16" + gateway_id = "${aws_internet_gateway.test.id}" + } } ` const testAccRouteTableConfigChange = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table" - } +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-route-table" + } } -resource "aws_internet_gateway" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" - tags = { - Name = "terraform-testacc-route-table" - } + tags = { + Name = "terraform-testacc-route-table" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - route { - cidr_block = "10.3.0.0/16" - gateway_id = "${aws_internet_gateway.foo.id}" - } + route { + cidr_block = "10.3.0.0/16" + gateway_id = "${aws_internet_gateway.test.id}" + } - route { - cidr_block = "10.4.0.0/16" - gateway_id = "${aws_internet_gateway.foo.id}" - } + route { + cidr_block = "10.4.0.0/16" + gateway_id = "${aws_internet_gateway.test.id}" + } } ` const testAccRouteTableConfigIpv6 = ` -resource "aws_vpc" "foo" { +resource "aws_vpc" "test" { cidr_block = "10.1.0.0/16" assign_generated_ipv6_cidr_block = true + tags = { Name = "terraform-testacc-route-table-ipv6" } } -resource "aws_egress_only_internet_gateway" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_egress_only_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - route { - ipv6_cidr_block = "::/0" - egress_only_gateway_id = "${aws_egress_only_internet_gateway.foo.id}" - } + route { + ipv6_cidr_block = "::/0" + egress_only_gateway_id = "${aws_egress_only_internet_gateway.test.id}" + } } ` @@ -614,154 +613,160 @@ data "aws_ami" "amzn-ami-minimal-hvm" { } } -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table-instance" - } +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-route-table-instance" + } } -resource "aws_subnet" "foo" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags = { - Name = "tf-acc-route-table-instance" - } +resource "aws_subnet" "test" { + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.test.id}" + + tags = { + Name = "tf-acc-route-table-instance" + } } -resource "aws_instance" "foo" { +resource "aws_instance" "test" { ami = "${data.aws_ami.amzn-ami-minimal-hvm.id}" instance_type = "t2.micro" - subnet_id = "${aws_subnet.foo.id}" + subnet_id = "${aws_subnet.test.id}" } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - route { - cidr_block = "10.2.0.0/16" - instance_id = "${aws_instance.foo.id}" - } + route { + cidr_block = "10.2.0.0/16" + instance_id = "${aws_instance.test.id}" + } } ` const testAccRouteTableConfigTags = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table-tags" - } +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-route-table-tags" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - tags = { - foo = "bar" - } + tags = { + foo = "bar" + } } ` const testAccRouteTableConfigTagsUpdate = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table-tags" - } +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-route-table-tags" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - tags = { - bar = "baz" - } + tags = { + bar = "baz" + } } ` // VPC Peering connections are prefixed with pcx const testAccRouteTableVpcPeeringConfig = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table-vpc-peering-foo" - } +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + tags = { + Name = "terraform-testacc-route-table-vpc-peering-foo" + } } -resource "aws_internet_gateway" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" - tags = { - Name = "terraform-testacc-route-table-vpc-peering-foo" - } + tags = { + Name = "terraform-testacc-route-table-vpc-peering-foo" + } } resource "aws_vpc" "bar" { - cidr_block = "10.3.0.0/16" - tags = { - Name = "terraform-testacc-route-table-vpc-peering-bar" - } + cidr_block = "10.3.0.0/16" + + tags = { + Name = "terraform-testacc-route-table-vpc-peering-bar" + } } resource "aws_internet_gateway" "bar" { - vpc_id = "${aws_vpc.bar.id}" + vpc_id = "${aws_vpc.bar.id}" - tags = { - Name = "terraform-testacc-route-table-vpc-peering-bar" - } + tags = { + Name = "terraform-testacc-route-table-vpc-peering-bar" + } } -resource "aws_vpc_peering_connection" "foo" { - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - tags = { - foo = "bar" - } +resource "aws_vpc_peering_connection" "test" { + vpc_id = "${aws_vpc.test.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + + tags = { + foo = "bar" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - route { - cidr_block = "10.2.0.0/16" - vpc_peering_connection_id = "${aws_vpc_peering_connection.foo.id}" - } + route { + cidr_block = "10.2.0.0/16" + vpc_peering_connection_id = "${aws_vpc_peering_connection.test.id}" + } } ` const testAccRouteTableVgwRoutePropagationConfig = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags = { - Name = "terraform-testacc-route-table-vgw-route-propagation" - } -} +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" -resource "aws_vpn_gateway" "foo" { - vpc_id = "${aws_vpc.foo.id}" + tags = { + Name = "terraform-testacc-route-table-vgw-route-propagation" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_vpn_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" +} - propagating_vgws = ["${aws_vpn_gateway.foo.id}"] +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" + propagating_vgws = ["${aws_vpn_gateway.test.id}"] } ` // For GH-13545 const testAccRouteTableConfigPanicEmptyRoute = ` -resource "aws_vpc" "foo" { - cidr_block = "10.2.0.0/16" - tags = { - Name = "terraform-testacc-route-table-panic-empty-route" - } +resource "aws_vpc" "test" { + cidr_block = "10.2.0.0/16" + + tags = { + Name = "terraform-testacc-route-table-panic-empty-route" + } } -resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" +resource "aws_route_table" "test" { + vpc_id = "${aws_vpc.test.id}" - route { - } + route {} } ` @@ -854,6 +859,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/resource_aws_route_test.go b/aws/resource_aws_route_test.go index 294fc4a72c5..0a9abb77b36 100644 --- a/aws/resource_aws_route_test.go +++ b/aws/resource_aws_route_test.go @@ -55,6 +55,28 @@ func TestAccAWSRoute_basic(t *testing.T) { }) } +func TestAccAWSRoute_disappears(t *testing.T) { + var route ec2.Route + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRouteDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRouteBasicConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRouteExists("aws_route.bar", &route), + testAccCheckResourceDisappears(testAccProvider, resourceAwsRoute(), "aws_route.bar"), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func TestAccAWSRoute_ipv6Support(t *testing.T) { var route ec2.Route @@ -86,6 +108,7 @@ func TestAccAWSRoute_ipv6Support(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRouteExists("aws_route.bar", &route), testCheck, + resource.TestCheckResourceAttr("aws_route.bar", "destination_ipv6_cidr_block", "::/0"), ), }, { @@ -94,6 +117,10 @@ func TestAccAWSRoute_ipv6Support(t *testing.T) { ImportStateIdFunc: testAccAWSRouteImportStateIdFunc("aws_route.bar"), ImportStateVerify: true, }, + { + Config: testAccAWSRouteConfigIpv6Expanded, + PlanOnly: true, + }, }, }) } @@ -146,6 +173,10 @@ func TestAccAWSRoute_ipv6ToInstance(t *testing.T) { ImportStateIdFunc: testAccAWSRouteImportStateIdFunc("aws_route.internal-default-route-ipv6"), ImportStateVerify: true, }, + { + Config: testAccAWSRouteConfigIpv6InstanceExpanded, + PlanOnly: true, + }, }, }) } @@ -548,7 +579,14 @@ resource "aws_vpc" "examplevpc" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_internet_gateway" "internet" { vpc_id = "${aws_vpc.examplevpc.id}" @@ -657,7 +695,14 @@ resource "aws_vpc" "examplevpc" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_internet_gateway" "internet" { vpc_id = "${aws_vpc.examplevpc.id}" @@ -742,7 +787,110 @@ resource "aws_route" "internal-default-route-ipv6" { destination_ipv6_cidr_block = "::/0" instance_id = "${aws_instance.test-router.id}" } +`) + +var testAccAWSRouteConfigIpv6InstanceExpanded = fmt.Sprintf(` +resource "aws_vpc" "examplevpc" { + cidr_block = "10.100.0.0/16" + enable_dns_hostnames = true + assign_generated_ipv6_cidr_block = true + tags = { + Name = "terraform-testacc-route-ipv6-instance" + } +} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +resource "aws_internet_gateway" "internet" { + vpc_id = "${aws_vpc.examplevpc.id}" + + tags = { + Name = "terraform-testacc-route-ipv6-instance" + } +} + +resource "aws_route" "igw" { + route_table_id = "${aws_vpc.examplevpc.main_route_table_id}" + destination_cidr_block = "0.0.0.0/0" + gateway_id = "${aws_internet_gateway.internet.id}" +} + +resource "aws_route" "igw-ipv6" { + route_table_id = "${aws_vpc.examplevpc.main_route_table_id}" + destination_ipv6_cidr_block = "::0/0" + gateway_id = "${aws_internet_gateway.internet.id}" +} + +resource "aws_subnet" "router-network" { + cidr_block = "10.100.1.0/24" + vpc_id = "${aws_vpc.examplevpc.id}" + ipv6_cidr_block = "${cidrsubnet(aws_vpc.examplevpc.ipv6_cidr_block, 8, 1)}" + assign_ipv6_address_on_creation = true + map_public_ip_on_launch = true + availability_zone = "${data.aws_availability_zones.available.names[0]}" + tags = { + Name = "tf-acc-route-ipv6-instance-router" + } +} + +resource "aws_subnet" "client-network" { + cidr_block = "10.100.10.0/24" + vpc_id = "${aws_vpc.examplevpc.id}" + ipv6_cidr_block = "${cidrsubnet(aws_vpc.examplevpc.ipv6_cidr_block, 8, 2)}" + assign_ipv6_address_on_creation = true + map_public_ip_on_launch = false + availability_zone = "${data.aws_availability_zones.available.names[0]}" + tags = { + Name = "tf-acc-route-ipv6-instance-client" + } +} + +resource "aws_route_table" "client-routes" { + vpc_id = "${aws_vpc.examplevpc.id}" +} + +resource "aws_route_table_association" "client-routes" { + route_table_id = "${aws_route_table.client-routes.id}" + subnet_id = "${aws_subnet.client-network.id}" +} + +data "aws_ami" "ubuntu" { + most_recent = true + filter { + name = "name" + values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"] + } + filter { + name = "virtualization-type" + values = ["hvm"] + } + owners = ["099720109477"] +} + +resource "aws_instance" "test-router" { + ami = "${data.aws_ami.ubuntu.image_id}" + instance_type = "t2.small" + subnet_id = "${aws_subnet.router-network.id}" +} + +resource "aws_route" "internal-default-route" { + route_table_id = "${aws_route_table.client-routes.id}" + destination_cidr_block = "0.0.0.0/0" + instance_id = "${aws_instance.test-router.id}" +} + +resource "aws_route" "internal-default-route-ipv6" { + route_table_id = "${aws_route_table.client-routes.id}" + destination_ipv6_cidr_block = "::0/0" + instance_id = "${aws_instance.test-router.id}" +} `) var testAccAWSRouteConfigIpv6PeeringConnection = fmt.Sprintf(` @@ -779,28 +927,52 @@ resource "aws_route" "pc" { var testAccAWSRouteConfigIpv6 = fmt.Sprintf(` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" + cidr_block = "10.1.0.0/16" assign_generated_ipv6_cidr_block = true + tags = { Name = "terraform-testacc-route-ipv6" } } resource "aws_egress_only_internet_gateway" "foo" { - vpc_id = "${aws_vpc.foo.id}" + vpc_id = "${aws_vpc.foo.id}" } resource "aws_route_table" "foo" { - vpc_id = "${aws_vpc.foo.id}" + vpc_id = "${aws_vpc.foo.id}" } resource "aws_route" "bar" { - route_table_id = "${aws_route_table.foo.id}" - destination_ipv6_cidr_block = "::/0" - egress_only_gateway_id = "${aws_egress_only_internet_gateway.foo.id}" + route_table_id = "${aws_route_table.foo.id}" + destination_ipv6_cidr_block = "::/0" + egress_only_gateway_id = "${aws_egress_only_internet_gateway.foo.id}" +} +`) + +var testAccAWSRouteConfigIpv6Expanded = fmt.Sprintf(` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + assign_generated_ipv6_cidr_block = true + + tags = { + Name = "terraform-testacc-route-ipv6" + } +} + +resource "aws_egress_only_internet_gateway" "foo" { + vpc_id = "${aws_vpc.foo.id}" } +resource "aws_route_table" "foo" { + vpc_id = "${aws_vpc.foo.id}" +} +resource "aws_route" "bar" { + route_table_id = "${aws_route_table.foo.id}" + destination_ipv6_cidr_block = "::0/0" + egress_only_gateway_id = "${aws_egress_only_internet_gateway.foo.id}" +} `) var testAccAWSRouteBasicConfigChangeCidr = fmt.Sprint(` @@ -831,6 +1003,17 @@ resource "aws_route" "bar" { `) var testAccAWSRouteNoopChange = fmt.Sprint(` +data "aws_availability_zones" "available" { + # IncorrectState: Transit Gateway is not available in availability zone us-west-2d + blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + resource "aws_vpc" "test" { cidr_block = "10.10.0.0/16" tags = { @@ -843,6 +1026,7 @@ resource "aws_route_table" "test" { } resource "aws_subnet" "test" { + availability_zone = "${data.aws_availability_zones.available.names[0]}" vpc_id = "${aws_vpc.test.id}" cidr_block = "10.10.10.0/24" tags = { @@ -959,6 +1143,11 @@ data "aws_availability_zones" "available" { # IncorrectState: Transit Gateway is not available in availability zone us-west-2d blacklisted_zone_ids = ["usw2-az4"] state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 40f1ed8254d..4ffe11aa591 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -121,7 +121,7 @@ func resourceAwsS3Bucket() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, @@ -187,7 +187,7 @@ func resourceAwsS3Bucket() *schema.Resource { "routing_rules": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json @@ -289,9 +289,8 @@ func resourceAwsS3Bucket() *schema.Resource { Optional: true, }, "expiration": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, - Set: expirationHash, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -313,10 +312,9 @@ func resourceAwsS3Bucket() *schema.Resource { }, }, "noncurrent_version_expiration": { - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, Optional: true, - Set: expirationHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "days": { @@ -422,11 +420,10 @@ func resourceAwsS3Bucket() *schema.Resource { ValidateFunc: validation.StringLenBetween(0, 255), }, "destination": { - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, MinItems: 1, Required: true, - Set: destinationHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "account_id": { @@ -477,19 +474,17 @@ func resourceAwsS3Bucket() *schema.Resource { }, }, "source_selection_criteria": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MinItems: 1, MaxItems: 1, - Set: sourceSelectionCriteriaHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sse_kms_encrypted_objects": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MinItems: 1, MaxItems: 1, - Set: sourceSseKmsObjectsHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enabled": { @@ -731,7 +726,12 @@ func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { if d.HasChange("tags") { o, n := d.GetChange("tags") - if err := keyvaluetags.S3BucketUpdateTags(s3conn, d.Id(), o, n); err != nil { + // Retry due to S3 eventual consistency + _, err := retryOnAwsCode(s3.ErrCodeNoSuchBucket, func() (interface{}, error) { + terr := keyvaluetags.S3BucketUpdateTags(s3conn, d.Id(), o, n) + return nil, terr + }) + if err != nil { return fmt.Errorf("error updating S3 Bucket (%s) tags: %s", d.Id(), err) } } @@ -818,6 +818,7 @@ func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &s3.HeadBucketInput{ Bucket: aws.String(d.Id()), @@ -881,7 +882,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { return err } } else { - policy, err := structure.NormalizeJsonString(*v) + policy, err := structure.NormalizeJsonString(aws.StringValue(v)) if err != nil { return fmt.Errorf("policy contains an invalid JSON: %s", err) } @@ -934,7 +935,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { rule["expose_headers"] = flattenStringList(ruleObject.ExposeHeaders) } if ruleObject.MaxAgeSeconds != nil { - rule["max_age_seconds"] = int(*ruleObject.MaxAgeSeconds) + rule["max_age_seconds"] = int(aws.Int64Value(ruleObject.MaxAgeSeconds)) } corsRules = append(corsRules, rule) } @@ -958,34 +959,34 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { w := make(map[string]interface{}) if v := ws.IndexDocument; v != nil { - w["index_document"] = *v.Suffix + w["index_document"] = aws.StringValue(v.Suffix) } if v := ws.ErrorDocument; v != nil { - w["error_document"] = *v.Key + w["error_document"] = aws.StringValue(v.Key) } if v := ws.RedirectAllRequestsTo; v != nil { if v.Protocol == nil { - w["redirect_all_requests_to"] = *v.HostName + w["redirect_all_requests_to"] = aws.StringValue(v.HostName) } else { var host string var path string var query string - parsedHostName, err := url.Parse(*v.HostName) + parsedHostName, err := url.Parse(aws.StringValue(v.HostName)) if err == nil { host = parsedHostName.Host path = parsedHostName.Path query = parsedHostName.RawQuery } else { - host = *v.HostName + host = aws.StringValue(v.HostName) path = "" } w["redirect_all_requests_to"] = (&url.URL{ Host: host, Path: path, - Scheme: *v.Protocol, + Scheme: aws.StringValue(v.Protocol), RawQuery: query, }).String() } @@ -1023,13 +1024,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { vcl := make([]map[string]interface{}, 0, 1) if versioning, ok := versioningResponse.(*s3.GetBucketVersioningOutput); ok { vc := make(map[string]interface{}) - if versioning.Status != nil && *versioning.Status == s3.BucketVersioningStatusEnabled { + if versioning.Status != nil && aws.StringValue(versioning.Status) == s3.BucketVersioningStatusEnabled { vc["enabled"] = true } else { vc["enabled"] = false } - if versioning.MFADelete != nil && *versioning.MFADelete == s3.MFADeleteEnabled { + if versioning.MFADelete != nil && aws.StringValue(versioning.MFADelete) == s3.MFADeleteEnabled { vc["mfa_delete"] = true } else { vc["mfa_delete"] = false @@ -1087,11 +1088,11 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { if logging, ok := loggingResponse.(*s3.GetBucketLoggingOutput); ok && logging.LoggingEnabled != nil { v := logging.LoggingEnabled lc := make(map[string]interface{}) - if *v.TargetBucket != "" { - lc["target_bucket"] = *v.TargetBucket + if aws.StringValue(v.TargetBucket) != "" { + lc["target_bucket"] = aws.StringValue(v.TargetBucket) } - if *v.TargetPrefix != "" { - lc["target_prefix"] = *v.TargetPrefix + if aws.StringValue(v.TargetPrefix) != "" { + lc["target_prefix"] = aws.StringValue(v.TargetPrefix) } lcl = append(lcl, lc) } @@ -1119,15 +1120,15 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { rule := make(map[string]interface{}) // ID - if lifecycleRule.ID != nil && *lifecycleRule.ID != "" { - rule["id"] = *lifecycleRule.ID + if lifecycleRule.ID != nil && aws.StringValue(lifecycleRule.ID) != "" { + rule["id"] = aws.StringValue(lifecycleRule.ID) } filter := lifecycleRule.Filter if filter != nil { if filter.And != nil { // Prefix - if filter.And.Prefix != nil && *filter.And.Prefix != "" { - rule["prefix"] = *filter.And.Prefix + if filter.And.Prefix != nil && aws.StringValue(filter.And.Prefix) != "" { + rule["prefix"] = aws.StringValue(filter.And.Prefix) } // Tag if len(filter.And.Tags) > 0 { @@ -1135,8 +1136,8 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { } } else { // Prefix - if filter.Prefix != nil && *filter.Prefix != "" { - rule["prefix"] = *filter.Prefix + if filter.Prefix != nil && aws.StringValue(filter.Prefix) != "" { + rule["prefix"] = aws.StringValue(filter.Prefix) } // Tag if filter.Tag != nil { @@ -1145,13 +1146,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { } } else { if lifecycleRule.Prefix != nil { - rule["prefix"] = *lifecycleRule.Prefix + rule["prefix"] = aws.StringValue(lifecycleRule.Prefix) } } // Enabled if lifecycleRule.Status != nil { - if *lifecycleRule.Status == s3.ExpirationStatusEnabled { + if aws.StringValue(lifecycleRule.Status) == s3.ExpirationStatusEnabled { rule["enabled"] = true } else { rule["enabled"] = false @@ -1161,7 +1162,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { // AbortIncompleteMultipartUploadDays if lifecycleRule.AbortIncompleteMultipartUpload != nil { if lifecycleRule.AbortIncompleteMultipartUpload.DaysAfterInitiation != nil { - rule["abort_incomplete_multipart_upload_days"] = int(*lifecycleRule.AbortIncompleteMultipartUpload.DaysAfterInitiation) + rule["abort_incomplete_multipart_upload_days"] = int(aws.Int64Value(lifecycleRule.AbortIncompleteMultipartUpload.DaysAfterInitiation)) } } @@ -1169,23 +1170,23 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { if lifecycleRule.Expiration != nil { e := make(map[string]interface{}) if lifecycleRule.Expiration.Date != nil { - e["date"] = (*lifecycleRule.Expiration.Date).Format("2006-01-02") + e["date"] = (aws.TimeValue(lifecycleRule.Expiration.Date)).Format("2006-01-02") } if lifecycleRule.Expiration.Days != nil { - e["days"] = int(*lifecycleRule.Expiration.Days) + e["days"] = int(aws.Int64Value(lifecycleRule.Expiration.Days)) } if lifecycleRule.Expiration.ExpiredObjectDeleteMarker != nil { - e["expired_object_delete_marker"] = *lifecycleRule.Expiration.ExpiredObjectDeleteMarker + e["expired_object_delete_marker"] = aws.BoolValue(lifecycleRule.Expiration.ExpiredObjectDeleteMarker) } - rule["expiration"] = schema.NewSet(expirationHash, []interface{}{e}) + rule["expiration"] = []interface{}{e} } // noncurrent_version_expiration if lifecycleRule.NoncurrentVersionExpiration != nil { e := make(map[string]interface{}) if lifecycleRule.NoncurrentVersionExpiration.NoncurrentDays != nil { - e["days"] = int(*lifecycleRule.NoncurrentVersionExpiration.NoncurrentDays) + e["days"] = int(aws.Int64Value(lifecycleRule.NoncurrentVersionExpiration.NoncurrentDays)) } - rule["noncurrent_version_expiration"] = schema.NewSet(expirationHash, []interface{}{e}) + rule["noncurrent_version_expiration"] = []interface{}{e} } //// transition if len(lifecycleRule.Transitions) > 0 { @@ -1193,13 +1194,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { for _, v := range lifecycleRule.Transitions { t := make(map[string]interface{}) if v.Date != nil { - t["date"] = (*v.Date).Format("2006-01-02") + t["date"] = (aws.TimeValue(v.Date)).Format("2006-01-02") } if v.Days != nil { - t["days"] = int(*v.Days) + t["days"] = int(aws.Int64Value(v.Days)) } if v.StorageClass != nil { - t["storage_class"] = *v.StorageClass + t["storage_class"] = aws.StringValue(v.StorageClass) } transitions = append(transitions, t) } @@ -1211,10 +1212,10 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { for _, v := range lifecycleRule.NoncurrentVersionTransitions { t := make(map[string]interface{}) if v.NoncurrentDays != nil { - t["days"] = int(*v.NoncurrentDays) + t["days"] = int(aws.Int64Value(v.NoncurrentDays)) } if v.StorageClass != nil { - t["storage_class"] = *v.StorageClass + t["storage_class"] = aws.StringValue(v.StorageClass) } transitions = append(transitions, t) } @@ -1290,7 +1291,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { var region string if location, ok := locationResponse.(*s3.GetBucketLocationOutput); ok && location.LocationConstraint != nil { - region = *location.LocationConstraint + region = aws.StringValue(location.LocationConstraint) } region = normalizeRegion(region) if err := d.Set("region", region); err != nil { @@ -1335,7 +1336,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for S3 Bucket (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.(keyvaluetags.KeyValueTags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.(keyvaluetags.KeyValueTags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -1707,7 +1708,7 @@ func websiteEndpoint(client *AWSClient, d *schema.ResourceData) (*S3Website, err location := locationResponse.(*s3.GetBucketLocationOutput) var region string if location.LocationConstraint != nil { - region = *location.LocationConstraint + region = aws.StringValue(location.LocationConstraint) } return WebsiteEndpoint(client, bucket, region), nil @@ -2030,48 +2031,53 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } ruleDestination := &s3.Destination{} - if dest, ok := rr["destination"].(*schema.Set); ok && dest.Len() > 0 { - bd := dest.List()[0].(map[string]interface{}) - ruleDestination.Bucket = aws.String(bd["bucket"].(string)) + if dest, ok := rr["destination"].([]interface{}); ok && len(dest) > 0 { + if dest[0] != nil { + bd := dest[0].(map[string]interface{}) + ruleDestination.Bucket = aws.String(bd["bucket"].(string)) - if storageClass, ok := bd["storage_class"]; ok && storageClass != "" { - ruleDestination.StorageClass = aws.String(storageClass.(string)) - } + if storageClass, ok := bd["storage_class"]; ok && storageClass != "" { + ruleDestination.StorageClass = aws.String(storageClass.(string)) + } - if replicaKmsKeyId, ok := bd["replica_kms_key_id"]; ok && replicaKmsKeyId != "" { - ruleDestination.EncryptionConfiguration = &s3.EncryptionConfiguration{ - ReplicaKmsKeyID: aws.String(replicaKmsKeyId.(string)), + if replicaKmsKeyId, ok := bd["replica_kms_key_id"]; ok && replicaKmsKeyId != "" { + ruleDestination.EncryptionConfiguration = &s3.EncryptionConfiguration{ + ReplicaKmsKeyID: aws.String(replicaKmsKeyId.(string)), + } } - } - if account, ok := bd["account_id"]; ok && account != "" { - ruleDestination.Account = aws.String(account.(string)) - } + if account, ok := bd["account_id"]; ok && account != "" { + ruleDestination.Account = aws.String(account.(string)) + } - if aclTranslation, ok := bd["access_control_translation"].([]interface{}); ok && len(aclTranslation) > 0 { - aclTranslationValues := aclTranslation[0].(map[string]interface{}) - ruleAclTranslation := &s3.AccessControlTranslation{} - ruleAclTranslation.Owner = aws.String(aclTranslationValues["owner"].(string)) - ruleDestination.AccessControlTranslation = ruleAclTranslation + if aclTranslation, ok := bd["access_control_translation"].([]interface{}); ok && len(aclTranslation) > 0 { + aclTranslationValues := aclTranslation[0].(map[string]interface{}) + ruleAclTranslation := &s3.AccessControlTranslation{} + ruleAclTranslation.Owner = aws.String(aclTranslationValues["owner"].(string)) + ruleDestination.AccessControlTranslation = ruleAclTranslation + } } - } rcRule.Destination = ruleDestination - if ssc, ok := rr["source_selection_criteria"].(*schema.Set); ok && ssc.Len() > 0 { - sscValues := ssc.List()[0].(map[string]interface{}) - ruleSsc := &s3.SourceSelectionCriteria{} - if sseKms, ok := sscValues["sse_kms_encrypted_objects"].(*schema.Set); ok && sseKms.Len() > 0 { - sseKmsValues := sseKms.List()[0].(map[string]interface{}) - sseKmsEncryptedObjects := &s3.SseKmsEncryptedObjects{} - if sseKmsValues["enabled"].(bool) { - sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusEnabled) - } else { - sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusDisabled) + if ssc, ok := rr["source_selection_criteria"].([]interface{}); ok && len(ssc) > 0 { + if ssc[0] != nil { + sscValues := ssc[0].(map[string]interface{}) + ruleSsc := &s3.SourceSelectionCriteria{} + if sseKms, ok := sscValues["sse_kms_encrypted_objects"].([]interface{}); ok && len(sseKms) > 0 { + if sseKms[0] != nil { + sseKmsValues := sseKms[0].(map[string]interface{}) + sseKmsEncryptedObjects := &s3.SseKmsEncryptedObjects{} + if sseKmsValues["enabled"].(bool) { + sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusEnabled) + } else { + sseKmsEncryptedObjects.Status = aws.String(s3.SseKmsEncryptedObjectsStatusDisabled) + } + ruleSsc.SseKmsEncryptedObjects = sseKmsEncryptedObjects + } } - ruleSsc.SseKmsEncryptedObjects = sseKmsEncryptedObjects + rcRule.SourceSelectionCriteria = ruleSsc } - rcRule.SourceSelectionCriteria = ruleSsc } if f, ok := rr["filter"].([]interface{}); ok && len(f) > 0 && f[0] != nil { @@ -2131,7 +2137,7 @@ func resourceAwsS3BucketLifecycleUpdate(s3conn *s3.S3, d *schema.ResourceData) e lifecycleRules := d.Get("lifecycle_rule").([]interface{}) - if len(lifecycleRules) == 0 { + if len(lifecycleRules) == 0 || lifecycleRules[0] == nil { i := &s3.DeleteBucketLifecycleInput{ Bucket: aws.String(bucket), } @@ -2185,11 +2191,10 @@ func resourceAwsS3BucketLifecycleUpdate(s3conn *s3.S3, d *schema.ResourceData) e } // Expiration - expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.expiration", i)).(*schema.Set).List() - if len(expiration) > 0 { + expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.expiration", i)).([]interface{}) + if len(expiration) > 0 && expiration[0] != nil { e := expiration[0].(map[string]interface{}) i := &s3.LifecycleExpiration{} - if val, ok := e["date"].(string); ok && val != "" { t, err := time.Parse(time.RFC3339, fmt.Sprintf("%sT00:00:00Z", val)) if err != nil { @@ -2205,8 +2210,8 @@ func resourceAwsS3BucketLifecycleUpdate(s3conn *s3.S3, d *schema.ResourceData) e } // NoncurrentVersionExpiration - nc_expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.noncurrent_version_expiration", i)).(*schema.Set).List() - if len(nc_expiration) > 0 { + nc_expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.noncurrent_version_expiration", i)).([]interface{}) + if len(nc_expiration) > 0 && nc_expiration[0] != nil { e := nc_expiration[0].(map[string]interface{}) if val, ok := e["days"].(int); ok && val > 0 { @@ -2257,6 +2262,14 @@ func resourceAwsS3BucketLifecycleUpdate(s3conn *s3.S3, d *schema.ResourceData) e } } + // As a lifecycle rule requires 1 or more transition/expiration actions, + // we explicitly pass a default ExpiredObjectDeleteMarker value to be able to create + // the rule while keeping the policy unaffected if the conditions are not met. + if rule.Expiration == nil && rule.NoncurrentVersionExpiration == nil && + rule.Transitions == nil && rule.NoncurrentVersionTransitions == nil { + rule.Expiration = &s3.LifecycleExpiration{ExpiredObjectDeleteMarker: aws.Bool(false)} + } + rules = append(rules, rule) } @@ -2305,8 +2318,8 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) m := make(map[string]interface{}) - if r.Role != nil && *r.Role != "" { - m["role"] = *r.Role + if r.Role != nil && aws.StringValue(r.Role) != "" { + m["role"] = aws.StringValue(r.Role) } rules := make([]interface{}, 0, len(r.Rules)) @@ -2315,18 +2328,18 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) if v.Destination != nil { rd := make(map[string]interface{}) if v.Destination.Bucket != nil { - rd["bucket"] = *v.Destination.Bucket + rd["bucket"] = aws.StringValue(v.Destination.Bucket) } if v.Destination.StorageClass != nil { - rd["storage_class"] = *v.Destination.StorageClass + rd["storage_class"] = aws.StringValue(v.Destination.StorageClass) } if v.Destination.EncryptionConfiguration != nil { if v.Destination.EncryptionConfiguration.ReplicaKmsKeyID != nil { - rd["replica_kms_key_id"] = *v.Destination.EncryptionConfiguration.ReplicaKmsKeyID + rd["replica_kms_key_id"] = aws.StringValue(v.Destination.EncryptionConfiguration.ReplicaKmsKeyID) } } if v.Destination.Account != nil { - rd["account_id"] = *v.Destination.Account + rd["account_id"] = aws.StringValue(v.Destination.Account) } if v.Destination.AccessControlTranslation != nil { rdt := map[string]interface{}{ @@ -2334,30 +2347,30 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) } rd["access_control_translation"] = []interface{}{rdt} } - t["destination"] = schema.NewSet(destinationHash, []interface{}{rd}) + t["destination"] = []interface{}{rd} } if v.ID != nil { - t["id"] = *v.ID + t["id"] = aws.StringValue(v.ID) } if v.Prefix != nil { - t["prefix"] = *v.Prefix + t["prefix"] = aws.StringValue(v.Prefix) } if v.Status != nil { - t["status"] = *v.Status + t["status"] = aws.StringValue(v.Status) } if vssc := v.SourceSelectionCriteria; vssc != nil { tssc := make(map[string]interface{}) if vssc.SseKmsEncryptedObjects != nil { tSseKms := make(map[string]interface{}) - if *vssc.SseKmsEncryptedObjects.Status == s3.SseKmsEncryptedObjectsStatusEnabled { + if aws.StringValue(vssc.SseKmsEncryptedObjects.Status) == s3.SseKmsEncryptedObjectsStatusEnabled { tSseKms["enabled"] = true - } else if *vssc.SseKmsEncryptedObjects.Status == s3.SseKmsEncryptedObjectsStatusDisabled { + } else if aws.StringValue(vssc.SseKmsEncryptedObjects.Status) == s3.SseKmsEncryptedObjectsStatusDisabled { tSseKms["enabled"] = false } - tssc["sse_kms_encrypted_objects"] = schema.NewSet(sourceSseKmsObjectsHash, []interface{}{tSseKms}) + tssc["sse_kms_encrypted_objects"] = []interface{}{tSseKms} } - t["source_selection_criteria"] = schema.NewSet(sourceSelectionCriteriaHash, []interface{}{tssc}) + t["source_selection_criteria"] = []interface{}{tssc} } if v.Priority != nil { @@ -2477,7 +2490,12 @@ func validateS3BucketName(value string, region string) error { func grantHash(v interface{}) int { var buf bytes.Buffer - m := v.(map[string]interface{}) + m, ok := v.(map[string]interface{}) + + if !ok { + return 0 + } + if v, ok := m["id"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } @@ -2493,24 +2511,14 @@ func grantHash(v interface{}) int { return hashcode.String(buf.String()) } -func expirationHash(v interface{}) int { +func transitionHash(v interface{}) int { var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["date"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(string))) - } - if v, ok := m["days"]; ok { - buf.WriteString(fmt.Sprintf("%d-", v.(int))) - } - if v, ok := m["expired_object_delete_marker"]; ok { - buf.WriteString(fmt.Sprintf("%t-", v.(bool))) + m, ok := v.(map[string]interface{}) + + if !ok { + return 0 } - return hashcode.String(buf.String()) -} -func transitionHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) if v, ok := m["date"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } @@ -2525,7 +2533,11 @@ func transitionHash(v interface{}) int { func rulesHash(v interface{}) int { var buf bytes.Buffer - m := v.(map[string]interface{}) + m, ok := v.(map[string]interface{}) + + if !ok { + return 0 + } if v, ok := m["id"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) @@ -2536,11 +2548,11 @@ func rulesHash(v interface{}) int { if v, ok := m["status"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } - if v, ok := m["destination"].(*schema.Set); ok && v.Len() > 0 { - buf.WriteString(fmt.Sprintf("%d-", destinationHash(v.List()[0]))) + if v, ok := m["destination"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", destinationHash(v[0]))) } - if v, ok := m["source_selection_criteria"].(*schema.Set); ok && v.Len() > 0 && v.List()[0] != nil { - buf.WriteString(fmt.Sprintf("%d-", sourceSelectionCriteriaHash(v.List()[0]))) + if v, ok := m["source_selection_criteria"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", sourceSelectionCriteriaHash(v[0]))) } if v, ok := m["priority"]; ok { buf.WriteString(fmt.Sprintf("%d-", v.(int))) @@ -2553,7 +2565,12 @@ func rulesHash(v interface{}) int { func replicationRuleFilterHash(v interface{}) int { var buf bytes.Buffer - m := v.(map[string]interface{}) + m, ok := v.(map[string]interface{}) + + if !ok { + return 0 + } + if v, ok := m["prefix"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } @@ -2565,7 +2582,11 @@ func replicationRuleFilterHash(v interface{}) int { func destinationHash(v interface{}) int { var buf bytes.Buffer - m := v.(map[string]interface{}) + m, ok := v.(map[string]interface{}) + + if !ok { + return 0 + } if v, ok := m["bucket"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) @@ -2586,12 +2607,12 @@ func destinationHash(v interface{}) int { } func accessControlTranslationHash(v interface{}) int { - // v is nil if empty access_control_translation is given. - if v == nil { + var buf bytes.Buffer + m, ok := v.(map[string]interface{}) + + if !ok { return 0 } - var buf bytes.Buffer - m := v.(map[string]interface{}) if v, ok := m["owner"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) @@ -2600,22 +2621,26 @@ func accessControlTranslationHash(v interface{}) int { } func sourceSelectionCriteriaHash(v interface{}) int { - // v is nil if empty source_selection_criteria is given. - if v == nil { + var buf bytes.Buffer + m, ok := v.(map[string]interface{}) + + if !ok { return 0 } - var buf bytes.Buffer - m := v.(map[string]interface{}) - if v, ok := m["sse_kms_encrypted_objects"].(*schema.Set); ok && v.Len() > 0 { - buf.WriteString(fmt.Sprintf("%d-", sourceSseKmsObjectsHash(v.List()[0]))) + if v, ok := m["sse_kms_encrypted_objects"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", sourceSseKmsObjectsHash(v[0]))) } return hashcode.String(buf.String()) } func sourceSseKmsObjectsHash(v interface{}) int { var buf bytes.Buffer - m := v.(map[string]interface{}) + m, ok := v.(map[string]interface{}) + + if !ok { + return 0 + } if v, ok := m["enabled"]; ok { buf.WriteString(fmt.Sprintf("%t-", v.(bool))) diff --git a/aws/resource_aws_s3_bucket_analytics_configuration.go b/aws/resource_aws_s3_bucket_analytics_configuration.go index 0929e0a5fed..9b687af31ce 100644 --- a/aws/resource_aws_s3_bucket_analytics_configuration.go +++ b/aws/resource_aws_s3_bucket_analytics_configuration.go @@ -50,6 +50,7 @@ func resourceAwsS3BucketAnalyticsConfiguration() *schema.Resource { Type: schema.TypeMap, Optional: true, AtLeastOneOf: filterAtLeastOneOfKeys, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, diff --git a/aws/resource_aws_s3_bucket_object.go b/aws/resource_aws_s3_bucket_object.go index 9b8ba0e7dc7..fadd327d328 100644 --- a/aws/resource_aws_s3_bucket_object.go +++ b/aws/resource_aws_s3_bucket_object.go @@ -315,6 +315,7 @@ func resourceAwsS3BucketObjectCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig bucket := d.Get("bucket").(string) key := d.Get("key").(string) @@ -394,7 +395,7 @@ func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("error listing tags for S3 Bucket (%s) Object (%s): %s", bucket, key, err) } - if err := d.Set("tags", tags.(keyvaluetags.KeyValueTags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.(keyvaluetags.KeyValueTags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_s3_bucket_policy.go b/aws/resource_aws_s3_bucket_policy.go index bc651406f3d..89e7bd9dfe4 100644 --- a/aws/resource_aws_s3_bucket_policy.go +++ b/aws/resource_aws_s3_bucket_policy.go @@ -33,7 +33,7 @@ func resourceAwsS3BucketPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index e18f5ae5c18..c5970d778ab 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -161,47 +161,34 @@ func testS3BucketObjectLockEnabled(conn *s3.S3, bucket string) (bool, error) { } func TestAccAWSS3Bucket_basic(t *testing.T) { - rInt := acctest.RandInt() - arnRegexp := regexp.MustCompile(`^arn:aws[\w-]*:s3:::`) + bucketName := acctest.RandomWithPrefix("tf-test-bucket") region := testAccGetRegion() hostedZoneID, _ := HostedZoneIDForRegion(region) resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - /* - IDRefreshName: resourceName, - IDRefreshIgnore: []string{"force_destroy"}, - */ + PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "hosted_zone_id", hostedZoneID), - resource.TestCheckResourceAttr( - resourceName, "region", region), - resource.TestCheckNoResourceAttr( - resourceName, "website_endpoint"), - resource.TestMatchResourceAttr( - resourceName, "arn", arnRegexp), - resource.TestCheckResourceAttr( - resourceName, "bucket", testAccBucketName(rInt)), - testAccCheckS3BucketDomainName( - resourceName, "bucket_domain_name", testAccBucketName(rInt)), - resource.TestCheckResourceAttr( - resourceName, "bucket_regional_domain_name", testAccBucketRegionalDomainName(rInt, region)), + resource.TestCheckResourceAttr(resourceName, "hosted_zone_id", hostedZoneID), + resource.TestCheckResourceAttr(resourceName, "region", region), + resource.TestCheckNoResourceAttr(resourceName, "website_endpoint"), + testAccCheckResourceAttrGlobalARNNoAccount(resourceName, "arn", "s3", bucketName), + resource.TestCheckResourceAttr(resourceName, "bucket", bucketName), + testAccCheckS3BucketDomainName(resourceName, "bucket_domain_name", bucketName), + resource.TestCheckResourceAttr(resourceName, "bucket_regional_domain_name", testAccBucketRegionalDomainName(bucketName, region)), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) @@ -225,11 +212,10 @@ func TestAccAWSS3Bucket_Bucket_EmptyString(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) @@ -237,8 +223,7 @@ func TestAccAWSS3Bucket_Bucket_EmptyString(t *testing.T) { func TestAccAWSS3Bucket_tagsWithNoSystemTags(t *testing.T) { resourceName := "aws_s3_bucket.bucket" - rInt := acctest.RandInt() - bucketName := fmt.Sprintf("tf-test-bucket-%d", rInt) + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -256,11 +241,10 @@ func TestAccAWSS3Bucket_tagsWithNoSystemTags(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { Config: testAccAWSS3BucketConfig_withUpdatedTags(bucketName), @@ -298,8 +282,8 @@ func TestAccAWSS3Bucket_tagsWithNoSystemTags(t *testing.T) { func TestAccAWSS3Bucket_tagsWithSystemTags(t *testing.T) { resourceName := "aws_s3_bucket.bucket" - rInt := acctest.RandInt() - bucketName := fmt.Sprintf("tf-test-bucket-%d", rInt) + bucketName := acctest.RandomWithPrefix("tf-test-bucket") + var stackId string resource.ParallelTest(t, resource.TestCase{ @@ -338,11 +322,10 @@ func TestAccAWSS3Bucket_tagsWithSystemTags(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { Config: testAccAWSS3BucketConfig_withTags(bucketName), @@ -393,11 +376,10 @@ func TestAccAWSS3MultiBucket_withTags(t *testing.T) { Config: testAccAWSS3MultiBucketConfigWithTags(rInt), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) @@ -415,16 +397,14 @@ func TestAccAWSS3Bucket_namePrefix(t *testing.T) { Config: testAccAWSS3BucketConfig_namePrefix, Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestMatchResourceAttr( - resourceName, "bucket", regexp.MustCompile("^tf-test-")), + resource.TestMatchResourceAttr(resourceName, "bucket", regexp.MustCompile("^tf-test-")), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "bucket_prefix"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "bucket_prefix"}, }, }, }) @@ -445,11 +425,10 @@ func TestAccAWSS3Bucket_generatedName(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "bucket_prefix"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "bucket_prefix"}, }, }, }) @@ -476,7 +455,7 @@ func TestAccAWSS3Bucket_region(t *testing.T) { } func TestAccAWSS3Bucket_acceleration(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -488,26 +467,23 @@ func TestAccAWSS3Bucket_acceleration(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithAcceleration(rInt), + Config: testAccAWSS3BucketConfigWithAcceleration(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "acceleration_status", "Enabled"), + resource.TestCheckResourceAttr(resourceName, "acceleration_status", "Enabled"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfigWithoutAcceleration(rInt), + Config: testAccAWSS3BucketConfigWithoutAcceleration(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "acceleration_status", "Suspended"), + resource.TestCheckResourceAttr(resourceName, "acceleration_status", "Suspended"), ), }, }, @@ -515,7 +491,7 @@ func TestAccAWSS3Bucket_acceleration(t *testing.T) { } func TestAccAWSS3Bucket_RequestPayer(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -524,36 +500,25 @@ func TestAccAWSS3Bucket_RequestPayer(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigRequestPayerBucketOwner(rInt), + Config: testAccAWSS3BucketConfigRequestPayerBucketOwner(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, - "request_payer", - "BucketOwner"), - testAccCheckAWSS3RequestPayer( - resourceName, - "BucketOwner"), + resource.TestCheckResourceAttr(resourceName, "request_payer", "BucketOwner"), + testAccCheckAWSS3RequestPayer(resourceName, "BucketOwner"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfigRequestPayerRequester(rInt), + Config: testAccAWSS3BucketConfigRequestPayerRequester(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, - "request_payer", - "Requester"), - testAccCheckAWSS3RequestPayer( - resourceName, - "Requester"), + resource.TestCheckResourceAttr(resourceName, "request_payer", "Requester"), + testAccCheckAWSS3RequestPayer(resourceName, "Requester"), ), }, }, @@ -561,7 +526,7 @@ func TestAccAWSS3Bucket_RequestPayer(t *testing.T) { } func TestAccAWSS3Bucket_Policy(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") partition := testAccGetPartition() resourceName := "aws_s3_bucket.bucket" @@ -572,16 +537,12 @@ func TestAccAWSS3Bucket_Policy(t *testing.T) { } bucketState, policyState := s[0], s[1] - expectedBucketId := fmt.Sprintf("tf-test-bucket-%d", rInt) - - if bucketState.ID != expectedBucketId { - return fmt.Errorf("expected bucket of ID %s, %s received", - expectedBucketId, bucketState.ID) + if bucketState.ID != bucketName { + return fmt.Errorf("expected bucket of ID %s, %s received", bucketName, bucketState.ID) } - if policyState.ID != expectedBucketId { - return fmt.Errorf("expected policy of ID %s, %s received", - expectedBucketId, bucketState.ID) + if policyState.ID != bucketName { + return fmt.Errorf("expected policy of ID %s, %s received", bucketName, bucketState.ID) } return nil @@ -593,11 +554,10 @@ func TestAccAWSS3Bucket_Policy(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithPolicy(rInt, partition), + Config: testAccAWSS3BucketConfigWithPolicy(bucketName, partition), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketPolicy( - resourceName, testAccAWSS3BucketPolicy(rInt, partition)), + testAccCheckAWSS3BucketPolicy(resourceName, testAccAWSS3BucketPolicy(bucketName, partition)), ), }, { @@ -606,19 +566,17 @@ func TestAccAWSS3Bucket_Policy(t *testing.T) { ImportStateCheck: checkFn, }, { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketPolicy( - resourceName, ""), + testAccCheckAWSS3BucketPolicy(resourceName, ""), ), }, { - Config: testAccAWSS3BucketConfigWithEmptyPolicy(rInt), + Config: testAccAWSS3BucketConfigWithEmptyPolicy(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketPolicy( - resourceName, ""), + testAccCheckAWSS3BucketPolicy(resourceName, ""), ), }, }, @@ -626,7 +584,7 @@ func TestAccAWSS3Bucket_Policy(t *testing.T) { } func TestAccAWSS3Bucket_UpdateAcl(t *testing.T) { - ri := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -635,26 +593,23 @@ func TestAccAWSS3Bucket_UpdateAcl(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithAcl(ri), + Config: testAccAWSS3BucketConfigWithAcl(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "acl", "public-read"), + resource.TestCheckResourceAttr(resourceName, "acl", "public-read"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "grant"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "grant"}, }, { - Config: testAccAWSS3BucketConfigWithAclUpdate(ri), + Config: testAccAWSS3BucketConfigWithAclUpdate(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "acl", "private"), + resource.TestCheckResourceAttr(resourceName, "acl", "private"), ), }, }, @@ -662,15 +617,17 @@ func TestAccAWSS3Bucket_UpdateAcl(t *testing.T) { } func TestAccAWSS3Bucket_UpdateGrant(t *testing.T) { + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" - ri := acctest.RandInt() + resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSS3BucketDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithGrants(ri), + Config: testAccAWSS3BucketConfigWithGrants(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "grant.#", "1"), @@ -678,14 +635,13 @@ func TestAccAWSS3Bucket_UpdateGrant(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfigWithGrantsUpdate(ri), + Config: testAccAWSS3BucketConfigWithGrantsUpdate(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "grant.#", "2"), @@ -693,7 +649,7 @@ func TestAccAWSS3Bucket_UpdateGrant(t *testing.T) { ), }, { - Config: testAccAWSS3BucketBasic(ri), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "grant.#", "0"), @@ -704,15 +660,16 @@ func TestAccAWSS3Bucket_UpdateGrant(t *testing.T) { } func TestAccAWSS3Bucket_AclToGrant(t *testing.T) { + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" - ri := acctest.RandInt() + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithAcl(ri), + Config: testAccAWSS3BucketConfigWithAcl(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "acl", "public-read"), @@ -720,7 +677,7 @@ func TestAccAWSS3Bucket_AclToGrant(t *testing.T) { ), }, { - Config: testAccAWSS3BucketConfigWithGrants(ri), + Config: testAccAWSS3BucketConfigWithGrants(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "grant.#", "1"), @@ -732,22 +689,23 @@ func TestAccAWSS3Bucket_AclToGrant(t *testing.T) { } func TestAccAWSS3Bucket_GrantToAcl(t *testing.T) { + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" - ri := acctest.RandInt() + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithGrants(ri), + Config: testAccAWSS3BucketConfigWithGrants(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "grant.#", "1"), ), }, { - Config: testAccAWSS3BucketConfigWithAcl(ri), + Config: testAccAWSS3BucketConfigWithAcl(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "acl", "public-read"), @@ -760,7 +718,7 @@ func TestAccAWSS3Bucket_GrantToAcl(t *testing.T) { } func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") region := testAccGetRegion() resourceName := "aws_s3_bucket.bucket" @@ -770,40 +728,33 @@ func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketWebsiteConfig(rInt), + Config: testAccAWSS3BucketWebsiteConfig(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "index.html", "", "", ""), - testAccCheckS3BucketWebsiteEndpoint( - resourceName, "website_endpoint", testAccBucketName(rInt), region), + testAccCheckAWSS3BucketWebsite(resourceName, "index.html", "", "", ""), + testAccCheckS3BucketWebsiteEndpoint(resourceName, "website_endpoint", bucketName, region), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "grant"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "grant"}, }, { - Config: testAccAWSS3BucketWebsiteConfigWithError(rInt), + Config: testAccAWSS3BucketWebsiteConfigWithError(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "index.html", "error.html", "", ""), - testAccCheckS3BucketWebsiteEndpoint( - resourceName, "website_endpoint", testAccBucketName(rInt), region), + testAccCheckAWSS3BucketWebsite(resourceName, "index.html", "error.html", "", ""), + testAccCheckS3BucketWebsiteEndpoint(resourceName, "website_endpoint", bucketName, region), ), }, { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "", "", "", ""), - resource.TestCheckResourceAttr( - resourceName, "website_endpoint", ""), + testAccCheckAWSS3BucketWebsite(resourceName, "", "", "", ""), + resource.TestCheckResourceAttr(resourceName, "website_endpoint", ""), ), }, }, @@ -811,7 +762,7 @@ func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { } func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") region := testAccGetRegion() resourceName := "aws_s3_bucket.bucket" @@ -821,40 +772,33 @@ func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketWebsiteConfigWithRedirect(rInt), + Config: testAccAWSS3BucketWebsiteConfigWithRedirect(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "", "", "", "hashicorp.com?my=query"), - testAccCheckS3BucketWebsiteEndpoint( - resourceName, "website_endpoint", testAccBucketName(rInt), region), + testAccCheckAWSS3BucketWebsite(resourceName, "", "", "", "hashicorp.com?my=query"), + testAccCheckS3BucketWebsiteEndpoint(resourceName, "website_endpoint", bucketName, region), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "grant"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "grant"}, }, { - Config: testAccAWSS3BucketWebsiteConfigWithHttpsRedirect(rInt), + Config: testAccAWSS3BucketWebsiteConfigWithHttpsRedirect(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "", "", "https", "hashicorp.com?my=query"), - testAccCheckS3BucketWebsiteEndpoint( - resourceName, "website_endpoint", testAccBucketName(rInt), region), + testAccCheckAWSS3BucketWebsite(resourceName, "", "", "https", "hashicorp.com?my=query"), + testAccCheckS3BucketWebsiteEndpoint(resourceName, "website_endpoint", bucketName, region), ), }, { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "", "", "", ""), - resource.TestCheckResourceAttr( - resourceName, "website_endpoint", ""), + testAccCheckAWSS3BucketWebsite(resourceName, "", "", "", ""), + resource.TestCheckResourceAttr(resourceName, "website_endpoint", ""), ), }, }, @@ -862,7 +806,7 @@ func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { } func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") region := testAccGetRegion() resourceName := "aws_s3_bucket.bucket" @@ -872,7 +816,7 @@ func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketWebsiteConfigWithRoutingRules(rInt), + Config: testAccAWSS3BucketWebsiteConfigWithRoutingRules(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), testAccCheckAWSS3BucketWebsite( @@ -890,26 +834,22 @@ func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { }, }, ), - testAccCheckS3BucketWebsiteEndpoint( - resourceName, "website_endpoint", testAccBucketName(rInt), region), + testAccCheckS3BucketWebsiteEndpoint(resourceName, "website_endpoint", bucketName, region), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "grant"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "grant"}, }, { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketWebsite( - resourceName, "", "", "", ""), + testAccCheckAWSS3BucketWebsite(resourceName, "", "", "", ""), testAccCheckAWSS3BucketWebsiteRoutingRules(resourceName, nil), - resource.TestCheckResourceAttr( - resourceName, "website_endpoint", ""), + resource.TestCheckResourceAttr(resourceName, "website_endpoint", ""), ), }, }, @@ -917,7 +857,7 @@ func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { } func TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.arbitrary" resource.ParallelTest(t, resource.TestCase{ @@ -926,7 +866,7 @@ func TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketEnableDefaultEncryption(rInt), + Config: testAccAWSS3BucketEnableDefaultEncryption(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "server_side_encryption_configuration.#", "1"), @@ -937,18 +877,17 @@ func TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) } func TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.arbitrary" resource.ParallelTest(t, resource.TestCase{ @@ -957,7 +896,7 @@ func TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketEnableDefaultEncryptionWithAES256(rInt), + Config: testAccAWSS3BucketEnableDefaultEncryptionWithAES256(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "server_side_encryption_configuration.#", "1"), @@ -968,18 +907,17 @@ func TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) } func TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.arbitrary" resource.ParallelTest(t, resource.TestCase{ @@ -988,20 +926,19 @@ func TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled( CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketEnableDefaultEncryptionWithDefaultKey(rInt), + Config: testAccAWSS3BucketEnableDefaultEncryptionWithDefaultKey(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketDisableDefaultEncryption(rInt), + Config: testAccAWSS3BucketDisableDefaultEncryption(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "server_side_encryption_configuration.#", "0"), @@ -1015,7 +952,7 @@ func TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled( // not empty" error in Terraform, to check against regresssions. // See https://github.com/hashicorp/terraform/pull/2925 func TestAccAWSS3Bucket_shouldFailNotFound(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -1024,7 +961,7 @@ func TestAccAWSS3Bucket_shouldFailNotFound(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketDestroyedConfig(rInt), + Config: testAccAWSS3BucketDestroyedConfig(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), testAccCheckAWSS3DestroyBucket(resourceName), @@ -1036,7 +973,7 @@ func TestAccAWSS3Bucket_shouldFailNotFound(t *testing.T) { } func TestAccAWSS3Bucket_Versioning(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -1045,34 +982,30 @@ func TestAccAWSS3Bucket_Versioning(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketVersioning( - resourceName, ""), + testAccCheckAWSS3BucketVersioning(resourceName, ""), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfigWithVersioning(rInt), + Config: testAccAWSS3BucketConfigWithVersioning(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketVersioning( - resourceName, s3.BucketVersioningStatusEnabled), + testAccCheckAWSS3BucketVersioning(resourceName, s3.BucketVersioningStatusEnabled), ), }, { - Config: testAccAWSS3BucketConfigWithDisableVersioning(rInt), + Config: testAccAWSS3BucketConfigWithDisableVersioning(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketVersioning( - resourceName, s3.BucketVersioningStatusSuspended), + testAccCheckAWSS3BucketVersioning(resourceName, s3.BucketVersioningStatusSuspended), ), }, }, @@ -1080,7 +1013,7 @@ func TestAccAWSS3Bucket_Versioning(t *testing.T) { } func TestAccAWSS3Bucket_Cors_Update(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" updateBucketCors := func(n string) resource.TestCheckFunc { @@ -1116,7 +1049,7 @@ func TestAccAWSS3Bucket_Cors_Update(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithCORS(rInt), + Config: testAccAWSS3BucketConfigWithCORS(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), testAccCheckAWSS3BucketCors( @@ -1136,14 +1069,13 @@ func TestAccAWSS3Bucket_Cors_Update(t *testing.T) { ExpectNonEmptyPlan: true, }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfigWithCORS(rInt), + Config: testAccAWSS3BucketConfigWithCORS(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), testAccCheckAWSS3BucketCors( @@ -1165,7 +1097,7 @@ func TestAccAWSS3Bucket_Cors_Update(t *testing.T) { } func TestAccAWSS3Bucket_Cors_Delete(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" deleteBucketCors := func(n string) resource.TestCheckFunc { @@ -1192,7 +1124,7 @@ func TestAccAWSS3Bucket_Cors_Delete(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithCORS(rInt), + Config: testAccAWSS3BucketConfigWithCORS(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), deleteBucketCors(resourceName), @@ -1204,7 +1136,7 @@ func TestAccAWSS3Bucket_Cors_Delete(t *testing.T) { } func TestAccAWSS3Bucket_Cors_EmptyOrigin(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -1213,7 +1145,7 @@ func TestAccAWSS3Bucket_Cors_EmptyOrigin(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithCORSEmptyOrigin(rInt), + Config: testAccAWSS3BucketConfigWithCORSEmptyOrigin(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), testAccCheckAWSS3BucketCors( @@ -1231,18 +1163,17 @@ func TestAccAWSS3Bucket_Cors_EmptyOrigin(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) } func TestAccAWSS3Bucket_Logging(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -1251,168 +1182,109 @@ func TestAccAWSS3Bucket_Logging(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithLogging(rInt), + Config: testAccAWSS3BucketConfigWithLogging(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - testAccCheckAWSS3BucketLogging( - resourceName, "aws_s3_bucket.log_bucket", "log/"), + testAccCheckAWSS3BucketLogging(resourceName, "aws_s3_bucket.log_bucket", "log/"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) } func TestAccAWSS3Bucket_LifecycleBasic(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSS3BucketDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithLifecycle(rInt), + Config: testAccAWSS3BucketConfigWithLifecycle(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.id", "id1"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.prefix", "path1/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.expiration.2613713285.days", "365"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.expiration.2613713285.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.expiration.2613713285.expired_object_delete_marker", "false"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.2000431762.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.2000431762.days", "30"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.2000431762.storage_class", "STANDARD_IA"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.3601168188.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.3601168188.days", "60"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.3601168188.storage_class", "INTELLIGENT_TIERING"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.3854926587.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.3854926587.days", "90"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.3854926587.storage_class", "ONEZONE_IA"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.962205413.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.962205413.days", "120"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.962205413.storage_class", "GLACIER"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.1571523406.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.1571523406.days", "210"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.transition.1571523406.storage_class", "DEEP_ARCHIVE"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.id", "id2"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.prefix", "path2/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.expiration.2855832418.date", "2016-01-12"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.expiration.2855832418.days", "0"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.expiration.2855832418.expired_object_delete_marker", "false"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.id", "id3"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.prefix", "path3/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.transition.460947558.days", "0"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.3.id", "id4"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.3.prefix", "path4/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.3.tags.tagKey", "tagValue"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.3.tags.terraform", "hashicorp"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.4.id", "id5"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.4.tags.tagKey", "tagValue"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.4.tags.terraform", "hashicorp"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.4.transition.460947558.days", "0"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.4.transition.460947558.storage_class", "GLACIER"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.5.id", "id6"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.5.tags.tagKey", "tagValue"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.5.transition.460947558.days", "0"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.5.transition.460947558.storage_class", "GLACIER"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.id", "id1"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.prefix", "path1/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.expiration.0.days", "365"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.expiration.0.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.expiration.0.expired_object_delete_marker", "false"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.2000431762.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.2000431762.days", "30"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.2000431762.storage_class", "STANDARD_IA"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.3601168188.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.3601168188.days", "60"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.3601168188.storage_class", "INTELLIGENT_TIERING"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.3854926587.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.3854926587.days", "90"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.3854926587.storage_class", "ONEZONE_IA"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.962205413.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.962205413.days", "120"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.962205413.storage_class", "GLACIER"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.1571523406.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.1571523406.days", "210"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.transition.1571523406.storage_class", "DEEP_ARCHIVE"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.id", "id2"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.prefix", "path2/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.expiration.0.date", "2016-01-12"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.expiration.0.days", "0"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.expiration.0.expired_object_delete_marker", "false"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.id", "id3"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.prefix", "path3/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.transition.460947558.days", "0"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.3.id", "id4"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.3.prefix", "path4/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.3.tags.tagKey", "tagValue"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.3.tags.terraform", "hashicorp"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.4.id", "id5"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.4.tags.tagKey", "tagValue"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.4.tags.terraform", "hashicorp"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.4.transition.460947558.days", "0"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.4.transition.460947558.storage_class", "GLACIER"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.5.id", "id6"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.5.tags.tagKey", "tagValue"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.5.transition.460947558.days", "0"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.5.transition.460947558.storage_class", "GLACIER"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfigWithVersioningLifecycle(rInt), + Config: testAccAWSS3BucketConfigWithVersioningLifecycle(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.id", "id1"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.prefix", "path1/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.enabled", "true"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.noncurrent_version_expiration.80908210.days", "365"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.noncurrent_version_transition.1377917700.days", "30"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.noncurrent_version_transition.1377917700.storage_class", "STANDARD_IA"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.noncurrent_version_transition.2528035817.days", "60"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.noncurrent_version_transition.2528035817.storage_class", "GLACIER"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.id", "id2"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.prefix", "path2/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.enabled", "false"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.1.noncurrent_version_expiration.80908210.days", "365"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.id", "id3"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.prefix", "path3/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.noncurrent_version_transition.3732708140.days", "0"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.2.noncurrent_version_transition.3732708140.storage_class", "GLACIER"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.id", "id1"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.prefix", "path1/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.noncurrent_version_expiration.0.days", "365"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.noncurrent_version_transition.1377917700.days", "30"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.noncurrent_version_transition.1377917700.storage_class", "STANDARD_IA"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.noncurrent_version_transition.2528035817.days", "60"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.noncurrent_version_transition.2528035817.storage_class", "GLACIER"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.id", "id2"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.prefix", "path2/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.1.noncurrent_version_expiration.0.days", "365"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.id", "id3"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.prefix", "path3/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.noncurrent_version_transition.3732708140.days", "0"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.2.noncurrent_version_transition.3732708140.storage_class", "GLACIER"), ), }, { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), ), @@ -1422,7 +1294,7 @@ func TestAccAWSS3Bucket_LifecycleBasic(t *testing.T) { } func TestAccAWSS3Bucket_LifecycleExpireMarkerOnly(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.bucket" resource.ParallelTest(t, resource.TestCase{ @@ -1431,30 +1303,44 @@ func TestAccAWSS3Bucket_LifecycleExpireMarkerOnly(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithLifecycleExpireMarker(rInt), + Config: testAccAWSS3BucketConfigWithLifecycleExpireMarker(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.id", "id1"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.prefix", "path1/"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.expiration.3591068768.days", "0"), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.expiration.3591068768.date", ""), - resource.TestCheckResourceAttr( - resourceName, "lifecycle_rule.0.expiration.3591068768.expired_object_delete_marker", "true"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.id", "id1"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.prefix", "path1/"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.expiration.0.days", "0"), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.expiration.0.date", ""), + resource.TestCheckResourceAttr(resourceName, "lifecycle_rule.0.expiration.0.expired_object_delete_marker", "true"), ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketConfig(rInt), + Config: testAccAWSS3BucketConfig_Basic(bucketName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExists(resourceName), + ), + }, + }, + }) +} + +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/11420 +func TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_s3_bucket.bucket" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigLifecycleRuleExpirationEmptyConfigurationBlock(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), ), @@ -1492,12 +1378,11 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { ), }, { - Config: testAccAWSS3BucketConfigReplication(rInt), - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + Config: testAccAWSS3BucketConfigReplication(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { Config: testAccAWSS3BucketConfigReplicationWithConfiguration(rInt, "STANDARD"), @@ -1633,12 +1518,11 @@ func TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlT ), }, { - Config: testAccAWSS3BucketConfigReplicationWithAccessControlTranslation(rInt), - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl", "versioning"}, + Config: testAccAWSS3BucketConfigReplicationWithAccessControlTranslation(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "versioning"}, }, { Config: testAccAWSS3BucketConfigReplicationWithSseKmsEncryptedObjectsAndAccessControlTranslation(rInt), @@ -1680,6 +1564,90 @@ func TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlT }) } +// Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12480 +func TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AddAccessControlTranslation(t *testing.T) { + rInt := acctest.RandInt() + region := testAccGetRegion() + partition := testAccGetPartition() + iamRoleResourceName := "aws_iam_role.role" + resourceName := "aws_s3_bucket.bucket" + + // record the initialized providers so that we can use them to check for the instances in each region + var providers []*schema.Provider + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + testAccAlternateRegionPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckWithProviders(testAccCheckAWSS3BucketDestroyWithProvider, &providers), + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigReplicationConfigurationRulesDestination(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider(resourceName, testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr(resourceName, "replication_configuration.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "replication_configuration.0.role", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketReplicationRules( + resourceName, + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Account: aws.String("${data.aws_caller_identity.current.account_id}"), + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + }, + Prefix: aws.String("foo"), + Status: aws.String(s3.ReplicationRuleStatusEnabled), + }, + }, + ), + ), + }, + { + Config: testAccAWSS3BucketConfigReplicationWithAccessControlTranslation(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl", "versioning"}, + }, + { + Config: testAccAWSS3BucketConfigReplicationWithAccessControlTranslation(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider(resourceName, testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr(resourceName, "replication_configuration.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "replication_configuration.0.role", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketReplicationRules( + resourceName, + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Account: aws.String("${data.aws_caller_identity.current.account_id}"), + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + AccessControlTranslation: &s3.AccessControlTranslation{ + Owner: aws.String("Destination"), + }, + }, + Prefix: aws.String("foo"), + Status: aws.String(s3.ReplicationRuleStatusEnabled), + }, + }, + ), + ), + }, + }, + }) +} + // StorageClass issue: https://github.com/hashicorp/terraform/issues/10909 func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { rInt := acctest.RandInt() @@ -1707,12 +1675,11 @@ func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { ), }, { - Config: testAccAWSS3BucketConfigReplicationWithoutStorageClass(rInt), - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + Config: testAccAWSS3BucketConfigReplicationWithoutStorageClass(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) @@ -1768,12 +1735,11 @@ func TestAccAWSS3Bucket_ReplicationWithoutPrefix(t *testing.T) { ), }, { - Config: testAccAWSS3BucketConfigReplicationWithoutPrefix(rInt), - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + Config: testAccAWSS3BucketConfigReplicationWithoutPrefix(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, }, }) @@ -1831,12 +1797,11 @@ func TestAccAWSS3Bucket_ReplicationSchemaV2(t *testing.T) { ), }, { - Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationNoTags(rInt), - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationNoTags(rInt), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationOnlyOneTag(rInt), @@ -1972,7 +1937,7 @@ func TestAccAWSS3Bucket_ReplicationSchemaV2(t *testing.T) { } func TestAccAWSS3Bucket_objectLock(t *testing.T) { - rInt := acctest.RandInt() + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resourceName := "aws_s3_bucket.arbitrary" resource.ParallelTest(t, resource.TestCase{ @@ -1981,7 +1946,7 @@ func TestAccAWSS3Bucket_objectLock(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketObjectLockEnabledNoDefaultRetention(rInt), + Config: testAccAWSS3BucketObjectLockEnabledNoDefaultRetention(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "object_lock_configuration.#", "1"), @@ -1990,14 +1955,13 @@ func TestAccAWSS3Bucket_objectLock(t *testing.T) { ), }, { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy", "acl"}, }, { - Config: testAccAWSS3BucketObjectLockEnabledWithDefaultRetention(rInt), + Config: testAccAWSS3BucketObjectLockEnabledWithDefaultRetention(bucketName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists(resourceName), resource.TestCheckResourceAttr(resourceName, "object_lock_configuration.#", "1"), @@ -2013,8 +1977,7 @@ func TestAccAWSS3Bucket_objectLock(t *testing.T) { func TestAccAWSS3Bucket_forceDestroy(t *testing.T) { resourceName := "aws_s3_bucket.bucket" - rInt := acctest.RandInt() - bucketName := fmt.Sprintf("tf-test-bucket-%d", rInt) + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -2039,8 +2002,7 @@ func TestAccAWSS3Bucket_forceDestroy(t *testing.T) { // services may create keys with extra slashes (empty "directory" prefixes). func TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes(t *testing.T) { resourceName := "aws_s3_bucket.bucket" - rInt := acctest.RandInt() - bucketName := fmt.Sprintf("tf-test-bucket-%d", rInt) + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -2060,8 +2022,7 @@ func TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes(t *testing.T) { func TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled(t *testing.T) { resourceName := "aws_s3_bucket.bucket" - rInt := acctest.RandInt() - bucketName := fmt.Sprintf("tf-test-bucket-%d", rInt) + bucketName := acctest.RandomWithPrefix("tf-test-bucket") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -2498,7 +2459,7 @@ func testAccCheckAWSS3BucketAddObjectsWithLegalHold(n string, keys ...string) re func testAccCheckAWSS3BucketCreateViaCloudFormation(n string, stackId *string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).cfconn - stackName := fmt.Sprintf("tf-acc-test-s3tags-%d", acctest.RandInt()) + stackName := acctest.RandomWithPrefix("tf-acc-test-s3tags") templateBody := fmt.Sprintf(` { "Resources": { @@ -2936,12 +2897,6 @@ func testAccCheckAWSS3BucketUpdateGrantMulti(resourceName string) func(s *terraf } } -// These need a bit of randomness as the name can only be used once globally -// within AWS -func testAccBucketName(randInt int) string { - return fmt.Sprintf("tf-test-bucket-%d", randInt) -} - func testAccCheckS3BucketDomainName(resourceName string, attributeName string, bucketName string) resource.TestCheckFunc { return func(s *terraform.State) error { expectedValue := testAccProvider.Meta().(*AWSClient).PartitionHostname(fmt.Sprintf("%s.s3", bucketName)) @@ -2950,8 +2905,7 @@ func testAccCheckS3BucketDomainName(resourceName string, attributeName string, b } } -func testAccBucketRegionalDomainName(randInt int, region string) string { - bucket := fmt.Sprintf("tf-test-bucket-%d", randInt) +func testAccBucketRegionalDomainName(bucket, region string) string { regionalEndpoint, err := BucketRegionalDomainName(bucket, region) if err != nil { return fmt.Sprintf("Regional endpoint not found for bucket %s", bucket) @@ -2968,7 +2922,7 @@ func testAccCheckS3BucketWebsiteEndpoint(resourceName string, attributeName stri } } -func testAccAWSS3BucketPolicy(randInt int, partition string) string { +func testAccAWSS3BucketPolicy(bucketName, partition string) string { return fmt.Sprintf(`{ "Version": "2012-10-17", "Statement": [ @@ -2977,27 +2931,19 @@ func testAccAWSS3BucketPolicy(randInt int, partition string) string { "Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "s3:GetObject", - "Resource": "arn:%s:s3:::tf-test-bucket-%d/*" + "Resource": "arn:%[1]s:s3:::%[2]s/*" } ] } -`, partition, randInt) +`, partition, bucketName) } -func testAccAWSS3BucketConfig(randInt int) string { +func testAccAWSS3BucketConfig_Basic(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" -} -`, randInt) -} - -func testAccAWSS3BucketBasic(randInt int) string { - return fmt.Sprintf(` -resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q } -`, randInt) +`, bucketName) } func testAccAWSS3BucketConfig_withNoTags(bucketName string) string { @@ -3122,23 +3068,23 @@ resource "aws_s3_bucket" "test" { `, bucketName) } -func testAccAWSS3BucketWebsiteConfig(randInt int) string { +func testAccAWSS3BucketWebsiteConfig(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" website { index_document = "index.html" } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketWebsiteConfigWithError(randInt int) string { +func testAccAWSS3BucketWebsiteConfigWithError(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" website { @@ -3146,39 +3092,39 @@ resource "aws_s3_bucket" "bucket" { error_document = "error.html" } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketWebsiteConfigWithRedirect(randInt int) string { +func testAccAWSS3BucketWebsiteConfigWithRedirect(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" website { redirect_all_requests_to = "hashicorp.com?my=query" } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketWebsiteConfigWithHttpsRedirect(randInt int) string { +func testAccAWSS3BucketWebsiteConfigWithHttpsRedirect(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" website { redirect_all_requests_to = "https://hashicorp.com?my=query" } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketWebsiteConfigWithRoutingRules(randInt int) string { +func testAccAWSS3BucketWebsiteConfigWithRoutingRules(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" website { @@ -3197,73 +3143,73 @@ resource "aws_s3_bucket" "bucket" { EOF } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithAcceleration(randInt int) string { +func testAccAWSS3BucketConfigWithAcceleration(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acceleration_status = "Enabled" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithoutAcceleration(randInt int) string { +func testAccAWSS3BucketConfigWithoutAcceleration(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acceleration_status = "Suspended" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigRequestPayerBucketOwner(randInt int) string { +func testAccAWSS3BucketConfigRequestPayerBucketOwner(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q request_payer = "BucketOwner" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigRequestPayerRequester(randInt int) string { +func testAccAWSS3BucketConfigRequestPayerRequester(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q request_payer = "Requester" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithPolicy(randInt int, partition string) string { +func testAccAWSS3BucketConfigWithPolicy(bucketName, partition string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" - policy = %s + policy = %[2]s } -`, randInt, strconv.Quote(testAccAWSS3BucketPolicy(randInt, partition))) +`, bucketName, strconv.Quote(testAccAWSS3BucketPolicy(bucketName, partition))) } -func testAccAWSS3BucketDestroyedConfig(randInt int) string { +func testAccAWSS3BucketDestroyedConfig(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketEnableDefaultEncryption(randInt int) string { +func testAccAWSS3BucketEnableDefaultEncryption(bucketName string) string { return fmt.Sprintf(` resource "aws_kms_key" "arbitrary" { - description = "KMS Key for Bucket Testing %d" + description = "KMS Key for Bucket %[1]s" deletion_window_in_days = 10 } resource "aws_s3_bucket" "arbitrary" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q server_side_encryption_configuration { rule { @@ -3274,13 +3220,13 @@ resource "aws_s3_bucket" "arbitrary" { } } } -`, randInt, randInt) +`, bucketName) } -func testAccAWSS3BucketEnableDefaultEncryptionWithAES256(randInt int) string { +func testAccAWSS3BucketEnableDefaultEncryptionWithAES256(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "arbitrary" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q server_side_encryption_configuration { rule { @@ -3290,13 +3236,13 @@ resource "aws_s3_bucket" "arbitrary" { } } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketEnableDefaultEncryptionWithDefaultKey(randInt int) string { +func testAccAWSS3BucketEnableDefaultEncryptionWithDefaultKey(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "arbitrary" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q server_side_encryption_configuration { rule { @@ -3306,55 +3252,55 @@ resource "aws_s3_bucket" "arbitrary" { } } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketDisableDefaultEncryption(randInt int) string { +func testAccAWSS3BucketDisableDefaultEncryption(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "arbitrary" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithEmptyPolicy(randInt int) string { +func testAccAWSS3BucketConfigWithEmptyPolicy(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "public-read" policy = "" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithVersioning(randInt int) string { +func testAccAWSS3BucketConfigWithVersioning(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q versioning { enabled = true } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithDisableVersioning(randInt int) string { +func testAccAWSS3BucketConfigWithDisableVersioning(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q versioning { enabled = false } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithCORS(randInt int) string { +func testAccAWSS3BucketConfigWithCORS(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q cors_rule { allowed_headers = ["*"] @@ -3364,13 +3310,13 @@ resource "aws_s3_bucket" "bucket" { max_age_seconds = 3000 } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithCORSEmptyOrigin(randInt int) string { +func testAccAWSS3BucketConfigWithCORSEmptyOrigin(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q cors_rule { allowed_headers = ["*"] @@ -3380,46 +3326,48 @@ resource "aws_s3_bucket" "bucket" { max_age_seconds = 3000 } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithAcl(randInt int) string { +func testAccAWSS3BucketConfigWithAcl(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" - acl = "public-read" + bucket = %[1]q + acl = "public-read" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithAclUpdate(randInt int) string { +func testAccAWSS3BucketConfigWithAclUpdate(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" - acl = "private" + bucket = %[1]q + acl = "private" } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithGrants(randInt int) string { +func testAccAWSS3BucketConfigWithGrants(bucketName string) string { return fmt.Sprintf(` data "aws_canonical_user_id" "current" {} + resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q grant { id = "${data.aws_canonical_user_id.current.id}" type = "CanonicalUser" permissions = ["FULL_CONTROL", "WRITE"] } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithGrantsUpdate(randInt int) string { +func testAccAWSS3BucketConfigWithGrantsUpdate(bucketName string) string { return fmt.Sprintf(` data "aws_canonical_user_id" "current" {} + resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q grant { id = "${data.aws_canonical_user_id.current.id}" type = "CanonicalUser" @@ -3431,18 +3379,18 @@ resource "aws_s3_bucket" "bucket" { uri = "http://acs.amazonaws.com/groups/s3/LogDelivery" } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithLogging(randInt int) string { +func testAccAWSS3BucketConfigWithLogging(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "log_bucket" { - bucket = "tf-test-log-bucket-%d" + bucket = "%[1]s-log" acl = "log-delivery-write" } resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "private" logging { @@ -3450,13 +3398,13 @@ resource "aws_s3_bucket" "bucket" { target_prefix = "log/" } } -`, randInt, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithLifecycle(randInt int) string { +func testAccAWSS3BucketConfigWithLifecycle(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "private" lifecycle_rule { @@ -3557,13 +3505,13 @@ resource "aws_s3_bucket" "bucket" { } } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithLifecycleExpireMarker(randInt int) string { +func testAccAWSS3BucketConfigWithLifecycleExpireMarker(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "private" lifecycle_rule { @@ -3576,13 +3524,13 @@ resource "aws_s3_bucket" "bucket" { } } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketConfigWithVersioningLifecycle(randInt int) string { +func testAccAWSS3BucketConfigWithVersioningLifecycle(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q acl = "private" versioning { @@ -3630,7 +3578,22 @@ resource "aws_s3_bucket" "bucket" { } } } -`, randInt) +`, bucketName) +} + +func testAccAWSS3BucketConfigLifecycleRuleExpirationEmptyConfigurationBlock(rName string) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "bucket" { + bucket = %[1]q + + lifecycle_rule { + enabled = true + id = "id1" + + expiration {} + } +} +`, rName) } func testAccAWSS3BucketConfigReplicationBasic(randInt int) string { @@ -3781,6 +3744,37 @@ resource "aws_s3_bucket" "bucket" { `, randInt) } +func testAccAWSS3BucketConfigReplicationConfigurationRulesDestination(randInt int) string { + return testAccAWSS3BucketConfigReplicationBasic(randInt) + fmt.Sprintf(` +data "aws_caller_identity" "current" {} + +resource "aws_s3_bucket" "bucket" { + acl = "private" + bucket = "tf-test-bucket-%[1]d" + + replication_configuration { + role = aws_iam_role.role.arn + + rules { + id = "foobar" + prefix = "foo" + status = "Enabled" + + destination { + account_id = data.aws_caller_identity.current.account_id + bucket = aws_s3_bucket.destination.arn + storage_class = "STANDARD" + } + } + } + + versioning { + enabled = true + } +} +`, randInt) +} + func testAccAWSS3BucketConfigReplicationWithSseKmsEncryptedObjectsAndAccessControlTranslation(randInt int) string { return testAccAWSS3BucketConfigReplicationBasic(randInt) + fmt.Sprintf(` data "aws_caller_identity" "current" {} @@ -4038,22 +4032,22 @@ resource "aws_s3_bucket" "bucket" { `, randInt) } -func testAccAWSS3BucketObjectLockEnabledNoDefaultRetention(randInt int) string { +func testAccAWSS3BucketObjectLockEnabledNoDefaultRetention(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "arbitrary" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q object_lock_configuration { object_lock_enabled = "Enabled" } } -`, randInt) +`, bucketName) } -func testAccAWSS3BucketObjectLockEnabledWithDefaultRetention(randInt int) string { +func testAccAWSS3BucketObjectLockEnabledWithDefaultRetention(bucketName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "arbitrary" { - bucket = "tf-test-bucket-%d" + bucket = %[1]q object_lock_configuration { object_lock_enabled = "Enabled" @@ -4066,7 +4060,7 @@ resource "aws_s3_bucket" "arbitrary" { } } } -`, randInt) +`, bucketName) } func testAccAWSS3BucketConfig_forceDestroy(bucketName string) string { diff --git a/aws/resource_aws_sagemaker_endpoint.go b/aws/resource_aws_sagemaker_endpoint.go index b48c215a47b..26e8f5ce751 100644 --- a/aws/resource_aws_sagemaker_endpoint.go +++ b/aws/resource_aws_sagemaker_endpoint.go @@ -86,6 +86,7 @@ func resourceAwsSagemakerEndpointCreate(d *schema.ResourceData, meta interface{} func resourceAwsSagemakerEndpointRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeInput := &sagemaker.DescribeEndpointInput{ EndpointName: aws.String(d.Id()), @@ -122,7 +123,7 @@ func resourceAwsSagemakerEndpointRead(d *schema.ResourceData, meta interface{}) return fmt.Errorf("error listing tags for Sagemaker Endpoint (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -132,8 +133,6 @@ func resourceAwsSagemakerEndpointRead(d *schema.ResourceData, meta interface{}) func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -141,7 +140,6 @@ func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{} return fmt.Errorf("error updating Sagemaker Endpoint (%s) tags: %s", d.Id(), err) } } - d.SetPartial("tags") if d.HasChange("endpoint_config_name") { modifyOpts := &sagemaker.UpdateEndpointInput{ @@ -153,7 +151,6 @@ func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{} if _, err := conn.UpdateEndpoint(modifyOpts); err != nil { return fmt.Errorf("error updating SageMaker Endpoint (%s): %s", d.Id(), err) } - d.SetPartial("endpoint_config_name") describeInput := &sagemaker.DescribeEndpointInput{ EndpointName: aws.String(d.Id()), @@ -165,8 +162,6 @@ func resourceAwsSagemakerEndpointUpdate(d *schema.ResourceData, meta interface{} } } - d.Partial(false) - return resourceAwsSagemakerEndpointRead(d, meta) } diff --git a/aws/resource_aws_sagemaker_endpoint_configuration.go b/aws/resource_aws_sagemaker_endpoint_configuration.go index 0d5b6668248..d42d83b791d 100644 --- a/aws/resource_aws_sagemaker_endpoint_configuration.go +++ b/aws/resource_aws_sagemaker_endpoint_configuration.go @@ -131,6 +131,7 @@ func resourceAwsSagemakerEndpointConfigurationCreate(d *schema.ResourceData, met func resourceAwsSagemakerEndpointConfigurationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig request := &sagemaker.DescribeEndpointConfigInput{ EndpointConfigName: aws.String(d.Id()), @@ -164,7 +165,7 @@ func resourceAwsSagemakerEndpointConfigurationRead(d *schema.ResourceData, meta return fmt.Errorf("error listing tags for Sagemaker Endpoint Configuration (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_sagemaker_model.go b/aws/resource_aws_sagemaker_model.go index ba977fa3aa2..18dade3623b 100644 --- a/aws/resource_aws_sagemaker_model.go +++ b/aws/resource_aws_sagemaker_model.go @@ -69,6 +69,7 @@ func resourceAwsSagemakerModel() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validateSagemakerEnvironment, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, @@ -140,6 +141,7 @@ func resourceAwsSagemakerModel() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validateSagemakerEnvironment, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, @@ -216,6 +218,7 @@ func expandSageMakerVpcConfigRequest(l []interface{}) *sagemaker.VpcConfig { func resourceAwsSagemakerModelRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig request := &sagemaker.DescribeModelInput{ ModelName: aws.String(d.Id()), @@ -258,7 +261,7 @@ func resourceAwsSagemakerModelRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("error listing tags for Sagemaker Model (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -281,8 +284,6 @@ func flattenSageMakerVpcConfigResponse(vpcConfig *sagemaker.VpcConfig) []map[str func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -291,8 +292,6 @@ func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) e } } - d.Partial(false) - return resourceAwsSagemakerModelRead(d, meta) } diff --git a/aws/resource_aws_sagemaker_notebook_instance.go b/aws/resource_aws_sagemaker_notebook_instance.go index 5ce1d792a64..41219975cea 100644 --- a/aws/resource_aws_sagemaker_notebook_instance.go +++ b/aws/resource_aws_sagemaker_notebook_instance.go @@ -151,6 +151,7 @@ func resourceAwsSagemakerNotebookInstanceCreate(d *schema.ResourceData, meta int func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ NotebookInstanceName: aws.String(d.Id()), @@ -204,7 +205,7 @@ func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta inter return fmt.Errorf("error listing tags for Sagemaker Notebook Instance (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -214,8 +215,6 @@ func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta inter func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sagemakerconn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -223,7 +222,6 @@ func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta int return fmt.Errorf("error updating Sagemaker Notebook Instance (%s) tags: %s", d.Id(), err) } } - d.SetPartial("tags") hasChanged := false // Update @@ -325,8 +323,6 @@ func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta int } } - d.Partial(false) - return resourceAwsSagemakerNotebookInstanceRead(d, meta) } diff --git a/aws/resource_aws_secretsmanager_secret.go b/aws/resource_aws_secretsmanager_secret.go index 7395059f16e..2a8a39a73e1 100644 --- a/aws/resource_aws_secretsmanager_secret.go +++ b/aws/resource_aws_secretsmanager_secret.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/structure" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/secretsmanager/waiter" ) func resourceAwsSecretsManagerSecret() *schema.Resource { @@ -56,7 +57,7 @@ func resourceAwsSecretsManagerSecret() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "recovery_window_in_days": { @@ -130,7 +131,7 @@ func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interfac // Retry for secret recreation after deletion var output *secretsmanager.CreateSecretOutput - err := resource.Retry(2*time.Minute, func() *resource.RetryError { + err := resource.Retry(waiter.DeletionPropagationTimeout, func() *resource.RetryError { var err error output, err = conn.CreateSecret(input) // Temporarily retry on these errors to support immediate secret recreation: @@ -198,6 +199,7 @@ func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interfac func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).secretsmanagerconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &secretsmanager.DescribeSecretInput{ SecretId: aws.String(d.Id()), @@ -248,7 +250,7 @@ func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{ d.Set("rotation_rules", []interface{}{}) } - if err := d.Set("tags", keyvaluetags.SecretsmanagerKeyValueTags(output.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.SecretsmanagerKeyValueTags(output.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_secretsmanager_secret_test.go b/aws/resource_aws_secretsmanager_secret_test.go index ceab0123095..0698b75a833 100644 --- a/aws/resource_aws_secretsmanager_secret_test.go +++ b/aws/resource_aws_secretsmanager_secret_test.go @@ -11,7 +11,8 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/jen20/awspolicyequivalence" + awspolicy "github.com/jen20/awspolicyequivalence" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/secretsmanager/waiter" ) func init() { @@ -78,7 +79,7 @@ func TestAccAwsSecretsManagerSecret_Basic(t *testing.T) { Config: testAccAwsSecretsManagerSecretConfig_Name(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:secretsmanager:[^:]+:[^:]+:secret:%s-.+$", rName))), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "secretsmanager", regexp.MustCompile(fmt.Sprintf("secret:%s-[[:alnum:]]+$", rName))), resource.TestCheckResourceAttr(resourceName, "description", ""), resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), resource.TestCheckResourceAttr(resourceName, "name", rName), @@ -101,7 +102,7 @@ func TestAccAwsSecretsManagerSecret_Basic(t *testing.T) { func TestAccAwsSecretsManagerSecret_withNamePrefix(t *testing.T) { var secret secretsmanager.DescribeSecretOutput - rName := "tf-acc-test-" + rPrefix := "tf-acc-test-" resourceName := "aws_secretsmanager_secret.test" resource.ParallelTest(t, resource.TestCase{ @@ -110,11 +111,11 @@ func TestAccAwsSecretsManagerSecret_withNamePrefix(t *testing.T) { CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsSecretsManagerSecretConfig_withNamePrefix(rName), + Config: testAccAwsSecretsManagerSecretConfig_withNamePrefix(rPrefix), Check: resource.ComposeTestCheckFunc( testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:secretsmanager:[^:]+:[^:]+:secret:%s.+$", rName))), - resource.TestMatchResourceAttr(resourceName, "name", regexp.MustCompile(fmt.Sprintf("^%s", rName))), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "secretsmanager", regexp.MustCompile(fmt.Sprintf("secret:%s[[:digit:]]+-[[:alnum:]]+$", rPrefix))), + resource.TestMatchResourceAttr(resourceName, "name", regexp.MustCompile(fmt.Sprintf("^%s", rPrefix))), ), }, { @@ -234,6 +235,7 @@ func TestAccAwsSecretsManagerSecret_RotationLambdaARN(t *testing.T) { var secret secretsmanager.DescribeSecretOutput rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" + lambdaFunctionResourceName := "aws_lambda_function.test1" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, @@ -246,7 +248,7 @@ func TestAccAwsSecretsManagerSecret_RotationLambdaARN(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "true"), - resource.TestMatchResourceAttr(resourceName, "rotation_lambda_arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:lambda:[^:]+:[^:]+:function:%s-1$", rName))), + resource.TestCheckResourceAttrPair(resourceName, "rotation_lambda_arn", lambdaFunctionResourceName, "arn"), ), }, // Test updating rotation @@ -423,12 +425,32 @@ func testAccCheckAwsSecretsManagerSecretDestroy(s *terraform.State) error { SecretId: aws.String(rs.Primary.ID), } - output, err := conn.DescribeSecret(input) + var output *secretsmanager.DescribeSecretOutput - if err != nil { - if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { - return nil + err := resource.Retry(waiter.DeletionPropagationTimeout, func() *resource.RetryError { + var err error + output, err = conn.DescribeSecret(input) + + if err != nil { + return resource.NonRetryableError(err) } + + if output != nil && output.DeletedDate == nil { + return resource.RetryableError(fmt.Errorf("Secret %q still exists", rs.Primary.ID)) + } + + return nil + }) + + if isResourceTimeoutError(err) { + output, err = conn.DescribeSecret(input) + } + + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + continue + } + + if err != nil { return err } @@ -491,10 +513,10 @@ func testAccCheckAwsSecretsManagerSecretHasPolicy(name string, expectedPolicyTex equivalent, err := awspolicy.PoliciesAreEquivalent(actualPolicyText, expectedPolicyText) if err != nil { - return fmt.Errorf("Error testing policy equivalence: %s", err) + return fmt.Errorf("error testing policy equivalence: %w", err) } if !equivalent { - return fmt.Errorf("Non-equivalent policy error:\n\nexpected: %s\n\n got: %s\n", + return fmt.Errorf("non-equivalent policy error:\n\nexpected: %s\n\n got: %s", expectedPolicyText, actualPolicyText) } @@ -588,6 +610,13 @@ resource "aws_secretsmanager_secret" "test" { func testAccAwsSecretsManagerSecretConfig_RotationLambdaARN(rName string) string { return baseAccAWSLambdaConfig(rName, rName, rName) + fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" + rotation_lambda_arn = "${aws_lambda_function.test1.arn}" + + depends_on = ["aws_lambda_permission.test1"] +} + # Not a real rotation function resource "aws_lambda_function" "test1" { filename = "test-fixtures/lambdatest.zip" @@ -619,13 +648,6 @@ resource "aws_lambda_permission" "test2" { principal = "secretsmanager.amazonaws.com" statement_id = "AllowExecutionFromSecretsManager2" } - -resource "aws_secretsmanager_secret" "test" { - name = "%[1]s" - rotation_lambda_arn = "${aws_lambda_function.test1.arn}" - - depends_on = ["aws_lambda_permission.test1"] -} `, rName) } diff --git a/aws/resource_aws_secretsmanager_secret_version_test.go b/aws/resource_aws_secretsmanager_secret_version_test.go index 6f6aaaa0f2b..b30bad101b6 100644 --- a/aws/resource_aws_secretsmanager_secret_version_test.go +++ b/aws/resource_aws_secretsmanager_secret_version_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -16,11 +15,13 @@ func TestAccAwsSecretsManagerSecretVersion_BasicString(t *testing.T) { var version secretsmanager.GetSecretValueOutput rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret_version.test" + secretResourceName := "aws_secretsmanager_secret.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAwsSecretsManagerSecretVersionConfig_SecretString(rName), @@ -30,8 +31,7 @@ func TestAccAwsSecretsManagerSecretVersion_BasicString(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "version_id"), resource.TestCheckResourceAttr(resourceName, "version_stages.#", "1"), resource.TestCheckResourceAttr(resourceName, "version_stages.3070137", "AWSCURRENT"), - resource.TestMatchResourceAttr(resourceName, "arn", - regexp.MustCompile(`^arn:[\w-]+:secretsmanager:[^:]+:\d{12}:secret:.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "arn", secretResourceName, "arn"), ), }, { @@ -47,11 +47,13 @@ func TestAccAwsSecretsManagerSecretVersion_Base64Binary(t *testing.T) { var version secretsmanager.GetSecretValueOutput rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret_version.test" + secretResourceName := "aws_secretsmanager_secret.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAwsSecretsManagerSecretVersionConfig_SecretBinary(rName), @@ -61,8 +63,7 @@ func TestAccAwsSecretsManagerSecretVersion_Base64Binary(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "version_id"), resource.TestCheckResourceAttr(resourceName, "version_stages.#", "1"), resource.TestCheckResourceAttr(resourceName, "version_stages.3070137", "AWSCURRENT"), - resource.TestMatchResourceAttr(resourceName, "arn", - regexp.MustCompile(`^arn:[\w-]+:secretsmanager:[^:]+:\d{12}:secret:.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "arn", secretResourceName, "arn"), ), }, { @@ -80,9 +81,10 @@ func TestAccAwsSecretsManagerSecretVersion_VersionStages(t *testing.T) { resourceName := "aws_secretsmanager_secret_version.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSSecretsManager(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAwsSecretsManagerSecretVersionConfig_VersionStages_Single(rName), diff --git a/aws/resource_aws_security_group.go b/aws/resource_aws_security_group.go index 17ebc66565f..60bcfa41a90 100644 --- a/aws/resource_aws_security_group.go +++ b/aws/resource_aws_security_group.go @@ -270,7 +270,7 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 Security Group (%s) tags: %s", d.Id(), err) } } @@ -338,6 +338,7 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig var sgRaw interface{} var err error @@ -392,7 +393,7 @@ func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) erro log.Printf("[WARN] Error setting Egress rule set for (%s): %s", d.Id(), err) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(sg.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(sg.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_security_group_rule.go b/aws/resource_aws_security_group_rule.go index fc3cb06c5c9..ffcf6cffe42 100644 --- a/aws/resource_aws_security_group_rule.go +++ b/aws/resource_aws_security_group_rule.go @@ -455,6 +455,7 @@ func (b ByGroupPair) Less(i, j int) bool { return *b[i].GroupName < *b[j].GroupName } + //lintignore:R009 panic("mismatched security group rules, may be a terraform bug") } @@ -759,7 +760,19 @@ func setFromIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup, rule *ec2.IpPe s := rule.UserIdGroupPairs[0] if isVPC { - d.Set("source_security_group_id", s.GroupId) + if existingSourceSgId, ok := d.GetOk("source_security_group_id"); ok { + sgIdComponents := strings.Split(existingSourceSgId.(string), "/") + hasAccountIdPrefix := len(sgIdComponents) == 2 + + if hasAccountIdPrefix && s.UserId != nil { + // then ensure on refresh that we preserve the account id prefix + d.Set("source_security_group_id", fmt.Sprintf("%s/%s", aws.StringValue(s.UserId), aws.StringValue(s.GroupId))) + } else { + d.Set("source_security_group_id", s.GroupId) + } + } else { + d.Set("source_security_group_id", s.GroupId) + } } else { d.Set("source_security_group_id", s.GroupName) } @@ -830,19 +843,33 @@ func descriptionFromIPPerm(d *schema.ResourceData, rule *ec2.IpPermission) strin } // probe UserIdGroupPairs - groupIds := make(map[string]bool) if raw, ok := d.GetOk("source_security_group_id"); ok { - groupIds[raw.(string)] = true - } + components := strings.Split(raw.(string), "/") - if len(groupIds) > 0 { - for _, gp := range rule.UserIdGroupPairs { - if _, ok := groupIds[*gp.GroupId]; !ok { - continue + switch len(components) { + case 2: + userId := components[0] + groupId := components[1] + + for _, gp := range rule.UserIdGroupPairs { + if aws.StringValue(gp.GroupId) != groupId || aws.StringValue(gp.UserId) != userId { + continue + } + + if desc := aws.StringValue(gp.Description); desc != "" { + return desc + } } + case 1: + groupId := components[0] + for _, gp := range rule.UserIdGroupPairs { + if aws.StringValue(gp.GroupId) != groupId { + continue + } - if desc := aws.StringValue(gp.Description); desc != "" { - return desc + if desc := aws.StringValue(gp.Description); desc != "" { + return desc + } } } } diff --git a/aws/resource_aws_security_group_rule_test.go b/aws/resource_aws_security_group_rule_test.go index cb6be2babff..fd3f7829847 100644 --- a/aws/resource_aws_security_group_rule_test.go +++ b/aws/resource_aws_security_group_rule_test.go @@ -154,6 +154,40 @@ func TestAccAWSSecurityGroupRule_Ingress_VPC(t *testing.T) { }) } +func TestAccAWSSecurityGroupRule_Ingress_Source_With_Account_Id(t *testing.T) { + var group ec2.SecurityGroup + + rInt := acctest.RandInt() + + ruleName := "aws_security_group_rule.allow_self" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSecurityGroupRule_Ingress_Source_with_AccountId(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSecurityGroupRuleExists("aws_security_group.web", &group), + resource.TestCheckResourceAttrPair( + ruleName, "security_group_id", "aws_security_group.web", "id"), + resource.TestMatchResourceAttr( + ruleName, "source_security_group_id", regexp.MustCompile("^[0-9]{12}/sg-[0-9a-z]{17}$")), + resource.TestCheckResourceAttr( + ruleName, "description", "some description"), + resource.TestCheckResourceAttr( + ruleName, "from_port", "0"), + resource.TestCheckResourceAttr( + ruleName, "to_port", "0"), + resource.TestCheckResourceAttr( + ruleName, "protocol", "-1"), + ), + }, + }, + }) +} + func TestAccAWSSecurityGroupRule_Ingress_Protocol(t *testing.T) { var group ec2.SecurityGroup @@ -2046,6 +2080,36 @@ resource "aws_security_group_rule" "allow_self" { `, rInt) } +func testAccAWSSecurityGroupRule_Ingress_Source_with_AccountId(rInt int) string { + return fmt.Sprintf(` +data "aws_caller_identity" "current" {} + +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + + tags = { + Name = "terraform-testacc-security-group-rule-self-ingress" + } +} + +resource "aws_security_group" "web" { + name = "allow_all-%d" + description = "Allow all inbound traffic" + vpc_id = "${aws_vpc.foo.id}" +} + +resource "aws_security_group_rule" "allow_self" { + type = "ingress" + from_port = 0 + to_port = 0 + protocol = "-1" + description = "some description" + security_group_id = "${aws_security_group.web.id}" + source_security_group_id = "${data.aws_caller_identity.current.account_id}/${aws_security_group.web.id}" +} +`, rInt) +} + func testAccAWSSecurityGroupRuleExpectInvalidType(rInt int) string { return fmt.Sprintf(` resource "aws_vpc" "foo" { diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index 46590a92014..9898f784a70 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -681,17 +681,18 @@ func TestAccAWSSecurityGroup_basic(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfig, Check: resource.ComposeTestCheckFunc( testAccCheckAWSSecurityGroupExists(resourceName, &group), testAccCheckAWSSecurityGroupAttributes(&group), - resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:ec2:[^:]+:[^:]+:security-group/.+$`)), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`security-group/.+$`)), resource.TestCheckResourceAttr(resourceName, "name", "terraform_acceptance_test_example"), resource.TestCheckResourceAttr(resourceName, "description", "Used in the terraform acceptance tests"), resource.TestCheckResourceAttr(resourceName, "egress.#", "0"), @@ -807,9 +808,10 @@ func TestAccAWSSecurityGroup_ruleGathering(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfig_ruleGathering(sgName), @@ -1041,10 +1043,11 @@ func TestAccAWSSecurityGroup_ipv6(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigIpv6, @@ -1130,10 +1133,11 @@ func TestAccAWSSecurityGroup_self(t *testing.T) { } resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigSelf, @@ -1164,10 +1168,11 @@ func TestAccAWSSecurityGroup_vpc(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigVpc, @@ -1217,10 +1222,11 @@ func TestAccAWSSecurityGroup_vpcNegOneIngress(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigVpcNegOneIngress, @@ -1259,10 +1265,11 @@ func TestAccAWSSecurityGroup_vpcProtoNumIngress(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigVpcProtoNumIngress, @@ -1361,10 +1368,11 @@ func TestAccAWSSecurityGroup_ruleDescription(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: resourceName, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigRuleDescription("Egress description", "Ingress description"), @@ -1547,9 +1555,10 @@ func TestAccAWSSecurityGroup_drift(t *testing.T) { var group ec2.SecurityGroup resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfig_drift(), @@ -1594,9 +1603,10 @@ func TestAccAWSSecurityGroup_driftComplex(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfig_drift_complex(), @@ -1751,9 +1761,10 @@ func TestAccAWSSecurityGroup_ingressWithCidrAndSGsVPC(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfig_ingressWithCidrAndSGs, @@ -1803,9 +1814,10 @@ func TestAccAWSSecurityGroup_ingressWithCidrAndSGsClassic(t *testing.T) { defer os.Setenv("AWS_DEFAULT_REGION", oldvar) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfig_ingressWithCidrAndSGs_classic, @@ -1899,9 +1911,10 @@ func TestAccAWSSecurityGroup_ipv4andipv6Egress(t *testing.T) { resourceName := "aws_security_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSecurityGroupConfigIpv4andIpv6Egress, diff --git a/aws/resource_aws_securityhub_member.go b/aws/resource_aws_securityhub_member.go new file mode 100644 index 00000000000..6eaaec33739 --- /dev/null +++ b/aws/resource_aws_securityhub_member.go @@ -0,0 +1,158 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" +) + +const ( + SecurityHubMemberStatusCreated = "Created" + SecurityHubMemberStatusInvited = "Invited" + SecurityHubMemberStatusAssociated = "Associated" + SecurityHubMemberStatusResigned = "Resigned" + SecurityHubMemberStatusRemoved = "Removed" +) + +func resourceAwsSecurityHubMember() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecurityHubMemberCreate, + Read: resourceAwsSecurityHubMemberRead, + Delete: resourceAwsSecurityHubMemberDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "email": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "invite": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "master_id": { + Type: schema.TypeString, + Computed: true, + }, + "member_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsSecurityHubMemberCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Printf("[DEBUG] Creating Security Hub member %s", d.Get("account_id").(string)) + + resp, err := conn.CreateMembers(&securityhub.CreateMembersInput{ + AccountDetails: []*securityhub.AccountDetails{ + { + AccountId: aws.String(d.Get("account_id").(string)), + Email: aws.String(d.Get("email").(string)), + }, + }, + }) + + if err != nil { + return fmt.Errorf("Error creating Security Hub member %s: %s", d.Get("account_id").(string), err) + } + + if len(resp.UnprocessedAccounts) > 0 { + return fmt.Errorf("Error creating Security Hub member %s: UnprocessedAccounts is not empty", d.Get("account_id").(string)) + } + + d.SetId(d.Get("account_id").(string)) + + if d.Get("invite").(bool) { + log.Printf("[INFO] Inviting Security Hub member %s", d.Id()) + iresp, err := conn.InviteMembers(&securityhub.InviteMembersInput{ + AccountIds: []*string{aws.String(d.Get("account_id").(string))}, + }) + + if err != nil { + return fmt.Errorf("Error inviting Security Hub member %s: %s", d.Id(), err) + } + + if len(iresp.UnprocessedAccounts) > 0 { + return fmt.Errorf("Error inviting Security Hub member %s: UnprocessedAccounts is not empty", d.Id()) + } + } + + return resourceAwsSecurityHubMemberRead(d, meta) +} + +func resourceAwsSecurityHubMemberRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + + log.Printf("[DEBUG] Reading Security Hub member %s", d.Id()) + resp, err := conn.GetMembers(&securityhub.GetMembersInput{ + AccountIds: []*string{aws.String(d.Id())}, + }) + + if err != nil { + if isAWSErr(err, securityhub.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Security Hub member (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if len(resp.Members) == 0 { + log.Printf("[WARN] Security Hub member (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + member := resp.Members[0] + + d.Set("account_id", member.AccountId) + d.Set("email", member.Email) + d.Set("master_id", member.MasterId) + + status := aws.StringValue(member.MemberStatus) + d.Set("member_status", status) + + invited := status == SecurityHubMemberStatusInvited || status == SecurityHubMemberStatusAssociated || status == SecurityHubMemberStatusResigned + d.Set("invite", invited) + + return nil +} + +func resourceAwsSecurityHubMemberDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Printf("[DEBUG] Deleting Security Hub member: %s", d.Id()) + + resp, err := conn.DeleteMembers(&securityhub.DeleteMembersInput{ + AccountIds: []*string{aws.String(d.Id())}, + }) + + if err != nil { + if isAWSErr(err, securityhub.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Security Hub member (%s) not found", d.Id()) + return nil + } + return fmt.Errorf("Error deleting Security Hub member %s: %s", d.Id(), err) + } + + if len(resp.UnprocessedAccounts) > 0 { + return fmt.Errorf("Error deleting Security Hub member %s: UnprocessedAccounts is not empty", d.Get("account_id").(string)) + } + + return nil +} diff --git a/aws/resource_aws_securityhub_member_test.go b/aws/resource_aws_securityhub_member_test.go new file mode 100644 index 00000000000..82f5672ab19 --- /dev/null +++ b/aws/resource_aws_securityhub_member_test.go @@ -0,0 +1,142 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func testAccAWSSecurityHubMember_basic(t *testing.T) { + var member securityhub.Member + resourceName := "aws_securityhub_member.example" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityHubMemberDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSecurityHubMemberConfig_basic("111111111111", "example@example.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSecurityHubMemberExists(resourceName, &member), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccAWSSecurityHubMember_invite(t *testing.T) { + var member securityhub.Member + resourceName := "aws_securityhub_member.example" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityHubMemberDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSecurityHubMemberConfig_invite("111111111111", "example@example.com", true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSecurityHubMemberExists(resourceName, &member), + resource.TestCheckResourceAttr(resourceName, "member_status", "Invited"), + resource.TestCheckResourceAttr(resourceName, "invite", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSSecurityHubMemberExists(n string, member *securityhub.Member) 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).securityhubconn + + resp, err := conn.GetMembers(&securityhub.GetMembersInput{ + AccountIds: []*string{aws.String(rs.Primary.ID)}, + }) + + if err != nil { + return err + } + + if len(resp.Members) == 0 { + return fmt.Errorf("Security Hub member %s not found", rs.Primary.ID) + } + + member = resp.Members[0] + + return nil + } +} + +func testAccCheckAWSSecurityHubMemberDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).securityhubconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_securityhub_member" { + continue + } + + resp, err := conn.GetMembers(&securityhub.GetMembersInput{ + AccountIds: []*string{aws.String(rs.Primary.ID)}, + }) + + if err != nil { + if isAWSErr(err, securityhub.ErrCodeResourceNotFoundException, "") { + return nil + } + return err + } + + if len(resp.Members) != 0 { + return fmt.Errorf("Security Hub member still exists") + } + + return nil + } + + return nil +} + +func testAccAWSSecurityHubMemberConfig_basic(accountId, email string) string { + return fmt.Sprintf(` +resource "aws_securityhub_account" "example" {} + +resource "aws_securityhub_member" "example" { + depends_on = ["aws_securityhub_account.example"] + account_id = "%s" + email = "%s" +} +`, accountId, email) +} + +func testAccAWSSecurityHubMemberConfig_invite(accountId, email string, invite bool) string { + return fmt.Sprintf(` +resource "aws_securityhub_account" "example" {} + +resource "aws_securityhub_member" "example" { + depends_on = ["aws_securityhub_account.example"] + account_id = "%s" + email = "%s" + invite = %t +} +`, accountId, email, invite) +} diff --git a/aws/resource_aws_securityhub_test.go b/aws/resource_aws_securityhub_test.go index a00828248a5..a6151c71392 100644 --- a/aws/resource_aws_securityhub_test.go +++ b/aws/resource_aws_securityhub_test.go @@ -9,6 +9,10 @@ func TestAccAWSSecurityHub(t *testing.T) { "Account": { "basic": testAccAWSSecurityHubAccount_basic, }, + "Member": { + "basic": testAccAWSSecurityHubMember_basic, + "invite": testAccAWSSecurityHubMember_invite, + }, "ProductSubscription": { "basic": testAccAWSSecurityHubProductSubscription_basic, }, diff --git a/aws/resource_aws_service_discovery_http_namespace.go b/aws/resource_aws_service_discovery_http_namespace.go index c83dcdb0398..29b0e6f4bea 100644 --- a/aws/resource_aws_service_discovery_http_namespace.go +++ b/aws/resource_aws_service_discovery_http_namespace.go @@ -2,12 +2,12 @@ package aws import ( "fmt" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) func resourceAwsServiceDiscoveryHttpNamespace() *schema.Resource { @@ -54,24 +54,34 @@ func resourceAwsServiceDiscoveryHttpNamespaceCreate(d *schema.ResourceData, meta input.Description = aws.String(v.(string)) } - resp, err := conn.CreateHttpNamespace(input) + output, err := conn.CreateHttpNamespace(input) + if err != nil { - return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): %s", name, err) + return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): %w", name, err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, + if output == nil || output.OperationId == nil { + return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): creation response missing Operation ID", name) } - opresp, err := stateConf.WaitForState() + operationOutput, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)) + if err != nil { - return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) creation: %s", name, err) + return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) creation: %w", name, err) } - d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) + if operationOutput == nil || operationOutput.Operation == nil { + return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): operation response missing Operation information", name) + } + + namespaceID, ok := operationOutput.Operation.Targets[servicediscovery.OperationTargetTypeNamespace] + + if !ok { + return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): operation response missing Namespace ID", name) + } + + d.SetId(aws.StringValue(namespaceID)) + return resourceAwsServiceDiscoveryHttpNamespaceRead(d, meta) } @@ -105,25 +115,20 @@ func resourceAwsServiceDiscoveryHttpNamespaceDelete(d *schema.ResourceData, meta Id: aws.String(d.Id()), } - resp, err := conn.DeleteNamespace(input) - if err != nil { - if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { - d.SetId("") - return nil - } - return fmt.Errorf("error deleting Service Discovery HTTP Namespace (%s): %s", d.Id(), err) - } + output, err := conn.DeleteNamespace(input) - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, + if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { + return nil } - _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) deletion: %s", d.Id(), err) + return fmt.Errorf("error deleting Service Discovery HTTP Namespace (%s): %w", d.Id(), err) + } + + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) deletion: %w", d.Id(), err) + } } return nil diff --git a/aws/resource_aws_service_discovery_http_namespace_test.go b/aws/resource_aws_service_discovery_http_namespace_test.go index 242a89151d4..771471f522f 100644 --- a/aws/resource_aws_service_discovery_http_namespace_test.go +++ b/aws/resource_aws_service_discovery_http_namespace_test.go @@ -2,15 +2,96 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) +func init() { + resource.AddTestSweepers("aws_service_discovery_http_namespace", &resource.Sweeper{ + Name: "aws_service_discovery_http_namespace", + F: testSweepServiceDiscoveryHttpNamespaces, + Dependencies: []string{ + "aws_service_discovery_service", + }, + }) +} + +func testSweepServiceDiscoveryHttpNamespaces(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).sdconn + var sweeperErrs *multierror.Error + + input := &servicediscovery.ListNamespacesInput{ + Filters: []*servicediscovery.NamespaceFilter{ + { + Condition: aws.String(servicediscovery.FilterConditionEq), + Name: aws.String(servicediscovery.NamespaceFilterNameType), + Values: aws.StringSlice([]string{servicediscovery.NamespaceTypeHttp}), + }, + }, + } + + err = conn.ListNamespacesPages(input, func(page *servicediscovery.ListNamespacesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, namespace := range page.Namespaces { + if namespace == nil { + continue + } + + id := aws.StringValue(namespace.Id) + input := &servicediscovery.DeleteNamespaceInput{ + Id: namespace.Id, + } + + log.Printf("[INFO] Deleting Service Discovery HTTP Namespace: %s", id) + output, err := conn.DeleteNamespace(input) + + if err != nil { + sweeperErr := fmt.Errorf("error deleting Service Discovery HTTP Namespace (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + sweeperErr := fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) deletion: %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + } + + return !isLast + }) + + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Service Discovery HTTP Namespaces sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Service Discovery HTTP Namespaces: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSServiceDiscoveryHttpNamespace_basic(t *testing.T) { resourceName := "aws_service_discovery_http_namespace.test" rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandStringFromCharSet(8, acctest.CharSetAlpha)) diff --git a/aws/resource_aws_service_discovery_private_dns_namespace.go b/aws/resource_aws_service_discovery_private_dns_namespace.go index 52da5e4907b..c04567287ab 100644 --- a/aws/resource_aws_service_discovery_private_dns_namespace.go +++ b/aws/resource_aws_service_discovery_private_dns_namespace.go @@ -1,12 +1,14 @@ package aws import ( - "time" + "fmt" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) func resourceAwsServiceDiscoveryPrivateDnsNamespace() *schema.Resource { @@ -14,6 +16,17 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespace() *schema.Resource { Create: resourceAwsServiceDiscoveryPrivateDnsNamespaceCreate, Read: resourceAwsServiceDiscoveryPrivateDnsNamespaceRead, Delete: resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("Unexpected format of ID (%q), expected NAMESPACE_ID:VPC_ID", d.Id()) + } + d.SetId(idParts[0]) + d.Set("vpc", idParts[1]) + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "name": { @@ -65,24 +78,34 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespaceCreate(d *schema.ResourceData input.Description = aws.String(v.(string)) } - resp, err := conn.CreatePrivateDnsNamespace(input) + output, err := conn.CreatePrivateDnsNamespace(input) + if err != nil { - return err + return fmt.Errorf("error creating Service Discovery Private DNS Namespace (%s): %w", name, err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, + if output == nil || output.OperationId == nil { + return fmt.Errorf("error creating Service Discovery Private DNS Namespace (%s): creation response missing Operation ID", name) } - opresp, err := stateConf.WaitForState() + operationOutput, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)) + if err != nil { - return err + return fmt.Errorf("error waiting for Service Discovery Private DNS Namespace (%s) creation: %w", name, err) + } + + if operationOutput == nil || operationOutput.Operation == nil { + return fmt.Errorf("error creating Service Discovery Private DNS Namespace (%s): operation response missing Operation information", name) } - d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) + namespaceID, ok := operationOutput.Operation.Targets[servicediscovery.OperationTargetTypeNamespace] + + if !ok { + return fmt.Errorf("error creating Service Discovery Private DNS Namespace (%s): operation response missing Namespace ID", name) + } + + d.SetId(aws.StringValue(namespaceID)) + return resourceAwsServiceDiscoveryPrivateDnsNamespaceRead(d, meta) } @@ -104,6 +127,7 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespaceRead(d *schema.ResourceData, d.Set("description", resp.Namespace.Description) d.Set("arn", resp.Namespace.Arn) + d.Set("name", resp.Namespace.Name) if resp.Namespace.Properties != nil { d.Set("hosted_zone", resp.Namespace.Properties.DnsProperties.HostedZoneId) } @@ -117,18 +141,17 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete(d *schema.ResourceData Id: aws.String(d.Id()), } - resp, err := conn.DeleteNamespace(input) + output, err := conn.DeleteNamespace(input) + if err != nil { - return err + return fmt.Errorf("error deleting Service Discovery Private DNS Namespace (%s): %w", d.Id(), err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + return fmt.Errorf("error waiting for Service Discovery Private DNS Namespace (%s) deletion: %w", d.Id(), err) + } } - _, err = stateConf.WaitForState() - return err + return nil } diff --git a/aws/resource_aws_service_discovery_private_dns_namespace_test.go b/aws/resource_aws_service_discovery_private_dns_namespace_test.go index 18364ebca65..13b36491dee 100644 --- a/aws/resource_aws_service_discovery_private_dns_namespace_test.go +++ b/aws/resource_aws_service_discovery_private_dns_namespace_test.go @@ -2,16 +2,97 @@ package aws import ( "fmt" + "log" "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) +func init() { + resource.AddTestSweepers("aws_service_discovery_private_dns_namespace", &resource.Sweeper{ + Name: "aws_service_discovery_private_dns_namespace", + F: testSweepServiceDiscoveryPrivateDnsNamespaces, + Dependencies: []string{ + "aws_service_discovery_service", + }, + }) +} + +func testSweepServiceDiscoveryPrivateDnsNamespaces(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).sdconn + var sweeperErrs *multierror.Error + + input := &servicediscovery.ListNamespacesInput{ + Filters: []*servicediscovery.NamespaceFilter{ + { + Condition: aws.String(servicediscovery.FilterConditionEq), + Name: aws.String(servicediscovery.NamespaceFilterNameType), + Values: aws.StringSlice([]string{servicediscovery.NamespaceTypeDnsPrivate}), + }, + }, + } + + err = conn.ListNamespacesPages(input, func(page *servicediscovery.ListNamespacesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, namespace := range page.Namespaces { + if namespace == nil { + continue + } + + id := aws.StringValue(namespace.Id) + input := &servicediscovery.DeleteNamespaceInput{ + Id: namespace.Id, + } + + log.Printf("[INFO] Deleting Service Discovery Private DNS Namespace: %s", id) + output, err := conn.DeleteNamespace(input) + + if err != nil { + sweeperErr := fmt.Errorf("error deleting Service Discovery Private DNS Namespace (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + sweeperErr := fmt.Errorf("error waiting for Service Discovery Private DNS Namespace (%s) deletion: %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + } + + return !isLast + }) + + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Service Discovery Private DNS Namespaces sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Service Discovery Private DNS Namespaces: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic(t *testing.T) { rName := acctest.RandString(5) + ".example.com" @@ -28,6 +109,12 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic(t *testing.T) { resource.TestCheckResourceAttrSet("aws_service_discovery_private_dns_namespace.test", "hosted_zone"), ), }, + { + ResourceName: "aws_service_discovery_private_dns_namespace.test", + ImportState: true, + ImportStateIdFunc: testAccServiceDiscoveryPrivateDnsNamespaceImportStateIdFunc("aws_service_discovery_private_dns_namespace.test"), + ImportStateVerify: true, + }, }, }) } @@ -48,6 +135,12 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_longname(t *testing.T) { resource.TestCheckResourceAttrSet("aws_service_discovery_private_dns_namespace.test", "hosted_zone"), ), }, + { + ResourceName: "aws_service_discovery_private_dns_namespace.test", + ImportState: true, + ImportStateIdFunc: testAccServiceDiscoveryPrivateDnsNamespaceImportStateIdFunc("aws_service_discovery_private_dns_namespace.test"), + ImportStateVerify: true, + }, }, }) } @@ -65,7 +158,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccServiceDiscoveryPrivateDnsNamespaceConfigOverlapping(rName), - ExpectError: regexp.MustCompile(`overlapping name space`), + ExpectError: regexp.MustCompile(`ConflictingDomainExists`), }, }, }) @@ -161,3 +254,13 @@ resource "aws_service_discovery_private_dns_namespace" "subdomain" { } `, topDomain) } + +func testAccServiceDiscoveryPrivateDnsNamespaceImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + return fmt.Sprintf("%s:%s", rs.Primary.ID, rs.Primary.Attributes["vpc"]), nil + } +} diff --git a/aws/resource_aws_service_discovery_public_dns_namespace.go b/aws/resource_aws_service_discovery_public_dns_namespace.go index 7aa649ed036..7536c3b73b1 100644 --- a/aws/resource_aws_service_discovery_public_dns_namespace.go +++ b/aws/resource_aws_service_discovery_public_dns_namespace.go @@ -2,12 +2,12 @@ package aws import ( "fmt" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) func resourceAwsServiceDiscoveryPublicDnsNamespace() *schema.Resource { @@ -64,24 +64,34 @@ func resourceAwsServiceDiscoveryPublicDnsNamespaceCreate(d *schema.ResourceData, input.Description = aws.String(v.(string)) } - resp, err := conn.CreatePublicDnsNamespace(input) + output, err := conn.CreatePublicDnsNamespace(input) + if err != nil { - return err + return fmt.Errorf("error creating Service Discovery Public DNS Namespace (%s): %w", name, err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, + if output == nil || output.OperationId == nil { + return fmt.Errorf("error creating Service Discovery Public DNS Namespace (%s): creation response missing Operation ID", name) } - opresp, err := stateConf.WaitForState() + operationOutput, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)) + if err != nil { - return err + return fmt.Errorf("error waiting for Service Discovery Public DNS Namespace (%s) creation: %w", name, err) + } + + if operationOutput == nil || operationOutput.Operation == nil { + return fmt.Errorf("error creating Service Discovery Public DNS Namespace (%s): operation response missing Operation information", name) } - d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) + namespaceID, ok := operationOutput.Operation.Targets[servicediscovery.OperationTargetTypeNamespace] + + if !ok { + return fmt.Errorf("error creating Service Discovery Public DNS Namespace (%s): operation response missing Namespace ID", name) + } + + d.SetId(aws.StringValue(namespaceID)) + return resourceAwsServiceDiscoveryPublicDnsNamespaceRead(d, meta) } @@ -117,42 +127,17 @@ func resourceAwsServiceDiscoveryPublicDnsNamespaceDelete(d *schema.ResourceData, Id: aws.String(d.Id()), } - resp, err := conn.DeleteNamespace(input) - if err != nil { - return err - } + output, err := conn.DeleteNamespace(input) - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, + if err != nil { + return fmt.Errorf("error deleting Service Discovery Public DNS Namespace (%s): %w", d.Id(), err) } - _, err = stateConf.WaitForState() - return err -} - -func servicediscoveryOperationRefreshStatusFunc(conn *servicediscovery.ServiceDiscovery, oid string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - input := &servicediscovery.GetOperationInput{ - OperationId: aws.String(oid), - } - resp, err := conn.GetOperation(input) - - if err != nil { - return nil, servicediscovery.OperationStatusFail, err + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + return fmt.Errorf("error waiting for Service Discovery Public DNS Namespace (%s) deletion: %w", d.Id(), err) } - - // Error messages can also be contained in the response with FAIL status - // "ErrorCode":"CANNOT_CREATE_HOSTED_ZONE", - // "ErrorMessage":"The VPC that you chose, vpc-xxx in region xxx, is already associated with another private hosted zone that has an overlapping name space, xxx.. (Service: AmazonRoute53; Status Code: 400; Error Code: ConflictingDomainExists; Request ID: xxx)" - // "Status":"FAIL", - - if aws.StringValue(resp.Operation.Status) == servicediscovery.OperationStatusFail { - return resp, servicediscovery.OperationStatusFail, fmt.Errorf("%s: %s", aws.StringValue(resp.Operation.ErrorCode), aws.StringValue(resp.Operation.ErrorMessage)) - } - - return resp, aws.StringValue(resp.Operation.Status), nil } + + return nil } diff --git a/aws/resource_aws_service_discovery_public_dns_namespace_test.go b/aws/resource_aws_service_discovery_public_dns_namespace_test.go index dfbfae7ee0a..424aef4a63c 100644 --- a/aws/resource_aws_service_discovery_public_dns_namespace_test.go +++ b/aws/resource_aws_service_discovery_public_dns_namespace_test.go @@ -2,15 +2,96 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) +func init() { + resource.AddTestSweepers("aws_service_discovery_public_dns_namespace", &resource.Sweeper{ + Name: "aws_service_discovery_public_dns_namespace", + F: testSweepServiceDiscoveryPublicDnsNamespaces, + Dependencies: []string{ + "aws_service_discovery_service", + }, + }) +} + +func testSweepServiceDiscoveryPublicDnsNamespaces(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).sdconn + var sweeperErrs *multierror.Error + + input := &servicediscovery.ListNamespacesInput{ + Filters: []*servicediscovery.NamespaceFilter{ + { + Condition: aws.String(servicediscovery.FilterConditionEq), + Name: aws.String(servicediscovery.NamespaceFilterNameType), + Values: aws.StringSlice([]string{servicediscovery.NamespaceTypeDnsPublic}), + }, + }, + } + + err = conn.ListNamespacesPages(input, func(page *servicediscovery.ListNamespacesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, namespace := range page.Namespaces { + if namespace == nil { + continue + } + + id := aws.StringValue(namespace.Id) + input := &servicediscovery.DeleteNamespaceInput{ + Id: namespace.Id, + } + + log.Printf("[INFO] Deleting Service Discovery Public DNS Namespace: %s", id) + output, err := conn.DeleteNamespace(input) + + if err != nil { + sweeperErr := fmt.Errorf("error deleting Service Discovery Public DNS Namespace (%s): %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + sweeperErr := fmt.Errorf("error waiting for Service Discovery Public DNS Namespace (%s) deletion: %w", id, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + } + + return !isLast + }) + + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Service Discovery Public DNS Namespaces sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Service Discovery Public DNS Namespaces: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSServiceDiscoveryPublicDnsNamespace_basic(t *testing.T) { resourceName := "aws_service_discovery_public_dns_namespace.test" rName := acctest.RandStringFromCharSet(5, acctest.CharSetAlpha) + ".terraformtesting.com" diff --git a/aws/resource_aws_service_discovery_service.go b/aws/resource_aws_service_discovery_service.go index 70812c95a09..a898663dbcd 100644 --- a/aws/resource_aws_service_discovery_service.go +++ b/aws/resource_aws_service_discovery_service.go @@ -1,14 +1,14 @@ package aws import ( + "fmt" "log" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter" ) func resourceAwsServiceDiscoveryService() *schema.Resource { @@ -225,23 +225,16 @@ func resourceAwsServiceDiscoveryServiceUpdate(d *schema.ResourceData, meta inter input.Service = sc - resp, err := conn.UpdateService(input) - if err != nil { - return err - } + output, err := conn.UpdateService(input) - stateConf := &resource.StateChangeConf{ - Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, - Target: []string{servicediscovery.OperationStatusSuccess}, - Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), - Timeout: 5 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, + if err != nil { + return fmt.Errorf("error updating Service Discovery Service (%s): %w", d.Id(), err) } - _, err = stateConf.WaitForState() - if err != nil { - return err + if output != nil && output.OperationId != nil { + if _, err := waiter.OperationSuccess(conn, aws.StringValue(output.OperationId)); err != nil { + return fmt.Errorf("error waiting for Service Discovery Service (%s) update: %w", d.Id(), err) + } } return resourceAwsServiceDiscoveryServiceRead(d, meta) @@ -255,7 +248,16 @@ func resourceAwsServiceDiscoveryServiceDelete(d *schema.ResourceData, meta inter } _, err := conn.DeleteService(input) - return err + + if isAWSErr(err, servicediscovery.ErrCodeServiceNotFound, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Service Discovery Service (%s): %w", d.Id(), err) + } + + return nil } func expandServiceDiscoveryDnsConfig(configured map[string]interface{}) *servicediscovery.DnsConfig { diff --git a/aws/resource_aws_service_discovery_service_test.go b/aws/resource_aws_service_discovery_service_test.go index 79792dc1012..024f04aa654 100644 --- a/aws/resource_aws_service_discovery_service_test.go +++ b/aws/resource_aws_service_discovery_service_test.go @@ -2,15 +2,116 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_service_discovery_service", &resource.Sweeper{ + Name: "aws_service_discovery_service", + F: testSweepServiceDiscoveryServices, + }) +} + +func testSweepServiceDiscoveryServices(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).sdconn + var sweeperErrs *multierror.Error + + input := &servicediscovery.ListServicesInput{} + + err = conn.ListServicesPages(input, func(page *servicediscovery.ListServicesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, service := range page.Services { + if service == nil { + continue + } + + serviceID := aws.StringValue(service.Id) + input := &servicediscovery.DeleteServiceInput{ + Id: service.Id, + } + + if aws.Int64Value(service.InstanceCount) > 0 { + input := &servicediscovery.ListInstancesInput{} + + err := conn.ListInstancesPages(input, func(page *servicediscovery.ListInstancesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, instance := range page.Instances { + if instance == nil { + continue + } + + instanceID := aws.StringValue(instance.Id) + input := &servicediscovery.DeregisterInstanceInput{ + InstanceId: instance.Id, + ServiceId: service.Id, + } + + log.Printf("[INFO] Deregistering Service Discovery Service (%s) Instance: %s", serviceID, instanceID) + _, err := conn.DeregisterInstance(input) + + if err != nil { + sweeperErr := fmt.Errorf("error deregistering Service Discovery Service (%s) Instance (%s): %w", serviceID, instanceID, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + + if err != nil { + sweeperErr := fmt.Errorf("error listing Service Discovery Service (%s) Instances: %w", serviceID, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + log.Printf("[INFO] Deleting Service Discovery Service: %s", serviceID) + _, err := conn.DeleteService(input) + + if err != nil { + sweeperErr := fmt.Errorf("error deleting Service Discovery Service (%s): %w", serviceID, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Service Discovery Services sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving Service Discovery Services: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSServiceDiscoveryService_private(t *testing.T) { resourceName := "aws_service_discovery_service.test" rName := acctest.RandString(5) diff --git a/aws/resource_aws_servicecatalog_portfolio.go b/aws/resource_aws_servicecatalog_portfolio.go index 95e34a8edd5..71348415293 100644 --- a/aws/resource_aws_servicecatalog_portfolio.go +++ b/aws/resource_aws_servicecatalog_portfolio.go @@ -89,6 +89,8 @@ func resourceAwsServiceCatalogPortfolioCreate(d *schema.ResourceData, meta inter func resourceAwsServiceCatalogPortfolioRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).scconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + input := servicecatalog.DescribePortfolioInput{ AcceptLanguage: aws.String("en"), } @@ -113,7 +115,7 @@ func resourceAwsServiceCatalogPortfolioRead(d *schema.ResourceData, meta interfa d.Set("name", portfolioDetail.DisplayName) d.Set("provider_name", portfolioDetail.ProviderName) - if err := d.Set("tags", keyvaluetags.ServicecatalogKeyValueTags(resp.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.ServicecatalogKeyValueTags(resp.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ses_active_receipt_rule_set.go b/aws/resource_aws_ses_active_receipt_rule_set.go index a06faa8b988..e44b526469a 100644 --- a/aws/resource_aws_ses_active_receipt_rule_set.go +++ b/aws/resource_aws_ses_active_receipt_rule_set.go @@ -51,6 +51,11 @@ func resourceAwsSesActiveReceiptRuleSetRead(d *schema.ResourceData, meta interfa response, err := conn.DescribeActiveReceiptRuleSet(describeOpts) if err != nil { + if isAWSErr(err, ses.ErrCodeRuleSetDoesNotExistException, "") { + log.Printf("[WARN] SES Receipt Rule Set (%s) belonging to SES Active Receipt Rule Set not found, removing from state", d.Id()) + d.SetId("") + return nil + } return err } diff --git a/aws/resource_aws_ses_active_receipt_rule_set_test.go b/aws/resource_aws_ses_active_receipt_rule_set_test.go index 5beecdef39a..370478dd89a 100644 --- a/aws/resource_aws_ses_active_receipt_rule_set_test.go +++ b/aws/resource_aws_ses_active_receipt_rule_set_test.go @@ -2,6 +2,8 @@ package aws import ( "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "testing" "github.com/aws/aws-sdk-go/service/ses" @@ -10,6 +12,9 @@ import ( ) func TestAccAWSSESActiveReceiptRuleSet_basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ses_active_receipt_rule_set.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) @@ -19,15 +24,39 @@ func TestAccAWSSESActiveReceiptRuleSet_basic(t *testing.T) { CheckDestroy: testAccCheckSESActiveReceiptRuleSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSESActiveReceiptRuleSetConfig, + Config: testAccAWSSESActiveReceiptRuleSetConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsSESActiveReceiptRuleSetExists("aws_ses_active_receipt_rule_set.test"), + testAccCheckAwsSESActiveReceiptRuleSetExists(resourceName), ), }, }, }) } +func TestAccAWSSESActiveReceiptRuleSet_disappears(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ses_active_receipt_rule_set.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSSES(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckSESActiveReceiptRuleSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSESActiveReceiptRuleSetConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSESActiveReceiptRuleSetExists(resourceName), + testAccCheckResourceDisappears(testAccProvider, resourceAwsSesActiveReceiptRuleSet(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckSESActiveReceiptRuleSetDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).sesconn @@ -41,7 +70,7 @@ func testAccCheckSESActiveReceiptRuleSetDestroy(s *terraform.State) error { return err } - if response.Metadata != nil && *response.Metadata.Name == "test-receipt-rule" { + if response.Metadata != nil && (aws.StringValue(response.Metadata.Name) == rs.Primary.ID) { return fmt.Errorf("Active receipt rule set still exists") } @@ -69,20 +98,22 @@ func testAccCheckAwsSESActiveReceiptRuleSetExists(n string) resource.TestCheckFu return err } - if *response.Metadata.Name != "test-receipt-rule" { - return fmt.Errorf("The active receipt rule set (%s) was not set to test-receipt-rule", *response.Metadata.Name) + if response.Metadata != nil && (aws.StringValue(response.Metadata.Name) != rs.Primary.ID) { + return fmt.Errorf("The active receipt rule set (%s) was not set to %s", aws.StringValue(response.Metadata.Name), rs.Primary.ID) } return nil } } -const testAccAWSSESActiveReceiptRuleSetConfig = ` +func testAccAWSSESActiveReceiptRuleSetConfig(name string) string { + return fmt.Sprintf(` resource "aws_ses_receipt_rule_set" "test" { - rule_set_name = "test-receipt-rule" + rule_set_name = "%s" } resource "aws_ses_active_receipt_rule_set" "test" { - rule_set_name = "${aws_ses_receipt_rule_set.test.rule_set_name}" + rule_set_name = "${aws_ses_receipt_rule_set.test.rule_set_name}" +} +`, name) } -` diff --git a/aws/resource_aws_ses_configuration_set.go b/aws/resource_aws_ses_configuration_set.go index 3e2ed511aad..f040158464a 100644 --- a/aws/resource_aws_ses_configuration_set.go +++ b/aws/resource_aws_ses_configuration_set.go @@ -50,19 +50,24 @@ func resourceAwsSesConfigurationSetCreate(d *schema.ResourceData, meta interface } func resourceAwsSesConfigurationSetRead(d *schema.ResourceData, meta interface{}) error { - configurationSetExists, err := findConfigurationSet(d.Id(), nil, meta) + conn := meta.(*AWSClient).sesconn - if !configurationSetExists { - log.Printf("[WARN] SES Configuration Set (%s) not found", d.Id()) - d.SetId("") - return nil + configSetInput := &ses.DescribeConfigurationSetInput{ + ConfigurationSetName: aws.String(d.Id()), } + response, err := conn.DescribeConfigurationSet(configSetInput) + if err != nil { + if isAWSErr(err, ses.ErrCodeConfigurationSetDoesNotExistException, "") { + log.Printf("[WARN] SES Configuration Set (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } return err } - d.Set("name", d.Id()) + d.Set("name", aws.StringValue(response.ConfigurationSet.Name)) return nil } @@ -77,30 +82,3 @@ func resourceAwsSesConfigurationSetDelete(d *schema.ResourceData, meta interface return err } - -func findConfigurationSet(name string, token *string, meta interface{}) (bool, error) { - conn := meta.(*AWSClient).sesconn - - configurationSetExists := false - - listOpts := &ses.ListConfigurationSetsInput{ - NextToken: token, - } - - response, err := conn.ListConfigurationSets(listOpts) - for _, element := range response.ConfigurationSets { - if *element.Name == name { - configurationSetExists = true - } - } - - if err != nil && !configurationSetExists && response.NextToken != nil { - configurationSetExists, err = findConfigurationSet(name, response.NextToken, meta) - } - - if err != nil { - return false, err - } - - return configurationSetExists, nil -} diff --git a/aws/resource_aws_ses_configuration_set_test.go b/aws/resource_aws_ses_configuration_set_test.go index 1999f22bca6..f040c2c32a3 100644 --- a/aws/resource_aws_ses_configuration_set_test.go +++ b/aws/resource_aws_ses_configuration_set_test.go @@ -2,15 +2,74 @@ package aws import ( "fmt" + "log" "testing" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_ses_configuration_set", &resource.Sweeper{ + Name: "aws_ses_configuration_set", + F: testSweepSesConfigurationSets, + }) +} + +func testSweepSesConfigurationSets(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).sesconn + input := &ses.ListConfigurationSetsInput{} + var sweeperErrs *multierror.Error + + for { + output, err := conn.ListConfigurationSets(input) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping SES Configuration Sets sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving SES Configuration Sets: %w", err)) + return sweeperErrs + } + + for _, configurationSet := range output.ConfigurationSets { + name := aws.StringValue(configurationSet.Name) + + log.Printf("[INFO] Deleting SES Configuration Set: %s", name) + _, err := conn.DeleteConfigurationSet(&ses.DeleteConfigurationSetInput{ + ConfigurationSetName: aws.String(name), + }) + if isAWSErr(err, ses.ErrCodeConfigurationSetDoesNotExistException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting SES Configuration Set (%s): %w", name, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + if aws.StringValue(output.NextToken) == "" { + break + } + input.NextToken = output.NextToken + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSSESConfigurationSet_basic(t *testing.T) { + var escRandomInteger = acctest.RandInt() + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) @@ -20,7 +79,7 @@ func TestAccAWSSESConfigurationSet_basic(t *testing.T) { CheckDestroy: testAccCheckSESConfigurationSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSESConfigurationSetConfig, + Config: testAccAWSSESConfigurationSetConfig(escRandomInteger), Check: resource.ComposeTestCheckFunc( testAccCheckAwsSESConfigurationSetExists("aws_ses_configuration_set.test"), ), @@ -34,36 +93,6 @@ func TestAccAWSSESConfigurationSet_basic(t *testing.T) { }) } -func testAccCheckSESConfigurationSetDestroy(s *terraform.State) error { - conn := testAccProvider.Meta().(*AWSClient).sesconn - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_ses_configuration_set" { - continue - } - - response, err := conn.ListConfigurationSets(&ses.ListConfigurationSetsInput{}) - if err != nil { - return err - } - - found := false - for _, element := range response.ConfigurationSets { - if *element.Name == fmt.Sprintf("some-configuration-set-%d", escRandomInteger) { - found = true - } - } - - if found { - return fmt.Errorf("The configuration set still exists") - } - - } - - return nil - -} - func testAccCheckAwsSESConfigurationSetExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -77,29 +106,48 @@ func testAccCheckAwsSESConfigurationSetExists(n string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*AWSClient).sesconn - response, err := conn.ListConfigurationSets(&ses.ListConfigurationSetsInput{}) + response, err := conn.DescribeConfigurationSet(&ses.DescribeConfigurationSetInput{ + ConfigurationSetName: aws.String(rs.Primary.ID), + }) + if err != nil { return err } - found := false - for _, element := range response.ConfigurationSets { - if *element.Name == fmt.Sprintf("some-configuration-set-%d", escRandomInteger) { - found = true - } + if aws.StringValue(response.ConfigurationSet.Name) != rs.Primary.ID { + return fmt.Errorf("The configuration set was not created") } + return nil - if !found { - return fmt.Errorf("The configuration set was not created") + } +} + +func testAccCheckSESConfigurationSetDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).sesconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_ses_configuration_set" { + continue } - return nil + _, err := conn.DescribeConfigurationSet(&ses.DescribeConfigurationSetInput{ + ConfigurationSetName: aws.String(rs.Primary.ID), + }) + + if err != nil { + if isAWSErr(err, ses.ErrCodeConfigurationSetDoesNotExistException, "") { + return nil + } + return err + } } + return nil } -var escRandomInteger = acctest.RandInt() -var testAccAWSSESConfigurationSetConfig = fmt.Sprintf(` +func testAccAWSSESConfigurationSetConfig(escRandomInteger int) string { + return fmt.Sprintf(` resource "aws_ses_configuration_set" "test" { name = "some-configuration-set-%d" } `, escRandomInteger) +} diff --git a/aws/resource_aws_ses_domain_identity_test.go b/aws/resource_aws_ses_domain_identity_test.go index f7249b221d8..60c7991de10 100644 --- a/aws/resource_aws_ses_domain_identity_test.go +++ b/aws/resource_aws_ses_domain_identity_test.go @@ -2,17 +2,70 @@ package aws import ( "fmt" + "log" "strings" "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/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_ses_domain_identity", &resource.Sweeper{ + Name: "aws_ses_domain_identity", + F: func(region string) error { return testSweepSesIdentities(region, ses.IdentityTypeDomain) }, + }) +} + +func testSweepSesIdentities(region, identityType string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).sesconn + input := &ses.ListIdentitiesInput{ + IdentityType: aws.String(identityType), + } + var sweeperErrs *multierror.Error + + err = conn.ListIdentitiesPages(input, func(page *ses.ListIdentitiesOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, identity := range page.Identities { + identity := aws.StringValue(identity) + + log.Printf("[INFO] Deleting SES Identity: %s", identity) + _, err = conn.DeleteIdentity(&ses.DeleteIdentityInput{ + Identity: aws.String(identity), + }) + if err != nil { + sweeperErr := fmt.Errorf("error deleting SES Identity (%s): %w", identity, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping SES Identities sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving SES Identities: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSSESDomainIdentity_basic(t *testing.T) { domain := fmt.Sprintf( "%s.terraformtesting.com", diff --git a/aws/resource_aws_ses_email_identity_test.go b/aws/resource_aws_ses_email_identity_test.go index 7104cf1b26e..f7a37a5db2b 100644 --- a/aws/resource_aws_ses_email_identity_test.go +++ b/aws/resource_aws_ses_email_identity_test.go @@ -13,6 +13,13 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/terraform" ) +func init() { + resource.AddTestSweepers("aws_ses_email_identity", &resource.Sweeper{ + Name: "aws_ses_email_identity", + F: func(region string) error { return testSweepSesIdentities(region, ses.IdentityTypeEmailAddress) }, + }) +} + func TestAccAWSSESEmailIdentity_basic(t *testing.T) { email := fmt.Sprintf( "%s@terraformtesting.com", diff --git a/aws/resource_aws_ses_event_destination.go b/aws/resource_aws_ses_event_destination.go index e82c806f04c..4591175e3a9 100644 --- a/aws/resource_aws_ses_event_destination.go +++ b/aws/resource_aws_ses_event_destination.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ses" @@ -16,7 +17,7 @@ func resourceAwsSesEventDestination() *schema.Resource { Read: resourceAwsSesEventDestinationRead, Delete: resourceAwsSesEventDestinationDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsSesEventDestinationImport, }, Schema: map[string]*schema.Schema{ @@ -90,7 +91,7 @@ func resourceAwsSesEventDestination() *schema.Resource { }, "kinesis_destination": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, MaxItems: 1, @@ -111,7 +112,7 @@ func resourceAwsSesEventDestination() *schema.Resource { }, "sns_destination": { - Type: schema.TypeSet, + Type: schema.TypeList, MaxItems: 1, Optional: true, ForceNew: true, @@ -155,7 +156,7 @@ func resourceAwsSesEventDestinationCreate(d *schema.ResourceData, meta interface } if v, ok := d.GetOk("kinesis_destination"); ok { - destination := v.(*schema.Set).List() + destination := v.([]interface{}) kinesis := destination[0].(map[string]interface{}) createOpts.EventDestination.KinesisFirehoseDestination = &ses.KinesisFirehoseDestination{ @@ -166,7 +167,7 @@ func resourceAwsSesEventDestinationCreate(d *schema.ResourceData, meta interface } if v, ok := d.GetOk("sns_destination"); ok { - destination := v.(*schema.Set).List() + destination := v.([]interface{}) sns := destination[0].(map[string]interface{}) createOpts.EventDestination.SNSDestination = &ses.SNSDestination{ TopicARN: aws.String(sns["topic_arn"].(string)), @@ -186,6 +187,52 @@ func resourceAwsSesEventDestinationCreate(d *schema.ResourceData, meta interface } func resourceAwsSesEventDestinationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesconn + + configurationSetName := d.Get("configuration_set_name").(string) + input := &ses.DescribeConfigurationSetInput{ + ConfigurationSetAttributeNames: aws.StringSlice([]string{ses.ConfigurationSetAttributeEventDestinations}), + ConfigurationSetName: aws.String(configurationSetName), + } + + output, err := conn.DescribeConfigurationSet(input) + if isAWSErr(err, ses.ErrCodeConfigurationSetDoesNotExistException, "") { + log.Printf("[WARN] SES Configuration Set (%s) not found, removing from state", configurationSetName) + d.SetId("") + return nil + } + if err != nil { + return fmt.Errorf("error reading SES Configuration Set Event Destination (%s): %w", d.Id(), err) + } + + var thisEventDestination *ses.EventDestination + for _, eventDestination := range output.EventDestinations { + if aws.StringValue(eventDestination.Name) == d.Id() { + thisEventDestination = eventDestination + break + } + } + if thisEventDestination == nil { + log.Printf("[WARN] SES Configuration Set Event Destination (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("configuration_set_name", output.ConfigurationSet.Name) + d.Set("enabled", thisEventDestination.Enabled) + d.Set("name", thisEventDestination.Name) + if err := d.Set("cloudwatch_destination", flattenSesCloudWatchDestination(thisEventDestination.CloudWatchDestination)); err != nil { + return fmt.Errorf("error setting cloudwatch_destination: %w", err) + } + if err := d.Set("kinesis_destination", flattenSesKinesisFirehoseDestination(thisEventDestination.KinesisFirehoseDestination)); err != nil { + return fmt.Errorf("error setting kinesis_destination: %w", err) + } + if err := d.Set("matching_types", flattenStringSet(thisEventDestination.MatchingEventTypes)); err != nil { + return fmt.Errorf("error setting matching_types: %w", err) + } + if err := d.Set("sns_destination", flattenSesSnsDestination(thisEventDestination.SNSDestination)); err != nil { + return fmt.Errorf("error setting sns_destination: %w", err) + } return nil } @@ -202,6 +249,22 @@ func resourceAwsSesEventDestinationDelete(d *schema.ResourceData, meta interface return err } +func resourceAwsSesEventDestinationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + parts := strings.Split(d.Id(), "/") + if len(parts) != 2 { + return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'configuration-set-name/event-destination-name'", d.Id()) + } + + configurationSetName := parts[0] + eventDestinationName := parts[1] + log.Printf("[DEBUG] Importing SES event destination %s from configuration set %s", eventDestinationName, configurationSetName) + + d.SetId(eventDestinationName) + d.Set("configuration_set_name", configurationSetName) + + return []*schema.ResourceData{d}, nil +} + func generateCloudWatchDestination(v []interface{}) []*ses.CloudWatchDimensionConfiguration { b := make([]*ses.CloudWatchDimensionConfiguration, len(v)) @@ -217,3 +280,48 @@ func generateCloudWatchDestination(v []interface{}) []*ses.CloudWatchDimensionCo return b } + +func flattenSesCloudWatchDestination(destination *ses.CloudWatchDestination) []interface{} { + if destination == nil { + return []interface{}{} + } + + vDimensionConfigurations := []interface{}{} + + for _, dimensionConfiguration := range destination.DimensionConfigurations { + mDimensionConfiguration := map[string]interface{}{ + "default_value": aws.StringValue(dimensionConfiguration.DefaultDimensionValue), + "dimension_name": aws.StringValue(dimensionConfiguration.DimensionName), + "value_source": aws.StringValue(dimensionConfiguration.DimensionValueSource), + } + + vDimensionConfigurations = append(vDimensionConfigurations, mDimensionConfiguration) + } + + return vDimensionConfigurations +} + +func flattenSesKinesisFirehoseDestination(destination *ses.KinesisFirehoseDestination) []interface{} { + if destination == nil { + return []interface{}{} + } + + mDestination := map[string]interface{}{ + "role_arn": aws.StringValue(destination.IAMRoleARN), + "stream_arn": aws.StringValue(destination.DeliveryStreamARN), + } + + return []interface{}{mDestination} +} + +func flattenSesSnsDestination(destination *ses.SNSDestination) []interface{} { + if destination == nil { + return []interface{}{} + } + + mDestination := map[string]interface{}{ + "topic_arn": aws.StringValue(destination.TopicARN), + } + + return []interface{}{mDestination} +} diff --git a/aws/resource_aws_ses_event_destination_test.go b/aws/resource_aws_ses_event_destination_test.go index 877be95b087..8858d8de8a1 100644 --- a/aws/resource_aws_ses_event_destination_test.go +++ b/aws/resource_aws_ses_event_destination_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ses" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -11,17 +12,13 @@ import ( ) func TestAccAWSSESEventDestination_basic(t *testing.T) { - rString := acctest.RandString(8) - - bucketName := fmt.Sprintf("tf-acc-bucket-ses-event-dst-%s", rString) - roleName := fmt.Sprintf("tf_acc_role_ses_event_dst_%s", rString) - streamName := fmt.Sprintf("tf_acc_stream_ses_event_dst_%s", rString) - policyName := fmt.Sprintf("tf_acc_policy_ses_event_dst_%s", rString) - topicName := fmt.Sprintf("tf_acc_topic_ses_event_dst_%s", rString) - sesCfgSetName := fmt.Sprintf("tf_acc_cfg_ses_event_dst_%s", rString) - sesEventDstNameKinesis := fmt.Sprintf("tf_acc_event_dst_kinesis_%s", rString) - sesEventDstNameCw := fmt.Sprintf("tf_acc_event_dst_cloudwatch_%s", rString) - sesEventDstNameSns := fmt.Sprintf("tf_acc_event_dst_sns_%s", rString) + rName1 := acctest.RandomWithPrefix("tf-acc-test") + rName2 := acctest.RandomWithPrefix("tf-acc-test") + rName3 := acctest.RandomWithPrefix("tf-acc-test") + cloudwatchDestinationResourceName := "aws_ses_event_destination.cloudwatch" + kinesisDestinationResourceName := "aws_ses_event_destination.kinesis" + snsDestinationResourceName := "aws_ses_event_destination.sns" + var v1, v2, v3 ses.EventDestination resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { @@ -32,18 +29,67 @@ func TestAccAWSSESEventDestination_basic(t *testing.T) { CheckDestroy: testAccCheckSESEventDestinationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSESEventDestinationConfig(bucketName, roleName, streamName, policyName, topicName, - sesCfgSetName, sesEventDstNameKinesis, sesEventDstNameCw, sesEventDstNameSns), + Config: testAccAWSSESEventDestinationConfig(rName1, rName2, rName3), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsSESEventDestinationExists("aws_ses_configuration_set.test"), - resource.TestCheckResourceAttr( - "aws_ses_event_destination.kinesis", "name", sesEventDstNameKinesis), - resource.TestCheckResourceAttr( - "aws_ses_event_destination.cloudwatch", "name", sesEventDstNameCw), - resource.TestCheckResourceAttr( - "aws_ses_event_destination.sns", "name", sesEventDstNameSns), + testAccCheckAwsSESEventDestinationExists(cloudwatchDestinationResourceName, &v1), + testAccCheckAwsSESEventDestinationExists(kinesisDestinationResourceName, &v2), + testAccCheckAwsSESEventDestinationExists(snsDestinationResourceName, &v3), + resource.TestCheckResourceAttr(cloudwatchDestinationResourceName, "name", rName1), + resource.TestCheckResourceAttr(kinesisDestinationResourceName, "name", rName2), + resource.TestCheckResourceAttr(snsDestinationResourceName, "name", rName3), ), }, + { + ResourceName: cloudwatchDestinationResourceName, + ImportStateId: fmt.Sprintf("%s/%s", rName1, rName1), + ImportState: true, + ImportStateVerify: true, + }, + { + ResourceName: kinesisDestinationResourceName, + ImportStateId: fmt.Sprintf("%s/%s", rName1, rName2), + ImportState: true, + ImportStateVerify: true, + }, + { + ResourceName: snsDestinationResourceName, + ImportStateId: fmt.Sprintf("%s/%s", rName1, rName3), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSSESEventDestination_disappears(t *testing.T) { + rName1 := acctest.RandomWithPrefix("tf-acc-test") + rName2 := acctest.RandomWithPrefix("tf-acc-test") + rName3 := acctest.RandomWithPrefix("tf-acc-test") + cloudwatchDestinationResourceName := "aws_ses_event_destination.cloudwatch" + kinesisDestinationResourceName := "aws_ses_event_destination.kinesis" + snsDestinationResourceName := "aws_ses_event_destination.sns" + var v1, v2, v3 ses.EventDestination + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccPreCheckAWSSES(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckSESEventDestinationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSESEventDestinationConfig(rName1, rName2, rName3), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSESEventDestinationExists(cloudwatchDestinationResourceName, &v1), + testAccCheckAwsSESEventDestinationExists(kinesisDestinationResourceName, &v2), + testAccCheckAwsSESEventDestinationExists(snsDestinationResourceName, &v3), + testAccCheckResourceDisappears(testAccProvider, resourceAwsSesEventDestination(), cloudwatchDestinationResourceName), + testAccCheckResourceDisappears(testAccProvider, resourceAwsSesEventDestination(), kinesisDestinationResourceName), + testAccCheckResourceDisappears(testAccProvider, resourceAwsSesEventDestination(), snsDestinationResourceName), + ), + ExpectNonEmptyPlan: true, + }, }, }) } @@ -78,7 +124,7 @@ func testAccCheckSESEventDestinationDestroy(s *terraform.State) error { } -func testAccCheckAwsSESEventDestinationExists(n string) resource.TestCheckFunc { +func testAccCheckAwsSESEventDestinationExists(n string, v *ses.EventDestination) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -91,36 +137,34 @@ func testAccCheckAwsSESEventDestinationExists(n string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*AWSClient).sesconn - response, err := conn.ListConfigurationSets(&ses.ListConfigurationSetsInput{}) + response, err := conn.DescribeConfigurationSet(&ses.DescribeConfigurationSetInput{ + ConfigurationSetAttributeNames: aws.StringSlice([]string{ses.ConfigurationSetAttributeEventDestinations}), + ConfigurationSetName: aws.String(rs.Primary.Attributes["configuration_set_name"]), + }) if err != nil { return err } - found := false - for _, element := range response.ConfigurationSets { - if *element.Name == rs.Primary.ID { - found = true + for _, eventDestination := range response.EventDestinations { + if aws.StringValue(eventDestination.Name) == rs.Primary.ID { + *v = *eventDestination + return nil } } - if !found { - return fmt.Errorf("The configuration set was not created") - } - - return nil + return fmt.Errorf("The SES Configuration Set Event Destination was not found") } } -func testAccAWSSESEventDestinationConfig(bucketName, roleName, streamName, policyName, topicName, - sesCfgSetName, sesEventDstNameKinesis, sesEventDstNameCw, sesEventDstNameSns string) string { +func testAccAWSSESEventDestinationConfig(rName1, rName2, rName3 string) string { return fmt.Sprintf(` -resource "aws_s3_bucket" "bucket" { - bucket = "%s" +resource "aws_s3_bucket" "test" { + bucket = %[2]q acl = "private" } -resource "aws_iam_role" "firehose_role" { - name = "%s" +resource "aws_iam_role" "test" { + name = %[2]q assume_role_policy = <= 0!", vInt)) + errors = append(errors, fmt.Errorf("error setting SMS preferences: monthly spend limit value [%d] must be >= 0", vInt)) } return } @@ -22,7 +22,7 @@ func validateMonthlySpend(v interface{}, k string) (ws []string, errors []error) func validateDeliverySamplingRate(v interface{}, k string) (ws []string, errors []error) { vInt, _ := strconv.Atoi(v.(string)) if vInt < 0 || vInt > 100 { - errors = append(errors, fmt.Errorf("Error setting SMS preferences: default percentage of success to sample value [%d] must be between 0 and 100!", vInt)) + errors = append(errors, fmt.Errorf("error setting SMS preferences: default percentage of success to sample value [%d] must be between 0 and 100", vInt)) } return } @@ -154,12 +154,14 @@ func resourceAwsSnsSmsPreferencesDelete(d *schema.ResourceData, meta interface{} // Reset the attributes to their default value attrs := map[string]*string{} for tfAttrName, defValue := range smsAttributeDefaultValues { - attrs[smsAttributeMap[tfAttrName]] = &defValue + attrs[smsAttributeMap[tfAttrName]] = aws.String(defValue) } - params := &sns.SetSMSAttributesInput{Attributes: attrs} + params := &sns.SetSMSAttributesInput{ + Attributes: attrs, + } if _, err := snsconn.SetSMSAttributes(params); err != nil { - return fmt.Errorf("Error resetting SMS preferences: %s", err) + return fmt.Errorf("Error resetting SMS preferences: %w", err) } return nil diff --git a/aws/resource_aws_sns_sms_preferences_test.go b/aws/resource_aws_sns_sms_preferences_test.go index 7eecc87562f..82eab3f6710 100644 --- a/aws/resource_aws_sns_sms_preferences_test.go +++ b/aws/resource_aws_sns_sms_preferences_test.go @@ -2,11 +2,11 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sns" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) @@ -29,6 +29,8 @@ func TestAccAWSSNSSMSPreferences(t *testing.T) { } func testAccAWSSNSSMSPreferences_empty(t *testing.T) { + resourceName := "aws_sns_sms_preferences.test_pref" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -37,12 +39,12 @@ func testAccAWSSNSSMSPreferences_empty(t *testing.T) { { Config: testAccAWSSNSSMSPreferencesConfig_empty, Check: resource.ComposeTestCheckFunc( - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "default_sender_id"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "usage_report_s3_bucket"), + resource.TestCheckNoResourceAttr(resourceName, "monthly_spend_limit"), + resource.TestCheckNoResourceAttr(resourceName, "delivery_status_iam_role_arn"), + resource.TestCheckNoResourceAttr(resourceName, "delivery_status_success_sampling_rate"), + resource.TestCheckNoResourceAttr(resourceName, "default_sender_id"), + resource.TestCheckNoResourceAttr(resourceName, "default_sms_type"), + resource.TestCheckNoResourceAttr(resourceName, "usage_report_s3_bucket"), ), }, }, @@ -50,6 +52,8 @@ func testAccAWSSNSSMSPreferences_empty(t *testing.T) { } func testAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { + resourceName := "aws_sns_sms_preferences.test_pref" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -58,12 +62,12 @@ func testAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { { Config: testAccAWSSNSSMSPreferencesConfig_defSMSType, Check: resource.ComposeTestCheckFunc( - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "default_sender_id"), - resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type", "Transactional"), - resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "usage_report_s3_bucket"), + resource.TestCheckNoResourceAttr(resourceName, "monthly_spend_limit"), + resource.TestCheckNoResourceAttr(resourceName, "delivery_status_iam_role_arn"), + resource.TestCheckNoResourceAttr(resourceName, "delivery_status_success_sampling_rate"), + resource.TestCheckNoResourceAttr(resourceName, "default_sender_id"), + resource.TestCheckResourceAttr(resourceName, "default_sms_type", "Transactional"), + resource.TestCheckNoResourceAttr(resourceName, "usage_report_s3_bucket"), ), }, }, @@ -71,6 +75,8 @@ func testAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { } func testAccAWSSNSSMSPreferences_almostAll(t *testing.T) { + resourceName := "aws_sns_sms_preferences.test_pref" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -79,9 +85,9 @@ func testAccAWSSNSSMSPreferences_almostAll(t *testing.T) { { Config: testAccAWSSNSSMSPreferencesConfig_almostAll, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit", "1"), - resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type", "Transactional"), - resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "usage_report_s3_bucket", "some-bucket"), + resource.TestCheckResourceAttr(resourceName, "monthly_spend_limit", "1"), + resource.TestCheckResourceAttr(resourceName, "default_sms_type", "Transactional"), + resource.TestCheckResourceAttr(resourceName, "usage_report_s3_bucket", "some-bucket"), ), }, }, @@ -89,7 +95,9 @@ func testAccAWSSNSSMSPreferences_almostAll(t *testing.T) { } func testAccAWSSNSSMSPreferences_deliveryRole(t *testing.T) { - arnRole := regexp.MustCompile(`^arn:aws:iam::\d+:role/test_smsdelivery_role$`) + resourceName := "aws_sns_sms_preferences.test_pref" + iamRoleName := "aws_iam_role.test_smsdelivery_role" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -98,8 +106,8 @@ func testAccAWSSNSSMSPreferences_deliveryRole(t *testing.T) { { Config: testAccAWSSNSSMSPreferencesConfig_deliveryRole, Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn", arnRole), - resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate", "75"), + resource.TestCheckResourceAttrPair(resourceName, "delivery_status_iam_role_arn", iamRoleName, "arn"), + resource.TestCheckResourceAttr(resourceName, "delivery_status_success_sampling_rate", "75"), ), }, }, @@ -121,13 +129,17 @@ func testAccCheckAWSSNSSMSPrefsDestroy(s *terraform.State) error { return nil } - for attrName, attrValue := range attrs.Attributes { - if aws.StringValue(attrValue) != "" { - return fmt.Errorf("expected SMS attribute %q to be empty, but received: %s", attrName, aws.StringValue(attrValue)) + var attrErrs *multierror.Error + + // The API is returning undocumented keys, e.g. "UsageReportS3Enabled". Only check the keys we're aware of. + for _, snsAttrName := range smsAttributeMap { + v := aws.StringValue(attrs.Attributes[snsAttrName]) + if v != "" { + attrErrs = multierror.Append(attrErrs, fmt.Errorf("expected SMS attribute %q to be empty, but received: %q", snsAttrName, v)) } } - return nil + return attrErrs.ErrorOrNil() } return nil @@ -143,12 +155,17 @@ resource "aws_sns_sms_preferences" "test_pref" { ` const testAccAWSSNSSMSPreferencesConfig_almostAll = ` resource "aws_sns_sms_preferences" "test_pref" { - monthly_spend_limit = "1" - default_sms_type = "Transactional" + monthly_spend_limit = "1" + default_sms_type = "Transactional" usage_report_s3_bucket = "some-bucket" } ` const testAccAWSSNSSMSPreferencesConfig_deliveryRole = ` +resource "aws_sns_sms_preferences" "test_pref" { + delivery_status_iam_role_arn = "${aws_iam_role.test_smsdelivery_role.arn}" + delivery_status_success_sampling_rate = "75" +} + resource "aws_iam_role" "test_smsdelivery_role" { name = "test_smsdelivery_role" path = "/" @@ -186,9 +203,4 @@ resource "aws_iam_role_policy" "test_smsdelivery_role_policy" { } POLICY } - -resource "aws_sns_sms_preferences" "test_pref" { - delivery_status_iam_role_arn = "${aws_iam_role.test_smsdelivery_role.arn}" - delivery_status_success_sampling_rate = "75" -} ` diff --git a/aws/resource_aws_sns_topic.go b/aws/resource_aws_sns_topic.go index 271aafad90b..b250e593a33 100644 --- a/aws/resource_aws_sns_topic.go +++ b/aws/resource_aws_sns_topic.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strconv" "strings" "github.com/aws/aws-sdk-go/aws" @@ -14,27 +15,6 @@ import ( "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) -// Mutable attributes -var SNSAttributeMap = map[string]string{ - "application_failure_feedback_role_arn": "ApplicationFailureFeedbackRoleArn", - "application_success_feedback_role_arn": "ApplicationSuccessFeedbackRoleArn", - "application_success_feedback_sample_rate": "ApplicationSuccessFeedbackSampleRate", - "arn": "TopicArn", - "delivery_policy": "DeliveryPolicy", - "display_name": "DisplayName", - "http_failure_feedback_role_arn": "HTTPFailureFeedbackRoleArn", - "http_success_feedback_role_arn": "HTTPSuccessFeedbackRoleArn", - "http_success_feedback_sample_rate": "HTTPSuccessFeedbackSampleRate", - "kms_master_key_id": "KmsMasterKeyId", - "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", - "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", - "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", - "policy": "Policy", - "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", - "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", - "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", -} - func resourceAwsSnsTopic() *schema.Resource { return &schema.Resource{ Create: resourceAwsSnsTopicCreate, @@ -67,7 +47,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -78,7 +58,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: false, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -176,13 +156,107 @@ func resourceAwsSnsTopicCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(*output.TopicArn) - for terraformAttrName, snsAttrName := range SNSAttributeMap { - if d.HasChange(terraformAttrName) { - _, terraformAttrValue := d.GetChange(terraformAttrName) - err := updateAwsSnsTopicAttribute(d.Id(), snsAttrName, terraformAttrValue, snsconn) - if err != nil { - return err - } + // update mutable attributes + if d.HasChange("application_failure_feedback_role_arn") { + _, v := d.GetChange("application_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "ApplicationFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("application_success_feedback_role_arn") { + _, v := d.GetChange("application_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "ApplicationSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("arn") { + _, v := d.GetChange("arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "TopicArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("delivery_policy") { + _, v := d.GetChange("delivery_policy") + if err := updateAwsSnsTopicAttribute(d.Id(), "DeliveryPolicy", v, snsconn); err != nil { + return err + } + } + if d.HasChange("display_name") { + _, v := d.GetChange("display_name") + if err := updateAwsSnsTopicAttribute(d.Id(), "DisplayName", v, snsconn); err != nil { + return err + } + } + if d.HasChange("http_failure_feedback_role_arn") { + _, v := d.GetChange("http_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "HTTPFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("http_success_feedback_role_arn") { + _, v := d.GetChange("http_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "HTTPSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("kms_master_key_id") { + _, v := d.GetChange("kms_master_key_id") + if err := updateAwsSnsTopicAttribute(d.Id(), "KmsMasterKeyId", v, snsconn); err != nil { + return err + } + } + if d.HasChange("lambda_failure_feedback_role_arn") { + _, v := d.GetChange("lambda_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "LambdaFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("lambda_success_feedback_role_arn") { + _, v := d.GetChange("lambda_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "LambdaSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("policy") { + _, v := d.GetChange("policy") + if err := updateAwsSnsTopicAttribute(d.Id(), "Policy", v, snsconn); err != nil { + return err + } + } + if d.HasChange("sqs_failure_feedback_role_arn") { + _, v := d.GetChange("sqs_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "SQSFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("sqs_success_feedback_role_arn") { + _, v := d.GetChange("sqs_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "SQSSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("application_success_feedback_sample_rate") { + _, v := d.GetChange("application_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "ApplicationSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err + } + } + if d.HasChange("http_success_feedback_sample_rate") { + _, v := d.GetChange("http_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "HTTPSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err + } + } + if d.HasChange("lambda_success_feedback_sample_rate") { + _, v := d.GetChange("lambda_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "LambdaSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err + } + } + if d.HasChange("sqs_success_feedback_sample_rate") { + _, v := d.GetChange("sqs_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "SQSSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err } } @@ -190,21 +264,115 @@ func resourceAwsSnsTopicCreate(d *schema.ResourceData, meta interface{}) error { } func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).snsconn + snsconn := meta.(*AWSClient).snsconn - for terraformAttrName, snsAttrName := range SNSAttributeMap { - if d.HasChange(terraformAttrName) { - _, terraformAttrValue := d.GetChange(terraformAttrName) - err := updateAwsSnsTopicAttribute(d.Id(), snsAttrName, terraformAttrValue, conn) - if err != nil { - return err - } + // update mutable attributes + if d.HasChange("application_failure_feedback_role_arn") { + _, v := d.GetChange("application_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "ApplicationFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("application_success_feedback_role_arn") { + _, v := d.GetChange("application_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "ApplicationSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("arn") { + _, v := d.GetChange("arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "TopicArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("delivery_policy") { + _, v := d.GetChange("delivery_policy") + if err := updateAwsSnsTopicAttribute(d.Id(), "DeliveryPolicy", v, snsconn); err != nil { + return err + } + } + if d.HasChange("display_name") { + _, v := d.GetChange("display_name") + if err := updateAwsSnsTopicAttribute(d.Id(), "DisplayName", v, snsconn); err != nil { + return err + } + } + if d.HasChange("http_failure_feedback_role_arn") { + _, v := d.GetChange("http_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "HTTPFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("http_success_feedback_role_arn") { + _, v := d.GetChange("http_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "HTTPSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("kms_master_key_id") { + _, v := d.GetChange("kms_master_key_id") + if err := updateAwsSnsTopicAttribute(d.Id(), "KmsMasterKeyId", v, snsconn); err != nil { + return err + } + } + if d.HasChange("lambda_failure_feedback_role_arn") { + _, v := d.GetChange("lambda_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "LambdaFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("lambda_success_feedback_role_arn") { + _, v := d.GetChange("lambda_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "LambdaSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("policy") { + _, v := d.GetChange("policy") + if err := updateAwsSnsTopicAttribute(d.Id(), "Policy", v, snsconn); err != nil { + return err + } + } + if d.HasChange("sqs_failure_feedback_role_arn") { + _, v := d.GetChange("sqs_failure_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "SQSFailureFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("sqs_success_feedback_role_arn") { + _, v := d.GetChange("sqs_success_feedback_role_arn") + if err := updateAwsSnsTopicAttribute(d.Id(), "SQSSuccessFeedbackRoleArn", v, snsconn); err != nil { + return err + } + } + if d.HasChange("application_success_feedback_sample_rate") { + _, v := d.GetChange("application_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "ApplicationSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err + } + } + if d.HasChange("http_success_feedback_sample_rate") { + _, v := d.GetChange("http_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "HTTPSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err + } + } + if d.HasChange("lambda_success_feedback_sample_rate") { + _, v := d.GetChange("lambda_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "LambdaSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err + } + } + if d.HasChange("sqs_success_feedback_sample_rate") { + _, v := d.GetChange("sqs_success_feedback_sample_rate") + if err := updateAwsSnsTopicAttribute(d.Id(), "SQSSuccessFeedbackSampleRate", v, snsconn); err != nil { + return err } } if d.HasChange("tags") { o, n := d.GetChange("tags") - if err := keyvaluetags.SnsUpdateTags(conn, d.Id(), o, n); err != nil { + if err := keyvaluetags.SnsUpdateTags(snsconn, d.Id(), o, n); err != nil { return fmt.Errorf("error updating tags: %s", err) } } @@ -214,6 +382,7 @@ func resourceAwsSnsTopicUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { snsconn := meta.(*AWSClient).snsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading SNS Topic Attributes for %s", d.Id()) attributeOutput, err := snsconn.GetTopicAttributes(&sns.GetTopicAttributesInput{ @@ -229,14 +398,62 @@ func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { return err } + // set the mutable attributes if attributeOutput.Attributes != nil && len(attributeOutput.Attributes) > 0 { - attrmap := attributeOutput.Attributes - for terraformAttrName, snsAttrName := range SNSAttributeMap { - d.Set(terraformAttrName, attrmap[snsAttrName]) + // set the string values + d.Set("application_failure_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["ApplicationFailureFeedbackRoleArn"])) + d.Set("application_success_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["ApplicationSuccessFeedbackRoleArn"])) + d.Set("arn", aws.StringValue(attributeOutput.Attributes["TopicArn"])) + d.Set("delivery_policy", aws.StringValue(attributeOutput.Attributes["DeliveryPolicy"])) + d.Set("display_name", aws.StringValue(attributeOutput.Attributes["DisplayName"])) + d.Set("http_failure_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["HTTPFailureFeedbackRoleArn"])) + d.Set("http_success_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["HTTPSuccessFeedbackRoleArn"])) + d.Set("kms_master_key_id", aws.StringValue(attributeOutput.Attributes["KmsMasterKeyId"])) + d.Set("lambda_failure_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["LambdaFailureFeedbackRoleArn"])) + d.Set("lambda_success_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["LambdaSuccessFeedbackRoleArn"])) + d.Set("policy", aws.StringValue(attributeOutput.Attributes["Policy"])) + d.Set("sqs_failure_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["SQSFailureFeedbackRoleArn"])) + d.Set("sqs_success_feedback_role_arn", aws.StringValue(attributeOutput.Attributes["SQSSuccessFeedbackRoleArn"])) + + // set the number values + var vStr string + var v int64 + var err error + + vStr = aws.StringValue(attributeOutput.Attributes["ApplicationSuccessFeedbackSampleRate"]) + if vStr != "" { + v, err = strconv.ParseInt(vStr, 10, 64) + if err != nil { + return fmt.Errorf("error parsing integer attribute 'ApplicationSuccessFeedbackSampleRate': %s", err) + } + d.Set("application_success_feedback_sample_rate", v) } - } else { - for terraformAttrName := range SNSAttributeMap { - d.Set(terraformAttrName, "") + + vStr = aws.StringValue(attributeOutput.Attributes["HTTPSuccessFeedbackSampleRate"]) + if vStr != "" { + v, err = strconv.ParseInt(vStr, 10, 64) + if err != nil { + return fmt.Errorf("error parsing integer attribute 'HTTPSuccessFeedbackSampleRate': %s", err) + } + d.Set("http_success_feedback_sample_rate", v) + } + + vStr = aws.StringValue(attributeOutput.Attributes["LambdaSuccessFeedbackSampleRate"]) + if vStr != "" { + v, err = strconv.ParseInt(vStr, 10, 64) + if err != nil { + return fmt.Errorf("error parsing integer attribute 'LambdaSuccessFeedbackSampleRate': %s", err) + } + d.Set("lambda_success_feedback_sample_rate", v) + } + + vStr = aws.StringValue(attributeOutput.Attributes["SQSSuccessFeedbackSampleRate"]) + if vStr != "" { + v, err = strconv.ParseInt(vStr, 10, 64) + if err != nil { + return fmt.Errorf("error parsing integer attribute 'SQSSuccessFeedbackSampleRate': %s", err) + } + d.Set("sqs_success_feedback_sample_rate", v) } } @@ -257,7 +474,7 @@ func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for resource (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_sns_topic_policy.go b/aws/resource_aws_sns_topic_policy.go index 9d8d915b222..200a45ce7ed 100644 --- a/aws/resource_aws_sns_topic_policy.go +++ b/aws/resource_aws_sns_topic_policy.go @@ -33,7 +33,7 @@ func resourceAwsSnsTopicPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_sns_topic_subscription.go b/aws/resource_aws_sns_topic_subscription.go index 9c422dddb5a..2f665448675 100644 --- a/aws/resource_aws_sns_topic_subscription.go +++ b/aws/resource_aws_sns_topic_subscription.go @@ -71,7 +71,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "delivery_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentSnsTopicSubscriptionDeliveryPolicy, }, "raw_message_delivery": { @@ -86,7 +86,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "filter_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_sns_topic_test.go b/aws/resource_aws_sns_topic_test.go index 229b1125335..c1f17def8c8 100644 --- a/aws/resource_aws_sns_topic_test.go +++ b/aws/resource_aws_sns_topic_test.go @@ -2,18 +2,89 @@ package aws import ( "fmt" + "log" "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sns" - multierror "github.com/hashicorp/go-multierror" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" awspolicy "github.com/jen20/awspolicyequivalence" ) +func init() { + resource.AddTestSweepers("aws_sns_topic", &resource.Sweeper{ + Name: "aws_sns_topic", + F: testSweepSnsTopics, + Dependencies: []string{ + "aws_autoscaling_group", + "aws_budgets_budget", + "aws_config_delivery_channel", + "aws_dax_cluster", + "aws_db_event_subscription", + "aws_elasticache_cluster", + "aws_elasticache_replication_group", + "aws_glacier_vault", + "aws_iot_topic_rule", + "aws_neptune_event_subscription", + "aws_redshift_event_subscription", + "aws_s3_bucket", + "aws_ses_configuration_set", + "aws_ses_domain_identity", + "aws_ses_email_identity", + "aws_ses_receipt_rule_set", + "aws_sns_platform_application", + }, + }) +} + +func testSweepSnsTopics(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).snsconn + var sweeperErrs *multierror.Error + + err = conn.ListTopicsPages(&sns.ListTopicsInput{}, func(page *sns.ListTopicsOutput, isLast bool) bool { + if page == nil { + return !isLast + } + + for _, topic := range page.Topics { + arn := aws.StringValue(topic.TopicArn) + + log.Printf("[INFO] Deleting SNS Topic: %s", arn) + _, err := conn.DeleteTopic(&sns.DeleteTopicInput{ + TopicArn: aws.String(arn), + }) + if isAWSErr(err, sns.ErrCodeNotFoundException, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting SNS Topic (%s): %w", arn, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return !isLast + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping SNS Topics sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() // In case we have completed some pages, but had errors + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving SNS Topics: %w", err)) + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSSNSTopic_basic(t *testing.T) { attributes := make(map[string]string) resourceName := "aws_sns_topic.test" @@ -189,22 +260,9 @@ func TestAccAWSSNSTopic_withDeliveryPolicy(t *testing.T) { func TestAccAWSSNSTopic_deliveryStatus(t *testing.T) { attributes := make(map[string]string) resourceName := "aws_sns_topic.test" + iamRoleResourceName := "aws_iam_role.example" + rName := acctest.RandString(10) - arnRegex := regexp.MustCompile("^arn:aws:iam::[0-9]{12}:role/sns-delivery-status-role-") - expectedAttributes := map[string]*regexp.Regexp{ - "ApplicationFailureFeedbackRoleArn": arnRegex, - "ApplicationSuccessFeedbackRoleArn": arnRegex, - "ApplicationSuccessFeedbackSampleRate": regexp.MustCompile(`^100$`), - "HTTPFailureFeedbackRoleArn": arnRegex, - "HTTPSuccessFeedbackRoleArn": arnRegex, - "HTTPSuccessFeedbackSampleRate": regexp.MustCompile(`^80$`), - "LambdaFailureFeedbackRoleArn": arnRegex, - "LambdaSuccessFeedbackRoleArn": arnRegex, - "LambdaSuccessFeedbackSampleRate": regexp.MustCompile(`^90$`), - "SQSFailureFeedbackRoleArn": arnRegex, - "SQSSuccessFeedbackRoleArn": arnRegex, - "SQSSuccessFeedbackSampleRate": regexp.MustCompile(`^70$`), - } resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -216,19 +274,18 @@ func TestAccAWSSNSTopic_deliveryStatus(t *testing.T) { Config: testAccAWSSNSTopicConfig_deliveryStatus(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSNSTopicExists(resourceName, attributes), - testAccCheckAWSSNSTopicAttributes(attributes, expectedAttributes), - resource.TestMatchResourceAttr(resourceName, "application_success_feedback_role_arn", arnRegex), + resource.TestCheckResourceAttrPair(resourceName, "application_success_feedback_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "application_success_feedback_sample_rate", "100"), - resource.TestMatchResourceAttr(resourceName, "application_failure_feedback_role_arn", arnRegex), - resource.TestMatchResourceAttr(resourceName, "lambda_success_feedback_role_arn", arnRegex), + resource.TestCheckResourceAttrPair(resourceName, "application_failure_feedback_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "lambda_success_feedback_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "lambda_success_feedback_sample_rate", "90"), - resource.TestMatchResourceAttr(resourceName, "lambda_failure_feedback_role_arn", arnRegex), - resource.TestMatchResourceAttr(resourceName, "http_success_feedback_role_arn", arnRegex), + resource.TestCheckResourceAttrPair(resourceName, "lambda_failure_feedback_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "http_success_feedback_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "http_success_feedback_sample_rate", "80"), - resource.TestMatchResourceAttr(resourceName, "http_failure_feedback_role_arn", arnRegex), - resource.TestMatchResourceAttr(resourceName, "sqs_success_feedback_role_arn", arnRegex), + resource.TestCheckResourceAttrPair(resourceName, "http_failure_feedback_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "sqs_success_feedback_role_arn", iamRoleResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "sqs_success_feedback_sample_rate", "70"), - resource.TestMatchResourceAttr(resourceName, "sqs_failure_feedback_role_arn", arnRegex), + resource.TestCheckResourceAttrPair(resourceName, "sqs_failure_feedback_role_arn", iamRoleResourceName, "arn"), ), }, }, @@ -322,7 +379,7 @@ func testAccCheckAWSNSTopicHasPolicy(n string, expectedPolicyText string) resour } if rs.Primary.ID == "" { - return fmt.Errorf("No Queue URL specified!") + return fmt.Errorf("no Queue URL specified") } if !ok { @@ -356,7 +413,7 @@ func testAccCheckAWSNSTopicHasPolicy(n string, expectedPolicyText string) resour return fmt.Errorf("Error testing policy equivalence: %s", err) } if !equivalent { - return fmt.Errorf("Non-equivalent policy error:\n\nexpected: %s\n\n got: %s\n", + return fmt.Errorf("Non-equivalent policy error:\n\nexpected: %s\n\n got: %s", expectedPolicyText, actualPolicyText) } @@ -372,7 +429,7 @@ func testAccCheckAWSNSTopicHasDeliveryPolicy(n string, expectedPolicyText string } if rs.Primary.ID == "" { - return fmt.Errorf("No Queue URL specified!") + return fmt.Errorf("no Queue URL specified") } conn := testAccProvider.Meta().(*AWSClient).snsconn @@ -396,7 +453,7 @@ func testAccCheckAWSNSTopicHasDeliveryPolicy(n string, expectedPolicyText string equivalent := suppressEquivalentJsonDiffs("", actualPolicyText, expectedPolicyText, nil) if !equivalent { - return fmt.Errorf("Non-equivalent delivery policy error:\n\nexpected: %s\n\n got: %s\n", + return fmt.Errorf("Non-equivalent delivery policy error:\n\nexpected: %s\n\n got: %s", expectedPolicyText, actualPolicyText) } @@ -423,25 +480,12 @@ func testAccCheckAWSSNSTopicDestroy(s *terraform.State) error { } return err } - return fmt.Errorf("Topic exists when it should be destroyed!") + return fmt.Errorf("SNS topic (%s) exists when it should be destroyed", rs.Primary.ID) } return nil } -func testAccCheckAWSSNSTopicAttributes(attributes map[string]string, expectedAttributes map[string]*regexp.Regexp) resource.TestCheckFunc { - return func(s *terraform.State) error { - var errors error - for k, expectedR := range expectedAttributes { - if v, ok := attributes[k]; !ok || !expectedR.MatchString(v) { - err := fmt.Errorf("expected SNS topic attribute %q to match %q, received: %q", k, expectedR.String(), v) - errors = multierror.Append(errors, err) - } - } - return errors - } -} - func testAccCheckAWSSNSTopicExists(n string, attributes map[string]string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index ecc4d447852..19279970fa8 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.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/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -23,7 +22,12 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Read: resourceAwsSpotFleetRequestRead, Delete: resourceAwsSpotFleetRequestDelete, Update: resourceAwsSpotFleetRequestUpdate, - + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + d.Set("instance_pools_to_use_count", 1) + return []*schema.ResourceData{d}, nil + }, + }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), Delete: schema.DefaultTimeout(5 * time.Minute), @@ -55,7 +59,7 @@ func resourceAwsSpotFleetRequest() *schema.Resource { // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetLaunchSpecification.html "launch_specification": { Type: schema.TypeSet, - Required: true, + Optional: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -123,6 +127,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Optional: true, Computed: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.VolumeTypeStandard, + ec2.VolumeTypeIo1, + ec2.VolumeTypeGp2, + ec2.VolumeTypeSc1, + ec2.VolumeTypeSt1, + }, false), }, }, }, @@ -195,6 +206,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Optional: true, Computed: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.VolumeTypeStandard, + ec2.VolumeTypeIo1, + ec2.VolumeTypeGp2, + ec2.VolumeTypeSc1, + ec2.VolumeTypeSt1, + }, false), }, }, }, @@ -211,9 +229,10 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Optional: true, }, "iam_instance_profile_arn": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, + Type: schema.TypeString, + ForceNew: true, + Optional: true, + ValidateFunc: validateArn, }, "ami": { Type: schema.TypeString, @@ -247,6 +266,11 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.TenancyDefault, + ec2.TenancyDedicated, + ec2.TenancyHost, + }, false), }, "spot_price": { Type: schema.TypeString, @@ -287,12 +311,96 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + Set: hashLaunchSpecification, + ExactlyOneOf: []string{"launch_specification", "launch_template_config"}, + }, + "launch_template_config": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + ExactlyOneOf: []string{"launch_specification", "launch_template_config"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "launch_template_specification": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateLaunchTemplateId, + }, + "name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateLaunchTemplateName, + }, + "version": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + }, + }, + }, + "overrides": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "availability_zone": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "instance_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "spot_price": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "subnet_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "weighted_capacity": { + Type: schema.TypeFloat, + Optional: true, + Computed: true, + ForceNew: true, + }, + "priority": { + Type: schema.TypeFloat, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + }, + Set: hashLaunchTemplateOverrides, }, }, }, - Set: hashLaunchSpecification, }, - // Everything on a spot fleet is ForceNew except target_capacity + // Everything on a spot fleet is ForceNew except target_capacity and excess_capacity_termination_policy, + // see https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#ModifySpotFleetRequestInput "target_capacity": { Type: schema.TypeInt, Required: true, @@ -301,8 +409,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { "allocation_strategy": { Type: schema.TypeString, Optional: true, - Default: "lowestPrice", + Default: ec2.AllocationStrategyLowestPrice, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.AllocationStrategyLowestPrice, + ec2.AllocationStrategyDiversified, + ec2.AllocationStrategyCapacityOptimized, + }, false), }, "instance_pools_to_use_count": { Type: schema.TypeInt, @@ -324,8 +437,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { "instance_interruption_behaviour": { Type: schema.TypeString, Optional: true, - Default: "terminate", + Default: ec2.InstanceInterruptionBehaviorTerminate, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.InstanceInterruptionBehaviorTerminate, + ec2.InstanceInterruptionBehaviorStop, + ec2.InstanceInterruptionBehaviorHibernate, + }, false), }, "spot_price": { Type: schema.TypeString, @@ -357,6 +475,7 @@ func resourceAwsSpotFleetRequest() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ ec2.FleetTypeMaintain, ec2.FleetTypeRequest, + ec2.FleetTypeInstant, }, false), }, "spot_request_state": { @@ -380,9 +499,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Optional: true, Computed: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateArn, + }, + Set: schema.HashString, }, + "tags": tagsSchema(), }, } } @@ -468,7 +591,7 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ tags := keyvaluetags.New(m).IgnoreAws().Ec2Tags() spec := &ec2.SpotFleetTagSpecification{ - ResourceType: aws.String("instance"), + ResourceType: aws.String(ec2.ResourceTypeInstance), Tags: tags, } @@ -627,12 +750,12 @@ func readSpotFleetBlockDeviceMappingsFromConfig( func buildAwsSpotFleetLaunchSpecifications( d *schema.ResourceData, meta interface{}) ([]*ec2.SpotFleetLaunchSpecification, error) { - user_specs := d.Get("launch_specification").(*schema.Set).List() - specs := make([]*ec2.SpotFleetLaunchSpecification, len(user_specs)) - for i, user_spec := range user_specs { - user_spec_map := user_spec.(map[string]interface{}) + userSpecs := d.Get("launch_specification").(*schema.Set).List() + specs := make([]*ec2.SpotFleetLaunchSpecification, len(userSpecs)) + for i, userSpec := range userSpecs { + userSpecMap := userSpec.(map[string]interface{}) // panic: interface conversion: interface {} is map[string]interface {}, not *schema.ResourceData - opts, err := buildSpotFleetLaunchSpecification(user_spec_map, meta) + opts, err := buildSpotFleetLaunchSpecification(userSpecMap, meta) if err != nil { return nil, err } @@ -642,25 +765,116 @@ func buildAwsSpotFleetLaunchSpecifications( return specs, nil } +func buildLaunchTemplateConfigs(d *schema.ResourceData) ([]*ec2.LaunchTemplateConfig, error) { + launchTemplateConfigs := d.Get("launch_template_config").(*schema.Set) + configs := make([]*ec2.LaunchTemplateConfig, 0) + + for _, launchTemplateConfig := range launchTemplateConfigs.List() { + + ltc := &ec2.LaunchTemplateConfig{} + + ltcMap := launchTemplateConfig.(map[string]interface{}) + + //launch template spec + if v, ok := ltcMap["launch_template_specification"]; ok { + vL := v.([]interface{}) + lts := vL[0].(map[string]interface{}) + + flts := &ec2.FleetLaunchTemplateSpecification{} + + if v, ok := lts["id"].(string); ok && v != "" { + flts.LaunchTemplateId = aws.String(v) + } + + if v, ok := lts["name"].(string); ok && v != "" { + flts.LaunchTemplateName = aws.String(v) + } + + if v, ok := lts["version"].(string); ok && v != "" { + flts.Version = aws.String(v) + } + + ltc.LaunchTemplateSpecification = flts + + } + + if v, ok := ltcMap["overrides"]; ok && v.(*schema.Set).Len() > 0 { + vL := v.(*schema.Set).List() + overrides := make([]*ec2.LaunchTemplateOverrides, 0) + + for _, v := range vL { + ors := v.(map[string]interface{}) + lto := &ec2.LaunchTemplateOverrides{} + + if v, ok := ors["availability_zone"].(string); ok && v != "" { + lto.AvailabilityZone = aws.String(v) + } + + if v, ok := ors["instance_type"].(string); ok && v != "" { + lto.InstanceType = aws.String(v) + } + + if v, ok := ors["spot_price"].(string); ok && v != "" { + lto.SpotPrice = aws.String(v) + } + + if v, ok := ors["subnet_id"].(string); ok && v != "" { + lto.SubnetId = aws.String(v) + } + + if v, ok := ors["weighted_capacity"].(float64); ok && v > 0 { + lto.WeightedCapacity = aws.Float64(v) + } + + if v, ok := ors["priority"].(float64); ok { + lto.Priority = aws.Float64(v) + } + + overrides = append(overrides, lto) + } + + ltc.Overrides = overrides + } + + configs = append(configs, ltc) + } + + return configs, nil +} + func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) error { // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html conn := meta.(*AWSClient).ec2conn - launch_specs, err := buildAwsSpotFleetLaunchSpecifications(d, meta) - if err != nil { - return err - } + _, launchSpecificationOk := d.GetOk("launch_specification") + _, launchTemplateConfigsOk := d.GetOk("launch_template_config") // http://docs.aws.amazon.com/sdk-for-go/api/service/ec2.html#type-SpotFleetRequestConfigData spotFleetConfig := &ec2.SpotFleetRequestConfigData{ IamFleetRole: aws.String(d.Get("iam_fleet_role").(string)), - LaunchSpecifications: launch_specs, TargetCapacity: aws.Int64(int64(d.Get("target_capacity").(int))), ClientToken: aws.String(resource.UniqueId()), TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), Type: aws.String(d.Get("fleet_type").(string)), + TagSpecifications: ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypeSpotFleetRequest), + } + + if launchSpecificationOk { + launchSpecs, err := buildAwsSpotFleetLaunchSpecifications(d, meta) + if err != nil { + return err + } + spotFleetConfig.LaunchSpecifications = launchSpecs + } + + if launchTemplateConfigsOk { + launchTemplates, err := buildLaunchTemplateConfigs(d) + if err != nil { + return err + } + spotFleetConfig.LaunchTemplateConfigs = launchTemplates } if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { @@ -682,22 +896,22 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) } if v, ok := d.GetOk("valid_from"); ok { - valid_from, err := time.Parse(time.RFC3339, v.(string)) + validFrom, err := time.Parse(time.RFC3339, v.(string)) if err != nil { return err } - spotFleetConfig.ValidFrom = aws.Time(valid_from) + spotFleetConfig.ValidFrom = aws.Time(validFrom) } if v, ok := d.GetOk("valid_until"); ok { - valid_until, err := time.Parse(time.RFC3339, v.(string)) + validUntil, err := time.Parse(time.RFC3339, v.(string)) if err != nil { return err } - spotFleetConfig.ValidUntil = aws.Time(valid_until) + spotFleetConfig.ValidUntil = aws.Time(validUntil) } else { - valid_until := time.Now().Add(24 * time.Hour) - spotFleetConfig.ValidUntil = aws.Time(valid_until) + validUntil := time.Now().Add(24 * time.Hour) + spotFleetConfig.ValidUntil = aws.Time(validUntil) } if v, ok := d.GetOk("load_balancers"); ok && v.(*schema.Set).Len() > 0 { @@ -741,9 +955,13 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) // Since IAM is eventually consistent, we retry creation as a newly created role may not // take effect immediately, resulting in an InvalidSpotFleetRequestConfig error var resp *ec2.RequestSpotFleetOutput - err = resource.Retry(10*time.Minute, func() *resource.RetryError { + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + var err error resp, err = conn.RequestSpotFleet(spotFleetOpts) + if isAWSErr(err, "InvalidSpotFleetRequestConfig", "Duplicate: Parameter combination") { + return resource.NonRetryableError(fmt.Errorf("Error creating Spot fleet request: %s", err)) + } if isAWSErr(err, "InvalidSpotFleetRequestConfig", "") { return resource.RetryableError(fmt.Errorf("Error creating Spot fleet request, retrying: %s", err)) } @@ -766,10 +984,10 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) log.Printf("[INFO] Spot Fleet Request ID: %s", d.Id()) log.Println("[INFO] Waiting for Spot Fleet Request to be active") stateConf := &resource.StateChangeConf{ - Pending: []string{"submitted"}, - Target: []string{"active"}, + Pending: []string{ec2.BatchStateSubmitted}, + Target: []string{ec2.BatchStateActive}, Refresh: resourceAwsSpotFleetRequestStateRefreshFunc(d, meta), - Timeout: 10 * time.Minute, + Timeout: d.Timeout(schema.TimeoutCreate), //10 * time.Minute, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } @@ -782,8 +1000,8 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) if d.Get("wait_for_fulfillment").(bool) { log.Println("[INFO] Waiting for Spot Fleet Request to be fulfilled") spotStateConf := &resource.StateChangeConf{ - Pending: []string{"pending_fulfillment"}, - Target: []string{"fulfilled"}, + Pending: []string{ec2.ActivityStatusPendingFulfillment}, + Target: []string{ec2.ActivityStatusFulfilled}, Refresh: resourceAwsSpotFleetRequestFulfillmentRefreshFunc(d.Id(), meta.(*AWSClient).ec2conn), Timeout: d.Timeout(schema.TimeoutCreate), Delay: 10 * time.Second, @@ -856,7 +1074,7 @@ func resourceAwsSpotFleetRequestFulfillmentRefreshFunc(id string, conn *ec2.EC2) // Query "information" events (e.g. launchSpecUnusable b/c low bid price) out, err := conn.DescribeSpotFleetRequestHistory(&ec2.DescribeSpotFleetRequestHistoryInput{ - EventType: aws.String("information"), + EventType: aws.String(ec2.EventTypeInformation), SpotFleetRequestId: aws.String(id), StartTime: cfg.CreateTime, }) @@ -891,6 +1109,7 @@ func resourceAwsSpotFleetRequestFulfillmentRefreshFunc(id string, conn *ec2.EC2) func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) error { // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSpotFleetRequests.html conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &ec2.DescribeSpotFleetRequestsInput{ SpotFleetRequestIds: []*string{aws.String(d.Id())}, @@ -900,8 +1119,7 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e if err != nil { // If the spot request was not found, return nil so that we can show // that it is gone. - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidSpotFleetRequestId.NotFound" { + if isAWSErr(err, "InvalidSpotFleetRequestId.NotFound", "") { d.SetId("") return nil } @@ -914,9 +1132,9 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e // if the request is cancelled, then it is gone cancelledStates := map[string]bool{ - "cancelled": true, - "cancelled_running": true, - "cancelled_terminating": true, + ec2.BatchStateCancelled: true, + ec2.BatchStateCancelledRunning: true, + ec2.BatchStateCancelledTerminating: true, } if _, ok := cancelledStates[*sfr.SpotFleetRequestState]; ok { d.SetId("") @@ -981,10 +1199,72 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e d.Set("instance_interruption_behaviour", config.InstanceInterruptionBehavior) d.Set("fleet_type", config.Type) d.Set("launch_specification", launchSpec) + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(sfr.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + if len(config.LaunchTemplateConfigs) > 0 { + if err := d.Set("launch_template_config", flattenFleetLaunchTemplateConfig(config.LaunchTemplateConfigs)); err != nil { + return fmt.Errorf("error setting launch_template_config: %s", err) + } + } + + if config.LoadBalancersConfig != nil { + lbConf := config.LoadBalancersConfig + + if lbConf.ClassicLoadBalancersConfig != nil { + flatLbs := make([]*string, 0) + for _, lb := range lbConf.ClassicLoadBalancersConfig.ClassicLoadBalancers { + flatLbs = append(flatLbs, lb.Name) + } + if err := d.Set("load_balancers", flattenStringSet(flatLbs)); err != nil { + return fmt.Errorf("error setting load_balancers: %s", err) + } + } + + if lbConf.TargetGroupsConfig != nil { + flatTgs := make([]*string, 0) + for _, tg := range lbConf.TargetGroupsConfig.TargetGroups { + flatTgs = append(flatTgs, tg.Arn) + } + if err := d.Set("target_group_arns", flattenStringSet(flatTgs)); err != nil { + return fmt.Errorf("error setting target_group_arns: %s", err) + } + } + } return nil } +func flattenSpotFleetRequestLaunchTemplateOverrides(override *ec2.LaunchTemplateOverrides) map[string]interface{} { + m := make(map[string]interface{}) + + if override.AvailabilityZone != nil { + m["availability_zone"] = aws.StringValue(override.AvailabilityZone) + } + if override.InstanceType != nil { + m["instance_type"] = aws.StringValue(override.InstanceType) + } + + if override.SpotPrice != nil { + m["spot_price"] = aws.StringValue(override.SpotPrice) + } + + if override.SubnetId != nil { + m["subnet_id"] = aws.StringValue(override.SubnetId) + } + + if override.WeightedCapacity != nil { + m["weighted_capacity"] = aws.Float64Value(override.WeightedCapacity) + } + + if override.Priority != nil { + m["priority"] = aws.Float64Value(override.Priority) + } + + return m +} + func launchSpecsToSet(launchSpecs []*ec2.SpotFleetLaunchSpecification, conn *ec2.EC2) (*schema.Set, error) { specSet := &schema.Set{F: hashLaunchSpecification} for _, spec := range launchSpecs { @@ -1197,25 +1477,42 @@ func resourceAwsSpotFleetRequestUpdate(d *schema.ResourceData, meta interface{}) // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySpotFleetRequest.html conn := meta.(*AWSClient).ec2conn - d.Partial(true) - req := &ec2.ModifySpotFleetRequestInput{ SpotFleetRequestId: aws.String(d.Id()), } - if val, ok := d.GetOk("target_capacity"); ok { - req.TargetCapacity = aws.Int64(int64(val.(int))) + updateFlag := false + + if d.HasChange("target_capacity") { + if val, ok := d.GetOk("target_capacity"); ok { + req.TargetCapacity = aws.Int64(int64(val.(int))) + } + + updateFlag = true } - if val, ok := d.GetOk("excess_capacity_termination_policy"); ok { - req.ExcessCapacityTerminationPolicy = aws.String(val.(string)) + if d.HasChange("excess_capacity_termination_policy") { + if val, ok := d.GetOk("excess_capacity_termination_policy"); ok { + req.ExcessCapacityTerminationPolicy = aws.String(val.(string)) + } + + updateFlag = true } - if _, err := conn.ModifySpotFleetRequest(req); err != nil { - return fmt.Errorf("error updating spot request (%s): %s", d.Id(), err) + if updateFlag { + if _, err := conn.ModifySpotFleetRequest(req); err != nil { + return fmt.Errorf("error updating spot request (%s): %s", d.Id(), err) + } } - return nil + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating tags: %s", err) + } + } + + return resourceAwsSpotFleetRequestRead(d, meta) } func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) error { @@ -1320,6 +1617,31 @@ func hashLaunchSpecification(v interface{}) int { return hashcode.String(buf.String()) } +func hashLaunchTemplateOverrides(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + if m["availability_zone"] != nil { + buf.WriteString(fmt.Sprintf("%s-", m["availability_zone"].(string))) + } + if m["subnet_id"] != nil { + buf.WriteString(fmt.Sprintf("%s-", m["subnet_id"].(string))) + } + if m["spot_price"] != nil { + buf.WriteString(fmt.Sprintf("%s-", m["spot_price"].(string))) + } + if m["instance_type"] != nil { + buf.WriteString(fmt.Sprintf("%s-", m["instance_type"].(string))) + } + if m["weighted_capacity"] != nil { + buf.WriteString(fmt.Sprintf("%f-", m["weighted_capacity"].(float64))) + } + if m["priority"] != nil { + buf.WriteString(fmt.Sprintf("%f-", m["priority"].(float64))) + } + + return hashcode.String(buf.String()) +} + func hashEbsBlockDevice(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) @@ -1331,3 +1653,56 @@ func hashEbsBlockDevice(v interface{}) int { } return hashcode.String(buf.String()) } + +func flattenFleetLaunchTemplateConfig(ltcs []*ec2.LaunchTemplateConfig) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + + for _, ltc := range ltcs { + ltcRes := map[string]interface{}{} + + if ltc.LaunchTemplateSpecification != nil { + ltcRes["launch_template_specification"] = flattenFleetLaunchTemplateSpecification(ltc.LaunchTemplateSpecification) + } + + if ltc.Overrides != nil { + ltcRes["overrides"] = flattenLaunchTemplateOverrides(ltc.Overrides) + } + + result = append(result, ltcRes) + } + + return result +} + +func flattenFleetLaunchTemplateSpecification(flt *ec2.FleetLaunchTemplateSpecification) []map[string]interface{} { + attrs := map[string]interface{}{} + result := make([]map[string]interface{}, 0) + + // unlike autoscaling.LaunchTemplateConfiguration, FleetLaunchTemplateSpecs only return what was set + if flt.LaunchTemplateId != nil { + attrs["id"] = aws.StringValue(flt.LaunchTemplateId) + } + + if flt.LaunchTemplateName != nil { + attrs["name"] = aws.StringValue(flt.LaunchTemplateName) + } + + // version is returned only if it was previously set + if flt.Version != nil { + attrs["version"] = aws.StringValue(flt.Version) + } else { + attrs["version"] = nil + } + + result = append(result, attrs) + + return result +} + +func flattenLaunchTemplateOverrides(overrides []*ec2.LaunchTemplateOverrides) *schema.Set { + overrideSet := &schema.Set{F: hashLaunchTemplateOverrides} + for _, override := range overrides { + overrideSet.Add(flattenSpotFleetRequestLaunchTemplateOverrides(override)) + } + return overrideSet +} diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index 42366eea3f2..221bc063a56 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -61,6 +61,7 @@ func TestAccAWSSpotFleetRequest_basic(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -70,34 +71,259 @@ func TestAccAWSSpotFleetRequest_basic(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "excess_capacity_termination_policy", "Default"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "valid_until", validUntil), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "excess_capacity_termination_policy", "Default"), + resource.TestCheckResourceAttr(resourceName, "valid_until", validUntil), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } -func TestAccAWSSpotFleetRequest_associatePublicIpAddress(t *testing.T) { +func TestAccAWSSpotFleetRequest_tags(t *testing.T) { var sfr ec2.SpotFleetRequestConfig rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestConfigTags1(rName, validUntil, "key1", "value1", rInt), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, + { + Config: testAccAWSSpotFleetRequestConfigTags2(rName, validUntil, "key1", "value1updated", "key2", "value2", rInt), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSSpotFleetRequestConfigTags1(rName, validUntil, "key2", "value2", rInt), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func TestAccAWSSpotFleetRequest_associatePublicIpAddress(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSpotFleetRequestConfigAssociatePublicIpAddress(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "1"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.24370212.associate_public_ip_address", "true"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.24370212.associate_public_ip_address", "true"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, + }, + }) +} + +func TestAccAWSSpotFleetRequest_launchTemplate(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestLaunchTemplateConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "0"), + resource.TestCheckResourceAttr(resourceName, "launch_template_config.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, + }, + }) +} + +func TestAccAWSSpotFleetRequest_launchTemplate_multiple(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestLaunchTemplateMultipleConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "0"), + resource.TestCheckResourceAttr(resourceName, "launch_template_config.#", "2"), + ), + }, + }, + }) +} + +func TestAccAWSSpotFleetRequest_launchTemplateWithOverrides(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestLaunchTemplateConfigWithOverrides(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "0"), + resource.TestCheckResourceAttr(resourceName, "launch_template_config.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, + }, + }) +} + +func TestAccAWSSpotFleetRequest_launchTemplateToLaunchSpec(t *testing.T) { + var before, after ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestLaunchTemplateConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "0"), + resource.TestCheckResourceAttr(resourceName, "launch_template_config.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, + { + Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "spot_price", "0.005"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), + testAccCheckAWSSpotFleetRequestConfigRecreated(t, &before, &after), + ), + }, + }, + }) +} + +func TestAccAWSSpotFleetRequest_launchSpecToLaunchTemplate(t *testing.T) { + var before, after ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "spot_price", "0.005"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), + ), + }, + { + Config: testAccAWSSpotFleetRequestLaunchTemplateConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "0"), + resource.TestCheckResourceAttr(resourceName, "launch_template_config.#", "1"), + testAccCheckAWSSpotFleetRequestConfigRecreated(t, &before, &after), ), }, }, @@ -109,6 +335,7 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -118,11 +345,17 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "instance_interruption_behaviour", "stop"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "instance_interruption_behaviour", "stop"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -132,6 +365,7 @@ func TestAccAWSSpotFleetRequest_fleetType(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -141,11 +375,17 @@ func TestAccAWSSpotFleetRequest_fleetType(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigFleetType(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "fleet_type", "request"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "fleet_type", "request"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -155,6 +395,7 @@ func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -164,12 +405,17 @@ func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), testAccCheckAWSSpotFleetRequest_IamInstanceProfileArn(&sfr), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -179,6 +425,7 @@ func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -188,21 +435,25 @@ func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &before), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_price", "0.005"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "1"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "spot_price", "0.005"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, { Config: testAccAWSSpotFleetRequestConfigChangeSpotBidPrice(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &after), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "1"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_price", "0.01"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), + resource.TestCheckResourceAttr(resourceName, "spot_price", "0.01"), testAccCheckAWSSpotFleetRequestConfigRecreated(t, &before, &after), ), }, @@ -215,6 +466,7 @@ func TestAccAWSSpotFleetRequest_updateTargetCapacity(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -224,24 +476,30 @@ func TestAccAWSSpotFleetRequest_updateTargetCapacity(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &before), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "target_capacity", "2"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "target_capacity", "2"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, { Config: testAccAWSSpotFleetRequestConfigTargetCapacity(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &after), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "target_capacity", "3"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "target_capacity", "3"), ), }, { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &before), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "target_capacity", "2"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "target_capacity", "2"), ), }, }, @@ -253,6 +511,7 @@ func TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy(t *testing rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -262,16 +521,22 @@ func TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy(t *testing { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &before), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "excess_capacity_termination_policy", "Default"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "excess_capacity_termination_policy", "Default"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, { Config: testAccAWSSpotFleetRequestConfigExcessCapacityTermination(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &after), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "excess_capacity_termination_policy", "NoTermination"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "excess_capacity_termination_policy", "NoTermination"), ), }, }, @@ -283,6 +548,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -292,12 +558,17 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "1"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -307,23 +578,30 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSpotFleetRequestConfigWithAzs(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.1991689378.availability_zone", "us-west-2a"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.19404370.availability_zone", "us-west-2b"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.1991689378.availability_zone", "us-west-2a"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.19404370.availability_zone", "us-west-2b"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -333,6 +611,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -342,12 +621,17 @@ func TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigWithSubnet(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -357,34 +641,65 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameAz(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.1991689378.instance_type", "m1.small"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.1991689378.availability_zone", "us-west-2a"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.590403189.instance_type", "m3.large"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.590403189.availability_zone", "us-west-2a"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.1991689378.instance_type", "m1.small"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.1991689378.availability_zone", "us-west-2a"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.590403189.instance_type", "m3.large"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.590403189.availability_zone", "us-west-2a"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } +func testAccCheckAWSSpotFleetRequest_IamInstanceProfileArn( + sfr *ec2.SpotFleetRequestConfig) resource.TestCheckFunc { + return func(s *terraform.State) error { + if len(sfr.SpotFleetRequestConfig.LaunchSpecifications) == 0 { + return errors.New("Missing launch specification") + } + + spec := *sfr.SpotFleetRequestConfig.LaunchSpecifications[0] + + profile := spec.IamInstanceProfile + if profile == nil { + return fmt.Errorf("Expected IamInstanceProfile to be set, got nil") + } + //Validate the string whether it is ARN + re := regexp.MustCompile(`arn:aws:iam::\d{12}:instance-profile/?[a-zA-Z0-9+=,.@-_].*`) + if !re.MatchString(*profile.Arn) { + return fmt.Errorf("Expected IamInstanceProfile input as ARN, got %s", *profile.Arn) + } + + return nil + } +} + func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet(t *testing.T) { var sfr ec2.SpotFleetRequestConfig rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -394,12 +709,17 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet(t *testing.T) { Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameSubnet(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -409,26 +729,33 @@ func TestAccAWSSpotFleetRequest_overriddingSpotPrice(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSpotFleetRequestConfigOverridingSpotPrice(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_price", "0.035"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.4143232216.spot_price", "0.01"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.4143232216.instance_type", "m3.large"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.1991689378.spot_price", ""), //there will not be a value here since it's not overriding - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.1991689378.instance_type", "m1.small"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "spot_price", "0.035"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.4143232216.spot_price", "0.01"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.4143232216.instance_type", "m3.large"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.1991689378.spot_price", ""), //there will not be a value here since it's not overriding + resource.TestCheckResourceAttr(resourceName, "launch_specification.1991689378.instance_type", "m1.small"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -438,6 +765,7 @@ func TestAccAWSSpotFleetRequest_withoutSpotPrice(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -447,12 +775,17 @@ func TestAccAWSSpotFleetRequest_withoutSpotPrice(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -462,6 +795,7 @@ func TestAccAWSSpotFleetRequest_diversifiedAllocation(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -471,13 +805,18 @@ func TestAccAWSSpotFleetRequest_diversifiedAllocation(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigDiversifiedAllocation(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "3"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "allocation_strategy", "diversified"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "3"), + resource.TestCheckResourceAttr(resourceName, "allocation_strategy", "diversified"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -487,6 +826,7 @@ func TestAccAWSSpotFleetRequest_multipleInstancePools(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -496,14 +836,19 @@ func TestAccAWSSpotFleetRequest_multipleInstancePools(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigMultipleInstancePools(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "3"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "allocation_strategy", "lowestPrice"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "instance_pools_to_use_count", "2"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "3"), + resource.TestCheckResourceAttr(resourceName, "allocation_strategy", "lowestPrice"), + resource.TestCheckResourceAttr(resourceName, "instance_pools_to_use_count", "2"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -513,6 +858,7 @@ func TestAccAWSSpotFleetRequest_withWeightedCapacity(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" fulfillSleep := func() resource.TestCheckFunc { // sleep so that EC2 can fuflill the request. We do this to guard against a @@ -529,24 +875,30 @@ func TestAccAWSSpotFleetRequest_withWeightedCapacity(t *testing.T) { } resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSpotFleetRequestConfigWithWeightedCapacity(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( fulfillSleep(), - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "2"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.4120185872.weighted_capacity", "3"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.4120185872.instance_type", "r3.large"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.590403189.weighted_capacity", "6"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.590403189.instance_type", "m3.large"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "2"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.4120185872.weighted_capacity", "3"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.4120185872.instance_type", "r3.large"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.590403189.weighted_capacity", "6"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.590403189.instance_type", "m3.large"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -556,6 +908,7 @@ func TestAccAWSSpotFleetRequest_withEBSDisk(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -565,12 +918,16 @@ func TestAccAWSSpotFleetRequest_withEBSDisk(t *testing.T) { { Config: testAccAWSSpotFleetRequestEBSConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &config), - testAccCheckAWSSpotFleetRequest_EBSAttributes( - &config), + testAccCheckAWSSpotFleetRequestExists(resourceName, &config), + testAccCheckAWSSpotFleetRequest_EBSAttributes(&config), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -593,6 +950,12 @@ func TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId(t *t testAccCheckAWSSpotFleetRequestExists(resourceName, &config), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -615,6 +978,12 @@ func TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId(t * testAccCheckAWSSpotFleetRequestExists(resourceName, &config), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -624,21 +993,29 @@ func TestAccAWSSpotFleetRequest_withTags(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSpotFleetRequestTagsConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &config), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.24370212.tags.%", "2"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.24370212.tags.First", "TfAccTest"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.24370212.tags.Second", "Terraform"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &config), + resource.TestCheckResourceAttr(resourceName, "launch_specification.24370212.tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.24370212.tags.First", "TfAccTest"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.24370212.tags.Second", "Terraform"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -648,6 +1025,7 @@ func TestAccAWSSpotFleetRequest_placementTenancyAndGroup(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -657,11 +1035,17 @@ func TestAccAWSSpotFleetRequest_placementTenancyAndGroup(t *testing.T) { { Config: testAccAWSSpotFleetRequestTenancyGroupConfig(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists("aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), testAccCheckAWSSpotFleetRequest_PlacementAttributes(&sfr, rName), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -671,6 +1055,7 @@ func TestAccAWSSpotFleetRequest_WithELBs(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, @@ -680,13 +1065,18 @@ func TestAccAWSSpotFleetRequest_WithELBs(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigWithELBs(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "1"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "load_balancers.#", "1"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), + resource.TestCheckResourceAttr(resourceName, "load_balancers.#", "1"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -696,7 +1086,7 @@ func TestAccAWSSpotFleetRequest_WithTargetGroups(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) - + resourceName := "aws_spot_fleet_request.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, Providers: testAccProviders, @@ -705,13 +1095,18 @@ func TestAccAWSSpotFleetRequest_WithTargetGroups(t *testing.T) { { Config: testAccAWSSpotFleetRequestConfigWithTargetGroups(rName, rInt, validUntil), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSSpotFleetRequestExists( - "aws_spot_fleet_request.foo", &sfr), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "spot_request_state", "active"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "launch_specification.#", "1"), - resource.TestCheckResourceAttr("aws_spot_fleet_request.foo", "target_group_arns.#", "1"), + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + resource.TestCheckResourceAttr(resourceName, "spot_request_state", "active"), + resource.TestCheckResourceAttr(resourceName, "launch_specification.#", "1"), + resource.TestCheckResourceAttr(resourceName, "target_group_arns.#", "1"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"wait_for_fulfillment"}, + }, }, }) } @@ -735,6 +1130,30 @@ func TestAccAWSSpotFleetRequest_WithInstanceStoreAmi(t *testing.T) { }) } +func TestAccAWSSpotFleetRequest_disappears(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + validUntil := time.Now().UTC().Add(24 * time.Hour).Format(time.RFC3339) + resourceName := "aws_spot_fleet_request.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEc2SpotFleetRequest(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestConfig(rName, rInt, validUntil), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists(resourceName, &sfr), + testAccCheckAWSSpotFleetRequestDisappears(&sfr), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckAWSSpotFleetRequestConfigRecreated(t *testing.T, before, after *ec2.SpotFleetRequestConfig) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -778,6 +1197,16 @@ func testAccCheckAWSSpotFleetRequestExists( } } +func testAccCheckAWSSpotFleetRequestDisappears(sfr *ec2.SpotFleetRequestConfig) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + sfrId := aws.StringValue(sfr.SpotFleetRequestId) + err := deleteSpotFleetRequest(sfrId, true, 5*time.Minute, conn) + + return err + } +} + func testAccCheckAWSSpotFleetRequestDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -837,38 +1266,17 @@ func testAccCheckAWSSpotFleetRequest_PlacementAttributes( if placement == nil { return fmt.Errorf("Expected placement to be set, got nil") } - if *placement.Tenancy != "dedicated" { + if *placement.Tenancy != ec2.TenancyDedicated { return fmt.Errorf("Expected placement tenancy to be %q, got %q", "dedicated", *placement.Tenancy) } + if aws.StringValue(placement.GroupName) != fmt.Sprintf("test-pg-%s", rName) { return fmt.Errorf("Expected placement group to be %q, got %q", fmt.Sprintf("test-pg-%s", rName), aws.StringValue(placement.GroupName)) } return nil } -} - -func testAccCheckAWSSpotFleetRequest_IamInstanceProfileArn( - sfr *ec2.SpotFleetRequestConfig) resource.TestCheckFunc { - return func(s *terraform.State) error { - if len(sfr.SpotFleetRequestConfig.LaunchSpecifications) == 0 { - return errors.New("Missing launch specification") - } - - spec := *sfr.SpotFleetRequestConfig.LaunchSpecifications[0] - - profile := spec.IamInstanceProfile - if profile == nil { - return fmt.Errorf("Expected IamInstanceProfile to be set, got nil") - } - //Validate the string whether it is ARN - re := regexp.MustCompile(`arn:aws:iam::\d{12}:instance-profile/?[a-zA-Z0-9+=,.@-_].*`) - if !re.MatchString(*profile.Arn) { - return fmt.Errorf("Expected IamInstanceProfile input as ARN, got %s", *profile.Arn) - } - return nil - } } func testAccPreCheckAWSEc2SpotFleetRequest(t *testing.T) { @@ -888,14 +1296,26 @@ func testAccPreCheckAWSEc2SpotFleetRequest(t *testing.T) { } func testAccAWSSpotFleetRequestConfigBase(rName string, rInt int) string { - return fmt.Sprintf(` -resource "aws_key_pair" "debugging" { - key_name = "tmp-key-%[1]s" + return testAccLatestAmazonLinuxHvmEbsAmiConfig() + fmt.Sprintf(` +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} +resource "aws_key_pair" "test" { + key_name = %[1]q public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" + + tags = { + Name = %[1]q + } } resource "aws_iam_role" "test-role" { - name = "test-role-%[1]s" + name = %[1]q assume_role_policy = < 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 Spot Instance Request (%s) tags: %s", d.Id(), err) } } @@ -239,6 +240,7 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface // Update spot state, etc func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig req := &ec2.DescribeSpotInstanceRequestsInput{ SpotInstanceRequestIds: []*string{aws.String(d.Id())}, @@ -285,7 +287,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} d.Set("launch_group", request.LaunchGroup) d.Set("block_duration_minutes", request.BlockDurationMinutes) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(request.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(request.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -299,13 +301,11 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} func readInstance(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(d.Get("spot_instance_id").(string))}, - }) + instance, err := resourceAwsInstanceFindByID(conn, d.Get("spot_instance_id").(string)) if err != nil { // If the instance was not found, return nil so that we can show // that the instance is gone. - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { + if isAWSErr(err, "InvalidInstanceID.NotFound", "") { return fmt.Errorf("no instance found") } @@ -314,12 +314,10 @@ func readInstance(d *schema.ResourceData, meta interface{}) error { } // If nothing was found, then return no state - if len(resp.Reservations) == 0 { + if instance == nil { return fmt.Errorf("no instances found") } - instance := resp.Reservations[0].Instances[0] - // Set these fields for connection information if instance != nil { d.Set("public_dns", instance.PublicDnsName) diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index 37696a29edf..36efe0b4442 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -283,9 +282,13 @@ func testAccCheckAWSSpotInstanceRequestDestroy(s *terraform.State) error { SpotInstanceRequestIds: []*string{aws.String(rs.Primary.ID)}, } - resp, err := conn.DescribeSpotInstanceRequests(req) + resp, spotErr := conn.DescribeSpotInstanceRequests(req) + // Verify the error is what we expect + if !isAWSErr(spotErr, "InvalidSpotInstanceRequestID.NotFound", "") { + return spotErr + } var s *ec2.SpotInstanceRequest - if err == nil { + if spotErr == nil { for _, sir := range resp.SpotInstanceRequests { if sir.SpotInstanceRequestId != nil && *sir.SpotInstanceRequestId == rs.Primary.ID { s = sir @@ -293,47 +296,29 @@ func testAccCheckAWSSpotInstanceRequestDestroy(s *terraform.State) error { continue } } - if s == nil { // not found - return nil + continue } - - if *s.State == "canceled" || *s.State == "closed" { + if aws.StringValue(s.State) == "canceled" || aws.StringValue(s.State) == "closed" { // Requests stick around for a while, so we make sure it's cancelled // or closed. - return nil - } - - // Verify the error is what we expect - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidSpotInstanceRequestID.NotFound" { - return err + continue } // Now check if the associated Spot Instance was also destroyed - instId := rs.Primary.Attributes["spot_instance_id"] - instResp, instErr := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{aws.String(instId)}, - }) + instanceID := rs.Primary.Attributes["spot_instance_id"] + instance, instErr := resourceAwsInstanceFindByID(conn, instanceID) if instErr == nil { - if len(instResp.Reservations) > 0 { - return fmt.Errorf("Instance still exists.") + if instance != nil { + return fmt.Errorf("instance %q still exists", instanceID) } - - return nil + continue } // Verify the error is what we expect - ec2err, ok = err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidInstanceID.NotFound" { - return err + if !isAWSErr(instErr, "InvalidInstanceID.NotFound", "") { + return instErr } } @@ -412,27 +397,22 @@ func testAccCheckAWSSpotInstanceRequestAttributesCheckSIRWithoutSpot( } } -func testAccCheckAWSSpotInstanceRequest_InstanceAttributes( - sir *ec2.SpotInstanceRequest, rInt int) resource.TestCheckFunc { +func testAccCheckAWSSpotInstanceRequest_InstanceAttributes(sir *ec2.SpotInstanceRequest, rInt int) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn - resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ - InstanceIds: []*string{sir.InstanceId}, - }) + instance, err := resourceAwsInstanceFindByID(conn, aws.StringValue(sir.InstanceId)) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { - return fmt.Errorf("Spot Instance not found") + if isAWSErr(err, "InvalidInstanceID.NotFound", "") { + return fmt.Errorf("Spot Instance %q not found", aws.StringValue(sir.InstanceId)) } return err } // If nothing was found, then return no state - if len(resp.Reservations) == 0 { + if instance == nil { return fmt.Errorf("Spot Instance not found") } - instance := resp.Reservations[0].Instances[0] - var sgMatch bool for _, s := range instance.SecurityGroups { // Hardcoded name for the security group that should be added inside the @@ -673,8 +653,13 @@ func testAccAWSSpotInstanceRequestConfig_withBlockDuration(rInt int) string { func testAccAWSSpotInstanceRequestConfigVPC(rInt int) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { - blacklisted_zone_ids = ["usw2-az4"] - state = "available" + blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "foo_VPC" { @@ -724,8 +709,13 @@ tags = { func testAccAWSSpotInstanceRequestConfig_SubnetAndSGAndPublicIpAddress(rInt int) string { return fmt.Sprintf(` data "aws_availability_zones" "available" { - blacklisted_zone_ids = ["usw2-az4"] - state = "available" + blacklisted_zone_ids = ["usw2-az4"] + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_spot_instance_request" "foo" { diff --git a/aws/resource_aws_sqs_queue.go b/aws/resource_aws_sqs_queue.go index 6d55747ec19..c192b2778d3 100644 --- a/aws/resource_aws_sqs_queue.go +++ b/aws/resource_aws_sqs_queue.go @@ -91,13 +91,13 @@ func resourceAwsSqsQueue() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "redrive_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json @@ -277,6 +277,7 @@ func resourceAwsSqsQueueUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { sqsconn := meta.(*AWSClient).sqsconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig attributeOutput, err := sqsconn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ QueueUrl: aws.String(d.Id()), @@ -426,7 +427,7 @@ func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { } } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_sqs_queue_policy.go b/aws/resource_aws_sqs_queue_policy.go index 20fd51da67a..3c7e3c56f4e 100644 --- a/aws/resource_aws_sqs_queue_policy.go +++ b/aws/resource_aws_sqs_queue_policy.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" - "github.com/jen20/awspolicyequivalence" + awspolicy "github.com/jen20/awspolicyequivalence" ) func resourceAwsSqsQueuePolicy() *schema.Resource { @@ -35,7 +35,7 @@ func resourceAwsSqsQueuePolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_sqs_queue_test.go b/aws/resource_aws_sqs_queue_test.go index 0e09388c28c..faf343599a0 100644 --- a/aws/resource_aws_sqs_queue_test.go +++ b/aws/resource_aws_sqs_queue_test.go @@ -2,18 +2,76 @@ package aws import ( "fmt" + "log" "regexp" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" awspolicy "github.com/jen20/awspolicyequivalence" ) +func init() { + resource.AddTestSweepers("aws_sqs_queue", &resource.Sweeper{ + Name: "aws_sqs_queue", + F: testSweepSqsQueues, + Dependencies: []string{ + "aws_autoscaling_group", + "aws_cloudwatch_event_rule", + "aws_elastic_beanstalk_environment", + "aws_iot_topic_rule", + "aws_lambda_function", + "aws_s3_bucket", + "aws_sns_topic", + }, + }) +} + +func testSweepSqsQueues(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).sqsconn + input := &sqs.ListQueuesInput{} + var sweeperErrs *multierror.Error + + output, err := conn.ListQueues(input) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping SQS Queues sweep for %s: %s", region, err) + return sweeperErrs.ErrorOrNil() + } + if err != nil { + sweeperErrs = multierror.Append(sweeperErrs, fmt.Errorf("error retrieving SQS Queues: %w", err)) + return sweeperErrs + } + + for _, queueUrl := range output.QueueUrls { + url := aws.StringValue(queueUrl) + + log.Printf("[INFO] Deleting SQS Queue: %s", url) + _, err := conn.DeleteQueue(&sqs.DeleteQueueInput{ + QueueUrl: aws.String(url), + }) + if isAWSErr(err, sqs.ErrCodeQueueDoesNotExist, "") { + continue + } + if err != nil { + sweeperErr := fmt.Errorf("error deleting SQS Queue (%s): %w", url, err) + log.Printf("[ERROR] %s", sweeperErr) + sweeperErrs = multierror.Append(sweeperErrs, sweeperErr) + continue + } + } + + return sweeperErrs.ErrorOrNil() +} + func TestAccAWSSQSQueue_basic(t *testing.T) { var queueAttributes map[string]*string diff --git a/aws/resource_aws_ssm_activation.go b/aws/resource_aws_ssm_activation.go index 25126692bad..f67bfc30e86 100644 --- a/aws/resource_aws_ssm_activation.go +++ b/aws/resource_aws_ssm_activation.go @@ -18,6 +18,9 @@ func resourceAwsSsmActivation() *schema.Resource { Create: resourceAwsSsmActivationCreate, Read: resourceAwsSsmActivationRead, Delete: resourceAwsSsmActivationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -31,7 +34,7 @@ func resourceAwsSsmActivation() *schema.Resource { ForceNew: true, }, "expired": { - Type: schema.TypeString, + Type: schema.TypeBool, Computed: true, }, "expiration_date": { @@ -130,6 +133,7 @@ func resourceAwsSsmActivationCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsSsmActivationRead(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading SSM Activation: %s", d.Id()) @@ -164,7 +168,7 @@ func resourceAwsSsmActivationRead(d *schema.ResourceData, meta interface{}) erro d.Set("iam_role", activation.IamRole) d.Set("registration_limit", activation.RegistrationLimit) d.Set("registration_count", activation.RegistrationsCount) - if err := d.Set("tags", keyvaluetags.SsmKeyValueTags(activation.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.SsmKeyValueTags(activation.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ssm_activation_test.go b/aws/resource_aws_ssm_activation_test.go index 82bb0895632..28a7a7c5107 100644 --- a/aws/resource_aws_ssm_activation_test.go +++ b/aws/resource_aws_ssm_activation_test.go @@ -32,6 +32,14 @@ func TestAccAWSSSMActivation_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), resource.TestCheckResourceAttr(resourceName, "tags.Name", tag)), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "activation_code", + }, + }, }, }) } @@ -55,6 +63,14 @@ func TestAccAWSSSMActivation_update(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "tags.Name", "My Activation"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "activation_code", + }, + }, { Config: testAccAWSSSMActivationBasicConfig(name, "Foo"), Check: resource.ComposeTestCheckFunc( @@ -65,6 +81,14 @@ func TestAccAWSSSMActivation_update(t *testing.T) { testAccCheckAWSSSMActivationRecreated(t, &ssmActivation1, &ssmActivation2), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "activation_code", + }, + }, }, }) } @@ -88,6 +112,14 @@ func TestAccAWSSSMActivation_expirationDate(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "expiration_date", expirationDateS), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "activation_code", + }, + }, }, }) } diff --git a/aws/resource_aws_ssm_association.go b/aws/resource_aws_ssm_association.go index a79ffa0a871..da7fd9ffd33 100644 --- a/aws/resource_aws_ssm_association.go +++ b/aws/resource_aws_ssm_association.go @@ -62,6 +62,7 @@ func resourceAwsSsmAssociation() *schema.Resource { Type: schema.TypeMap, Optional: true, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, "schedule_expression": { Type: schema.TypeString, diff --git a/aws/resource_aws_ssm_association_test.go b/aws/resource_aws_ssm_association_test.go index a9de36d9e94..f0c703854fa 100644 --- a/aws/resource_aws_ssm_association_test.go +++ b/aws/resource_aws_ssm_association_test.go @@ -20,7 +20,7 @@ func TestAccAWSSSMAssociation_basic(t *testing.T) { ec2conn := testAccProvider.Meta().(*AWSClient).ec2conn ssmconn := testAccProvider.Meta().(*AWSClient).ssmconn - ins, err := ec2conn.DescribeInstances(&ec2.DescribeInstancesInput{ + ins, err := resourceAwsInstanceFind(ec2conn, &ec2.DescribeInstancesInput{ Filters: []*ec2.Filter{ { Name: aws.String("tag:Name"), @@ -31,17 +31,17 @@ func TestAccAWSSSMAssociation_basic(t *testing.T) { if err != nil { t.Fatalf("Error getting instance with tag:Name %s: %s", name, err) } - if len(ins.Reservations) == 0 || len(ins.Reservations[0].Instances) == 0 { + if len(ins) == 0 { t.Fatalf("No instance exists with tag:Name %s", name) } - instanceId := ins.Reservations[0].Instances[0].InstanceId + instanceID := ins[0].InstanceId _, err = ssmconn.DeleteAssociation(&ssm.DeleteAssociationInput{ Name: aws.String(name), - InstanceId: instanceId, + InstanceId: instanceID, }) if err != nil { - t.Fatalf("Error deleting ssm association %s/%s: %s", name, aws.StringValue(instanceId), err) + t.Fatalf("Error deleting ssm association %s/%s: %s", name, aws.StringValue(instanceID), err) } } @@ -779,7 +779,14 @@ variable "name" { default = "%s" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} data "aws_ami" "amzn" { most_recent = true diff --git a/aws/resource_aws_ssm_document.go b/aws/resource_aws_ssm_document.go index 45daf1a294f..635588c2272 100644 --- a/aws/resource_aws_ssm_document.go +++ b/aws/resource_aws_ssm_document.go @@ -107,6 +107,10 @@ func resourceAwsSsmDocument() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "document_version": { + Type: schema.TypeString, + Computed: true, + }, "hash": { Type: schema.TypeString, Computed: true, @@ -159,20 +163,8 @@ func resourceAwsSsmDocument() *schema.Resource { "permissions": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - ssm.DocumentPermissionTypeShare, - }, false), - }, - "account_ids": { - Type: schema.TypeString, - Required: true, - }, - }, + Elem: &schema.Schema{ + Type: schema.TypeString, }, }, "tags": tagsSchema(), @@ -187,6 +179,14 @@ func resourceAwsSsmDocument() *schema.Resource { func resourceAwsSsmDocumentCreate(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + // Validates permissions keys, if set, to be type and account_ids + // since ValidateFunc validates only the value not the key. + if v, ok := d.GetOk("permissions"); ok { + if errors := validateSSMDocumentPermissions(v.(map[string]interface{})); len(errors) > 0 { + return fmt.Errorf("Error validating Permissions: %v", errors) + } + } + log.Printf("[INFO] Creating SSM Document: %s", d.Get("name").(string)) docInput := &ssm.CreateDocumentInput{ @@ -229,6 +229,7 @@ func resourceAwsSsmDocumentCreate(d *schema.ResourceData, meta interface{}) erro func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading SSM Document: %s", d.Id()) @@ -330,7 +331,7 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error return err } - if err := d.Set("tags", keyvaluetags.SsmKeyValueTags(doc.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.SsmKeyValueTags(doc.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -344,6 +345,14 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error func resourceAwsSsmDocumentUpdate(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + // Validates permissions keys, if set, to be type and account_ids + // since ValidateFunc validates only the value not the key. + if v, ok := d.GetOk("permissions"); ok { + if errors := validateSSMDocumentPermissions(v.(map[string]interface{})); len(errors) > 0 { + return fmt.Errorf("Error validating Permissions: %v", errors) + } + } + if d.HasChange("tags") { o, n := d.GetChange("tags") @@ -672,3 +681,23 @@ func updateAwsSSMDocument(d *schema.ResourceData, meta interface{}) error { } return nil } + +//Validates that type and account_ids are defined +func validateSSMDocumentPermissions(v map[string]interface{}) (errors []error) { + k := "permissions" + t, hasType := v["type"].(string) + _, hasAccountIds := v["account_ids"].(string) + + if hasType { + if t != ssm.DocumentPermissionTypeShare { + errors = append(errors, fmt.Errorf("%q: only %s \"type\" supported", k, ssm.DocumentPermissionTypeShare)) + } + } else { + errors = append(errors, fmt.Errorf("%q: \"type\" must be defined", k)) + } + if !hasAccountIds { + errors = append(errors, fmt.Errorf("%q: \"account_ids\" must be defined", k)) + } + + return +} diff --git a/aws/resource_aws_ssm_document_test.go b/aws/resource_aws_ssm_document_test.go index d98a6f7f5ea..42f1619f24d 100644 --- a/aws/resource_aws_ssm_document_test.go +++ b/aws/resource_aws_ssm_document_test.go @@ -29,6 +29,7 @@ func TestAccAWSSSMDocument_basic(t *testing.T) { testAccCheckResourceAttrRegionalARN(resourceName, "arn", "ssm", fmt.Sprintf("document/%s", name)), testAccCheckResourceAttrRfc3339(resourceName, "created_date"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttrSet(resourceName, "document_version"), ), }, { @@ -469,6 +470,46 @@ func TestAccAWSSSMDocument_Tags(t *testing.T) { }) } +func TestValidateSSMDocumentPermissions(t *testing.T) { + validValues := []map[string]interface{}{ + { + "type": "Share", + "account_ids": "123456789012,123456789014", + }, + { + "type": "Share", + "account_ids": "all", + }, + } + + for _, s := range validValues { + errors := validateSSMDocumentPermissions(s) + if len(errors) > 0 { + t.Fatalf("%q should be valid SSM Document Permissions: %v", s, errors) + } + } + + invalidValues := []map[string]interface{}{ + {}, + {"type": ""}, + {"type": "Share"}, + {"account_ids": ""}, + {"account_ids": "all"}, + {"type": "", "account_ids": ""}, + {"type": "", "account_ids": "all"}, + {"type": "share", "account_ids": ""}, + {"type": "share", "account_ids": "all"}, + {"type": "private", "account_ids": "all"}, + } + + for _, s := range invalidValues { + errors := validateSSMDocumentPermissions(s) + if len(errors) == 0 { + t.Fatalf("%q should not be valid SSM Document Permissions: %v", s, errors) + } + } +} + func testAccCheckAWSSSMDocumentExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/aws/resource_aws_ssm_maintenance_window.go b/aws/resource_aws_ssm_maintenance_window.go index e099e44afea..de5fed8b04c 100644 --- a/aws/resource_aws_ssm_maintenance_window.go +++ b/aws/resource_aws_ssm_maintenance_window.go @@ -185,6 +185,7 @@ func resourceAwsSsmMaintenanceWindowUpdate(d *schema.ResourceData, meta interfac func resourceAwsSsmMaintenanceWindowRead(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &ssm.GetMaintenanceWindowInput{ WindowId: aws.String(d.Id()), @@ -217,7 +218,7 @@ func resourceAwsSsmMaintenanceWindowRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("error listing tags for SSM Maintenance Window (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ssm_maintenance_window_target.go b/aws/resource_aws_ssm_maintenance_window_target.go index cbd30d779e9..d33e718d440 100644 --- a/aws/resource_aws_ssm_maintenance_window_target.go +++ b/aws/resource_aws_ssm_maintenance_window_target.go @@ -2,13 +2,13 @@ package aws import ( "fmt" - "log" - "regexp" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "log" + "regexp" + "strings" ) func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { @@ -17,6 +17,17 @@ func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { Read: resourceAwsSsmMaintenanceWindowTargetRead, Update: resourceAwsSsmMaintenanceWindowTargetUpdate, Delete: resourceAwsSsmMaintenanceWindowTargetDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), "/") + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("Unexpected format of ID (%q), expected WINDOW_ID/WINDOW_TARGET_ID", d.Id()) + } + d.Set("window_id", idParts[0]) + d.SetId(idParts[1]) + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "window_id": { @@ -29,6 +40,10 @@ func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ssm.MaintenanceWindowResourceTypeInstance, + ssm.MaintenanceWindowResourceTypeResourceGroup, + }, true), }, "targets": { diff --git a/aws/resource_aws_ssm_maintenance_window_target_test.go b/aws/resource_aws_ssm_maintenance_window_target_test.go index 27b25415008..6027cfb297b 100644 --- a/aws/resource_aws_ssm_maintenance_window_target_test.go +++ b/aws/resource_aws_ssm_maintenance_window_target_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/ssm" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" @@ -14,29 +13,33 @@ import ( ) func TestAccAWSSSMMaintenanceWindowTarget_basic(t *testing.T) { - name := acctest.RandString(10) + var maint ssm.MaintenanceWindowTarget + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ssm_maintenance_window_target.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSSMMaintenanceWindowTargetBasicConfig(name), + Config: testAccAWSSSMMaintenanceWindowTargetBasicConfig(rName), 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"), - resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "name", "TestMaintenanceWindowTarget"), - resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "description", "This resource is for test purpose only"), + testAccCheckAWSSSMMaintenanceWindowTargetExists(resourceName, &maint), + resource.TestCheckResourceAttr(resourceName, "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.key", "tag:Name2"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.1", "acceptance_test2"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", "This resource is for test purpose only"), + resource.TestCheckResourceAttr(resourceName, "resource_type", ssm.MaintenanceWindowResourceTypeInstance), ), }, { - ResourceName: "aws_ssm_maintenance_window.foo", + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSSSMMaintenanceWindowTargetImportStateIdFunc(resourceName), ImportState: true, ImportStateVerify: true, }, @@ -45,27 +48,30 @@ func TestAccAWSSSMMaintenanceWindowTarget_basic(t *testing.T) { } func TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription(t *testing.T) { - name := acctest.RandString(10) + var maint ssm.MaintenanceWindowTarget + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ssm_maintenance_window_target.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSSMMaintenanceWindowTargetNoNameOrDescriptionConfig(name), + Config: testAccAWSSSMMaintenanceWindowTargetNoNameOrDescriptionConfig(rName), 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"), + testAccCheckAWSSSMMaintenanceWindowTargetExists(resourceName, &maint), + resource.TestCheckResourceAttr(resourceName, "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.key", "tag:Name2"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.1", "acceptance_test2"), ), }, { - ResourceName: "aws_ssm_maintenance_window.foo", + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSSSMMaintenanceWindowTargetImportStateIdFunc(resourceName), ImportState: true, ImportStateVerify: true, }, @@ -97,47 +103,117 @@ func TestAccAWSSSMMaintenanceWindowTarget_validation(t *testing.T) { } func TestAccAWSSSMMaintenanceWindowTarget_update(t *testing.T) { - name := acctest.RandString(10) + var maint ssm.MaintenanceWindowTarget + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ssm_maintenance_window_target.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSSMMaintenanceWindowTargetBasicConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMMaintenanceWindowTargetExists(resourceName, &maint), + resource.TestCheckResourceAttr(resourceName, "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.key", "tag:Name2"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.1", "acceptance_test2"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", "This resource is for test purpose only"), + ), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSSSMMaintenanceWindowTargetImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSSSMMaintenanceWindowTargetBasicConfigUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMMaintenanceWindowTargetExists(resourceName, &maint), + resource.TestCheckResourceAttr(resourceName, "owner_information", "something"), + resource.TestCheckResourceAttr(resourceName, "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.0", "acceptance_test"), + resource.TestCheckResourceAttr(resourceName, "targets.1.key", "tag:Updated"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.0", "new-value"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", "This resource is for test purpose only - updated"), + ), + }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSSSMMaintenanceWindowTargetImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSSSMMaintenanceWindowTarget_resourceGroup(t *testing.T) { + var maint ssm.MaintenanceWindowTarget + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ssm_maintenance_window_target.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSSMMaintenanceWindowTargetBasicConfig(name), + Config: testAccAWSSSMMaintenanceWindowTargetBasicResourceGroupConfig(rName), 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"), - resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "name", "TestMaintenanceWindowTarget"), - resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "description", "This resource is for test purpose only"), + testAccCheckAWSSSMMaintenanceWindowTargetExists(resourceName, &maint), + resource.TestCheckResourceAttr(resourceName, "targets.0.key", "resource-groups:ResourceTypeFilters"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.#", "2"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.0", "AWS::EC2::INSTANCE"), + resource.TestCheckResourceAttr(resourceName, "targets.0.values.1", "AWS::EC2::VPC"), + resource.TestCheckResourceAttr(resourceName, "targets.1.key", "resource-groups:Name"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.#", "1"), + resource.TestCheckResourceAttr(resourceName, "targets.1.values.0", "resource-group-name"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", "This resource is for test purpose only"), + resource.TestCheckResourceAttr(resourceName, "resource_type", ssm.MaintenanceWindowResourceTypeResourceGroup), ), }, { - Config: testAccAWSSSMMaintenanceWindowTargetBasicConfigUpdated(name), + ResourceName: resourceName, + ImportStateIdFunc: testAccAWSSSMMaintenanceWindowTargetImportStateIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSSSMMaintenanceWindowTarget_disappears(t *testing.T) { + var maint ssm.MaintenanceWindowTarget + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ssm_maintenance_window_target.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSSMMaintenanceWindowTargetBasicConfig(rName), 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"), - resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "name", "TestMaintenanceWindowTarget"), - resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "description", "This resource is for test purpose only - updated"), + testAccCheckAWSSSMMaintenanceWindowTargetExists(resourceName, &maint), + testAccCheckAWSSSMMaintenanceWindowTargetDisappears(&maint), ), + ExpectNonEmptyPlan: true, }, }, }) } -func testAccCheckAWSSSMMaintenanceWindowTargetExists(n string) resource.TestCheckFunc { +func testAccCheckAWSSSMMaintenanceWindowTargetExists(n string, mWindTarget *ssm.MaintenanceWindowTarget) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -165,6 +241,7 @@ func testAccCheckAWSSSMMaintenanceWindowTargetExists(n string) resource.TestChec for _, i := range resp.Targets { if *i.WindowTargetId == rs.Primary.ID { + *mWindTarget = *resp.Targets[0] return nil } } @@ -173,6 +250,20 @@ func testAccCheckAWSSSMMaintenanceWindowTargetExists(n string) resource.TestChec } } +func testAccCheckAWSSSMMaintenanceWindowTargetDisappears(mWindTarget *ssm.MaintenanceWindowTarget) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ssmconn + input := &ssm.DeregisterTargetFromMaintenanceWindowInput{ + WindowId: mWindTarget.WindowId, + WindowTargetId: mWindTarget.WindowTargetId, + } + + _, err := conn.DeregisterTargetFromMaintenanceWindow(input) + + return err + } +} + func testAccCheckAWSSSMMaintenanceWindowTargetDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ssmconn @@ -193,7 +284,7 @@ func testAccCheckAWSSSMMaintenanceWindowTargetDestroy(s *terraform.State) error if err != nil { // Verify the error is what we want - if ae, ok := err.(awserr.Error); ok && ae.Code() == "DoesNotExistException" { + if isAWSErr(err, ssm.ErrCodeDoesNotExistException, "") { continue } return err @@ -211,17 +302,17 @@ func testAccCheckAWSSSMMaintenanceWindowTargetDestroy(s *terraform.State) error func testAccAWSSSMMaintenanceWindowTargetBasicConfig(rName string) string { return fmt.Sprintf(` -resource "aws_ssm_maintenance_window" "foo" { - name = "maintenance-window-%s" +resource "aws_ssm_maintenance_window" "test" { + name = %[1]q schedule = "cron(0 16 ? * TUE *)" duration = 3 cutoff = 1 } -resource "aws_ssm_maintenance_window_target" "target" { - name = "TestMaintenanceWindowTarget" +resource "aws_ssm_maintenance_window_target" "test" { + name = %[1]q description = "This resource is for test purpose only" - window_id = "${aws_ssm_maintenance_window.foo.id}" + window_id = "${aws_ssm_maintenance_window.test.id}" resource_type = "INSTANCE" targets { @@ -237,17 +328,45 @@ resource "aws_ssm_maintenance_window_target" "target" { `, rName) } +func testAccAWSSSMMaintenanceWindowTargetBasicResourceGroupConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_ssm_maintenance_window" "test" { + name = %[1]q + schedule = "cron(0 16 ? * TUE *)" + duration = 3 + cutoff = 1 +} + +resource "aws_ssm_maintenance_window_target" "test" { + name = %[1]q + description = "This resource is for test purpose only" + window_id = "${aws_ssm_maintenance_window.test.id}" + resource_type = "RESOURCE_GROUP" + + targets { + key = "resource-groups:ResourceTypeFilters" + values = ["AWS::EC2::INSTANCE","AWS::EC2::VPC"] + } + + targets { + key = "resource-groups:Name" + values = ["resource-group-name"] + } +} +`, rName) +} + func testAccAWSSSMMaintenanceWindowTargetNoNameOrDescriptionConfig(rName string) string { return fmt.Sprintf(` -resource "aws_ssm_maintenance_window" "foo" { - name = "maintenance-window-%s" +resource "aws_ssm_maintenance_window" "test" { + name = %[1]q 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 "aws_ssm_maintenance_window_target" "test" { + window_id = "${aws_ssm_maintenance_window.test.id}" resource_type = "INSTANCE" targets { @@ -265,17 +384,17 @@ resource "aws_ssm_maintenance_window_target" "target" { func testAccAWSSSMMaintenanceWindowTargetBasicConfigUpdated(rName string) string { return fmt.Sprintf(` -resource "aws_ssm_maintenance_window" "foo" { - name = "maintenance-window-%s" +resource "aws_ssm_maintenance_window" "test" { + name = %[1]q schedule = "cron(0 16 ? * TUE *)" duration = 3 cutoff = 1 } -resource "aws_ssm_maintenance_window_target" "target" { - name = "TestMaintenanceWindowTarget" +resource "aws_ssm_maintenance_window_target" "test" { + name = %[1]q description = "This resource is for test purpose only - updated" - window_id = "${aws_ssm_maintenance_window.foo.id}" + window_id = "${aws_ssm_maintenance_window.test.id}" resource_type = "INSTANCE" owner_information = "something" @@ -294,17 +413,17 @@ resource "aws_ssm_maintenance_window_target" "target" { func testAccAWSSSMMaintenanceWindowTargetBasicConfigWithTarget(rName, tName, tDesc string) string { return fmt.Sprintf(` -resource "aws_ssm_maintenance_window" "foo" { - name = "maintenance-window-%s" +resource "aws_ssm_maintenance_window" "test" { + name = %[1]q schedule = "cron(0 16 ? * TUE *)" duration = 3 cutoff = 1 } -resource "aws_ssm_maintenance_window_target" "target" { - name = "%s" - description = "%s" - window_id = "${aws_ssm_maintenance_window.foo.id}" +resource "aws_ssm_maintenance_window_target" "test" { + name = %[2]q + description = %[3]q + window_id = "${aws_ssm_maintenance_window.test.id}" resource_type = "INSTANCE" owner_information = "something" @@ -320,3 +439,14 @@ resource "aws_ssm_maintenance_window_target" "target" { } `, rName, tName, tDesc) } + +func testAccAWSSSMMaintenanceWindowTargetImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return fmt.Sprintf("%s/%s", rs.Primary.Attributes["window_id"], rs.Primary.ID), nil + } +} diff --git a/aws/resource_aws_ssm_parameter.go b/aws/resource_aws_ssm_parameter.go index 43d87163157..37eafae8414 100644 --- a/aws/resource_aws_ssm_parameter.go +++ b/aws/resource_aws_ssm_parameter.go @@ -20,7 +20,6 @@ func resourceAwsSsmParameter() *schema.Resource { Read: resourceAwsSsmParameterRead, Update: resourceAwsSsmParameterPut, Delete: resourceAwsSsmParameterDelete, - Exists: resourceAwsSmmParameterExists, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, @@ -93,24 +92,9 @@ func resourceAwsSsmParameter() *schema.Resource { } } -func resourceAwsSmmParameterExists(d *schema.ResourceData, meta interface{}) (bool, error) { - ssmconn := meta.(*AWSClient).ssmconn - _, err := ssmconn.GetParameter(&ssm.GetParameterInput{ - Name: aws.String(d.Id()), - WithDecryption: aws.Bool(false), - }) - if err != nil { - if isAWSErr(err, ssm.ErrCodeParameterNotFound, "") { - return false, nil - } - return false, err - } - - return true, nil -} - func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig log.Printf("[DEBUG] Reading SSM Parameter: %s", d.Id()) @@ -118,8 +102,13 @@ func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error Name: aws.String(d.Id()), WithDecryption: aws.Bool(true), }) + if isAWSErr(err, ssm.ErrCodeParameterNotFound, "") { + log.Printf("[WARN] SSM Parameter (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } if err != nil { - return fmt.Errorf("error getting SSM parameter: %s", err) + return fmt.Errorf("error reading SSM Parameter (%s): %w", d.Id(), err) } param := resp.Parameter @@ -161,10 +150,10 @@ func resourceAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error tags, err := keyvaluetags.SsmListTags(ssmconn, name, ssm.ResourceTypeForTaggingParameter) if err != nil { - return fmt.Errorf("error listing tags for SSM Maintenance Window (%s): %s", name, err) + return fmt.Errorf("error listing tags for SSM Parameter (%s): %s", name, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ssm_patch_baseline.go b/aws/resource_aws_ssm_patch_baseline.go index d1853aa69d7..aaeac579163 100644 --- a/aws/resource_aws_ssm_patch_baseline.go +++ b/aws/resource_aws_ssm_patch_baseline.go @@ -247,6 +247,7 @@ func resourceAwsSsmPatchBaselineUpdate(d *schema.ResourceData, meta interface{}) } func resourceAwsSsmPatchBaselineRead(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &ssm.GetPatchBaselineInput{ BaselineId: aws.String(d.Id()), @@ -283,7 +284,7 @@ func resourceAwsSsmPatchBaselineRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error listing tags for SSM Patch Baseline (%s): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_ssm_patch_baseline_test.go b/aws/resource_aws_ssm_patch_baseline_test.go index f9bdc34cf9b..438392a833c 100644 --- a/aws/resource_aws_ssm_patch_baseline_test.go +++ b/aws/resource_aws_ssm_patch_baseline_test.go @@ -16,9 +16,10 @@ func TestAccAWSSSMPatchBaseline_basic(t *testing.T) { name := acctest.RandString(10) resourceName := "aws_ssm_patch_baseline.foo" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSSMPatchBaselineDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSSMPatchBaselineDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSSSMPatchBaselineBasicConfig(name), diff --git a/aws/resource_aws_storagegateway_cache_test.go b/aws/resource_aws_storagegateway_cache_test.go index cb5e25ee5e0..875c02f6481 100644 --- a/aws/resource_aws_storagegateway_cache_test.go +++ b/aws/resource_aws_storagegateway_cache_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -71,19 +70,21 @@ func TestDecodeStorageGatewayCacheID(t *testing.T) { func TestAccAWSStorageGatewayCache_FileGateway(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cache.test" + gatewayResourceName := "aws_storagegateway_gateway.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - // Storage Gateway API does not support removing caches - CheckDestroy: nil, + // Storage Gateway API does not support removing caches, + // but we want to ensure other resources are removed. + CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, Steps: []resource.TestStep{ { Config: testAccAWSStorageGatewayCacheConfig_FileGateway(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewayCacheExists(resourceName), resource.TestCheckResourceAttrSet(resourceName, "disk_id"), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:[^:]+:storagegateway:[^:]+:[^:]+:gateway/sgw-.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), ), }, { @@ -98,19 +99,21 @@ func TestAccAWSStorageGatewayCache_FileGateway(t *testing.T) { func TestAccAWSStorageGatewayCache_TapeAndVolumeGateway(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cache.test" + gatewayResourceName := "aws_storagegateway_gateway.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - // Storage Gateway API does not support removing caches - CheckDestroy: nil, + // Storage Gateway API does not support removing caches, + // but we want to ensure other resources are removed. + CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, Steps: []resource.TestStep{ { Config: testAccAWSStorageGatewayCacheConfig_TapeAndVolumeGateway(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewayCacheExists(resourceName), resource.TestCheckResourceAttrSet(resourceName, "disk_id"), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:[^:]+:storagegateway:[^:]+:[^:]+:gateway/sgw-.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), ), }, { @@ -163,7 +166,7 @@ func testAccCheckAWSStorageGatewayCacheExists(resourceName string) resource.Test func testAccAWSStorageGatewayCacheConfig_FileGateway(rName string) string { return testAccAWSStorageGatewayGatewayConfig_GatewayType_FileS3(rName) + fmt.Sprintf(` resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" + availability_zone = aws_instance.test.availability_zone size = "10" type = "gp2" @@ -175,18 +178,27 @@ resource "aws_ebs_volume" "test" { resource "aws_volume_attachment" "test" { device_name = "/dev/xvdb" force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" + instance_id = aws_instance.test.id + volume_id = aws_ebs_volume.test.id } data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_node = aws_volume_attachment.test.device_name + gateway_arn = aws_storagegateway_gateway.test.arn } resource "aws_storagegateway_cache" "test" { - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + # ACCEPTANCE TESTING WORKAROUND: + # Data sources are not refreshed before plan after apply in TestStep + # Step 0 error: After applying this step, the plan was not empty: + # disk_id: "877ee674-99d3-4cd4-99f0-aadae7e3942b" => "/dev/nvme1n1" (forces new resource) + # We expect this data source value to change due to how Storage Gateway works. + lifecycle { + ignore_changes = ["disk_id"] + } + + disk_id = data.aws_storagegateway_local_disk.test.id + gateway_arn = aws_storagegateway_gateway.test.arn } `, rName) } @@ -194,7 +206,7 @@ resource "aws_storagegateway_cache" "test" { func testAccAWSStorageGatewayCacheConfig_TapeAndVolumeGateway(rName string) string { return testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName) + fmt.Sprintf(` resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" + availability_zone = aws_instance.test.availability_zone size = "10" type = "gp2" @@ -206,13 +218,13 @@ resource "aws_ebs_volume" "test" { resource "aws_volume_attachment" "test" { device_name = "/dev/xvdc" force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" + instance_id = aws_instance.test.id + volume_id = aws_ebs_volume.test.id } data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_node = aws_volume_attachment.test.device_name + gateway_arn = aws_storagegateway_gateway.test.arn } resource "aws_storagegateway_cache" "test" { @@ -225,8 +237,8 @@ resource "aws_storagegateway_cache" "test" { ignore_changes = ["disk_id"] } - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_id = data.aws_storagegateway_local_disk.test.id + gateway_arn = aws_storagegateway_gateway.test.arn } `, rName) } diff --git a/aws/resource_aws_storagegateway_cached_iscsi_volume.go b/aws/resource_aws_storagegateway_cached_iscsi_volume.go index 23905e78c55..88177a88e83 100644 --- a/aws/resource_aws_storagegateway_cached_iscsi_volume.go +++ b/aws/resource_aws_storagegateway_cached_iscsi_volume.go @@ -137,6 +137,7 @@ func resourceAwsStorageGatewayCachedIscsiVolumeUpdate(d *schema.ResourceData, me func resourceAwsStorageGatewayCachedIscsiVolumeRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).storagegatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &storagegateway.DescribeCachediSCSIVolumesInput{ VolumeARNs: []*string{aws.String(d.Id())}, @@ -173,7 +174,7 @@ func resourceAwsStorageGatewayCachedIscsiVolumeRead(d *schema.ResourceData, meta if err != nil { return fmt.Errorf("error listing tags for resource (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go b/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go index 444fbd3d490..80d98119d04 100644 --- a/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go +++ b/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go @@ -291,28 +291,30 @@ func testAccCheckAWSStorageGatewayCachedIscsiVolumeDestroy(s *terraform.State) e return nil } -func testAccAWSStorageGatewayCachedIscsiVolumeConfig_Basic(rName string) string { - return testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName) + fmt.Sprintf(` +func testAccAWSStorageGatewayCachedIscsiVolumeConfigBase(rName string) string { + return composeConfig( + testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName), + fmt.Sprintf(` resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" + availability_zone = aws_instance.test.availability_zone size = 10 type = "gp2" tags = { - Name = %q + Name = %[1]q } } resource "aws_volume_attachment" "test" { device_name = "/dev/xvdc" force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" + instance_id = aws_instance.test.id + volume_id = aws_ebs_volume.test.id } data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_node = aws_volume_attachment.test.device_name + gateway_arn = aws_storagegateway_gateway.test.arn } resource "aws_storagegateway_cache" "test" { @@ -325,258 +327,109 @@ resource "aws_storagegateway_cache" "test" { ignore_changes = ["disk_id"] } - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_id = data.aws_storagegateway_local_disk.test.id + gateway_arn = aws_storagegateway_gateway.test.arn +} +`, rName)) } +func testAccAWSStorageGatewayCachedIscsiVolumeConfig_Basic(rName string) string { + return composeConfig( + testAccAWSStorageGatewayCachedIscsiVolumeConfigBase(rName), + fmt.Sprintf(` resource "aws_storagegateway_cached_iscsi_volume" "test" { - gateway_arn = "${aws_storagegateway_cache.test.gateway_arn}" - network_interface_id = "${aws_instance.test.private_ip}" - target_name = %q + gateway_arn = aws_storagegateway_cache.test.gateway_arn + network_interface_id = aws_instance.test.private_ip + target_name = %[1]q volume_size_in_bytes = 5368709120 } -`, rName, rName) +`, rName)) } func testAccAWSStorageGatewayCachedIscsiVolumeConfigTags1(rName, tagKey1, tagValue1 string) string { - return testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName) + fmt.Sprintf(` -resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" - size = 10 - type = "gp2" - - tags = { - Name = %q - } -} - -resource "aws_volume_attachment" "test" { - device_name = "/dev/xvdc" - force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" -} - -data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - -resource "aws_storagegateway_cache" "test" { - # ACCEPTANCE TESTING WORKAROUND: - # Data sources are not refreshed before plan after apply in TestStep - # Step 0 error: After applying this step, the plan was not empty: - # disk_id: "0b68f77a-709b-4c79-ad9d-d7728014b291" => "/dev/xvdc" (forces new resource) - # We expect this data source value to change due to how Storage Gateway works. - lifecycle { - ignore_changes = ["disk_id"] - } - - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - + return composeConfig( + testAccAWSStorageGatewayCachedIscsiVolumeConfigBase(rName), + fmt.Sprintf(` resource "aws_storagegateway_cached_iscsi_volume" "test" { - gateway_arn = "${aws_storagegateway_cache.test.gateway_arn}" - network_interface_id = "${aws_instance.test.private_ip}" - target_name = %q + gateway_arn = aws_storagegateway_cache.test.gateway_arn + network_interface_id = aws_instance.test.private_ip + target_name = %[1]q volume_size_in_bytes = 5368709120 tags = { - %q = %q + %[2]q = %[3]q } } -`, rName, rName, tagKey1, tagValue1) +`, rName, tagKey1, tagValue1)) } func testAccAWSStorageGatewayCachedIscsiVolumeConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { - return testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName) + fmt.Sprintf(` -resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" - size = 10 - type = "gp2" - - tags = { - Name = %q - } -} - -resource "aws_volume_attachment" "test" { - device_name = "/dev/xvdc" - force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" -} - -data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - -resource "aws_storagegateway_cache" "test" { - # ACCEPTANCE TESTING WORKAROUND: - # Data sources are not refreshed before plan after apply in TestStep - # Step 0 error: After applying this step, the plan was not empty: - # disk_id: "0b68f77a-709b-4c79-ad9d-d7728014b291" => "/dev/xvdc" (forces new resource) - # We expect this data source value to change due to how Storage Gateway works. - lifecycle { - ignore_changes = ["disk_id"] - } - - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - + return composeConfig( + testAccAWSStorageGatewayCachedIscsiVolumeConfigBase(rName), + fmt.Sprintf(` resource "aws_storagegateway_cached_iscsi_volume" "test" { - gateway_arn = "${aws_storagegateway_cache.test.gateway_arn}" - network_interface_id = "${aws_instance.test.private_ip}" - target_name = %q + gateway_arn = aws_storagegateway_cache.test.gateway_arn + network_interface_id = aws_instance.test.private_ip + target_name = %[1]q volume_size_in_bytes = 5368709120 tags = { - %q = %q - %q = %q + %[2]q = %[3]q + %[4]q = %[5]q } } -`, rName, rName, tagKey1, tagValue1, tagKey2, tagValue2) +`, rName, tagKey1, tagValue1, tagKey2, tagValue2)) } func testAccAWSStorageGatewayCachedIscsiVolumeConfig_SnapshotId(rName string) string { - return testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName) + fmt.Sprintf(` -resource "aws_ebs_volume" "cachevolume" { - availability_zone = "${aws_instance.test.availability_zone}" - size = 10 - type = "gp2" - - tags = { - Name = %q - } -} - -resource "aws_volume_attachment" "test" { - device_name = "/dev/xvdc" - force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.cachevolume.id}" -} - -data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - -resource "aws_storagegateway_cache" "test" { - # ACCEPTANCE TESTING WORKAROUND: - # Data sources are not refreshed before plan after apply in TestStep - # Step 0 error: After applying this step, the plan was not empty: - # disk_id: "0b68f77a-709b-4c79-ad9d-d7728014b291" => "/dev/xvdc" (forces new resource) - # We expect this data source value to change due to how Storage Gateway works. - lifecycle { - ignore_changes = ["disk_id"] - } - - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - + return composeConfig( + testAccAWSStorageGatewayCachedIscsiVolumeConfigBase(rName), + fmt.Sprintf(` resource "aws_ebs_volume" "snapvolume" { - availability_zone = "${aws_instance.test.availability_zone}" + availability_zone = aws_instance.test.availability_zone size = 5 type = "gp2" tags = { - Name = %q + Name = %[1]q } } resource "aws_ebs_snapshot" "test" { - volume_id = "${aws_ebs_volume.snapvolume.id}" + volume_id = aws_ebs_volume.snapvolume.id tags = { - Name = %q + Name = %[1]q } } resource "aws_storagegateway_cached_iscsi_volume" "test" { - gateway_arn = "${aws_storagegateway_cache.test.gateway_arn}" - network_interface_id = "${aws_instance.test.private_ip}" - snapshot_id = "${aws_ebs_snapshot.test.id}" - target_name = %q - volume_size_in_bytes = "${aws_ebs_snapshot.test.volume_size * 1024 * 1024 * 1024}" + gateway_arn = aws_storagegateway_cache.test.gateway_arn + network_interface_id = aws_instance.test.private_ip + snapshot_id = aws_ebs_snapshot.test.id + target_name = %[1]q + volume_size_in_bytes = aws_ebs_snapshot.test.volume_size * 1024 * 1024 * 1024 } -`, rName, rName, rName, rName) +`, rName)) } func testAccAWSStorageGatewayCachedIscsiVolumeConfig_SourceVolumeArn(rName string) string { - return testAccAWSStorageGatewayGatewayConfig_GatewayType_Cached(rName) + fmt.Sprintf(` -data "aws_storagegateway_local_disk" "uploadbuffer" { - disk_path = "/dev/xvdb" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - -resource "aws_storagegateway_upload_buffer" "test" { - # ACCEPTANCE TESTING WORKAROUND: - # Data sources are not refreshed before plan after apply in TestStep - # Step 0 error: After applying this step, the plan was not empty: - # disk_id: "0b68f77a-709b-4c79-ad9d-d7728014b291" => "/dev/xvdc" (forces new resource) - # We expect this data source value to change due to how Storage Gateway works. - lifecycle { - ignore_changes = ["disk_id"] - } - - disk_id = "${data.aws_storagegateway_local_disk.uploadbuffer.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - -resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" - size = 10 - type = "gp2" - - tags = { - Name = %q - } -} - -resource "aws_volume_attachment" "test" { - device_name = "/dev/xvdc" - force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" -} - -data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - -resource "aws_storagegateway_cache" "test" { - # ACCEPTANCE TESTING WORKAROUND: - # Data sources are not refreshed before plan after apply in TestStep - # Step 0 error: After applying this step, the plan was not empty: - # disk_id: "0b68f77a-709b-4c79-ad9d-d7728014b291" => "/dev/xvdc" (forces new resource) - # We expect this data source value to change due to how Storage Gateway works. - lifecycle { - ignore_changes = ["disk_id"] - } - - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" -} - + return composeConfig( + testAccAWSStorageGatewayCachedIscsiVolumeConfigBase(rName), + fmt.Sprintf(` resource "aws_storagegateway_cached_iscsi_volume" "source" { - gateway_arn = "${aws_storagegateway_cache.test.gateway_arn}" - network_interface_id = "${aws_instance.test.private_ip}" - target_name = "%s-source" + gateway_arn = aws_storagegateway_cache.test.gateway_arn + network_interface_id = aws_instance.test.private_ip + target_name = "%[1]s-source" volume_size_in_bytes = 1073741824 } resource "aws_storagegateway_cached_iscsi_volume" "test" { - gateway_arn = "${aws_storagegateway_cache.test.gateway_arn}" - network_interface_id = "${aws_instance.test.private_ip}" - source_volume_arn = "${aws_storagegateway_cached_iscsi_volume.source.arn}" - target_name = %q - volume_size_in_bytes = "${aws_storagegateway_cached_iscsi_volume.source.volume_size_in_bytes}" + gateway_arn = aws_storagegateway_cache.test.gateway_arn + network_interface_id = aws_instance.test.private_ip + source_volume_arn = aws_storagegateway_cached_iscsi_volume.source.arn + target_name = %[1]q + volume_size_in_bytes = aws_storagegateway_cached_iscsi_volume.source.volume_size_in_bytes } -`, rName, rName, rName) +`, rName)) } diff --git a/aws/resource_aws_storagegateway_gateway.go b/aws/resource_aws_storagegateway_gateway.go index 6389fc922d3..5c660ab9530 100644 --- a/aws/resource_aws_storagegateway_gateway.go +++ b/aws/resource_aws_storagegateway_gateway.go @@ -16,6 +16,10 @@ import ( "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) +const ( + StorageGatewayGatewayConnected = "GatewayConnected" +) + func resourceAwsStorageGatewayGateway() *schema.Resource { return &schema.Resource{ Create: resourceAwsStorageGatewayGatewayCreate, @@ -46,6 +50,11 @@ func resourceAwsStorageGatewayGateway() *schema.Resource { ForceNew: true, ConflictsWith: []string{"gateway_ip_address"}, }, + "gateway_vpc_endpoint": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, "gateway_id": { Type: schema.TypeString, Computed: true, @@ -154,6 +163,10 @@ func resourceAwsStorageGatewayGatewayCreate(d *schema.ResourceData, meta interfa } requestURL := fmt.Sprintf("http://%s/?activationRegion=%s", gatewayIpAddress, region) + if v, ok := d.GetOk("gateway_vpc_endpoint"); ok { + requestURL = fmt.Sprintf("%s&vpcEndpoint=%s", requestURL, v.(string)) + } + log.Printf("[DEBUG] Creating HTTP request: %s", requestURL) request, err := http.NewRequest("GET", requestURL, nil) if err != nil { @@ -164,14 +177,25 @@ func resourceAwsStorageGatewayGatewayCreate(d *schema.ResourceData, meta interfa err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { log.Printf("[DEBUG] Making HTTP request: %s", request.URL.String()) response, err = client.Do(request) + if err != nil { if err, ok := err.(net.Error); ok { errMessage := fmt.Errorf("error making HTTP request: %s", err) log.Printf("[DEBUG] retryable %s", errMessage) return resource.RetryableError(errMessage) } + return resource.NonRetryableError(fmt.Errorf("error making HTTP request: %s", err)) } + + for _, retryableStatusCode := range []int{504} { + if response.StatusCode == retryableStatusCode { + errMessage := fmt.Errorf("status code in HTTP response: %d", response.StatusCode) + log.Printf("[DEBUG] retryable %s", errMessage) + return resource.RetryableError(errMessage) + } + } + return nil }) if isResourceTimeoutError(err) { @@ -222,28 +246,7 @@ func resourceAwsStorageGatewayGatewayCreate(d *schema.ResourceData, meta interfa d.SetId(aws.StringValue(output.GatewayARN)) - // Gateway activations can take a few minutes - gwInput := &storagegateway.DescribeGatewayInformationInput{ - GatewayARN: aws.String(d.Id()), - } - err = resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - _, err := conn.DescribeGatewayInformation(gwInput) - if err != nil { - if isAWSErr(err, storagegateway.ErrorCodeGatewayNotConnected, "") { - return resource.RetryableError(err) - } - if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - - return nil - }) - if isResourceTimeoutError(err) { - _, err = conn.DescribeGatewayInformation(gwInput) - } - if err != nil { + if _, err := WaitForStorageGatewayGatewayConnected(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return fmt.Errorf("error waiting for Storage Gateway Gateway activation: %s", err) } @@ -295,13 +298,16 @@ func resourceAwsStorageGatewayGatewayCreate(d *schema.ResourceData, meta interfa func resourceAwsStorageGatewayGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).storagegatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &storagegateway.DescribeGatewayInformationInput{ GatewayARN: aws.String(d.Id()), } log.Printf("[DEBUG] Reading Storage Gateway Gateway: %s", input) + output, err := conn.DescribeGatewayInformation(input) + if err != nil { if isAWSErrStorageGatewayGatewayNotFound(err) { log.Printf("[WARN] Storage Gateway Gateway %q not found - removing from state", d.Id()) @@ -311,7 +317,7 @@ func resourceAwsStorageGatewayGatewayRead(d *schema.ResourceData, meta interface return fmt.Errorf("error reading Storage Gateway Gateway: %s", err) } - if err := d.Set("tags", keyvaluetags.StoragegatewayKeyValueTags(output.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.StoragegatewayKeyValueTags(output.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -344,6 +350,7 @@ func resourceAwsStorageGatewayGatewayRead(d *schema.ResourceData, meta interface d.Set("gateway_name", output.GatewayName) d.Set("gateway_timezone", output.GatewayTimezone) d.Set("gateway_type", output.GatewayType) + d.Set("gateway_vpc_endpoint", output.VPCEndpoint) // The Storage Gateway API currently provides no way to read this value // We allow Terraform to passthrough the configuration value into the state @@ -482,3 +489,43 @@ func isAWSErrStorageGatewayGatewayNotFound(err error) bool { } return false } + +func StorageGatewayGatewayConnectedStatus(conn *storagegateway.StorageGateway, gatewayARN string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &storagegateway.DescribeGatewayInformationInput{ + GatewayARN: aws.String(gatewayARN), + } + + output, err := conn.DescribeGatewayInformation(input) + + if isAWSErr(err, storagegateway.ErrCodeInvalidGatewayRequestException, "The specified gateway is not connected") { + return output, storagegateway.ErrorCodeGatewayNotConnected, nil + } + + if err != nil { + return output, "", err + } + + return output, StorageGatewayGatewayConnected, nil + } +} + +func WaitForStorageGatewayGatewayConnected(conn *storagegateway.StorageGateway, gatewayARN string, timeout time.Duration) (*storagegateway.DescribeGatewayInformationOutput, error) { + stateConf := &resource.StateChangeConf{ + Pending: []string{storagegateway.ErrorCodeGatewayNotConnected}, + Target: []string{StorageGatewayGatewayConnected}, + Refresh: StorageGatewayGatewayConnectedStatus(conn, gatewayARN), + Timeout: timeout, + MinTimeout: 10 * time.Second, + ContinuousTargetOccurence: 6, // Gateway activations can take a few seconds and can trigger a reboot of the Gateway + } + + outputRaw, err := stateConf.WaitForState() + + switch output := outputRaw.(type) { + case *storagegateway.DescribeGatewayInformationOutput: + return output, err + default: + return nil, err + } +} diff --git a/aws/resource_aws_storagegateway_gateway_test.go b/aws/resource_aws_storagegateway_gateway_test.go index df61efc101f..953d05fb30e 100644 --- a/aws/resource_aws_storagegateway_gateway_test.go +++ b/aws/resource_aws_storagegateway_gateway_test.go @@ -345,6 +345,34 @@ func TestAccAWSStorageGatewayGateway_GatewayTimezone(t *testing.T) { }) } +func TestAccAWSStorageGatewayGateway_GatewayVpcEndpoint(t *testing.T) { + var gateway storagegateway.DescribeGatewayInformationOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_storagegateway_gateway.test" + vpcEndpointResourceName := "aws_vpc_endpoint.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSStorageGatewayGatewayConfig_GatewayVpcEndpoint(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSStorageGatewayGatewayExists(resourceName, &gateway), + resource.TestCheckResourceAttrPair(resourceName, "gateway_vpc_endpoint", vpcEndpointResourceName, "dns_entry.0.dns_name"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"activation_key", "gateway_ip_address"}, + }, + }, + }) +} + func TestAccAWSStorageGatewayGateway_SmbActiveDirectorySettings(t *testing.T) { var gateway storagegateway.DescribeGatewayInformationOutput rName := acctest.RandomWithPrefix("tf-acc-test") @@ -490,22 +518,10 @@ resource "aws_internet_gateway" "test" { } } -resource "aws_route_table" "test" { - vpc_id = aws_vpc.test.id - - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.test.id - } - - tags = { - Name = %[1]q - } -} - -resource "aws_route_table_association" "test" { - subnet_id = aws_subnet.test.id - route_table_id = aws_route_table.test.id +resource "aws_route" "test" { + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.test.id + route_table_id = aws_vpc.test.main_route_table_id } resource "aws_security_group" "test" { @@ -556,7 +572,7 @@ data "aws_ssm_parameter" "aws_service_storagegateway_ami_FILE_S3_latest" { } resource "aws_instance" "test" { - depends_on = ["aws_internet_gateway.test"] + depends_on = ["aws_route.test"] ami = data.aws_ssm_parameter.aws_service_storagegateway_ami_FILE_S3_latest.value associate_public_ip_address = true @@ -596,7 +612,7 @@ data "aws_ssm_parameter" "aws_service_storagegateway_ami_CACHED_latest" { } resource "aws_instance" "test" { - depends_on = ["aws_internet_gateway.test"] + depends_on = ["aws_route.test"] ami = data.aws_ssm_parameter.aws_service_storagegateway_ami_CACHED_latest.value associate_public_ip_address = true @@ -682,11 +698,40 @@ resource "aws_storagegateway_gateway" "test" { `, rName, gatewayTimezone) } +func testAccAWSStorageGatewayGatewayConfig_GatewayVpcEndpoint(rName string) string { + return testAccAWSStorageGateway_TapeAndVolumeGatewayBase(rName) + fmt.Sprintf(` +data "aws_vpc_endpoint_service" "storagegateway" { + service = "storagegateway" +} + +resource "aws_vpc_endpoint" "test" { + security_group_ids = [aws_security_group.test.id] + service_name = data.aws_vpc_endpoint_service.storagegateway.service_name + subnet_ids = [aws_subnet.test.id] + vpc_endpoint_type = data.aws_vpc_endpoint_service.storagegateway.service_type + vpc_id = aws_vpc.test.id +} + +resource "aws_storagegateway_gateway" "test" { + gateway_ip_address = aws_instance.test.public_ip + gateway_name = %[1]q + gateway_timezone = "GMT" + gateway_type = "CACHED" + gateway_vpc_endpoint = aws_vpc_endpoint.test.dns_entry[0].dns_name +} +`, rName) +} + func testAccAWSStorageGatewayGatewayConfig_SmbActiveDirectorySettings(rName string) string { return fmt.Sprintf(` # Directory Service Directories must be deployed across multiple EC2 Availability Zones data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } resource "aws_vpc" "test" { @@ -717,24 +762,10 @@ resource "aws_internet_gateway" "test" { } } -resource "aws_route_table" "test" { - vpc_id = aws_vpc.test.id - - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.test.id - } - - tags = { - Name = %[1]q - } -} - -resource "aws_route_table_association" "test" { - count = 2 - - subnet_id = aws_subnet.test[count.index].id - route_table_id = aws_route_table.test.id +resource "aws_route" "test" { + destination_cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.test.id + route_table_id = aws_vpc.test.main_route_table_id } resource "aws_security_group" "test" { @@ -810,7 +841,7 @@ data "aws_ssm_parameter" "aws_service_storagegateway_ami_FILE_S3_latest" { } resource "aws_instance" "test" { - depends_on = [aws_internet_gateway.test, aws_vpc_dhcp_options_association.test] + depends_on = [aws_route.test, aws_vpc_dhcp_options_association.test] ami = data.aws_ssm_parameter.aws_service_storagegateway_ami_FILE_S3_latest.value associate_public_ip_address = true diff --git a/aws/resource_aws_storagegateway_nfs_file_share.go b/aws/resource_aws_storagegateway_nfs_file_share.go index 289b1c2bd1d..397837c357c 100644 --- a/aws/resource_aws_storagegateway_nfs_file_share.go +++ b/aws/resource_aws_storagegateway_nfs_file_share.go @@ -126,6 +126,10 @@ func resourceAwsStorageGatewayNfsFileShare() *schema.Resource { storagegateway.ObjectACLPublicReadWrite, }, false), }, + "path": { + Type: schema.TypeString, + Computed: true, + }, "read_only": { Type: schema.TypeBool, Optional: true, @@ -207,6 +211,7 @@ func resourceAwsStorageGatewayNfsFileShareCreate(d *schema.ResourceData, meta in func resourceAwsStorageGatewayNfsFileShareRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).storagegatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &storagegateway.DescribeNFSFileSharesInput{ FileShareARNList: []*string{aws.String(d.Id())}, @@ -261,7 +266,7 @@ func resourceAwsStorageGatewayNfsFileShareRead(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("error listing tags for resource (%s): %s", *arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_storagegateway_nfs_file_share_test.go b/aws/resource_aws_storagegateway_nfs_file_share_test.go index aefa6abc64f..ad6f4e3358f 100644 --- a/aws/resource_aws_storagegateway_nfs_file_share_test.go +++ b/aws/resource_aws_storagegateway_nfs_file_share_test.go @@ -16,11 +16,15 @@ func TestAccAWSStorageGatewayNfsFileShare_basic(t *testing.T) { var nfsFileShare storagegateway.NFSFileShareInfo rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" + gatewayResourceName := "aws_storagegateway_gateway.test" + bucketResourceName := "aws_s3_bucket.test" + iamResourceName := "aws_iam_role.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSStorageGatewayNfsFileShareConfig_Required(rName), @@ -31,16 +35,17 @@ func TestAccAWSStorageGatewayNfsFileShare_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "client_list.217649824", "0.0.0.0/0"), resource.TestCheckResourceAttr(resourceName, "default_storage_class", "S3_STANDARD"), resource.TestMatchResourceAttr(resourceName, "fileshare_id", regexp.MustCompile(`^share-`)), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "guess_mime_type_enabled", "true"), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "false"), resource.TestCheckResourceAttr(resourceName, "kms_key_arn", ""), - resource.TestMatchResourceAttr(resourceName, "location_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "location_arn", bucketResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "nfs_file_share_defaults.#", "0"), resource.TestCheckResourceAttr(resourceName, "object_acl", storagegateway.ObjectACLPrivate), + resource.TestMatchResourceAttr(resourceName, "path", regexp.MustCompile(`^/.+`)), resource.TestCheckResourceAttr(resourceName, "read_only", "false"), resource.TestCheckResourceAttr(resourceName, "requester_pays", "false"), - resource.TestMatchResourceAttr(resourceName, "role_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "role_arn", iamResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "squash", "RootSquash"), ), }, @@ -240,6 +245,8 @@ func TestAccAWSStorageGatewayNfsFileShare_KMSKeyArn(t *testing.T) { var nfsFileShare storagegateway.NFSFileShareInfo rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" + keyName := "aws_kms_key.test.0" + keyUpdatedName := "aws_kms_key.test.1" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -251,7 +258,7 @@ func TestAccAWSStorageGatewayNfsFileShare_KMSKeyArn(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewayNfsFileShareExists(resourceName, &nfsFileShare), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "true"), - resource.TestMatchResourceAttr(resourceName, "kms_key_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_arn", keyName, "arn"), ), }, { @@ -259,7 +266,7 @@ func TestAccAWSStorageGatewayNfsFileShare_KMSKeyArn(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewayNfsFileShareExists(resourceName, &nfsFileShare), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "true"), - resource.TestMatchResourceAttr(resourceName, "kms_key_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_arn", keyUpdatedName, "arn"), ), }, { diff --git a/aws/resource_aws_storagegateway_smb_file_share.go b/aws/resource_aws_storagegateway_smb_file_share.go index d4512b156fc..21c5fb89c06 100644 --- a/aws/resource_aws_storagegateway_smb_file_share.go +++ b/aws/resource_aws_storagegateway_smb_file_share.go @@ -103,6 +103,10 @@ func resourceAwsStorageGatewaySmbFileShare() *schema.Resource { storagegateway.ObjectACLPublicReadWrite, }, false), }, + "path": { + Type: schema.TypeString, + Computed: true, + }, "read_only": { Type: schema.TypeBool, Optional: true, @@ -179,6 +183,7 @@ func resourceAwsStorageGatewaySmbFileShareCreate(d *schema.ResourceData, meta in func resourceAwsStorageGatewaySmbFileShareRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).storagegatewayconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &storagegateway.DescribeSMBFileSharesInput{ FileShareARNList: []*string{aws.String(d.Id())}, @@ -232,7 +237,7 @@ func resourceAwsStorageGatewaySmbFileShareRead(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("error listing tags for resource (%s): %s", *arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_storagegateway_smb_file_share_test.go b/aws/resource_aws_storagegateway_smb_file_share_test.go index fcde2602673..edc9a261d83 100644 --- a/aws/resource_aws_storagegateway_smb_file_share_test.go +++ b/aws/resource_aws_storagegateway_smb_file_share_test.go @@ -16,6 +16,9 @@ func TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory(t *test var smbFileShare storagegateway.SMBFileShareInfo rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" + gatewayResourceName := "aws_storagegateway_gateway.test" + bucketResourceName := "aws_s3_bucket.test" + iamResourceName := "aws_iam_role.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -30,16 +33,17 @@ func TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory(t *test resource.TestCheckResourceAttr(resourceName, "authentication", "ActiveDirectory"), resource.TestCheckResourceAttr(resourceName, "default_storage_class", "S3_STANDARD"), resource.TestMatchResourceAttr(resourceName, "fileshare_id", regexp.MustCompile(`^share-`)), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "guess_mime_type_enabled", "true"), resource.TestCheckResourceAttr(resourceName, "invalid_user_list.#", "0"), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "false"), resource.TestCheckResourceAttr(resourceName, "kms_key_arn", ""), - resource.TestMatchResourceAttr(resourceName, "location_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "location_arn", bucketResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "object_acl", storagegateway.ObjectACLPrivate), + resource.TestMatchResourceAttr(resourceName, "path", regexp.MustCompile(`^/.+`)), resource.TestCheckResourceAttr(resourceName, "read_only", "false"), resource.TestCheckResourceAttr(resourceName, "requester_pays", "false"), - resource.TestMatchResourceAttr(resourceName, "role_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "role_arn", iamResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "valid_user_list.#", "0"), ), }, @@ -56,6 +60,9 @@ func TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess(t *testing. var smbFileShare storagegateway.SMBFileShareInfo rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" + gatewayResourceName := "aws_storagegateway_gateway.test" + bucketResourceName := "aws_s3_bucket.test" + iamResourceName := "aws_iam_role.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -70,16 +77,16 @@ func TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess(t *testing. resource.TestCheckResourceAttr(resourceName, "authentication", "GuestAccess"), resource.TestCheckResourceAttr(resourceName, "default_storage_class", "S3_STANDARD"), resource.TestMatchResourceAttr(resourceName, "fileshare_id", regexp.MustCompile(`^share-`)), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "guess_mime_type_enabled", "true"), resource.TestCheckResourceAttr(resourceName, "invalid_user_list.#", "0"), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "false"), resource.TestCheckResourceAttr(resourceName, "kms_key_arn", ""), - resource.TestMatchResourceAttr(resourceName, "location_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "location_arn", bucketResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "object_acl", storagegateway.ObjectACLPrivate), resource.TestCheckResourceAttr(resourceName, "read_only", "false"), resource.TestCheckResourceAttr(resourceName, "requester_pays", "false"), - resource.TestMatchResourceAttr(resourceName, "role_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "role_arn", iamResourceName, "arn"), resource.TestCheckResourceAttr(resourceName, "valid_user_list.#", "0"), ), }, @@ -276,6 +283,8 @@ func TestAccAWSStorageGatewaySmbFileShare_KMSKeyArn(t *testing.T) { var smbFileShare storagegateway.SMBFileShareInfo rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" + keyName := "aws_kms_key.test.0" + keyUpdatedName := "aws_kms_key.test.1" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -287,7 +296,7 @@ func TestAccAWSStorageGatewaySmbFileShare_KMSKeyArn(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewaySmbFileShareExists(resourceName, &smbFileShare), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "true"), - resource.TestMatchResourceAttr(resourceName, "kms_key_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_arn", keyName, "arn"), ), }, { @@ -295,7 +304,7 @@ func TestAccAWSStorageGatewaySmbFileShare_KMSKeyArn(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewaySmbFileShareExists(resourceName, &smbFileShare), resource.TestCheckResourceAttr(resourceName, "kms_encrypted", "true"), - resource.TestMatchResourceAttr(resourceName, "kms_key_arn", regexp.MustCompile(`^arn:`)), + resource.TestCheckResourceAttrPair(resourceName, "kms_key_arn", keyUpdatedName, "arn"), ), }, { diff --git a/aws/resource_aws_storagegateway_upload_buffer_test.go b/aws/resource_aws_storagegateway_upload_buffer_test.go index 4fcff505031..0fd4c9216ac 100644 --- a/aws/resource_aws_storagegateway_upload_buffer_test.go +++ b/aws/resource_aws_storagegateway_upload_buffer_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -71,19 +70,22 @@ func TestDecodeStorageGatewayUploadBufferID(t *testing.T) { func TestAccAWSStorageGatewayUploadBuffer_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_upload_buffer.test" + localDiskDataSourceName := "data.aws_storagegateway_local_disk.test" + gatewayResourceName := "aws_storagegateway_gateway.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - // Storage Gateway API does not support removing upload buffers - CheckDestroy: nil, + // Storage Gateway API does not support removing upload buffers, + // but we want to ensure other resources are removed. + CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, Steps: []resource.TestStep{ { Config: testAccAWSStorageGatewayUploadBufferConfig_Basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewayUploadBufferExists(resourceName), - resource.TestCheckResourceAttrSet(resourceName, "disk_id"), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:[^:]+:storagegateway:[^:]+:[^:]+:gateway/sgw-.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "disk_id", localDiskDataSourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), ), }, { @@ -136,30 +138,30 @@ func testAccCheckAWSStorageGatewayUploadBufferExists(resourceName string) resour func testAccAWSStorageGatewayUploadBufferConfig_Basic(rName string) string { return testAccAWSStorageGatewayGatewayConfig_GatewayType_Stored(rName) + fmt.Sprintf(` resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" + availability_zone = aws_instance.test.availability_zone size = "10" type = "gp2" tags = { - Name = %q + Name = %[1]q } } resource "aws_volume_attachment" "test" { device_name = "/dev/xvdc" force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" + instance_id = aws_instance.test.id + volume_id = aws_ebs_volume.test.id } data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_node = aws_volume_attachment.test.device_name + gateway_arn = aws_storagegateway_gateway.test.arn } resource "aws_storagegateway_upload_buffer" "test" { - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_id = data.aws_storagegateway_local_disk.test.id + gateway_arn = aws_storagegateway_gateway.test.arn } `, rName) } diff --git a/aws/resource_aws_storagegateway_working_storage_test.go b/aws/resource_aws_storagegateway_working_storage_test.go index a58006444c5..512f7314fa0 100644 --- a/aws/resource_aws_storagegateway_working_storage_test.go +++ b/aws/resource_aws_storagegateway_working_storage_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -71,19 +70,22 @@ func TestDecodeStorageGatewayWorkingStorageID(t *testing.T) { func TestAccAWSStorageGatewayWorkingStorage_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_working_storage.test" + localDiskDataSourceName := "data.aws_storagegateway_local_disk.test" + gatewayResourceName := "aws_storagegateway_gateway.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - // Storage Gateway API does not support removing working storages - CheckDestroy: nil, + // Storage Gateway API does not support removing working storages, + // but we want to ensure other resources are removed. + CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, Steps: []resource.TestStep{ { Config: testAccAWSStorageGatewayWorkingStorageConfig_Basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSStorageGatewayWorkingStorageExists(resourceName), - resource.TestCheckResourceAttrSet(resourceName, "disk_id"), - resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:[^:]+:storagegateway:[^:]+:[^:]+:gateway/sgw-.+$`)), + resource.TestCheckResourceAttrPair(resourceName, "disk_id", localDiskDataSourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "gateway_arn", gatewayResourceName, "arn"), ), }, { @@ -136,30 +138,30 @@ func testAccCheckAWSStorageGatewayWorkingStorageExists(resourceName string) reso func testAccAWSStorageGatewayWorkingStorageConfig_Basic(rName string) string { return testAccAWSStorageGatewayGatewayConfig_GatewayType_Stored(rName) + fmt.Sprintf(` resource "aws_ebs_volume" "test" { - availability_zone = "${aws_instance.test.availability_zone}" + availability_zone = aws_instance.test.availability_zone size = "10" type = "gp2" tags = { - Name = %q + Name = %[1]q } } resource "aws_volume_attachment" "test" { device_name = "/dev/xvdc" force_detach = true - instance_id = "${aws_instance.test.id}" - volume_id = "${aws_ebs_volume.test.id}" + instance_id = aws_instance.test.id + volume_id = aws_ebs_volume.test.id } data "aws_storagegateway_local_disk" "test" { - disk_path = "${aws_volume_attachment.test.device_name}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_node = aws_volume_attachment.test.device_name + gateway_arn = aws_storagegateway_gateway.test.arn } resource "aws_storagegateway_working_storage" "test" { - disk_id = "${data.aws_storagegateway_local_disk.test.id}" - gateway_arn = "${aws_storagegateway_gateway.test.arn}" + disk_id = data.aws_storagegateway_local_disk.test.id + gateway_arn = aws_storagegateway_gateway.test.arn } `, rName) } diff --git a/aws/resource_aws_subnet.go b/aws/resource_aws_subnet.go index 4615e89eee2..6d75dcc2e33 100644 --- a/aws/resource_aws_subnet.go +++ b/aws/resource_aws_subnet.go @@ -72,6 +72,13 @@ func resourceAwsSubnet() *schema.Resource { Default: false, }, + "outpost_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "assign_ipv6_address_on_creation": { Type: schema.TypeBool, Optional: true, @@ -112,6 +119,10 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error { createOpts.Ipv6CidrBlock = aws.String(v.(string)) } + if v, ok := d.GetOk("outpost_arn"); ok { + createOpts.OutpostArn = aws.String(v.(string)) + } + var err error resp, err := conn.CreateSubnet(createOpts) @@ -142,30 +153,9 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error { } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - // Handle EC2 eventual consistency on creation - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v) - - if isAWSErr(err, "InvalidSubnetID.NotFound", "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isResourceTimeoutError(err) { - err = keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v) - } - - if err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding tags: %s", err) } - - d.SetPartial("tags") } // You cannot modify multiple subnet attributes in the same request. @@ -182,8 +172,6 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifySubnetAttribute(input); err != nil { return fmt.Errorf("error enabling EC2 Subnet (%s) assign IPv6 address on creation: %s", d.Id(), err) } - - d.SetPartial("assign_ipv6_address_on_creation") } if d.Get("map_public_ip_on_launch").(bool) { @@ -197,19 +185,14 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifySubnetAttribute(input); err != nil { return fmt.Errorf("error enabling EC2 Subnet (%s) map public IP on launch: %s", d.Id(), err) } - - d.SetPartial("map_public_ip_on_launch") } - d.Partial(false) - return resourceAwsSubnetRead(d, meta) } func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - ignoreTags := meta.(*AWSClient).ignoreTags - ignoreTagPrefixes := meta.(*AWSClient).ignoreTagPrefixes + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeSubnets(&ec2.DescribeSubnetsInput{ SubnetIds: []*string{aws.String(d.Id())}, @@ -235,6 +218,7 @@ func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { d.Set("cidr_block", subnet.CidrBlock) d.Set("map_public_ip_on_launch", subnet.MapPublicIpOnLaunch) d.Set("assign_ipv6_address_on_creation", subnet.AssignIpv6AddressOnCreation) + d.Set("outpost_arn", subnet.OutpostArn) // Make sure those values are set, if an IPv6 block exists it'll be set in the loop d.Set("ipv6_cidr_block_association_id", "") @@ -250,7 +234,7 @@ func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { d.Set("arn", subnet.SubnetArn) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(subnet.Tags).IgnoreAws().IgnorePrefixes(ignoreTagPrefixes).Ignore(ignoreTags).Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(subnet.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -262,16 +246,12 @@ func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsSubnetUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - d.Partial(true) - if d.HasChange("tags") { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { return fmt.Errorf("error updating EC2 Subnet (%s) tags: %s", d.Id(), err) } - - d.SetPartial("tags") } if d.HasChange("map_public_ip_on_launch") { @@ -288,8 +268,6 @@ func resourceAwsSubnetUpdate(d *schema.ResourceData, meta interface{}) error { if err != nil { return err - } else { - d.SetPartial("map_public_ip_on_launch") } } @@ -357,8 +335,6 @@ func resourceAwsSubnetUpdate(d *schema.ResourceData, meta interface{}) error { "Error waiting for IPv6 CIDR (%s) to become associated: %s", d.Id(), err) } - - d.SetPartial("ipv6_cidr_block") } if d.HasChange("assign_ipv6_address_on_creation") { @@ -375,13 +351,9 @@ func resourceAwsSubnetUpdate(d *schema.ResourceData, meta interface{}) error { if err != nil { return err - } else { - d.SetPartial("assign_ipv6_address_on_creation") } } - d.Partial(false) - return resourceAwsSubnetRead(d, meta) } @@ -426,7 +398,7 @@ func resourceAwsSubnetDelete(d *schema.ResourceData, meta interface{}) error { } if _, err := wait.WaitForState(); err != nil { - return fmt.Errorf("Error deleting subnet: %s", err) + return fmt.Errorf("error deleting subnet (%s): %s", d.Id(), err) } return nil diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index bb8e333508b..7af00695eec 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "os" "regexp" "testing" "time" @@ -147,21 +148,15 @@ func TestAccAWSSubnet_basic(t *testing.T) { { Config: testAccSubnetConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckSubnetExists( - resourceName, &v), + testAccCheckSubnetExists(resourceName, &v), testCheck, // ipv6 should be empty if disabled so we can still use the property in conditionals - resource.TestCheckResourceAttr( - resourceName, "ipv6_cidr_block", ""), - resource.TestMatchResourceAttr( - resourceName, - "arn", - regexp.MustCompile(`^arn:[^:]+:ec2:[^:]+:\d{12}:subnet/subnet-.+`)), + resource.TestCheckResourceAttr(resourceName, "ipv6_cidr_block", ""), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile("subnet/subnet-.+$")), testAccCheckResourceAttrAccountID(resourceName, "owner_id"), - resource.TestCheckResourceAttrSet( - resourceName, "availability_zone"), - resource.TestCheckResourceAttrSet( - resourceName, "availability_zone_id"), + resource.TestCheckResourceAttrSet(resourceName, "availability_zone"), + resource.TestCheckResourceAttrSet(resourceName, "availability_zone_id"), + resource.TestCheckResourceAttr(resourceName, "outpost_arn", ""), ), }, { @@ -192,11 +187,11 @@ func TestAccAWSSubnet_ignoreTags(t *testing.T) { ExpectNonEmptyPlan: true, }, { - Config: testAccProviderConfigIgnoreTagPrefixes1("ignorekey") + testAccSubnetConfig, + Config: testAccProviderConfigIgnoreTagsKeyPrefixes1("ignorekey") + testAccSubnetConfig, PlanOnly: true, }, { - Config: testAccProviderConfigIgnoreTags1("ignorekey1") + testAccSubnetConfig, + Config: testAccProviderConfigIgnoreTagsKeys1("ignorekey1") + testAccSubnetConfig, PlanOnly: true, }, }, @@ -216,8 +211,7 @@ func TestAccAWSSubnet_ipv6(t *testing.T) { { Config: testAccSubnetConfigIpv6, Check: resource.ComposeTestCheckFunc( - testAccCheckSubnetExists( - resourceName, &before), + testAccCheckSubnetExists(resourceName, &before), testAccCheckAwsSubnetIpv6BeforeUpdate(t, &before), ), }, @@ -229,16 +223,14 @@ func TestAccAWSSubnet_ipv6(t *testing.T) { { Config: testAccSubnetConfigIpv6UpdateAssignIpv6OnCreation, Check: resource.ComposeTestCheckFunc( - testAccCheckSubnetExists( - resourceName, &after), + testAccCheckSubnetExists(resourceName, &after), testAccCheckAwsSubnetIpv6AfterUpdate(t, &after), ), }, { Config: testAccSubnetConfigIpv6UpdateIpv6Cidr, Check: resource.ComposeTestCheckFunc( - testAccCheckSubnetExists( - resourceName, &after), + testAccCheckSubnetExists(resourceName, &after), testAccCheckAwsSubnetNotRecreated(t, &before, &after), ), @@ -260,8 +252,7 @@ func TestAccAWSSubnet_enableIpv6(t *testing.T) { { Config: testAccSubnetConfigPreIpv6, Check: resource.ComposeTestCheckFunc( - testAccCheckSubnetExists( - resourceName, &subnet), + testAccCheckSubnetExists(resourceName, &subnet), ), }, { @@ -272,8 +263,7 @@ func TestAccAWSSubnet_enableIpv6(t *testing.T) { { Config: testAccSubnetConfigIpv6, Check: resource.ComposeTestCheckFunc( - testAccCheckSubnetExists( - resourceName, &subnet), + testAccCheckSubnetExists(resourceName, &subnet), ), }, }, @@ -292,13 +282,46 @@ func TestAccAWSSubnet_availabilityZoneId(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccSubnetConfigAvailabilityZoneId, + Check: resource.ComposeTestCheckFunc( + testAccCheckSubnetExists(resourceName, &v), + resource.TestCheckResourceAttrSet(resourceName, "availability_zone"), + resource.TestCheckResourceAttr(resourceName, "availability_zone_id", "usw2-az3"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSSubnet_outpost(t *testing.T) { + var v ec2.Subnet + resourceName := "aws_subnet.test" + + outpostArn := os.Getenv("AWS_OUTPOST_ARN") + if outpostArn == "" { + t.Skip( + "Environment variable AWS_OUTPOST_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "a deployed Outpost to enable this test.") + } + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckSubnetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccSubnetConfigOutpost(outpostArn), Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists( resourceName, &v), - resource.TestCheckResourceAttrSet( - resourceName, "availability_zone"), resource.TestCheckResourceAttr( - resourceName, "availability_zone_id", "usw2-az3"), + resourceName, "outpost_arn", outpostArn), ), }, { @@ -530,3 +553,29 @@ resource "aws_subnet" "test" { } } ` + +func testAccSubnetConfigOutpost(outpostArn string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "current" { + # Exclude usw2-az4 (us-west-2d) as it has limited instance types. + blacklisted_zone_ids = ["usw2-az4"] +} + +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + tags = { + Name = "terraform-testacc-subnet-outpost" + } +} + +resource "aws_subnet" "test" { + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.test.id}" + availability_zone = "${data.aws_availability_zones.current.names[0]}" + outpost_arn = "%s" + tags = { + Name = "tf-acc-subnet-outpost" + } +} +`, outpostArn) +} diff --git a/aws/resource_aws_swf_domain.go b/aws/resource_aws_swf_domain.go index 8e35b96af8b..f380a1ab7ae 100644 --- a/aws/resource_aws_swf_domain.go +++ b/aws/resource_aws_swf_domain.go @@ -98,6 +98,7 @@ func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsSwfDomainRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).swfconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig input := &swf.DescribeDomainInput{ Name: aws.String(d.Id()), @@ -126,7 +127,7 @@ func resourceAwsSwfDomainRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for SWF Domain (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_transfer_server.go b/aws/resource_aws_transfer_server.go index 36a5e87b90f..dca3640015e 100644 --- a/aws/resource_aws_transfer_server.go +++ b/aws/resource_aws_transfer_server.go @@ -176,6 +176,7 @@ func resourceAwsTransferServerCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsTransferServerRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).transferconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig descOpts := &transfer.DescribeServerInput{ ServerId: aws.String(d.Id()), @@ -209,7 +210,7 @@ func resourceAwsTransferServerRead(d *schema.ResourceData, meta interface{}) err d.Set("logging_role", resp.Server.LoggingRole) d.Set("host_key_fingerprint", resp.Server.HostKeyFingerprint) - if err := d.Set("tags", keyvaluetags.TransferKeyValueTags(resp.Server.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.TransferKeyValueTags(resp.Server.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("Error setting tags: %s", err) } return nil diff --git a/aws/resource_aws_transfer_user.go b/aws/resource_aws_transfer_user.go index 4747829b4e1..bff0e39b125 100644 --- a/aws/resource_aws_transfer_user.go +++ b/aws/resource_aws_transfer_user.go @@ -106,6 +106,8 @@ func resourceAwsTransferUserCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsTransferUserRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).transferconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + serverID, userName, err := decodeTransferUserId(d.Id()) if err != nil { return fmt.Errorf("error parsing Transfer User ID: %s", err) @@ -135,7 +137,7 @@ func resourceAwsTransferUserRead(d *schema.ResourceData, meta interface{}) error d.Set("policy", resp.User.Policy) d.Set("role", resp.User.Role) - if err := d.Set("tags", keyvaluetags.TransferKeyValueTags(resp.User.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.TransferKeyValueTags(resp.User.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("Error setting tags: %s", err) } return nil diff --git a/aws/resource_aws_volume_attachment.go b/aws/resource_aws_volume_attachment.go index b39720d3ba1..ee9ac728ba4 100644 --- a/aws/resource_aws_volume_attachment.go +++ b/aws/resource_aws_volume_attachment.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -20,6 +21,22 @@ func resourceAwsVolumeAttachment() *schema.Resource { Read: resourceAwsVolumeAttachmentRead, Update: resourceAwsVolumeAttachmentUpdate, Delete: resourceAwsVolumeAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { + return nil, fmt.Errorf("Unexpected format of ID (%q), expected DEVICE_NAME:VOLUME_ID:INSTANCE_ID", d.Id()) + } + deviceName := idParts[0] + volumeID := idParts[1] + instanceID := idParts[2] + d.Set("device_name", deviceName) + d.Set("volume_id", volumeID) + d.Set("instance_id", instanceID) + d.SetId(volumeAttachmentID(deviceName, volumeID, instanceID)) + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "device_name": { @@ -80,9 +97,9 @@ func resourceAwsVolumeAttachmentCreate(d *schema.ResourceData, meta interface{}) // a spot request and whilst the request has been fulfilled the // instance is not running yet stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "stopping"}, - Target: []string{"running", "stopped"}, - Refresh: InstanceStateRefreshFunc(conn, iID, []string{"terminated"}), + Pending: []string{ec2.InstanceStateNamePending, ec2.InstanceStateNameStopping}, + Target: []string{ec2.InstanceStateNameRunning, ec2.InstanceStateNameStopped}, + Refresh: InstanceStateRefreshFunc(conn, iID, []string{ec2.InstanceStateNameTerminated}), Timeout: 10 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, @@ -109,13 +126,12 @@ func resourceAwsVolumeAttachmentCreate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error attaching volume (%s) to instance (%s), message: \"%s\", code: \"%s\"", vID, iID, awsErr.Message(), awsErr.Code()) } - return err } } stateConf := &resource.StateChangeConf{ - Pending: []string{"attaching"}, - Target: []string{"attached"}, + Pending: []string{ec2.VolumeAttachmentStateAttaching}, + Target: []string{ec2.VolumeAttachmentStateAttached}, Refresh: volumeAttachmentStateRefreshFunc(conn, name, vID, iID), Timeout: 5 * time.Minute, Delay: 10 * time.Second, @@ -166,7 +182,7 @@ func volumeAttachmentStateRefreshFunc(conn *ec2.EC2, name, volumeID, instanceID } } // assume detached if volume count is 0 - return 42, "detached", nil + return 42, ec2.VolumeAttachmentStateDetached, nil } } @@ -189,14 +205,14 @@ func resourceAwsVolumeAttachmentRead(d *schema.ResourceData, meta interface{}) e vols, err := conn.DescribeVolumes(request) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVolume.NotFound" { + if isAWSErr(err, "InvalidVolume.NotFound", "") { d.SetId("") return nil } return fmt.Errorf("Error reading EC2 volume %s for instance: %s: %#v", d.Get("volume_id").(string), d.Get("instance_id").(string), err) } - if len(vols.Volumes) == 0 || *vols.Volumes[0].State == "available" { + if len(vols.Volumes) == 0 || *vols.Volumes[0].State == ec2.VolumeStateAvailable { log.Printf("[DEBUG] Volume Attachment (%s) not found, removing from state", d.Id()) d.SetId("") } @@ -233,8 +249,8 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) vID, iID, err) } stateConf := &resource.StateChangeConf{ - Pending: []string{"detaching"}, - Target: []string{"detached"}, + Pending: []string{ec2.VolumeAttachmentStateDetaching}, + Target: []string{ec2.VolumeAttachmentStateDetached}, Refresh: volumeAttachmentStateRefreshFunc(conn, name, vID, iID), Timeout: 5 * time.Minute, Delay: 10 * time.Second, @@ -245,8 +261,8 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) _, err = stateConf.WaitForState() if err != nil { return fmt.Errorf( - "Error waiting for Volume (%s) to detach from Instance: %s", - vID, iID) + "Error waiting for Volume (%s) to detach from Instance (%s): %s", + vID, iID, err) } return nil diff --git a/aws/resource_aws_volume_attachment_test.go b/aws/resource_aws_volume_attachment_test.go index a928b345e5c..a00fe8db942 100644 --- a/aws/resource_aws_volume_attachment_test.go +++ b/aws/resource_aws_volume_attachment_test.go @@ -2,12 +2,12 @@ package aws import ( "fmt" - "log" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) @@ -15,6 +15,8 @@ import ( func TestAccAWSVolumeAttachment_basic(t *testing.T) { var i ec2.Instance var v ec2.Volume + resourceName := "aws_volume_attachment.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -22,18 +24,20 @@ func TestAccAWSVolumeAttachment_basic(t *testing.T) { CheckDestroy: testAccCheckVolumeAttachmentDestroy, Steps: []resource.TestStep{ { - Config: testAccVolumeAttachmentConfig, + Config: testAccVolumeAttachmentConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "device_name", "/dev/sdh"), - testAccCheckInstanceExists( - "aws_instance.web", &i), - testAccCheckVolumeExists( - "aws_ebs_volume.example", &v), - testAccCheckVolumeAttachmentExists( - "aws_volume_attachment.ebs_att", &i, &v), + resource.TestCheckResourceAttr(resourceName, "device_name", "/dev/sdh"), + testAccCheckInstanceExists("aws_instance.test", &i), + testAccCheckVolumeExists("aws_ebs_volume.test", &v), + testAccCheckVolumeAttachmentExists(resourceName, &i, &v), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSVolumeAttachmentImportStateIDFunc(resourceName), + ImportStateVerify: true, + }, }, }) } @@ -41,6 +45,8 @@ func TestAccAWSVolumeAttachment_basic(t *testing.T) { func TestAccAWSVolumeAttachment_skipDestroy(t *testing.T) { var i ec2.Instance var v ec2.Volume + resourceName := "aws_volume_attachment.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -48,18 +54,23 @@ func TestAccAWSVolumeAttachment_skipDestroy(t *testing.T) { CheckDestroy: testAccCheckVolumeAttachmentDestroy, Steps: []resource.TestStep{ { - Config: testAccVolumeAttachmentConfigSkipDestroy, + Config: testAccVolumeAttachmentConfigSkipDestroy(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "device_name", "/dev/sdh"), - testAccCheckInstanceExists( - "aws_instance.web", &i), - testAccCheckVolumeExists( - "aws_ebs_volume.example", &v), - testAccCheckVolumeAttachmentExists( - "aws_volume_attachment.ebs_att", &i, &v), + resource.TestCheckResourceAttr(resourceName, "device_name", "/dev/sdh"), + testAccCheckInstanceExists("aws_instance.test", &i), + testAccCheckVolumeExists("aws_ebs_volume.test", &v), + testAccCheckVolumeAttachmentExists(resourceName, &i, &v), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSVolumeAttachmentImportStateIDFunc(resourceName), + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "skip_destroy", // attribute only used on resource deletion + }, + }, }, }) } @@ -67,6 +78,8 @@ func TestAccAWSVolumeAttachment_skipDestroy(t *testing.T) { func TestAccAWSVolumeAttachment_attachStopped(t *testing.T) { var i ec2.Instance var v ec2.Volume + resourceName := "aws_volume_attachment.test" + rName := acctest.RandomWithPrefix("tf-acc-test") stopInstance := func() { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -79,8 +92,8 @@ func TestAccAWSVolumeAttachment_attachStopped(t *testing.T) { } stateConf := &resource.StateChangeConf{ - Pending: []string{"pending", "running", "stopping"}, - Target: []string{"stopped"}, + Pending: []string{ec2.InstanceStateNamePending, ec2.InstanceStateNameRunning, ec2.InstanceStateNameStopping}, + Target: []string{ec2.InstanceStateNameStopped}, Refresh: InstanceStateRefreshFunc(conn, *i.InstanceId, []string{}), Timeout: 10 * time.Minute, Delay: 10 * time.Second, @@ -99,54 +112,99 @@ func TestAccAWSVolumeAttachment_attachStopped(t *testing.T) { CheckDestroy: testAccCheckVolumeAttachmentDestroy, Steps: []resource.TestStep{ { - Config: testAccVolumeAttachmentConfigInstanceOnly, + Config: testAccVolumeAttachmentConfigBase(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckInstanceExists( - "aws_instance.web", &i), + testAccCheckInstanceExists("aws_instance.test", &i), ), }, { PreConfig: stopInstance, - Config: testAccVolumeAttachmentConfig, + Config: testAccVolumeAttachmentConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "device_name", "/dev/sdh"), - testAccCheckInstanceExists( - "aws_instance.web", &i), - testAccCheckVolumeExists( - "aws_ebs_volume.example", &v), - testAccCheckVolumeAttachmentExists( - "aws_volume_attachment.ebs_att", &i, &v), + resource.TestCheckResourceAttr(resourceName, "device_name", "/dev/sdh"), + testAccCheckInstanceExists("aws_instance.test", &i), + testAccCheckVolumeExists("aws_ebs_volume.test", &v), + testAccCheckVolumeAttachmentExists(resourceName, &i, &v), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSVolumeAttachmentImportStateIDFunc(resourceName), + ImportStateVerify: true, + }, }, }) } func TestAccAWSVolumeAttachment_update(t *testing.T) { + resourceName := "aws_volume_attachment.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeAttachmentDestroy, Steps: []resource.TestStep{ { - Config: testAccVolumeAttachmentConfig_update(false), + Config: testAccVolumeAttachmentUpdateConfig(rName, false), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "force_detach", "false"), - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "skip_destroy", "false"), + resource.TestCheckResourceAttr(resourceName, "force_detach", "false"), + resource.TestCheckResourceAttr(resourceName, "skip_destroy", "false"), ), }, { - Config: testAccVolumeAttachmentConfig_update(true), + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSVolumeAttachmentImportStateIDFunc(resourceName), + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "force_detach", // attribute only used on resource deletion + "skip_destroy", // attribute only used on resource deletion + }, + }, + { + Config: testAccVolumeAttachmentUpdateConfig(rName, true), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "force_detach", "true"), - resource.TestCheckResourceAttr( - "aws_volume_attachment.ebs_att", "skip_destroy", "true"), + resource.TestCheckResourceAttr(resourceName, "force_detach", "true"), + resource.TestCheckResourceAttr(resourceName, "skip_destroy", "true"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateIdFunc: testAccAWSVolumeAttachmentImportStateIDFunc(resourceName), + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "force_detach", // attribute only used on resource deletion + "skip_destroy", // attribute only used on resource deletion + }, + }, + }, + }) +} + +func TestAccAWSVolumeAttachment_disappears(t *testing.T) { + var i ec2.Instance + var v ec2.Volume + resourceName := "aws_volume_attachment.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVolumeAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccVolumeAttachmentConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists("aws_instance.test", &i), + testAccCheckVolumeExists("aws_ebs_volume.test", &v), + testAccCheckVolumeAttachmentExists(resourceName, &i, &v), + testAccCheckResourceDisappears(testAccProvider, resourceAwsVolumeAttachment(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, }, }) } @@ -163,8 +221,10 @@ func testAccCheckVolumeAttachmentExists(n string, i *ec2.Instance, v *ec2.Volume } for _, b := range i.BlockDeviceMappings { - if rs.Primary.Attributes["device_name"] == *b.DeviceName { - if b.Ebs.VolumeId != nil && rs.Primary.Attributes["volume_id"] == *b.Ebs.VolumeId { + if rs.Primary.Attributes["device_name"] == aws.StringValue(b.DeviceName) { + if b.Ebs.VolumeId != nil && + rs.Primary.Attributes["volume_id"] == aws.StringValue(b.Ebs.VolumeId) && + rs.Primary.Attributes["volume_id"] == aws.StringValue(v.VolumeId) { // pass return nil } @@ -176,108 +236,138 @@ func testAccCheckVolumeAttachmentExists(n string, i *ec2.Instance, v *ec2.Volume } func testAccCheckVolumeAttachmentDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + for _, rs := range s.RootModule().Resources { - log.Printf("\n\n----- This is never called") if rs.Type != "aws_volume_attachment" { continue } + + request := &ec2.DescribeVolumesInput{ + VolumeIds: []*string{aws.String(rs.Primary.Attributes["volume_id"])}, + Filters: []*ec2.Filter{ + { + Name: aws.String("attachment.device"), + Values: []*string{aws.String(rs.Primary.Attributes["device_name"])}, + }, + { + Name: aws.String("attachment.instance-id"), + Values: []*string{aws.String(rs.Primary.Attributes["instance_id"])}, + }, + }, + } + + _, err := conn.DescribeVolumes(request) + if err != nil { + if isAWSErr(err, "InvalidVolume.NotFound", "") { + return nil + } + return fmt.Errorf("error describing volumes (%s): %s", rs.Primary.ID, err) + } } return nil } -const testAccVolumeAttachmentConfigInstanceOnly = ` -resource "aws_instance" "web" { - ami = "ami-21f78e11" - availability_zone = "us-west-2a" - instance_type = "t1.micro" - tags = { - Name = "HelloWorld" +func testAccVolumeAttachmentInstanceOnlyConfigBase(rName string) string { + return testAccLatestAmazonLinuxHvmEbsAmiConfig() + fmt.Sprintf(` +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] } } -` -const testAccVolumeAttachmentConfig = ` -resource "aws_instance" "web" { - ami = "ami-21f78e11" - availability_zone = "us-west-2a" - instance_type = "t1.micro" - tags = { - Name = "HelloWorld" +data "aws_ec2_instance_type_offering" "available" { + filter { + name = "instance-type" + values = ["t3.micro", "t2.micro"] } -} -resource "aws_ebs_volume" "example" { - availability_zone = "us-west-2a" - size = 1 + location_type = "availability-zone" + preferred_instance_types = ["t3.micro", "t2.micro"] } -resource "aws_volume_attachment" "ebs_att" { - device_name = "/dev/sdh" - volume_id = "${aws_ebs_volume.example.id}" - instance_id = "${aws_instance.web.id}" -} -` +resource "aws_instance" "test" { + ami = "${data.aws_ami.amzn-ami-minimal-hvm-ebs.id}" + availability_zone = "${data.aws_availability_zones.available.names[0]}" + instance_type = "${data.aws_ec2_instance_type_offering.available.instance_type}" -const testAccVolumeAttachmentConfigSkipDestroy = ` -resource "aws_instance" "web" { - ami = "ami-21f78e11" - availability_zone = "us-west-2a" - instance_type = "t1.micro" tags = { - Name = "HelloWorld" + Name = %[1]q } } +`, rName) +} + +func testAccVolumeAttachmentConfigBase(rName string) string { + return testAccVolumeAttachmentInstanceOnlyConfigBase(rName) + fmt.Sprintf(` +resource "aws_ebs_volume" "test" { + availability_zone = "${data.aws_availability_zones.available.names[0]}" + size = 1 -resource "aws_ebs_volume" "example" { - availability_zone = "us-west-2a" - size = 1 tags = { - Name = "TestVolume" + Name = %[1]q } } +`, rName) +} + +func testAccVolumeAttachmentConfig(rName string) string { + return testAccVolumeAttachmentConfigBase(rName) + fmt.Sprintf(` +resource "aws_volume_attachment" "test" { + device_name = "/dev/sdh" + volume_id = "${aws_ebs_volume.test.id}" + instance_id = "${aws_instance.test.id}" +} +`) +} -data "aws_ebs_volume" "ebs_volume" { +func testAccVolumeAttachmentConfigSkipDestroy(rName string) string { + return testAccVolumeAttachmentConfigBase(rName) + fmt.Sprintf(` +data "aws_ebs_volume" "test" { filter { - name = "size" - values = ["${aws_ebs_volume.example.size}"] + name = "size" + values = ["${aws_ebs_volume.test.size}"] } filter { - name = "availability-zone" - values = ["${aws_ebs_volume.example.availability_zone}"] + name = "availability-zone" + values = ["${aws_ebs_volume.test.availability_zone}"] } filter { - name = "tag:Name" - values = ["TestVolume"] + name = "tag:Name" + values = ["%[1]s"] } } -resource "aws_volume_attachment" "ebs_att" { - device_name = "/dev/sdh" - volume_id = "${data.aws_ebs_volume.ebs_volume.id}" - instance_id = "${aws_instance.web.id}" +resource "aws_volume_attachment" "test" { + device_name = "/dev/sdh" + volume_id = "${data.aws_ebs_volume.test.id}" + instance_id = "${aws_instance.test.id}" skip_destroy = true } -` - -func testAccVolumeAttachmentConfig_update(detach bool) string { - return fmt.Sprintf(` -resource "aws_instance" "web" { - ami = "ami-21f78e11" - availability_zone = "us-west-2a" - instance_type = "t1.micro" +`, rName) } -resource "aws_ebs_volume" "example" { - availability_zone = "us-west-2a" - size = 1 -} - -resource "aws_volume_attachment" "ebs_att" { +func testAccVolumeAttachmentUpdateConfig(rName string, detach bool) string { + return testAccVolumeAttachmentConfigBase(rName) + fmt.Sprintf(` +resource "aws_volume_attachment" "test" { device_name = "/dev/sdh" - volume_id = "${aws_ebs_volume.example.id}" - instance_id = "${aws_instance.web.id}" - force_detach = %t - skip_destroy = %t + volume_id = "${aws_ebs_volume.test.id}" + instance_id = "${aws_instance.test.id}" + force_detach = %[1]t + skip_destroy = %[1]t } -`, detach, detach) +`, detach) +} + +func testAccAWSVolumeAttachmentImportStateIDFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + return fmt.Sprintf("%s:%s:%s", rs.Primary.Attributes["device_name"], rs.Primary.Attributes["volume_id"], rs.Primary.Attributes["instance_id"]), nil + } } diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index 82de72328d0..9be453d4e61 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -145,10 +145,6 @@ func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { d.SetId(*vpc.VpcId) log.Printf("[INFO] VPC ID: %s", d.Id()) - // Set partial mode and say that we setup the cidr block - d.Partial(true) - d.SetPartial("cidr_block") - // Wait for the VPC to become available log.Printf( "[DEBUG] Waiting for VPC (%s) to become available", @@ -186,8 +182,6 @@ func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifyVpcAttribute(input); err != nil { return fmt.Errorf("error enabling VPC (%s) DNS hostnames: %s", d.Id(), err) } - - d.SetPartial("enable_dns_hostnames") } // By default, only the enableDnsSupport attribute is set to true in a VPC created any other way. @@ -204,8 +198,6 @@ func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifyVpcAttribute(input); err != nil { return fmt.Errorf("error disabling VPC (%s) DNS support: %s", d.Id(), err) } - - d.SetPartial("enable_dns_support") } if d.Get("enable_classiclink").(bool) { @@ -216,8 +208,6 @@ func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.EnableVpcClassicLink(input); err != nil { return fmt.Errorf("error enabling VPC (%s) ClassicLink: %s", d.Id(), err) } - - d.SetPartial("enable_classiclink") } if d.Get("enable_classiclink_dns_support").(bool) { @@ -228,46 +218,20 @@ func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.EnableVpcClassicLinkDnsSupport(input); err != nil { return fmt.Errorf("error enabling VPC (%s) ClassicLink DNS support: %s", d.Id(), err) } - - d.SetPartial("enable_classiclink_dns_support") } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - // Handle EC2 eventual consistency on creation - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v) - - if isAWSErr(err, "InvalidVpcID.NotFound", "") { - return resource.RetryableError(err) - } - - if err != nil { - return resource.NonRetryableError(err) - } - - return nil - }) - - if isResourceTimeoutError(err) { - err = keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v) - } - - if err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding tags: %s", err) } - - d.SetPartial("tags") } - d.Partial(false) - return resourceAwsVpcRead(d, meta) } func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - ignoreTags := meta.(*AWSClient).ignoreTags - ignoreTagPrefixes := meta.(*AWSClient).ignoreTagPrefixes + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig // Refresh the VPC state vpcRaw, _, err := VPCStateRefreshFunc(conn, d.Id())() @@ -296,7 +260,7 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { }.String() d.Set("arn", arn) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpc.Tags).IgnoreAws().IgnorePrefixes(ignoreTagPrefixes).Ignore(ignoreTags).Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpc.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -399,8 +363,6 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - // Turn on partial mode - d.Partial(true) vpcid := d.Id() if d.HasChange("enable_dns_hostnames") { val := d.Get("enable_dns_hostnames").(bool) @@ -417,8 +379,6 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifyVpcAttribute(modifyOpts); err != nil { return err } - - d.SetPartial("enable_dns_hostnames") } _, hasEnableDnsSupportOption := d.GetOk("enable_dns_support") @@ -438,8 +398,6 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifyVpcAttribute(modifyOpts); err != nil { return err } - - d.SetPartial("enable_dns_support") } if d.HasChange("enable_classiclink") { @@ -465,8 +423,6 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { return err } } - - d.SetPartial("enable_classiclink") } if d.HasChange("enable_classiclink_dns_support") { @@ -492,8 +448,6 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { return err } } - - d.SetPartial("enable_classiclink_dns_support") } if d.HasChange("assign_generated_ipv6_cidr_block") { @@ -533,8 +487,6 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become disassociated: %s", d.Id(), err) } } - - d.SetPartial("assign_generated_ipv6_cidr_block") } if d.HasChange("instance_tenancy") { @@ -548,8 +500,6 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { if _, err := conn.ModifyVpcTenancy(modifyOpts); err != nil { return err } - - d.SetPartial("instance_tenancy") } if d.HasChange("tags") { @@ -558,11 +508,8 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { return fmt.Errorf("error updating tags: %s", err) } - - d.SetPartial("tags") } - d.Partial(false) return resourceAwsVpcRead(d, meta) } diff --git a/aws/resource_aws_vpc_dhcp_options.go b/aws/resource_aws_vpc_dhcp_options.go index f00956c95d1..4ee2d078c28 100644 --- a/aws/resource_aws_vpc_dhcp_options.go +++ b/aws/resource_aws_vpc_dhcp_options.go @@ -138,7 +138,7 @@ func resourceAwsVpcDhcpOptionsCreate(d *schema.ResourceData, meta interface{}) e } if v, ok := d.GetOk("tags"); ok { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v.(map[string]interface{})); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v.(map[string]interface{})); err != nil { return fmt.Errorf("error updating tags: %s", err) } } @@ -148,6 +148,8 @@ func resourceAwsVpcDhcpOptionsCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + req := &ec2.DescribeDhcpOptionsInput{ DhcpOptionsIds: []*string{ aws.String(d.Id()), @@ -169,7 +171,7 @@ func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) err } opts := resp.DhcpOptions[0] - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(opts.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(opts.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } d.Set("owner_id", opts.OwnerId) diff --git a/aws/resource_aws_vpc_dhcp_options_association.go b/aws/resource_aws_vpc_dhcp_options_association.go index 312508bbe6e..63569c4421f 100644 --- a/aws/resource_aws_vpc_dhcp_options_association.go +++ b/aws/resource_aws_vpc_dhcp_options_association.go @@ -14,6 +14,9 @@ func resourceAwsVpcDhcpOptionsAssociation() *schema.Resource { Read: resourceAwsVpcDhcpOptionsAssociationRead, Update: resourceAwsVpcDhcpOptionsAssociationUpdate, Delete: resourceAwsVpcDhcpOptionsAssociationDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsVpcDhcpOptionsAssociationImport, + }, Schema: map[string]*schema.Schema{ "vpc_id": { @@ -29,6 +32,27 @@ func resourceAwsVpcDhcpOptionsAssociation() *schema.Resource { } } +func resourceAwsVpcDhcpOptionsAssociationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + conn := meta.(*AWSClient).ec2conn + // Provide the vpc_id as the id to import + vpcRaw, _, err := VPCStateRefreshFunc(conn, d.Id())() + if err != nil { + return nil, err + } + if vpcRaw == nil { + return nil, nil + } + vpc := vpcRaw.(*ec2.Vpc) + if err = d.Set("vpc_id", vpc.VpcId); err != nil { + return nil, err + } + if err = d.Set("dhcp_options_id", vpc.DhcpOptionsId); err != nil { + return nil, err + } + d.SetId(*vpc.DhcpOptionsId + "-" + *vpc.VpcId) + return []*schema.ResourceData{d}, nil +} + func resourceAwsVpcDhcpOptionsAssociationCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn diff --git a/aws/resource_aws_vpc_dhcp_options_association_test.go b/aws/resource_aws_vpc_dhcp_options_association_test.go index 15d2ef4d7f1..1b8255da979 100644 --- a/aws/resource_aws_vpc_dhcp_options_association_test.go +++ b/aws/resource_aws_vpc_dhcp_options_association_test.go @@ -12,6 +12,7 @@ import ( func TestAccAWSDHCPOptionsAssociation_basic(t *testing.T) { var v ec2.Vpc var d ec2.DhcpOptions + resourceName := "aws_vpc_dhcp_options_association.foo" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -26,10 +27,27 @@ func TestAccAWSDHCPOptionsAssociation_basic(t *testing.T) { testAccCheckDHCPOptionsAssociationExist("aws_vpc_dhcp_options_association.foo", &v), ), }, + { + ResourceName: resourceName, + ImportStateIdFunc: testAccDHCPOptionsAssociationVPCImportIdFunc(resourceName), + ImportState: true, + ImportStateVerify: true, + }, }, }) } +func testAccDHCPOptionsAssociationVPCImportIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return rs.Primary.Attributes["vpc_id"], nil + } +} + func testAccCheckDHCPOptionsAssociationDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn diff --git a/aws/resource_aws_vpc_endpoint.go b/aws/resource_aws_vpc_endpoint.go index c9623b13be4..f58966f47ff 100644 --- a/aws/resource_aws_vpc_endpoint.go +++ b/aws/resource_aws_vpc_endpoint.go @@ -65,7 +65,7 @@ func resourceAwsVpcEndpoint() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -193,6 +193,7 @@ func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) erro func resourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig vpceRaw, state, err := vpcEndpointStateRefresh(conn, d.Id())() if err != nil && state != "failed" { @@ -276,7 +277,7 @@ func resourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) error d.Set("vpc_endpoint_type", vpceType) } - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpce.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpce.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_vpc_endpoint_service.go b/aws/resource_aws_vpc_endpoint_service.go index 823ed654216..bf7521ede16 100644 --- a/aws/resource_aws_vpc_endpoint_service.go +++ b/aws/resource_aws_vpc_endpoint_service.go @@ -119,6 +119,7 @@ func resourceAwsVpcEndpointServiceCreate(d *schema.ResourceData, meta interface{ func resourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig svcCfgRaw, state, err := vpcEndpointServiceStateRefresh(conn, d.Id())() if err != nil && state != ec2.ServiceStateFailed { @@ -155,7 +156,7 @@ func resourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{}) d.Set("service_name", svcCfg.ServiceName) d.Set("service_type", svcCfg.ServiceType[0].ServiceType) d.Set("state", svcCfg.ServiceState) - err = d.Set("tags", keyvaluetags.Ec2KeyValueTags(svcCfg.Tags).IgnoreAws().Map()) + err = d.Set("tags", keyvaluetags.Ec2KeyValueTags(svcCfg.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()) if err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -178,7 +179,6 @@ func resourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{}) func resourceAwsVpcEndpointServiceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - d.Partial(true) svcId := d.Id() modifyCfgReq := &ec2.ModifyVpcEndpointServiceConfigurationInput{ @@ -201,8 +201,6 @@ func resourceAwsVpcEndpointServiceUpdate(d *schema.ResourceData, meta interface{ if err := vpcEndpointServiceWaitUntilAvailable(d, conn); err != nil { return err } - - d.SetPartial("network_load_balancer_arns") } modifyPermReq := &ec2.ModifyVpcEndpointServicePermissionsInput{ @@ -214,8 +212,6 @@ func resourceAwsVpcEndpointServiceUpdate(d *schema.ResourceData, meta interface{ if _, err := conn.ModifyVpcEndpointServicePermissions(modifyPermReq); err != nil { return fmt.Errorf("Error modifying VPC Endpoint Service permissions: %s", err.Error()) } - - d.SetPartial("allowed_principals") } if d.HasChange("tags") { @@ -226,7 +222,6 @@ func resourceAwsVpcEndpointServiceUpdate(d *schema.ResourceData, meta interface{ } } - d.Partial(false) return resourceAwsVpcEndpointServiceRead(d, meta) } diff --git a/aws/resource_aws_vpc_endpoint_service_test.go b/aws/resource_aws_vpc_endpoint_service_test.go index 9f122e379e2..a81c265c5aa 100644 --- a/aws/resource_aws_vpc_endpoint_service_test.go +++ b/aws/resource_aws_vpc_endpoint_service_test.go @@ -292,7 +292,14 @@ resource "aws_lb" "test2" { } } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "test1" { vpc_id = "${aws_vpc.test.id}" diff --git a/aws/resource_aws_vpc_endpoint_subnet_association_test.go b/aws/resource_aws_vpc_endpoint_subnet_association_test.go index a68982d0cd6..0e94dee4e39 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association_test.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association_test.go @@ -140,7 +140,14 @@ data "aws_security_group" "default" { data "aws_region" "current" {} -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc_endpoint" "ec2" { vpc_id = "${aws_vpc.foo.id}" @@ -180,7 +187,14 @@ data "aws_security_group" "default" { data "aws_region" "current" {} -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc_endpoint" "ec2" { vpc_id = "${aws_vpc.foo.id}" diff --git a/aws/resource_aws_vpc_endpoint_test.go b/aws/resource_aws_vpc_endpoint_test.go index de586af56fb..f7e1c9c54ed 100644 --- a/aws/resource_aws_vpc_endpoint_test.go +++ b/aws/resource_aws_vpc_endpoint_test.go @@ -703,7 +703,14 @@ resource "aws_vpc" "test" { data "aws_region" "current" {} -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "test1" { vpc_id = "${aws_vpc.test.id}" @@ -787,7 +794,14 @@ resource "aws_vpc" "test" { data "aws_region" "current" {} -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "test1" { vpc_id = "${aws_vpc.test.id}" @@ -884,7 +898,14 @@ resource "aws_lb" "test" { data "aws_region" "current" {} -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "test1" { vpc_id = "${aws_vpc.test.id}" diff --git a/aws/resource_aws_vpc_peering_connection.go b/aws/resource_aws_vpc_peering_connection.go index d0de5abcd90..00675448631 100644 --- a/aws/resource_aws_vpc_peering_connection.go +++ b/aws/resource_aws_vpc_peering_connection.go @@ -104,11 +104,18 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) } + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding tags: %s", err) + } + } + return resourceAwsVPCPeeringUpdate(d, meta) } func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient) + ignoreTagsConfig := client.IgnoreTagsConfig pcRaw, statusCode, err := vpcPeeringConnectionRefreshState(client.ec2conn, d.Id())() // Allow a failed VPC Peering Connection to fallthrough, @@ -162,7 +169,7 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error setting VPC Peering Connection requester information: %s", err) } - err = d.Set("tags", keyvaluetags.Ec2KeyValueTags(pc.Tags).IgnoreAws().Map()) + err = d.Set("tags", keyvaluetags.Ec2KeyValueTags(pc.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()) if err != nil { return fmt.Errorf("Error setting VPC Peering Connection tags: %s", err) } @@ -190,8 +197,8 @@ func resourceAwsVpcPeeringConnectionModifyOptions(d *schema.ResourceData, meta i req := &ec2.ModifyVpcPeeringConnectionOptionsInput{ VpcPeeringConnectionId: aws.String(d.Id()), - AccepterPeeringConnectionOptions: expandVpcPeeringConnectionOptions(d.Get("accepter").(*schema.Set).List(), crossRegionPeering), - RequesterPeeringConnectionOptions: expandVpcPeeringConnectionOptions(d.Get("requester").(*schema.Set).List(), crossRegionPeering), + AccepterPeeringConnectionOptions: expandVpcPeeringConnectionOptions(d.Get("accepter").([]interface{}), crossRegionPeering), + RequesterPeeringConnectionOptions: expandVpcPeeringConnectionOptions(d.Get("requester").([]interface{}), crossRegionPeering), } log.Printf("[DEBUG] Modifying VPC Peering Connection options: %#v", req) @@ -203,7 +210,7 @@ func resourceAwsVpcPeeringConnectionModifyOptions(d *schema.ResourceData, meta i func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - if d.HasChange("tags") { + if d.HasChange("tags") && !d.IsNewResource() { o, n := d.GetChange("tags") if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), o, n); err != nil { @@ -318,7 +325,7 @@ func vpcPeeringConnectionRefreshState(conn *ec2.EC2, id string) resource.StateRe func vpcPeeringConnectionOptionsSchema() *schema.Schema { return &schema.Schema{ - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Computed: true, MaxItems: 1, diff --git a/aws/resource_aws_vpc_peering_connection_accepter.go b/aws/resource_aws_vpc_peering_connection_accepter.go index 9ee605d2f00..b466ab0c789 100644 --- a/aws/resource_aws_vpc_peering_connection_accepter.go +++ b/aws/resource_aws_vpc_peering_connection_accepter.go @@ -4,7 +4,9 @@ import ( "fmt" "log" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) func resourceAwsVpcPeeringConnectionAccepter() *schema.Resource { @@ -59,14 +61,34 @@ func resourceAwsVpcPeeringConnectionAccepter() *schema.Resource { } func resourceAwsVPCPeeringAccepterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + id := d.Get("vpc_peering_connection_id").(string) - d.SetId(id) - if err := resourceAwsVPCPeeringRead(d, meta); err != nil { - return err + _, statusCode, err := vpcPeeringConnectionRefreshState(conn, id)() + + if err != nil && statusCode != ec2.VpcPeeringConnectionStateReasonCodeFailed { + return fmt.Errorf("error reading VPC Peering Connection (%s): %s", id, err) + } + + status := map[string]bool{ + ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, + ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, + ec2.VpcPeeringConnectionStateReasonCodeExpired: true, + ec2.VpcPeeringConnectionStateReasonCodeFailed: true, + ec2.VpcPeeringConnectionStateReasonCodeRejected: true, + "": true, // AWS consistency issue, see vpcPeeringConnectionRefreshState } - if d.Id() == "" { - return fmt.Errorf("VPC Peering Connection %q not found", id) + if _, ok := status[statusCode]; ok { + return fmt.Errorf("VPC Peering Connection (%s) in unexpected status for acceptance: %s", id, statusCode) + } + + d.SetId(id) + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { + return fmt.Errorf("error adding tags: %s", err) + } } return resourceAwsVPCPeeringUpdate(d, meta) diff --git a/aws/resource_aws_vpc_peering_connection_options_test.go b/aws/resource_aws_vpc_peering_connection_options_test.go index da3ac546610..a9552c49721 100644 --- a/aws/resource_aws_vpc_peering_connection_options_test.go +++ b/aws/resource_aws_vpc_peering_connection_options_test.go @@ -17,9 +17,10 @@ func TestAccAWSVpcPeeringConnectionOptions_basic(t *testing.T) { pcxResourceName := "aws_vpc_peering_connection.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccVpcPeeringConnectionOptionsConfig_sameRegion_sameAccount(rName), @@ -109,8 +110,9 @@ func TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount(t *testing testAccMultipleRegionsPreCheck(t) testAccAlternateRegionPreCheck(t) }, - ProviderFactories: testAccProviderFactories(&providers), - CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccVpcPeeringConnectionOptionsConfig_differentRegion_sameAccount(rName), @@ -200,8 +202,9 @@ func TestAccAWSVpcPeeringConnectionOptions_sameRegionDifferentAccount(t *testing testAccPreCheck(t) testAccAlternateAccountPreCheck(t) }, - ProviderFactories: testAccProviderFactories(&providers), - CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccVpcPeeringConnectionOptionsConfig_sameRegion_differentAccount(rName), diff --git a/aws/resource_aws_vpc_peering_connection_test.go b/aws/resource_aws_vpc_peering_connection_test.go index ee61d00b4bf..d2211daa1ee 100644 --- a/aws/resource_aws_vpc_peering_connection_test.go +++ b/aws/resource_aws_vpc_peering_connection_test.go @@ -240,17 +240,17 @@ func TestAccAWSVPCPeeringConnection_options(t *testing.T) { ), resource.TestCheckResourceAttr( resourceName, - "requester.41753983.allow_remote_vpc_dns_resolution", + "requester.0.allow_remote_vpc_dns_resolution", "false", ), resource.TestCheckResourceAttr( resourceName, - "requester.41753983.allow_classic_link_to_remote_vpc", + "requester.0.allow_classic_link_to_remote_vpc", "true", ), resource.TestCheckResourceAttr( resourceName, - "requester.41753983.allow_vpc_to_remote_classic_link", + "requester.0.allow_vpc_to_remote_classic_link", "true", ), testAccCheckAWSVpcPeeringConnectionOptions( @@ -269,17 +269,17 @@ func TestAccAWSVPCPeeringConnection_options(t *testing.T) { ), resource.TestCheckResourceAttr( resourceName, - "accepter.1102046665.allow_remote_vpc_dns_resolution", + "accepter.0.allow_remote_vpc_dns_resolution", "true", ), resource.TestCheckResourceAttr( resourceName, - "accepter.1102046665.allow_classic_link_to_remote_vpc", + "accepter.0.allow_classic_link_to_remote_vpc", "false", ), resource.TestCheckResourceAttr( resourceName, - "accepter.1102046665.allow_vpc_to_remote_classic_link", + "accepter.0.allow_vpc_to_remote_classic_link", "false", ), testAccCheckAWSVpcPeeringConnectionOptions( @@ -317,17 +317,17 @@ func TestAccAWSVPCPeeringConnection_options(t *testing.T) { ), resource.TestCheckResourceAttr( resourceName, - "requester.41753983.allow_remote_vpc_dns_resolution", + "requester.0.allow_remote_vpc_dns_resolution", "false", ), resource.TestCheckResourceAttr( resourceName, - "requester.41753983.allow_classic_link_to_remote_vpc", + "requester.0.allow_classic_link_to_remote_vpc", "true", ), resource.TestCheckResourceAttr( resourceName, - "requester.41753983.allow_vpc_to_remote_classic_link", + "requester.0.allow_vpc_to_remote_classic_link", "true", ), testAccCheckAWSVpcPeeringConnectionOptions( @@ -346,17 +346,17 @@ func TestAccAWSVPCPeeringConnection_options(t *testing.T) { ), resource.TestCheckResourceAttr( resourceName, - "accepter.1102046665.allow_remote_vpc_dns_resolution", + "accepter.0.allow_remote_vpc_dns_resolution", "true", ), resource.TestCheckResourceAttr( resourceName, - "accepter.1102046665.allow_classic_link_to_remote_vpc", + "accepter.0.allow_classic_link_to_remote_vpc", "false", ), resource.TestCheckResourceAttr( resourceName, - "accepter.1102046665.allow_vpc_to_remote_classic_link", + "accepter.0.allow_vpc_to_remote_classic_link", "false", ), testAccCheckAWSVpcPeeringConnectionOptions( diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index e123f3393e3..292bc05b67c 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -176,11 +176,11 @@ func TestAccAWSVpc_ignoreTags(t *testing.T) { ExpectNonEmptyPlan: true, }, { - Config: testAccProviderConfigIgnoreTagPrefixes1("ignorekey") + testAccVpcConfigTags, + Config: testAccProviderConfigIgnoreTagsKeyPrefixes1("ignorekey") + testAccVpcConfigTags, PlanOnly: true, }, { - Config: testAccProviderConfigIgnoreTags1("ignorekey1") + testAccVpcConfigTags, + Config: testAccProviderConfigIgnoreTagsKeys1("ignorekey1") + testAccVpcConfigTags, PlanOnly: true, }, }, diff --git a/aws/resource_aws_vpn_connection.go b/aws/resource_aws_vpn_connection.go index 61ffbc3d65a..d420e9ce58e 100644 --- a/aws/resource_aws_vpn_connection.go +++ b/aws/resource_aws_vpn_connection.go @@ -5,10 +5,8 @@ import ( "encoding/xml" "fmt" "log" - "net" "regexp" "sort" - "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -17,6 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -114,7 +113,7 @@ func resourceAwsVpnConnection() *schema.Resource { Optional: true, Computed: true, ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelInsideCIDR, + ValidateFunc: validateVpnConnectionTunnelInsideCIDR(), }, "tunnel1_preshared_key": { @@ -123,7 +122,7 @@ func resourceAwsVpnConnection() *schema.Resource { Sensitive: true, Computed: true, ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelPreSharedKey, + ValidateFunc: validateVpnConnectionTunnelPreSharedKey(), }, "tunnel2_inside_cidr": { @@ -131,7 +130,7 @@ func resourceAwsVpnConnection() *schema.Resource { Optional: true, Computed: true, ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelInsideCIDR, + ValidateFunc: validateVpnConnectionTunnelInsideCIDR(), }, "tunnel2_preshared_key": { @@ -140,7 +139,7 @@ func resourceAwsVpnConnection() *schema.Resource { Sensitive: true, Computed: true, ForceNew: true, - ValidateFunc: validateVpnConnectionTunnelPreSharedKey, + ValidateFunc: validateVpnConnectionTunnelPreSharedKey(), }, "tags": tagsSchema(), @@ -323,7 +322,7 @@ func resourceAwsVpnConnectionCreate(d *schema.ResourceData, meta interface{}) er } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 VPN Connection (%s) tags: %s", d.Id(), err) } } @@ -358,6 +357,7 @@ func vpnConnectionRefreshFunc(conn *ec2.EC2, connectionId string) resource.State func resourceAwsVpnConnectionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeVpnConnections(&ec2.DescribeVpnConnectionsInput{ VpnConnectionIds: []*string{aws.String(d.Id())}, @@ -432,7 +432,7 @@ func resourceAwsVpnConnectionRead(d *schema.ResourceData, meta interface{}) erro d.Set("transit_gateway_id", vpnConnection.TransitGatewayId) d.Set("type", vpnConnection.Type) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpnConnection.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpnConnection.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -618,55 +618,29 @@ func xmlConfigToTunnelInfo(xmlConfig string) (*TunnelInfo, error) { return &tunnelInfo, nil } -func validateVpnConnectionTunnelPreSharedKey(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if (len(value) < 8) || (len(value) > 64) { - errors = append(errors, fmt.Errorf("%q must be between 8 and 64 characters in length", k)) - } - - if strings.HasPrefix(value, "0") { - errors = append(errors, fmt.Errorf("%q cannot start with zero character", k)) - } - - if !regexp.MustCompile(`^[0-9a-zA-Z_.]+$`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q can only contain alphanumeric, period and underscore characters", k)) - } - - return +func validateVpnConnectionTunnelPreSharedKey() schema.SchemaValidateFunc { + return validation.All( + validation.StringLenBetween(8, 64), + validation.StringDoesNotMatch(regexp.MustCompile(`^0`), "cannot start with zero character"), + validation.StringMatch(regexp.MustCompile(`^[0-9a-zA-Z_.]+$`), "can only contain alphanumeric, period and underscore characters"), + ) } // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_VpnTunnelOptionsSpecification.html -func validateVpnConnectionTunnelInsideCIDR(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - _, ipnet, err := net.ParseCIDR(value) - - if err != nil { - errors = append(errors, fmt.Errorf("%q must contain a valid CIDR, got error parsing: %s", k, err)) - return - } - - if !strings.HasSuffix(ipnet.String(), "/30") { - errors = append(errors, fmt.Errorf("%q must be /30 CIDR", k)) - } - - if !strings.HasPrefix(ipnet.String(), "169.254.") { - errors = append(errors, fmt.Errorf("%q must be within 169.254.0.0/16", k)) - } else if ipnet.String() == "169.254.0.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.0.0/30", k)) - } else if ipnet.String() == "169.254.1.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.1.0/30", k)) - } else if ipnet.String() == "169.254.2.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.2.0/30", k)) - } else if ipnet.String() == "169.254.3.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.3.0/30", k)) - } else if ipnet.String() == "169.254.4.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.4.0/30", k)) - } else if ipnet.String() == "169.254.5.0/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.5.0/30", k)) - } else if ipnet.String() == "169.254.169.252/30" { - errors = append(errors, fmt.Errorf("%q cannot be 169.254.169.252/30", k)) - } - - return +func validateVpnConnectionTunnelInsideCIDR() schema.SchemaValidateFunc { + disallowedCidrs := []string{ + "169.254.0.0/30", + "169.254.1.0/30", + "169.254.2.0/30", + "169.254.3.0/30", + "169.254.4.0/30", + "169.254.5.0/30", + "169.254.169.252/30", + } + + return validation.All( + validation.IsCIDRNetwork(30, 30), + validation.StringMatch(regexp.MustCompile(`^169\.254\.`), "must be within 169.254.0.0/16"), + validation.StringNotInSlice(disallowedCidrs, false), + ) } diff --git a/aws/resource_aws_vpn_connection_test.go b/aws/resource_aws_vpn_connection_test.go index 387b9923fe7..efd8c4d263a 100644 --- a/aws/resource_aws_vpn_connection_test.go +++ b/aws/resource_aws_vpn_connection_test.go @@ -139,6 +139,7 @@ func TestAccAWSVpnConnection_TransitGatewayID(t *testing.T) { } func TestAccAWSVpnConnection_tunnelOptions(t *testing.T) { + badCidrRangeErr := regexp.MustCompile(`expected \w+ to not be any of \[[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/30\s?]+\]`) rBgpAsn := acctest.RandIntRange(64512, 65534) resourceName := "aws_vpn_connection.test" var vpn ec2.VpnConnection @@ -153,11 +154,11 @@ func TestAccAWSVpnConnection_tunnelOptions(t *testing.T) { // Checking CIDR blocks { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "not-a-cidr"), - ExpectError: regexp.MustCompile(`must contain a valid CIDR`), + ExpectError: regexp.MustCompile(`invalid CIDR address: not-a-cidr`), }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.254.0/31"), - ExpectError: regexp.MustCompile(`must be /30 CIDR`), + ExpectError: regexp.MustCompile(`expected "\w+" to contain a network Value with between 30 and 30 significant bits`), }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "172.16.0.0/30"), @@ -165,41 +166,41 @@ func TestAccAWSVpnConnection_tunnelOptions(t *testing.T) { }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.0.0/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.0.0/30`), + ExpectError: badCidrRangeErr, }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.1.0/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.1.0/30`), + ExpectError: badCidrRangeErr, }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.2.0/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.2.0/30`), + ExpectError: badCidrRangeErr, }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.3.0/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.3.0/30`), + ExpectError: badCidrRangeErr, }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.4.0/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.4.0/30`), + ExpectError: badCidrRangeErr, }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.5.0/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.5.0/30`), + ExpectError: badCidrRangeErr, }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "12345678", "169.254.169.252/30"), - ExpectError: regexp.MustCompile(`cannot be 169.254.169.252/30`), + ExpectError: badCidrRangeErr, }, // Checking PreShared Key { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "1234567", "169.254.254.0/30"), - ExpectError: regexp.MustCompile(`must be between 8 and 64 characters in length`), + ExpectError: regexp.MustCompile(`expected length of \w+ to be in the range \(8 - 64\)`), }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, acctest.RandStringFromCharSet(65, acctest.CharSetAlpha), "169.254.254.0/30"), - ExpectError: regexp.MustCompile(`must be between 8 and 64 characters in length`), + ExpectError: regexp.MustCompile(`expected length of \w+ to be in the range \(8 - 64\)`), }, { Config: testAccAwsVpnConnectionConfigSingleTunnelOptions(rBgpAsn, "01234567", "169.254.254.0/30"), diff --git a/aws/resource_aws_vpn_gateway.go b/aws/resource_aws_vpn_gateway.go index 4d5d2069c7e..9fe22725bae 100644 --- a/aws/resource_aws_vpn_gateway.go +++ b/aws/resource_aws_vpn_gateway.go @@ -81,7 +81,7 @@ func resourceAwsVpnGatewayCreate(d *schema.ResourceData, meta interface{}) error } if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { - if err := keyvaluetags.Ec2UpdateTags(conn, d.Id(), nil, v); err != nil { + if err := keyvaluetags.Ec2CreateTags(conn, d.Id(), v); err != nil { return fmt.Errorf("error adding EC2 VPN Gateway (%s) tags: %s", d.Id(), err) } } @@ -91,6 +91,7 @@ func resourceAwsVpnGatewayCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsVpnGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeVpnGateways(&ec2.DescribeVpnGatewaysInput{ VpnGatewayIds: []*string{aws.String(d.Id())}, @@ -125,7 +126,7 @@ func resourceAwsVpnGatewayRead(d *schema.ResourceData, meta interface{}) error { } d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(vpnGateway.AmazonSideAsn), 10)) - if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpnGateway.Tags).IgnoreAws().Map()); err != nil { + if err := d.Set("tags", keyvaluetags.Ec2KeyValueTags(vpnGateway.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_waf_byte_match_set.go b/aws/resource_aws_waf_byte_match_set.go index 075438f45af..5498013a4dc 100644 --- a/aws/resource_aws_waf_byte_match_set.go +++ b/aws/resource_aws_waf_byte_match_set.go @@ -2,10 +2,10 @@ package aws import ( "fmt" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "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/hashicorp/terraform-plugin-sdk/helper/schema" ) @@ -32,7 +32,7 @@ func resourceAwsWafByteMatchSet() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -44,6 +44,15 @@ func resourceAwsWafByteMatchSet() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.MatchFieldTypeUri, + waf.MatchFieldTypeQueryString, + waf.MatchFieldTypeHeader, + waf.MatchFieldTypeMethod, + waf.MatchFieldTypeBody, + waf.MatchFieldTypeSingleQueryArg, + waf.MatchFieldTypeAllQueryArgs, + }, false), }, }, }, @@ -85,7 +94,7 @@ func resourceAwsWafByteMatchSetCreate(d *schema.ResourceData, meta interface{}) } resp := out.(*waf.CreateByteMatchSetOutput) - d.SetId(*resp.ByteMatchSet.ByteMatchSetId) + d.SetId(aws.StringValue(resp.ByteMatchSet.ByteMatchSetId)) return resourceAwsWafByteMatchSetUpdate(d, meta) } @@ -99,7 +108,7 @@ func resourceAwsWafByteMatchSetRead(d *schema.ResourceData, meta interface{}) er resp, err := conn.GetByteMatchSet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) d.SetId("") return nil @@ -185,9 +194,9 @@ func flattenWafByteMatchTuples(bmt []*waf.ByteMatchTuple) []interface{} { if t.FieldToMatch != nil { m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) } - m["positional_constraint"] = *t.PositionalConstraint + m["positional_constraint"] = aws.StringValue(t.PositionalConstraint) m["target_string"] = string(t.TargetString) - m["text_transformation"] = *t.TextTransformation + m["text_transformation"] = aws.StringValue(t.TextTransformation) out[i] = m } @@ -208,7 +217,7 @@ func diffWafByteMatchSetTuples(oldT, newT []interface{}) []*waf.ByteMatchSetUpda updates = append(updates, &waf.ByteMatchSetUpdate{ Action: aws.String(waf.ChangeActionDelete), ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), TargetString: []byte(tuple["target_string"].(string)), TextTransformation: aws.String(tuple["text_transformation"].(string)), @@ -222,7 +231,7 @@ func diffWafByteMatchSetTuples(oldT, newT []interface{}) []*waf.ByteMatchSetUpda updates = append(updates, &waf.ByteMatchSetUpdate{ Action: aws.String(waf.ChangeActionInsert), ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), TargetString: []byte(tuple["target_string"].(string)), TextTransformation: aws.String(tuple["text_transformation"].(string)), diff --git a/aws/resource_aws_waf_byte_match_set_test.go b/aws/resource_aws_waf_byte_match_set_test.go index 93c12896f13..9fb94da2343 100644 --- a/aws/resource_aws_waf_byte_match_set_test.go +++ b/aws/resource_aws_waf_byte_match_set_test.go @@ -19,9 +19,10 @@ func TestAccAWSWafByteMatchSet_basic(t *testing.T) { resourceName := "aws_waf_byte_match_set.byte_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafByteMatchSetConfig(byteMatchSet), @@ -29,18 +30,18 @@ func TestAccAWSWafByteMatchSet_basic(t *testing.T) { testAccCheckAWSWafByteMatchSetExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "name", byteMatchSet), resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.#", "2"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.target_string", "badrefer1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.field_to_match.2991901334.data", "referer"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.field_to_match.2991901334.type", "HEADER"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.positional_constraint", "CONTAINS"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.target_string", "badrefer2"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.0.data", "referer"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.0.type", "HEADER"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.positional_constraint", "CONTAINS"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.target_string", "badrefer1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.field_to_match.0.data", "referer"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.field_to_match.0.type", "HEADER"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.positional_constraint", "CONTAINS"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.target_string", "badrefer2"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.text_transformation", "NONE"), ), }, { @@ -94,9 +95,10 @@ func TestAccAWSWafByteMatchSet_changeTuples(t *testing.T) { resourceName := "aws_waf_byte_match_set.byte_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafByteMatchSetConfig(byteMatchSetName), @@ -104,18 +106,18 @@ func TestAccAWSWafByteMatchSet_changeTuples(t *testing.T) { testAccCheckAWSWafByteMatchSetExists(resourceName, &before), resource.TestCheckResourceAttr(resourceName, "name", byteMatchSetName), resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.#", "2"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.target_string", "badrefer1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.field_to_match.2991901334.data", "referer"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.field_to_match.2991901334.type", "HEADER"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.positional_constraint", "CONTAINS"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.target_string", "badrefer2"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.839525137.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.0.data", "referer"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.0.type", "HEADER"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.positional_constraint", "CONTAINS"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.target_string", "badrefer1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.field_to_match.0.data", "referer"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.field_to_match.0.type", "HEADER"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.positional_constraint", "CONTAINS"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.target_string", "badrefer2"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2081155357.text_transformation", "NONE"), ), }, { @@ -124,18 +126,18 @@ func TestAccAWSWafByteMatchSet_changeTuples(t *testing.T) { testAccCheckAWSWafByteMatchSetExists(resourceName, &after), resource.TestCheckResourceAttr(resourceName, "name", byteMatchSetName), resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.#", "2"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.target_string", "badrefer1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.2174619346.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.4224486115.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.4224486115.field_to_match.4253810390.data", "GET"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.4224486115.field_to_match.4253810390.type", "METHOD"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.4224486115.positional_constraint", "CONTAINS_WORD"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.4224486115.target_string", "blah"), - resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.4224486115.text_transformation", "URL_DECODE"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.0.data", "referer"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.field_to_match.0.type", "HEADER"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.positional_constraint", "CONTAINS"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.target_string", "badrefer1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3483354334.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3945246213.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3945246213.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3945246213.field_to_match.0.type", "METHOD"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3945246213.positional_constraint", "CONTAINS_WORD"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3945246213.target_string", "blah"), + resource.TestCheckResourceAttr(resourceName, "byte_match_tuples.3945246213.text_transformation", "URL_DECODE"), ), }, { @@ -384,7 +386,7 @@ resource "aws_waf_byte_match_set" "byte_set" { field_to_match { type = "METHOD" - data = "GET" + # data field omitted as the type is neither "HEADER" nor "SINGLE_QUERY_ARG" } } } diff --git a/aws/resource_aws_waf_geo_match_set_test.go b/aws/resource_aws_waf_geo_match_set_test.go index c48ef971bfa..3a360450100 100644 --- a/aws/resource_aws_waf_geo_match_set_test.go +++ b/aws/resource_aws_waf_geo_match_set_test.go @@ -19,9 +19,10 @@ func TestAccAWSWafGeoMatchSet_basic(t *testing.T) { resourceName := "aws_waf_geo_match_set.geo_match_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafGeoMatchSetConfig(geoMatchSet), @@ -109,9 +110,10 @@ func TestAccAWSWafGeoMatchSet_changeConstraints(t *testing.T) { resourceName := "aws_waf_geo_match_set.geo_match_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafGeoMatchSetConfig(setName), diff --git a/aws/resource_aws_waf_ipset.go b/aws/resource_aws_waf_ipset.go index 7eef07fe965..19b90da7296 100644 --- a/aws/resource_aws_waf_ipset.go +++ b/aws/resource_aws_waf_ipset.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) // WAF requires UpdateIPSet operations be split into batches of 1000 Updates @@ -42,10 +42,15 @@ func resourceAwsWafIPSet() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.IPSetDescriptorTypeIpv4, + waf.IPSetDescriptorTypeIpv6, + }, false), }, "value": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.IsCIDR, }, }, }, @@ -70,7 +75,16 @@ func resourceAwsWafIPSetCreate(d *schema.ResourceData, meta interface{}) error { } resp := out.(*waf.CreateIPSetOutput) d.SetId(*resp.IPSet.IPSetId) - return resourceAwsWafIPSetUpdate(d, meta) + + if v, ok := d.GetOk("ip_set_descriptors"); ok && v.(*schema.Set).Len() > 0 { + + err := updateWafIpSetDescriptors(d.Id(), nil, v.(*schema.Set).List(), conn) + if err != nil { + return fmt.Errorf("Error Setting IP Descriptors: %s", err) + } + } + + return resourceAwsWafIPSetRead(d, meta) } func resourceAwsWafIPSetRead(d *schema.ResourceData, meta interface{}) error { @@ -82,7 +96,7 @@ func resourceAwsWafIPSetRead(d *schema.ResourceData, meta interface{}) error { resp, err := conn.GetIPSet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) d.SetId("") return nil @@ -95,8 +109,8 @@ func resourceAwsWafIPSetRead(d *schema.ResourceData, meta interface{}) error { for _, descriptor := range resp.IPSet.IPSetDescriptors { d := map[string]interface{}{ - "type": *descriptor.Type, - "value": *descriptor.Value, + "type": aws.StringValue(descriptor.Type), + "value": aws.StringValue(descriptor.Value), } descriptors = append(descriptors, d) } @@ -138,8 +152,7 @@ func resourceAwsWafIPSetDelete(d *schema.ResourceData, meta interface{}) error { oldDescriptors := d.Get("ip_set_descriptors").(*schema.Set).List() if len(oldDescriptors) > 0 { - noDescriptors := []interface{}{} - err := updateWafIpSetDescriptors(d.Id(), oldDescriptors, noDescriptors, conn) + err := updateWafIpSetDescriptors(d.Id(), oldDescriptors, nil, conn) if err != nil { return fmt.Errorf("Error Deleting IPSetDescriptors: %s", err) } diff --git a/aws/resource_aws_waf_ipset_test.go b/aws/resource_aws_waf_ipset_test.go index 6982de24279..1005fd3da17 100644 --- a/aws/resource_aws_waf_ipset_test.go +++ b/aws/resource_aws_waf_ipset_test.go @@ -8,40 +8,36 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/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/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccAWSWafIPSet_basic(t *testing.T) { var v waf.IPSet - ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_ipset.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafIPSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafIPSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafIPSetConfig(ipsetName), + Config: testAccAWSWafIPSetConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &v), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), - resource.TestMatchResourceAttr("aws_waf_ipset.ipset", "arn", - regexp.MustCompile(`^arn:[\w-]+:waf::\d{12}:ipset/.+$`)), + testAccCheckAWSWafIPSetExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), + testAccMatchResourceAttrGlobalARN(resourceName, "arn", "waf", regexp.MustCompile("ipset/.+$")), ), }, { - ResourceName: "aws_waf_ipset.ipset", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -51,16 +47,18 @@ func TestAccAWSWafIPSet_basic(t *testing.T) { func TestAccAWSWafIPSet_disappears(t *testing.T) { var v waf.IPSet - ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_ipset.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafIPSetConfig(ipsetName), + Config: testAccAWSWafIPSetConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &v), + testAccCheckAWSWafIPSetExists(resourceName, &v), testAccCheckAWSWafIPSetDisappears(&v), ), ExpectNonEmptyPlan: true, @@ -71,36 +69,37 @@ func TestAccAWSWafIPSet_disappears(t *testing.T) { func TestAccAWSWafIPSet_changeNameForceNew(t *testing.T) { var before, after waf.IPSet - ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - ipsetNewName := fmt.Sprintf("ip-set-new-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + uName := acctest.RandomWithPrefix("tf-acc-test-updated") + resourceName := "aws_waf_ipset.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafIPSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafIPSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafIPSetConfig(ipsetName), + Config: testAccAWSWafIPSetConfig(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &before), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), + testAccCheckAWSWafIPSetExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), ), }, { - Config: testAccAWSWafIPSetConfigChangeName(ipsetNewName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSWafIPSetConfigChangeName(uName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &after), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "name", ipsetNewName), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), + testAccCheckAWSWafIPSetExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "name", uName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), ), }, }, @@ -109,39 +108,38 @@ func TestAccAWSWafIPSet_changeNameForceNew(t *testing.T) { func TestAccAWSWafIPSet_changeDescriptors(t *testing.T) { var before, after waf.IPSet - ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_ipset.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafIPSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafIPSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafIPSetConfig(ipsetName), + Config: testAccAWSWafIPSetConfig(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &before), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.#", "1"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), + testAccCheckAWSWafIPSetExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.#", "1"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.4037960608.value", "192.0.7.0/24"), ), }, { - Config: testAccAWSWafIPSetConfigChangeIPSetDescriptors(ipsetName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSWafIPSetConfigChangeIPSetDescriptors(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &after), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.#", "1"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.115741513.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.115741513.value", "192.0.8.0/24"), + testAccCheckAWSWafIPSetExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.#", "1"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.115741513.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.115741513.value", "192.0.8.0/24"), ), }, }, @@ -150,7 +148,8 @@ func TestAccAWSWafIPSet_changeDescriptors(t *testing.T) { func TestAccAWSWafIPSet_noDescriptors(t *testing.T) { var ipset waf.IPSet - ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_ipset.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -158,23 +157,26 @@ func TestAccAWSWafIPSet_noDescriptors(t *testing.T) { CheckDestroy: testAccCheckAWSWafIPSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafIPSetConfig_noDescriptors(ipsetName), + Config: testAccAWSWafIPSetConfig_noDescriptors(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafIPSetExists("aws_waf_ipset.ipset", &ipset), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_waf_ipset.ipset", "ip_set_descriptors.#", "0"), + testAccCheckAWSWafIPSetExists(resourceName, &ipset), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.#", "0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } func TestAccAWSWafIPSet_IpSetDescriptors_1000UpdateLimit(t *testing.T) { var ipset waf.IPSet - ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resourceName := "aws_waf_ipset.ipset" + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_ipset.test" incrementIP := func(ip net.IP) { for j := len(ip) - 1; j >= 0; j-- { @@ -201,12 +203,17 @@ func TestAccAWSWafIPSet_IpSetDescriptors_1000UpdateLimit(t *testing.T) { CheckDestroy: testAccCheckAWSWafIPSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafIPSetConfig_IpSetDescriptors(ipsetName, strings.Join(ipSetDescriptors, "\n")), + Config: testAccAWSWafIPSetConfig_IpSetDescriptors(rName, strings.Join(ipSetDescriptors, "\n")), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSWafIPSetExists(resourceName, &ipset), resource.TestCheckResourceAttr(resourceName, "ip_set_descriptors.#", "2048"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -290,14 +297,14 @@ func TestDiffWafIpSetDescriptors(t *testing.T) { { Action: aws.String(waf.ChangeActionDelete), IPSetDescriptor: &waf.IPSetDescriptor{ - Type: aws.String("IPV4"), + Type: aws.String(waf.IPSetDescriptorTypeIpv4), Value: aws.String("192.0.7.0/24"), }, }, { Action: aws.String(waf.ChangeActionDelete), IPSetDescriptor: &waf.IPSetDescriptor{ - Type: aws.String("IPV4"), + Type: aws.String(waf.IPSetDescriptorTypeIpv4), Value: aws.String("192.0.8.0/24"), }, }, @@ -316,6 +323,31 @@ func TestDiffWafIpSetDescriptors(t *testing.T) { } } +func TestAccAWSWafIPSet_ipv6(t *testing.T) { + var v waf.IPSet + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_ipset.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafIPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafIPSetIPV6Config(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafIPSetExists(resourceName, &v), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAWSWafIPSetDisappears(v *waf.IPSet) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn @@ -377,10 +409,8 @@ func testAccCheckAWSWafIPSetDestroy(s *terraform.State) error { } // Return nil if the IPSet is already destroyed - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "WAFNonexistentItemException" { - return nil - } + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { + return nil } return err @@ -420,8 +450,8 @@ func testAccCheckAWSWafIPSetExists(n string, v *waf.IPSet) resource.TestCheckFun func testAccAWSWafIPSetConfig(name string) string { return fmt.Sprintf(` -resource "aws_waf_ipset" "ipset" { - name = "%s" +resource "aws_waf_ipset" "test" { + name = %[1]q ip_set_descriptors { type = "IPV4" @@ -433,8 +463,8 @@ resource "aws_waf_ipset" "ipset" { func testAccAWSWafIPSetConfigChangeName(name string) string { return fmt.Sprintf(` -resource "aws_waf_ipset" "ipset" { - name = "%s" +resource "aws_waf_ipset" "test" { + name = %[1]q ip_set_descriptors { type = "IPV4" @@ -446,8 +476,8 @@ resource "aws_waf_ipset" "ipset" { func testAccAWSWafIPSetConfigChangeIPSetDescriptors(name string) string { return fmt.Sprintf(` -resource "aws_waf_ipset" "ipset" { - name = "%s" +resource "aws_waf_ipset" "test" { + name = %[1]q ip_set_descriptors { type = "IPV4" @@ -459,8 +489,8 @@ resource "aws_waf_ipset" "ipset" { func testAccAWSWafIPSetConfig_IpSetDescriptors(name, ipSetDescriptors string) string { return fmt.Sprintf(` -resource "aws_waf_ipset" "ipset" { - name = "%s" +resource "aws_waf_ipset" "test" { + name = %[1]q %s } @@ -469,8 +499,21 @@ resource "aws_waf_ipset" "ipset" { func testAccAWSWafIPSetConfig_noDescriptors(name string) string { return fmt.Sprintf(` -resource "aws_waf_ipset" "ipset" { - name = "%s" +resource "aws_waf_ipset" "test" { + name = %[1]q +} +`, name) +} + +func testAccAWSWafIPSetIPV6Config(name string) string { + return fmt.Sprintf(` +resource "aws_waf_ipset" "test" { + name = %[1]q + + ip_set_descriptors { + type = "IPV6" + value = "1234:5678:9abc:6811:0000:0000:0000:0000/64" + } } `, name) } diff --git a/aws/resource_aws_waf_rate_based_rule.go b/aws/resource_aws_waf_rate_based_rule.go index 1f52bf092aa..6b2cbabd8fc 100644 --- a/aws/resource_aws_waf_rate_based_rule.go +++ b/aws/resource_aws_waf_rate_based_rule.go @@ -115,6 +115,7 @@ func resourceAwsWafRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) func resourceAwsWafRateBasedRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &waf.GetRateBasedRuleInput{ RuleId: aws.String(d.Id()), @@ -154,7 +155,7 @@ func resourceAwsWafRateBasedRuleRead(d *schema.ResourceData, meta interface{}) e if err != nil { return fmt.Errorf("Failed to get WAF Rated Based Rule parameter tags for %s: %s", d.Get("name"), err) } - if err := d.Set("tags", tagList.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tagList.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_waf_rate_based_rule_test.go b/aws/resource_aws_waf_rate_based_rule_test.go index 226bb5aa14f..8979a948d94 100644 --- a/aws/resource_aws_waf_rate_based_rule_test.go +++ b/aws/resource_aws_waf_rate_based_rule_test.go @@ -114,9 +114,10 @@ func TestAccAWSWafRateBasedRule_changePredicates(t *testing.T) { resourceName := "aws_waf_rate_based_rule.wafrule" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRuleDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRateBasedRuleConfig(ruleName), diff --git a/aws/resource_aws_waf_regex_match_set_test.go b/aws/resource_aws_waf_regex_match_set_test.go index e5ccc50ae32..7c915209430 100644 --- a/aws/resource_aws_waf_regex_match_set_test.go +++ b/aws/resource_aws_waf_regex_match_set_test.go @@ -108,9 +108,10 @@ func testAccAWSWafRegexMatchSet_basic(t *testing.T) { } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegexMatchSetConfig(matchSetName, patternSetName), @@ -146,9 +147,10 @@ func testAccAWSWafRegexMatchSet_changePatterns(t *testing.T) { resourceName := "aws_waf_regex_match_set.test" resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegexMatchSetConfig(matchSetName, patternSetName), diff --git a/aws/resource_aws_waf_regex_pattern_set_test.go b/aws/resource_aws_waf_regex_pattern_set_test.go index d8214b62c56..966d5bbd8d5 100644 --- a/aws/resource_aws_waf_regex_pattern_set_test.go +++ b/aws/resource_aws_waf_regex_pattern_set_test.go @@ -36,9 +36,10 @@ func testAccAWSWafRegexPatternSet_basic(t *testing.T) { resourceName := "aws_waf_regex_pattern_set.test" resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegexPatternSetConfig(patternSetName), @@ -66,9 +67,10 @@ func testAccAWSWafRegexPatternSet_changePatterns(t *testing.T) { resourceName := "aws_waf_regex_pattern_set.test" resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegexPatternSetConfig(patternSetName), diff --git a/aws/resource_aws_waf_rule.go b/aws/resource_aws_waf_rule.go index 82d8821da02..59b133c14f1 100644 --- a/aws/resource_aws_waf_rule.go +++ b/aws/resource_aws_waf_rule.go @@ -104,6 +104,7 @@ func resourceAwsWafRuleCreate(d *schema.ResourceData, meta interface{}) error { func resourceAwsWafRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &waf.GetRuleInput{ RuleId: aws.String(d.Id()), @@ -145,7 +146,7 @@ func resourceAwsWafRuleRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error listing tags for WAF Rule (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_waf_rule_group.go b/aws/resource_aws_waf_rule_group.go index 3b2ac9aebde..7bf3ed6429a 100644 --- a/aws/resource_aws_waf_rule_group.go +++ b/aws/resource_aws_waf_rule_group.go @@ -115,6 +115,7 @@ func resourceAwsWafRuleGroupCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsWafRuleGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &waf.GetRuleGroupInput{ RuleGroupId: aws.String(d.Id()), @@ -150,7 +151,7 @@ func resourceAwsWafRuleGroupRead(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("error listing tags for WAF Rule Group (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_waf_rule_group_test.go b/aws/resource_aws_waf_rule_group_test.go index 886b0dd9fd0..c86f6328ae6 100644 --- a/aws/resource_aws_waf_rule_group_test.go +++ b/aws/resource_aws_waf_rule_group_test.go @@ -73,9 +73,10 @@ func TestAccAWSWafRuleGroup_basic(t *testing.T) { resourceName := "aws_waf_rule_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRuleGroupConfig(ruleName, groupName), @@ -176,9 +177,10 @@ func TestAccAWSWafRuleGroup_changeActivatedRules(t *testing.T) { resourceName := "aws_waf_rule_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRuleGroupConfig(ruleName1, groupName), diff --git a/aws/resource_aws_waf_rule_test.go b/aws/resource_aws_waf_rule_test.go index afd7aacf476..a47ff8bf5e9 100644 --- a/aws/resource_aws_waf_rule_test.go +++ b/aws/resource_aws_waf_rule_test.go @@ -108,9 +108,10 @@ func TestAccAWSWafRule_changePredicates(t *testing.T) { resourceName := "aws_waf_rule.wafrule" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRuleDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRuleConfig(ruleName), @@ -149,9 +150,10 @@ func TestAccAWSWafRule_geoMatchSetPredicate(t *testing.T) { resourceName := "aws_waf_rule.wafrule" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRuleDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRuleConfig_geoMatchSetPredicate(ruleName), diff --git a/aws/resource_aws_waf_size_constraint_set_test.go b/aws/resource_aws_waf_size_constraint_set_test.go index a506cc44d87..5bcd85c0c89 100644 --- a/aws/resource_aws_waf_size_constraint_set_test.go +++ b/aws/resource_aws_waf_size_constraint_set_test.go @@ -20,9 +20,10 @@ func TestAccAWSWafSizeConstraintSet_basic(t *testing.T) { resourceName := "aws_waf_size_constraint_set.size_constraint_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafSizeConstraintSetConfig(sizeConstraintSet), @@ -112,9 +113,10 @@ func TestAccAWSWafSizeConstraintSet_changeConstraints(t *testing.T) { resourceName := "aws_waf_size_constraint_set.size_constraint_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafSizeConstraintSetConfig(setName), diff --git a/aws/resource_aws_waf_sql_injection_match_set.go b/aws/resource_aws_waf_sql_injection_match_set.go index 33268c98f5e..693088cd68c 100644 --- a/aws/resource_aws_waf_sql_injection_match_set.go +++ b/aws/resource_aws_waf_sql_injection_match_set.go @@ -5,7 +5,6 @@ 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/hashicorp/terraform-plugin-sdk/helper/schema" ) @@ -16,6 +15,9 @@ func resourceAwsWafSqlInjectionMatchSet() *schema.Resource { Read: resourceAwsWafSqlInjectionMatchSetRead, Update: resourceAwsWafSqlInjectionMatchSetUpdate, Delete: resourceAwsWafSqlInjectionMatchSetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -29,7 +31,7 @@ func resourceAwsWafSqlInjectionMatchSet() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -88,7 +90,7 @@ func resourceAwsWafSqlInjectionMatchSetRead(d *schema.ResourceData, meta interfa resp, err := conn.GetSqlInjectionMatchSet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) d.SetId("") return nil @@ -196,7 +198,7 @@ func diffWafSqlInjectionMatchTuples(oldT, newT []interface{}) []*waf.SqlInjectio updates = append(updates, &waf.SqlInjectionMatchSetUpdate{ Action: aws.String(waf.ChangeActionDelete), SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), TextTransformation: aws.String(tuple["text_transformation"].(string)), }, }) @@ -208,7 +210,7 @@ func diffWafSqlInjectionMatchTuples(oldT, newT []interface{}) []*waf.SqlInjectio updates = append(updates, &waf.SqlInjectionMatchSetUpdate{ Action: aws.String(waf.ChangeActionInsert), SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), TextTransformation: aws.String(tuple["text_transformation"].(string)), }, }) diff --git a/aws/resource_aws_waf_sql_injection_match_set_test.go b/aws/resource_aws_waf_sql_injection_match_set_test.go index cef4f40eb66..59d3a70bcb4 100644 --- a/aws/resource_aws_waf_sql_injection_match_set_test.go +++ b/aws/resource_aws_waf_sql_injection_match_set_test.go @@ -8,46 +8,47 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/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/terraform-plugin-sdk/helper/acctest" ) func TestAccAWSWafSqlInjectionMatchSet_basic(t *testing.T) { var v waf.SqlInjectionMatchSet - sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_sql_injection_match_set.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafSqlInjectionMatchSetConfig(sqlInjectionMatchSet), + Config: testAccAWSWafSqlInjectionMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &v), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "name", sqlInjectionMatchSet), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.#", "1"), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.field_to_match.#", "1"), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.field_to_match.2316364334.data", ""), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.field_to_match.2316364334.type", "QUERY_STRING"), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.text_transformation", "URL_DECODE"), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.#", "1"), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.field_to_match.0.type", "QUERY_STRING"), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.text_transformation", "URL_DECODE"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } func TestAccAWSWafSqlInjectionMatchSet_changeNameForceNew(t *testing.T) { var before, after waf.SqlInjectionMatchSet - sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - sqlInjectionMatchSetNewName := fmt.Sprintf("sqlInjectionMatchSetNewName-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + rNameNew := acctest.RandomWithPrefix("tf-acc-test-new") + resourceName := "aws_waf_sql_injection_match_set.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -55,23 +56,24 @@ func TestAccAWSWafSqlInjectionMatchSet_changeNameForceNew(t *testing.T) { CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafSqlInjectionMatchSetConfig(sqlInjectionMatchSet), + Config: testAccAWSWafSqlInjectionMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &before), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "name", sqlInjectionMatchSet), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.#", "1"), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.#", "1"), ), }, { - Config: testAccAWSWafSqlInjectionMatchSetConfigChangeName(sqlInjectionMatchSetNewName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSWafSqlInjectionMatchSetConfigChangeName(rNameNew), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &after), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "name", sqlInjectionMatchSetNewName), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.#", "1"), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "name", rNameNew), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.#", "1"), ), }, }, @@ -80,7 +82,8 @@ func TestAccAWSWafSqlInjectionMatchSet_changeNameForceNew(t *testing.T) { func TestAccAWSWafSqlInjectionMatchSet_disappears(t *testing.T) { var v waf.SqlInjectionMatchSet - sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_sql_injection_match_set.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -88,9 +91,9 @@ func TestAccAWSWafSqlInjectionMatchSet_disappears(t *testing.T) { CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafSqlInjectionMatchSetConfig(sqlInjectionMatchSet), + Config: testAccAWSWafSqlInjectionMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &v), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &v), testAccCheckAWSWafSqlInjectionMatchSetDisappears(&v), ), ExpectNonEmptyPlan: true, @@ -101,39 +104,38 @@ func TestAccAWSWafSqlInjectionMatchSet_disappears(t *testing.T) { func TestAccAWSWafSqlInjectionMatchSet_changeTuples(t *testing.T) { var before, after waf.SqlInjectionMatchSet - setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_sql_injection_match_set.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafSqlInjectionMatchSetConfig(setName), + Config: testAccAWSWafSqlInjectionMatchSetConfig(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &before), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "name", setName), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.#", "1"), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.field_to_match.#", "1"), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.field_to_match.2316364334.data", ""), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.field_to_match.2316364334.type", "QUERY_STRING"), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.3367958210.text_transformation", "URL_DECODE"), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.#", "1"), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.field_to_match.0.type", "QUERY_STRING"), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.2246477904.text_transformation", "URL_DECODE"), ), }, { - Config: testAccAWSWafSqlInjectionMatchSetConfig_changeTuples(setName), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSWafSqlInjectionMatchSetConfig_changeTuples(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &after), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "name", setName), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.#", "1"), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.#", "1"), ), }, }, @@ -141,8 +143,9 @@ func TestAccAWSWafSqlInjectionMatchSet_changeTuples(t *testing.T) { } func TestAccAWSWafSqlInjectionMatchSet_noTuples(t *testing.T) { - var ipset waf.SqlInjectionMatchSet - setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) + var sqlSet waf.SqlInjectionMatchSet + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_sql_injection_match_set.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -150,15 +153,18 @@ func TestAccAWSWafSqlInjectionMatchSet_noTuples(t *testing.T) { CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafSqlInjectionMatchSetConfig_noTuples(setName), + Config: testAccAWSWafSqlInjectionMatchSetConfig_noTuples(rName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafSqlInjectionMatchSetExists("aws_waf_sql_injection_match_set.sql_injection_match_set", &ipset), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "name", setName), - resource.TestCheckResourceAttr( - "aws_waf_sql_injection_match_set.sql_injection_match_set", "sql_injection_match_tuples.#", "0"), + testAccCheckAWSWafSqlInjectionMatchSetExists(resourceName, &sqlSet), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "sql_injection_match_tuples.#", "0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -176,7 +182,7 @@ func testAccCheckAWSWafSqlInjectionMatchSetDisappears(v *waf.SqlInjectionMatchSe for _, sqlInjectionMatchTuple := range v.SqlInjectionMatchTuples { sqlInjectionMatchTupleUpdate := &waf.SqlInjectionMatchSetUpdate{ - Action: aws.String("DELETE"), + Action: aws.String(waf.ChangeActionDelete), SqlInjectionMatchTuple: &waf.SqlInjectionMatchTuple{ FieldToMatch: sqlInjectionMatchTuple.FieldToMatch, TextTransformation: sqlInjectionMatchTuple.TextTransformation, @@ -235,7 +241,7 @@ func testAccCheckAWSWafSqlInjectionMatchSetExists(n string, v *waf.SqlInjectionM func testAccCheckAWSWafSqlInjectionMatchSetDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_waf_byte_match_set" { + if rs.Type != "aws_waf_sql_injection_match_set" { continue } @@ -252,10 +258,8 @@ func testAccCheckAWSWafSqlInjectionMatchSetDestroy(s *terraform.State) error { } // Return nil if the SqlInjectionMatchSet is already destroyed - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "WAFNonexistentItemException" { - return nil - } + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { + return nil } return err @@ -266,7 +270,7 @@ func testAccCheckAWSWafSqlInjectionMatchSetDestroy(s *terraform.State) error { func testAccAWSWafSqlInjectionMatchSetConfig(name string) string { return fmt.Sprintf(` -resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { +resource "aws_waf_sql_injection_match_set" "test" { name = "%s" sql_injection_match_tuples { @@ -282,7 +286,7 @@ resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { func testAccAWSWafSqlInjectionMatchSetConfigChangeName(name string) string { return fmt.Sprintf(` -resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { +resource "aws_waf_sql_injection_match_set" "test" { name = "%s" sql_injection_match_tuples { @@ -298,7 +302,7 @@ resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { func testAccAWSWafSqlInjectionMatchSetConfig_changeTuples(name string) string { return fmt.Sprintf(` -resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { +resource "aws_waf_sql_injection_match_set" "test" { name = "%s" sql_injection_match_tuples { @@ -314,7 +318,7 @@ resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { func testAccAWSWafSqlInjectionMatchSetConfig_noTuples(name string) string { return fmt.Sprintf(` -resource "aws_waf_sql_injection_match_set" "sql_injection_match_set" { +resource "aws_waf_sql_injection_match_set" "test" { name = "%s" } `, name) diff --git a/aws/resource_aws_waf_web_acl.go b/aws/resource_aws_waf_web_acl.go index 0e9df3bd4b6..313ff7b1f8b 100644 --- a/aws/resource_aws_waf_web_acl.go +++ b/aws/resource_aws_waf_web_acl.go @@ -33,7 +33,7 @@ func resourceAwsWafWebAcl() *schema.Resource { ForceNew: true, }, "default_action": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -154,7 +154,7 @@ func resourceAwsWafWebAclCreate(d *schema.ResourceData, meta interface{}) error out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateWebACLInput{ ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), + DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), MetricName: aws.String(d.Get("metric_name").(string)), Name: aws.String(d.Get("name").(string)), } @@ -196,7 +196,7 @@ func resourceAwsWafWebAclCreate(d *schema.ResourceData, meta interface{}) error _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), + DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), Updates: diffWafWebAclRules([]interface{}{}, rules), WebACLId: aws.String(d.Id()), } @@ -212,6 +212,8 @@ func resourceAwsWafWebAclCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsWafWebAclRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + params := &waf.GetWebACLInput{ WebACLId: aws.String(d.Id()), } @@ -246,7 +248,7 @@ func resourceAwsWafWebAclRead(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf("error listing tags for WAF ACL (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -288,7 +290,7 @@ func resourceAwsWafWebAclUpdate(d *schema.ResourceData, meta interface{}) error _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), + DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), Updates: diffWafWebAclRules(oldR, newR), WebACLId: aws.String(d.Id()), } @@ -345,7 +347,7 @@ func resourceAwsWafWebAclDelete(d *schema.ResourceData, meta interface{}) error _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, - DefaultAction: expandWafAction(d.Get("default_action").(*schema.Set).List()), + DefaultAction: expandWafAction(d.Get("default_action").([]interface{})), Updates: diffWafWebAclRules(rules, []interface{}{}), WebACLId: aws.String(d.Id()), } diff --git a/aws/resource_aws_waf_web_acl_test.go b/aws/resource_aws_waf_web_acl_test.go index 4f98734f80f..cbc1e71d7c9 100644 --- a/aws/resource_aws_waf_web_acl_test.go +++ b/aws/resource_aws_waf_web_acl_test.go @@ -129,7 +129,7 @@ func TestAccAWSWafWebAcl_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), resource.TestCheckResourceAttr(resourceName, "metric_name", rName), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), @@ -162,7 +162,7 @@ func TestAccAWSWafWebAcl_changeNameForceNew(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), resource.TestCheckResourceAttr(resourceName, "metric_name", rName1), resource.TestCheckResourceAttr(resourceName, "name", rName1), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), @@ -174,7 +174,7 @@ func TestAccAWSWafWebAcl_changeNameForceNew(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), resource.TestCheckResourceAttr(resourceName, "metric_name", rName2), resource.TestCheckResourceAttr(resourceName, "name", rName2), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), @@ -205,7 +205,7 @@ func TestAccAWSWafWebAcl_DefaultAction(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), ), }, { @@ -213,7 +213,7 @@ func TestAccAWSWafWebAcl_DefaultAction(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.2267395054.type", "BLOCK"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "BLOCK"), ), }, { @@ -356,7 +356,7 @@ func TestAccAWSWafWebAcl_Tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), resource.TestCheckResourceAttr(resourceName, "metric_name", rName), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), @@ -369,7 +369,7 @@ func TestAccAWSWafWebAcl_Tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), resource.TestCheckResourceAttr(resourceName, "metric_name", rName), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), @@ -383,7 +383,7 @@ func TestAccAWSWafWebAcl_Tags(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafWebAclExists(resourceName, &webACL), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), - resource.TestCheckResourceAttr(resourceName, "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), resource.TestCheckResourceAttr(resourceName, "metric_name", rName), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), diff --git a/aws/resource_aws_waf_xss_match_set.go b/aws/resource_aws_waf_xss_match_set.go index da671ca09b2..bd14289fef5 100644 --- a/aws/resource_aws_waf_xss_match_set.go +++ b/aws/resource_aws_waf_xss_match_set.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) func resourceAwsWafXssMatchSet() *schema.Resource { @@ -37,7 +37,7 @@ func resourceAwsWafXssMatchSet() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -49,6 +49,15 @@ func resourceAwsWafXssMatchSet() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.MatchFieldTypeUri, + waf.MatchFieldTypeSingleQueryArg, + waf.MatchFieldTypeQueryString, + waf.MatchFieldTypeMethod, + waf.MatchFieldTypeHeader, + waf.MatchFieldTypeBody, + waf.MatchFieldTypeAllQueryArgs, + }, false), }, }, }, @@ -56,6 +65,14 @@ func resourceAwsWafXssMatchSet() *schema.Resource { "text_transformation": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.TextTransformationUrlDecode, + waf.TextTransformationNone, + waf.TextTransformationHtmlEntityDecode, + waf.TextTransformationCompressWhiteSpace, + waf.TextTransformationCmdLine, + waf.TextTransformationLowercase, + }, false), }, }, }, @@ -79,26 +96,32 @@ func resourceAwsWafXssMatchSetCreate(d *schema.ResourceData, meta interface{}) e return conn.CreateXssMatchSet(params) }) if err != nil { - return fmt.Errorf("Error creating XssMatchSet: %s", err) + return fmt.Errorf("Error creating WAF XSS Match Set: %s", err) } resp := out.(*waf.CreateXssMatchSetOutput) d.SetId(*resp.XssMatchSet.XssMatchSetId) - return resourceAwsWafXssMatchSetUpdate(d, meta) + if v, ok := d.GetOk("xss_match_tuples"); ok && v.(*schema.Set).Len() > 0 { + err := updateXssMatchSetResource(d.Id(), nil, v.(*schema.Set).List(), conn) + if err != nil { + return fmt.Errorf("Error setting WAF XSS Match Set tuples: %s", err) + } + } + return resourceAwsWafXssMatchSetRead(d, meta) } func resourceAwsWafXssMatchSetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - log.Printf("[INFO] Reading XssMatchSet: %s", d.Get("name").(string)) + log.Printf("[INFO] Reading WAF XSS Match Set: %s", d.Get("name").(string)) params := &waf.GetXssMatchSetInput{ XssMatchSetId: aws.String(d.Id()), } resp, err := conn.GetXssMatchSet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == waf.ErrCodeNonexistentItemException { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { + log.Printf("[WARN] WAF XSS Match Set (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -129,7 +152,7 @@ func resourceAwsWafXssMatchSetUpdate(d *schema.ResourceData, meta interface{}) e err := updateXssMatchSetResource(d.Id(), oldT, newT, conn) if err != nil { - return fmt.Errorf("Error updating XssMatchSet: %s", err) + return fmt.Errorf("Error updating WAF XSS Match Set: %s", err) } } @@ -141,10 +164,9 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e oldTuples := d.Get("xss_match_tuples").(*schema.Set).List() if len(oldTuples) > 0 { - noTuples := []interface{}{} - err := updateXssMatchSetResource(d.Id(), oldTuples, noTuples, conn) + err := updateXssMatchSetResource(d.Id(), oldTuples, nil, conn) if err != nil { - return fmt.Errorf("Error updating IPSetDescriptors: %s", err) + return fmt.Errorf("Error removing WAF XSS Match Set tuples: %s", err) } } @@ -158,7 +180,7 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e return conn.DeleteXssMatchSet(req) }) if err != nil { - return fmt.Errorf("Error deleting XssMatchSet: %s", err) + return fmt.Errorf("Error deleting WAF XSS Match Set: %s", err) } return nil @@ -173,11 +195,11 @@ func updateXssMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WA Updates: diffWafXssMatchSetTuples(oldT, newT), } - log.Printf("[INFO] Updating XssMatchSet tuples: %s", req) + log.Printf("[INFO] Updating WAF XSS Match Set tuples: %s", req) return conn.UpdateXssMatchSet(req) }) if err != nil { - return fmt.Errorf("Error updating XssMatchSet: %s", err) + return fmt.Errorf("Error updating WAF XSS Match Set: %s", err) } return nil @@ -188,7 +210,7 @@ func flattenWafXssMatchTuples(ts []*waf.XssMatchTuple) []interface{} { for i, t := range ts { m := make(map[string]interface{}) m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) - m["text_transformation"] = *t.TextTransformation + m["text_transformation"] = aws.StringValue(t.TextTransformation) out[i] = m } return out @@ -208,7 +230,7 @@ func diffWafXssMatchSetTuples(oldT, newT []interface{}) []*waf.XssMatchSetUpdate updates = append(updates, &waf.XssMatchSetUpdate{ Action: aws.String(waf.ChangeActionDelete), XssMatchTuple: &waf.XssMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), TextTransformation: aws.String(tuple["text_transformation"].(string)), }, }) @@ -220,7 +242,7 @@ func diffWafXssMatchSetTuples(oldT, newT []interface{}) []*waf.XssMatchSetUpdate updates = append(updates, &waf.XssMatchSetUpdate{ Action: aws.String(waf.ChangeActionInsert), XssMatchTuple: &waf.XssMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), TextTransformation: aws.String(tuple["text_transformation"].(string)), }, }) diff --git a/aws/resource_aws_waf_xss_match_set_test.go b/aws/resource_aws_waf_xss_match_set_test.go index 4c19716d84a..91bb27cb3a7 100644 --- a/aws/resource_aws_waf_xss_match_set_test.go +++ b/aws/resource_aws_waf_xss_match_set_test.go @@ -5,40 +5,39 @@ import ( "regexp" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/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/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccAWSWafXssMatchSet_basic(t *testing.T) { var v waf.XssMatchSet - xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resourceName := "aws_waf_xss_match_set.xss_match_set" + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafXssMatchSetConfig(xssMatchSet), + Config: testAccAWSWafXssMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafXssMatchSetExists(resourceName, &v), testAccMatchResourceAttrGlobalARN(resourceName, "arn", "waf", regexp.MustCompile(`xssmatchset/.+`)), - resource.TestCheckResourceAttr(resourceName, "name", xssMatchSet), + resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.#", "2"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.field_to_match.2316364334.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.field_to_match.2316364334.type", "QUERY_STRING"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.field_to_match.3756326843.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.field_to_match.3756326843.type", "URI"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.field_to_match.0.type", "URI"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.field_to_match.0.type", "QUERY_STRING"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.text_transformation", "NONE"), ), }, { @@ -52,9 +51,9 @@ func TestAccAWSWafXssMatchSet_basic(t *testing.T) { func TestAccAWSWafXssMatchSet_changeNameForceNew(t *testing.T) { var before, after waf.XssMatchSet - xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") xssMatchSetNewName := fmt.Sprintf("xssMatchSetNewName-%s", acctest.RandString(5)) - resourceName := "aws_waf_xss_match_set.xss_match_set" + resourceName := "aws_waf_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -62,10 +61,10 @@ func TestAccAWSWafXssMatchSet_changeNameForceNew(t *testing.T) { CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafXssMatchSetConfig(xssMatchSet), + Config: testAccAWSWafXssMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafXssMatchSetExists(resourceName, &before), - resource.TestCheckResourceAttr(resourceName, "name", xssMatchSet), + resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.#", "2"), ), }, @@ -88,8 +87,8 @@ func TestAccAWSWafXssMatchSet_changeNameForceNew(t *testing.T) { func TestAccAWSWafXssMatchSet_disappears(t *testing.T) { var v waf.XssMatchSet - xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resourceName := "aws_waf_xss_match_set.xss_match_set" + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -97,7 +96,7 @@ func TestAccAWSWafXssMatchSet_disappears(t *testing.T) { CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafXssMatchSetConfig(xssMatchSet), + Config: testAccAWSWafXssMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafXssMatchSetExists(resourceName, &v), testAccCheckAWSWafXssMatchSetDisappears(&v), @@ -110,13 +109,14 @@ func TestAccAWSWafXssMatchSet_disappears(t *testing.T) { func TestAccAWSWafXssMatchSet_changeTuples(t *testing.T) { var before, after waf.XssMatchSet - setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resourceName := "aws_waf_xss_match_set.xss_match_set" + setName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafXssMatchSetConfig(setName), @@ -124,14 +124,14 @@ func TestAccAWSWafXssMatchSet_changeTuples(t *testing.T) { testAccCheckAWSWafXssMatchSetExists(resourceName, &before), resource.TestCheckResourceAttr(resourceName, "name", setName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.#", "2"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.field_to_match.2316364334.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.field_to_match.2316364334.type", "QUERY_STRING"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2018581549.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.field_to_match.3756326843.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.field_to_match.3756326843.type", "URI"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2786024938.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.field_to_match.0.type", "QUERY_STRING"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.599421078.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.field_to_match.0.type", "URI"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.41660541.text_transformation", "NONE"), ), }, { @@ -140,14 +140,14 @@ func TestAccAWSWafXssMatchSet_changeTuples(t *testing.T) { testAccCheckAWSWafXssMatchSetExists(resourceName, &after), resource.TestCheckResourceAttr(resourceName, "name", setName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.#", "2"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2893682529.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2893682529.field_to_match.4253810390.data", "GET"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2893682529.field_to_match.4253810390.type", "METHOD"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.2893682529.text_transformation", "HTML_ENTITY_DECODE"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.4270311415.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.4270311415.field_to_match.281401076.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.4270311415.field_to_match.281401076.type", "BODY"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.4270311415.text_transformation", "CMD_LINE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.42378128.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.42378128.field_to_match.0.data", "GET"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.42378128.field_to_match.0.type", "METHOD"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.42378128.text_transformation", "HTML_ENTITY_DECODE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.3815294338.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.3815294338.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.3815294338.field_to_match.0.type", "BODY"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuples.3815294338.text_transformation", "CMD_LINE"), ), }, { @@ -161,8 +161,8 @@ func TestAccAWSWafXssMatchSet_changeTuples(t *testing.T) { func TestAccAWSWafXssMatchSet_noTuples(t *testing.T) { var ipset waf.XssMatchSet - setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resourceName := "aws_waf_xss_match_set.xss_match_set" + setName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_waf_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSWaf(t) }, @@ -199,7 +199,7 @@ func testAccCheckAWSWafXssMatchSetDisappears(v *waf.XssMatchSet) resource.TestCh for _, xssMatchTuple := range v.XssMatchTuples { xssMatchTupleUpdate := &waf.XssMatchSetUpdate{ - Action: aws.String("DELETE"), + Action: aws.String(waf.ChangeActionDelete), XssMatchTuple: &waf.XssMatchTuple{ FieldToMatch: xssMatchTuple.FieldToMatch, TextTransformation: xssMatchTuple.TextTransformation, @@ -221,7 +221,7 @@ func testAccCheckAWSWafXssMatchSetDisappears(v *waf.XssMatchSet) resource.TestCh return conn.DeleteXssMatchSet(opts) }) if err != nil { - return fmt.Errorf("Error deleting XssMatchSet: %s", err) + return fmt.Errorf("Error deleting WAF XSS Match Set: %s", err) } return nil } @@ -235,7 +235,7 @@ func testAccCheckAWSWafXssMatchSetExists(n string, v *waf.XssMatchSet) resource. } if rs.Primary.ID == "" { - return fmt.Errorf("No WAF XssMatchSet ID is set") + return fmt.Errorf("No WAF XSS Match Set ID is set") } conn := testAccProvider.Meta().(*AWSClient).wafconn @@ -258,7 +258,7 @@ func testAccCheckAWSWafXssMatchSetExists(n string, v *waf.XssMatchSet) resource. func testAccCheckAWSWafXssMatchSetDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_waf_byte_match_set" { + if rs.Type != "aws_waf_xss_match_set" { continue } @@ -275,10 +275,8 @@ func testAccCheckAWSWafXssMatchSetDestroy(s *terraform.State) error { } // Return nil if the XssMatchSet is already destroyed - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == waf.ErrCodeNonexistentItemException { - return nil - } + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { + return nil } return err @@ -289,8 +287,8 @@ func testAccCheckAWSWafXssMatchSetDestroy(s *terraform.State) error { func testAccAWSWafXssMatchSetConfig(name string) string { return fmt.Sprintf(` -resource "aws_waf_xss_match_set" "xss_match_set" { - name = "%s" +resource "aws_waf_xss_match_set" "test" { + name = %[1]q xss_match_tuples { text_transformation = "NONE" @@ -313,8 +311,8 @@ resource "aws_waf_xss_match_set" "xss_match_set" { func testAccAWSWafXssMatchSetConfigChangeName(name string) string { return fmt.Sprintf(` -resource "aws_waf_xss_match_set" "xss_match_set" { - name = "%s" +resource "aws_waf_xss_match_set" "test" { + name = %[1]q xss_match_tuples { text_transformation = "NONE" @@ -337,8 +335,8 @@ resource "aws_waf_xss_match_set" "xss_match_set" { func testAccAWSWafXssMatchSetConfig_changeTuples(name string) string { return fmt.Sprintf(` -resource "aws_waf_xss_match_set" "xss_match_set" { - name = "%s" +resource "aws_waf_xss_match_set" "test" { + name = %[1]q xss_match_tuples { text_transformation = "CMD_LINE" @@ -362,8 +360,8 @@ resource "aws_waf_xss_match_set" "xss_match_set" { func testAccAWSWafXssMatchSetConfig_noTuples(name string) string { return fmt.Sprintf(` -resource "aws_waf_xss_match_set" "xss_match_set" { - name = "%s" +resource "aws_waf_xss_match_set" "test" { + name = %[1]q } `, name) } diff --git a/aws/resource_aws_wafregional_byte_match_set_test.go b/aws/resource_aws_wafregional_byte_match_set_test.go index 6595ed9e720..d6ee51f4dc3 100644 --- a/aws/resource_aws_wafregional_byte_match_set_test.go +++ b/aws/resource_aws_wafregional_byte_match_set_test.go @@ -18,9 +18,10 @@ func TestAccAWSWafRegionalByteMatchSet_basic(t *testing.T) { resourceName := "aws_wafregional_byte_match_set.byte_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalByteMatchSetConfig(byteMatchSet), @@ -72,9 +73,10 @@ func TestAccAWSWafRegionalByteMatchSet_changeNameForceNew(t *testing.T) { resourceName := "aws_wafregional_byte_match_set.byte_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalByteMatchSetConfig(byteMatchSet), @@ -159,9 +161,10 @@ func TestAccAWSWafRegionalByteMatchSet_changeByteMatchTuples(t *testing.T) { resourceName := "aws_wafregional_byte_match_set.byte_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalByteMatchSetConfig(byteMatchSetName), diff --git a/aws/resource_aws_wafregional_geo_match_set_test.go b/aws/resource_aws_wafregional_geo_match_set_test.go index 02b7a551d88..b7854e2408c 100644 --- a/aws/resource_aws_wafregional_geo_match_set_test.go +++ b/aws/resource_aws_wafregional_geo_match_set_test.go @@ -17,9 +17,10 @@ func TestAccAWSWafRegionalGeoMatchSet_basic(t *testing.T) { geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalGeoMatchSetConfig(geoMatchSet), @@ -117,9 +118,10 @@ func TestAccAWSWafRegionalGeoMatchSet_changeConstraints(t *testing.T) { setName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalGeoMatchSetConfig(setName), diff --git a/aws/resource_aws_wafregional_ipset_test.go b/aws/resource_aws_wafregional_ipset_test.go index 1a6b6431b17..c4546f3f8e8 100644 --- a/aws/resource_aws_wafregional_ipset_test.go +++ b/aws/resource_aws_wafregional_ipset_test.go @@ -19,30 +19,28 @@ import ( ) func TestAccAWSWafRegionalIPSet_basic(t *testing.T) { + resourceName := "aws_wafregional_ipset.ipset" var v waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalIPSetConfig(ipsetName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &v), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), - resource.TestMatchResourceAttr("aws_wafregional_ipset.ipset", "arn", - regexp.MustCompile(`^arn:[\w-]+:waf-regional:[^:]+:\d{12}:ipset/.+$`)), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "name", ipsetName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "waf-regional", regexp.MustCompile("ipset/.+$")), ), }, { - ResourceName: "aws_wafregional_ipset.ipset", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -51,6 +49,7 @@ func TestAccAWSWafRegionalIPSet_basic(t *testing.T) { } func TestAccAWSWafRegionalIPSet_disappears(t *testing.T) { + resourceName := "aws_wafregional_ipset.ipset" var v waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ @@ -61,7 +60,7 @@ func TestAccAWSWafRegionalIPSet_disappears(t *testing.T) { { Config: testAccAWSWafRegionalIPSetConfig(ipsetName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &v), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &v), testAccCheckAWSWafRegionalIPSetDisappears(&v), ), ExpectNonEmptyPlan: true, @@ -71,41 +70,37 @@ func TestAccAWSWafRegionalIPSet_disappears(t *testing.T) { } func TestAccAWSWafRegionalIPSet_changeNameForceNew(t *testing.T) { + resourceName := "aws_wafregional_ipset.ipset" var before, after waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) ipsetNewName := fmt.Sprintf("ip-set-new-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalIPSetConfig(ipsetName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &before), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "name", ipsetName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), ), }, { Config: testAccAWSWafRegionalIPSetConfigChangeName(ipsetNewName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &after), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "name", ipsetNewName), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "name", ipsetNewName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), ), }, { - ResourceName: "aws_wafregional_ipset.ipset", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -114,44 +109,38 @@ func TestAccAWSWafRegionalIPSet_changeNameForceNew(t *testing.T) { } func TestAccAWSWafRegionalIPSet_changeDescriptors(t *testing.T) { + resourceName := "aws_wafregional_ipset.ipset" var before, after waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalIPSetConfig(ipsetName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &before), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.#", "1"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &before), + resource.TestCheckResourceAttr(resourceName, "name", ipsetName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.#", "1"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.4037960608.value", "192.0.7.0/24"), ), }, { Config: testAccAWSWafRegionalIPSetConfigChangeIPSetDescriptors(ipsetName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &after), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.#", "1"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.115741513.type", "IPV4"), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.115741513.value", "192.0.8.0/24"), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &after), + resource.TestCheckResourceAttr(resourceName, "name", ipsetName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.#", "1"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.115741513.type", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.115741513.value", "192.0.8.0/24"), ), }, { - ResourceName: "aws_wafregional_ipset.ipset", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -205,6 +194,7 @@ func TestAccAWSWafRegionalIPSet_IpSetDescriptors_1000UpdateLimit(t *testing.T) { } func TestAccAWSWafRegionalIPSet_noDescriptors(t *testing.T) { + resourceName := "aws_wafregional_ipset.ipset" var ipset waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) @@ -216,15 +206,13 @@ func TestAccAWSWafRegionalIPSet_noDescriptors(t *testing.T) { { Config: testAccAWSWafRegionalIPSetConfig_noDescriptors(ipsetName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &ipset), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "name", ipsetName), - resource.TestCheckResourceAttr( - "aws_wafregional_ipset.ipset", "ip_set_descriptor.#", "0"), + testAccCheckAWSWafRegionalIPSetExists(resourceName, &ipset), + resource.TestCheckResourceAttr(resourceName, "name", ipsetName), + resource.TestCheckResourceAttr(resourceName, "ip_set_descriptor.#", "0"), ), }, { - ResourceName: "aws_wafregional_ipset.ipset", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, diff --git a/aws/resource_aws_wafregional_rate_based_rule.go b/aws/resource_aws_wafregional_rate_based_rule.go index a6fe9f72063..4073489c98d 100644 --- a/aws/resource_aws_wafregional_rate_based_rule.go +++ b/aws/resource_aws_wafregional_rate_based_rule.go @@ -116,6 +116,7 @@ func resourceAwsWafRegionalRateBasedRuleCreate(d *schema.ResourceData, meta inte func resourceAwsWafRegionalRateBasedRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafregionalconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &waf.GetRateBasedRuleInput{ RuleId: aws.String(d.Id()), @@ -154,7 +155,7 @@ func resourceAwsWafRegionalRateBasedRuleRead(d *schema.ResourceData, meta interf if err != nil { return fmt.Errorf("Failed to get WAF Regional Rated Based Rule parameter tags for %s: %s", d.Get("name"), err) } - if err := d.Set("tags", tagList.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tagList.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_wafregional_rate_based_rule_test.go b/aws/resource_aws_wafregional_rate_based_rule_test.go index 4c45493e926..ec3c4811575 100644 --- a/aws/resource_aws_wafregional_rate_based_rule_test.go +++ b/aws/resource_aws_wafregional_rate_based_rule_test.go @@ -259,9 +259,10 @@ func TestAccAWSWafRegionalRateBasedRule_changePredicates(t *testing.T) { ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRateBasedRuleConfig(ruleName), diff --git a/aws/resource_aws_wafregional_regex_match_set_test.go b/aws/resource_aws_wafregional_regex_match_set_test.go index 52a1c16ca71..a48bac580b6 100644 --- a/aws/resource_aws_wafregional_regex_match_set_test.go +++ b/aws/resource_aws_wafregional_regex_match_set_test.go @@ -108,9 +108,10 @@ func testAccAWSWafRegionalRegexMatchSet_basic(t *testing.T) { } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRegexMatchSetConfig(matchSetName, patternSetName), @@ -145,9 +146,10 @@ func testAccAWSWafRegionalRegexMatchSet_changePatterns(t *testing.T) { patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRegexMatchSetConfig(matchSetName, patternSetName), diff --git a/aws/resource_aws_wafregional_regex_pattern_set_test.go b/aws/resource_aws_wafregional_regex_pattern_set_test.go index 03eba49418d..385c625dfdd 100644 --- a/aws/resource_aws_wafregional_regex_pattern_set_test.go +++ b/aws/resource_aws_wafregional_regex_pattern_set_test.go @@ -36,9 +36,10 @@ func testAccAWSWafRegionalRegexPatternSet_basic(t *testing.T) { resourceName := "aws_wafregional_regex_pattern_set.test" resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRegexPatternSetConfig(patternSetName), @@ -65,9 +66,10 @@ func testAccAWSWafRegionalRegexPatternSet_changePatterns(t *testing.T) { resourceName := "aws_wafregional_regex_pattern_set.test" resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRegexPatternSetConfig(patternSetName), diff --git a/aws/resource_aws_wafregional_rule.go b/aws/resource_aws_wafregional_rule.go index b16703e3468..a95036cf245 100644 --- a/aws/resource_aws_wafregional_rule.go +++ b/aws/resource_aws_wafregional_rule.go @@ -103,6 +103,7 @@ func resourceAwsWafRegionalRuleCreate(d *schema.ResourceData, meta interface{}) func resourceAwsWafRegionalRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafregionalconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &waf.GetRuleInput{ RuleId: aws.String(d.Id()), @@ -134,7 +135,7 @@ func resourceAwsWafRegionalRuleRead(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("error listing tags for WAF Regional Rule (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_wafregional_rule_group.go b/aws/resource_aws_wafregional_rule_group.go index 48b5d97e906..a797398d2a1 100644 --- a/aws/resource_aws_wafregional_rule_group.go +++ b/aws/resource_aws_wafregional_rule_group.go @@ -117,6 +117,7 @@ func resourceAwsWafRegionalRuleGroupCreate(d *schema.ResourceData, meta interfac func resourceAwsWafRegionalRuleGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafregionalconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig params := &waf.GetRuleGroupInput{ RuleGroupId: aws.String(d.Id()), @@ -153,7 +154,7 @@ func resourceAwsWafRegionalRuleGroupRead(d *schema.ResourceData, meta interface{ if err != nil { return fmt.Errorf("error listing tags for WAF Regional Rule Group (%s): %s", arn, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_wafregional_rule_group_test.go b/aws/resource_aws_wafregional_rule_group_test.go index 780fc656e60..ec1dbb9f9fd 100644 --- a/aws/resource_aws_wafregional_rule_group_test.go +++ b/aws/resource_aws_wafregional_rule_group_test.go @@ -70,9 +70,10 @@ func TestAccAWSWafRegionalRuleGroup_basic(t *testing.T) { resourceName := "aws_wafregional_rule_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRuleGroupConfig(ruleName, groupName), @@ -223,9 +224,10 @@ func TestAccAWSWafRegionalRuleGroup_changeActivatedRules(t *testing.T) { resourceName := "aws_wafregional_rule_group.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRuleGroupConfig(ruleName1, groupName), diff --git a/aws/resource_aws_wafregional_rule_test.go b/aws/resource_aws_wafregional_rule_test.go index 899b4da9374..f1886c6fc69 100644 --- a/aws/resource_aws_wafregional_rule_test.go +++ b/aws/resource_aws_wafregional_rule_test.go @@ -287,9 +287,10 @@ func TestAccAWSWafRegionalRule_changePredicates(t *testing.T) { resourceName := "aws_wafregional_rule.wafrule" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRuleDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalRuleConfig(ruleName), diff --git a/aws/resource_aws_wafregional_size_constraint_set_test.go b/aws/resource_aws_wafregional_size_constraint_set_test.go index 834cdae2f56..e7829d64d33 100644 --- a/aws/resource_aws_wafregional_size_constraint_set_test.go +++ b/aws/resource_aws_wafregional_size_constraint_set_test.go @@ -19,9 +19,10 @@ func TestAccAWSWafRegionalSizeConstraintSet_basic(t *testing.T) { resourceName := "aws_wafregional_size_constraint_set.size_constraint_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalSizeConstraintSetConfig(sizeConstraintSet), @@ -122,9 +123,10 @@ func TestAccAWSWafRegionalSizeConstraintSet_changeConstraints(t *testing.T) { resourceName := "aws_wafregional_size_constraint_set.size_constraint_set" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalSizeConstraintSetConfig(setName), diff --git a/aws/resource_aws_wafregional_sql_injection_match_set_test.go b/aws/resource_aws_wafregional_sql_injection_match_set_test.go index 445b917ec6b..0a9ead72933 100644 --- a/aws/resource_aws_wafregional_sql_injection_match_set_test.go +++ b/aws/resource_aws_wafregional_sql_injection_match_set_test.go @@ -18,9 +18,10 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_basic(t *testing.T) { sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalSqlInjectionMatchSetConfig(sqlInjectionMatchSet), @@ -117,9 +118,10 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_changeTuples(t *testing.T) { setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalSqlInjectionMatchSetConfig(setName), diff --git a/aws/resource_aws_wafregional_web_acl.go b/aws/resource_aws_wafregional_web_acl.go index 8308b40f23f..96b7db8d928 100644 --- a/aws/resource_aws_wafregional_web_acl.go +++ b/aws/resource_aws_wafregional_web_acl.go @@ -42,6 +42,11 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.WafActionTypeAllow, + waf.WafActionTypeBlock, + waf.WafActionTypeCount, + }, false), }, }, }, @@ -53,8 +58,9 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "log_destination": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, }, "redacted_fields": { Type: schema.TypeList, @@ -74,6 +80,15 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.MatchFieldTypeAllQueryArgs, + waf.MatchFieldTypeBody, + waf.MatchFieldTypeHeader, + waf.MatchFieldTypeMethod, + waf.MatchFieldTypeQueryString, + waf.MatchFieldTypeSingleQueryArg, + waf.MatchFieldTypeUri, + }, false), }, }, }, @@ -103,6 +118,11 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.WafActionTypeAllow, + waf.WafActionTypeBlock, + waf.WafActionTypeCount, + }, false), }, }, }, @@ -116,6 +136,10 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + waf.WafOverrideActionTypeCount, + waf.WafOverrideActionTypeNone, + }, false), }, }, }, @@ -219,6 +243,8 @@ func resourceAwsWafRegionalWebAclCreate(d *schema.ResourceData, meta interface{} func resourceAwsWafRegionalWebAclRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafregionalconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + params := &waf.GetWebACLInput{ WebACLId: aws.String(d.Id()), } @@ -266,7 +292,7 @@ func resourceAwsWafRegionalWebAclRead(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("error listing tags for WAF Regional ACL (%s): %s", webACLARN, err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_wafregional_web_acl_association_test.go b/aws/resource_aws_wafregional_web_acl_association_test.go index dbadd952f7f..c2836645abe 100644 --- a/aws/resource_aws_wafregional_web_acl_association_test.go +++ b/aws/resource_aws_wafregional_web_acl_association_test.go @@ -208,7 +208,14 @@ resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" } -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_subnet" "foo" { vpc_id = "${aws_vpc.foo.id}" diff --git a/aws/resource_aws_wafregional_web_acl_test.go b/aws/resource_aws_wafregional_web_acl_test.go index 0373989ff77..01ac022d639 100644 --- a/aws/resource_aws_wafregional_web_acl_test.go +++ b/aws/resource_aws_wafregional_web_acl_test.go @@ -119,7 +119,7 @@ func testSweepWafRegionalWebAcls(region string) error { func TestAccAWSWafRegionalWebAcl_basic(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -151,7 +151,7 @@ func TestAccAWSWafRegionalWebAcl_basic(t *testing.T) { func TestAccAWSWafRegionalWebAcl_tags(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -195,7 +195,7 @@ func TestAccAWSWafRegionalWebAcl_tags(t *testing.T) { func TestAccAWSWafRegionalWebAcl_createRateBased(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -213,6 +213,11 @@ func TestAccAWSWafRegionalWebAcl_createRateBased(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "metric_name", wafAclName), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -220,7 +225,7 @@ func TestAccAWSWafRegionalWebAcl_createRateBased(t *testing.T) { func TestAccAWSWafRegionalWebAcl_createGroup(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -251,7 +256,7 @@ func TestAccAWSWafRegionalWebAcl_changeNameForceNew(t *testing.T) { var before, after waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) wafAclNewName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -293,7 +298,7 @@ func TestAccAWSWafRegionalWebAcl_changeDefaultAction(t *testing.T) { var before, after waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) wafAclNewName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -334,7 +339,7 @@ func TestAccAWSWafRegionalWebAcl_changeDefaultAction(t *testing.T) { func TestAccAWSWafRegionalWebAcl_disappears(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -356,7 +361,7 @@ func TestAccAWSWafRegionalWebAcl_disappears(t *testing.T) { func TestAccAWSWafRegionalWebAcl_noRules(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -387,17 +392,18 @@ func TestAccAWSWafRegionalWebAcl_changeRules(t *testing.T) { var r waf.Rule var idx int wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { Config: testAccAWSWafRegionalWebAclConfig(wafAclName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.wafrule", &r), + testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.test", &r), testAccCheckAWSWafRegionalWebAclExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "default_action.#", "1"), resource.TestCheckResourceAttr(resourceName, "default_action.0.type", "ALLOW"), @@ -429,7 +435,7 @@ func TestAccAWSWafRegionalWebAcl_changeRules(t *testing.T) { func TestAccAWSWafRegionalWebAcl_LoggingConfiguration(t *testing.T) { var webACL1, webACL2, webACL3 waf.WebACL rName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resourceName := "aws_wafregional_web_acl.waf_acl" + resourceName := "aws_wafregional_web_acl.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -507,7 +513,7 @@ func testAccCheckAWSWafRegionalWebAclDisappears(v *waf.WebACL) resource.TestChec for _, activatedRule := range v.Rules { webACLUpdate := &waf.WebACLUpdate{ - Action: aws.String("DELETE"), + Action: aws.String(waf.ChangeActionDelete), ActivatedRule: &waf.ActivatedRule{ Priority: activatedRule.Priority, RuleId: activatedRule.RuleId, @@ -597,12 +603,12 @@ func testAccCheckAWSWafRegionalWebAclExists(n string, v *waf.WebACL) resource.Te func testAccAWSWafRegionalWebAclConfig(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule" "wafrule" { +resource "aws_wafregional_rule" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -616,7 +622,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 1 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } } `, name) @@ -624,12 +630,12 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfigTags1(name, tagKey1, tagValue1 string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule" "wafrule" { +resource "aws_wafregional_rule" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -643,7 +649,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 1 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } tags = { @@ -655,12 +661,12 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule" "wafrule" { +resource "aws_wafregional_rule" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -674,7 +680,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 1 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } tags = { @@ -687,7 +693,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfigRateBased(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_rate_based_rule" "wafrule" { +resource "aws_wafregional_rate_based_rule" "test" { name = %[1]q metric_name = %[1]q @@ -695,7 +701,7 @@ resource "aws_wafregional_rate_based_rule" "wafrule" { rate_limit = 2000 } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -710,7 +716,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { priority = 1 type = "RATE_BASED" - rule_id = "${aws_wafregional_rate_based_rule.wafrule.id}" + rule_id = "${aws_wafregional_rate_based_rule.test.id}" } } `, name) @@ -718,12 +724,12 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfigGroup(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule_group" "wafrulegroup" { +resource "aws_wafregional_rule_group" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -738,7 +744,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { priority = 1 type = "GROUP" - rule_id = "${aws_wafregional_rule_group.wafrulegroup.id}" # todo + rule_id = "${aws_wafregional_rule_group.test.id}" } } `, name) @@ -746,12 +752,12 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfig_changeName(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule" "wafrule" { +resource "aws_wafregional_rule" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -765,7 +771,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 1 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } } `, name) @@ -773,12 +779,12 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfig_changeDefaultAction(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule" "wafrule" { +resource "aws_wafregional_rule" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -792,7 +798,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 1 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } } `, name) @@ -800,7 +806,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfig_noRules(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -813,12 +819,12 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfig_changeRules(name string) string { return fmt.Sprintf(` -resource "aws_wafregional_rule" "wafrule" { +resource "aws_wafregional_rule" "test" { name = %[1]q metric_name = %[1]q } -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -832,7 +838,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 3 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } rule { @@ -841,7 +847,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { } priority = 99 - rule_id = "${aws_wafregional_rule.wafrule.id}" + rule_id = "${aws_wafregional_rule.test.id}" } } `, name) @@ -849,7 +855,7 @@ resource "aws_wafregional_web_acl" "waf_acl" { func testAccAWSWafRegionalWebAclConfigLoggingConfiguration(rName string) string { return fmt.Sprintf(` -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q @@ -913,7 +919,7 @@ resource "aws_kinesis_firehose_delivery_stream" "test" { func testAccAWSWafRegionalWebAclConfigLoggingConfigurationUpdate(rName string) string { return fmt.Sprintf(` -resource "aws_wafregional_web_acl" "waf_acl" { +resource "aws_wafregional_web_acl" "test" { name = %[1]q metric_name = %[1]q diff --git a/aws/resource_aws_wafregional_xss_match_set.go b/aws/resource_aws_wafregional_xss_match_set.go index 26c2a864dbb..568cf62d0a5 100644 --- a/aws/resource_aws_wafregional_xss_match_set.go +++ b/aws/resource_aws_wafregional_xss_match_set.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" ) func resourceAwsWafRegionalXssMatchSet() *schema.Resource { @@ -32,7 +33,7 @@ func resourceAwsWafRegionalXssMatchSet() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -44,6 +45,15 @@ func resourceAwsWafRegionalXssMatchSet() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + wafregional.MatchFieldTypeUri, + wafregional.MatchFieldTypeSingleQueryArg, + wafregional.MatchFieldTypeQueryString, + wafregional.MatchFieldTypeMethod, + wafregional.MatchFieldTypeHeader, + wafregional.MatchFieldTypeBody, + wafregional.MatchFieldTypeAllQueryArgs, + }, false), }, }, }, @@ -51,6 +61,14 @@ func resourceAwsWafRegionalXssMatchSet() *schema.Resource { "text_transformation": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + wafregional.TextTransformationUrlDecode, + wafregional.TextTransformationNone, + wafregional.TextTransformationHtmlEntityDecode, + wafregional.TextTransformationCompressWhiteSpace, + wafregional.TextTransformationCmdLine, + wafregional.TextTransformationLowercase, + }, false), }, }, }, @@ -79,9 +97,16 @@ func resourceAwsWafRegionalXssMatchSetCreate(d *schema.ResourceData, meta interf } resp := out.(*waf.CreateXssMatchSetOutput) - d.SetId(*resp.XssMatchSet.XssMatchSetId) + d.SetId(aws.StringValue(resp.XssMatchSet.XssMatchSetId)) - return resourceAwsWafRegionalXssMatchSetUpdate(d, meta) + if v, ok := d.Get("xss_match_tuple").(*schema.Set); ok && v.Len() > 0 { + err := updateXssMatchSetResourceWR(d.Id(), nil, v.List(), conn, region) + if err != nil { + return fmt.Errorf("Failed updating regional WAF XSS Match Set: %s", err) + } + } + + return resourceAwsWafRegionalXssMatchSetRead(d, meta) } func resourceAwsWafRegionalXssMatchSetRead(d *schema.ResourceData, meta interface{}) error { diff --git a/aws/resource_aws_wafregional_xss_match_set_test.go b/aws/resource_aws_wafregional_xss_match_set_test.go index 9ee6770d53f..16e212a0679 100644 --- a/aws/resource_aws_wafregional_xss_match_set_test.go +++ b/aws/resource_aws_wafregional_xss_match_set_test.go @@ -14,28 +14,29 @@ import ( func TestAccAWSWafRegionalXssMatchSet_basic(t *testing.T) { var v waf.XssMatchSet - xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_wafregional_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafRegionalXssMatchSetConfig(xssMatchSet), + Config: testAccAWSWafRegionalXssMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &v), - resource.TestCheckResourceAttr(resourceName, "name", xssMatchSet), + resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.#", "2"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.field_to_match.2316364334.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.field_to_match.2316364334.type", "QUERY_STRING"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.field_to_match.3756326843.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.field_to_match.3756326843.type", "URI"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.field_to_match.0.type", "QUERY_STRING"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.field_to_match.0.type", "URI"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.text_transformation", "NONE"), ), }, { @@ -49,8 +50,8 @@ func TestAccAWSWafRegionalXssMatchSet_basic(t *testing.T) { func TestAccAWSWafRegionalXssMatchSet_changeNameForceNew(t *testing.T) { var before, after waf.XssMatchSet - xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - xssMatchSetNewName := fmt.Sprintf("xssMatchSetNewName-%s", acctest.RandString(5)) + rName1 := acctest.RandomWithPrefix("tf-acc-test") + rName2 := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_wafregional_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ @@ -59,10 +60,10 @@ func TestAccAWSWafRegionalXssMatchSet_changeNameForceNew(t *testing.T) { CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafRegionalXssMatchSetConfig(xssMatchSet), + Config: testAccAWSWafRegionalXssMatchSetConfig(rName1), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &before), - resource.TestCheckResourceAttr(resourceName, "name", xssMatchSet), + resource.TestCheckResourceAttr(resourceName, "name", rName1), resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.#", "2"), ), }, @@ -72,10 +73,10 @@ func TestAccAWSWafRegionalXssMatchSet_changeNameForceNew(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAWSWafRegionalXssMatchSetConfigChangeName(xssMatchSetNewName), + Config: testAccAWSWafRegionalXssMatchSetConfigChangeName(rName2), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &after), - resource.TestCheckResourceAttr(resourceName, "name", xssMatchSetNewName), + resource.TestCheckResourceAttr(resourceName, "name", rName2), resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.#", "2"), ), }, @@ -85,7 +86,7 @@ func TestAccAWSWafRegionalXssMatchSet_changeNameForceNew(t *testing.T) { func TestAccAWSWafRegionalXssMatchSet_disappears(t *testing.T) { var v waf.XssMatchSet - xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_wafregional_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ @@ -94,7 +95,7 @@ func TestAccAWSWafRegionalXssMatchSet_disappears(t *testing.T) { CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafRegionalXssMatchSetConfig(xssMatchSet), + Config: testAccAWSWafRegionalXssMatchSetConfig(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &v), testAccCheckAWSWafRegionalXssMatchSetDisappears(&v), @@ -107,28 +108,29 @@ func TestAccAWSWafRegionalXssMatchSet_disappears(t *testing.T) { func TestAccAWSWafRegionalXssMatchSet_changeTuples(t *testing.T) { var before, after waf.XssMatchSet - setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_wafregional_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, + DisableBinaryDriver: true, Steps: []resource.TestStep{ { - Config: testAccAWSWafRegionalXssMatchSetConfig(setName), + Config: testAccAWSWafRegionalXssMatchSetConfig(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &before), - resource.TestCheckResourceAttr(resourceName, "name", setName), + resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.#", "2"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.field_to_match.2316364334.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.field_to_match.2316364334.type", "QUERY_STRING"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2018581549.text_transformation", "NONE"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.field_to_match.3756326843.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.field_to_match.3756326843.type", "URI"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2786024938.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.field_to_match.0.type", "QUERY_STRING"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.599421078.text_transformation", "NONE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.field_to_match.0.type", "URI"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.41660541.text_transformation", "NONE"), ), }, { @@ -137,19 +139,19 @@ func TestAccAWSWafRegionalXssMatchSet_changeTuples(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAWSWafRegionalXssMatchSetConfig_changeTuples(setName), + Config: testAccAWSWafRegionalXssMatchSetConfig_changeTuples(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &after), - resource.TestCheckResourceAttr(resourceName, "name", setName), + resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.#", "2"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2893682529.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2893682529.field_to_match.4253810390.data", "GET"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2893682529.field_to_match.4253810390.type", "METHOD"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.2893682529.text_transformation", "HTML_ENTITY_DECODE"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.4270311415.field_to_match.#", "1"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.4270311415.field_to_match.281401076.data", ""), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.4270311415.field_to_match.281401076.type", "BODY"), - resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.4270311415.text_transformation", "CMD_LINE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.42378128.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.42378128.field_to_match.0.data", "GET"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.42378128.field_to_match.0.type", "METHOD"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.42378128.text_transformation", "HTML_ENTITY_DECODE"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.3815294338.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.3815294338.field_to_match.0.data", ""), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.3815294338.field_to_match.0.type", "BODY"), + resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.3815294338.text_transformation", "CMD_LINE"), ), }, }, @@ -158,7 +160,7 @@ func TestAccAWSWafRegionalXssMatchSet_changeTuples(t *testing.T) { func TestAccAWSWafRegionalXssMatchSet_noTuples(t *testing.T) { var ipset waf.XssMatchSet - setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) + rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_wafregional_xss_match_set.test" resource.ParallelTest(t, resource.TestCase{ @@ -167,10 +169,10 @@ func TestAccAWSWafRegionalXssMatchSet_noTuples(t *testing.T) { CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSWafRegionalXssMatchSetConfig_noTuples(setName), + Config: testAccAWSWafRegionalXssMatchSetConfig_noTuples(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSWafRegionalXssMatchSetExists(resourceName, &ipset), - resource.TestCheckResourceAttr(resourceName, "name", setName), + resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "xss_match_tuple.#", "0"), ), }, @@ -283,10 +285,10 @@ func testAccCheckAWSWafRegionalXssMatchSetDestroy(s *terraform.State) error { return nil } -func testAccAWSWafRegionalXssMatchSetConfig(name string) string { +func testAccAWSWafRegionalXssMatchSetConfig(rName string) string { return fmt.Sprintf(` resource "aws_wafregional_xss_match_set" "test" { - name = "%s" + name = %[1]q xss_match_tuple { text_transformation = "NONE" @@ -304,13 +306,13 @@ resource "aws_wafregional_xss_match_set" "test" { } } } -`, name) +`, rName) } -func testAccAWSWafRegionalXssMatchSetConfigChangeName(name string) string { +func testAccAWSWafRegionalXssMatchSetConfigChangeName(rName string) string { return fmt.Sprintf(` resource "aws_wafregional_xss_match_set" "test" { - name = "%s" + name = %[1]q xss_match_tuple { text_transformation = "NONE" @@ -328,13 +330,13 @@ resource "aws_wafregional_xss_match_set" "test" { } } } -`, name) +`, rName) } -func testAccAWSWafRegionalXssMatchSetConfig_changeTuples(name string) string { +func testAccAWSWafRegionalXssMatchSetConfig_changeTuples(rName string) string { return fmt.Sprintf(` resource "aws_wafregional_xss_match_set" "test" { - name = "%s" + name = %[1]q xss_match_tuple { text_transformation = "CMD_LINE" @@ -353,13 +355,13 @@ resource "aws_wafregional_xss_match_set" "test" { } } } -`, name) +`, rName) } -func testAccAWSWafRegionalXssMatchSetConfig_noTuples(name string) string { +func testAccAWSWafRegionalXssMatchSetConfig_noTuples(rName string) string { return fmt.Sprintf(` resource "aws_wafregional_xss_match_set" "test" { - name = "%s" + name = %[1]q } -`, name) +`, rName) } diff --git a/aws/resource_aws_wafv2_ip_set.go b/aws/resource_aws_wafv2_ip_set.go new file mode 100644 index 00000000000..da0f648e772 --- /dev/null +++ b/aws/resource_aws_wafv2_ip_set.go @@ -0,0 +1,263 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func resourceAwsWafv2IPSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafv2IPSetCreate, + Read: resourceAwsWafv2IPSetRead, + Update: resourceAwsWafv2IPSetUpdate, + Delete: resourceAwsWafv2IPSetDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), "/") + if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { + return nil, fmt.Errorf("Unexpected format of ID (%q), expected ID/NAME/SCOPE", d.Id()) + } + id := idParts[0] + name := idParts[1] + scope := idParts[2] + d.SetId(id) + d.Set("name", name) + d.Set("scope", scope) + return []*schema.ResourceData{d}, nil + }, + }, + + Schema: map[string]*schema.Schema{ + "addresses": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 50, + Elem: &schema.Schema{Type: schema.TypeString}, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + o, n := d.GetChange("addresses") + oldAddresses := o.(*schema.Set).List() + newAddresses := n.(*schema.Set).List() + if len(oldAddresses) == len(newAddresses) { + for _, ov := range oldAddresses { + hasAddress := false + for _, nv := range newAddresses { + // isIpv6CidrsEquals works for both IPv4 and IPv6 + if isIpv6CidrsEquals(ov.(string), nv.(string)) { + hasAddress = true + break + } + } + if !hasAddress { + return false + } + } + return true + } + return false + }, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 256), + }, + "ip_address_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.IPAddressVersionIpv4, + wafv2.IPAddressVersionIpv6, + }, false), + }, + "lock_token": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 128), + }, + "scope": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.ScopeCloudfront, + wafv2.ScopeRegional, + }, false), + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAwsWafv2IPSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + params := &wafv2.CreateIPSetInput{ + Addresses: aws.StringSlice([]string{}), + IPAddressVersion: aws.String(d.Get("ip_address_version").(string)), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + } + + if v, ok := d.GetOk("addresses"); ok && v.(*schema.Set).Len() > 0 { + params.Addresses = expandStringSet(v.(*schema.Set)) + } + + if v, ok := d.GetOk("description"); ok { + params.Description = aws.String(v.(string)) + } + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + params.Tags = keyvaluetags.New(v).IgnoreAws().Wafv2Tags() + } + + resp, err := conn.CreateIPSet(params) + + if err != nil { + return fmt.Errorf("Error creating WAFv2 IPSet: %s", err) + } + + if resp == nil || resp.Summary == nil { + return fmt.Errorf("Error creating WAFv2 IPSet") + } + + d.SetId(aws.StringValue(resp.Summary.Id)) + + return resourceAwsWafv2IPSetRead(d, meta) +} + +func resourceAwsWafv2IPSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + params := &wafv2.GetIPSetInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + } + + resp, err := conn.GetIPSet(params) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAFv2 IPSet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if resp == nil || resp.IPSet == nil { + return fmt.Errorf("Error reading WAFv2 IPSet") + } + + d.Set("name", aws.StringValue(resp.IPSet.Name)) + d.Set("description", aws.StringValue(resp.IPSet.Description)) + d.Set("ip_address_version", aws.StringValue(resp.IPSet.IPAddressVersion)) + d.Set("arn", aws.StringValue(resp.IPSet.ARN)) + d.Set("lock_token", aws.StringValue(resp.LockToken)) + + if err := d.Set("addresses", flattenStringSet(resp.IPSet.Addresses)); err != nil { + return fmt.Errorf("Error setting addresses: %s", err) + } + + arn := aws.StringValue(resp.IPSet.ARN) + tags, err := keyvaluetags.Wafv2ListTags(conn, arn) + if err != nil { + return fmt.Errorf("Error listing tags for WAFv2 IpSet (%s): %s", arn, err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("Error setting tags: %s", err) + } + + return nil +} + +func resourceAwsWafv2IPSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + + log.Printf("[INFO] Updating WAFv2 IPSet %s", d.Id()) + + params := &wafv2.UpdateIPSetInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + Addresses: aws.StringSlice([]string{}), + LockToken: aws.String(d.Get("lock_token").(string)), + } + + if v, ok := d.GetOk("addresses"); ok && v.(*schema.Set).Len() > 0 { + params.Addresses = expandStringSet(v.(*schema.Set)) + } + + if v, ok := d.GetOk("description"); ok && len(v.(string)) > 0 { + params.Description = aws.String(v.(string)) + } + + _, err := conn.UpdateIPSet(params) + + if err != nil { + return fmt.Errorf("Error updating WAFv2 IPSet: %s", err) + } + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.Wafv2UpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("Error updating tags: %s", err) + } + } + + return resourceAwsWafv2IPSetRead(d, meta) +} + +func resourceAwsWafv2IPSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + + log.Printf("[INFO] Deleting WAFv2 IPSet %s", d.Id()) + + params := &wafv2.DeleteIPSetInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + LockToken: aws.String(d.Get("lock_token").(string)), + } + + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + var err error + _, err = conn.DeleteIPSet(params) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFAssociatedItemException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.DeleteIPSet(params) + } + + if err != nil { + return fmt.Errorf("Error deleting WAFv2 IPSet: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_wafv2_ip_set_test.go b/aws/resource_aws_wafv2_ip_set_test.go new file mode 100644 index 00000000000..dacd0567f2a --- /dev/null +++ b/aws/resource_aws_wafv2_ip_set_test.go @@ -0,0 +1,405 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAwsWafv2IPSet_Basic(t *testing.T) { + var v wafv2.IPSet + ipSetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_ip_set.ip_set" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2IPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2IPSetConfig(ipSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", ipSetName), + resource.TestCheckResourceAttr(resourceName, "description", ipSetName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "ip_address_version", wafv2.IPAddressVersionIpv4), + resource.TestCheckResourceAttr(resourceName, "addresses.#", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + { + Config: testAccAwsWafv2IPSetConfigUpdate(ipSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", ipSetName), + resource.TestCheckResourceAttr(resourceName, "description", "Updated"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "ip_address_version", wafv2.IPAddressVersionIpv4), + resource.TestCheckResourceAttr(resourceName, "addresses.#", "3"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAWSWafv2IPSetImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2IPSet_Disappears(t *testing.T) { + var r wafv2.IPSet + ipSetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_ip_set.ip_set" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2IPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2IPSetConfig(ipSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &r), + testAccCheckResourceDisappears(testAccProvider, resourceAwsWafv2IPSet(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAwsWafv2IPSet_IPv6(t *testing.T) { + var v wafv2.IPSet + ipSetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_ip_set.ip_set" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2IPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2IPSetConfigIPv6(ipSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", ipSetName), + resource.TestCheckResourceAttr(resourceName, "description", ipSetName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "ip_address_version", wafv2.IPAddressVersionIpv6), + resource.TestCheckResourceAttr(resourceName, "addresses.#", "3"), + resource.TestCheckResourceAttr(resourceName, "addresses.1676510651", "1234:5678:9abc:6811:0000:0000:0000:0000/64"), + resource.TestCheckResourceAttr(resourceName, "addresses.3671909787", "2001:db8::/32"), + resource.TestCheckResourceAttr(resourceName, "addresses.4089736081", "0:0:0:0:0:ffff:7f00:1/64"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAWSWafv2IPSetImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2IPSet_Minimal(t *testing.T) { + var v wafv2.IPSet + ipSetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_ip_set.ip_set" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2IPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2IPSetConfigMinimal(ipSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", ipSetName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "ip_address_version", wafv2.IPAddressVersionIpv4), + resource.TestCheckResourceAttr(resourceName, "addresses.#", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAWSWafv2IPSetImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2IPSet_ChangeNameForceNew(t *testing.T) { + var before, after wafv2.IPSet + ipSetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + ipSetNewName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_ip_set.ip_set" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2IPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2IPSetConfig(ipSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &before), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", ipSetName), + resource.TestCheckResourceAttr(resourceName, "description", ipSetName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "ip_address_version", wafv2.IPAddressVersionIpv4), + resource.TestCheckResourceAttr(resourceName, "addresses.#", "2"), + ), + }, + { + Config: testAccAwsWafv2IPSetConfig(ipSetNewName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &after), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", ipSetNewName), + resource.TestCheckResourceAttr(resourceName, "description", ipSetNewName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "ip_address_version", wafv2.IPAddressVersionIpv4), + resource.TestCheckResourceAttr(resourceName, "addresses.#", "2"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2IPSet_Tags(t *testing.T) { + var v wafv2.IPSet + ipSetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_ip_set.ip_set" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2IPSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2IPSetConfigOneTag(ipSetName, "Tag1", "Value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAWSWafv2IPSetImportStateIdFunc(resourceName), + }, + { + Config: testAccAwsWafv2IPSetConfigTwoTags(ipSetName, "Tag1", "Value1Updated", "Tag2", "Value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1Updated"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + { + Config: testAccAwsWafv2IPSetConfigOneTag(ipSetName, "Tag2", "Value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2IPSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafv2IPSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafv2_ip_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafv2conn + resp, err := conn.GetIPSet( + &wafv2.GetIPSetInput{ + Id: aws.String(rs.Primary.ID), + Name: aws.String(rs.Primary.Attributes["name"]), + Scope: aws.String(rs.Primary.Attributes["scope"]), + }) + + if err == nil { + if resp == nil || resp.IPSet == nil { + return fmt.Errorf("Error getting WAFv2 IPSet") + } + if aws.StringValue(resp.IPSet.Id) == rs.Primary.ID { + return fmt.Errorf("WAFv2 IPSet %s still exists", rs.Primary.ID) + } + return nil + } + + // Return nil if the IPSet is already destroyed + if isAWSErr(err, wafv2.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccCheckAWSWafv2IPSetExists(n string, v *wafv2.IPSet) 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 WAFv2 IPSet ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafv2conn + resp, err := conn.GetIPSet(&wafv2.GetIPSetInput{ + Id: aws.String(rs.Primary.ID), + Name: aws.String(rs.Primary.Attributes["name"]), + Scope: aws.String(rs.Primary.Attributes["scope"]), + }) + + if err != nil { + return err + } + + if resp == nil || resp.IPSet == nil { + return fmt.Errorf("Error getting WAFv2 IPSet") + } + + if aws.StringValue(resp.IPSet.Id) == rs.Primary.ID { + *v = *resp.IPSet + return nil + } + + return fmt.Errorf("WAFv2 IPSet (%s) not found", rs.Primary.ID) + } +} + +func testAccAwsWafv2IPSetConfig(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "ip_set" { + name = "%s" + description = "%s" + scope = "REGIONAL" + ip_address_version = "IPV4" + addresses = ["1.2.3.4/32", "5.6.7.8/32"] + + tags = { + Tag1 = "Value1" + Tag2 = "Value2" + } +} +`, name, name) +} + +func testAccAwsWafv2IPSetConfigUpdate(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "ip_set" { + name = "%s" + description = "Updated" + scope = "REGIONAL" + ip_address_version = "IPV4" + addresses = ["1.1.1.1/32", "2.2.2.2/32", "3.3.3.3/32"] +} +`, name) +} + +func testAccAwsWafv2IPSetConfigIPv6(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "ip_set" { + name = "%s" + description = "%s" + scope = "REGIONAL" + ip_address_version = "IPV6" + addresses = [ + "0:0:0:0:0:ffff:7f00:1/64", + "1234:5678:9abc:6811:0000:0000:0000:0000/64", + "2001:db8::/32" + ] +} +`, name, name) +} + +func testAccAwsWafv2IPSetConfigMinimal(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "ip_set" { + name = "%s" + scope = "REGIONAL" + ip_address_version = "IPV4" +} +`, name) +} + +func testAccAwsWafv2IPSetConfigOneTag(name, tagKey, tagValue string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "ip_set" { + name = "%s" + description = "%s" + scope = "REGIONAL" + ip_address_version = "IPV4" + addresses = ["1.2.3.4/32", "5.6.7.8/32"] + + tags = { + "%s" = "%s" + } +} +`, name, name, tagKey, tagValue) +} + +func testAccAwsWafv2IPSetConfigTwoTags(name, tag1Key, tag1Value, tag2Key, tag2Value string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "ip_set" { + name = "%s" + description = "%s" + scope = "REGIONAL" + ip_address_version = "IPV4" + addresses = ["1.2.3.4/32", "5.6.7.8/32"] + + tags = { + "%s" = "%s" + "%s" = "%s" + } +} +`, name, name, tag1Key, tag1Value, tag2Key, tag2Value) +} + +func testAccAWSWafv2IPSetImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return fmt.Sprintf("%s/%s/%s", rs.Primary.ID, rs.Primary.Attributes["name"], rs.Primary.Attributes["scope"]), nil + } +} diff --git a/aws/resource_aws_wafv2_regex_pattern_set.go b/aws/resource_aws_wafv2_regex_pattern_set.go new file mode 100644 index 00000000000..89622bb031f --- /dev/null +++ b/aws/resource_aws_wafv2_regex_pattern_set.go @@ -0,0 +1,279 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func resourceAwsWafv2RegexPatternSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafv2RegexPatternSetCreate, + Read: resourceAwsWafv2RegexPatternSetRead, + Update: resourceAwsWafv2RegexPatternSetUpdate, + Delete: resourceAwsWafv2RegexPatternSetDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), "/") + if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { + return nil, fmt.Errorf("Unexpected format of ID (%q), expected ID/NAME/SCOPE", d.Id()) + } + id := idParts[0] + name := idParts[1] + scope := idParts[2] + d.SetId(id) + d.Set("name", name) + d.Set("scope", scope) + return []*schema.ResourceData{d}, nil + }, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 256), + }, + "lock_token": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 128), + }, + "regular_expression": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 10, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "regex_string": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 200), + }, + }, + }, + }, + "scope": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.ScopeCloudfront, + wafv2.ScopeRegional, + }, false), + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAwsWafv2RegexPatternSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + params := &wafv2.CreateRegexPatternSetInput{ + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + RegularExpressionList: []*wafv2.Regex{}, + } + + if v, ok := d.GetOk("description"); ok { + params.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("regular_expression"); ok && v.(*schema.Set).Len() > 0 { + params.RegularExpressionList = expandWafv2RegexPatternSet(v.(*schema.Set).List()) + } + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + params.Tags = keyvaluetags.New(v).IgnoreAws().Wafv2Tags() + } + + resp, err := conn.CreateRegexPatternSet(params) + + if err != nil { + return fmt.Errorf("Error creating WAFv2 RegexPatternSet: %s", err) + } + + if resp == nil || resp.Summary == nil { + return fmt.Errorf("Error creating WAFv2 RegexPatternSet") + } + + d.SetId(aws.StringValue(resp.Summary.Id)) + + return resourceAwsWafv2RegexPatternSetRead(d, meta) +} + +func resourceAwsWafv2RegexPatternSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + params := &wafv2.GetRegexPatternSetInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + } + + resp, err := conn.GetRegexPatternSet(params) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAFv2 RegexPatternSet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if resp == nil || resp.RegexPatternSet == nil { + return fmt.Errorf("Error getting WAFv2 RegexPatternSet") + } + + d.Set("name", aws.StringValue(resp.RegexPatternSet.Name)) + d.Set("description", aws.StringValue(resp.RegexPatternSet.Description)) + d.Set("arn", aws.StringValue(resp.RegexPatternSet.ARN)) + d.Set("lock_token", aws.StringValue(resp.LockToken)) + + if err := d.Set("regular_expression", flattenWafv2RegexPatternSet(resp.RegexPatternSet.RegularExpressionList)); err != nil { + return fmt.Errorf("Error setting regular_expression: %s", err) + } + + tags, err := keyvaluetags.Wafv2ListTags(conn, aws.StringValue(resp.RegexPatternSet.ARN)) + if err != nil { + return fmt.Errorf("Error listing tags for WAFv2 RegexPatternSet (%s): %s", aws.StringValue(resp.RegexPatternSet.ARN), err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("Error setting tags: %s", err) + } + + return nil +} + +func resourceAwsWafv2RegexPatternSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + + log.Printf("[INFO] Updating WAFv2 RegexPatternSet %s", d.Id()) + + params := &wafv2.UpdateRegexPatternSetInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + LockToken: aws.String(d.Get("lock_token").(string)), + RegularExpressionList: []*wafv2.Regex{}, + } + + if v, ok := d.GetOk("regular_expression"); ok && v.(*schema.Set).Len() > 0 { + params.RegularExpressionList = expandWafv2RegexPatternSet(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("description"); ok { + params.Description = aws.String(v.(string)) + } + + _, err := conn.UpdateRegexPatternSet(params) + + if err != nil { + return fmt.Errorf("Error updating WAFv2 RegexPatternSet: %s", err) + } + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.Wafv2UpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("Error updating tags: %s", err) + } + } + + return resourceAwsWafv2RegexPatternSetRead(d, meta) +} + +func resourceAwsWafv2RegexPatternSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + + log.Printf("[INFO] Deleting WAFv2 RegexPatternSet %s", d.Id()) + params := &wafv2.DeleteRegexPatternSetInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + LockToken: aws.String(d.Get("lock_token").(string)), + } + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteRegexPatternSet(params) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFAssociatedItemException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.DeleteRegexPatternSet(params) + } + + if err != nil { + return fmt.Errorf("Error deleting WAFv2 RegexPatternSet: %s", err) + } + + return nil +} + +func expandWafv2RegexPatternSet(l []interface{}) []*wafv2.Regex { + if len(l) == 0 || l[0] == nil { + return nil + } + + regexPatterns := make([]*wafv2.Regex, 0) + for _, regexPattern := range l { + if regexPattern == nil { + continue + } + regexPatterns = append(regexPatterns, expandWafv2Regex(regexPattern.(map[string]interface{}))) + } + + return regexPatterns +} + +func expandWafv2Regex(m map[string]interface{}) *wafv2.Regex { + if m == nil { + return nil + } + + return &wafv2.Regex{ + RegexString: aws.String(m["regex_string"].(string)), + } +} + +func flattenWafv2RegexPatternSet(r []*wafv2.Regex) interface{} { + if r == nil { + return []interface{}{} + } + + regexPatterns := make([]interface{}, 0) + + for _, regexPattern := range r { + if regexPattern == nil { + continue + } + d := map[string]interface{}{ + "regex_string": aws.StringValue(regexPattern.RegexString), + } + regexPatterns = append(regexPatterns, d) + } + + return regexPatterns +} diff --git a/aws/resource_aws_wafv2_regex_pattern_set_test.go b/aws/resource_aws_wafv2_regex_pattern_set_test.go new file mode 100644 index 00000000000..c3333dfeba2 --- /dev/null +++ b/aws/resource_aws_wafv2_regex_pattern_set_test.go @@ -0,0 +1,362 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAwsWafv2RegexPatternSet_Basic(t *testing.T) { + var v wafv2.RegexPatternSet + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_regex_pattern_set.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2RegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RegexPatternSetConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", rName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "regular_expression.#", "2"), + resource.TestCheckResourceAttr(resourceName, "regular_expression.1641128102.regex_string", "one"), + resource.TestCheckResourceAttr(resourceName, "regular_expression.265355341.regex_string", "two"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + Config: testAccAwsWafv2RegexPatternSetConfig_Update(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", "Updated"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "regular_expression.#", "3"), + resource.TestCheckResourceAttr(resourceName, "regular_expression.1641128102.regex_string", "one"), + resource.TestCheckResourceAttr(resourceName, "regular_expression.265355341.regex_string", "two"), + resource.TestCheckResourceAttr(resourceName, "regular_expression.2339296779.regex_string", "three"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAWSWafv2RegexPatternSetImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RegexPatternSet_Disappears(t *testing.T) { + var v wafv2.RegexPatternSet + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_regex_pattern_set.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2RegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RegexPatternSetConfig_Minimal(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccCheckResourceDisappears(testAccProvider, resourceAwsWafv2RegexPatternSet(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAwsWafv2RegexPatternSet_Minimal(t *testing.T) { + var v wafv2.RegexPatternSet + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_regex_pattern_set.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2RegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RegexPatternSetConfig_Minimal(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "regular_expression.#", "0"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RegexPatternSet_ChangeNameForceNew(t *testing.T) { + var before, after wafv2.RegexPatternSet + rName := acctest.RandomWithPrefix("tf-acc-test") + rNewName := fmt.Sprintf("regex-pattern-set-%s", acctest.RandString(5)) + resourceName := "aws_wafv2_regex_pattern_set.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2RegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RegexPatternSetConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &before), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "description", rName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "regular_expression.#", "2"), + ), + }, + { + Config: testAccAwsWafv2RegexPatternSetConfig(rNewName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &after), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "name", rNewName), + resource.TestCheckResourceAttr(resourceName, "description", rNewName), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "regular_expression.#", "2"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RegexPatternSet_Tags(t *testing.T) { + var v wafv2.RegexPatternSet + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_regex_pattern_set.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafv2RegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RegexPatternSetConfig_OneTag(rName, "Tag1", "Value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAWSWafv2RegexPatternSetImportStateIdFunc(resourceName), + }, + { + Config: testAccAwsWafv2RegexPatternSetConfig_TwoTags(rName, "Tag1", "Value1Updated", "Tag2", "Value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1Updated"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + { + Config: testAccAwsWafv2RegexPatternSetConfig_OneTag(rName, "Tag2", "Value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafv2RegexPatternSetExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafv2RegexPatternSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafv2_regex_pattern_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafv2conn + resp, err := conn.GetRegexPatternSet( + &wafv2.GetRegexPatternSetInput{ + Id: aws.String(rs.Primary.ID), + Name: aws.String(rs.Primary.Attributes["name"]), + Scope: aws.String(rs.Primary.Attributes["scope"]), + }) + + if err == nil { + if resp != nil && resp.RegexPatternSet != nil && aws.StringValue(resp.RegexPatternSet.Id) == rs.Primary.ID { + return fmt.Errorf("WAFv2 RegexPatternSet %s still exists", rs.Primary.ID) + } + return nil + } + + // Return nil if the RegexPatternSet is already destroyed + if isAWSErr(err, wafv2.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccCheckAWSWafv2RegexPatternSetExists(n string, v *wafv2.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 WAFv2 RegexPatternSet ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafv2conn + resp, err := conn.GetRegexPatternSet(&wafv2.GetRegexPatternSetInput{ + Id: aws.String(rs.Primary.ID), + Name: aws.String(rs.Primary.Attributes["name"]), + Scope: aws.String(rs.Primary.Attributes["scope"]), + }) + + if err != nil { + return err + } + + if resp == nil || resp.RegexPatternSet == nil { + return fmt.Errorf("Error getting WAFv2 RegexPatternSet for %s", rs.Primary.ID) + } + + if aws.StringValue(resp.RegexPatternSet.Id) == rs.Primary.ID { + *v = *resp.RegexPatternSet + return nil + } + + return fmt.Errorf("WAFv2 RegexPatternSet (%s) not found", rs.Primary.ID) + } +} + +func testAccAwsWafv2RegexPatternSetConfig(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_regex_pattern_set" "test" { + name = "%s" + description = "%s" + scope = "REGIONAL" + + regular_expression { + regex_string = "one" + } + + regular_expression { + regex_string = "two" + } +} +`, name, name) +} + +func testAccAwsWafv2RegexPatternSetConfig_Update(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_regex_pattern_set" "test" { + name = "%s" + description = "Updated" + scope = "REGIONAL" + + regular_expression { + regex_string = "one" + } + + regular_expression { + regex_string = "two" + } + + regular_expression { + regex_string = "three" + } +} +`, name) +} + +func testAccAwsWafv2RegexPatternSetConfig_Minimal(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_regex_pattern_set" "test" { + name = "%s" + scope = "REGIONAL" +} +`, name) +} + +func testAccAwsWafv2RegexPatternSetConfig_OneTag(name, tagKey, tagValue string) string { + return fmt.Sprintf(` +resource "aws_wafv2_regex_pattern_set" "test" { + name = "%s" + description = "%s" + scope = "REGIONAL" + + regular_expression { + regex_string = "one" + } + + regular_expression { + regex_string = "two" + } + + tags = { + "%s" = "%s" + } +} +`, name, name, tagKey, tagValue) +} + +func testAccAwsWafv2RegexPatternSetConfig_TwoTags(name, tag1Key, tag1Value, tag2Key, tag2Value string) string { + return fmt.Sprintf(` +resource "aws_wafv2_regex_pattern_set" "test" { + name = "%s" + description = "%s" + scope = "REGIONAL" + + regular_expression { + regex_string = "one" + } + + tags = { + "%s" = "%s" + "%s" = "%s" + } +} +`, name, name, tag1Key, tag1Value, tag2Key, tag2Value) +} + +func testAccAWSWafv2RegexPatternSetImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return fmt.Sprintf("%s/%s/%s", rs.Primary.ID, rs.Primary.Attributes["name"], rs.Primary.Attributes["scope"]), nil + } +} diff --git a/aws/resource_aws_wafv2_rule_group.go b/aws/resource_aws_wafv2_rule_group.go new file mode 100644 index 00000000000..de94a5ea712 --- /dev/null +++ b/aws/resource_aws_wafv2_rule_group.go @@ -0,0 +1,1346 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" +) + +func resourceAwsWafv2RuleGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafv2RuleGroupCreate, + Read: resourceAwsWafv2RuleGroupRead, + Update: resourceAwsWafv2RuleGroupUpdate, + Delete: resourceAwsWafv2RuleGroupDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), "/") + if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { + return nil, fmt.Errorf("Unexpected format of ID (%q), expected ID/NAME/SCOPE", d.Id()) + } + id := idParts[0] + name := idParts[1] + scope := idParts[2] + d.SetId(id) + d.Set("name", name) + d.Set("scope", scope) + return []*schema.ResourceData{d}, nil + }, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "capacity": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntAtLeast(1), + }, + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 256), + }, + "lock_token": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 128), + validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9-_]+$`), "must contain only alphanumeric hyphen and underscore characters"), + ), + }, + "scope": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.ScopeCloudfront, + wafv2.ScopeRegional, + }, false), + }, + "rule": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allow": wafv2EmptySchema(), + "block": wafv2EmptySchema(), + "count": wafv2EmptySchema(), + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 128), + }, + "priority": { + Type: schema.TypeInt, + Required: true, + }, + "statement": wafv2RootStatementSchema(3), + "visibility_config": wafv2VisibilityConfigSchema(), + }, + }, + }, + "tags": tagsSchema(), + "visibility_config": wafv2VisibilityConfigSchema(), + }, + } +} + +func resourceAwsWafv2RuleGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + var resp *wafv2.CreateRuleGroupOutput + + params := &wafv2.CreateRuleGroupInput{ + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + Capacity: aws.Int64(int64(d.Get("capacity").(int))), + Rules: expandWafv2Rules(d.Get("rule").(*schema.Set).List()), + VisibilityConfig: expandWafv2VisibilityConfig(d.Get("visibility_config").([]interface{})), + } + + if v, ok := d.GetOk("description"); ok { + params.Description = aws.String(v.(string)) + } + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + params.Tags = keyvaluetags.New(v).IgnoreAws().Wafv2Tags() + } + + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateRuleGroup(params) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFUnavailableEntityException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.CreateRuleGroup(params) + } + + if err != nil { + return fmt.Errorf("Error creating WAFv2 RuleGroup: %s", err) + } + + if resp == nil || resp.Summary == nil { + return fmt.Errorf("Error creating WAFv2 RuleGroup") + } + + d.SetId(aws.StringValue(resp.Summary.Id)) + + return resourceAwsWafv2RuleGroupRead(d, meta) +} + +func resourceAwsWafv2RuleGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + params := &wafv2.GetRuleGroupInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + } + + resp, err := conn.GetRuleGroup(params) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAFv2 RuleGroup (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if resp == nil || resp.RuleGroup == nil { + return fmt.Errorf("Error getting WAFv2 RuleGroup") + } + + d.Set("name", aws.StringValue(resp.RuleGroup.Name)) + d.Set("capacity", aws.Int64Value(resp.RuleGroup.Capacity)) + d.Set("description", aws.StringValue(resp.RuleGroup.Description)) + d.Set("arn", aws.StringValue(resp.RuleGroup.ARN)) + d.Set("lock_token", aws.StringValue(resp.LockToken)) + + if err := d.Set("rule", flattenWafv2Rules(resp.RuleGroup.Rules)); err != nil { + return fmt.Errorf("Error setting rule: %s", err) + } + + if err := d.Set("visibility_config", flattenWafv2VisibilityConfig(resp.RuleGroup.VisibilityConfig)); err != nil { + return fmt.Errorf("Error setting visibility_config: %s", err) + } + + arn := aws.StringValue(resp.RuleGroup.ARN) + tags, err := keyvaluetags.Wafv2ListTags(conn, arn) + if err != nil { + return fmt.Errorf("Error listing tags for WAFv2 RuleGroup (%s): %s", arn, err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("Error setting tags: %s", err) + } + + return nil +} + +func resourceAwsWafv2RuleGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + + log.Printf("[INFO] Updating WAFv2 RuleGroup %s", d.Id()) + + u := &wafv2.UpdateRuleGroupInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + LockToken: aws.String(d.Get("lock_token").(string)), + Rules: expandWafv2Rules(d.Get("rule").(*schema.Set).List()), + VisibilityConfig: expandWafv2VisibilityConfig(d.Get("visibility_config").([]interface{})), + } + + if v, ok := d.GetOk("description"); ok { + u.Description = aws.String(v.(string)) + } + + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateRuleGroup(u) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFUnavailableEntityException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.UpdateRuleGroup(u) + } + + if err != nil { + return fmt.Errorf("Error updating WAFv2 RuleGroup: %s", err) + } + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.Wafv2UpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("Error updating tags: %s", err) + } + } + + return resourceAwsWafv2RuleGroupRead(d, meta) +} + +func resourceAwsWafv2RuleGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafv2conn + + log.Printf("[INFO] Deleting WAFv2 RuleGroup %s", d.Id()) + + r := &wafv2.DeleteRuleGroupInput{ + Id: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Scope: aws.String(d.Get("scope").(string)), + LockToken: aws.String(d.Get("lock_token").(string)), + } + + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteRuleGroup(r) + if err != nil { + if isAWSErr(err, wafv2.ErrCodeWAFAssociatedItemException, "") { + return resource.RetryableError(err) + } + if isAWSErr(err, wafv2.ErrCodeWAFUnavailableEntityException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if isResourceTimeoutError(err) { + _, err = conn.DeleteRuleGroup(r) + } + + if err != nil { + return fmt.Errorf("Error deleting WAFv2 RuleGroup: %s", err) + } + + return nil +} + +func wafv2EmptySchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{}, + }, + } +} + +func wafv2RootStatementSchema(level int) *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "and_statement": wafv2StatementSchema(level - 1), + "byte_match_statement": wafv2ByteMatchStatementSchema(), + "geo_match_statement": wafv2GeoMatchStatementSchema(), + "ip_set_reference_statement": wafv2IpSetReferenceStatementSchema(), + "not_statement": wafv2StatementSchema(level - 1), + "or_statement": wafv2StatementSchema(level - 1), + "regex_pattern_set_reference_statement": wafv2RegexPatternSetReferenceStatementSchema(), + "size_constraint_statement": wafv2SizeConstraintSchema(), + "sqli_match_statement": wafv2SqliMatchStatementSchema(), + "xss_match_statement": wafv2XssMatchStatementSchema(), + }, + }, + } +} + +func wafv2StatementSchema(level int) *schema.Schema { + if level > 1 { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "statement": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "and_statement": wafv2StatementSchema(level - 1), + "byte_match_statement": wafv2ByteMatchStatementSchema(), + "geo_match_statement": wafv2GeoMatchStatementSchema(), + "ip_set_reference_statement": wafv2IpSetReferenceStatementSchema(), + "not_statement": wafv2StatementSchema(level - 1), + "or_statement": wafv2StatementSchema(level - 1), + "regex_pattern_set_reference_statement": wafv2RegexPatternSetReferenceStatementSchema(), + "size_constraint_statement": wafv2SizeConstraintSchema(), + "sqli_match_statement": wafv2SqliMatchStatementSchema(), + "xss_match_statement": wafv2XssMatchStatementSchema(), + }, + }, + }, + }, + }, + } + } + + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "statement": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "byte_match_statement": wafv2ByteMatchStatementSchema(), + "geo_match_statement": wafv2GeoMatchStatementSchema(), + "ip_set_reference_statement": wafv2IpSetReferenceStatementSchema(), + "regex_pattern_set_reference_statement": wafv2RegexPatternSetReferenceStatementSchema(), + "size_constraint_statement": wafv2SizeConstraintSchema(), + "sqli_match_statement": wafv2SqliMatchStatementSchema(), + "xss_match_statement": wafv2XssMatchStatementSchema(), + }, + }, + }, + }, + }, + } +} + +func wafv2ByteMatchStatementSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": wafv2FieldToMatchSchema(), + "positional_constraint": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.PositionalConstraintContains, + wafv2.PositionalConstraintContainsWord, + wafv2.PositionalConstraintEndsWith, + wafv2.PositionalConstraintExactly, + wafv2.PositionalConstraintStartsWith, + }, false), + }, + "search_string": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 200), + }, + "text_transformation": wafv2TextTransformationSchema(), + }, + }, + } +} + +func wafv2GeoMatchStatementSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "country_codes": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + } +} + +func wafv2IpSetReferenceStatementSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + } +} + +func wafv2RegexPatternSetReferenceStatementSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "field_to_match": wafv2FieldToMatchSchema(), + "text_transformation": wafv2TextTransformationSchema(), + }, + }, + } +} + +func wafv2SizeConstraintSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "comparison_operator": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.ComparisonOperatorEq, + wafv2.ComparisonOperatorGe, + wafv2.ComparisonOperatorGt, + wafv2.ComparisonOperatorLe, + wafv2.ComparisonOperatorLt, + wafv2.ComparisonOperatorNe, + }, false), + }, + "field_to_match": wafv2FieldToMatchSchema(), + "size": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(0, 21474836480), + }, + "text_transformation": wafv2TextTransformationSchema(), + }, + }, + } +} + +func wafv2SqliMatchStatementSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": wafv2FieldToMatchSchema(), + "text_transformation": wafv2TextTransformationSchema(), + }, + }, + } +} + +func wafv2XssMatchStatementSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": wafv2FieldToMatchSchema(), + "text_transformation": wafv2TextTransformationSchema(), + }, + }, + } +} + +func wafv2FieldToMatchSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "all_query_arguments": wafv2EmptySchema(), + "body": wafv2EmptySchema(), + "method": wafv2EmptySchema(), + "query_string": wafv2EmptySchema(), + "single_header": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 40), + // The value is returned in lower case by the API. + // Trying to solve it with StateFunc and/or DiffSuppressFunc resulted in hash problem of the rule field or didn't work. + validation.StringMatch(regexp.MustCompile(`^[a-z0-9-_]+$`), "must contain only lowercase alphanumeric characters, underscores, and hyphens"), + ), + }, + }, + }, + }, + "single_query_argument": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 30), + // The value is returned in lower case by the API. + // Trying to solve it with StateFunc and/or DiffSuppressFunc resulted in hash problem of the rule field or didn't work. + validation.StringMatch(regexp.MustCompile(`^[a-z0-9-_]+$`), "must contain only lowercase alphanumeric characters, underscores, and hyphens"), + ), + }, + }, + }, + }, + "uri_path": wafv2EmptySchema(), + }, + }, + } +} + +func wafv2TextTransformationSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeSet, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "priority": { + Type: schema.TypeInt, + Required: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + wafv2.TextTransformationTypeCmdLine, + wafv2.TextTransformationTypeCompressWhiteSpace, + wafv2.TextTransformationTypeHtmlEntityDecode, + wafv2.TextTransformationTypeLowercase, + wafv2.TextTransformationTypeNone, + wafv2.TextTransformationTypeUrlDecode, + }, false), + }, + }, + }, + } +} + +func wafv2VisibilityConfigSchema() *schema.Schema { + return &schema.Schema{ + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_metrics_enabled": { + Type: schema.TypeBool, + Required: true, + }, + "metric_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.All( + validation.StringLenBetween(1, 128), + validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9-_]+$`), "must contain only alphanumeric hyphen and underscore characters"), + ), + }, + "sampled_requests_enabled": { + Type: schema.TypeBool, + Required: true, + }, + }, + }, + } +} + +func expandWafv2Rules(l []interface{}) []*wafv2.Rule { + if len(l) == 0 || l[0] == nil { + return nil + } + + rules := make([]*wafv2.Rule, 0) + + for _, rule := range l { + if rule == nil { + continue + } + rules = append(rules, expandWafv2Rule(rule.(map[string]interface{}))) + } + + return rules +} + +func expandWafv2Rule(m map[string]interface{}) *wafv2.Rule { + if m == nil { + return nil + } + + return &wafv2.Rule{ + Name: aws.String(m["name"].(string)), + Priority: aws.Int64(int64(m["priority"].(int))), + Action: expandWafv2RuleAction(m["action"].([]interface{})), + Statement: expandWafv2RootStatement(m["statement"].([]interface{})), + VisibilityConfig: expandWafv2VisibilityConfig(m["visibility_config"].([]interface{})), + } +} + +func expandWafv2RuleAction(l []interface{}) *wafv2.RuleAction { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + action := &wafv2.RuleAction{} + + if v, ok := m["allow"]; ok && len(v.([]interface{})) > 0 { + action.Allow = &wafv2.AllowAction{} + } + + if v, ok := m["block"]; ok && len(v.([]interface{})) > 0 { + action.Block = &wafv2.BlockAction{} + } + + if v, ok := m["count"]; ok && len(v.([]interface{})) > 0 { + action.Count = &wafv2.CountAction{} + } + + return action +} + +func expandWafv2VisibilityConfig(l []interface{}) *wafv2.VisibilityConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + configuration := &wafv2.VisibilityConfig{} + + if v, ok := m["cloudwatch_metrics_enabled"]; ok { + configuration.CloudWatchMetricsEnabled = aws.Bool(v.(bool)) + } + + if v, ok := m["metric_name"]; ok && len(v.(string)) > 0 { + configuration.MetricName = aws.String(v.(string)) + } + + if v, ok := m["sampled_requests_enabled"]; ok { + configuration.SampledRequestsEnabled = aws.Bool(v.(bool)) + } + + return configuration +} + +func expandWafv2RootStatement(l []interface{}) *wafv2.Statement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return expandWafv2Statement(m) +} + +func expandWafv2Statements(l []interface{}) []*wafv2.Statement { + if len(l) == 0 || l[0] == nil { + return nil + } + + statements := make([]*wafv2.Statement, 0) + + for _, statement := range l { + if statement == nil { + continue + } + statements = append(statements, expandWafv2Statement(statement.(map[string]interface{}))) + } + + return statements +} + +func expandWafv2Statement(m map[string]interface{}) *wafv2.Statement { + if m == nil { + return nil + } + + statement := &wafv2.Statement{} + + if v, ok := m["and_statement"]; ok { + statement.AndStatement = expandWafv2AndStatement(v.([]interface{})) + } + + if v, ok := m["byte_match_statement"]; ok { + statement.ByteMatchStatement = expandWafv2ByteMatchStatement(v.([]interface{})) + } + + if v, ok := m["ip_set_reference_statement"]; ok { + statement.IPSetReferenceStatement = expandWafv2IpSetReferenceStatement(v.([]interface{})) + } + + if v, ok := m["geo_match_statement"]; ok { + statement.GeoMatchStatement = expandWafv2GeoMatchStatement(v.([]interface{})) + } + + if v, ok := m["not_statement"]; ok { + statement.NotStatement = expandWafv2NotStatement(v.([]interface{})) + } + + if v, ok := m["or_statement"]; ok { + statement.OrStatement = expandWafv2OrStatement(v.([]interface{})) + } + + if v, ok := m["regex_pattern_set_reference_statement"]; ok { + statement.RegexPatternSetReferenceStatement = expandWafv2RegexPatternSetReferenceStatement(v.([]interface{})) + } + + if v, ok := m["size_constraint_statement"]; ok { + statement.SizeConstraintStatement = expandWafv2SizeConstraintStatement(v.([]interface{})) + } + + if v, ok := m["sqli_match_statement"]; ok { + statement.SqliMatchStatement = expandWafv2SqliMatchStatement(v.([]interface{})) + } + + if v, ok := m["xss_match_statement"]; ok { + statement.XssMatchStatement = expandWafv2XssMatchStatement(v.([]interface{})) + } + + return statement +} + +func expandWafv2AndStatement(l []interface{}) *wafv2.AndStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.AndStatement{ + Statements: expandWafv2Statements(m["statement"].([]interface{})), + } +} + +func expandWafv2ByteMatchStatement(l []interface{}) *wafv2.ByteMatchStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.ByteMatchStatement{ + FieldToMatch: expandWafv2FieldToMatch(m["field_to_match"].([]interface{})), + PositionalConstraint: aws.String(m["positional_constraint"].(string)), + SearchString: []byte(m["search_string"].(string)), + TextTransformations: expandWafv2TextTransformations(m["text_transformation"].(*schema.Set).List()), + } +} + +func expandWafv2FieldToMatch(l []interface{}) *wafv2.FieldToMatch { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + f := &wafv2.FieldToMatch{} + + if v, ok := m["all_query_arguments"]; ok && len(v.([]interface{})) > 0 { + f.AllQueryArguments = &wafv2.AllQueryArguments{} + } + + if v, ok := m["body"]; ok && len(v.([]interface{})) > 0 { + f.Body = &wafv2.Body{} + } + + if v, ok := m["method"]; ok && len(v.([]interface{})) > 0 { + f.Method = &wafv2.Method{} + } + + if v, ok := m["query_string"]; ok && len(v.([]interface{})) > 0 { + f.QueryString = &wafv2.QueryString{} + } + + if v, ok := m["single_header"]; ok && len(v.([]interface{})) > 0 { + f.SingleHeader = expandWafv2SingleHeader(m["single_header"].([]interface{})) + } + + if v, ok := m["single_query_argument"]; ok && len(v.([]interface{})) > 0 { + f.SingleQueryArgument = expandWafv2SingleQueryArgument(m["single_query_argument"].([]interface{})) + } + + if v, ok := m["uri_path"]; ok && len(v.([]interface{})) > 0 { + f.UriPath = &wafv2.UriPath{} + } + + return f +} + +func expandWafv2SingleHeader(l []interface{}) *wafv2.SingleHeader { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.SingleHeader{ + Name: aws.String(m["name"].(string)), + } +} + +func expandWafv2SingleQueryArgument(l []interface{}) *wafv2.SingleQueryArgument { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.SingleQueryArgument{ + Name: aws.String(m["name"].(string)), + } +} + +func expandWafv2TextTransformations(l []interface{}) []*wafv2.TextTransformation { + if len(l) == 0 || l[0] == nil { + return nil + } + + rules := make([]*wafv2.TextTransformation, 0) + + for _, rule := range l { + if rule == nil { + continue + } + rules = append(rules, expandWafv2TextTransformation(rule.(map[string]interface{}))) + } + + return rules +} + +func expandWafv2TextTransformation(m map[string]interface{}) *wafv2.TextTransformation { + if m == nil { + return nil + } + + return &wafv2.TextTransformation{ + Priority: aws.Int64(int64(m["priority"].(int))), + Type: aws.String(m["type"].(string)), + } +} + +func expandWafv2IpSetReferenceStatement(l []interface{}) *wafv2.IPSetReferenceStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.IPSetReferenceStatement{ + ARN: aws.String(m["arn"].(string)), + } +} + +func expandWafv2GeoMatchStatement(l []interface{}) *wafv2.GeoMatchStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.GeoMatchStatement{ + CountryCodes: expandStringList(m["country_codes"].([]interface{})), + } +} + +func expandWafv2NotStatement(l []interface{}) *wafv2.NotStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + s := m["statement"].([]interface{}) + + if len(s) == 0 || s[0] == nil { + return nil + } + + m = s[0].(map[string]interface{}) + + return &wafv2.NotStatement{ + Statement: expandWafv2Statement(m), + } +} + +func expandWafv2OrStatement(l []interface{}) *wafv2.OrStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.OrStatement{ + Statements: expandWafv2Statements(m["statement"].([]interface{})), + } +} + +func expandWafv2RegexPatternSetReferenceStatement(l []interface{}) *wafv2.RegexPatternSetReferenceStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.RegexPatternSetReferenceStatement{ + ARN: aws.String(m["arn"].(string)), + FieldToMatch: expandWafv2FieldToMatch(m["field_to_match"].([]interface{})), + TextTransformations: expandWafv2TextTransformations(m["text_transformation"].(*schema.Set).List()), + } +} + +func expandWafv2SizeConstraintStatement(l []interface{}) *wafv2.SizeConstraintStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.SizeConstraintStatement{ + ComparisonOperator: aws.String(m["comparison_operator"].(string)), + FieldToMatch: expandWafv2FieldToMatch(m["field_to_match"].([]interface{})), + Size: aws.Int64(int64(m["size"].(int))), + TextTransformations: expandWafv2TextTransformations(m["text_transformation"].(*schema.Set).List()), + } +} + +func expandWafv2SqliMatchStatement(l []interface{}) *wafv2.SqliMatchStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.SqliMatchStatement{ + FieldToMatch: expandWafv2FieldToMatch(m["field_to_match"].([]interface{})), + TextTransformations: expandWafv2TextTransformations(m["text_transformation"].(*schema.Set).List()), + } +} + +func expandWafv2XssMatchStatement(l []interface{}) *wafv2.XssMatchStatement { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &wafv2.XssMatchStatement{ + FieldToMatch: expandWafv2FieldToMatch(m["field_to_match"].([]interface{})), + TextTransformations: expandWafv2TextTransformations(m["text_transformation"].(*schema.Set).List()), + } +} + +func flattenWafv2Rules(r []*wafv2.Rule) interface{} { + out := make([]map[string]interface{}, len(r)) + for i, rule := range r { + m := make(map[string]interface{}) + m["action"] = flattenWafv2RuleAction(rule.Action) + m["name"] = aws.StringValue(rule.Name) + m["priority"] = int(aws.Int64Value(rule.Priority)) + m["statement"] = flattenWafv2RootStatement(rule.Statement) + m["visibility_config"] = flattenWafv2VisibilityConfig(rule.VisibilityConfig) + out[i] = m + } + + return out +} + +func flattenWafv2RuleAction(a *wafv2.RuleAction) interface{} { + if a == nil { + return []interface{}{} + } + + m := map[string]interface{}{} + + if a.Allow != nil { + m["allow"] = make([]map[string]interface{}, 1) + } + + if a.Block != nil { + m["block"] = make([]map[string]interface{}, 1) + } + + if a.Count != nil { + m["count"] = make([]map[string]interface{}, 1) + } + + return []interface{}{m} +} + +func flattenWafv2RootStatement(s *wafv2.Statement) interface{} { + if s == nil { + return []interface{}{} + } + + return []interface{}{flattenWafv2Statement(s)} +} + +func flattenWafv2Statements(s []*wafv2.Statement) interface{} { + out := make([]interface{}, len(s)) + for i, statement := range s { + out[i] = flattenWafv2Statement(statement) + } + + return out +} + +func flattenWafv2Statement(s *wafv2.Statement) map[string]interface{} { + if s == nil { + return map[string]interface{}{} + } + + m := map[string]interface{}{} + + if s.AndStatement != nil { + m["and_statement"] = flattenWafv2AndStatement(s.AndStatement) + } + + if s.ByteMatchStatement != nil { + m["byte_match_statement"] = flattenWafv2ByteMatchStatement(s.ByteMatchStatement) + } + + if s.IPSetReferenceStatement != nil { + m["ip_set_reference_statement"] = flattenWafv2IpSetReferenceStatement(s.IPSetReferenceStatement) + } + + if s.GeoMatchStatement != nil { + m["geo_match_statement"] = flattenWafv2GeoMatchStatement(s.GeoMatchStatement) + } + + if s.NotStatement != nil { + m["not_statement"] = flattenWafv2NotStatement(s.NotStatement) + } + + if s.OrStatement != nil { + m["or_statement"] = flattenWafv2OrStatement(s.OrStatement) + } + + if s.RegexPatternSetReferenceStatement != nil { + m["regex_pattern_set_reference_statement"] = flattenWafv2RegexPatternSetReferenceStatement(s.RegexPatternSetReferenceStatement) + } + + if s.SizeConstraintStatement != nil { + m["size_constraint_statement"] = flattenWafv2SizeConstraintStatement(s.SizeConstraintStatement) + } + + if s.SqliMatchStatement != nil { + m["sqli_match_statement"] = flattenWafv2SqliMatchStatement(s.SqliMatchStatement) + } + + if s.XssMatchStatement != nil { + m["xss_match_statement"] = flattenWafv2XssMatchStatement(s.XssMatchStatement) + } + + return m +} + +func flattenWafv2AndStatement(a *wafv2.AndStatement) interface{} { + if a == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "statement": flattenWafv2Statements(a.Statements), + } + + return []interface{}{m} +} + +func flattenWafv2ByteMatchStatement(b *wafv2.ByteMatchStatement) interface{} { + if b == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "field_to_match": flattenWafv2FieldToMatch(b.FieldToMatch), + "positional_constraint": aws.StringValue(b.PositionalConstraint), + "search_string": string(b.SearchString), + "text_transformation": flattenWafv2TextTransformations(b.TextTransformations), + } + + return []interface{}{m} +} + +func flattenWafv2FieldToMatch(f *wafv2.FieldToMatch) interface{} { + if f == nil { + return []interface{}{} + } + + m := map[string]interface{}{} + + if f.AllQueryArguments != nil { + m["all_query_arguments"] = make([]map[string]interface{}, 1) + } + + if f.Body != nil { + m["body"] = make([]map[string]interface{}, 1) + } + + if f.Method != nil { + m["method"] = make([]map[string]interface{}, 1) + } + + if f.QueryString != nil { + m["query_string"] = make([]map[string]interface{}, 1) + } + + if f.SingleHeader != nil { + m["single_header"] = flattenWafv2SingleHeader(f.SingleHeader) + } + + if f.SingleQueryArgument != nil { + m["single_query_argument"] = flattenWafv2SingleQueryArgument(f.SingleQueryArgument) + } + + if f.UriPath != nil { + m["uri_path"] = make([]map[string]interface{}, 1) + } + + return []interface{}{m} +} + +func flattenWafv2SingleHeader(s *wafv2.SingleHeader) interface{} { + if s == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "name": aws.StringValue(s.Name), + } + + return []interface{}{m} +} + +func flattenWafv2SingleQueryArgument(s *wafv2.SingleQueryArgument) interface{} { + if s == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "name": aws.StringValue(s.Name), + } + + return []interface{}{m} +} + +func flattenWafv2TextTransformations(l []*wafv2.TextTransformation) []interface{} { + out := make([]interface{}, len(l)) + for i, t := range l { + m := make(map[string]interface{}) + m["priority"] = int(aws.Int64Value(t.Priority)) + m["type"] = aws.StringValue(t.Type) + out[i] = m + } + return out +} + +func flattenWafv2IpSetReferenceStatement(i *wafv2.IPSetReferenceStatement) interface{} { + if i == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "arn": aws.StringValue(i.ARN), + } + + return []interface{}{m} +} + +func flattenWafv2GeoMatchStatement(g *wafv2.GeoMatchStatement) interface{} { + if g == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "country_codes": flattenStringList(g.CountryCodes), + } + + return []interface{}{m} +} + +func flattenWafv2NotStatement(a *wafv2.NotStatement) interface{} { + if a == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "statement": []interface{}{flattenWafv2Statement(a.Statement)}, + } + + return []interface{}{m} +} + +func flattenWafv2OrStatement(a *wafv2.OrStatement) interface{} { + if a == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "statement": flattenWafv2Statements(a.Statements), + } + + return []interface{}{m} +} + +func flattenWafv2RegexPatternSetReferenceStatement(r *wafv2.RegexPatternSetReferenceStatement) interface{} { + if r == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "arn": aws.StringValue(r.ARN), + "field_to_match": flattenWafv2FieldToMatch(r.FieldToMatch), + "text_transformation": flattenWafv2TextTransformations(r.TextTransformations), + } + + return []interface{}{m} +} + +func flattenWafv2SizeConstraintStatement(s *wafv2.SizeConstraintStatement) interface{} { + if s == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "comparison_operator": aws.StringValue(s.ComparisonOperator), + "field_to_match": flattenWafv2FieldToMatch(s.FieldToMatch), + "size": int(aws.Int64Value(s.Size)), + "text_transformation": flattenWafv2TextTransformations(s.TextTransformations), + } + + return []interface{}{m} +} + +func flattenWafv2SqliMatchStatement(s *wafv2.SqliMatchStatement) interface{} { + if s == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "field_to_match": flattenWafv2FieldToMatch(s.FieldToMatch), + "text_transformation": flattenWafv2TextTransformations(s.TextTransformations), + } + + return []interface{}{m} +} + +func flattenWafv2XssMatchStatement(s *wafv2.XssMatchStatement) interface{} { + if s == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "field_to_match": flattenWafv2FieldToMatch(s.FieldToMatch), + "text_transformation": flattenWafv2TextTransformations(s.TextTransformations), + } + + return []interface{}{m} +} + +func flattenWafv2VisibilityConfig(config *wafv2.VisibilityConfig) interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "cloudwatch_metrics_enabled": aws.BoolValue(config.CloudWatchMetricsEnabled), + "metric_name": aws.StringValue(config.MetricName), + "sampled_requests_enabled": aws.BoolValue(config.SampledRequestsEnabled), + } + + return []interface{}{m} +} diff --git a/aws/resource_aws_wafv2_rule_group_test.go b/aws/resource_aws_wafv2_rule_group_test.go new file mode 100644 index 00000000000..55ca8757e20 --- /dev/null +++ b/aws/resource_aws_wafv2_rule_group_test.go @@ -0,0 +1,2488 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafv2" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func TestAccAwsWafv2RuleGroup_Basic(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_Basic(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_BasicUpdate(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "50"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", "Updated"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "rule.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.name", "rule-2"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.priority", "10"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.action.0.allow.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.action.0.block.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.action.0.count.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.comparison_operator", "LT"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.field_to_match.0.query_string.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.size", "50"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.text_transformation.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.text_transformation.2212084700.priority", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.text_transformation.2212084700.type", "CMD_LINE"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.text_transformation.4292479961.priority", "5"), + resource.TestCheckResourceAttr(resourceName, "rule.1162901930.statement.0.size_constraint_statement.0.text_transformation.4292479961.type", "NONE"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.name", "rule-1"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.priority", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.0.allow.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.0.block.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.0.count.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_ByteMatchStatement(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.positional_constraint", "CONTAINS"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.search_string", "word"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.text_transformation.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.text_transformation.4292479961.priority", "5"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.text_transformation.4292479961.type", "NONE"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.text_transformation.2156930824.priority", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.3451531458.statement.0.byte_match_statement.0.text_transformation.2156930824.type", "LOWERCASE"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_Update(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.0.byte_match_statement.0.positional_constraint", "EXACTLY"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.0.byte_match_statement.0.search_string", "sentence"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.0.byte_match_statement.0.text_transformation.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.0.byte_match_statement.0.text_transformation.766585421.priority", "3"), + resource.TestCheckResourceAttr(resourceName, "rule.3446749900.statement.0.byte_match_statement.0.text_transformation.766585421.type", "CMD_LINE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_ByteMatchStatement_FieldToMatch(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchAllQueryArguments(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.body.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2971982489.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchBody(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.body.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.4243272354.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchMethod(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.body.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.method.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.1903944126.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchQueryString(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.body.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.95492546.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchSingleHeader(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.body.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.single_header.0.name", "a-forty-character-long-header-name-40-40"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2127391528.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchSingleQueryArgument(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.body.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.0.name", "a-max-30-characters-long-name-"), + resource.TestCheckResourceAttr(resourceName, "rule.492520910.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchUriPath(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.all_query_arguments.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.body.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.method.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.query_string.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.single_header.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.single_query_argument.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.984121555.statement.0.byte_match_statement.0.field_to_match.0.uri_path.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_ChangeNameForceNew(t *testing.T) { + var before, after wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + ruleGroupNewName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_Basic(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &before), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_Basic(ruleGroupNewName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &after), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupNewName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupNewName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_ChangeCapacityForceNew(t *testing.T) { + var before, after wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_Basic(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &before), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_UpdateCapacity(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &after), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "3"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_ChangeMetricNameForceNew(t *testing.T) { + var before, after wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_Basic(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &before), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_UpdateMetricName(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &after), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "updated-friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_Disappears(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_Minimal(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccCheckResourceDisappears(testAccProvider, resourceAwsWafv2RuleGroup(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_GeoMatchStatement(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_GeoMatchStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.statement.0.geo_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.statement.0.geo_match_statement.0.country_codes.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.statement.0.geo_match_statement.0.country_codes.0", "US"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.statement.0.geo_match_statement.0.country_codes.1", "NL"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_GeoMatchStatement_Update(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4215509823.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4215509823.statement.0.geo_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.4215509823.statement.0.geo_match_statement.0.country_codes.#", "3"), + resource.TestCheckResourceAttr(resourceName, "rule.4215509823.statement.0.geo_match_statement.0.country_codes.0", "ZM"), + resource.TestCheckResourceAttr(resourceName, "rule.4215509823.statement.0.geo_match_statement.0.country_codes.1", "EE"), + resource.TestCheckResourceAttr(resourceName, "rule.4215509823.statement.0.geo_match_statement.0.country_codes.2", "MM"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_IpSetReferenceStatement(t *testing.T) { + var v wafv2.RuleGroup + var idx int + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_IpSetReferenceStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + computeWafv2IpSetRefStatementIndex(&v, &idx), + testCheckResourceAttrWithIndexesAddr(resourceName, "rule.%d.statement.#", &idx, "1"), + testCheckResourceAttrWithIndexesAddr(resourceName, "rule.%d.statement.0.ip_set_reference_statement.#", &idx, "1"), + testAccMatchResourceAttrArnWithIndexesAddr(resourceName, "rule.%d.statement.0.ip_set_reference_statement.0.arn", &idx, "wafv2", regexp.MustCompile(`regional/ipset/.+$`)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_LogicalRuleStatements(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_LogicalRuleStatement_And(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.867936606.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.867936606.statement.0.and_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.867936606.statement.0.and_statement.0.statement.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.867936606.statement.0.and_statement.0.statement.0.geo_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.867936606.statement.0.and_statement.0.statement.1.geo_match_statement.#", "1"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_LogicalRuleStatement_NotAnd(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.0.not_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.0.not_statement.0.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.0.not_statement.0.statement.0.and_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.0.not_statement.0.statement.0.and_statement.0.statement.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.0.not_statement.0.statement.0.and_statement.0.statement.0.geo_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2966210839.statement.0.not_statement.0.statement.0.and_statement.0.statement.1.geo_match_statement.#", "1"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_LogicalRuleStatement_OrNotAnd(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.0.not_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.0.not_statement.0.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.0.not_statement.0.statement.0.geo_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.1.and_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.1.and_statement.0.statement.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.1.and_statement.0.statement.0.geo_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.464720012.statement.0.or_statement.0.statement.1.and_statement.0.statement.1.geo_match_statement.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_Minimal(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_Minimal(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "rule.#", "0"), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.cloudwatch_metrics_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.metric_name", "friendly-metric-name"), + resource.TestCheckResourceAttr(resourceName, "visibility_config.0.sampled_requests_enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_RegexPatternSetReferenceStatement(t *testing.T) { + var v wafv2.RuleGroup + var idx int + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_RegexPatternSetReferenceStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + computeWafv2RegexSetRefStatementIndex(&v, &idx), + testCheckResourceAttrWithIndexesAddr(resourceName, "rule.%d.statement.#", &idx, "1"), + testCheckResourceAttrWithIndexesAddr(resourceName, "rule.%d.statement.0.regex_pattern_set_reference_statement.#", &idx, "1"), + testCheckResourceAttrWithIndexesAddr(resourceName, "rule.%d.statement.0.regex_pattern_set_reference_statement.0.field_to_match.#", &idx, "1"), + testCheckResourceAttrWithIndexesAddr(resourceName, "rule.%d.statement.0.regex_pattern_set_reference_statement.0.text_transformation.#", &idx, "1"), + testAccMatchResourceAttrArnWithIndexesAddr(resourceName, "rule.%d.statement.0.regex_pattern_set_reference_statement.0.arn", &idx, "wafv2", regexp.MustCompile(`regional/regexpatternset/.+$`)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_RuleAction(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_RuleActionAllow(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.action.0.allow.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.action.0.block.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2064993648.action.0.count.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_RuleActionBlock(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2490412960.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2490412960.action.0.allow.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.2490412960.action.0.block.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2490412960.action.0.count.#", "0"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_RuleActionCount(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "capacity", "2"), + resource.TestCheckResourceAttr(resourceName, "name", ruleGroupName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "scope", wafv2.ScopeRegional), + resource.TestCheckResourceAttr(resourceName, "visibility_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.0.allow.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.0.block.#", "0"), + resource.TestCheckResourceAttr(resourceName, "rule.3400404505.action.0.count.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_SizeConstraintStatement(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_SizeConstraintStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.0.size_constraint_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.0.size_constraint_statement.0.comparison_operator", "GT"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.0.size_constraint_statement.0.size", "100"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.0.size_constraint_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.0.size_constraint_statement.0.field_to_match.0.method.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.204038473.statement.0.size_constraint_statement.0.text_transformation.#", "1"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_SizeConstraintStatement_Update(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.0.size_constraint_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.0.size_constraint_statement.0.comparison_operator", "LT"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.0.size_constraint_statement.0.size", "50"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.0.size_constraint_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.0.size_constraint_statement.0.field_to_match.0.query_string.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3233602303.statement.0.size_constraint_statement.0.text_transformation.#", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_SqliMatchStatement(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_SqliMatchStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.field_to_match.0.all_query_arguments.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.text_transformation.#", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.text_transformation.1247795808.priority", "5"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.text_transformation.1247795808.type", "URL_DECODE"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.text_transformation.2156930824.priority", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.1169024249.statement.0.sqli_match_statement.0.text_transformation.2156930824.type", "LOWERCASE"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_SqliMatchStatement_Update(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.field_to_match.0.body.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.#", "3"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.1247795808.priority", "5"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.1247795808.type", "URL_DECODE"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.4120379776.priority", "4"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.4120379776.type", "HTML_ENTITY_DECODE"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.1521630275.priority", "3"), + resource.TestCheckResourceAttr(resourceName, "rule.2934928563.statement.0.sqli_match_statement.0.text_transformation.1521630275.type", "COMPRESS_WHITE_SPACE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_Tags(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_OneTag(ruleGroupName, "Tag1", "Value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_TwoTags(ruleGroupName, "Tag1", "Value1Updated", "Tag2", "Value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag1", "Value1Updated"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_OneTag(ruleGroupName, "Tag2", "Value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Tag2", "Value2"), + ), + }, + }, + }) +} + +func TestAccAwsWafv2RuleGroup_XssMatchStatement(t *testing.T) { + var v wafv2.RuleGroup + ruleGroupName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_wafv2_rule_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWafv2RuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWafv2RuleGroupConfig_XssMatchStatement(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.0.xss_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.0.xss_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.0.xss_match_statement.0.field_to_match.0.body.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.0.xss_match_statement.0.text_transformation.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.0.xss_match_statement.0.text_transformation.2336416342.priority", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.377378487.statement.0.xss_match_statement.0.text_transformation.2336416342.type", "NONE"), + ), + }, + { + Config: testAccAwsWafv2RuleGroupConfig_XssMatchStatement_Update(ruleGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsWafv2RuleGroupExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "wafv2", regexp.MustCompile(`regional/rulegroup/.+$`)), + resource.TestCheckResourceAttr(resourceName, "rule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.0.xss_match_statement.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.0.xss_match_statement.0.field_to_match.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.0.xss_match_statement.0.field_to_match.0.body.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.0.xss_match_statement.0.text_transformation.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.0.xss_match_statement.0.text_transformation.2876362756.priority", "2"), + resource.TestCheckResourceAttr(resourceName, "rule.3452423088.statement.0.xss_match_statement.0.text_transformation.2876362756.type", "URL_DECODE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName), + }, + }, + }) +} + +func testAccMatchResourceAttrArnWithIndexesAddr(name, format string, idx *int, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc { + return func(s *terraform.State) error { + return testAccMatchResourceAttrRegionalARN(name, fmt.Sprintf(format, *idx), "wafv2", arnResourceRegexp)(s) + } +} + +// Calculates the index which isn't static because ARN is generated as part of the test +func computeWafv2IpSetRefStatementIndex(r *wafv2.RuleGroup, idx *int) resource.TestCheckFunc { + return func(s *terraform.State) error { + ruleResource := resourceAwsWafv2RuleGroup().Schema["rule"].Elem.(*schema.Resource) + + rule := map[string]interface{}{ + "name": "rule-1", + "priority": 1, + "action": []interface{}{ + map[string]interface{}{ + "allow": make([]interface{}, 1), + "block": []interface{}{}, + "count": []interface{}{}, + }, + }, + "statement": []interface{}{ + map[string]interface{}{ + "and_statement": []interface{}{}, + "byte_match_statement": []interface{}{}, + "geo_match_statement": []interface{}{}, + "ip_set_reference_statement": []interface{}{ + map[string]interface{}{ + "arn": aws.StringValue(r.Rules[0].Statement.IPSetReferenceStatement.ARN), + }, + }, + "not_statement": []interface{}{}, + "or_statement": []interface{}{}, + "regex_pattern_set_reference_statement": []interface{}{}, + "size_constraint_statement": []interface{}{}, + "sqli_match_statement": []interface{}{}, + "xss_match_statement": []interface{}{}, + }, + }, + "visibility_config": []interface{}{ + map[string]interface{}{ + "cloudwatch_metrics_enabled": false, + "metric_name": "friendly-rule-metric-name", + "sampled_requests_enabled": false, + }, + }, + } + + f := schema.HashResource(ruleResource) + *idx = f(rule) + + return nil + } +} + +// Calculates the index which isn't static because ARN is generated as part of the test +func computeWafv2RegexSetRefStatementIndex(r *wafv2.RuleGroup, idx *int) resource.TestCheckFunc { + return func(s *terraform.State) error { + ruleResource := resourceAwsWafv2RuleGroup().Schema["rule"].Elem.(*schema.Resource) + textTransformationResource := ruleResource.Schema["statement"].Elem.(*schema.Resource).Schema["regex_pattern_set_reference_statement"].Elem.(*schema.Resource).Schema["text_transformation"].Elem.(*schema.Resource) + rule := map[string]interface{}{ + "name": "rule-1", + "priority": 1, + "action": []interface{}{ + map[string]interface{}{ + "allow": make([]interface{}, 1), + "block": []interface{}{}, + "count": []interface{}{}, + }, + }, + "statement": []interface{}{ + map[string]interface{}{ + "and_statement": []interface{}{}, + "byte_match_statement": []interface{}{}, + "geo_match_statement": []interface{}{}, + "ip_set_reference_statement": []interface{}{}, + "not_statement": []interface{}{}, + "or_statement": []interface{}{}, + "regex_pattern_set_reference_statement": []interface{}{ + map[string]interface{}{ + "arn": aws.StringValue(r.Rules[0].Statement.RegexPatternSetReferenceStatement.ARN), + "field_to_match": []interface{}{ + map[string]interface{}{ + "all_query_arguments": []interface{}{}, + "body": make([]interface{}, 1), + "method": []interface{}{}, + "query_string": []interface{}{}, + "single_header": []interface{}{}, + "single_query_argument": []interface{}{}, + "uri_path": []interface{}{}, + }, + }, + "text_transformation": schema.NewSet(schema.HashResource(textTransformationResource), []interface{}{ + map[string]interface{}{ + "priority": 2, + "type": "NONE", + }, + }), + }, + }, + "size_constraint_statement": []interface{}{}, + "sqli_match_statement": []interface{}{}, + "xss_match_statement": []interface{}{}, + }, + }, + "visibility_config": []interface{}{ + map[string]interface{}{ + "cloudwatch_metrics_enabled": false, + "metric_name": "friendly-rule-metric-name", + "sampled_requests_enabled": false, + }, + }, + } + + f := schema.HashResource(ruleResource) + *idx = f(rule) + + return nil + } +} + +func testAccCheckAwsWafv2RuleGroupDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafv2_rule_group" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafv2conn + resp, err := conn.GetRuleGroup( + &wafv2.GetRuleGroupInput{ + Id: aws.String(rs.Primary.ID), + Name: aws.String(rs.Primary.Attributes["name"]), + Scope: aws.String(rs.Primary.Attributes["scope"]), + }) + + if err == nil { + if resp == nil || resp.RuleGroup == nil { + return fmt.Errorf("Error getting WAFv2 RuleGroup") + } + + if aws.StringValue(resp.RuleGroup.Id) == rs.Primary.ID { + return fmt.Errorf("WAFv2 RuleGroup %s still exists", rs.Primary.ID) + } + + return nil + } + + // Return nil if the RuleGroup is already destroyed + if isAWSErr(err, wafv2.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccCheckAwsWafv2RuleGroupExists(n string, v *wafv2.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 WAFv2 RuleGroup ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafv2conn + resp, err := conn.GetRuleGroup(&wafv2.GetRuleGroupInput{ + Id: aws.String(rs.Primary.ID), + Name: aws.String(rs.Primary.Attributes["name"]), + Scope: aws.String(rs.Primary.Attributes["scope"]), + }) + + if err != nil { + return err + } + + if resp == nil || resp.RuleGroup == nil { + return fmt.Errorf("Error getting WAFv2 RuleGroup") + } + + if aws.StringValue(resp.RuleGroup.Id) == rs.Primary.ID { + *v = *resp.RuleGroup + return nil + } + + return fmt.Errorf("WAFv2 RuleGroup (%s) not found", rs.Primary.ID) + } +} + +func testAccAwsWafv2RuleGroupConfig_Basic(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + description = "%s" + scope = "REGIONAL" + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name, name) +} + +func testAccAwsWafv2RuleGroupConfig_BasicUpdate(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 50 + name = "%s" + description = "Updated" + scope = "REGIONAL" + + rule { + name = "rule-2" + priority = 10 + + action { + block {} + } + + statement { + size_constraint_statement { + comparison_operator = "LT" + size = 50 + + field_to_match { + query_string {} + } + + text_transformation { + priority = 5 + type = "NONE" + } + + text_transformation { + priority = 2 + type = "CMD_LINE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + rule { + name = "rule-1" + priority = 1 + + action { + count {} + } + + statement { + geo_match_statement { + country_codes = ["US", "NL"] + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_UpdateCapacity(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 3 + name = "%s" + description = "%s" + scope = "REGIONAL" + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name, name) +} + +func testAccAwsWafv2RuleGroupConfig_UpdateMetricName(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + description = "%s" + scope = "REGIONAL" + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "updated-friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name, name) +} + +func testAccAwsWafv2RuleGroupConfig_Minimal(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_RuleActionAllow(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + geo_match_statement { + country_codes = ["US", "NL"] + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_RuleActionBlock(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + block {} + } + + statement { + geo_match_statement { + country_codes = ["US", "NL"] + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_RuleActionCount(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + count {} + } + + statement { + geo_match_statement { + country_codes = ["US", "NL"] + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 300 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + all_query_arguments {} + } + + text_transformation { + priority = 5 + type = "NONE" + } + + text_transformation { + priority = 2 + type = "LOWERCASE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_Update(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 30 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "EXACTLY" + search_string = "sentence" + + field_to_match { + all_query_arguments {} + } + + text_transformation { + priority = 3 + type = "CMD_LINE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchAllQueryArguments(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 30 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + all_query_arguments {} + } + + text_transformation { + priority = 5 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchBody(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 15 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + body {} + } + + text_transformation { + priority = 1 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchMethod(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 15 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + method {} + } + + text_transformation { + priority = 1 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchQueryString(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 15 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + query_string {} + } + + text_transformation { + priority = 1 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchSingleHeader(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 15 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + single_header { + name = "a-forty-character-long-header-name-40-40" + } + } + + text_transformation { + priority = 1 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchSingleQueryArgument(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 30 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + single_query_argument { + name = "a-max-30-characters-long-name-" + } + } + + text_transformation { + priority = 1 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_ByteMatchStatement_FieldToMatchUriPath(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 15 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + byte_match_statement { + positional_constraint = "CONTAINS" + search_string = "word" + + field_to_match { + uri_path {} + } + + text_transformation { + priority = 1 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_IpSetReferenceStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_ip_set" "test" { + name = "ip-set-%s" + scope = "REGIONAL" + ip_address_version = "IPV4" + addresses = ["1.1.1.1/32", "2.2.2.2/32"] +} + +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + ip_set_reference_statement { + arn = aws_wafv2_ip_set.test.arn + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name, name) +} + +func testAccAwsWafv2RuleGroupConfig_GeoMatchStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + geo_match_statement { + country_codes = ["US", "NL"] + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_GeoMatchStatement_Update(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + geo_match_statement { + country_codes = ["ZM", "EE", "MM"] + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_LogicalRuleStatement_And(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + and_statement { + statement { + geo_match_statement { + country_codes = ["US"] + } + } + statement { + geo_match_statement { + country_codes = ["NL"] + } + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_LogicalRuleStatement_NotAnd(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + not_statement { + statement { + and_statement { + statement { + geo_match_statement { + country_codes = ["US"] + } + } + statement { + geo_match_statement { + country_codes = ["NL"] + } + } + } + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_LogicalRuleStatement_OrNotAnd(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 3 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + or_statement { + statement { + not_statement { + statement { + geo_match_statement { + country_codes = ["DE"] + } + } + } + } + statement { + and_statement { + statement { + geo_match_statement { + country_codes = ["US"] + } + } + statement { + geo_match_statement { + country_codes = ["NL"] + } + } + } + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_RegexPatternSetReferenceStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_regex_pattern_set" "test" { + name = "regex-pattern-set-%s" + scope = "REGIONAL" + + regular_expression { + regex_string = "one" + } +} + +resource "aws_wafv2_rule_group" "test" { + capacity = 50 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + regex_pattern_set_reference_statement { + arn = aws_wafv2_regex_pattern_set.test.arn + + field_to_match { + body {} + } + + text_transformation { + priority = 2 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name, name) +} + +func testAccAwsWafv2RuleGroupConfig_SizeConstraintStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 30 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + size_constraint_statement { + comparison_operator = "GT" + size = 100 + + field_to_match { + method {} + } + + text_transformation { + priority = 5 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_SizeConstraintStatement_Update(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 30 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + size_constraint_statement { + comparison_operator = "LT" + size = 50 + + field_to_match { + query_string {} + } + + text_transformation { + priority = 5 + type = "NONE" + } + + text_transformation { + priority = 2 + type = "CMD_LINE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_SqliMatchStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 300 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + sqli_match_statement { + field_to_match { + all_query_arguments {} + } + + text_transformation { + priority = 5 + type = "URL_DECODE" + } + + text_transformation { + priority = 2 + type = "LOWERCASE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_SqliMatchStatement_Update(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 300 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + sqli_match_statement { + field_to_match { + body {} + } + + text_transformation { + priority = 5 + type = "URL_DECODE" + } + + text_transformation { + priority = 4 + type = "HTML_ENTITY_DECODE" + } + + text_transformation { + priority = 3 + type = "COMPRESS_WHITE_SPACE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_XssMatchStatement(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 300 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + block {} + } + + statement { + xss_match_statement { + + field_to_match { + body {} + } + + text_transformation { + priority = 2 + type = "NONE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_XssMatchStatement_Update(name string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 300 + name = "%s" + scope = "REGIONAL" + + rule { + name = "rule-1" + priority = 1 + + action { + allow {} + } + + statement { + xss_match_statement { + field_to_match { + body {} + } + + text_transformation { + priority = 2 + type = "URL_DECODE" + } + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-rule-metric-name" + sampled_requests_enabled = false + } + } + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } +} +`, name) +} + +func testAccAwsWafv2RuleGroupConfig_OneTag(name, tagKey, tagValue string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + description = "%s" + scope = "REGIONAL" + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } + + tags = { + "%s" = "%s" + } +} +`, name, name, tagKey, tagValue) +} + +func testAccAwsWafv2RuleGroupConfig_TwoTags(name, tag1Key, tag1Value, tag2Key, tag2Value string) string { + return fmt.Sprintf(` +resource "aws_wafv2_rule_group" "test" { + capacity = 2 + name = "%s" + description = "%s" + scope = "REGIONAL" + + visibility_config { + cloudwatch_metrics_enabled = false + metric_name = "friendly-metric-name" + sampled_requests_enabled = false + } + + tags = { + "%s" = "%s" + "%s" = "%s" + } +} +`, name, name, tag1Key, tag1Value, tag2Key, tag2Value) +} + +func testAccAwsWafv2RuleGroupImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not found: %s", resourceName) + } + + return fmt.Sprintf("%s/%s/%s", rs.Primary.ID, rs.Primary.Attributes["name"], rs.Primary.Attributes["scope"]), nil + } +} diff --git a/aws/resource_aws_worklink_fleet_test.go b/aws/resource_aws_worklink_fleet_test.go index f293c9548d1..7158dee4997 100644 --- a/aws/resource_aws_worklink_fleet_test.go +++ b/aws/resource_aws_worklink_fleet_test.go @@ -386,7 +386,14 @@ resource "aws_worklink_fleet" "test" { func testAccAWSWorkLinkFleetConfigNetwork_Base(rName, cidrBlock string) string { return fmt.Sprintf(` -data "aws_availability_zones" "available" {} +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} resource "aws_vpc" "test" { cidr_block = "%s" diff --git a/aws/resource_aws_workspaces_directory.go b/aws/resource_aws_workspaces_directory.go index 37321ea2c35..9b5976ae1c4 100644 --- a/aws/resource_aws_workspaces_directory.go +++ b/aws/resource_aws_workspaces_directory.go @@ -3,13 +3,13 @@ package aws import ( "fmt" "log" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/workspaces" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/workspaces/waiter" ) func resourceAwsWorkspacesDirectory() *schema.Resource { @@ -69,6 +69,44 @@ func resourceAwsWorkspacesDirectory() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "workspace_security_group_id": { + Type: schema.TypeString, + Computed: true, + }, + "iam_role_id": { + Type: schema.TypeString, + Computed: true, + }, + "registration_code": { + Type: schema.TypeString, + Computed: true, + }, + "directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "directory_type": { + Type: schema.TypeString, + Computed: true, + }, + "customer_user_name": { + Type: schema.TypeString, + Computed: true, + }, + "alias": { + Type: schema.TypeString, + Computed: true, + }, + "ip_group_ids": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "dns_ip_addresses": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, "tags": tagsSchema(), }, } @@ -89,36 +127,24 @@ func resourceAwsWorkspacesDirectoryCreate(d *schema.ResourceData, meta interface } if v, ok := d.GetOk("subnet_ids"); ok { - for _, id := range v.(*schema.Set).List() { - input.SubnetIds = append(input.SubnetIds, aws.String(id.(string))) - } + input.SubnetIds = expandStringSet(v.(*schema.Set)) } - log.Printf("[DEBUG] Regestering workspaces directory...\n%#v\n", *input) + log.Printf("[DEBUG] Regestering WorkSpaces Directory...\n%#v\n", *input) _, err := conn.RegisterWorkspaceDirectory(input) if err != nil { return err } d.SetId(directoryId) - log.Printf("[DEBUG] Waiting for workspaces directory %q to become registered...", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{ - workspaces.WorkspaceDirectoryStateRegistering, - }, - Target: []string{workspaces.WorkspaceDirectoryStateRegistered}, - Refresh: workspacesDirectoryRefreshStateFunc(conn, directoryId), - PollInterval: 30 * time.Second, - Timeout: 10 * time.Minute, - } - - _, err = stateConf.WaitForState() + log.Printf("[DEBUG] Waiting for WorkSpaces Directory %q to become registered...", directoryId) + _, err = waiter.DirectoryRegistered(conn, directoryId) if err != nil { return fmt.Errorf("error registering directory: %s", err) } - log.Printf("[DEBUG] Workspaces directory %q is registered", d.Id()) + log.Printf("[DEBUG] WorkSpaces Directory %q is registered", directoryId) - log.Printf("[DEBUG] Modifying workspaces directory %q self-service permissions...", d.Id()) + log.Printf("[DEBUG] Modifying WorkSpaces Directory %q self-service permissions...", directoryId) if v, ok := d.GetOk("self_service_permissions"); ok { _, err := conn.ModifySelfservicePermissions(&workspaces.ModifySelfservicePermissionsInput{ ResourceId: aws.String(directoryId), @@ -128,37 +154,54 @@ func resourceAwsWorkspacesDirectoryCreate(d *schema.ResourceData, meta interface return fmt.Errorf("error setting self service permissions: %s", err) } } - log.Printf("[DEBUG] Workspaces directory %q self-service permissions are set", d.Id()) + log.Printf("[DEBUG] WorkSpaces Directory %q self-service permissions are set", directoryId) return resourceAwsWorkspacesDirectoryRead(d, meta) } func resourceAwsWorkspacesDirectoryRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).workspacesconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig - raw, state, err := workspacesDirectoryRefreshStateFunc(conn, d.Id())() + rawOutput, state, err := waiter.DirectoryState(conn, d.Id())() if err != nil { - return fmt.Errorf("error getting workspaces directory (%s): %s", d.Id(), err) + return fmt.Errorf("error getting WorkSpaces Directory (%s): %s", d.Id(), err) } if state == workspaces.WorkspaceDirectoryStateDeregistered { - log.Printf("[WARN] workspaces directory (%s) not found, removing from state", d.Id()) + log.Printf("[WARN] WorkSpaces Directory (%s) not found, removing from state", d.Id()) d.SetId("") return nil } - dir := raw.(*workspaces.WorkspaceDirectory) - d.Set("directory_id", dir.DirectoryId) - d.Set("subnet_ids", dir.SubnetIds) - if err := d.Set("self_service_permissions", flattenSelfServicePermissions(dir.SelfservicePermissions)); err != nil { + directory := rawOutput.(*workspaces.WorkspaceDirectory) + d.Set("directory_id", directory.DirectoryId) + if err := d.Set("subnet_ids", flattenStringSet(directory.SubnetIds)); err != nil { + return fmt.Errorf("error setting subnet_ids: %s", err) + } + d.Set("workspace_security_group_id", directory.WorkspaceSecurityGroupId) + d.Set("iam_role_id", directory.IamRoleId) + d.Set("registration_code", directory.RegistrationCode) + d.Set("directory_name", directory.DirectoryName) + d.Set("directory_type", directory.DirectoryType) + d.Set("alias", directory.Alias) + if err := d.Set("self_service_permissions", flattenSelfServicePermissions(directory.SelfservicePermissions)); err != nil { return fmt.Errorf("error setting self_service_permissions: %s", err) } + if err := d.Set("ip_group_ids", flattenStringSet(directory.IpGroupIds)); err != nil { + return fmt.Errorf("error setting ip_group_ids: %s", err) + } + + if err := d.Set("dns_ip_addresses", flattenStringSet(directory.DnsIpAddresses)); err != nil { + return fmt.Errorf("error setting dns_ip_addresses: %s", err) + } + tags, err := keyvaluetags.WorkspacesListTags(conn, d.Id()) if err != nil { return fmt.Errorf("error listing tags: %s", err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } @@ -169,7 +212,7 @@ func resourceAwsWorkspacesDirectoryUpdate(d *schema.ResourceData, meta interface conn := meta.(*AWSClient).workspacesconn if d.HasChange("self_service_permissions") { - log.Printf("[DEBUG] Modifying workspaces directory %q self-service permissions...", d.Id()) + log.Printf("[DEBUG] Modifying WorkSpaces Directory %q self-service permissions...", d.Id()) permissions := d.Get("self_service_permissions").([]interface{}) _, err := conn.ModifySelfservicePermissions(&workspaces.ModifySelfservicePermissionsInput{ @@ -179,7 +222,7 @@ func resourceAwsWorkspacesDirectoryUpdate(d *schema.ResourceData, meta interface if err != nil { return fmt.Errorf("error updating self service permissions: %s", err) } - log.Printf("[DEBUG] Workspaces directory %q self-service permissions are set", d.Id()) + log.Printf("[DEBUG] WorkSpaces Directory %q self-service permissions are set", d.Id()) } if d.HasChange("tags") { @@ -197,59 +240,29 @@ func resourceAwsWorkspacesDirectoryDelete(d *schema.ResourceData, meta interface err := workspacesDirectoryDelete(d.Id(), conn) if err != nil { - return fmt.Errorf("error deleting workspaces directory (%s): %s", d.Id(), err) + return fmt.Errorf("error deleting WorkSpaces Directory (%s): %s", d.Id(), err) } - log.Printf("[DEBUG] Workspaces directory %q is deregistered", d.Id()) return nil } func workspacesDirectoryDelete(id string, conn *workspaces.WorkSpaces) error { - input := &workspaces.DeregisterWorkspaceDirectoryInput{ + log.Printf("[DEBUG] Deregistering WorkSpaces Directory %q", id) + _, err := conn.DeregisterWorkspaceDirectory(&workspaces.DeregisterWorkspaceDirectoryInput{ DirectoryId: aws.String(id), - } - - log.Printf("[DEBUG] Deregistering Workspace Directory %q", id) - _, err := conn.DeregisterWorkspaceDirectory(input) + }) if err != nil { - return fmt.Errorf("error deregistering Workspace Directory %q: %w", id, err) + return fmt.Errorf("error deregistering WorkSpaces Directory %q: %w", id, err) } - log.Printf("[DEBUG] Waiting for Workspace Directory %q to be deregistered", id) - stateConf := &resource.StateChangeConf{ - Pending: []string{ - workspaces.WorkspaceDirectoryStateRegistering, - workspaces.WorkspaceDirectoryStateRegistered, - workspaces.WorkspaceDirectoryStateDeregistering, - }, - Target: []string{ - workspaces.WorkspaceDirectoryStateDeregistered, - }, - Refresh: workspacesDirectoryRefreshStateFunc(conn, id), - PollInterval: 30 * time.Second, - Timeout: 10 * time.Minute, - } - _, err = stateConf.WaitForState() + log.Printf("[DEBUG] Waiting for WorkSpaces Directory %q to be deregistered", id) + _, err = waiter.DirectoryDeregistered(conn, id) if err != nil { - return fmt.Errorf("error waiting for Workspace Directory %q to be deregistered: %w", id, err) + return fmt.Errorf("error waiting for WorkSpaces Directory %q to be deregistered: %w", id, err) } - return nil -} + log.Printf("[DEBUG] WorkSpaces Directory %q is deregistered", id) -func workspacesDirectoryRefreshStateFunc(conn *workspaces.WorkSpaces, directoryID string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeWorkspaceDirectories(&workspaces.DescribeWorkspaceDirectoriesInput{ - DirectoryIds: []*string{aws.String(directoryID)}, - }) - if err != nil { - return nil, workspaces.WorkspaceDirectoryStateError, err - } - if len(resp.Directories) == 0 { - return resp, workspaces.WorkspaceDirectoryStateDeregistered, nil - } - directory := resp.Directories[0] - return directory, aws.StringValue(directory.State), nil - } + return nil } func expandSelfServicePermissions(permissions []interface{}) *workspaces.SelfservicePermissions { diff --git a/aws/resource_aws_workspaces_directory_test.go b/aws/resource_aws_workspaces_directory_test.go index 162b43141d8..03d741a9f56 100644 --- a/aws/resource_aws_workspaces_directory_test.go +++ b/aws/resource_aws_workspaces_directory_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/workspaces" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" @@ -16,8 +17,9 @@ import ( func init() { resource.AddTestSweepers("aws_workspaces_directory", &resource.Sweeper{ - Name: "aws_workspaces_directory", - F: testSweepWorkspacesDirectories, + Name: "aws_workspaces_directory", + F: testSweepWorkspacesDirectories, + Dependencies: []string{"aws_workspaces_workspace"}, }) } @@ -51,33 +53,21 @@ func testSweepWorkspacesDirectories(region string) error { return errors } -// These tests need to be serialized, because they all rely on the IAM Role `workspaces_DefaultRole`. -func TestAccAwsWorkspacesDirectory(t *testing.T) { - testCases := map[string]func(t *testing.T){ - "basic": testAccAwsWorkspacesDirectory_basic, - "disappears": testAccAwsWorkspacesDirectory_disappears, - "subnetIds": testAccAwsWorkspacesDirectory_subnetIds, - } - for name, tc := range testCases { - tc := tc - t.Run(name, func(t *testing.T) { - tc(t) - }) - } -} - -func testAccAwsWorkspacesDirectory_basic(t *testing.T) { +func TestAccAwsWorkspacesDirectory_basic(t *testing.T) { var v workspaces.WorkspaceDirectory - booster := acctest.RandString(8) + rName := acctest.RandString(8) + resourceName := "aws_workspaces_directory.main" + directoryResourceName := "aws_directory_service_directory.main" + iamRoleDataSourceName := "data.aws_iam_role.workspaces-default" - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsWorkspacesDirectoryDestroy, Steps: []resource.TestStep{ { - Config: testAccWorkspacesDirectoryConfigA(booster), + Config: testAccWorkspacesDirectoryConfigA(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "subnet_ids.#", "2"), @@ -87,14 +77,19 @@ func testAccAwsWorkspacesDirectory_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.rebuild_workspace", "false"), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.restart_workspace", "true"), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.switch_running_mode", "false"), - resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - resource.TestCheckResourceAttr(resourceName, "tags.Terraform", "true"), - resource.TestCheckResourceAttr(resourceName, "tags.Directory", "tf-acctest.example.com"), + resource.TestCheckResourceAttr(resourceName, "dns_ip_addresses.#", "2"), + resource.TestCheckResourceAttr(resourceName, "directory_type", "SIMPLE_AD"), + resource.TestCheckResourceAttrPair(resourceName, "directory_name", directoryResourceName, "name"), + resource.TestCheckResourceAttrPair(resourceName, "alias", directoryResourceName, "alias"), + resource.TestCheckResourceAttrPair(resourceName, "directory_id", directoryResourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "iam_role_id", iamRoleDataSourceName, "arn"), + resource.TestCheckResourceAttrSet(resourceName, "workspace_security_group_id"), + resource.TestCheckResourceAttrSet(resourceName, "registration_code"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { - Config: testAccWorkspacesDirectoryConfigB(booster), + Config: testAccWorkspacesDirectoryConfigB(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.#", "1"), @@ -103,13 +98,10 @@ func testAccAwsWorkspacesDirectory_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.rebuild_workspace", "true"), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.restart_workspace", "false"), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.switch_running_mode", "true"), - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.Directory", "tf-acctest.example.com"), - resource.TestCheckResourceAttr(resourceName, "tags.Purpose", "test"), ), }, { - Config: testAccWorkspacesDirectoryConfigC(booster), + Config: testAccWorkspacesDirectoryConfigC(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.#", "1"), @@ -118,7 +110,6 @@ func testAccAwsWorkspacesDirectory_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.rebuild_workspace", "false"), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.restart_workspace", "true"), resource.TestCheckResourceAttr(resourceName, "self_service_permissions.0.switch_running_mode", "true"), - resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -130,18 +121,19 @@ func testAccAwsWorkspacesDirectory_basic(t *testing.T) { }) } -func testAccAwsWorkspacesDirectory_disappears(t *testing.T) { +func TestAccAwsWorkspacesDirectory_disappears(t *testing.T) { var v workspaces.WorkspaceDirectory - booster := acctest.RandString(8) + rName := acctest.RandString(8) + resourceName := "aws_workspaces_directory.main" - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsWorkspacesDirectoryDestroy, Steps: []resource.TestStep{ { - Config: testAccWorkspacesDirectoryConfigA(booster), + Config: testAccWorkspacesDirectoryConfigA(rName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), testAccCheckAwsWorkspacesDirectoryDisappears(&v), @@ -152,18 +144,19 @@ func testAccAwsWorkspacesDirectory_disappears(t *testing.T) { }) } -func testAccAwsWorkspacesDirectory_subnetIds(t *testing.T) { +func TestAccAwsWorkspacesDirectory_subnetIds(t *testing.T) { var v workspaces.WorkspaceDirectory - booster := acctest.RandString(8) + rName := acctest.RandString(8) + resourceName := "aws_workspaces_directory.main" - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsWorkspacesDirectoryDestroy, Steps: []resource.TestStep{ { - Config: testAccWorkspacesDirectoryConfig_subnetIds(booster), + Config: testAccWorkspacesDirectoryConfig_subnetIds(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), resource.TestCheckResourceAttr(resourceName, "subnet_ids.#", "2"), @@ -178,6 +171,70 @@ func testAccAwsWorkspacesDirectory_subnetIds(t *testing.T) { }) } +func TestAccAwsWorkspacesDirectory_tags(t *testing.T) { + var v workspaces.WorkspaceDirectory + rName := acctest.RandString(8) + + resourceName := "aws_workspaces_directory.main" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesDirectoryDestroy, + Steps: []resource.TestStep{ + { + Config: testAccWorkspacesDirectoryConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccWorkspacesDirectoryConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccWorkspacesDirectoryConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesDirectoryExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func testAccPreCheckHasIAMRole(t *testing.T, roleName string) { + conn := testAccProvider.Meta().(*AWSClient).iamconn + + input := &iam.GetRoleInput{ + RoleName: aws.String(roleName), + } + _, err := conn.GetRole(input) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + t.Skipf("skipping acceptance test: required IAM role \"%s\" is not present", roleName) + } + if testAccPreCheckSkipError(err) { + t.Skipf("skipping acceptance test: %s", err) + } + if err != nil { + t.Fatalf("unexpected PreCheck error: %s", err) + } +} + func testAccCheckAwsWorkspacesDirectoryDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).workspacesconn @@ -319,12 +376,17 @@ func TestFlattenSelfServicePermissions(t *testing.T) { } // Extract common infra -func testAccAwsWorkspacesDirectoryConfig_Prerequisites(booster string) string { +func testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName string) string { return fmt.Sprintf(` data "aws_region" "current" {} data "aws_availability_zones" "available" { state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } } locals { @@ -335,126 +397,122 @@ locals { workspaces_az_ids = lookup(local.region_workspaces_az_ids, data.aws_region.current.name, data.aws_availability_zones.available.zone_ids) } - resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" - tags = { - Name = "tf-testacc-workspaces-directory-%s" - } - } + tags = { + Name = "tf-testacc-workspaces-directory-%[1]s" + } +} - resource "aws_subnet" "primary" { - vpc_id = "${aws_vpc.main.id}" - availability_zone_id = "${local.workspaces_az_ids[0]}" - cidr_block = "10.0.1.0/24" +resource "aws_subnet" "primary" { + vpc_id = "${aws_vpc.main.id}" + availability_zone_id = "${local.workspaces_az_ids[0]}" + cidr_block = "10.0.1.0/24" - tags = { - Name = "tf-testacc-workspaces-directory-%s-primary" - } - } + tags = { + Name = "tf-testacc-workspaces-directory-%[1]s-primary" + } +} - resource "aws_subnet" "secondary" { - vpc_id = "${aws_vpc.main.id}" - availability_zone_id = "${local.workspaces_az_ids[1]}" - cidr_block = "10.0.2.0/24" +resource "aws_subnet" "secondary" { + vpc_id = "${aws_vpc.main.id}" + availability_zone_id = "${local.workspaces_az_ids[1]}" + cidr_block = "10.0.2.0/24" - tags = { - Name = "tf-testacc-workspaces-directory-%s-secondary" - } - } + tags = { + Name = "tf-testacc-workspaces-directory-%[1]s-secondary" + } +} resource "aws_directory_service_directory" "main" { - size = "Small" - name = "tf-acctest.neverland.com" + size = "Small" + name = "tf-acctest.neverland.com" password = "#S1ncerely" vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.primary.id}","${aws_subnet.secondary.id}"] + vpc_id = "${aws_vpc.main.id}" + subnet_ids = ["${aws_subnet.primary.id}", "${aws_subnet.secondary.id}"] } -} - -data "aws_iam_policy_document" "workspaces" { - statement { - actions = ["sts:AssumeRole"] - principals { - type = "Service" - identifiers = ["workspaces.amazonaws.com"] - } + tags = { + Name = "tf-testacc-workspaces-directory-%[1]s" } } - -resource "aws_iam_role" "workspaces-default" { - name = "workspaces_DefaultRole" - assume_role_policy = data.aws_iam_policy_document.workspaces.json +`, rName) } -resource "aws_iam_role_policy_attachment" "workspaces-default-service-access" { - role = aws_iam_role.workspaces-default.name - policy_arn = "arn:aws:iam::aws:policy/AmazonWorkSpacesServiceAccess" +func testAccWorkspacesDirectoryConfigA(rName string) string { + return testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_directory" "main" { + directory_id = "${aws_directory_service_directory.main.id}" } -resource "aws_iam_role_policy_attachment" "workspaces-default-self-service-access" { - role = aws_iam_role.workspaces-default.name - policy_arn = "arn:aws:iam::aws:policy/AmazonWorkSpacesSelfServiceAccess" +data "aws_iam_role" "workspaces-default" { + name = "workspaces_DefaultRole" } -`, booster, booster, booster) +`) } -func testAccWorkspacesDirectoryConfigA(booster string) string { - return testAccAwsWorkspacesDirectoryConfig_Prerequisites(booster) + fmt.Sprintf(` +func testAccWorkspacesDirectoryConfigB(rName string) string { + return testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName) + fmt.Sprintf(` resource "aws_workspaces_directory" "main" { directory_id = "${aws_directory_service_directory.main.id}" - tags = { - Name = "test" - Terraform = true - Directory = "tf-acctest.example.com" + self_service_permissions { + change_compute_type = false + increase_volume_size = true + rebuild_workspace = true + restart_workspace = false + switch_running_mode = true } } `) } -func testAccWorkspacesDirectoryConfigB(booster string) string { - return testAccAwsWorkspacesDirectoryConfig_Prerequisites(booster) + fmt.Sprintf(` +func testAccWorkspacesDirectoryConfigC(rName string) string { + return testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName) + fmt.Sprintf(` resource "aws_workspaces_directory" "main" { directory_id = "${aws_directory_service_directory.main.id}" self_service_permissions { - change_compute_type = false - increase_volume_size = true - rebuild_workspace = true - restart_workspace = false + change_compute_type = true switch_running_mode = true } +} +`) +} - tags = { - Purpose = "test" - Directory = "tf-acctest.example.com" - } +func testAccWorkspacesDirectoryConfig_subnetIds(rName string) string { + return testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_directory" "main" { + directory_id = "${aws_directory_service_directory.main.id}" + subnet_ids = ["${aws_subnet.primary.id}","${aws_subnet.secondary.id}"] } `) } -func testAccWorkspacesDirectoryConfigC(booster string) string { - return testAccAwsWorkspacesDirectoryConfig_Prerequisites(booster) + fmt.Sprintf(` +func testAccWorkspacesDirectoryConfigTags1(rName, tagKey1, tagValue1 string) string { + return testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName) + fmt.Sprintf(` resource "aws_workspaces_directory" "main" { directory_id = "${aws_directory_service_directory.main.id}" - self_service_permissions { - change_compute_type = true - switch_running_mode = true + tags = { + %[1]q = %[2]q } } -`) +`, tagKey1, tagValue1) } -func testAccWorkspacesDirectoryConfig_subnetIds(booster string) string { - return testAccAwsWorkspacesDirectoryConfig_Prerequisites(booster) + fmt.Sprintf(` +func testAccWorkspacesDirectoryConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName) + fmt.Sprintf(` resource "aws_workspaces_directory" "main" { directory_id = "${aws_directory_service_directory.main.id}" - subnet_ids = ["${aws_subnet.primary.id}","${aws_subnet.secondary.id}"] + + tags = { + %[1]q = %[2]q + %[3]q = %[4]q + } } -`) +`, tagKey1, tagValue1, tagKey2, tagValue2) } diff --git a/aws/resource_aws_workspaces_ip_group.go b/aws/resource_aws_workspaces_ip_group.go index 04596117a72..ec92c8f11e7 100644 --- a/aws/resource_aws_workspaces_ip_group.go +++ b/aws/resource_aws_workspaces_ip_group.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/workspaces" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" ) @@ -37,8 +38,9 @@ func resourceAwsWorkspacesIpGroup() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "source": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.IsCIDR, }, "description": { Type: schema.TypeString, @@ -76,6 +78,7 @@ func resourceAwsWorkspacesIpGroupCreate(d *schema.ResourceData, meta interface{} func resourceAwsWorkspacesIpGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).workspacesconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig resp, err := conn.DescribeIpGroups(&workspaces.DescribeIpGroupsInput{ GroupIds: []*string{aws.String(d.Id())}, @@ -90,16 +93,26 @@ func resourceAwsWorkspacesIpGroupRead(d *schema.ResourceData, meta interface{}) return err } - d.Set("name", resp.Result[0].GroupName) - d.Set("description", resp.Result[0].GroupDesc) - d.Set("rules", flattenIpGroupRules(resp.Result[0].UserRules)) + ipGroups := resp.Result + + if len(ipGroups) == 0 { + log.Printf("[WARN] Workspaces Ip Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + ipGroup := ipGroups[0] + + d.Set("name", ipGroup.GroupName) + d.Set("description", ipGroup.GroupDesc) + d.Set("rules", flattenIpGroupRules(ipGroup.UserRules)) tags, err := keyvaluetags.WorkspacesListTags(conn, d.Id()) if err != nil { return fmt.Errorf("error listing tags for Workspaces IP Group (%q): %s", d.Id(), err) } - if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil { + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { return fmt.Errorf("error setting tags: %s", err) } diff --git a/aws/resource_aws_workspaces_ip_group_test.go b/aws/resource_aws_workspaces_ip_group_test.go index 8dd52a09a45..0bc23485499 100644 --- a/aws/resource_aws_workspaces_ip_group_test.go +++ b/aws/resource_aws_workspaces_ip_group_test.go @@ -14,8 +14,8 @@ import ( func TestAccAwsWorkspacesIpGroup_basic(t *testing.T) { var v workspaces.IpGroup - ipGroupName := fmt.Sprintf("terraform-acctest-%s", acctest.RandString(10)) - ipGroupNewName := fmt.Sprintf("terraform-acctest-new-%s", acctest.RandString(10)) + ipGroupName := acctest.RandomWithPrefix("tf-acc-test") + ipGroupNewName := acctest.RandomWithPrefix("tf-acc-test-upd") ipGroupDescription := fmt.Sprintf("Terraform Acceptance Test %s", strings.Title(acctest.RandString(20))) resourceName := "aws_workspaces_ip_group.test" @@ -31,10 +31,7 @@ func TestAccAwsWorkspacesIpGroup_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", ipGroupName), resource.TestCheckResourceAttr(resourceName, "description", ipGroupDescription), resource.TestCheckResourceAttr(resourceName, "rules.#", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.%", "3"), - resource.TestCheckResourceAttr(resourceName, "tags.Name", "test"), - resource.TestCheckResourceAttr(resourceName, "tags.Terraform", "true"), - resource.TestCheckResourceAttr(resourceName, "tags.IPGroup", "Home"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), }, { @@ -49,9 +46,6 @@ func TestAccAwsWorkspacesIpGroup_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "name", ipGroupNewName), resource.TestCheckResourceAttr(resourceName, "description", ipGroupDescription), resource.TestCheckResourceAttr(resourceName, "rules.#", "1"), - resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), - resource.TestCheckResourceAttr(resourceName, "tags.IPGroup", "Home"), - resource.TestCheckResourceAttr(resourceName, "tags.Purpose", "test"), ), }, { @@ -63,6 +57,73 @@ func TestAccAwsWorkspacesIpGroup_basic(t *testing.T) { }) } +func TestAccAwsWorkspacesIpGroup_tags(t *testing.T) { + var v workspaces.IpGroup + resourceName := "aws_workspaces_ip_group.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesIpGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWorkspacesIpGroupConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesIpGroupExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAwsWorkspacesIpGroupConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesIpGroupExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAwsWorkspacesIpGroupConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesIpGroupExists(resourceName, &v), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) +} + +func TestAccAwsWorkspacesIpGroup_disappears(t *testing.T) { + var v workspaces.IpGroup + ipGroupName := acctest.RandomWithPrefix("tf-acc-test") + ipGroupDescription := fmt.Sprintf("Terraform Acceptance Test %s", strings.Title(acctest.RandString(20))) + resourceName := "aws_workspaces_ip_group.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesIpGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsWorkspacesIpGroupConfigA(ipGroupName, ipGroupDescription), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesIpGroupExists(resourceName, &v), + testAccCheckResourceDisappears(testAccProvider, resourceAwsWorkspacesIpGroup(), resourceName), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func testAccCheckAwsWorkspacesIpGroupDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_workspaces_ip_group" { @@ -122,8 +183,8 @@ func testAccCheckAwsWorkspacesIpGroupExists(n string, v *workspaces.IpGroup) res func testAccAwsWorkspacesIpGroupConfigA(name, description string) string { return fmt.Sprintf(` resource "aws_workspaces_ip_group" "test" { - name = "%s" - description = "%s" + name = %[1]q + description = %[2]q rules { source = "10.0.0.0/16" @@ -133,21 +194,32 @@ resource "aws_workspaces_ip_group" "test" { source = "10.0.0.1/16" description = "Home" } +} +`, name, description) +} - tags = { - Name = "test" - Terraform = true - IPGroup = "Home" +func testAccAwsWorkspacesIpGroupConfigB(name, description string) string { + return fmt.Sprintf(` +resource "aws_workspaces_ip_group" "test" { + name = %[1]q + description = %[2]q + + rules { + source = "10.0.0.1/16" + description = "Home" } } `, name, description) } -func testAccAwsWorkspacesIpGroupConfigB(name, description string) string { +func testAccAwsWorkspacesIpGroupConfigTags1(name, tagKey1, tagValue1 string) string { return fmt.Sprintf(` resource "aws_workspaces_ip_group" "test" { - name = "%s" - description = "%s" + name = %[1]q + + rules { + source = "10.0.0.0/16" + } rules { source = "10.0.0.1/16" @@ -155,9 +227,30 @@ resource "aws_workspaces_ip_group" "test" { } tags = { - Purpose = "test" - IPGroup = "Home" + %[2]q = %[3]q } } -`, name, description) +`, name, tagKey1, tagValue1) +} + +func testAccAwsWorkspacesIpGroupConfigTags2(name, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return fmt.Sprintf(` +resource "aws_workspaces_ip_group" "test" { + name = %[1]q + + rules { + source = "10.0.0.0/16" + } + + rules { + source = "10.0.0.1/16" + description = "Home" + } + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } +} +`, name, tagKey1, tagValue1, tagKey2, tagValue2) } diff --git a/aws/resource_aws_workspaces_workspace.go b/aws/resource_aws_workspaces_workspace.go new file mode 100644 index 00000000000..8ff5e7903a4 --- /dev/null +++ b/aws/resource_aws_workspaces_workspace.go @@ -0,0 +1,394 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/workspaces" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + + "github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags" + "github.com/terraform-providers/terraform-provider-aws/aws/internal/service/workspaces/waiter" +) + +func resourceAwsWorkspacesWorkspace() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWorkspacesWorkspaceCreate, + Read: resourceAwsWorkspacesWorkspaceRead, + Update: resourceAwsWorkspacesWorkspaceUpdate, + Delete: resourceAwsWorkspacesWorkspaceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "bundle_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "directory_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "computer_name": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + "root_volume_encryption_enabled": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + "user_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "user_volume_encryption_enabled": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + "volume_encryption_key": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "workspace_properties": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "compute_type_name": { + Type: schema.TypeString, + Optional: true, + Default: workspaces.ComputeValue, + ValidateFunc: validation.StringInSlice([]string{ + workspaces.ComputeValue, + workspaces.ComputeStandard, + workspaces.ComputePerformance, + workspaces.ComputePower, + workspaces.ComputePowerpro, + workspaces.ComputeGraphics, + workspaces.ComputeGraphicspro, + }, false), + }, + "root_volume_size_gib": { + Type: schema.TypeInt, + Optional: true, + Default: 80, + ValidateFunc: validation.Any( + validation.IntInSlice([]int{80}), + validation.IntBetween(175, 2000), + ), + }, + "running_mode": { + Type: schema.TypeString, + Optional: true, + Default: workspaces.RunningModeAlwaysOn, + ValidateFunc: validation.StringInSlice([]string{ + workspaces.RunningModeAlwaysOn, + workspaces.RunningModeAutoStop, + }, false), + }, + "running_mode_auto_stop_timeout_in_minutes": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + val := v.(int) + if val%60 != 0 { + errors = append(errors, fmt.Errorf( + "%q should be configured in 60-minute intervals, got: %d", k, val)) + } + return + }, + }, + "user_volume_size_gib": { + Type: schema.TypeInt, + Optional: true, + Default: 10, + ValidateFunc: validation.Any( + validation.IntInSlice([]int{10, 50}), + validation.IntBetween(100, 2000), + ), + }, + }, + }, + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAwsWorkspacesWorkspaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).workspacesconn + + tags := keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().WorkspacesTags() + + input := &workspaces.WorkspaceRequest{ + BundleId: aws.String(d.Get("bundle_id").(string)), + DirectoryId: aws.String(d.Get("directory_id").(string)), + UserName: aws.String(d.Get("user_name").(string)), + RootVolumeEncryptionEnabled: aws.Bool(d.Get("root_volume_encryption_enabled").(bool)), + UserVolumeEncryptionEnabled: aws.Bool(d.Get("user_volume_encryption_enabled").(bool)), + Tags: tags, + } + + if v, ok := d.GetOk("volume_encryption_key"); ok { + input.VolumeEncryptionKey = aws.String(v.(string)) + } + + input.WorkspaceProperties = expandWorkspaceProperties(d.Get("workspace_properties").([]interface{})) + + log.Printf("[DEBUG] Creating workspace...\n%#v\n", *input) + resp, err := conn.CreateWorkspaces(&workspaces.CreateWorkspacesInput{ + Workspaces: []*workspaces.WorkspaceRequest{input}, + }) + if err != nil { + return err + } + + wsFail := resp.FailedRequests + if len(wsFail) > 0 { + return fmt.Errorf("workspace creation failed: %s", *wsFail[0].ErrorMessage) + } + + workspaceID := aws.StringValue(resp.PendingRequests[0].WorkspaceId) + + log.Printf("[DEBUG] Waiting for workspace %q to be available...", workspaceID) + _, err = waiter.WorkspaceAvailable(conn, workspaceID) + if err != nil { + return fmt.Errorf("workspace %q is not available: %s", workspaceID, err) + } + + d.SetId(workspaceID) + log.Printf("[DEBUG] Workspace %q is available", workspaceID) + + return resourceAwsWorkspacesWorkspaceRead(d, meta) +} + +func resourceAwsWorkspacesWorkspaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).workspacesconn + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + rawOutput, state, err := waiter.WorkspaceState(conn, d.Id())() + if err != nil { + return fmt.Errorf("error reading workspace (%s): %s", d.Id(), err) + } + if state == workspaces.WorkspaceStateTerminated { + log.Printf("[WARN] workspace (%s) is not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + workspace := rawOutput.(*workspaces.Workspace) + d.Set("bundle_id", workspace.BundleId) + d.Set("directory_id", workspace.DirectoryId) + d.Set("ip_address", workspace.IpAddress) + d.Set("computer_name", workspace.ComputerName) + d.Set("state", workspace.State) + d.Set("root_volume_encryption_enabled", workspace.RootVolumeEncryptionEnabled) + d.Set("user_name", workspace.UserName) + d.Set("user_volume_encryption_enabled", workspace.UserVolumeEncryptionEnabled) + d.Set("volume_encryption_key", workspace.VolumeEncryptionKey) + if err := d.Set("workspace_properties", flattenWorkspaceProperties(workspace.WorkspaceProperties)); err != nil { + return fmt.Errorf("error setting workspace properties: %s", err) + } + + tags, err := keyvaluetags.WorkspacesListTags(conn, d.Id()) + if err != nil { + return fmt.Errorf("error listing tags: %s", err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsWorkspacesWorkspaceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).workspacesconn + + // IMPORTANT: Only one workspace property could be changed in a time. + // I've create AWS Support feature request to allow multiple properties modification in a time. + // https://docs.aws.amazon.com/workspaces/latest/adminguide/modify-workspaces.html + + if d.HasChange("workspace_properties.0.compute_type_name") { + if err := workspacePropertyUpdate("compute_type_name", conn, d); err != nil { + return err + } + } + + if d.HasChange("workspace_properties.0.root_volume_size_gib") { + if err := workspacePropertyUpdate("root_volume_size_gib", conn, d); err != nil { + return err + } + } + + if d.HasChange("workspace_properties.0.running_mode") { + if err := workspacePropertyUpdate("running_mode", conn, d); err != nil { + return err + } + } + + if d.HasChange("workspace_properties.0.running_mode_auto_stop_timeout_in_minutes") { + if err := workspacePropertyUpdate("running_mode_auto_stop_timeout_in_minutes", conn, d); err != nil { + return err + } + } + + if d.HasChange("workspace_properties.0.user_volume_size_gib") { + if err := workspacePropertyUpdate("user_volume_size_gib", conn, d); err != nil { + return err + } + } + + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.WorkspacesUpdateTags(conn, d.Id(), o, n); err != nil { + return fmt.Errorf("error updating tags: %s", err) + } + } + + return resourceAwsWorkspacesWorkspaceRead(d, meta) +} + +func resourceAwsWorkspacesWorkspaceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).workspacesconn + + err := workspaceDelete(d.Id(), conn) + if err != nil { + return err + } + + return nil +} + +func workspaceDelete(id string, conn *workspaces.WorkSpaces) error { + log.Printf("[DEBUG] Terminating workspace %q", id) + _, err := conn.TerminateWorkspaces(&workspaces.TerminateWorkspacesInput{ + TerminateWorkspaceRequests: []*workspaces.TerminateRequest{ + { + WorkspaceId: aws.String(id), + }, + }, + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Waiting for workspace %q to be terminated", id) + _, err = waiter.WorkspaceTerminated(conn, id) + if err != nil { + return fmt.Errorf("workspace %q was not terminated: %s", id, err) + } + log.Printf("[DEBUG] Workspace %q is terminated", id) + + return nil +} + +func workspacePropertyUpdate(p string, conn *workspaces.WorkSpaces, d *schema.ResourceData) error { + id := d.Id() + + log.Printf("[DEBUG] Modifying workspace %q %s property...", id, p) + + var wsp *workspaces.WorkspaceProperties + + switch p { + case "compute_type_name": + wsp = &workspaces.WorkspaceProperties{ + ComputeTypeName: aws.String(d.Get("workspace_properties.0.compute_type_name").(string)), + } + case "root_volume_size_gib": + wsp = &workspaces.WorkspaceProperties{ + RootVolumeSizeGib: aws.Int64(int64(d.Get("workspace_properties.0.root_volume_size_gib").(int))), + } + case "running_mode": + wsp = &workspaces.WorkspaceProperties{ + RunningMode: aws.String(d.Get("workspace_properties.0.running_mode").(string)), + } + case "running_mode_auto_stop_timeout_in_minutes": + if d.Get("workspace_properties.0.running_mode") != workspaces.RunningModeAutoStop { + log.Printf("[DEBUG] Property running_mode_auto_stop_timeout_in_minutes makes sense only for AUTO_STOP running mode") + return nil + } + + wsp = &workspaces.WorkspaceProperties{ + RunningModeAutoStopTimeoutInMinutes: aws.Int64(int64(d.Get("workspace_properties.0.running_mode_auto_stop_timeout_in_minutes").(int))), + } + case "user_volume_size_gib": + wsp = &workspaces.WorkspaceProperties{ + UserVolumeSizeGib: aws.Int64(int64(d.Get("workspace_properties.0.user_volume_size_gib").(int))), + } + } + + _, err := conn.ModifyWorkspaceProperties(&workspaces.ModifyWorkspacePropertiesInput{ + WorkspaceId: aws.String(id), + WorkspaceProperties: wsp, + }) + if err != nil { + return fmt.Errorf("workspace %q %s property was not modified: %w", d.Id(), p, err) + } + + log.Printf("[DEBUG] Waiting for workspace %q %s property to be modified...", d.Id(), p) + _, err = waiter.WorkspaceUpdated(conn, d.Id()) + if err != nil { + return fmt.Errorf("error modifying workspace %q property %q was not modified: %w", d.Id(), p, err) + } + log.Printf("[DEBUG] Workspace %q %s property is modified", d.Id(), p) + + return nil +} + +func expandWorkspaceProperties(properties []interface{}) *workspaces.WorkspaceProperties { + log.Printf("[DEBUG] Expand Workspace properties: %+v ", properties) + + if len(properties) == 0 || properties[0] == nil { + return nil + } + + p := properties[0].(map[string]interface{}) + + return &workspaces.WorkspaceProperties{ + ComputeTypeName: aws.String(p["compute_type_name"].(string)), + RootVolumeSizeGib: aws.Int64(int64(p["root_volume_size_gib"].(int))), + RunningMode: aws.String(p["running_mode"].(string)), + RunningModeAutoStopTimeoutInMinutes: aws.Int64(int64(p["running_mode_auto_stop_timeout_in_minutes"].(int))), + UserVolumeSizeGib: aws.Int64(int64(p["user_volume_size_gib"].(int))), + } +} + +func flattenWorkspaceProperties(properties *workspaces.WorkspaceProperties) []map[string]interface{} { + log.Printf("[DEBUG] Flatten workspace properties: %+v ", properties) + + if properties == nil { + return []map[string]interface{}{} + } + + return []map[string]interface{}{ + { + "compute_type_name": aws.StringValue(properties.ComputeTypeName), + "root_volume_size_gib": int(aws.Int64Value(properties.RootVolumeSizeGib)), + "running_mode": aws.StringValue(properties.RunningMode), + "running_mode_auto_stop_timeout_in_minutes": int(aws.Int64Value(properties.RunningModeAutoStopTimeoutInMinutes)), + "user_volume_size_gib": int(aws.Int64Value(properties.UserVolumeSizeGib)), + }, + } +} diff --git a/aws/resource_aws_workspaces_workspace_test.go b/aws/resource_aws_workspaces_workspace_test.go new file mode 100644 index 00000000000..ca41d084cb3 --- /dev/null +++ b/aws/resource_aws_workspaces_workspace_test.go @@ -0,0 +1,547 @@ +package aws + +import ( + "fmt" + "log" + "reflect" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/workspaces" + multierror "github.com/hashicorp/go-multierror" + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" +) + +func init() { + resource.AddTestSweepers("aws_workspace", &resource.Sweeper{ + Name: "aws_workspace", + F: testSweepWorkspaces, + }) +} + +func testSweepWorkspaces(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %w", err) + } + conn := client.(*AWSClient).workspacesconn + + var errors error + input := &workspaces.DescribeWorkspacesInput{} + err = conn.DescribeWorkspacesPages(input, func(resp *workspaces.DescribeWorkspacesOutput, _ bool) bool { + for _, workspace := range resp.Workspaces { + err := workspaceDelete(aws.StringValue(workspace.WorkspaceId), conn) + if err != nil { + errors = multierror.Append(errors, err) + } + + } + return true + }) + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping workspaces sweep for %s: %s", region, err) + return errors // In case we have completed some pages, but had errors + } + if err != nil { + errors = multierror.Append(errors, fmt.Errorf("error listing workspaces: %s", err)) + } + + return errors +} + +func TestAccAwsWorkspacesWorkspace_basic(t *testing.T) { + var v workspaces.Workspace + rName := acctest.RandString(8) + + resourceName := "aws_workspaces_workspace.test" + directoryResourceName := "aws_workspaces_directory.test" + bundleDataSourceName := "data.aws_workspaces_bundle.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesWorkspaceDestroy, + Steps: []resource.TestStep{ + { + Destroy: false, + Config: testAccWorkspacesWorkspaceConfig(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v), + resource.TestCheckResourceAttrPair(resourceName, "directory_id", directoryResourceName, "id"), + resource.TestCheckResourceAttrPair(resourceName, "bundle_id", bundleDataSourceName, "id"), + resource.TestMatchResourceAttr(resourceName, "ip_address", regexp.MustCompile(`\d+\.\d+\.\d+\.\d+`)), + resource.TestCheckResourceAttr(resourceName, "state", workspaces.WorkspaceStateAvailable), + resource.TestCheckResourceAttr(resourceName, "root_volume_encryption_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "user_name", "Administrator"), + resource.TestCheckResourceAttr(resourceName, "volume_encryption_key", ""), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.compute_type_name", workspaces.ComputeValue), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.root_volume_size_gib", "80"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode", workspaces.RunningModeAlwaysOn), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode_auto_stop_timeout_in_minutes", "0"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.user_volume_size_gib", "10"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsWorkspacesWorkspace_tags(t *testing.T) { + var v1, v2, v3 workspaces.Workspace + rName := acctest.RandString(8) + + resourceName := "aws_workspaces_workspace.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesWorkspaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccWorkspacesWorkspaceConfig_TagsA(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.TerraformProviderAwsTest", "true"), + resource.TestCheckResourceAttr(resourceName, "tags.Alpha", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccWorkspacesWorkspaceConfig_TagsB(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v2), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.TerraformProviderAwsTest", "true"), + resource.TestCheckResourceAttr(resourceName, "tags.Beta", "2"), + ), + }, + { + Config: testAccWorkspacesWorkspaceConfig_TagsC(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v3), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.TerraformProviderAwsTest", "true"), + ), + }, + }, + }) +} + +func TestAccAwsWorkspacesWorkspace_workspaceProperties(t *testing.T) { + var v1, v2, v3 workspaces.Workspace + rName := acctest.RandString(8) + + resourceName := "aws_workspaces_workspace.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckHasIAMRole(t, "workspaces_DefaultRole") }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesWorkspaceDestroy, + Steps: []resource.TestStep{ + { + Destroy: false, + Config: testAccWorkspacesWorkspaceConfig_WorkspacePropertiesA(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v1), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.compute_type_name", workspaces.ComputeValue), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.root_volume_size_gib", "80"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode", workspaces.RunningModeAutoStop), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode_auto_stop_timeout_in_minutes", "120"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.user_volume_size_gib", "10"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccWorkspacesWorkspaceConfig_WorkspacePropertiesB(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v2), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.compute_type_name", workspaces.ComputeValue), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.root_volume_size_gib", "80"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode", workspaces.RunningModeAlwaysOn), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode_auto_stop_timeout_in_minutes", "0"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.user_volume_size_gib", "10"), + ), + }, + { + Config: testAccWorkspacesWorkspaceConfig_WorkspacePropertiesC(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsWorkspacesWorkspaceExists(resourceName, &v3), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.#", "1"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.compute_type_name", workspaces.ComputeValue), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.root_volume_size_gib", "80"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode", workspaces.RunningModeAlwaysOn), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode_auto_stop_timeout_in_minutes", "0"), + resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.user_volume_size_gib", "10"), + ), + }, + }, + }) +} + +func TestAccAwsWorkspacesWorkspace_validateRootVolumeSize(t *testing.T) { + rName := acctest.RandString(8) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesWorkspaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccWorkspacesWorkspaceConfig_validateRootVolumeSize(rName), + ExpectError: regexp.MustCompile(regexp.QuoteMeta("expected workspace_properties.0.root_volume_size_gib to be one of [80], got 90")), + }, + }, + }) +} + +func TestAccAwsWorkspacesWorkspace_validateUserVolumeSize(t *testing.T) { + rName := acctest.RandString(8) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsWorkspacesWorkspaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccWorkspacesWorkspaceConfig_validateUserVolumeSize(rName), + ExpectError: regexp.MustCompile(regexp.QuoteMeta("workspace_properties.0.user_volume_size_gib to be one of [10 50], got 60")), + }, + }, + }) +} + +func testAccCheckAwsWorkspacesWorkspaceDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).workspacesconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_workspace" { + continue + } + + resp, err := conn.DescribeWorkspaces(&workspaces.DescribeWorkspacesInput{ + WorkspaceIds: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + return err + } + + if len(resp.Workspaces) == 0 { + return fmt.Errorf("workspace %q was not terminated", rs.Primary.ID) + } + ws := resp.Workspaces[0] + + if *ws.State != workspaces.WorkspaceStateTerminating && *ws.State != workspaces.WorkspaceStateTerminated { + return fmt.Errorf("workspace %q was not terminated", rs.Primary.ID) + } + } + + return nil +} + +func testAccCheckAwsWorkspacesWorkspaceExists(n string, v *workspaces.Workspace) 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).workspacesconn + + output, err := conn.DescribeWorkspaces(&workspaces.DescribeWorkspacesInput{ + WorkspaceIds: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + return err + } + + if *output.Workspaces[0].WorkspaceId == rs.Primary.ID { + *v = *output.Workspaces[0] + return nil + } + + return fmt.Errorf("workspace %q not found", rs.Primary.ID) + } +} + +func testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName string) string { + return composeConfig( + testAccAwsWorkspacesDirectoryConfig_Prerequisites(rName), + fmt.Sprintf(` +data "aws_workspaces_bundle" "test" { + bundle_id = "wsb-bh8rsxt14" # Value with Windows 10 (English) +} + +resource "aws_workspaces_directory" "test" { + directory_id = "${aws_directory_service_directory.main.id}" +} +`)) +} + +func testAccWorkspacesWorkspaceConfig(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" +} +`) +} + +func testAccWorkspacesWorkspaceConfig_TagsA(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + tags = { + TerraformProviderAwsTest = true + Alpha = 1 + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_TagsB(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + tags = { + TerraformProviderAwsTest = true + Beta = 2 + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_TagsC(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + tags = { + TerraformProviderAwsTest = true + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_WorkspacePropertiesA(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + workspace_properties { + # NOTE: Compute type and volume size update not allowed within 6 hours after creation. + running_mode = "AUTO_STOP" + running_mode_auto_stop_timeout_in_minutes = 120 + } + + tags = { + TerraformProviderAwsTest = true + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_WorkspacePropertiesB(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + workspace_properties { + # NOTE: Compute type and volume size update not allowed within 6 hours after creation. + running_mode = "ALWAYS_ON" + } + + tags = { + TerraformProviderAwsTest = true + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_WorkspacePropertiesC(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + workspace_properties { + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_validateRootVolumeSize(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + workspace_properties { + root_volume_size_gib = 90 + user_volume_size_gib = 50 + } + + tags = { + TerraformProviderAwsTest = true + } +} +`) +} + +func testAccWorkspacesWorkspaceConfig_validateUserVolumeSize(rName string) string { + return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + fmt.Sprintf(` +resource "aws_workspaces_workspace" "test" { + bundle_id = "${data.aws_workspaces_bundle.test.id}" + directory_id = "${aws_workspaces_directory.test.id}" + + # NOTE: WorkSpaces API doesn't allow creating users in the directory. + # However, "Administrator"" user is always present in a bare directory. + user_name = "Administrator" + + workspace_properties { + root_volume_size_gib = 80 + user_volume_size_gib = 60 + } + + tags = { + TerraformProviderAwsTest = true + } +} +`) +} + +func TestExpandWorkspaceProperties(t *testing.T) { + cases := []struct { + input []interface{} + expected *workspaces.WorkspaceProperties + }{ + // Empty + { + input: []interface{}{}, + expected: nil, + }, + // Full + { + input: []interface{}{ + map[string]interface{}{ + "compute_type_name": workspaces.ComputeValue, + "root_volume_size_gib": 80, + "running_mode": workspaces.RunningModeAutoStop, + "running_mode_auto_stop_timeout_in_minutes": 60, + "user_volume_size_gib": 10, + }, + }, + expected: &workspaces.WorkspaceProperties{ + ComputeTypeName: aws.String(workspaces.ComputeValue), + RootVolumeSizeGib: aws.Int64(80), + RunningMode: aws.String(workspaces.RunningModeAutoStop), + RunningModeAutoStopTimeoutInMinutes: aws.Int64(60), + UserVolumeSizeGib: aws.Int64(10), + }, + }, + } + + for _, c := range cases { + actual := expandWorkspaceProperties(c.input) + if !reflect.DeepEqual(actual, c.expected) { + t.Fatalf("expected\n\n%#+v\n\ngot\n\n%#+v", c.expected, actual) + } + } +} + +func TestFlattenWorkspaceProperties(t *testing.T) { + cases := []struct { + input *workspaces.WorkspaceProperties + expected []map[string]interface{} + }{ + // Empty + { + input: nil, + expected: []map[string]interface{}{}, + }, + // Full + { + input: &workspaces.WorkspaceProperties{ + ComputeTypeName: aws.String(workspaces.ComputeValue), + RootVolumeSizeGib: aws.Int64(80), + RunningMode: aws.String(workspaces.RunningModeAutoStop), + RunningModeAutoStopTimeoutInMinutes: aws.Int64(60), + UserVolumeSizeGib: aws.Int64(10), + }, + expected: []map[string]interface{}{ + { + "compute_type_name": workspaces.ComputeValue, + "root_volume_size_gib": 80, + "running_mode": workspaces.RunningModeAutoStop, + "running_mode_auto_stop_timeout_in_minutes": 60, + "user_volume_size_gib": 10, + }, + }, + }, + } + + for _, c := range cases { + actual := flattenWorkspaceProperties(c.input) + if !reflect.DeepEqual(actual, c.expected) { + t.Fatalf("expected\n\n%#+v\n\ngot\n\n%#+v", c.expected, actual) + } + } +} diff --git a/aws/structure.go b/aws/structure.go index a7f806a3de5..46aa1b877e8 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "net" "reflect" "regexp" "sort" @@ -14,7 +15,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/appmesh" - "github.com/aws/aws-sdk-go/service/appsync" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" @@ -46,6 +46,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/worklink" "github.com/beevik/etree" + "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/structure" "github.com/mitchellh/copystructure" @@ -699,7 +700,7 @@ func flattenEcsVolumes(list []*ecs.Volume) []map[string]interface{} { l["docker_volume_configuration"] = flattenDockerVolumeConfiguration(volume.DockerVolumeConfiguration) } - if volume.DockerVolumeConfiguration != nil { + if volume.EfsVolumeConfiguration != nil { l["efs_volume_configuration"] = flattenEFSVolumeConfiguration(volume.EfsVolumeConfiguration) } @@ -970,6 +971,16 @@ func expandStringList(configured []interface{}) []*string { return vs } +// Takes the result of flatmap.Expand for an array of int64 +// and returns a []*int64 +func expandInt64List(configured []interface{}) []*int64 { + vs := make([]*int64, 0, len(configured)) + for _, v := range configured { + vs = append(vs, aws.Int64(int64(v.(int)))) + } + return vs +} + // Expands a map of string to interface to a map of string to *float func expandFloat64Map(m map[string]interface{}) map[string]*float64 { float64Map := make(map[string]*float64, len(m)) @@ -984,6 +995,11 @@ func expandStringSet(configured *schema.Set) []*string { return expandStringList(configured.List()) } +// Takes the result of schema.Set of strings and returns a []*int64 +func expandInt64Set(configured *schema.Set) []*int64 { + return expandInt64List(configured.List()) +} + // Takes list of pointers to strings. Expand to an array // of raw strings and returns a []interface{} // to keep compatibility w/ schema.NewSetschema.NewSet @@ -999,6 +1015,16 @@ func flattenStringSet(list []*string) *schema.Set { return schema.NewSet(schema.HashString, flattenStringList(list)) } +// hashStringCaseInsensitive hashes strings in a case insensitive manner. +// If you want a Set of strings and are case inensitive, this is the SchemaSetFunc you want. +func hashStringCaseInsensitive(v interface{}) int { + return hashcode.String(strings.ToLower(v.(string))) +} + +func flattenCaseInsensitiveStringSet(list []*string) *schema.Set { + return schema.NewSet(hashStringCaseInsensitive, flattenStringList(list)) +} + //Flattens an array of private ip addresses into a []string, where the elements returned are the IP strings e.g. "192.168.0.0" func flattenNetworkInterfacesPrivateIPAddresses(dtos []*ec2.NetworkInterfacePrivateIpAddress) []string { ips := make([]string, 0, len(dtos)) @@ -1560,6 +1586,32 @@ func stringMapToPointers(m map[string]interface{}) map[string]*string { return list } +// diffStringMaps returns the set of keys and values that must be created, +// and the set of keys and values that must be destroyed. +// Equivalent to 'diffTagsGeneric'. +func diffStringMaps(oldMap, newMap map[string]interface{}) (map[string]*string, map[string]*string) { + // First, we're creating everything we have + create := map[string]*string{} + for k, v := range newMap { + create[k] = aws.String(v.(string)) + } + + // Build the map of what to remove + remove := map[string]*string{} + for k, v := range oldMap { + old, ok := create[k] + if !ok || aws.StringValue(old) != v.(string) { + // Delete it! + remove[k] = aws.String(v.(string)) + } else if ok { + // already present so remove from new + delete(create, k) + } + } + + return create, remove +} + func flattenDSVpcSettings( s *directoryservice.DirectoryVpcSettingsDescription) []map[string]interface{} { settings := make(map[string]interface{}) @@ -1568,8 +1620,9 @@ func flattenDSVpcSettings( return nil } - settings["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SubnetIds)) - settings["vpc_id"] = *s.VpcId + settings["subnet_ids"] = flattenStringSet(s.SubnetIds) + settings["vpc_id"] = aws.StringValue(s.VpcId) + settings["availability_zones"] = flattenStringSet(s.AvailabilityZones) return []map[string]interface{}{settings} } @@ -1684,11 +1737,12 @@ func flattenDSConnectSettings( settings := make(map[string]interface{}) - settings["customer_dns_ips"] = schema.NewSet(schema.HashString, flattenStringList(customerDnsIps)) - settings["connect_ips"] = schema.NewSet(schema.HashString, flattenStringList(s.ConnectIps)) - settings["customer_username"] = *s.CustomerUserName - settings["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SubnetIds)) - settings["vpc_id"] = *s.VpcId + settings["customer_dns_ips"] = flattenStringSet(customerDnsIps) + settings["connect_ips"] = flattenStringSet(s.ConnectIps) + settings["customer_username"] = aws.StringValue(s.CustomerUserName) + settings["subnet_ids"] = flattenStringSet(s.SubnetIds) + settings["vpc_id"] = aws.StringValue(s.VpcId) + settings["availability_zones"] = flattenStringSet(s.AvailabilityZones) return []map[string]interface{}{settings} } @@ -1934,14 +1988,14 @@ func flattenCloudWatchLogMetricTransformations(ts []*cloudwatchlogs.MetricTransf mts := make([]interface{}, 0) m := make(map[string]interface{}) - m["name"] = *ts[0].MetricName - m["namespace"] = *ts[0].MetricNamespace - m["value"] = *ts[0].MetricValue + m["name"] = aws.StringValue(ts[0].MetricName) + m["namespace"] = aws.StringValue(ts[0].MetricNamespace) + m["value"] = aws.StringValue(ts[0].MetricValue) if ts[0].DefaultValue == nil { m["default_value"] = "" } else { - m["default_value"] = *ts[0].DefaultValue + m["default_value"] = strconv.FormatFloat(aws.Float64Value(ts[0].DefaultValue), 'f', -1, 64) } mts = append(mts, m) @@ -2067,71 +2121,6 @@ func flattenApiGatewayThrottleSettings(settings *apigateway.ThrottleSettings) [] // TODO: refactor some of these helper functions and types in the terraform/helper packages -// getStringPtr returns a *string version of the value taken from m, where m -// can be a map[string]interface{} or a *schema.ResourceData. If the key isn't -// present or is empty, getNilString returns nil. -func getStringPtr(m interface{}, key string) *string { - switch m := m.(type) { - case map[string]interface{}: - v := m[key] - - if v == nil { - return nil - } - - s := v.(string) - if s == "" { - return nil - } - - return &s - - case *schema.ResourceData: - if v, ok := m.GetOk(key); ok { - if v == nil || v.(string) == "" { - return nil - } - s := v.(string) - return &s - } - } - - return nil -} - -// a convenience wrapper type for the schema.Set map[string]interface{} -// Set operations only alter the underlying map if the value is not nil -type setMap map[string]interface{} - -// SetString sets m[key] = *value only if `value != nil` -func (s setMap) SetString(key string, value *string) { - if value == nil { - return - } - - s[key] = *value -} - -// Set assigns value to s[key] if value isn't nil -func (s setMap) Set(key string, value interface{}) { - if reflect.ValueOf(value).IsNil() { - return - } - - s[key] = value -} - -// Map returns the raw map type for a shorter type conversion -func (s setMap) Map() map[string]interface{} { - return map[string]interface{}(s) -} - -// MapList returns the map[string]interface{} as a single element in a slice to -// match the schema.Set data type used for structs. -func (s setMap) MapList() []map[string]interface{} { - return []map[string]interface{}{s.Map()} -} - // Takes the result of flatmap.Expand for an array of policy attributes and // returns ELB API compatible objects func expandPolicyAttributes(configured []interface{}) ([]*elb.PolicyAttribute, error) { @@ -2530,6 +2519,10 @@ func flattenCognitoUserPoolEmailConfiguration(s *cognitoidentityprovider.EmailCo m["reply_to_email_address"] = *s.ReplyToEmailAddress } + if s.From != nil { + m["from_email_address"] = *s.From + } + if s.SourceArn != nil { m["source_arn"] = *s.SourceArn } @@ -2795,234 +2788,6 @@ func flattenCognitoUserPoolUserPoolAddOns(s *cognitoidentityprovider.UserPoolAdd return []map[string]interface{}{config} } -func flattenIoTRuleCloudWatchAlarmActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.CloudwatchAlarm - if v != nil { - result["alarm_name"] = *v.AlarmName - result["role_arn"] = *v.RoleArn - result["state_reason"] = *v.StateReason - result["state_value"] = *v.StateValue - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleCloudWatchMetricActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.CloudwatchMetric - if v != nil { - result["metric_name"] = *v.MetricName - result["role_arn"] = *v.RoleArn - result["metric_namespace"] = *v.MetricNamespace - result["metric_unit"] = *v.MetricUnit - result["metric_value"] = *v.MetricValue - - if v.MetricTimestamp != nil { - result["metric_timestamp"] = *v.MetricTimestamp - } - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleDynamoDbActions(actions []*iot.Action) []map[string]interface{} { - items := make([]map[string]interface{}, 0, len(actions)) - - for _, a := range actions { - m := make(map[string]interface{}) - v := a.DynamoDB - if v != nil { - m["hash_key_field"] = aws.StringValue(v.HashKeyField) - m["hash_key_value"] = aws.StringValue(v.HashKeyValue) - m["role_arn"] = aws.StringValue(v.RoleArn) - m["table_name"] = aws.StringValue(v.TableName) - - if v.HashKeyType != nil { - m["hash_key_type"] = aws.StringValue(v.HashKeyType) - } - - if v.PayloadField != nil { - m["payload_field"] = aws.StringValue(v.PayloadField) - } - - if v.RangeKeyField != nil { - m["range_key_field"] = aws.StringValue(v.RangeKeyField) - } - - if v.RangeKeyType != nil { - m["range_key_type"] = aws.StringValue(v.RangeKeyType) - } - - if v.RangeKeyValue != nil { - m["range_key_value"] = aws.StringValue(v.RangeKeyValue) - } - - items = append(items, m) - } - } - - return items -} - -func flattenIoTRuleElasticSearchActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Elasticsearch - if v != nil { - result["role_arn"] = *v.RoleArn - result["endpoint"] = *v.Endpoint - result["id"] = *v.Id - result["index"] = *v.Index - result["type"] = *v.Type - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleFirehoseActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Firehose - if v != nil { - result["role_arn"] = aws.StringValue(v.RoleArn) - result["delivery_stream_name"] = aws.StringValue(v.DeliveryStreamName) - result["separator"] = aws.StringValue(v.Separator) - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleKinesisActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Kinesis - if v != nil { - result["role_arn"] = *v.RoleArn - result["stream_name"] = *v.StreamName - - if v.PartitionKey != nil { - result["partition_key"] = *v.PartitionKey - } - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleLambdaActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Lambda - if v != nil { - result["function_arn"] = *v.FunctionArn - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleRepublishActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Republish - if v != nil { - result["role_arn"] = *v.RoleArn - result["topic"] = *v.Topic - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleS3Actions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.S3 - if v != nil { - result["role_arn"] = *v.RoleArn - result["bucket_name"] = *v.BucketName - result["key"] = *v.Key - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleSnsActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Sns - if v != nil { - result["message_format"] = *v.MessageFormat - result["role_arn"] = *v.RoleArn - result["target_arn"] = *v.TargetArn - - results = append(results, result) - } - } - - return results -} - -func flattenIoTRuleSqsActions(actions []*iot.Action) []map[string]interface{} { - results := make([]map[string]interface{}, 0) - - for _, a := range actions { - result := make(map[string]interface{}) - v := a.Sqs - if v != nil { - result["role_arn"] = aws.StringValue(v.RoleArn) - result["use_base64"] = aws.BoolValue(v.UseBase64) - result["queue_url"] = aws.StringValue(v.QueueUrl) - - results = append(results, result) - } - } - - return results -} - func flattenCognitoUserPoolPasswordPolicy(s *cognitoidentityprovider.PasswordPolicyType) []map[string]interface{} { m := map[string]interface{}{} @@ -3479,6 +3244,26 @@ func flattenCognitoUserPoolSchema(configuredAttributes, inputs []*cognitoidentit return values } +func expandCognitoUserPoolUsernameConfiguration(config map[string]interface{}) *cognitoidentityprovider.UsernameConfigurationType { + usernameConfigurationType := &cognitoidentityprovider.UsernameConfigurationType{ + CaseSensitive: aws.Bool(config["case_sensitive"].(bool)), + } + + return usernameConfigurationType +} + +func flattenCognitoUserPoolUsernameConfiguration(u *cognitoidentityprovider.UsernameConfigurationType) []map[string]interface{} { + m := map[string]interface{}{} + + if u == nil { + return nil + } + + m["case_sensitive"] = *u.CaseSensitive + + return []map[string]interface{}{m} +} + func expandCognitoUserPoolVerificationMessageTemplate(config map[string]interface{}) *cognitoidentityprovider.VerificationMessageTemplateType { verificationMessageTemplateType := &cognitoidentityprovider.VerificationMessageTemplateType{} @@ -3689,10 +3474,11 @@ func flattenWafAction(n *waf.WafAction) []map[string]interface{} { return nil } - m := setMap(make(map[string]interface{})) + result := map[string]interface{}{ + "type": aws.StringValue(n.Type), + } - m.SetString("type", n.Type) - return m.MapList() + return []map[string]interface{}{result} } func flattenWafWebAclRules(ts []*waf.ActivatedRule) []map[string]interface{} { @@ -4281,6 +4067,24 @@ func flattenDynamoDbPitr(pitrDesc *dynamodb.DescribeContinuousBackupsOutput) []i return []interface{}{m} } +func flattenAwsDynamoDbReplicaDescriptions(apiObjects []*dynamodb.ReplicaDescription) []interface{} { + if len(apiObjects) == 0 { + return nil + } + + var tfList []interface{} + + for _, apiObject := range apiObjects { + tfMap := map[string]interface{}{ + "region_name": aws.StringValue(apiObject.RegionName), + } + + tfList = append(tfList, tfMap) + } + + return tfList +} + func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.TableDescription) error { d.Set("billing_mode", dynamodb.BillingModeProvisioned) if table.BillingModeSummary != nil { @@ -4396,6 +4200,11 @@ func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.Tab return err } + err = d.Set("replica", flattenAwsDynamoDbReplicaDescriptions(table.Replicas)) + if err != nil { + return err + } + d.Set("arn", table.TableArn) return nil @@ -4914,10 +4723,10 @@ func expandAppmeshVirtualRouterSpec(vSpec []interface{}) *appmesh.VirtualRouterS } mSpec := vSpec[0].(map[string]interface{}) - if vListeners, ok := mSpec["listener"].(*schema.Set); ok && vListeners.Len() > 0 { + if vListeners, ok := mSpec["listener"].([]interface{}); ok && len(vListeners) > 0 && vListeners[0] != nil { listeners := []*appmesh.VirtualRouterListener{} - for _, vListener := range vListeners.List() { + for _, vListener := range vListeners { listener := &appmesh.VirtualRouterListener{} mListener := vListener.(map[string]interface{}) @@ -4934,10 +4743,8 @@ func expandAppmeshVirtualRouterSpec(vSpec []interface{}) *appmesh.VirtualRouterS listener.PortMapping.Protocol = aws.String(vProtocol) } } - listeners = append(listeners, listener) } - spec.Listeners = listeners } @@ -4948,27 +4755,19 @@ func flattenAppmeshVirtualRouterSpec(spec *appmesh.VirtualRouterSpec) []interfac if spec == nil { return []interface{}{} } - - mSpec := map[string]interface{}{} - - if spec.Listeners != nil { - vListeners := []interface{}{} - - for _, listener := range spec.Listeners { - mListener := map[string]interface{}{} - - if listener.PortMapping != nil { - mPortMapping := map[string]interface{}{ - "port": int(aws.Int64Value(listener.PortMapping.Port)), - "protocol": aws.StringValue(listener.PortMapping.Protocol), - } - mListener["port_mapping"] = []interface{}{mPortMapping} + mSpec := make(map[string]interface{}) + if spec.Listeners != nil && spec.Listeners[0] != nil { + // Per schema definition, set at most 1 Listener + listener := spec.Listeners[0] + mListener := make(map[string]interface{}) + if listener.PortMapping != nil { + mPortMapping := map[string]interface{}{ + "port": int(aws.Int64Value(listener.PortMapping.Port)), + "protocol": aws.StringValue(listener.PortMapping.Protocol), } - - vListeners = append(vListeners, mListener) + mListener["port_mapping"] = []interface{}{mPortMapping} } - - mSpec["listener"] = schema.NewSet(appmeshVirtualNodeListenerHash, vListeners) + mSpec["listener"] = []interface{}{mListener} } return []interface{}{mSpec} @@ -5006,10 +4805,10 @@ func expandAppmeshVirtualNodeSpec(vSpec []interface{}) *appmesh.VirtualNodeSpec spec.Backends = backends } - if vListeners, ok := mSpec["listener"].(*schema.Set); ok && vListeners.Len() > 0 { + if vListeners, ok := mSpec["listener"].([]interface{}); ok && len(vListeners) > 0 && vListeners[0] != nil { listeners := []*appmesh.Listener{} - for _, vListener := range vListeners.List() { + for _, vListener := range vListeners { listener := &appmesh.Listener{} mListener := vListener.(map[string]interface{}) @@ -5153,37 +4952,33 @@ func flattenAppmeshVirtualNodeSpec(spec *appmesh.VirtualNodeSpec) []interface{} mSpec["backend"] = schema.NewSet(appmeshVirtualNodeBackendHash, vBackends) } - if spec.Listeners != nil { - vListeners := []interface{}{} - - for _, listener := range spec.Listeners { - mListener := map[string]interface{}{} - - if listener.HealthCheck != nil { - mHealthCheck := map[string]interface{}{ - "healthy_threshold": int(aws.Int64Value(listener.HealthCheck.HealthyThreshold)), - "interval_millis": int(aws.Int64Value(listener.HealthCheck.IntervalMillis)), - "path": aws.StringValue(listener.HealthCheck.Path), - "port": int(aws.Int64Value(listener.HealthCheck.Port)), - "protocol": aws.StringValue(listener.HealthCheck.Protocol), - "timeout_millis": int(aws.Int64Value(listener.HealthCheck.TimeoutMillis)), - "unhealthy_threshold": int(aws.Int64Value(listener.HealthCheck.UnhealthyThreshold)), - } - mListener["health_check"] = []interface{}{mHealthCheck} + if spec.Listeners != nil && spec.Listeners[0] != nil { + // Per schema definition, set at most 1 Listener + listener := spec.Listeners[0] + mListener := map[string]interface{}{} + + if listener.HealthCheck != nil { + mHealthCheck := map[string]interface{}{ + "healthy_threshold": int(aws.Int64Value(listener.HealthCheck.HealthyThreshold)), + "interval_millis": int(aws.Int64Value(listener.HealthCheck.IntervalMillis)), + "path": aws.StringValue(listener.HealthCheck.Path), + "port": int(aws.Int64Value(listener.HealthCheck.Port)), + "protocol": aws.StringValue(listener.HealthCheck.Protocol), + "timeout_millis": int(aws.Int64Value(listener.HealthCheck.TimeoutMillis)), + "unhealthy_threshold": int(aws.Int64Value(listener.HealthCheck.UnhealthyThreshold)), } + mListener["health_check"] = []interface{}{mHealthCheck} + } - if listener.PortMapping != nil { - mPortMapping := map[string]interface{}{ - "port": int(aws.Int64Value(listener.PortMapping.Port)), - "protocol": aws.StringValue(listener.PortMapping.Protocol), - } - mListener["port_mapping"] = []interface{}{mPortMapping} + if listener.PortMapping != nil { + mPortMapping := map[string]interface{}{ + "port": int(aws.Int64Value(listener.PortMapping.Port)), + "protocol": aws.StringValue(listener.PortMapping.Protocol), } - - vListeners = append(vListeners, mListener) + mListener["port_mapping"] = []interface{}{mPortMapping} } - mSpec["listener"] = schema.NewSet(appmeshVirtualNodeListenerHash, vListeners) + mSpec["listener"] = []interface{}{mListener} } if spec.Logging != nil && spec.Logging.AccessLog != nil && spec.Logging.AccessLog.File != nil { @@ -5337,7 +5132,7 @@ func expandAppmeshRouteSpec(vSpec []interface{}) *appmesh.RouteSpec { if vVirtualNode, ok := mWeightedTarget["virtual_node"].(string); ok && vVirtualNode != "" { weightedTarget.VirtualNode = aws.String(vVirtualNode) } - if vWeight, ok := mWeightedTarget["weight"].(int); ok && vWeight > 0 { + if vWeight, ok := mWeightedTarget["weight"].(int); ok { weightedTarget.Weight = aws.Int64(int64(vWeight)) } @@ -5441,7 +5236,7 @@ func expandAppmeshRouteSpec(vSpec []interface{}) *appmesh.RouteSpec { if vVirtualNode, ok := mWeightedTarget["virtual_node"].(string); ok && vVirtualNode != "" { weightedTarget.VirtualNode = aws.String(vVirtualNode) } - if vWeight, ok := mWeightedTarget["weight"].(int); ok && vWeight > 0 { + if vWeight, ok := mWeightedTarget["weight"].(int); ok { weightedTarget.Weight = aws.Int64(int64(vWeight)) } @@ -5566,22 +5361,6 @@ func flattenAppmeshRouteSpec(spec *appmesh.RouteSpec) []interface{} { return []interface{}{mSpec} } -func flattenAppsyncPipelineConfig(c *appsync.PipelineConfig) []interface{} { - if c == nil { - return nil - } - - if len(c.Functions) == 0 { - return nil - } - - m := map[string]interface{}{ - "functions": flattenStringList(c.Functions), - } - - return []interface{}{m} -} - func expandRoute53ResolverEndpointIpAddresses(vIpAddresses *schema.Set) []*route53resolver.IpAddressRequest { ipAddressRequests := []*route53resolver.IpAddressRequest{} @@ -5680,3 +5459,13 @@ func flattenRoute53ResolverRuleTargetIps(targetAddresses []*route53resolver.Targ return vTargetIps } + +func isIpv6CidrsEquals(first, second string) bool { + if first == "" || second == "" { + return false + } + _, firstMask, _ := net.ParseCIDR(first) + _, secondMask, _ := net.ParseCIDR(second) + + return firstMask.String() == secondMask.String() +} diff --git a/aws/structure_test.go b/aws/structure_test.go index ab8c416a3d0..45dc8e08643 100644 --- a/aws/structure_test.go +++ b/aws/structure_test.go @@ -20,6 +20,89 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) +func TestDiffStringMaps(t *testing.T) { + cases := []struct { + Old, New map[string]interface{} + Create, Remove map[string]interface{} + }{ + // Add + { + Old: map[string]interface{}{ + "foo": "bar", + }, + New: map[string]interface{}{ + "foo": "bar", + "bar": "baz", + }, + Create: map[string]interface{}{ + "bar": "baz", + }, + Remove: map[string]interface{}{}, + }, + + // Modify + { + Old: map[string]interface{}{ + "foo": "bar", + }, + New: map[string]interface{}{ + "foo": "baz", + }, + Create: map[string]interface{}{ + "foo": "baz", + }, + Remove: map[string]interface{}{ + "foo": "bar", + }, + }, + + // Overlap + { + Old: map[string]interface{}{ + "foo": "bar", + "hello": "world", + }, + New: map[string]interface{}{ + "foo": "baz", + "hello": "world", + }, + Create: map[string]interface{}{ + "foo": "baz", + }, + Remove: map[string]interface{}{ + "foo": "bar", + }, + }, + + // Remove + { + Old: map[string]interface{}{ + "foo": "bar", + "bar": "baz", + }, + New: map[string]interface{}{ + "foo": "bar", + }, + Create: map[string]interface{}{}, + Remove: map[string]interface{}{ + "bar": "baz", + }, + }, + } + + for i, tc := range cases { + c, r := diffStringMaps(tc.Old, tc.New) + cm := pointersMapToStringList(c) + rm := pointersMapToStringList(r) + if !reflect.DeepEqual(cm, tc.Create) { + t.Fatalf("%d: bad create: %#v", i, cm) + } + if !reflect.DeepEqual(rm, tc.Remove) { + t.Fatalf("%d: bad remove: %#v", i, rm) + } + } +} + func TestExpandIPPerms(t *testing.T) { hash := schema.HashString diff --git a/aws/tags.go b/aws/tags.go index c35f62ef62d..2123771346c 100644 --- a/aws/tags.go +++ b/aws/tags.go @@ -13,6 +13,7 @@ func tagsSchema() *schema.Schema { return &schema.Schema{ Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, } } @@ -21,6 +22,7 @@ func tagsSchemaComputed() *schema.Schema { Type: schema.TypeMap, Optional: true, Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, } } @@ -29,6 +31,7 @@ func tagsSchemaForceNew() *schema.Schema { Type: schema.TypeMap, Optional: true, ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, } } diff --git a/files/mysql-5-6-xtrabackup.tar.gz b/aws/testdata/mysql-5-6-xtrabackup.tar.gz similarity index 100% rename from files/mysql-5-6-xtrabackup.tar.gz rename to aws/testdata/mysql-5-6-xtrabackup.tar.gz diff --git a/aws/tls.go b/aws/tls.go index e91f9ecba77..8dc0eae06f8 100644 --- a/aws/tls.go +++ b/aws/tls.go @@ -27,6 +27,7 @@ func tlsRsaPrivateKeyPem(bits int) string { key, err := rsa.GenerateKey(rand.Reader, bits) if err != nil { + //lintignore:R009 panic(err) } @@ -47,12 +48,14 @@ func tlsRsaPublicKeyPem(keyPem string) string { key, err := x509.ParsePKCS1PrivateKey(keyBlock.Bytes) if err != nil { + //lintignore:R009 panic(err) } publicKeyBytes, err := x509.MarshalPKIXPublicKey(&key.PublicKey) if err != nil { + //lintignore:R009 panic(err) } @@ -73,6 +76,7 @@ func tlsRsaX509LocallySignedCertificatePem(caKeyPem, caCertificatePem, keyPem, c caCertificate, err := x509.ParseCertificate(caCertificateBlock.Bytes) if err != nil { + //lintignore:R009 panic(err) } @@ -81,6 +85,7 @@ func tlsRsaX509LocallySignedCertificatePem(caKeyPem, caCertificatePem, keyPem, c caKey, err := x509.ParsePKCS1PrivateKey(caKeyBlock.Bytes) if err != nil { + //lintignore:R009 panic(err) } @@ -89,12 +94,14 @@ func tlsRsaX509LocallySignedCertificatePem(caKeyPem, caCertificatePem, keyPem, c key, err := x509.ParsePKCS1PrivateKey(keyBlock.Bytes) if err != nil { + //lintignore:R009 panic(err) } serialNumber, err := rand.Int(rand.Reader, tlsX509CertificateSerialNumberLimit) if err != nil { + //lintignore:R009 panic(err) } @@ -114,6 +121,7 @@ func tlsRsaX509LocallySignedCertificatePem(caKeyPem, caCertificatePem, keyPem, c certificateBytes, err := x509.CreateCertificate(rand.Reader, certificate, caCertificate, &key.PublicKey, caKey) if err != nil { + //lintignore:R009 panic(err) } @@ -134,12 +142,14 @@ func tlsRsaX509SelfSignedCaCertificatePem(keyPem string) string { key, err := x509.ParsePKCS1PrivateKey(keyBlock.Bytes) if err != nil { + //lintignore:R009 panic(err) } publicKeyBytes, err := x509.MarshalPKIXPublicKey(&key.PublicKey) if err != nil { + //lintignore:R009 panic(err) } @@ -148,6 +158,7 @@ func tlsRsaX509SelfSignedCaCertificatePem(keyPem string) string { serialNumber, err := rand.Int(rand.Reader, tlsX509CertificateSerialNumberLimit) if err != nil { + //lintignore:R009 panic(err) } @@ -169,6 +180,7 @@ func tlsRsaX509SelfSignedCaCertificatePem(keyPem string) string { certificateBytes, err := x509.CreateCertificate(rand.Reader, certificate, certificate, &key.PublicKey, key) if err != nil { + //lintignore:R009 panic(err) } @@ -189,12 +201,14 @@ func tlsRsaX509SelfSignedCertificatePem(keyPem, commonName string) string { key, err := x509.ParsePKCS1PrivateKey(keyBlock.Bytes) if err != nil { + //lintignore:R009 panic(err) } serialNumber, err := rand.Int(rand.Reader, tlsX509CertificateSerialNumberLimit) if err != nil { + //lintignore:R009 panic(err) } @@ -214,6 +228,7 @@ func tlsRsaX509SelfSignedCertificatePem(keyPem, commonName string) string { certificateBytes, err := x509.CreateCertificate(rand.Reader, certificate, certificate, &key.PublicKey, key) if err != nil { + //lintignore:R009 panic(err) } diff --git a/aws/validators.go b/aws/validators.go index 5a177cd1427..5b1b685d960 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -273,6 +273,10 @@ func validateDocDBIdentifier(v interface{}, k string) (ws []string, errors []err errors = append(errors, fmt.Errorf( "%q cannot end with a hyphen", k)) } + if len(value) > 63 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 63 characters", k)) + } return } @@ -1954,6 +1958,8 @@ func validateCognitoRoles(v map[string]interface{}) (errors []error) { func validateDxConnectionBandWidth() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ "1Gbps", + "2Gbps", + "5Gbps", "10Gbps", "50Mbps", "100Mbps", diff --git a/aws/validators_test.go b/aws/validators_test.go index 3625b451c06..05a2b73c327 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -1410,6 +1410,39 @@ func TestValidateApiGatewayUsagePlanQuotaSettings(t *testing.T) { } } +func TestValidateDocDBIdentifier(t *testing.T) { + validNames := []string{ + "a", + "hello-world", + "hello-world-0123456789", + strings.Repeat("w", 63), + } + for _, v := range validNames { + _, errors := validateDocDBIdentifier(v, "name") + if len(errors) != 0 { + t.Fatalf("%q should be a valid DocDB Identifier: %q", v, errors) + } + } + + invalidNames := []string{ + "", + "special@character", + "slash/in-the-middle", + "dot.in-the-middle", + "two-hyphen--in-the-middle", + "0-first-numeric", + "-first-hyphen", + "end-hyphen-", + strings.Repeat("W", 64), + } + for _, v := range invalidNames { + _, errors := validateDocDBIdentifier(v, "name") + if len(errors) == 0 { + t.Fatalf("%q should be an invalid DocDB Identifier", v) + } + } +} + func TestValidateElbName(t *testing.T) { validNames := []string{ "tf-test-elb", @@ -2808,6 +2841,8 @@ func TestValidateCloudFrontPublicKeyNamePrefix(t *testing.T) { func TestValidateDxConnectionBandWidth(t *testing.T) { validBandwidths := []string{ "1Gbps", + "2Gbps", + "5Gbps", "10Gbps", "50Mbps", "100Mbps", diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go index 917f44f480f..221e5a33e37 100644 --- a/aws/waf_helpers.go +++ b/aws/waf_helpers.go @@ -28,7 +28,7 @@ func wafSizeConstraintSetSchema() map[string]*schema.Schema { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -76,7 +76,7 @@ func diffWafSizeConstraints(oldS, newS []interface{}) []*waf.SizeConstraintSetUp 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{})), + FieldToMatch: expandFieldToMatch(constraint["field_to_match"].([]interface{})[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)), @@ -90,7 +90,7 @@ func diffWafSizeConstraints(oldS, newS []interface{}) []*waf.SizeConstraintSetUp 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{})), + FieldToMatch: expandFieldToMatch(constraint["field_to_match"].([]interface{})[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)), diff --git a/awsproviderlint/helper/awsprovidertype/keyvaluetags/funcs.go b/awsproviderlint/helper/awsprovidertype/keyvaluetags/funcs.go new file mode 100644 index 00000000000..3f0bb783b0a --- /dev/null +++ b/awsproviderlint/helper/awsprovidertype/keyvaluetags/funcs.go @@ -0,0 +1,5 @@ +package keyvaluetags + +const ( + FuncNameNew = `New` +) diff --git a/awsproviderlint/helper/awsprovidertype/keyvaluetags/package.go b/awsproviderlint/helper/awsprovidertype/keyvaluetags/package.go new file mode 100644 index 00000000000..c9811541b58 --- /dev/null +++ b/awsproviderlint/helper/awsprovidertype/keyvaluetags/package.go @@ -0,0 +1,28 @@ +package keyvaluetags + +import ( + "go/ast" + "go/types" + + "github.com/bflad/tfproviderlint/helper/astutils" +) + +const ( + PackageName = `keyvaluetags` + PackagePath = `github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags` +) + +// IsFunc returns if the function call is in the package +func IsFunc(e ast.Expr, info *types.Info, funcName string) bool { + return astutils.IsPackageFunc(e, info, PackagePath, funcName) +} + +// IsNamedType returns if the type name matches and is from the package +func IsNamedType(t *types.Named, typeName string) bool { + return astutils.IsPackageNamedType(t, PackagePath, typeName) +} + +// IsReceiverMethod returns if the receiver method call is in the package +func IsReceiverMethod(e ast.Expr, info *types.Info, receiverName string, methodName string) bool { + return astutils.IsPackageReceiverMethod(e, info, PackagePath, receiverName, methodName) +} diff --git a/awsproviderlint/helper/awsprovidertype/keyvaluetags/type_ignoreconfig.go b/awsproviderlint/helper/awsprovidertype/keyvaluetags/type_ignoreconfig.go new file mode 100644 index 00000000000..30b5e04a9ad --- /dev/null +++ b/awsproviderlint/helper/awsprovidertype/keyvaluetags/type_ignoreconfig.go @@ -0,0 +1,21 @@ +package keyvaluetags + +import ( + "go/types" +) + +const ( + TypeNameIgnoreConfig = `IgnoreConfig` +) + +// IsTypeIgnoreConfig returns if the type is IgnoreConfig from the internal/keyvaluetags package +func IsTypeIgnoreConfig(t types.Type) bool { + switch t := t.(type) { + case *types.Named: + return IsNamedType(t, TypeNameKeyValueTags) + case *types.Pointer: + return IsTypeKeyValueTags(t.Elem()) + default: + return false + } +} diff --git a/awsproviderlint/helper/awsprovidertype/keyvaluetags/type_keyvaluetags.go b/awsproviderlint/helper/awsprovidertype/keyvaluetags/type_keyvaluetags.go new file mode 100644 index 00000000000..fb010a3f05d --- /dev/null +++ b/awsproviderlint/helper/awsprovidertype/keyvaluetags/type_keyvaluetags.go @@ -0,0 +1,37 @@ +package keyvaluetags + +import ( + "go/types" +) + +const ( + KeyValueTagsMethodNameChunks = `Chunks` + KeyValueTagsMethodNameContainsAll = `ContainsAll` + KeyValueTagsMethodNameHash = `Hash` + KeyValueTagsMethodNameIgnore = `Ignore` + KeyValueTagsMethodNameIgnoreAws = `IgnoreAws` + KeyValueTagsMethodNameIgnoreConfig = `IgnoreConfig` + KeyValueTagsMethodNameIgnoreElasticbeanstalk = `IgnoreElasticbeanstalk` + KeyValueTagsMethodNameIgnorePrefixes = `IgnorePrefixes` + KeyValueTagsMethodNameIgnoreRds = `IgnoreRds` + KeyValueTagsMethodNameKeys = `Keys` + KeyValueTagsMethodNameMap = `Map` + KeyValueTagsMethodNameMerge = `Merge` + KeyValueTagsMethodNameRemoved = `Removed` + KeyValueTagsMethodNameUpdated = `Updated` + KeyValueTagsMethodNameUrlEncode = `UrlEncode` + + TypeNameKeyValueTags = `KeyValueTags` +) + +// IsTypeKeyValueTags returns if the type is KeyValueTags from the internal/keyvaluetags package +func IsTypeKeyValueTags(t types.Type) bool { + switch t := t.(type) { + case *types.Named: + return IsNamedType(t, TypeNameKeyValueTags) + case *types.Pointer: + return IsTypeKeyValueTags(t.Elem()) + default: + return false + } +} diff --git a/awsproviderlint/passes/AWSR002/AWSR002.go b/awsproviderlint/passes/AWSR002/AWSR002.go new file mode 100644 index 00000000000..8ec22dc7f56 --- /dev/null +++ b/awsproviderlint/passes/AWSR002/AWSR002.go @@ -0,0 +1,75 @@ +package AWSR002 + +import ( + "go/ast" + + "github.com/bflad/tfproviderlint/helper/astutils" + "github.com/bflad/tfproviderlint/passes/commentignore" + "github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetcallexpr" + "github.com/terraform-providers/terraform-provider-aws/awsproviderlint/helper/awsprovidertype/keyvaluetags" + "golang.org/x/tools/go/analysis" +) + +const Doc = `check for d.Set() of tags attribute that should include IgnoreConfig() + +The AWSR002 analyzer reports when a (schema.ResourceData).Set() call with the +tags key is missing a call to (keyvaluetags.KeyValueTags).IgnoreConfig() in the +value, which ensures any provider level ignore tags configuration is applied. +` + +const analyzerName = "AWSR002" + +var Analyzer = &analysis.Analyzer{ + Name: analyzerName, + Doc: Doc, + Requires: []*analysis.Analyzer{ + commentignore.Analyzer, + resourcedatasetcallexpr.Analyzer, + }, + Run: run, +} + +func run(pass *analysis.Pass) (interface{}, error) { + callExprs := pass.ResultOf[resourcedatasetcallexpr.Analyzer].([]*ast.CallExpr) + commentIgnorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) + + for _, callExpr := range callExprs { + if commentIgnorer.ShouldIgnore(analyzerName, callExpr) { + continue + } + + if len(callExpr.Args) < 2 { + continue + } + + attributeName := astutils.ExprStringValue(callExpr.Args[0]) + + if attributeName == nil || *attributeName != "tags" { + continue + } + + var ignoreConfigCallExprFound bool + + ast.Inspect(callExpr.Args[1], func(n ast.Node) bool { + callExpr, ok := n.(*ast.CallExpr) + + if !ok { + return true + } + + if keyvaluetags.IsReceiverMethod(callExpr.Fun, pass.TypesInfo, keyvaluetags.TypeNameKeyValueTags, keyvaluetags.KeyValueTagsMethodNameIgnoreConfig) { + ignoreConfigCallExprFound = true + return false + } + + return true + }) + + if !ignoreConfigCallExprFound { + pass.Reportf(callExpr.Args[1].Pos(), "%s: missing (keyvaluetags.KeyValueTags).IgnoreConfig()", analyzerName) + } + + } + + return nil, nil +} diff --git a/awsproviderlint/passes/AWSR002/AWSR002_test.go b/awsproviderlint/passes/AWSR002/AWSR002_test.go new file mode 100644 index 00000000000..119143b870f --- /dev/null +++ b/awsproviderlint/passes/AWSR002/AWSR002_test.go @@ -0,0 +1,24 @@ +package AWSR002 + +import ( + "testing" + + "golang.org/x/tools/go/analysis" +) + +// analysistest testing with the actual keyvaluetags internal package requires +// self-referencing an internal package. Vendoring via symlinks would need to +// be manually constructed and error prone. Using Go Modules to assemble the +// testdata vendor directory would re-vendor thousands of source code files. +// func TestAnalyzer(t *testing.T) { +// testdata := analysistest.TestData() +// analysistest.Run(t, testdata, Analyzer, "a") +// } + +func TestValidate(t *testing.T) { + err := analysis.Validate([]*analysis.Analyzer{Analyzer}) + + if err != nil { + t.Fatal(err) + } +} diff --git a/awsproviderlint/passes/AWSR002/README.md b/awsproviderlint/passes/AWSR002/README.md new file mode 100644 index 00000000000..122d53bec54 --- /dev/null +++ b/awsproviderlint/passes/AWSR002/README.md @@ -0,0 +1,26 @@ +# AWSR002 + +The AWSR002 analyzer reports when a [(schema.ResourceData).Set()](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/helper/schema?tab=doc#ResourceData.Set) call with the `tags` key is missing a call to `(keyvaluetags.KeyValueTags).IgnoreConfig()` in the value, which ensures any provider level ignore tags configuration is applied. + +## Flagged Code + +```go +d.Set("tags", keyvaluetags.Ec2KeyValueTags(subnet.Tags).IgnoreAws().Map()) +``` + +## Passing Code + +```go +ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + +d.Set("tags", keyvaluetags.Ec2KeyValueTags(subnet.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()) +``` + +## Ignoring Check + +The check can be ignored for a certain line via a `//lintignore:AWSR002` comment on the previous line or at the end of the offending line, e.g. + +```go +//lintignore:AWSR002 +d.Set("tags", keyvaluetags.Ec2KeyValueTags(subnet.Tags).IgnoreAws().Map()) +``` diff --git a/awsproviderlint/passes/checks.go b/awsproviderlint/passes/checks.go index 0eaaefe379d..19ac2111c0a 100644 --- a/awsproviderlint/passes/checks.go +++ b/awsproviderlint/passes/checks.go @@ -3,10 +3,12 @@ package passes import ( "github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSAT001" "github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSR001" + "github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSR002" "golang.org/x/tools/go/analysis" ) var AllChecks = []*analysis.Analyzer{ AWSAT001.Analyzer, AWSR001.Analyzer, + AWSR002.Analyzer, } diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 00000000000..0455bda6f02 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing to Terraform - AWS Provider + +**First:** if you're unsure or afraid of _anything_, ask for help! You can +submit a work in progress (WIP) pull request, or file an issue with the parts +you know. We'll do our best to guide you in the right direction, and let you +know if there are guidelines we will need to follow. We want people to be able +to participate without fear of doing the wrong thing. + +Below are our expectations for contributors. Following these guidelines gives us +the best opportunity to work with you, by making sure we have the things we need +in order to make it happen. Doing your best to follow it will speed up our +ability to merge PRs and respond to issues. + +- [Development Environment Setup](DEVELOPMENT.md) +- [Issue Reporting and Lifecycle](contributing/issue-reporting-and-lifecycle.md) +- [Pull Request Submission and Lifecycle](contributing/pullrequest-submission-and-lifecycle.md) +- [Contribution Types and Checklists](contributing/contribution-checklists.md) +- [Running and Writing Acceptance Tests](contributing/running-and-writing-acceptance-tests.md) diff --git a/docs/CORE_SERVICES.md b/docs/CORE_SERVICES.md new file mode 100644 index 00000000000..73ca7fbcdae --- /dev/null +++ b/docs/CORE_SERVICES.md @@ -0,0 +1,27 @@ +# TF AWS Provider Core Services + +Core Services are AWS services we have identified as critical for a large majority of our users. Our goal is to continually increase the depth of coverage for these services. We will work to prioritize features and enhancements to these services in each weekly release, even if they are not necessarily highlighted in our quarterly roadmap. + +The core services we have identified are: + +* EC2 + +* Lambda + +* EKS + +* ECS + +* VPC + +* S3 + +* RDS + +* DynamoDB + +* IAM + +* Autoscaling (ASG) + +We'll continue to evaluate the selected services as our user base grows and changes. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md new file mode 100644 index 00000000000..017f1706f19 --- /dev/null +++ b/docs/DEVELOPMENT.md @@ -0,0 +1,53 @@ +# Development Environment Setup + +## Requirements + +- [Terraform](https://www.terraform.io/downloads.html) 0.10+ +- [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin) + +## Quick Start + +If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (please check the [requirements](#requirements) before proceeding). + +*Note:* This project uses [Go Modules](https://blog.golang.org/using-go-modules) making it safe to work with it outside of your existing [GOPATH](http://golang.org/doc/code.html#GOPATH). The instructions that follow assume a directory in your home directory outside of the standard GOPATH (i.e `$HOME/development/terraform-providers/`). + +Clone repository to: `$HOME/development/terraform-providers/` + +```sh +$ mkdir -p $HOME/development/terraform-providers/; cd $HOME/development/terraform-providers/ +$ git clone git@github.com:terraform-providers/terraform-provider-aws +... +``` + +Enter the provider directory and run `make tools`. This will install the needed tools for the provider. + +```sh +$ make tools +``` + +To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. + +```sh +$ make build +... +$ $GOPATH/bin/terraform-provider-aws +... +``` + +## Testing the Provider + +In order to test the provider, you can run `make test`. + +*Note:* Make sure no `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` variables are set, and there's no `[default]` section in the AWS credentials file `~/.aws/credentials`. + +```sh +$ make test +``` + +In order to run the full suite of Acceptance tests, run `make testacc`. + +*Note:* Acceptance tests create real resources, and often cost money to run. Please read [Running and Writing Acceptance Tests](contributing/running-and-writing-acceptance-tests.md) in the contribution guidelines for more information on usage. + +```sh +$ make testacc +``` \ No newline at end of file diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 00000000000..180bc97de3a --- /dev/null +++ b/docs/FAQ.md @@ -0,0 +1,74 @@ +# Frequently Asked Questions + +### Who are the maintainers? + +The HashiCorp Terraform AWS provider team is : + +* Mary Cutrali, Product Manager - GitHub [@maryelizbeth](https://github.com/maryelizbeth) Twitter [@marycutrali](https://twitter.com/marycutrali) +* Brian Flad, Engineering Lead GitHub [@bflad](https://github.com/bflad) +* Graham Davison, Engineer - GitHub [@gdavison](https://github.com/gdavison) +* Angie Pinilla, Engineer - GitHub [@angie44](https://github.com/angie44) +* Simon Davis, Engineering Manager - GitHub [@breathingdust](https://github.com/breathingdust) +* Kerim Satirli, Developer Advocate - GitHub [@ksatirli](https://github.com/ksatirli) + +### Why isn’t my PR merged yet? + +Unfortunately, due to the volume of issues and new pull requests we receive, we are unable to give each one the full attention that we would like. We always focus on the contributions that provide the greatest value to the most community members. + +### How do you decide what gets merged for each release? + +The number one factor we look at when deciding what issues to look at are your 👍 [reactions](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue/PR description as these can be easily discovered. Comments that further explain desired use cases or poor user experience are also heavily factored. The items with the most support are always on our radar, and we commit to keep the community updated on their status and potential timelines. + +We publish a [roadmap](../ROADMAP.md) every quarter which describes major themes or specific product areas of focus. + +We also are investing time to improve the contributing experience by improving documentation, adding more linter coverage to ensure that incoming PR's can be in as good shape as possible. This will allow us to get through them quicker. + +### How often do you release? + +We release weekly on Thursday. We release often to ensure we can bring value to the community at a frequent cadence and to ensure we are in a good place to react to AWS region launches and service announcements. + +### Backward Compatibility Promise + +Our policy is described on the Terraform website [here](https://www.terraform.io/docs/extend/best-practices/versioning.html). While we do our best to prevent breaking changes until major version releases of the provider, it is generally recommended to [pin the provider version in your configuration](https://www.terraform.io/docs/configuration/providers.html#provider-versions). + +Due to the constant release pace of AWS and the relatively infrequent major version releases of the provider, there can be cases where a minor version update may contain unexpected changes depending on your configuration or environment. These may include items such as a resource requiring additional IAM permissions to support newer functionality. We typically base these decisions on a pragmatic compromise between introducing a relatively minor one-time inconvenience for a subset of the community versus better overall user experience for the entire community. + +### AWS just announced a new region, when will I see it in the provider. + +Normally pretty quickly. We usually see the region appear within the `aws-go-sdk` within a couple days of the announcement. Depending on when it lands, we can often get it out within the current or following weekly release. Comparatively, adding support for a new region in the S3 backend can take a little longer, as it is shipped as part of Terraform Core and not via the AWS Provider. + +Please note that this new region requires a manual process to enable in your account. Once enabled in the console, it takes a few minutes for everything to work properly. + +If the region is not enabled properly, or the enablement process is still in progress, you may receive errors like these: + +``` +$ terraform apply + +Error: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid. + status code: 403, request id: 142f947b-b2c3-11e9-9959-c11ab17bcc63 + + on main.tf line 1, in provider "aws": + 1: provider "aws" { +``` + +To use this new region before support has been added to the Terraform AWS Provider, you can disable the provider's automatic region validation via: + +```hcl +provider "aws" { + # ... potentially other configuration ... + + region = "af-south-1" + skip_region_validation = true +} + +``` + +### How can I help? + +Great question, if you have contributed before check out issues with the `help-wanted` label. These are normally enhancement issues that will have a great impact, but the maintainers are unable to develop them in the near future. If you are just getting started, take a look at issues with the `good-first-issue` label. Items with these labels will always be given priority for response. + +Check out the [Contributing Guide](CONTRIBUTING.md) for additional information. + +### How can I become a maintainer? + +This is an area under active research. Stay tuned! diff --git a/docs/MAINTAINING.md b/docs/MAINTAINING.md new file mode 100644 index 00000000000..c65894b8dee --- /dev/null +++ b/docs/MAINTAINING.md @@ -0,0 +1,503 @@ +# Maintaining the Terraform AWS Provider + + + +- [Pull Requests](#pull-requests) + - [Pull Request Review Process](#pull-request-review-process) + - [Dependency Updates](#dependency-updates) + - [Go Default Version Update](#go-default-version-update) + - [AWS Go SDK Updates](#aws-go-sdk-updates) + - [golangci-lint Updates](#golangci-lint-updates) + - [Terraform Plugin SDK Updates](#terraform-plugin-sdk-updates) + - [tfproviderdocs Updates](#tfproviderdocs-updates) + - [tfproviderlint Updates](#tfproviderlint-updates) + - [yaml.v2 Updates](#yaml-v2-updates) + - [Pull Request Merge Process](#pull-request-merge-process) + - [Pull Request Types to CHANGELOG](#pull-request-types-to-changelog) +- [Breaking Changes](#breaking-changes) +- [Environment Variable Dictionary](#environment-variable-dictionary) +- [Label Dictionary](#label-dictionary) + + + +## Community Maintainers + +Members of the community who participate in any aspects of maintaining the provider must adhere to the HashiCorp [Community Guidelines](https://www.hashicorp.com/community-guidelines). + +## Triage + +Incoming issues are classified using labels. These are assigned either by automation, or manually during the triage process. We follow a two-label system where we classify by type and by the area of the provider they affect. A full listing of the labels and how they are used can be found in the [Label Dictionary](#label-dictionary). + +## Pull Requests + +### Pull Request Review Process + +Notes for each type of pull request are (or will be) available in subsections below. + +- If you plan to be responsible for the pull request through the merge/closure process, assign it to yourself +- Add `bug`, `enhancement`, `new-data-source`, `new-resource`, or `technical-debt` labels to match expectations from change +- Perform a quick scan of open issues and ensure they are referenced in the pull request description (e.g. `Closes #1234`, `Relates #5678`). Edit the description yourself and mention this to the author: + +```markdown +This pull request appears to be related to/solve #1234, so I have edited the pull request description to denote the issue reference. +``` + +- Review the contents of the pull request and ensure the change follows the relevant section of the [Contributing Guide](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#checklists-for-contribution) +- If the change is not acceptable, leave a long form comment about the reasoning and close the pull request +- If the change is acceptable with modifications, leave a pull request review marked using the `Request Changes` option (for maintainer pull requests with minor modification requests, giving feedback with the `Approve` option is recommended so they do not need to wait for another round of review) +- If the author is unresponsive for changes (by default we give two weeks), determine importance and level of effort to finish the pull request yourself including their commits or close the pull request +- Run relevant acceptance testing ([locally](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#running-an-acceptance-test) or in TeamCity) against AWS Commercial and AWS GovCloud (US) to ensure no new failures are being introduced +- Approve the pull request with a comment outlining what steps you took that ensure the change is acceptable, e.g. acceptance testing output + +``````markdown +Looks good, thanks @username! :rocket: + +Output from acceptance testing in AWS Commercial: + +``` +--- PASS: TestAcc... +--- PASS: TestAcc... +``` + +Output from acceptance testing in AWS GovCloud (US): + +``` +--- PASS: TestAcc... +--- PASS: TestAcc... +``` +`````` + +#### Dependency Updates + +##### Go Default Version Update + +This project typically upgrades its Go version for development and testing shortly after release to get the latest and greatest Go functionality. Before beginning the update process, ensure that you review the new version release notes to look for any areas of possible friction when updating. + +Create an issue to cover the update noting down any areas of particular interest or friction. + +Ensure that the following steps are tracked within the issue and completed within the resulting pull request. + +- Update go version in `go.mod` +- Verify all formatting, linting, and testing works as expected +- Verify `gox` builds for all currently supported architectures: +``` +gox -os='linux darwin windows freebsd openbsd solaris' -arch='386 amd64 arm' -osarch='!darwin/arm !darwin/386' -ldflags '-s -w -X aws/version.ProviderVersion=99.99.99 -X aws/version.ProtocolVersion=4' -output 'results/{{.OS}}_{{.Arch}}/terraform-provider-aws_v99.99.99_x4' . +``` +- Verify `goenv` support for the new version +- Update `docs/DEVELOPMENT.md` +- Update `.github/workflows/*.yml` +- Update `.go-version` +- Update `.travis.yml` +- Update `CHANGELOG.md` detailing the update and mention any notes practitioners need to be aware of. + +See [#9992](https://github.com/terraform-providers/terraform-provider-aws/issues/9992) / [#10206](https://github.com/terraform-providers/terraform-provider-aws/pull/10206) for a recent example. + +##### AWS Go SDK Updates + +Almost exclusively, `github.com/aws/aws-sdk-go` updates are additive in nature. It is generally safe to only scan through them before approving and merging. If you have any concerns about any of the service client updates such as suspicious code removals in the update, or deprecations introduced, run the acceptance testing for potentially affected resources before merging. + +Authentication changes: + +Occassionally, there will be changes listed in the authentication pieces of the AWS Go SDK codebase, e.g. changes to `aws/session`. The AWS Go SDK `CHANGELOG` should include a relevant description of these changes under a heading such as `SDK Enhancements` or `SDK Bug Fixes`. If they seem worthy of a callout in the Terraform AWS Provider `CHANGELOG`, then upon merging we should include a similar message prefixed with the `provider` subsystem, e.g. `* provider: ...`. + +Additionally, if a `CHANGELOG` addition seemed appropriate, this dependency and version should also be updated in the Terraform S3 Backend, which currently lives in Terraform Core. An example of this can be found with https://github.com/terraform-providers/terraform-provider-aws/pull/9305 and https://github.com/hashicorp/terraform/pull/22055. + +CloudFront changes: + +CloudFront service client updates have previously caused an issue when a new field introduced in the SDK was not included with Terraform and caused all requests to error (https://github.com/terraform-providers/terraform-provider-aws/issues/4091). As a precaution, if you see CloudFront updates, run all the CloudFront resource acceptance testing before merging (`TestAccAWSCloudFront`). + +New Regions: + +These are added to the AWS Go SDK `aws/endpoints/defaults.go` file and generally noted in the AWS Go SDK `CHANGELOG` as `aws/endpoints: Updated Regions`. Since April 2019, new regions added to AWS now require being explicitly enabled before they can be used. Examples of this can be found when `me-south-1` was announced: + +- [Terraform AWS Provider issue](https://github.com/terraform-providers/terraform-provider-aws/issues/9545) +- [Terraform AWS Provider AWS Go SDK update pull request](https://github.com/terraform-providers/terraform-provider-aws/pull/9538) +- [Terraform AWS Provider data source update pull request](https://github.com/terraform-providers/terraform-provider-aws/pull/9547) +- [Terraform S3 Backend issue](https://github.com/hashicorp/terraform/issues/22254) +- [Terraform S3 Backend pull request](https://github.com/hashicorp/terraform/pull/22253) + +Typically our process for new regions is as follows: + +- Create new (if not existing) Terraform AWS Provider issue: Support Automatic Region Validation for `XX-XXXXX-#` (Location) +- Create new (if not existing) Terraform S3 Backend issue: backend/s3: Support Automatic Region Validation for `XX-XXXXX-#` (Location) +- [Enable the new region in an AWS testing account](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable) and verify AWS Go SDK update works with the new region with `export AWS_DEFAULT_REGION=XX-XXXXX-#` with the new region and run the `TestAccDataSourceAwsRegion_` acceptance testing or by building the provider and testing a configuration like the following: + +```hcl +provider "aws" { + region = "me-south-1" +} + +data "aws_region" "current" {} + +output "region" { + value = data.aws_region.current.name +} +``` + +- Merge AWS Go SDK update in Terraform AWS Provider and close issue with the following information: + +``````markdown +Support for automatic validation of this new region has been merged and will release with version of the Terraform AWS Provider, later this week. + +--- + +Please note that this new region requires [a manual process to enable](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). Once enabled in the console, it takes a few minutes for everything to work properly. + +If the region is not enabled properly, or the enablement process is still in progress, you can receive errors like these: + +```console +$ terraform apply + +Error: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid. + status code: 403, request id: 142f947b-b2c3-11e9-9959-c11ab17bcc63 + + on main.tf line 1, in provider "aws": + 1: provider "aws" { +``` + +--- + +To use this new region before support has been added to Terraform AWS Provider version in use, you must disable the provider's automatic region validation via: + +```hcl +provider "aws" { + # ... potentially other configuration ... + + region = "me-south-1" + skip_region_validation = true +} +``` +`````` + +- Update the Terraform AWS Provider `CHANGELOG` with the following: + +```markdown +NOTES: + +* provider: Region validation now automatically supports the new `XX-XXXXX-#` (Location) region. For AWS operations to work in the new region, the region must be explicitly enabled as outlined in the [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). When the region is not enabled, the Terraform AWS Provider will return errors during credential validation (e.g. `error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid`) or AWS operations will throw their own errors (e.g. `data.aws_availability_zones.current: Error fetching Availability Zones: AuthFailure: AWS was not able to validate the provided access credentials`). [GH-####] + +ENHANCEMENTS: + +* provider: Support automatic region validation for `XX-XXXXX-#` [GH-####] +``` + +- Follow the [Contributing Guide](https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#new-region) to submit updates for various data sources to support the new region +- Submit the dependency update to the Terraform S3 Backend by running the following: + +```shell +go get github.com/aws/aws-sdk-go@v#.#.# +go mod tidy +go mod vendor +``` + +- Create a S3 Bucket in the new region and verify AWS Go SDK update works with new region by building the Terraform S3 Backend and testing a configuration like the following: + +```hcl +terraform { + backend "s3" { + bucket = "XXX" + key = "test" + region = "me-south-1" + } +} + +output "test" { + value = timestamp() +} +``` + +- After approval, merge AWS Go SDK update in Terraform S3 Backend and close issue with the following information: + +``````markdown +Support for automatic validation of this new region has been merged and will release with the next version of the Terraform. + +This was verified on a build of Terraform with the update: + +```hcl +terraform { + backend "s3" { + bucket = "XXX" + key = "test" + region = "me-south-1" + } +} + +output "test" { + value = timestamp() +} +``` + +Outputs: + +```console +$ terraform init +... +Terraform has been successfully initialized! +``` + +--- + +Please note that this new region requires [a manual process to enable](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). Once enabled in the console, it takes a few minutes for everything to work properly. + +If the region is not enabled properly, or the enablement process is still in progress, you can receive errors like these: + +```console +$ terraform init + +Initializing the backend... + +Error: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid. +``` + +--- + +To use this new region before this update is released, you must disable the Terraform S3 Backend's automatic region validation via: + +```hcl +terraform { + # ... potentially other configuration ... + + backend "s3" { + # ... other configuration ... + + region = "me-south-1" + skip_region_validation = true + } +} +``` +`````` + +- Update the Terraform S3 Backend `CHANGELOG` with the following: + +```markdown +NOTES: + +* backend/s3: Region validation now automatically supports the new `XX-XXXXX-#` (Location) region. For AWS operations to work in the new region, the region must be explicitly enabled as outlined in the [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). When the region is not enabled, the Terraform S3 Backend will return errors during credential validation (e.g. `error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid`). [GH-####] + +ENHANCEMENTS: + +* backend/s3: Support automatic region validation for `XX-XXXXX-#` [GH-####] +``` + +##### golangci-lint Updates + +Merge if CI passes. + +##### Terraform Plugin SDK Updates + +Except for trivial changes, run the full acceptance testing suite against the pull request and verify there are no new or unexpected failures. + +##### tfproviderdocs Updates + +Merge if CI passes. + +##### tfproviderlint Updates + +Merge if CI passes. + +##### yaml.v2 Updates + +Run the acceptance testing pattern, `TestAccAWSCloudFormationStack(_dataSource)?_yaml`, and merge if passing. + +### Pull Request Merge Process + +- Add this pull request to the upcoming release milestone +- Add any linked issues that will be closed by the pull request to the same upcoming release milestone +- Merge the pull request +- Delete the branch (if the branch is on this repository) +- Determine if the pull request should have a CHANGELOG entry by reviewing the [Pull Request Types to CHANGELOG section](#pull-request-types-to-changelog). If so, update the repository `CHANGELOG.md` by directly committing to the `master` branch (e.g. editing the file in the GitHub web interface). See also the [Extending Terraform documentation](https://www.terraform.io/docs/extend/best-practices/versioning.html) for more information about the expected CHANGELOG format. +- Leave a comment on any issues closed by the pull request noting that it has been merged and when to expect the release containing it, e.g. + +```markdown +The fix for this has been merged and will release with version X.Y.Z of the Terraform AWS Provider, expected in the XXX timeframe. +``` + +### Pull Request Types to CHANGELOG + +The CHANGELOG is intended to show operator-impacting changes to the codebase for a particular version. If every change or commit to the code resulted in an entry, the CHANGELOG would become less useful for operators. The lists below are general guidelines on when a decision needs to be made to decide whether a change should have an entry. + +#### Changes that should have a CHANGELOG entry: + +- New Resources and Data Sources +- New full-length documentation guides (e.g. EKS Getting Started Guide, IAM Policy Documents with Terraform) +- Resource and provider bug fixes +- Resource and provider enhancements +- Deprecations +- Removals + +#### Changes that may have a CHANGELOG entry: + +- Dependency updates: If the update contains relevant bug fixes or enhancements that affect operators, those should be called out. + +#### Changes that should _not_ have a CHANGELOG entry: + +- Resource and provider documentation updates +- Testing updates + +## Breaking Changes + +When breaking changes to the provider are necessary we release them in a major version. If an issue or PR necessitates a breaking change, then the following procedure should be observed: +- Add the `breaking-change` label. +- Add the issue/PR to the next major version milestone. +- Leave a comment why this is a breaking change or otherwise only being considered for a major version update. If possible, detail any changes that might be made for the contributor to accomplish the task without a breaking change. + +## Environment Variable Dictionary + +Environment variables (beyond standard AWS Go SDK ones) used by acceptance testing. + +| Variable | Description | +|----------|-------------| +| `ACM_CERTIFICATE_ROOT_DOMAIN` | Root domain name to use with ACM Certificate testing. | +| `ACM_CERTIFICATE_MULTIPLE_ISSUED_DOMAIN` | Domain name of ACM Certificate with a multiple issued certificates. **DEPRECATED:** Should be replaced with `aws_acm_certficate` resource usage in tests. | +| `ACM_CERTIFICATE_MULTIPLE_ISSUED_MOST_RECENT_ARN` | Amazon Resource Name of most recent ACM Certificate with a multiple issued certificates. **DEPRECATED:** Should be replaced with `aws_acm_certficate` resource usage in tests. | +| `ACM_CERTIFICATE_SINGLE_ISSUED_DOMAIN` | Domain name of ACM Certificate with a single issued certificate. **DEPRECATED:** Should be replaced with `aws_acm_certficate` resource usage in tests. | +| `ACM_CERTIFICATE_SINGLE_ISSUED_MOST_RECENT_ARN` | Amazon Resource Name of most recent ACM Certificate with a single issued certificate. **DEPRECATED:** Should be replaced with `aws_acm_certficate` resource usage in tests. | +| `ADM_CLIENT_ID` | Identifier for Amazon Device Manager Client in Pinpoint testing. | +| `ADM_CLIENT_SECRET` | Secret for Amazon Device Manager Client in Pinpoint testing. | +| `APNS_BUNDLE_ID` | Identifier for Apple Push Notification Service Bundle in Pinpoint testing. | +| `APNS_CERTIFICATE` | Certificate (PEM format) for Apple Push Notification Service in Pinpoint testing. | +| `APNS_CERTIFICATE_PRIVATE_KEY` | Private key for Apple Push Notification Service in Pinpoint testing. | +| `APNS_SANDBOX_BUNDLE_ID` | Identifier for Sandbox Apple Push Notification Service Bundle in Pinpoint testing. | +| `APNS_SANDBOX_CERTIFICATE` | Certificate (PEM format) for Sandbox Apple Push Notification Service in Pinpoint testing. | +| `APNS_SANDBOX_CERTIFICATE_PRIVATE_KEY` | Private key for Sandbox Apple Push Notification Service in Pinpoint testing. | +| `APNS_SANDBOX_CREDENTIAL` | Credential contents for Sandbox Apple Push Notification Service in SNS Application Platform testing. Conflicts with `APNS_SANDBOX_CREDENTIAL_PATH`. | +| `APNS_SANDBOX_CREDENTIAL_PATH` | Path to credential for Sandbox Apple Push Notification Service in SNS Application Platform testing. Conflicts with `APNS_SANDBOX_CREDENTIAL`. | +| `APNS_SANDBOX_PRINCIPAL` | Principal contents for Sandbox Apple Push Notification Service in SNS Application Platform testing. Conflicts with `APNS_SANDBOX_PRINCIPAL_PATH`. | +| `APNS_SANDBOX_PRINCIPAL_PATH` | Path to principal for Sandbox Apple Push Notification Service in SNS Application Platform testing. Conflicts with `APNS_SANDBOX_PRINCIPAL`. | +| `APNS_SANDBOX_TEAM_ID` | Identifier for Sandbox Apple Push Notification Service Team in Pinpoint testing. | +| `APNS_SANDBOX_TOKEN_KEY` | Token key file content (.p8 format) for Sandbox Apple Push Notification Service in Pinpoint testing. | +| `APNS_SANDBOX_TOKEN_KEY_ID` | Identifier for Sandbox Apple Push Notification Service Token Key in Pinpoint testing. | +| `APNS_TEAM_ID` | Identifier for Apple Push Notification Service Team in Pinpoint testing. | +| `APNS_TOKEN_KEY` | Token key file content (.p8 format) for Apple Push Notification Service in Pinpoint testing. | +| `APNS_TOKEN_KEY_ID` | Identifier for Apple Push Notification Service Token Key in Pinpoint testing. | +| `APNS_VOIP_BUNDLE_ID` | Identifier for VOIP Apple Push Notification Service Bundle in Pinpoint testing. | +| `APNS_VOIP_CERTIFICATE` | Certificate (PEM format) for VOIP Apple Push Notification Service in Pinpoint testing. | +| `APNS_VOIP_CERTIFICATE_PRIVATE_KEY` | Private key for VOIP Apple Push Notification Service in Pinpoint testing. | +| `APNS_VOIP_TEAM_ID` | Identifier for VOIP Apple Push Notification Service Team in Pinpoint testing. | +| `APNS_VOIP_TOKEN_KEY` | Token key file content (.p8 format) for VOIP Apple Push Notification Service in Pinpoint testing. | +| `APNS_VOIP_TOKEN_KEY_ID` | Identifier for VOIP Apple Push Notification Service Token Key in Pinpoint testing. | +| `AWS_ALTERNATE_ACCESS_KEY_ID` | AWS access key ID with access to a secondary AWS account for tests requiring multiple accounts. Requires `AWS_ALTERNATE_SECRET_ACCESS_KEY`. Conflicts with `AWS_ALTERNATE_PROFILE`. | +| `AWS_ALTERNATE_SECRET_ACCESS_KEY` | AWS secret access key with access to a secondary AWS account for tests requiring multiple accounts. Requires `AWS_ALTERNATE_ACCESS_KEY_ID`. Conflicts with `AWS_ALTERNATE_PROFILE`. | +| `AWS_ALTERNATE_PROFILE` | AWS profile with access to a secondary AWS account for tests requiring multiple accounts. Conflicts with `AWS_ALTERNATE_ACCESS_KEY_ID` and `AWS_ALTERNATE_SECRET_ACCESS_KEY`. | +| `AWS_ALTERNATE_REGION` | Secondary AWS region for tests requiring multiple regions. Defaults to `us-east-1`. | +| `AWS_API_GATEWAY_DOMAIN_NAME_CERTIFICATE_ARN` | Amazon Resource Name of ACM Certificate in `us-east-1` for API Gateway Domain Name testing. | +| `AWS_API_GATEWAY_DOMAIN_NAME_CERTIFICATE_BODY` | Certificate body of publicly trusted certificate for API Gateway Domain Name testing. | +| `AWS_API_GATEWAY_DOMAIN_NAME_CERTIFICATE_CHAIN` | Certificate chain of publicly trusted certificate for API Gateway Domain Name testing. | +| `AWS_API_GATEWAY_DOMAIN_NAME_CERTIFICATE_PRIVATE_KEY` | Private key of publicly trusted certificate for API Gateway Domain Name testing. | +| `AWS_API_GATEWAY_DOMAIN_NAME_REGIONAL_CERTIFICATE_NAME_ENABLED` | Flag to enable API Gateway Domain Name regional certificate upload testing. | +| `AWS_CODEBUILD_BITBUCKET_SOURCE_LOCATION` | BitBucket source URL for CodeBuild testing. CodeBuild must have access to this repository via OAuth or Source Credentials. Defaults to `https://terraform@bitbucket.org/terraform/aws-test.git`. | +| `AWS_CODEBUILD_GITHUB_SOURCE_LOCATION` | GitHub source URL for CodeBuild testing. CodeBuild must have access to this repository via OAuth or Source Credentials. Defaults to `https://github.com/hashibot-test/aws-test.git`. | +| `AWS_COGNITO_USER_POOL_DOMAIN_CERTIFICATE_ARN` | Amazon Resource Name of ACM Certificate in `us-east-1` for Cognito User Pool Domain Name testing. | +| `AWS_COGNITO_USER_POOL_DOMAIN_ROOT_DOMAIN` | Root domain name to use with Cognito User Pool Domain testing. | +| `AWS_COIP_POOL_ID` | Identifier for EC2 Customer-Owned Pool related testing. Requires `AWS_OUTPOST_ARN`. | +| `AWS_DEFAULT_REGION` | Primary AWS region for tests. Defaults to `us-west-2`. | +| `AWS_EC2_EIP_PUBLIC_IPV4_POOL` | Identifier for EC2 Public IPv4 Pool for EC2 EIP testing. | +| `AWS_GUARDDUTY_MEMBER_ACCOUNT_ID` | Identifier of AWS Account for GuardDuty Member testing. **DEPRECATED:** Should be replaced with standard alternate account handling for tests. | +| `AWS_GUARDDUTY_MEMBER_EMAIL` | Email address for GuardDuty Member testing. **DEPRECATED:** It may be possible to use a placeholder email address instead. | +| `AWS_OUTPOST_ARN` | Amazon Resource Name of Outpost for Outposts related testing. | +| `DX_CONNECTION_ID` | Identifier for Direct Connect Connection testing. | +| `DX_VIRTUAL_INTERFACE_ID` | Identifier for Direct Connect Virtual Interface testing. | +| `EC2_SECURITY_GROUP_RULES_PER_GROUP_LIMIT` | EC2 Quota for Rules per Security Group. Defaults to 50. **DEPRECATED:** Can be augmented or replaced with Service Quotas lookup. | +| `GCM_API_KEY` | API Key for Google Cloud Messaging in Pinpoint and SNS Platform Application testing. | +| `GITHUB_TOKEN` | GitHub token for CodePipeline testing. | +| `MACIE_MEMBER_ACCOUNT_ID` | Identifier of AWS Account for Macie Member testing. **DEPRECATED:** Should be replaced with standard alternate account handling for tests. | +| `SERVICEQUOTAS_INCREASE_ON_CREATE_QUOTA_CODE` | Quota Code for Service Quotas testing (submits support case). | +| `SERVICEQUOTAS_INCREASE_ON_CREATE_SERVICE_CODE` | Service Code for Service Quotas testing (submits support case). | +| `SERVICEQUOTAS_INCREASE_ON_CREATE_VALUE` | Value of quota increase for Service Quotas testing (submits support case). | +| `SES_DOMAIN_IDENTITY_ROOT_DOMAIN` | Root domain name of publicly accessible and Route 53 configurable domain for SES Domain Identity testing. | +| `SWF_DOMAIN_TESTING_ENABLED` | Enables SWF Domain testing (API does not support deletions). | +| `TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL_DOMAIN` | Email address for Organizations Account testing. | +| `TEST_AWS_SES_VERIFIED_EMAIL_ARN` | Verified SES Email Identity for use in Cognito User Pool testing. | +| `TF_ACC` | Enables Go tests containing `resource.Test()` and `resource.ParallelTest()`. | +| `TF_ACC_ASSUME_ROLE_ARN` | Amazon Resource Name of existing IAM Role to use for limited permissions acceptance testing. | +| `TF_TEST_CLOUDFRONT_RETAIN` | Flag to disable but dangle CloudFront Distributions during testing to reduce feedback time (must be manually destroyed afterwards) | + +## Label Dictionary + + + +| Label | Description | Automation | +|---------|-------------|----------| +| [![breaking-change][breaking-change-badge]][breaking-change]                                    | Introduces a breaking change in current functionality; breaking changes are usually deferred to the next major release. | None | +| [![bug][bug-badge]][bug] | Addresses a defect in current functionality. | None | +| [![crash][crash-badge]][crash] | Results from or addresses a Terraform crash or kernel panic. | None | +| [![dependencies][dependencies-badge]][dependencies] | Used to indicate dependency or vendoring changes. | Added by Hashibot. | +| [![documentation][documentation-badge]][documentation] | Introduces or discusses updates to documentation. | None | +| [![enhancement][enhancement-badge]][enhancement] | Requests to existing resources that expand the functionality or scope. | None | +| [![examples][examples-badge]][examples] | Introduces or discusses updates to examples. | None | +| [![good first issue][good-first-issue-badge]][good-first-issue] | Call to action for new contributors looking for a place to start. Smaller or straightforward issues. | None | +| [![hacktoberfest][hacktoberfest-badge]][hacktoberfest] | Call to action for Hacktoberfest (OSS Initiative). | None | +| [![hashibot ignore][hashibot-ignore-badge]][hashibot-ignore] | Issues or PRs labelled with this are ignored by Hashibot. | None | +| [![help wanted][help-wanted-badge]][help-wanted] | Call to action for contributors. Indicates an area of the codebase we’d like to expand/work on but don’t have the bandwidth inside the team. | None | +| [![needs-triage][needs-triage-badge]][needs-triage] | Waiting for first response or review from a maintainer. | Added to all new issues or PRs by GitHub action in `.github/workflows/issues.yml` or PRs by Hashibot in `.hashibot.hcl` unless they were submitted by a maintainer. | +| [![new-data-source][new-data-source-badge]][new-data-source] | Introduces a new data source. | None | +| [![new-resource][new-resource-badge]][new-resource] | Introduces a new resrouce. | None | +| [![proposal][proposal-badge]][proposal] | Proposes new design or functionality. | None | +| [![provider][provider-badge]][provider] | Pertains to the provider itself, rather than any interaction with AWS. | Added by Hashibot when the code change is in an area configured in `.hashibot.hcl` | +| [![question][question-badge]][question] | Includes a question about existing functionality; most questions will be re-routed to discuss.hashicorp.com. | None | +| [![regression][regression-badge]][regression] | Pertains to a degraded workflow resulting from an upstream patch or internal enhancement; usually categorized as a bug. | None | +| [![reinvent][reinvent-badge]][reinvent] | Pertains to a service or feature announced at reinvent. | None | +| ![service <*>][service-badge] | Indicates the service that is covered or introduced (i.e. service/s3) | Added by Hashibot when the code change matches a service definition in `.hashibot.hcl`. +| ![size%2F<*>][size-badge] | Managed by automation to categorize the size of a PR | Added by Hashibot to indicate the size of the PR. | +| [![stale][stale-badge]][stale] | Old or inactive issues managed by automation, if no further action taken these will get closed. | Added by a Github Action, configuration is found: `.github/workflows/stale.yml`. | +| [![technical-debt][technical-debt-badge]][technical-debt] | Addresses areas of the codebase that need refactoring or redesign. | None | +| [![tests][tests-badge]][tests] | On a PR this indicates expanded test coverage. On an Issue this proposes expanded coverage or enhancement to test infrastructure. | None | +| [![thinking][thinking-badge]][thinking] | Requires additional research by the maintainers. | None | +| [![upstream-terraform][upstream-terraform-badge]][upstream-terraform] | Addresses functionality related to the Terraform core binary. | None | +| [![upstream][upstream-badge]][upstream] | Addresses functionality related to the cloud provider. | None | +| [![waiting-response][waiting-response-badge]][waiting-response] | Maintainers are waiting on response from community or contributor. | None | + +[breaking-change-badge]: https://img.shields.io/badge/breaking--change-d93f0b +[breaking-change]: https://github.com/terraform-providers/terraform-provider-aws/labels/breaking-change +[bug-badge]: https://img.shields.io/badge/bug-f7c6c7 +[bug]: https://github.com/terraform-providers/terraform-provider-aws/labels/bug +[crash-badge]: https://img.shields.io/badge/crash-e11d21 +[crash]: https://github.com/terraform-providers/terraform-provider-aws/labels/crash +[dependencies-badge]: https://img.shields.io/badge/dependencies-fad8c7 +[dependencies]: https://github.com/terraform-providers/terraform-provider-aws/labels/dependencies +[documentation-badge]: https://img.shields.io/badge/documentation-fef2c0 +[documentation]: https://github.com/terraform-providers/terraform-provider-aws/labels/documentation +[enhancement-badge]: https://img.shields.io/badge/enhancement-d4c5f9 +[enhancement]: https://github.com/terraform-providers/terraform-provider-aws/labels/enhancement +[examples-badge]: https://img.shields.io/badge/examples-fef2c0 +[examples]: https://github.com/terraform-providers/terraform-provider-aws/labels/examples +[good-first-issue-badge]: https://img.shields.io/badge/good%20first%20issue-128A0C +[good-first-issue]: https://github.com/terraform-providers/terraform-provider-aws/labels/good%20first%20issue +[hacktoberfest-badge]: https://img.shields.io/badge/hacktoberfest-2c0fad +[hacktoberfest]: https://github.com/terraform-providers/terraform-provider-aws/labels/hacktoberfest +[hashibot-ignore-badge]: https://img.shields.io/badge/hashibot%2Fignore-2c0fad +[hashibot-ignore]: https://github.com/terraform-providers/terraform-provider-aws/labels/hashibot-ignore +[help-wanted-badge]: https://img.shields.io/badge/help%20wanted-128A0C +[help-wanted]: https://github.com/terraform-providers/terraform-provider-aws/labels/help-wanted +[needs-triage-badge]: https://img.shields.io/badge/needs--triage-e236d7 +[needs-triage]: https://github.com/terraform-providers/terraform-provider-aws/labels/needs-triage +[new-data-source-badge]: https://img.shields.io/badge/new--data--source-d4c5f9 +[new-data-source]: https://github.com/terraform-providers/terraform-provider-aws/labels/new-data-source +[new-resource-badge]: https://img.shields.io/badge/new--resource-d4c5f9 +[new-resource]: https://github.com/terraform-providers/terraform-provider-aws/labels/new-resource +[proposal-badge]: https://img.shields.io/badge/proposal-fbca04 +[proposal]: https://github.com/terraform-providers/terraform-provider-aws/labels/proposal +[provider-badge]: https://img.shields.io/badge/provider-bfd4f2 +[provider]: https://github.com/terraform-providers/terraform-provider-aws/labels/provider +[question-badge]: https://img.shields.io/badge/question-d4c5f9 +[question]: https://github.com/terraform-providers/terraform-provider-aws/labels/question +[regression-badge]: https://img.shields.io/badge/regression-e11d21 +[regression]: https://github.com/terraform-providers/terraform-provider-aws/labels/regression +[reinvent-badge]: https://img.shields.io/badge/reinvent-c5def5 +[reinvent]: https://github.com/terraform-providers/terraform-provider-aws/labels/reinvent +[service-badge]: https://img.shields.io/badge/service%2F<*>-bfd4f2 +[size-badge]: https://img.shields.io/badge/size%2F<*>-ffffff +[stale-badge]: https://img.shields.io/badge/stale-e11d21 +[stale]: https://github.com/terraform-providers/terraform-provider-aws/labels/stale +[technical-debt-badge]: https://img.shields.io/badge/technical--debt-1d76db +[technical-debt]: https://github.com/terraform-providers/terraform-provider-aws/labels/technical-debt +[tests-badge]: https://img.shields.io/badge/tests-DDDDDD +[tests]: https://github.com/terraform-providers/terraform-provider-aws/labels/tests +[thinking-badge]: https://img.shields.io/badge/thinking-bfd4f2 +[thinking]: https://github.com/terraform-providers/terraform-provider-aws/labels/thinking +[upstream-terraform-badge]: https://img.shields.io/badge/upstream--terraform-CCCCCC +[upstream-terraform]: https://github.com/terraform-providers/terraform-provider-aws/labels/upstream-terraform +[upstream-badge]: https://img.shields.io/badge/upstream-fad8c7 +[upstream]: https://github.com/terraform-providers/terraform-provider-aws/labels/upstream +[waiting-response-badge]: https://img.shields.io/badge/waiting--response-5319e7 +[waiting-response]: https://github.com/terraform-providers/terraform-provider-aws/labels/waiting-response diff --git a/docs/contributing/contribution-checklists.md b/docs/contributing/contribution-checklists.md new file mode 100644 index 00000000000..f7df2e12fdb --- /dev/null +++ b/docs/contributing/contribution-checklists.md @@ -0,0 +1,580 @@ +# Contribution Types and Checklists + +There are several different kinds of contribution, each of which has its own +standards for a speedy review. The following sections describe guidelines for +each type of contribution. + +- [Documentation Update](#documentation-update) +- [Enhancement/Bugfix to a Resource](#enhancementbugfix-to-a-resource) +- [Adding Resource Import Support](#adding-resource-import-support) +- [Adding Resource Name Generation Support](#adding-resource-name-generation-support) + - [Resource Name Generation Code Implementation](#resource-name-generation-code-implementation) + - [Resource Name Generation Testing Implementation](#resource-name-generation-testing-implementation) + - [Resource Code Generation Documentation Implementation](#resource-code-generation-documentation-implementation) +- [Adding Resource Policy Support](#adding-resource-policy-support) +- [Adding Resource Tagging Support](#adding-resource-tagging-support) + - [Adding Service to Tag Generating Code](#adding-service-to-tag-generating-code) + - [Resource Tagging Code Implementation](#resource-tagging-code-implementation) + - [Resource Tagging Acceptance Testing Implementation](#resource-tagging-acceptance-testing-implementation) + - [Resource Tagging Documentation Implementation](#resource-tagging-documentation-implementation) +- [New Resource](#new-resource) +- [New Service](#new-service) +- [New Region](#new-region) + +## Documentation Update + +The [Terraform AWS Provider's website source][website] is in this repository +along with the code and tests. Below are some common items that will get +flagged during documentation reviews: + +- [ ] __Reasoning for Change__: Documentation updates should include an explanation for why the update is needed. +- [ ] __Prefer AWS Documentation__: Documentation about AWS service features and valid argument values that are likely to update over time should link to AWS service user guides and API references where possible. +- [ ] __Large Example Configurations__: Example Terraform configuration that includes multiple resource definitions should be added to the repository `examples` directory instead of an individual resource documentation page. Each directory under `examples` should be self-contained to call `terraform apply` without special configuration. +- [ ] __Terraform Configuration Language Features__: Individual resource documentation pages and examples should refrain from highlighting particular Terraform configuration language syntax workarounds or features such as `variable`, `local`, `count`, and built-in functions. + +## Enhancement/Bugfix to a Resource + +Working on existing resources is a great way to get started as a Terraform +contributor because you can work within existing code and tests to get a feel +for what to do. + +In addition to the below checklist, please see the [Common Review +Items](pullrequest-submission-and-lifecycle.md#common-review-items) sections for more specific coding and testing +guidelines. + + - [ ] __Acceptance test coverage of new behavior__: Existing resources each + have a set of [acceptance tests][acctests] covering their functionality. + These tests should exercise all the behavior of the resource. Whether you are + adding something or fixing a bug, the idea is to have an acceptance test that + fails if your code were to be removed. Sometimes it is sufficient to + "enhance" an existing test by adding an assertion or tweaking the config + that is used, but it's often better to add a new test. You can copy/paste an + existing test and follow the conventions you see there, modifying the test + to exercise the behavior of your code. + - [ ] __Documentation updates__: If your code makes any changes that need to + be documented, you should include those doc updates in the same PR. This + includes things like new resource attributes or changes in default values. + The [Terraform website][website] source is in this repo and includes + instructions for getting a local copy of the site up and running if you'd + like to preview your changes. + - [ ] __Well-formed Code__: Do your best to follow existing conventions you + see in the codebase, and ensure your code is formatted with `go fmt`. (The + Travis CI build will fail if `go fmt` has not been run on incoming code.) + The PR reviewers can help out on this front, and may provide comments with + suggestions on how to improve the code. + - [ ] __Vendor additions__: Create a separate PR if you are updating the vendor + folder. This is to avoid conflicts as the vendor versions tend to be fast- + moving targets. We will plan to merge the PR with this change first. + +## Adding Resource Import Support + +Adding import support for Terraform resources will allow existing infrastructure to be managed within Terraform. This type of enhancement generally requires a small to moderate amount of code changes. + +Comprehensive code examples and information about resource import support can be found in the [Extending Terraform documentation](https://www.terraform.io/docs/extend/resources/import.html). + +In addition to the below checklist and the items noted in the Extending Terraform documentation, please see the [Common Review Items](pullrequest-submission-and-lifecycle.md#common-review-items) sections for more specific coding and testing guidelines. + +- [ ] _Resource Code Implementation_: In the resource code (e.g. `aws/resource_aws_service_thing.go`), implementation of `Importer` `State` function +- [ ] _Resource Acceptance Testing Implementation_: In the resource acceptance testing (e.g. `aws/resource_aws_service_thing_test.go`), implementation of `TestStep`s with `ImportState: true` +- [ ] _Resource Documentation Implementation_: In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), addition of `Import` documentation section at the bottom of the page + +## Adding Resource Name Generation Support + +Terraform AWS Provider resources can use shared logic to support and test name generation, where the operator can choose between an expected naming value, a generated naming value with a prefix, or a fully generated name. + +Implementing name generation support for Terraform AWS Provider resources requires the following, each with its own section below: + +- [ ] _Resource Name Generation Code Implementation_: In the resource code (e.g. `aws/resource_aws_service_thing.go`), implementation of `name_prefix` attribute, along with handling in `Create` function. +- [ ] _Resource Name Generation Testing Implementation_: In the resource acceptance testing (e.g. `aws/resource_aws_service_thing_test.go`), implementation of new acceptance test functions and configurations to exercise new naming logic. +- [ ] _Resource Name Generation Documentation Implementation_: In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), addition of `name_prefix` argument and update of `name` argument description. + +### Resource Name Generation Code Implementation + +- In the resource Go file (e.g. `aws/resource_aws_service_thing.go`), add the following Go import: `"github.com/terraform-providers/terraform-provider-aws/aws/internal/naming"` +- In the resource schema, add the new `name_prefix` attribute and adjust the `name` attribute to be `Optional`, `Computed`, and `ConflictsWith` the `name_prefix` attribute. Ensure to keep any existing schema fields on `name` such as `ValidateFunc`. e.g. + +```go +"name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, +}, +"name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, +}, +``` + +- In the resource `Create` function, switch any calls from `d.Get("name").(string)` to instead use the `naming.Generate()` function, e.g. + +```go +name := naming.Generate(d.Get("name").(string), d.Get("name_prefix").(string)) + +// ... in AWS Go SDK Input types, etc. use aws.String(name) +``` + +### Resource Name Generation Testing Implementation + +- In the resource testing (e.g. `aws/resource_aws_service_thing_test.go`), add the following Go import: `"github.com/terraform-providers/terraform-provider-aws/aws/internal/naming"` +- In the resource testing, implement two new tests named `_Name_Generated` and `_NamePrefix` with associated configurations, that verifies creating the resource without `name` and `name_prefix` arguments (for the former) and with only the `name_prefix` argument (for the latter). e.g. + +```go +func TestAccAWSServiceThing_Name_Generated(t *testing.T) { + var thing service.ServiceThing + resourceName := "aws_service_thing.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSServiceThingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSServiceThingConfigNameGenerated(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSServiceThingExists(resourceName, &thing), + naming.TestCheckResourceAttrNameGenerated(resourceName, "name"), + ), + }, + // If the resource supports import: + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSServiceThing_NamePrefix(t *testing.T) { + var thing service.ServiceThing + resourceName := "aws_service_thing.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSServiceThingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSServiceThingConfigNamePrefix("tf-acc-test-prefix-"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSServiceThingExists(resourceName, &thing), + naming.TestCheckResourceAttrNameFromPrefix(resourceName, "name", "tf-acc-test-prefix-"), + ), + }, + // If the resource supports import: + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccAWSServiceThingConfigNameGenerated() string { + return fmt.Sprintf(` +resource "aws_service_thing" "test" { + # ... other configuration ... +} +`) +} + +func testAccAWSServiceThingConfigNamePrefix(namePrefix string) string { + return fmt.Sprintf(` +resource "aws_service_thing" "test" { + # ... other configuration ... + + name_prefix = %[1]q +} +`, namePrefix) +} +``` + +### Resource Code Generation Documentation Implementation + +- In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), add the following to the arguments reference: + +```markdown +* `name_prefix` - (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. +``` + +- Adjust the existing `name` argument reference to ensure its denoted as `Optional`, includes a mention that it can be generated, and that it conflicts with `name_prefix`: + +```markdown +* `name` - (Optional) Name of the thing. If omitted, Terraform will assign a random, unique name. Conflicts with `name_prefix`. +``` + +## Adding Resource Policy Support + +Some AWS components support [resource-based IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html) to control permissions. When implementing this support in the Terraform AWS Provider, we typically prefer creating a separate resource, `aws_{SERVICE}_{THING}_policy` (e.g. `aws_s3_bucket_policy`) for a few reasons: + +- Many of these policies require the Amazon Resource Name (ARN) of the resource in the policy itself. It is difficult to workaround this requirement with custom difference handling within a self-contained resource. +- Sometimes policies between two resources need to be written where they cross-reference each other resource's ARN within each policy. Without a separate resource, this introduces a configuration cycle. +- Splitting the resources allows operators to logically split their infrastructure on purely operational and security boundaries with separate configurations/modules. +- Splitting the resources prevents any separate policy API calls from needing to be whitelisted in the main resource in environments with restrictive IAM permissions, which can be undesirable. + +Follow the [New Resource section][#new-resource] for more information about implementing the separate resource. + +## Adding Resource Tagging Support + +AWS provides key-value metadata across many services and resources, which can be used for a variety of use cases including billing, ownership, and more. See the [AWS Tagging Strategy page](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/) for more information about tagging at a high level. + +Implementing tagging support for Terraform AWS Provider resources requires the following, each with its own section below: + +- [ ] _Generated Service Tagging Code_: In the internal code generators (e.g. `aws/internal/keyvaluetags`), implementation and customization of how a service handles tagging, which is standardized for the resources. +- [ ] _Resource Tagging Code Implementation_: In the resource code (e.g. `aws/resource_aws_service_thing.go`), implementation of `tags` schema attribute, along with handling in `Create`, `Read`, and `Update` functions. +- [ ] _Resource Tagging Acceptance Testing Implementation_: In the resource acceptance testing (e.g. `aws/resource_aws_service_thing_test.go`), implementation of new acceptance test function and configurations to exercise new tagging logic. +- [ ] _Resource Tagging Documentation Implementation_: In the resource documentation (e.g. `website/docs/r/service_thing.html.markdown`), addition of `tags` argument + +See also a [full example pull request for implementing EKS tagging](https://github.com/terraform-providers/terraform-provider-aws/pull/10307). + +### Adding Service to Tag Generating Code + +This step is only necessary for the first implementation and may have been previously completed. If so, move on to the next section. + +More details about this code generation, including fixes for potential error messages in this process, can be found in the [keyvaluetags documentation](../aws/internal/keyvaluetags/README.md). + +- Open the AWS Go SDK documentation for the service, e.g. for [`service/eks`](https://docs.aws.amazon.com/sdk-for-go/api/service/eks/). Note: there can be a delay between the AWS announcement and the updated AWS Go SDK documentation. +- Determine the "type" of tagging implementation. Some services will use a simple map style (`map[string]*string` in Go) while others will have a separate structure shape (`[]service.Tag` struct with `Key` and `Value` fields). + + - If the type is a map, add the AWS Go SDK service name (e.g. `eks`) to `mapServiceNames` in `aws/internal/keyvaluetags/generators/servicetags/main.go` + - Otherwise, if the type is a struct, add the AWS Go SDK service name (e.g. `eks`) to `sliceServiceNames` in `aws/internal/keyvaluetags/generators/servicetags/main.go`. If the struct name is not exactly `Tag`, it can be customized via the `ServiceTagType` function. If the struct key field is not exactly `Key`, it can be customized via the `ServiceTagTypeKeyField` function. If the struct value field is not exactly `Value`, it can be customized via the `ServiceTagTypeValueField` function. + +- Determine if the service API includes functionality for listing tags (usually a `ListTags` or `ListTagsForResource` API call) or updating tags (usually `TagResource` and `UntagResource` API calls). If so, add the AWS Go SDK service client information to `ServiceClientType` (along with the new required import) in `aws/internal/keyvaluetags/service_generation_customizations.go`, e.g. for EKS: + + ```go + case "eks": + funcType = reflect.TypeOf(eks.New) + ``` + + - If the service API includes functionality for listing tags, add the AWS Go SDK service name (e.g. `eks`) to `serviceNames` in `aws/internal/keyvaluetags/generators/listtags/main.go`. + - If the service API includes functionality for updating tags, add the AWS Go SDK service name (e.g. `eks`) to `serviceNames` in `aws/internal/keyvaluetags/generators/updatetags/main.go`. + +- Run `make gen` (`go generate ./...`) and ensure there are no errors via `make test` (`go test ./...`) + +### Resource Tagging Code Implementation + +- In the resource Go file (e.g. `aws/resource_aws_eks_cluster.go`), add the following Go import: `"github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags"` +- In the resource schema, add `"tags": tagsSchema(),` +- If the API supports tagging on creation (the `Input` struct accepts a `Tags` field), in the resource `Create` function, implement the logic to convert the configuration tags into the service tags, e.g. with EKS Clusters: + + ```go + input := &eks.CreateClusterInput{ + /* ... other configuration ... */ + Tags: keyvaluetags.New(d.Get("tags").(map[string]interface{})).IgnoreAws().EksTags(), + } + ``` + + If the service API does not allow passing an empty list, the logic can be adjusted similar to: + + ```go + input := &eks.CreateClusterInput{ + /* ... other configuration ... */ + } + + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + input.Tags = keyvaluetags.New(v).IgnoreAws().EksTags() + } + ``` + +- Otherwise if the API does not support tagging on creation (the `Input` struct does not accept a `Tags` field), in the resource `Create` function, implement the logic to convert the configuration tags into the service API call to tag a resource, e.g. with ElasticSearch Domain: + + ```go + if v := d.Get("tags").(map[string]interface{}); len(v) > 0 { + if err := keyvaluetags.ElasticsearchserviceUpdateTags(conn, d.Id(), nil, v); err != nil { + return fmt.Errorf("error adding Elasticsearch Cluster (%s) tags: %s", d.Id(), err) + } + } + ``` + +- Some EC2 resources (for example [`aws_ec2_fleet`](https://www.terraform.io/docs/providers/aws/r/ec2_fleet.html)) have a `TagsSpecification` field in the `InputStruct` instead of a `Tags` field. In these cases the `ec2TagSpecificationsFromMap()` helper function should be used, e.g.: + + ```go + input := &ec2.CreateFleetInput{ + /* ... other configuration ... */ + TagSpecifications: ec2TagSpecificationsFromMap(d.Get("tags").(map[string]interface{}), ec2.ResourceTypeFleet), + } + ``` + +- In the resource `Read` function, implement the logic to convert the service tags to save them into the Terraform state for drift detection, e.g. with EKS Clusters (which had the tags available in the DescribeCluster API call): + + ```go + // Typically declared near conn := /* ... */ + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + if err := d.Set("tags", keyvaluetags.EksKeyValueTags(cluster.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + ``` + + If the service API does not return the tags directly from reading the resource and requires a separate API call, its possible to use the `keyvaluetags` functionality like the following, e.g. with Athena Workgroups: + + ```go + // Typically declared near conn := /* ... */ + ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig + + tags, err := keyvaluetags.AthenaListTags(conn, arn.String()) + + if err != nil { + return fmt.Errorf("error listing tags for resource (%s): %s", arn, err) + } + + if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + ``` + +- In the resource `Update` function (this may be the first functionality requiring the creation of the `Update` function), implement the logic to handle tagging updates, e.g. with EKS Clusters: + + ```go + if d.HasChange("tags") { + o, n := d.GetChange("tags") + if err := keyvaluetags.EksUpdateTags(conn, d.Get("arn").(string), o, n); err != nil { + return fmt.Errorf("error updating tags: %s", err) + } + } + ``` + +### Resource Tagging Acceptance Testing Implementation + +- In the resource testing (e.g. `aws/resource_aws_eks_cluster_test.go`), verify that existing resources without tagging are unaffected and do not have tags saved into their Terraform state. This should be done in the `_basic` acceptance test by adding a line similar to `resource.TestCheckResourceAttr(resourceName, "tags.%s", "0"),` +- In the resource testing, implement a new test named `_Tags` with associated configurations, that verifies creating the resource with tags and updating tags. e.g. EKS Clusters: + + ```go + func TestAccAWSEksCluster_Tags(t *testing.T) { + var cluster1, cluster2, cluster3 eks.Cluster + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_eks_cluster.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSEks(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEksClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEksClusterConfigTags1(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksClusterExists(resourceName, &cluster1), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAWSEksClusterConfigTags2(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksClusterExists(resourceName, &cluster2), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSEksClusterConfigTags1(rName, "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEksClusterExists(resourceName, &cluster3), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + }, + }) + } + + func testAccAWSEksClusterConfigTags1(rName, tagKey1, tagValue1 string) string { + return testAccAWSEksClusterConfig_Base(rName) + fmt.Sprintf(` + resource "aws_eks_cluster" "test" { + name = %[1]q + role_arn = "${aws_iam_role.test.arn}" + + tags = { + %[2]q = %[3]q + } + + vpc_config { + subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] + } + + depends_on = ["aws_iam_role_policy_attachment.test-AmazonEKSClusterPolicy", "aws_iam_role_policy_attachment.test-AmazonEKSServicePolicy"] + } + `, rName, tagKey1, tagValue1) + } + + func testAccAWSEksClusterConfigTags2(rName, tagKey1, tagValue1, tagKey2, tagValue2 string) string { + return testAccAWSEksClusterConfig_Base(rName) + fmt.Sprintf(` + resource "aws_eks_cluster" "test" { + name = %[1]q + role_arn = "${aws_iam_role.test.arn}" + + tags = { + %[2]q = %[3]q + %[4]q = %[5]q + } + + vpc_config { + subnet_ids = ["${aws_subnet.test.*.id[0]}", "${aws_subnet.test.*.id[1]}"] + } + + depends_on = ["aws_iam_role_policy_attachment.test-AmazonEKSClusterPolicy", "aws_iam_role_policy_attachment.test-AmazonEKSServicePolicy"] + } + `, rName, tagKey1, tagValue1, tagKey2, tagValue2) + } + ``` + +- Verify all acceptance testing passes for the resource (e.g. `make testacc TESTARGS='-run=TestAccAWSEksCluster_'`) + +### Resource Tagging Documentation Implementation + +- In the resource documentation (e.g. `website/docs/r/eks_cluster.html.markdown`), add the following to the arguments reference: + + ```markdown + * `tags` - (Optional) Key-value mapping of resource tags + ``` + +## New Resource + +Implementing a new resource is a good way to learn more about how Terraform +interacts with upstream APIs. There are plenty of examples to draw from in the +existing resources, but you still get to implement something completely new. + +In addition to the below checklist, please see the [Common Review +Items](pullrequest-submission-and-lifecycle.md#common-review-items) sections for more specific coding and testing +guidelines. + + - [ ] __Minimal LOC__: It's difficult for both the reviewer and author to go + through long feedback cycles on a big PR with many resources. We ask you to + only submit **1 resource at a time**. + - [ ] __Acceptance tests__: New resources should include acceptance tests + covering their behavior. See [Writing Acceptance + Tests](#writing-acceptance-tests) below for a detailed guide on how to + approach these. + - [ ] __Resource Naming__: Resources should be named `aws__`, + using underscores (`_`) as the separator. Resources are namespaced with the + service name to allow easier searching of related resources, to align + the resource naming with the service for [Customizing Endpoints](https://www.terraform.io/docs/providers/aws/guides/custom-service-endpoints.html#available-endpoint-customizations), + and to prevent future conflicts with new AWS services/resources. + For reference: + + - `service` is the AWS short service name that matches the entry in + `endpointServiceNames` (created via the [New Service](#new-service) + section) + - `name` represents the conceptual infrastructure represented by the + create, read, update, and delete methods of the service API. It should + be a singular noun. For example, in an API that has methods such as + `CreateThing`, `DeleteThing`, `DescribeThing`, and `ModifyThing` the name + of the resource would end in `_thing`. + + - [ ] __Arguments_and_Attributes__: The HCL for arguments and attributes should + mimic the types and structs presented by the AWS API. API arguments should be + converted from `CamelCase` to `camel_case`. + - [ ] __Documentation__: Each resource gets a page in the Terraform + documentation. The [Terraform website][website] source is in this + repo and includes instructions for getting a local copy of the site up and + running if you'd like to preview your changes. For a resource, you'll want + to add a new file in the appropriate place and add a link to the sidebar for + that page. + - [ ] __Well-formed Code__: Do your best to follow existing conventions you + see in the codebase, and ensure your code is formatted with `go fmt`. (The + Travis CI build will fail if `go fmt` has not been run on incoming code.) + The PR reviewers can help out on this front, and may provide comments with + suggestions on how to improve the code. + - [ ] __Vendor updates__: Create a separate PR if you are adding to the vendor + folder. This is to avoid conflicts as the vendor versions tend to be fast- + moving targets. We will plan to merge the PR with this change first. + +## New Service + +Implementing a new AWS service gives Terraform the ability to manage resources in +a whole new API. It's a larger undertaking, but brings major new functionality +into Terraform. + +- [ ] __Service Client__: Before new resources are submitted, we request + a separate pull request containing just the new AWS Go SDK service client. + Doing so will pull the AWS Go SDK service code into the project at the + current version. Since the AWS Go SDK is updated frequently, these pull + requests can easily have merge conflicts or be out of date. The maintainers + prioritize reviewing and merging these quickly to prevent those situations. + + To add the AWS Go SDK service client: + + - In `aws/provider.go` Add a new service entry to `endpointServiceNames`. + This service name should match the AWS Go SDK or AWS CLI service name. + - In `aws/config.go`: Add a new import for the AWS Go SDK code. e.g. + `github.com/aws/aws-sdk-go/service/quicksight` + - In `aws/config.go`: Add a new `{SERVICE}conn` field to the `AWSClient` + struct for the service client. The service name should match the name + in `endpointServiceNames`. e.g. `quicksightconn *quicksight.QuickSight` + - In `aws/config.go`: Create the new service client in the `{SERVICE}conn` + field in the `AWSClient` instantiation within `Client()`. e.g. + `quicksightconn: quicksight.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["quicksight"])})),` + - In `website/allowed-subcategories.txt`: Add a name acceptable for the documentation navigation. + - In `website/docs/guides/custom-service-endpoints.html.md`: Add the service + name in the list of customizable endpoints. + - In `infrastructure/repository/labels-service.tf`: Add the new service to create a repository label. + - In `.hashibot.hcl`: Add the new service to automated issue and pull request labeling. e.g. with the `quicksight` service + + ```hcl + behavior "regexp_issue_labeler_v2" "service_labels" { + # ... other configuration ... + + label_map = { + # ... other services ... + "service/quicksight" = [ + "aws_quicksight_", + ], + # ... other services ... + } + } + + behavior "pull_request_path_labeler" "service_labels" + # ... other configuration ... + + label_map = { + # ... other services ... + "service/quicksight" = [ + "**/*_quicksight_*", + "**/quicksight_*", + ], + # ... other services ... + } + } + ``` + + - Run the following then submit the pull request: + + ```sh + go test ./aws + go mod tidy + go mod vendor + ``` + +- [ ] __Initial Resource__: Some services can be big and it can be + difficult for both reviewer & author to go through long feedback cycles + on a big PR with many resources. Often feedback items in one resource + will also need to be applied in other resources. We prefer you to submit + the necessary minimum in a single PR, ideally **just the first resource** + of the service. + +The initial resource and changes afterwards should follow the other sections +of this guide as appropriate. + +## New Region + +While region validation is automatically added with SDK updates, new regions +are generally limited in which services they support. Below are some +manually sourced values from documentation. + + - [ ] Check [Elastic Load Balancing endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/elb.html#elb_region) and add Route53 Hosted Zone ID if available to `aws/data_source_aws_elb_hosted_zone_id.go` + - [ ] Check [Amazon Simple Storage Service endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region) and add Route53 Hosted Zone ID if available to `aws/hosted_zones.go` + - [ ] Check [CloudTrail Supported Regions docs](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html#cloudtrail-supported-regions) and add AWS Account ID if available to `aws/data_source_aws_cloudtrail_service_account.go` + - [ ] Check [Elastic Load Balancing Access Logs docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) and add Elastic Load Balancing Account ID if available to `aws/data_source_aws_elb_service_account.go` + - [ ] Check [Redshift Database Audit Logging docs](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions) and add AWS Account ID if available to `aws/data_source_aws_redshift_service_account.go` + - [ ] Check [AWS Elastic Beanstalk endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html#elasticbeanstalk_region) and add Route53 Hosted Zone ID if available to `aws/data_source_aws_elastic_beanstalk_hosted_zone.go` diff --git a/docs/contributing/issue-reporting-and-lifecycle.md b/docs/contributing/issue-reporting-and-lifecycle.md new file mode 100644 index 00000000000..98f029fd8ea --- /dev/null +++ b/docs/contributing/issue-reporting-and-lifecycle.md @@ -0,0 +1,77 @@ +# Issue Reporting and Lifecycle + + + +- [Issue Reporting Checklists](#issue-reporting-checklists) + - [Bug Reports](https://github.com/terraform-providers/terraform-provider-aws/issues/new?template=Bug_Report.md) + - [Feature Requests](https://github.com/terraform-providers/terraform-provider-aws/issues/new?labels=enhancement&template=Feature_Request.md) + - [Questions](https://github.com/terraform-providers/terraform-provider-aws/issues/new?labels=question&template=Question.md) +- [Issue Lifecycle](#issue-lifecycle) + + + +## Issue Reporting Checklists + +We welcome issues of all kinds including feature requests, bug reports, and +general questions. Below you'll find checklists with guidelines for well-formed +issues of each type. + +### [Bug Reports](https://github.com/terraform-providers/terraform-provider-aws/issues/new?template=Bug_Report.md) + + - [ ] __Test against latest release__: Make sure you test against the latest + released version. It is possible we already fixed the bug you're experiencing. + + - [ ] __Search for possible duplicate reports__: It's helpful to keep bug + reports consolidated to one thread, so do a quick search on existing bug + reports to check if anybody else has reported the same thing. You can [scope + searches by the label "bug"](https://github.com/terraform-providers/terraform-provider-aws/issues?q=is%3Aopen+is%3Aissue+label%3Abug) to help narrow things down. + + - [ ] __Include steps to reproduce__: Provide steps to reproduce the issue, + along with your `.tf` files, with secrets removed, so we can try to + reproduce it. Without this, it makes it much harder to fix the issue. + + - [ ] __For panics, include `crash.log`__: If you experienced a panic, please + create a [gist](https://gist.github.com) of the *entire* generated crash log + for us to look at. Double check no sensitive items were in the log. + +### [Feature Requests](https://github.com/terraform-providers/terraform-provider-aws/issues/new?labels=enhancement&template=Feature_Request.md) + + - [ ] __Search for possible duplicate requests__: It's helpful to keep requests + consolidated to one thread, so do a quick search on existing requests to + check if anybody else has reported the same thing. You can [scope searches by + the label "enhancement"](https://github.com/terraform-providers/terraform-provider-aws/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) to help narrow things down. + + - [ ] __Include a use case description__: In addition to describing the + behavior of the feature you'd like to see added, it's helpful to also lay + out the reason why the feature would be important and how it would benefit + Terraform users. + +### [Questions](https://github.com/terraform-providers/terraform-provider-aws/issues/new?labels=question&template=Question.md) + + - [ ] __Search for answers in Terraform documentation__: We're happy to answer + questions in GitHub Issues, but it helps reduce issue churn and maintainer + workload if you work to [find answers to common questions in the + documentation](https://www.terraform.io/docs/providers/aws/index.html). Oftentimes Question issues result in documentation updates + to help future users, so if you don't find an answer, you can give us + pointers for where you'd expect to see it in the docs. + +## Issue Lifecycle + +1. The issue is reported. + +2. The issue is verified and categorized by a Terraform collaborator. + Categorization is done via GitHub labels. We generally use a two-label + system of (1) issue/PR type, and (2) section of the codebase. Type is + one of "bug", "enhancement", "documentation", or "question", and section + is usually the AWS service name. + +3. An initial triage process determines whether the issue is critical and must + be addressed immediately, or can be left open for community discussion. + +4. The issue is addressed in a pull request or commit. The issue number will be + referenced in the commit message so that the code that fixes it is clearly + linked. + +5. The issue is closed. Sometimes, valid issues will be closed because they are + tracked elsewhere or non-actionable. The issue is still indexed and + available for future viewers, or can be re-opened if necessary. \ No newline at end of file diff --git a/docs/contributing/pullrequest-submission-and-lifecycle.md b/docs/contributing/pullrequest-submission-and-lifecycle.md new file mode 100644 index 00000000000..6cf53454aa1 --- /dev/null +++ b/docs/contributing/pullrequest-submission-and-lifecycle.md @@ -0,0 +1,157 @@ +# Pull Request Submission and Lifecycle + +- [Pull Request Lifecycle](#pull-request-lifecycle) +- [Branch Prefixes](#branch-prefixes) +- [Common Review Items](#common-review-items) + - [Go Coding Style](#go-coding-style) + - [Resource Contribution Guidelines](#resource-contribution-guidelines) + +We appreciate direct contributions to the provider codebase. Here's what to +expect: + + * For pull requests that follow the guidelines, we will proceed to reviewing + and merging, following the provider team's review schedule. There may be some + internal or community discussion needed before we can complete this. + * Pull requests that don't follow the guidelines will be commented with what + they're missing. The person who submits the pull request or another community + member will need to address those requests before they move forward. + +## Pull Request Lifecycle + +1. [Fork the GitHub repository](https://help.github.com/en/articles/fork-a-repo), + modify the code, and [create a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). + You are welcome to submit your pull request for commentary or review before + it is fully completed by creating a [draft pull request](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests) + or adding `[WIP]` to the beginning of the pull request title. + Please include specific questions or items you'd like feedback on. + +1. Once you believe your pull request is ready to be reviewed, ensure the + pull request is not a draft pull request by [marking it ready for review](https://help.github.com/en/articles/changing-the-stage-of-a-pull-request) + or removing `[WIP]` from the pull request title if necessary, and a + maintainer will review it. Follow [the checklists below](#checklists-for-contribution) + to help ensure that your contribution can be easily reviewed and potentially + merged. + +1. One of Terraform's provider team members will look over your contribution and + either approve it or provide comments letting you know if there is anything + left to do. We do our best to keep up with the volume of PRs waiting for + review, but it may take some time depending on the complexity of the work. + +1. Once all outstanding comments and checklist items have been addressed, your + contribution will be merged! Merged PRs will be included in the next + Terraform release. The provider team takes care of updating the CHANGELOG as + they merge. + +1. In some cases, we might decide that a PR should be closed without merging. + We'll make sure to provide clear reasoning when this happens. + +## Branch Prefixes + +We try to use a common set of branch name prefixes when submitting pull requests. Prefixes give us an idea of what the branch is for. For example, `td-staticcheck-st1008` would let us know the branch was created to fix a technical debt issue, and `f-aws_emr_instance_group-refactor` would indicate a feature request for the `aws_emr_instance_group` resource that’s being refactored. These are the prefixes we currently use: + +- f = feature +- b = bug fix +- d = documentation +- td = technical debt +- v = "vendoring"/dependencies + +Conventions across non-AWS providers varies so when working with other providers please check the names of previously created branches and conform to their standard practices. + +## Common Review Items + +The Terraform AWS Provider follows common practices to ensure consistent and +reliable implementations across all resources in the project. While there may be +older resource and testing code that predates these guidelines, new submissions +are generally expected to adhere to these items to maintain Terraform Provider +quality. For any guidelines listed, contributors are encouraged to ask any +questions and community reviewers are encouraged to provide review suggestions +based on these guidelines to speed up the review and merge process. + +### Go Coding Style + +The following Go language resources provide common coding preferences that may be referenced during review, if not automatically handled by the project's linting tools. + +- [Effective Go](https://golang.org/doc/effective_go.html) +- [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) + +### Resource Contribution Guidelines + +The following resource checks need to be addressed before your contribution can be merged. The exclusion of any applicable check may result in a delayed time to merge. + +- [ ] __Passes Testing__: All code and documentation changes must pass unit testing, code linting, and website link testing. Resource code changes must pass all acceptance testing for the resource. +- [ ] __Avoids API Calls Across Account, Region, and Service Boundaries__: Resources should not implement cross-account, cross-region, or cross-service API calls. +- [ ] __Avoids Optional and Required for Non-Configurable Attributes__: Resource schema definitions for read-only attributes should not include `Optional: true` or `Required: true`. +- [ ] __Avoids resource.Retry() without resource.RetryableError()__: Resource logic should only implement [`resource.Retry()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#Retry) if there is a retryable condition (e.g. `return resource.RetryableError(err)`). +- [ ] __Avoids Resource Read Function in Data Source Read Function__: Data sources should fully implement their own resource `Read` functionality including duplicating `d.Set()` calls. +- [ ] __Avoids Reading Schema Structure in Resource Code__: The resource `Schema` should not be read in resource `Create`/`Read`/`Update`/`Delete` functions to perform looping or otherwise complex attribute logic. Use [`d.Get()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Get) and [`d.Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) directly with individual attributes instead. +- [ ] __Avoids ResourceData.GetOkExists()__: Resource logic should avoid using [`ResourceData.GetOkExists()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.GetOkExists) as its expected functionality is not guaranteed in all scenarios. +- [ ] __Implements Read After Create and Update__: Except where API eventual consistency prohibits immediate reading of resources or updated attributes, resource `Create` and `Update` functions should return the resource `Read` function. +- [ ] __Implements Immediate Resource ID Set During Create__: Immediately after calling the API creation function, the resource ID should be set with [`d.SetId()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.SetId) before other API operations or returning the `Read` function. +- [ ] __Implements Attribute Refreshes During Read__: All attributes available in the API should have [`d.Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) called their values in the Terraform state during the `Read` function. +- [ ] __Implements Error Checks with Non-Primative Attribute Refreshes__: When using [`d.Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) with non-primative types (`schema.TypeList`, `schema.TypeSet`, or `schema.TypeMap`), perform error checking to [prevent issues where the code is not properly able to refresh the Terraform state](https://www.terraform.io/docs/extend/best-practices/detecting-drift.html#error-checking-aggregate-types). +- [ ] __Implements Import Acceptance Testing and Documentation__: Support for resource import (`Importer` in resource schema) must include `ImportState` acceptance testing (see also the [Acceptance Testing Guidelines](#acceptance-testing-guidelines) below) and `## Import` section in resource documentation. +- [ ] __Implements Customizable Timeouts Documentation__: Support for customizable timeouts (`Timeouts` in resource schema) must include `## Timeouts` section in resource documentation. +- [ ] __Implements State Migration When Adding New Virtual Attribute__: For new "virtual" attributes (those only in Terraform and not in the API), the schema should implement [State Migration](https://www.terraform.io/docs/extend/resources.html#state-migrations) to prevent differences for existing configurations that upgrade. +- [ ] __Uses AWS Go SDK Constants__: Many AWS services provide string constants for value enumerations, error codes, and status types. See also the "Constants" sections under each of the service packages in the [AWS Go SDK documentation](https://docs.aws.amazon.com/sdk-for-go/api/). +- [ ] __Uses AWS Go SDK Pointer Conversion Functions__: Many APIs return pointer types and these functions return the zero value for the type if the pointer is `nil`. This prevents potential panics from unchecked `*` pointer dereferences and can eliminate boilerplate `nil` checking in many cases. See also the [`aws` package in the AWS Go SDK documentation](https://docs.aws.amazon.com/sdk-for-go/api/aws/). +- [ ] __Uses AWS Go SDK Types__: Use available SDK structs instead of implementing custom types with indirection. +- [ ] __Uses TypeList and MaxItems: 1__: Configuration block attributes (e.g. `Type: schema.TypeList` or `Type: schema.TypeSet` with `Elem: &schema.Resource{...}`) that can only have one block should use `Type: schema.TypeList` and `MaxItems: 1` in the schema definition. +- [ ] __Uses Existing Validation Functions__: Schema definitions including `ValidateFunc` for attribute validation should use available [Terraform `helper/validation` package](https://godoc.org/github.com/hashicorp/terraform/helper/validation) functions. `All()`/`Any()` can be used for combining multiple validation function behaviors. +- [ ] __Uses isResourceTimeoutError() with resource.Retry()__: Resource logic implementing [`resource.Retry()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#Retry) should error check with `isResourceTimeoutError(err error)` and potentially unset the error before returning the error. For example: + + ```go + var output *kms.CreateKeyOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + + output, err = conn.CreateKey(input) + + /* ... */ + + return nil + }) + + if isResourceTimeoutError(err) { + output, err = conn.CreateKey(input) + } + + if err != nil { + return fmt.Errorf("error creating KMS External Key: %s", err) + } + ``` + +- [ ] __Uses resource.NotFoundError__: Custom errors for missing resources should use [`resource.NotFoundError`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#NotFoundError). +- [ ] __Uses resource.UniqueId()__: API fields for concurrency protection such as `CallerReference` and `IdempotencyToken` should use [`resource.UniqueId()`](https://godoc.org/github.com/hashicorp/terraform/helper/resource#UniqueId). The implementation includes a monotonic counter which is safer for concurrent operations than solutions such as `time.Now()`. +- [ ] __Skips Exists Function__: Implementing a resource `Exists` function is extraneous as it often duplicates resource `Read` functionality. Ensure `d.SetId("")` is used to appropriately trigger resource recreation in the resource `Read` function. +- [ ] __Skips id Attribute__: The `id` attribute is implicit for all Terraform resources and does not need to be defined in the schema. + +The below are style-based items that _may_ be noted during review and are recommended for simplicity, consistency, and quality assurance: + +- [ ] __Avoids CustomizeDiff__: Usage of `CustomizeDiff` is generally discouraged. +- [ ] __Implements Error Message Context__: Returning errors from resource `Create`, `Read`, `Update`, and `Delete` functions should include additional messaging about the location or cause of the error for operators and code maintainers by wrapping with [`fmt.Errorf()`](https://godoc.org/golang.org/x/exp/errors/fmt#Errorf). + - An example `Delete` API error: `return fmt.Errorf("error deleting {SERVICE} {THING} (%s): %s", d.Id(), err)` + - An example `d.Set()` error: `return fmt.Errorf("error setting {ATTRIBUTE}: %s", err)` +- [ ] __Implements arn Attribute__: APIs that return an Amazon Resource Name (ARN) should implement `arn` as an attribute. Alternatively, the ARN can be synthesized using the AWS Go SDK [`arn.ARN`](https://docs.aws.amazon.com/sdk-for-go/api/aws/arn/#ARN) structure. For example: + + ```go + // Direct Connect Virtual Interface ARN. + // See https://docs.aws.amazon.com/directconnect/latest/UserGuide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources. + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + ``` + + When the `arn` attribute is synthesized this way, add the resource to the [list](https://www.terraform.io/docs/providers/aws/index.html#argument-reference) of those affected by the provider's `skip_requesting_account_id` attribute. + +- [ ] __Implements Warning Logging With Resource State Removal__: If a resource is removed outside of Terraform (e.g. via different tool, API, or web UI), `d.SetId("")` and `return nil` can be used in the resource `Read` function to trigger resource recreation. When this occurs, a warning log message should be printed beforehand: `log.Printf("[WARN] {SERVICE} {THING} (%s) not found, removing from state", d.Id())` +- [ ] __Uses isAWSErr() with AWS Go SDK Error Objects__: Use the available `isAWSErr(err error, code string, message string)` helper function instead of the `awserr` package to compare error code and message contents. +- [ ] __Uses %s fmt Verb with AWS Go SDK Objects__: AWS Go SDK objects implement `String()` so using the `%v`, `%#v`, or `%+v` fmt verbs with the object are extraneous or provide unhelpful detail. +- [ ] __Uses Elem with TypeMap__: While provider schema validation does not error when the `Elem` configuration is not present with `Type: schema.TypeMap` attributes, including the explicit `Elem: &schema.Schema{Type: schema.TypeString}` is recommended. +- [ ] __Uses American English for Attribute Naming__: For any ambiguity with attribute naming, prefer American English over British English. e.g. `color` instead of `colour`. +- [ ] __Skips Timestamp Attributes__: Generally, creation and modification dates from the API should be omitted from the schema. +- [ ] __Skips Error() Call with AWS Go SDK Error Objects__: Error objects do not need to have `Error()` called. diff --git a/docs/contributing/running-and-writing-acceptance-tests.md b/docs/contributing/running-and-writing-acceptance-tests.md new file mode 100644 index 00000000000..e4bc11c407f --- /dev/null +++ b/docs/contributing/running-and-writing-acceptance-tests.md @@ -0,0 +1,1016 @@ +# Running and Writing Acceptance Tests + +- [Acceptance Tests Often Cost Money to Run](#acceptance-tests-often-cost-money-to-run) +- [Running an Acceptance Test](#running-an-acceptance-test) + - [Running Cross-Account Tests](#running-cross-account-tests) + - [Running Cross-Region Tests](#running-cross-region-tests) +- [Writing an Acceptance Test](#writing-an-acceptance-test) + - [Anatomy of an Acceptance Test](#anatomy-of-an-acceptance-test) + - [Resource Acceptance Testing](#resource-acceptance-testing) + - [Test Configurations](#test-configurations) + - [Combining Test Configurations](#combining-test-configurations) + - [Base Test Configurations](#base-test-configurations) + - [Available Common Test Configurations](#available-common-test-configurations) + - [Randomized Naming](#randomized-naming) + - [Other Recommended Variables](#other-recommended-variables) + - [Basic Acceptance Tests](#basic-acceptance-tests) + - [Service Availability PreCheck](#service-availability-precheck) + - [Disappears Acceptance Tests](#disappears-acceptance-tests) + - [Per Attribute Acceptance Tests](#per-attribute-acceptance-tests) + - [Cross-Account Acceptance Tests](#cross-account-acceptance-tests) + - [Cross-Region Acceptance Tests](#cross-region-acceptance-tests) + - [Data Source Acceptance Testing](#data-source-acceptance-testing) +- [Acceptance Test Sweepers](#acceptance-test-sweepers) + - [Running Test Sweepers](#running-test-sweepers) + - [Writing Test Sweepers](#writing-test-sweepers) +- [Acceptance Test Checklist](#acceptance-test-checklist) + +Terraform includes an acceptance test harness that does most of the repetitive +work involved in testing a resource. For additional information about testing +Terraform Providers, see the [Extending Terraform documentation](https://www.terraform.io/docs/extend/testing/index.html). + +## Acceptance Tests Often Cost Money to Run + +Because acceptance tests create real resources, they often cost money to run. +Because the resources only exist for a short period of time, the total amount +of money required is usually a relatively small. Nevertheless, we don't want +financial limitations to be a barrier to contribution, so if you are unable to +pay to run acceptance tests for your contribution, mention this in your +pull request. We will happily accept "best effort" implementations of +acceptance tests and run them for you on our side. This might mean that your PR +takes a bit longer to merge, but it most definitely is not a blocker for +contributions. + +## Running an Acceptance Test + +Acceptance tests can be run using the `testacc` target in the Terraform +`Makefile`. The individual tests to run can be controlled using a regular +expression. Prior to running the tests provider configuration details such as +access keys must be made available as environment variables. + +For example, to run an acceptance test against the Amazon Web Services +provider, the following environment variables must be set: + +```sh +# Using a profile +export AWS_PROFILE=... +# Otherwise +export AWS_ACCESS_KEY_ID=... +export AWS_SECRET_ACCESS_KEY=... +export AWS_DEFAULT_REGION=... +``` + +Please note that the default region for the testing is `us-west-2` and must be +overriden via the `AWS_DEFAULT_REGION` environment variable, if necessary. This +is especially important for testing AWS GovCloud (US), which requires: + +```sh +export AWS_DEFAULT_REGION=us-gov-west-1 +``` + +Tests can then be run by specifying the target provider and a regular +expression defining the tests to run: + +```sh +$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchDashboard_update' +==> Checking that code complies with gofmt requirements... +TF_ACC=1 go test ./aws -v -run=TestAccAWSCloudWatchDashboard_update -timeout 120m +=== RUN TestAccAWSCloudWatchDashboard_update +--- PASS: TestAccAWSCloudWatchDashboard_update (26.56s) +PASS +ok github.com/terraform-providers/terraform-provider-aws/aws 26.607s +``` + +Entire resource test suites can be targeted by using the naming convention to +write the regular expression. For example, to run all tests of the +`aws_cloudwatch_dashboard` resource rather than just the update test, you can start +testing like this: + +```sh +$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchDashboard' +==> Checking that code complies with gofmt requirements... +TF_ACC=1 go test ./aws -v -run=TestAccAWSCloudWatchDashboard -timeout 120m +=== RUN TestAccAWSCloudWatchDashboard_importBasic +--- PASS: TestAccAWSCloudWatchDashboard_importBasic (15.06s) +=== RUN TestAccAWSCloudWatchDashboard_basic +--- PASS: TestAccAWSCloudWatchDashboard_basic (12.70s) +=== RUN TestAccAWSCloudWatchDashboard_update +--- PASS: TestAccAWSCloudWatchDashboard_update (27.81s) +PASS +ok github.com/terraform-providers/terraform-provider-aws/aws 55.619s +``` + +Please Note: On macOS 10.14 and later (and some Linux distributions), the default user open file limit is 256. This may cause unexpected issues when running the acceptance testing since this can prevent various operations from occurring such as opening network connections to AWS. To view this limit, the `ulimit -n` command can be run. To update this limit, run `ulimit -n 1024` (or higher). + +### Running Cross-Account Tests + +Certain testing requires multiple AWS accounts. This additional setup is not typically required and the testing will return an error (shown below) if your current setup does not have the secondary AWS configuration: + +```console +$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSDBInstance_DbSubnetGroupName_RamShared' +=== RUN TestAccAWSDBInstance_DbSubnetGroupName_RamShared +=== PAUSE TestAccAWSDBInstance_DbSubnetGroupName_RamShared +=== CONT TestAccAWSDBInstance_DbSubnetGroupName_RamShared + TestAccAWSDBInstance_DbSubnetGroupName_RamShared: provider_test.go:386: AWS_ALTERNATE_ACCESS_KEY_ID or AWS_ALTERNATE_PROFILE must be set for acceptance tests +--- FAIL: TestAccAWSDBInstance_DbSubnetGroupName_RamShared (2.22s) +FAIL +FAIL github.com/terraform-providers/terraform-provider-aws/aws 4.305s +FAIL +``` + +Running these acceptance tests is the same as before, except the following additional AWS credential information is required: + +```sh +# Using a profile +export AWS_ALTERNATE_PROFILE=... +# Otherwise +export AWS_ALTERNATE_ACCESS_KEY_ID=... +export AWS_ALTERNATE_SECRET_ACCESS_KEY=... +``` + +### Running Cross-Region Tests + +Certain testing requires multiple AWS regions. Additional setup is not typically required because the testing defaults the second AWS region to `us-east-1` and the third AWS region to `us-east-2`. + +Running these acceptance tests is the same as before, but if you wish to override the second and third regions: + +```sh +export AWS_ALTERNATE_REGION=... +export AWS_THIRD_REGION=... +``` + +## Writing an Acceptance Test + +Terraform has a framework for writing acceptance tests which minimises the +amount of boilerplate code necessary to use common testing patterns. This guide is meant to augment the general [Extending Terraform documentation](https://www.terraform.io/docs/extend/testing/acceptance-tests/index.html) with Terraform AWS Provider specific conventions and helpers. + +### Anatomy of an Acceptance Test + +This section describes in detail how the Terraform acceptance testing framework operates with respect to the Terraform AWS Provider. We recommend those unfamiliar with this provider, or Terraform resource testing in general, take a look here first to generally understand how we interact with AWS and the resource code to verify functionality. + +The entry point to the framework is the `resource.ParallelTest()` function. This wraps our testing to work with the standard Go testing framework, while also preventing unexpected usage of AWS by requiring the `TF_ACC=1` environment variable. This function accepts a `TestCase` parameter, which has all the details about the test itself. For example, this includes the test steps (`TestSteps`) and how to verify resource deletion in the API after all steps have been run (`CheckDestroy`). + +Each `TestStep` proceeds by applying some +Terraform configuration using the provider under test, and then verifying that +results are as expected by making assertions using the provider API. It is +common for a single test function to exercise both the creation of and updates +to a single resource. Most tests follow a similar structure. + +1. Pre-flight checks are made to ensure that sufficient provider configuration + is available to be able to proceed - for example in an acceptance test + targeting AWS, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` must be set prior + to running acceptance tests. This is common to all tests exercising a single + provider. + +Most assertion +functions are defined out of band with the tests. This keeps the tests +readable, and allows reuse of assertion functions across different tests of the +same type of resource. The definition of a complete test looks like this: + +```go +func TestAccAWSCloudWatchDashboard_basic(t *testing.T) { + var dashboard cloudwatch.GetDashboardOutput + rInt := acctest.RandInt() + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudWatchDashboardDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudWatchDashboardConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudWatchDashboardExists("aws_cloudwatch_dashboard.foobar", &dashboard), + resource.TestCheckResourceAttr("aws_cloudwatch_dashboard.foobar", "dashboard_name", testAccAWSCloudWatchDashboardName(rInt)), + ), + }, + }, + }) +} +``` + +When executing the test, the following steps are taken for each `TestStep`: + +1. The Terraform configuration required for the test is applied. This is + responsible for configuring the resource under test, and any dependencies it + may have. For example, to test the `aws_cloudwatch_dashboard` resource, a valid configuration with the requisite fields is required. This results in configuration which looks like this: + + ```hcl + resource "aws_cloudwatch_dashboard" "foobar" { + dashboard_name = "terraform-test-dashboard-%d" + dashboard_body = < { + const putParams = { + TableName: process.env.TABLE_NAME, + Item: { + connectionId: event.requestContext.connectionId + } + }; + + try { + await ddb.put(putParams).promise(); + } catch (err) { + return { statusCode: 500, body: 'Failed to connect: ' + JSON.stringify(err) }; + } + + return { statusCode: 200, body: 'Connected.' }; +}; diff --git a/examples/api-gateway-websocket-chat-app/onconnect/package.json b/examples/api-gateway-websocket-chat-app/onconnect/package.json new file mode 100644 index 00000000000..c3af0703f89 --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/onconnect/package.json @@ -0,0 +1,11 @@ +{ + "name": "on-connect", + "version": "1.0.0", + "description": "onconnect example for WebSockets on API Gateway", + "main": "src/app.js", + "author": "SAM CLI", + "license": "MIT", + "dependencies": { + "aws-sdk": "^2.655.0" + } +} diff --git a/examples/api-gateway-websocket-chat-app/ondisconnect/app.js b/examples/api-gateway-websocket-chat-app/ondisconnect/app.js new file mode 100644 index 00000000000..7c6c2d7d739 --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/ondisconnect/app.js @@ -0,0 +1,29 @@ +// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT-0 + +// https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-keys-connect-disconnect.html +// The $disconnect route is executed after the connection is closed. +// The connection can be closed by the server or by the client. As the connection is already closed when it is executed, +// $disconnect is a best-effort event. +// API Gateway will try its best to deliver the $disconnect event to your integration, but it cannot guarantee delivery. + +const AWS = require('aws-sdk'); + +const ddb = new AWS.DynamoDB.DocumentClient({ apiVersion: '2012-08-10', region: process.env.AWS_REGION }); + +exports.handler = async event => { + const deleteParams = { + TableName: process.env.TABLE_NAME, + Key: { + connectionId: event.requestContext.connectionId + } + }; + + try { + await ddb.delete(deleteParams).promise(); + } catch (err) { + return { statusCode: 500, body: 'Failed to disconnect: ' + JSON.stringify(err) }; + } + + return { statusCode: 200, body: 'Disconnected.' }; +}; diff --git a/examples/api-gateway-websocket-chat-app/ondisconnect/package.json b/examples/api-gateway-websocket-chat-app/ondisconnect/package.json new file mode 100644 index 00000000000..3d3d07cdcaa --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/ondisconnect/package.json @@ -0,0 +1,11 @@ +{ + "name": "on-disconnect", + "version": "1.0.0", + "description": "ondisconnect example for WebSockets on API Gateway", + "main": "src/app.js", + "author": "SAM CLI", + "license": "MIT", + "dependencies": { + "aws-sdk": "^2.655.0" + } +} diff --git a/examples/api-gateway-websocket-chat-app/sendmessage/app.js b/examples/api-gateway-websocket-chat-app/sendmessage/app.js new file mode 100644 index 00000000000..c217de88007 --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/sendmessage/app.js @@ -0,0 +1,46 @@ +// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT-0 + +const AWS = require('aws-sdk'); + +const ddb = new AWS.DynamoDB.DocumentClient({ apiVersion: '2012-08-10', region: process.env.AWS_REGION }); + +const { TABLE_NAME } = process.env; + +exports.handler = async event => { + let connectionData; + + try { + connectionData = await ddb.scan({ TableName: TABLE_NAME, ProjectionExpression: 'connectionId' }).promise(); + } catch (e) { + return { statusCode: 500, body: e.stack }; + } + + const apigwManagementApi = new AWS.ApiGatewayManagementApi({ + apiVersion: '2018-11-29', + endpoint: event.requestContext.domainName + '/' + event.requestContext.stage + }); + + const postData = JSON.parse(event.body).data; + + const postCalls = connectionData.Items.map(async ({ connectionId }) => { + try { + await apigwManagementApi.postToConnection({ ConnectionId: connectionId, Data: postData }).promise(); + } catch (e) { + if (e.statusCode === 410) { + console.log(`Found stale connection, deleting ${connectionId}`); + await ddb.delete({ TableName: TABLE_NAME, Key: { connectionId } }).promise(); + } else { + throw e; + } + } + }); + + try { + await Promise.all(postCalls); + } catch (e) { + return { statusCode: 500, body: e.stack }; + } + + return { statusCode: 200, body: 'Data sent.' }; +}; diff --git a/examples/api-gateway-websocket-chat-app/sendmessage/package.json b/examples/api-gateway-websocket-chat-app/sendmessage/package.json new file mode 100644 index 00000000000..1f96ca5faef --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/sendmessage/package.json @@ -0,0 +1,11 @@ +{ + "name": "send-message", + "version": "1.0.0", + "description": "sendmessage example for WebSockets on API Gateway", + "main": "src/app.js", + "author": "SAM CLI", + "license": "MIT", + "dependencies": { + "aws-sdk": "^2.655.0" + } +} diff --git a/examples/api-gateway-websocket-chat-app/terraform.template.tfvars b/examples/api-gateway-websocket-chat-app/terraform.template.tfvars new file mode 100644 index 00000000000..bb891daf459 --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/terraform.template.tfvars @@ -0,0 +1 @@ +aws_region = "us-east-1" diff --git a/examples/api-gateway-websocket-chat-app/variables.tf b/examples/api-gateway-websocket-chat-app/variables.tf new file mode 100644 index 00000000000..e4f8705a6ac --- /dev/null +++ b/examples/api-gateway-websocket-chat-app/variables.tf @@ -0,0 +1,4 @@ +variable "aws_region" { + description = "AWS region" + default = "us-west-2" +} diff --git a/examples/asg/README.md b/examples/asg/README.md index d6b81408513..ac795a84560 100644 --- a/examples/asg/README.md +++ b/examples/asg/README.md @@ -23,6 +23,9 @@ For apply phase ``` terraform apply -var 'key_name={your_key_name}' ``` + +Alternatively to using `-var` with each command, the `terraform.template.tfvars` file can be copied to `terraform.tfvars` and updated. + Once the stack is created, wait for few minutes and test the stack by launching a browser with ELB url. To remove the stack diff --git a/examples/asg/main.tf b/examples/asg/main.tf index b70e89584d9..ab6d9affc94 100644 --- a/examples/asg/main.tf +++ b/examples/asg/main.tf @@ -3,11 +3,15 @@ provider "aws" { region = "${var.aws_region}" } +locals { + availability_zones = "${split(",", var.availability_zones)}" +} + resource "aws_elb" "web-elb" { name = "terraform-example-elb" # The same availability zone as our instances - availability_zones = ["${split(",", var.availability_zones)}"] + availability_zones = "${local.availability_zones}" listener { instance_port = 80 @@ -26,7 +30,7 @@ resource "aws_elb" "web-elb" { } resource "aws_autoscaling_group" "web-asg" { - availability_zones = ["${split(",", var.availability_zones)}"] + availability_zones = "${local.availability_zones}" name = "terraform-example-asg" max_size = "${var.asg_max}" min_size = "${var.asg_min}" diff --git a/examples/asg/terraform.template.tfvars b/examples/asg/terraform.template.tfvars new file mode 100644 index 00000000000..ac1a6a47e57 --- /dev/null +++ b/examples/asg/terraform.template.tfvars @@ -0,0 +1 @@ +key_name = "terraform-aws-provider-example" diff --git a/examples/ecs-alb/README.md b/examples/ecs-alb/README.md index dc1d859965f..0a114d4e568 100644 --- a/examples/ecs-alb/README.md +++ b/examples/ecs-alb/README.md @@ -24,6 +24,8 @@ terraform apply \ -var key_name={your_key_name} ``` +Alternatively to using `-var` with each command, the `terraform.template.tfvars` file can be copied to `terraform.tfvars` and updated. + Once the stack is created, wait for a few minutes and test the stack by launching a browser with the ALB url. ## Destroy :boom: diff --git a/examples/ecs-alb/main.tf b/examples/ecs-alb/main.tf index dc16aca7ec4..e1dea6e12bc 100644 --- a/examples/ecs-alb/main.tf +++ b/examples/ecs-alb/main.tf @@ -53,7 +53,7 @@ resource "aws_autoscaling_group" "app" { data "template_file" "cloud_config" { template = "${file("${path.module}/cloud-config.yml")}" - vars { + vars = { aws_region = "${var.aws_region}" ecs_cluster_name = "${aws_ecs_cluster.main.name}" ecs_log_level = "info" @@ -168,7 +168,7 @@ resource "aws_ecs_cluster" "main" { data "template_file" "task_definition" { template = "${file("${path.module}/task-definition.json")}" - vars { + vars = { image_url = "ghost:latest" container_name = "ghost" log_group_region = "${var.aws_region}" @@ -275,7 +275,7 @@ EOF data "template_file" "instance_profile" { template = "${file("${path.module}/instance-profile-policy.json")}" - vars { + vars = { app_log_group_arn = "${aws_cloudwatch_log_group.app.arn}" ecs_log_group_arn = "${aws_cloudwatch_log_group.ecs.arn}" } diff --git a/examples/ecs-alb/terraform.template.tfvars b/examples/ecs-alb/terraform.template.tfvars new file mode 100644 index 00000000000..78c37be0e45 --- /dev/null +++ b/examples/ecs-alb/terraform.template.tfvars @@ -0,0 +1,2 @@ +admin_cidr_ingress = "1.2.3.4/32" +key_name = "terraform-aws-provider-example" diff --git a/examples/eip/README.md b/examples/eip/README.md index 93d56ca472b..944c6d2c927 100644 --- a/examples/eip/README.md +++ b/examples/eip/README.md @@ -8,4 +8,6 @@ Running the example run `terraform apply -var 'key_name={your_key_name}'` +Alternatively to using `-var` with each command, the `terraform.template.tfvars` file can be copied to `terraform.tfvars` and updated. + Give couple of mins for userdata to install nginx, and then type the Elastic IP from outputs in your browser and see the nginx welcome page diff --git a/examples/eip/outputs.tf b/examples/eip/outputs.tf index 3def245e5e3..7524f8dace2 100644 --- a/examples/eip/outputs.tf +++ b/examples/eip/outputs.tf @@ -2,6 +2,6 @@ output "address" { value = "${aws_instance.web.private_ip}" } -output "elastic ip" { +output "elastic_ip" { value = "${aws_eip.default.public_ip}" } diff --git a/examples/eip/terraform.template.tfvars b/examples/eip/terraform.template.tfvars new file mode 100644 index 00000000000..ac1a6a47e57 --- /dev/null +++ b/examples/eip/terraform.template.tfvars @@ -0,0 +1 @@ +key_name = "terraform-aws-provider-example" diff --git a/examples/eks-getting-started/vpc.tf b/examples/eks-getting-started/vpc.tf index 99d9d7921df..4bd3507953d 100644 --- a/examples/eks-getting-started/vpc.tf +++ b/examples/eks-getting-started/vpc.tf @@ -18,9 +18,10 @@ resource "aws_vpc" "demo" { resource "aws_subnet" "demo" { count = 2 - availability_zone = data.aws_availability_zones.available.names[count.index] - cidr_block = "10.0.${count.index}.0/24" - vpc_id = aws_vpc.demo.id + availability_zone = data.aws_availability_zones.available.names[count.index] + cidr_block = "10.0.${count.index}.0/24" + map_public_ip_on_launch = true + vpc_id = aws_vpc.demo.id tags = map( "Name", "terraform-eks-demo-node", diff --git a/examples/elb/README.md b/examples/elb/README.md index 0c31b4fdbfc..b871561de51 100644 --- a/examples/elb/README.md +++ b/examples/elb/README.md @@ -12,4 +12,6 @@ Run this example using: terraform apply -var 'key_name=YOUR_KEY_NAME' +Alternatively to using `-var` with each command, the `terraform.template.tfvars` file can be copied to `terraform.tfvars` and updated. + Wait a couple of minutes for the EC2 userdata to install nginx, and then type the ELB DNS Name from outputs in your browser and see the nginx welcome page diff --git a/examples/elb/terraform.template.tfvars b/examples/elb/terraform.template.tfvars new file mode 100644 index 00000000000..ac1a6a47e57 --- /dev/null +++ b/examples/elb/terraform.template.tfvars @@ -0,0 +1 @@ +key_name = "terraform-aws-provider-example" diff --git a/examples/networking/numbering/variables.tf b/examples/networking/numbering/variables.tf deleted file mode 100644 index ae32caa89a9..00000000000 --- a/examples/networking/numbering/variables.tf +++ /dev/null @@ -1,27 +0,0 @@ -variable "region_numbers" { - default = { - us-east-1 = 1 - us-west-1 = 2 - us-west-2 = 3 - eu-west-1 = 4 - } -} - -variable "az_numbers" { - default = { - a = 1 - b = 2 - c = 3 - d = 4 - e = 5 - f = 6 - g = 7 - h = 8 - i = 9 - j = 10 - k = 11 - l = 12 - m = 13 - n = 14 - } -} diff --git a/examples/networking/region/terraform.template.tfvars b/examples/networking/region/terraform.template.tfvars new file mode 100644 index 00000000000..9304a92ab0b --- /dev/null +++ b/examples/networking/region/terraform.template.tfvars @@ -0,0 +1,2 @@ +base_cidr_block = "10.0.0.0/16" +region = "us-west-2" diff --git a/examples/networking/region/variables.tf b/examples/networking/region/variables.tf index b5916f051cb..99f039bce7e 100644 --- a/examples/networking/region/variables.tf +++ b/examples/networking/region/variables.tf @@ -7,3 +7,12 @@ variable "base_cidr_block" {} provider "aws" { region = "${var.region}" } + +variable "region_numbers" { + default = { + us-east-1 = 0 + us-west-1 = 1 + us-west-2 = 2 + eu-west-1 = 3 + } +} diff --git a/examples/networking/subnet/subnet.tf b/examples/networking/subnet/subnet.tf index 724e27409f0..353dfc9822e 100644 --- a/examples/networking/subnet/subnet.tf +++ b/examples/networking/subnet/subnet.tf @@ -1,5 +1,5 @@ resource "aws_subnet" "main" { - cidr_block = "${cidrsubnet(data.aws_vpc.target.cidr_block, 4, lookup(var.az_numbers, data.aws_availability_zone.target.name_suffix))}" + cidr_block = "${cidrsubnet(data.aws_vpc.target.cidr_block, 2, lookup(var.az_numbers, data.aws_availability_zone.target.name_suffix))}" vpc_id = "${var.vpc_id}" availability_zone = "${var.availability_zone}" } diff --git a/examples/networking/subnet/terraform.template.tfvars b/examples/networking/subnet/terraform.template.tfvars new file mode 100644 index 00000000000..435e6fc8f1c --- /dev/null +++ b/examples/networking/subnet/terraform.template.tfvars @@ -0,0 +1,2 @@ +availability_zone = "us-west-2a" +vpc_id = "vpc-12345678" diff --git a/examples/networking/subnet/variables.tf b/examples/networking/subnet/variables.tf index 63808526816..c5819cb0496 100644 --- a/examples/networking/subnet/variables.tf +++ b/examples/networking/subnet/variables.tf @@ -9,3 +9,22 @@ data "aws_availability_zone" "target" { data "aws_vpc" "target" { id = "${var.vpc_id}" } + +variable "az_numbers" { + default = { + a = 0 + b = 1 + c = 2 + d = 3 + e = 4 + f = 5 + g = 6 + h = 7 + i = 8 + j = 9 + k = 10 + l = 11 + m = 12 + n = 13 + } +} diff --git a/examples/networking/variables.tf b/examples/networking/variables.tf index 054a1fc09f4..7482b1f4c5a 100644 --- a/examples/networking/variables.tf +++ b/examples/networking/variables.tf @@ -1,3 +1,3 @@ variable "base_cidr_block" { - default = "10.0.0.0/12" + default = "10.0.0.0/22" } diff --git a/examples/rds/README.md b/examples/rds/README.md index df492e4d72f..17ade5c44dd 100644 --- a/examples/rds/README.md +++ b/examples/rds/README.md @@ -16,3 +16,5 @@ Once ready run `terraform plan` to review. At the minimum, provide the vpc_id as input variable. Once satisfied with plan, run `terraform apply` + +Alternatively to using `-var` with each command, the `terraform.template.tfvars` file can be copied to `terraform.tfvars` and updated. diff --git a/examples/rds/terraform.template.tfvars b/examples/rds/terraform.template.tfvars new file mode 100644 index 00000000000..bbc90ba75b8 --- /dev/null +++ b/examples/rds/terraform.template.tfvars @@ -0,0 +1,2 @@ +password = "neverstorepasswordsinplaintext" +vpc_id = "vpc-12345678" diff --git a/examples/s3-api-gateway-integration/main.tf b/examples/s3-api-gateway-integration/main.tf index 78b388897f9..59c2f728d43 100644 --- a/examples/s3-api-gateway-integration/main.tf +++ b/examples/s3-api-gateway-integration/main.tf @@ -91,7 +91,7 @@ resource "aws_api_gateway_integration" "S3Integration" { credentials = "${aws_iam_role.s3_api_gateyway_role.arn}" } -resource "aws_api_gateway_method_response" "200" { +resource "aws_api_gateway_method_response" "Status200" { rest_api_id = "${aws_api_gateway_rest_api.MyS3.id}" resource_id = "${aws_api_gateway_rest_api.MyS3.root_resource_id}" http_method = "${aws_api_gateway_method.GetBuckets.http_method}" @@ -108,7 +108,7 @@ resource "aws_api_gateway_method_response" "200" { } } -resource "aws_api_gateway_method_response" "400" { +resource "aws_api_gateway_method_response" "Status400" { depends_on = ["aws_api_gateway_integration.S3Integration"] rest_api_id = "${aws_api_gateway_rest_api.MyS3.id}" @@ -117,7 +117,7 @@ resource "aws_api_gateway_method_response" "400" { status_code = "400" } -resource "aws_api_gateway_method_response" "500" { +resource "aws_api_gateway_method_response" "Status500" { depends_on = ["aws_api_gateway_integration.S3Integration"] rest_api_id = "${aws_api_gateway_rest_api.MyS3.id}" @@ -126,13 +126,13 @@ resource "aws_api_gateway_method_response" "500" { status_code = "500" } -resource "aws_api_gateway_integration_response" "200IntegrationResponse" { +resource "aws_api_gateway_integration_response" "IntegrationResponse200" { depends_on = ["aws_api_gateway_integration.S3Integration"] rest_api_id = "${aws_api_gateway_rest_api.MyS3.id}" resource_id = "${aws_api_gateway_rest_api.MyS3.root_resource_id}" http_method = "${aws_api_gateway_method.GetBuckets.http_method}" - status_code = "${aws_api_gateway_method_response.200.status_code}" + status_code = "${aws_api_gateway_method_response.Status200.status_code}" response_parameters = { "method.response.header.Timestamp" = "integration.response.header.Date" @@ -141,24 +141,24 @@ resource "aws_api_gateway_integration_response" "200IntegrationResponse" { } } -resource "aws_api_gateway_integration_response" "400IntegrationResponse" { +resource "aws_api_gateway_integration_response" "IntegrationResponse400" { depends_on = ["aws_api_gateway_integration.S3Integration"] rest_api_id = "${aws_api_gateway_rest_api.MyS3.id}" resource_id = "${aws_api_gateway_rest_api.MyS3.root_resource_id}" http_method = "${aws_api_gateway_method.GetBuckets.http_method}" - status_code = "${aws_api_gateway_method_response.400.status_code}" + status_code = "${aws_api_gateway_method_response.Status400.status_code}" selection_pattern = "4\\d{2}" } -resource "aws_api_gateway_integration_response" "500IntegrationResponse" { +resource "aws_api_gateway_integration_response" "IntegrationResponse500" { depends_on = ["aws_api_gateway_integration.S3Integration"] rest_api_id = "${aws_api_gateway_rest_api.MyS3.id}" resource_id = "${aws_api_gateway_rest_api.MyS3.root_resource_id}" http_method = "${aws_api_gateway_method.GetBuckets.http_method}" - status_code = "${aws_api_gateway_method_response.500.status_code}" + status_code = "${aws_api_gateway_method_response.Status500.status_code}" selection_pattern = "5\\d{2}" } diff --git a/examples/transit-gateway-cross-account-peering-attachment/README.md b/examples/transit-gateway-cross-account-peering-attachment/README.md new file mode 100644 index 00000000000..728bbe54d08 --- /dev/null +++ b/examples/transit-gateway-cross-account-peering-attachment/README.md @@ -0,0 +1,24 @@ +# EC2 Transit Gateway Cross-Account Peering Attachment + +This example demonstrates how to peer two Transit Gateways in different regions. The peer transit gateway can be in your account or a different AWS account. Refer to AWS documentation for supported regions. + +See [more in the Transit Gateway Peering Attachment documentation](https://docs.aws.amazon.com/vpc/latest/tgw/tgw-peering.html). + +## Running this example + +Either `cp terraform.template.tfvars terraform.tfvars` and modify that new file accordingly or provide variables via CLI: + +``` +terraform apply \ + -var="aws_first_access_key=AAAAAAAAAAAAAAAAAAA" \ + -var="aws_first_secret_key=SuperSecretKeyForAccount1" \ + -var="aws_second_access_key=BBBBBBBBBBBBBBBBBBB" \ + -var="aws_second_secret_key=SuperSecretKeyForAccount2" \ + -var="aws_first_region=us-east-2" \ + -var="aws_second_region=us-west-2" +``` + +## Prerequisites + +- This example requires two AWS accounts within the same AWS Organizations Organization +- Ensure Resource Access Manager is enabled in your organization. For more information, see the [Resource Access Manager User Guide](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html). diff --git a/examples/transit-gateway-cross-account-peering-attachment/main.tf b/examples/transit-gateway-cross-account-peering-attachment/main.tf new file mode 100644 index 00000000000..74771de7dc5 --- /dev/null +++ b/examples/transit-gateway-cross-account-peering-attachment/main.tf @@ -0,0 +1,87 @@ +// First accepts the Peering attachment. +provider "aws" { + alias = "first" + + region = "${var.aws_first_region}" + access_key = "${var.aws_first_access_key}" + secret_key = "${var.aws_first_secret_key}" +} + +// Second creates the Peering attachment. +provider "aws" { + alias = "second" + + region = "${var.aws_second_region}" + access_key = "${var.aws_second_access_key}" + secret_key = "${var.aws_second_secret_key}" +} + +data "aws_caller_identity" "first" { + provider = "aws.first" +} + +data "aws_caller_identity" "second" { + provider = "aws.second" +} + +resource "aws_ec2_transit_gateway" "first" { + provider = "aws.first" + + tags = { + Name = "terraform-example" + } +} + +resource "aws_ram_resource_share" "example" { + provider = "aws.first" + + name = "terraform-example" + + tags = { + Name = "terraform-example" + } +} + +// Share the transit gateway... +resource "aws_ram_resource_association" "example" { + provider = "aws.first" + + resource_arn = "${aws_ec2_transit_gateway.first.arn}" + resource_share_arn = "${aws_ram_resource_share.example.id}" +} + +// ...with the second account. +resource "aws_ram_principal_association" "example" { + provider = "aws.first" + + principal = "${data.aws_caller_identity.second.account_id}" + resource_share_arn = "${aws_ram_resource_share.example.id}" +} + +resource "aws_ec2_transit_gateway" "second" { + provider = "aws.second" + + tags = { + Name = "terraform-example" + } +} + +// Create the Peering attachment in the second account... +resource "aws_ec2_transit_gateway_peering_attachment" "example" { + provider = "aws.second" + + peer_account_id = "${data.aws_caller_identity.first.account_id}" + peer_region = "${var.aws_first_region}" + peer_transit_gateway_id = "${aws_ec2_transit_gateway.first.id}" + transit_gateway_id = "${aws_ec2_transit_gateway.second.id}" + tags = { + Name = "terraform-example" + Side = "Creator" + } + depends_on = ["aws_ram_principal_association.example", "aws_ram_resource_association.example"] + +} + +// ...it then needs to accepted by the first account. + +// ...terraform currently doesnt have resource for Transit Gateway Peering Attachment Acceptance diff --git a/examples/transit-gateway-cross-account-peering-attachment/terraform.template.tfvars b/examples/transit-gateway-cross-account-peering-attachment/terraform.template.tfvars new file mode 100644 index 00000000000..122bfe58357 --- /dev/null +++ b/examples/transit-gateway-cross-account-peering-attachment/terraform.template.tfvars @@ -0,0 +1,10 @@ +# First account +aws_first_access_key = "AAAAAAAAAAAAAAAAAAA" +aws_first_secret_key = "SuperSecretKeyForAccount1" + +# Second account +aws_second_access_key = "BBBBBBBBBBBBBBBBBBB" +aws_second_secret_key = "SuperSecretKeyForAccount2" + +aws_first_region = "us-west-2" +aws_second_region = "us-east-1" diff --git a/examples/transit-gateway-cross-account-peering-attachment/variables.tf b/examples/transit-gateway-cross-account-peering-attachment/variables.tf new file mode 100644 index 00000000000..88b369a456e --- /dev/null +++ b/examples/transit-gateway-cross-account-peering-attachment/variables.tf @@ -0,0 +1,11 @@ +variable "aws_first_access_key" {} + +variable "aws_first_secret_key" {} + +variable "aws_second_access_key" {} + +variable "aws_second_secret_key" {} + +variable "aws_first_region" {} + +variable "aws_second_region" {} diff --git a/examples/two-tier/README.md b/examples/two-tier/README.md index 34ad0dedbf6..6986d670d18 100644 --- a/examples/two-tier/README.md +++ b/examples/two-tier/README.md @@ -34,3 +34,5 @@ For example: ``` terraform apply -var 'key_name=terraform' -var 'public_key_path=/Users/jsmith/.ssh/terraform.pub' ``` + +Alternatively to using `-var` with each command, the `terraform.template.tfvars` file can be copied to `terraform.tfvars` and updated. diff --git a/examples/two-tier/terraform.template.tfvars b/examples/two-tier/terraform.template.tfvars new file mode 100644 index 00000000000..b19a09391c5 --- /dev/null +++ b/examples/two-tier/terraform.template.tfvars @@ -0,0 +1,2 @@ +key_name = "terraform-provider-aws-example" +public_key_path = "~/.ssh/terraform-provider-aws-example.pub" diff --git a/examples/workspaces/README.md b/examples/workspaces/README.md new file mode 100644 index 00000000000..9b6b75bbeba --- /dev/null +++ b/examples/workspaces/README.md @@ -0,0 +1,20 @@ +# AWS WorkSpaces Example + +This example demonstrates how to create a WorkSpace and WorkSpace directory using AWS WorkSpaces. + +## Note + +The AWS WorkSpaces service requires an IAM role named `workspaces_DefaultRole`. By default, this example assumes the role exists and is configured. If the role does not exist or is not configured appropriately, the example will not successfully deploy. + +The IAM resources are defined in the Terraform source file [iam.tf](./iam.tf), but are commented out. If the role does not exist in your environment, uncomment the contents of the file. The resources `aws_workspaces_directory.example` and `aws_workspaces_workspace.example` have dependencies on the IAM resources. The `depends_on` meta-arguments should also be uncommented on both. + +## Running this example + +This example can be run by calling + +```shell +terraform init +terraform apply +``` + +By default, resources are created in the `us-west-2` region. To override the region, set the variable `aws_region` to a different value. diff --git a/examples/workspaces/iam.tf b/examples/workspaces/iam.tf new file mode 100644 index 00000000000..de04b6a94a7 --- /dev/null +++ b/examples/workspaces/iam.tf @@ -0,0 +1,28 @@ +# Uncomment the resources in this file to create the IAM resources required by the AWS WorkSpaces service. +# Also uncomment the `depends_on` meta-arguments on `aws_workspaces_directory.example` and `aws_workspaces_workspace.example`. +# +# resource "aws_iam_role" "workspaces-default" { +# name = "workspaces_DefaultRole" +# assume_role_policy = "${data.aws_iam_policy_document.workspaces.json}" +# } +# +# data "aws_iam_policy_document" "workspaces" { +# statement { +# actions = ["sts:AssumeRole"] +# +# principals { +# type = "Service" +# identifiers = ["workspaces.amazonaws.com"] +# } +# } +# } +# +# resource "aws_iam_role_policy_attachment" "workspaces-default-service-access" { +# role = "${aws_iam_role.workspaces-default.name}" +# policy_arn = "arn:aws:iam::aws:policy/AmazonWorkSpacesServiceAccess" +# } +# +# resource "aws_iam_role_policy_attachment" "workspaces-default-self-service-access" { +# role = "${aws_iam_role.workspaces-default.name}" +# policy_arn = "arn:aws:iam::aws:policy/AmazonWorkSpacesSelfServiceAccess" +# } diff --git a/examples/workspaces/main.tf b/examples/workspaces/main.tf index cda2e0ed538..1be3d0664c3 100644 --- a/examples/workspaces/main.tf +++ b/examples/workspaces/main.tf @@ -1,36 +1,50 @@ provider "aws" { - region = "us-east-1" + region = "${var.aws_region}" } -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" -} +resource "aws_workspaces_directory" "example" { + directory_id = "${aws_directory_service_directory.example.id}" + subnet_ids = ["${aws_subnet.private-a.id}", "${aws_subnet.private-b.id}"] -resource "aws_subnet" "private-a" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "us-east-1a" - cidr_block = "10.0.1.0/24" + # Uncomment this meta-argument if you are creating the IAM resources required by the AWS WorkSpaces service. + # depends_on = [ + # "aws_iam_role.workspaces-default" + # ] } -resource "aws_subnet" "private-b" { - vpc_id = "${aws_vpc.main.id}" - availability_zone = "us-east-1b" - cidr_block = "10.0.2.0/24" +data "aws_workspaces_bundle" "value_windows" { + bundle_id = "wsb-bh8rsxt14" # Value with Windows 10 (English) } -resource "aws_directory_service_directory" "main" { - name = "tf-acctest.example.com" - password = "#S1ncerely" - size = "Small" - vpc_settings { - vpc_id = "${aws_vpc.main.id}" - subnet_ids = ["${aws_subnet.private-a.id}", "${aws_subnet.private-b.id}"] +resource "aws_workspaces_workspace" "example" { + directory_id = "${aws_workspaces_directory.example.id}" + bundle_id = "${data.aws_workspaces_bundle.value_windows.id}" + + # Administrator is always present in a new directory. + user_name = "Administrator" + + root_volume_encryption_enabled = true + user_volume_encryption_enabled = true + volume_encryption_key = "${aws_kms_key.example.arn}" + + workspace_properties { + compute_type_name = "VALUE" + user_volume_size_gib = 10 + root_volume_size_gib = 80 + running_mode = "AUTO_STOP" + running_mode_auto_stop_timeout_in_minutes = 60 } -} -resource "aws_workspaces_directory" "main" { - directory_id = "${aws_directory_service_directory.main.id}" - subnet_ids = ["${aws_subnet.private-a.id}", "${aws_subnet.private-b.id}"] + tags = { + Department = "IT" + } + + # Uncomment this meta-argument if you are creating the IAM resources required by the AWS WorkSpaces service. + # depends_on = [ + # # The role "workspaces_DefaultRole" requires the policy arn:aws:iam::aws:policy/AmazonWorkSpacesServiceAccess + # # to create and delete the ENI that the Workspaces service creates for the Workspace + # "aws_iam_role_policy_attachment.workspaces-default-service-access", + # ] } resource "aws_workspaces_ip_group" "main" { @@ -46,3 +60,55 @@ resource "aws_workspaces_ip_group" "main" { description = "Contractors" } } + +data "aws_region" "current" {} + +data "aws_availability_zones" "available" { + state = "available" + + filter { + name = "opt-in-status" + values = ["opt-in-not-required"] + } +} + +locals { + # Workspace instances are not supported in all AZs in some regions + # We use joined and split string values here instead of lists for Terraform 0.11 compatibility + region_workspaces_az_id_strings = { + "us-east-1" = "${join(",", formatlist("use1-az%d", list("2", "4", "6")))}" + } + + workspaces_az_id_strings = "${lookup(local.region_workspaces_az_id_strings, data.aws_region.current.name, join(",", data.aws_availability_zones.available.zone_ids))}" + workspaces_az_ids = "${split(",", local.workspaces_az_id_strings)}" +} + +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_subnet" "private-a" { + vpc_id = "${aws_vpc.main.id}" + availability_zone_id = "${local.workspaces_az_ids[0]}" + cidr_block = "10.0.1.0/24" +} + +resource "aws_subnet" "private-b" { + vpc_id = "${aws_vpc.main.id}" + availability_zone_id = "${local.workspaces_az_ids[1]}" + cidr_block = "10.0.2.0/24" +} + +resource "aws_directory_service_directory" "example" { + name = "workspaces.example.com" + password = "#S1ncerely" + size = "Small" + vpc_settings { + vpc_id = "${aws_vpc.main.id}" + subnet_ids = ["${aws_subnet.private-a.id}", "${aws_subnet.private-b.id}"] + } +} + +resource "aws_kms_key" "example" { + description = "WorkSpaces example key" +} diff --git a/examples/workspaces/variables.tf b/examples/workspaces/variables.tf new file mode 100644 index 00000000000..3c91c693825 --- /dev/null +++ b/examples/workspaces/variables.tf @@ -0,0 +1,4 @@ +variable "aws_region" { + description = "The AWS region to use" + default = "us-west-2" +} diff --git a/go.mod b/go.mod index eb11fe15767..1aadb5f25ac 100644 --- a/go.mod +++ b/go.mod @@ -3,23 +3,23 @@ module github.com/terraform-providers/terraform-provider-aws go 1.13 require ( - github.com/aws/aws-sdk-go v1.29.20 + github.com/aws/aws-sdk-go v1.31.2 github.com/beevik/etree v1.1.0 - github.com/bflad/tfproviderdocs v0.5.0 - github.com/bflad/tfproviderlint v0.11.0 + github.com/bflad/tfproviderdocs v0.6.0 + github.com/bflad/tfproviderlint v0.14.0 github.com/client9/misspell v0.3.4 - github.com/golangci/golangci-lint v1.23.8 + github.com/golangci/golangci-lint v1.26.0 github.com/hashicorp/aws-sdk-go-base v0.4.0 github.com/hashicorp/go-cleanhttp v0.5.1 github.com/hashicorp/go-multierror v1.0.0 github.com/hashicorp/go-version v1.2.0 - github.com/hashicorp/terraform-plugin-sdk v1.7.0 + github.com/hashicorp/terraform-plugin-sdk v1.13.1 github.com/hashicorp/vault v0.10.4 github.com/jen20/awspolicyequivalence v1.1.0 github.com/katbyte/terrafmt v0.2.1-0.20200303174203-e6a3e82cb21b github.com/mitchellh/copystructure v1.0.0 github.com/mitchellh/go-homedir v1.1.0 github.com/pquerna/otp v1.2.0 - golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2 + golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e gopkg.in/yaml.v2 v2.2.8 ) diff --git a/go.sum b/go.sum index cabbefd63b2..8f08832955b 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,8 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157 h1:hY39LwQHh+1kaovmIjOrlqnXNX6tygSRfLkkK33IkZU= +github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= @@ -37,28 +39,29 @@ github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.29.20 h1:vAHJhARpdbdeJstTVaugeHgvVj5lBnfz3blbbD24gfo= -github.com/aws/aws-sdk-go v1.29.20/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go v1.31.2 h1:REYLkyG1EGES8SJS0QsUwvWix9oQwUbJ8HLgMxUHpKo= +github.com/aws/aws-sdk-go v1.31.2/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU= github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA= -github.com/bflad/tfproviderdocs v0.5.0 h1:FzT4hEtKX1WcrLmZSRB83kFdzRmkqu7kS9RHn5oKAuA= -github.com/bflad/tfproviderdocs v0.5.0/go.mod h1:d0k1fQLEu1pdeORxozwuwmvauFaEmMBREQ1fw3J+pPc= -github.com/bflad/tfproviderlint v0.11.0 h1:+yxfoHoOhg8h/oNSf7YwNDs/ztAJZPXIpx4IQwrjMUg= -github.com/bflad/tfproviderlint v0.11.0/go.mod h1:MsNI3eEj7uC7P/h7XmGvzMLtsotLkrvB+NF2/w3RZGc= +github.com/bflad/tfproviderdocs v0.6.0 h1:P5XMTe0tB44xlMZmIvoQx/nfPht0pNymLtEArvYSOQE= +github.com/bflad/tfproviderdocs v0.6.0/go.mod h1:W6wVZPtBa6V5bpjaK1eJAoVCL/7B4Amfrld0dro+fHU= +github.com/bflad/tfproviderlint v0.14.0 h1:iki5tDr4l0jp0zEL0chZylptMT5QdE09E60cziFQNZA= +github.com/bflad/tfproviderlint v0.14.0/go.mod h1:1Jtjs6DPKoyqPrbPyMiy33h0ViO2h831uzoOuikCA60= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bmatcuk/doublestar v1.2.1 h1:eetYiv8DDYOZcBADY+pRvRytf3Dlz1FhnpvL2FsClBc= github.com/bmatcuk/doublestar v1.2.1/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= -github.com/bombsimon/wsl/v2 v2.0.0 h1:+Vjcn+/T5lSrO8Bjzhk4v14Un/2UyCA1E3V5j9nwTkQ= -github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= +github.com/bombsimon/wsl/v3 v3.0.0 h1:w9f49xQatuaeTJFaNP4SpiWSR5vfT6IstPtM62JjcqA= +github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= @@ -73,6 +76,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -80,6 +84,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= @@ -123,6 +129,7 @@ github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUD github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw= @@ -146,6 +153,9 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= @@ -162,8 +172,8 @@ github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70u github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.23.8 h1:NlD+Ld2TKH8qVmADy4iEvPxVmXaqPIeQu3d1cGQP4jc= -github.com/golangci/golangci-lint v1.23.8/go.mod h1:g/38bxfhp4rI7zeWSxcdIeHTQGS58TCak8FYcyCmavQ= +github.com/golangci/golangci-lint v1.26.0 h1:CLLGRSA9BLMiNvsWPXHioYAdfIx9tkgdVWyA6bIdYCo= +github.com/golangci/golangci-lint v1.26.0/go.mod h1:tefbO6RcigFzvTnDC+Y51kntVGgkuCAVsC+mnfbPruc= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= @@ -250,14 +260,18 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 h1:+RyjwU+Gnd/aTJBPZVDNm903eXVjjqhbaR4Ypx3xYyY= github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= -github.com/hashicorp/terraform-json v0.3.1 h1:vRiOLck4YX4UqzljVhdQKsVLixX4L+Pgnm/q+xu6QvE= -github.com/hashicorp/terraform-json v0.3.1/go.mod h1:MdwQStcJb00ht55L/2YH0ypAO9RNtczJ1MaUlf+gJcg= github.com/hashicorp/terraform-json v0.4.0 h1:KNh29iNxozP5adfUFBJ4/fWd0Cu3taGgjHB38JYqOF4= github.com/hashicorp/terraform-json v0.4.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= +github.com/hashicorp/terraform-json v0.5.0 h1:7TV3/F3y7QVSuN4r9BEXqnWqrAyeOtON8f0wvREtyzs= +github.com/hashicorp/terraform-json v0.5.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmXqxSzXe8+GhknoW0= github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY= +github.com/hashicorp/terraform-plugin-sdk v1.13.1 h1:kWq+V+4BMFKtzIuO8wb/k4SRGB/VVF8g468VSFmAnKM= +github.com/hashicorp/terraform-plugin-sdk v1.13.1/go.mod h1:HiWIPD/T9HixIhQUwaSoDQxo4BLFdmiBi/Qz5gjB8Q0= github.com/hashicorp/terraform-plugin-test v1.2.0 h1:AWFdqyfnOj04sxTdaAF57QqvW7XXrT8PseUHkbKsE8I= github.com/hashicorp/terraform-plugin-test v1.2.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= +github.com/hashicorp/terraform-plugin-test v1.3.0 h1:hU5LoxrOn9qvOo+LTKN6mSav2J+dAMprbdxJPEQvp4U= +github.com/hashicorp/terraform-plugin-test v1.3.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 h1:hjyO2JsNZUKT1ym+FAdlBEkGPevazYsmVgIMw7dVELg= github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= github.com/hashicorp/vault v0.10.4 h1:4x0lHxui/ZRp/B3E0Auv1QNBJpzETqHR2kQD3mHSBJU= @@ -279,6 +293,8 @@ github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -305,6 +321,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= @@ -316,6 +334,8 @@ github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDe github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE= github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= @@ -361,22 +381,28 @@ github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/I github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mozilla/tls-observatory v0.0.0-20200220173314-aae45faa4006/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= +github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= @@ -396,6 +422,7 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -405,8 +432,10 @@ github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1: github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83 h1:AtnWoOvTioyDXFvu96MWEeE8qj4COSQnJogzLy/u41A= -github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= +github.com/ryancurrah/gomodguard v1.0.4 h1:oCreMAt9GuFXDe9jW4HBpc3GjdX3R/sUEcLAGh1zPx8= +github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= +github.com/securego/gosec v0.0.0-20200316084457-7da9f46445fd h1:qB+l4fYZsH78xORC1aqVS0zNmgkQp4rkj2rvfxQMtzc= +github.com/securego/gosec v0.0.0-20200316084457-7da9f46445fd/go.mod h1:NurAFZsWJAEZjogSwdVPlHkOZB3DOAU7gsPP8VFZCHc= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= @@ -455,13 +484,19 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0KQWXKNqmwe8vEeSUiUj4Rlee9CMVX2ZUQ= +github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tetafro/godot v0.3.3 h1:uJjg8N+Ee10rAnaqJGet1WeI0YW4fiX9pKbwqnsqH6k= +github.com/tetafro/godot v0.3.3/go.mod h1:pT6/T8+h6//L/LwQcFc4C0xpfy1euZwzS1sHdrFCms0= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tommy-muehle/go-mnd v1.1.1 h1:4D0wuPKjOTiK2garzuPGGvm4zZ/wLYDOH8TJSABC7KU= -github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa h1:RC4maTWLKKwb7p1cnoygsbKIgNlJqSYBeAFON3Ar8As= +github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= @@ -481,7 +516,8 @@ github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElyw github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/zclconf/go-cty v0.0.0-20190430221426-d36a6f0dbffd/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0 h1:uJwc9HiBOCpoKIObTQaLR+tsEXx1HBHnOsOOpcdhZgw= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= @@ -515,10 +551,13 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -543,6 +582,9 @@ golang.org/x/net v0.0.0-20191009170851-d66e71096ffb h1:TR699M2v0qoKTOHxeLgp6zPqa golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -555,6 +597,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -575,10 +618,11 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= @@ -615,17 +659,21 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a h1:3IG7HNvPBDvrxpnTWA6zpeNCS5ydX6cdt6oOiGlC8qg= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204192400-7124308813f3 h1:Ms82wn6YK4ZycO6Bxyh0kxX3gFFVGo79CCuc52xgcys= -golang.org/x/tools v0.0.0-20200204192400-7124308813f3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200214201135-548b770e2dfa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2 h1:0sfSpGSa544Fwnbot3Oxq/U6SXqjty6Jy/3wRhVS7ig= golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200228224639-71482053b885/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e h1:3Dzrrxi54Io7Aoyb0PYLsI47K2TxkRQg+cqUn+m04do= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -646,6 +694,8 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a h1:lRlI5zu6AFy3iU/F8YWyNrAmn/tPCnhiTxfwhWb76eU= +google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -654,6 +704,9 @@ google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -661,6 +714,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= @@ -677,7 +732,6 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= diff --git a/infrastructure/README.md b/infrastructure/README.md new file mode 100644 index 00000000000..c09f277cde6 --- /dev/null +++ b/infrastructure/README.md @@ -0,0 +1,5 @@ +# infrastructure + +Terraform configurations for managing Terraform AWS Provider infrastructure components. + +- [repository](./repository): Manages the code repository, e.g. labels. diff --git a/infrastructure/repository/README.md b/infrastructure/repository/README.md new file mode 100644 index 00000000000..7f55d03943f --- /dev/null +++ b/infrastructure/repository/README.md @@ -0,0 +1,5 @@ +# repository + +Public Terraform configuration for managing the `terraform-provider-aws` code repository, to enable community contributions. Currently only utilized for managing AWS Partition, AWS Service, and workflow labels. + +HashiCorp maintainers should utilize the `terraform-repositories` repository for managing more sensitive configuration. diff --git a/infrastructure/repository/labels-partition.tf b/infrastructure/repository/labels-partition.tf new file mode 100644 index 00000000000..30fa3d006b3 --- /dev/null +++ b/infrastructure/repository/labels-partition.tf @@ -0,0 +1,18 @@ +variable "partition_labels" { + default = [ + "aws-cn", + "aws-iso", + "aws-iso-b", + "aws-us-gov", + ] + description = "Set of AWS Partition labels" + type = set(string) +} + +resource "github_issue_label" "partition" { + for_each = var.partition_labels + + repository = "terraform-provider-aws" + name = "partition/${each.value}" + color = "bfd4f2" +} diff --git a/infrastructure/repository/labels-service.tf b/infrastructure/repository/labels-service.tf new file mode 100644 index 00000000000..c5472d83e67 --- /dev/null +++ b/infrastructure/repository/labels-service.tf @@ -0,0 +1,201 @@ +# +# For future consideration, this list could be automatically generated +# via the AWS SDK service list. +# + +variable "service_labels" { + default = [ + "accessanalyzer", + "acm", + "acmpca", + "alexaforbusiness", + "amplify", + "apigateway", + "apigatewaymanagementapi", + "apigatewayv2", + "appconfig", + "applicationautoscaling", + "applicationdiscoveryservice", + "applicationinsights", + "appmesh", + "appstream", + "appsync", + "athena", + "autoscaling", + "autoscalingplans", + "backup", + "batch", + "budgets", + "chime", + "cloud9", + "clouddirectory", + "cloudformation", + "cloudfront", + "cloudhsm", + "cloudhsmv2", + "cloudsearch", + "cloudtrail", + "cloudwatch", + "cloudwatchevents", + "cloudwatchlogs", + "codebuild", + "codecommit", + "codedeploy", + "codeguruprofiler", + "codegurureviewer", + "codepipeline", + "codestar", + "codestarconnections", + "codestarnotifications", + "cognito", + "comprehend", + "comprehendmedical", + "computeoptimizer", + "configservice", + "connect", + "costandusagereportservice", + "costexplorer", + "databasemigrationservice", + "dataexchange", + "datapipeline", + "datasync", + "dax", + "detective", + "devicefarm", + "directconnect", + "directoryservice", + "dlm", + "docdb", + "dynamodb", + "ec2-classic", + "ec2", + "ecr", + "ecs", + "efs", + "eks", + "elastic-transcoder", + "elasticache", + "elasticbeanstalk", + "elasticinference", + "elasticsearch", + "elb", + "elbv2", + "emr", + "eventbridge", + "firehose", + "fms", + "forecastservice", + "frauddetector", + "fsx", + "gamelift", + "glacier", + "globalaccelerator", + "glue", + "greengrass", + "groundstation", + "guardduty", + "iam", + "imagebuilder", + "inspector", + "iot", + "iotanalytics", + "iotevents", + "iotsecuretunneling", + "iotsitewise", + "iotthingsgraph", + "kafka", + "kendra", + "kinesis", + "kinesisanalytics", + "kinesisanalyticsv2", + "kinesisvideo", + "kms", + "lakeformation", + "lambda", + "lexmodelbuildingservice", + "licensemanager", + "lightsail", + "machinelearning", + "macie", + "managedblockchain", + "marketplacecatalog", + "mediaconnect", + "mediaconvert", + "medialive", + "mediapackage", + "mediapackagevod", + "mediastore", + "mediatailor", + "meteringmarketplace", + "mobile", + "mq", + "neptune", + "networkmanager", + "opsworks", + "organizations", + "outposts", + "personalize", + "pi", + "pinpoint", + "pinpointemail", + "pinpointsmsvoice", + "polly", + "pricing", + "qldb", + "quicksight", + "ram", + "rds", + "redshift", + "resourcegroups", + "robomaker", + "route53", + "route53domains", + "route53resolver", + "s3", + "s3control", + "sagemaker", + "savingsplans", + "secretsmanager", + "securityhub", + "serverlessapplicationrepository", + "servicecatalog", + "servicediscovery", + "servicequotas", + "ses", + "sesv2", + "sfn", + "shield", + "simpledb", + "sms", + "snowball", + "sns", + "sqs", + "ssm", + "storagegateway", + "sts", + "support", + "swf", + "synthetics", + "textract", + "transcribeservice", + "transfer", + "translate", + "waf", + "wafv2", + "workdocs", + "worklink", + "workmail", + "workspaces", + "xray", + ] + description = "Set of AWS Go SDK service labels" + type = set(string) +} + +resource "github_issue_label" "service" { + for_each = var.service_labels + + repository = "terraform-provider-aws" + name = "service/${each.value}" + color = "bfd4f2" +} diff --git a/infrastructure/repository/labels-workflow.tf b/infrastructure/repository/labels-workflow.tf new file mode 100644 index 00000000000..1bcb9a4d156 --- /dev/null +++ b/infrastructure/repository/labels-workflow.tf @@ -0,0 +1,18 @@ +variable "workflow_labels" { + default = { + "examples" = "fef2c0", + "hacktoberfest" = "2c0fad", + "needs-triage" = "e236d7", + "terraform-plugin-sdk-migration" = "fad8c7", + } + description = "Name-color mapping of workflow issues" + type = map(string) +} + +resource "github_issue_label" "workflow" { + for_each = var.workflow_labels + + repository = "terraform-provider-aws" + name = each.key + color = each.value +} diff --git a/infrastructure/repository/main.tf b/infrastructure/repository/main.tf new file mode 100644 index 00000000000..4a55664a872 --- /dev/null +++ b/infrastructure/repository/main.tf @@ -0,0 +1,15 @@ +terraform { + backend "atlas" { + name = "hashicorp-v2/terraform-provider-aws-repository" + } + + required_providers { + github = "2.7.0" + } + + required_version = "~> 0.12.24" +} + +provider "github" { + organization = "terraform-providers" +} diff --git a/scripts/markdown-link-check.sh b/scripts/markdown-link-check.sh new file mode 100755 index 00000000000..d21308ac184 --- /dev/null +++ b/scripts/markdown-link-check.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Local script runner for recursive markdown-link-check +# Based on: https://github.com/gaurav-nelson/github-action-markdown-link-check/blob/master/entrypoint.sh + +if [ -z "$(docker image list -q markdown-link-check)" ]; then + echo "This script requires the markdown-link-check Docker image." + echo "" + echo "More information: https://github.com/tcort/markdown-link-check" + exit 1 +fi + +echo "==> Checking Markdown links..." + +error_file="markdown-link-check-errors.txt" +output_file="markdown-link-check-output.txt" + +rm -f "$error_file" "$output_file" + +docker run --rm -i -t \ + -v $(pwd):/github/workspace:ro \ + -w /github/workspace \ + --entrypoint /usr/bin/find \ + markdown-link-check \ + website -type f -name "*.md" -or -name "*.markdown" -exec /src/markdown-link-check --config .markdownlinkcheck.json --quiet --verbose {} \; \ + | tee -a "${output_file}" + +touch "${error_file}" +PREVIOUS_LINE="" +while IFS= read -r LINE; do + if [[ $LINE = *"FILE"* ]]; then + PREVIOUS_LINE=$LINE + if [[ $(tail -1 "${error_file}") != *FILE* ]]; then + echo -e "\n" >> "${error_file}" + echo "$LINE" >> "${error_file}" + fi + elif [[ $LINE = *"✖"* ]] && [[ $PREVIOUS_LINE = *"FILE"* ]]; then + echo "$LINE" >> "${error_file}" + else + PREVIOUS_LINE="" + fi +done < "${output_file}" + +if grep -q "ERROR:" "${output_file}"; then + echo -e "==================> MARKDOWN LINK CHECK FAILED <==================" + if [[ $(tail -1 "${error_file}") = *FILE* ]]; then + sed '$d' "${error_file}" + else + cat "${error_file}" + fi + printf "\n" + echo -e "==================================================================" + exit 1 +else + echo -e "==================> MARKDOWN LINK CHECK SUCCESS <==================" + printf "\n" + echo -e "[✔] All links are good!" + printf "\n" + echo -e "===================================================================" +fi + +rm -f "$error_file" "$output_file" + +exit 0 diff --git a/vendor/github.com/Djarvur/go-err113/.gitignore b/vendor/github.com/Djarvur/go-err113/.gitignore new file mode 100644 index 00000000000..66fd13c903c --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/.gitignore @@ -0,0 +1,15 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ diff --git a/vendor/github.com/Djarvur/go-err113/.golangci.yml b/vendor/github.com/Djarvur/go-err113/.golangci.yml new file mode 100644 index 00000000000..2abdfc6392c --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/.golangci.yml @@ -0,0 +1,150 @@ +# This file contains all available configuration options +# with their default values. + +# options for analysis running +run: + # default concurrency is a available CPU number + concurrency: 4 + + # timeout for analysis, e.g. 30s, 5m, default is 1m + deadline: 15m + + # exit code when at least one issue was found, default is 1 + issues-exit-code: 1 + + # include test files or not, default is true + tests: false + + # list of build tags, all linters use it. Default is empty list. + #build-tags: + # - mytag + + # which dirs to skip: they won't be analyzed; + # can use regexp here: generated.*, regexp is applied on full path; + # default value is empty list, but next dirs are always skipped independently + # from this option's value: + # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ + skip-dirs: + - /gen$ + + # which files to skip: they will be analyzed, but issues from them + # won't be reported. Default value is empty list, but there is + # no need to include all autogenerated files, we confidently recognize + # autogenerated files. If it's not please let us know. + skip-files: + - ".*\\.my\\.go$" + - lib/bad.go + - ".*\\.template\\.go$" + +# output configuration options +output: + # colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" + format: colored-line-number + + # print lines of code with issue, default is true + print-issued-lines: true + + # print linter name in the end of issue text, default is true + print-linter-name: true + +# all available settings of specific linters +linters-settings: + errcheck: + # report about not checking of errors in type assetions: `a := b.(MyStruct)`; + # default is false: such cases aren't reported by default. + check-type-assertions: false + + # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; + # default is false: such cases aren't reported by default. + check-blank: false + govet: + # report about shadowed variables + check-shadowing: true + + # Obtain type information from installed (to $GOPATH/pkg) package files: + # golangci-lint will execute `go install -i` and `go test -i` for analyzed packages + # before analyzing them. + # By default this option is disabled and govet gets type information by loader from source code. + # Loading from source code is slow, but it's done only once for all linters. + # Go-installing of packages first time is much slower than loading them from source code, + # therefore this option is disabled by default. + # But repeated installation is fast in go >= 1.10 because of build caching. + # Enable this option only if all conditions are met: + # 1. you use only "fast" linters (--fast e.g.): no program loading occurs + # 2. you use go >= 1.10 + # 3. you do repeated runs (false for CI) or cache $GOPATH/pkg or `go env GOCACHE` dir in CI. + use-installed-packages: false + golint: + # minimal confidence for issues, default is 0.8 + min-confidence: 0.8 + gofmt: + # simplify code: gofmt with `-s` option, true by default + simplify: true + gocyclo: + # minimal code complexity to report, 30 by default (but we recommend 10-20) + min-complexity: 10 + maligned: + # print struct with more effective memory layout or not, false by default + suggest-new: true + dupl: + # tokens count to trigger issue, 150 by default + threshold: 100 + goconst: + # minimal length of string constant, 3 by default + min-len: 3 + # minimal occurrences count to trigger, 3 by default + min-occurrences: 3 + depguard: + list-type: blacklist + include-go-root: false + packages: + - github.com/davecgh/go-spew/spew + +linters: + #enable: + # - staticcheck + # - unused + # - gosimple + enable-all: true + disable: + - lll + disable-all: false + #presets: + # - bugs + # - unused + fast: false + +issues: + # List of regexps of issue texts to exclude, empty list by default. + # But independently from this option we use default exclude patterns, + # it can be disabled by `exclude-use-default: false`. To list all + # excluded by default patterns execute `golangci-lint run --help` + exclude: + - "`parseTained` is unused" + - "`parseState` is unused" + + # Independently from option `exclude` we use default exclude patterns, + # it can be disabled by this option. To list all + # excluded by default patterns execute `golangci-lint run --help`. + # Default value for this option is false. + exclude-use-default: false + + # Maximum issues count per one linter. Set to 0 to disable. Default is 50. + max-per-linter: 0 + + # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. + max-same: 0 + + # Show only new issues: if there are unstaged changes or untracked files, + # only those changes are analyzed, else only changes in HEAD~ are analyzed. + # It's a super-useful option for integration of golangci-lint into existing + # large codebase. It's not practical to fix all existing issues at the moment + # of integration: much better don't allow issues in new code. + # Default is false. + new: false + + # Show only new issues created after git revision `REV` + #new-from-rev: REV + + # Show only new issues created in git patch with set file path. + #new-from-patch: path/to/patch/file \ No newline at end of file diff --git a/vendor/github.com/Djarvur/go-err113/.travis.yml b/vendor/github.com/Djarvur/go-err113/.travis.yml new file mode 100644 index 00000000000..44fe77d53ac --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/.travis.yml @@ -0,0 +1,24 @@ +language: go + +go: + - "1.13" + - "1.14" + - tip + +env: + - GO111MODULE=on + +before_install: + - go get github.com/axw/gocov/gocov + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover + - go get golang.org/x/tools/cmd/goimports + - wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh + +script: + - test -z "$(goimports -d ./ 2>&1)" + - ./bin/golangci-lint run + - go test -v -race ./... + +after_success: + - test "$TRAVIS_GO_VERSION" = "1.14" && goveralls -service=travis-ci diff --git a/vendor/github.com/Djarvur/go-err113/LICENSE b/vendor/github.com/Djarvur/go-err113/LICENSE new file mode 100644 index 00000000000..a78ad8c7766 --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Djarvur + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/Djarvur/go-err113/README.adoc b/vendor/github.com/Djarvur/go-err113/README.adoc new file mode 100644 index 00000000000..b4c1f437542 --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/README.adoc @@ -0,0 +1,73 @@ += err113 image:https://godoc.org/github.com/Djarvur/go-err113?status.svg["GoDoc",link="http://godoc.org/github.com/Djarvur/go-err113"] image:https://travis-ci.org/Djarvur/go-err113.svg["Build Status",link="https://travis-ci.org/Djarvur/go-err113"] image:https://coveralls.io/repos/Djarvur/go-err113/badge.svg?branch=master&service=github["Coverage Status",link="https://coveralls.io/github/Djarvur/go-err113?branch=master"] +Daniel Podolsky +:toc: + +Golang linter to check the errors handling expressions + +== Details + +Starting from Go 1.13 the standard `error` type behaviour was changed: one `error` could be derived from another with `fmt.Errorf()` method using `%w` format specifier. + +So the errors hierarchy could be built for flexible and responsible errors processing. + +And to make this possible at least two simple rules should be followed: + +1. `error` values should not be compared directly but with `errors.Is()` method. +1. `error` should not be created dynamically from scratch but by the wrapping the static (package-level) error. + +This linter is checking the code for these 2 rules compliance. + +=== Reports + +So, `err113` reports every `==` and `!=` comparison for exact `error` type variables except comparison to `nil` and `io.EOF`. + +Also, any call of `errors.New()` and `fmt.Errorf()` methods are reported except the calls used to initialise package-level variables and the `fmt.Errorf()` calls wrapping the other errors. + +Note: non-standard packages, like `github.com/pkg/errors` are ignored complitely. + +== Install + +``` +go get -u github.com/Djarvur/go-err113/cmd/err113 +``` + +== Usage + +Defined by link:https://pkg.go.dev/golang.org/x/tools/go/analysis/singlechecker[singlechecker] package. + +``` +err113: checks the error handling rules according to the Go 1.13 new error type + +Usage: err113 [-flag] [package] + + +Flags: + -V print version and exit + -all + no effect (deprecated) + -c int + display offending line with this many lines of context (default -1) + -cpuprofile string + write CPU profile to this file + -debug string + debug flags, any subset of "fpstv" + -fix + apply all suggested fixes + -flags + print analyzer flags in JSON + -json + emit JSON output + -memprofile string + write memory profile to this file + -source + no effect (deprecated) + -tags string + no effect (deprecated) + -trace string + write trace log to this file + -v no effect (deprecated) +``` + +== Thanks + +To link:https://github.com/quasilyte[Iskander (Alex) Sharipov] for the really useful advices. diff --git a/vendor/github.com/Djarvur/go-err113/comparison.go b/vendor/github.com/Djarvur/go-err113/comparison.go new file mode 100644 index 00000000000..7e7777df68b --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/comparison.go @@ -0,0 +1,103 @@ +package err113 + +import ( + "fmt" + "go/ast" + "go/token" + "go/types" + + "golang.org/x/tools/go/analysis" +) + +func inspectComparision(pass *analysis.Pass, n ast.Node) bool { // nolint: unparam + // check whether the call expression matches time.Now().Sub() + be, ok := n.(*ast.BinaryExpr) + if !ok { + return true + } + + // check if it is a comparison operation + if be.Op != token.EQL && be.Op != token.NEQ { + return true + } + + // check that both left and right hand side are not nil + if pass.TypesInfo.Types[be.X].IsNil() || pass.TypesInfo.Types[be.Y].IsNil() { + return true + } + + // check that both left and right hand side are not io.EOF + if isEOF(be.X, pass.TypesInfo) || isEOF(be.Y, pass.TypesInfo) { + return true + } + + // check that both left and right hand side are errors + if !isError(be.X, pass.TypesInfo) && !isError(be.Y, pass.TypesInfo) { + return true + } + + oldExpr := render(pass.Fset, be) + + negate := "" + if be.Op == token.NEQ { + negate = "!" + } + + newExpr := fmt.Sprintf("%s%s.Is(%s, %s)", negate, "errors", be.X, be.Y) + + pass.Report( + analysis.Diagnostic{ + Pos: be.Pos(), + Message: fmt.Sprintf("do not compare errors directly, use errors.Is() instead: %q", oldExpr), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: fmt.Sprintf("should replace %q with %q", oldExpr, newExpr), + TextEdits: []analysis.TextEdit{ + { + Pos: be.Pos(), + End: be.End(), + NewText: []byte(newExpr), + }, + }, + }, + }, + }, + ) + + return true +} + +func isError(v ast.Expr, info *types.Info) bool { + if intf, ok := info.TypeOf(v).Underlying().(*types.Interface); ok { + return intf.NumMethods() == 1 && intf.Method(0).FullName() == "(error).Error" + } + + return false +} + +func isEOF(ex ast.Expr, info *types.Info) bool { + se, ok := ex.(*ast.SelectorExpr) + if !ok || se.Sel.Name != "EOF" { + return false + } + + if ep, ok := asImportedName(se.X, info); !ok || ep != "io" { + return false + } + + return true +} + +func asImportedName(ex ast.Expr, info *types.Info) (string, bool) { + ei, ok := ex.(*ast.Ident) + if !ok { + return "", false + } + + ep, ok := info.ObjectOf(ei).(*types.PkgName) + if !ok { + return "", false + } + + return ep.Imported().Name(), true +} diff --git a/vendor/github.com/Djarvur/go-err113/definition.go b/vendor/github.com/Djarvur/go-err113/definition.go new file mode 100644 index 00000000000..79201c929d2 --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/definition.go @@ -0,0 +1,74 @@ +package err113 + +import ( + "go/ast" + "go/types" + "strings" + + "golang.org/x/tools/go/analysis" +) + +var methods2check = map[string]map[string]func(*ast.CallExpr, *types.Info) bool{ // nolint: gochecknoglobals + "errors": {"New": justTrue}, + "fmt": {"Errorf": checkWrap}, +} + +func justTrue(*ast.CallExpr, *types.Info) bool { + return true +} + +func checkWrap(ce *ast.CallExpr, info *types.Info) bool { + return !(len(ce.Args) > 0 && strings.Contains(toString(ce.Args[0], info), `%w`)) +} + +func inspectDefinition(pass *analysis.Pass, tlds map[*ast.CallExpr]struct{}, n ast.Node) bool { //nolint: unparam + // check whether the call expression matches time.Now().Sub() + ce, ok := n.(*ast.CallExpr) + if !ok { + return true + } + + if _, ok = tlds[ce]; ok { + return true + } + + fn, ok := ce.Fun.(*ast.SelectorExpr) + if !ok { + return true + } + + fxName, ok := asImportedName(fn.X, pass.TypesInfo) + if !ok { + return true + } + + methods, ok := methods2check[fxName] + if !ok { + return true + } + + checkFunc, ok := methods[fn.Sel.Name] + if !ok { + return true + } + + if !checkFunc(ce, pass.TypesInfo) { + return true + } + + pass.Reportf( + ce.Pos(), + "do not define dynamic errors, use wrapped static errors instead: %q", + render(pass.Fset, ce), + ) + + return true +} + +func toString(ex ast.Expr, info *types.Info) string { + if tv, ok := info.Types[ex]; ok && tv.Value != nil { + return tv.Value.String() + } + + return "" +} diff --git a/vendor/github.com/Djarvur/go-err113/err113.go b/vendor/github.com/Djarvur/go-err113/err113.go new file mode 100644 index 00000000000..e9d93a7a0fe --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/err113.go @@ -0,0 +1,90 @@ +// Package err113 is a Golang linter to check the errors handling expressions +package err113 + +import ( + "bytes" + "go/ast" + "go/printer" + "go/token" + + "golang.org/x/tools/go/analysis" +) + +// NewAnalyzer creates a new analysis.Analyzer instance tuned to run err113 checks +func NewAnalyzer() *analysis.Analyzer { + return &analysis.Analyzer{ + Name: "err113", + Doc: "checks the error handling rules according to the Go 1.13 new error type", + Run: run, + } +} + +func run(pass *analysis.Pass) (interface{}, error) { + for _, file := range pass.Files { + tlds := enumerateFileDecls(file) + + ast.Inspect( + file, + func(n ast.Node) bool { + return inspectComparision(pass, n) && + inspectDefinition(pass, tlds, n) + }, + ) + } + + return nil, nil +} + +// render returns the pretty-print of the given node +func render(fset *token.FileSet, x interface{}) string { + var buf bytes.Buffer + if err := printer.Fprint(&buf, fset, x); err != nil { + panic(err) + } + + return buf.String() +} + +func enumerateFileDecls(f *ast.File) map[*ast.CallExpr]struct{} { + res := make(map[*ast.CallExpr]struct{}) + + var ces []*ast.CallExpr // nolint: prealloc + + for _, d := range f.Decls { + ces = append(ces, enumerateDeclVars(d)...) + } + + for _, ce := range ces { + res[ce] = struct{}{} + } + + return res +} + +func enumerateDeclVars(d ast.Decl) (res []*ast.CallExpr) { + td, ok := d.(*ast.GenDecl) + if !ok || td.Tok != token.VAR { + return nil + } + + for _, s := range td.Specs { + res = append(res, enumerateSpecValues(s)...) + } + + return res +} + +func enumerateSpecValues(s ast.Spec) (res []*ast.CallExpr) { + vs, ok := s.(*ast.ValueSpec) + if !ok { + return nil + } + + for _, v := range vs.Values { + if ce, ok := v.(*ast.CallExpr); ok { + res = append(res, ce) + } + } + + return res +} diff --git a/vendor/github.com/Djarvur/go-err113/go.mod b/vendor/github.com/Djarvur/go-err113/go.mod new file mode 100644 index 00000000000..6e28e93367b --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/go.mod @@ -0,0 +1,5 @@ +module github.com/Djarvur/go-err113 + +go 1.13 + +require golang.org/x/tools v0.0.0-20200324003944-a576cf524670 diff --git a/vendor/github.com/Djarvur/go-err113/go.sum b/vendor/github.com/Djarvur/go-err113/go.sum new file mode 100644 index 00000000000..dab64209da8 --- /dev/null +++ b/vendor/github.com/Djarvur/go-err113/go.sum @@ -0,0 +1,20 @@ +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670 h1:fW7EP/GZqIvbHessHd1PLca+77TBOsRBqtaybMgXJq8= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index c75d7bba033..9f8fd92a50f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -107,6 +107,13 @@ type Provider interface { IsExpired() bool } +// ProviderWithContext is a Provider that can retrieve credentials with a Context +type ProviderWithContext interface { + Provider + + RetrieveWithContext(Context) (Value, error) +} + // An Expirer is an interface that Providers can implement to expose the expiration // time, if known. If the Provider cannot accurately provide this info, // it should not implement this interface. @@ -233,7 +240,9 @@ func (c *Credentials) GetWithContext(ctx Context) (Value, error) { // Cannot pass context down to the actual retrieve, because the first // context would cancel the whole group when there is not direct // association of items in the group. - resCh := c.sf.DoChan("", c.singleRetrieve) + resCh := c.sf.DoChan("", func() (interface{}, error) { + return c.singleRetrieve(&suppressedContext{ctx}) + }) select { case res := <-resCh: return res.Val.(Value), res.Err @@ -243,12 +252,16 @@ func (c *Credentials) GetWithContext(ctx Context) (Value, error) { } } -func (c *Credentials) singleRetrieve() (interface{}, error) { +func (c *Credentials) singleRetrieve(ctx Context) (creds interface{}, err error) { if curCreds := c.creds.Load(); !c.isExpired(curCreds) { return curCreds.(Value), nil } - creds, err := c.provider.Retrieve() + if p, ok := c.provider.(ProviderWithContext); ok { + creds, err = p.RetrieveWithContext(ctx) + } else { + creds, err = c.provider.Retrieve() + } if err == nil { c.creds.Store(creds) } @@ -308,3 +321,19 @@ func (c *Credentials) ExpiresAt() (time.Time, error) { } return expirer.ExpiresAt(), nil } + +type suppressedContext struct { + Context +} + +func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) { + return time.Time{}, false +} + +func (s *suppressedContext) Done() <-chan struct{} { + return nil +} + +func (s *suppressedContext) Err() error { + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go index 43d4ed386ab..92af5b7250a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go @@ -7,6 +7,7 @@ import ( "strings" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" @@ -87,7 +88,14 @@ func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(* // Error will be returned if the request fails, or unable to extract // the desired credentials. func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) { - credsList, err := requestCredList(m.Client) + return m.RetrieveWithContext(aws.BackgroundContext()) +} + +// RetrieveWithContext retrieves credentials from the EC2 service. +// Error will be returned if the request fails, or unable to extract +// the desired credentials. +func (m *EC2RoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { + credsList, err := requestCredList(ctx, m.Client) if err != nil { return credentials.Value{ProviderName: ProviderName}, err } @@ -97,7 +105,7 @@ func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) { } credsName := credsList[0] - roleCreds, err := requestCred(m.Client, credsName) + roleCreds, err := requestCred(ctx, m.Client, credsName) if err != nil { return credentials.Value{ProviderName: ProviderName}, err } @@ -130,8 +138,8 @@ const iamSecurityCredsPath = "iam/security-credentials/" // requestCredList requests a list of credentials from the EC2 service. // If there are no credentials, or there is an error making or receiving the request -func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) { - resp, err := client.GetMetadata(iamSecurityCredsPath) +func requestCredList(ctx aws.Context, client *ec2metadata.EC2Metadata) ([]string, error) { + resp, err := client.GetMetadataWithContext(ctx, iamSecurityCredsPath) if err != nil { return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err) } @@ -154,8 +162,8 @@ func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) { // // If the credentials cannot be found, or there is an error reading the response // and error will be returned. -func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) { - resp, err := client.GetMetadata(sdkuri.PathJoin(iamSecurityCredsPath, credsName)) +func requestCred(ctx aws.Context, client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) { + resp, err := client.GetMetadataWithContext(ctx, sdkuri.PathJoin(iamSecurityCredsPath, credsName)) if err != nil { return ec2RoleCredRespBody{}, awserr.New("EC2RoleRequestError", diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go index 1a7af53a4da..785f30d8e6c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go @@ -116,7 +116,13 @@ func (p *Provider) IsExpired() bool { // Retrieve will attempt to request the credentials from the endpoint the Provider // was configured for. And error will be returned if the retrieval fails. func (p *Provider) Retrieve() (credentials.Value, error) { - resp, err := p.getCredentials() + return p.RetrieveWithContext(aws.BackgroundContext()) +} + +// RetrieveWithContext will attempt to request the credentials from the endpoint the Provider +// was configured for. And error will be returned if the retrieval fails. +func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { + resp, err := p.getCredentials(ctx) if err != nil { return credentials.Value{ProviderName: ProviderName}, awserr.New("CredentialsEndpointError", "failed to load credentials", err) @@ -148,7 +154,7 @@ type errorOutput struct { Message string `json:"message"` } -func (p *Provider) getCredentials() (*getCredentialsOutput, error) { +func (p *Provider) getCredentials(ctx aws.Context) (*getCredentialsOutput, error) { op := &request.Operation{ Name: "GetCredentials", HTTPMethod: "GET", @@ -156,6 +162,7 @@ func (p *Provider) getCredentials() (*getCredentialsOutput, error) { out := &getCredentialsOutput{} req := p.Client.NewRequest(op, nil, out) + req.SetContext(ctx) req.HTTPRequest.Header.Set("Accept", "application/json") if authToken := p.AuthorizationToken; len(authToken) != 0 { req.HTTPRequest.Header.Set("Authorization", authToken) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go index 531139e3971..cbba1e3d560 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go @@ -19,7 +19,9 @@ type StaticProvider struct { } // NewStaticCredentials returns a pointer to a new Credentials object -// wrapping a static credentials value provider. +// wrapping a static credentials value provider. Token is only required +// for temporary security credentials retrieved via STS, otherwise an empty +// string can be passed for this parameter. func NewStaticCredentials(id, secret, token string) *Credentials { return NewCredentials(&StaticProvider{Value: Value{ AccessKeyID: id, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go index 9f37f44bcfa..6846ef6f808 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go @@ -87,6 +87,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkrand" "github.com/aws/aws-sdk-go/service/sts" ) @@ -118,6 +119,10 @@ type AssumeRoler interface { AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) } +type assumeRolerWithContext interface { + AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error) +} + // DefaultDuration is the default amount of time in minutes that the credentials // will be valid for. var DefaultDuration = time.Duration(15) * time.Minute @@ -164,6 +169,29 @@ type AssumeRoleProvider struct { // size. Policy *string + // The ARNs of IAM managed policies you want to use as managed session policies. + // The policies must exist in the same account as the role. + // + // This parameter is optional. You can provide up to 10 managed policy ARNs. + // However, the plain text that you use for both inline and managed session + // policies can't exceed 2,048 characters. + // + // An AWS conversion compresses the passed session policies and session tags + // into a packed binary format that has a separate limit. Your request can fail + // for this limit even if your plain text meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. + // + // Passing policies to this operation returns new temporary credentials. The + // resulting session's permissions are the intersection of the role's identity-based + // policy and the session policies. You can use the role's temporary credentials + // in subsequent AWS API calls to access resources in the account that owns + // the role. You cannot use session policies to grant more permissions than + // those allowed by the identity-based policy of the role that is being assumed. + // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // in the IAM User Guide. + PolicyArns []*sts.PolicyDescriptorType + // The identification number of the MFA device that is associated with the user // who is making the AssumeRole call. Specify this value if the trust policy // of the role being assumed includes a condition that requires MFA authentication. @@ -265,6 +293,11 @@ func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ...func(* // Retrieve generates a new set of temporary credentials using STS. func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) { + return p.RetrieveWithContext(aws.BackgroundContext()) +} + +// RetrieveWithContext generates a new set of temporary credentials using STS. +func (p *AssumeRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { // Apply defaults where parameters are not set. if p.RoleSessionName == "" { // Try to work out a role name that will hopefully end up unique. @@ -281,6 +314,7 @@ func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) { RoleSessionName: aws.String(p.RoleSessionName), ExternalId: p.ExternalID, Tags: p.Tags, + PolicyArns: p.PolicyArns, TransitiveTagKeys: p.TransitiveTagKeys, } if p.Policy != nil { @@ -304,7 +338,15 @@ func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) { } } - roleOutput, err := p.Client.AssumeRole(input) + var roleOutput *sts.AssumeRoleOutput + var err error + + if c, ok := p.Client.(assumeRolerWithContext); ok { + roleOutput, err = c.AssumeRoleWithContext(ctx, input) + } else { + roleOutput, err = p.Client.AssumeRole(input) + } + if err != nil { return credentials.Value{ProviderName: ProviderName}, err } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go index b20b6339484..6feb262b2f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go @@ -28,15 +28,34 @@ const ( // compare test values. var now = time.Now +// TokenFetcher shuold return WebIdentity token bytes or an error +type TokenFetcher interface { + FetchToken(credentials.Context) ([]byte, error) +} + +// FetchTokenPath is a path to a WebIdentity token file +type FetchTokenPath string + +// FetchToken returns a token by reading from the filesystem +func (f FetchTokenPath) FetchToken(ctx credentials.Context) ([]byte, error) { + data, err := ioutil.ReadFile(string(f)) + if err != nil { + errMsg := fmt.Sprintf("unable to read file at %s", f) + return nil, awserr.New(ErrCodeWebIdentity, errMsg, err) + } + return data, nil +} + // WebIdentityRoleProvider is used to retrieve credentials using // an OIDC token. type WebIdentityRoleProvider struct { credentials.Expiry + PolicyArns []*sts.PolicyDescriptorType client stsiface.STSAPI ExpiryWindow time.Duration - tokenFilePath string + tokenFetcher TokenFetcher roleARN string roleSessionName string } @@ -52,9 +71,15 @@ func NewWebIdentityCredentials(c client.ConfigProvider, roleARN, roleSessionName // NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the // provided stsiface.STSAPI func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, path string) *WebIdentityRoleProvider { + return NewWebIdentityRoleProviderWithToken(svc, roleARN, roleSessionName, FetchTokenPath(path)) +} + +// NewWebIdentityRoleProviderWithToken will return a new WebIdentityRoleProvider with the +// provided stsiface.STSAPI and a TokenFetcher +func NewWebIdentityRoleProviderWithToken(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher) *WebIdentityRoleProvider { return &WebIdentityRoleProvider{ client: svc, - tokenFilePath: path, + tokenFetcher: tokenFetcher, roleARN: roleARN, roleSessionName: roleSessionName, } @@ -64,10 +89,16 @@ func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, p // 'WebIdentityTokenFilePath' specified destination and if that is empty an // error will be returned. func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) { - b, err := ioutil.ReadFile(p.tokenFilePath) + return p.RetrieveWithContext(aws.BackgroundContext()) +} + +// RetrieveWithContext will attempt to assume a role from a token which is located at +// 'WebIdentityTokenFilePath' specified destination and if that is empty an +// error will be returned. +func (p *WebIdentityRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { + b, err := p.tokenFetcher.FetchToken(ctx) if err != nil { - errMsg := fmt.Sprintf("unable to read file at %s", p.tokenFilePath) - return credentials.Value{}, awserr.New(ErrCodeWebIdentity, errMsg, err) + return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed fetching WebIdentity token: ", err) } sessionName := p.roleSessionName @@ -77,10 +108,14 @@ func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) { sessionName = strconv.FormatInt(now().UnixNano(), 10) } req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{ + PolicyArns: p.PolicyArns, RoleArn: &p.roleARN, RoleSessionName: &sessionName, WebIdentityToken: aws.String(string(b)), }) + + req.SetContext(ctx) + // InvalidIdentityToken error is a temporary error that can occur // when assuming an Role with a JWT web identity token. req.RetryErrorCodes = append(req.RetryErrorCodes, sts.ErrCodeInvalidIdentityTokenException) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go index 12897eef626..a716c021cf3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -8,6 +8,7 @@ import ( "strings" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/sdkuri" @@ -15,7 +16,7 @@ import ( // getToken uses the duration to return a token for EC2 metadata service, // or an error if the request failed. -func (c *EC2Metadata) getToken(duration time.Duration) (tokenOutput, error) { +func (c *EC2Metadata) getToken(ctx aws.Context, duration time.Duration) (tokenOutput, error) { op := &request.Operation{ Name: "GetToken", HTTPMethod: "PUT", @@ -24,6 +25,7 @@ func (c *EC2Metadata) getToken(duration time.Duration) (tokenOutput, error) { var output tokenOutput req := c.NewRequest(op, nil, &output) + req.SetContext(ctx) // remove the fetch token handler from the request handlers to avoid infinite recursion req.Handlers.Sign.RemoveByName(fetchTokenHandlerName) @@ -50,6 +52,13 @@ func (c *EC2Metadata) getToken(duration time.Duration) (tokenOutput, error) { // instance metadata service. The content will be returned as a string, or // error if the request failed. func (c *EC2Metadata) GetMetadata(p string) (string, error) { + return c.GetMetadataWithContext(aws.BackgroundContext(), p) +} + +// GetMetadataWithContext uses the path provided to request information from the EC2 +// instance metadata service. The content will be returned as a string, or +// error if the request failed. +func (c *EC2Metadata) GetMetadataWithContext(ctx aws.Context, p string) (string, error) { op := &request.Operation{ Name: "GetMetadata", HTTPMethod: "GET", @@ -59,6 +68,8 @@ func (c *EC2Metadata) GetMetadata(p string) (string, error) { req := c.NewRequest(op, nil, output) + req.SetContext(ctx) + err := req.Send() return output.Content, err } @@ -67,6 +78,13 @@ func (c *EC2Metadata) GetMetadata(p string) (string, error) { // there is no user-data setup for the EC2 instance a "NotFoundError" error // code will be returned. func (c *EC2Metadata) GetUserData() (string, error) { + return c.GetUserDataWithContext(aws.BackgroundContext()) +} + +// GetUserDataWithContext returns the userdata that was configured for the service. If +// there is no user-data setup for the EC2 instance a "NotFoundError" error +// code will be returned. +func (c *EC2Metadata) GetUserDataWithContext(ctx aws.Context) (string, error) { op := &request.Operation{ Name: "GetUserData", HTTPMethod: "GET", @@ -75,6 +93,7 @@ func (c *EC2Metadata) GetUserData() (string, error) { output := &metadataOutput{} req := c.NewRequest(op, nil, output) + req.SetContext(ctx) err := req.Send() return output.Content, err @@ -84,6 +103,13 @@ func (c *EC2Metadata) GetUserData() (string, error) { // instance metadata service for dynamic data. The content will be returned // as a string, or error if the request failed. func (c *EC2Metadata) GetDynamicData(p string) (string, error) { + return c.GetDynamicDataWithContext(aws.BackgroundContext(), p) +} + +// GetDynamicDataWithContext uses the path provided to request information from the EC2 +// instance metadata service for dynamic data. The content will be returned +// as a string, or error if the request failed. +func (c *EC2Metadata) GetDynamicDataWithContext(ctx aws.Context, p string) (string, error) { op := &request.Operation{ Name: "GetDynamicData", HTTPMethod: "GET", @@ -92,6 +118,7 @@ func (c *EC2Metadata) GetDynamicData(p string) (string, error) { output := &metadataOutput{} req := c.NewRequest(op, nil, output) + req.SetContext(ctx) err := req.Send() return output.Content, err @@ -101,7 +128,14 @@ func (c *EC2Metadata) GetDynamicData(p string) (string, error) { // instance. Error is returned if the request fails or is unable to parse // the response. func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) { - resp, err := c.GetDynamicData("instance-identity/document") + return c.GetInstanceIdentityDocumentWithContext(aws.BackgroundContext()) +} + +// GetInstanceIdentityDocumentWithContext retrieves an identity document describing an +// instance. Error is returned if the request fails or is unable to parse +// the response. +func (c *EC2Metadata) GetInstanceIdentityDocumentWithContext(ctx aws.Context) (EC2InstanceIdentityDocument, error) { + resp, err := c.GetDynamicDataWithContext(ctx, "instance-identity/document") if err != nil { return EC2InstanceIdentityDocument{}, awserr.New("EC2MetadataRequestError", @@ -120,7 +154,12 @@ func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument // IAMInfo retrieves IAM info from the metadata API func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) { - resp, err := c.GetMetadata("iam/info") + return c.IAMInfoWithContext(aws.BackgroundContext()) +} + +// IAMInfoWithContext retrieves IAM info from the metadata API +func (c *EC2Metadata) IAMInfoWithContext(ctx aws.Context) (EC2IAMInfo, error) { + resp, err := c.GetMetadataWithContext(ctx, "iam/info") if err != nil { return EC2IAMInfo{}, awserr.New("EC2MetadataRequestError", @@ -145,7 +184,12 @@ func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) { // Region returns the region the instance is running in. func (c *EC2Metadata) Region() (string, error) { - ec2InstanceIdentityDocument, err := c.GetInstanceIdentityDocument() + return c.RegionWithContext(aws.BackgroundContext()) +} + +// RegionWithContext returns the region the instance is running in. +func (c *EC2Metadata) RegionWithContext(ctx aws.Context) (string, error) { + ec2InstanceIdentityDocument, err := c.GetInstanceIdentityDocumentWithContext(ctx) if err != nil { return "", err } @@ -162,7 +206,14 @@ func (c *EC2Metadata) Region() (string, error) { // Can be used to determine if application is running within an EC2 Instance and // the metadata service is available. func (c *EC2Metadata) Available() bool { - if _, err := c.GetMetadata("instance-id"); err != nil { + return c.AvailableWithContext(aws.BackgroundContext()) +} + +// AvailableWithContext returns if the application has access to the EC2 Metadata service. +// Can be used to determine if application is running within an EC2 Instance and +// the metadata service is available. +func (c *EC2Metadata) AvailableWithContext(ctx aws.Context) bool { + if _, err := c.GetMetadataWithContext(ctx, "instance-id"); err != nil { return false } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go index 663372a9154..d0a3a020d87 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go @@ -46,7 +46,7 @@ func (t *tokenProvider) fetchTokenHandler(r *request.Request) { return } - output, err := t.client.getToken(t.configuredTTL) + output, err := t.client.getToken(r.Context(), t.configuredTTL) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 8b8f67dbf77..4202e826aa5 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 @@ -17,6 +17,7 @@ const ( // AWS Standard partition's regions. const ( + AfSouth1RegionID = "af-south-1" // Africa (Cape Town). ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong). ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo). ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul). @@ -24,11 +25,12 @@ const ( ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore). ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney). CaCentral1RegionID = "ca-central-1" // Canada (Central). - EuCentral1RegionID = "eu-central-1" // EU (Frankfurt). - EuNorth1RegionID = "eu-north-1" // EU (Stockholm). - EuWest1RegionID = "eu-west-1" // EU (Ireland). - EuWest2RegionID = "eu-west-2" // EU (London). - EuWest3RegionID = "eu-west-3" // EU (Paris). + EuCentral1RegionID = "eu-central-1" // Europe (Frankfurt). + EuNorth1RegionID = "eu-north-1" // Europe (Stockholm). + EuSouth1RegionID = "eu-south-1" // Europe (Milan). + EuWest1RegionID = "eu-west-1" // Europe (Ireland). + EuWest2RegionID = "eu-west-2" // Europe (London). + EuWest3RegionID = "eu-west-3" // Europe (Paris). MeSouth1RegionID = "me-south-1" // Middle East (Bahrain). SaEast1RegionID = "sa-east-1" // South America (Sao Paulo). UsEast1RegionID = "us-east-1" // US East (N. Virginia). @@ -46,7 +48,7 @@ const ( // AWS GovCloud (US) partition's regions. const ( UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East). - UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US). + UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West). ) // AWS ISO (US) partition's regions. @@ -97,7 +99,7 @@ var awsPartition = partition{ DNSSuffix: "amazonaws.com", RegionRegex: regionRegex{ Regexp: func() *regexp.Regexp { - reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$") + reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$") return reg }(), }, @@ -107,6 +109,9 @@ var awsPartition = partition{ SignatureVersions: []string{"v4"}, }, Regions: regions{ + "af-south-1": region{ + Description: "Africa (Cape Town)", + }, "ap-east-1": region{ Description: "Asia Pacific (Hong Kong)", }, @@ -129,19 +134,22 @@ var awsPartition = partition{ Description: "Canada (Central)", }, "eu-central-1": region{ - Description: "EU (Frankfurt)", + Description: "Europe (Frankfurt)", }, "eu-north-1": region{ - Description: "EU (Stockholm)", + Description: "Europe (Stockholm)", + }, + "eu-south-1": region{ + Description: "Europe (Milan)", }, "eu-west-1": region{ - Description: "EU (Ireland)", + Description: "Europe (Ireland)", }, "eu-west-2": region{ - Description: "EU (London)", + Description: "Europe (London)", }, "eu-west-3": region{ - Description: "EU (Paris)", + Description: "Europe (Paris)", }, "me-south-1": region{ Description: "Middle East (Bahrain)", @@ -172,6 +180,7 @@ var awsPartition = partition{ "access-analyzer": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -181,6 +190,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -195,6 +205,7 @@ var awsPartition = partition{ "acm": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -210,6 +221,7 @@ var awsPartition = partition{ }, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -303,6 +315,12 @@ var awsPartition = partition{ "api.ecr": service{ Endpoints: endpoints{ + "af-south-1": endpoint{ + Hostname: "api.ecr.af-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "af-south-1", + }, + }, "ap-east-1": endpoint{ Hostname: "api.ecr.ap-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -357,6 +375,12 @@ var awsPartition = partition{ Region: "eu-north-1", }, }, + "eu-south-1": endpoint{ + Hostname: "api.ecr.eu-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-south-1", + }, + }, "eu-west-1": endpoint{ Hostname: "api.ecr.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ @@ -375,6 +399,30 @@ var awsPartition = partition{ Region: "eu-west-3", }, }, + "fips-us-east-1": endpoint{ + Hostname: "ecr-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ecr-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ecr-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ecr-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, "me-south-1": endpoint{ Hostname: "api.ecr.me-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -413,6 +461,29 @@ var awsPartition = partition{ }, }, }, + "api.elastic-inference": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com", + }, + "ap-northeast-2": endpoint{ + Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com", + }, + "eu-west-1": endpoint{ + Hostname: "api.elastic-inference.eu-west-1.amazonaws.com", + }, + "us-east-1": endpoint{ + Hostname: "api.elastic-inference.us-east-1.amazonaws.com", + }, + "us-east-2": endpoint{ + Hostname: "api.elastic-inference.us-east-2.amazonaws.com", + }, + "us-west-2": endpoint{ + Hostname: "api.elastic-inference.us-west-2.amazonaws.com", + }, + }, + }, "api.mediatailor": service{ Endpoints: endpoints{ @@ -486,6 +557,7 @@ var awsPartition = partition{ "apigateway": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -495,6 +567,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -511,6 +584,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -520,6 +594,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -622,6 +697,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -631,6 +707,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -647,6 +724,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -654,8 +732,12 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -700,12 +782,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "fips.batch.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "fips.batch.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "fips.batch.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "fips.batch.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "budgets": service{ @@ -754,6 +860,7 @@ var awsPartition = partition{ "cloud9": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -764,8 +871,12 @@ var awsPartition = partition{ "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -786,6 +897,7 @@ var awsPartition = partition{ "cloudformation": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -795,15 +907,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, "me-south-1": 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: "cloudformation-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "cloudformation-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "cloudformation-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "cloudformation-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "cloudfront": service{ @@ -880,6 +1017,7 @@ var awsPartition = partition{ "cloudtrail": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -889,15 +1027,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "cloudtrail-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "cloudtrail-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "cloudtrail-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "cloudtrail-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "codebuild": service{ @@ -979,6 +1142,7 @@ var awsPartition = partition{ "codedeploy": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -988,6 +1152,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1037,18 +1202,67 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "codepipeline-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "codepipeline-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "codepipeline-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "codepipeline-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "codepipeline-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "codestar": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, - "codestar": service{ + "codestar-connections": 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{}, @@ -1056,6 +1270,8 @@ var awsPartition = partition{ "eu-north-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{}, @@ -1074,9 +1290,27 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "cognito-identity-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "cognito-identity-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "cognito-identity-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "cognito-idp": service{ @@ -1091,9 +1325,27 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "cognito-idp-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "cognito-idp-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "cognito-idp-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "cognito-sync": service{ @@ -1126,9 +1378,27 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "comprehend-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "comprehend-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "comprehend-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "comprehendmedical": service{ @@ -1138,9 +1408,27 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "config": service{ @@ -1193,6 +1481,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1238,6 +1527,12 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "datasync-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, "fips-us-east-1": endpoint{ Hostname: "datasync-fips.us-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -1297,6 +1592,7 @@ var awsPartition = partition{ "directconnect": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1306,27 +1602,56 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "directconnect-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "directconnect-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "directconnect-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "directconnect-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "discovery": service{ Endpoints: endpoints{ - "eu-central-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "dms": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1334,17 +1659,24 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, - "eu-central-1": endpoint{}, - "eu-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "dms-fips": endpoint{ + Hostname: "dms-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "docdb": service{ @@ -1445,11 +1777,42 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "ds-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "ds-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ds-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ds-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ds-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "dynamodb": service{ @@ -1457,6 +1820,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1472,6 +1836,7 @@ var awsPartition = partition{ }, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1519,6 +1884,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1528,15 +1894,46 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "ec2-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "ec2-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ec2-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ec2-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ec2-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "ec2metadata": service{ @@ -1553,6 +1950,7 @@ var awsPartition = partition{ "ecs": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1562,19 +1960,46 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "ecs-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ecs-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ecs-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ecs-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, - "elasticache": service{ - + "eks": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, Endpoints: endpoints{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, @@ -1588,23 +2013,35 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "fips": endpoint{ - Hostname: "elasticache-fips.us-west-1.amazonaws.com", + "fips-us-east-1": endpoint{ + Hostname: "fips.eks.us-east-1.amazonaws.com", CredentialScope: credentialScope{ - Region: "us-west-1", + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "fips.eks.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "fips.eks.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", }, }, "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, - "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, - "elasticbeanstalk": service{ + "elasticache": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1614,20 +2051,28 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips": endpoint{ + Hostname: "elasticache-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, - "elasticfilesystem": service{ + "elasticbeanstalk": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1637,40 +2082,229 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "elasticloadbalancing": service{ - Defaults: endpoint{ - Protocols: []string{"https"}, - }, - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "ap-northeast-1": endpoint{}, - "ap-northeast-2": endpoint{}, - "ap-south-1": endpoint{}, - "ap-southeast-1": endpoint{}, - "ap-southeast-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "elasticfilesystem": service{ + + Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-af-south-1": endpoint{ + Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "af-south-1", + }, + }, + "fips-ap-east-1": endpoint{ + Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-east-1", + }, + }, + "fips-ap-northeast-1": endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "fips-ap-northeast-2": endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "fips-ap-south-1": endpoint{ + Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "fips-ap-southeast-1": endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "fips-ap-southeast-2": endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "fips-ca-central-1": endpoint{ + Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-eu-central-1": endpoint{ + Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "fips-eu-north-1": endpoint{ + Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-north-1", + }, + }, + "fips-eu-west-1": endpoint{ + Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "fips-eu-west-2": endpoint{ + Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "fips-eu-west-3": endpoint{ + Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "fips-me-south-1": endpoint{ + Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "me-south-1", + }, + }, + "fips-sa-east-1": endpoint{ + Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "elasticloadbalancing": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, + "eu-south-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "elasticmapreduce": service{ @@ -1679,6 +2313,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1690,9 +2325,40 @@ var awsPartition = partition{ SSLCommonName: "{service}.{region}.{dnsSuffix}", }, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{ @@ -1740,6 +2406,7 @@ var awsPartition = partition{ "es": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1749,6 +2416,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1769,6 +2437,7 @@ var awsPartition = partition{ "events": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1778,15 +2447,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "events-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "events-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "events-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "events-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "firehose": service{ @@ -1804,35 +2498,149 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "fms": service{ - Defaults: endpoint{ - Protocols: []string{"https"}, - }, - 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-north-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{}, + "fips-us-east-1": endpoint{ + Hostname: "firehose-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "firehose-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "firehose-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "firehose-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "fms": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + 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-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-ap-northeast-1": endpoint{ + Hostname: "fms-fips.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "fips-ap-northeast-2": endpoint{ + Hostname: "fms-fips.ap-northeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "fips-ap-south-1": endpoint{ + Hostname: "fms-fips.ap-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "fips-ap-southeast-1": endpoint{ + Hostname: "fms-fips.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "fips-ap-southeast-2": endpoint{ + Hostname: "fms-fips.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "fips-ca-central-1": endpoint{ + Hostname: "fms-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-eu-central-1": endpoint{ + Hostname: "fms-fips.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "fips-eu-west-1": endpoint{ + Hostname: "fms-fips.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "fips-eu-west-2": endpoint{ + Hostname: "fms-fips.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "fips-eu-west-3": endpoint{ + Hostname: "fms-fips.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "fips-sa-east-1": endpoint{ + Hostname: "fms-fips.sa-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "fms-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "fms-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "fms-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "fms-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "forecast": service{ @@ -1840,7 +2648,10 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1851,7 +2662,11 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1861,7 +2676,9 @@ var awsPartition = partition{ "fsx": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -1898,6 +2715,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1907,15 +2725,46 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "glacier-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "glacier-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "glacier-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "glacier-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "glacier-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "glue": service{ @@ -1933,12 +2782,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "glue-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "glue-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "glue-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "glue-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "greengrass": service{ @@ -1963,10 +2836,12 @@ var awsPartition = partition{ "groundstation": service{ Endpoints: endpoints{ - "eu-north-1": endpoint{}, - "me-south-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "me-south-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "guardduty": service{ @@ -2036,6 +2911,12 @@ var awsPartition = partition{ Region: "us-east-1", }, }, + "iam-fips": endpoint{ + Hostname: "iam-fips.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, }, }, "importexport": service{ @@ -2064,10 +2945,34 @@ var awsPartition = partition{ "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "inspector-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "inspector-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "inspector-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "inspector-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "iot": service{ @@ -2252,6 +3157,7 @@ var awsPartition = partition{ "kinesis": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2261,28 +3167,53 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "kinesisanalytics": service{ - - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "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{}, + "fips-us-east-1": endpoint{ + Hostname: "kinesis-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "kinesis-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "kinesis-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "kinesis-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "kinesisanalytics": service{ + + Endpoints: endpoints{ + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -2317,6 +3248,7 @@ var awsPartition = partition{ "kms": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2326,6 +3258,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2349,6 +3282,7 @@ var awsPartition = partition{ "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{}, @@ -2358,6 +3292,7 @@ var awsPartition = partition{ "lambda": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2367,15 +3302,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "lambda-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "lambda-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "lambda-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "lambda-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "license-manager": service{ @@ -2393,12 +3353,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "license-manager-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "license-manager-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "license-manager-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "license-manager-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "lightsail": service{ @@ -2422,6 +3406,7 @@ var awsPartition = partition{ "logs": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2431,6 +3416,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2449,10 +3435,33 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, - "managedblockchain": service{ + "macie": service{ Endpoints: endpoints{ + "fips-us-east-1": endpoint{ + Hostname: "macie-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "macie-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "managedblockchain": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, }, }, "marketplacecommerceanalytics": service{ @@ -2530,6 +3539,7 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2548,6 +3558,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -2559,6 +3570,7 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2568,6 +3580,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2582,8 +3595,11 @@ var awsPartition = partition{ "mgh": service{ Endpoints: endpoints{ - "eu-central-1": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "mobileanalytics": service{ @@ -2599,8 +3615,11 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -2610,6 +3629,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2619,15 +3639,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "monitoring-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "monitoring-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "monitoring-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "monitoring-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "mq": service{ @@ -2750,6 +3795,12 @@ var awsPartition = partition{ Region: "eu-west-2", }, }, + "eu-west-3": endpoint{ + Hostname: "rds.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, "me-south-1": endpoint{ Hostname: "rds.me-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2880,6 +3931,12 @@ var awsPartition = partition{ Region: "us-east-1", }, }, + "fips-aws-global": endpoint{ + Hostname: "organizations-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, }, }, "outposts": service{ @@ -2896,11 +3953,41 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "outposts-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "outposts-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "outposts-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "outposts-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "outposts-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "pinpoint": service{ @@ -2955,12 +4042,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "polly-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "polly-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "polly-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "polly-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "portal.sso": service{ @@ -3074,6 +4185,7 @@ var awsPartition = partition{ "rds": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3083,22 +4195,54 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{ - SSLCommonName: "{service}.{dnsSuffix}", + "rds-fips.ca-central-1": endpoint{ + Hostname: "rds-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, }, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "rds-fips.us-east-1": endpoint{ + Hostname: "rds-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "rds-fips.us-east-2": endpoint{ + Hostname: "rds-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "rds-fips.us-west-1": endpoint{ + Hostname: "rds-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "rds-fips.us-west-2": endpoint{ + Hostname: "rds-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{ + SSLCommonName: "{service}.{dnsSuffix}", + }, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "redshift": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3108,15 +4252,46 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "redshift-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "redshift-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "redshift-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "redshift-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "redshift-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "rekognition": service{ @@ -3139,6 +4314,7 @@ var awsPartition = partition{ "resource-groups": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3148,6 +4324,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3231,6 +4408,8 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -3244,8 +4423,11 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -3308,7 +4490,8 @@ var awsPartition = partition{ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}", }, Endpoints: endpoints{ - "ap-east-1": endpoint{}, + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{ Hostname: "s3.ap-northeast-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, @@ -3333,6 +4516,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{ Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, @@ -3533,10 +4717,22 @@ var awsPartition = partition{ "schemas": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "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-north-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{}, }, }, @@ -3561,6 +4757,7 @@ var awsPartition = partition{ "secretsmanager": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3570,6 +4767,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3608,6 +4806,7 @@ var awsPartition = partition{ "securityhub": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3617,6 +4816,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3774,18 +4974,31 @@ var awsPartition = partition{ }, }, "shield": service{ - IsRegionalized: boxedFalse, + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, Defaults: endpoint{ SSLCommonName: "shield.us-east-1.amazonaws.com", Protocols: []string{"https"}, }, Endpoints: endpoints{ - "us-east-1": endpoint{}, + "aws-global": endpoint{ + Hostname: "shield.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-aws-global": endpoint{ + Hostname: "shield-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, }, }, "sms": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3795,15 +5008,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "sms-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "sms-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "sms-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "sms-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "snowball": service{ @@ -3819,11 +5057,101 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ap-northeast-1": endpoint{ + Hostname: "snowball-fips.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "fips-ap-northeast-2": endpoint{ + Hostname: "snowball-fips.ap-northeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "fips-ap-south-1": endpoint{ + Hostname: "snowball-fips.ap-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "fips-ap-southeast-1": endpoint{ + Hostname: "snowball-fips.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "fips-ap-southeast-2": endpoint{ + Hostname: "snowball-fips.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "fips-ca-central-1": endpoint{ + Hostname: "snowball-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-eu-central-1": endpoint{ + Hostname: "snowball-fips.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "fips-eu-west-1": endpoint{ + Hostname: "snowball-fips.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "fips-eu-west-2": endpoint{ + Hostname: "snowball-fips.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "fips-eu-west-3": endpoint{ + Hostname: "snowball-fips.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "fips-sa-east-1": endpoint{ + Hostname: "snowball-fips.sa-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "snowball-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "snowball-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "snowball-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "snowball-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "sns": service{ @@ -3831,6 +5159,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3840,15 +5169,40 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "sns-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "sns-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "sns-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "sns-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "sqs": service{ @@ -3857,6 +5211,7 @@ var awsPartition = partition{ Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3866,6 +5221,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3906,6 +5262,7 @@ var awsPartition = partition{ "ssm": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3915,43 +5272,119 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "states": service{ - - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "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-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "ssm-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ssm-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ssm-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ssm-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "ssm-facade-fips-us-east-1": endpoint{ + Hostname: "ssm-facade-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "ssm-facade-fips-us-east-2": endpoint{ + Hostname: "ssm-facade-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "ssm-facade-fips-us-west-1": endpoint{ + Hostname: "ssm-facade-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "ssm-facade-fips-us-west-2": endpoint{ + Hostname: "ssm-facade-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "states": service{ + + Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, + "eu-south-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "states-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "states-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "states-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "states-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "storagegateway": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -3961,6 +5394,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -4040,6 +5474,7 @@ var awsPartition = partition{ PartitionEndpoint: "aws-global", Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -4055,6 +5490,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -4097,188 +5533,446 @@ var awsPartition = partition{ "aws-global": endpoint{ Hostname: "support.us-east-1.amazonaws.com", CredentialScope: credentialScope{ - Region: "us-east-1", + Region: "us-east-1", + }, + }, + }, + }, + "swf": service{ + + Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, + "eu-south-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "swf-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "swf-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "swf-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "swf-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "tagging": service{ + + Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, + "eu-south-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "transcribe": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-east-1": endpoint{}, + "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{}, + "fips-us-east-1": endpoint{ + Hostname: "fips.transcribe.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "fips.transcribe.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "fips.transcribe.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "fips.transcribe.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "transcribestreaming": service{ + + Endpoints: endpoints{ + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "transfer": 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-north-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{}, + }, + }, + "translate": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-east-1": endpoint{}, + "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-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "us-east-1": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "translate-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "translate-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "translate-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, + "waf": service{ + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-fips": endpoint{ + Hostname: "waf-fips.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "aws-global": endpoint{ + Hostname: "waf.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + }, + }, + "waf-regional": service{ + + Endpoints: endpoints{ + "ap-east-1": endpoint{ + Hostname: "waf-regional.ap-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-east-1", + }, + }, + "ap-northeast-1": endpoint{ + Hostname: "waf-regional.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "ap-northeast-2": endpoint{ + Hostname: "waf-regional.ap-northeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "ap-south-1": endpoint{ + Hostname: "waf-regional.ap-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "ap-southeast-1": endpoint{ + Hostname: "waf-regional.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "waf-regional.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "ca-central-1": endpoint{ + Hostname: "waf-regional.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "eu-central-1": endpoint{ + Hostname: "waf-regional.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "eu-north-1": endpoint{ + Hostname: "waf-regional.eu-north-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-north-1", + }, + }, + "eu-west-1": endpoint{ + Hostname: "waf-regional.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "eu-west-2": endpoint{ + Hostname: "waf-regional.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "eu-west-3": endpoint{ + Hostname: "waf-regional.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "fips-ap-east-1": endpoint{ + Hostname: "waf-regional-fips.ap-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-east-1", + }, + }, + "fips-ap-northeast-1": endpoint{ + Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "fips-ap-northeast-2": endpoint{ + Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "fips-ap-south-1": endpoint{ + Hostname: "waf-regional-fips.ap-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "fips-ap-southeast-1": endpoint{ + Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "fips-ap-southeast-2": endpoint{ + Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "fips-ca-central-1": endpoint{ + Hostname: "waf-regional-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-eu-central-1": endpoint{ + Hostname: "waf-regional-fips.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "fips-eu-north-1": endpoint{ + Hostname: "waf-regional-fips.eu-north-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-north-1", + }, + }, + "fips-eu-west-1": endpoint{ + Hostname: "waf-regional-fips.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "fips-eu-west-2": endpoint{ + Hostname: "waf-regional-fips.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "fips-eu-west-3": endpoint{ + Hostname: "waf-regional-fips.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "fips-me-south-1": endpoint{ + Hostname: "waf-regional-fips.me-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "me-south-1", + }, + }, + "fips-sa-east-1": endpoint{ + Hostname: "waf-regional-fips.sa-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "waf-regional-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "waf-regional-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "waf-regional-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "waf-regional-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{ + Hostname: "waf-regional.me-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "me-south-1", }, }, - }, - }, - "swf": service{ - - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "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-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "tagging": service{ - - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "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-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "transcribe": service{ - Defaults: endpoint{ - Protocols: []string{"https"}, - }, - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "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{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "transcribestreaming": service{ - - Endpoints: endpoints{ - "ap-southeast-2": endpoint{}, - "ca-central-1": endpoint{}, - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, - }, - }, - "transfer": 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-north-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{}, - }, - }, - "translate": service{ - Defaults: endpoint{ - Protocols: []string{"https"}, - }, - Endpoints: endpoints{ - "ap-east-1": endpoint{}, - "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-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "us-east-1": endpoint{}, - "us-east-1-fips": endpoint{ - Hostname: "translate-fips.us-east-1.amazonaws.com", + "sa-east-1": endpoint{ + Hostname: "waf-regional.sa-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "waf-regional.us-east-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-1", }, }, - "us-east-2": endpoint{}, - "us-east-2-fips": endpoint{ - Hostname: "translate-fips.us-east-2.amazonaws.com", + "us-east-2": endpoint{ + Hostname: "waf-regional.us-east-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-east-2", }, }, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - "us-west-2-fips": endpoint{ - Hostname: "translate-fips.us-west-2.amazonaws.com", + "us-west-1": endpoint{ + Hostname: "waf-regional.us-west-1.amazonaws.com", CredentialScope: credentialScope{ - Region: "us-west-2", + Region: "us-west-1", }, }, - }, - }, - "waf": service{ - PartitionEndpoint: "aws-global", - IsRegionalized: boxedFalse, - - Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "waf.amazonaws.com", + "us-west-2": endpoint{ + Hostname: "waf-regional.us-west-2.amazonaws.com", CredentialScope: credentialScope{ - Region: "us-east-1", + Region: "us-west-2", }, }, }, }, - "waf-regional": 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-north-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{}, - }, - }, "workdocs": service{ Endpoints: endpoints{ @@ -4286,8 +5980,20 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "workdocs-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "workdocs-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "workmail": service{ @@ -4319,6 +6025,7 @@ var awsPartition = partition{ "xray": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -4328,6 +6035,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -4395,6 +6103,13 @@ var awscnPartition = partition{ }, }, }, + "api.sagemaker": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -4420,6 +6135,7 @@ var awscnPartition = partition{ "athena": service{ Endpoints: endpoints{ + "cn-north-1": endpoint{}, "cn-northwest-1": endpoint{}, }, }, @@ -4481,6 +6197,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "codecommit": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "codedeploy": service{ Endpoints: endpoints{ @@ -4564,6 +6287,15 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "eks": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "elasticache": service{ Endpoints: endpoints{ @@ -4583,6 +6315,18 @@ var awscnPartition = partition{ Endpoints: endpoints{ "cn-north-1": endpoint{}, "cn-northwest-1": endpoint{}, + "fips-cn-north-1": endpoint{ + Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + "fips-cn-northwest-1": endpoint{ + Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, }, }, "elasticloadbalancing": service{ @@ -4642,6 +6386,7 @@ var awscnPartition = partition{ "glue": service{ Endpoints: endpoints{ + "cn-north-1": endpoint{}, "cn-northwest-1": endpoint{}, }, }, @@ -4685,6 +6430,20 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "iotsecuredtunneling": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "kafka": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ @@ -4764,7 +6523,27 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, - "redshift": service{ + "redshift": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "route53": service{ + PartitionEndpoint: "aws-cn-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-cn-global": endpoint{ + Hostname: "route53.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, + "runtime.sagemaker": service{ Endpoints: endpoints{ "cn-north-1": endpoint{}, @@ -4834,6 +6613,12 @@ var awscnPartition = partition{ Endpoints: endpoints{ "cn-north-1": endpoint{}, + "fips-cn-north-1": endpoint{ + Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, }, }, "sns": service{ @@ -4981,7 +6766,7 @@ var awsusgovPartition = partition{ Description: "AWS GovCloud (US-East)", }, "us-gov-west-1": region{ - Description: "AWS GovCloud (US)", + Description: "AWS GovCloud (US-West)", }, }, Services: services{ @@ -5004,6 +6789,18 @@ var awsusgovPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "acm-pca.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "acm-pca.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5011,6 +6808,18 @@ var awsusgovPartition = partition{ "api.ecr": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "ecr-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "ecr-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{ Hostname: "api.ecr.us-gov-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -5071,6 +6880,18 @@ var awsusgovPartition = partition{ "athena": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "athena-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "athena-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5078,7 +6899,9 @@ var awsusgovPartition = partition{ "autoscaling": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, + "us-gov-east-1": endpoint{ + Protocols: []string{"http", "https"}, + }, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, @@ -5096,6 +6919,18 @@ var awsusgovPartition = partition{ "batch": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "batch.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "batch.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5109,8 +6944,18 @@ var awsusgovPartition = partition{ "cloudformation": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "cloudformation.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "cloudformation.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "cloudhsm": service{ @@ -5133,20 +6978,48 @@ var awsusgovPartition = partition{ "cloudtrail": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "cloudtrail.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "cloudtrail.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "codebuild": service{ Endpoints: endpoints{ "us-gov-east-1": endpoint{}, + "us-gov-east-1-fips": endpoint{ + Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "codecommit": service{ Endpoints: endpoints{ + "fips": endpoint{ + Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5170,11 +7043,47 @@ var awsusgovPartition = partition{ }, }, }, + "codepipeline": service{ + + Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-west-1": endpoint{}, + }, + }, + "cognito-identity": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "cognito-idp": service{ + + Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-west-1": endpoint{}, + }, + }, "comprehend": service{ Defaults: endpoint{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-west-1": endpoint{}, }, }, @@ -5194,6 +7103,12 @@ var awsusgovPartition = partition{ "datasync": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "datasync-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "fips-us-gov-west-1": endpoint{ Hostname: "datasync-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ @@ -5207,13 +7122,29 @@ var awsusgovPartition = partition{ "directconnect": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "directconnect.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "directconnect.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "dms": service{ Endpoints: endpoints{ + "dms-fips": endpoint{ + Hostname: "dms.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5221,6 +7152,18 @@ var awsusgovPartition = partition{ "ds": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "ds-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "ds-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5247,8 +7190,18 @@ var awsusgovPartition = partition{ "ec2": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "ec2.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "ec2.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "ec2metadata": service{ @@ -5264,6 +7217,27 @@ var awsusgovPartition = partition{ }, "ecs": service{ + Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "ecs-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "ecs-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "eks": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, Endpoints: endpoints{ "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, @@ -5285,13 +7259,35 @@ var awsusgovPartition = partition{ "elasticbeanstalk": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "elasticfilesystem": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5308,12 +7304,36 @@ var awsusgovPartition = partition{ "elasticmapreduce": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"https"}, }, }, }, + "email": service{ + + Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "email-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-west-1": endpoint{}, + }, + }, "es": service{ Endpoints: endpoints{ @@ -5330,13 +7350,35 @@ var awsusgovPartition = partition{ "events": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "events.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "events.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "firehose": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "firehose-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "firehose-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5344,15 +7386,36 @@ var awsusgovPartition = partition{ "glacier": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "glacier.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{ + Hostname: "glacier.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, }, }, }, "glue": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "glue-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "glue-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5363,7 +7426,12 @@ var awsusgovPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ - "us-gov-west-1": endpoint{}, + "us-gov-west-1": endpoint{ + Hostname: "greengrass.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "guardduty": service{ @@ -5397,6 +7465,18 @@ var awsusgovPartition = partition{ "inspector": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "inspector-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "inspector-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5411,6 +7491,19 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "iotsecuredtunneling": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, + "kafka": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ @@ -5434,6 +7527,18 @@ var awsusgovPartition = partition{ "lambda": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "lambda-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "lambda-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5441,6 +7546,18 @@ var awsusgovPartition = partition{ "license-manager": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5472,6 +7589,18 @@ var awsusgovPartition = partition{ "monitoring": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "monitoring.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "monitoring.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5506,9 +7635,42 @@ var awsusgovPartition = partition{ }, }, }, + "outposts": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{ + Hostname: "outposts.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "outposts.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, + "pinpoint": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "mobiletargeting", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "polly": service{ Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "polly-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-west-1": endpoint{}, }, }, @@ -5522,6 +7684,18 @@ var awsusgovPartition = partition{ "rds": service{ Endpoints: endpoints{ + "rds.us-gov-east-1": endpoint{ + Hostname: "rds.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "rds.us-gov-west-1": endpoint{ + Hostname: "rds.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5529,8 +7703,18 @@ var awsusgovPartition = partition{ "redshift": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "redshift.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "redshift.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "rekognition": service{ @@ -5660,6 +7844,13 @@ var awsusgovPartition = partition{ }, }, }, + "securityhub": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "serverlessrepo": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -5676,6 +7867,13 @@ var awsusgovPartition = partition{ "servicecatalog": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-east-1-fips": endpoint{ + Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{}, "us-gov-west-1-fips": endpoint{ Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com", @@ -5688,6 +7886,18 @@ var awsusgovPartition = partition{ "sms": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "sms-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "sms-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5695,6 +7905,18 @@ var awsusgovPartition = partition{ "snowball": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "snowball-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "snowball-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5711,16 +7933,49 @@ var awsusgovPartition = partition{ "sqs": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "sqs.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{ + Hostname: "sqs.us-gov-west-1.amazonaws.com", SSLCommonName: "{region}.queue.{dnsSuffix}", Protocols: []string{"http", "https"}, + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, }, }, }, "ssm": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "ssm.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "ssm.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "ssm-facade-fips-us-gov-east-1": endpoint{ + Hostname: "ssm-facade.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "ssm-facade-fips-us-gov-west-1": endpoint{ + Hostname: "ssm-facade.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5728,6 +7983,18 @@ var awsusgovPartition = partition{ "states": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "states-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "states.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5735,6 +8002,7 @@ var awsusgovPartition = partition{ "storagegateway": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -5783,8 +8051,18 @@ var awsusgovPartition = partition{ "swf": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "swf.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "swf.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "tagging": service{ @@ -5799,6 +8077,18 @@ var awsusgovPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -5820,7 +8110,18 @@ var awsusgovPartition = partition{ "waf-regional": service{ Endpoints: endpoints{ - "us-gov-west-1": endpoint{}, + "fips-us-gov-west-1": endpoint{ + Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "waf-regional.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "workspaces": service{ @@ -5922,6 +8223,14 @@ var awsisoPartition = partition{ "us-iso-east-1": endpoint{}, }, }, + "comprehend": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "config": service{ Endpoints: endpoints{ @@ -5943,6 +8252,12 @@ var awsisoPartition = partition{ "dms": service{ Endpoints: endpoints{ + "dms-fips": endpoint{ + Hostname: "dms.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, "us-iso-east-1": endpoint{}, }, }, @@ -6005,6 +8320,12 @@ var awsisoPartition = partition{ }, }, }, + "es": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "events": service{ Endpoints: endpoints{ @@ -6259,6 +8580,12 @@ var awsisobPartition = partition{ "dms": service{ Endpoints: endpoints{ + "dms-fips": endpoint{ + Hostname: "dms.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + }, "us-isob-east-1": endpoint{}, }, }, @@ -6358,6 +8685,12 @@ var awsisobPartition = partition{ "us-isob-east-1": endpoint{}, }, }, + "license-manager": service{ + + Endpoints: endpoints{ + "us-isob-east-1": endpoint{}, + }, + }, "logs": service{ Endpoints: endpoints{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go index cc64e24f1d5..fe6dac1f476 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go @@ -3,6 +3,7 @@ package session import ( "fmt" "os" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -206,7 +207,14 @@ func credsFromAssumeRole(cfg aws.Config, sharedCfg.RoleARN, func(opt *stscreds.AssumeRoleProvider) { opt.RoleSessionName = sharedCfg.RoleSessionName - opt.Duration = sessOpts.AssumeRoleDuration + + if sessOpts.AssumeRoleDuration == 0 && + sharedCfg.AssumeRoleDuration != nil && + *sharedCfg.AssumeRoleDuration/time.Minute > 15 { + opt.Duration = *sharedCfg.AssumeRoleDuration + } else if sessOpts.AssumeRoleDuration != 0 { + opt.Duration = sessOpts.AssumeRoleDuration + } // Assume role with external ID if len(sharedCfg.ExternalID) > 0 { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index a8ed8807600..680805a38ad 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -2,6 +2,7 @@ package session import ( "fmt" + "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" @@ -16,12 +17,13 @@ const ( sessionTokenKey = `aws_session_token` // optional // Assume Role Credentials group - roleArnKey = `role_arn` // group required - sourceProfileKey = `source_profile` // group required (or credential_source) - credentialSourceKey = `credential_source` // group required (or source_profile) - externalIDKey = `external_id` // optional - mfaSerialKey = `mfa_serial` // optional - roleSessionNameKey = `role_session_name` // optional + roleArnKey = `role_arn` // group required + sourceProfileKey = `source_profile` // group required (or credential_source) + credentialSourceKey = `credential_source` // group required (or source_profile) + externalIDKey = `external_id` // optional + mfaSerialKey = `mfa_serial` // optional + roleSessionNameKey = `role_session_name` // optional + roleDurationSecondsKey = "duration_seconds" // optional // CSM options csmEnabledKey = `csm_enabled` @@ -73,10 +75,11 @@ type sharedConfig struct { CredentialProcess string WebIdentityTokenFile string - RoleARN string - RoleSessionName string - ExternalID string - MFASerial string + RoleARN string + RoleSessionName string + ExternalID string + MFASerial string + AssumeRoleDuration *time.Duration SourceProfileName string SourceProfile *sharedConfig @@ -274,6 +277,11 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e updateString(&cfg.CredentialSource, section, credentialSourceKey) updateString(&cfg.Region, section, regionKey) + if section.Has(roleDurationSecondsKey) { + d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second + cfg.AssumeRoleDuration = &d + } + if v := section.String(stsRegionalEndpointSharedKey); len(v) != 0 { sre, err := endpoints.GetSTSRegionalEndpoint(v) if err != nil { 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 c3c3b2b2a31..2569d20f9ac 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.29.20" +const SDKVersion = "1.31.2" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index cf981fe9513..09ad951595e 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go @@ -8,6 +8,7 @@ import ( "reflect" "sort" "strconv" + "strings" "time" "github.com/aws/aws-sdk-go/private/protocol" @@ -60,6 +61,14 @@ func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag refle return nil } + xml := tag.Get("xml") + if len(xml) != 0 { + name := strings.SplitAfterN(xml, ",", 2)[0] + if name == "-" { + return nil + } + } + t := tag.Get("type") if t == "" { switch value.Kind() { diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go index 7108d380093..107c053f8ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go @@ -64,6 +64,14 @@ func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error { // parse deserializes any value from the XMLNode. The type tag is used to infer the type, or reflect // will be used to determine the type from r. func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { + xml := tag.Get("xml") + if len(xml) != 0 { + name := strings.SplitAfterN(xml, ",", 2)[0] + if name == "-" { + return nil + } + } + rtype := r.Type() if rtype.Kind() == reflect.Ptr { rtype = rtype.Elem() // check kind of actual element type diff --git a/vendor/github.com/aws/aws-sdk-go/service/accessanalyzer/api.go b/vendor/github.com/aws/aws-sdk-go/service/accessanalyzer/api.go index 8565aeada46..16ad2d2e603 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/accessanalyzer/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/accessanalyzer/api.go @@ -1900,8 +1900,8 @@ func (c *AccessAnalyzer) UpdateFindingsWithContext(ctx aws.Context, input *Updat // You do not have sufficient access to perform this action. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1918,17 +1918,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1936,22 +1936,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about the analyzed resource. @@ -1986,12 +1986,18 @@ type AnalyzedResource struct { // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + // The AWS account ID that owns the resource. + // + // ResourceOwnerAccount is a required field + ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` + // The type of the resource that was analyzed. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` - // Indicates how the access that generated the finding is granted. + // Indicates how the access that generated the finding is granted. This is populated + // for Amazon S3 bucket findings. SharedVia []*string `locationName:"sharedVia" type:"list"` // The current status of the finding generated from the analyzed resource. @@ -2049,6 +2055,12 @@ func (s *AnalyzedResource) SetResourceArn(v string) *AnalyzedResource { return s } +// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. +func (s *AnalyzedResource) SetResourceOwnerAccount(v string) *AnalyzedResource { + s.ResourceOwnerAccount = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *AnalyzedResource) SetResourceType(v string) *AnalyzedResource { s.ResourceType = &v @@ -2082,6 +2094,11 @@ type AnalyzedResourceSummary struct { // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + // The AWS account ID that owns the resource. + // + // ResourceOwnerAccount is a required field + ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` + // The type of resource that was analyzed. // // ResourceType is a required field @@ -2104,6 +2121,12 @@ func (s *AnalyzedResourceSummary) SetResourceArn(v string) *AnalyzedResourceSumm return s } +// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. +func (s *AnalyzedResourceSummary) SetResourceOwnerAccount(v string) *AnalyzedResourceSummary { + s.ResourceOwnerAccount = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *AnalyzedResourceSummary) SetResourceType(v string) *AnalyzedResourceSummary { s.ResourceType = &v @@ -2135,6 +2158,23 @@ type AnalyzerSummary struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // The status of the analyzer. An Active analyzer successfully monitors supported + // resources and generates new findings. The analyzer is Disabled when a user + // action, such as removing trusted access for IAM Access Analyzer from AWS + // Organizations, causes the analyzer to stop generating new findings. The status + // is Creating when the analyzer creation is in progress and Failed when the + // analyzer creation has failed. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"AnalyzerStatus"` + + // The statusReason provides more details about the current status of the analyzer. + // For example, if the creation for the analyzer fails, a Failed status is displayed. + // For an analyzer with organization as the type, this failure can be due to + // an issue with creating the service-linked roles required in the member accounts + // of the AWS organization. + StatusReason *StatusReason `locationName:"statusReason" type:"structure"` + // The tags added to the analyzer. Tags map[string]*string `locationName:"tags" type:"map"` @@ -2185,6 +2225,18 @@ func (s *AnalyzerSummary) SetName(v string) *AnalyzerSummary { return s } +// SetStatus sets the Status field's value. +func (s *AnalyzerSummary) SetStatus(v string) *AnalyzerSummary { + s.Status = &v + return s +} + +// SetStatusReason sets the StatusReason field's value. +func (s *AnalyzerSummary) SetStatusReason(v *StatusReason) *AnalyzerSummary { + s.StatusReason = v + return s +} + // SetTags sets the Tags field's value. func (s *AnalyzerSummary) SetTags(v map[string]*string) *AnalyzerSummary { s.Tags = v @@ -2258,8 +2310,8 @@ func (s *ArchiveRuleSummary) SetUpdatedAt(v time.Time) *ArchiveRuleSummary { // A conflict exception error. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -2286,17 +2338,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2304,22 +2356,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Creates an analyzer. @@ -2805,11 +2857,20 @@ type Finding struct { // The resource that an external principal has access to. Resource *string `locationName:"resource" type:"string"` + // The AWS account ID that owns the resource. + // + // ResourceOwnerAccount is a required field + ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` + // The type of the resource reported in the finding. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` + // The sources of the finding. This indicates how the access that generated + // the finding is granted. It is populated for Amazon S3 bucket findings. + Sources []*FindingSource `locationName:"sources" type:"list"` + // The current status of the finding. // // Status is a required field @@ -2885,12 +2946,24 @@ func (s *Finding) SetResource(v string) *Finding { return s } +// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. +func (s *Finding) SetResourceOwnerAccount(v string) *Finding { + s.ResourceOwnerAccount = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *Finding) SetResourceType(v string) *Finding { s.ResourceType = &v return s } +// SetSources sets the Sources field's value. +func (s *Finding) SetSources(v []*FindingSource) *Finding { + s.Sources = v + return s +} + // SetStatus sets the Status field's value. func (s *Finding) SetStatus(v string) *Finding { s.Status = &v @@ -2903,6 +2976,68 @@ func (s *Finding) SetUpdatedAt(v time.Time) *Finding { return s } +// The source of the finding. This indicates how the access that generated the +// finding is granted. It is populated for Amazon S3 bucket findings. +type FindingSource struct { + _ struct{} `type:"structure"` + + // Includes details about how the access that generated the finding is granted. + // This is populated for Amazon S3 bucket findings. + Detail *FindingSourceDetail `locationName:"detail" type:"structure"` + + // Indicates the type of access that generated the finding. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"FindingSourceType"` +} + +// String returns the string representation +func (s FindingSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FindingSource) GoString() string { + return s.String() +} + +// SetDetail sets the Detail field's value. +func (s *FindingSource) SetDetail(v *FindingSourceDetail) *FindingSource { + s.Detail = v + return s +} + +// SetType sets the Type field's value. +func (s *FindingSource) SetType(v string) *FindingSource { + s.Type = &v + return s +} + +// Includes details about how the access that generated the finding is granted. +// This is populated for Amazon S3 bucket findings. +type FindingSourceDetail struct { + _ struct{} `type:"structure"` + + // The ARN of the access point that generated the finding. + AccessPointArn *string `locationName:"accessPointArn" type:"string"` +} + +// String returns the string representation +func (s FindingSourceDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FindingSourceDetail) GoString() string { + return s.String() +} + +// SetAccessPointArn sets the AccessPointArn field's value. +func (s *FindingSourceDetail) SetAccessPointArn(v string) *FindingSourceDetail { + s.AccessPointArn = &v + return s +} + // Contains information about a finding. type FindingSummary struct { _ struct{} `type:"structure"` @@ -2945,11 +3080,20 @@ type FindingSummary struct { // The resource that the external principal has access to. Resource *string `locationName:"resource" type:"string"` + // The AWS account ID that owns the resource. + // + // ResourceOwnerAccount is a required field + ResourceOwnerAccount *string `locationName:"resourceOwnerAccount" type:"string" required:"true"` + // The type of the resource that the external principal has access to. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` + // The sources of the finding. This indicates how the access that generated + // the finding is granted. It is populated for Amazon S3 bucket findings. + Sources []*FindingSource `locationName:"sources" type:"list"` + // The status of the finding. // // Status is a required field @@ -3025,12 +3169,24 @@ func (s *FindingSummary) SetResource(v string) *FindingSummary { return s } +// SetResourceOwnerAccount sets the ResourceOwnerAccount field's value. +func (s *FindingSummary) SetResourceOwnerAccount(v string) *FindingSummary { + s.ResourceOwnerAccount = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *FindingSummary) SetResourceType(v string) *FindingSummary { s.ResourceType = &v return s } +// SetSources sets the Sources field's value. +func (s *FindingSummary) SetSources(v []*FindingSource) *FindingSummary { + s.Sources = v + return s +} + // SetStatus sets the Status field's value. func (s *FindingSummary) SetStatus(v string) *FindingSummary { s.Status = &v @@ -3423,8 +3579,8 @@ func (s *InlineArchiveRule) SetRuleName(v string) *InlineArchiveRule { // Internal server error. type InternalServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -3444,17 +3600,17 @@ func (s InternalServerException) GoString() string { func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerException) Code() string { +func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. -func (s InternalServerException) Message() string { +func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3462,22 +3618,22 @@ func (s InternalServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerException) OrigErr() error { +func (s *InternalServerException) OrigErr() error { return nil } -func (s InternalServerException) Error() string { +func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID } // Retrieves a list of resources that have been analyzed. @@ -3942,8 +4098,8 @@ func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForRe // The specified resource could not be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -3970,17 +4126,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3988,28 +4144,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Service quote met error. type ServiceQuotaExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -4036,17 +4192,17 @@ func (s ServiceQuotaExceededException) GoString() string { func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { return &ServiceQuotaExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceQuotaExceededException) Code() string { +func (s *ServiceQuotaExceededException) Code() string { return "ServiceQuotaExceededException" } // Message returns the exception's message. -func (s ServiceQuotaExceededException) Message() string { +func (s *ServiceQuotaExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4054,22 +4210,22 @@ func (s ServiceQuotaExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceQuotaExceededException) OrigErr() error { +func (s *ServiceQuotaExceededException) OrigErr() error { return nil } -func (s ServiceQuotaExceededException) Error() string { +func (s *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceQuotaExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceQuotaExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The criteria used to sort. @@ -4173,6 +4329,36 @@ func (s StartResourceScanOutput) GoString() string { return s.String() } +// Provides more details about the current status of the analyzer. For example, +// if the creation for the analyzer fails, a Failed status is displayed. For +// an analyzer with organization as the type, this failure can be due to an +// issue with creating the service-linked roles required in the member accounts +// of the AWS organization. +type StatusReason struct { + _ struct{} `type:"structure"` + + // The reason code for the current status of the analyzer. + // + // Code is a required field + Code *string `locationName:"code" type:"string" required:"true" enum:"ReasonCode"` +} + +// String returns the string representation +func (s StatusReason) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StatusReason) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *StatusReason) SetCode(v string) *StatusReason { + s.Code = &v + return s +} + // Adds a tag to the specified resource. type TagResourceInput struct { _ struct{} `type:"structure"` @@ -4246,8 +4432,8 @@ func (s TagResourceOutput) GoString() string { // Throttling limit exceeded error. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -4267,17 +4453,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4285,22 +4471,22 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // Removes a tag from the specified resource. @@ -4579,8 +4765,8 @@ func (s UpdateFindingsOutput) GoString() string { // Validation exception error. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A list of fields that didn't validate. FieldList []*ValidationExceptionField `locationName:"fieldList" type:"list"` @@ -4605,17 +4791,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4623,22 +4809,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a validation exception. @@ -4678,6 +4864,31 @@ func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { return s } +const ( + // AnalyzerStatusActive is a AnalyzerStatus enum value + AnalyzerStatusActive = "ACTIVE" + + // AnalyzerStatusCreating is a AnalyzerStatus enum value + AnalyzerStatusCreating = "CREATING" + + // AnalyzerStatusDisabled is a AnalyzerStatus enum value + AnalyzerStatusDisabled = "DISABLED" + + // AnalyzerStatusFailed is a AnalyzerStatus enum value + AnalyzerStatusFailed = "FAILED" +) + +const ( + // FindingSourceTypeBucketAcl is a FindingSourceType enum value + FindingSourceTypeBucketAcl = "BUCKET_ACL" + + // FindingSourceTypePolicy is a FindingSourceType enum value + FindingSourceTypePolicy = "POLICY" + + // FindingSourceTypeS3AccessPoint is a FindingSourceType enum value + FindingSourceTypeS3AccessPoint = "S3_ACCESS_POINT" +) + const ( // FindingStatusActive is a FindingStatus enum value FindingStatusActive = "ACTIVE" @@ -4705,6 +4916,20 @@ const ( OrderByDesc = "DESC" ) +const ( + // ReasonCodeAwsServiceAccessDisabled is a ReasonCode enum value + ReasonCodeAwsServiceAccessDisabled = "AWS_SERVICE_ACCESS_DISABLED" + + // ReasonCodeDelegatedAdministratorDeregistered is a ReasonCode enum value + ReasonCodeDelegatedAdministratorDeregistered = "DELEGATED_ADMINISTRATOR_DEREGISTERED" + + // ReasonCodeOrganizationDeleted is a ReasonCode enum value + ReasonCodeOrganizationDeleted = "ORGANIZATION_DELETED" + + // ReasonCodeServiceLinkedRoleCreationFailed is a ReasonCode enum value + ReasonCodeServiceLinkedRoleCreationFailed = "SERVICE_LINKED_ROLE_CREATION_FAILED" +) + const ( // ResourceTypeAwsIamRole is a ResourceType enum value ResourceTypeAwsIamRole = "AWS::IAM::Role" @@ -4728,6 +4953,9 @@ const ( const ( // TypeAccount is a Type enum value TypeAccount = "ACCOUNT" + + // TypeOrganization is a Type enum value + TypeOrganization = "ORGANIZATION" ) const ( 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 0135a159d3e..f643d683a69 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 @@ -443,12 +443,11 @@ func (c *ACM) GetCertificateRequest(input *GetCertificateInput) (req *request.Re // GetCertificate API operation for AWS Certificate Manager. // -// Retrieves a certificate specified by an ARN and its certificate chain . The -// chain is an ordered list of certificates that contains the end entity certificate, -// intermediate certificates of subordinate CAs, and the root certificate in -// that order. The certificate and certificate chain are base64 encoded. If -// you want to decode the certificate to see the individual fields, you can -// use OpenSSL. +// Retrieves an Amazon-issued certificate and its certificate chain. The chain +// consists of the certificate of the issuing CA and the intermediate certificates +// of any other subordinate CAs. All of the certificates are base64 encoded. +// You can use OpenSSL (https://wiki.openssl.org/index.php/Command_Line_Utilities) +// to decode the certificates and inspect individual fields. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -604,7 +603,7 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // caller's account cannot be found. // // * LimitExceededException -// An ACM limit has been exceeded. +// An ACM quota has been exceeded. // // * InvalidTagException // One or both of the values that make up the key-value pair is not valid. For @@ -1123,7 +1122,7 @@ func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *re // // Returned Error Types: // * LimitExceededException -// An ACM limit has been exceeded. +// An ACM quota has been exceeded. // // * InvalidDomainValidationOptionsException // One or more values in the DomainValidationOption structure is incorrect. @@ -1329,7 +1328,7 @@ func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInp // caller's account cannot be found. // // * LimitExceededException -// An ACM limit has been exceeded. +// An ACM quota has been exceeded. // // * InvalidStateException // Processing has reached an invalid state. @@ -1951,6 +1950,11 @@ type DomainValidation struct { // Contains the CNAME record that you add to your DNS database for domain validation. // For more information, see Use DNS to Validate Domain Ownership (https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html). + // + // Note: The CNAME information that you need does not include the name of your + // domain. If you include your domain name in the DNS database CNAME record, + // validation fails. For example, if the name is "_a79865eb4cd1a6ab990a45779b4e0b96.yourdomain.com", + // only "_a79865eb4cd1a6ab990a45779b4e0b96" must be used. ResourceRecord *ResourceRecord `type:"structure"` // The domain name that ACM used to send domain validation emails. @@ -2356,12 +2360,12 @@ func (s *GetCertificateInput) SetCertificateArn(v string) *GetCertificateInput { type GetCertificateOutput struct { _ struct{} `type:"structure"` - // String that contains the ACM certificate represented by the ARN specified - // at input. + // The ACM-issued certificate corresponding to the ARN specified as input. Certificate *string `min:"1" type:"string"` - // The certificate chain that contains the root certificate issued by the certificate - // authority (CA). + // Certificates forming the requested certificate's chain of trust. The chain + // consists of the certificate of the issuing CA and the intermediate certificates + // of any other subordinate CAs. CertificateChain *string `min:"1" type:"string"` } @@ -2527,8 +2531,8 @@ func (s *ImportCertificateOutput) SetCertificateArn(v string) *ImportCertificate // One or more of of request parameters specified is not valid. type InvalidArgsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2545,17 +2549,17 @@ func (s InvalidArgsException) GoString() string { func newErrorInvalidArgsException(v protocol.ResponseMetadata) error { return &InvalidArgsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgsException) Code() string { +func (s *InvalidArgsException) Code() string { return "InvalidArgsException" } // Message returns the exception's message. -func (s InvalidArgsException) Message() string { +func (s *InvalidArgsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2563,28 +2567,28 @@ func (s InvalidArgsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgsException) OrigErr() error { +func (s *InvalidArgsException) OrigErr() error { return nil } -func (s InvalidArgsException) Error() string { +func (s *InvalidArgsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgsException) RequestID() string { + return s.RespMetadata.RequestID } // The requested Amazon Resource Name (ARN) does not refer to an existing resource. type InvalidArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2601,17 +2605,17 @@ func (s InvalidArnException) GoString() string { func newErrorInvalidArnException(v protocol.ResponseMetadata) error { return &InvalidArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArnException) Code() string { +func (s *InvalidArnException) Code() string { return "InvalidArnException" } // Message returns the exception's message. -func (s InvalidArnException) Message() string { +func (s *InvalidArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2619,28 +2623,28 @@ func (s InvalidArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArnException) OrigErr() error { +func (s *InvalidArnException) OrigErr() error { return nil } -func (s InvalidArnException) Error() string { +func (s *InvalidArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArnException) RequestID() string { + return s.RespMetadata.RequestID } // One or more values in the DomainValidationOption structure is incorrect. type InvalidDomainValidationOptionsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2657,17 +2661,17 @@ func (s InvalidDomainValidationOptionsException) GoString() string { func newErrorInvalidDomainValidationOptionsException(v protocol.ResponseMetadata) error { return &InvalidDomainValidationOptionsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDomainValidationOptionsException) Code() string { +func (s *InvalidDomainValidationOptionsException) Code() string { return "InvalidDomainValidationOptionsException" } // Message returns the exception's message. -func (s InvalidDomainValidationOptionsException) Message() string { +func (s *InvalidDomainValidationOptionsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2675,28 +2679,28 @@ func (s InvalidDomainValidationOptionsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDomainValidationOptionsException) OrigErr() error { +func (s *InvalidDomainValidationOptionsException) OrigErr() error { return nil } -func (s InvalidDomainValidationOptionsException) Error() string { +func (s *InvalidDomainValidationOptionsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDomainValidationOptionsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDomainValidationOptionsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDomainValidationOptionsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDomainValidationOptionsException) RequestID() string { + return s.RespMetadata.RequestID } // An input parameter was invalid. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2713,17 +2717,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2731,28 +2735,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // Processing has reached an invalid state. type InvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2769,17 +2773,17 @@ func (s InvalidStateException) GoString() string { func newErrorInvalidStateException(v protocol.ResponseMetadata) error { return &InvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateException) Code() string { +func (s *InvalidStateException) Code() string { return "InvalidStateException" } // Message returns the exception's message. -func (s InvalidStateException) Message() string { +func (s *InvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2787,29 +2791,29 @@ func (s InvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateException) OrigErr() error { +func (s *InvalidStateException) OrigErr() error { return nil } -func (s InvalidStateException) Error() string { +func (s *InvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // One or both of the values that make up the key-value pair is not valid. For // example, you cannot specify a tag value that begins with aws:. type InvalidTagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2826,17 +2830,17 @@ func (s InvalidTagException) GoString() string { func newErrorInvalidTagException(v protocol.ResponseMetadata) error { return &InvalidTagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagException) Code() string { +func (s *InvalidTagException) Code() string { return "InvalidTagException" } // Message returns the exception's message. -func (s InvalidTagException) Message() string { +func (s *InvalidTagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2844,22 +2848,22 @@ func (s InvalidTagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagException) OrigErr() error { +func (s *InvalidTagException) OrigErr() error { return nil } -func (s InvalidTagException) Error() string { +func (s *InvalidTagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagException) RequestID() string { + return s.RespMetadata.RequestID } // The Key Usage X.509 v3 extension defines the purpose of the public key contained @@ -2887,10 +2891,10 @@ func (s *KeyUsage) SetName(v string) *KeyUsage { return s } -// An ACM limit has been exceeded. +// An ACM quota has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2907,17 +2911,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2925,22 +2929,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListCertificatesInput struct { @@ -3379,9 +3383,9 @@ type RequestCertificateInput struct { // of the ACM certificate. For example, add the name www.example.net to a certificate // for which the DomainName field is www.example.com if users can reach your // 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 (https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). + // add to an ACM certificate is 100. However, the initial quota is 10 domain + // names. If you need more than 10 names, you must request a quota increase. + // For more information, see Quotas (https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). // // The maximum length of a SAN DNS name is 253 octets. The name is made up of // multiple labels separated by periods. No label can be longer than 63 octets. @@ -3547,8 +3551,8 @@ func (s *RequestCertificateOutput) SetCertificateArn(v string) *RequestCertifica // The certificate request is in process and the certificate in your account // has not yet been issued. type RequestInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3565,17 +3569,17 @@ func (s RequestInProgressException) GoString() string { func newErrorRequestInProgressException(v protocol.ResponseMetadata) error { return &RequestInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestInProgressException) Code() string { +func (s *RequestInProgressException) Code() string { return "RequestInProgressException" } // Message returns the exception's message. -func (s RequestInProgressException) Message() string { +func (s *RequestInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3583,22 +3587,22 @@ func (s RequestInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestInProgressException) OrigErr() error { +func (s *RequestInProgressException) OrigErr() error { return nil } -func (s RequestInProgressException) Error() string { +func (s *RequestInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestInProgressException) RequestID() string { + return s.RespMetadata.RequestID } type ResendValidationEmailInput struct { @@ -3715,8 +3719,8 @@ func (s ResendValidationEmailOutput) GoString() string { // The certificate is in use by another AWS service in the caller's account. // Remove the association and try again. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3733,17 +3737,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3751,29 +3755,29 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified certificate cannot be found in the caller's account or the // caller's account cannot be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3790,17 +3794,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3808,22 +3812,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains a DNS record value that you can use to can use to validate ownership @@ -3930,8 +3934,8 @@ func (s *Tag) SetValue(v string) *Tag { // A specified tag did not comply with an existing tag policy and was rejected. type TagPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3948,17 +3952,17 @@ func (s TagPolicyException) GoString() string { func newErrorTagPolicyException(v protocol.ResponseMetadata) error { return &TagPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagPolicyException) Code() string { +func (s *TagPolicyException) Code() string { return "TagPolicyException" } // Message returns the exception's message. -func (s TagPolicyException) Message() string { +func (s *TagPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3966,28 +3970,28 @@ func (s TagPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagPolicyException) OrigErr() error { +func (s *TagPolicyException) OrigErr() error { return nil } -func (s TagPolicyException) Error() string { +func (s *TagPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // The request contains too many tags. Try the request again with fewer tags. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4004,17 +4008,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4022,22 +4026,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateCertificateOptionsInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go index 54de486c39a..f054cb40564 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/errors.go @@ -48,7 +48,7 @@ const ( // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // - // An ACM limit has been exceeded. + // An ACM quota has been exceeded. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeRequestInProgressException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go index d339900f2f3..22cca109ef4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -2579,8 +2579,8 @@ func (s *CertificateAuthorityConfiguration) SetSubject(v *ASN1Subject) *Certific // The certificate authority certificate you are importing does not comply with // conditions specified in the certificate that signed it. type CertificateMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2597,17 +2597,17 @@ func (s CertificateMismatchException) GoString() string { func newErrorCertificateMismatchException(v protocol.ResponseMetadata) error { return &CertificateMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateMismatchException) Code() string { +func (s *CertificateMismatchException) Code() string { return "CertificateMismatchException" } // Message returns the exception's message. -func (s CertificateMismatchException) Message() string { +func (s *CertificateMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2615,28 +2615,28 @@ func (s CertificateMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateMismatchException) OrigErr() error { +func (s *CertificateMismatchException) OrigErr() error { return nil } -func (s CertificateMismatchException) Error() string { +func (s *CertificateMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // A previous update to your private CA is still ongoing. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2653,17 +2653,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2671,22 +2671,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } type CreateCertificateAuthorityAuditReportInput struct { @@ -3848,8 +3848,8 @@ func (s ImportCertificateAuthorityCertificateOutput) GoString() string { // One or more of the specified arguments was not valid. type InvalidArgsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3866,17 +3866,17 @@ func (s InvalidArgsException) GoString() string { func newErrorInvalidArgsException(v protocol.ResponseMetadata) error { return &InvalidArgsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgsException) Code() string { +func (s *InvalidArgsException) Code() string { return "InvalidArgsException" } // Message returns the exception's message. -func (s InvalidArgsException) Message() string { +func (s *InvalidArgsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3884,28 +3884,28 @@ func (s InvalidArgsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgsException) OrigErr() error { +func (s *InvalidArgsException) OrigErr() error { return nil } -func (s InvalidArgsException) Error() string { +func (s *InvalidArgsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgsException) RequestID() string { + return s.RespMetadata.RequestID } // The requested Amazon Resource Name (ARN) does not refer to an existing resource. type InvalidArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3922,17 +3922,17 @@ func (s InvalidArnException) GoString() string { func newErrorInvalidArnException(v protocol.ResponseMetadata) error { return &InvalidArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArnException) Code() string { +func (s *InvalidArnException) Code() string { return "InvalidArnException" } // Message returns the exception's message. -func (s InvalidArnException) Message() string { +func (s *InvalidArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3940,29 +3940,29 @@ func (s InvalidArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArnException) OrigErr() error { +func (s *InvalidArnException) OrigErr() error { return nil } -func (s InvalidArnException) Error() string { +func (s *InvalidArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArnException) RequestID() string { + return s.RespMetadata.RequestID } // The token specified in the NextToken argument is not valid. Use the token // returned from your previous call to ListCertificateAuthorities. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3979,17 +3979,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3997,29 +3997,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The S3 bucket policy is not valid. The policy must give ACM Private CA rights // to read from and write to the bucket and find the bucket location. type InvalidPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4036,17 +4036,17 @@ func (s InvalidPolicyException) GoString() string { func newErrorInvalidPolicyException(v protocol.ResponseMetadata) error { return &InvalidPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPolicyException) Code() string { +func (s *InvalidPolicyException) Code() string { return "InvalidPolicyException" } // Message returns the exception's message. -func (s InvalidPolicyException) Message() string { +func (s *InvalidPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4054,28 +4054,28 @@ func (s InvalidPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPolicyException) OrigErr() error { +func (s *InvalidPolicyException) OrigErr() error { return nil } -func (s InvalidPolicyException) Error() string { +func (s *InvalidPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // The request action cannot be performed or is prohibited. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4092,17 +4092,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4110,29 +4110,29 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The private CA is in a state during which a report or certificate cannot // be generated. type InvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4149,17 +4149,17 @@ func (s InvalidStateException) GoString() string { func newErrorInvalidStateException(v protocol.ResponseMetadata) error { return &InvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateException) Code() string { +func (s *InvalidStateException) Code() string { return "InvalidStateException" } // Message returns the exception's message. -func (s InvalidStateException) Message() string { +func (s *InvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4167,29 +4167,29 @@ func (s InvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateException) OrigErr() error { +func (s *InvalidStateException) OrigErr() error { return nil } -func (s InvalidStateException) Error() string { +func (s *InvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // The tag associated with the CA is not valid. The invalid argument is contained // in the message field. type InvalidTagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4206,17 +4206,17 @@ func (s InvalidTagException) GoString() string { func newErrorInvalidTagException(v protocol.ResponseMetadata) error { return &InvalidTagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagException) Code() string { +func (s *InvalidTagException) Code() string { return "InvalidTagException" } // Message returns the exception's message. -func (s InvalidTagException) Message() string { +func (s *InvalidTagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4224,22 +4224,22 @@ func (s InvalidTagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagException) OrigErr() error { +func (s *InvalidTagException) OrigErr() error { return nil } -func (s InvalidTagException) Error() string { +func (s *InvalidTagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagException) RequestID() string { + return s.RespMetadata.RequestID } type IssueCertificateInput struct { @@ -4428,8 +4428,8 @@ func (s *IssueCertificateOutput) SetCertificateArn(v string) *IssueCertificateOu // An ACM Private CA limit has been exceeded. See the exception message returned // to determine the limit that was exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4446,17 +4446,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4464,22 +4464,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListCertificateAuthoritiesInput struct { @@ -4784,8 +4784,8 @@ func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { // The certificate signing request is invalid. type MalformedCSRException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4802,17 +4802,17 @@ func (s MalformedCSRException) GoString() string { func newErrorMalformedCSRException(v protocol.ResponseMetadata) error { return &MalformedCSRException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedCSRException) Code() string { +func (s *MalformedCSRException) Code() string { return "MalformedCSRException" } // Message returns the exception's message. -func (s MalformedCSRException) Message() string { +func (s *MalformedCSRException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4820,28 +4820,28 @@ func (s MalformedCSRException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedCSRException) OrigErr() error { +func (s *MalformedCSRException) OrigErr() error { return nil } -func (s MalformedCSRException) Error() string { +func (s *MalformedCSRException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedCSRException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedCSRException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedCSRException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedCSRException) RequestID() string { + return s.RespMetadata.RequestID } // One or more fields in the certificate are invalid. type MalformedCertificateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4858,17 +4858,17 @@ func (s MalformedCertificateException) GoString() string { func newErrorMalformedCertificateException(v protocol.ResponseMetadata) error { return &MalformedCertificateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedCertificateException) Code() string { +func (s *MalformedCertificateException) Code() string { return "MalformedCertificateException" } // Message returns the exception's message. -func (s MalformedCertificateException) Message() string { +func (s *MalformedCertificateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4876,22 +4876,22 @@ func (s MalformedCertificateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedCertificateException) OrigErr() error { +func (s *MalformedCertificateException) OrigErr() error { return nil } -func (s MalformedCertificateException) Error() string { +func (s *MalformedCertificateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedCertificateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedCertificateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedCertificateException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedCertificateException) RequestID() string { + return s.RespMetadata.RequestID } // Permissions designate which private CA actions can be performed by an AWS @@ -4972,8 +4972,8 @@ func (s *Permission) SetSourceAccount(v string) *Permission { // The designated permission has already been given to the user. type PermissionAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4990,17 +4990,17 @@ func (s PermissionAlreadyExistsException) GoString() string { func newErrorPermissionAlreadyExistsException(v protocol.ResponseMetadata) error { return &PermissionAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PermissionAlreadyExistsException) Code() string { +func (s *PermissionAlreadyExistsException) Code() string { return "PermissionAlreadyExistsException" } // Message returns the exception's message. -func (s PermissionAlreadyExistsException) Message() string { +func (s *PermissionAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5008,28 +5008,28 @@ func (s PermissionAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PermissionAlreadyExistsException) OrigErr() error { +func (s *PermissionAlreadyExistsException) OrigErr() error { return nil } -func (s PermissionAlreadyExistsException) Error() string { +func (s *PermissionAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PermissionAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PermissionAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PermissionAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *PermissionAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Your request has already been completed. type RequestAlreadyProcessedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5046,17 +5046,17 @@ func (s RequestAlreadyProcessedException) GoString() string { func newErrorRequestAlreadyProcessedException(v protocol.ResponseMetadata) error { return &RequestAlreadyProcessedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestAlreadyProcessedException) Code() string { +func (s *RequestAlreadyProcessedException) Code() string { return "RequestAlreadyProcessedException" } // Message returns the exception's message. -func (s RequestAlreadyProcessedException) Message() string { +func (s *RequestAlreadyProcessedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5064,28 +5064,28 @@ func (s RequestAlreadyProcessedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestAlreadyProcessedException) OrigErr() error { +func (s *RequestAlreadyProcessedException) OrigErr() error { return nil } -func (s RequestAlreadyProcessedException) Error() string { +func (s *RequestAlreadyProcessedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestAlreadyProcessedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestAlreadyProcessedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestAlreadyProcessedException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestAlreadyProcessedException) RequestID() string { + return s.RespMetadata.RequestID } // The request has failed for an unspecified reason. type RequestFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5102,17 +5102,17 @@ func (s RequestFailedException) GoString() string { func newErrorRequestFailedException(v protocol.ResponseMetadata) error { return &RequestFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestFailedException) Code() string { +func (s *RequestFailedException) Code() string { return "RequestFailedException" } // Message returns the exception's message. -func (s RequestFailedException) Message() string { +func (s *RequestFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5120,28 +5120,28 @@ func (s RequestFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestFailedException) OrigErr() error { +func (s *RequestFailedException) OrigErr() error { return nil } -func (s RequestFailedException) Error() string { +func (s *RequestFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestFailedException) RequestID() string { + return s.RespMetadata.RequestID } // Your request is already in progress. type RequestInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5158,17 +5158,17 @@ func (s RequestInProgressException) GoString() string { func newErrorRequestInProgressException(v protocol.ResponseMetadata) error { return &RequestInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestInProgressException) Code() string { +func (s *RequestInProgressException) Code() string { return "RequestInProgressException" } // Message returns the exception's message. -func (s RequestInProgressException) Message() string { +func (s *RequestInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5176,29 +5176,29 @@ func (s RequestInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestInProgressException) OrigErr() error { +func (s *RequestInProgressException) OrigErr() error { return nil } -func (s RequestInProgressException) Error() string { +func (s *RequestInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // A resource such as a private CA, S3 bucket, certificate, or audit report // cannot be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5215,17 +5215,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5233,22 +5233,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type RestoreCertificateAuthorityInput struct { @@ -5593,8 +5593,8 @@ func (s TagCertificateAuthorityOutput) GoString() string { // You can associate up to 50 tags with a private CA. Exception information // is contained in the exception message field. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5611,17 +5611,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5629,22 +5629,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagCertificateAuthorityInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/amplify/api.go b/vendor/github.com/aws/aws-sdk-go/service/amplify/api.go index 0eac1f76a1d..76a70164f40 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/amplify/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/amplify/api.go @@ -3839,8 +3839,8 @@ func (s *BackendEnvironment) SetUpdateTime(v time.Time) *BackendEnvironment { // Exception thrown when a request contains unexpected data. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3857,17 +3857,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3875,22 +3875,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Branch for an Amplify App, which maps to a 3rd party repository branch. @@ -5663,8 +5663,8 @@ func (s *DeleteWebhookOutput) SetWebhook(v *Webhook) *DeleteWebhookOutput { // Exception thrown when an operation fails due to a dependent service throwing // an exception. type DependentServiceFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5681,17 +5681,17 @@ func (s DependentServiceFailureException) GoString() string { func newErrorDependentServiceFailureException(v protocol.ResponseMetadata) error { return &DependentServiceFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DependentServiceFailureException) Code() string { +func (s *DependentServiceFailureException) Code() string { return "DependentServiceFailureException" } // Message returns the exception's message. -func (s DependentServiceFailureException) Message() string { +func (s *DependentServiceFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5699,22 +5699,22 @@ func (s DependentServiceFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DependentServiceFailureException) OrigErr() error { +func (s *DependentServiceFailureException) OrigErr() error { return nil } -func (s DependentServiceFailureException) Error() string { +func (s *DependentServiceFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DependentServiceFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DependentServiceFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DependentServiceFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *DependentServiceFailureException) RequestID() string { + return s.RespMetadata.RequestID } // Structure for Domain Association, which associates a custom domain with an @@ -6479,8 +6479,8 @@ func (s *GetWebhookOutput) SetWebhook(v *Webhook) *GetWebhookOutput { // Exception thrown when the service fails to perform an operation due to an // internal issue. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6497,17 +6497,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6515,22 +6515,22 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // Structure for an execution job for an Amplify App. @@ -6687,8 +6687,8 @@ func (s *JobSummary) SetStatus(v string) *JobSummary { // Exception thrown when a resource could not be created because of service // limits. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6705,17 +6705,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6723,22 +6723,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Request structure for an Amplify App list request. @@ -7562,8 +7562,8 @@ func (s *ListWebhooksOutput) SetWebhooks(v []*Webhook) *ListWebhooksOutput { // Exception thrown when an entity has not been found during an operation. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7580,17 +7580,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7598,22 +7598,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Structure with Production Branch information. @@ -7669,8 +7669,8 @@ func (s *ProductionBranch) SetThumbnailUrl(v string) *ProductionBranch { // Exception thrown when an operation fails due to non-existent resource. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -7689,17 +7689,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7707,22 +7707,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Request structure for start a deployment. @@ -8381,8 +8381,8 @@ func (s TagResourceOutput) GoString() string { // Exception thrown when an operation fails due to a lack of access. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8399,17 +8399,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8417,22 +8417,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } // Request structure used to untag resource. 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 e2e1306b9f2..15969f19078 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 @@ -11339,7 +11339,9 @@ func (c *APIGateway) UpdateVpcLinkWithContext(ctx aws.Context, input *UpdateVpcL type AccessLogSettings struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch Logs log group to receive access logs. + // The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis + // Data Firehose delivery stream to receive access logs. If you specify a Kinesis + // Data Firehose delivery stream, the stream name must begin with amazon-apigateway-. DestinationArn *string `locationName:"destinationArn" type:"string"` // A single line format of the access logs of data, as specified by selected @@ -11767,8 +11769,8 @@ func (s *Authorizer) SetType(v string) *Authorizer { // The submitted request is not valid, for example, the input is incomplete // or incorrect. See the accompanying error message for details. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11785,17 +11787,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11803,22 +11805,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the base path that callers of the API must provide as part of @@ -12004,8 +12006,8 @@ func (s *ClientCertificate) SetTags(v map[string]*string) *ClientCertificate { // The request configuration has conflicts. For details, see the accompanying // error message. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12022,17 +12024,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12040,22 +12042,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Request to create an ApiKey resource. @@ -12073,7 +12075,8 @@ type CreateApiKeyInput struct { Enabled *bool `locationName:"enabled" type:"boolean"` // Specifies whether (true) or not (false) the key identifier is distinct from - // the created API key value. + // the created API key value. This parameter is deprecated and should not be + // used. GenerateDistinctId *bool `locationName:"generateDistinctId" type:"boolean"` // The name of the ApiKey. @@ -12346,8 +12349,8 @@ type CreateBasePathMappingInput struct { RestApiId *string `locationName:"restApiId" type:"string" required:"true"` // The name of the API's stage that you want to use for this mapping. Specify - // '(none)' if you do not want callers to explicitly specify the stage name - // after any base path name. + // '(none)' if you want callers to explicitly specify the stage name after any + // base path name. Stage *string `locationName:"stage" type:"string"` } @@ -13516,8 +13519,8 @@ type CreateVpcLinkInput struct { // tag value can be up to 256 characters. Tags map[string]*string `locationName:"tags" type:"map"` - // [Required] The ARNs of network load balancers of the VPC targeted by the - // VPC link. The network load balancers must be owned by the same AWS account + // [Required] The ARN of the network load balancer of the VPC targeted by the + // VPC link. The network load balancer must be owned by the same AWS account // of the API owner. // // TargetArns is a required field @@ -18092,7 +18095,7 @@ func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { type GetModelTemplateOutput struct { _ struct{} `type:"structure"` - // The Apache Velocity Template Language (VTL) (https://velocity.apache.org/engine/devel/vtl-reference-guide.html) + // The Apache Velocity Template Language (VTL) (https://velocity.apache.org/engine/devel/vtl-reference.html) // template content used for the template resource. Value *string `locationName:"value" type:"string"` } @@ -19047,8 +19050,7 @@ type GetTagsInput struct { // set. Position *string `location:"querystring" locationName:"position" type:"string"` - // [Required] The ARN of a resource that can be tagged. The resource ARN must - // be URL-encoded. + // [Required] The ARN of a resource that can be tagged. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` @@ -20283,8 +20285,8 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // The request exceeded the rate limit. Retry after the specified time period. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -20303,17 +20305,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20321,22 +20323,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a client-facing interface by which the client calls the API to @@ -20720,7 +20722,9 @@ type MethodSetting struct { // Specifies the logging level for this method, which affects the log entries // pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, - // and the available levels are OFF, ERROR, and INFO. + // and the available levels are OFF, ERROR, and INFO. Choose ERROR to write + // only error-level entries to CloudWatch Logs, or choose INFO to include all + // ERROR events as well as extra informational events. LoggingLevel *string `locationName:"loggingLevel" type:"string"` // Specifies whether Amazon CloudWatch metrics are enabled for this method. @@ -20930,8 +20934,8 @@ func (s *Model) SetSchema(v string) *Model { // The requested resource is not found. Make sure that the request URI is correct. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20948,17 +20952,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20966,22 +20970,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A single patch operation to apply to the specified resource. Please refer @@ -22395,8 +22399,8 @@ func (s *SdkType) SetId(v string) *SdkType { // The requested service is not available. For details see the accompanying // error message. Retry after the specified time period. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -22415,17 +22419,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22433,22 +22437,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a unique identifier for a version of a deployed RestApi that is @@ -22666,8 +22670,7 @@ func (s *StageKey) SetStageName(v string) *StageKey { type TagResourceInput struct { _ struct{} `type:"structure"` - // [Required] The ARN of a resource that can be tagged. The resource ARN must - // be URL-encoded. + // [Required] The ARN of a resource that can be tagged. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` @@ -23178,8 +23181,8 @@ func (s *ThrottleSettings) SetRateLimit(v float64) *ThrottleSettings { // The request has reached its throttling limit. Retry after the specified time // period. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -23198,17 +23201,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23216,28 +23219,28 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // The request is denied because the caller has insufficient permissions. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23254,17 +23257,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23272,30 +23275,29 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } // Removes a tag from a given resource. type UntagResourceInput struct { _ struct{} `type:"structure"` - // [Required] The ARN of a resource that can be tagged. The resource ARN must - // be URL-encoded. + // [Required] The ARN of a resource that can be tagged. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` @@ -25083,7 +25085,7 @@ func (s *UpdateVpcLinkInput) SetVpcLinkId(v string) *UpdateVpcLinkInput { return s } -// A API Gateway VPC link for a RestApi to access resources in an Amazon Virtual +// An API Gateway VPC link for a RestApi to access resources in an Amazon Virtual // Private Cloud (VPC). // // To enable access to a resource in an Amazon Virtual Private Cloud through @@ -25117,8 +25119,9 @@ type UpdateVpcLinkOutput struct { // The collection of tags. Each tag element is associated with a given resource. Tags map[string]*string `locationName:"tags" type:"map"` - // The ARNs of network load balancers of the VPC targeted by the VPC link. The - // network load balancers must be owned by the same AWS account of the API owner. + // The ARN of the network load balancer of the VPC targeted by the VPC link. + // The network load balancer must be owned by the same AWS account of the API + // owner. TargetArns []*string `locationName:"targetArns" type:"list"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go index 7f2175abdf5..f191a64b8a1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go @@ -1027,6 +1027,174 @@ func (c *ApiGatewayV2) CreateStageWithContext(ctx aws.Context, input *CreateStag return out, req.Send() } +const opCreateVpcLink = "CreateVpcLink" + +// CreateVpcLinkRequest generates a "aws/request.Request" representing the +// client's request for the CreateVpcLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateVpcLink for more information on using the CreateVpcLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateVpcLinkRequest method. +// req, resp := client.CreateVpcLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateVpcLink +func (c *ApiGatewayV2) CreateVpcLinkRequest(input *CreateVpcLinkInput) (req *request.Request, output *CreateVpcLinkOutput) { + op := &request.Operation{ + Name: opCreateVpcLink, + HTTPMethod: "POST", + HTTPPath: "/v2/vpclinks", + } + + if input == nil { + input = &CreateVpcLinkInput{} + } + + output = &CreateVpcLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVpcLink API operation for AmazonApiGatewayV2. +// +// Creates a VPC link. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateVpcLink for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateVpcLink +func (c *ApiGatewayV2) CreateVpcLink(input *CreateVpcLinkInput) (*CreateVpcLinkOutput, error) { + req, out := c.CreateVpcLinkRequest(input) + return out, req.Send() +} + +// CreateVpcLinkWithContext is the same as CreateVpcLink with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVpcLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateVpcLinkWithContext(ctx aws.Context, input *CreateVpcLinkInput, opts ...request.Option) (*CreateVpcLinkOutput, error) { + req, out := c.CreateVpcLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAccessLogSettings = "DeleteAccessLogSettings" + +// DeleteAccessLogSettingsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAccessLogSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAccessLogSettings for more information on using the DeleteAccessLogSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAccessLogSettingsRequest method. +// req, resp := client.DeleteAccessLogSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteAccessLogSettings +func (c *ApiGatewayV2) DeleteAccessLogSettingsRequest(input *DeleteAccessLogSettingsInput) (req *request.Request, output *DeleteAccessLogSettingsOutput) { + op := &request.Operation{ + Name: opDeleteAccessLogSettings, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/stages/{stageName}/accesslogsettings", + } + + if input == nil { + input = &DeleteAccessLogSettingsInput{} + } + + output = &DeleteAccessLogSettingsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteAccessLogSettings API operation for AmazonApiGatewayV2. +// +// Deletes the AccessLogSettings for a Stage. To disable access logging for +// a Stage, delete its AccessLogSettings. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteAccessLogSettings for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteAccessLogSettings +func (c *ApiGatewayV2) DeleteAccessLogSettings(input *DeleteAccessLogSettingsInput) (*DeleteAccessLogSettingsOutput, error) { + req, out := c.DeleteAccessLogSettingsRequest(input) + return out, req.Send() +} + +// DeleteAccessLogSettingsWithContext is the same as DeleteAccessLogSettings with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAccessLogSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteAccessLogSettingsWithContext(ctx aws.Context, input *DeleteAccessLogSettingsInput, opts ...request.Option) (*DeleteAccessLogSettingsOutput, error) { + req, out := c.DeleteAccessLogSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteApi = "DeleteApi" // DeleteApiRequest generates a "aws/request.Request" representing the @@ -1871,6 +2039,90 @@ func (c *ApiGatewayV2) DeleteRouteWithContext(ctx aws.Context, input *DeleteRout return out, req.Send() } +const opDeleteRouteRequestParameter = "DeleteRouteRequestParameter" + +// DeleteRouteRequestParameterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRouteRequestParameter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRouteRequestParameter for more information on using the DeleteRouteRequestParameter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRouteRequestParameterRequest method. +// req, resp := client.DeleteRouteRequestParameterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRouteRequestParameter +func (c *ApiGatewayV2) DeleteRouteRequestParameterRequest(input *DeleteRouteRequestParameterInput) (req *request.Request, output *DeleteRouteRequestParameterOutput) { + op := &request.Operation{ + Name: opDeleteRouteRequestParameter, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/requestparameters/{requestParameterKey}", + } + + if input == nil { + input = &DeleteRouteRequestParameterInput{} + } + + output = &DeleteRouteRequestParameterOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRouteRequestParameter API operation for AmazonApiGatewayV2. +// +// Deletes a route request parameter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteRouteRequestParameter for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRouteRequestParameter +func (c *ApiGatewayV2) DeleteRouteRequestParameter(input *DeleteRouteRequestParameterInput) (*DeleteRouteRequestParameterOutput, error) { + req, out := c.DeleteRouteRequestParameterRequest(input) + return out, req.Send() +} + +// DeleteRouteRequestParameterWithContext is the same as DeleteRouteRequestParameter with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRouteRequestParameter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteRouteRequestParameterWithContext(ctx aws.Context, input *DeleteRouteRequestParameterInput, opts ...request.Option) (*DeleteRouteRequestParameterOutput, error) { + req, out := c.DeleteRouteRequestParameterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRouteResponse = "DeleteRouteResponse" // DeleteRouteResponseRequest generates a "aws/request.Request" representing the @@ -2123,58 +2375,59 @@ func (c *ApiGatewayV2) DeleteStageWithContext(ctx aws.Context, input *DeleteStag return out, req.Send() } -const opGetApi = "GetApi" +const opDeleteVpcLink = "DeleteVpcLink" -// GetApiRequest generates a "aws/request.Request" representing the -// client's request for the GetApi operation. The "output" return +// DeleteVpcLinkRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVpcLink operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetApi for more information on using the GetApi +// See DeleteVpcLink for more information on using the DeleteVpcLink // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetApiRequest method. -// req, resp := client.GetApiRequest(params) +// // Example sending a request using the DeleteVpcLinkRequest method. +// req, resp := client.DeleteVpcLinkRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi -func (c *ApiGatewayV2) GetApiRequest(input *GetApiInput) (req *request.Request, output *GetApiOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteVpcLink +func (c *ApiGatewayV2) DeleteVpcLinkRequest(input *DeleteVpcLinkInput) (req *request.Request, output *DeleteVpcLinkOutput) { op := &request.Operation{ - Name: opGetApi, - HTTPMethod: "GET", - HTTPPath: "/v2/apis/{apiId}", + Name: opDeleteVpcLink, + HTTPMethod: "DELETE", + HTTPPath: "/v2/vpclinks/{vpcLinkId}", } if input == nil { - input = &GetApiInput{} + input = &DeleteVpcLinkInput{} } - output = &GetApiOutput{} + output = &DeleteVpcLinkOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// GetApi API operation for AmazonApiGatewayV2. +// DeleteVpcLink API operation for AmazonApiGatewayV2. // -// Gets an Api resource. +// Deletes a VPC link. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetApi for usage and error information. +// API operation DeleteVpcLink for usage and error information. // // Returned Error Types: // * NotFoundException @@ -2184,80 +2437,80 @@ func (c *ApiGatewayV2) GetApiRequest(input *GetApiInput) (req *request.Request, // * TooManyRequestsException // A limit has been exceeded. See the accompanying error message for details. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi -func (c *ApiGatewayV2) GetApi(input *GetApiInput) (*GetApiOutput, error) { - req, out := c.GetApiRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteVpcLink +func (c *ApiGatewayV2) DeleteVpcLink(input *DeleteVpcLinkInput) (*DeleteVpcLinkOutput, error) { + req, out := c.DeleteVpcLinkRequest(input) return out, req.Send() } -// GetApiWithContext is the same as GetApi with the addition of +// DeleteVpcLinkWithContext is the same as DeleteVpcLink with the addition of // the ability to pass a context and additional request options. // -// See GetApi for details on how to use this API operation. +// See DeleteVpcLink for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ApiGatewayV2) GetApiWithContext(ctx aws.Context, input *GetApiInput, opts ...request.Option) (*GetApiOutput, error) { - req, out := c.GetApiRequest(input) +func (c *ApiGatewayV2) DeleteVpcLinkWithContext(ctx aws.Context, input *DeleteVpcLinkInput, opts ...request.Option) (*DeleteVpcLinkOutput, error) { + req, out := c.DeleteVpcLinkRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetApiMapping = "GetApiMapping" +const opExportApi = "ExportApi" -// GetApiMappingRequest generates a "aws/request.Request" representing the -// client's request for the GetApiMapping operation. The "output" return +// ExportApiRequest generates a "aws/request.Request" representing the +// client's request for the ExportApi operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetApiMapping for more information on using the GetApiMapping +// See ExportApi for more information on using the ExportApi // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetApiMappingRequest method. -// req, resp := client.GetApiMappingRequest(params) +// // Example sending a request using the ExportApiRequest method. +// req, resp := client.ExportApiRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping -func (c *ApiGatewayV2) GetApiMappingRequest(input *GetApiMappingInput) (req *request.Request, output *GetApiMappingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ExportApi +func (c *ApiGatewayV2) ExportApiRequest(input *ExportApiInput) (req *request.Request, output *ExportApiOutput) { op := &request.Operation{ - Name: opGetApiMapping, + Name: opExportApi, HTTPMethod: "GET", - HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", + HTTPPath: "/v2/apis/{apiId}/exports/{specification}", } if input == nil { - input = &GetApiMappingInput{} + input = &ExportApiInput{} } - output = &GetApiMappingOutput{} + output = &ExportApiOutput{} req = c.newRequest(op, input, output) return } -// GetApiMapping API operation for AmazonApiGatewayV2. +// ExportApi API operation for AmazonApiGatewayV2. // -// Gets an API mapping. +// Exports a definition of an API in a particular output format and specification. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AmazonApiGatewayV2's -// API operation GetApiMapping for usage and error information. +// API operation ExportApi for usage and error information. // // Returned Error Types: // * NotFoundException @@ -2271,66 +2524,236 @@ func (c *ApiGatewayV2) GetApiMappingRequest(input *GetApiMappingInput) (req *req // The request is not valid, for example, the input is incomplete or incorrect. // See the accompanying error message for details. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping -func (c *ApiGatewayV2) GetApiMapping(input *GetApiMappingInput) (*GetApiMappingOutput, error) { - req, out := c.GetApiMappingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ExportApi +func (c *ApiGatewayV2) ExportApi(input *ExportApiInput) (*ExportApiOutput, error) { + req, out := c.ExportApiRequest(input) return out, req.Send() } -// GetApiMappingWithContext is the same as GetApiMapping with the addition of +// ExportApiWithContext is the same as ExportApi with the addition of // the ability to pass a context and additional request options. // -// See GetApiMapping for details on how to use this API operation. +// See ExportApi for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ApiGatewayV2) GetApiMappingWithContext(ctx aws.Context, input *GetApiMappingInput, opts ...request.Option) (*GetApiMappingOutput, error) { - req, out := c.GetApiMappingRequest(input) +func (c *ApiGatewayV2) ExportApiWithContext(ctx aws.Context, input *ExportApiInput, opts ...request.Option) (*ExportApiOutput, error) { + req, out := c.ExportApiRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetApiMappings = "GetApiMappings" +const opGetApi = "GetApi" -// GetApiMappingsRequest generates a "aws/request.Request" representing the -// client's request for the GetApiMappings operation. The "output" return +// GetApiRequest generates a "aws/request.Request" representing the +// client's request for the GetApi operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetApiMappings for more information on using the GetApiMappings +// See GetApi for more information on using the GetApi // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetApiMappingsRequest method. -// req, resp := client.GetApiMappingsRequest(params) +// // Example sending a request using the GetApiRequest method. +// req, resp := client.GetApiRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMappings -func (c *ApiGatewayV2) GetApiMappingsRequest(input *GetApiMappingsInput) (req *request.Request, output *GetApiMappingsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi +func (c *ApiGatewayV2) GetApiRequest(input *GetApiInput) (req *request.Request, output *GetApiOutput) { op := &request.Operation{ - Name: opGetApiMappings, + Name: opGetApi, HTTPMethod: "GET", - HTTPPath: "/v2/domainnames/{domainName}/apimappings", + HTTPPath: "/v2/apis/{apiId}", } if input == nil { - input = &GetApiMappingsInput{} + input = &GetApiInput{} } - output = &GetApiMappingsOutput{} + output = &GetApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApi API operation for AmazonApiGatewayV2. +// +// Gets an Api 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 AmazonApiGatewayV2's +// API operation GetApi for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi +func (c *ApiGatewayV2) GetApi(input *GetApiInput) (*GetApiOutput, error) { + req, out := c.GetApiRequest(input) + return out, req.Send() +} + +// GetApiWithContext is the same as GetApi with the addition of +// the ability to pass a context and additional request options. +// +// See GetApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetApiWithContext(ctx aws.Context, input *GetApiInput, opts ...request.Option) (*GetApiOutput, error) { + req, out := c.GetApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApiMapping = "GetApiMapping" + +// GetApiMappingRequest generates a "aws/request.Request" representing the +// client's request for the GetApiMapping operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApiMapping for more information on using the GetApiMapping +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApiMappingRequest method. +// req, resp := client.GetApiMappingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping +func (c *ApiGatewayV2) GetApiMappingRequest(input *GetApiMappingInput) (req *request.Request, output *GetApiMappingOutput) { + op := &request.Operation{ + Name: opGetApiMapping, + HTTPMethod: "GET", + HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", + } + + if input == nil { + input = &GetApiMappingInput{} + } + + output = &GetApiMappingOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApiMapping API operation for AmazonApiGatewayV2. +// +// Gets an API mapping. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetApiMapping for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// * BadRequestException +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping +func (c *ApiGatewayV2) GetApiMapping(input *GetApiMappingInput) (*GetApiMappingOutput, error) { + req, out := c.GetApiMappingRequest(input) + return out, req.Send() +} + +// GetApiMappingWithContext is the same as GetApiMapping with the addition of +// the ability to pass a context and additional request options. +// +// See GetApiMapping for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetApiMappingWithContext(ctx aws.Context, input *GetApiMappingInput, opts ...request.Option) (*GetApiMappingOutput, error) { + req, out := c.GetApiMappingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApiMappings = "GetApiMappings" + +// GetApiMappingsRequest generates a "aws/request.Request" representing the +// client's request for the GetApiMappings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApiMappings for more information on using the GetApiMappings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApiMappingsRequest method. +// req, resp := client.GetApiMappingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMappings +func (c *ApiGatewayV2) GetApiMappingsRequest(input *GetApiMappingsInput) (req *request.Request, output *GetApiMappingsOutput) { + op := &request.Operation{ + Name: opGetApiMappings, + HTTPMethod: "GET", + HTTPPath: "/v2/domainnames/{domainName}/apimappings", + } + + if input == nil { + input = &GetApiMappingsInput{} + } + + output = &GetApiMappingsOutput{} req = c.newRequest(op, input, output) return } @@ -4172,58 +4595,58 @@ func (c *ApiGatewayV2) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, return out, req.Send() } -const opImportApi = "ImportApi" +const opGetVpcLink = "GetVpcLink" -// ImportApiRequest generates a "aws/request.Request" representing the -// client's request for the ImportApi operation. The "output" return +// GetVpcLinkRequest generates a "aws/request.Request" representing the +// client's request for the GetVpcLink operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ImportApi for more information on using the ImportApi +// See GetVpcLink for more information on using the GetVpcLink // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ImportApiRequest method. -// req, resp := client.ImportApiRequest(params) +// // Example sending a request using the GetVpcLinkRequest method. +// req, resp := client.GetVpcLinkRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ImportApi -func (c *ApiGatewayV2) ImportApiRequest(input *ImportApiInput) (req *request.Request, output *ImportApiOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetVpcLink +func (c *ApiGatewayV2) GetVpcLinkRequest(input *GetVpcLinkInput) (req *request.Request, output *GetVpcLinkOutput) { op := &request.Operation{ - Name: opImportApi, - HTTPMethod: "PUT", - HTTPPath: "/v2/apis", + Name: opGetVpcLink, + HTTPMethod: "GET", + HTTPPath: "/v2/vpclinks/{vpcLinkId}", } if input == nil { - input = &ImportApiInput{} + input = &GetVpcLinkInput{} } - output = &ImportApiOutput{} + output = &GetVpcLinkOutput{} req = c.newRequest(op, input, output) return } -// ImportApi API operation for AmazonApiGatewayV2. +// GetVpcLink API operation for AmazonApiGatewayV2. // -// Imports an API. +// Gets a VPC link. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AmazonApiGatewayV2's -// API operation ImportApi for usage and error information. +// API operation GetVpcLink for usage and error information. // // Returned Error Types: // * NotFoundException @@ -4233,156 +4656,322 @@ func (c *ApiGatewayV2) ImportApiRequest(input *ImportApiInput) (req *request.Req // * TooManyRequestsException // A limit has been exceeded. See the accompanying error message for details. // -// * BadRequestException -// The request is not valid, for example, the input is incomplete or incorrect. -// See the accompanying error message for details. -// -// * ConflictException -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ImportApi -func (c *ApiGatewayV2) ImportApi(input *ImportApiInput) (*ImportApiOutput, error) { - req, out := c.ImportApiRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetVpcLink +func (c *ApiGatewayV2) GetVpcLink(input *GetVpcLinkInput) (*GetVpcLinkOutput, error) { + req, out := c.GetVpcLinkRequest(input) return out, req.Send() } -// ImportApiWithContext is the same as ImportApi with the addition of +// GetVpcLinkWithContext is the same as GetVpcLink with the addition of // the ability to pass a context and additional request options. // -// See ImportApi for details on how to use this API operation. +// See GetVpcLink for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ApiGatewayV2) ImportApiWithContext(ctx aws.Context, input *ImportApiInput, opts ...request.Option) (*ImportApiOutput, error) { - req, out := c.ImportApiRequest(input) +func (c *ApiGatewayV2) GetVpcLinkWithContext(ctx aws.Context, input *GetVpcLinkInput, opts ...request.Option) (*GetVpcLinkOutput, error) { + req, out := c.GetVpcLinkRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opReimportApi = "ReimportApi" +const opGetVpcLinks = "GetVpcLinks" -// ReimportApiRequest generates a "aws/request.Request" representing the -// client's request for the ReimportApi operation. The "output" return +// GetVpcLinksRequest generates a "aws/request.Request" representing the +// client's request for the GetVpcLinks operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ReimportApi for more information on using the ReimportApi +// See GetVpcLinks for more information on using the GetVpcLinks // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ReimportApiRequest method. -// req, resp := client.ReimportApiRequest(params) +// // Example sending a request using the GetVpcLinksRequest method. +// req, resp := client.GetVpcLinksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ReimportApi -func (c *ApiGatewayV2) ReimportApiRequest(input *ReimportApiInput) (req *request.Request, output *ReimportApiOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetVpcLinks +func (c *ApiGatewayV2) GetVpcLinksRequest(input *GetVpcLinksInput) (req *request.Request, output *GetVpcLinksOutput) { op := &request.Operation{ - Name: opReimportApi, - HTTPMethod: "PUT", - HTTPPath: "/v2/apis/{apiId}", + Name: opGetVpcLinks, + HTTPMethod: "GET", + HTTPPath: "/v2/vpclinks", } if input == nil { - input = &ReimportApiInput{} + input = &GetVpcLinksInput{} } - output = &ReimportApiOutput{} + output = &GetVpcLinksOutput{} req = c.newRequest(op, input, output) return } -// ReimportApi API operation for AmazonApiGatewayV2. +// GetVpcLinks API operation for AmazonApiGatewayV2. // -// Puts an Api resource. +// Gets a collection of VPC links. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AmazonApiGatewayV2's -// API operation ReimportApi for usage and error information. +// API operation GetVpcLinks for usage and error information. // // Returned Error Types: -// * NotFoundException -// The resource specified in the request was not found. See the message field -// for more information. -// -// * TooManyRequestsException -// A limit has been exceeded. See the accompanying error message for details. -// // * BadRequestException // The request is not valid, for example, the input is incomplete or incorrect. // See the accompanying error message for details. // -// * ConflictException -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. See the accompanying error message for details. +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ReimportApi -func (c *ApiGatewayV2) ReimportApi(input *ReimportApiInput) (*ReimportApiOutput, error) { - req, out := c.ReimportApiRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetVpcLinks +func (c *ApiGatewayV2) GetVpcLinks(input *GetVpcLinksInput) (*GetVpcLinksOutput, error) { + req, out := c.GetVpcLinksRequest(input) return out, req.Send() } -// ReimportApiWithContext is the same as ReimportApi with the addition of +// GetVpcLinksWithContext is the same as GetVpcLinks with the addition of // the ability to pass a context and additional request options. // -// See ReimportApi for details on how to use this API operation. +// See GetVpcLinks for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ApiGatewayV2) ReimportApiWithContext(ctx aws.Context, input *ReimportApiInput, opts ...request.Option) (*ReimportApiOutput, error) { - req, out := c.ReimportApiRequest(input) +func (c *ApiGatewayV2) GetVpcLinksWithContext(ctx aws.Context, input *GetVpcLinksInput, opts ...request.Option) (*GetVpcLinksOutput, error) { + req, out := c.GetVpcLinksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" +const opImportApi = "ImportApi" -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return +// ImportApiRequest generates a "aws/request.Request" representing the +// client's request for the ImportApi operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TagResource for more information on using the TagResource +// See ImportApi for more information on using the ImportApi // API call, and error handling. // // This method is useful when you want to 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 ImportApiRequest method. +// req, resp := client.ImportApiRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/TagResource -func (c *ApiGatewayV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ImportApi +func (c *ApiGatewayV2) ImportApiRequest(input *ImportApiInput) (req *request.Request, output *ImportApiOutput) { + op := &request.Operation{ + Name: opImportApi, + HTTPMethod: "PUT", + HTTPPath: "/v2/apis", + } + + if input == nil { + input = &ImportApiInput{} + } + + output = &ImportApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportApi API operation for AmazonApiGatewayV2. +// +// Imports an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation ImportApi for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// * BadRequestException +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ImportApi +func (c *ApiGatewayV2) ImportApi(input *ImportApiInput) (*ImportApiOutput, error) { + req, out := c.ImportApiRequest(input) + return out, req.Send() +} + +// ImportApiWithContext is the same as ImportApi with the addition of +// the ability to pass a context and additional request options. +// +// See ImportApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) ImportApiWithContext(ctx aws.Context, input *ImportApiInput, opts ...request.Option) (*ImportApiOutput, error) { + req, out := c.ImportApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opReimportApi = "ReimportApi" + +// ReimportApiRequest generates a "aws/request.Request" representing the +// client's request for the ReimportApi operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ReimportApi for more information on using the ReimportApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ReimportApiRequest method. +// req, resp := client.ReimportApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ReimportApi +func (c *ApiGatewayV2) ReimportApiRequest(input *ReimportApiInput) (req *request.Request, output *ReimportApiOutput) { + op := &request.Operation{ + Name: opReimportApi, + HTTPMethod: "PUT", + HTTPPath: "/v2/apis/{apiId}", + } + + if input == nil { + input = &ReimportApiInput{} + } + + output = &ReimportApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReimportApi API operation for AmazonApiGatewayV2. +// +// Puts an Api 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 AmazonApiGatewayV2's +// API operation ReimportApi for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// * BadRequestException +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/ReimportApi +func (c *ApiGatewayV2) ReimportApi(input *ReimportApiInput) (*ReimportApiOutput, error) { + req, out := c.ReimportApiRequest(input) + return out, req.Send() +} + +// ReimportApiWithContext is the same as ReimportApi with the addition of +// the ability to pass a context and additional request options. +// +// See ReimportApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) ReimportApiWithContext(ctx aws.Context, input *ReimportApiInput, opts ...request.Option) (*ReimportApiOutput, error) { + req, out := c.ReimportApiRequest(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 +// successfully. +// +// Use "Send" method on the 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/apigatewayv2-2018-11-29/TagResource +func (c *ApiGatewayV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ Name: opTagResource, HTTPMethod: "POST", @@ -5554,9 +6143,96 @@ func (c *ApiGatewayV2) UpdateStageWithContext(ctx aws.Context, input *UpdateStag return out, req.Send() } +const opUpdateVpcLink = "UpdateVpcLink" + +// UpdateVpcLinkRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVpcLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVpcLink for more information on using the UpdateVpcLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVpcLinkRequest method. +// req, resp := client.UpdateVpcLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateVpcLink +func (c *ApiGatewayV2) UpdateVpcLinkRequest(input *UpdateVpcLinkInput) (req *request.Request, output *UpdateVpcLinkOutput) { + op := &request.Operation{ + Name: opUpdateVpcLink, + HTTPMethod: "PATCH", + HTTPPath: "/v2/vpclinks/{vpcLinkId}", + } + + if input == nil { + input = &UpdateVpcLinkInput{} + } + + output = &UpdateVpcLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVpcLink API operation for AmazonApiGatewayV2. +// +// Updates a VPC link. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateVpcLink for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. See the message field +// for more information. +// +// * TooManyRequestsException +// A limit has been exceeded. See the accompanying error message for details. +// +// * BadRequestException +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateVpcLink +func (c *ApiGatewayV2) UpdateVpcLink(input *UpdateVpcLinkInput) (*UpdateVpcLinkOutput, error) { + req, out := c.UpdateVpcLinkRequest(input) + return out, req.Send() +} + +// UpdateVpcLinkWithContext is the same as UpdateVpcLink with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVpcLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateVpcLinkWithContext(ctx aws.Context, input *UpdateVpcLinkInput, opts ...request.Option) (*UpdateVpcLinkOutput, error) { + req, out := c.UpdateVpcLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5573,17 +6249,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5591,22 +6267,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Settings for logging access in a stage. @@ -5985,8 +6661,8 @@ func (s *Authorizer) SetName(v string) *Authorizer { // The request is not valid, for example, the input is incomplete or incorrect. // See the accompanying error message for details. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Describes the error encountered. Message_ *string `locationName:"message" type:"string"` @@ -6004,17 +6680,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6022,30 +6698,30 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation would cause a conflict with the current state of // a service resource associated with the request. Resolve the conflict before // retrying this request. See the accompanying error message for details. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Describes the error encountered. Message_ *string `locationName:"message" type:"string"` @@ -6063,17 +6739,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6081,22 +6757,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a CORS configuration. Supported only for HTTP APIs. See Configuring @@ -7160,8 +7836,13 @@ type CreateIntegrationInput struct { // for more information. TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - // An integer with a value between [50-29000]. + // An integer with a value between [50-30000]. TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` + + // The TLS configuration for a private integration. If you specify a TLS configuration, + // private integration traffic uses the HTTPS protocol. Supported only for HTTP + // APIs. + TlsConfig *TlsConfigInput `locationName:"tlsConfig" type:"structure"` } // String returns the string representation @@ -7286,6 +7967,12 @@ func (s *CreateIntegrationInput) SetTimeoutInMillis(v int64) *CreateIntegrationI return s } +// SetTlsConfig sets the TlsConfig field's value. +func (s *CreateIntegrationInput) SetTlsConfig(v *TlsConfigInput) *CreateIntegrationInput { + s.TlsConfig = v + return s +} + type CreateIntegrationOutput struct { _ struct{} `type:"structure"` @@ -7353,8 +8040,13 @@ type CreateIntegrationOutput struct { // for more information. TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - // An integer with a value between [50-29000]. + // An integer with a value between [50-30000]. TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` + + // The TLS configuration for a private integration. If you specify a TLS configuration, + // private integration traffic uses the HTTPS protocol. Supported only for HTTP + // APIs. + TlsConfig *TlsConfig `locationName:"tlsConfig" type:"structure"` } // String returns the string representation @@ -7469,6 +8161,12 @@ func (s *CreateIntegrationOutput) SetTimeoutInMillis(v int64) *CreateIntegration return s } +// SetTlsConfig sets the TlsConfig field's value. +func (s *CreateIntegrationOutput) SetTlsConfig(v *TlsConfig) *CreateIntegrationOutput { + s.TlsConfig = v + return s +} + type CreateIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -8560,6 +9258,238 @@ func (s *CreateStageOutput) SetTags(v map[string]*string) *CreateStageOutput { return s } +type CreateVpcLinkInput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-128]. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // A list of security group IDs for the VPC link. + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` + + // A list of subnet IDs to include in the VPC link. + // + // SubnetIds is a required field + SubnetIds []*string `locationName:"subnetIds" type:"list" required:"true"` + + // Represents a collection of tags associated with the resource. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateVpcLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpcLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcLinkInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *CreateVpcLinkInput) SetName(v string) *CreateVpcLinkInput { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateVpcLinkInput) SetSecurityGroupIds(v []*string) *CreateVpcLinkInput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateVpcLinkInput) SetSubnetIds(v []*string) *CreateVpcLinkInput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateVpcLinkInput) SetTags(v map[string]*string) *CreateVpcLinkInput { + s.Tags = v + return s +} + +type CreateVpcLinkOutput struct { + _ struct{} `type:"structure"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A list of security group IDs for the VPC link. + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` + + // A list of subnet IDs to include in the VPC link. + SubnetIds []*string `locationName:"subnetIds" type:"list"` + + // Represents a collection of tags associated with the resource. + Tags map[string]*string `locationName:"tags" type:"map"` + + // The identifier. + VpcLinkId *string `locationName:"vpcLinkId" type:"string"` + + // The status of the VPC link. + VpcLinkStatus *string `locationName:"vpcLinkStatus" type:"string" enum:"VpcLinkStatus"` + + // A string with a length between [0-1024]. + VpcLinkStatusMessage *string `locationName:"vpcLinkStatusMessage" type:"string"` + + // The version of the VPC link. + VpcLinkVersion *string `locationName:"vpcLinkVersion" type:"string" enum:"VpcLinkVersion"` +} + +// String returns the string representation +func (s CreateVpcLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcLinkOutput) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *CreateVpcLinkOutput) SetCreatedDate(v time.Time) *CreateVpcLinkOutput { + s.CreatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateVpcLinkOutput) SetName(v string) *CreateVpcLinkOutput { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateVpcLinkOutput) SetSecurityGroupIds(v []*string) *CreateVpcLinkOutput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateVpcLinkOutput) SetSubnetIds(v []*string) *CreateVpcLinkOutput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateVpcLinkOutput) SetTags(v map[string]*string) *CreateVpcLinkOutput { + s.Tags = v + return s +} + +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *CreateVpcLinkOutput) SetVpcLinkId(v string) *CreateVpcLinkOutput { + s.VpcLinkId = &v + return s +} + +// SetVpcLinkStatus sets the VpcLinkStatus field's value. +func (s *CreateVpcLinkOutput) SetVpcLinkStatus(v string) *CreateVpcLinkOutput { + s.VpcLinkStatus = &v + return s +} + +// SetVpcLinkStatusMessage sets the VpcLinkStatusMessage field's value. +func (s *CreateVpcLinkOutput) SetVpcLinkStatusMessage(v string) *CreateVpcLinkOutput { + s.VpcLinkStatusMessage = &v + return s +} + +// SetVpcLinkVersion sets the VpcLinkVersion field's value. +func (s *CreateVpcLinkOutput) SetVpcLinkVersion(v string) *CreateVpcLinkOutput { + s.VpcLinkVersion = &v + return s +} + +type DeleteAccessLogSettingsInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // StageName is a required field + StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAccessLogSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAccessLogSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAccessLogSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAccessLogSettingsInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteAccessLogSettingsInput) SetApiId(v string) *DeleteAccessLogSettingsInput { + s.ApiId = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *DeleteAccessLogSettingsInput) SetStageName(v string) *DeleteAccessLogSettingsInput { + s.StageName = &v + return s +} + +type DeleteAccessLogSettingsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAccessLogSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAccessLogSettingsOutput) GoString() string { + return s.String() +} + type DeleteApiInput struct { _ struct{} `type:"structure"` @@ -9210,6 +10140,89 @@ func (s DeleteRouteOutput) GoString() string { return s.String() } +type DeleteRouteRequestParameterInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // RequestParameterKey is a required field + RequestParameterKey *string `location:"uri" locationName:"requestParameterKey" type:"string" required:"true"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRouteRequestParameterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteRequestParameterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteRequestParameterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteRequestParameterInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RequestParameterKey == nil { + invalidParams.Add(request.NewErrParamRequired("RequestParameterKey")) + } + if s.RequestParameterKey != nil && len(*s.RequestParameterKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestParameterKey", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteRouteRequestParameterInput) SetApiId(v string) *DeleteRouteRequestParameterInput { + s.ApiId = &v + return s +} + +// SetRequestParameterKey sets the RequestParameterKey field's value. +func (s *DeleteRouteRequestParameterInput) SetRequestParameterKey(v string) *DeleteRouteRequestParameterInput { + s.RequestParameterKey = &v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *DeleteRouteRequestParameterInput) SetRouteId(v string) *DeleteRouteRequestParameterInput { + s.RouteId = &v + return s +} + +type DeleteRouteRequestParameterOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRouteRequestParameterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteRequestParameterOutput) GoString() string { + return s.String() +} + type DeleteRouteResponseInput struct { _ struct{} `type:"structure"` @@ -9299,12 +10312,6 @@ type DeleteRouteSettingsInput struct { // ApiId is a required field ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - // After evaluating a selection expression, the result is compared against one - // or more selection keys to find a matching key. See Selection Expressions - // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions) - // for a list of expressions and each expression's associated selection key - // type. - // // RouteKey is a required field RouteKey *string `location:"uri" locationName:"routeKey" type:"string" required:"true"` @@ -9382,40 +10389,99 @@ func (s DeleteRouteSettingsOutput) GoString() string { return s.String() } -type DeleteStageInput struct { +type DeleteStageInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // StageName is a required field + StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteStageInput) SetApiId(v string) *DeleteStageInput { + s.ApiId = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *DeleteStageInput) SetStageName(v string) *DeleteStageInput { + s.StageName = &v + return s +} + +type DeleteStageOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteStageOutput) GoString() string { + return s.String() +} + +type DeleteVpcLinkInput struct { _ struct{} `type:"structure"` - // ApiId is a required field - ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - - // StageName is a required field - StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` + // VpcLinkId is a required field + VpcLinkId *string `location:"uri" locationName:"vpcLinkId" type:"string" required:"true"` } // String returns the string representation -func (s DeleteStageInput) String() string { +func (s DeleteVpcLinkInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteStageInput) GoString() string { +func (s DeleteVpcLinkInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"} - if s.ApiId == nil { - invalidParams.Add(request.NewErrParamRequired("ApiId")) - } - if s.ApiId != nil && len(*s.ApiId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) +func (s *DeleteVpcLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcLinkInput"} + if s.VpcLinkId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) } if invalidParams.Len() > 0 { @@ -9424,29 +10490,23 @@ func (s *DeleteStageInput) Validate() error { return nil } -// SetApiId sets the ApiId field's value. -func (s *DeleteStageInput) SetApiId(v string) *DeleteStageInput { - s.ApiId = &v - return s -} - -// SetStageName sets the StageName field's value. -func (s *DeleteStageInput) SetStageName(v string) *DeleteStageInput { - s.StageName = &v +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *DeleteVpcLinkInput) SetVpcLinkId(v string) *DeleteVpcLinkInput { + s.VpcLinkId = &v return s } -type DeleteStageOutput struct { +type DeleteVpcLinkOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteStageOutput) String() string { +func (s DeleteVpcLinkOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteStageOutput) GoString() string { +func (s DeleteVpcLinkOutput) GoString() string { return s.String() } @@ -9677,6 +10737,121 @@ func (s *DomainNameConfiguration) SetSecurityPolicy(v string) *DomainNameConfigu return s } +type ExportApiInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + ExportVersion *string `location:"querystring" locationName:"exportVersion" type:"string"` + + IncludeExtensions *bool `location:"querystring" locationName:"includeExtensions" type:"boolean"` + + // OutputType is a required field + OutputType *string `location:"querystring" locationName:"outputType" type:"string" required:"true"` + + // Specification is a required field + Specification *string `location:"uri" locationName:"specification" type:"string" required:"true"` + + StageName *string `location:"querystring" locationName:"stageName" type:"string"` +} + +// String returns the string representation +func (s ExportApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.OutputType == nil { + invalidParams.Add(request.NewErrParamRequired("OutputType")) + } + if s.Specification == nil { + invalidParams.Add(request.NewErrParamRequired("Specification")) + } + if s.Specification != nil && len(*s.Specification) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Specification", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ExportApiInput) SetApiId(v string) *ExportApiInput { + s.ApiId = &v + return s +} + +// SetExportVersion sets the ExportVersion field's value. +func (s *ExportApiInput) SetExportVersion(v string) *ExportApiInput { + s.ExportVersion = &v + return s +} + +// SetIncludeExtensions sets the IncludeExtensions field's value. +func (s *ExportApiInput) SetIncludeExtensions(v bool) *ExportApiInput { + s.IncludeExtensions = &v + return s +} + +// SetOutputType sets the OutputType field's value. +func (s *ExportApiInput) SetOutputType(v string) *ExportApiInput { + s.OutputType = &v + return s +} + +// SetSpecification sets the Specification field's value. +func (s *ExportApiInput) SetSpecification(v string) *ExportApiInput { + s.Specification = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *ExportApiInput) SetStageName(v string) *ExportApiInput { + s.StageName = &v + return s +} + +type ExportApiOutput struct { + _ struct{} `type:"structure" payload:"Body"` + + // Represents an exported definition of an API in a particular output format, + // for example, YAML. The API is serialized to the requested specification, + // for example, OpenAPI 3.0. + Body []byte `locationName:"body" type:"blob"` +} + +// String returns the string representation +func (s ExportApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportApiOutput) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *ExportApiOutput) SetBody(v []byte) *ExportApiOutput { + s.Body = v + return s +} + type GetApiInput struct { _ struct{} `type:"structure"` @@ -10845,8 +12020,13 @@ type GetIntegrationOutput struct { // for more information. TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - // An integer with a value between [50-29000]. + // An integer with a value between [50-30000]. TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` + + // The TLS configuration for a private integration. If you specify a TLS configuration, + // private integration traffic uses the HTTPS protocol. Supported only for HTTP + // APIs. + TlsConfig *TlsConfig `locationName:"tlsConfig" type:"structure"` } // String returns the string representation @@ -10961,6 +12141,12 @@ func (s *GetIntegrationOutput) SetTimeoutInMillis(v int64) *GetIntegrationOutput return s } +// SetTlsConfig sets the TlsConfig field's value. +func (s *GetIntegrationOutput) SetTlsConfig(v *TlsConfig) *GetIntegrationOutput { + s.TlsConfig = v + return s +} + type GetIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -12388,59 +13574,252 @@ type GetTagsInput struct { } // String returns the string representation -func (s GetTagsInput) String() string { +func (s GetTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *GetTagsInput) SetResourceArn(v string) *GetTagsInput { + s.ResourceArn = &v + return s +} + +type GetTagsOutput struct { + _ struct{} `type:"structure"` + + // Represents a collection of tags associated with the resource. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s GetTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTagsOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { + s.Tags = v + return s +} + +type GetVpcLinkInput struct { + _ struct{} `type:"structure"` + + // VpcLinkId is a required field + VpcLinkId *string `location:"uri" locationName:"vpcLinkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetVpcLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVpcLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVpcLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVpcLinkInput"} + if s.VpcLinkId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) + } + if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *GetVpcLinkInput) SetVpcLinkId(v string) *GetVpcLinkInput { + s.VpcLinkId = &v + return s +} + +type GetVpcLinkOutput struct { + _ struct{} `type:"structure"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A list of security group IDs for the VPC link. + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` + + // A list of subnet IDs to include in the VPC link. + SubnetIds []*string `locationName:"subnetIds" type:"list"` + + // Represents a collection of tags associated with the resource. + Tags map[string]*string `locationName:"tags" type:"map"` + + // The identifier. + VpcLinkId *string `locationName:"vpcLinkId" type:"string"` + + // The status of the VPC link. + VpcLinkStatus *string `locationName:"vpcLinkStatus" type:"string" enum:"VpcLinkStatus"` + + // A string with a length between [0-1024]. + VpcLinkStatusMessage *string `locationName:"vpcLinkStatusMessage" type:"string"` + + // The version of the VPC link. + VpcLinkVersion *string `locationName:"vpcLinkVersion" type:"string" enum:"VpcLinkVersion"` +} + +// String returns the string representation +func (s GetVpcLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVpcLinkOutput) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetVpcLinkOutput) SetCreatedDate(v time.Time) *GetVpcLinkOutput { + s.CreatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetVpcLinkOutput) SetName(v string) *GetVpcLinkOutput { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *GetVpcLinkOutput) SetSecurityGroupIds(v []*string) *GetVpcLinkOutput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *GetVpcLinkOutput) SetSubnetIds(v []*string) *GetVpcLinkOutput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetVpcLinkOutput) SetTags(v map[string]*string) *GetVpcLinkOutput { + s.Tags = v + return s +} + +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *GetVpcLinkOutput) SetVpcLinkId(v string) *GetVpcLinkOutput { + s.VpcLinkId = &v + return s +} + +// SetVpcLinkStatus sets the VpcLinkStatus field's value. +func (s *GetVpcLinkOutput) SetVpcLinkStatus(v string) *GetVpcLinkOutput { + s.VpcLinkStatus = &v + return s +} + +// SetVpcLinkStatusMessage sets the VpcLinkStatusMessage field's value. +func (s *GetVpcLinkOutput) SetVpcLinkStatusMessage(v string) *GetVpcLinkOutput { + s.VpcLinkStatusMessage = &v + return s +} + +// SetVpcLinkVersion sets the VpcLinkVersion field's value. +func (s *GetVpcLinkOutput) SetVpcLinkVersion(v string) *GetVpcLinkOutput { + s.VpcLinkVersion = &v + return s +} + +type GetVpcLinksInput struct { + _ struct{} `type:"structure"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetVpcLinksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetTagsInput) GoString() string { +func (s GetVpcLinksInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMaxResults sets the MaxResults field's value. +func (s *GetVpcLinksInput) SetMaxResults(v string) *GetVpcLinksInput { + s.MaxResults = &v + return s } -// SetResourceArn sets the ResourceArn field's value. -func (s *GetTagsInput) SetResourceArn(v string) *GetTagsInput { - s.ResourceArn = &v +// SetNextToken sets the NextToken field's value. +func (s *GetVpcLinksInput) SetNextToken(v string) *GetVpcLinksInput { + s.NextToken = &v return s } -type GetTagsOutput struct { +type GetVpcLinksOutput struct { _ struct{} `type:"structure"` - // Represents a collection of tags associated with the resource. - // - // Tags is a required field - Tags map[string]*string `locationName:"tags" type:"map" required:"true"` + Items []*VpcLink `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s GetTagsOutput) String() string { +func (s GetVpcLinksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetTagsOutput) GoString() string { +func (s GetVpcLinksOutput) GoString() string { return s.String() } -// SetTags sets the Tags field's value. -func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { - s.Tags = v +// SetItems sets the Items field's value. +func (s *GetVpcLinksOutput) SetItems(v []*VpcLink) *GetVpcLinksOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetVpcLinksOutput) SetNextToken(v string) *GetVpcLinksOutput { + s.NextToken = &v return s } @@ -12646,12 +14025,14 @@ type Integration struct { // API Gateway. You can update a managed integration, but you can't delete it. ApiGatewayManaged *bool `locationName:"apiGatewayManaged" type:"boolean"` - // The connection ID. + // The ID of the VPC link for a private integration. Supported only for HTTP + // APIs. ConnectionId *string `locationName:"connectionId" type:"string"` - // The type of the network connection to the integration endpoint. Currently - // the only valid value is INTERNET, for connections through the public routable - // internet. + // The type of the network connection to the integration endpoint. Specify INTERNET + // for connections through the public routable internet or VPC_LINK for private + // connections between API Gateway and resources in a VPC. The default value + // is INTERNET. ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` // Supported only for WebSocket APIs. Specifies how to handle response payload @@ -12705,7 +14086,7 @@ type Integration struct { // This integration is also referred to as the HTTP custom integration. Supported // only for WebSocket APIs. // - // HTTP_PROXY: for integrating route or method request with an HTTP endpoint, + // HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, // with the client request passed through as-is. This is also referred to as // HTTP proxy integration. // @@ -12713,7 +14094,16 @@ type Integration struct { // endpoint without invoking any backend. Supported only for WebSocket APIs. IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` - // For a Lambda proxy integration, this is the URI of the Lambda function. + // For a Lambda integration, specify the URI of a Lambda function. + // + // For an HTTP integration, specify a fully-qualified URL. + // + // For an HTTP API private integration, specify the ARN of an Application Load + // Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. + // If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances + // to identify resources. You can use query parameters to target specific resources. + // To learn more, see DiscoverInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html). + // For private integrations, all resources must be owned by the same AWS account. IntegrationUri *string `locationName:"integrationUri" type:"string"` // Specifies the pass-through behavior for incoming requests based on the Content-Type @@ -12735,7 +14125,7 @@ type Integration struct { PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` // Specifies the format of the payload sent to an integration. Required for - // HTTP APIs. Currently, the only supported value is 1.0. + // HTTP APIs. PayloadFormatVersion *string `locationName:"payloadFormatVersion" type:"string"` // A key-value map specifying request parameters that are passed from the method @@ -12758,10 +14148,15 @@ type Integration struct { // WebSocket APIs. TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - // Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 - // milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 - // milliseconds, or 5 seconds for HTTP APIs. + // Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and + // between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is + // 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs. TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` + + // The TLS configuration for a private integration. If you specify a TLS configuration, + // private integration traffic uses the HTTPS protocol. Supported only for HTTP + // APIs. + TlsConfig *TlsConfig `locationName:"tlsConfig" type:"structure"` } // String returns the string representation @@ -12876,6 +14271,12 @@ func (s *Integration) SetTimeoutInMillis(v int64) *Integration { return s } +// SetTlsConfig sets the TlsConfig field's value. +func (s *Integration) SetTlsConfig(v *TlsConfig) *Integration { + s.TlsConfig = v + return s +} + // Represents an integration response. type IntegrationResponse struct { _ struct{} `type:"structure"` @@ -13075,8 +14476,8 @@ func (s *Model) SetSchema(v string) *Model { // The resource specified in the request was not found. See the message field // for more information. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Describes the error encountered. Message_ *string `locationName:"message" type:"string"` @@ -13097,17 +14498,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13115,22 +14516,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Validation constraints imposed on parameters of a request (path, query string, @@ -13596,10 +14997,10 @@ type RouteSettings struct { // for WebSocket APIs. LoggingLevel *string `locationName:"loggingLevel" type:"string" enum:"LoggingLevel"` - // Specifies the throttling burst limit. Supported only for WebSocket APIs. + // Specifies the throttling burst limit. ThrottlingBurstLimit *int64 `locationName:"throttlingBurstLimit" type:"integer"` - // Specifies the throttling rate limit. Supported only for WebSocket APIs. + // Specifies the throttling rate limit. ThrottlingRateLimit *float64 `locationName:"throttlingRateLimit" type:"double"` } @@ -13693,7 +15094,7 @@ type Stage struct { // A map that defines the stage variables for a stage resource. Variable names // can have alphanumeric and underscore characters, and the values must match - // [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs. + // [A-Za-z0-9-._~:/?#&=,]+. StageVariables map[string]*string `locationName:"stageVariables" type:"map"` // The collection of tags. Each tag element is associated with a given resource. @@ -13856,10 +15257,66 @@ func (s TagResourceOutput) GoString() string { return s.String() } +// The TLS configuration for a private integration. If you specify a TLS configuration, +// private integration traffic uses the HTTPS protocol. Supported only for HTTP +// APIs. +type TlsConfig struct { + _ struct{} `type:"structure"` + + // If you specify a server name, API Gateway uses it to verify the hostname + // on the integration's certificate. The server name is also included in the + // TLS handshake to support Server Name Indication (SNI) or virtual hosting. + ServerNameToVerify *string `locationName:"serverNameToVerify" type:"string"` +} + +// String returns the string representation +func (s TlsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TlsConfig) GoString() string { + return s.String() +} + +// SetServerNameToVerify sets the ServerNameToVerify field's value. +func (s *TlsConfig) SetServerNameToVerify(v string) *TlsConfig { + s.ServerNameToVerify = &v + return s +} + +// The TLS configuration for a private integration. If you specify a TLS configuration, +// private integration traffic uses the HTTPS protocol. Supported only for HTTP +// APIs. +type TlsConfigInput struct { + _ struct{} `type:"structure"` + + // If you specify a server name, API Gateway uses it to verify the hostname + // on the integration's certificate. The server name is also included in the + // TLS handshake to support Server Name Indication (SNI) or virtual hosting. + ServerNameToVerify *string `locationName:"serverNameToVerify" type:"string"` +} + +// String returns the string representation +func (s TlsConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TlsConfigInput) GoString() string { + return s.String() +} + +// SetServerNameToVerify sets the ServerNameToVerify field's value. +func (s *TlsConfigInput) SetServerNameToVerify(v string) *TlsConfigInput { + s.ServerNameToVerify = &v + return s +} + // A limit has been exceeded. See the accompanying error message for details. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` LimitType *string `locationName:"limitType" type:"string"` @@ -13878,17 +15335,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13896,22 +15353,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -14949,8 +16406,13 @@ type UpdateIntegrationInput struct { // for more information. TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - // An integer with a value between [50-29000]. + // An integer with a value between [50-30000]. TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` + + // The TLS configuration for a private integration. If you specify a TLS configuration, + // private integration traffic uses the HTTPS protocol. Supported only for HTTP + // APIs. + TlsConfig *TlsConfigInput `locationName:"tlsConfig" type:"structure"` } // String returns the string representation @@ -15084,6 +16546,12 @@ func (s *UpdateIntegrationInput) SetTimeoutInMillis(v int64) *UpdateIntegrationI return s } +// SetTlsConfig sets the TlsConfig field's value. +func (s *UpdateIntegrationInput) SetTlsConfig(v *TlsConfigInput) *UpdateIntegrationInput { + s.TlsConfig = v + return s +} + type UpdateIntegrationOutput struct { _ struct{} `type:"structure"` @@ -15151,8 +16619,13 @@ type UpdateIntegrationOutput struct { // for more information. TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` - // An integer with a value between [50-29000]. + // An integer with a value between [50-30000]. TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` + + // The TLS configuration for a private integration. If you specify a TLS configuration, + // private integration traffic uses the HTTPS protocol. Supported only for HTTP + // APIs. + TlsConfig *TlsConfig `locationName:"tlsConfig" type:"structure"` } // String returns the string representation @@ -15267,6 +16740,12 @@ func (s *UpdateIntegrationOutput) SetTimeoutInMillis(v int64) *UpdateIntegration return s } +// SetTlsConfig sets the TlsConfig field's value. +func (s *UpdateIntegrationOutput) SetTlsConfig(v *TlsConfig) *UpdateIntegrationOutput { + s.TlsConfig = v + return s +} + type UpdateIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -16385,6 +17864,252 @@ func (s *UpdateStageOutput) SetTags(v map[string]*string) *UpdateStageOutput { return s } +type UpdateVpcLinkInput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // VpcLinkId is a required field + VpcLinkId *string `location:"uri" locationName:"vpcLinkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVpcLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVpcLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVpcLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVpcLinkInput"} + if s.VpcLinkId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) + } + if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *UpdateVpcLinkInput) SetName(v string) *UpdateVpcLinkInput { + s.Name = &v + return s +} + +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *UpdateVpcLinkInput) SetVpcLinkId(v string) *UpdateVpcLinkInput { + s.VpcLinkId = &v + return s +} + +type UpdateVpcLinkOutput struct { + _ struct{} `type:"structure"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A list of security group IDs for the VPC link. + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` + + // A list of subnet IDs to include in the VPC link. + SubnetIds []*string `locationName:"subnetIds" type:"list"` + + // Represents a collection of tags associated with the resource. + Tags map[string]*string `locationName:"tags" type:"map"` + + // The identifier. + VpcLinkId *string `locationName:"vpcLinkId" type:"string"` + + // The status of the VPC link. + VpcLinkStatus *string `locationName:"vpcLinkStatus" type:"string" enum:"VpcLinkStatus"` + + // A string with a length between [0-1024]. + VpcLinkStatusMessage *string `locationName:"vpcLinkStatusMessage" type:"string"` + + // The version of the VPC link. + VpcLinkVersion *string `locationName:"vpcLinkVersion" type:"string" enum:"VpcLinkVersion"` +} + +// String returns the string representation +func (s UpdateVpcLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVpcLinkOutput) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *UpdateVpcLinkOutput) SetCreatedDate(v time.Time) *UpdateVpcLinkOutput { + s.CreatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateVpcLinkOutput) SetName(v string) *UpdateVpcLinkOutput { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *UpdateVpcLinkOutput) SetSecurityGroupIds(v []*string) *UpdateVpcLinkOutput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *UpdateVpcLinkOutput) SetSubnetIds(v []*string) *UpdateVpcLinkOutput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *UpdateVpcLinkOutput) SetTags(v map[string]*string) *UpdateVpcLinkOutput { + s.Tags = v + return s +} + +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *UpdateVpcLinkOutput) SetVpcLinkId(v string) *UpdateVpcLinkOutput { + s.VpcLinkId = &v + return s +} + +// SetVpcLinkStatus sets the VpcLinkStatus field's value. +func (s *UpdateVpcLinkOutput) SetVpcLinkStatus(v string) *UpdateVpcLinkOutput { + s.VpcLinkStatus = &v + return s +} + +// SetVpcLinkStatusMessage sets the VpcLinkStatusMessage field's value. +func (s *UpdateVpcLinkOutput) SetVpcLinkStatusMessage(v string) *UpdateVpcLinkOutput { + s.VpcLinkStatusMessage = &v + return s +} + +// SetVpcLinkVersion sets the VpcLinkVersion field's value. +func (s *UpdateVpcLinkOutput) SetVpcLinkVersion(v string) *UpdateVpcLinkOutput { + s.VpcLinkVersion = &v + return s +} + +// Represents a VPC link. +type VpcLink struct { + _ struct{} `type:"structure"` + + // The timestamp when the VPC link was created. + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // The name of the VPC link. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // A list of security group IDs for the VPC link. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list" required:"true"` + + // A list of subnet IDs to include in the VPC link. + // + // SubnetIds is a required field + SubnetIds []*string `locationName:"subnetIds" type:"list" required:"true"` + + // Tags for the VPC link. + Tags map[string]*string `locationName:"tags" type:"map"` + + // The ID of the VPC link. + // + // VpcLinkId is a required field + VpcLinkId *string `locationName:"vpcLinkId" type:"string" required:"true"` + + // The status of the VPC link. + VpcLinkStatus *string `locationName:"vpcLinkStatus" type:"string" enum:"VpcLinkStatus"` + + // A message summarizing the cause of the status of the VPC link. + VpcLinkStatusMessage *string `locationName:"vpcLinkStatusMessage" type:"string"` + + // The version of the VPC link. + VpcLinkVersion *string `locationName:"vpcLinkVersion" type:"string" enum:"VpcLinkVersion"` +} + +// String returns the string representation +func (s VpcLink) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcLink) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *VpcLink) SetCreatedDate(v time.Time) *VpcLink { + s.CreatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *VpcLink) SetName(v string) *VpcLink { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcLink) SetSecurityGroupIds(v []*string) *VpcLink { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcLink) SetSubnetIds(v []*string) *VpcLink { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *VpcLink) SetTags(v map[string]*string) *VpcLink { + s.Tags = v + return s +} + +// SetVpcLinkId sets the VpcLinkId field's value. +func (s *VpcLink) SetVpcLinkId(v string) *VpcLink { + s.VpcLinkId = &v + return s +} + +// SetVpcLinkStatus sets the VpcLinkStatus field's value. +func (s *VpcLink) SetVpcLinkStatus(v string) *VpcLink { + s.VpcLinkStatus = &v + return s +} + +// SetVpcLinkStatusMessage sets the VpcLinkStatusMessage field's value. +func (s *VpcLink) SetVpcLinkStatusMessage(v string) *VpcLink { + s.VpcLinkStatusMessage = &v + return s +} + +// SetVpcLinkVersion sets the VpcLinkVersion field's value. +func (s *VpcLink) SetVpcLinkVersion(v string) *VpcLink { + s.VpcLinkVersion = &v + return s +} + // The authorization type. For WebSocket APIs, valid values are NONE for open // access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda // authorizer. For HTTP APIs, valid values are NONE for open access, or JWT @@ -16492,8 +18217,8 @@ const ( // LoggingLevelInfo is a LoggingLevel enum value LoggingLevelInfo = "INFO" - // LoggingLevelFalse is a LoggingLevel enum value - LoggingLevelFalse = "false" + // LoggingLevelOff is a LoggingLevel enum value + LoggingLevelOff = "OFF" ) // Represents passthrough behavior for an integration response. Supported only @@ -16527,3 +18252,27 @@ const ( // SecurityPolicyTls12 is a SecurityPolicy enum value SecurityPolicyTls12 = "TLS_1_2" ) + +// The status of the VPC link. +const ( + // VpcLinkStatusPending is a VpcLinkStatus enum value + VpcLinkStatusPending = "PENDING" + + // VpcLinkStatusAvailable is a VpcLinkStatus enum value + VpcLinkStatusAvailable = "AVAILABLE" + + // VpcLinkStatusDeleting is a VpcLinkStatus enum value + VpcLinkStatusDeleting = "DELETING" + + // VpcLinkStatusFailed is a VpcLinkStatus enum value + VpcLinkStatusFailed = "FAILED" + + // VpcLinkStatusInactive is a VpcLinkStatus enum value + VpcLinkStatusInactive = "INACTIVE" +) + +// The version of the VPC link. +const ( + // VpcLinkVersionV2 is a VpcLinkVersion enum value + VpcLinkVersionV2 = "V2" +) 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 78ddc344345..3ff3af132a8 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 @@ -69,8 +69,6 @@ func (c *ApplicationAutoScaling) DeleteScalingPolicyRequest(input *DeleteScaling // and Delete a Target Tracking Scaling Policy (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html#delete-target-tracking-policy) // in the Application Auto Scaling User Guide. // -// To create a scaling policy or update an existing one, see PutScalingPolicy. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -263,12 +261,12 @@ func (c *ApplicationAutoScaling) DeregisterScalableTargetRequest(input *Deregist // DeregisterScalableTarget API operation for Application Auto Scaling. // -// Deregisters an Application Auto Scaling scalable target. -// -// Deregistering a scalable target deletes the scaling policies that are associated -// with it. +// Deregisters an Application Auto Scaling scalable target when you have finished +// using it. To see which resources have been registered, use DescribeScalableTargets +// (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_DescribeScalableTargets.html). // -// To create a scalable target or update an existing one, see RegisterScalableTarget. +// Deregistering a scalable target deletes the scaling policies and the scheduled +// actions that are associated with 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 @@ -372,10 +370,6 @@ func (c *ApplicationAutoScaling) DescribeScalableTargetsRequest(input *DescribeS // // You can filter the results using ResourceIds and ScalableDimension. // -// To create a scalable target or update an existing one, see RegisterScalableTarget. -// If you are no longer using a scalable target, you can deregister it using -// DeregisterScalableTarget. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -527,11 +521,6 @@ func (c *ApplicationAutoScaling) DescribeScalingActivitiesRequest(input *Describ // // You can filter the results using ResourceId and ScalableDimension. // -// Scaling activities are triggered by CloudWatch alarms that are associated -// with scaling policies. To view the scaling policies for a service namespace, -// see DescribeScalingPolicies. To create a scaling policy or update an existing -// one, see PutScalingPolicy. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -683,8 +672,9 @@ func (c *ApplicationAutoScaling) DescribeScalingPoliciesRequest(input *DescribeS // // You can filter the results using ResourceId, ScalableDimension, and PolicyNames. // -// To create a scaling policy or update an existing one, see PutScalingPolicy. -// If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy. +// For more information, see Target Tracking Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html) +// and Step Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html) +// in the Application Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -846,8 +836,8 @@ func (c *ApplicationAutoScaling) DescribeScheduledActionsRequest(input *Describe // You can filter the results using the ResourceId, ScalableDimension, and ScheduledActionNames // parameters. // -// To create a scheduled action or update an existing one, see PutScheduledAction. -// If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction. +// For more information, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) +// in the Application Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -989,19 +979,13 @@ func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicy // PutScalingPolicy API operation for Application Auto Scaling. // -// Creates or updates a policy for an Application Auto Scaling scalable target. +// Creates or updates a scaling policy for an Application Auto Scaling scalable +// target. // // Each scalable target is identified by a service namespace, resource ID, and // scalable dimension. A scaling policy applies to the scalable target identified // by those three attributes. You cannot create a scaling policy until you have -// registered the resource as a scalable target using RegisterScalableTarget. -// -// To update a policy, specify its policy name and the parameters that you want -// to change. Any parameters that you don't specify are not changed by this -// update request. -// -// You can view the scaling policies for a service namespace using DescribeScalingPolicies. -// If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy. +// registered the resource as a scalable target. // // Multiple scaling policies can be in force at the same time for the same scalable // target. You can have one or more target tracking scaling policies, one or @@ -1014,8 +998,21 @@ func (c *ApplicationAutoScaling) PutScalingPolicyRequest(input *PutScalingPolicy // uses the policy with the highest calculated capacity (200% of 10 = 20) and // scales out to 30. // -// Learn more about how to work with scaling policies in the Application Auto -// Scaling User Guide (https://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html). +// We recommend caution, however, when using target tracking scaling policies +// with step scaling policies because conflicts between these policies can cause +// undesirable behavior. For example, if the step scaling policy initiates a +// scale-in activity before the target tracking policy is ready to scale in, +// the scale-in activity will not be blocked. After the scale-in activity completes, +// the target tracking policy could instruct the scalable target to scale out +// again. +// +// For more information, see Target Tracking Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html) +// and Step Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html) +// in the Application Auto Scaling User Guide. +// +// If a scalable target is deregistered, the scalable target is no longer available +// to execute scaling policies. Any scaling policies that were specified for +// the scalable target are deleted. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1128,18 +1125,21 @@ func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledAc // Each scalable target is identified by a service namespace, resource ID, and // scalable dimension. A scheduled action applies to the scalable target identified // by those three attributes. You cannot create a scheduled action until you -// have registered the resource as a scalable target using RegisterScalableTarget. +// have registered the resource as a scalable target. // -// To update an action, specify its name and the parameters that you want to -// change. If you don't specify start and end times, the old values are deleted. -// Any other parameters that you don't specify are not changed by this update -// request. +// When start and end times are specified with a recurring schedule using a +// cron expression or rates, they form the boundaries of when the recurring +// action starts and stops. // -// You can view the scheduled actions using DescribeScheduledActions. If you -// are no longer using a scheduled action, you can delete it using DeleteScheduledAction. +// To update a scheduled action, specify the parameters that you want to change. +// If you don't specify start and end times, the old values are deleted. // -// Learn more about how to work with scheduled actions in the Application Auto -// Scaling User Guide (https://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html). +// For more information, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) +// in the Application Auto Scaling User Guide. +// +// If a scalable target is deregistered, the scalable target is no longer available +// to run scheduled actions. Any scheduled actions that were specified for the +// scalable target are deleted. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1238,26 +1238,28 @@ func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterSc // RegisterScalableTarget API operation for Application Auto Scaling. // -// Registers or updates a scalable target. A scalable target is a resource that -// Application Auto Scaling can scale out and scale in. Scalable targets are -// uniquely identified by the combination of resource ID, scalable dimension, -// and namespace. +// Registers or updates a scalable target. // -// When you register a new scalable target, you must specify values for minimum -// and maximum capacity. Application Auto Scaling will not scale capacity to -// values that are outside of this range. +// A scalable target is a resource that Application Auto Scaling can scale out +// and scale in. Scalable targets are uniquely identified by the combination +// of resource ID, scalable dimension, and namespace. // -// To update a scalable target, specify the parameter that you want to change -// as well as the following parameters that identify the scalable target: resource -// ID, scalable dimension, and namespace. Any parameters that you don't specify -// are not changed by this update request. +// When you register a new scalable target, you must specify values for minimum +// and maximum capacity. Application Auto Scaling scaling policies will not +// scale capacity to values that are outside of this range. // // After you register a scalable target, you do not need to register it again // to use other Application Auto Scaling operations. To see which resources -// have been registered, use DescribeScalableTargets. You can also view the -// scaling policies for a service namespace by using DescribeScalableTargets. +// have been registered, use DescribeScalableTargets (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_DescribeScalableTargets.html). +// You can also view the scaling policies for a service namespace by using DescribeScalableTargets +// (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_DescribeScalableTargets.html). +// If you no longer need a scalable target, you can deregister it by using DeregisterScalableTarget +// (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_DeregisterScalableTarget.html). // -// If you no longer need a scalable target, you can deregister it by using DeregisterScalableTarget. +// To update a scalable target, specify the parameters that you want to change. +// Include the parameters that identify the scalable target: resource ID, scalable +// dimension, and namespace. Any parameters that you don't specify are not changed +// by this update request. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1344,8 +1346,8 @@ func (s *Alarm) SetAlarmName(v string) *Alarm { // Concurrent updates caused an exception, for example, if you request an update // to an Application Auto Scaling resource that already has a pending update. type ConcurrentUpdateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1362,17 +1364,17 @@ func (s ConcurrentUpdateException) GoString() string { func newErrorConcurrentUpdateException(v protocol.ResponseMetadata) error { return &ConcurrentUpdateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentUpdateException) Code() string { +func (s *ConcurrentUpdateException) Code() string { return "ConcurrentUpdateException" } // Message returns the exception's message. -func (s ConcurrentUpdateException) Message() string { +func (s *ConcurrentUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1380,27 +1382,31 @@ func (s ConcurrentUpdateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentUpdateException) OrigErr() error { +func (s *ConcurrentUpdateException) OrigErr() error { return nil } -func (s ConcurrentUpdateException) Error() string { +func (s *ConcurrentUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentUpdateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentUpdateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentUpdateException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentUpdateException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a CloudWatch metric of your choosing for a target tracking scaling // policy to use with Application Auto Scaling. // +// For information about the available metrics for a service, see AWS Services +// That Publish CloudWatch Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) +// in the Amazon CloudWatch User Guide. +// // To create your customized metric specification: // // * Add values for each required parameter from CloudWatch. You can use @@ -1412,7 +1418,7 @@ func (s ConcurrentUpdateException) RequestID() string { // * Choose a metric that changes proportionally with capacity. The value // of the metric should increase or decrease in inverse proportion to the // number of capacity units. That is, the value of the metric should decrease -// when capacity increases. +// when capacity increases, and increase when capacity decreases. // // For more information about CloudWatch, see Amazon CloudWatch Concepts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html). type CustomizedMetricSpecification struct { @@ -1560,6 +1566,9 @@ type DeleteScalingPolicyInput struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1606,13 +1615,17 @@ type DeleteScalingPolicyInput struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -1737,6 +1750,9 @@ type DeleteScheduledActionInput struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1783,6 +1799,12 @@ type DeleteScheduledActionInput struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` @@ -1791,10 +1813,8 @@ type DeleteScheduledActionInput struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -1919,6 +1939,9 @@ type DeregisterScalableTargetInput struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1965,13 +1988,17 @@ type DeregisterScalableTargetInput struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -2096,6 +2123,9 @@ type DescribeScalableTargetsInput struct { // unique identifier is the function name with a function version or alias // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. + // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. ResourceIds []*string `type:"list"` // The scalable dimension associated with the scalable target. This string consists @@ -2141,12 +2171,16 @@ type DescribeScalableTargetsInput struct { // // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. + // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -2293,6 +2327,9 @@ type DescribeScalingActivitiesInput struct { // unique identifier is the function name with a function version or alias // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. + // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2338,12 +2375,16 @@ type DescribeScalingActivitiesInput struct { // // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. + // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -2496,6 +2537,9 @@ type DescribeScalingPoliciesInput struct { // unique identifier is the function name with a function version or alias // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. + // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2541,12 +2585,16 @@ type DescribeScalingPoliciesInput struct { // // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. + // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -2702,6 +2750,9 @@ type DescribeScheduledActionsInput struct { // unique identifier is the function name with a function version or alias // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. + // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2747,15 +2798,19 @@ type DescribeScheduledActionsInput struct { // // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. + // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The names of the scheduled actions to describe. ScheduledActionNames []*string `type:"list"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -2863,8 +2918,8 @@ func (s *DescribeScheduledActionsOutput) SetScheduledActions(v []*ScheduledActio // DescribeAlarms (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html) // on your behalf. type FailedResourceAccessException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2881,17 +2936,17 @@ func (s FailedResourceAccessException) GoString() string { func newErrorFailedResourceAccessException(v protocol.ResponseMetadata) error { return &FailedResourceAccessException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FailedResourceAccessException) Code() string { +func (s *FailedResourceAccessException) Code() string { return "FailedResourceAccessException" } // Message returns the exception's message. -func (s FailedResourceAccessException) Message() string { +func (s *FailedResourceAccessException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2899,28 +2954,28 @@ func (s FailedResourceAccessException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FailedResourceAccessException) OrigErr() error { +func (s *FailedResourceAccessException) OrigErr() error { return nil } -func (s FailedResourceAccessException) Error() string { +func (s *FailedResourceAccessException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FailedResourceAccessException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FailedResourceAccessException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FailedResourceAccessException) RequestID() string { - return s.respMetadata.RequestID +func (s *FailedResourceAccessException) RequestID() string { + return s.RespMetadata.RequestID } // The service encountered an internal error. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2937,17 +2992,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2955,28 +3010,28 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // The next token supplied was invalid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2993,17 +3048,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3011,29 +3066,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // A per-account resource limit is exceeded. For more information, see Application // Auto Scaling Limits (https://docs.aws.amazon.com/ApplicationAutoScaling/latest/userguide/application-auto-scaling-limits.html). type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3050,17 +3105,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3068,22 +3123,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the dimension names and values associated with a metric. @@ -3145,8 +3200,8 @@ func (s *MetricDimension) SetValue(v string) *MetricDimension { // does not exist. For any operation that deletes or deregisters a resource, // this exception is thrown if the resource cannot be found. type ObjectNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3163,17 +3218,17 @@ func (s ObjectNotFoundException) GoString() string { func newErrorObjectNotFoundException(v protocol.ResponseMetadata) error { return &ObjectNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ObjectNotFoundException) Code() string { +func (s *ObjectNotFoundException) Code() string { return "ObjectNotFoundException" } // Message returns the exception's message. -func (s ObjectNotFoundException) Message() string { +func (s *ObjectNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3181,26 +3236,32 @@ func (s ObjectNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ObjectNotFoundException) OrigErr() error { +func (s *ObjectNotFoundException) OrigErr() error { return nil } -func (s ObjectNotFoundException) Error() string { +func (s *ObjectNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ObjectNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ObjectNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ObjectNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ObjectNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a predefined metric for a target tracking scaling policy to use // with Application Auto Scaling. +// +// Only the AWS services that you're using send metrics to Amazon CloudWatch. +// To determine whether a desired metric already exists by looking up its namespace +// and dimension using the CloudWatch metrics dashboard in the console, follow +// the procedure in Building Dashboards with CloudWatch (https://docs.aws.amazon.com/autoscaling/application/userguide/monitoring-cloudwatch.html) +// in the Application Auto Scaling User Guide. type PredefinedMetricSpecification struct { _ struct{} `type:"structure"` @@ -3278,7 +3339,8 @@ type PutScalingPolicyInput struct { // // TargetTrackingScaling—Not supported for Amazon EMR // - // StepScaling—Not supported for DynamoDB, Amazon Comprehend, or AWS Lambda + // StepScaling—Not supported for DynamoDB, Amazon Comprehend, Lambda, or Amazon + // Keyspaces (for Apache Cassandra). // // For more information, see Target Tracking Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html) // and Step Scaling Policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html) @@ -3325,6 +3387,9 @@ type PutScalingPolicyInput struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3371,13 +3436,17 @@ type PutScalingPolicyInput struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -3523,7 +3592,7 @@ func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput type PutScheduledActionInput struct { _ struct{} `type:"structure"` - // The date and time for the scheduled action to end. + // The date and time for the recurring schedule to end. EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scheduled action. This @@ -3566,6 +3635,9 @@ type PutScheduledActionInput struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3612,11 +3684,17 @@ type PutScheduledActionInput struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` // The new minimum and maximum capacity. You can set both values or just one. - // During the scheduled time, if the current capacity is below the minimum capacity, + // At the scheduled time, if the current capacity is below the minimum capacity, // Application Auto Scaling scales out to the minimum capacity. If the current // capacity is above the maximum capacity, Application Auto Scaling scales in // to the maximum capacity. @@ -3630,29 +3708,31 @@ type PutScheduledActionInput struct { // // * Cron expressions - "cron(fields)" // - // At expressions are useful for one-time schedules. Specify the time, in UTC. + // At expressions are useful for one-time schedules. Specify the time in UTC. // // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // // For more information about cron expressions, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) // in the Amazon CloudWatch Events User Guide. + // + // For examples of using these expressions, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) + // in the Application Auto Scaling User Guide. Schedule *string `min:"1" type:"string"` - // The name of the scheduled action. + // The name of the scheduled action. This name must be unique among all other + // scheduled actions on the specified scalable target. // // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` - // The date and time for the scheduled action to start. + // The date and time for this scheduled action to start. StartTime *time.Time `type:"timestamp"` } @@ -3762,12 +3842,20 @@ func (s PutScheduledActionOutput) GoString() string { type RegisterScalableTargetInput struct { _ struct{} `type:"structure"` - // The maximum value to scale to in response to a scale-out event. MaxCapacity - // is required to register a scalable target. + // The maximum value that you plan to scale out to. When a scaling policy is + // in effect, Application Auto Scaling can scale out (expand) as needed to the + // maximum capacity limit in response to changing demand. + // + // This parameter is required if you are registering a scalable target. MaxCapacity *int64 `type:"integer"` - // The minimum value to scale to in response to a scale-in event. MinCapacity - // is required to register a scalable target. + // The minimum value that you plan to scale in to. When a scaling policy is + // in effect, Application Auto Scaling can scale in (contract) as needed to + // the minimum capacity limit in response to changing demand. + // + // This parameter is required if you are registering a scalable target. For + // Lambda provisioned concurrency, the minimum value allowed is 0. For all other + // resources, the minimum value allowed is 1. MinCapacity *int64 `type:"integer"` // The identifier of the resource that is associated with the scalable target. @@ -3810,16 +3898,19 @@ type RegisterScalableTargetInput struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` - // Application Auto Scaling creates a service-linked role that grants it permissions - // to modify the scalable target on your behalf. For more information, see Service-Linked - // Roles for Application Auto Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-service-linked-roles.html). + // This parameter is required for services that do not support service-linked + // roles (such as Amazon EMR), and it must specify the ARN of an IAM role that + // allows Application Auto Scaling to modify the scalable target on your behalf. // - // For Amazon EMR, this parameter is required, and it must specify the ARN of - // an IAM role that allows Application Auto Scaling to modify the scalable target - // on your behalf. + // If the service supports service-linked roles, Application Auto Scaling uses + // a service-linked role, which it creates if it does not yet exist. For more + // information, see Application Auto Scaling IAM Roles (https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles). RoleARN *string `min:"1" type:"string"` // The scalable dimension associated with the scalable target. This string consists @@ -3865,13 +3956,17 @@ type RegisterScalableTargetInput struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource. For a resource + // provided by your own application or service, use custom-resource instead. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -3997,12 +4092,12 @@ type ScalableTarget struct { // CreationTime is a required field CreationTime *time.Time `type:"timestamp" required:"true"` - // The maximum value to scale to in response to a scale-out event. + // The maximum value to scale to in response to a scale-out activity. // // MaxCapacity is a required field MaxCapacity *int64 `type:"integer" required:"true"` - // The minimum value to scale to in response to a scale-in event. + // The minimum value to scale to in response to a scale-in activity. // // MinCapacity is a required field MinCapacity *int64 `type:"integer" required:"true"` @@ -4047,6 +4142,9 @@ type ScalableTarget struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -4099,13 +4197,16 @@ type ScalableTarget struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource, or a custom-resource. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -4181,6 +4282,9 @@ type ScalableTargetAction struct { MaxCapacity *int64 `type:"integer"` // The minimum capacity. + // + // For Lambda provisioned concurrency, the minimum value allowed is 0. For all + // other resources, the minimum value allowed is 1. MinCapacity *int64 `type:"integer"` } @@ -4271,6 +4375,9 @@ type ScalingActivity struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -4317,13 +4424,16 @@ type ScalingActivity struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource, or a custom-resource. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -4485,6 +4595,9 @@ type ScalingPolicy struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -4531,13 +4644,16 @@ type ScalingPolicy struct { // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource, or a custom-resource. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -4671,6 +4787,9 @@ type ScheduledAction struct { // name suffix that is not $LATEST. Example: function:my-function:prod or // function:my-function:1. // + // * Amazon Keyspaces table - The resource type is table and the unique identifier + // is the table name. Example: keyspace/mykeyspace/table/mytable. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -4716,10 +4835,16 @@ type ScheduledAction struct { // // * lambda:function:ProvisionedConcurrency - The provisioned concurrency // for a Lambda function. + // + // * cassandra:table:ReadCapacityUnits - The provisioned read capacity for + // an Amazon Keyspaces table. + // + // * cassandra:table:WriteCapacityUnits - The provisioned write capacity + // for an Amazon Keyspaces table. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The new minimum and maximum capacity. You can set both values or just one. - // During the scheduled time, if the current capacity is below the minimum capacity, + // At the scheduled time, if the current capacity is below the minimum capacity, // Application Auto Scaling scales out to the minimum capacity. If the current // capacity is above the maximum capacity, Application Auto Scaling scales in // to the maximum capacity. @@ -4733,7 +4858,7 @@ type ScheduledAction struct { // // * Cron expressions - "cron(fields)" // - // At expressions are useful for one-time schedules. Specify the time, in UTC. + // At expressions are useful for one-time schedules. Specify the time in UTC. // // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. @@ -4741,6 +4866,9 @@ type ScheduledAction struct { // For more information about cron expressions, see Cron Expressions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) // in the Amazon CloudWatch Events User Guide. // + // For examples of using these expressions, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html) + // in the Application Auto Scaling User Guide. + // // Schedule is a required field Schedule *string `min:"1" type:"string" required:"true"` @@ -4754,10 +4882,7 @@ type ScheduledAction struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service that provides the resource or custom-resource - // for a resource provided by your own application or service. For more information, - // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the AWS service that provides the resource, or a custom-resource. // // ServiceNamespace is a required field ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` @@ -4836,9 +4961,10 @@ func (s *ScheduledAction) SetStartTime(v time.Time) *ScheduledAction { return s } -// Represents a step adjustment for a StepScalingPolicyConfiguration. Describes -// an adjustment based on the difference between the value of the aggregated -// CloudWatch metric and the breach threshold that you've defined for the alarm. +// Represents a step adjustment for a StepScalingPolicyConfiguration (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html). +// Describes an adjustment based on the difference between the value of the +// aggregated CloudWatch metric and the breach threshold that you've defined +// for the alarm. // // For the following examples, suppose that you have an alarm with a breach // threshold of 50: @@ -4885,8 +5011,8 @@ type StepAdjustment struct { MetricIntervalUpperBound *float64 `type:"double"` // The amount by which to scale, based on the specified adjustment type. A positive - // value adds to the current scalable dimension while a negative number removes - // from the current scalable dimension. + // value adds to the current capacity while a negative number removes from the + // current capacity. // // ScalingAdjustment is a required field ScalingAdjustment *int64 `type:"integer" required:"true"` @@ -4938,31 +5064,62 @@ func (s *StepAdjustment) SetScalingAdjustment(v int64) *StepAdjustment { type StepScalingPolicyConfiguration struct { _ struct{} `type:"structure"` - // Specifies whether the ScalingAdjustment value in a StepAdjustment is an absolute - // number or a percentage of the current capacity. + // Specifies whether the ScalingAdjustment value in a StepAdjustment (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepAdjustment.html) + // is an absolute number or a percentage of the current capacity. + // + // AdjustmentType is required if you are adding a new step scaling policy configuration. AdjustmentType *string `type:"string" enum:"AdjustmentType"` - // The amount of time, in seconds, after a scaling activity completes where - // previous trigger-related scaling activities can influence future scaling - // events. - // - // For scale-out policies, while the cooldown period is in effect, the capacity - // that has been added by the previous scale-out event that initiated the cooldown - // is calculated as part of the desired capacity for the next scale out. The - // intention is to continuously (but not excessively) scale out. For example, - // an alarm triggers a step scaling policy to scale out an Amazon ECS service - // by 2 tasks, the scaling activity completes successfully, and a cooldown period - // of 5 minutes starts. During the cooldown period, if the alarm triggers the - // same policy again but at a more aggressive step adjustment to scale out the - // service by 3 tasks, the 2 tasks that were added in the previous scale-out - // event are considered part of that capacity and only 1 additional task is - // added to the desired count. - // - // For scale-in policies, the cooldown period is used to block subsequent scale-in - // requests until it has expired. The intention is to scale in conservatively - // to protect your application's availability. However, if another alarm triggers - // a scale-out policy during the cooldown period after a scale-in, Application - // Auto Scaling scales out your scalable target immediately. + // The amount of time, in seconds, to wait for a previous scaling activity to + // take effect. + // + // With scale-out policies, the intention is to continuously (but not excessively) + // scale out. After Application Auto Scaling successfully scales out using a + // step scaling policy, it starts to calculate the cooldown time. While the + // cooldown period is in effect, capacity added by the initiating scale-out + // activity is calculated as part of the desired capacity for the next scale-out + // activity. For example, when an alarm triggers a step scaling policy to increase + // the capacity by 2, the scaling activity completes successfully, and a cooldown + // period starts. If the alarm triggers again during the cooldown period but + // at a more aggressive step adjustment of 3, the previous increase of 2 is + // considered part of the current capacity. Therefore, only 1 is added to the + // capacity. + // + // With scale-in policies, the intention is to scale in conservatively to protect + // your application’s availability, so scale-in activities are blocked until + // the cooldown period has expired. However, if another alarm triggers a scale-out + // activity during the cooldown period after a scale-in activity, Application + // Auto Scaling scales out the target immediately. In this case, the cooldown + // period for the scale-in activity stops and doesn't complete. + // + // Application Auto Scaling provides a default value of 300 for the following + // scalable targets: + // + // * ECS services + // + // * Spot Fleet requests + // + // * EMR clusters + // + // * AppStream 2.0 fleets + // + // * Aurora DB clusters + // + // * Amazon SageMaker endpoint variants + // + // * Custom resources + // + // For all other scalable targets, the default value is 0: + // + // * DynamoDB tables + // + // * DynamoDB global secondary indexes + // + // * Amazon Comprehend document classification endpoints + // + // * Lambda provisioned concurrency + // + // * Amazon Keyspaces tables Cooldown *int64 `type:"integer"` // The aggregation type for the CloudWatch metrics. Valid values are Minimum, @@ -4970,19 +5127,21 @@ type StepScalingPolicyConfiguration struct { // as Average. MetricAggregationType *string `type:"string" enum:"MetricAggregationType"` - // The minimum number to adjust your scalable dimension as a result of a scaling - // activity. If the adjustment type is PercentChangeInCapacity, the scaling - // policy changes the scalable dimension of the scalable target by this amount. + // The minimum value to scale by when scaling by percentages. For example, suppose + // that you create a step scaling policy to scale out an Amazon ECS service + // by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the service + // has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, + // because you specified a MinAdjustmentMagnitude of 2, Application Auto Scaling + // scales out the service by 2 tasks. // - // For example, suppose that you create a step scaling policy to scale out an - // Amazon ECS service by 25 percent and you specify a MinAdjustmentMagnitude - // of 2. If the service has 4 tasks and the scaling policy is performed, 25 - // percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude - // of 2, Application Auto Scaling scales out the service by 2 tasks. + // Valid only if the adjustment type is PercentChangeInCapacity. MinAdjustmentMagnitude *int64 `type:"integer"` // A set of adjustments that enable you to scale based on the size of the alarm // breach. + // + // At least one step adjustment is required if you are adding a new step scaling + // policy configuration. StepAdjustments []*StepAdjustment `type:"list"` } @@ -5106,9 +5265,9 @@ type TargetTrackingScalingPolicyConfiguration struct { // Indicates whether scale in by the target tracking scaling policy is disabled. // If the value is true, scale in is disabled and the target tracking scaling - // policy won't remove capacity from the scalable resource. Otherwise, scale - // in is enabled and the target tracking scaling policy can remove capacity - // from the scalable resource. The default value is false. + // policy won't remove capacity from the scalable target. Otherwise, scale in + // is enabled and the target tracking scaling policy can remove capacity from + // the scalable target. The default value is false. DisableScaleIn *bool `type:"boolean"` // A predefined metric. You can specify either a predefined metric or a customized @@ -5116,22 +5275,83 @@ type TargetTrackingScalingPolicyConfiguration struct { PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"` // The amount of time, in seconds, after a scale-in activity completes before - // another scale in activity can start. + // another scale-in activity can start. + // + // With the scale-in cooldown period, the intention is to scale in conservatively + // to protect your application’s availability, so scale-in activities are + // blocked until the cooldown period has expired. However, if another alarm + // triggers a scale-out activity during the scale-in cooldown period, Application + // Auto Scaling scales out the target immediately. In this case, the scale-in + // cooldown period stops and doesn't complete. + // + // Application Auto Scaling provides a default value of 300 for the following + // scalable targets: + // + // * ECS services // - // The cooldown period is used to block subsequent scale-in requests until it - // has expired. The intention is to scale in conservatively to protect your - // application's availability. However, if another alarm triggers a scale-out - // policy during the cooldown period after a scale-in, Application Auto Scaling - // scales out your scalable target immediately. + // * Spot Fleet requests + // + // * EMR clusters + // + // * AppStream 2.0 fleets + // + // * Aurora DB clusters + // + // * Amazon SageMaker endpoint variants + // + // * Custom resources + // + // For all other scalable targets, the default value is 0: + // + // * DynamoDB tables + // + // * DynamoDB global secondary indexes + // + // * Amazon Comprehend document classification endpoints + // + // * Lambda provisioned concurrency + // + // * Amazon Keyspaces tables ScaleInCooldown *int64 `type:"integer"` - // The amount of time, in seconds, after a scale-out activity completes before - // another scale-out activity can start. + // The amount of time, in seconds, to wait for a previous scale-out activity + // to take effect. + // + // With the scale-out cooldown period, the intention is to continuously (but + // not excessively) scale out. After Application Auto Scaling successfully scales + // out using a target tracking scaling policy, it starts to calculate the cooldown + // time. While the scale-out cooldown period is in effect, the capacity added + // by the initiating scale-out activity is calculated as part of the desired + // capacity for the next scale-out activity. + // + // Application Auto Scaling provides a default value of 300 for the following + // scalable targets: + // + // * ECS services + // + // * Spot Fleet requests // - // While the cooldown period is in effect, the capacity that has been added - // by the previous scale-out event that initiated the cooldown is calculated - // as part of the desired capacity for the next scale out. The intention is - // to continuously (but not excessively) scale out. + // * EMR clusters + // + // * AppStream 2.0 fleets + // + // * Aurora DB clusters + // + // * Amazon SageMaker endpoint variants + // + // * Custom resources + // + // For all other scalable targets, the default value is 0: + // + // * DynamoDB tables + // + // * DynamoDB global secondary indexes + // + // * Amazon Comprehend document classification endpoints + // + // * Lambda provisioned concurrency + // + // * Amazon Keyspaces tables ScaleOutCooldown *int64 `type:"integer"` // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 @@ -5213,8 +5433,8 @@ func (s *TargetTrackingScalingPolicyConfiguration) SetTargetValue(v float64) *Ta // An exception was thrown for a validation issue. Review the available parameters // for the API request. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5231,17 +5451,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5249,22 +5469,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } const ( @@ -5348,6 +5568,12 @@ const ( // MetricTypeLambdaProvisionedConcurrencyUtilization is a MetricType enum value MetricTypeLambdaProvisionedConcurrencyUtilization = "LambdaProvisionedConcurrencyUtilization" + + // MetricTypeCassandraReadCapacityUtilization is a MetricType enum value + MetricTypeCassandraReadCapacityUtilization = "CassandraReadCapacityUtilization" + + // MetricTypeCassandraWriteCapacityUtilization is a MetricType enum value + MetricTypeCassandraWriteCapacityUtilization = "CassandraWriteCapacityUtilization" ) const ( @@ -5397,6 +5623,12 @@ const ( // ScalableDimensionLambdaFunctionProvisionedConcurrency is a ScalableDimension enum value ScalableDimensionLambdaFunctionProvisionedConcurrency = "lambda:function:ProvisionedConcurrency" + + // ScalableDimensionCassandraTableReadCapacityUnits is a ScalableDimension enum value + ScalableDimensionCassandraTableReadCapacityUnits = "cassandra:table:ReadCapacityUnits" + + // ScalableDimensionCassandraTableWriteCapacityUnits is a ScalableDimension enum value + ScalableDimensionCassandraTableWriteCapacityUnits = "cassandra:table:WriteCapacityUnits" ) const ( @@ -5449,4 +5681,7 @@ const ( // ServiceNamespaceLambda is a ServiceNamespace enum value ServiceNamespaceLambda = "lambda" + + // ServiceNamespaceCassandra is a ServiceNamespace enum value + ServiceNamespaceCassandra = "cassandra" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go index 4a1a89ee70a..8bc83b04ef5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go @@ -26,6 +26,8 @@ // // * AWS Lambda function provisioned concurrency // +// * Amazon Keyspaces (for Apache Cassandra) tables +// // API Summary // // The Application Auto Scaling service API includes three key sets of actions: @@ -41,10 +43,11 @@ // activity history. // // * Suspend and resume scaling - Temporarily suspend and later resume automatic -// scaling by calling the RegisterScalableTarget action for any Application -// Auto Scaling scalable target. You can suspend and resume, individually -// or in combination, scale-out activities triggered by a scaling policy, -// scale-in activities triggered by a scaling policy, and scheduled scaling. +// scaling by calling the RegisterScalableTarget (https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html) +// API action for any Application Auto Scaling scalable target. You can suspend +// and resume (individually or in combination) scale-out activities that +// are triggered by a scaling policy, scale-in activities that are triggered +// by a scaling policy, and scheduled scaling. // // To learn more about Application Auto Scaling, including information about // granting IAM users required permissions for Application Auto Scaling actions, diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationinsights/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationinsights/api.go index 94be2102e16..ba09f52950e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationinsights/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationinsights/api.go @@ -2764,6 +2764,11 @@ func (s *ApplicationComponent) SetTier(v string) *ApplicationComponent { type ApplicationInfo struct { _ struct{} `type:"structure"` + // Indicates whether Application Insights can listen to CloudWatch events for + // the application resources, such as instance terminated, failed deployment, + // and others. + CWEMonitorEnabled *bool `type:"boolean"` + // The lifecycle of the application. LifeCycle *string `type:"string"` @@ -2797,6 +2802,12 @@ func (s ApplicationInfo) GoString() string { return s.String() } +// SetCWEMonitorEnabled sets the CWEMonitorEnabled field's value. +func (s *ApplicationInfo) SetCWEMonitorEnabled(v bool) *ApplicationInfo { + s.CWEMonitorEnabled = &v + return s +} + // SetLifeCycle sets the LifeCycle field's value. func (s *ApplicationInfo) SetLifeCycle(v string) *ApplicationInfo { s.LifeCycle = &v @@ -2829,8 +2840,8 @@ func (s *ApplicationInfo) SetResourceGroupName(v string) *ApplicationInfo { // The request is not understood by the server. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2847,17 +2858,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2865,22 +2876,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The event information. @@ -2957,6 +2968,11 @@ func (s *ConfigurationEvent) SetMonitoredResourceARN(v string) *ConfigurationEve type CreateApplicationInput struct { _ struct{} `type:"structure"` + // Indicates whether Application Insights can listen to CloudWatch events for + // the application resources, such as instance terminated, failed deployment, + // and others. + CWEMonitorEnabled *bool `type:"boolean"` + // When set to true, creates opsItems for any problems detected on an application. OpsCenterEnabled *bool `type:"boolean"` @@ -3014,6 +3030,12 @@ func (s *CreateApplicationInput) Validate() error { return nil } +// SetCWEMonitorEnabled sets the CWEMonitorEnabled field's value. +func (s *CreateApplicationInput) SetCWEMonitorEnabled(v bool) *CreateApplicationInput { + s.CWEMonitorEnabled = &v + return s +} + // SetOpsCenterEnabled sets the OpsCenterEnabled field's value. func (s *CreateApplicationInput) SetOpsCenterEnabled(v bool) *CreateApplicationInput { s.OpsCenterEnabled = &v @@ -4143,8 +4165,8 @@ func (s *DescribeProblemOutput) SetProblem(v *Problem) *DescribeProblemOutput { // The server encountered an internal error and is unable to complete the request. type InternalServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4161,17 +4183,17 @@ func (s InternalServerException) GoString() string { func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerException) Code() string { +func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. -func (s InternalServerException) Message() string { +func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4179,22 +4201,22 @@ func (s InternalServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerException) OrigErr() error { +func (s *InternalServerException) OrigErr() error { return nil } -func (s InternalServerException) Error() string { +func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID } type ListApplicationsInput struct { @@ -4960,9 +4982,55 @@ func (s *LogPattern) SetRank(v int64) *LogPattern { type Observation struct { _ struct{} `type:"structure"` + // The detail type of the CloudWatch Event-based observation, for example, EC2 + // Instance State-change Notification. + CloudWatchEventDetailType *string `type:"string"` + + // The ID of the CloudWatch Event-based observation related to the detected + // problem. + CloudWatchEventId *string `type:"string"` + + // The source of the CloudWatch Event. + CloudWatchEventSource *string `type:"string" enum:"CloudWatchEventSource"` + + // The CodeDeploy application to which the deployment belongs. + CodeDeployApplication *string `type:"string"` + + // The deployment group to which the CodeDeploy deployment belongs. + CodeDeployDeploymentGroup *string `type:"string"` + + // The deployment ID of the CodeDeploy-based observation related to the detected + // problem. + CodeDeployDeploymentId *string `type:"string"` + + // The instance group to which the CodeDeploy instance belongs. + CodeDeployInstanceGroupId *string `type:"string"` + + // The status of the CodeDeploy deployment, for example SUCCESS or FAILURE. + CodeDeployState *string `type:"string"` + + // The state of the instance, such as STOPPING or TERMINATING. + Ec2State *string `type:"string"` + // The time when the observation ended, in epoch seconds. EndTime *time.Time `type:"timestamp"` + // The Amazon Resource Name (ARN) of the AWS Health Event-based observation. + HealthEventArn *string `type:"string"` + + // The description of the AWS Health event provided by the service, such as + // Amazon EC2. + HealthEventDescription *string `type:"string"` + + // The category of the AWS Health event, such as issue. + HealthEventTypeCategory *string `type:"string"` + + // The type of the AWS Health event, for example, AWS_EC2_POWER_CONNECTIVITY_ISSUE. + HealthEventTypeCode *string `type:"string"` + + // The service to which the AWS Health Event belongs, such as EC2. + HealthService *string `type:"string"` + // The ID of the observation type. Id *string `min:"38" type:"string"` @@ -4999,6 +5067,27 @@ type Observation struct { // The value of the source observation metric. Value *float64 `type:"double"` + + // The X-Ray request error percentage for this node. + XRayErrorPercent *int64 `type:"integer"` + + // The X-Ray request fault percentage for this node. + XRayFaultPercent *int64 `type:"integer"` + + // The name of the X-Ray node. + XRayNodeName *string `type:"string"` + + // The type of the X-Ray node. + XRayNodeType *string `type:"string"` + + // The X-Ray node request average latency for this node. + XRayRequestAverageLatency *int64 `type:"long"` + + // The X-Ray request count for this node. + XRayRequestCount *int64 `type:"integer"` + + // The X-Ray request throttle percentage for this node. + XRayThrottlePercent *int64 `type:"integer"` } // String returns the string representation @@ -5011,12 +5100,96 @@ func (s Observation) GoString() string { return s.String() } +// SetCloudWatchEventDetailType sets the CloudWatchEventDetailType field's value. +func (s *Observation) SetCloudWatchEventDetailType(v string) *Observation { + s.CloudWatchEventDetailType = &v + return s +} + +// SetCloudWatchEventId sets the CloudWatchEventId field's value. +func (s *Observation) SetCloudWatchEventId(v string) *Observation { + s.CloudWatchEventId = &v + return s +} + +// SetCloudWatchEventSource sets the CloudWatchEventSource field's value. +func (s *Observation) SetCloudWatchEventSource(v string) *Observation { + s.CloudWatchEventSource = &v + return s +} + +// SetCodeDeployApplication sets the CodeDeployApplication field's value. +func (s *Observation) SetCodeDeployApplication(v string) *Observation { + s.CodeDeployApplication = &v + return s +} + +// SetCodeDeployDeploymentGroup sets the CodeDeployDeploymentGroup field's value. +func (s *Observation) SetCodeDeployDeploymentGroup(v string) *Observation { + s.CodeDeployDeploymentGroup = &v + return s +} + +// SetCodeDeployDeploymentId sets the CodeDeployDeploymentId field's value. +func (s *Observation) SetCodeDeployDeploymentId(v string) *Observation { + s.CodeDeployDeploymentId = &v + return s +} + +// SetCodeDeployInstanceGroupId sets the CodeDeployInstanceGroupId field's value. +func (s *Observation) SetCodeDeployInstanceGroupId(v string) *Observation { + s.CodeDeployInstanceGroupId = &v + return s +} + +// SetCodeDeployState sets the CodeDeployState field's value. +func (s *Observation) SetCodeDeployState(v string) *Observation { + s.CodeDeployState = &v + return s +} + +// SetEc2State sets the Ec2State field's value. +func (s *Observation) SetEc2State(v string) *Observation { + s.Ec2State = &v + return s +} + // SetEndTime sets the EndTime field's value. func (s *Observation) SetEndTime(v time.Time) *Observation { s.EndTime = &v return s } +// SetHealthEventArn sets the HealthEventArn field's value. +func (s *Observation) SetHealthEventArn(v string) *Observation { + s.HealthEventArn = &v + return s +} + +// SetHealthEventDescription sets the HealthEventDescription field's value. +func (s *Observation) SetHealthEventDescription(v string) *Observation { + s.HealthEventDescription = &v + return s +} + +// SetHealthEventTypeCategory sets the HealthEventTypeCategory field's value. +func (s *Observation) SetHealthEventTypeCategory(v string) *Observation { + s.HealthEventTypeCategory = &v + return s +} + +// SetHealthEventTypeCode sets the HealthEventTypeCode field's value. +func (s *Observation) SetHealthEventTypeCode(v string) *Observation { + s.HealthEventTypeCode = &v + return s +} + +// SetHealthService sets the HealthService field's value. +func (s *Observation) SetHealthService(v string) *Observation { + s.HealthService = &v + return s +} + // SetId sets the Id field's value. func (s *Observation) SetId(v string) *Observation { s.Id = &v @@ -5089,6 +5262,48 @@ func (s *Observation) SetValue(v float64) *Observation { return s } +// SetXRayErrorPercent sets the XRayErrorPercent field's value. +func (s *Observation) SetXRayErrorPercent(v int64) *Observation { + s.XRayErrorPercent = &v + return s +} + +// SetXRayFaultPercent sets the XRayFaultPercent field's value. +func (s *Observation) SetXRayFaultPercent(v int64) *Observation { + s.XRayFaultPercent = &v + return s +} + +// SetXRayNodeName sets the XRayNodeName field's value. +func (s *Observation) SetXRayNodeName(v string) *Observation { + s.XRayNodeName = &v + return s +} + +// SetXRayNodeType sets the XRayNodeType field's value. +func (s *Observation) SetXRayNodeType(v string) *Observation { + s.XRayNodeType = &v + return s +} + +// SetXRayRequestAverageLatency sets the XRayRequestAverageLatency field's value. +func (s *Observation) SetXRayRequestAverageLatency(v int64) *Observation { + s.XRayRequestAverageLatency = &v + return s +} + +// SetXRayRequestCount sets the XRayRequestCount field's value. +func (s *Observation) SetXRayRequestCount(v int64) *Observation { + s.XRayRequestCount = &v + return s +} + +// SetXRayThrottlePercent sets the XRayThrottlePercent field's value. +func (s *Observation) SetXRayThrottlePercent(v int64) *Observation { + s.XRayThrottlePercent = &v + return s +} + // Describes a problem that is detected by correlating observations. type Problem struct { _ struct{} `type:"structure"` @@ -5220,8 +5435,8 @@ func (s *RelatedObservations) SetObservationList(v []*Observation) *RelatedObser // The resource is already created or in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5238,17 +5453,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5256,28 +5471,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The resource does not exist in the customer account. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5294,17 +5509,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5312,22 +5527,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An object that defines the tags associated with an application. A tag is @@ -5494,8 +5709,8 @@ func (s TagResourceOutput) GoString() string { // Tags are already registered for the specified application ARN. type TagsAlreadyExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5512,17 +5727,17 @@ func (s TagsAlreadyExistException) GoString() string { func newErrorTagsAlreadyExistException(v protocol.ResponseMetadata) error { return &TagsAlreadyExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagsAlreadyExistException) Code() string { +func (s *TagsAlreadyExistException) Code() string { return "TagsAlreadyExistException" } // Message returns the exception's message. -func (s TagsAlreadyExistException) Message() string { +func (s *TagsAlreadyExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5530,29 +5745,29 @@ func (s TagsAlreadyExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagsAlreadyExistException) OrigErr() error { +func (s *TagsAlreadyExistException) OrigErr() error { return nil } -func (s TagsAlreadyExistException) Error() string { +func (s *TagsAlreadyExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagsAlreadyExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagsAlreadyExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagsAlreadyExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagsAlreadyExistException) RequestID() string { + return s.RespMetadata.RequestID } // The number of the provided tags is beyond the limit, or the number of total // tags you are trying to attach to the specified resource exceeds the limit. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -5572,17 +5787,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5590,22 +5805,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -5685,6 +5900,11 @@ func (s UntagResourceOutput) GoString() string { type UpdateApplicationInput struct { _ struct{} `type:"structure"` + // Indicates whether Application Insights can listen to CloudWatch events for + // the application resources, such as instance terminated, failed deployment, + // and others. + CWEMonitorEnabled *bool `type:"boolean"` + // When set to true, creates opsItems for any problems detected on an application. OpsCenterEnabled *bool `type:"boolean"` @@ -5730,6 +5950,12 @@ func (s *UpdateApplicationInput) Validate() error { return nil } +// SetCWEMonitorEnabled sets the CWEMonitorEnabled field's value. +func (s *UpdateApplicationInput) SetCWEMonitorEnabled(v bool) *UpdateApplicationInput { + s.CWEMonitorEnabled = &v + return s +} + // SetOpsCenterEnabled sets the OpsCenterEnabled field's value. func (s *UpdateApplicationInput) SetOpsCenterEnabled(v bool) *UpdateApplicationInput { s.OpsCenterEnabled = &v @@ -6102,8 +6328,8 @@ func (s *UpdateLogPatternOutput) SetResourceGroupName(v string) *UpdateLogPatter // The parameter is not valid. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6120,17 +6346,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6138,24 +6364,35 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } +const ( + // CloudWatchEventSourceEc2 is a CloudWatchEventSource enum value + CloudWatchEventSourceEc2 = "EC2" + + // CloudWatchEventSourceCodeDeploy is a CloudWatchEventSource enum value + CloudWatchEventSourceCodeDeploy = "CODE_DEPLOY" + + // CloudWatchEventSourceHealth is a CloudWatchEventSource enum value + CloudWatchEventSourceHealth = "HEALTH" +) + const ( // ConfigurationEventResourceTypeCloudwatchAlarm is a ConfigurationEventResourceType enum value ConfigurationEventResourceTypeCloudwatchAlarm = "CLOUDWATCH_ALARM" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go index 89e83d2a16b..7e56ed429fb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go @@ -57,12 +57,14 @@ func (c *AppMesh) CreateMeshRequest(input *CreateMeshInput) (req *request.Reques // CreateMesh API operation for AWS App Mesh. // -// Creates a service mesh. A service mesh is a logical boundary for network -// traffic between the services that reside within it. +// Creates a service mesh. // -// After you create your service mesh, you can create virtual services, virtual -// nodes, virtual routers, and routes to distribute traffic between the applications -// in your mesh. +// A service mesh is a logical boundary for network traffic between services +// that are represented by resources within the mesh. After you create your +// service mesh, you can create virtual services, virtual nodes, virtual routers, +// and routes to distribute traffic between the applications in your mesh. +// +// For more information about service meshes, see Service meshes (https://docs.aws.amazon.com/app-mesh/latest/userguide/meshes.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 @@ -89,7 +91,7 @@ func (c *AppMesh) CreateMeshRequest(input *CreateMeshInput) (req *request.Reques // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -171,13 +173,8 @@ func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Requ // // Creates a route that is associated with a virtual router. // -// You can use the prefix parameter in your route specification for path-based -// routing of requests. For example, if your virtual service name is my-service.local -// and you want the route to match requests to my-service.local/metrics, your -// prefix should be /metrics. -// -// If your route matches a request, you can distribute traffic to one or more -// target virtual nodes with relative weighting. +// You can route several different protocols and define a retry policy for a +// route. Traffic can be routed to one or more virtual nodes. // // For more information about routes, see Routes (https://docs.aws.amazon.com/app-mesh/latest/userguide/routes.html). // @@ -206,7 +203,7 @@ func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Requ // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -290,11 +287,13 @@ func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req * // // A virtual node acts as a logical pointer to a particular task group, such // as an Amazon ECS service or a Kubernetes deployment. When you create a virtual -// node, you can specify the service discovery information for your task group. +// node, you can specify the service discovery information for your task group, +// and whether the proxy running in a task group will communicate with other +// proxies using Transport Layer Security (TLS). // -// Any inbound traffic that your virtual node expects should be specified as -// a listener. Any outbound traffic that your virtual node expects to reach -// should be specified as a backend. +// You define a listener for any inbound traffic that your virtual node expects. +// Any virtual service that your virtual node expects to communicate to is specified +// as a backend. // // The response metadata for your new virtual node contains the arn that is // associated with the virtual node. Set this value (either the full ARN or @@ -307,7 +306,7 @@ func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req * // override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. // -// For more information about virtual nodes, see Virtual Nodes (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_nodes.html). +// For more information about virtual nodes, see Virtual nodes (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_nodes.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 @@ -334,7 +333,7 @@ func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req * // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -416,14 +415,13 @@ func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (r // // Creates a virtual router within a service mesh. // -// Any inbound traffic that your virtual router expects should be specified -// as a listener. -// +// Specify a listener for any inbound traffic that your virtual router receives. +// Create a virtual router for each protocol and port that you need to route. // Virtual routers handle traffic for one or more virtual services within your // mesh. After you create your virtual router, create and associate routes for // your virtual router that direct incoming requests to different virtual nodes. // -// For more information about virtual routers, see Virtual Routers (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_routers.html). +// For more information about virtual routers, see Virtual routers (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_routers.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 @@ -450,7 +448,7 @@ func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (r // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -538,7 +536,7 @@ func (c *AppMesh) CreateVirtualServiceRequest(input *CreateVirtualServiceInput) // are routed to the virtual node or virtual router that is specified as the // provider for the virtual service. // -// For more information about virtual services, see Virtual Services (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.html). +// For more information about virtual services, see Virtual services (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_services.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 @@ -565,7 +563,7 @@ func (c *AppMesh) CreateVirtualServiceRequest(input *CreateVirtualServiceInput) // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -1081,6 +1079,10 @@ func (c *AppMesh) DeleteVirtualServiceRequest(input *DeleteVirtualServiceInput) // * NotFoundException // The specified resource doesn't exist. Check your request syntax and try again. // +// * ResourceInUseException +// You can't delete the specified resource because it's in use or required by +// another resource. +// // * ServiceUnavailableException // The request has failed due to a temporary failure of the service. // @@ -2903,7 +2905,7 @@ func (c *AppMesh) UpdateRouteRequest(input *UpdateRouteInput) (req *request.Requ // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -3010,7 +3012,7 @@ func (c *AppMesh) UpdateVirtualNodeRequest(input *UpdateVirtualNodeInput) (req * // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -3117,7 +3119,7 @@ func (c *AppMesh) UpdateVirtualRouterRequest(input *UpdateVirtualRouterInput) (r // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -3224,7 +3226,7 @@ func (c *AppMesh) UpdateVirtualServiceRequest(input *UpdateVirtualServiceInput) // // * LimitExceededException // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. // // * NotFoundException @@ -3510,8 +3512,8 @@ func (s *BackendDefaults) SetClientPolicy(v *ClientPolicy) *BackendDefaults { // The request syntax was malformed. Check your request syntax and try again. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3528,17 +3530,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3546,22 +3548,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // An object that represents a client policy. @@ -3667,8 +3669,8 @@ func (s *ClientPolicyTls) SetValidation(v *TlsValidationContext) *ClientPolicyTl // call with different specifications. Try the request again with a new client // token. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3685,17 +3687,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3703,22 +3705,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } type CreateMeshInput struct { @@ -5414,8 +5416,8 @@ func (s *FileAccessLog) SetPath(v string) *FileAccessLog { // You don't have permissions to perform this action. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5432,17 +5434,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5450,22 +5452,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // An object that represents a retry policy. Specify at least one value for @@ -6445,8 +6447,8 @@ func (s *HttpRouteMatch) SetScheme(v string) *HttpRouteMatch { // The request processing has failed because of an unknown error, exception, // or failure. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6463,17 +6465,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6481,30 +6483,30 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // You have exceeded a service limit for your account. For more information, -// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) +// see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6521,17 +6523,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6539,22 +6541,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListMeshesInput struct { @@ -7308,7 +7310,7 @@ type ListenerTlsCertificate struct { // An object that represents a local file certificate. The certificate must // meet specific requirements and you must have proxy authorization enabled. - // For more information, see Transport Layer Security (TLS) (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual-node-tls.html#virtual-node-tls-prerequisites). + // For more information, see Transport Layer Security (TLS) (https://docs.aws.amazon.com/app-mesh/latest/userguide/tls.html#virtual-node-tls-prerequisites). File *ListenerTlsFileCertificate `locationName:"file" type:"structure"` } @@ -7356,7 +7358,7 @@ func (s *ListenerTlsCertificate) SetFile(v *ListenerTlsFileCertificate) *Listene // An object that represents a local file certificate. The certificate must // meet specific requirements and you must have proxy authorization enabled. -// For more information, see Transport Layer Security (TLS) (https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual-node-tls.html#virtual-node-tls-prerequisites). +// For more information, see Transport Layer Security (TLS) (https://docs.aws.amazon.com/app-mesh/latest/userguide/tls.html#virtual-node-tls-prerequisites). type ListenerTlsFileCertificate struct { _ struct{} `type:"structure"` @@ -7566,6 +7568,12 @@ type MeshRef struct { // Arn is a required field Arn *string `locationName:"arn" type:"string" required:"true"` + // CreatedAt is a required field + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` + + // LastUpdatedAt is a required field + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" required:"true"` + // MeshName is a required field MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` @@ -7574,6 +7582,9 @@ type MeshRef struct { // ResourceOwner is a required field ResourceOwner *string `locationName:"resourceOwner" min:"12" type:"string" required:"true"` + + // Version is a required field + Version *int64 `locationName:"version" type:"long" required:"true"` } // String returns the string representation @@ -7592,6 +7603,18 @@ func (s *MeshRef) SetArn(v string) *MeshRef { return s } +// SetCreatedAt sets the CreatedAt field's value. +func (s *MeshRef) SetCreatedAt(v time.Time) *MeshRef { + s.CreatedAt = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *MeshRef) SetLastUpdatedAt(v time.Time) *MeshRef { + s.LastUpdatedAt = &v + return s +} + // SetMeshName sets the MeshName field's value. func (s *MeshRef) SetMeshName(v string) *MeshRef { s.MeshName = &v @@ -7610,6 +7633,12 @@ func (s *MeshRef) SetResourceOwner(v string) *MeshRef { return s } +// SetVersion sets the Version field's value. +func (s *MeshRef) SetVersion(v int64) *MeshRef { + s.Version = &v + return s +} + // An object that represents the specification of a service mesh. type MeshSpec struct { _ struct{} `type:"structure"` @@ -7674,8 +7703,8 @@ func (s *MeshStatus) SetStatus(v string) *MeshStatus { // The specified resource doesn't exist. Check your request syntax and try again. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7692,17 +7721,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7710,22 +7739,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An object that represents a port mapping. @@ -7783,8 +7812,8 @@ func (s *PortMapping) SetProtocol(v string) *PortMapping { // You can't delete the specified resource because it's in use or required by // another resource. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7801,17 +7830,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7819,22 +7848,22 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // An object that represents metadata for a resource. @@ -7997,6 +8026,12 @@ type RouteRef struct { // Arn is a required field Arn *string `locationName:"arn" type:"string" required:"true"` + // CreatedAt is a required field + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` + + // LastUpdatedAt is a required field + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" required:"true"` + // MeshName is a required field MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` @@ -8009,6 +8044,9 @@ type RouteRef struct { // RouteName is a required field RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"` + // Version is a required field + Version *int64 `locationName:"version" type:"long" required:"true"` + // VirtualRouterName is a required field VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` } @@ -8029,6 +8067,18 @@ func (s *RouteRef) SetArn(v string) *RouteRef { return s } +// SetCreatedAt sets the CreatedAt field's value. +func (s *RouteRef) SetCreatedAt(v time.Time) *RouteRef { + s.CreatedAt = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *RouteRef) SetLastUpdatedAt(v time.Time) *RouteRef { + s.LastUpdatedAt = &v + return s +} + // SetMeshName sets the MeshName field's value. func (s *RouteRef) SetMeshName(v string) *RouteRef { s.MeshName = &v @@ -8053,6 +8103,12 @@ func (s *RouteRef) SetRouteName(v string) *RouteRef { return s } +// SetVersion sets the Version field's value. +func (s *RouteRef) SetVersion(v int64) *RouteRef { + s.Version = &v + return s +} + // SetVirtualRouterName sets the VirtualRouterName field's value. func (s *RouteRef) SetVirtualRouterName(v string) *RouteRef { s.VirtualRouterName = &v @@ -8230,8 +8286,8 @@ func (s *ServiceDiscovery) SetDns(v *DnsServiceDiscovery) *ServiceDiscovery { // The request has failed due to a temporary failure of the service. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8248,17 +8304,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8266,22 +8322,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Optional metadata that you apply to a resource to assist with categorization @@ -8688,8 +8744,8 @@ func (s *TlsValidationContextTrust) SetFile(v *TlsValidationContextFileTrust) *T // for your account. For best results, use an increasing or variable sleep interval // between requests. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8706,17 +8762,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8724,30 +8780,30 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // The request exceeds the maximum allowed number of tags allowed per resource. // The current limit is 50 user tags per resource. You must reduce the number // of tags in the request. None of the tags in this request were applied. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8764,17 +8820,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8782,22 +8838,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -9504,6 +9560,12 @@ type VirtualNodeRef struct { // Arn is a required field Arn *string `locationName:"arn" type:"string" required:"true"` + // CreatedAt is a required field + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` + + // LastUpdatedAt is a required field + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" required:"true"` + // MeshName is a required field MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` @@ -9513,6 +9575,9 @@ type VirtualNodeRef struct { // ResourceOwner is a required field ResourceOwner *string `locationName:"resourceOwner" min:"12" type:"string" required:"true"` + // Version is a required field + Version *int64 `locationName:"version" type:"long" required:"true"` + // VirtualNodeName is a required field VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"` } @@ -9533,6 +9598,18 @@ func (s *VirtualNodeRef) SetArn(v string) *VirtualNodeRef { return s } +// SetCreatedAt sets the CreatedAt field's value. +func (s *VirtualNodeRef) SetCreatedAt(v time.Time) *VirtualNodeRef { + s.CreatedAt = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *VirtualNodeRef) SetLastUpdatedAt(v time.Time) *VirtualNodeRef { + s.LastUpdatedAt = &v + return s +} + // SetMeshName sets the MeshName field's value. func (s *VirtualNodeRef) SetMeshName(v string) *VirtualNodeRef { s.MeshName = &v @@ -9551,6 +9628,12 @@ func (s *VirtualNodeRef) SetResourceOwner(v string) *VirtualNodeRef { return s } +// SetVersion sets the Version field's value. +func (s *VirtualNodeRef) SetVersion(v int64) *VirtualNodeRef { + s.Version = &v + return s +} + // SetVirtualNodeName sets the VirtualNodeName field's value. func (s *VirtualNodeRef) SetVirtualNodeName(v string) *VirtualNodeRef { s.VirtualNodeName = &v @@ -9842,6 +9925,12 @@ type VirtualRouterRef struct { // Arn is a required field Arn *string `locationName:"arn" type:"string" required:"true"` + // CreatedAt is a required field + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` + + // LastUpdatedAt is a required field + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" required:"true"` + // MeshName is a required field MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` @@ -9851,6 +9940,9 @@ type VirtualRouterRef struct { // ResourceOwner is a required field ResourceOwner *string `locationName:"resourceOwner" min:"12" type:"string" required:"true"` + // Version is a required field + Version *int64 `locationName:"version" type:"long" required:"true"` + // VirtualRouterName is a required field VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"` } @@ -9871,6 +9963,18 @@ func (s *VirtualRouterRef) SetArn(v string) *VirtualRouterRef { return s } +// SetCreatedAt sets the CreatedAt field's value. +func (s *VirtualRouterRef) SetCreatedAt(v time.Time) *VirtualRouterRef { + s.CreatedAt = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *VirtualRouterRef) SetLastUpdatedAt(v time.Time) *VirtualRouterRef { + s.LastUpdatedAt = &v + return s +} + // SetMeshName sets the MeshName field's value. func (s *VirtualRouterRef) SetMeshName(v string) *VirtualRouterRef { s.MeshName = &v @@ -9889,6 +9993,12 @@ func (s *VirtualRouterRef) SetResourceOwner(v string) *VirtualRouterRef { return s } +// SetVersion sets the Version field's value. +func (s *VirtualRouterRef) SetVersion(v int64) *VirtualRouterRef { + s.Version = &v + return s +} + // SetVirtualRouterName sets the VirtualRouterName field's value. func (s *VirtualRouterRef) SetVirtualRouterName(v string) *VirtualRouterRef { s.VirtualRouterName = &v @@ -10182,6 +10292,12 @@ type VirtualServiceRef struct { // Arn is a required field Arn *string `locationName:"arn" type:"string" required:"true"` + // CreatedAt is a required field + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` + + // LastUpdatedAt is a required field + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" required:"true"` + // MeshName is a required field MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"` @@ -10191,6 +10307,9 @@ type VirtualServiceRef struct { // ResourceOwner is a required field ResourceOwner *string `locationName:"resourceOwner" min:"12" type:"string" required:"true"` + // Version is a required field + Version *int64 `locationName:"version" type:"long" required:"true"` + // VirtualServiceName is a required field VirtualServiceName *string `locationName:"virtualServiceName" type:"string" required:"true"` } @@ -10211,6 +10330,18 @@ func (s *VirtualServiceRef) SetArn(v string) *VirtualServiceRef { return s } +// SetCreatedAt sets the CreatedAt field's value. +func (s *VirtualServiceRef) SetCreatedAt(v time.Time) *VirtualServiceRef { + s.CreatedAt = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *VirtualServiceRef) SetLastUpdatedAt(v time.Time) *VirtualServiceRef { + s.LastUpdatedAt = &v + return s +} + // SetMeshName sets the MeshName field's value. func (s *VirtualServiceRef) SetMeshName(v string) *VirtualServiceRef { s.MeshName = &v @@ -10229,6 +10360,12 @@ func (s *VirtualServiceRef) SetResourceOwner(v string) *VirtualServiceRef { return s } +// SetVersion sets the Version field's value. +func (s *VirtualServiceRef) SetVersion(v int64) *VirtualServiceRef { + s.Version = &v + return s +} + // SetVirtualServiceName sets the VirtualServiceName field's value. func (s *VirtualServiceRef) SetVirtualServiceName(v string) *VirtualServiceRef { s.VirtualServiceName = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go index 09a02953834..66f3509f3e4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go @@ -14,7 +14,7 @@ // // App Mesh supports microservice applications that use service discovery naming // for their components. For more information about service discovery on Amazon -// ECS, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) +// ECS, see Service Discovery (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) // in the Amazon Elastic Container Service Developer Guide. Kubernetes kube-dns // and coredns are supported. For more information, see DNS for Services and // Pods (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go index 9e60da8d1d0..96973b8dae2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/errors.go @@ -39,7 +39,7 @@ const ( // "LimitExceededException". // // You have exceeded a service limit for your account. For more information, - // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html) + // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service-quotas.html) // in the AWS App Mesh User Guide. ErrCodeLimitExceededException = "LimitExceededException" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appstream/api.go b/vendor/github.com/aws/aws-sdk-go/service/appstream/api.go index 18f4e0a360e..7d4306f2f07 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appstream/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appstream/api.go @@ -4776,8 +4776,8 @@ func (s *ComputeCapacityStatus) SetRunning(v int64) *ComputeCapacityStatus { // An API error occurred. Wait a few minutes and try again. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -4795,17 +4795,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4813,22 +4813,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } type CopyImageInput struct { @@ -8839,8 +8839,8 @@ func (s *ImageStateChangeReason) SetMessage(v string) *ImageStateChangeReason { // The image does not support storage connectors. type IncompatibleImageException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -8858,17 +8858,17 @@ func (s IncompatibleImageException) GoString() string { func newErrorIncompatibleImageException(v protocol.ResponseMetadata) error { return &IncompatibleImageException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncompatibleImageException) Code() string { +func (s *IncompatibleImageException) Code() string { return "IncompatibleImageException" } // Message returns the exception's message. -func (s IncompatibleImageException) Message() string { +func (s *IncompatibleImageException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8876,29 +8876,29 @@ func (s IncompatibleImageException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncompatibleImageException) OrigErr() error { +func (s *IncompatibleImageException) OrigErr() error { return nil } -func (s IncompatibleImageException) Error() string { +func (s *IncompatibleImageException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncompatibleImageException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncompatibleImageException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncompatibleImageException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncompatibleImageException) RequestID() string { + return s.RespMetadata.RequestID } // The resource cannot be created because your AWS account is suspended. For // assistance, contact AWS Support. type InvalidAccountStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -8916,17 +8916,17 @@ func (s InvalidAccountStatusException) GoString() string { func newErrorInvalidAccountStatusException(v protocol.ResponseMetadata) error { return &InvalidAccountStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAccountStatusException) Code() string { +func (s *InvalidAccountStatusException) Code() string { return "InvalidAccountStatusException" } // Message returns the exception's message. -func (s InvalidAccountStatusException) Message() string { +func (s *InvalidAccountStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8934,28 +8934,28 @@ func (s InvalidAccountStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAccountStatusException) OrigErr() error { +func (s *InvalidAccountStatusException) OrigErr() error { return nil } -func (s InvalidAccountStatusException) Error() string { +func (s *InvalidAccountStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAccountStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAccountStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAccountStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAccountStatusException) RequestID() string { + return s.RespMetadata.RequestID } // Indicates an incorrect combination of parameters, or a missing parameter. type InvalidParameterCombinationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -8973,17 +8973,17 @@ func (s InvalidParameterCombinationException) GoString() string { func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error { return &InvalidParameterCombinationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterCombinationException) Code() string { +func (s *InvalidParameterCombinationException) Code() string { return "InvalidParameterCombinationException" } // Message returns the exception's message. -func (s InvalidParameterCombinationException) Message() string { +func (s *InvalidParameterCombinationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8991,28 +8991,28 @@ func (s InvalidParameterCombinationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterCombinationException) OrigErr() error { +func (s *InvalidParameterCombinationException) OrigErr() error { return nil } -func (s InvalidParameterCombinationException) Error() string { +func (s *InvalidParameterCombinationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterCombinationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterCombinationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterCombinationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterCombinationException) RequestID() string { + return s.RespMetadata.RequestID } // The specified role is invalid. type InvalidRoleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9030,17 +9030,17 @@ func (s InvalidRoleException) GoString() string { func newErrorInvalidRoleException(v protocol.ResponseMetadata) error { return &InvalidRoleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRoleException) Code() string { +func (s *InvalidRoleException) Code() string { return "InvalidRoleException" } // Message returns the exception's message. -func (s InvalidRoleException) Message() string { +func (s *InvalidRoleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9048,22 +9048,22 @@ func (s InvalidRoleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRoleException) OrigErr() error { +func (s *InvalidRoleException) OrigErr() error { return nil } -func (s InvalidRoleException) Error() string { +func (s *InvalidRoleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRoleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRoleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRoleException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRoleException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the error that is returned when a usage report can't be generated. @@ -9103,8 +9103,8 @@ func (s *LastReportGenerationExecutionError) SetErrorMessage(v string) *LastRepo // The requested limit exceeds the permitted limit for an account. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9122,17 +9122,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9140,22 +9140,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAssociatedFleetsInput struct { @@ -9431,8 +9431,8 @@ func (s *NetworkAccessConfiguration) SetEniPrivateIpAddress(v string) *NetworkAc // The attempted operation is not permitted. type OperationNotPermittedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9450,17 +9450,17 @@ func (s OperationNotPermittedException) GoString() string { func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error { return &OperationNotPermittedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotPermittedException) Code() string { +func (s *OperationNotPermittedException) Code() string { return "OperationNotPermittedException" } // Message returns the exception's message. -func (s OperationNotPermittedException) Message() string { +func (s *OperationNotPermittedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9468,28 +9468,28 @@ func (s OperationNotPermittedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotPermittedException) OrigErr() error { +func (s *OperationNotPermittedException) OrigErr() error { return nil } -func (s OperationNotPermittedException) Error() string { +func (s *OperationNotPermittedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotPermittedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotPermittedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotPermittedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotPermittedException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9507,17 +9507,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9525,22 +9525,22 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a resource error. @@ -9587,8 +9587,8 @@ func (s *ResourceError) SetErrorTimestamp(v time.Time) *ResourceError { // The specified resource is in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9606,17 +9606,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9624,28 +9624,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource exists and is not in use, but isn't available. type ResourceNotAvailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9663,17 +9663,17 @@ func (s ResourceNotAvailableException) GoString() string { func newErrorResourceNotAvailableException(v protocol.ResponseMetadata) error { return &ResourceNotAvailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotAvailableException) Code() string { +func (s *ResourceNotAvailableException) Code() string { return "ResourceNotAvailableException" } // Message returns the exception's message. -func (s ResourceNotAvailableException) Message() string { +func (s *ResourceNotAvailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9681,28 +9681,28 @@ func (s ResourceNotAvailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotAvailableException) OrigErr() error { +func (s *ResourceNotAvailableException) OrigErr() error { return nil } -func (s ResourceNotAvailableException) Error() string { +func (s *ResourceNotAvailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotAvailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotAvailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotAvailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotAvailableException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message in the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9720,17 +9720,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9738,22 +9738,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the credentials for the service account used by the fleet or image 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 38075bece57..8215648e8d8 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 @@ -3838,8 +3838,8 @@ func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, // You do not have access to perform this operation on this resource. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3856,17 +3856,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3874,22 +3874,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an additional authentication provider. @@ -4136,8 +4136,8 @@ func (s *ApiKey) SetId(v string) *ApiKey { // The API key exceeded a limit. Try your request again. type ApiKeyLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4154,17 +4154,17 @@ func (s ApiKeyLimitExceededException) GoString() string { func newErrorApiKeyLimitExceededException(v protocol.ResponseMetadata) error { return &ApiKeyLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApiKeyLimitExceededException) Code() string { +func (s *ApiKeyLimitExceededException) Code() string { return "ApiKeyLimitExceededException" } // Message returns the exception's message. -func (s ApiKeyLimitExceededException) Message() string { +func (s *ApiKeyLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4172,29 +4172,29 @@ func (s ApiKeyLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApiKeyLimitExceededException) OrigErr() error { +func (s *ApiKeyLimitExceededException) OrigErr() error { return nil } -func (s ApiKeyLimitExceededException) Error() string { +func (s *ApiKeyLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApiKeyLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApiKeyLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApiKeyLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApiKeyLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The API key expiration must be set to a value between 1 and 365 days from // creation (for CreateApiKey) or from update (for UpdateApiKey). type ApiKeyValidityOutOfBoundsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4211,17 +4211,17 @@ func (s ApiKeyValidityOutOfBoundsException) GoString() string { func newErrorApiKeyValidityOutOfBoundsException(v protocol.ResponseMetadata) error { return &ApiKeyValidityOutOfBoundsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApiKeyValidityOutOfBoundsException) Code() string { +func (s *ApiKeyValidityOutOfBoundsException) Code() string { return "ApiKeyValidityOutOfBoundsException" } // Message returns the exception's message. -func (s ApiKeyValidityOutOfBoundsException) Message() string { +func (s *ApiKeyValidityOutOfBoundsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4229,28 +4229,28 @@ func (s ApiKeyValidityOutOfBoundsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApiKeyValidityOutOfBoundsException) OrigErr() error { +func (s *ApiKeyValidityOutOfBoundsException) OrigErr() error { return nil } -func (s ApiKeyValidityOutOfBoundsException) Error() string { +func (s *ApiKeyValidityOutOfBoundsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApiKeyValidityOutOfBoundsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApiKeyValidityOutOfBoundsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApiKeyValidityOutOfBoundsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApiKeyValidityOutOfBoundsException) RequestID() string { + return s.RespMetadata.RequestID } // The GraphQL API exceeded a limit. Try your request again. type ApiLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4267,17 +4267,17 @@ func (s ApiLimitExceededException) GoString() string { func newErrorApiLimitExceededException(v protocol.ResponseMetadata) error { return &ApiLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApiLimitExceededException) Code() string { +func (s *ApiLimitExceededException) Code() string { return "ApiLimitExceededException" } // Message returns the exception's message. -func (s ApiLimitExceededException) Message() string { +func (s *ApiLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4285,22 +4285,22 @@ func (s ApiLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApiLimitExceededException) OrigErr() error { +func (s *ApiLimitExceededException) OrigErr() error { return nil } -func (s ApiLimitExceededException) Error() string { +func (s *ApiLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApiLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApiLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApiLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApiLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The authorization config in case the HTTP endpoint requires authorization. @@ -4389,8 +4389,8 @@ func (s *AwsIamConfig) SetSigningServiceName(v string) *AwsIamConfig { // The request is not well formed. For example, a value is invalid or a required // field is missing. Check the field values, and then try again. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4407,17 +4407,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4425,22 +4425,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The caching configuration for a resolver that has caching enabled. @@ -4547,8 +4547,8 @@ func (s *CognitoUserPoolConfig) SetUserPoolId(v string) *CognitoUserPoolConfig { // Another modification is in progress at this time and it must complete before // you can make your change. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4565,17 +4565,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4583,22 +4583,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a CreateApiCache operation. @@ -7186,8 +7186,8 @@ func (s *GetTypeOutput) SetType(v *Type) *GetTypeOutput { // The GraphQL schema is not valid. type GraphQLSchemaException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7204,17 +7204,17 @@ func (s GraphQLSchemaException) GoString() string { func newErrorGraphQLSchemaException(v protocol.ResponseMetadata) error { return &GraphQLSchemaException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GraphQLSchemaException) Code() string { +func (s *GraphQLSchemaException) Code() string { return "GraphQLSchemaException" } // Message returns the exception's message. -func (s GraphQLSchemaException) Message() string { +func (s *GraphQLSchemaException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7222,22 +7222,22 @@ func (s GraphQLSchemaException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GraphQLSchemaException) OrigErr() error { +func (s *GraphQLSchemaException) OrigErr() error { return nil } -func (s GraphQLSchemaException) Error() string { +func (s *GraphQLSchemaException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GraphQLSchemaException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GraphQLSchemaException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GraphQLSchemaException) RequestID() string { - return s.respMetadata.RequestID +func (s *GraphQLSchemaException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a GraphQL API. @@ -7407,8 +7407,8 @@ func (s *HttpDataSourceConfig) SetEndpoint(v string) *HttpDataSourceConfig { // An internal AWS AppSync error occurred. Try your request again. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7425,17 +7425,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7443,22 +7443,22 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The LambdaConflictHandlerConfig object when configuring LAMBDA as the Conflict @@ -7527,8 +7527,8 @@ func (s *LambdaDataSourceConfig) SetLambdaFunctionArn(v string) *LambdaDataSourc // The request exceeded a limit. Try your request again. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7545,17 +7545,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7563,22 +7563,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListApiKeysInput struct { @@ -8424,8 +8424,8 @@ func (s *LogConfig) SetFieldLogLevel(v string) *LogConfig { // The resource specified in the request was not found. Check the resource, // and then try again. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8442,17 +8442,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8460,22 +8460,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an OpenID Connect configuration. @@ -9053,8 +9053,8 @@ func (s *Type) SetName(v string) *Type { // You are not authorized to perform this operation. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9071,17 +9071,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9089,22 +9089,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 e1931f6e160..ca2043b0144 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 @@ -1006,7 +1006,8 @@ func (c *Athena) ListNamedQueriesRequest(input *ListNamedQueriesInput) (req *req // ListNamedQueries API operation for Amazon Athena. // // Provides a list of available query IDs only for queries saved in the specified -// workgroup. Requires that you have access to the workgroup. +// workgroup. Requires that you have access to the workgroup. If a workgroup +// is not specified, lists the saved queries for the primary workgroup. // // For code samples using the AWS SDK for Java, see Examples and Code Samples // (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon @@ -1153,8 +1154,9 @@ func (c *Athena) ListQueryExecutionsRequest(input *ListQueryExecutionsInput) (re // ListQueryExecutions API operation for Amazon Athena. // // Provides a list of available query execution IDs for the queries in the specified -// workgroup. Requires you to have access to the workgroup in which the queries -// ran. +// workgroup. If a workgroup is not specified, returns a list of query execution +// IDs for the primary workgroup. Requires you to have access to the workgroup +// in which the queries ran. // // For code samples using the AWS SDK for Java, see Examples and Code Samples // (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon @@ -2901,8 +2903,8 @@ func (s *GetWorkGroupOutput) SetWorkGroup(v *WorkGroup) *GetWorkGroupOutput { // Indicates a platform issue, which may be due to a transient condition or // outage. type InternalServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2919,17 +2921,17 @@ func (s InternalServerException) GoString() string { func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerException) Code() string { +func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. -func (s InternalServerException) Message() string { +func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2937,29 +2939,29 @@ func (s InternalServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerException) OrigErr() error { +func (s *InternalServerException) OrigErr() error { return nil } -func (s InternalServerException) Error() string { +func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID } // Indicates that something is wrong with the input to the request. For example, // a required parameter may be missing or out of range. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error code returned when the query execution failed to process, or when // the processing request for the named query failed. @@ -2980,17 +2982,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2998,22 +3000,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } type ListNamedQueriesInput struct { @@ -3026,7 +3028,9 @@ type ListNamedQueriesInput struct { // was truncated. NextToken *string `min:"1" type:"string"` - // The name of the workgroup from which the named queries are being returned. + // The name of the workgroup from which the named queries are returned. If a + // workgroup is not specified, the saved queries for the primary workgroup are + // returned. WorkGroup *string `type:"string"` } @@ -3113,7 +3117,9 @@ type ListQueryExecutionsInput struct { // was truncated. NextToken *string `min:"1" type:"string"` - // The name of the workgroup from which queries are being returned. + // The name of the workgroup from which queries are returned. If a workgroup + // is not specified, a list of available query execution IDs for the queries + // in the primary workgroup is returned. WorkGroup *string `type:"string"` } @@ -3473,8 +3479,9 @@ type QueryExecution struct { // and DML, such as SHOW CREATE TABLE, or DESCRIBE . StatementType *string `type:"string" enum:"StatementType"` - // The amount of data scanned during the query execution and the amount of time - // that it took to execute, and the type of statement that was run. + // Query execution statistics, such as the amount of data scanned, the amount + // of time that the query took to process, and the type of statement that was + // run. Statistics *QueryExecutionStatistics `type:"structure"` // The completion date, current state, submission time, and state change reason @@ -3680,12 +3687,12 @@ type QueryExecutionStatus struct { // The date and time that the query completed. CompletionDateTime *time.Time `type:"timestamp"` - // The state of query execution. QUEUED state is listed but is not used by Athena - // and is reserved for future use. RUNNING indicates that the query has been - // submitted to the service, and Athena will execute the query as soon as resources - // are available. SUCCEEDED indicates that the query completed without errors. - // FAILED indicates that the query experienced an error and did not complete - // processing. CANCELLED indicates that a user input interrupted query execution. + // The state of query execution. QUEUED indicates that the query has been submitted + // to the service, and Athena will execute the query as soon as resources are + // available. RUNNING indicates that the query is in execution phase. SUCCEEDED + // indicates that the query completed without errors. FAILED indicates that + // the query experienced an error and did not complete processing. CANCELLED + // indicates that a user input interrupted query execution. State *string `type:"string" enum:"QueryExecutionState"` // Further detail about the status of the query. @@ -3731,8 +3738,8 @@ func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutio // A resource, such as a workgroup, was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -3751,17 +3758,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3769,22 +3776,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The location in Amazon S3 where query results are stored and the encryption @@ -4324,8 +4331,8 @@ func (s TagResourceOutput) GoString() string { // Indicates that the request was throttled. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -4346,17 +4353,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4364,22 +4371,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a named query ID that could not be processed. diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/api.go index 017b19196dd..128cfeb8f35 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscalingplans/api.go @@ -612,8 +612,8 @@ func (s *ApplicationSource) SetTagFilters(v []*TagFilter) *ApplicationSource { // Concurrent updates caused an exception, for example, if you request an update // to a scaling plan that already has a pending update. type ConcurrentUpdateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -630,17 +630,17 @@ func (s ConcurrentUpdateException) GoString() string { func newErrorConcurrentUpdateException(v protocol.ResponseMetadata) error { return &ConcurrentUpdateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentUpdateException) Code() string { +func (s *ConcurrentUpdateException) Code() string { return "ConcurrentUpdateException" } // Message returns the exception's message. -func (s ConcurrentUpdateException) Message() string { +func (s *ConcurrentUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -648,22 +648,22 @@ func (s ConcurrentUpdateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentUpdateException) OrigErr() error { +func (s *ConcurrentUpdateException) OrigErr() error { return nil } -func (s ConcurrentUpdateException) Error() string { +func (s *ConcurrentUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentUpdateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentUpdateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentUpdateException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentUpdateException) RequestID() string { + return s.RespMetadata.RequestID } type CreateScalingPlanInput struct { @@ -1539,8 +1539,8 @@ func (s *GetScalingPlanResourceForecastDataOutput) SetDatapoints(v []*Datapoint) // The service encountered an internal error. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1557,17 +1557,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1575,28 +1575,28 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // The token provided is not valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1613,17 +1613,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1631,29 +1631,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // Your account exceeded a limit. This exception is thrown when a per-account // resource limit is exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1670,17 +1670,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1688,22 +1688,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a dimension for a customized metric. @@ -1761,8 +1761,8 @@ func (s *MetricDimension) SetValue(v string) *MetricDimension { // The specified object could not be found. type ObjectNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1779,17 +1779,17 @@ func (s ObjectNotFoundException) GoString() string { func newErrorObjectNotFoundException(v protocol.ResponseMetadata) error { return &ObjectNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ObjectNotFoundException) Code() string { +func (s *ObjectNotFoundException) Code() string { return "ObjectNotFoundException" } // Message returns the exception's message. -func (s ObjectNotFoundException) Message() string { +func (s *ObjectNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1797,22 +1797,22 @@ func (s ObjectNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ObjectNotFoundException) OrigErr() error { +func (s *ObjectNotFoundException) OrigErr() error { return nil } -func (s ObjectNotFoundException) Error() string { +func (s *ObjectNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ObjectNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ObjectNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ObjectNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ObjectNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a predefined metric that can be used for predictive scaling. @@ -2878,8 +2878,8 @@ func (s UpdateScalingPlanOutput) GoString() string { // An exception was thrown for a validation issue. Review the parameters provided. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2896,17 +2896,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2914,22 +2914,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/api.go b/vendor/github.com/aws/aws-sdk-go/service/backup/api.go index 827543e759e..df947601a14 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/backup/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/backup/api.go @@ -1193,7 +1193,7 @@ func (c *Backup) DescribeProtectedResourceRequest(input *DescribeProtectedResour // DescribeProtectedResource API operation for AWS Backup. // // Returns information about a saved resource, including the last time it was -// backed-up, its Amazon Resource Name (ARN), and the AWS service type of the +// backed up, its Amazon Resource Name (ARN), and the AWS service type of the // saved resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1329,6 +1329,89 @@ func (c *Backup) DescribeRecoveryPointWithContext(ctx aws.Context, input *Descri return out, req.Send() } +const opDescribeRegionSettings = "DescribeRegionSettings" + +// DescribeRegionSettingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRegionSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRegionSettings for more information on using the DescribeRegionSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRegionSettingsRequest method. +// req, resp := client.DescribeRegionSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRegionSettings +func (c *Backup) DescribeRegionSettingsRequest(input *DescribeRegionSettingsInput) (req *request.Request, output *DescribeRegionSettingsOutput) { + op := &request.Operation{ + Name: opDescribeRegionSettings, + HTTPMethod: "GET", + HTTPPath: "/account-settings", + } + + if input == nil { + input = &DescribeRegionSettingsInput{} + } + + output = &DescribeRegionSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRegionSettings API operation for AWS Backup. +// +// Returns the current service opt-in settings for the region. If the service +// has a value set to true, AWS Backup will attempt to protect that service's +// resources in this region, when included in an on-demand backup or scheduled +// backup plan. If the value is set to false for a service, AWS Backup will +// not attempt to protect that service's resources in this region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DescribeRegionSettings for usage and error information. +// +// Returned Error Types: +// * ServiceUnavailableException +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRegionSettings +func (c *Backup) DescribeRegionSettings(input *DescribeRegionSettingsInput) (*DescribeRegionSettingsOutput, error) { + req, out := c.DescribeRegionSettingsRequest(input) + return out, req.Send() +} + +// DescribeRegionSettingsWithContext is the same as DescribeRegionSettings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRegionSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DescribeRegionSettingsWithContext(ctx aws.Context, input *DescribeRegionSettingsInput, opts ...request.Option) (*DescribeRegionSettingsOutput, error) { + req, out := c.DescribeRegionSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeRestoreJob = "DescribeRestoreJob" // DescribeRestoreJobRequest generates a "aws/request.Request" representing the @@ -3889,6 +3972,8 @@ func (c *Backup) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou // Returns a list of key-value pairs assigned to a target recovery point, backup // plan, or backup vault. // +// ListTags are currently only supported with Amazon EFS backups. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4915,10 +5000,101 @@ func (c *Backup) UpdateRecoveryPointLifecycleWithContext(ctx aws.Context, input return out, req.Send() } +const opUpdateRegionSettings = "UpdateRegionSettings" + +// UpdateRegionSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRegionSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRegionSettings for more information on using the UpdateRegionSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRegionSettingsRequest method. +// req, resp := client.UpdateRegionSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRegionSettings +func (c *Backup) UpdateRegionSettingsRequest(input *UpdateRegionSettingsInput) (req *request.Request, output *UpdateRegionSettingsOutput) { + op := &request.Operation{ + Name: opUpdateRegionSettings, + HTTPMethod: "PUT", + HTTPPath: "/account-settings", + } + + if input == nil { + input = &UpdateRegionSettingsInput{} + } + + output = &UpdateRegionSettingsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateRegionSettings API operation for AWS Backup. +// +// Updates the current service opt-in settings for the region. If the service +// has a value set to true, AWS Backup will attempt to protect that service's +// resources in this region, when included in an on-demand backup or scheduled +// backup plan. If the value is set to false for a service, AWS Backup will +// not attempt to protect that service's resources in this region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation UpdateRegionSettings for usage and error information. +// +// Returned Error Types: +// * ServiceUnavailableException +// The request failed due to a temporary failure of the server. +// +// * MissingParameterValueException +// Indicates that a required parameter is missing. +// +// * InvalidParameterValueException +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRegionSettings +func (c *Backup) UpdateRegionSettings(input *UpdateRegionSettingsInput) (*UpdateRegionSettingsOutput, error) { + req, out := c.UpdateRegionSettingsRequest(input) + return out, req.Send() +} + +// UpdateRegionSettingsWithContext is the same as UpdateRegionSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRegionSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) UpdateRegionSettingsWithContext(ctx aws.Context, input *UpdateRegionSettingsInput, opts ...request.Option) (*UpdateRegionSettingsOutput, error) { + req, out := c.UpdateRegionSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // The required resource already exists. type AlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Arn *string `type:"string"` @@ -4945,17 +5121,17 @@ func (s AlreadyExistsException) GoString() string { func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { return &AlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlreadyExistsException) Code() string { +func (s *AlreadyExistsException) Code() string { return "AlreadyExistsException" } // Message returns the exception's message. -func (s AlreadyExistsException) Message() string { +func (s *AlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4963,22 +5139,22 @@ func (s AlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlreadyExistsException) OrigErr() error { +func (s *AlreadyExistsException) OrigErr() error { return nil } -func (s AlreadyExistsException) Error() string { +func (s *AlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Contains DeleteAt and MoveToColdStorageAt timestamps, which are used to specify @@ -5160,13 +5336,13 @@ type CopyJob struct { // The size, in bytes, of a copy job. BackupSizeInBytes *int64 `type:"long"` - // The date and time a job to create a copy job is completed, in Unix format - // and Coordinated Universal Time (UTC). The value of CompletionDate is accurate - // to milliseconds. For example, the value 1516925490.087 represents Friday, - // January 26, 2018 12:11:30.087 AM. + // The date and time a copy job is completed, in Unix format and Coordinated + // Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. CompletionDate *time.Time `type:"timestamp"` - // Uniquely identifies a request to AWS Backup to copy a resource. + // Uniquely identifies a copy job. CopyJobId *string `type:"string"` // Contains information about the backup plan and rule that AWS Backup used @@ -5191,9 +5367,9 @@ type CopyJob struct { // arn:aws:iam::123456789012:role/S3Access. IamRoleArn *string `type:"string"` - // The type of AWS resource to be copied; for example, an Amazon Elastic Block - // Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon - // RDS) database. + // The AWS resource to be copied; for example, an Amazon Elastic Block Store + // (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) + // database. ResourceArn *string `type:"string"` // The type of AWS resource to be copied; for example, an Amazon Elastic Block @@ -5208,10 +5384,10 @@ type CopyJob struct { // An ARN that uniquely identifies a source recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. SourceRecoveryPointArn *string `type:"string"` - // The current state of a resource recovery point. + // The current state of a copy job. State *string `type:"string" enum:"CopyJobState"` - // A detailed message explaining the status of the job that to copy a resource. + // A detailed message explaining the status of the job to copy a resource. StatusMessage *string `type:"string"` } @@ -5393,7 +5569,7 @@ type CreateBackupPlanOutput struct { CreationDate *time.Time `type:"timestamp"` // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most - // 1024 bytes long. They cannot be edited. + // 1,024 bytes long. They cannot be edited. VersionId *string `type:"string"` } @@ -5902,7 +6078,7 @@ type DeleteBackupVaultInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and - // theAWS Region where they are created. They consist of lowercase letters, + // the AWS Region where they are created. They consist of lowercase letters, // numbers, and hyphens. // // BackupVaultName is a required field @@ -6092,8 +6268,8 @@ func (s DeleteRecoveryPointOutput) GoString() string { // A dependent AWS service or resource returned an error to the AWS Backup service, // and the action cannot be completed. type DependencyFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -6116,17 +6292,17 @@ func (s DependencyFailureException) GoString() string { func newErrorDependencyFailureException(v protocol.ResponseMetadata) error { return &DependencyFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DependencyFailureException) Code() string { +func (s *DependencyFailureException) Code() string { return "DependencyFailureException" } // Message returns the exception's message. -func (s DependencyFailureException) Message() string { +func (s *DependencyFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6134,22 +6310,22 @@ func (s DependencyFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DependencyFailureException) OrigErr() error { +func (s *DependencyFailureException) OrigErr() error { return nil } -func (s DependencyFailureException) Error() string { +func (s *DependencyFailureException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DependencyFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DependencyFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DependencyFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *DependencyFailureException) RequestID() string { + return s.RespMetadata.RequestID } type DescribeBackupJobInput struct { @@ -6254,7 +6430,7 @@ type DescribeBackupJobOutput struct { // on the resource type. ResourceArn *string `type:"string"` - // The type of AWS resource to be backed-up; for example, an Amazon Elastic + // The type of AWS resource to be backed up; for example, an Amazon Elastic // Block Store (Amazon EBS) volume or an Amazon Relational Database Service // (Amazon RDS) database. ResourceType *string `type:"string"` @@ -6511,7 +6687,7 @@ func (s *DescribeBackupVaultOutput) SetNumberOfRecoveryPoints(v int64) *Describe type DescribeCopyJobInput struct { _ struct{} `type:"structure"` - // Uniquely identifies a request to AWS Backup to copy a resource. + // Uniquely identifies a copy job. // // CopyJobId is a required field CopyJobId *string `location:"uri" locationName:"copyJobId" type:"string" required:"true"` @@ -6922,6 +7098,43 @@ func (s *DescribeRecoveryPointOutput) SetStorageClass(v string) *DescribeRecover return s } +type DescribeRegionSettingsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeRegionSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRegionSettingsInput) GoString() string { + return s.String() +} + +type DescribeRegionSettingsOutput struct { + _ struct{} `type:"structure"` + + // Returns a list of all services along with the opt-in preferences in the region. + ResourceTypeOptInPreference map[string]*bool `type:"map"` +} + +// String returns the string representation +func (s DescribeRegionSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRegionSettingsOutput) GoString() string { + return s.String() +} + +// SetResourceTypeOptInPreference sets the ResourceTypeOptInPreference field's value. +func (s *DescribeRegionSettingsOutput) SetResourceTypeOptInPreference(v map[string]*bool) *DescribeRegionSettingsOutput { + s.ResourceTypeOptInPreference = v + return s +} + type DescribeRestoreJobInput struct { _ struct{} `type:"structure"` @@ -7900,8 +8113,8 @@ func (s *GetSupportedResourceTypesOutput) SetResourceTypes(v []*string) *GetSupp // Indicates that something is wrong with a parameter's value. For example, // the value is out of range. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -7924,17 +8137,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7942,29 +8155,29 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // Indicates that something is wrong with the input to the request. For example, // a parameter is of the wrong type. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -7987,17 +8200,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8005,22 +8218,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Contains detailed information about a backup job. @@ -8085,7 +8298,7 @@ type Job struct { // on the resource type. ResourceArn *string `type:"string"` - // The type of AWS resource to be backed-up; for example, an Amazon Elastic + // The type of AWS resource to be backed up; for example, an Amazon Elastic // Block Store (Amazon EBS) volume or an Amazon Relational Database Service // (Amazon RDS) database. ResourceType *string `type:"string"` @@ -8263,8 +8476,8 @@ func (s *Lifecycle) SetMoveToColdStorageAfterDays(v int64) *Lifecycle { // A limit in the request has been exceeded; for example, a maximum number of // items allowed in a request. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -8287,17 +8500,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8305,22 +8518,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListBackupJobsInput struct { @@ -8958,8 +9171,6 @@ type ListCopyJobsInput struct { // Returns only backup jobs for the specified resources: // - // * DynamoDB for Amazon DynamoDB - // // * EBS for Amazon Elastic Block Store // // * EFS for Amazon Elastic File System @@ -9615,8 +9826,8 @@ func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { // Indicates that a required parameter is missing. type MissingParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -9639,17 +9850,17 @@ func (s MissingParameterValueException) GoString() string { func newErrorMissingParameterValueException(v protocol.ResponseMetadata) error { return &MissingParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MissingParameterValueException) Code() string { +func (s *MissingParameterValueException) Code() string { return "MissingParameterValueException" } // Message returns the exception's message. -func (s MissingParameterValueException) Message() string { +func (s *MissingParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9657,22 +9868,22 @@ func (s MissingParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MissingParameterValueException) OrigErr() error { +func (s *MissingParameterValueException) OrigErr() error { return nil } -func (s MissingParameterValueException) Error() string { +func (s *MissingParameterValueException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s MissingParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MissingParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MissingParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *MissingParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // Contains an optional backup plan display name and an array of BackupRule @@ -10441,8 +10652,8 @@ func (s *RecoveryPointCreator) SetBackupRuleId(v string) *RecoveryPointCreator { // A resource that is required for the action doesn't exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -10465,17 +10676,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10483,22 +10694,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains metadata about a restore job. @@ -10632,7 +10843,7 @@ type Rule struct { _ struct{} `type:"structure"` // A value in minutes after a backup job is successfully started before it must - // be completed or it is canceled by AWS Backup. This value is optional. + // be completed or it will be canceled by AWS Backup. This value is optional. CompletionWindowMinutes *int64 `type:"long"` // An array of CopyAction objects, which contains the details of the copy operation. @@ -10665,8 +10876,8 @@ type Rule struct { // A CRON expression specifying when AWS Backup initiates a backup job. ScheduleExpression *string `type:"string"` - // An optional value that specifies a period of time in minutes after a backup - // is scheduled before a job is canceled if it doesn't start successfully. + // A value in minutes after a backup is scheduled before a job will be canceled + // if it doesn't start successfully. This value is optional. StartWindowMinutes *int64 `type:"long"` // The name of a logical container where backups are stored. Backup vaults are @@ -10746,8 +10957,8 @@ func (s *Rule) SetTargetBackupVaultName(v string) *Rule { type RuleInput struct { _ struct{} `type:"structure"` - // The amount of time AWS Backup attempts a backup before canceling the job - // and returning an error. + // A value in minutes after a backup job is successfully started before it must + // be completed or it will be canceled by AWS Backup. This value is optional. CompletionWindowMinutes *int64 `type:"long"` // An array of CopyAction objects, which contains the details of the copy operation. @@ -10759,16 +10970,16 @@ type RuleInput struct { // // Backups transitioned to cold storage must be stored in cold storage for a // minimum of 90 days. Therefore, the “expire after days” setting must be - // 90 days greater than the “transition to cold after days”. The “transition - // to cold after days” setting cannot be changed after a backup has been transitioned - // to cold. + // 90 days greater than the “transition to cold after days” setting. The + // “transition to cold after days” setting cannot be changed after a backup + // has been transitioned to cold. Lifecycle *Lifecycle `type:"structure"` // To help organize your resources, you can assign your own metadata to the // resources that you create. Each tag is a key-value pair. RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` - // >An optional display name for a backup rule. + // An optional display name for a backup rule. // // RuleName is a required field RuleName *string `type:"string" required:"true"` @@ -10776,7 +10987,8 @@ type RuleInput struct { // A CRON expression specifying when AWS Backup initiates a backup job. ScheduleExpression *string `type:"string"` - // The amount of time in minutes before beginning a backup. + // A value in minutes after a backup is scheduled before a job will be canceled + // if it doesn't start successfully. This value is optional. StartWindowMinutes *int64 `type:"long"` // The name of a logical container where backups are stored. Backup vaults are @@ -11033,8 +11245,8 @@ func (s *SelectionsListMember) SetSelectionName(v string) *SelectionsListMember // The request failed due to a temporary failure of the server. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -11057,17 +11269,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11075,22 +11287,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type StartBackupJobInput struct { @@ -11104,8 +11316,8 @@ type StartBackupJobInput struct { // BackupVaultName is a required field BackupVaultName *string `type:"string" required:"true"` - // The amount of time AWS Backup attempts a backup before canceling the job - // and returning an error. + // A value in minutes after a backup job is successfully started before it must + // be completed or it will be canceled by AWS Backup. This value is optional. CompleteWindowMinutes *int64 `type:"long"` // Specifies the IAM role ARN used to create the target recovery point; for @@ -11139,7 +11351,8 @@ type StartBackupJobInput struct { // ResourceArn is a required field ResourceArn *string `type:"string" required:"true"` - // The amount of time in minutes before beginning a backup. + // A value in minutes after a backup is scheduled before a job will be canceled + // if it doesn't start successfully. This value is optional. StartWindowMinutes *int64 `type:"long"` } @@ -11302,7 +11515,7 @@ type StartCopyJobInput struct { // The name of a logical source container where backups are stored. Backup vaults // are identified by names that are unique to the account used to create them // and the AWS Region where they are created. They consist of lowercase letters, - // numbers, and hyphens. > + // numbers, and hyphens. // // SourceBackupVaultName is a required field SourceBackupVaultName *string `type:"string" required:"true"` @@ -11379,13 +11592,13 @@ func (s *StartCopyJobInput) SetSourceBackupVaultName(v string) *StartCopyJobInpu type StartCopyJobOutput struct { _ struct{} `type:"structure"` - // Uniquely identifies a request to AWS Backup to copy a resource. + // Uniquely identifies a copy job. CopyJobId *string `type:"string"` - // The date and time that a backup job is started, in Unix format and Coordinated + // The date and time that a copy job is started, in Unix format and Coordinated // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. > + // 12:11:30.087 AM. CreationDate *time.Time `type:"timestamp"` } @@ -11427,11 +11640,11 @@ type StartRestoreJobInput struct { // A set of metadata key-value pairs. Contains information, such as a resource // name, required to restore a recovery point. // - // You can get configuration metadata about a resource at the time it was backed-up - // by calling GetRecoveryPointRestoreMetadata. However, values in addition to - // those provided by GetRecoveryPointRestoreMetadata might be required to restore - // a resource. For example, you might need to provide a new resource name if - // the original already exists. + // You can get configuration metadata about a resource at the time it was backed + // up by calling GetRecoveryPointRestoreMetadata. However, values in addition + // to those provided by GetRecoveryPointRestoreMetadata might be required to + // restore a resource. For example, you might need to provide a new resource + // name if the original already exists. // // You need to specify specific metadata to restore an Amazon Elastic File System // (Amazon EFS) instance: @@ -12008,6 +12221,43 @@ func (s *UpdateRecoveryPointLifecycleOutput) SetRecoveryPointArn(v string) *Upda return s } +type UpdateRegionSettingsInput struct { + _ struct{} `type:"structure"` + + // Updates the list of services along with the opt-in preferences for the region. + ResourceTypeOptInPreference map[string]*bool `type:"map"` +} + +// String returns the string representation +func (s UpdateRegionSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRegionSettingsInput) GoString() string { + return s.String() +} + +// SetResourceTypeOptInPreference sets the ResourceTypeOptInPreference field's value. +func (s *UpdateRegionSettingsInput) SetResourceTypeOptInPreference(v map[string]*bool) *UpdateRegionSettingsInput { + s.ResourceTypeOptInPreference = v + return s +} + +type UpdateRegionSettingsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateRegionSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRegionSettingsOutput) GoString() string { + return s.String() +} + // Contains metadata about a backup vault. type VaultListMember struct { _ struct{} `type:"structure"` 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 c2fba8ec066..025c323950d 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 @@ -1978,8 +1978,8 @@ func (s CancelJobOutput) GoString() string { // or resource on behalf of a user that doesn't have permissions to use the // action or resource, or specifying an identifier that is not valid. type ClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1996,17 +1996,17 @@ func (s ClientException) GoString() string { func newErrorClientException(v protocol.ResponseMetadata) error { return &ClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientException) Code() string { +func (s *ClientException) Code() string { return "ClientException" } // Message returns the exception's message. -func (s ClientException) Message() string { +func (s *ClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2014,22 +2014,22 @@ func (s ClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientException) OrigErr() error { +func (s *ClientException) OrigErr() error { return nil } -func (s ClientException) Error() string { +func (s *ClientException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing an AWS Batch compute environment. @@ -5510,8 +5510,8 @@ func (s *RetryStrategy) SetAttempts(v int64) *RetryStrategy { // These errors are usually caused by a server issue. type ServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5528,17 +5528,17 @@ func (s ServerException) GoString() string { func newErrorServerException(v protocol.ResponseMetadata) error { return &ServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerException) Code() string { +func (s *ServerException) Code() string { return "ServerException" } // Message returns the exception's message. -func (s ServerException) Message() string { +func (s *ServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5546,22 +5546,22 @@ func (s ServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerException) OrigErr() error { +func (s *ServerException) OrigErr() error { return nil } -func (s ServerException) Error() string { +func (s *ServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerException) RequestID() string { + return s.RespMetadata.RequestID } type SubmitJobInput struct { 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 d5a922714db..0673e50561e 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 @@ -1318,8 +1318,8 @@ func (c *Budgets) UpdateSubscriberWithContext(ctx aws.Context, input *UpdateSubs // You are not authorized to use this operation with the given parameters. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -1337,17 +1337,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1355,22 +1355,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the output of the CreateBudget operation. The content consists @@ -2260,8 +2260,8 @@ func (s CreateSubscriberOutput) GoString() string { // You've exceeded the notification or subscriber limit. type CreationLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -2279,17 +2279,17 @@ func (s CreationLimitExceededException) GoString() string { func newErrorCreationLimitExceededException(v protocol.ResponseMetadata) error { return &CreationLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CreationLimitExceededException) Code() string { +func (s *CreationLimitExceededException) Code() string { return "CreationLimitExceededException" } // Message returns the exception's message. -func (s CreationLimitExceededException) Message() string { +func (s *CreationLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2297,22 +2297,22 @@ func (s CreationLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CreationLimitExceededException) OrigErr() error { +func (s *CreationLimitExceededException) OrigErr() error { return nil } -func (s CreationLimitExceededException) Error() string { +func (s *CreationLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CreationLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CreationLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CreationLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CreationLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Request of DeleteBudget @@ -3163,8 +3163,8 @@ func (s *DescribeSubscribersForNotificationOutput) SetSubscribers(v []*Subscribe // The budget name already exists. Budget names must be unique within an account. type DuplicateRecordException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -3182,17 +3182,17 @@ func (s DuplicateRecordException) GoString() string { func newErrorDuplicateRecordException(v protocol.ResponseMetadata) error { return &DuplicateRecordException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateRecordException) Code() string { +func (s *DuplicateRecordException) Code() string { return "DuplicateRecordException" } // Message returns the exception's message. -func (s DuplicateRecordException) Message() string { +func (s *DuplicateRecordException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3200,28 +3200,28 @@ func (s DuplicateRecordException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateRecordException) OrigErr() error { +func (s *DuplicateRecordException) OrigErr() error { return nil } -func (s DuplicateRecordException) Error() string { +func (s *DuplicateRecordException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateRecordException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateRecordException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateRecordException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateRecordException) RequestID() string { + return s.RespMetadata.RequestID } // The pagination token expired. type ExpiredNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -3239,17 +3239,17 @@ func (s ExpiredNextTokenException) GoString() string { func newErrorExpiredNextTokenException(v protocol.ResponseMetadata) error { return &ExpiredNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExpiredNextTokenException) Code() string { +func (s *ExpiredNextTokenException) Code() string { return "ExpiredNextTokenException" } // Message returns the exception's message. -func (s ExpiredNextTokenException) Message() string { +func (s *ExpiredNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3257,29 +3257,29 @@ func (s ExpiredNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExpiredNextTokenException) OrigErr() error { +func (s *ExpiredNextTokenException) OrigErr() error { return nil } -func (s ExpiredNextTokenException) Error() string { +func (s *ExpiredNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExpiredNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExpiredNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExpiredNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExpiredNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // An error on the server occurred during the processing of your request. Try // again later. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -3297,17 +3297,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3315,28 +3315,28 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The pagination token is invalid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -3354,17 +3354,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3372,29 +3372,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // An error on the client occurred. Typically, the cause is an invalid input // value. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -3412,17 +3412,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3430,28 +3430,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // We can’t locate the resource that you specified. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message the exception carries. Message_ *string `locationName:"Message" type:"string"` @@ -3469,17 +3469,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3487,22 +3487,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A notification that is associated with a budget. A budget can have up to 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 fb8066d8aa6..fd1fea5ce78 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 @@ -1369,8 +1369,8 @@ func (c *Cloud9) UpdateEnvironmentMembershipWithContext(ctx aws.Context, input * // The target request is invalid. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1387,17 +1387,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1405,28 +1405,28 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // A conflict occurred. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1443,17 +1443,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1461,22 +1461,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } type CreateEnvironmentEC2Input struct { @@ -2318,8 +2318,8 @@ func (s *EnvironmentMember) SetUserId(v string) *EnvironmentMember { // An access permissions issue occurred. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2336,17 +2336,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2354,28 +2354,28 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // An internal server error occurred. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2392,17 +2392,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2410,28 +2410,28 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // A service limit was exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2448,17 +2448,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2466,22 +2466,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListEnvironmentsInput struct { @@ -2620,8 +2620,8 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput // The target resource cannot be found. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2638,17 +2638,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2656,22 +2656,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Metadata that is associated with AWS resources. In particular, a name-value @@ -2813,8 +2813,8 @@ func (s TagResourceOutput) GoString() string { // Too many service requests were made over the given time period. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2831,17 +2831,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2849,22 +2849,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 d4fbccb7ec2..a5761751c29 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 @@ -437,7 +437,7 @@ func (c *CloudFormation) CreateStackInstancesRequest(input *CreateStackInstances // CreateStackInstances API operation for AWS CloudFormation. // // Creates stack instances for the specified accounts, within the specified -// regions. A stack instance refers to a stack in a specific account and region. +// Regions. A stack instance refers to a stack in a specific account and Region. // You must specify at least one value for either Accounts or DeploymentTargets, // and you must specify at least one value for Regions. // @@ -794,7 +794,7 @@ func (c *CloudFormation) DeleteStackInstancesRequest(input *DeleteStackInstances // DeleteStackInstances API operation for AWS CloudFormation. // -// Deletes stack instances for the specified accounts, in the specified regions. +// Deletes stack instances for the specified accounts, in the specified Regions. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1055,6 +1055,12 @@ func (c *CloudFormation) DescribeAccountLimitsRequest(input *DescribeAccountLimi Name: opDescribeAccountLimits, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { @@ -1101,6 +1107,58 @@ func (c *CloudFormation) DescribeAccountLimitsWithContext(ctx aws.Context, input return out, req.Send() } +// DescribeAccountLimitsPages iterates over the pages of a DescribeAccountLimits operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeAccountLimits 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 DescribeAccountLimits operation. +// pageNum := 0 +// err := client.DescribeAccountLimitsPages(params, +// func(page *cloudformation.DescribeAccountLimitsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) DescribeAccountLimitsPages(input *DescribeAccountLimitsInput, fn func(*DescribeAccountLimitsOutput, bool) bool) error { + return c.DescribeAccountLimitsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeAccountLimitsPagesWithContext same as DescribeAccountLimitsPages 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 *CloudFormation) DescribeAccountLimitsPagesWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, fn func(*DescribeAccountLimitsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeAccountLimitsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeAccountLimitsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeAccountLimitsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeChangeSet = "DescribeChangeSet" // DescribeChangeSetRequest generates a "aws/request.Request" representing the @@ -1452,7 +1510,7 @@ func (c *CloudFormation) DescribeStackInstanceRequest(input *DescribeStackInstan // DescribeStackInstance API operation for AWS CloudFormation. // // Returns the stack instance that's associated with the specified stack set, -// AWS account, and region. +// AWS account, and Region. // // For a list of stack instances that are associated with a specific stack set, // use ListStackInstances. @@ -3038,6 +3096,12 @@ func (c *CloudFormation) ListChangeSetsRequest(input *ListChangeSetsInput) (req Name: opListChangeSets, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { @@ -3083,6 +3147,58 @@ func (c *CloudFormation) ListChangeSetsWithContext(ctx aws.Context, input *ListC return out, req.Send() } +// ListChangeSetsPages iterates over the pages of a ListChangeSets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListChangeSets 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 ListChangeSets operation. +// pageNum := 0 +// err := client.ListChangeSetsPages(params, +// func(page *cloudformation.ListChangeSetsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) ListChangeSetsPages(input *ListChangeSetsInput, fn func(*ListChangeSetsOutput, bool) bool) error { + return c.ListChangeSetsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListChangeSetsPagesWithContext same as ListChangeSetsPages 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 *CloudFormation) ListChangeSetsPagesWithContext(ctx aws.Context, input *ListChangeSetsInput, fn func(*ListChangeSetsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListChangeSetsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListChangeSetsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListChangeSetsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListExports = "ListExports" // ListExportsRequest generates a "aws/request.Request" representing the @@ -3133,7 +3249,7 @@ func (c *CloudFormation) ListExportsRequest(input *ListExportsInput) (req *reque // ListExports API operation for AWS CloudFormation. // -// Lists all exported output values in the account and region in which you call +// Lists all exported output values in the account and Region in which you call // this action. Use this action to see the exported output values that you can // import into other stacks. To import values, use the Fn::ImportValue (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html) // function. @@ -3389,6 +3505,12 @@ func (c *CloudFormation) ListStackInstancesRequest(input *ListStackInstancesInpu Name: opListStackInstances, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -3404,7 +3526,7 @@ func (c *CloudFormation) ListStackInstancesRequest(input *ListStackInstancesInpu // // Returns summary information about stack instances that are associated with // the specified stack set. You can filter for stack instances that are associated -// with a specific AWS account name or region. +// with a specific AWS account name or 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 @@ -3439,6 +3561,58 @@ func (c *CloudFormation) ListStackInstancesWithContext(ctx aws.Context, input *L return out, req.Send() } +// ListStackInstancesPages iterates over the pages of a ListStackInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListStackInstances 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 ListStackInstances operation. +// pageNum := 0 +// err := client.ListStackInstancesPages(params, +// func(page *cloudformation.ListStackInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) ListStackInstancesPages(input *ListStackInstancesInput, fn func(*ListStackInstancesOutput, bool) bool) error { + return c.ListStackInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListStackInstancesPagesWithContext same as ListStackInstancesPages 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 *CloudFormation) ListStackInstancesPagesWithContext(ctx aws.Context, input *ListStackInstancesInput, fn func(*ListStackInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListStackInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListStackInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListStackInstancesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListStackResources = "ListStackResources" // ListStackResourcesRequest generates a "aws/request.Request" representing the @@ -3605,6 +3779,12 @@ func (c *CloudFormation) ListStackSetOperationResultsRequest(input *ListStackSet Name: opListStackSetOperationResults, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -3656,6 +3836,58 @@ func (c *CloudFormation) ListStackSetOperationResultsWithContext(ctx aws.Context return out, req.Send() } +// ListStackSetOperationResultsPages iterates over the pages of a ListStackSetOperationResults operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListStackSetOperationResults 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 ListStackSetOperationResults operation. +// pageNum := 0 +// err := client.ListStackSetOperationResultsPages(params, +// func(page *cloudformation.ListStackSetOperationResultsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) ListStackSetOperationResultsPages(input *ListStackSetOperationResultsInput, fn func(*ListStackSetOperationResultsOutput, bool) bool) error { + return c.ListStackSetOperationResultsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListStackSetOperationResultsPagesWithContext same as ListStackSetOperationResultsPages 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 *CloudFormation) ListStackSetOperationResultsPagesWithContext(ctx aws.Context, input *ListStackSetOperationResultsInput, fn func(*ListStackSetOperationResultsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListStackSetOperationResultsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListStackSetOperationResultsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListStackSetOperationResultsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListStackSetOperations = "ListStackSetOperations" // ListStackSetOperationsRequest generates a "aws/request.Request" representing the @@ -3687,6 +3919,12 @@ func (c *CloudFormation) ListStackSetOperationsRequest(input *ListStackSetOperat Name: opListStackSetOperations, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -3735,6 +3973,58 @@ func (c *CloudFormation) ListStackSetOperationsWithContext(ctx aws.Context, inpu return out, req.Send() } +// ListStackSetOperationsPages iterates over the pages of a ListStackSetOperations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListStackSetOperations 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 ListStackSetOperations operation. +// pageNum := 0 +// err := client.ListStackSetOperationsPages(params, +// func(page *cloudformation.ListStackSetOperationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) ListStackSetOperationsPages(input *ListStackSetOperationsInput, fn func(*ListStackSetOperationsOutput, bool) bool) error { + return c.ListStackSetOperationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListStackSetOperationsPagesWithContext same as ListStackSetOperationsPages 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 *CloudFormation) ListStackSetOperationsPagesWithContext(ctx aws.Context, input *ListStackSetOperationsInput, fn func(*ListStackSetOperationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListStackSetOperationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListStackSetOperationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListStackSetOperationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListStackSets = "ListStackSets" // ListStackSetsRequest generates a "aws/request.Request" representing the @@ -3766,6 +4056,12 @@ func (c *CloudFormation) ListStackSetsRequest(input *ListStackSetsInput) (req *r Name: opListStackSets, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -3810,6 +4106,58 @@ func (c *CloudFormation) ListStackSetsWithContext(ctx aws.Context, input *ListSt return out, req.Send() } +// ListStackSetsPages iterates over the pages of a ListStackSets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListStackSets 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 ListStackSets operation. +// pageNum := 0 +// err := client.ListStackSetsPages(params, +// func(page *cloudformation.ListStackSetsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) ListStackSetsPages(input *ListStackSetsInput, fn func(*ListStackSetsOutput, bool) bool) error { + return c.ListStackSetsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListStackSetsPagesWithContext same as ListStackSetsPages 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 *CloudFormation) ListStackSetsPagesWithContext(ctx aws.Context, input *ListStackSetsInput, fn func(*ListStackSetsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListStackSetsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListStackSetsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListStackSetsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListStacks = "ListStacks" // ListStacksRequest generates a "aws/request.Request" representing the @@ -4503,6 +4851,10 @@ func (c *CloudFormation) RegisterTypeRequest(input *RegisterTypeInput) (req *req // see Creating Resource Providers (https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-types.html) // in the CloudFormation CLI User Guide. // +// You can have a maximum of 50 resource type versions registered at a time. +// This maximum is per account and per region. Use DeregisterType (AWSCloudFormation/latest/APIReference/API_DeregisterType.html) +// to deregister specific resource type versions if necessary. +// // Once you have initiated a registration request using RegisterType , you can // use DescribeTypeRegistration to monitor the progress of the registration // request. @@ -5001,10 +5353,10 @@ func (c *CloudFormation) UpdateStackInstancesRequest(input *UpdateStackInstances // UpdateStackInstances API operation for AWS CloudFormation. // // Updates the parameter values for stack instances for the specified accounts, -// within the specified regions. A stack instance refers to a stack in a specific -// account and region. +// within the specified Regions. A stack instance refers to a stack in a specific +// account and Region. // -// You can only update stack instances in regions and accounts where they already +// You can only update stack instances in Regions and accounts where they already // exist; to create additional stack instances, use CreateStackInstances (https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStackInstances.html). // // During stack set updates, any parameters overridden for a stack instance @@ -5114,7 +5466,7 @@ func (c *CloudFormation) UpdateStackSetRequest(input *UpdateStackSetInput) (req // UpdateStackSet API operation for AWS CloudFormation. // // Updates the stack set, and associated stack instances in the specified accounts -// and regions. +// and Regions. // // Even if the stack set operation created by updating the stack set fails (completely // or partially, below or above a specified failure tolerance), the stack set @@ -5332,15 +5684,15 @@ func (c *CloudFormation) ValidateTemplateWithContext(ctx aws.Context, input *Val // Structure that contains the results of the account gate function which AWS // CloudFormation invokes, if present, before proceeding with a stack set operation -// in an account and region. +// in an account and Region. // -// For each account and region, AWS CloudFormation lets you specify a Lamdba +// For each account and Region, AWS CloudFormation lets you specify a Lamdba // function that encapsulates any requirements that must be met before CloudFormation -// can proceed with a stack set operation in that account and region. CloudFormation +// can proceed with a stack set operation in that account and Region. CloudFormation // invokes the function each time a stack set operation is requested for that -// account and region; if the function returns FAILED, CloudFormation cancels -// the operation in that account and region, and sets the stack set operation -// result status for that account and region to FAILED. +// account and Region; if the function returns FAILED, CloudFormation cancels +// the operation in that account and Region, and sets the stack set operation +// result status for that account and Region to FAILED. // // For more information, see Configuring a target account gate (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-account-gating.html). type AccountGateResult struct { @@ -5349,28 +5701,28 @@ type AccountGateResult struct { // The status of the account gate function. // // * SUCCEEDED: The account gate function has determined that the account - // and region passes any requirements for a stack set operation to occur. + // and Region passes any requirements for a stack set operation to occur. // AWS CloudFormation proceeds with the stack operation in that account and - // region. + // Region. // // * FAILED: The account gate function has determined that the account and - // region does not meet the requirements for a stack set operation to occur. + // Region does not meet the requirements for a stack set operation to occur. // AWS CloudFormation cancels the stack set operation in that account and - // region, and sets the stack set operation result status for that account - // and region to FAILED. + // Region, and sets the stack set operation result status for that account + // and Region to FAILED. // // * SKIPPED: AWS CloudFormation has skipped calling the account gate function - // for this account and region, for one of the following reasons: An account - // gate function has not been specified for the account and region. AWS CloudFormation - // proceeds with the stack set operation in this account and region. The + // for this account and Region, for one of the following reasons: An account + // gate function has not been specified for the account and Region. AWS CloudFormation + // proceeds with the stack set operation in this account and Region. The // AWSCloudFormationStackSetExecutionRole of the stack set adminstration // account lacks permissions to invoke the function. AWS CloudFormation proceeds - // with the stack set operation in this account and region. Either no action + // with the stack set operation in this account and Region. Either no action // is necessary, or no action is possible, on the stack. AWS CloudFormation - // skips the stack set operation in this account and region. + // skips the stack set operation in this account and Region. Status *string `type:"string" enum:"AccountGateStatus"` - // The reason for the account gate status assigned to this account and region + // The reason for the account gate status assigned to this account and Region // for the stack set operation. StatusReason *string `type:"string"` } @@ -6327,7 +6679,7 @@ type CreateStackInput struct { RollbackConfiguration *RollbackConfiguration `type:"structure"` // The name that is associated with the stack. The name must be unique in the - // region in which you are creating the stack. + // Region in which you are creating the stack. // // A stack name can contain only alphanumeric characters (case sensitive) and // hyphens. It must start with an alphabetic character and cannot be longer @@ -6343,7 +6695,7 @@ type CreateStackInput struct { StackPolicyBody *string `min:"1" type:"string"` // Location of a file containing the stack policy. The URL must point to a policy - // (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. + // (maximum size: 16 KB) located in an S3 bucket in the same Region as the stack. // You can specify either the StackPolicyBody or the StackPolicyURL parameter, // but not both. StackPolicyURL *string `min:"1" type:"string"` @@ -6542,7 +6894,7 @@ type CreateStackInstancesInput struct { _ struct{} `type:"structure"` // [Self-managed permissions] The names of one or more AWS accounts that you - // want to create stack instances in the specified region(s) for. + // want to create stack instances in the specified Region(s) for. // // You can specify Accounts or DeploymentTargets, but not both. Accounts []*string `type:"list"` @@ -6573,7 +6925,7 @@ type CreateStackInstancesInput struct { // stack instances. // // Any overridden parameter values will be applied to all stack instances in - // the specified accounts and regions. When specifying parameters and their + // the specified accounts and Regions. When specifying parameters and their // values, be aware of how AWS CloudFormation sets parameter values during stack // instance operations: // @@ -6599,7 +6951,7 @@ type CreateStackInstancesInput struct { // to update the stack set template. ParameterOverrides []*Parameter `type:"list"` - // The names of one or more regions where you want to create stack instances + // The names of one or more Regions where you want to create stack instances // using the specified AWS account(s). // // Regions is a required field @@ -6751,8 +7103,6 @@ type CreateStackSetInput struct { // Describes whether StackSets automatically deploys to AWS Organizations accounts // that are added to the target organization or organizational unit (OU). Specify // only if PermissionModel is SERVICE_MANAGED. - // - // If you specify AutoDeployment, do not specify DeploymentTargets or Regions. AutoDeployment *AutoDeployment `type:"structure"` // In some cases, you must explicitly acknowledge that your stack set template @@ -6832,7 +7182,7 @@ type CreateStackSetInput struct { PermissionModel *string `type:"string" enum:"PermissionModels"` // The name to associate with the stack set. The name must be unique in the - // region where you create your stack set. + // Region where you create your stack set. // // A stack name can contain only alphanumeric characters (case-sensitive) and // hyphens. It must start with an alphabetic character and can't be longer than @@ -7215,7 +7565,7 @@ type DeleteStackInstancesInput struct { // Preferences for how AWS CloudFormation performs this stack set operation. OperationPreferences *StackSetOperationPreferences `type:"structure"` - // The regions where you want to delete stack set instances. + // The Regions where you want to delete stack set instances. // // Regions is a required field Regions []*string `type:"list" required:"true"` @@ -7406,7 +7756,9 @@ func (s DeleteStackSetOutput) GoString() string { } // [Service-managed permissions] The AWS Organizations accounts to which StackSets -// deploys. +// deploys. StackSets does not deploy stack instances to the organization master +// account, even if the master account is in your organization or in an OU in +// your organization. // // For update operations, you can specify either Accounts or OrganizationalUnitIds. // For create and delete operations, specify OrganizationalUnitIds. @@ -7417,7 +7769,7 @@ type DeploymentTargets struct { // set updates. Accounts []*string `type:"list"` - // The organization root ID or organizational unit (OUs) IDs to which StackSets + // The organization root ID or organizational unit (OU) IDs to which StackSets // deploys. OrganizationalUnitIds []*string `type:"list"` } @@ -8107,7 +8459,7 @@ type DescribeStackInstanceInput struct { // StackInstanceAccount is a required field StackInstanceAccount *string `type:"string" required:"true"` - // The name of a region that's associated with this stack instance. + // The name of a Region that's associated with this stack instance. // // StackInstanceRegion is a required field StackInstanceRegion *string `type:"string" required:"true"` @@ -8847,6 +9199,9 @@ type DescribeTypeOutput struct { // role to provide your resource type with the appropriate credentials. ExecutionRoleArn *string `min:"1" type:"string"` + // Whether the specified type version is set as the default version. + IsDefaultVersion *bool `type:"boolean"` + // When the specified type version was registered. LastUpdated *time.Time `type:"timestamp"` @@ -8948,6 +9303,12 @@ func (s *DescribeTypeOutput) SetExecutionRoleArn(v string) *DescribeTypeOutput { return s } +// SetIsDefaultVersion sets the IsDefaultVersion field's value. +func (s *DescribeTypeOutput) SetIsDefaultVersion(v bool) *DescribeTypeOutput { + s.IsDefaultVersion = &v + return s +} + // SetLastUpdated sets the LastUpdated field's value. func (s *DescribeTypeOutput) SetLastUpdated(v time.Time) *DescribeTypeOutput { s.LastUpdated = &v @@ -10232,7 +10593,7 @@ type ListStackInstancesInput struct { // The name of the AWS account that you want to list stack instances for. StackInstanceAccount *string `type:"string"` - // The name of the region where you want to list stack instances. + // The name of the Region where you want to list stack instances. StackInstanceRegion *string `type:"string"` // The name or unique ID of the stack set that you want to list stack instances @@ -10528,7 +10889,7 @@ type ListStackSetOperationResultsOutput struct { NextToken *string `min:"1" type:"string"` // A list of StackSetOperationResultSummary structures that contain information - // about the specified operation results, for accounts and regions that are + // about the specified operation results, for accounts and Regions that are // included in the operation. Summaries []*StackSetOperationResultSummary `type:"list"` } @@ -12488,7 +12849,7 @@ type SetStackPolicyInput struct { StackPolicyBody *string `min:"1" type:"string"` // Location of a file containing the stack policy. The URL must point to a policy - // (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. + // (maximum size: 16 KB) located in an S3 bucket in the same Region as the stack. // You can specify either the StackPolicyBody or the StackPolicyURL parameter, // but not both. StackPolicyURL *string `min:"1" type:"string"` @@ -13236,9 +13597,9 @@ func (s *StackEvent) SetTimestamp(v time.Time) *StackEvent { return s } -// An AWS CloudFormation stack, in a specific account and region, that's part +// An AWS CloudFormation stack, in a specific account and Region, that's part // of a stack set operation. A stack instance is a reference to an attempted -// or actual stack in a given account within a given region. A stack instance +// or actual stack in a given account within a given Region. A stack instance // can exist without a stack—for example, if the stack couldn't be created // for some reason. A stack instance is associated with only one stack set. // Each stack instance contains the ID of its associated stack set, as well @@ -13272,15 +13633,14 @@ type StackInstance struct { // which drift detection has not yet been performed. LastDriftCheckTimestamp *time.Time `type:"timestamp"` - // [Service-managed permissions] The organization root ID or organizational - // unit (OU) ID that the stack instance is associated with. + // Reserved for internal use. No data returned. OrganizationalUnitId *string `type:"string"` // A list of parameters from the stack set template whose values have been overridden // in this stack instance. ParameterOverrides []*Parameter `type:"list"` - // The name of the AWS region that the stack instance is associated with. + // The name of the AWS Region that the stack instance is associated with. Region *string `type:"string"` // The ID of the stack instance. @@ -13412,11 +13772,10 @@ type StackInstanceSummary struct { // which drift detection has not yet been performed. LastDriftCheckTimestamp *time.Time `type:"timestamp"` - // [Service-managed permissions] The organization root ID or organizational - // unit (OU) ID that the stack instance is associated with. + // Reserved for internal use. No data returned. OrganizationalUnitId *string `type:"string"` - // The name of the AWS region that the stack instance is associated with. + // The name of the AWS Region that the stack instance is associated with. Region *string `type:"string"` // The ID of the stack instance. @@ -14109,7 +14468,7 @@ func (s *StackResourceSummary) SetResourceType(v string) *StackResourceSummary { } // A structure that contains information about a stack set. A stack set enables -// you to provision stacks into AWS accounts and across regions by using a single +// you to provision stacks into AWS accounts and across Regions by using a single // CloudFormation template. In the stack set, you specify the template to use, // as well as any parameters and capabilities that the template requires. type StackSet struct { @@ -14146,8 +14505,7 @@ type StackSet struct { // groups can include in their stack sets. ExecutionRoleName *string `min:"1" type:"string"` - // [Service-managed permissions] The organization root ID or organizational - // unit (OUs) IDs to which stacks in your stack set have been deployed. + // Reserved for internal use. No data returned. OrganizationalUnitIds []*string `type:"list"` // A list of input parameters for a stack set. @@ -14454,7 +14812,7 @@ type StackSetOperation struct { // 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 - // work for the operation, such as dispatching the work to the requested regions, + // work for the operation, such as dispatching the work to the requested Regions, // before actually creating the first stacks. CreationTimestamp *time.Time `type:"timestamp"` @@ -14463,8 +14821,8 @@ type StackSetOperation struct { DeploymentTargets *DeploymentTargets `type:"structure"` // The time at which the stack set operation ended, across all accounts and - // regions specified. Note that this doesn't necessarily mean that the stack - // set operation was successful, or even attempted, in each account or region. + // Regions specified. Note that this doesn't necessarily mean that the stack + // set operation was successful, or even attempted, in each account or Region. EndTimestamp *time.Time `type:"timestamp"` // The name of the IAM execution role used to create or update the stack set. @@ -14503,14 +14861,14 @@ type StackSetOperation struct { // // * FAILED: The operation exceeded the specified failure tolerance. The // failure tolerance value that you've set for an operation is applied for - // each region during stack create and update operations. If the number of - // failed stacks within a region exceeds the failure tolerance, the status - // of the operation in the region is set to FAILED. This in turn sets the + // each Region during stack create and update operations. If the number of + // failed stacks within a Region exceeds the failure tolerance, the status + // of the operation in the Region is set to FAILED. This in turn sets the // status of the operation as a whole to FAILED, and AWS CloudFormation cancels - // the operation in any remaining regions. + // the operation in any remaining Regions. // // * QUEUED: [Service-managed permissions] For automatic deployments that - // require a sequence of operations. The operation is queued to be performed. + // require a sequence of operations, the operation is queued to be performed. // For more information, see the stack set operation status codes (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-status-codes) // in the AWS CloudFormation User Guide. // @@ -14615,19 +14973,19 @@ func (s *StackSetOperation) SetStatus(v string) *StackSetOperation { type StackSetOperationPreferences struct { _ struct{} `type:"structure"` - // The number of accounts, per region, for which this operation can fail before - // AWS CloudFormation stops the operation in that region. If the operation is - // stopped in a region, AWS CloudFormation doesn't attempt the operation in - // any subsequent regions. + // The number of accounts, per Region, for which this operation can fail before + // AWS CloudFormation stops the operation in that Region. If the operation is + // stopped in a Region, AWS CloudFormation doesn't attempt the operation in + // any subsequent Regions. // // Conditional: You must specify either FailureToleranceCount or FailureTolerancePercentage // (but not both). FailureToleranceCount *int64 `type:"integer"` - // The percentage of accounts, per region, for which this stack operation can - // fail before AWS CloudFormation stops the operation in that region. If the - // operation is stopped in a region, AWS CloudFormation doesn't attempt the - // operation in any subsequent regions. + // The percentage of accounts, per Region, for which this stack operation can + // fail before AWS CloudFormation stops the operation in that Region. If the + // operation is stopped in a Region, AWS CloudFormation doesn't attempt the + // operation in any subsequent Regions. // // When calculating the number of accounts based on the specified percentage, // AWS CloudFormation rounds down to the next whole number. @@ -14664,7 +15022,7 @@ type StackSetOperationPreferences struct { // but not both. MaxConcurrentPercentage *int64 `min:"1" type:"integer"` - // The order of the regions in where you want to perform the stack operation. + // The order of the Regions in where you want to perform the stack operation. RegionOrder []*string `type:"list"` } @@ -14725,7 +15083,7 @@ func (s *StackSetOperationPreferences) SetRegionOrder(v []*string) *StackSetOper } // The structure that contains information about a specified operation's results -// for a given account in a given region. +// for a given account in a given Region. type StackSetOperationResultSummary struct { _ struct{} `type:"structure"` @@ -14737,31 +15095,30 @@ type StackSetOperationResultSummary struct { // before proceeding with stack set operations in an account AccountGateResult *AccountGateResult `type:"structure"` - // [Service-managed permissions] The organization root ID or organizational - // unit (OU) ID for this operation result. + // Reserved for internal use. No data returned. OrganizationalUnitId *string `type:"string"` - // The name of the AWS region for this operation result. + // The name of the AWS Region for this operation result. Region *string `type:"string"` // The result status of the stack set operation for the given account in the - // given region. + // given Region. // - // * CANCELLED: The operation in the specified account and region has been + // * CANCELLED: The operation in the specified account and Region has been // cancelled. This is either because a user has stopped the stack set operation, // or because the failure tolerance of the stack set operation has been exceeded. // - // * FAILED: The operation in the specified account and region failed. If - // the stack set operation fails in enough accounts within a region, the + // * FAILED: The operation in the specified account and Region failed. If + // the stack set operation fails in enough accounts within a Region, the // failure tolerance for the stack set operation as a whole might be exceeded. // - // * RUNNING: The operation in the specified account and region is currently + // * RUNNING: The operation in the specified account and Region is currently // in progress. // - // * PENDING: The operation in the specified account and region has yet to + // * PENDING: The operation in the specified account and Region has yet to // start. // - // * SUCCEEDED: The operation in the specified account and region completed + // * SUCCEEDED: The operation in the specified account and Region completed // successfully. Status *string `type:"string" enum:"StackSetOperationResultStatus"` @@ -14828,13 +15185,13 @@ type StackSetOperationSummary struct { // 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 - // work for the operation, such as dispatching the work to the requested regions, + // work for the operation, such as dispatching the work to the requested Regions, // before actually creating the first stacks. CreationTimestamp *time.Time `type:"timestamp"` // The time at which the stack set operation ended, across all accounts and - // regions specified. Note that this doesn't necessarily mean that the stack - // set operation was successful, or even attempted, in each account or region. + // Regions specified. Note that this doesn't necessarily mean that the stack + // set operation was successful, or even attempted, in each account or Region. EndTimestamp *time.Time `type:"timestamp"` // The unique ID of the stack set operation. @@ -14844,14 +15201,14 @@ type StackSetOperationSummary struct { // // * FAILED: The operation exceeded the specified failure tolerance. The // failure tolerance value that you've set for an operation is applied for - // each region during stack create and update operations. If the number of - // failed stacks within a region exceeds the failure tolerance, the status - // of the operation in the region is set to FAILED. This in turn sets the + // each Region during stack create and update operations. If the number of + // failed stacks within a Region exceeds the failure tolerance, the status + // of the operation in the Region is set to FAILED. This in turn sets the // status of the operation as a whole to FAILED, and AWS CloudFormation cancels - // the operation in any remaining regions. + // the operation in any remaining Regions. // // * QUEUED: [Service-managed permissions] For automatic deployments that - // require a sequence of operations. The operation is queued to be performed. + // require a sequence of operations, the operation is queued to be performed. // For more information, see the stack set operation status codes (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-status-codes) // in the AWS CloudFormation User Guide. // @@ -15424,6 +15781,9 @@ type TypeVersionSummary struct { // The description of the type version. Description *string `min:"1" type:"string"` + // Whether the specified type version is set as the default version. + IsDefaultVersion *bool `type:"boolean"` + // When the version was registered. TimeCreated *time.Time `type:"timestamp"` @@ -15461,6 +15821,12 @@ func (s *TypeVersionSummary) SetDescription(v string) *TypeVersionSummary { return s } +// SetIsDefaultVersion sets the IsDefaultVersion field's value. +func (s *TypeVersionSummary) SetIsDefaultVersion(v bool) *TypeVersionSummary { + s.IsDefaultVersion = &v + return s +} + // SetTimeCreated sets the TimeCreated field's value. func (s *TypeVersionSummary) SetTimeCreated(v time.Time) *TypeVersionSummary { s.TimeCreated = &v @@ -15614,7 +15980,7 @@ type UpdateStackInput struct { // Location of a file containing the temporary overriding stack policy. The // URL must point to a policy (max size: 16KB) located in an S3 bucket in the - // same region as the stack. You can specify either the StackPolicyDuringUpdateBody + // same Region as the stack. You can specify either the StackPolicyDuringUpdateBody // or the StackPolicyDuringUpdateURL parameter, but not both. // // If you want to update protected resources, specify a temporary overriding @@ -15623,7 +15989,7 @@ type UpdateStackInput struct { StackPolicyDuringUpdateURL *string `min:"1" type:"string"` // Location of a file containing the updated stack policy. The URL must point - // to a policy (max size: 16KB) located in an S3 bucket in the same region as + // to a policy (max size: 16KB) located in an S3 bucket in the same Region as // the stack. You can specify either the StackPolicyBody or the StackPolicyURL // parameter, but not both. // @@ -15831,7 +16197,7 @@ type UpdateStackInstancesInput struct { // [Self-managed permissions] The names of one or more AWS accounts for which // you want to update parameter values for stack instances. The overridden parameter // values will be applied to all stack instances in the specified accounts and - // regions. + // Regions. // // You can specify Accounts or DeploymentTargets, but not both. Accounts []*string `type:"list"` @@ -15862,7 +16228,7 @@ type UpdateStackInstancesInput struct { // stack instances. // // Any overridden parameter values will be applied to all stack instances in - // the specified accounts and regions. When specifying parameters and their + // the specified accounts and Regions. When specifying parameters and their // values, be aware of how AWS CloudFormation sets parameter values during stack // instance update operations: // @@ -15893,9 +16259,9 @@ type UpdateStackInstancesInput struct { // new parameter, you can then override the parameter value using UpdateStackInstances. ParameterOverrides []*Parameter `type:"list"` - // The names of one or more regions in which you want to update parameter values + // The names of one or more Regions in which you want to update parameter values // for stack instances. The overridden parameter values will be applied to all - // stack instances in the specified accounts and regions. + // stack instances in the specified accounts and Regions. // // Regions is a required field Regions []*string `type:"list" required:"true"` @@ -16033,7 +16399,7 @@ type UpdateStackSetInput struct { _ struct{} `type:"structure"` // [Self-managed permissions] The accounts in which to update associated stack - // instances. If you specify accounts, you must also specify the regions in + // instances. If you specify accounts, you must also specify the Regions in // which to update stack set instances. // // To update all the stack instances associated with this stack set, do not @@ -16042,10 +16408,10 @@ type UpdateStackSetInput struct { // If the stack set update includes changes to the template (that is, if the // TemplateBody or TemplateURL properties are specified), or the Parameters // property, AWS CloudFormation marks all stack instances with a status of OUTDATED - // prior to updating the stack instances in the specified accounts and regions. + // prior to updating the stack instances in the specified accounts and Regions. // If the stack set update does not include changes to the template or parameters, // AWS CloudFormation updates the stack instances in the specified accounts - // and regions, while leaving all other stack instances with their existing + // and Regions, while leaving all other stack instances with their existing // stack instance status. Accounts []*string `type:"list"` @@ -16174,8 +16540,8 @@ type UpdateStackSetInput struct { // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html). PermissionModel *string `type:"string" enum:"PermissionModels"` - // The regions in which to update associated stack instances. If you specify - // regions, you must also specify accounts in which to update stack set instances. + // The Regions in which to update associated stack instances. If you specify + // Regions, you must also specify accounts in which to update stack set instances. // // To update all the stack instances associated with this stack set, do not // specify the Accounts or Regions properties. @@ -16183,10 +16549,10 @@ type UpdateStackSetInput struct { // If the stack set update includes changes to the template (that is, if the // TemplateBody or TemplateURL properties are specified), or the Parameters // property, AWS CloudFormation marks all stack instances with a status of OUTDATED - // prior to updating the stack instances in the specified accounts and regions. + // prior to updating the stack instances in the specified accounts and Regions. // If the stack set update does not include changes to the template or parameters, // AWS CloudFormation updates the stack instances in the specified accounts - // and regions, while leaving all other stack instances with their existing + // and Regions, while leaving all other stack instances with their existing // stack instance status. Regions []*string `type:"list"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go index 0dbdc6c2353..183720d485a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go @@ -349,6 +349,72 @@ func (c *CloudFormation) WaitUntilStackImportCompleteWithContext(ctx aws.Context return w.WaitWithContext(ctx) } +// WaitUntilStackRollbackComplete uses the AWS CloudFormation API operation +// DescribeStacks to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *CloudFormation) WaitUntilStackRollbackComplete(input *DescribeStacksInput) error { + return c.WaitUntilStackRollbackCompleteWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilStackRollbackCompleteWithContext is an extended version of WaitUntilStackRollbackComplete. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFormation) WaitUntilStackRollbackCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilStackRollbackComplete", + MaxAttempts: 120, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus", + Expected: "UPDATE_ROLLBACK_COMPLETE", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", + Expected: "UPDATE_FAILED", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", + Expected: "UPDATE_ROLLBACK_FAILED", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus", + Expected: "DELETE_FAILED", + }, + { + State: request.FailureWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ValidationError", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeStacksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeStacksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + // WaitUntilStackUpdateComplete uses the AWS CloudFormation API operation // DescribeStacks to wait for a condition to be met before returning. // If the condition is not met within the max attempt window, an error will diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go index c5fb669db6d..56b3c461c6d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go @@ -1621,8 +1621,8 @@ func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificate // The request was rejected because the requester does not have permission to // perform the requested operation. type CloudHsmAccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1639,17 +1639,17 @@ func (s CloudHsmAccessDeniedException) GoString() string { func newErrorCloudHsmAccessDeniedException(v protocol.ResponseMetadata) error { return &CloudHsmAccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmAccessDeniedException) Code() string { +func (s *CloudHsmAccessDeniedException) Code() string { return "CloudHsmAccessDeniedException" } // Message returns the exception's message. -func (s CloudHsmAccessDeniedException) Message() string { +func (s *CloudHsmAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1657,29 +1657,29 @@ func (s CloudHsmAccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmAccessDeniedException) OrigErr() error { +func (s *CloudHsmAccessDeniedException) OrigErr() error { return nil } -func (s CloudHsmAccessDeniedException) Error() string { +func (s *CloudHsmAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmAccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmAccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmAccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmAccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because of an AWS CloudHSM internal failure. The // request can be retried. type CloudHsmInternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1696,17 +1696,17 @@ func (s CloudHsmInternalFailureException) GoString() string { func newErrorCloudHsmInternalFailureException(v protocol.ResponseMetadata) error { return &CloudHsmInternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmInternalFailureException) Code() string { +func (s *CloudHsmInternalFailureException) Code() string { return "CloudHsmInternalFailureException" } // Message returns the exception's message. -func (s CloudHsmInternalFailureException) Message() string { +func (s *CloudHsmInternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1714,28 +1714,28 @@ func (s CloudHsmInternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmInternalFailureException) OrigErr() error { +func (s *CloudHsmInternalFailureException) OrigErr() error { return nil } -func (s CloudHsmInternalFailureException) Error() string { +func (s *CloudHsmInternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmInternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmInternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmInternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmInternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because it is not a valid request. type CloudHsmInvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1752,17 +1752,17 @@ func (s CloudHsmInvalidRequestException) GoString() string { func newErrorCloudHsmInvalidRequestException(v protocol.ResponseMetadata) error { return &CloudHsmInvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmInvalidRequestException) Code() string { +func (s *CloudHsmInvalidRequestException) Code() string { return "CloudHsmInvalidRequestException" } // Message returns the exception's message. -func (s CloudHsmInvalidRequestException) Message() string { +func (s *CloudHsmInvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1770,28 +1770,28 @@ func (s CloudHsmInvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmInvalidRequestException) OrigErr() error { +func (s *CloudHsmInvalidRequestException) OrigErr() error { return nil } -func (s CloudHsmInvalidRequestException) Error() string { +func (s *CloudHsmInvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmInvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmInvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmInvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmInvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because it refers to a resource that cannot be found. type CloudHsmResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1808,17 +1808,17 @@ func (s CloudHsmResourceNotFoundException) GoString() string { func newErrorCloudHsmResourceNotFoundException(v protocol.ResponseMetadata) error { return &CloudHsmResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmResourceNotFoundException) Code() string { +func (s *CloudHsmResourceNotFoundException) Code() string { return "CloudHsmResourceNotFoundException" } // Message returns the exception's message. -func (s CloudHsmResourceNotFoundException) Message() string { +func (s *CloudHsmResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1826,28 +1826,28 @@ func (s CloudHsmResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmResourceNotFoundException) OrigErr() error { +func (s *CloudHsmResourceNotFoundException) OrigErr() error { return nil } -func (s CloudHsmResourceNotFoundException) Error() string { +func (s *CloudHsmResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because an error occurred. type CloudHsmServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1864,17 +1864,17 @@ func (s CloudHsmServiceException) GoString() string { func newErrorCloudHsmServiceException(v protocol.ResponseMetadata) error { return &CloudHsmServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmServiceException) Code() string { +func (s *CloudHsmServiceException) Code() string { return "CloudHsmServiceException" } // Message returns the exception's message. -func (s CloudHsmServiceException) Message() string { +func (s *CloudHsmServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1882,27 +1882,27 @@ func (s CloudHsmServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmServiceException) OrigErr() error { +func (s *CloudHsmServiceException) OrigErr() error { return nil } -func (s CloudHsmServiceException) Error() string { +func (s *CloudHsmServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmServiceException) RequestID() string { + return s.RespMetadata.RequestID } type CloudHsmTagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1919,17 +1919,17 @@ func (s CloudHsmTagException) GoString() string { func newErrorCloudHsmTagException(v protocol.ResponseMetadata) error { return &CloudHsmTagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmTagException) Code() string { +func (s *CloudHsmTagException) Code() string { return "CloudHsmTagException" } // Message returns the exception's message. -func (s CloudHsmTagException) Message() string { +func (s *CloudHsmTagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1937,22 +1937,22 @@ func (s CloudHsmTagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmTagException) OrigErr() error { +func (s *CloudHsmTagException) OrigErr() error { return nil } -func (s CloudHsmTagException) Error() string { +func (s *CloudHsmTagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmTagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmTagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmTagException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmTagException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about an AWS CloudHSM cluster. 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 8b227be26c1..3dcad2dafde 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 @@ -2524,8 +2524,8 @@ func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailI // // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail type ARNInvalidException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2542,17 +2542,17 @@ func (s ARNInvalidException) GoString() string { func newErrorARNInvalidException(v protocol.ResponseMetadata) error { return &ARNInvalidException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ARNInvalidException) Code() string { +func (s *ARNInvalidException) Code() string { return "CloudTrailARNInvalidException" } // Message returns the exception's message. -func (s ARNInvalidException) Message() string { +func (s *ARNInvalidException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2560,22 +2560,22 @@ func (s ARNInvalidException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ARNInvalidException) OrigErr() error { +func (s *ARNInvalidException) OrigErr() error { return nil } -func (s ARNInvalidException) Error() string { +func (s *ARNInvalidException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ARNInvalidException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ARNInvalidException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ARNInvalidException) RequestID() string { - return s.respMetadata.RequestID +func (s *ARNInvalidException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when trusted access has not been enabled between @@ -2583,8 +2583,8 @@ func (s ARNInvalidException) RequestID() string { // Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). type AccessNotEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2601,17 +2601,17 @@ func (s AccessNotEnabledException) GoString() string { func newErrorAccessNotEnabledException(v protocol.ResponseMetadata) error { return &AccessNotEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessNotEnabledException) Code() string { +func (s *AccessNotEnabledException) Code() string { return "CloudTrailAccessNotEnabledException" } // Message returns the exception's message. -func (s AccessNotEnabledException) Message() string { +func (s *AccessNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2619,22 +2619,22 @@ func (s AccessNotEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessNotEnabledException) OrigErr() error { +func (s *AccessNotEnabledException) OrigErr() error { return nil } -func (s AccessNotEnabledException) Error() string { +func (s *AccessNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessNotEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessNotEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessNotEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessNotEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the tags to add to a trail. @@ -2716,8 +2716,8 @@ func (s AddTagsOutput) GoString() string { // Cannot set a CloudWatch Logs delivery for this region. type CloudWatchLogsDeliveryUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2734,17 +2734,17 @@ func (s CloudWatchLogsDeliveryUnavailableException) GoString() string { func newErrorCloudWatchLogsDeliveryUnavailableException(v protocol.ResponseMetadata) error { return &CloudWatchLogsDeliveryUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudWatchLogsDeliveryUnavailableException) Code() string { +func (s *CloudWatchLogsDeliveryUnavailableException) Code() string { return "CloudWatchLogsDeliveryUnavailableException" } // Message returns the exception's message. -func (s CloudWatchLogsDeliveryUnavailableException) Message() string { +func (s *CloudWatchLogsDeliveryUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2752,22 +2752,22 @@ func (s CloudWatchLogsDeliveryUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudWatchLogsDeliveryUnavailableException) OrigErr() error { +func (s *CloudWatchLogsDeliveryUnavailableException) OrigErr() error { return nil } -func (s CloudWatchLogsDeliveryUnavailableException) Error() string { +func (s *CloudWatchLogsDeliveryUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudWatchLogsDeliveryUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudWatchLogsDeliveryUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudWatchLogsDeliveryUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudWatchLogsDeliveryUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the settings for each trail. @@ -4026,8 +4026,8 @@ func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOu // If you run GetInsightSelectors on a trail that does not have Insights events // enabled, the operation throws the exception InsightNotEnabledException. type InsightNotEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4044,17 +4044,17 @@ func (s InsightNotEnabledException) GoString() string { func newErrorInsightNotEnabledException(v protocol.ResponseMetadata) error { return &InsightNotEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsightNotEnabledException) Code() string { +func (s *InsightNotEnabledException) Code() string { return "InsightNotEnabledException" } // Message returns the exception's message. -func (s InsightNotEnabledException) Message() string { +func (s *InsightNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4062,22 +4062,22 @@ func (s InsightNotEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsightNotEnabledException) OrigErr() error { +func (s *InsightNotEnabledException) OrigErr() error { return nil } -func (s InsightNotEnabledException) Error() string { +func (s *InsightNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsightNotEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsightNotEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsightNotEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsightNotEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // A JSON string that contains a list of insight types that are logged on a @@ -4111,8 +4111,8 @@ func (s *InsightSelector) SetInsightType(v string) *InsightSelector { // an organization trail in a required service. For more information, see Prepare // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). type InsufficientDependencyServiceAccessPermissionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4129,17 +4129,17 @@ func (s InsufficientDependencyServiceAccessPermissionException) GoString() strin func newErrorInsufficientDependencyServiceAccessPermissionException(v protocol.ResponseMetadata) error { return &InsufficientDependencyServiceAccessPermissionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientDependencyServiceAccessPermissionException) Code() string { +func (s *InsufficientDependencyServiceAccessPermissionException) Code() string { return "InsufficientDependencyServiceAccessPermissionException" } // Message returns the exception's message. -func (s InsufficientDependencyServiceAccessPermissionException) Message() string { +func (s *InsufficientDependencyServiceAccessPermissionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4147,29 +4147,29 @@ func (s InsufficientDependencyServiceAccessPermissionException) Message() string } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientDependencyServiceAccessPermissionException) OrigErr() error { +func (s *InsufficientDependencyServiceAccessPermissionException) OrigErr() error { return nil } -func (s InsufficientDependencyServiceAccessPermissionException) Error() string { +func (s *InsufficientDependencyServiceAccessPermissionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientDependencyServiceAccessPermissionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientDependencyServiceAccessPermissionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientDependencyServiceAccessPermissionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientDependencyServiceAccessPermissionException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the policy on the S3 bucket or KMS key is not // sufficient. type InsufficientEncryptionPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4186,17 +4186,17 @@ func (s InsufficientEncryptionPolicyException) GoString() string { func newErrorInsufficientEncryptionPolicyException(v protocol.ResponseMetadata) error { return &InsufficientEncryptionPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientEncryptionPolicyException) Code() string { +func (s *InsufficientEncryptionPolicyException) Code() string { return "InsufficientEncryptionPolicyException" } // Message returns the exception's message. -func (s InsufficientEncryptionPolicyException) Message() string { +func (s *InsufficientEncryptionPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4204,28 +4204,28 @@ func (s InsufficientEncryptionPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientEncryptionPolicyException) OrigErr() error { +func (s *InsufficientEncryptionPolicyException) OrigErr() error { return nil } -func (s InsufficientEncryptionPolicyException) Error() string { +func (s *InsufficientEncryptionPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientEncryptionPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientEncryptionPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientEncryptionPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientEncryptionPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the policy on the S3 bucket is not sufficient. type InsufficientS3BucketPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4242,17 +4242,17 @@ func (s InsufficientS3BucketPolicyException) GoString() string { func newErrorInsufficientS3BucketPolicyException(v protocol.ResponseMetadata) error { return &InsufficientS3BucketPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientS3BucketPolicyException) Code() string { +func (s *InsufficientS3BucketPolicyException) Code() string { return "InsufficientS3BucketPolicyException" } // Message returns the exception's message. -func (s InsufficientS3BucketPolicyException) Message() string { +func (s *InsufficientS3BucketPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4260,28 +4260,28 @@ func (s InsufficientS3BucketPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientS3BucketPolicyException) OrigErr() error { +func (s *InsufficientS3BucketPolicyException) OrigErr() error { return nil } -func (s InsufficientS3BucketPolicyException) Error() string { +func (s *InsufficientS3BucketPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientS3BucketPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientS3BucketPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientS3BucketPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientS3BucketPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the policy on the SNS topic is not sufficient. type InsufficientSnsTopicPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4298,17 +4298,17 @@ func (s InsufficientSnsTopicPolicyException) GoString() string { func newErrorInsufficientSnsTopicPolicyException(v protocol.ResponseMetadata) error { return &InsufficientSnsTopicPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientSnsTopicPolicyException) Code() string { +func (s *InsufficientSnsTopicPolicyException) Code() string { return "InsufficientSnsTopicPolicyException" } // Message returns the exception's message. -func (s InsufficientSnsTopicPolicyException) Message() string { +func (s *InsufficientSnsTopicPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4316,28 +4316,28 @@ func (s InsufficientSnsTopicPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientSnsTopicPolicyException) OrigErr() error { +func (s *InsufficientSnsTopicPolicyException) OrigErr() error { return nil } -func (s InsufficientSnsTopicPolicyException) Error() string { +func (s *InsufficientSnsTopicPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientSnsTopicPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientSnsTopicPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientSnsTopicPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientSnsTopicPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the provided CloudWatch log group is not valid. type InvalidCloudWatchLogsLogGroupArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4354,17 +4354,17 @@ func (s InvalidCloudWatchLogsLogGroupArnException) GoString() string { func newErrorInvalidCloudWatchLogsLogGroupArnException(v protocol.ResponseMetadata) error { return &InvalidCloudWatchLogsLogGroupArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCloudWatchLogsLogGroupArnException) Code() string { +func (s *InvalidCloudWatchLogsLogGroupArnException) Code() string { return "InvalidCloudWatchLogsLogGroupArnException" } // Message returns the exception's message. -func (s InvalidCloudWatchLogsLogGroupArnException) Message() string { +func (s *InvalidCloudWatchLogsLogGroupArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4372,28 +4372,28 @@ func (s InvalidCloudWatchLogsLogGroupArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCloudWatchLogsLogGroupArnException) OrigErr() error { +func (s *InvalidCloudWatchLogsLogGroupArnException) OrigErr() error { return nil } -func (s InvalidCloudWatchLogsLogGroupArnException) Error() string { +func (s *InvalidCloudWatchLogsLogGroupArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCloudWatchLogsLogGroupArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCloudWatchLogsLogGroupArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCloudWatchLogsLogGroupArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCloudWatchLogsLogGroupArnException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the provided role is not valid. type InvalidCloudWatchLogsRoleArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4410,17 +4410,17 @@ func (s InvalidCloudWatchLogsRoleArnException) GoString() string { func newErrorInvalidCloudWatchLogsRoleArnException(v protocol.ResponseMetadata) error { return &InvalidCloudWatchLogsRoleArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCloudWatchLogsRoleArnException) Code() string { +func (s *InvalidCloudWatchLogsRoleArnException) Code() string { return "InvalidCloudWatchLogsRoleArnException" } // Message returns the exception's message. -func (s InvalidCloudWatchLogsRoleArnException) Message() string { +func (s *InvalidCloudWatchLogsRoleArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4428,29 +4428,29 @@ func (s InvalidCloudWatchLogsRoleArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCloudWatchLogsRoleArnException) OrigErr() error { +func (s *InvalidCloudWatchLogsRoleArnException) OrigErr() error { return nil } -func (s InvalidCloudWatchLogsRoleArnException) Error() string { +func (s *InvalidCloudWatchLogsRoleArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCloudWatchLogsRoleArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCloudWatchLogsRoleArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCloudWatchLogsRoleArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCloudWatchLogsRoleArnException) RequestID() string { + return s.RespMetadata.RequestID } // Occurs if an event category that is not valid is specified as a value of // EventCategory. type InvalidEventCategoryException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4467,17 +4467,17 @@ func (s InvalidEventCategoryException) GoString() string { func newErrorInvalidEventCategoryException(v protocol.ResponseMetadata) error { return &InvalidEventCategoryException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEventCategoryException) Code() string { +func (s *InvalidEventCategoryException) Code() string { return "InvalidEventCategoryException" } // Message returns the exception's message. -func (s InvalidEventCategoryException) Message() string { +func (s *InvalidEventCategoryException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4485,22 +4485,22 @@ func (s InvalidEventCategoryException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEventCategoryException) OrigErr() error { +func (s *InvalidEventCategoryException) OrigErr() error { return nil } -func (s InvalidEventCategoryException) Error() string { +func (s *InvalidEventCategoryException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEventCategoryException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEventCategoryException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEventCategoryException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEventCategoryException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the PutEventSelectors operation is called with @@ -4523,8 +4523,8 @@ func (s InvalidEventCategoryException) RequestID() string { // * Specify a valid value for a parameter. For example, specifying the ReadWriteType // parameter with a value of read-only is invalid. type InvalidEventSelectorsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4541,17 +4541,17 @@ func (s InvalidEventSelectorsException) GoString() string { func newErrorInvalidEventSelectorsException(v protocol.ResponseMetadata) error { return &InvalidEventSelectorsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEventSelectorsException) Code() string { +func (s *InvalidEventSelectorsException) Code() string { return "InvalidEventSelectorsException" } // Message returns the exception's message. -func (s InvalidEventSelectorsException) Message() string { +func (s *InvalidEventSelectorsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4559,29 +4559,29 @@ func (s InvalidEventSelectorsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEventSelectorsException) OrigErr() error { +func (s *InvalidEventSelectorsException) OrigErr() error { return nil } -func (s InvalidEventSelectorsException) Error() string { +func (s *InvalidEventSelectorsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEventSelectorsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEventSelectorsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEventSelectorsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEventSelectorsException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when an operation is called on a trail from a region // other than the region in which the trail was created. type InvalidHomeRegionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4598,17 +4598,17 @@ func (s InvalidHomeRegionException) GoString() string { func newErrorInvalidHomeRegionException(v protocol.ResponseMetadata) error { return &InvalidHomeRegionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidHomeRegionException) Code() string { +func (s *InvalidHomeRegionException) Code() string { return "InvalidHomeRegionException" } // Message returns the exception's message. -func (s InvalidHomeRegionException) Message() string { +func (s *InvalidHomeRegionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4616,30 +4616,30 @@ func (s InvalidHomeRegionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidHomeRegionException) OrigErr() error { +func (s *InvalidHomeRegionException) OrigErr() error { return nil } -func (s InvalidHomeRegionException) Error() string { +func (s *InvalidHomeRegionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidHomeRegionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidHomeRegionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidHomeRegionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidHomeRegionException) RequestID() string { + return s.RespMetadata.RequestID } // The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors // or GetInsightSelectors request is not valid, or the specified insight type // in the InsightSelectors statement is not a valid insight type. type InvalidInsightSelectorsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4656,17 +4656,17 @@ func (s InvalidInsightSelectorsException) GoString() string { func newErrorInvalidInsightSelectorsException(v protocol.ResponseMetadata) error { return &InvalidInsightSelectorsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInsightSelectorsException) Code() string { +func (s *InvalidInsightSelectorsException) Code() string { return "InvalidInsightSelectorsException" } // Message returns the exception's message. -func (s InvalidInsightSelectorsException) Message() string { +func (s *InvalidInsightSelectorsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4674,28 +4674,28 @@ func (s InvalidInsightSelectorsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInsightSelectorsException) OrigErr() error { +func (s *InvalidInsightSelectorsException) OrigErr() error { return nil } -func (s InvalidInsightSelectorsException) Error() string { +func (s *InvalidInsightSelectorsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInsightSelectorsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInsightSelectorsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInsightSelectorsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInsightSelectorsException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the KMS key ARN is invalid. type InvalidKmsKeyIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4712,17 +4712,17 @@ func (s InvalidKmsKeyIdException) GoString() string { func newErrorInvalidKmsKeyIdException(v protocol.ResponseMetadata) error { return &InvalidKmsKeyIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidKmsKeyIdException) Code() string { +func (s *InvalidKmsKeyIdException) Code() string { return "InvalidKmsKeyIdException" } // Message returns the exception's message. -func (s InvalidKmsKeyIdException) Message() string { +func (s *InvalidKmsKeyIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4730,28 +4730,28 @@ func (s InvalidKmsKeyIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidKmsKeyIdException) OrigErr() error { +func (s *InvalidKmsKeyIdException) OrigErr() error { return nil } -func (s InvalidKmsKeyIdException) Error() string { +func (s *InvalidKmsKeyIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidKmsKeyIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidKmsKeyIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidKmsKeyIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidKmsKeyIdException) RequestID() string { + return s.RespMetadata.RequestID } // Occurs when an invalid lookup attribute is specified. type InvalidLookupAttributesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4768,17 +4768,17 @@ func (s InvalidLookupAttributesException) GoString() string { func newErrorInvalidLookupAttributesException(v protocol.ResponseMetadata) error { return &InvalidLookupAttributesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLookupAttributesException) Code() string { +func (s *InvalidLookupAttributesException) Code() string { return "InvalidLookupAttributesException" } // Message returns the exception's message. -func (s InvalidLookupAttributesException) Message() string { +func (s *InvalidLookupAttributesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4786,28 +4786,28 @@ func (s InvalidLookupAttributesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLookupAttributesException) OrigErr() error { +func (s *InvalidLookupAttributesException) OrigErr() error { return nil } -func (s InvalidLookupAttributesException) Error() string { +func (s *InvalidLookupAttributesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLookupAttributesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLookupAttributesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLookupAttributesException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLookupAttributesException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown if the limit specified is invalid. type InvalidMaxResultsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4824,17 +4824,17 @@ func (s InvalidMaxResultsException) GoString() string { func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error { return &InvalidMaxResultsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMaxResultsException) Code() string { +func (s *InvalidMaxResultsException) Code() string { return "InvalidMaxResultsException" } // Message returns the exception's message. -func (s InvalidMaxResultsException) Message() string { +func (s *InvalidMaxResultsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4842,29 +4842,29 @@ func (s InvalidMaxResultsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMaxResultsException) OrigErr() error { +func (s *InvalidMaxResultsException) OrigErr() error { return nil } -func (s InvalidMaxResultsException) Error() string { +func (s *InvalidMaxResultsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMaxResultsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMaxResultsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMaxResultsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMaxResultsException) RequestID() string { + return s.RespMetadata.RequestID } // Invalid token or token that was previously used in a request with different // parameters. This exception is thrown if the token is invalid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4881,17 +4881,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4899,29 +4899,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the combination of parameters provided is not // valid. type InvalidParameterCombinationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4938,17 +4938,17 @@ func (s InvalidParameterCombinationException) GoString() string { func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error { return &InvalidParameterCombinationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterCombinationException) Code() string { +func (s *InvalidParameterCombinationException) Code() string { return "InvalidParameterCombinationException" } // Message returns the exception's message. -func (s InvalidParameterCombinationException) Message() string { +func (s *InvalidParameterCombinationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4956,28 +4956,28 @@ func (s InvalidParameterCombinationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterCombinationException) OrigErr() error { +func (s *InvalidParameterCombinationException) OrigErr() error { return nil } -func (s InvalidParameterCombinationException) Error() string { +func (s *InvalidParameterCombinationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterCombinationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterCombinationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterCombinationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterCombinationException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the provided S3 bucket name is not valid. type InvalidS3BucketNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4994,17 +4994,17 @@ func (s InvalidS3BucketNameException) GoString() string { func newErrorInvalidS3BucketNameException(v protocol.ResponseMetadata) error { return &InvalidS3BucketNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidS3BucketNameException) Code() string { +func (s *InvalidS3BucketNameException) Code() string { return "InvalidS3BucketNameException" } // Message returns the exception's message. -func (s InvalidS3BucketNameException) Message() string { +func (s *InvalidS3BucketNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5012,28 +5012,28 @@ func (s InvalidS3BucketNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidS3BucketNameException) OrigErr() error { +func (s *InvalidS3BucketNameException) OrigErr() error { return nil } -func (s InvalidS3BucketNameException) Error() string { +func (s *InvalidS3BucketNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidS3BucketNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidS3BucketNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidS3BucketNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidS3BucketNameException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the provided S3 prefix is not valid. type InvalidS3PrefixException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5050,17 +5050,17 @@ func (s InvalidS3PrefixException) GoString() string { func newErrorInvalidS3PrefixException(v protocol.ResponseMetadata) error { return &InvalidS3PrefixException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidS3PrefixException) Code() string { +func (s *InvalidS3PrefixException) Code() string { return "InvalidS3PrefixException" } // Message returns the exception's message. -func (s InvalidS3PrefixException) Message() string { +func (s *InvalidS3PrefixException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5068,28 +5068,28 @@ func (s InvalidS3PrefixException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidS3PrefixException) OrigErr() error { +func (s *InvalidS3PrefixException) OrigErr() error { return nil } -func (s InvalidS3PrefixException) Error() string { +func (s *InvalidS3PrefixException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidS3PrefixException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidS3PrefixException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidS3PrefixException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidS3PrefixException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the provided SNS topic name is not valid. type InvalidSnsTopicNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5106,17 +5106,17 @@ func (s InvalidSnsTopicNameException) GoString() string { func newErrorInvalidSnsTopicNameException(v protocol.ResponseMetadata) error { return &InvalidSnsTopicNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSnsTopicNameException) Code() string { +func (s *InvalidSnsTopicNameException) Code() string { return "InvalidSnsTopicNameException" } // Message returns the exception's message. -func (s InvalidSnsTopicNameException) Message() string { +func (s *InvalidSnsTopicNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5124,29 +5124,29 @@ func (s InvalidSnsTopicNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSnsTopicNameException) OrigErr() error { +func (s *InvalidSnsTopicNameException) OrigErr() error { return nil } -func (s InvalidSnsTopicNameException) Error() string { +func (s *InvalidSnsTopicNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSnsTopicNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSnsTopicNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSnsTopicNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSnsTopicNameException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the specified tag key or values are not valid. // It can also occur if there are duplicate tags or too many tags on the resource. type InvalidTagParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5163,17 +5163,17 @@ func (s InvalidTagParameterException) GoString() string { func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error { return &InvalidTagParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagParameterException) Code() string { +func (s *InvalidTagParameterException) Code() string { return "InvalidTagParameterException" } // Message returns the exception's message. -func (s InvalidTagParameterException) Message() string { +func (s *InvalidTagParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5181,29 +5181,29 @@ func (s InvalidTagParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagParameterException) OrigErr() error { +func (s *InvalidTagParameterException) OrigErr() error { return nil } -func (s InvalidTagParameterException) Error() string { +func (s *InvalidTagParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagParameterException) RequestID() string { + return s.RespMetadata.RequestID } // Occurs if the timestamp values are invalid. Either the start time occurs // after the end time or the time range is outside the range of possible values. type InvalidTimeRangeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5220,17 +5220,17 @@ func (s InvalidTimeRangeException) GoString() string { func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error { return &InvalidTimeRangeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTimeRangeException) Code() string { +func (s *InvalidTimeRangeException) Code() string { return "InvalidTimeRangeException" } // Message returns the exception's message. -func (s InvalidTimeRangeException) Message() string { +func (s *InvalidTimeRangeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5238,28 +5238,28 @@ func (s InvalidTimeRangeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTimeRangeException) OrigErr() error { +func (s *InvalidTimeRangeException) OrigErr() error { return nil } -func (s InvalidTimeRangeException) Error() string { +func (s *InvalidTimeRangeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTimeRangeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTimeRangeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTimeRangeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTimeRangeException) RequestID() string { + return s.RespMetadata.RequestID } // Reserved for future use. type InvalidTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5276,17 +5276,17 @@ func (s InvalidTokenException) GoString() string { func newErrorInvalidTokenException(v protocol.ResponseMetadata) error { return &InvalidTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTokenException) Code() string { +func (s *InvalidTokenException) Code() string { return "InvalidTokenException" } // Message returns the exception's message. -func (s InvalidTokenException) Message() string { +func (s *InvalidTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5294,22 +5294,22 @@ func (s InvalidTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTokenException) OrigErr() error { +func (s *InvalidTokenException) OrigErr() error { return nil } -func (s InvalidTokenException) Error() string { +func (s *InvalidTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTokenException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the provided trail name is not valid. Trail @@ -5327,8 +5327,8 @@ func (s InvalidTokenException) RequestID() string { // // * Not be in IP address format (for example, 192.168.5.4) type InvalidTrailNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5345,17 +5345,17 @@ func (s InvalidTrailNameException) GoString() string { func newErrorInvalidTrailNameException(v protocol.ResponseMetadata) error { return &InvalidTrailNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTrailNameException) Code() string { +func (s *InvalidTrailNameException) Code() string { return "InvalidTrailNameException" } // Message returns the exception's message. -func (s InvalidTrailNameException) Message() string { +func (s *InvalidTrailNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5363,29 +5363,29 @@ func (s InvalidTrailNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTrailNameException) OrigErr() error { +func (s *InvalidTrailNameException) OrigErr() error { return nil } -func (s InvalidTrailNameException) Error() string { +func (s *InvalidTrailNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTrailNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTrailNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTrailNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTrailNameException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when there is an issue with the specified KMS key // and the trail can’t be updated. type KmsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5402,17 +5402,17 @@ func (s KmsException) GoString() string { func newErrorKmsException(v protocol.ResponseMetadata) error { return &KmsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KmsException) Code() string { +func (s *KmsException) Code() string { return "KmsException" } // Message returns the exception's message. -func (s KmsException) Message() string { +func (s *KmsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5420,30 +5420,30 @@ func (s KmsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KmsException) OrigErr() error { +func (s *KmsException) OrigErr() error { return nil } -func (s KmsException) Error() string { +func (s *KmsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KmsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KmsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KmsException) RequestID() string { - return s.respMetadata.RequestID +func (s *KmsException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is no longer in use. // // Deprecated: KmsKeyDisabledException has been deprecated type KmsKeyDisabledException struct { - _ struct{} `deprecated:"true" type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `deprecated:"true" type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5460,17 +5460,17 @@ func (s KmsKeyDisabledException) GoString() string { func newErrorKmsKeyDisabledException(v protocol.ResponseMetadata) error { return &KmsKeyDisabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KmsKeyDisabledException) Code() string { +func (s *KmsKeyDisabledException) Code() string { return "KmsKeyDisabledException" } // Message returns the exception's message. -func (s KmsKeyDisabledException) Message() string { +func (s *KmsKeyDisabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5478,29 +5478,29 @@ func (s KmsKeyDisabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KmsKeyDisabledException) OrigErr() error { +func (s *KmsKeyDisabledException) OrigErr() error { return nil } -func (s KmsKeyDisabledException) Error() string { +func (s *KmsKeyDisabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KmsKeyDisabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KmsKeyDisabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KmsKeyDisabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *KmsKeyDisabledException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the KMS key does not exist, or when the S3 // bucket and the KMS key are not in the same region. type KmsKeyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5517,17 +5517,17 @@ func (s KmsKeyNotFoundException) GoString() string { func newErrorKmsKeyNotFoundException(v protocol.ResponseMetadata) error { return &KmsKeyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KmsKeyNotFoundException) Code() string { +func (s *KmsKeyNotFoundException) Code() string { return "KmsKeyNotFoundException" } // Message returns the exception's message. -func (s KmsKeyNotFoundException) Message() string { +func (s *KmsKeyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5535,22 +5535,22 @@ func (s KmsKeyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KmsKeyNotFoundException) OrigErr() error { +func (s *KmsKeyNotFoundException) OrigErr() error { return nil } -func (s KmsKeyNotFoundException) Error() string { +func (s *KmsKeyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KmsKeyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KmsKeyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KmsKeyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *KmsKeyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Requests the public keys for a specified time range. @@ -5981,8 +5981,8 @@ func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput { // This exception is thrown when the maximum number of trails is reached. type MaximumNumberOfTrailsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5999,17 +5999,17 @@ func (s MaximumNumberOfTrailsExceededException) GoString() string { func newErrorMaximumNumberOfTrailsExceededException(v protocol.ResponseMetadata) error { return &MaximumNumberOfTrailsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumNumberOfTrailsExceededException) Code() string { +func (s *MaximumNumberOfTrailsExceededException) Code() string { return "MaximumNumberOfTrailsExceededException" } // Message returns the exception's message. -func (s MaximumNumberOfTrailsExceededException) Message() string { +func (s *MaximumNumberOfTrailsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6017,22 +6017,22 @@ func (s MaximumNumberOfTrailsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumNumberOfTrailsExceededException) OrigErr() error { +func (s *MaximumNumberOfTrailsExceededException) OrigErr() error { return nil } -func (s MaximumNumberOfTrailsExceededException) Error() string { +func (s *MaximumNumberOfTrailsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumNumberOfTrailsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumNumberOfTrailsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumNumberOfTrailsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumNumberOfTrailsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the AWS account making the request to create @@ -6040,8 +6040,8 @@ func (s MaximumNumberOfTrailsExceededException) RequestID() string { // in AWS Organizations. For more information, see Prepare For Creating a Trail // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). type NotOrganizationMasterAccountException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6058,17 +6058,17 @@ func (s NotOrganizationMasterAccountException) GoString() string { func newErrorNotOrganizationMasterAccountException(v protocol.ResponseMetadata) error { return &NotOrganizationMasterAccountException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotOrganizationMasterAccountException) Code() string { +func (s *NotOrganizationMasterAccountException) Code() string { return "NotOrganizationMasterAccountException" } // Message returns the exception's message. -func (s NotOrganizationMasterAccountException) Message() string { +func (s *NotOrganizationMasterAccountException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6076,28 +6076,28 @@ func (s NotOrganizationMasterAccountException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotOrganizationMasterAccountException) OrigErr() error { +func (s *NotOrganizationMasterAccountException) OrigErr() error { return nil } -func (s NotOrganizationMasterAccountException) Error() string { +func (s *NotOrganizationMasterAccountException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotOrganizationMasterAccountException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotOrganizationMasterAccountException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotOrganizationMasterAccountException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotOrganizationMasterAccountException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the requested operation is not permitted. type OperationNotPermittedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6114,17 +6114,17 @@ func (s OperationNotPermittedException) GoString() string { func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error { return &OperationNotPermittedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotPermittedException) Code() string { +func (s *OperationNotPermittedException) Code() string { return "OperationNotPermittedException" } // Message returns the exception's message. -func (s OperationNotPermittedException) Message() string { +func (s *OperationNotPermittedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6132,22 +6132,22 @@ func (s OperationNotPermittedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotPermittedException) OrigErr() error { +func (s *OperationNotPermittedException) OrigErr() error { return nil } -func (s OperationNotPermittedException) Error() string { +func (s *OperationNotPermittedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotPermittedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotPermittedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotPermittedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotPermittedException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when AWS Organizations is not configured to support @@ -6155,8 +6155,8 @@ func (s OperationNotPermittedException) RequestID() string { // creating an organization trail. For more information, see Prepare For Creating // a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). type OrganizationNotInAllFeaturesModeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6173,17 +6173,17 @@ func (s OrganizationNotInAllFeaturesModeException) GoString() string { func newErrorOrganizationNotInAllFeaturesModeException(v protocol.ResponseMetadata) error { return &OrganizationNotInAllFeaturesModeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationNotInAllFeaturesModeException) Code() string { +func (s *OrganizationNotInAllFeaturesModeException) Code() string { return "OrganizationNotInAllFeaturesModeException" } // Message returns the exception's message. -func (s OrganizationNotInAllFeaturesModeException) Message() string { +func (s *OrganizationNotInAllFeaturesModeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6191,30 +6191,30 @@ func (s OrganizationNotInAllFeaturesModeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationNotInAllFeaturesModeException) OrigErr() error { +func (s *OrganizationNotInAllFeaturesModeException) OrigErr() error { return nil } -func (s OrganizationNotInAllFeaturesModeException) Error() string { +func (s *OrganizationNotInAllFeaturesModeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationNotInAllFeaturesModeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationNotInAllFeaturesModeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationNotInAllFeaturesModeException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationNotInAllFeaturesModeException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the request is made from an AWS account that // is not a member of an organization. To make this request, sign in using the // credentials of an account that belongs to an organization. type OrganizationsNotInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6231,17 +6231,17 @@ func (s OrganizationsNotInUseException) GoString() string { func newErrorOrganizationsNotInUseException(v protocol.ResponseMetadata) error { return &OrganizationsNotInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationsNotInUseException) Code() string { +func (s *OrganizationsNotInUseException) Code() string { return "OrganizationsNotInUseException" } // Message returns the exception's message. -func (s OrganizationsNotInUseException) Message() string { +func (s *OrganizationsNotInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6249,22 +6249,22 @@ func (s OrganizationsNotInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationsNotInUseException) OrigErr() error { +func (s *OrganizationsNotInUseException) OrigErr() error { return nil } -func (s OrganizationsNotInUseException) Error() string { +func (s *OrganizationsNotInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationsNotInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationsNotInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationsNotInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationsNotInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a returned public key. @@ -6632,8 +6632,8 @@ func (s *Resource) SetResourceType(v string) *Resource { // This exception is thrown when the specified resource is not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6650,17 +6650,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6668,22 +6668,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A resource tag. @@ -6722,8 +6722,8 @@ func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag { // This exception is thrown when the specified resource type is not supported // by CloudTrail. type ResourceTypeNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6740,17 +6740,17 @@ func (s ResourceTypeNotSupportedException) GoString() string { func newErrorResourceTypeNotSupportedException(v protocol.ResponseMetadata) error { return &ResourceTypeNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceTypeNotSupportedException) Code() string { +func (s *ResourceTypeNotSupportedException) Code() string { return "ResourceTypeNotSupportedException" } // Message returns the exception's message. -func (s ResourceTypeNotSupportedException) Message() string { +func (s *ResourceTypeNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6758,28 +6758,28 @@ func (s ResourceTypeNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceTypeNotSupportedException) OrigErr() error { +func (s *ResourceTypeNotSupportedException) OrigErr() error { return nil } -func (s ResourceTypeNotSupportedException) Error() string { +func (s *ResourceTypeNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceTypeNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceTypeNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceTypeNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceTypeNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the specified S3 bucket does not exist. type S3BucketDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6796,17 +6796,17 @@ func (s S3BucketDoesNotExistException) GoString() string { func newErrorS3BucketDoesNotExistException(v protocol.ResponseMetadata) error { return &S3BucketDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s S3BucketDoesNotExistException) Code() string { +func (s *S3BucketDoesNotExistException) Code() string { return "S3BucketDoesNotExistException" } // Message returns the exception's message. -func (s S3BucketDoesNotExistException) Message() string { +func (s *S3BucketDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6814,22 +6814,22 @@ func (s S3BucketDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s S3BucketDoesNotExistException) OrigErr() error { +func (s *S3BucketDoesNotExistException) OrigErr() error { return nil } -func (s S3BucketDoesNotExistException) Error() string { +func (s *S3BucketDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s S3BucketDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *S3BucketDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s S3BucketDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *S3BucketDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The request to CloudTrail to start logging AWS API calls for an account. @@ -7002,8 +7002,8 @@ func (s *Tag) SetValue(v string) *Tag { // The number of tags per trail has exceeded the permitted amount. Currently, // the limit is 50. type TagsLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7020,17 +7020,17 @@ func (s TagsLimitExceededException) GoString() string { func newErrorTagsLimitExceededException(v protocol.ResponseMetadata) error { return &TagsLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagsLimitExceededException) Code() string { +func (s *TagsLimitExceededException) Code() string { return "TagsLimitExceededException" } // Message returns the exception's message. -func (s TagsLimitExceededException) Message() string { +func (s *TagsLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7038,22 +7038,22 @@ func (s TagsLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagsLimitExceededException) OrigErr() error { +func (s *TagsLimitExceededException) OrigErr() error { return nil } -func (s TagsLimitExceededException) Error() string { +func (s *TagsLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagsLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagsLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagsLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagsLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The settings for a trail. @@ -7235,8 +7235,8 @@ func (s *Trail) SetTrailARN(v string) *Trail { // This exception is thrown when the specified trail already exists. type TrailAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7253,17 +7253,17 @@ func (s TrailAlreadyExistsException) GoString() string { func newErrorTrailAlreadyExistsException(v protocol.ResponseMetadata) error { return &TrailAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TrailAlreadyExistsException) Code() string { +func (s *TrailAlreadyExistsException) Code() string { return "TrailAlreadyExistsException" } // Message returns the exception's message. -func (s TrailAlreadyExistsException) Message() string { +func (s *TrailAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7271,22 +7271,22 @@ func (s TrailAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TrailAlreadyExistsException) OrigErr() error { +func (s *TrailAlreadyExistsException) OrigErr() error { return nil } -func (s TrailAlreadyExistsException) Error() string { +func (s *TrailAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TrailAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TrailAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TrailAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TrailAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a CloudTrail trail, including the trail's name, home region, @@ -7334,8 +7334,8 @@ func (s *TrailInfo) SetTrailARN(v string) *TrailInfo { // This exception is thrown when the trail with the given name is not found. type TrailNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7352,17 +7352,17 @@ func (s TrailNotFoundException) GoString() string { func newErrorTrailNotFoundException(v protocol.ResponseMetadata) error { return &TrailNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TrailNotFoundException) Code() string { +func (s *TrailNotFoundException) Code() string { return "TrailNotFoundException" } // Message returns the exception's message. -func (s TrailNotFoundException) Message() string { +func (s *TrailNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7370,28 +7370,28 @@ func (s TrailNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TrailNotFoundException) OrigErr() error { +func (s *TrailNotFoundException) OrigErr() error { return nil } -func (s TrailNotFoundException) Error() string { +func (s *TrailNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TrailNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TrailNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TrailNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *TrailNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is no longer in use. type TrailNotProvidedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7408,17 +7408,17 @@ func (s TrailNotProvidedException) GoString() string { func newErrorTrailNotProvidedException(v protocol.ResponseMetadata) error { return &TrailNotProvidedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TrailNotProvidedException) Code() string { +func (s *TrailNotProvidedException) Code() string { return "TrailNotProvidedException" } // Message returns the exception's message. -func (s TrailNotProvidedException) Message() string { +func (s *TrailNotProvidedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7426,28 +7426,28 @@ func (s TrailNotProvidedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TrailNotProvidedException) OrigErr() error { +func (s *TrailNotProvidedException) OrigErr() error { return nil } -func (s TrailNotProvidedException) Error() string { +func (s *TrailNotProvidedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TrailNotProvidedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TrailNotProvidedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TrailNotProvidedException) RequestID() string { - return s.respMetadata.RequestID +func (s *TrailNotProvidedException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the requested operation is not supported. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7464,17 +7464,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7482,22 +7482,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies settings to update for the trail. 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 dec4cd3834b..635d88c5b8e 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 @@ -2228,7 +2228,8 @@ func (c *CloudWatch) ListTagsForResourceRequest(input *ListTagsForResourceInput) // ListTagsForResource API operation for Amazon CloudWatch. // -// Displays the tags associated with a CloudWatch resource. Alarms support tagging. +// Displays the tags associated with a CloudWatch resource. Currently, alarms +// and Contributor Insights rules support tagging. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3071,7 +3072,8 @@ func (c *CloudWatch) TagResourceRequest(input *TagResourceInput) (req *request.R // TagResource API operation for Amazon CloudWatch. // // Assigns one or more tags (key-value pairs) to the specified CloudWatch resource. -// Currently, the only CloudWatch resources that can be tagged are alarms. +// Currently, the only CloudWatch resources that can be tagged are alarms and +// Contributor Insights rules. // // Tags can help you organize and categorize your resources. You can also use // them to scope user permissions, by granting a user permission to access or @@ -3086,7 +3088,7 @@ func (c *CloudWatch) TagResourceRequest(input *TagResourceInput) (req *request.R // associated with the alarm, the new tag value that you specify replaces the // previous value for that tag. // -// You can associate as many as 50 tags with a resource. +// You can associate as many as 50 tags with a CloudWatch 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 @@ -6358,8 +6360,14 @@ func (s *ListMetricsOutput) SetNextToken(v string) *ListMetricsOutput { type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch resource that you want to view tags for. For more - // information on ARN format, see Example ARNs (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-cloudwatch) + // The ARN of the CloudWatch resource that you want to view tags for. + // + // The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name + // + // The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name + // + // For more information on ARN format, see Resource Types Defined by Amazon + // CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) // in the Amazon Web Services General Reference. // // ResourceARN is a required field @@ -7798,6 +7806,21 @@ type PutInsightRuleInput struct { // The state of the rule. Valid values are ENABLED and DISABLED. RuleState *string `min:"1" type:"string"` + + // A list of key-value pairs to associate with the Contributor Insights rule. + // You can associate as many as 50 tags with a rule. + // + // Tags can help you organize and categorize your resources. You can also use + // them to scope user permissions, by granting a user permission to access or + // change only the resources that have certain tag values. + // + // To be able to associate tags with a rule, you must have the cloudwatch:TagResource + // permission in addition to the cloudwatch:PutInsightRule permission. + // + // If you are using this operation to update an existing Contributor Insights + // rule, any tags you specify in this parameter are ignored. To change the tags + // of an existing rule, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html). + Tags []*Tag `type:"list"` } // String returns the string representation @@ -7828,6 +7851,16 @@ func (s *PutInsightRuleInput) Validate() error { if s.RuleState != nil && len(*s.RuleState) < 1 { invalidParams.Add(request.NewErrParamMinLen("RuleState", 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 @@ -7853,6 +7886,12 @@ func (s *PutInsightRuleInput) SetRuleState(v string) *PutInsightRuleInput { return s } +// SetTags sets the Tags field's value. +func (s *PutInsightRuleInput) SetTags(v []*Tag) *PutInsightRuleInput { + s.Tags = v + return s +} + type PutInsightRuleOutput struct { _ struct{} `type:"structure"` } @@ -8681,8 +8720,15 @@ func (s *Tag) SetValue(v string) *Tag { type TagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch alarm that you're adding tags to. The ARN format - // is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name + // The ARN of the CloudWatch resource that you're adding tags to. + // + // The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name + // + // The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name + // + // For more information on ARN format, see Resource Types Defined by Amazon + // CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) + // in the Amazon Web Services General Reference. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -8761,8 +8807,14 @@ func (s TagResourceOutput) GoString() string { type UntagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch resource that you're removing tags from. For more - // information on ARN format, see Example ARNs (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-cloudwatch) + // The ARN of the CloudWatch resource that you're removing tags from. + // + // The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name + // + // The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name + // + // For more information on ARN format, see Resource Types Defined by Amazon + // CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) // in the Amazon Web Services General Reference. // // ResourceARN is a required field 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 4be852438b6..2069fda2168 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 @@ -3242,8 +3242,8 @@ func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { // There is concurrent modification on a rule or target. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3260,17 +3260,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3278,22 +3278,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // A JSON string which you can use to limit the event bus permissions you are @@ -4708,8 +4708,8 @@ func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { // This exception occurs due to unexpected causes. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4726,17 +4726,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4744,28 +4744,28 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // The event pattern is not valid. type InvalidEventPatternException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4782,17 +4782,17 @@ func (s InvalidEventPatternException) GoString() string { func newErrorInvalidEventPatternException(v protocol.ResponseMetadata) error { return &InvalidEventPatternException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEventPatternException) Code() string { +func (s *InvalidEventPatternException) Code() string { return "InvalidEventPatternException" } // Message returns the exception's message. -func (s InvalidEventPatternException) Message() string { +func (s *InvalidEventPatternException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4800,28 +4800,28 @@ func (s InvalidEventPatternException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEventPatternException) OrigErr() error { +func (s *InvalidEventPatternException) OrigErr() error { return nil } -func (s InvalidEventPatternException) Error() string { +func (s *InvalidEventPatternException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEventPatternException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEventPatternException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEventPatternException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEventPatternException) RequestID() string { + return s.RespMetadata.RequestID } // The specified state is not a valid state for an event source. type InvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4838,17 +4838,17 @@ func (s InvalidStateException) GoString() string { func newErrorInvalidStateException(v protocol.ResponseMetadata) error { return &InvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateException) Code() string { +func (s *InvalidStateException) Code() string { return "InvalidStateException" } // Message returns the exception's message. -func (s InvalidStateException) Message() string { +func (s *InvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4856,22 +4856,22 @@ func (s InvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateException) OrigErr() error { +func (s *InvalidStateException) OrigErr() error { return nil } -func (s InvalidStateException) Error() string { +func (s *InvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // This object enables you to specify a JSON path to extract from the event @@ -4920,8 +4920,8 @@ func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters { // You tried to create more rules or add more targets to a rule than is allowed. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4938,17 +4938,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4956,22 +4956,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListEventBusesInput struct { @@ -5768,8 +5768,8 @@ func (s *ListTargetsByRuleOutput) SetTargets(v []*Target) *ListTargetsByRuleOutp // rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, // or UntagResource. type ManagedRuleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5786,17 +5786,17 @@ func (s ManagedRuleException) GoString() string { func newErrorManagedRuleException(v protocol.ResponseMetadata) error { return &ManagedRuleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ManagedRuleException) Code() string { +func (s *ManagedRuleException) Code() string { return "ManagedRuleException" } // Message returns the exception's message. -func (s ManagedRuleException) Message() string { +func (s *ManagedRuleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5804,22 +5804,22 @@ func (s ManagedRuleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ManagedRuleException) OrigErr() error { +func (s *ManagedRuleException) OrigErr() error { return nil } -func (s ManagedRuleException) Error() string { +func (s *ManagedRuleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ManagedRuleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ManagedRuleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ManagedRuleException) RequestID() string { - return s.respMetadata.RequestID +func (s *ManagedRuleException) RequestID() string { + return s.RespMetadata.RequestID } // This structure specifies the network configuration for an ECS task. @@ -5956,8 +5956,8 @@ func (s *PartnerEventSourceAccount) SetState(v string) *PartnerEventSourceAccoun // The event bus policy is too long. For more information, see the limits. type PolicyLengthExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5974,17 +5974,17 @@ func (s PolicyLengthExceededException) GoString() string { func newErrorPolicyLengthExceededException(v protocol.ResponseMetadata) error { return &PolicyLengthExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyLengthExceededException) Code() string { +func (s *PolicyLengthExceededException) Code() string { return "PolicyLengthExceededException" } // Message returns the exception's message. -func (s PolicyLengthExceededException) Message() string { +func (s *PolicyLengthExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5992,22 +5992,22 @@ func (s PolicyLengthExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyLengthExceededException) OrigErr() error { +func (s *PolicyLengthExceededException) OrigErr() error { return nil } -func (s PolicyLengthExceededException) Error() string { +func (s *PolicyLengthExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyLengthExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyLengthExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyLengthExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyLengthExceededException) RequestID() string { + return s.RespMetadata.RequestID } type PutEventsInput struct { @@ -7096,8 +7096,8 @@ func (s *RemoveTargetsResultEntry) SetTargetId(v string) *RemoveTargetsResultEnt // The resource you are trying to create already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7114,17 +7114,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7132,28 +7132,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An entity that you specified does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7170,17 +7170,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7188,22 +7188,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a rule in Amazon EventBridge. 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 594ec846d09..6ea344e5e52 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 @@ -258,9 +258,10 @@ func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) ( // // This is an asynchronous call. If all the required information is provided, // this operation initiates an export task and responds with the ID of the task. -// After the task has started, you can use DescribeExportTasks to get the status -// of the export task. Each account can only have one active (RUNNING or PENDING) -// export task at a time. To cancel an export task, use CancelExportTask. +// After the task has started, you can use DescribeExportTasks (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html) +// to get the status of the export task. Each account can only have one active +// (RUNNING or PENDING) export task at a time. To cancel an export task, use +// CancelExportTask (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html). // // You can export logs from multiple log groups or multiple time ranges to the // same S3 bucket. To separate out log data for each export task, you can specify @@ -896,6 +897,89 @@ func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *D return out, req.Send() } +const opDeleteQueryDefinition = "DeleteQueryDefinition" + +// DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteQueryDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteQueryDefinition for more information on using the DeleteQueryDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteQueryDefinitionRequest method. +// req, resp := client.DeleteQueryDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition +func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteQueryDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteQueryDefinitionInput{} + } + + output = &DeleteQueryDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteQueryDefinition API operation for Amazon CloudWatch 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 Amazon CloudWatch Logs's +// API operation DeleteQueryDefinition for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// A parameter is specified incorrectly. +// +// * ResourceNotFoundException +// The specified resource does not exist. +// +// * ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition +func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error) { + req, out := c.DeleteQueryDefinitionRequest(input) + return out, req.Send() +} + +// DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteQueryDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error) { + req, out := c.DeleteQueryDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteResourcePolicy = "DeleteResourcePolicy" // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the @@ -1914,6 +1998,86 @@ func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *Desc return out, req.Send() } +const opDescribeQueryDefinitions = "DescribeQueryDefinitions" + +// DescribeQueryDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeQueryDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeQueryDefinitions for more information on using the DescribeQueryDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeQueryDefinitionsRequest method. +// req, resp := client.DescribeQueryDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions +func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDefinitionsInput) (req *request.Request, output *DescribeQueryDefinitionsOutput) { + op := &request.Operation{ + Name: opDescribeQueryDefinitions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeQueryDefinitionsInput{} + } + + output = &DescribeQueryDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeQueryDefinitions API operation for Amazon CloudWatch 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 Amazon CloudWatch Logs's +// API operation DescribeQueryDefinitions for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// A parameter is specified incorrectly. +// +// * ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions +func (c *CloudWatchLogs) DescribeQueryDefinitions(input *DescribeQueryDefinitionsInput) (*DescribeQueryDefinitionsOutput, error) { + req, out := c.DescribeQueryDefinitionsRequest(input) + return out, req.Send() +} + +// DescribeQueryDefinitionsWithContext is the same as DescribeQueryDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeQueryDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeQueryDefinitionsWithContext(ctx aws.Context, input *DescribeQueryDefinitionsInput, opts ...request.Option) (*DescribeQueryDefinitionsOutput, error) { + req, out := c.DescribeQueryDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeResourcePolicies = "DescribeResourcePolicies" // DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the @@ -2589,7 +2753,9 @@ func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) // The search is limited to a time period that you specify. // // In the results, fields that start with @ are fields generated by CloudWatch -// Logs. For example, @timestamp is the timestamp of each log event. +// Logs. For example, @timestamp is the timestamp of each log event. For more +// information about the fields that are generated by CloudWatch logs, see Supported +// Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). // // The response results are sorted by the frequency percentage, starting with // the highest percentage. @@ -2777,9 +2943,11 @@ func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (re // // Only the fields requested in the query are returned, along with a @ptr field // which is the identifier for the log record. You can use the value of @ptr -// in a operation to get the full log record. +// in a GetLogRecord (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) +// operation to get the full log record. // -// GetQueryResults does not start a query execution. To run a query, use . +// GetQueryResults does not start a query execution. To run a query, use StartQuery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). // // If the value of the Status field in the output is Running, this operation // returns only partial results. If you see a value of Scheduled or Running @@ -2955,12 +3123,13 @@ func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req // // A destination encapsulates a physical resource (such as an Amazon Kinesis // stream) and enables you to subscribe to a real-time stream of log events -// for a different account, ingested using PutLogEvents. +// for a different account, ingested using PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). // // Through an access policy, a destination controls what is written to it. By // default, PutDestination does not set any access policy with the destination, -// which means a cross-account user cannot call PutSubscriptionFilter against -// this destination. To enable this, the destination owner must call PutDestinationPolicy +// which means a cross-account user cannot call PutSubscriptionFilter (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) +// against this destination. To enable this, the destination owner must call +// PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) // after PutDestination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3269,7 +3438,7 @@ func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (re // // Creates or updates a metric filter and associates it with the specified log // group. Metric filters allow you to configure rules to extract metric data -// from log events ingested through PutLogEvents. +// from log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). // // The maximum number of metric filters that can be associated with a log group // is 100. @@ -3319,6 +3488,89 @@ func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutM return out, req.Send() } +const opPutQueryDefinition = "PutQueryDefinition" + +// PutQueryDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the PutQueryDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutQueryDefinition for more information on using the PutQueryDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutQueryDefinitionRequest method. +// req, resp := client.PutQueryDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition +func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInput) (req *request.Request, output *PutQueryDefinitionOutput) { + op := &request.Operation{ + Name: opPutQueryDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutQueryDefinitionInput{} + } + + output = &PutQueryDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutQueryDefinition API operation for Amazon CloudWatch 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 Amazon CloudWatch Logs's +// API operation PutQueryDefinition for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// A parameter is specified incorrectly. +// +// * ResourceNotFoundException +// The specified resource does not exist. +// +// * ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition +func (c *CloudWatchLogs) PutQueryDefinition(input *PutQueryDefinitionInput) (*PutQueryDefinitionOutput, error) { + req, out := c.PutQueryDefinitionRequest(input) + return out, req.Send() +} + +// PutQueryDefinitionWithContext is the same as PutQueryDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See PutQueryDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutQueryDefinitionWithContext(ctx aws.Context, input *PutQueryDefinitionInput, opts ...request.Option) (*PutQueryDefinitionOutput, error) { + req, out := c.PutQueryDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutResourcePolicy = "PutResourcePolicy" // PutResourcePolicyRequest generates a "aws/request.Request" representing the @@ -3544,8 +3796,9 @@ func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilt // // Creates or updates a subscription filter and associates it with the specified // log group. Subscription filters allow you to subscribe to a real-time stream -// of log events ingested through PutLogEvents and have them delivered to a -// specific destination. Currently, the supported destinations are: +// of log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) +// and have them delivered to a specific destination. Currently, the supported +// destinations are: // // * An Amazon Kinesis stream belonging to the same account as the subscription // filter, for same-account delivery. @@ -3672,7 +3925,7 @@ func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request // Returned Error Types: // * MalformedQueryException // The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see . +// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html)"/>. // // For more information about valid query syntax, see CloudWatch Logs Insights // Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). @@ -3845,11 +4098,11 @@ func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *reque // // Adds or updates the specified tags for the specified log group. // -// To list the tags for a log group, use ListTagsLogGroup. To remove tags, use -// UntagLogGroup. +// To list the tags for a log group, use ListTagsLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsLogGroup.html). +// To remove tags, use UntagLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagLogGroup.html). // // For more information about tags, see Tag Log Groups in Amazon CloudWatch -// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/log-group-tagging.html) +// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) // in the Amazon CloudWatch Logs User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4019,8 +4272,8 @@ func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *r // // Removes the specified tags from the specified log group. // -// To list the tags for a log group, use ListTagsLogGroup. To add tags, use -// UntagLogGroup. +// To list the tags for a log group, use ListTagsLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsLogGroup.html). +// To add tags, use TagLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagLogGroup.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 @@ -4483,8 +4736,8 @@ func (s CreateLogStreamOutput) GoString() string { // The event was already logged. type DataAlreadyAcceptedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` @@ -4503,17 +4756,17 @@ func (s DataAlreadyAcceptedException) GoString() string { func newErrorDataAlreadyAcceptedException(v protocol.ResponseMetadata) error { return &DataAlreadyAcceptedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DataAlreadyAcceptedException) Code() string { +func (s *DataAlreadyAcceptedException) Code() string { return "DataAlreadyAcceptedException" } // Message returns the exception's message. -func (s DataAlreadyAcceptedException) Message() string { +func (s *DataAlreadyAcceptedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4521,22 +4774,22 @@ func (s DataAlreadyAcceptedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DataAlreadyAcceptedException) OrigErr() error { +func (s *DataAlreadyAcceptedException) OrigErr() error { return nil } -func (s DataAlreadyAcceptedException) Error() string { +func (s *DataAlreadyAcceptedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DataAlreadyAcceptedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DataAlreadyAcceptedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DataAlreadyAcceptedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DataAlreadyAcceptedException) RequestID() string { + return s.RespMetadata.RequestID } type DeleteDestinationInput struct { @@ -4793,6 +5046,64 @@ func (s DeleteMetricFilterOutput) GoString() string { return s.String() } +type DeleteQueryDefinitionInput struct { + _ struct{} `type:"structure"` + + // QueryDefinitionId is a required field + QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteQueryDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueryDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteQueryDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueryDefinitionInput"} + if s.QueryDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryDefinitionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryDefinitionId sets the QueryDefinitionId field's value. +func (s *DeleteQueryDefinitionInput) SetQueryDefinitionId(v string) *DeleteQueryDefinitionInput { + s.QueryDefinitionId = &v + return s +} + +type DeleteQueryDefinitionOutput struct { + _ struct{} `type:"structure"` + + Success *bool `locationName:"success" type:"boolean"` +} + +// String returns the string representation +func (s DeleteQueryDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueryDefinitionOutput) GoString() string { + return s.String() +} + +// SetSuccess sets the Success field's value. +func (s *DeleteQueryDefinitionOutput) SetSuccess(v bool) *DeleteQueryDefinitionOutput { + s.Success = &v + return s +} + type DeleteResourcePolicyInput struct { _ struct{} `type:"structure"` @@ -5631,6 +5942,97 @@ func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutpu return s } +type DescribeQueryDefinitionsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + QueryDefinitionNamePrefix *string `locationName:"queryDefinitionNamePrefix" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeQueryDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeQueryDefinitionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeQueryDefinitionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeQueryDefinitionsInput"} + 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.QueryDefinitionNamePrefix != nil && len(*s.QueryDefinitionNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryDefinitionNamePrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeQueryDefinitionsInput) SetMaxResults(v int64) *DescribeQueryDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueryDefinitionsInput) SetNextToken(v string) *DescribeQueryDefinitionsInput { + s.NextToken = &v + return s +} + +// SetQueryDefinitionNamePrefix sets the QueryDefinitionNamePrefix field's value. +func (s *DescribeQueryDefinitionsInput) SetQueryDefinitionNamePrefix(v string) *DescribeQueryDefinitionsInput { + s.QueryDefinitionNamePrefix = &v + return s +} + +type DescribeQueryDefinitionsOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + QueryDefinitions []*QueryDefinition `locationName:"queryDefinitions" type:"list"` +} + +// String returns the string representation +func (s DescribeQueryDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeQueryDefinitionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueryDefinitionsOutput) SetNextToken(v string) *DescribeQueryDefinitionsOutput { + s.NextToken = &v + return s +} + +// SetQueryDefinitions sets the QueryDefinitions field's value. +func (s *DescribeQueryDefinitionsOutput) SetQueryDefinitions(v []*QueryDefinition) *DescribeQueryDefinitionsOutput { + s.QueryDefinitions = v + return s +} + type DescribeResourcePoliciesInput struct { _ struct{} `type:"structure"` @@ -6838,8 +7240,8 @@ func (s *InputLogEvent) SetTimestamp(v int64) *InputLogEvent { // The operation is not valid on the specified resource. type InvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6856,17 +7258,17 @@ func (s InvalidOperationException) GoString() string { func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { return &InvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOperationException) Code() string { +func (s *InvalidOperationException) Code() string { return "InvalidOperationException" } // Message returns the exception's message. -func (s InvalidOperationException) Message() string { +func (s *InvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6874,28 +7276,28 @@ func (s InvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOperationException) OrigErr() error { +func (s *InvalidOperationException) OrigErr() error { return nil } -func (s InvalidOperationException) Error() string { +func (s *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // A parameter is specified incorrectly. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6912,17 +7314,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6930,29 +7332,29 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The sequence token is not valid. You can get the correct sequence token in // the expectedSequenceToken field in the InvalidSequenceTokenException message. type InvalidSequenceTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` @@ -6971,17 +7373,17 @@ func (s InvalidSequenceTokenException) GoString() string { func newErrorInvalidSequenceTokenException(v protocol.ResponseMetadata) error { return &InvalidSequenceTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSequenceTokenException) Code() string { +func (s *InvalidSequenceTokenException) Code() string { return "InvalidSequenceTokenException" } // Message returns the exception's message. -func (s InvalidSequenceTokenException) Message() string { +func (s *InvalidSequenceTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6989,28 +7391,28 @@ func (s InvalidSequenceTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSequenceTokenException) OrigErr() error { +func (s *InvalidSequenceTokenException) OrigErr() error { return nil } -func (s InvalidSequenceTokenException) Error() string { +func (s *InvalidSequenceTokenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSequenceTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSequenceTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSequenceTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSequenceTokenException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the maximum number of resources that can be created. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7027,17 +7429,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7045,22 +7447,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListTagsLogGroupInput struct { @@ -7344,13 +7746,13 @@ func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { } // The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see . +// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html)"/>. // // For more information about valid query syntax, see CloudWatch Logs Insights // Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). type MalformedQueryException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -7370,17 +7772,17 @@ func (s MalformedQueryException) GoString() string { func newErrorMalformedQueryException(v protocol.ResponseMetadata) error { return &MalformedQueryException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedQueryException) Code() string { +func (s *MalformedQueryException) Code() string { return "MalformedQueryException" } // Message returns the exception's message. -func (s MalformedQueryException) Message() string { +func (s *MalformedQueryException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7388,22 +7790,22 @@ func (s MalformedQueryException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedQueryException) OrigErr() error { +func (s *MalformedQueryException) OrigErr() error { return nil } -func (s MalformedQueryException) Error() string { +func (s *MalformedQueryException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedQueryException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedQueryException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedQueryException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedQueryException) RequestID() string { + return s.RespMetadata.RequestID } // Metric filters express how CloudWatch Logs would extract metric observations @@ -7528,7 +7930,9 @@ type MetricTransformation struct { // MetricName is a required field MetricName *string `locationName:"metricName" type:"string" required:"true"` - // The namespace of the CloudWatch metric. + // A custom namespace to contain your metric in CloudWatch. Use namespaces to + // group together metrics that are similar. For more information, see Namespaces + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). // // MetricNamespace is a required field MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` @@ -7595,8 +7999,8 @@ func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { // Multiple requests to update the same resource were in conflict. type OperationAbortedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7613,17 +8017,17 @@ func (s OperationAbortedException) GoString() string { func newErrorOperationAbortedException(v protocol.ResponseMetadata) error { return &OperationAbortedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationAbortedException) Code() string { +func (s *OperationAbortedException) Code() string { return "OperationAbortedException" } // Message returns the exception's message. -func (s OperationAbortedException) Message() string { +func (s *OperationAbortedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7631,22 +8035,22 @@ func (s OperationAbortedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationAbortedException) OrigErr() error { +func (s *OperationAbortedException) OrigErr() error { return nil } -func (s OperationAbortedException) Error() string { +func (s *OperationAbortedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationAbortedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationAbortedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationAbortedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationAbortedException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a log event. @@ -7885,9 +8289,9 @@ type PutLogEventsInput struct { // The sequence token obtained from the response of the previous PutLogEvents // call. An upload in a newly created log stream does not require a sequence - // token. You can also get the sequence token using DescribeLogStreams. If you - // call PutLogEvents twice within a narrow time period using the same value - // for sequenceToken, both calls may be successful, or one may be rejected. + // token. You can also get the sequence token using DescribeLogStreams (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html). + // If you call PutLogEvents twice within a narrow time period using the same + // value for sequenceToken, both calls may be successful, or one may be rejected. SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"` } @@ -8111,6 +8515,98 @@ func (s PutMetricFilterOutput) GoString() string { return s.String() } +type PutQueryDefinitionInput struct { + _ struct{} `type:"structure"` + + LogGroupNames []*string `locationName:"logGroupNames" type:"list"` + + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string"` + + // QueryString is a required field + QueryString *string `locationName:"queryString" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutQueryDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutQueryDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutQueryDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutQueryDefinitionInput"} + 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.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.QueryString != nil && len(*s.QueryString) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupNames sets the LogGroupNames field's value. +func (s *PutQueryDefinitionInput) SetLogGroupNames(v []*string) *PutQueryDefinitionInput { + s.LogGroupNames = v + return s +} + +// SetName sets the Name field's value. +func (s *PutQueryDefinitionInput) SetName(v string) *PutQueryDefinitionInput { + s.Name = &v + return s +} + +// SetQueryDefinitionId sets the QueryDefinitionId field's value. +func (s *PutQueryDefinitionInput) SetQueryDefinitionId(v string) *PutQueryDefinitionInput { + s.QueryDefinitionId = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *PutQueryDefinitionInput) SetQueryString(v string) *PutQueryDefinitionInput { + s.QueryString = &v + return s +} + +type PutQueryDefinitionOutput struct { + _ struct{} `type:"structure"` + + QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string"` +} + +// String returns the string representation +func (s PutQueryDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutQueryDefinitionOutput) GoString() string { + return s.String() +} + +// SetQueryDefinitionId sets the QueryDefinitionId field's value. +func (s *PutQueryDefinitionOutput) SetQueryDefinitionId(v string) *PutQueryDefinitionOutput { + s.QueryDefinitionId = &v + return s +} + type PutResourcePolicyInput struct { _ struct{} `type:"structure"` @@ -8290,7 +8786,8 @@ type PutSubscriptionFilterInput struct { // A name for the subscription filter. If you are updating an existing filter, // you must specify the correct name in filterName. Otherwise, the call fails // because you cannot associate a second filter with a log group. To find the - // name of the filter currently associated with a log group, use DescribeSubscriptionFilters. + // name of the filter currently associated with a log group, use DescribeSubscriptionFilters + // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeSubscriptionFilters.html). // // FilterName is a required field FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` @@ -8472,6 +8969,60 @@ func (s *QueryCompileErrorLocation) SetStartCharOffset(v int64) *QueryCompileErr return s } +type QueryDefinition struct { + _ struct{} `type:"structure"` + + LastModified *int64 `locationName:"lastModified" type:"long"` + + LogGroupNames []*string `locationName:"logGroupNames" type:"list"` + + Name *string `locationName:"name" min:"1" type:"string"` + + QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string"` + + QueryString *string `locationName:"queryString" min:"1" type:"string"` +} + +// String returns the string representation +func (s QueryDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryDefinition) GoString() string { + return s.String() +} + +// SetLastModified sets the LastModified field's value. +func (s *QueryDefinition) SetLastModified(v int64) *QueryDefinition { + s.LastModified = &v + return s +} + +// SetLogGroupNames sets the LogGroupNames field's value. +func (s *QueryDefinition) SetLogGroupNames(v []*string) *QueryDefinition { + s.LogGroupNames = v + return s +} + +// SetName sets the Name field's value. +func (s *QueryDefinition) SetName(v string) *QueryDefinition { + s.Name = &v + return s +} + +// SetQueryDefinitionId sets the QueryDefinitionId field's value. +func (s *QueryDefinition) SetQueryDefinitionId(v string) *QueryDefinition { + s.QueryDefinitionId = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *QueryDefinition) SetQueryString(v string) *QueryDefinition { + s.QueryString = &v + return s +} + // Information about one CloudWatch Logs Insights query that matches the request // in a DescribeQueries operation. type QueryInfo struct { @@ -8622,8 +9173,8 @@ func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogE // The specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8640,17 +9191,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8658,28 +9209,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8696,17 +9247,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8714,22 +9265,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A policy enabling one or more entities to put logs to a log group in this @@ -8778,6 +9329,9 @@ func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy { // Contains one field from one log event returned by a CloudWatch Logs Insights // query, along with the value of that field. +// +// For more information about the fields that are generated by CloudWatch logs, +// see Supported Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). type ResultField struct { _ struct{} `type:"structure"` @@ -8845,8 +9399,8 @@ func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { // The service cannot complete the request. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8863,17 +9417,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8881,22 +9435,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type StartQueryInput struct { @@ -9333,8 +9887,8 @@ func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestM // The most likely cause is an invalid AWS access key ID or secret key. type UnrecognizedClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9351,17 +9905,17 @@ func (s UnrecognizedClientException) GoString() string { func newErrorUnrecognizedClientException(v protocol.ResponseMetadata) error { return &UnrecognizedClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnrecognizedClientException) Code() string { +func (s *UnrecognizedClientException) Code() string { return "UnrecognizedClientException" } // Message returns the exception's message. -func (s UnrecognizedClientException) Message() string { +func (s *UnrecognizedClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9369,22 +9923,22 @@ func (s UnrecognizedClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnrecognizedClientException) OrigErr() error { +func (s *UnrecognizedClientException) OrigErr() error { return nil } -func (s UnrecognizedClientException) Error() string { +func (s *UnrecognizedClientException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnrecognizedClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnrecognizedClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnrecognizedClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnrecognizedClientException) RequestID() string { + return s.RespMetadata.RequestID } type UntagLogGroupInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go index c6e23336d00..39c9cd5eafe 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go @@ -43,7 +43,7 @@ const ( // "MalformedQueryException". // // The query string is not valid. Details about this error are displayed in - // a QueryCompileError object. For more information, see . + // a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html)"/>. // // For more information about valid query syntax, see CloudWatch Logs Insights // Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 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 c22775a00ad..0da13a3c1b1 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 @@ -1205,6 +1205,12 @@ func (c *CodeBuild) DescribeTestCasesRequest(input *DescribeTestCasesInput) (req Name: opDescribeTestCases, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -1256,6 +1262,58 @@ func (c *CodeBuild) DescribeTestCasesWithContext(ctx aws.Context, input *Describ return out, req.Send() } +// DescribeTestCasesPages iterates over the pages of a DescribeTestCases operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTestCases 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 DescribeTestCases operation. +// pageNum := 0 +// err := client.DescribeTestCasesPages(params, +// func(page *codebuild.DescribeTestCasesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) DescribeTestCasesPages(input *DescribeTestCasesInput, fn func(*DescribeTestCasesOutput, bool) bool) error { + return c.DescribeTestCasesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTestCasesPagesWithContext same as DescribeTestCasesPages 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 *CodeBuild) DescribeTestCasesPagesWithContext(ctx aws.Context, input *DescribeTestCasesInput, fn func(*DescribeTestCasesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTestCasesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTestCasesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeTestCasesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opGetResourcePolicy = "GetResourcePolicy" // GetResourcePolicyRequest generates a "aws/request.Request" representing the @@ -1539,6 +1597,12 @@ func (c *CodeBuild) ListBuildsRequest(input *ListBuildsInput) (req *request.Requ Name: opListBuilds, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { @@ -1587,6 +1651,58 @@ func (c *CodeBuild) ListBuildsWithContext(ctx aws.Context, input *ListBuildsInpu return out, req.Send() } +// ListBuildsPages iterates over the pages of a ListBuilds operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBuilds 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 ListBuilds operation. +// pageNum := 0 +// err := client.ListBuildsPages(params, +// func(page *codebuild.ListBuildsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListBuildsPages(input *ListBuildsInput, fn func(*ListBuildsOutput, bool) bool) error { + return c.ListBuildsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBuildsPagesWithContext same as ListBuildsPages 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 *CodeBuild) ListBuildsPagesWithContext(ctx aws.Context, input *ListBuildsInput, fn func(*ListBuildsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBuildsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBuildsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListBuildsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListBuildsForProject = "ListBuildsForProject" // ListBuildsForProjectRequest generates a "aws/request.Request" representing the @@ -1618,6 +1734,12 @@ func (c *CodeBuild) ListBuildsForProjectRequest(input *ListBuildsForProjectInput Name: opListBuildsForProject, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { @@ -1670,6 +1792,58 @@ func (c *CodeBuild) ListBuildsForProjectWithContext(ctx aws.Context, input *List return out, req.Send() } +// ListBuildsForProjectPages iterates over the pages of a ListBuildsForProject operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBuildsForProject 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 ListBuildsForProject operation. +// pageNum := 0 +// err := client.ListBuildsForProjectPages(params, +// func(page *codebuild.ListBuildsForProjectOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListBuildsForProjectPages(input *ListBuildsForProjectInput, fn func(*ListBuildsForProjectOutput, bool) bool) error { + return c.ListBuildsForProjectPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBuildsForProjectPagesWithContext same as ListBuildsForProjectPages 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 *CodeBuild) ListBuildsForProjectPagesWithContext(ctx aws.Context, input *ListBuildsForProjectInput, fn func(*ListBuildsForProjectOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBuildsForProjectInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBuildsForProjectRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListBuildsForProjectOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages" // ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the @@ -1775,6 +1949,12 @@ func (c *CodeBuild) ListProjectsRequest(input *ListProjectsInput) (req *request. Name: opListProjects, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { @@ -1824,6 +2004,58 @@ func (c *CodeBuild) ListProjectsWithContext(ctx aws.Context, input *ListProjects return out, req.Send() } +// ListProjectsPages iterates over the pages of a ListProjects operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListProjects 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 ListProjects operation. +// pageNum := 0 +// err := client.ListProjectsPages(params, +// func(page *codebuild.ListProjectsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListProjectsPages(input *ListProjectsInput, fn func(*ListProjectsOutput, bool) bool) error { + return c.ListProjectsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListProjectsPagesWithContext same as ListProjectsPages 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 *CodeBuild) ListProjectsPagesWithContext(ctx aws.Context, input *ListProjectsInput, fn func(*ListProjectsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListProjectsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListProjectsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListProjectsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListReportGroups = "ListReportGroups" // ListReportGroupsRequest generates a "aws/request.Request" representing the @@ -1855,6 +2087,12 @@ func (c *CodeBuild) ListReportGroupsRequest(input *ListReportGroupsInput) (req * Name: opListReportGroups, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -1903,6 +2141,58 @@ func (c *CodeBuild) ListReportGroupsWithContext(ctx aws.Context, input *ListRepo return out, req.Send() } +// ListReportGroupsPages iterates over the pages of a ListReportGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListReportGroups 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 ListReportGroups operation. +// pageNum := 0 +// err := client.ListReportGroupsPages(params, +// func(page *codebuild.ListReportGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListReportGroupsPages(input *ListReportGroupsInput, fn func(*ListReportGroupsOutput, bool) bool) error { + return c.ListReportGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListReportGroupsPagesWithContext same as ListReportGroupsPages 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 *CodeBuild) ListReportGroupsPagesWithContext(ctx aws.Context, input *ListReportGroupsInput, fn func(*ListReportGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListReportGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListReportGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListReportGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListReports = "ListReports" // ListReportsRequest generates a "aws/request.Request" representing the @@ -1934,6 +2224,12 @@ func (c *CodeBuild) ListReportsRequest(input *ListReportsInput) (req *request.Re Name: opListReports, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -1982,6 +2278,58 @@ func (c *CodeBuild) ListReportsWithContext(ctx aws.Context, input *ListReportsIn return out, req.Send() } +// ListReportsPages iterates over the pages of a ListReports operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListReports 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 ListReports operation. +// pageNum := 0 +// err := client.ListReportsPages(params, +// func(page *codebuild.ListReportsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListReportsPages(input *ListReportsInput, fn func(*ListReportsOutput, bool) bool) error { + return c.ListReportsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListReportsPagesWithContext same as ListReportsPages 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 *CodeBuild) ListReportsPagesWithContext(ctx aws.Context, input *ListReportsInput, fn func(*ListReportsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListReportsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListReportsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListReportsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListReportsForReportGroup = "ListReportsForReportGroup" // ListReportsForReportGroupRequest generates a "aws/request.Request" representing the @@ -2013,6 +2361,12 @@ func (c *CodeBuild) ListReportsForReportGroupRequest(input *ListReportsForReport Name: opListReportsForReportGroup, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -2064,6 +2418,58 @@ func (c *CodeBuild) ListReportsForReportGroupWithContext(ctx aws.Context, input return out, req.Send() } +// ListReportsForReportGroupPages iterates over the pages of a ListReportsForReportGroup operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListReportsForReportGroup 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 ListReportsForReportGroup operation. +// pageNum := 0 +// err := client.ListReportsForReportGroupPages(params, +// func(page *codebuild.ListReportsForReportGroupOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListReportsForReportGroupPages(input *ListReportsForReportGroupInput, fn func(*ListReportsForReportGroupOutput, bool) bool) error { + return c.ListReportsForReportGroupPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListReportsForReportGroupPagesWithContext same as ListReportsForReportGroupPages 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 *CodeBuild) ListReportsForReportGroupPagesWithContext(ctx aws.Context, input *ListReportsForReportGroupInput, fn func(*ListReportsForReportGroupOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListReportsForReportGroupInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListReportsForReportGroupRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListReportsForReportGroupOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListSharedProjects = "ListSharedProjects" // ListSharedProjectsRequest generates a "aws/request.Request" representing the @@ -2095,6 +2501,12 @@ func (c *CodeBuild) ListSharedProjectsRequest(input *ListSharedProjectsInput) (r Name: opListSharedProjects, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -2143,6 +2555,58 @@ func (c *CodeBuild) ListSharedProjectsWithContext(ctx aws.Context, input *ListSh return out, req.Send() } +// ListSharedProjectsPages iterates over the pages of a ListSharedProjects operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSharedProjects 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 ListSharedProjects operation. +// pageNum := 0 +// err := client.ListSharedProjectsPages(params, +// func(page *codebuild.ListSharedProjectsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListSharedProjectsPages(input *ListSharedProjectsInput, fn func(*ListSharedProjectsOutput, bool) bool) error { + return c.ListSharedProjectsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSharedProjectsPagesWithContext same as ListSharedProjectsPages 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 *CodeBuild) ListSharedProjectsPagesWithContext(ctx aws.Context, input *ListSharedProjectsInput, fn func(*ListSharedProjectsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSharedProjectsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSharedProjectsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListSharedProjectsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListSharedReportGroups = "ListSharedReportGroups" // ListSharedReportGroupsRequest generates a "aws/request.Request" representing the @@ -2174,6 +2638,12 @@ func (c *CodeBuild) ListSharedReportGroupsRequest(input *ListSharedReportGroupsI Name: opListSharedReportGroups, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -2222,6 +2692,58 @@ func (c *CodeBuild) ListSharedReportGroupsWithContext(ctx aws.Context, input *Li return out, req.Send() } +// ListSharedReportGroupsPages iterates over the pages of a ListSharedReportGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSharedReportGroups 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 ListSharedReportGroups operation. +// pageNum := 0 +// err := client.ListSharedReportGroupsPages(params, +// func(page *codebuild.ListSharedReportGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeBuild) ListSharedReportGroupsPages(input *ListSharedReportGroupsInput, fn func(*ListSharedReportGroupsOutput, bool) bool) error { + return c.ListSharedReportGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSharedReportGroupsPagesWithContext same as ListSharedReportGroupsPages 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 *CodeBuild) ListSharedReportGroupsPagesWithContext(ctx aws.Context, input *ListSharedReportGroupsInput, fn func(*ListSharedReportGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSharedReportGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSharedReportGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListSharedReportGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListSourceCredentials = "ListSourceCredentials" // ListSourceCredentialsRequest generates a "aws/request.Request" representing the @@ -2798,8 +3320,8 @@ func (c *CodeBuild) UpdateWebhookWithContext(ctx aws.Context, input *UpdateWebho // An AWS service limit was exceeded for the calling AWS account. type AccountLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2816,17 +3338,17 @@ func (s AccountLimitExceededException) GoString() string { func newErrorAccountLimitExceededException(v protocol.ResponseMetadata) error { return &AccountLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccountLimitExceededException) Code() string { +func (s *AccountLimitExceededException) Code() string { return "AccountLimitExceededException" } // Message returns the exception's message. -func (s AccountLimitExceededException) Message() string { +func (s *AccountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2834,22 +3356,22 @@ func (s AccountLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccountLimitExceededException) OrigErr() error { +func (s *AccountLimitExceededException) OrigErr() error { return nil } -func (s AccountLimitExceededException) Error() string { +func (s *AccountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccountLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccountLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccountLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccountLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type BatchDeleteBuildsInput struct { @@ -5003,12 +5525,15 @@ type EnvironmentVariable struct { // The type of environment variable. Valid values include: // // * PARAMETER_STORE: An environment variable stored in Amazon EC2 Systems - // Manager Parameter Store. + // Manager Parameter Store. To learn how to specify a parameter store environment + // variable, see parameter store reference-key in the buildspec file (https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#parameter-store-build-spec). // // * PLAINTEXT: An environment variable in plain text format. This is the // default value. // // * SECRETS_MANAGER: An environment variable stored in AWS Secrets Manager. + // To learn how to specify a secrets manager environment variable, see secrets + // manager reference-key in the buildspec file (https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#secrets-manager-build-spec). Type *string `locationName:"type" type:"string" enum:"EnvironmentVariableType"` // The value of the environment variable. @@ -5333,8 +5858,8 @@ func (s *ImportSourceCredentialsOutput) SetArn(v string) *ImportSourceCredential // The input value that was provided is not valid. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5351,17 +5876,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5369,22 +5894,22 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } type InvalidateProjectCacheInput struct { @@ -6588,8 +7113,8 @@ func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { // There was a problem with the underlying OAuth provider. type OAuthProviderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6606,17 +7131,17 @@ func (s OAuthProviderException) GoString() string { func newErrorOAuthProviderException(v protocol.ResponseMetadata) error { return &OAuthProviderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OAuthProviderException) Code() string { +func (s *OAuthProviderException) Code() string { return "OAuthProviderException" } // Message returns the exception's message. -func (s OAuthProviderException) Message() string { +func (s *OAuthProviderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6624,22 +7149,22 @@ func (s OAuthProviderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OAuthProviderException) OrigErr() error { +func (s *OAuthProviderException) OrigErr() error { return nil } -func (s OAuthProviderException) Error() string { +func (s *OAuthProviderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OAuthProviderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OAuthProviderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OAuthProviderException) RequestID() string { - return s.respMetadata.RequestID +func (s *OAuthProviderException) RequestID() string { + return s.RespMetadata.RequestID } // Additional information about a build phase that has an error. You can use @@ -7379,16 +7904,16 @@ type ProjectEnvironment struct { // (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Sydney), and EU (Frankfurt). // // * The environment type LINUX_CONTAINER with compute type build.general1.2xlarge - // is available only in regions US East (N. Virginia), US East (N. Virginia), - // US West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), + // is available only in regions US East (N. Virginia), US East (Ohio), US + // West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), // Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), // Asia Pacific (Sydney), China (Beijing), and China (Ningxia). // // * The environment type LINUX_GPU_CONTAINER is available only in regions - // US East (N. Virginia), US East (N. Virginia), US West (Oregon), Canada - // (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), - // Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney) - // , China (Beijing), and China (Ningxia). + // US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), + // EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia + // Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney) , China + // (Beijing), and China (Ningxia). // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"EnvironmentType"` @@ -8266,8 +8791,8 @@ func (s *ReportGroup) SetType(v string) *ReportGroup { // The specified AWS resource cannot be created, because an AWS resource with // the same settings already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8284,17 +8809,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8302,28 +8827,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified AWS resource cannot be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8340,17 +8865,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8358,22 +8883,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Information about S3 logs for a build project. @@ -8684,7 +9209,7 @@ type StartBuildInput struct { // A unique, case sensitive identifier you provide to ensure the idempotency // of the StartBuild request. The token is included in the StartBuild request - // and is valid for 12 hours. If you repeat the StartBuild request with the + // and is valid for 5 minutes. If you repeat the StartBuild request with the // same token, but change a parameter, AWS CodeBuild returns a parameter mismatch // error. IdempotencyToken *string `locationName:"idempotencyToken" type:"string"` @@ -10089,16 +10614,16 @@ type WebhookFilter struct { // Pattern is a required field Pattern *string `locationName:"pattern" type:"string" required:"true"` - // The type of webhook filter. There are five webhook filter types: EVENT, ACTOR_ACCOUNT_ID, - // HEAD_REF, BASE_REF, and FILE_PATH. + // The type of webhook filter. There are six webhook filter types: EVENT, ACTOR_ACCOUNT_ID, + // HEAD_REF, BASE_REF, FILE_PATH, and COMMIT_MESSAGE. // // EVENT // // A webhook event triggers a build when the provided pattern matches one of - // four event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, and PULL_REQUEST_REOPENED. - // The EVENT patterns are specified as a comma-separated string. For example, - // PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull request - // created, and pull request updated events. + // five event types: PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED, + // and PULL_REQUEST_MERGED. The EVENT patterns are specified as a comma-separated + // string. For example, PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters + // all push, pull request created, and pull request updated events. // // The PULL_REQUEST_REOPENED works with GitHub and GitHub Enterprise only. // @@ -10127,7 +10652,18 @@ type WebhookFilter struct { // A webhook triggers a build when the path of a changed file matches the regular // expression pattern. // - // Works with GitHub and GitHub Enterprise push events only. + // Works with GitHub and Bitbucket events push and pull requests events. Also + // works with GitHub Enterprise push events, but does not work with GitHub Enterprise + // pull request events. + // + // COMMIT_MESSAGE + // + // A webhook triggers a build when the head commit message matches the regular + // expression pattern. + // + // Works with GitHub and Bitbucket events push and pull requests events. Also + // works with GitHub Enterprise push events, but does not work with GitHub Enterprise + // pull request events. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"WebhookFilterType"` @@ -10517,4 +11053,7 @@ const ( // WebhookFilterTypeFilePath is a WebhookFilterType enum value WebhookFilterTypeFilePath = "FILE_PATH" + + // WebhookFilterTypeCommitMessage is a WebhookFilterType enum value + WebhookFilterTypeCommitMessage = "COMMIT_MESSAGE" ) 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 8a444d564da..e79a77db563 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 @@ -10354,8 +10354,8 @@ func (c *CodeCommit) UpdateRepositoryNameWithContext(ctx aws.Context, input *Upd // The specified Amazon Resource Name (ARN) does not exist in the AWS account. type ActorDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10372,17 +10372,17 @@ func (s ActorDoesNotExistException) GoString() string { func newErrorActorDoesNotExistException(v protocol.ResponseMetadata) error { return &ActorDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActorDoesNotExistException) Code() string { +func (s *ActorDoesNotExistException) Code() string { return "ActorDoesNotExistException" } // Message returns the exception's message. -func (s ActorDoesNotExistException) Message() string { +func (s *ActorDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10390,22 +10390,22 @@ func (s ActorDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActorDoesNotExistException) OrigErr() error { +func (s *ActorDoesNotExistException) OrigErr() error { return nil } -func (s ActorDoesNotExistException) Error() string { +func (s *ActorDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ActorDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActorDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActorDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ActorDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a specific approval on a pull request. @@ -10532,8 +10532,8 @@ func (s *ApprovalRule) SetRuleContentSha256(v string) *ApprovalRule { // The content for the approval rule is empty. You must provide some content // for an approval rule. The content cannot be null. type ApprovalRuleContentRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10550,17 +10550,17 @@ func (s ApprovalRuleContentRequiredException) GoString() string { func newErrorApprovalRuleContentRequiredException(v protocol.ResponseMetadata) error { return &ApprovalRuleContentRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleContentRequiredException) Code() string { +func (s *ApprovalRuleContentRequiredException) Code() string { return "ApprovalRuleContentRequiredException" } // Message returns the exception's message. -func (s ApprovalRuleContentRequiredException) Message() string { +func (s *ApprovalRuleContentRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10568,28 +10568,28 @@ func (s ApprovalRuleContentRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleContentRequiredException) OrigErr() error { +func (s *ApprovalRuleContentRequiredException) OrigErr() error { return nil } -func (s ApprovalRuleContentRequiredException) Error() string { +func (s *ApprovalRuleContentRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleContentRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleContentRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleContentRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleContentRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified approval rule does not exist. type ApprovalRuleDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10606,17 +10606,17 @@ func (s ApprovalRuleDoesNotExistException) GoString() string { func newErrorApprovalRuleDoesNotExistException(v protocol.ResponseMetadata) error { return &ApprovalRuleDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleDoesNotExistException) Code() string { +func (s *ApprovalRuleDoesNotExistException) Code() string { return "ApprovalRuleDoesNotExistException" } // Message returns the exception's message. -func (s ApprovalRuleDoesNotExistException) Message() string { +func (s *ApprovalRuleDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10624,22 +10624,22 @@ func (s ApprovalRuleDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleDoesNotExistException) OrigErr() error { +func (s *ApprovalRuleDoesNotExistException) OrigErr() error { return nil } -func (s ApprovalRuleDoesNotExistException) Error() string { +func (s *ApprovalRuleDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about an event for an approval rule. @@ -10687,8 +10687,8 @@ func (s *ApprovalRuleEventMetadata) SetApprovalRuleName(v string) *ApprovalRuleE // An approval rule with that name already exists. Approval rule names must // be unique within the scope of a pull request. type ApprovalRuleNameAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10705,17 +10705,17 @@ func (s ApprovalRuleNameAlreadyExistsException) GoString() string { func newErrorApprovalRuleNameAlreadyExistsException(v protocol.ResponseMetadata) error { return &ApprovalRuleNameAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleNameAlreadyExistsException) Code() string { +func (s *ApprovalRuleNameAlreadyExistsException) Code() string { return "ApprovalRuleNameAlreadyExistsException" } // Message returns the exception's message. -func (s ApprovalRuleNameAlreadyExistsException) Message() string { +func (s *ApprovalRuleNameAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10723,28 +10723,28 @@ func (s ApprovalRuleNameAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleNameAlreadyExistsException) OrigErr() error { +func (s *ApprovalRuleNameAlreadyExistsException) OrigErr() error { return nil } -func (s ApprovalRuleNameAlreadyExistsException) Error() string { +func (s *ApprovalRuleNameAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleNameAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleNameAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleNameAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleNameAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An approval rule name is required, but was not specified. type ApprovalRuleNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10761,17 +10761,17 @@ func (s ApprovalRuleNameRequiredException) GoString() string { func newErrorApprovalRuleNameRequiredException(v protocol.ResponseMetadata) error { return &ApprovalRuleNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleNameRequiredException) Code() string { +func (s *ApprovalRuleNameRequiredException) Code() string { return "ApprovalRuleNameRequiredException" } // Message returns the exception's message. -func (s ApprovalRuleNameRequiredException) Message() string { +func (s *ApprovalRuleNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10779,22 +10779,22 @@ func (s ApprovalRuleNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleNameRequiredException) OrigErr() error { +func (s *ApprovalRuleNameRequiredException) OrigErr() error { return nil } -func (s ApprovalRuleNameRequiredException) Error() string { +func (s *ApprovalRuleNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about an override event for approval rules for a pull @@ -10923,8 +10923,8 @@ func (s *ApprovalRuleTemplate) SetRuleContentSha256(v string) *ApprovalRuleTempl // The content for the approval rule template is empty. You must provide some // content for an approval rule template. The content cannot be null. type ApprovalRuleTemplateContentRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10941,17 +10941,17 @@ func (s ApprovalRuleTemplateContentRequiredException) GoString() string { func newErrorApprovalRuleTemplateContentRequiredException(v protocol.ResponseMetadata) error { return &ApprovalRuleTemplateContentRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleTemplateContentRequiredException) Code() string { +func (s *ApprovalRuleTemplateContentRequiredException) Code() string { return "ApprovalRuleTemplateContentRequiredException" } // Message returns the exception's message. -func (s ApprovalRuleTemplateContentRequiredException) Message() string { +func (s *ApprovalRuleTemplateContentRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10959,30 +10959,30 @@ func (s ApprovalRuleTemplateContentRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleTemplateContentRequiredException) OrigErr() error { +func (s *ApprovalRuleTemplateContentRequiredException) OrigErr() error { return nil } -func (s ApprovalRuleTemplateContentRequiredException) Error() string { +func (s *ApprovalRuleTemplateContentRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleTemplateContentRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleTemplateContentRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleTemplateContentRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleTemplateContentRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified approval rule template does not exist. Verify that the name // is correct and that you are signed in to the AWS Region where the template // was created, and then try again. type ApprovalRuleTemplateDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10999,17 +10999,17 @@ func (s ApprovalRuleTemplateDoesNotExistException) GoString() string { func newErrorApprovalRuleTemplateDoesNotExistException(v protocol.ResponseMetadata) error { return &ApprovalRuleTemplateDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleTemplateDoesNotExistException) Code() string { +func (s *ApprovalRuleTemplateDoesNotExistException) Code() string { return "ApprovalRuleTemplateDoesNotExistException" } // Message returns the exception's message. -func (s ApprovalRuleTemplateDoesNotExistException) Message() string { +func (s *ApprovalRuleTemplateDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11017,30 +11017,30 @@ func (s ApprovalRuleTemplateDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleTemplateDoesNotExistException) OrigErr() error { +func (s *ApprovalRuleTemplateDoesNotExistException) OrigErr() error { return nil } -func (s ApprovalRuleTemplateDoesNotExistException) Error() string { +func (s *ApprovalRuleTemplateDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleTemplateDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleTemplateDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleTemplateDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleTemplateDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The approval rule template is associated with one or more repositories. You // cannot delete a template that is associated with a repository. Remove all // associations, and then try again. type ApprovalRuleTemplateInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11057,17 +11057,17 @@ func (s ApprovalRuleTemplateInUseException) GoString() string { func newErrorApprovalRuleTemplateInUseException(v protocol.ResponseMetadata) error { return &ApprovalRuleTemplateInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleTemplateInUseException) Code() string { +func (s *ApprovalRuleTemplateInUseException) Code() string { return "ApprovalRuleTemplateInUseException" } // Message returns the exception's message. -func (s ApprovalRuleTemplateInUseException) Message() string { +func (s *ApprovalRuleTemplateInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11075,30 +11075,30 @@ func (s ApprovalRuleTemplateInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleTemplateInUseException) OrigErr() error { +func (s *ApprovalRuleTemplateInUseException) OrigErr() error { return nil } -func (s ApprovalRuleTemplateInUseException) Error() string { +func (s *ApprovalRuleTemplateInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleTemplateInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleTemplateInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleTemplateInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleTemplateInUseException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot create an approval rule template with that name because a template // with that name already exists in this AWS Region for your AWS account. Approval // rule template names must be unique. type ApprovalRuleTemplateNameAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11115,17 +11115,17 @@ func (s ApprovalRuleTemplateNameAlreadyExistsException) GoString() string { func newErrorApprovalRuleTemplateNameAlreadyExistsException(v protocol.ResponseMetadata) error { return &ApprovalRuleTemplateNameAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleTemplateNameAlreadyExistsException) Code() string { +func (s *ApprovalRuleTemplateNameAlreadyExistsException) Code() string { return "ApprovalRuleTemplateNameAlreadyExistsException" } // Message returns the exception's message. -func (s ApprovalRuleTemplateNameAlreadyExistsException) Message() string { +func (s *ApprovalRuleTemplateNameAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11133,28 +11133,28 @@ func (s ApprovalRuleTemplateNameAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleTemplateNameAlreadyExistsException) OrigErr() error { +func (s *ApprovalRuleTemplateNameAlreadyExistsException) OrigErr() error { return nil } -func (s ApprovalRuleTemplateNameAlreadyExistsException) Error() string { +func (s *ApprovalRuleTemplateNameAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleTemplateNameAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleTemplateNameAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleTemplateNameAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleTemplateNameAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An approval rule template name is required, but was not specified. type ApprovalRuleTemplateNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11171,17 +11171,17 @@ func (s ApprovalRuleTemplateNameRequiredException) GoString() string { func newErrorApprovalRuleTemplateNameRequiredException(v protocol.ResponseMetadata) error { return &ApprovalRuleTemplateNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalRuleTemplateNameRequiredException) Code() string { +func (s *ApprovalRuleTemplateNameRequiredException) Code() string { return "ApprovalRuleTemplateNameRequiredException" } // Message returns the exception's message. -func (s ApprovalRuleTemplateNameRequiredException) Message() string { +func (s *ApprovalRuleTemplateNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11189,22 +11189,22 @@ func (s ApprovalRuleTemplateNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalRuleTemplateNameRequiredException) OrigErr() error { +func (s *ApprovalRuleTemplateNameRequiredException) OrigErr() error { return nil } -func (s ApprovalRuleTemplateNameRequiredException) Error() string { +func (s *ApprovalRuleTemplateNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalRuleTemplateNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalRuleTemplateNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalRuleTemplateNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalRuleTemplateNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a change in the approval state for a pull request. @@ -11242,8 +11242,8 @@ func (s *ApprovalStateChangedEventMetadata) SetRevisionId(v string) *ApprovalSta // An approval state is required, but was not specified. type ApprovalStateRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11260,17 +11260,17 @@ func (s ApprovalStateRequiredException) GoString() string { func newErrorApprovalStateRequiredException(v protocol.ResponseMetadata) error { return &ApprovalStateRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalStateRequiredException) Code() string { +func (s *ApprovalStateRequiredException) Code() string { return "ApprovalStateRequiredException" } // Message returns the exception's message. -func (s ApprovalStateRequiredException) Message() string { +func (s *ApprovalStateRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11278,22 +11278,22 @@ func (s ApprovalStateRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalStateRequiredException) OrigErr() error { +func (s *ApprovalStateRequiredException) OrigErr() error { return nil } -func (s ApprovalStateRequiredException) Error() string { +func (s *ApprovalStateRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalStateRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalStateRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalStateRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalStateRequiredException) RequestID() string { + return s.RespMetadata.RequestID } type AssociateApprovalRuleTemplateWithRepositoryInput struct { @@ -11370,8 +11370,8 @@ func (s AssociateApprovalRuleTemplateWithRepositoryOutput) GoString() string { // The specified Amazon Resource Name (ARN) does not exist in the AWS account. type AuthorDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11388,17 +11388,17 @@ func (s AuthorDoesNotExistException) GoString() string { func newErrorAuthorDoesNotExistException(v protocol.ResponseMetadata) error { return &AuthorDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AuthorDoesNotExistException) Code() string { +func (s *AuthorDoesNotExistException) Code() string { return "AuthorDoesNotExistException" } // Message returns the exception's message. -func (s AuthorDoesNotExistException) Message() string { +func (s *AuthorDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11406,22 +11406,22 @@ func (s AuthorDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AuthorDoesNotExistException) OrigErr() error { +func (s *AuthorDoesNotExistException) OrigErr() error { return nil } -func (s AuthorDoesNotExistException) Error() string { +func (s *AuthorDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AuthorDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AuthorDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AuthorDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *AuthorDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about errors in a BatchAssociateApprovalRuleTemplateWithRepositories @@ -12195,8 +12195,8 @@ func (s *BatchGetRepositoriesOutput) SetRepositoriesNotFound(v []*string) *Batch // The before commit ID and the after commit ID are the same, which is not valid. // The before commit ID and the after commit ID must be different commit IDs. type BeforeCommitIdAndAfterCommitIdAreSameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12213,17 +12213,17 @@ func (s BeforeCommitIdAndAfterCommitIdAreSameException) GoString() string { func newErrorBeforeCommitIdAndAfterCommitIdAreSameException(v protocol.ResponseMetadata) error { return &BeforeCommitIdAndAfterCommitIdAreSameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BeforeCommitIdAndAfterCommitIdAreSameException) Code() string { +func (s *BeforeCommitIdAndAfterCommitIdAreSameException) Code() string { return "BeforeCommitIdAndAfterCommitIdAreSameException" } // Message returns the exception's message. -func (s BeforeCommitIdAndAfterCommitIdAreSameException) Message() string { +func (s *BeforeCommitIdAndAfterCommitIdAreSameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12231,28 +12231,28 @@ func (s BeforeCommitIdAndAfterCommitIdAreSameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BeforeCommitIdAndAfterCommitIdAreSameException) OrigErr() error { +func (s *BeforeCommitIdAndAfterCommitIdAreSameException) OrigErr() error { return nil } -func (s BeforeCommitIdAndAfterCommitIdAreSameException) Error() string { +func (s *BeforeCommitIdAndAfterCommitIdAreSameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BeforeCommitIdAndAfterCommitIdAreSameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BeforeCommitIdAndAfterCommitIdAreSameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BeforeCommitIdAndAfterCommitIdAreSameException) RequestID() string { - return s.respMetadata.RequestID +func (s *BeforeCommitIdAndAfterCommitIdAreSameException) RequestID() string { + return s.RespMetadata.RequestID } // The specified blob does not exist. type BlobIdDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12269,17 +12269,17 @@ func (s BlobIdDoesNotExistException) GoString() string { func newErrorBlobIdDoesNotExistException(v protocol.ResponseMetadata) error { return &BlobIdDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BlobIdDoesNotExistException) Code() string { +func (s *BlobIdDoesNotExistException) Code() string { return "BlobIdDoesNotExistException" } // Message returns the exception's message. -func (s BlobIdDoesNotExistException) Message() string { +func (s *BlobIdDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12287,28 +12287,28 @@ func (s BlobIdDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BlobIdDoesNotExistException) OrigErr() error { +func (s *BlobIdDoesNotExistException) OrigErr() error { return nil } -func (s BlobIdDoesNotExistException) Error() string { +func (s *BlobIdDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BlobIdDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BlobIdDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BlobIdDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *BlobIdDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // A blob ID is required, but was not specified. type BlobIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12325,17 +12325,17 @@ func (s BlobIdRequiredException) GoString() string { func newErrorBlobIdRequiredException(v protocol.ResponseMetadata) error { return &BlobIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BlobIdRequiredException) Code() string { +func (s *BlobIdRequiredException) Code() string { return "BlobIdRequiredException" } // Message returns the exception's message. -func (s BlobIdRequiredException) Message() string { +func (s *BlobIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12343,22 +12343,22 @@ func (s BlobIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BlobIdRequiredException) OrigErr() error { +func (s *BlobIdRequiredException) OrigErr() error { return nil } -func (s BlobIdRequiredException) Error() string { +func (s *BlobIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BlobIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BlobIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BlobIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *BlobIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a specific Git blob object. @@ -12413,8 +12413,8 @@ func (s *BlobMetadata) SetPath(v string) *BlobMetadata { // The specified branch does not exist. type BranchDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12431,17 +12431,17 @@ func (s BranchDoesNotExistException) GoString() string { func newErrorBranchDoesNotExistException(v protocol.ResponseMetadata) error { return &BranchDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BranchDoesNotExistException) Code() string { +func (s *BranchDoesNotExistException) Code() string { return "BranchDoesNotExistException" } // Message returns the exception's message. -func (s BranchDoesNotExistException) Message() string { +func (s *BranchDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12449,22 +12449,22 @@ func (s BranchDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BranchDoesNotExistException) OrigErr() error { +func (s *BranchDoesNotExistException) OrigErr() error { return nil } -func (s BranchDoesNotExistException) Error() string { +func (s *BranchDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BranchDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BranchDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BranchDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *BranchDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a branch. @@ -12502,8 +12502,8 @@ func (s *BranchInfo) SetCommitId(v string) *BranchInfo { // The specified branch name already exists. type BranchNameExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12520,17 +12520,17 @@ func (s BranchNameExistsException) GoString() string { func newErrorBranchNameExistsException(v protocol.ResponseMetadata) error { return &BranchNameExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BranchNameExistsException) Code() string { +func (s *BranchNameExistsException) Code() string { return "BranchNameExistsException" } // Message returns the exception's message. -func (s BranchNameExistsException) Message() string { +func (s *BranchNameExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12538,30 +12538,30 @@ func (s BranchNameExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BranchNameExistsException) OrigErr() error { +func (s *BranchNameExistsException) OrigErr() error { return nil } -func (s BranchNameExistsException) Error() string { +func (s *BranchNameExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BranchNameExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BranchNameExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BranchNameExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *BranchNameExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified branch name is not valid because it is a tag name. Enter the // name of a branch in the repository. For a list of valid branch names, use // ListBranches. type BranchNameIsTagNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12578,17 +12578,17 @@ func (s BranchNameIsTagNameException) GoString() string { func newErrorBranchNameIsTagNameException(v protocol.ResponseMetadata) error { return &BranchNameIsTagNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BranchNameIsTagNameException) Code() string { +func (s *BranchNameIsTagNameException) Code() string { return "BranchNameIsTagNameException" } // Message returns the exception's message. -func (s BranchNameIsTagNameException) Message() string { +func (s *BranchNameIsTagNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12596,28 +12596,28 @@ func (s BranchNameIsTagNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BranchNameIsTagNameException) OrigErr() error { +func (s *BranchNameIsTagNameException) OrigErr() error { return nil } -func (s BranchNameIsTagNameException) Error() string { +func (s *BranchNameIsTagNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BranchNameIsTagNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BranchNameIsTagNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BranchNameIsTagNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *BranchNameIsTagNameException) RequestID() string { + return s.RespMetadata.RequestID } // A branch name is required, but was not specified. type BranchNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12634,17 +12634,17 @@ func (s BranchNameRequiredException) GoString() string { func newErrorBranchNameRequiredException(v protocol.ResponseMetadata) error { return &BranchNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BranchNameRequiredException) Code() string { +func (s *BranchNameRequiredException) Code() string { return "BranchNameRequiredException" } // Message returns the exception's message. -func (s BranchNameRequiredException) Message() string { +func (s *BranchNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12652,29 +12652,29 @@ func (s BranchNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BranchNameRequiredException) OrigErr() error { +func (s *BranchNameRequiredException) OrigErr() error { return nil } -func (s BranchNameRequiredException) Error() string { +func (s *BranchNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BranchNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BranchNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BranchNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *BranchNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The approval rule cannot be deleted from the pull request because it was // created by an approval rule template and applied to the pull request automatically. type CannotDeleteApprovalRuleFromTemplateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12691,17 +12691,17 @@ func (s CannotDeleteApprovalRuleFromTemplateException) GoString() string { func newErrorCannotDeleteApprovalRuleFromTemplateException(v protocol.ResponseMetadata) error { return &CannotDeleteApprovalRuleFromTemplateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CannotDeleteApprovalRuleFromTemplateException) Code() string { +func (s *CannotDeleteApprovalRuleFromTemplateException) Code() string { return "CannotDeleteApprovalRuleFromTemplateException" } // Message returns the exception's message. -func (s CannotDeleteApprovalRuleFromTemplateException) Message() string { +func (s *CannotDeleteApprovalRuleFromTemplateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12709,29 +12709,29 @@ func (s CannotDeleteApprovalRuleFromTemplateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CannotDeleteApprovalRuleFromTemplateException) OrigErr() error { +func (s *CannotDeleteApprovalRuleFromTemplateException) OrigErr() error { return nil } -func (s CannotDeleteApprovalRuleFromTemplateException) Error() string { +func (s *CannotDeleteApprovalRuleFromTemplateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CannotDeleteApprovalRuleFromTemplateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CannotDeleteApprovalRuleFromTemplateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CannotDeleteApprovalRuleFromTemplateException) RequestID() string { - return s.respMetadata.RequestID +func (s *CannotDeleteApprovalRuleFromTemplateException) RequestID() string { + return s.RespMetadata.RequestID } // The approval rule cannot be modified for the pull request because it was // created by an approval rule template and applied to the pull request automatically. type CannotModifyApprovalRuleFromTemplateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12748,17 +12748,17 @@ func (s CannotModifyApprovalRuleFromTemplateException) GoString() string { func newErrorCannotModifyApprovalRuleFromTemplateException(v protocol.ResponseMetadata) error { return &CannotModifyApprovalRuleFromTemplateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CannotModifyApprovalRuleFromTemplateException) Code() string { +func (s *CannotModifyApprovalRuleFromTemplateException) Code() string { return "CannotModifyApprovalRuleFromTemplateException" } // Message returns the exception's message. -func (s CannotModifyApprovalRuleFromTemplateException) Message() string { +func (s *CannotModifyApprovalRuleFromTemplateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12766,22 +12766,22 @@ func (s CannotModifyApprovalRuleFromTemplateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CannotModifyApprovalRuleFromTemplateException) OrigErr() error { +func (s *CannotModifyApprovalRuleFromTemplateException) OrigErr() error { return nil } -func (s CannotModifyApprovalRuleFromTemplateException) Error() string { +func (s *CannotModifyApprovalRuleFromTemplateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CannotModifyApprovalRuleFromTemplateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CannotModifyApprovalRuleFromTemplateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CannotModifyApprovalRuleFromTemplateException) RequestID() string { - return s.respMetadata.RequestID +func (s *CannotModifyApprovalRuleFromTemplateException) RequestID() string { + return s.RespMetadata.RequestID } // A client request token is required. A client request token is an unique, @@ -12790,8 +12790,8 @@ func (s CannotModifyApprovalRuleFromTemplateException) RequestID() string { // received with the same parameters and a token is included, the request returns // information about the initial request that used that token. type ClientRequestTokenRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12808,17 +12808,17 @@ func (s ClientRequestTokenRequiredException) GoString() string { func newErrorClientRequestTokenRequiredException(v protocol.ResponseMetadata) error { return &ClientRequestTokenRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientRequestTokenRequiredException) Code() string { +func (s *ClientRequestTokenRequiredException) Code() string { return "ClientRequestTokenRequiredException" } // Message returns the exception's message. -func (s ClientRequestTokenRequiredException) Message() string { +func (s *ClientRequestTokenRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12826,22 +12826,22 @@ func (s ClientRequestTokenRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientRequestTokenRequiredException) OrigErr() error { +func (s *ClientRequestTokenRequiredException) OrigErr() error { return nil } -func (s ClientRequestTokenRequiredException) Error() string { +func (s *ClientRequestTokenRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientRequestTokenRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientRequestTokenRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientRequestTokenRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientRequestTokenRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a specific comment. @@ -12937,8 +12937,8 @@ func (s *Comment) SetLastModifiedDate(v time.Time) *Comment { // The comment is empty. You must provide some content for a comment. The content // cannot be null. type CommentContentRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12955,17 +12955,17 @@ func (s CommentContentRequiredException) GoString() string { func newErrorCommentContentRequiredException(v protocol.ResponseMetadata) error { return &CommentContentRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommentContentRequiredException) Code() string { +func (s *CommentContentRequiredException) Code() string { return "CommentContentRequiredException" } // Message returns the exception's message. -func (s CommentContentRequiredException) Message() string { +func (s *CommentContentRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12973,28 +12973,28 @@ func (s CommentContentRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommentContentRequiredException) OrigErr() error { +func (s *CommentContentRequiredException) OrigErr() error { return nil } -func (s CommentContentRequiredException) Error() string { +func (s *CommentContentRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommentContentRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommentContentRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommentContentRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommentContentRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The comment is too large. Comments are limited to 1,000 characters. type CommentContentSizeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13011,17 +13011,17 @@ func (s CommentContentSizeLimitExceededException) GoString() string { func newErrorCommentContentSizeLimitExceededException(v protocol.ResponseMetadata) error { return &CommentContentSizeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommentContentSizeLimitExceededException) Code() string { +func (s *CommentContentSizeLimitExceededException) Code() string { return "CommentContentSizeLimitExceededException" } // Message returns the exception's message. -func (s CommentContentSizeLimitExceededException) Message() string { +func (s *CommentContentSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13029,29 +13029,29 @@ func (s CommentContentSizeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommentContentSizeLimitExceededException) OrigErr() error { +func (s *CommentContentSizeLimitExceededException) OrigErr() error { return nil } -func (s CommentContentSizeLimitExceededException) Error() string { +func (s *CommentContentSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommentContentSizeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommentContentSizeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommentContentSizeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommentContentSizeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // This comment has already been deleted. You cannot edit or delete a deleted // comment. type CommentDeletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13068,17 +13068,17 @@ func (s CommentDeletedException) GoString() string { func newErrorCommentDeletedException(v protocol.ResponseMetadata) error { return &CommentDeletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommentDeletedException) Code() string { +func (s *CommentDeletedException) Code() string { return "CommentDeletedException" } // Message returns the exception's message. -func (s CommentDeletedException) Message() string { +func (s *CommentDeletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13086,29 +13086,29 @@ func (s CommentDeletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommentDeletedException) OrigErr() error { +func (s *CommentDeletedException) OrigErr() error { return nil } -func (s CommentDeletedException) Error() string { +func (s *CommentDeletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommentDeletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommentDeletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommentDeletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommentDeletedException) RequestID() string { + return s.RespMetadata.RequestID } // No comment exists with the provided ID. Verify that you have used the correct // ID, and then try again. type CommentDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13125,17 +13125,17 @@ func (s CommentDoesNotExistException) GoString() string { func newErrorCommentDoesNotExistException(v protocol.ResponseMetadata) error { return &CommentDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommentDoesNotExistException) Code() string { +func (s *CommentDoesNotExistException) Code() string { return "CommentDoesNotExistException" } // Message returns the exception's message. -func (s CommentDoesNotExistException) Message() string { +func (s *CommentDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13143,28 +13143,28 @@ func (s CommentDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommentDoesNotExistException) OrigErr() error { +func (s *CommentDoesNotExistException) OrigErr() error { return nil } -func (s CommentDoesNotExistException) Error() string { +func (s *CommentDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommentDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommentDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommentDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommentDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The comment ID is missing or null. A comment ID is required. type CommentIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13181,17 +13181,17 @@ func (s CommentIdRequiredException) GoString() string { func newErrorCommentIdRequiredException(v protocol.ResponseMetadata) error { return &CommentIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommentIdRequiredException) Code() string { +func (s *CommentIdRequiredException) Code() string { return "CommentIdRequiredException" } // Message returns the exception's message. -func (s CommentIdRequiredException) Message() string { +func (s *CommentIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13199,29 +13199,29 @@ func (s CommentIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommentIdRequiredException) OrigErr() error { +func (s *CommentIdRequiredException) OrigErr() error { return nil } -func (s CommentIdRequiredException) Error() string { +func (s *CommentIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommentIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommentIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommentIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommentIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot modify or delete this comment. Only comment authors can modify // or delete their comments. type CommentNotCreatedByCallerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13238,17 +13238,17 @@ func (s CommentNotCreatedByCallerException) GoString() string { func newErrorCommentNotCreatedByCallerException(v protocol.ResponseMetadata) error { return &CommentNotCreatedByCallerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommentNotCreatedByCallerException) Code() string { +func (s *CommentNotCreatedByCallerException) Code() string { return "CommentNotCreatedByCallerException" } // Message returns the exception's message. -func (s CommentNotCreatedByCallerException) Message() string { +func (s *CommentNotCreatedByCallerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13256,22 +13256,22 @@ func (s CommentNotCreatedByCallerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommentNotCreatedByCallerException) OrigErr() error { +func (s *CommentNotCreatedByCallerException) OrigErr() error { return nil } -func (s CommentNotCreatedByCallerException) Error() string { +func (s *CommentNotCreatedByCallerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommentNotCreatedByCallerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommentNotCreatedByCallerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommentNotCreatedByCallerException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommentNotCreatedByCallerException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about comments on the comparison between two commits. @@ -13541,8 +13541,8 @@ func (s *Commit) SetTreeId(v string) *Commit { // The specified commit does not exist or no commit was specified, and the specified // repository has no default branch. type CommitDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13559,17 +13559,17 @@ func (s CommitDoesNotExistException) GoString() string { func newErrorCommitDoesNotExistException(v protocol.ResponseMetadata) error { return &CommitDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitDoesNotExistException) Code() string { +func (s *CommitDoesNotExistException) Code() string { return "CommitDoesNotExistException" } // Message returns the exception's message. -func (s CommitDoesNotExistException) Message() string { +func (s *CommitDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13577,28 +13577,28 @@ func (s CommitDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitDoesNotExistException) OrigErr() error { +func (s *CommitDoesNotExistException) OrigErr() error { return nil } -func (s CommitDoesNotExistException) Error() string { +func (s *CommitDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The specified commit ID does not exist. type CommitIdDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13615,17 +13615,17 @@ func (s CommitIdDoesNotExistException) GoString() string { func newErrorCommitIdDoesNotExistException(v protocol.ResponseMetadata) error { return &CommitIdDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitIdDoesNotExistException) Code() string { +func (s *CommitIdDoesNotExistException) Code() string { return "CommitIdDoesNotExistException" } // Message returns the exception's message. -func (s CommitIdDoesNotExistException) Message() string { +func (s *CommitIdDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13633,28 +13633,28 @@ func (s CommitIdDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitIdDoesNotExistException) OrigErr() error { +func (s *CommitIdDoesNotExistException) OrigErr() error { return nil } -func (s CommitIdDoesNotExistException) Error() string { +func (s *CommitIdDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitIdDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitIdDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitIdDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitIdDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // A commit ID was not specified. type CommitIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13671,17 +13671,17 @@ func (s CommitIdRequiredException) GoString() string { func newErrorCommitIdRequiredException(v protocol.ResponseMetadata) error { return &CommitIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitIdRequiredException) Code() string { +func (s *CommitIdRequiredException) Code() string { return "CommitIdRequiredException" } // Message returns the exception's message. -func (s CommitIdRequiredException) Message() string { +func (s *CommitIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13689,30 +13689,30 @@ func (s CommitIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitIdRequiredException) OrigErr() error { +func (s *CommitIdRequiredException) OrigErr() error { return nil } -func (s CommitIdRequiredException) Error() string { +func (s *CommitIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of allowed commit IDs in a batch request is 100. Verify // that your batch requests contains no more than 100 commit IDs, and then try // again. type CommitIdsLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13729,17 +13729,17 @@ func (s CommitIdsLimitExceededException) GoString() string { func newErrorCommitIdsLimitExceededException(v protocol.ResponseMetadata) error { return &CommitIdsLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitIdsLimitExceededException) Code() string { +func (s *CommitIdsLimitExceededException) Code() string { return "CommitIdsLimitExceededException" } // Message returns the exception's message. -func (s CommitIdsLimitExceededException) Message() string { +func (s *CommitIdsLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13747,29 +13747,29 @@ func (s CommitIdsLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitIdsLimitExceededException) OrigErr() error { +func (s *CommitIdsLimitExceededException) OrigErr() error { return nil } -func (s CommitIdsLimitExceededException) Error() string { +func (s *CommitIdsLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitIdsLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitIdsLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitIdsLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitIdsLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A list of commit IDs is required, but was either not specified or the list // was empty. type CommitIdsListRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13786,17 +13786,17 @@ func (s CommitIdsListRequiredException) GoString() string { func newErrorCommitIdsListRequiredException(v protocol.ResponseMetadata) error { return &CommitIdsListRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitIdsListRequiredException) Code() string { +func (s *CommitIdsListRequiredException) Code() string { return "CommitIdsListRequiredException" } // Message returns the exception's message. -func (s CommitIdsListRequiredException) Message() string { +func (s *CommitIdsListRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13804,28 +13804,28 @@ func (s CommitIdsListRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitIdsListRequiredException) OrigErr() error { +func (s *CommitIdsListRequiredException) OrigErr() error { return nil } -func (s CommitIdsListRequiredException) Error() string { +func (s *CommitIdsListRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitIdsListRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitIdsListRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitIdsListRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitIdsListRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The commit message is too long. Provide a shorter string. type CommitMessageLengthExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13842,17 +13842,17 @@ func (s CommitMessageLengthExceededException) GoString() string { func newErrorCommitMessageLengthExceededException(v protocol.ResponseMetadata) error { return &CommitMessageLengthExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitMessageLengthExceededException) Code() string { +func (s *CommitMessageLengthExceededException) Code() string { return "CommitMessageLengthExceededException" } // Message returns the exception's message. -func (s CommitMessageLengthExceededException) Message() string { +func (s *CommitMessageLengthExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13860,28 +13860,28 @@ func (s CommitMessageLengthExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitMessageLengthExceededException) OrigErr() error { +func (s *CommitMessageLengthExceededException) OrigErr() error { return nil } -func (s CommitMessageLengthExceededException) Error() string { +func (s *CommitMessageLengthExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitMessageLengthExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitMessageLengthExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitMessageLengthExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitMessageLengthExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A commit was not specified. type CommitRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13898,17 +13898,17 @@ func (s CommitRequiredException) GoString() string { func newErrorCommitRequiredException(v protocol.ResponseMetadata) error { return &CommitRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CommitRequiredException) Code() string { +func (s *CommitRequiredException) Code() string { return "CommitRequiredException" } // Message returns the exception's message. -func (s CommitRequiredException) Message() string { +func (s *CommitRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13916,30 +13916,30 @@ func (s CommitRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CommitRequiredException) OrigErr() error { +func (s *CommitRequiredException) OrigErr() error { return nil } -func (s CommitRequiredException) Error() string { +func (s *CommitRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CommitRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CommitRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CommitRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *CommitRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The merge cannot be completed because the target branch has been modified. // Another user might have modified the target branch while the merge was in // progress. Wait a few minutes, and then try again. type ConcurrentReferenceUpdateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13956,17 +13956,17 @@ func (s ConcurrentReferenceUpdateException) GoString() string { func newErrorConcurrentReferenceUpdateException(v protocol.ResponseMetadata) error { return &ConcurrentReferenceUpdateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentReferenceUpdateException) Code() string { +func (s *ConcurrentReferenceUpdateException) Code() string { return "ConcurrentReferenceUpdateException" } // Message returns the exception's message. -func (s ConcurrentReferenceUpdateException) Message() string { +func (s *ConcurrentReferenceUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13974,22 +13974,22 @@ func (s ConcurrentReferenceUpdateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentReferenceUpdateException) OrigErr() error { +func (s *ConcurrentReferenceUpdateException) OrigErr() error { return nil } -func (s ConcurrentReferenceUpdateException) Error() string { +func (s *ConcurrentReferenceUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentReferenceUpdateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentReferenceUpdateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentReferenceUpdateException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentReferenceUpdateException) RequestID() string { + return s.RespMetadata.RequestID } // Information about conflicts in a merge operation. @@ -15186,8 +15186,8 @@ func (s *CreateUnreferencedMergeCommitOutput) SetTreeId(v string) *CreateUnrefer // be deleted. To delete this branch, you must first set another branch as the // default branch. type DefaultBranchCannotBeDeletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15204,17 +15204,17 @@ func (s DefaultBranchCannotBeDeletedException) GoString() string { func newErrorDefaultBranchCannotBeDeletedException(v protocol.ResponseMetadata) error { return &DefaultBranchCannotBeDeletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DefaultBranchCannotBeDeletedException) Code() string { +func (s *DefaultBranchCannotBeDeletedException) Code() string { return "DefaultBranchCannotBeDeletedException" } // Message returns the exception's message. -func (s DefaultBranchCannotBeDeletedException) Message() string { +func (s *DefaultBranchCannotBeDeletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15222,22 +15222,22 @@ func (s DefaultBranchCannotBeDeletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DefaultBranchCannotBeDeletedException) OrigErr() error { +func (s *DefaultBranchCannotBeDeletedException) OrigErr() error { return nil } -func (s DefaultBranchCannotBeDeletedException) Error() string { +func (s *DefaultBranchCannotBeDeletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DefaultBranchCannotBeDeletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DefaultBranchCannotBeDeletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DefaultBranchCannotBeDeletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DefaultBranchCannotBeDeletedException) RequestID() string { + return s.RespMetadata.RequestID } type DeleteApprovalRuleTemplateInput struct { @@ -16223,8 +16223,8 @@ func (s *Difference) SetChangeType(v string) *Difference { // provide a different name for the file, or specify a different path for the // file. type DirectoryNameConflictsWithFileNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16241,17 +16241,17 @@ func (s DirectoryNameConflictsWithFileNameException) GoString() string { func newErrorDirectoryNameConflictsWithFileNameException(v protocol.ResponseMetadata) error { return &DirectoryNameConflictsWithFileNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryNameConflictsWithFileNameException) Code() string { +func (s *DirectoryNameConflictsWithFileNameException) Code() string { return "DirectoryNameConflictsWithFileNameException" } // Message returns the exception's message. -func (s DirectoryNameConflictsWithFileNameException) Message() string { +func (s *DirectoryNameConflictsWithFileNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16259,22 +16259,22 @@ func (s DirectoryNameConflictsWithFileNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryNameConflictsWithFileNameException) OrigErr() error { +func (s *DirectoryNameConflictsWithFileNameException) OrigErr() error { return nil } -func (s DirectoryNameConflictsWithFileNameException) Error() string { +func (s *DirectoryNameConflictsWithFileNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryNameConflictsWithFileNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryNameConflictsWithFileNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryNameConflictsWithFileNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryNameConflictsWithFileNameException) RequestID() string { + return s.RespMetadata.RequestID } type DisassociateApprovalRuleTemplateFromRepositoryInput struct { @@ -16351,8 +16351,8 @@ func (s DisassociateApprovalRuleTemplateFromRepositoryOutput) GoString() string // An encryption integrity check failed. type EncryptionIntegrityChecksFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16369,17 +16369,17 @@ func (s EncryptionIntegrityChecksFailedException) GoString() string { func newErrorEncryptionIntegrityChecksFailedException(v protocol.ResponseMetadata) error { return &EncryptionIntegrityChecksFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionIntegrityChecksFailedException) Code() string { +func (s *EncryptionIntegrityChecksFailedException) Code() string { return "EncryptionIntegrityChecksFailedException" } // Message returns the exception's message. -func (s EncryptionIntegrityChecksFailedException) Message() string { +func (s *EncryptionIntegrityChecksFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16387,28 +16387,28 @@ func (s EncryptionIntegrityChecksFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionIntegrityChecksFailedException) OrigErr() error { +func (s *EncryptionIntegrityChecksFailedException) OrigErr() error { return nil } -func (s EncryptionIntegrityChecksFailedException) Error() string { +func (s *EncryptionIntegrityChecksFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionIntegrityChecksFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionIntegrityChecksFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionIntegrityChecksFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionIntegrityChecksFailedException) RequestID() string { + return s.RespMetadata.RequestID } // An encryption key could not be accessed. type EncryptionKeyAccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16425,17 +16425,17 @@ func (s EncryptionKeyAccessDeniedException) GoString() string { func newErrorEncryptionKeyAccessDeniedException(v protocol.ResponseMetadata) error { return &EncryptionKeyAccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionKeyAccessDeniedException) Code() string { +func (s *EncryptionKeyAccessDeniedException) Code() string { return "EncryptionKeyAccessDeniedException" } // Message returns the exception's message. -func (s EncryptionKeyAccessDeniedException) Message() string { +func (s *EncryptionKeyAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16443,28 +16443,28 @@ func (s EncryptionKeyAccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionKeyAccessDeniedException) OrigErr() error { +func (s *EncryptionKeyAccessDeniedException) OrigErr() error { return nil } -func (s EncryptionKeyAccessDeniedException) Error() string { +func (s *EncryptionKeyAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionKeyAccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionKeyAccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionKeyAccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionKeyAccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The encryption key is disabled. type EncryptionKeyDisabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16481,17 +16481,17 @@ func (s EncryptionKeyDisabledException) GoString() string { func newErrorEncryptionKeyDisabledException(v protocol.ResponseMetadata) error { return &EncryptionKeyDisabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionKeyDisabledException) Code() string { +func (s *EncryptionKeyDisabledException) Code() string { return "EncryptionKeyDisabledException" } // Message returns the exception's message. -func (s EncryptionKeyDisabledException) Message() string { +func (s *EncryptionKeyDisabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16499,28 +16499,28 @@ func (s EncryptionKeyDisabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionKeyDisabledException) OrigErr() error { +func (s *EncryptionKeyDisabledException) OrigErr() error { return nil } -func (s EncryptionKeyDisabledException) Error() string { +func (s *EncryptionKeyDisabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionKeyDisabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionKeyDisabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionKeyDisabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionKeyDisabledException) RequestID() string { + return s.RespMetadata.RequestID } // No encryption key was found. type EncryptionKeyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16537,17 +16537,17 @@ func (s EncryptionKeyNotFoundException) GoString() string { func newErrorEncryptionKeyNotFoundException(v protocol.ResponseMetadata) error { return &EncryptionKeyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionKeyNotFoundException) Code() string { +func (s *EncryptionKeyNotFoundException) Code() string { return "EncryptionKeyNotFoundException" } // Message returns the exception's message. -func (s EncryptionKeyNotFoundException) Message() string { +func (s *EncryptionKeyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16555,28 +16555,28 @@ func (s EncryptionKeyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionKeyNotFoundException) OrigErr() error { +func (s *EncryptionKeyNotFoundException) OrigErr() error { return nil } -func (s EncryptionKeyNotFoundException) Error() string { +func (s *EncryptionKeyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionKeyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionKeyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionKeyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionKeyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The encryption key is not available. type EncryptionKeyUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16593,17 +16593,17 @@ func (s EncryptionKeyUnavailableException) GoString() string { func newErrorEncryptionKeyUnavailableException(v protocol.ResponseMetadata) error { return &EncryptionKeyUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionKeyUnavailableException) Code() string { +func (s *EncryptionKeyUnavailableException) Code() string { return "EncryptionKeyUnavailableException" } // Message returns the exception's message. -func (s EncryptionKeyUnavailableException) Message() string { +func (s *EncryptionKeyUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16611,22 +16611,22 @@ func (s EncryptionKeyUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionKeyUnavailableException) OrigErr() error { +func (s *EncryptionKeyUnavailableException) OrigErr() error { return nil } -func (s EncryptionKeyUnavailableException) Error() string { +func (s *EncryptionKeyUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionKeyUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionKeyUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionKeyUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionKeyUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type EvaluatePullRequestApprovalRulesInput struct { @@ -16819,8 +16819,8 @@ func (s *File) SetRelativePath(v string) *File { // have been specified for the same file. You cannot provide both. Either specify // a source file or provide the file content directly. type FileContentAndSourceFileSpecifiedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16837,17 +16837,17 @@ func (s FileContentAndSourceFileSpecifiedException) GoString() string { func newErrorFileContentAndSourceFileSpecifiedException(v protocol.ResponseMetadata) error { return &FileContentAndSourceFileSpecifiedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileContentAndSourceFileSpecifiedException) Code() string { +func (s *FileContentAndSourceFileSpecifiedException) Code() string { return "FileContentAndSourceFileSpecifiedException" } // Message returns the exception's message. -func (s FileContentAndSourceFileSpecifiedException) Message() string { +func (s *FileContentAndSourceFileSpecifiedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16855,29 +16855,29 @@ func (s FileContentAndSourceFileSpecifiedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileContentAndSourceFileSpecifiedException) OrigErr() error { +func (s *FileContentAndSourceFileSpecifiedException) OrigErr() error { return nil } -func (s FileContentAndSourceFileSpecifiedException) Error() string { +func (s *FileContentAndSourceFileSpecifiedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileContentAndSourceFileSpecifiedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileContentAndSourceFileSpecifiedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileContentAndSourceFileSpecifiedException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileContentAndSourceFileSpecifiedException) RequestID() string { + return s.RespMetadata.RequestID } // The file cannot be added because it is empty. Empty files cannot be added // to the repository with this API. type FileContentRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16894,17 +16894,17 @@ func (s FileContentRequiredException) GoString() string { func newErrorFileContentRequiredException(v protocol.ResponseMetadata) error { return &FileContentRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileContentRequiredException) Code() string { +func (s *FileContentRequiredException) Code() string { return "FileContentRequiredException" } // Message returns the exception's message. -func (s FileContentRequiredException) Message() string { +func (s *FileContentRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16912,30 +16912,30 @@ func (s FileContentRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileContentRequiredException) OrigErr() error { +func (s *FileContentRequiredException) OrigErr() error { return nil } -func (s FileContentRequiredException) Error() string { +func (s *FileContentRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileContentRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileContentRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileContentRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileContentRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The file cannot be added because it is too large. The maximum file size is // 6 MB, and the combined file content change size is 7 MB. Consider making // these changes using a Git client. type FileContentSizeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16952,17 +16952,17 @@ func (s FileContentSizeLimitExceededException) GoString() string { func newErrorFileContentSizeLimitExceededException(v protocol.ResponseMetadata) error { return &FileContentSizeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileContentSizeLimitExceededException) Code() string { +func (s *FileContentSizeLimitExceededException) Code() string { return "FileContentSizeLimitExceededException" } // Message returns the exception's message. -func (s FileContentSizeLimitExceededException) Message() string { +func (s *FileContentSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16970,29 +16970,29 @@ func (s FileContentSizeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileContentSizeLimitExceededException) OrigErr() error { +func (s *FileContentSizeLimitExceededException) OrigErr() error { return nil } -func (s FileContentSizeLimitExceededException) Error() string { +func (s *FileContentSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileContentSizeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileContentSizeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileContentSizeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileContentSizeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified file does not exist. Verify that you have used the correct // file name, full path, and extension. type FileDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17009,17 +17009,17 @@ func (s FileDoesNotExistException) GoString() string { func newErrorFileDoesNotExistException(v protocol.ResponseMetadata) error { return &FileDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileDoesNotExistException) Code() string { +func (s *FileDoesNotExistException) Code() string { return "FileDoesNotExistException" } // Message returns the exception's message. -func (s FileDoesNotExistException) Message() string { +func (s *FileDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17027,29 +17027,29 @@ func (s FileDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileDoesNotExistException) OrigErr() error { +func (s *FileDoesNotExistException) OrigErr() error { return nil } -func (s FileDoesNotExistException) Error() string { +func (s *FileDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The commit cannot be created because no files have been specified as added, // updated, or changed (PutFile or DeleteFile) for the commit. type FileEntryRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17066,17 +17066,17 @@ func (s FileEntryRequiredException) GoString() string { func newErrorFileEntryRequiredException(v protocol.ResponseMetadata) error { return &FileEntryRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileEntryRequiredException) Code() string { +func (s *FileEntryRequiredException) Code() string { return "FileEntryRequiredException" } // Message returns the exception's message. -func (s FileEntryRequiredException) Message() string { +func (s *FileEntryRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17084,22 +17084,22 @@ func (s FileEntryRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileEntryRequiredException) OrigErr() error { +func (s *FileEntryRequiredException) OrigErr() error { return nil } -func (s FileEntryRequiredException) Error() string { +func (s *FileEntryRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileEntryRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileEntryRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileEntryRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileEntryRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // A file to be added, updated, or deleted as part of a commit. @@ -17149,8 +17149,8 @@ func (s *FileMetadata) SetFileMode(v string) *FileMetadata { // The commit cannot be created because no file mode has been specified. A file // mode is required to update mode permissions for a file. type FileModeRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17167,17 +17167,17 @@ func (s FileModeRequiredException) GoString() string { func newErrorFileModeRequiredException(v protocol.ResponseMetadata) error { return &FileModeRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileModeRequiredException) Code() string { +func (s *FileModeRequiredException) Code() string { return "FileModeRequiredException" } // Message returns the exception's message. -func (s FileModeRequiredException) Message() string { +func (s *FileModeRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17185,22 +17185,22 @@ func (s FileModeRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileModeRequiredException) OrigErr() error { +func (s *FileModeRequiredException) OrigErr() error { return nil } -func (s FileModeRequiredException) Error() string { +func (s *FileModeRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileModeRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileModeRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileModeRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileModeRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about file modes in a merge or pull request. @@ -17250,8 +17250,8 @@ func (s *FileModes) SetSource(v string) *FileModes { // name for the file, or add the file in a directory that does not match the // file name. type FileNameConflictsWithDirectoryNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17268,17 +17268,17 @@ func (s FileNameConflictsWithDirectoryNameException) GoString() string { func newErrorFileNameConflictsWithDirectoryNameException(v protocol.ResponseMetadata) error { return &FileNameConflictsWithDirectoryNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileNameConflictsWithDirectoryNameException) Code() string { +func (s *FileNameConflictsWithDirectoryNameException) Code() string { return "FileNameConflictsWithDirectoryNameException" } // Message returns the exception's message. -func (s FileNameConflictsWithDirectoryNameException) Message() string { +func (s *FileNameConflictsWithDirectoryNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17286,30 +17286,30 @@ func (s FileNameConflictsWithDirectoryNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileNameConflictsWithDirectoryNameException) OrigErr() error { +func (s *FileNameConflictsWithDirectoryNameException) OrigErr() error { return nil } -func (s FileNameConflictsWithDirectoryNameException) Error() string { +func (s *FileNameConflictsWithDirectoryNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileNameConflictsWithDirectoryNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileNameConflictsWithDirectoryNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileNameConflictsWithDirectoryNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileNameConflictsWithDirectoryNameException) RequestID() string { + return s.RespMetadata.RequestID } // The commit cannot be created because a specified file path points to a submodule. // Verify that the destination files have valid file paths that do not point // to a submodule. type FilePathConflictsWithSubmodulePathException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17326,17 +17326,17 @@ func (s FilePathConflictsWithSubmodulePathException) GoString() string { func newErrorFilePathConflictsWithSubmodulePathException(v protocol.ResponseMetadata) error { return &FilePathConflictsWithSubmodulePathException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FilePathConflictsWithSubmodulePathException) Code() string { +func (s *FilePathConflictsWithSubmodulePathException) Code() string { return "FilePathConflictsWithSubmodulePathException" } // Message returns the exception's message. -func (s FilePathConflictsWithSubmodulePathException) Message() string { +func (s *FilePathConflictsWithSubmodulePathException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17344,22 +17344,22 @@ func (s FilePathConflictsWithSubmodulePathException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FilePathConflictsWithSubmodulePathException) OrigErr() error { +func (s *FilePathConflictsWithSubmodulePathException) OrigErr() error { return nil } -func (s FilePathConflictsWithSubmodulePathException) Error() string { +func (s *FilePathConflictsWithSubmodulePathException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FilePathConflictsWithSubmodulePathException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FilePathConflictsWithSubmodulePathException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FilePathConflictsWithSubmodulePathException) RequestID() string { - return s.respMetadata.RequestID +func (s *FilePathConflictsWithSubmodulePathException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the size of files in a merge or pull request. @@ -17408,8 +17408,8 @@ func (s *FileSizes) SetSource(v int64) *FileSizes { // information about limits in AWS CodeCommit, see AWS CodeCommit User Guide // (https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). type FileTooLargeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17426,17 +17426,17 @@ func (s FileTooLargeException) GoString() string { func newErrorFileTooLargeException(v protocol.ResponseMetadata) error { return &FileTooLargeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileTooLargeException) Code() string { +func (s *FileTooLargeException) Code() string { return "FileTooLargeException" } // Message returns the exception's message. -func (s FileTooLargeException) Message() string { +func (s *FileTooLargeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17444,22 +17444,22 @@ func (s FileTooLargeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileTooLargeException) OrigErr() error { +func (s *FileTooLargeException) OrigErr() error { return nil } -func (s FileTooLargeException) Error() string { +func (s *FileTooLargeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileTooLargeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileTooLargeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileTooLargeException) RequestID() string { - return s.respMetadata.RequestID +func (s *FileTooLargeException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a folder in a repository. @@ -17511,8 +17511,8 @@ func (s *Folder) SetTreeId(v string) *Folder { // Either reduce the number and size of your changes, or split the changes across // multiple folders. type FolderContentSizeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17529,17 +17529,17 @@ func (s FolderContentSizeLimitExceededException) GoString() string { func newErrorFolderContentSizeLimitExceededException(v protocol.ResponseMetadata) error { return &FolderContentSizeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FolderContentSizeLimitExceededException) Code() string { +func (s *FolderContentSizeLimitExceededException) Code() string { return "FolderContentSizeLimitExceededException" } // Message returns the exception's message. -func (s FolderContentSizeLimitExceededException) Message() string { +func (s *FolderContentSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17547,29 +17547,29 @@ func (s FolderContentSizeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FolderContentSizeLimitExceededException) OrigErr() error { +func (s *FolderContentSizeLimitExceededException) OrigErr() error { return nil } -func (s FolderContentSizeLimitExceededException) Error() string { +func (s *FolderContentSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FolderContentSizeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FolderContentSizeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FolderContentSizeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *FolderContentSizeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified folder does not exist. Either the folder name is not correct, // or you did not enter the full path to the folder. type FolderDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17586,17 +17586,17 @@ func (s FolderDoesNotExistException) GoString() string { func newErrorFolderDoesNotExistException(v protocol.ResponseMetadata) error { return &FolderDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FolderDoesNotExistException) Code() string { +func (s *FolderDoesNotExistException) Code() string { return "FolderDoesNotExistException" } // Message returns the exception's message. -func (s FolderDoesNotExistException) Message() string { +func (s *FolderDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17604,22 +17604,22 @@ func (s FolderDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FolderDoesNotExistException) OrigErr() error { +func (s *FolderDoesNotExistException) OrigErr() error { return nil } -func (s FolderDoesNotExistException) Error() string { +func (s *FolderDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FolderDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FolderDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FolderDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *FolderDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } type GetApprovalRuleTemplateInput struct { @@ -19571,8 +19571,8 @@ func (s *GetRepositoryTriggersOutput) SetTriggers(v []*RepositoryTrigger) *GetRe // The client request token is not valid. Either the token is not in a valid // format, or the token has been used in a previous request and cannot be reused. type IdempotencyParameterMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19589,17 +19589,17 @@ func (s IdempotencyParameterMismatchException) GoString() string { func newErrorIdempotencyParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotencyParameterMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotencyParameterMismatchException) Code() string { +func (s *IdempotencyParameterMismatchException) Code() string { return "IdempotencyParameterMismatchException" } // Message returns the exception's message. -func (s IdempotencyParameterMismatchException) Message() string { +func (s *IdempotencyParameterMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19607,30 +19607,30 @@ func (s IdempotencyParameterMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotencyParameterMismatchException) OrigErr() error { +func (s *IdempotencyParameterMismatchException) OrigErr() error { return nil } -func (s IdempotencyParameterMismatchException) Error() string { +func (s *IdempotencyParameterMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotencyParameterMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotencyParameterMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotencyParameterMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotencyParameterMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon Resource Name (ARN) is not valid. Make sure that you have provided // the full ARN for the user who initiated the change for the pull request, // and then try again. type InvalidActorArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19647,17 +19647,17 @@ func (s InvalidActorArnException) GoString() string { func newErrorInvalidActorArnException(v protocol.ResponseMetadata) error { return &InvalidActorArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidActorArnException) Code() string { +func (s *InvalidActorArnException) Code() string { return "InvalidActorArnException" } // Message returns the exception's message. -func (s InvalidActorArnException) Message() string { +func (s *InvalidActorArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19665,28 +19665,28 @@ func (s InvalidActorArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidActorArnException) OrigErr() error { +func (s *InvalidActorArnException) OrigErr() error { return nil } -func (s InvalidActorArnException) Error() string { +func (s *InvalidActorArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidActorArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidActorArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidActorArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidActorArnException) RequestID() string { + return s.RespMetadata.RequestID } // The content for the approval rule is not valid. type InvalidApprovalRuleContentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19703,17 +19703,17 @@ func (s InvalidApprovalRuleContentException) GoString() string { func newErrorInvalidApprovalRuleContentException(v protocol.ResponseMetadata) error { return &InvalidApprovalRuleContentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalRuleContentException) Code() string { +func (s *InvalidApprovalRuleContentException) Code() string { return "InvalidApprovalRuleContentException" } // Message returns the exception's message. -func (s InvalidApprovalRuleContentException) Message() string { +func (s *InvalidApprovalRuleContentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19721,28 +19721,28 @@ func (s InvalidApprovalRuleContentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalRuleContentException) OrigErr() error { +func (s *InvalidApprovalRuleContentException) OrigErr() error { return nil } -func (s InvalidApprovalRuleContentException) Error() string { +func (s *InvalidApprovalRuleContentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalRuleContentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalRuleContentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalRuleContentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalRuleContentException) RequestID() string { + return s.RespMetadata.RequestID } // The name for the approval rule is not valid. type InvalidApprovalRuleNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19759,17 +19759,17 @@ func (s InvalidApprovalRuleNameException) GoString() string { func newErrorInvalidApprovalRuleNameException(v protocol.ResponseMetadata) error { return &InvalidApprovalRuleNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalRuleNameException) Code() string { +func (s *InvalidApprovalRuleNameException) Code() string { return "InvalidApprovalRuleNameException" } // Message returns the exception's message. -func (s InvalidApprovalRuleNameException) Message() string { +func (s *InvalidApprovalRuleNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19777,28 +19777,28 @@ func (s InvalidApprovalRuleNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalRuleNameException) OrigErr() error { +func (s *InvalidApprovalRuleNameException) OrigErr() error { return nil } -func (s InvalidApprovalRuleNameException) Error() string { +func (s *InvalidApprovalRuleNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalRuleNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalRuleNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalRuleNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalRuleNameException) RequestID() string { + return s.RespMetadata.RequestID } // The content of the approval rule template is not valid. type InvalidApprovalRuleTemplateContentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19815,17 +19815,17 @@ func (s InvalidApprovalRuleTemplateContentException) GoString() string { func newErrorInvalidApprovalRuleTemplateContentException(v protocol.ResponseMetadata) error { return &InvalidApprovalRuleTemplateContentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalRuleTemplateContentException) Code() string { +func (s *InvalidApprovalRuleTemplateContentException) Code() string { return "InvalidApprovalRuleTemplateContentException" } // Message returns the exception's message. -func (s InvalidApprovalRuleTemplateContentException) Message() string { +func (s *InvalidApprovalRuleTemplateContentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19833,30 +19833,30 @@ func (s InvalidApprovalRuleTemplateContentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalRuleTemplateContentException) OrigErr() error { +func (s *InvalidApprovalRuleTemplateContentException) OrigErr() error { return nil } -func (s InvalidApprovalRuleTemplateContentException) Error() string { +func (s *InvalidApprovalRuleTemplateContentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalRuleTemplateContentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalRuleTemplateContentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalRuleTemplateContentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalRuleTemplateContentException) RequestID() string { + return s.RespMetadata.RequestID } // The description for the approval rule template is not valid because it exceeds // the maximum characters allowed for a description. For more information about // limits in AWS CodeCommit, see AWS CodeCommit User Guide (https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). type InvalidApprovalRuleTemplateDescriptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19873,17 +19873,17 @@ func (s InvalidApprovalRuleTemplateDescriptionException) GoString() string { func newErrorInvalidApprovalRuleTemplateDescriptionException(v protocol.ResponseMetadata) error { return &InvalidApprovalRuleTemplateDescriptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalRuleTemplateDescriptionException) Code() string { +func (s *InvalidApprovalRuleTemplateDescriptionException) Code() string { return "InvalidApprovalRuleTemplateDescriptionException" } // Message returns the exception's message. -func (s InvalidApprovalRuleTemplateDescriptionException) Message() string { +func (s *InvalidApprovalRuleTemplateDescriptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19891,30 +19891,30 @@ func (s InvalidApprovalRuleTemplateDescriptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalRuleTemplateDescriptionException) OrigErr() error { +func (s *InvalidApprovalRuleTemplateDescriptionException) OrigErr() error { return nil } -func (s InvalidApprovalRuleTemplateDescriptionException) Error() string { +func (s *InvalidApprovalRuleTemplateDescriptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalRuleTemplateDescriptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalRuleTemplateDescriptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalRuleTemplateDescriptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalRuleTemplateDescriptionException) RequestID() string { + return s.RespMetadata.RequestID } // The name of the approval rule template is not valid. Template names must // be between 1 and 100 valid characters in length. For more information about // limits in AWS CodeCommit, see AWS CodeCommit User Guide (https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). type InvalidApprovalRuleTemplateNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19931,17 +19931,17 @@ func (s InvalidApprovalRuleTemplateNameException) GoString() string { func newErrorInvalidApprovalRuleTemplateNameException(v protocol.ResponseMetadata) error { return &InvalidApprovalRuleTemplateNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalRuleTemplateNameException) Code() string { +func (s *InvalidApprovalRuleTemplateNameException) Code() string { return "InvalidApprovalRuleTemplateNameException" } // Message returns the exception's message. -func (s InvalidApprovalRuleTemplateNameException) Message() string { +func (s *InvalidApprovalRuleTemplateNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19949,29 +19949,29 @@ func (s InvalidApprovalRuleTemplateNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalRuleTemplateNameException) OrigErr() error { +func (s *InvalidApprovalRuleTemplateNameException) OrigErr() error { return nil } -func (s InvalidApprovalRuleTemplateNameException) Error() string { +func (s *InvalidApprovalRuleTemplateNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalRuleTemplateNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalRuleTemplateNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalRuleTemplateNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalRuleTemplateNameException) RequestID() string { + return s.RespMetadata.RequestID } // The state for the approval is not valid. Valid values include APPROVE and // REVOKE. type InvalidApprovalStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19988,17 +19988,17 @@ func (s InvalidApprovalStateException) GoString() string { func newErrorInvalidApprovalStateException(v protocol.ResponseMetadata) error { return &InvalidApprovalStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalStateException) Code() string { +func (s *InvalidApprovalStateException) Code() string { return "InvalidApprovalStateException" } // Message returns the exception's message. -func (s InvalidApprovalStateException) Message() string { +func (s *InvalidApprovalStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20006,29 +20006,29 @@ func (s InvalidApprovalStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalStateException) OrigErr() error { +func (s *InvalidApprovalStateException) OrigErr() error { return nil } -func (s InvalidApprovalStateException) Error() string { +func (s *InvalidApprovalStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalStateException) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon Resource Name (ARN) is not valid. Make sure that you have provided // the full ARN for the author of the pull request, and then try again. type InvalidAuthorArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20045,17 +20045,17 @@ func (s InvalidAuthorArnException) GoString() string { func newErrorInvalidAuthorArnException(v protocol.ResponseMetadata) error { return &InvalidAuthorArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAuthorArnException) Code() string { +func (s *InvalidAuthorArnException) Code() string { return "InvalidAuthorArnException" } // Message returns the exception's message. -func (s InvalidAuthorArnException) Message() string { +func (s *InvalidAuthorArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20063,28 +20063,28 @@ func (s InvalidAuthorArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAuthorArnException) OrigErr() error { +func (s *InvalidAuthorArnException) OrigErr() error { return nil } -func (s InvalidAuthorArnException) Error() string { +func (s *InvalidAuthorArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAuthorArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAuthorArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAuthorArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAuthorArnException) RequestID() string { + return s.RespMetadata.RequestID } // The specified blob is not valid. type InvalidBlobIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20101,17 +20101,17 @@ func (s InvalidBlobIdException) GoString() string { func newErrorInvalidBlobIdException(v protocol.ResponseMetadata) error { return &InvalidBlobIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidBlobIdException) Code() string { +func (s *InvalidBlobIdException) Code() string { return "InvalidBlobIdException" } // Message returns the exception's message. -func (s InvalidBlobIdException) Message() string { +func (s *InvalidBlobIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20119,28 +20119,28 @@ func (s InvalidBlobIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidBlobIdException) OrigErr() error { +func (s *InvalidBlobIdException) OrigErr() error { return nil } -func (s InvalidBlobIdException) Error() string { +func (s *InvalidBlobIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidBlobIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidBlobIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidBlobIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidBlobIdException) RequestID() string { + return s.RespMetadata.RequestID } // The specified reference name is not valid. type InvalidBranchNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20157,17 +20157,17 @@ func (s InvalidBranchNameException) GoString() string { func newErrorInvalidBranchNameException(v protocol.ResponseMetadata) error { return &InvalidBranchNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidBranchNameException) Code() string { +func (s *InvalidBranchNameException) Code() string { return "InvalidBranchNameException" } // Message returns the exception's message. -func (s InvalidBranchNameException) Message() string { +func (s *InvalidBranchNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20175,28 +20175,28 @@ func (s InvalidBranchNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidBranchNameException) OrigErr() error { +func (s *InvalidBranchNameException) OrigErr() error { return nil } -func (s InvalidBranchNameException) Error() string { +func (s *InvalidBranchNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidBranchNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidBranchNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidBranchNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidBranchNameException) RequestID() string { + return s.RespMetadata.RequestID } // The client request token is not valid. type InvalidClientRequestTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20213,17 +20213,17 @@ func (s InvalidClientRequestTokenException) GoString() string { func newErrorInvalidClientRequestTokenException(v protocol.ResponseMetadata) error { return &InvalidClientRequestTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidClientRequestTokenException) Code() string { +func (s *InvalidClientRequestTokenException) Code() string { return "InvalidClientRequestTokenException" } // Message returns the exception's message. -func (s InvalidClientRequestTokenException) Message() string { +func (s *InvalidClientRequestTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20231,29 +20231,29 @@ func (s InvalidClientRequestTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidClientRequestTokenException) OrigErr() error { +func (s *InvalidClientRequestTokenException) OrigErr() error { return nil } -func (s InvalidClientRequestTokenException) Error() string { +func (s *InvalidClientRequestTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidClientRequestTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidClientRequestTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidClientRequestTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidClientRequestTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The comment ID is not in a valid format. Make sure that you have provided // the full comment ID. type InvalidCommentIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20270,17 +20270,17 @@ func (s InvalidCommentIdException) GoString() string { func newErrorInvalidCommentIdException(v protocol.ResponseMetadata) error { return &InvalidCommentIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCommentIdException) Code() string { +func (s *InvalidCommentIdException) Code() string { return "InvalidCommentIdException" } // Message returns the exception's message. -func (s InvalidCommentIdException) Message() string { +func (s *InvalidCommentIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20288,28 +20288,28 @@ func (s InvalidCommentIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCommentIdException) OrigErr() error { +func (s *InvalidCommentIdException) OrigErr() error { return nil } -func (s InvalidCommentIdException) Error() string { +func (s *InvalidCommentIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCommentIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCommentIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCommentIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCommentIdException) RequestID() string { + return s.RespMetadata.RequestID } // The specified commit is not valid. type InvalidCommitException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20326,17 +20326,17 @@ func (s InvalidCommitException) GoString() string { func newErrorInvalidCommitException(v protocol.ResponseMetadata) error { return &InvalidCommitException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCommitException) Code() string { +func (s *InvalidCommitException) Code() string { return "InvalidCommitException" } // Message returns the exception's message. -func (s InvalidCommitException) Message() string { +func (s *InvalidCommitException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20344,28 +20344,28 @@ func (s InvalidCommitException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCommitException) OrigErr() error { +func (s *InvalidCommitException) OrigErr() error { return nil } -func (s InvalidCommitException) Error() string { +func (s *InvalidCommitException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCommitException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCommitException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCommitException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCommitException) RequestID() string { + return s.RespMetadata.RequestID } // The specified commit ID is not valid. type InvalidCommitIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20382,17 +20382,17 @@ func (s InvalidCommitIdException) GoString() string { func newErrorInvalidCommitIdException(v protocol.ResponseMetadata) error { return &InvalidCommitIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCommitIdException) Code() string { +func (s *InvalidCommitIdException) Code() string { return "InvalidCommitIdException" } // Message returns the exception's message. -func (s InvalidCommitIdException) Message() string { +func (s *InvalidCommitIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20400,28 +20400,28 @@ func (s InvalidCommitIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCommitIdException) OrigErr() error { +func (s *InvalidCommitIdException) OrigErr() error { return nil } -func (s InvalidCommitIdException) Error() string { +func (s *InvalidCommitIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCommitIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCommitIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCommitIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCommitIdException) RequestID() string { + return s.RespMetadata.RequestID } // The specified conflict detail level is not valid. type InvalidConflictDetailLevelException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20438,17 +20438,17 @@ func (s InvalidConflictDetailLevelException) GoString() string { func newErrorInvalidConflictDetailLevelException(v protocol.ResponseMetadata) error { return &InvalidConflictDetailLevelException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidConflictDetailLevelException) Code() string { +func (s *InvalidConflictDetailLevelException) Code() string { return "InvalidConflictDetailLevelException" } // Message returns the exception's message. -func (s InvalidConflictDetailLevelException) Message() string { +func (s *InvalidConflictDetailLevelException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20456,28 +20456,28 @@ func (s InvalidConflictDetailLevelException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidConflictDetailLevelException) OrigErr() error { +func (s *InvalidConflictDetailLevelException) OrigErr() error { return nil } -func (s InvalidConflictDetailLevelException) Error() string { +func (s *InvalidConflictDetailLevelException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidConflictDetailLevelException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidConflictDetailLevelException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidConflictDetailLevelException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidConflictDetailLevelException) RequestID() string { + return s.RespMetadata.RequestID } // The specified conflict resolution list is not valid. type InvalidConflictResolutionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20494,17 +20494,17 @@ func (s InvalidConflictResolutionException) GoString() string { func newErrorInvalidConflictResolutionException(v protocol.ResponseMetadata) error { return &InvalidConflictResolutionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidConflictResolutionException) Code() string { +func (s *InvalidConflictResolutionException) Code() string { return "InvalidConflictResolutionException" } // Message returns the exception's message. -func (s InvalidConflictResolutionException) Message() string { +func (s *InvalidConflictResolutionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20512,28 +20512,28 @@ func (s InvalidConflictResolutionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidConflictResolutionException) OrigErr() error { +func (s *InvalidConflictResolutionException) OrigErr() error { return nil } -func (s InvalidConflictResolutionException) Error() string { +func (s *InvalidConflictResolutionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidConflictResolutionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidConflictResolutionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidConflictResolutionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidConflictResolutionException) RequestID() string { + return s.RespMetadata.RequestID } // The specified conflict resolution strategy is not valid. type InvalidConflictResolutionStrategyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20550,17 +20550,17 @@ func (s InvalidConflictResolutionStrategyException) GoString() string { func newErrorInvalidConflictResolutionStrategyException(v protocol.ResponseMetadata) error { return &InvalidConflictResolutionStrategyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidConflictResolutionStrategyException) Code() string { +func (s *InvalidConflictResolutionStrategyException) Code() string { return "InvalidConflictResolutionStrategyException" } // Message returns the exception's message. -func (s InvalidConflictResolutionStrategyException) Message() string { +func (s *InvalidConflictResolutionStrategyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20568,28 +20568,28 @@ func (s InvalidConflictResolutionStrategyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidConflictResolutionStrategyException) OrigErr() error { +func (s *InvalidConflictResolutionStrategyException) OrigErr() error { return nil } -func (s InvalidConflictResolutionStrategyException) Error() string { +func (s *InvalidConflictResolutionStrategyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidConflictResolutionStrategyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidConflictResolutionStrategyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidConflictResolutionStrategyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidConflictResolutionStrategyException) RequestID() string { + return s.RespMetadata.RequestID } // The specified continuation token is not valid. type InvalidContinuationTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20606,17 +20606,17 @@ func (s InvalidContinuationTokenException) GoString() string { func newErrorInvalidContinuationTokenException(v protocol.ResponseMetadata) error { return &InvalidContinuationTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidContinuationTokenException) Code() string { +func (s *InvalidContinuationTokenException) Code() string { return "InvalidContinuationTokenException" } // Message returns the exception's message. -func (s InvalidContinuationTokenException) Message() string { +func (s *InvalidContinuationTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20624,28 +20624,28 @@ func (s InvalidContinuationTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidContinuationTokenException) OrigErr() error { +func (s *InvalidContinuationTokenException) OrigErr() error { return nil } -func (s InvalidContinuationTokenException) Error() string { +func (s *InvalidContinuationTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidContinuationTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidContinuationTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidContinuationTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidContinuationTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The specified deletion parameter is not valid. type InvalidDeletionParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20662,17 +20662,17 @@ func (s InvalidDeletionParameterException) GoString() string { func newErrorInvalidDeletionParameterException(v protocol.ResponseMetadata) error { return &InvalidDeletionParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeletionParameterException) Code() string { +func (s *InvalidDeletionParameterException) Code() string { return "InvalidDeletionParameterException" } // Message returns the exception's message. -func (s InvalidDeletionParameterException) Message() string { +func (s *InvalidDeletionParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20680,29 +20680,29 @@ func (s InvalidDeletionParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeletionParameterException) OrigErr() error { +func (s *InvalidDeletionParameterException) OrigErr() error { return nil } -func (s InvalidDeletionParameterException) Error() string { +func (s *InvalidDeletionParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeletionParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeletionParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeletionParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeletionParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The pull request description is not valid. Descriptions cannot be more than // 1,000 characters. type InvalidDescriptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20719,17 +20719,17 @@ func (s InvalidDescriptionException) GoString() string { func newErrorInvalidDescriptionException(v protocol.ResponseMetadata) error { return &InvalidDescriptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDescriptionException) Code() string { +func (s *InvalidDescriptionException) Code() string { return "InvalidDescriptionException" } // Message returns the exception's message. -func (s InvalidDescriptionException) Message() string { +func (s *InvalidDescriptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20737,29 +20737,29 @@ func (s InvalidDescriptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDescriptionException) OrigErr() error { +func (s *InvalidDescriptionException) OrigErr() error { return nil } -func (s InvalidDescriptionException) Error() string { +func (s *InvalidDescriptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDescriptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDescriptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDescriptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDescriptionException) RequestID() string { + return s.RespMetadata.RequestID } // The destination commit specifier is not valid. You must provide a valid branch // name, tag, or full commit ID. type InvalidDestinationCommitSpecifierException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20776,17 +20776,17 @@ func (s InvalidDestinationCommitSpecifierException) GoString() string { func newErrorInvalidDestinationCommitSpecifierException(v protocol.ResponseMetadata) error { return &InvalidDestinationCommitSpecifierException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDestinationCommitSpecifierException) Code() string { +func (s *InvalidDestinationCommitSpecifierException) Code() string { return "InvalidDestinationCommitSpecifierException" } // Message returns the exception's message. -func (s InvalidDestinationCommitSpecifierException) Message() string { +func (s *InvalidDestinationCommitSpecifierException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20794,30 +20794,30 @@ func (s InvalidDestinationCommitSpecifierException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDestinationCommitSpecifierException) OrigErr() error { +func (s *InvalidDestinationCommitSpecifierException) OrigErr() error { return nil } -func (s InvalidDestinationCommitSpecifierException) Error() string { +func (s *InvalidDestinationCommitSpecifierException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDestinationCommitSpecifierException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDestinationCommitSpecifierException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDestinationCommitSpecifierException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDestinationCommitSpecifierException) RequestID() string { + return s.RespMetadata.RequestID } // The specified email address either contains one or more characters that are // not allowed, or it exceeds the maximum number of characters allowed for an // email address. type InvalidEmailException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20834,17 +20834,17 @@ func (s InvalidEmailException) GoString() string { func newErrorInvalidEmailException(v protocol.ResponseMetadata) error { return &InvalidEmailException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEmailException) Code() string { +func (s *InvalidEmailException) Code() string { return "InvalidEmailException" } // Message returns the exception's message. -func (s InvalidEmailException) Message() string { +func (s *InvalidEmailException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20852,29 +20852,29 @@ func (s InvalidEmailException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEmailException) OrigErr() error { +func (s *InvalidEmailException) OrigErr() error { return nil } -func (s InvalidEmailException) Error() string { +func (s *InvalidEmailException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEmailException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEmailException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEmailException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEmailException) RequestID() string { + return s.RespMetadata.RequestID } // The location of the file is not valid. Make sure that you include the file // name and extension. type InvalidFileLocationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20891,17 +20891,17 @@ func (s InvalidFileLocationException) GoString() string { func newErrorInvalidFileLocationException(v protocol.ResponseMetadata) error { return &InvalidFileLocationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFileLocationException) Code() string { +func (s *InvalidFileLocationException) Code() string { return "InvalidFileLocationException" } // Message returns the exception's message. -func (s InvalidFileLocationException) Message() string { +func (s *InvalidFileLocationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20909,29 +20909,29 @@ func (s InvalidFileLocationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFileLocationException) OrigErr() error { +func (s *InvalidFileLocationException) OrigErr() error { return nil } -func (s InvalidFileLocationException) Error() string { +func (s *InvalidFileLocationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFileLocationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFileLocationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFileLocationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFileLocationException) RequestID() string { + return s.RespMetadata.RequestID } // The specified file mode permission is not valid. For a list of valid file // mode permissions, see PutFile. type InvalidFileModeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20948,17 +20948,17 @@ func (s InvalidFileModeException) GoString() string { func newErrorInvalidFileModeException(v protocol.ResponseMetadata) error { return &InvalidFileModeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFileModeException) Code() string { +func (s *InvalidFileModeException) Code() string { return "InvalidFileModeException" } // Message returns the exception's message. -func (s InvalidFileModeException) Message() string { +func (s *InvalidFileModeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20966,29 +20966,29 @@ func (s InvalidFileModeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFileModeException) OrigErr() error { +func (s *InvalidFileModeException) OrigErr() error { return nil } -func (s InvalidFileModeException) Error() string { +func (s *InvalidFileModeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFileModeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFileModeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFileModeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFileModeException) RequestID() string { + return s.RespMetadata.RequestID } // The position is not valid. Make sure that the line number exists in the version // of the file you want to comment on. type InvalidFilePositionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21005,17 +21005,17 @@ func (s InvalidFilePositionException) GoString() string { func newErrorInvalidFilePositionException(v protocol.ResponseMetadata) error { return &InvalidFilePositionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFilePositionException) Code() string { +func (s *InvalidFilePositionException) Code() string { return "InvalidFilePositionException" } // Message returns the exception's message. -func (s InvalidFilePositionException) Message() string { +func (s *InvalidFilePositionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21023,28 +21023,28 @@ func (s InvalidFilePositionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFilePositionException) OrigErr() error { +func (s *InvalidFilePositionException) OrigErr() error { return nil } -func (s InvalidFilePositionException) Error() string { +func (s *InvalidFilePositionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFilePositionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFilePositionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFilePositionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFilePositionException) RequestID() string { + return s.RespMetadata.RequestID } // The specified value for the number of conflict files to return is not valid. type InvalidMaxConflictFilesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21061,17 +21061,17 @@ func (s InvalidMaxConflictFilesException) GoString() string { func newErrorInvalidMaxConflictFilesException(v protocol.ResponseMetadata) error { return &InvalidMaxConflictFilesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMaxConflictFilesException) Code() string { +func (s *InvalidMaxConflictFilesException) Code() string { return "InvalidMaxConflictFilesException" } // Message returns the exception's message. -func (s InvalidMaxConflictFilesException) Message() string { +func (s *InvalidMaxConflictFilesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21079,28 +21079,28 @@ func (s InvalidMaxConflictFilesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMaxConflictFilesException) OrigErr() error { +func (s *InvalidMaxConflictFilesException) OrigErr() error { return nil } -func (s InvalidMaxConflictFilesException) Error() string { +func (s *InvalidMaxConflictFilesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMaxConflictFilesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMaxConflictFilesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMaxConflictFilesException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMaxConflictFilesException) RequestID() string { + return s.RespMetadata.RequestID } // The specified value for the number of merge hunks to return is not valid. type InvalidMaxMergeHunksException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21117,17 +21117,17 @@ func (s InvalidMaxMergeHunksException) GoString() string { func newErrorInvalidMaxMergeHunksException(v protocol.ResponseMetadata) error { return &InvalidMaxMergeHunksException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMaxMergeHunksException) Code() string { +func (s *InvalidMaxMergeHunksException) Code() string { return "InvalidMaxMergeHunksException" } // Message returns the exception's message. -func (s InvalidMaxMergeHunksException) Message() string { +func (s *InvalidMaxMergeHunksException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21135,28 +21135,28 @@ func (s InvalidMaxMergeHunksException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMaxMergeHunksException) OrigErr() error { +func (s *InvalidMaxMergeHunksException) OrigErr() error { return nil } -func (s InvalidMaxMergeHunksException) Error() string { +func (s *InvalidMaxMergeHunksException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMaxMergeHunksException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMaxMergeHunksException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMaxMergeHunksException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMaxMergeHunksException) RequestID() string { + return s.RespMetadata.RequestID } // The specified number of maximum results is not valid. type InvalidMaxResultsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21173,17 +21173,17 @@ func (s InvalidMaxResultsException) GoString() string { func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error { return &InvalidMaxResultsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMaxResultsException) Code() string { +func (s *InvalidMaxResultsException) Code() string { return "InvalidMaxResultsException" } // Message returns the exception's message. -func (s InvalidMaxResultsException) Message() string { +func (s *InvalidMaxResultsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21191,29 +21191,29 @@ func (s InvalidMaxResultsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMaxResultsException) OrigErr() error { +func (s *InvalidMaxResultsException) OrigErr() error { return nil } -func (s InvalidMaxResultsException) Error() string { +func (s *InvalidMaxResultsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMaxResultsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMaxResultsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMaxResultsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMaxResultsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified merge option is not valid for this operation. Not all merge // strategies are supported for all operations. type InvalidMergeOptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21230,17 +21230,17 @@ func (s InvalidMergeOptionException) GoString() string { func newErrorInvalidMergeOptionException(v protocol.ResponseMetadata) error { return &InvalidMergeOptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMergeOptionException) Code() string { +func (s *InvalidMergeOptionException) Code() string { return "InvalidMergeOptionException" } // Message returns the exception's message. -func (s InvalidMergeOptionException) Message() string { +func (s *InvalidMergeOptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21248,28 +21248,28 @@ func (s InvalidMergeOptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMergeOptionException) OrigErr() error { +func (s *InvalidMergeOptionException) OrigErr() error { return nil } -func (s InvalidMergeOptionException) Error() string { +func (s *InvalidMergeOptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMergeOptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMergeOptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMergeOptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMergeOptionException) RequestID() string { + return s.RespMetadata.RequestID } // The specified sort order is not valid. type InvalidOrderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21286,17 +21286,17 @@ func (s InvalidOrderException) GoString() string { func newErrorInvalidOrderException(v protocol.ResponseMetadata) error { return &InvalidOrderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOrderException) Code() string { +func (s *InvalidOrderException) Code() string { return "InvalidOrderException" } // Message returns the exception's message. -func (s InvalidOrderException) Message() string { +func (s *InvalidOrderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21304,28 +21304,28 @@ func (s InvalidOrderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOrderException) OrigErr() error { +func (s *InvalidOrderException) OrigErr() error { return nil } -func (s InvalidOrderException) Error() string { +func (s *InvalidOrderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOrderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOrderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOrderException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOrderException) RequestID() string { + return s.RespMetadata.RequestID } // The override status is not valid. Valid statuses are OVERRIDE and REVOKE. type InvalidOverrideStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21342,17 +21342,17 @@ func (s InvalidOverrideStatusException) GoString() string { func newErrorInvalidOverrideStatusException(v protocol.ResponseMetadata) error { return &InvalidOverrideStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOverrideStatusException) Code() string { +func (s *InvalidOverrideStatusException) Code() string { return "InvalidOverrideStatusException" } // Message returns the exception's message. -func (s InvalidOverrideStatusException) Message() string { +func (s *InvalidOverrideStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21360,30 +21360,30 @@ func (s InvalidOverrideStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOverrideStatusException) OrigErr() error { +func (s *InvalidOverrideStatusException) OrigErr() error { return nil } -func (s InvalidOverrideStatusException) Error() string { +func (s *InvalidOverrideStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOverrideStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOverrideStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOverrideStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOverrideStatusException) RequestID() string { + return s.RespMetadata.RequestID } // The parent commit ID is not valid. The commit ID cannot be empty, and must // match the head commit ID for the branch of the repository where you want // to add or update a file. type InvalidParentCommitIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21400,17 +21400,17 @@ func (s InvalidParentCommitIdException) GoString() string { func newErrorInvalidParentCommitIdException(v protocol.ResponseMetadata) error { return &InvalidParentCommitIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParentCommitIdException) Code() string { +func (s *InvalidParentCommitIdException) Code() string { return "InvalidParentCommitIdException" } // Message returns the exception's message. -func (s InvalidParentCommitIdException) Message() string { +func (s *InvalidParentCommitIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21418,28 +21418,28 @@ func (s InvalidParentCommitIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParentCommitIdException) OrigErr() error { +func (s *InvalidParentCommitIdException) OrigErr() error { return nil } -func (s InvalidParentCommitIdException) Error() string { +func (s *InvalidParentCommitIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParentCommitIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParentCommitIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParentCommitIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParentCommitIdException) RequestID() string { + return s.RespMetadata.RequestID } // The specified path is not valid. type InvalidPathException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21456,17 +21456,17 @@ func (s InvalidPathException) GoString() string { func newErrorInvalidPathException(v protocol.ResponseMetadata) error { return &InvalidPathException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPathException) Code() string { +func (s *InvalidPathException) Code() string { return "InvalidPathException" } // Message returns the exception's message. -func (s InvalidPathException) Message() string { +func (s *InvalidPathException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21474,28 +21474,28 @@ func (s InvalidPathException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPathException) OrigErr() error { +func (s *InvalidPathException) OrigErr() error { return nil } -func (s InvalidPathException) Error() string { +func (s *InvalidPathException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPathException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPathException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPathException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPathException) RequestID() string { + return s.RespMetadata.RequestID } // The pull request event type is not valid. type InvalidPullRequestEventTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21512,17 +21512,17 @@ func (s InvalidPullRequestEventTypeException) GoString() string { func newErrorInvalidPullRequestEventTypeException(v protocol.ResponseMetadata) error { return &InvalidPullRequestEventTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPullRequestEventTypeException) Code() string { +func (s *InvalidPullRequestEventTypeException) Code() string { return "InvalidPullRequestEventTypeException" } // Message returns the exception's message. -func (s InvalidPullRequestEventTypeException) Message() string { +func (s *InvalidPullRequestEventTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21530,30 +21530,30 @@ func (s InvalidPullRequestEventTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPullRequestEventTypeException) OrigErr() error { +func (s *InvalidPullRequestEventTypeException) OrigErr() error { return nil } -func (s InvalidPullRequestEventTypeException) Error() string { +func (s *InvalidPullRequestEventTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPullRequestEventTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPullRequestEventTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPullRequestEventTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPullRequestEventTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The pull request ID is not valid. Make sure that you have provided the full // ID and that the pull request is in the specified repository, and then try // again. type InvalidPullRequestIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21570,17 +21570,17 @@ func (s InvalidPullRequestIdException) GoString() string { func newErrorInvalidPullRequestIdException(v protocol.ResponseMetadata) error { return &InvalidPullRequestIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPullRequestIdException) Code() string { +func (s *InvalidPullRequestIdException) Code() string { return "InvalidPullRequestIdException" } // Message returns the exception's message. -func (s InvalidPullRequestIdException) Message() string { +func (s *InvalidPullRequestIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21588,29 +21588,29 @@ func (s InvalidPullRequestIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPullRequestIdException) OrigErr() error { +func (s *InvalidPullRequestIdException) OrigErr() error { return nil } -func (s InvalidPullRequestIdException) Error() string { +func (s *InvalidPullRequestIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPullRequestIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPullRequestIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPullRequestIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPullRequestIdException) RequestID() string { + return s.RespMetadata.RequestID } // The pull request status is not valid. The only valid values are OPEN and // CLOSED. type InvalidPullRequestStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21627,17 +21627,17 @@ func (s InvalidPullRequestStatusException) GoString() string { func newErrorInvalidPullRequestStatusException(v protocol.ResponseMetadata) error { return &InvalidPullRequestStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPullRequestStatusException) Code() string { +func (s *InvalidPullRequestStatusException) Code() string { return "InvalidPullRequestStatusException" } // Message returns the exception's message. -func (s InvalidPullRequestStatusException) Message() string { +func (s *InvalidPullRequestStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21645,29 +21645,29 @@ func (s InvalidPullRequestStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPullRequestStatusException) OrigErr() error { +func (s *InvalidPullRequestStatusException) OrigErr() error { return nil } -func (s InvalidPullRequestStatusException) Error() string { +func (s *InvalidPullRequestStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPullRequestStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPullRequestStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPullRequestStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPullRequestStatusException) RequestID() string { + return s.RespMetadata.RequestID } // The pull request status update is not valid. The only valid update is from // OPEN to CLOSED. type InvalidPullRequestStatusUpdateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21684,17 +21684,17 @@ func (s InvalidPullRequestStatusUpdateException) GoString() string { func newErrorInvalidPullRequestStatusUpdateException(v protocol.ResponseMetadata) error { return &InvalidPullRequestStatusUpdateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPullRequestStatusUpdateException) Code() string { +func (s *InvalidPullRequestStatusUpdateException) Code() string { return "InvalidPullRequestStatusUpdateException" } // Message returns the exception's message. -func (s InvalidPullRequestStatusUpdateException) Message() string { +func (s *InvalidPullRequestStatusUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21702,22 +21702,22 @@ func (s InvalidPullRequestStatusUpdateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPullRequestStatusUpdateException) OrigErr() error { +func (s *InvalidPullRequestStatusUpdateException) OrigErr() error { return nil } -func (s InvalidPullRequestStatusUpdateException) Error() string { +func (s *InvalidPullRequestStatusUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPullRequestStatusUpdateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPullRequestStatusUpdateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPullRequestStatusUpdateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPullRequestStatusUpdateException) RequestID() string { + return s.RespMetadata.RequestID } // The specified reference name format is not valid. Reference names must conform @@ -21725,8 +21725,8 @@ func (s InvalidPullRequestStatusUpdateException) RequestID() string { // see Git Internals - Git References (https://git-scm.com/book/en/v2/Git-Internals-Git-References) // or consult your Git documentation. type InvalidReferenceNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21743,17 +21743,17 @@ func (s InvalidReferenceNameException) GoString() string { func newErrorInvalidReferenceNameException(v protocol.ResponseMetadata) error { return &InvalidReferenceNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidReferenceNameException) Code() string { +func (s *InvalidReferenceNameException) Code() string { return "InvalidReferenceNameException" } // Message returns the exception's message. -func (s InvalidReferenceNameException) Message() string { +func (s *InvalidReferenceNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21761,29 +21761,29 @@ func (s InvalidReferenceNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidReferenceNameException) OrigErr() error { +func (s *InvalidReferenceNameException) OrigErr() error { return nil } -func (s InvalidReferenceNameException) Error() string { +func (s *InvalidReferenceNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidReferenceNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidReferenceNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidReferenceNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidReferenceNameException) RequestID() string { + return s.RespMetadata.RequestID } // Either the enum is not in a valid format, or the specified file version enum // is not valid in respect to the current file version. type InvalidRelativeFileVersionEnumException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21800,17 +21800,17 @@ func (s InvalidRelativeFileVersionEnumException) GoString() string { func newErrorInvalidRelativeFileVersionEnumException(v protocol.ResponseMetadata) error { return &InvalidRelativeFileVersionEnumException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRelativeFileVersionEnumException) Code() string { +func (s *InvalidRelativeFileVersionEnumException) Code() string { return "InvalidRelativeFileVersionEnumException" } // Message returns the exception's message. -func (s InvalidRelativeFileVersionEnumException) Message() string { +func (s *InvalidRelativeFileVersionEnumException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21818,29 +21818,29 @@ func (s InvalidRelativeFileVersionEnumException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRelativeFileVersionEnumException) OrigErr() error { +func (s *InvalidRelativeFileVersionEnumException) OrigErr() error { return nil } -func (s InvalidRelativeFileVersionEnumException) Error() string { +func (s *InvalidRelativeFileVersionEnumException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRelativeFileVersionEnumException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRelativeFileVersionEnumException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRelativeFileVersionEnumException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRelativeFileVersionEnumException) RequestID() string { + return s.RespMetadata.RequestID } // Automerge was specified for resolving the conflict, but the replacement type // is not valid or content is missing. type InvalidReplacementContentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21857,17 +21857,17 @@ func (s InvalidReplacementContentException) GoString() string { func newErrorInvalidReplacementContentException(v protocol.ResponseMetadata) error { return &InvalidReplacementContentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidReplacementContentException) Code() string { +func (s *InvalidReplacementContentException) Code() string { return "InvalidReplacementContentException" } // Message returns the exception's message. -func (s InvalidReplacementContentException) Message() string { +func (s *InvalidReplacementContentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21875,29 +21875,29 @@ func (s InvalidReplacementContentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidReplacementContentException) OrigErr() error { +func (s *InvalidReplacementContentException) OrigErr() error { return nil } -func (s InvalidReplacementContentException) Error() string { +func (s *InvalidReplacementContentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidReplacementContentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidReplacementContentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidReplacementContentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidReplacementContentException) RequestID() string { + return s.RespMetadata.RequestID } // Automerge was specified for resolving the conflict, but the specified replacement // type is not valid. type InvalidReplacementTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21914,17 +21914,17 @@ func (s InvalidReplacementTypeException) GoString() string { func newErrorInvalidReplacementTypeException(v protocol.ResponseMetadata) error { return &InvalidReplacementTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidReplacementTypeException) Code() string { +func (s *InvalidReplacementTypeException) Code() string { return "InvalidReplacementTypeException" } // Message returns the exception's message. -func (s InvalidReplacementTypeException) Message() string { +func (s *InvalidReplacementTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21932,28 +21932,28 @@ func (s InvalidReplacementTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidReplacementTypeException) OrigErr() error { +func (s *InvalidReplacementTypeException) OrigErr() error { return nil } -func (s InvalidReplacementTypeException) Error() string { +func (s *InvalidReplacementTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidReplacementTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidReplacementTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidReplacementTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidReplacementTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The specified repository description is not valid. type InvalidRepositoryDescriptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21970,17 +21970,17 @@ func (s InvalidRepositoryDescriptionException) GoString() string { func newErrorInvalidRepositoryDescriptionException(v protocol.ResponseMetadata) error { return &InvalidRepositoryDescriptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryDescriptionException) Code() string { +func (s *InvalidRepositoryDescriptionException) Code() string { return "InvalidRepositoryDescriptionException" } // Message returns the exception's message. -func (s InvalidRepositoryDescriptionException) Message() string { +func (s *InvalidRepositoryDescriptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21988,22 +21988,22 @@ func (s InvalidRepositoryDescriptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryDescriptionException) OrigErr() error { +func (s *InvalidRepositoryDescriptionException) OrigErr() error { return nil } -func (s InvalidRepositoryDescriptionException) Error() string { +func (s *InvalidRepositoryDescriptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryDescriptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryDescriptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryDescriptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryDescriptionException) RequestID() string { + return s.RespMetadata.RequestID } // A specified repository name is not valid. @@ -22012,8 +22012,8 @@ func (s InvalidRepositoryDescriptionException) RequestID() string { // Other exceptions occur when a required repository parameter is missing, or // when a specified repository does not exist. type InvalidRepositoryNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22030,17 +22030,17 @@ func (s InvalidRepositoryNameException) GoString() string { func newErrorInvalidRepositoryNameException(v protocol.ResponseMetadata) error { return &InvalidRepositoryNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryNameException) Code() string { +func (s *InvalidRepositoryNameException) Code() string { return "InvalidRepositoryNameException" } // Message returns the exception's message. -func (s InvalidRepositoryNameException) Message() string { +func (s *InvalidRepositoryNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22048,28 +22048,28 @@ func (s InvalidRepositoryNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryNameException) OrigErr() error { +func (s *InvalidRepositoryNameException) OrigErr() error { return nil } -func (s InvalidRepositoryNameException) Error() string { +func (s *InvalidRepositoryNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryNameException) RequestID() string { + return s.RespMetadata.RequestID } // One or more branch names specified for the trigger is not valid. type InvalidRepositoryTriggerBranchNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22086,17 +22086,17 @@ func (s InvalidRepositoryTriggerBranchNameException) GoString() string { func newErrorInvalidRepositoryTriggerBranchNameException(v protocol.ResponseMetadata) error { return &InvalidRepositoryTriggerBranchNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryTriggerBranchNameException) Code() string { +func (s *InvalidRepositoryTriggerBranchNameException) Code() string { return "InvalidRepositoryTriggerBranchNameException" } // Message returns the exception's message. -func (s InvalidRepositoryTriggerBranchNameException) Message() string { +func (s *InvalidRepositoryTriggerBranchNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22104,28 +22104,28 @@ func (s InvalidRepositoryTriggerBranchNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryTriggerBranchNameException) OrigErr() error { +func (s *InvalidRepositoryTriggerBranchNameException) OrigErr() error { return nil } -func (s InvalidRepositoryTriggerBranchNameException) Error() string { +func (s *InvalidRepositoryTriggerBranchNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryTriggerBranchNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryTriggerBranchNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryTriggerBranchNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryTriggerBranchNameException) RequestID() string { + return s.RespMetadata.RequestID } // The custom data provided for the trigger is not valid. type InvalidRepositoryTriggerCustomDataException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22142,17 +22142,17 @@ func (s InvalidRepositoryTriggerCustomDataException) GoString() string { func newErrorInvalidRepositoryTriggerCustomDataException(v protocol.ResponseMetadata) error { return &InvalidRepositoryTriggerCustomDataException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryTriggerCustomDataException) Code() string { +func (s *InvalidRepositoryTriggerCustomDataException) Code() string { return "InvalidRepositoryTriggerCustomDataException" } // Message returns the exception's message. -func (s InvalidRepositoryTriggerCustomDataException) Message() string { +func (s *InvalidRepositoryTriggerCustomDataException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22160,30 +22160,30 @@ func (s InvalidRepositoryTriggerCustomDataException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryTriggerCustomDataException) OrigErr() error { +func (s *InvalidRepositoryTriggerCustomDataException) OrigErr() error { return nil } -func (s InvalidRepositoryTriggerCustomDataException) Error() string { +func (s *InvalidRepositoryTriggerCustomDataException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryTriggerCustomDataException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryTriggerCustomDataException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryTriggerCustomDataException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryTriggerCustomDataException) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon Resource Name (ARN) for the trigger is not valid for the specified // destination. The most common reason for this error is that the ARN does not // meet the requirements for the service type. type InvalidRepositoryTriggerDestinationArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22200,17 +22200,17 @@ func (s InvalidRepositoryTriggerDestinationArnException) GoString() string { func newErrorInvalidRepositoryTriggerDestinationArnException(v protocol.ResponseMetadata) error { return &InvalidRepositoryTriggerDestinationArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryTriggerDestinationArnException) Code() string { +func (s *InvalidRepositoryTriggerDestinationArnException) Code() string { return "InvalidRepositoryTriggerDestinationArnException" } // Message returns the exception's message. -func (s InvalidRepositoryTriggerDestinationArnException) Message() string { +func (s *InvalidRepositoryTriggerDestinationArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22218,29 +22218,29 @@ func (s InvalidRepositoryTriggerDestinationArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryTriggerDestinationArnException) OrigErr() error { +func (s *InvalidRepositoryTriggerDestinationArnException) OrigErr() error { return nil } -func (s InvalidRepositoryTriggerDestinationArnException) Error() string { +func (s *InvalidRepositoryTriggerDestinationArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryTriggerDestinationArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryTriggerDestinationArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryTriggerDestinationArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryTriggerDestinationArnException) RequestID() string { + return s.RespMetadata.RequestID } // One or more events specified for the trigger is not valid. Check to make // sure that all events specified match the requirements for allowed events. type InvalidRepositoryTriggerEventsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22257,17 +22257,17 @@ func (s InvalidRepositoryTriggerEventsException) GoString() string { func newErrorInvalidRepositoryTriggerEventsException(v protocol.ResponseMetadata) error { return &InvalidRepositoryTriggerEventsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryTriggerEventsException) Code() string { +func (s *InvalidRepositoryTriggerEventsException) Code() string { return "InvalidRepositoryTriggerEventsException" } // Message returns the exception's message. -func (s InvalidRepositoryTriggerEventsException) Message() string { +func (s *InvalidRepositoryTriggerEventsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22275,28 +22275,28 @@ func (s InvalidRepositoryTriggerEventsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryTriggerEventsException) OrigErr() error { +func (s *InvalidRepositoryTriggerEventsException) OrigErr() error { return nil } -func (s InvalidRepositoryTriggerEventsException) Error() string { +func (s *InvalidRepositoryTriggerEventsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryTriggerEventsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryTriggerEventsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryTriggerEventsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryTriggerEventsException) RequestID() string { + return s.RespMetadata.RequestID } // The name of the trigger is not valid. type InvalidRepositoryTriggerNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22313,17 +22313,17 @@ func (s InvalidRepositoryTriggerNameException) GoString() string { func newErrorInvalidRepositoryTriggerNameException(v protocol.ResponseMetadata) error { return &InvalidRepositoryTriggerNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryTriggerNameException) Code() string { +func (s *InvalidRepositoryTriggerNameException) Code() string { return "InvalidRepositoryTriggerNameException" } // Message returns the exception's message. -func (s InvalidRepositoryTriggerNameException) Message() string { +func (s *InvalidRepositoryTriggerNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22331,30 +22331,30 @@ func (s InvalidRepositoryTriggerNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryTriggerNameException) OrigErr() error { +func (s *InvalidRepositoryTriggerNameException) OrigErr() error { return nil } -func (s InvalidRepositoryTriggerNameException) Error() string { +func (s *InvalidRepositoryTriggerNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryTriggerNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryTriggerNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryTriggerNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryTriggerNameException) RequestID() string { + return s.RespMetadata.RequestID } // The AWS Region for the trigger target does not match the AWS Region for the // repository. Triggers must be created in the same Region as the target for // the trigger. type InvalidRepositoryTriggerRegionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22371,17 +22371,17 @@ func (s InvalidRepositoryTriggerRegionException) GoString() string { func newErrorInvalidRepositoryTriggerRegionException(v protocol.ResponseMetadata) error { return &InvalidRepositoryTriggerRegionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRepositoryTriggerRegionException) Code() string { +func (s *InvalidRepositoryTriggerRegionException) Code() string { return "InvalidRepositoryTriggerRegionException" } // Message returns the exception's message. -func (s InvalidRepositoryTriggerRegionException) Message() string { +func (s *InvalidRepositoryTriggerRegionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22389,30 +22389,30 @@ func (s InvalidRepositoryTriggerRegionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRepositoryTriggerRegionException) OrigErr() error { +func (s *InvalidRepositoryTriggerRegionException) OrigErr() error { return nil } -func (s InvalidRepositoryTriggerRegionException) Error() string { +func (s *InvalidRepositoryTriggerRegionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRepositoryTriggerRegionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRepositoryTriggerRegionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRepositoryTriggerRegionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRepositoryTriggerRegionException) RequestID() string { + return s.RespMetadata.RequestID } // The value for the resource ARN is not valid. For more information about resources // in AWS CodeCommit, see CodeCommit Resources and Operations (https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats) // in the AWS CodeCommit User Guide. type InvalidResourceArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22429,17 +22429,17 @@ func (s InvalidResourceArnException) GoString() string { func newErrorInvalidResourceArnException(v protocol.ResponseMetadata) error { return &InvalidResourceArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceArnException) Code() string { +func (s *InvalidResourceArnException) Code() string { return "InvalidResourceArnException" } // Message returns the exception's message. -func (s InvalidResourceArnException) Message() string { +func (s *InvalidResourceArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22447,28 +22447,28 @@ func (s InvalidResourceArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceArnException) OrigErr() error { +func (s *InvalidResourceArnException) OrigErr() error { return nil } -func (s InvalidResourceArnException) Error() string { +func (s *InvalidResourceArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceArnException) RequestID() string { + return s.RespMetadata.RequestID } // The revision ID is not valid. Use GetPullRequest to determine the value. type InvalidRevisionIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22485,17 +22485,17 @@ func (s InvalidRevisionIdException) GoString() string { func newErrorInvalidRevisionIdException(v protocol.ResponseMetadata) error { return &InvalidRevisionIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRevisionIdException) Code() string { +func (s *InvalidRevisionIdException) Code() string { return "InvalidRevisionIdException" } // Message returns the exception's message. -func (s InvalidRevisionIdException) Message() string { +func (s *InvalidRevisionIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22503,28 +22503,28 @@ func (s InvalidRevisionIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRevisionIdException) OrigErr() error { +func (s *InvalidRevisionIdException) OrigErr() error { return nil } -func (s InvalidRevisionIdException) Error() string { +func (s *InvalidRevisionIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRevisionIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRevisionIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRevisionIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRevisionIdException) RequestID() string { + return s.RespMetadata.RequestID } // The SHA-256 hash signature for the rule content is not valid. type InvalidRuleContentSha256Exception struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22541,17 +22541,17 @@ func (s InvalidRuleContentSha256Exception) GoString() string { func newErrorInvalidRuleContentSha256Exception(v protocol.ResponseMetadata) error { return &InvalidRuleContentSha256Exception{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRuleContentSha256Exception) Code() string { +func (s *InvalidRuleContentSha256Exception) Code() string { return "InvalidRuleContentSha256Exception" } // Message returns the exception's message. -func (s InvalidRuleContentSha256Exception) Message() string { +func (s *InvalidRuleContentSha256Exception) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22559,28 +22559,28 @@ func (s InvalidRuleContentSha256Exception) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRuleContentSha256Exception) OrigErr() error { +func (s *InvalidRuleContentSha256Exception) OrigErr() error { return nil } -func (s InvalidRuleContentSha256Exception) Error() string { +func (s *InvalidRuleContentSha256Exception) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRuleContentSha256Exception) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRuleContentSha256Exception) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRuleContentSha256Exception) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRuleContentSha256Exception) RequestID() string { + return s.RespMetadata.RequestID } // The specified sort by value is not valid. type InvalidSortByException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22597,17 +22597,17 @@ func (s InvalidSortByException) GoString() string { func newErrorInvalidSortByException(v protocol.ResponseMetadata) error { return &InvalidSortByException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSortByException) Code() string { +func (s *InvalidSortByException) Code() string { return "InvalidSortByException" } // Message returns the exception's message. -func (s InvalidSortByException) Message() string { +func (s *InvalidSortByException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22615,29 +22615,29 @@ func (s InvalidSortByException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSortByException) OrigErr() error { +func (s *InvalidSortByException) OrigErr() error { return nil } -func (s InvalidSortByException) Error() string { +func (s *InvalidSortByException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSortByException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSortByException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSortByException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSortByException) RequestID() string { + return s.RespMetadata.RequestID } // The source commit specifier is not valid. You must provide a valid branch // name, tag, or full commit ID. type InvalidSourceCommitSpecifierException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22654,17 +22654,17 @@ func (s InvalidSourceCommitSpecifierException) GoString() string { func newErrorInvalidSourceCommitSpecifierException(v protocol.ResponseMetadata) error { return &InvalidSourceCommitSpecifierException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSourceCommitSpecifierException) Code() string { +func (s *InvalidSourceCommitSpecifierException) Code() string { return "InvalidSourceCommitSpecifierException" } // Message returns the exception's message. -func (s InvalidSourceCommitSpecifierException) Message() string { +func (s *InvalidSourceCommitSpecifierException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22672,28 +22672,28 @@ func (s InvalidSourceCommitSpecifierException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSourceCommitSpecifierException) OrigErr() error { +func (s *InvalidSourceCommitSpecifierException) OrigErr() error { return nil } -func (s InvalidSourceCommitSpecifierException) Error() string { +func (s *InvalidSourceCommitSpecifierException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSourceCommitSpecifierException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSourceCommitSpecifierException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSourceCommitSpecifierException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSourceCommitSpecifierException) RequestID() string { + return s.RespMetadata.RequestID } // The specified tag is not valid. Key names cannot be prefixed with aws:. type InvalidSystemTagUsageException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22710,17 +22710,17 @@ func (s InvalidSystemTagUsageException) GoString() string { func newErrorInvalidSystemTagUsageException(v protocol.ResponseMetadata) error { return &InvalidSystemTagUsageException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSystemTagUsageException) Code() string { +func (s *InvalidSystemTagUsageException) Code() string { return "InvalidSystemTagUsageException" } // Message returns the exception's message. -func (s InvalidSystemTagUsageException) Message() string { +func (s *InvalidSystemTagUsageException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22728,28 +22728,28 @@ func (s InvalidSystemTagUsageException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSystemTagUsageException) OrigErr() error { +func (s *InvalidSystemTagUsageException) OrigErr() error { return nil } -func (s InvalidSystemTagUsageException) Error() string { +func (s *InvalidSystemTagUsageException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSystemTagUsageException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSystemTagUsageException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSystemTagUsageException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSystemTagUsageException) RequestID() string { + return s.RespMetadata.RequestID } // The list of tags is not valid. type InvalidTagKeysListException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22766,17 +22766,17 @@ func (s InvalidTagKeysListException) GoString() string { func newErrorInvalidTagKeysListException(v protocol.ResponseMetadata) error { return &InvalidTagKeysListException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagKeysListException) Code() string { +func (s *InvalidTagKeysListException) Code() string { return "InvalidTagKeysListException" } // Message returns the exception's message. -func (s InvalidTagKeysListException) Message() string { +func (s *InvalidTagKeysListException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22784,28 +22784,28 @@ func (s InvalidTagKeysListException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagKeysListException) OrigErr() error { +func (s *InvalidTagKeysListException) OrigErr() error { return nil } -func (s InvalidTagKeysListException) Error() string { +func (s *InvalidTagKeysListException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagKeysListException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagKeysListException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagKeysListException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagKeysListException) RequestID() string { + return s.RespMetadata.RequestID } // The map of tags is not valid. type InvalidTagsMapException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22822,17 +22822,17 @@ func (s InvalidTagsMapException) GoString() string { func newErrorInvalidTagsMapException(v protocol.ResponseMetadata) error { return &InvalidTagsMapException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagsMapException) Code() string { +func (s *InvalidTagsMapException) Code() string { return "InvalidTagsMapException" } // Message returns the exception's message. -func (s InvalidTagsMapException) Message() string { +func (s *InvalidTagsMapException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22840,28 +22840,28 @@ func (s InvalidTagsMapException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagsMapException) OrigErr() error { +func (s *InvalidTagsMapException) OrigErr() error { return nil } -func (s InvalidTagsMapException) Error() string { +func (s *InvalidTagsMapException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagsMapException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagsMapException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagsMapException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagsMapException) RequestID() string { + return s.RespMetadata.RequestID } // The specified target branch is not valid. type InvalidTargetBranchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22878,17 +22878,17 @@ func (s InvalidTargetBranchException) GoString() string { func newErrorInvalidTargetBranchException(v protocol.ResponseMetadata) error { return &InvalidTargetBranchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetBranchException) Code() string { +func (s *InvalidTargetBranchException) Code() string { return "InvalidTargetBranchException" } // Message returns the exception's message. -func (s InvalidTargetBranchException) Message() string { +func (s *InvalidTargetBranchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22896,30 +22896,30 @@ func (s InvalidTargetBranchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetBranchException) OrigErr() error { +func (s *InvalidTargetBranchException) OrigErr() error { return nil } -func (s InvalidTargetBranchException) Error() string { +func (s *InvalidTargetBranchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetBranchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetBranchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetBranchException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetBranchException) RequestID() string { + return s.RespMetadata.RequestID } // The target for the pull request is not valid. A target must contain the full // values for the repository name, source branch, and destination branch for // the pull request. type InvalidTargetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22936,17 +22936,17 @@ func (s InvalidTargetException) GoString() string { func newErrorInvalidTargetException(v protocol.ResponseMetadata) error { return &InvalidTargetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetException) Code() string { +func (s *InvalidTargetException) Code() string { return "InvalidTargetException" } // Message returns the exception's message. -func (s InvalidTargetException) Message() string { +func (s *InvalidTargetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22954,22 +22954,22 @@ func (s InvalidTargetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetException) OrigErr() error { +func (s *InvalidTargetException) OrigErr() error { return nil } -func (s InvalidTargetException) Error() string { +func (s *InvalidTargetException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetException) RequestID() string { + return s.RespMetadata.RequestID } // The targets for the pull request is not valid or not in a valid format. Targets @@ -22977,8 +22977,8 @@ func (s InvalidTargetException) RequestID() string { // for the repository name, source branch, and destination branch for a pull // request. type InvalidTargetsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -22995,17 +22995,17 @@ func (s InvalidTargetsException) GoString() string { func newErrorInvalidTargetsException(v protocol.ResponseMetadata) error { return &InvalidTargetsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetsException) Code() string { +func (s *InvalidTargetsException) Code() string { return "InvalidTargetsException" } // Message returns the exception's message. -func (s InvalidTargetsException) Message() string { +func (s *InvalidTargetsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23013,29 +23013,29 @@ func (s InvalidTargetsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetsException) OrigErr() error { +func (s *InvalidTargetsException) OrigErr() error { return nil } -func (s InvalidTargetsException) Error() string { +func (s *InvalidTargetsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetsException) RequestID() string { + return s.RespMetadata.RequestID } // The title of the pull request is not valid. Pull request titles cannot exceed // 100 characters in length. type InvalidTitleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23052,17 +23052,17 @@ func (s InvalidTitleException) GoString() string { func newErrorInvalidTitleException(v protocol.ResponseMetadata) error { return &InvalidTitleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTitleException) Code() string { +func (s *InvalidTitleException) Code() string { return "InvalidTitleException" } // Message returns the exception's message. -func (s InvalidTitleException) Message() string { +func (s *InvalidTitleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23070,22 +23070,22 @@ func (s InvalidTitleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTitleException) OrigErr() error { +func (s *InvalidTitleException) OrigErr() error { return nil } -func (s InvalidTitleException) Error() string { +func (s *InvalidTitleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTitleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTitleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTitleException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTitleException) RequestID() string { + return s.RespMetadata.RequestID } // Information about whether a file is binary or textual in a merge or pull @@ -23801,8 +23801,8 @@ func (s *Location) SetRelativeFileVersion(v string) *Location { // The pull request cannot be merged automatically into the destination branch. // You must manually merge the branches and resolve any conflicts. type ManualMergeRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23819,17 +23819,17 @@ func (s ManualMergeRequiredException) GoString() string { func newErrorManualMergeRequiredException(v protocol.ResponseMetadata) error { return &ManualMergeRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ManualMergeRequiredException) Code() string { +func (s *ManualMergeRequiredException) Code() string { return "ManualMergeRequiredException" } // Message returns the exception's message. -func (s ManualMergeRequiredException) Message() string { +func (s *ManualMergeRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23837,28 +23837,28 @@ func (s ManualMergeRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ManualMergeRequiredException) OrigErr() error { +func (s *ManualMergeRequiredException) OrigErr() error { return nil } -func (s ManualMergeRequiredException) Error() string { +func (s *ManualMergeRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ManualMergeRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ManualMergeRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ManualMergeRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ManualMergeRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The number of branches for the trigger was exceeded. type MaximumBranchesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23875,17 +23875,17 @@ func (s MaximumBranchesExceededException) GoString() string { func newErrorMaximumBranchesExceededException(v protocol.ResponseMetadata) error { return &MaximumBranchesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumBranchesExceededException) Code() string { +func (s *MaximumBranchesExceededException) Code() string { return "MaximumBranchesExceededException" } // Message returns the exception's message. -func (s MaximumBranchesExceededException) Message() string { +func (s *MaximumBranchesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23893,28 +23893,28 @@ func (s MaximumBranchesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumBranchesExceededException) OrigErr() error { +func (s *MaximumBranchesExceededException) OrigErr() error { return nil } -func (s MaximumBranchesExceededException) Error() string { +func (s *MaximumBranchesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumBranchesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumBranchesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumBranchesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumBranchesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of allowed conflict resolution entries was exceeded. type MaximumConflictResolutionEntriesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23931,17 +23931,17 @@ func (s MaximumConflictResolutionEntriesExceededException) GoString() string { func newErrorMaximumConflictResolutionEntriesExceededException(v protocol.ResponseMetadata) error { return &MaximumConflictResolutionEntriesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumConflictResolutionEntriesExceededException) Code() string { +func (s *MaximumConflictResolutionEntriesExceededException) Code() string { return "MaximumConflictResolutionEntriesExceededException" } // Message returns the exception's message. -func (s MaximumConflictResolutionEntriesExceededException) Message() string { +func (s *MaximumConflictResolutionEntriesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23949,28 +23949,28 @@ func (s MaximumConflictResolutionEntriesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumConflictResolutionEntriesExceededException) OrigErr() error { +func (s *MaximumConflictResolutionEntriesExceededException) OrigErr() error { return nil } -func (s MaximumConflictResolutionEntriesExceededException) Error() string { +func (s *MaximumConflictResolutionEntriesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumConflictResolutionEntriesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumConflictResolutionEntriesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumConflictResolutionEntriesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumConflictResolutionEntriesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of files to load exceeds the allowed limit. type MaximumFileContentToLoadExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23987,17 +23987,17 @@ func (s MaximumFileContentToLoadExceededException) GoString() string { func newErrorMaximumFileContentToLoadExceededException(v protocol.ResponseMetadata) error { return &MaximumFileContentToLoadExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumFileContentToLoadExceededException) Code() string { +func (s *MaximumFileContentToLoadExceededException) Code() string { return "MaximumFileContentToLoadExceededException" } // Message returns the exception's message. -func (s MaximumFileContentToLoadExceededException) Message() string { +func (s *MaximumFileContentToLoadExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24005,30 +24005,30 @@ func (s MaximumFileContentToLoadExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumFileContentToLoadExceededException) OrigErr() error { +func (s *MaximumFileContentToLoadExceededException) OrigErr() error { return nil } -func (s MaximumFileContentToLoadExceededException) Error() string { +func (s *MaximumFileContentToLoadExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumFileContentToLoadExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumFileContentToLoadExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumFileContentToLoadExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumFileContentToLoadExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of specified files to change as part of this commit exceeds the // maximum number of files that can be changed in a single commit. Consider // using a Git client for these changes. type MaximumFileEntriesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24045,17 +24045,17 @@ func (s MaximumFileEntriesExceededException) GoString() string { func newErrorMaximumFileEntriesExceededException(v protocol.ResponseMetadata) error { return &MaximumFileEntriesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumFileEntriesExceededException) Code() string { +func (s *MaximumFileEntriesExceededException) Code() string { return "MaximumFileEntriesExceededException" } // Message returns the exception's message. -func (s MaximumFileEntriesExceededException) Message() string { +func (s *MaximumFileEntriesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24063,29 +24063,29 @@ func (s MaximumFileEntriesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumFileEntriesExceededException) OrigErr() error { +func (s *MaximumFileEntriesExceededException) OrigErr() error { return nil } -func (s MaximumFileEntriesExceededException) Error() string { +func (s *MaximumFileEntriesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumFileEntriesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumFileEntriesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumFileEntriesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumFileEntriesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of items to compare between the source or destination branches // and the merge base has exceeded the maximum allowed. type MaximumItemsToCompareExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24102,17 +24102,17 @@ func (s MaximumItemsToCompareExceededException) GoString() string { func newErrorMaximumItemsToCompareExceededException(v protocol.ResponseMetadata) error { return &MaximumItemsToCompareExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumItemsToCompareExceededException) Code() string { +func (s *MaximumItemsToCompareExceededException) Code() string { return "MaximumItemsToCompareExceededException" } // Message returns the exception's message. -func (s MaximumItemsToCompareExceededException) Message() string { +func (s *MaximumItemsToCompareExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24120,29 +24120,29 @@ func (s MaximumItemsToCompareExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumItemsToCompareExceededException) OrigErr() error { +func (s *MaximumItemsToCompareExceededException) OrigErr() error { return nil } -func (s MaximumItemsToCompareExceededException) Error() string { +func (s *MaximumItemsToCompareExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumItemsToCompareExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumItemsToCompareExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumItemsToCompareExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumItemsToCompareExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of approvals required for the approval rule exceeds the maximum // number allowed. type MaximumNumberOfApprovalsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24159,17 +24159,17 @@ func (s MaximumNumberOfApprovalsExceededException) GoString() string { func newErrorMaximumNumberOfApprovalsExceededException(v protocol.ResponseMetadata) error { return &MaximumNumberOfApprovalsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumNumberOfApprovalsExceededException) Code() string { +func (s *MaximumNumberOfApprovalsExceededException) Code() string { return "MaximumNumberOfApprovalsExceededException" } // Message returns the exception's message. -func (s MaximumNumberOfApprovalsExceededException) Message() string { +func (s *MaximumNumberOfApprovalsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24177,30 +24177,30 @@ func (s MaximumNumberOfApprovalsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumNumberOfApprovalsExceededException) OrigErr() error { +func (s *MaximumNumberOfApprovalsExceededException) OrigErr() error { return nil } -func (s MaximumNumberOfApprovalsExceededException) Error() string { +func (s *MaximumNumberOfApprovalsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumNumberOfApprovalsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumNumberOfApprovalsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumNumberOfApprovalsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumNumberOfApprovalsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot create the pull request because the repository has too many open // pull requests. The maximum number of open pull requests for a repository // is 1,000. Close one or more open pull requests, and then try again. type MaximumOpenPullRequestsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24217,17 +24217,17 @@ func (s MaximumOpenPullRequestsExceededException) GoString() string { func newErrorMaximumOpenPullRequestsExceededException(v protocol.ResponseMetadata) error { return &MaximumOpenPullRequestsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumOpenPullRequestsExceededException) Code() string { +func (s *MaximumOpenPullRequestsExceededException) Code() string { return "MaximumOpenPullRequestsExceededException" } // Message returns the exception's message. -func (s MaximumOpenPullRequestsExceededException) Message() string { +func (s *MaximumOpenPullRequestsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24235,29 +24235,29 @@ func (s MaximumOpenPullRequestsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumOpenPullRequestsExceededException) OrigErr() error { +func (s *MaximumOpenPullRequestsExceededException) OrigErr() error { return nil } -func (s MaximumOpenPullRequestsExceededException) Error() string { +func (s *MaximumOpenPullRequestsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumOpenPullRequestsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumOpenPullRequestsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumOpenPullRequestsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumOpenPullRequestsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of allowed repository names was exceeded. Currently, this // number is 100. type MaximumRepositoryNamesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24274,17 +24274,17 @@ func (s MaximumRepositoryNamesExceededException) GoString() string { func newErrorMaximumRepositoryNamesExceededException(v protocol.ResponseMetadata) error { return &MaximumRepositoryNamesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumRepositoryNamesExceededException) Code() string { +func (s *MaximumRepositoryNamesExceededException) Code() string { return "MaximumRepositoryNamesExceededException" } // Message returns the exception's message. -func (s MaximumRepositoryNamesExceededException) Message() string { +func (s *MaximumRepositoryNamesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24292,28 +24292,28 @@ func (s MaximumRepositoryNamesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumRepositoryNamesExceededException) OrigErr() error { +func (s *MaximumRepositoryNamesExceededException) OrigErr() error { return nil } -func (s MaximumRepositoryNamesExceededException) Error() string { +func (s *MaximumRepositoryNamesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumRepositoryNamesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumRepositoryNamesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumRepositoryNamesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumRepositoryNamesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of triggers allowed for the repository was exceeded. type MaximumRepositoryTriggersExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24330,17 +24330,17 @@ func (s MaximumRepositoryTriggersExceededException) GoString() string { func newErrorMaximumRepositoryTriggersExceededException(v protocol.ResponseMetadata) error { return &MaximumRepositoryTriggersExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumRepositoryTriggersExceededException) Code() string { +func (s *MaximumRepositoryTriggersExceededException) Code() string { return "MaximumRepositoryTriggersExceededException" } // Message returns the exception's message. -func (s MaximumRepositoryTriggersExceededException) Message() string { +func (s *MaximumRepositoryTriggersExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24348,29 +24348,29 @@ func (s MaximumRepositoryTriggersExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumRepositoryTriggersExceededException) OrigErr() error { +func (s *MaximumRepositoryTriggersExceededException) OrigErr() error { return nil } -func (s MaximumRepositoryTriggersExceededException) Error() string { +func (s *MaximumRepositoryTriggersExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumRepositoryTriggersExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumRepositoryTriggersExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumRepositoryTriggersExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumRepositoryTriggersExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of approval rule templates for a repository has been exceeded. // You cannot associate more than 25 approval rule templates with a repository. type MaximumRuleTemplatesAssociatedWithRepositoryException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24387,17 +24387,17 @@ func (s MaximumRuleTemplatesAssociatedWithRepositoryException) GoString() string func newErrorMaximumRuleTemplatesAssociatedWithRepositoryException(v protocol.ResponseMetadata) error { return &MaximumRuleTemplatesAssociatedWithRepositoryException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaximumRuleTemplatesAssociatedWithRepositoryException) Code() string { +func (s *MaximumRuleTemplatesAssociatedWithRepositoryException) Code() string { return "MaximumRuleTemplatesAssociatedWithRepositoryException" } // Message returns the exception's message. -func (s MaximumRuleTemplatesAssociatedWithRepositoryException) Message() string { +func (s *MaximumRuleTemplatesAssociatedWithRepositoryException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24405,22 +24405,22 @@ func (s MaximumRuleTemplatesAssociatedWithRepositoryException) Message() string } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaximumRuleTemplatesAssociatedWithRepositoryException) OrigErr() error { +func (s *MaximumRuleTemplatesAssociatedWithRepositoryException) OrigErr() error { return nil } -func (s MaximumRuleTemplatesAssociatedWithRepositoryException) Error() string { +func (s *MaximumRuleTemplatesAssociatedWithRepositoryException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaximumRuleTemplatesAssociatedWithRepositoryException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaximumRuleTemplatesAssociatedWithRepositoryException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaximumRuleTemplatesAssociatedWithRepositoryException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaximumRuleTemplatesAssociatedWithRepositoryException) RequestID() string { + return s.RespMetadata.RequestID } type MergeBranchesByFastForwardInput struct { @@ -25114,8 +25114,8 @@ func (s *MergeOperations) SetSource(v string) *MergeOperations { // A merge option or stategy is required, and none was provided. type MergeOptionRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25132,17 +25132,17 @@ func (s MergeOptionRequiredException) GoString() string { func newErrorMergeOptionRequiredException(v protocol.ResponseMetadata) error { return &MergeOptionRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MergeOptionRequiredException) Code() string { +func (s *MergeOptionRequiredException) Code() string { return "MergeOptionRequiredException" } // Message returns the exception's message. -func (s MergeOptionRequiredException) Message() string { +func (s *MergeOptionRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25150,22 +25150,22 @@ func (s MergeOptionRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MergeOptionRequiredException) OrigErr() error { +func (s *MergeOptionRequiredException) OrigErr() error { return nil } -func (s MergeOptionRequiredException) Error() string { +func (s *MergeOptionRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MergeOptionRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MergeOptionRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MergeOptionRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *MergeOptionRequiredException) RequestID() string { + return s.RespMetadata.RequestID } type MergePullRequestByFastForwardInput struct { @@ -25596,8 +25596,8 @@ func (s *MergePullRequestByThreeWayOutput) SetPullRequest(v *PullRequest) *Merge // More than one conflict resolution entries exists for the conflict. A conflict // can have only one conflict resolution entry. type MultipleConflictResolutionEntriesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25614,17 +25614,17 @@ func (s MultipleConflictResolutionEntriesException) GoString() string { func newErrorMultipleConflictResolutionEntriesException(v protocol.ResponseMetadata) error { return &MultipleConflictResolutionEntriesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MultipleConflictResolutionEntriesException) Code() string { +func (s *MultipleConflictResolutionEntriesException) Code() string { return "MultipleConflictResolutionEntriesException" } // Message returns the exception's message. -func (s MultipleConflictResolutionEntriesException) Message() string { +func (s *MultipleConflictResolutionEntriesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25632,30 +25632,30 @@ func (s MultipleConflictResolutionEntriesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MultipleConflictResolutionEntriesException) OrigErr() error { +func (s *MultipleConflictResolutionEntriesException) OrigErr() error { return nil } -func (s MultipleConflictResolutionEntriesException) Error() string { +func (s *MultipleConflictResolutionEntriesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MultipleConflictResolutionEntriesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MultipleConflictResolutionEntriesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MultipleConflictResolutionEntriesException) RequestID() string { - return s.respMetadata.RequestID +func (s *MultipleConflictResolutionEntriesException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot include more than one repository in a pull request. Make sure // you have specified only one repository name in your request, and then try // again. type MultipleRepositoriesInPullRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25672,17 +25672,17 @@ func (s MultipleRepositoriesInPullRequestException) GoString() string { func newErrorMultipleRepositoriesInPullRequestException(v protocol.ResponseMetadata) error { return &MultipleRepositoriesInPullRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MultipleRepositoriesInPullRequestException) Code() string { +func (s *MultipleRepositoriesInPullRequestException) Code() string { return "MultipleRepositoriesInPullRequestException" } // Message returns the exception's message. -func (s MultipleRepositoriesInPullRequestException) Message() string { +func (s *MultipleRepositoriesInPullRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25690,29 +25690,29 @@ func (s MultipleRepositoriesInPullRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MultipleRepositoriesInPullRequestException) OrigErr() error { +func (s *MultipleRepositoriesInPullRequestException) OrigErr() error { return nil } -func (s MultipleRepositoriesInPullRequestException) Error() string { +func (s *MultipleRepositoriesInPullRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MultipleRepositoriesInPullRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MultipleRepositoriesInPullRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MultipleRepositoriesInPullRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *MultipleRepositoriesInPullRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The user name is not valid because it has exceeded the character limit for // author names. type NameLengthExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25729,17 +25729,17 @@ func (s NameLengthExceededException) GoString() string { func newErrorNameLengthExceededException(v protocol.ResponseMetadata) error { return &NameLengthExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NameLengthExceededException) Code() string { +func (s *NameLengthExceededException) Code() string { return "NameLengthExceededException" } // Message returns the exception's message. -func (s NameLengthExceededException) Message() string { +func (s *NameLengthExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25747,29 +25747,29 @@ func (s NameLengthExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NameLengthExceededException) OrigErr() error { +func (s *NameLengthExceededException) OrigErr() error { return nil } -func (s NameLengthExceededException) Error() string { +func (s *NameLengthExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NameLengthExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NameLengthExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NameLengthExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *NameLengthExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The commit cannot be created because no changes will be made to the repository // as a result of this commit. A commit must contain at least one change. type NoChangeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25786,17 +25786,17 @@ func (s NoChangeException) GoString() string { func newErrorNoChangeException(v protocol.ResponseMetadata) error { return &NoChangeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoChangeException) Code() string { +func (s *NoChangeException) Code() string { return "NoChangeException" } // Message returns the exception's message. -func (s NoChangeException) Message() string { +func (s *NoChangeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25804,29 +25804,29 @@ func (s NoChangeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoChangeException) OrigErr() error { +func (s *NoChangeException) OrigErr() error { return nil } -func (s NoChangeException) Error() string { +func (s *NoChangeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoChangeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoChangeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoChangeException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoChangeException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of approval rule templates has been exceeded for this // AWS Region. type NumberOfRuleTemplatesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25843,17 +25843,17 @@ func (s NumberOfRuleTemplatesExceededException) GoString() string { func newErrorNumberOfRuleTemplatesExceededException(v protocol.ResponseMetadata) error { return &NumberOfRuleTemplatesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NumberOfRuleTemplatesExceededException) Code() string { +func (s *NumberOfRuleTemplatesExceededException) Code() string { return "NumberOfRuleTemplatesExceededException" } // Message returns the exception's message. -func (s NumberOfRuleTemplatesExceededException) Message() string { +func (s *NumberOfRuleTemplatesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25861,29 +25861,29 @@ func (s NumberOfRuleTemplatesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NumberOfRuleTemplatesExceededException) OrigErr() error { +func (s *NumberOfRuleTemplatesExceededException) OrigErr() error { return nil } -func (s NumberOfRuleTemplatesExceededException) Error() string { +func (s *NumberOfRuleTemplatesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NumberOfRuleTemplatesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NumberOfRuleTemplatesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NumberOfRuleTemplatesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *NumberOfRuleTemplatesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The approval rule cannot be added. The pull request has the maximum number // of approval rules associated with it. type NumberOfRulesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25900,17 +25900,17 @@ func (s NumberOfRulesExceededException) GoString() string { func newErrorNumberOfRulesExceededException(v protocol.ResponseMetadata) error { return &NumberOfRulesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NumberOfRulesExceededException) Code() string { +func (s *NumberOfRulesExceededException) Code() string { return "NumberOfRulesExceededException" } // Message returns the exception's message. -func (s NumberOfRulesExceededException) Message() string { +func (s *NumberOfRulesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25918,22 +25918,22 @@ func (s NumberOfRulesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NumberOfRulesExceededException) OrigErr() error { +func (s *NumberOfRulesExceededException) OrigErr() error { return nil } -func (s NumberOfRulesExceededException) Error() string { +func (s *NumberOfRulesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NumberOfRulesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NumberOfRulesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NumberOfRulesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *NumberOfRulesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the type of an object in a merge operation. @@ -26014,8 +26014,8 @@ func (s *OriginApprovalRuleTemplate) SetApprovalRuleTemplateName(v string) *Orig // The pull request has already had its approval rules set to override. type OverrideAlreadySetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26032,17 +26032,17 @@ func (s OverrideAlreadySetException) GoString() string { func newErrorOverrideAlreadySetException(v protocol.ResponseMetadata) error { return &OverrideAlreadySetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OverrideAlreadySetException) Code() string { +func (s *OverrideAlreadySetException) Code() string { return "OverrideAlreadySetException" } // Message returns the exception's message. -func (s OverrideAlreadySetException) Message() string { +func (s *OverrideAlreadySetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26050,22 +26050,22 @@ func (s OverrideAlreadySetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OverrideAlreadySetException) OrigErr() error { +func (s *OverrideAlreadySetException) OrigErr() error { return nil } -func (s OverrideAlreadySetException) Error() string { +func (s *OverrideAlreadySetException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OverrideAlreadySetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OverrideAlreadySetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OverrideAlreadySetException) RequestID() string { - return s.respMetadata.RequestID +func (s *OverrideAlreadySetException) RequestID() string { + return s.RespMetadata.RequestID } type OverridePullRequestApprovalRulesInput struct { @@ -26156,8 +26156,8 @@ func (s OverridePullRequestApprovalRulesOutput) GoString() string { // An override status is required, but no value was provided. Valid values include // OVERRIDE and REVOKE. type OverrideStatusRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26174,17 +26174,17 @@ func (s OverrideStatusRequiredException) GoString() string { func newErrorOverrideStatusRequiredException(v protocol.ResponseMetadata) error { return &OverrideStatusRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OverrideStatusRequiredException) Code() string { +func (s *OverrideStatusRequiredException) Code() string { return "OverrideStatusRequiredException" } // Message returns the exception's message. -func (s OverrideStatusRequiredException) Message() string { +func (s *OverrideStatusRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26192,29 +26192,29 @@ func (s OverrideStatusRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OverrideStatusRequiredException) OrigErr() error { +func (s *OverrideStatusRequiredException) OrigErr() error { return nil } -func (s OverrideStatusRequiredException) Error() string { +func (s *OverrideStatusRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OverrideStatusRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OverrideStatusRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OverrideStatusRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *OverrideStatusRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The parent commit ID is not valid because it does not exist. The specified // parent commit ID does not exist in the specified branch of the repository. type ParentCommitDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26231,17 +26231,17 @@ func (s ParentCommitDoesNotExistException) GoString() string { func newErrorParentCommitDoesNotExistException(v protocol.ResponseMetadata) error { return &ParentCommitDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParentCommitDoesNotExistException) Code() string { +func (s *ParentCommitDoesNotExistException) Code() string { return "ParentCommitDoesNotExistException" } // Message returns the exception's message. -func (s ParentCommitDoesNotExistException) Message() string { +func (s *ParentCommitDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26249,30 +26249,30 @@ func (s ParentCommitDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParentCommitDoesNotExistException) OrigErr() error { +func (s *ParentCommitDoesNotExistException) OrigErr() error { return nil } -func (s ParentCommitDoesNotExistException) Error() string { +func (s *ParentCommitDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParentCommitDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParentCommitDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParentCommitDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ParentCommitDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The file could not be added because the provided parent commit ID is not // the current tip of the specified branch. To view the full commit ID of the // current head of the branch, use GetBranch. type ParentCommitIdOutdatedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26289,17 +26289,17 @@ func (s ParentCommitIdOutdatedException) GoString() string { func newErrorParentCommitIdOutdatedException(v protocol.ResponseMetadata) error { return &ParentCommitIdOutdatedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParentCommitIdOutdatedException) Code() string { +func (s *ParentCommitIdOutdatedException) Code() string { return "ParentCommitIdOutdatedException" } // Message returns the exception's message. -func (s ParentCommitIdOutdatedException) Message() string { +func (s *ParentCommitIdOutdatedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26307,30 +26307,30 @@ func (s ParentCommitIdOutdatedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParentCommitIdOutdatedException) OrigErr() error { +func (s *ParentCommitIdOutdatedException) OrigErr() error { return nil } -func (s ParentCommitIdOutdatedException) Error() string { +func (s *ParentCommitIdOutdatedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParentCommitIdOutdatedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParentCommitIdOutdatedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParentCommitIdOutdatedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ParentCommitIdOutdatedException) RequestID() string { + return s.RespMetadata.RequestID } // A parent commit ID is required. To view the full commit ID of a branch in // a repository, use GetBranch or a Git command (for example, git pull or git // log). type ParentCommitIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26347,17 +26347,17 @@ func (s ParentCommitIdRequiredException) GoString() string { func newErrorParentCommitIdRequiredException(v protocol.ResponseMetadata) error { return &ParentCommitIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParentCommitIdRequiredException) Code() string { +func (s *ParentCommitIdRequiredException) Code() string { return "ParentCommitIdRequiredException" } // Message returns the exception's message. -func (s ParentCommitIdRequiredException) Message() string { +func (s *ParentCommitIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26365,28 +26365,28 @@ func (s ParentCommitIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParentCommitIdRequiredException) OrigErr() error { +func (s *ParentCommitIdRequiredException) OrigErr() error { return nil } -func (s ParentCommitIdRequiredException) Error() string { +func (s *ParentCommitIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParentCommitIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParentCommitIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParentCommitIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ParentCommitIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified path does not exist. type PathDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26403,17 +26403,17 @@ func (s PathDoesNotExistException) GoString() string { func newErrorPathDoesNotExistException(v protocol.ResponseMetadata) error { return &PathDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PathDoesNotExistException) Code() string { +func (s *PathDoesNotExistException) Code() string { return "PathDoesNotExistException" } // Message returns the exception's message. -func (s PathDoesNotExistException) Message() string { +func (s *PathDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26421,28 +26421,28 @@ func (s PathDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PathDoesNotExistException) OrigErr() error { +func (s *PathDoesNotExistException) OrigErr() error { return nil } -func (s PathDoesNotExistException) Error() string { +func (s *PathDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PathDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PathDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PathDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *PathDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The folderPath for a location cannot be null. type PathRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26459,17 +26459,17 @@ func (s PathRequiredException) GoString() string { func newErrorPathRequiredException(v protocol.ResponseMetadata) error { return &PathRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PathRequiredException) Code() string { +func (s *PathRequiredException) Code() string { return "PathRequiredException" } // Message returns the exception's message. -func (s PathRequiredException) Message() string { +func (s *PathRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26477,22 +26477,22 @@ func (s PathRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PathRequiredException) OrigErr() error { +func (s *PathRequiredException) OrigErr() error { return nil } -func (s PathRequiredException) Error() string { +func (s *PathRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PathRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PathRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PathRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *PathRequiredException) RequestID() string { + return s.RespMetadata.RequestID } type PostCommentForComparedCommitInput struct { @@ -27099,8 +27099,8 @@ func (s *PullRequest) SetTitle(v string) *PullRequest { // The pull request status cannot be updated because it is already closed. type PullRequestAlreadyClosedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27117,17 +27117,17 @@ func (s PullRequestAlreadyClosedException) GoString() string { func newErrorPullRequestAlreadyClosedException(v protocol.ResponseMetadata) error { return &PullRequestAlreadyClosedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PullRequestAlreadyClosedException) Code() string { +func (s *PullRequestAlreadyClosedException) Code() string { return "PullRequestAlreadyClosedException" } // Message returns the exception's message. -func (s PullRequestAlreadyClosedException) Message() string { +func (s *PullRequestAlreadyClosedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27135,29 +27135,29 @@ func (s PullRequestAlreadyClosedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PullRequestAlreadyClosedException) OrigErr() error { +func (s *PullRequestAlreadyClosedException) OrigErr() error { return nil } -func (s PullRequestAlreadyClosedException) Error() string { +func (s *PullRequestAlreadyClosedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PullRequestAlreadyClosedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PullRequestAlreadyClosedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PullRequestAlreadyClosedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PullRequestAlreadyClosedException) RequestID() string { + return s.RespMetadata.RequestID } // The pull request cannot be merged because one or more approval rules applied // to the pull request have conditions that have not been met. type PullRequestApprovalRulesNotSatisfiedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27174,17 +27174,17 @@ func (s PullRequestApprovalRulesNotSatisfiedException) GoString() string { func newErrorPullRequestApprovalRulesNotSatisfiedException(v protocol.ResponseMetadata) error { return &PullRequestApprovalRulesNotSatisfiedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PullRequestApprovalRulesNotSatisfiedException) Code() string { +func (s *PullRequestApprovalRulesNotSatisfiedException) Code() string { return "PullRequestApprovalRulesNotSatisfiedException" } // Message returns the exception's message. -func (s PullRequestApprovalRulesNotSatisfiedException) Message() string { +func (s *PullRequestApprovalRulesNotSatisfiedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27192,30 +27192,30 @@ func (s PullRequestApprovalRulesNotSatisfiedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PullRequestApprovalRulesNotSatisfiedException) OrigErr() error { +func (s *PullRequestApprovalRulesNotSatisfiedException) OrigErr() error { return nil } -func (s PullRequestApprovalRulesNotSatisfiedException) Error() string { +func (s *PullRequestApprovalRulesNotSatisfiedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PullRequestApprovalRulesNotSatisfiedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PullRequestApprovalRulesNotSatisfiedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PullRequestApprovalRulesNotSatisfiedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PullRequestApprovalRulesNotSatisfiedException) RequestID() string { + return s.RespMetadata.RequestID } // The approval cannot be applied because the user approving the pull request // matches the user who created the pull request. You cannot approve a pull // request that you created. type PullRequestCannotBeApprovedByAuthorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27232,17 +27232,17 @@ func (s PullRequestCannotBeApprovedByAuthorException) GoString() string { func newErrorPullRequestCannotBeApprovedByAuthorException(v protocol.ResponseMetadata) error { return &PullRequestCannotBeApprovedByAuthorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PullRequestCannotBeApprovedByAuthorException) Code() string { +func (s *PullRequestCannotBeApprovedByAuthorException) Code() string { return "PullRequestCannotBeApprovedByAuthorException" } // Message returns the exception's message. -func (s PullRequestCannotBeApprovedByAuthorException) Message() string { +func (s *PullRequestCannotBeApprovedByAuthorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27250,22 +27250,22 @@ func (s PullRequestCannotBeApprovedByAuthorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PullRequestCannotBeApprovedByAuthorException) OrigErr() error { +func (s *PullRequestCannotBeApprovedByAuthorException) OrigErr() error { return nil } -func (s PullRequestCannotBeApprovedByAuthorException) Error() string { +func (s *PullRequestCannotBeApprovedByAuthorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PullRequestCannotBeApprovedByAuthorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PullRequestCannotBeApprovedByAuthorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PullRequestCannotBeApprovedByAuthorException) RequestID() string { - return s.respMetadata.RequestID +func (s *PullRequestCannotBeApprovedByAuthorException) RequestID() string { + return s.RespMetadata.RequestID } // Metadata about the pull request that is used when comparing the pull request @@ -27325,8 +27325,8 @@ func (s *PullRequestCreatedEventMetadata) SetSourceCommitId(v string) *PullReque // The pull request ID could not be found. Make sure that you have specified // the correct repository name and pull request ID, and then try again. type PullRequestDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27343,17 +27343,17 @@ func (s PullRequestDoesNotExistException) GoString() string { func newErrorPullRequestDoesNotExistException(v protocol.ResponseMetadata) error { return &PullRequestDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PullRequestDoesNotExistException) Code() string { +func (s *PullRequestDoesNotExistException) Code() string { return "PullRequestDoesNotExistException" } // Message returns the exception's message. -func (s PullRequestDoesNotExistException) Message() string { +func (s *PullRequestDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27361,22 +27361,22 @@ func (s PullRequestDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PullRequestDoesNotExistException) OrigErr() error { +func (s *PullRequestDoesNotExistException) OrigErr() error { return nil } -func (s PullRequestDoesNotExistException) Error() string { +func (s *PullRequestDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PullRequestDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PullRequestDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PullRequestDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *PullRequestDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a pull request event. @@ -27498,8 +27498,8 @@ func (s *PullRequestEvent) SetPullRequestStatusChangedEventMetadata(v *PullReque // A pull request ID is required, but none was provided. type PullRequestIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27516,17 +27516,17 @@ func (s PullRequestIdRequiredException) GoString() string { func newErrorPullRequestIdRequiredException(v protocol.ResponseMetadata) error { return &PullRequestIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PullRequestIdRequiredException) Code() string { +func (s *PullRequestIdRequiredException) Code() string { return "PullRequestIdRequiredException" } // Message returns the exception's message. -func (s PullRequestIdRequiredException) Message() string { +func (s *PullRequestIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27534,22 +27534,22 @@ func (s PullRequestIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PullRequestIdRequiredException) OrigErr() error { +func (s *PullRequestIdRequiredException) OrigErr() error { return nil } -func (s PullRequestIdRequiredException) Error() string { +func (s *PullRequestIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PullRequestIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PullRequestIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PullRequestIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *PullRequestIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about the change in the merge state for a pull request @@ -27675,8 +27675,8 @@ func (s *PullRequestStatusChangedEventMetadata) SetPullRequestStatus(v string) * // A pull request status is required, but none was provided. type PullRequestStatusRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27693,17 +27693,17 @@ func (s PullRequestStatusRequiredException) GoString() string { func newErrorPullRequestStatusRequiredException(v protocol.ResponseMetadata) error { return &PullRequestStatusRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PullRequestStatusRequiredException) Code() string { +func (s *PullRequestStatusRequiredException) Code() string { return "PullRequestStatusRequiredException" } // Message returns the exception's message. -func (s PullRequestStatusRequiredException) Message() string { +func (s *PullRequestStatusRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27711,22 +27711,22 @@ func (s PullRequestStatusRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PullRequestStatusRequiredException) OrigErr() error { +func (s *PullRequestStatusRequiredException) OrigErr() error { return nil } -func (s PullRequestStatusRequiredException) Error() string { +func (s *PullRequestStatusRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PullRequestStatusRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PullRequestStatusRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PullRequestStatusRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *PullRequestStatusRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a pull request target. @@ -27893,8 +27893,8 @@ func (s *PutFileEntry) SetSourceFile(v *SourceFileSpecifier) *PutFileEntry { // The commit cannot be created because one or more files specified in the commit // reference both a file and a folder. type PutFileEntryConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27911,17 +27911,17 @@ func (s PutFileEntryConflictException) GoString() string { func newErrorPutFileEntryConflictException(v protocol.ResponseMetadata) error { return &PutFileEntryConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PutFileEntryConflictException) Code() string { +func (s *PutFileEntryConflictException) Code() string { return "PutFileEntryConflictException" } // Message returns the exception's message. -func (s PutFileEntryConflictException) Message() string { +func (s *PutFileEntryConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27929,22 +27929,22 @@ func (s PutFileEntryConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PutFileEntryConflictException) OrigErr() error { +func (s *PutFileEntryConflictException) OrigErr() error { return nil } -func (s PutFileEntryConflictException) Error() string { +func (s *PutFileEntryConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PutFileEntryConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PutFileEntryConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PutFileEntryConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *PutFileEntryConflictException) RequestID() string { + return s.RespMetadata.RequestID } type PutFileInput struct { @@ -28233,8 +28233,8 @@ func (s *PutRepositoryTriggersOutput) SetConfigurationId(v string) *PutRepositor // The specified reference does not exist. You must provide a full commit ID. type ReferenceDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28251,17 +28251,17 @@ func (s ReferenceDoesNotExistException) GoString() string { func newErrorReferenceDoesNotExistException(v protocol.ResponseMetadata) error { return &ReferenceDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReferenceDoesNotExistException) Code() string { +func (s *ReferenceDoesNotExistException) Code() string { return "ReferenceDoesNotExistException" } // Message returns the exception's message. -func (s ReferenceDoesNotExistException) Message() string { +func (s *ReferenceDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28269,28 +28269,28 @@ func (s ReferenceDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReferenceDoesNotExistException) OrigErr() error { +func (s *ReferenceDoesNotExistException) OrigErr() error { return nil } -func (s ReferenceDoesNotExistException) Error() string { +func (s *ReferenceDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReferenceDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReferenceDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReferenceDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReferenceDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // A reference name is required, but none was provided. type ReferenceNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28307,17 +28307,17 @@ func (s ReferenceNameRequiredException) GoString() string { func newErrorReferenceNameRequiredException(v protocol.ResponseMetadata) error { return &ReferenceNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReferenceNameRequiredException) Code() string { +func (s *ReferenceNameRequiredException) Code() string { return "ReferenceNameRequiredException" } // Message returns the exception's message. -func (s ReferenceNameRequiredException) Message() string { +func (s *ReferenceNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28325,28 +28325,28 @@ func (s ReferenceNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReferenceNameRequiredException) OrigErr() error { +func (s *ReferenceNameRequiredException) OrigErr() error { return nil } -func (s ReferenceNameRequiredException) Error() string { +func (s *ReferenceNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReferenceNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReferenceNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReferenceNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReferenceNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified reference is not a supported type. type ReferenceTypeNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28363,17 +28363,17 @@ func (s ReferenceTypeNotSupportedException) GoString() string { func newErrorReferenceTypeNotSupportedException(v protocol.ResponseMetadata) error { return &ReferenceTypeNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReferenceTypeNotSupportedException) Code() string { +func (s *ReferenceTypeNotSupportedException) Code() string { return "ReferenceTypeNotSupportedException" } // Message returns the exception's message. -func (s ReferenceTypeNotSupportedException) Message() string { +func (s *ReferenceTypeNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28381,22 +28381,22 @@ func (s ReferenceTypeNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReferenceTypeNotSupportedException) OrigErr() error { +func (s *ReferenceTypeNotSupportedException) OrigErr() error { return nil } -func (s ReferenceTypeNotSupportedException) Error() string { +func (s *ReferenceTypeNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReferenceTypeNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReferenceTypeNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReferenceTypeNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReferenceTypeNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a replacement content entry in the conflict of a merge @@ -28475,8 +28475,8 @@ func (s *ReplaceContentEntry) SetReplacementType(v string) *ReplaceContentEntry // USE_NEW_CONTENT was specified, but no replacement content has been provided. type ReplacementContentRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28493,17 +28493,17 @@ func (s ReplacementContentRequiredException) GoString() string { func newErrorReplacementContentRequiredException(v protocol.ResponseMetadata) error { return &ReplacementContentRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReplacementContentRequiredException) Code() string { +func (s *ReplacementContentRequiredException) Code() string { return "ReplacementContentRequiredException" } // Message returns the exception's message. -func (s ReplacementContentRequiredException) Message() string { +func (s *ReplacementContentRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28511,28 +28511,28 @@ func (s ReplacementContentRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReplacementContentRequiredException) OrigErr() error { +func (s *ReplacementContentRequiredException) OrigErr() error { return nil } -func (s ReplacementContentRequiredException) Error() string { +func (s *ReplacementContentRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReplacementContentRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReplacementContentRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReplacementContentRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReplacementContentRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // A replacement type is required. type ReplacementTypeRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28549,17 +28549,17 @@ func (s ReplacementTypeRequiredException) GoString() string { func newErrorReplacementTypeRequiredException(v protocol.ResponseMetadata) error { return &ReplacementTypeRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReplacementTypeRequiredException) Code() string { +func (s *ReplacementTypeRequiredException) Code() string { return "ReplacementTypeRequiredException" } // Message returns the exception's message. -func (s ReplacementTypeRequiredException) Message() string { +func (s *ReplacementTypeRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28567,28 +28567,28 @@ func (s ReplacementTypeRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReplacementTypeRequiredException) OrigErr() error { +func (s *ReplacementTypeRequiredException) OrigErr() error { return nil } -func (s ReplacementTypeRequiredException) Error() string { +func (s *ReplacementTypeRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReplacementTypeRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReplacementTypeRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReplacementTypeRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReplacementTypeRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified repository does not exist. type RepositoryDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28605,17 +28605,17 @@ func (s RepositoryDoesNotExistException) GoString() string { func newErrorRepositoryDoesNotExistException(v protocol.ResponseMetadata) error { return &RepositoryDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryDoesNotExistException) Code() string { +func (s *RepositoryDoesNotExistException) Code() string { return "RepositoryDoesNotExistException" } // Message returns the exception's message. -func (s RepositoryDoesNotExistException) Message() string { +func (s *RepositoryDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28623,28 +28623,28 @@ func (s RepositoryDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryDoesNotExistException) OrigErr() error { +func (s *RepositoryDoesNotExistException) OrigErr() error { return nil } -func (s RepositoryDoesNotExistException) Error() string { +func (s *RepositoryDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // A repository resource limit was exceeded. type RepositoryLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28661,17 +28661,17 @@ func (s RepositoryLimitExceededException) GoString() string { func newErrorRepositoryLimitExceededException(v protocol.ResponseMetadata) error { return &RepositoryLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryLimitExceededException) Code() string { +func (s *RepositoryLimitExceededException) Code() string { return "RepositoryLimitExceededException" } // Message returns the exception's message. -func (s RepositoryLimitExceededException) Message() string { +func (s *RepositoryLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28679,22 +28679,22 @@ func (s RepositoryLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryLimitExceededException) OrigErr() error { +func (s *RepositoryLimitExceededException) OrigErr() error { return nil } -func (s RepositoryLimitExceededException) Error() string { +func (s *RepositoryLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a repository. @@ -28804,8 +28804,8 @@ func (s *RepositoryMetadata) SetRepositoryName(v string) *RepositoryMetadata { // The specified repository name already exists. type RepositoryNameExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28822,17 +28822,17 @@ func (s RepositoryNameExistsException) GoString() string { func newErrorRepositoryNameExistsException(v protocol.ResponseMetadata) error { return &RepositoryNameExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryNameExistsException) Code() string { +func (s *RepositoryNameExistsException) Code() string { return "RepositoryNameExistsException" } // Message returns the exception's message. -func (s RepositoryNameExistsException) Message() string { +func (s *RepositoryNameExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28840,22 +28840,22 @@ func (s RepositoryNameExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryNameExistsException) OrigErr() error { +func (s *RepositoryNameExistsException) OrigErr() error { return nil } -func (s RepositoryNameExistsException) Error() string { +func (s *RepositoryNameExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryNameExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryNameExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryNameExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryNameExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a repository name and ID. @@ -28893,8 +28893,8 @@ func (s *RepositoryNameIdPair) SetRepositoryName(v string) *RepositoryNameIdPair // A repository name is required, but was not specified. type RepositoryNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28911,17 +28911,17 @@ func (s RepositoryNameRequiredException) GoString() string { func newErrorRepositoryNameRequiredException(v protocol.ResponseMetadata) error { return &RepositoryNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryNameRequiredException) Code() string { +func (s *RepositoryNameRequiredException) Code() string { return "RepositoryNameRequiredException" } // Message returns the exception's message. -func (s RepositoryNameRequiredException) Message() string { +func (s *RepositoryNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28929,28 +28929,28 @@ func (s RepositoryNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryNameRequiredException) OrigErr() error { +func (s *RepositoryNameRequiredException) OrigErr() error { return nil } -func (s RepositoryNameRequiredException) Error() string { +func (s *RepositoryNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // At least one repository name object is required, but was not specified. type RepositoryNamesRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28967,17 +28967,17 @@ func (s RepositoryNamesRequiredException) GoString() string { func newErrorRepositoryNamesRequiredException(v protocol.ResponseMetadata) error { return &RepositoryNamesRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryNamesRequiredException) Code() string { +func (s *RepositoryNamesRequiredException) Code() string { return "RepositoryNamesRequiredException" } // Message returns the exception's message. -func (s RepositoryNamesRequiredException) Message() string { +func (s *RepositoryNamesRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28985,30 +28985,30 @@ func (s RepositoryNamesRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryNamesRequiredException) OrigErr() error { +func (s *RepositoryNamesRequiredException) OrigErr() error { return nil } -func (s RepositoryNamesRequiredException) Error() string { +func (s *RepositoryNamesRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryNamesRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryNamesRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryNamesRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryNamesRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The repository does not contain any pull requests with that pull request // ID. Use GetPullRequest to verify the correct repository name for the pull // request ID. type RepositoryNotAssociatedWithPullRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29025,17 +29025,17 @@ func (s RepositoryNotAssociatedWithPullRequestException) GoString() string { func newErrorRepositoryNotAssociatedWithPullRequestException(v protocol.ResponseMetadata) error { return &RepositoryNotAssociatedWithPullRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryNotAssociatedWithPullRequestException) Code() string { +func (s *RepositoryNotAssociatedWithPullRequestException) Code() string { return "RepositoryNotAssociatedWithPullRequestException" } // Message returns the exception's message. -func (s RepositoryNotAssociatedWithPullRequestException) Message() string { +func (s *RepositoryNotAssociatedWithPullRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29043,22 +29043,22 @@ func (s RepositoryNotAssociatedWithPullRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryNotAssociatedWithPullRequestException) OrigErr() error { +func (s *RepositoryNotAssociatedWithPullRequestException) OrigErr() error { return nil } -func (s RepositoryNotAssociatedWithPullRequestException) Error() string { +func (s *RepositoryNotAssociatedWithPullRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryNotAssociatedWithPullRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryNotAssociatedWithPullRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryNotAssociatedWithPullRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryNotAssociatedWithPullRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a trigger for a repository. @@ -29158,8 +29158,8 @@ func (s *RepositoryTrigger) SetName(v string) *RepositoryTrigger { // At least one branch name is required, but was not specified in the trigger // configuration. type RepositoryTriggerBranchNameListRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29176,17 +29176,17 @@ func (s RepositoryTriggerBranchNameListRequiredException) GoString() string { func newErrorRepositoryTriggerBranchNameListRequiredException(v protocol.ResponseMetadata) error { return &RepositoryTriggerBranchNameListRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryTriggerBranchNameListRequiredException) Code() string { +func (s *RepositoryTriggerBranchNameListRequiredException) Code() string { return "RepositoryTriggerBranchNameListRequiredException" } // Message returns the exception's message. -func (s RepositoryTriggerBranchNameListRequiredException) Message() string { +func (s *RepositoryTriggerBranchNameListRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29194,29 +29194,29 @@ func (s RepositoryTriggerBranchNameListRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryTriggerBranchNameListRequiredException) OrigErr() error { +func (s *RepositoryTriggerBranchNameListRequiredException) OrigErr() error { return nil } -func (s RepositoryTriggerBranchNameListRequiredException) Error() string { +func (s *RepositoryTriggerBranchNameListRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryTriggerBranchNameListRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryTriggerBranchNameListRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryTriggerBranchNameListRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryTriggerBranchNameListRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // A destination ARN for the target service for the trigger is required, but // was not specified. type RepositoryTriggerDestinationArnRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29233,17 +29233,17 @@ func (s RepositoryTriggerDestinationArnRequiredException) GoString() string { func newErrorRepositoryTriggerDestinationArnRequiredException(v protocol.ResponseMetadata) error { return &RepositoryTriggerDestinationArnRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryTriggerDestinationArnRequiredException) Code() string { +func (s *RepositoryTriggerDestinationArnRequiredException) Code() string { return "RepositoryTriggerDestinationArnRequiredException" } // Message returns the exception's message. -func (s RepositoryTriggerDestinationArnRequiredException) Message() string { +func (s *RepositoryTriggerDestinationArnRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29251,28 +29251,28 @@ func (s RepositoryTriggerDestinationArnRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryTriggerDestinationArnRequiredException) OrigErr() error { +func (s *RepositoryTriggerDestinationArnRequiredException) OrigErr() error { return nil } -func (s RepositoryTriggerDestinationArnRequiredException) Error() string { +func (s *RepositoryTriggerDestinationArnRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryTriggerDestinationArnRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryTriggerDestinationArnRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryTriggerDestinationArnRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryTriggerDestinationArnRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // At least one event for the trigger is required, but was not specified. type RepositoryTriggerEventsListRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29289,17 +29289,17 @@ func (s RepositoryTriggerEventsListRequiredException) GoString() string { func newErrorRepositoryTriggerEventsListRequiredException(v protocol.ResponseMetadata) error { return &RepositoryTriggerEventsListRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryTriggerEventsListRequiredException) Code() string { +func (s *RepositoryTriggerEventsListRequiredException) Code() string { return "RepositoryTriggerEventsListRequiredException" } // Message returns the exception's message. -func (s RepositoryTriggerEventsListRequiredException) Message() string { +func (s *RepositoryTriggerEventsListRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29307,22 +29307,22 @@ func (s RepositoryTriggerEventsListRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryTriggerEventsListRequiredException) OrigErr() error { +func (s *RepositoryTriggerEventsListRequiredException) OrigErr() error { return nil } -func (s RepositoryTriggerEventsListRequiredException) Error() string { +func (s *RepositoryTriggerEventsListRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryTriggerEventsListRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryTriggerEventsListRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryTriggerEventsListRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryTriggerEventsListRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // A trigger failed to run. @@ -29360,8 +29360,8 @@ func (s *RepositoryTriggerExecutionFailure) SetTrigger(v string) *RepositoryTrig // A name for the trigger is required, but was not specified. type RepositoryTriggerNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29378,17 +29378,17 @@ func (s RepositoryTriggerNameRequiredException) GoString() string { func newErrorRepositoryTriggerNameRequiredException(v protocol.ResponseMetadata) error { return &RepositoryTriggerNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryTriggerNameRequiredException) Code() string { +func (s *RepositoryTriggerNameRequiredException) Code() string { return "RepositoryTriggerNameRequiredException" } // Message returns the exception's message. -func (s RepositoryTriggerNameRequiredException) Message() string { +func (s *RepositoryTriggerNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29396,28 +29396,28 @@ func (s RepositoryTriggerNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryTriggerNameRequiredException) OrigErr() error { +func (s *RepositoryTriggerNameRequiredException) OrigErr() error { return nil } -func (s RepositoryTriggerNameRequiredException) Error() string { +func (s *RepositoryTriggerNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryTriggerNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryTriggerNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryTriggerNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryTriggerNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The list of triggers for the repository is required, but was not specified. type RepositoryTriggersListRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29434,17 +29434,17 @@ func (s RepositoryTriggersListRequiredException) GoString() string { func newErrorRepositoryTriggersListRequiredException(v protocol.ResponseMetadata) error { return &RepositoryTriggersListRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryTriggersListRequiredException) Code() string { +func (s *RepositoryTriggersListRequiredException) Code() string { return "RepositoryTriggersListRequiredException" } // Message returns the exception's message. -func (s RepositoryTriggersListRequiredException) Message() string { +func (s *RepositoryTriggersListRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29452,22 +29452,22 @@ func (s RepositoryTriggersListRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryTriggersListRequiredException) OrigErr() error { +func (s *RepositoryTriggersListRequiredException) OrigErr() error { return nil } -func (s RepositoryTriggersListRequiredException) Error() string { +func (s *RepositoryTriggersListRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryTriggersListRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryTriggersListRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryTriggersListRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryTriggersListRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // A valid Amazon Resource Name (ARN) for an AWS CodeCommit resource is required. @@ -29475,8 +29475,8 @@ func (s RepositoryTriggersListRequiredException) RequestID() string { // and Operations (https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats) // in the AWS CodeCommit User Guide. type ResourceArnRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29493,17 +29493,17 @@ func (s ResourceArnRequiredException) GoString() string { func newErrorResourceArnRequiredException(v protocol.ResponseMetadata) error { return &ResourceArnRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceArnRequiredException) Code() string { +func (s *ResourceArnRequiredException) Code() string { return "ResourceArnRequiredException" } // Message returns the exception's message. -func (s ResourceArnRequiredException) Message() string { +func (s *ResourceArnRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29511,29 +29511,29 @@ func (s ResourceArnRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceArnRequiredException) OrigErr() error { +func (s *ResourceArnRequiredException) OrigErr() error { return nil } -func (s ResourceArnRequiredException) Error() string { +func (s *ResourceArnRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceArnRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceArnRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceArnRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceArnRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The commit cannot be created because one of the changes specifies copying // or moving a .gitkeep file. type RestrictedSourceFileException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29550,17 +29550,17 @@ func (s RestrictedSourceFileException) GoString() string { func newErrorRestrictedSourceFileException(v protocol.ResponseMetadata) error { return &RestrictedSourceFileException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RestrictedSourceFileException) Code() string { +func (s *RestrictedSourceFileException) Code() string { return "RestrictedSourceFileException" } // Message returns the exception's message. -func (s RestrictedSourceFileException) Message() string { +func (s *RestrictedSourceFileException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29568,28 +29568,28 @@ func (s RestrictedSourceFileException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RestrictedSourceFileException) OrigErr() error { +func (s *RestrictedSourceFileException) OrigErr() error { return nil } -func (s RestrictedSourceFileException) Error() string { +func (s *RestrictedSourceFileException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RestrictedSourceFileException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RestrictedSourceFileException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RestrictedSourceFileException) RequestID() string { - return s.respMetadata.RequestID +func (s *RestrictedSourceFileException) RequestID() string { + return s.RespMetadata.RequestID } // A revision ID is required, but was not provided. type RevisionIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29606,17 +29606,17 @@ func (s RevisionIdRequiredException) GoString() string { func newErrorRevisionIdRequiredException(v protocol.ResponseMetadata) error { return &RevisionIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RevisionIdRequiredException) Code() string { +func (s *RevisionIdRequiredException) Code() string { return "RevisionIdRequiredException" } // Message returns the exception's message. -func (s RevisionIdRequiredException) Message() string { +func (s *RevisionIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29624,29 +29624,29 @@ func (s RevisionIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RevisionIdRequiredException) OrigErr() error { +func (s *RevisionIdRequiredException) OrigErr() error { return nil } -func (s RevisionIdRequiredException) Error() string { +func (s *RevisionIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RevisionIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RevisionIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RevisionIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RevisionIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The revision ID provided in the request does not match the current revision // ID. Use GetPullRequest to retrieve the current revision ID. type RevisionNotCurrentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29663,17 +29663,17 @@ func (s RevisionNotCurrentException) GoString() string { func newErrorRevisionNotCurrentException(v protocol.ResponseMetadata) error { return &RevisionNotCurrentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RevisionNotCurrentException) Code() string { +func (s *RevisionNotCurrentException) Code() string { return "RevisionNotCurrentException" } // Message returns the exception's message. -func (s RevisionNotCurrentException) Message() string { +func (s *RevisionNotCurrentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29681,30 +29681,30 @@ func (s RevisionNotCurrentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RevisionNotCurrentException) OrigErr() error { +func (s *RevisionNotCurrentException) OrigErr() error { return nil } -func (s RevisionNotCurrentException) Error() string { +func (s *RevisionNotCurrentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RevisionNotCurrentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RevisionNotCurrentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RevisionNotCurrentException) RequestID() string { - return s.respMetadata.RequestID +func (s *RevisionNotCurrentException) RequestID() string { + return s.RespMetadata.RequestID } // The file was not added or updated because the content of the file is exactly // the same as the content of that file in the repository and branch that you // specified. type SameFileContentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29721,17 +29721,17 @@ func (s SameFileContentException) GoString() string { func newErrorSameFileContentException(v protocol.ResponseMetadata) error { return &SameFileContentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SameFileContentException) Code() string { +func (s *SameFileContentException) Code() string { return "SameFileContentException" } // Message returns the exception's message. -func (s SameFileContentException) Message() string { +func (s *SameFileContentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29739,22 +29739,22 @@ func (s SameFileContentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SameFileContentException) OrigErr() error { +func (s *SameFileContentException) OrigErr() error { return nil } -func (s SameFileContentException) Error() string { +func (s *SameFileContentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SameFileContentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SameFileContentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SameFileContentException) RequestID() string { - return s.respMetadata.RequestID +func (s *SameFileContentException) RequestID() string { + return s.RespMetadata.RequestID } // The commit cannot be created because one or more changes in this commit duplicate @@ -29762,8 +29762,8 @@ func (s SameFileContentException) RequestID() string { // request to the same file in the same file path twice, or make a delete request // and a move request to the same file as part of the same commit. type SamePathRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29780,17 +29780,17 @@ func (s SamePathRequestException) GoString() string { func newErrorSamePathRequestException(v protocol.ResponseMetadata) error { return &SamePathRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SamePathRequestException) Code() string { +func (s *SamePathRequestException) Code() string { return "SamePathRequestException" } // Message returns the exception's message. -func (s SamePathRequestException) Message() string { +func (s *SamePathRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29798,22 +29798,22 @@ func (s SamePathRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SamePathRequestException) OrigErr() error { +func (s *SamePathRequestException) OrigErr() error { return nil } -func (s SamePathRequestException) Error() string { +func (s *SamePathRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SamePathRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SamePathRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SamePathRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *SamePathRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the file mode changes. @@ -29872,8 +29872,8 @@ func (s *SetFileModeEntry) SetFilePath(v string) *SetFileModeEntry { // The source branch and destination branch for the pull request are the same. // You must specify different branches for the source and destination. type SourceAndDestinationAreSameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29890,17 +29890,17 @@ func (s SourceAndDestinationAreSameException) GoString() string { func newErrorSourceAndDestinationAreSameException(v protocol.ResponseMetadata) error { return &SourceAndDestinationAreSameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SourceAndDestinationAreSameException) Code() string { +func (s *SourceAndDestinationAreSameException) Code() string { return "SourceAndDestinationAreSameException" } // Message returns the exception's message. -func (s SourceAndDestinationAreSameException) Message() string { +func (s *SourceAndDestinationAreSameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29908,29 +29908,29 @@ func (s SourceAndDestinationAreSameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SourceAndDestinationAreSameException) OrigErr() error { +func (s *SourceAndDestinationAreSameException) OrigErr() error { return nil } -func (s SourceAndDestinationAreSameException) Error() string { +func (s *SourceAndDestinationAreSameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SourceAndDestinationAreSameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SourceAndDestinationAreSameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SourceAndDestinationAreSameException) RequestID() string { - return s.respMetadata.RequestID +func (s *SourceAndDestinationAreSameException) RequestID() string { + return s.RespMetadata.RequestID } // The commit cannot be created because no source files or file content have // been specified for the commit. type SourceFileOrContentRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29947,17 +29947,17 @@ func (s SourceFileOrContentRequiredException) GoString() string { func newErrorSourceFileOrContentRequiredException(v protocol.ResponseMetadata) error { return &SourceFileOrContentRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SourceFileOrContentRequiredException) Code() string { +func (s *SourceFileOrContentRequiredException) Code() string { return "SourceFileOrContentRequiredException" } // Message returns the exception's message. -func (s SourceFileOrContentRequiredException) Message() string { +func (s *SourceFileOrContentRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29965,22 +29965,22 @@ func (s SourceFileOrContentRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SourceFileOrContentRequiredException) OrigErr() error { +func (s *SourceFileOrContentRequiredException) OrigErr() error { return nil } -func (s SourceFileOrContentRequiredException) Error() string { +func (s *SourceFileOrContentRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SourceFileOrContentRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SourceFileOrContentRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SourceFileOrContentRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *SourceFileOrContentRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a source file that is part of changes made in a commit. @@ -30128,8 +30128,8 @@ func (s *SymbolicLink) SetRelativePath(v string) *SymbolicLink { // A list of tag keys is required. The list cannot be empty or null. type TagKeysListRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30146,17 +30146,17 @@ func (s TagKeysListRequiredException) GoString() string { func newErrorTagKeysListRequiredException(v protocol.ResponseMetadata) error { return &TagKeysListRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagKeysListRequiredException) Code() string { +func (s *TagKeysListRequiredException) Code() string { return "TagKeysListRequiredException" } // Message returns the exception's message. -func (s TagKeysListRequiredException) Message() string { +func (s *TagKeysListRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30164,28 +30164,28 @@ func (s TagKeysListRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagKeysListRequiredException) OrigErr() error { +func (s *TagKeysListRequiredException) OrigErr() error { return nil } -func (s TagKeysListRequiredException) Error() string { +func (s *TagKeysListRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagKeysListRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagKeysListRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagKeysListRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagKeysListRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The tag policy is not valid. type TagPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30202,17 +30202,17 @@ func (s TagPolicyException) GoString() string { func newErrorTagPolicyException(v protocol.ResponseMetadata) error { return &TagPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagPolicyException) Code() string { +func (s *TagPolicyException) Code() string { return "TagPolicyException" } // Message returns the exception's message. -func (s TagPolicyException) Message() string { +func (s *TagPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30220,22 +30220,22 @@ func (s TagPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagPolicyException) OrigErr() error { +func (s *TagPolicyException) OrigErr() error { return nil } -func (s TagPolicyException) Error() string { +func (s *TagPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagPolicyException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -30307,8 +30307,8 @@ func (s TagResourceOutput) GoString() string { // A map of tags is required. type TagsMapRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30325,17 +30325,17 @@ func (s TagsMapRequiredException) GoString() string { func newErrorTagsMapRequiredException(v protocol.ResponseMetadata) error { return &TagsMapRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagsMapRequiredException) Code() string { +func (s *TagsMapRequiredException) Code() string { return "TagsMapRequiredException" } // Message returns the exception's message. -func (s TagsMapRequiredException) Message() string { +func (s *TagsMapRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30343,22 +30343,22 @@ func (s TagsMapRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagsMapRequiredException) OrigErr() error { +func (s *TagsMapRequiredException) OrigErr() error { return nil } -func (s TagsMapRequiredException) Error() string { +func (s *TagsMapRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagsMapRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagsMapRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagsMapRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagsMapRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about a target for a pull request. @@ -30432,8 +30432,8 @@ func (s *Target) SetSourceReference(v string) *Target { // target must contain the full values for the repository name, source branch, // and destination branch for the pull request. type TargetRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30450,17 +30450,17 @@ func (s TargetRequiredException) GoString() string { func newErrorTargetRequiredException(v protocol.ResponseMetadata) error { return &TargetRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TargetRequiredException) Code() string { +func (s *TargetRequiredException) Code() string { return "TargetRequiredException" } // Message returns the exception's message. -func (s TargetRequiredException) Message() string { +func (s *TargetRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30468,28 +30468,28 @@ func (s TargetRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TargetRequiredException) OrigErr() error { +func (s *TargetRequiredException) OrigErr() error { return nil } -func (s TargetRequiredException) Error() string { +func (s *TargetRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TargetRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TargetRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TargetRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *TargetRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // An array of target objects is required. It cannot be empty or null. type TargetsRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30506,17 +30506,17 @@ func (s TargetsRequiredException) GoString() string { func newErrorTargetsRequiredException(v protocol.ResponseMetadata) error { return &TargetsRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TargetsRequiredException) Code() string { +func (s *TargetsRequiredException) Code() string { return "TargetsRequiredException" } // Message returns the exception's message. -func (s TargetsRequiredException) Message() string { +func (s *TargetsRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30524,22 +30524,22 @@ func (s TargetsRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TargetsRequiredException) OrigErr() error { +func (s *TargetsRequiredException) OrigErr() error { return nil } -func (s TargetsRequiredException) Error() string { +func (s *TargetsRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TargetsRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TargetsRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TargetsRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *TargetsRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a test repository triggers operation. @@ -30647,8 +30647,8 @@ func (s *TestRepositoryTriggersOutput) SetSuccessfulExecutions(v []*string) *Tes // the tip of the source branch specified in your request. The pull request // might have been updated. Make sure that you have the latest changes. type TipOfSourceReferenceIsDifferentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30665,17 +30665,17 @@ func (s TipOfSourceReferenceIsDifferentException) GoString() string { func newErrorTipOfSourceReferenceIsDifferentException(v protocol.ResponseMetadata) error { return &TipOfSourceReferenceIsDifferentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TipOfSourceReferenceIsDifferentException) Code() string { +func (s *TipOfSourceReferenceIsDifferentException) Code() string { return "TipOfSourceReferenceIsDifferentException" } // Message returns the exception's message. -func (s TipOfSourceReferenceIsDifferentException) Message() string { +func (s *TipOfSourceReferenceIsDifferentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30683,30 +30683,30 @@ func (s TipOfSourceReferenceIsDifferentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TipOfSourceReferenceIsDifferentException) OrigErr() error { +func (s *TipOfSourceReferenceIsDifferentException) OrigErr() error { return nil } -func (s TipOfSourceReferenceIsDifferentException) Error() string { +func (s *TipOfSourceReferenceIsDifferentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TipOfSourceReferenceIsDifferentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TipOfSourceReferenceIsDifferentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TipOfSourceReferenceIsDifferentException) RequestID() string { - return s.respMetadata.RequestID +func (s *TipOfSourceReferenceIsDifferentException) RequestID() string { + return s.RespMetadata.RequestID } // The divergence between the tips of the provided commit specifiers is too // great to determine whether there might be any merge conflicts. Locally compare // the specifiers using git diff or a diff tool. type TipsDivergenceExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30723,17 +30723,17 @@ func (s TipsDivergenceExceededException) GoString() string { func newErrorTipsDivergenceExceededException(v protocol.ResponseMetadata) error { return &TipsDivergenceExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TipsDivergenceExceededException) Code() string { +func (s *TipsDivergenceExceededException) Code() string { return "TipsDivergenceExceededException" } // Message returns the exception's message. -func (s TipsDivergenceExceededException) Message() string { +func (s *TipsDivergenceExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30741,28 +30741,28 @@ func (s TipsDivergenceExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TipsDivergenceExceededException) OrigErr() error { +func (s *TipsDivergenceExceededException) OrigErr() error { return nil } -func (s TipsDivergenceExceededException) Error() string { +func (s *TipsDivergenceExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TipsDivergenceExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TipsDivergenceExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TipsDivergenceExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TipsDivergenceExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A pull request title is required. It cannot be empty or null. type TitleRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30779,17 +30779,17 @@ func (s TitleRequiredException) GoString() string { func newErrorTitleRequiredException(v protocol.ResponseMetadata) error { return &TitleRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TitleRequiredException) Code() string { +func (s *TitleRequiredException) Code() string { return "TitleRequiredException" } // Message returns the exception's message. -func (s TitleRequiredException) Message() string { +func (s *TitleRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30797,28 +30797,28 @@ func (s TitleRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TitleRequiredException) OrigErr() error { +func (s *TitleRequiredException) OrigErr() error { return nil } -func (s TitleRequiredException) Error() string { +func (s *TitleRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TitleRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TitleRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TitleRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *TitleRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of tags for an AWS CodeCommit resource has been exceeded. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30835,17 +30835,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30853,22 +30853,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 16e57401deb..13b9566952d 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 @@ -252,7 +252,7 @@ func (c *CodeDeploy) BatchGetApplicationsRequest(input *BatchGetApplicationsInpu // BatchGetApplications API operation for AWS CodeDeploy. // // Gets information about one or more applications. The maximum number of applications -// that can be returned is 25. +// that can be returned is 100. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -477,7 +477,8 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // The maximum number of names or IDs allowed for this request (100) was exceeded. // // * InvalidComputePlatformException -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentInstances // @@ -554,7 +555,8 @@ func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentT // BatchGetDeploymentInstances. The maximum number of targets that can be returned // is 25. // -// The type of targets returned depends on the deployment's compute platform: +// The type of targets returned depends on the deployment's compute platform +// or deployment method: // // * EC2/On-premises: Information about EC2 instance targets. // @@ -562,6 +564,9 @@ func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentT // // * Amazon ECS: Information about Amazon ECS service targets. // +// * CloudFormation: Information about targets of blue/green deployments +// initiated by a CloudFormation stack update. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -597,6 +602,9 @@ func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentT // must have exactly one item. This exception does not apply to EC2/On-premises // deployments. // +// * InstanceDoesNotExistException +// The specified instance does not exist in the deployment group. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentTargets func (c *CodeDeploy) BatchGetDeploymentTargets(input *BatchGetDeploymentTargetsInput) (*BatchGetDeploymentTargetsOutput, error) { req, out := c.BatchGetDeploymentTargetsRequest(input) @@ -965,7 +973,8 @@ func (c *CodeDeploy) CreateApplicationRequest(input *CreateApplicationInput) (re // More applications were attempted to be created than are allowed. // // * InvalidComputePlatformException -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. // // * InvalidTagsToAddException // The specified tags are not valid. @@ -1133,6 +1142,10 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // * InvalidGitHubAccountTokenException // The GitHub token is not valid. // +// * InvalidTrafficRoutingConfigurationException +// The configuration that specifies how traffic is routed during a deployment +// is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeployment func (c *CodeDeploy) CreateDeployment(input *CreateDeploymentInput) (*CreateDeploymentOutput, error) { req, out := c.CreateDeploymentRequest(input) @@ -1217,7 +1230,7 @@ func (c *CodeDeploy) CreateDeploymentConfigRequest(input *CreateDeploymentConfig // // * DeploymentConfigAlreadyExistsException // A deployment configuration with the specified name with the IAM user or AWS -// account already exists . +// account already exists. // // * InvalidMinimumHealthyHostValueException // The minimum healthy instance value was specified in an invalid format. @@ -1226,7 +1239,8 @@ func (c *CodeDeploy) CreateDeploymentConfigRequest(input *CreateDeploymentConfig // The deployment configurations limit was exceeded. // // * InvalidComputePlatformException -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. // // * InvalidTrafficRoutingConfigurationException // The configuration that specifies how traffic is routed during a deployment @@ -1427,6 +1441,10 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // * InvalidTagsToAddException // The specified tags are not valid. // +// * InvalidTrafficRoutingConfigurationException +// The configuration that specifies how traffic is routed during a deployment +// is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentGroup func (c *CodeDeploy) CreateDeploymentGroup(input *CreateDeploymentGroupInput) (*CreateDeploymentGroupOutput, error) { req, out := c.CreateDeploymentGroupRequest(input) @@ -1813,6 +1831,81 @@ func (c *CodeDeploy) DeleteGitHubAccountTokenWithContext(ctx aws.Context, input return out, req.Send() } +const opDeleteResourcesByExternalId = "DeleteResourcesByExternalId" + +// DeleteResourcesByExternalIdRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcesByExternalId operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourcesByExternalId for more information on using the DeleteResourcesByExternalId +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourcesByExternalIdRequest method. +// req, resp := client.DeleteResourcesByExternalIdRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteResourcesByExternalId +func (c *CodeDeploy) DeleteResourcesByExternalIdRequest(input *DeleteResourcesByExternalIdInput) (req *request.Request, output *DeleteResourcesByExternalIdOutput) { + op := &request.Operation{ + Name: opDeleteResourcesByExternalId, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResourcesByExternalIdInput{} + } + + output = &DeleteResourcesByExternalIdOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteResourcesByExternalId API operation for AWS CodeDeploy. +// +// Deletes resources linked to an external ID. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeDeploy's +// API operation DeleteResourcesByExternalId for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteResourcesByExternalId +func (c *CodeDeploy) DeleteResourcesByExternalId(input *DeleteResourcesByExternalIdInput) (*DeleteResourcesByExternalIdOutput, error) { + req, out := c.DeleteResourcesByExternalIdRequest(input) + return out, req.Send() +} + +// DeleteResourcesByExternalIdWithContext is the same as DeleteResourcesByExternalId with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcesByExternalId for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeDeploy) DeleteResourcesByExternalIdWithContext(ctx aws.Context, input *DeleteResourcesByExternalIdInput, opts ...request.Option) (*DeleteResourcesByExternalIdOutput, error) { + req, out := c.DeleteResourcesByExternalIdRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeregisterOnPremisesInstance = "DeregisterOnPremisesInstance" // DeregisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the @@ -2229,7 +2322,8 @@ func (c *CodeDeploy) GetDeploymentConfigRequest(input *GetDeploymentConfigInput) // The deployment configuration does not exist with the IAM user or AWS account. // // * InvalidComputePlatformException -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentConfig func (c *CodeDeploy) GetDeploymentConfig(input *GetDeploymentConfigInput) (*GetDeploymentConfigOutput, error) { @@ -2428,7 +2522,8 @@ func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceIn // The on-premises instance name was specified in an invalid format. // // * InvalidComputePlatformException -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentInstance // @@ -3328,7 +3423,8 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // The target filter name is invalid. // // * InvalidComputePlatformException -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentInstances // @@ -3603,6 +3699,12 @@ func (c *CodeDeploy) ListDeploymentsRequest(input *ListDeploymentsInput) (req *r // * InvalidNextTokenException // The next token was specified in an invalid format. // +// * InvalidExternalIdException +// The external ID was specified in an invalid format. +// +// * InvalidInputException +// The input was specified in an invalid format. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeployments func (c *CodeDeploy) ListDeployments(input *ListDeploymentsInput) (*ListDeploymentsOutput, error) { req, out := c.ListDeploymentsRequest(input) @@ -3895,8 +3997,9 @@ func (c *CodeDeploy) ListTagsForResourceRequest(input *ListTagsForResourceInput) // ListTagsForResource API operation for AWS CodeDeploy. // -// Returns a list of tags for the resource identified by a specified ARN. Tags -// are used to organize and categorize your CodeDeploy resources. +// Returns a list of tags for the resource identified by a specified Amazon +// Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy +// resources. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3982,9 +4085,15 @@ func (c *CodeDeploy) PutLifecycleEventHookExecutionStatusRequest(input *PutLifec // PutLifecycleEventHookExecutionStatus API operation for AWS CodeDeploy. // -// Sets the result of a Lambda validation function. The function validates one -// or both lifecycle events (BeforeAllowTraffic and AfterAllowTraffic) and returns -// Succeeded or Failed. +// Sets the result of a Lambda validation function. The function validates lifecycle +// hooks during a deployment that uses the AWS Lambda or Amazon ECS compute +// platform. For AWS Lambda deployments, the available lifecycle hooks are BeforeAllowTraffic +// and AfterAllowTraffic. For Amazon ECS deployments, the available lifecycle +// hooks are BeforeInstall, AfterInstall, AfterAllowTestTraffic, BeforeAllowTraffic, +// and AfterAllowTraffic. Lambda validation functions return Succeeded or Failed. +// For more information, see AppSpec 'hooks' Section for an AWS Lambda Deployment +// (https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda) +// and AppSpec 'hooks' Section for an Amazon ECS Deployment (https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4520,6 +4629,9 @@ func (c *CodeDeploy) StopDeploymentRequest(input *StopDeploymentInput) (req *req // * InvalidDeploymentIdException // At least one of the deployment IDs was specified in an invalid format. // +// * UnsupportedActionForDeploymentTypeException +// A call was submitted that is not supported for the specified deployment type. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/StopDeployment func (c *CodeDeploy) StopDeployment(input *StopDeploymentInput) (*StopDeploymentOutput, error) { req, out := c.StopDeploymentRequest(input) @@ -4691,7 +4803,7 @@ func (c *CodeDeploy) UntagResourceRequest(input *UntagResourceInput) (req *reque // UntagResource API operation for AWS CodeDeploy. // // Disassociates a resource from a list of tags. The resource is identified -// by the ResourceArn input parameter. The tags are identfied by the list of +// by the ResourceArn input parameter. The tags are identified by the list of // keys in the TagKeys input parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5006,6 +5118,10 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // The Amazon ECS service is associated with more than one deployment groups. // An Amazon ECS service can be associated with only one deployment group. // +// * InvalidTrafficRoutingConfigurationException +// The configuration that specifies how traffic is routed during a deployment +// is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateDeploymentGroup func (c *CodeDeploy) UpdateDeploymentGroup(input *UpdateDeploymentGroupInput) (*UpdateDeploymentGroupOutput, error) { req, out := c.UpdateDeploymentGroupRequest(input) @@ -5176,8 +5292,8 @@ func (s *AlarmConfiguration) SetIgnorePollAlarmFailure(v bool) *AlarmConfigurati // The maximum number of alarms for a deployment group (10) was exceeded. type AlarmsLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5194,17 +5310,17 @@ func (s AlarmsLimitExceededException) GoString() string { func newErrorAlarmsLimitExceededException(v protocol.ResponseMetadata) error { return &AlarmsLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlarmsLimitExceededException) Code() string { +func (s *AlarmsLimitExceededException) Code() string { return "AlarmsLimitExceededException" } // Message returns the exception's message. -func (s AlarmsLimitExceededException) Message() string { +func (s *AlarmsLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5212,22 +5328,22 @@ func (s AlarmsLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlarmsLimitExceededException) OrigErr() error { +func (s *AlarmsLimitExceededException) OrigErr() error { return nil } -func (s AlarmsLimitExceededException) Error() string { +func (s *AlarmsLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AlarmsLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlarmsLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlarmsLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlarmsLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A revision for an AWS Lambda or Amazon ECS deployment that is a YAML-formatted @@ -5280,8 +5396,8 @@ func (s *AppSpecContent) SetSha256(v string) *AppSpecContent { // An application with the specified name with the IAM user or AWS account already // exists. type ApplicationAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5298,17 +5414,17 @@ func (s ApplicationAlreadyExistsException) GoString() string { func newErrorApplicationAlreadyExistsException(v protocol.ResponseMetadata) error { return &ApplicationAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApplicationAlreadyExistsException) Code() string { +func (s *ApplicationAlreadyExistsException) Code() string { return "ApplicationAlreadyExistsException" } // Message returns the exception's message. -func (s ApplicationAlreadyExistsException) Message() string { +func (s *ApplicationAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5316,28 +5432,28 @@ func (s ApplicationAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApplicationAlreadyExistsException) OrigErr() error { +func (s *ApplicationAlreadyExistsException) OrigErr() error { return nil } -func (s ApplicationAlreadyExistsException) Error() string { +func (s *ApplicationAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApplicationAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApplicationAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApplicationAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApplicationAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The application does not exist with the IAM user or AWS account. type ApplicationDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5354,17 +5470,17 @@ func (s ApplicationDoesNotExistException) GoString() string { func newErrorApplicationDoesNotExistException(v protocol.ResponseMetadata) error { return &ApplicationDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApplicationDoesNotExistException) Code() string { +func (s *ApplicationDoesNotExistException) Code() string { return "ApplicationDoesNotExistException" } // Message returns the exception's message. -func (s ApplicationDoesNotExistException) Message() string { +func (s *ApplicationDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5372,22 +5488,22 @@ func (s ApplicationDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApplicationDoesNotExistException) OrigErr() error { +func (s *ApplicationDoesNotExistException) OrigErr() error { return nil } -func (s ApplicationDoesNotExistException) Error() string { +func (s *ApplicationDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApplicationDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApplicationDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApplicationDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApplicationDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Information about an application. @@ -5463,8 +5579,8 @@ func (s *ApplicationInfo) SetLinkedToGitHub(v bool) *ApplicationInfo { // More applications were attempted to be created than are allowed. type ApplicationLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5481,17 +5597,17 @@ func (s ApplicationLimitExceededException) GoString() string { func newErrorApplicationLimitExceededException(v protocol.ResponseMetadata) error { return &ApplicationLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApplicationLimitExceededException) Code() string { +func (s *ApplicationLimitExceededException) Code() string { return "ApplicationLimitExceededException" } // Message returns the exception's message. -func (s ApplicationLimitExceededException) Message() string { +func (s *ApplicationLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5499,28 +5615,28 @@ func (s ApplicationLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApplicationLimitExceededException) OrigErr() error { +func (s *ApplicationLimitExceededException) OrigErr() error { return nil } -func (s ApplicationLimitExceededException) Error() string { +func (s *ApplicationLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApplicationLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApplicationLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApplicationLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApplicationLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The minimum number of required application names was not specified. type ApplicationNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5537,17 +5653,17 @@ func (s ApplicationNameRequiredException) GoString() string { func newErrorApplicationNameRequiredException(v protocol.ResponseMetadata) error { return &ApplicationNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApplicationNameRequiredException) Code() string { +func (s *ApplicationNameRequiredException) Code() string { return "ApplicationNameRequiredException" } // Message returns the exception's message. -func (s ApplicationNameRequiredException) Message() string { +func (s *ApplicationNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5555,29 +5671,29 @@ func (s ApplicationNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApplicationNameRequiredException) OrigErr() error { +func (s *ApplicationNameRequiredException) OrigErr() error { return nil } -func (s ApplicationNameRequiredException) Error() string { +func (s *ApplicationNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApplicationNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApplicationNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApplicationNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApplicationNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified ARN is not supported. For example, it might be an ARN for a // resource that is not expected. type ArnNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5594,17 +5710,17 @@ func (s ArnNotSupportedException) GoString() string { func newErrorArnNotSupportedException(v protocol.ResponseMetadata) error { return &ArnNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ArnNotSupportedException) Code() string { +func (s *ArnNotSupportedException) Code() string { return "ArnNotSupportedException" } // Message returns the exception's message. -func (s ArnNotSupportedException) Message() string { +func (s *ArnNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5612,22 +5728,22 @@ func (s ArnNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ArnNotSupportedException) OrigErr() error { +func (s *ArnNotSupportedException) OrigErr() error { return nil } -func (s ArnNotSupportedException) Error() string { +func (s *ArnNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ArnNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ArnNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ArnNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ArnNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a configuration for automatically rolling back to a previous @@ -5803,7 +5919,7 @@ type BatchGetApplicationsInput struct { _ struct{} `type:"structure"` // A list of application names separated by spaces. The maximum number of application - // names you can specify is 25. + // names you can specify is 100. // // ApplicationNames is a required field ApplicationNames []*string `locationName:"applicationNames" type:"list" required:"true"` @@ -6058,6 +6174,9 @@ type BatchGetDeploymentTargetsInput struct { // * For deployments that use the Amazon ECS compute platform, the target // IDs are pairs of Amazon ECS clusters and services specified using the // format :. Their target type is ecsTarget. + // + // * For deployments that are deployed with AWS CloudFormation, the target + // IDs are CloudFormation stack IDs. Their target type is cloudFormationTarget. TargetIds []*string `locationName:"targetIds" type:"list"` } @@ -6096,6 +6215,9 @@ type BatchGetDeploymentTargetsOutput struct { // function. // // * Amazon ECS: The target object is an Amazon ECS service. + // + // * CloudFormation: The target object is an AWS CloudFormation blue/green + // deployment. DeploymentTargets []*DeploymentTarget `locationName:"deploymentTargets" type:"list"` } @@ -6245,8 +6367,8 @@ func (s *BatchGetOnPremisesInstancesOutput) SetInstanceInfos(v []*InstanceInfo) // The maximum number of names or IDs allowed for this request (100) was exceeded. type BatchLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6263,17 +6385,17 @@ func (s BatchLimitExceededException) GoString() string { func newErrorBatchLimitExceededException(v protocol.ResponseMetadata) error { return &BatchLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BatchLimitExceededException) Code() string { +func (s *BatchLimitExceededException) Code() string { return "BatchLimitExceededException" } // Message returns the exception's message. -func (s BatchLimitExceededException) Message() string { +func (s *BatchLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6281,22 +6403,22 @@ func (s BatchLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BatchLimitExceededException) OrigErr() error { +func (s *BatchLimitExceededException) OrigErr() error { return nil } -func (s BatchLimitExceededException) Error() string { +func (s *BatchLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BatchLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BatchLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BatchLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *BatchLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about blue/green deployment options for a deployment group. @@ -6394,8 +6516,8 @@ func (s *BlueInstanceTerminationOption) SetTerminationWaitTimeInMinutes(v int64) // A bucket name is required, but was not provided. type BucketNameFilterRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6412,17 +6534,17 @@ func (s BucketNameFilterRequiredException) GoString() string { func newErrorBucketNameFilterRequiredException(v protocol.ResponseMetadata) error { return &BucketNameFilterRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BucketNameFilterRequiredException) Code() string { +func (s *BucketNameFilterRequiredException) Code() string { return "BucketNameFilterRequiredException" } // Message returns the exception's message. -func (s BucketNameFilterRequiredException) Message() string { +func (s *BucketNameFilterRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6430,22 +6552,105 @@ func (s BucketNameFilterRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BucketNameFilterRequiredException) OrigErr() error { +func (s *BucketNameFilterRequiredException) OrigErr() error { return nil } -func (s BucketNameFilterRequiredException) Error() string { +func (s *BucketNameFilterRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BucketNameFilterRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BucketNameFilterRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BucketNameFilterRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *BucketNameFilterRequiredException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Information about the target to be updated by an AWS CloudFormation blue/green +// deployment. This target type is used for all deployments initiated by a CloudFormation +// stack update. +type CloudFormationTarget struct { + _ struct{} `type:"structure"` + + // The unique ID of an AWS CloudFormation blue/green deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The date and time when the target application was updated by an AWS CloudFormation + // blue/green deployment. + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` + + // The lifecycle events of the AWS CloudFormation blue/green deployment to this + // target application. + LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` + + // The resource type for the AWS CloudFormation blue/green deployment. + ResourceType *string `locationName:"resourceType" type:"string"` + + // The status of an AWS CloudFormation blue/green deployment's target application. + Status *string `locationName:"status" type:"string" enum:"TargetStatus"` + + // The unique ID of a deployment target that has a type of CloudFormationTarget. + TargetId *string `locationName:"targetId" type:"string"` + + // The percentage of production traffic that the target version of an AWS CloudFormation + // blue/green deployment receives. + TargetVersionWeight *float64 `locationName:"targetVersionWeight" type:"double"` +} + +// String returns the string representation +func (s CloudFormationTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudFormationTarget) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *CloudFormationTarget) SetDeploymentId(v string) *CloudFormationTarget { + s.DeploymentId = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *CloudFormationTarget) SetLastUpdatedAt(v time.Time) *CloudFormationTarget { + s.LastUpdatedAt = &v + return s +} + +// SetLifecycleEvents sets the LifecycleEvents field's value. +func (s *CloudFormationTarget) SetLifecycleEvents(v []*LifecycleEvent) *CloudFormationTarget { + s.LifecycleEvents = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *CloudFormationTarget) SetResourceType(v string) *CloudFormationTarget { + s.ResourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CloudFormationTarget) SetStatus(v string) *CloudFormationTarget { + s.Status = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *CloudFormationTarget) SetTargetId(v string) *CloudFormationTarget { + s.TargetId = &v + return s +} + +// SetTargetVersionWeight sets the TargetVersionWeight field's value. +func (s *CloudFormationTarget) SetTargetVersionWeight(v float64) *CloudFormationTarget { + s.TargetVersionWeight = &v + return s } type ContinueDeploymentInput struct { @@ -6455,9 +6660,9 @@ type ContinueDeploymentInput struct { // traffic to the replacement environment. DeploymentId *string `locationName:"deploymentId" type:"string"` - // The status of the deployment's waiting period. READY_WAIT indicates the deployment - // is ready to start shifting traffic. TERMINATION_WAIT indicates the traffic - // is shifted, but the original target is not terminated. + // The status of the deployment's waiting period. READY_WAIT indicates that + // the deployment is ready to start shifting traffic. TERMINATION_WAIT indicates + // that the traffic is shifted, but the original target is not terminated. DeploymentWaitType *string `locationName:"deploymentWaitType" type:"string" enum:"DeploymentWaitType"` } @@ -6608,7 +6813,7 @@ type CreateDeploymentConfigInput struct { // * FLEET_PERCENT: The value parameter represents the minimum number of // healthy instances as a percentage of the total number of instances in // the deployment. If you specify FLEET_PERCENT, at the start of the deployment, - // AWS CodeDeploy converts the percentage to the equivalent number of instance + // AWS CodeDeploy converts the percentage to the equivalent number of instances // and rounds up fractional instances. // // The value parameter takes an integer. @@ -6729,7 +6934,7 @@ type CreateDeploymentGroupInput struct { // group. // // For more information about the predefined deployment configurations in AWS - // CodeDeploy, see Working with Deployment Groups in AWS CodeDeploy (https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html) + // CodeDeploy, see Working with Deployment Configurations in CodeDeploy (https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html) // in the AWS CodeDeploy User Guide. DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` @@ -6771,8 +6976,8 @@ type CreateDeploymentGroupInput struct { // Cannot be used in the same call as onPremisesInstanceTagFilters. OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` - // A service role ARN that allows AWS CodeDeploy to act on the user's behalf - // when interacting with AWS services. + // A service role Amazon Resource Name (ARN) that allows AWS CodeDeploy to act + // on the user's behalf when interacting with AWS services. // // ServiceRoleArn is a required field ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string" required:"true"` @@ -7400,10 +7605,48 @@ func (s *DeleteGitHubAccountTokenOutput) SetTokenName(v string) *DeleteGitHubAcc return s } +type DeleteResourcesByExternalIdInput struct { + _ struct{} `type:"structure"` + + // The unique ID of an external resource (for example, a CloudFormation stack + // ID) that is linked to one or more CodeDeploy resources. + ExternalId *string `locationName:"externalId" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcesByExternalIdInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcesByExternalIdInput) GoString() string { + return s.String() +} + +// SetExternalId sets the ExternalId field's value. +func (s *DeleteResourcesByExternalIdInput) SetExternalId(v string) *DeleteResourcesByExternalIdInput { + s.ExternalId = &v + return s +} + +type DeleteResourcesByExternalIdOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteResourcesByExternalIdOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcesByExternalIdOutput) GoString() string { + return s.String() +} + // The deployment is already complete. type DeploymentAlreadyCompletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7420,17 +7663,17 @@ func (s DeploymentAlreadyCompletedException) GoString() string { func newErrorDeploymentAlreadyCompletedException(v protocol.ResponseMetadata) error { return &DeploymentAlreadyCompletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentAlreadyCompletedException) Code() string { +func (s *DeploymentAlreadyCompletedException) Code() string { return "DeploymentAlreadyCompletedException" } // Message returns the exception's message. -func (s DeploymentAlreadyCompletedException) Message() string { +func (s *DeploymentAlreadyCompletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7438,29 +7681,29 @@ func (s DeploymentAlreadyCompletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentAlreadyCompletedException) OrigErr() error { +func (s *DeploymentAlreadyCompletedException) OrigErr() error { return nil } -func (s DeploymentAlreadyCompletedException) Error() string { +func (s *DeploymentAlreadyCompletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentAlreadyCompletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentAlreadyCompletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentAlreadyCompletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentAlreadyCompletedException) RequestID() string { + return s.RespMetadata.RequestID } // A deployment configuration with the specified name with the IAM user or AWS -// account already exists . +// account already exists. type DeploymentConfigAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7477,17 +7720,17 @@ func (s DeploymentConfigAlreadyExistsException) GoString() string { func newErrorDeploymentConfigAlreadyExistsException(v protocol.ResponseMetadata) error { return &DeploymentConfigAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentConfigAlreadyExistsException) Code() string { +func (s *DeploymentConfigAlreadyExistsException) Code() string { return "DeploymentConfigAlreadyExistsException" } // Message returns the exception's message. -func (s DeploymentConfigAlreadyExistsException) Message() string { +func (s *DeploymentConfigAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7495,28 +7738,28 @@ func (s DeploymentConfigAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentConfigAlreadyExistsException) OrigErr() error { +func (s *DeploymentConfigAlreadyExistsException) OrigErr() error { return nil } -func (s DeploymentConfigAlreadyExistsException) Error() string { +func (s *DeploymentConfigAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentConfigAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentConfigAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentConfigAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentConfigAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment configuration does not exist with the IAM user or AWS account. type DeploymentConfigDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7533,17 +7776,17 @@ func (s DeploymentConfigDoesNotExistException) GoString() string { func newErrorDeploymentConfigDoesNotExistException(v protocol.ResponseMetadata) error { return &DeploymentConfigDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentConfigDoesNotExistException) Code() string { +func (s *DeploymentConfigDoesNotExistException) Code() string { return "DeploymentConfigDoesNotExistException" } // Message returns the exception's message. -func (s DeploymentConfigDoesNotExistException) Message() string { +func (s *DeploymentConfigDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7551,28 +7794,28 @@ func (s DeploymentConfigDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentConfigDoesNotExistException) OrigErr() error { +func (s *DeploymentConfigDoesNotExistException) OrigErr() error { return nil } -func (s DeploymentConfigDoesNotExistException) Error() string { +func (s *DeploymentConfigDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentConfigDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentConfigDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentConfigDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentConfigDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment configuration is still in use. type DeploymentConfigInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7589,17 +7832,17 @@ func (s DeploymentConfigInUseException) GoString() string { func newErrorDeploymentConfigInUseException(v protocol.ResponseMetadata) error { return &DeploymentConfigInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentConfigInUseException) Code() string { +func (s *DeploymentConfigInUseException) Code() string { return "DeploymentConfigInUseException" } // Message returns the exception's message. -func (s DeploymentConfigInUseException) Message() string { +func (s *DeploymentConfigInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7607,22 +7850,22 @@ func (s DeploymentConfigInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentConfigInUseException) OrigErr() error { +func (s *DeploymentConfigInUseException) OrigErr() error { return nil } -func (s DeploymentConfigInUseException) Error() string { +func (s *DeploymentConfigInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentConfigInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentConfigInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentConfigInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentConfigInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a deployment configuration. @@ -7644,8 +7887,8 @@ type DeploymentConfigInfo struct { // Information about the number or percentage of minimum healthy instance. MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - // The configuration that specifies how the deployment traffic is routed. Only - // deployments with a Lambda compute platform can specify this. + // The configuration that specifies how the deployment traffic is routed. Used + // for deployments with a Lambda or ECS compute platform only. TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` } @@ -7697,8 +7940,8 @@ func (s *DeploymentConfigInfo) SetTrafficRoutingConfig(v *TrafficRoutingConfig) // The deployment configurations limit was exceeded. type DeploymentConfigLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7715,17 +7958,17 @@ func (s DeploymentConfigLimitExceededException) GoString() string { func newErrorDeploymentConfigLimitExceededException(v protocol.ResponseMetadata) error { return &DeploymentConfigLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentConfigLimitExceededException) Code() string { +func (s *DeploymentConfigLimitExceededException) Code() string { return "DeploymentConfigLimitExceededException" } // Message returns the exception's message. -func (s DeploymentConfigLimitExceededException) Message() string { +func (s *DeploymentConfigLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7733,28 +7976,28 @@ func (s DeploymentConfigLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentConfigLimitExceededException) OrigErr() error { +func (s *DeploymentConfigLimitExceededException) OrigErr() error { return nil } -func (s DeploymentConfigLimitExceededException) Error() string { +func (s *DeploymentConfigLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentConfigLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentConfigLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentConfigLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentConfigLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment configuration name was not specified. type DeploymentConfigNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7771,17 +8014,17 @@ func (s DeploymentConfigNameRequiredException) GoString() string { func newErrorDeploymentConfigNameRequiredException(v protocol.ResponseMetadata) error { return &DeploymentConfigNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentConfigNameRequiredException) Code() string { +func (s *DeploymentConfigNameRequiredException) Code() string { return "DeploymentConfigNameRequiredException" } // Message returns the exception's message. -func (s DeploymentConfigNameRequiredException) Message() string { +func (s *DeploymentConfigNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7789,28 +8032,28 @@ func (s DeploymentConfigNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentConfigNameRequiredException) OrigErr() error { +func (s *DeploymentConfigNameRequiredException) OrigErr() error { return nil } -func (s DeploymentConfigNameRequiredException) Error() string { +func (s *DeploymentConfigNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentConfigNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentConfigNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentConfigNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentConfigNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment with the IAM user or AWS account does not exist. type DeploymentDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7827,17 +8070,17 @@ func (s DeploymentDoesNotExistException) GoString() string { func newErrorDeploymentDoesNotExistException(v protocol.ResponseMetadata) error { return &DeploymentDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentDoesNotExistException) Code() string { +func (s *DeploymentDoesNotExistException) Code() string { return "DeploymentDoesNotExistException" } // Message returns the exception's message. -func (s DeploymentDoesNotExistException) Message() string { +func (s *DeploymentDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7845,29 +8088,29 @@ func (s DeploymentDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentDoesNotExistException) OrigErr() error { +func (s *DeploymentDoesNotExistException) OrigErr() error { return nil } -func (s DeploymentDoesNotExistException) Error() string { +func (s *DeploymentDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // A deployment group with the specified name with the IAM user or AWS account // already exists. type DeploymentGroupAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7884,17 +8127,17 @@ func (s DeploymentGroupAlreadyExistsException) GoString() string { func newErrorDeploymentGroupAlreadyExistsException(v protocol.ResponseMetadata) error { return &DeploymentGroupAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentGroupAlreadyExistsException) Code() string { +func (s *DeploymentGroupAlreadyExistsException) Code() string { return "DeploymentGroupAlreadyExistsException" } // Message returns the exception's message. -func (s DeploymentGroupAlreadyExistsException) Message() string { +func (s *DeploymentGroupAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7902,28 +8145,28 @@ func (s DeploymentGroupAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentGroupAlreadyExistsException) OrigErr() error { +func (s *DeploymentGroupAlreadyExistsException) OrigErr() error { return nil } -func (s DeploymentGroupAlreadyExistsException) Error() string { +func (s *DeploymentGroupAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentGroupAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentGroupAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentGroupAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentGroupAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The named deployment group with the IAM user or AWS account does not exist. type DeploymentGroupDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7940,17 +8183,17 @@ func (s DeploymentGroupDoesNotExistException) GoString() string { func newErrorDeploymentGroupDoesNotExistException(v protocol.ResponseMetadata) error { return &DeploymentGroupDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentGroupDoesNotExistException) Code() string { +func (s *DeploymentGroupDoesNotExistException) Code() string { return "DeploymentGroupDoesNotExistException" } // Message returns the exception's message. -func (s DeploymentGroupDoesNotExistException) Message() string { +func (s *DeploymentGroupDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7958,22 +8201,22 @@ func (s DeploymentGroupDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentGroupDoesNotExistException) OrigErr() error { +func (s *DeploymentGroupDoesNotExistException) OrigErr() error { return nil } -func (s DeploymentGroupDoesNotExistException) Error() string { +func (s *DeploymentGroupDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentGroupDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentGroupDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentGroupDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentGroupDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a deployment group. @@ -8199,8 +8442,8 @@ func (s *DeploymentGroupInfo) SetTriggerConfigurations(v []*TriggerConfig) *Depl // The deployment groups limit was exceeded. type DeploymentGroupLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8217,17 +8460,17 @@ func (s DeploymentGroupLimitExceededException) GoString() string { func newErrorDeploymentGroupLimitExceededException(v protocol.ResponseMetadata) error { return &DeploymentGroupLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentGroupLimitExceededException) Code() string { +func (s *DeploymentGroupLimitExceededException) Code() string { return "DeploymentGroupLimitExceededException" } // Message returns the exception's message. -func (s DeploymentGroupLimitExceededException) Message() string { +func (s *DeploymentGroupLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8235,28 +8478,28 @@ func (s DeploymentGroupLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentGroupLimitExceededException) OrigErr() error { +func (s *DeploymentGroupLimitExceededException) OrigErr() error { return nil } -func (s DeploymentGroupLimitExceededException) Error() string { +func (s *DeploymentGroupLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentGroupLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentGroupLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentGroupLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentGroupLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment group name was not specified. type DeploymentGroupNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8273,17 +8516,17 @@ func (s DeploymentGroupNameRequiredException) GoString() string { func newErrorDeploymentGroupNameRequiredException(v protocol.ResponseMetadata) error { return &DeploymentGroupNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentGroupNameRequiredException) Code() string { +func (s *DeploymentGroupNameRequiredException) Code() string { return "DeploymentGroupNameRequiredException" } // Message returns the exception's message. -func (s DeploymentGroupNameRequiredException) Message() string { +func (s *DeploymentGroupNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8291,28 +8534,28 @@ func (s DeploymentGroupNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentGroupNameRequiredException) OrigErr() error { +func (s *DeploymentGroupNameRequiredException) OrigErr() error { return nil } -func (s DeploymentGroupNameRequiredException) Error() string { +func (s *DeploymentGroupNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentGroupNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentGroupNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentGroupNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentGroupNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // At least one deployment ID must be specified. type DeploymentIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8329,17 +8572,17 @@ func (s DeploymentIdRequiredException) GoString() string { func newErrorDeploymentIdRequiredException(v protocol.ResponseMetadata) error { return &DeploymentIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentIdRequiredException) Code() string { +func (s *DeploymentIdRequiredException) Code() string { return "DeploymentIdRequiredException" } // Message returns the exception's message. -func (s DeploymentIdRequiredException) Message() string { +func (s *DeploymentIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8347,22 +8590,22 @@ func (s DeploymentIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentIdRequiredException) OrigErr() error { +func (s *DeploymentIdRequiredException) OrigErr() error { return nil } -func (s DeploymentIdRequiredException) Error() string { +func (s *DeploymentIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a deployment. @@ -8426,6 +8669,10 @@ type DeploymentInfo struct { // Information about any error associated with this deployment. ErrorInformation *ErrorInformation `locationName:"errorInformation" type:"structure"` + // The unique ID for an external resource (for example, a CloudFormation stack + // ID) that is linked to this deployment. + ExternalId *string `locationName:"externalId" type:"string"` + // Information about how AWS CodeDeploy handles files that already exist in // a deployment target location but weren't part of the previous successful // deployment. @@ -8611,6 +8858,12 @@ func (s *DeploymentInfo) SetErrorInformation(v *ErrorInformation) *DeploymentInf return s } +// SetExternalId sets the ExternalId field's value. +func (s *DeploymentInfo) SetExternalId(v string) *DeploymentInfo { + s.ExternalId = &v + return s +} + // SetFileExistsBehavior sets the FileExistsBehavior field's value. func (s *DeploymentInfo) SetFileExistsBehavior(v string) *DeploymentInfo { s.FileExistsBehavior = &v @@ -8679,8 +8932,8 @@ func (s *DeploymentInfo) SetUpdateOutdatedInstancesOnly(v bool) *DeploymentInfo // The deployment does not have a status of Ready and can't continue yet. type DeploymentIsNotInReadyStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8697,17 +8950,17 @@ func (s DeploymentIsNotInReadyStateException) GoString() string { func newErrorDeploymentIsNotInReadyStateException(v protocol.ResponseMetadata) error { return &DeploymentIsNotInReadyStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentIsNotInReadyStateException) Code() string { +func (s *DeploymentIsNotInReadyStateException) Code() string { return "DeploymentIsNotInReadyStateException" } // Message returns the exception's message. -func (s DeploymentIsNotInReadyStateException) Message() string { +func (s *DeploymentIsNotInReadyStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8715,28 +8968,28 @@ func (s DeploymentIsNotInReadyStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentIsNotInReadyStateException) OrigErr() error { +func (s *DeploymentIsNotInReadyStateException) OrigErr() error { return nil } -func (s DeploymentIsNotInReadyStateException) Error() string { +func (s *DeploymentIsNotInReadyStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentIsNotInReadyStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentIsNotInReadyStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentIsNotInReadyStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentIsNotInReadyStateException) RequestID() string { + return s.RespMetadata.RequestID } // The number of allowed deployments was exceeded. type DeploymentLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8753,17 +9006,17 @@ func (s DeploymentLimitExceededException) GoString() string { func newErrorDeploymentLimitExceededException(v protocol.ResponseMetadata) error { return &DeploymentLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentLimitExceededException) Code() string { +func (s *DeploymentLimitExceededException) Code() string { return "DeploymentLimitExceededException" } // Message returns the exception's message. -func (s DeploymentLimitExceededException) Message() string { +func (s *DeploymentLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8771,28 +9024,28 @@ func (s DeploymentLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentLimitExceededException) OrigErr() error { +func (s *DeploymentLimitExceededException) OrigErr() error { return nil } -func (s DeploymentLimitExceededException) Error() string { +func (s *DeploymentLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified deployment has not started. type DeploymentNotStartedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8809,17 +9062,17 @@ func (s DeploymentNotStartedException) GoString() string { func newErrorDeploymentNotStartedException(v protocol.ResponseMetadata) error { return &DeploymentNotStartedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentNotStartedException) Code() string { +func (s *DeploymentNotStartedException) Code() string { return "DeploymentNotStartedException" } // Message returns the exception's message. -func (s DeploymentNotStartedException) Message() string { +func (s *DeploymentNotStartedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8827,22 +9080,22 @@ func (s DeploymentNotStartedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentNotStartedException) OrigErr() error { +func (s *DeploymentNotStartedException) OrigErr() error { return nil } -func (s DeploymentNotStartedException) Error() string { +func (s *DeploymentNotStartedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentNotStartedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentNotStartedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentNotStartedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentNotStartedException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the deployment status of the instances in the deployment. @@ -8936,7 +9189,7 @@ type DeploymentReadyOption struct { // The number of minutes to wait before the status of a blue/green deployment // is changed to Stopped if rerouting is not started manually. Applies only - // to the STOP_DEPLOYMENT option for actionOnTimeout + // to the STOP_DEPLOYMENT option for actionOnTimeout. WaitTimeInMinutes *int64 `locationName:"waitTimeInMinutes" type:"integer"` } @@ -9000,7 +9253,13 @@ func (s *DeploymentStyle) SetDeploymentType(v string) *DeploymentStyle { type DeploymentTarget struct { _ struct{} `type:"structure"` - // The deployment type that is specific to the deployment's compute platform. + // Information about the target to be updated by an AWS CloudFormation blue/green + // deployment. This target type is used for all deployments initiated by a CloudFormation + // stack update. + CloudFormationTarget *CloudFormationTarget `locationName:"cloudFormationTarget" type:"structure"` + + // The deployment type that is specific to the deployment's compute platform + // or deployments initiated by a CloudFormation stack update. DeploymentTargetType *string `locationName:"deploymentTargetType" type:"string" enum:"DeploymentTargetType"` // Information about the target for a deployment that uses the Amazon ECS compute @@ -9026,6 +9285,12 @@ func (s DeploymentTarget) GoString() string { return s.String() } +// SetCloudFormationTarget sets the CloudFormationTarget field's value. +func (s *DeploymentTarget) SetCloudFormationTarget(v *CloudFormationTarget) *DeploymentTarget { + s.CloudFormationTarget = v + return s +} + // SetDeploymentTargetType sets the DeploymentTargetType field's value. func (s *DeploymentTarget) SetDeploymentTargetType(v string) *DeploymentTarget { s.DeploymentTargetType = &v @@ -9052,8 +9317,8 @@ func (s *DeploymentTarget) SetLambdaTarget(v *LambdaTarget) *DeploymentTarget { // The provided target ID does not belong to the attempted deployment. type DeploymentTargetDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9070,17 +9335,17 @@ func (s DeploymentTargetDoesNotExistException) GoString() string { func newErrorDeploymentTargetDoesNotExistException(v protocol.ResponseMetadata) error { return &DeploymentTargetDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentTargetDoesNotExistException) Code() string { +func (s *DeploymentTargetDoesNotExistException) Code() string { return "DeploymentTargetDoesNotExistException" } // Message returns the exception's message. -func (s DeploymentTargetDoesNotExistException) Message() string { +func (s *DeploymentTargetDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9088,28 +9353,28 @@ func (s DeploymentTargetDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentTargetDoesNotExistException) OrigErr() error { +func (s *DeploymentTargetDoesNotExistException) OrigErr() error { return nil } -func (s DeploymentTargetDoesNotExistException) Error() string { +func (s *DeploymentTargetDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentTargetDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentTargetDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentTargetDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentTargetDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // A deployment target ID was not provided. type DeploymentTargetIdRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9126,17 +9391,17 @@ func (s DeploymentTargetIdRequiredException) GoString() string { func newErrorDeploymentTargetIdRequiredException(v protocol.ResponseMetadata) error { return &DeploymentTargetIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentTargetIdRequiredException) Code() string { +func (s *DeploymentTargetIdRequiredException) Code() string { return "DeploymentTargetIdRequiredException" } // Message returns the exception's message. -func (s DeploymentTargetIdRequiredException) Message() string { +func (s *DeploymentTargetIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9144,22 +9409,22 @@ func (s DeploymentTargetIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentTargetIdRequiredException) OrigErr() error { +func (s *DeploymentTargetIdRequiredException) OrigErr() error { return nil } -func (s DeploymentTargetIdRequiredException) Error() string { +func (s *DeploymentTargetIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentTargetIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentTargetIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentTargetIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentTargetIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of targets that can be associated with an Amazon ECS or @@ -9167,8 +9432,8 @@ func (s DeploymentTargetIdRequiredException) RequestID() string { // must have exactly one item. This exception does not apply to EC2/On-premises // deployments. type DeploymentTargetListSizeExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9185,17 +9450,17 @@ func (s DeploymentTargetListSizeExceededException) GoString() string { func newErrorDeploymentTargetListSizeExceededException(v protocol.ResponseMetadata) error { return &DeploymentTargetListSizeExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeploymentTargetListSizeExceededException) Code() string { +func (s *DeploymentTargetListSizeExceededException) Code() string { return "DeploymentTargetListSizeExceededException" } // Message returns the exception's message. -func (s DeploymentTargetListSizeExceededException) Message() string { +func (s *DeploymentTargetListSizeExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9203,22 +9468,22 @@ func (s DeploymentTargetListSizeExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeploymentTargetListSizeExceededException) OrigErr() error { +func (s *DeploymentTargetListSizeExceededException) OrigErr() error { return nil } -func (s DeploymentTargetListSizeExceededException) Error() string { +func (s *DeploymentTargetListSizeExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeploymentTargetListSizeExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeploymentTargetListSizeExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeploymentTargetListSizeExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeploymentTargetListSizeExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a DeregisterOnPremisesInstance operation. @@ -9276,8 +9541,8 @@ func (s DeregisterOnPremisesInstanceOutput) GoString() string { // The description is too long. type DescriptionTooLongException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9294,17 +9559,17 @@ func (s DescriptionTooLongException) GoString() string { func newErrorDescriptionTooLongException(v protocol.ResponseMetadata) error { return &DescriptionTooLongException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DescriptionTooLongException) Code() string { +func (s *DescriptionTooLongException) Code() string { return "DescriptionTooLongException" } // Message returns the exception's message. -func (s DescriptionTooLongException) Message() string { +func (s *DescriptionTooLongException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9312,22 +9577,22 @@ func (s DescriptionTooLongException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DescriptionTooLongException) OrigErr() error { +func (s *DescriptionTooLongException) OrigErr() error { return nil } -func (s DescriptionTooLongException) Error() string { +func (s *DescriptionTooLongException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DescriptionTooLongException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DescriptionTooLongException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DescriptionTooLongException) RequestID() string { - return s.respMetadata.RequestID +func (s *DescriptionTooLongException) RequestID() string { + return s.RespMetadata.RequestID } // Diagnostic information about executable scripts that are part of a deployment. @@ -9509,8 +9774,8 @@ func (s *ECSService) SetServiceName(v string) *ECSService { // The Amazon ECS service is associated with more than one deployment groups. // An Amazon ECS service can be associated with only one deployment group. type ECSServiceMappingLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9527,17 +9792,17 @@ func (s ECSServiceMappingLimitExceededException) GoString() string { func newErrorECSServiceMappingLimitExceededException(v protocol.ResponseMetadata) error { return &ECSServiceMappingLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ECSServiceMappingLimitExceededException) Code() string { +func (s *ECSServiceMappingLimitExceededException) Code() string { return "ECSServiceMappingLimitExceededException" } // Message returns the exception's message. -func (s ECSServiceMappingLimitExceededException) Message() string { +func (s *ECSServiceMappingLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9545,22 +9810,22 @@ func (s ECSServiceMappingLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ECSServiceMappingLimitExceededException) OrigErr() error { +func (s *ECSServiceMappingLimitExceededException) OrigErr() error { return nil } -func (s ECSServiceMappingLimitExceededException) Error() string { +func (s *ECSServiceMappingLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ECSServiceMappingLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ECSServiceMappingLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ECSServiceMappingLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ECSServiceMappingLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the target of an Amazon ECS deployment. @@ -9580,7 +9845,7 @@ type ECSTarget struct { // The status an Amazon ECS deployment's target ECS application. Status *string `locationName:"status" type:"string" enum:"TargetStatus"` - // The ARN of the target. + // The Amazon Resource Name (ARN) of the target. TargetArn *string `locationName:"targetArn" type:"string"` // The unique ID of a deployment target that has a type of ecsTarget. @@ -10404,7 +10669,7 @@ type GetDeploymentTargetOutput struct { _ struct{} `type:"structure"` // A deployment target that contains information about a deployment such as - // its status, lifecyle events, and when it was last updated. It also contains + // its status, lifecycle events, and when it was last updated. It also contains // metadata about the deployment target. The deployment target metadata depends // on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget). DeploymentTarget *DeploymentTarget `locationName:"deploymentTarget" type:"structure"` @@ -10491,8 +10756,8 @@ func (s *GetOnPremisesInstanceOutput) SetInstanceInfo(v *InstanceInfo) *GetOnPre // No GitHub account connection exists with the named specified in the call. type GitHubAccountTokenDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10509,17 +10774,17 @@ func (s GitHubAccountTokenDoesNotExistException) GoString() string { func newErrorGitHubAccountTokenDoesNotExistException(v protocol.ResponseMetadata) error { return &GitHubAccountTokenDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GitHubAccountTokenDoesNotExistException) Code() string { +func (s *GitHubAccountTokenDoesNotExistException) Code() string { return "GitHubAccountTokenDoesNotExistException" } // Message returns the exception's message. -func (s GitHubAccountTokenDoesNotExistException) Message() string { +func (s *GitHubAccountTokenDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10527,28 +10792,28 @@ func (s GitHubAccountTokenDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GitHubAccountTokenDoesNotExistException) OrigErr() error { +func (s *GitHubAccountTokenDoesNotExistException) OrigErr() error { return nil } -func (s GitHubAccountTokenDoesNotExistException) Error() string { +func (s *GitHubAccountTokenDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GitHubAccountTokenDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GitHubAccountTokenDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GitHubAccountTokenDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *GitHubAccountTokenDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The call is missing a required GitHub account connection name. type GitHubAccountTokenNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10565,17 +10830,17 @@ func (s GitHubAccountTokenNameRequiredException) GoString() string { func newErrorGitHubAccountTokenNameRequiredException(v protocol.ResponseMetadata) error { return &GitHubAccountTokenNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GitHubAccountTokenNameRequiredException) Code() string { +func (s *GitHubAccountTokenNameRequiredException) Code() string { return "GitHubAccountTokenNameRequiredException" } // Message returns the exception's message. -func (s GitHubAccountTokenNameRequiredException) Message() string { +func (s *GitHubAccountTokenNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10583,22 +10848,22 @@ func (s GitHubAccountTokenNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GitHubAccountTokenNameRequiredException) OrigErr() error { +func (s *GitHubAccountTokenNameRequiredException) OrigErr() error { return nil } -func (s GitHubAccountTokenNameRequiredException) Error() string { +func (s *GitHubAccountTokenNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GitHubAccountTokenNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GitHubAccountTokenNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GitHubAccountTokenNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *GitHubAccountTokenNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the location of application artifacts stored in GitHub. @@ -10672,8 +10937,8 @@ func (s *GreenFleetProvisioningOption) SetAction(v string) *GreenFleetProvisioni // No IAM ARN was included in the request. You must use an IAM session ARN or // IAM user ARN in the request. type IamArnRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10690,17 +10955,17 @@ func (s IamArnRequiredException) GoString() string { func newErrorIamArnRequiredException(v protocol.ResponseMetadata) error { return &IamArnRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IamArnRequiredException) Code() string { +func (s *IamArnRequiredException) Code() string { return "IamArnRequiredException" } // Message returns the exception's message. -func (s IamArnRequiredException) Message() string { +func (s *IamArnRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10708,29 +10973,29 @@ func (s IamArnRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IamArnRequiredException) OrigErr() error { +func (s *IamArnRequiredException) OrigErr() error { return nil } -func (s IamArnRequiredException) Error() string { +func (s *IamArnRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IamArnRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IamArnRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IamArnRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *IamArnRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The request included an IAM session ARN that has already been used to register // a different instance. type IamSessionArnAlreadyRegisteredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10747,17 +11012,17 @@ func (s IamSessionArnAlreadyRegisteredException) GoString() string { func newErrorIamSessionArnAlreadyRegisteredException(v protocol.ResponseMetadata) error { return &IamSessionArnAlreadyRegisteredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IamSessionArnAlreadyRegisteredException) Code() string { +func (s *IamSessionArnAlreadyRegisteredException) Code() string { return "IamSessionArnAlreadyRegisteredException" } // Message returns the exception's message. -func (s IamSessionArnAlreadyRegisteredException) Message() string { +func (s *IamSessionArnAlreadyRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10765,28 +11030,28 @@ func (s IamSessionArnAlreadyRegisteredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IamSessionArnAlreadyRegisteredException) OrigErr() error { +func (s *IamSessionArnAlreadyRegisteredException) OrigErr() error { return nil } -func (s IamSessionArnAlreadyRegisteredException) Error() string { +func (s *IamSessionArnAlreadyRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IamSessionArnAlreadyRegisteredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IamSessionArnAlreadyRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IamSessionArnAlreadyRegisteredException) RequestID() string { - return s.respMetadata.RequestID +func (s *IamSessionArnAlreadyRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified IAM user ARN is already registered with an on-premises instance. type IamUserArnAlreadyRegisteredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10803,17 +11068,17 @@ func (s IamUserArnAlreadyRegisteredException) GoString() string { func newErrorIamUserArnAlreadyRegisteredException(v protocol.ResponseMetadata) error { return &IamUserArnAlreadyRegisteredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IamUserArnAlreadyRegisteredException) Code() string { +func (s *IamUserArnAlreadyRegisteredException) Code() string { return "IamUserArnAlreadyRegisteredException" } // Message returns the exception's message. -func (s IamUserArnAlreadyRegisteredException) Message() string { +func (s *IamUserArnAlreadyRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10821,28 +11086,28 @@ func (s IamUserArnAlreadyRegisteredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IamUserArnAlreadyRegisteredException) OrigErr() error { +func (s *IamUserArnAlreadyRegisteredException) OrigErr() error { return nil } -func (s IamUserArnAlreadyRegisteredException) Error() string { +func (s *IamUserArnAlreadyRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IamUserArnAlreadyRegisteredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IamUserArnAlreadyRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IamUserArnAlreadyRegisteredException) RequestID() string { - return s.respMetadata.RequestID +func (s *IamUserArnAlreadyRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // An IAM user ARN was not specified. type IamUserArnRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10859,17 +11124,17 @@ func (s IamUserArnRequiredException) GoString() string { func newErrorIamUserArnRequiredException(v protocol.ResponseMetadata) error { return &IamUserArnRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IamUserArnRequiredException) Code() string { +func (s *IamUserArnRequiredException) Code() string { return "IamUserArnRequiredException" } // Message returns the exception's message. -func (s IamUserArnRequiredException) Message() string { +func (s *IamUserArnRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10877,30 +11142,30 @@ func (s IamUserArnRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IamUserArnRequiredException) OrigErr() error { +func (s *IamUserArnRequiredException) OrigErr() error { return nil } -func (s IamUserArnRequiredException) Error() string { +func (s *IamUserArnRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IamUserArnRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IamUserArnRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IamUserArnRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *IamUserArnRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified instance does not exist in the deployment group. // // Deprecated: This exception is deprecated, use DeploymentTargetDoesNotExistException instead. type InstanceDoesNotExistException struct { - _ struct{} `deprecated:"true" type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `deprecated:"true" type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10917,17 +11182,17 @@ func (s InstanceDoesNotExistException) GoString() string { func newErrorInstanceDoesNotExistException(v protocol.ResponseMetadata) error { return &InstanceDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceDoesNotExistException) Code() string { +func (s *InstanceDoesNotExistException) Code() string { return "InstanceDoesNotExistException" } // Message returns the exception's message. -func (s InstanceDoesNotExistException) Message() string { +func (s *InstanceDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10935,30 +11200,30 @@ func (s InstanceDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceDoesNotExistException) OrigErr() error { +func (s *InstanceDoesNotExistException) OrigErr() error { return nil } -func (s InstanceDoesNotExistException) Error() string { +func (s *InstanceDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The instance ID was not specified. // // Deprecated: This exception is deprecated, use DeploymentTargetIdRequiredException instead. type InstanceIdRequiredException struct { - _ struct{} `deprecated:"true" type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `deprecated:"true" type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10975,17 +11240,17 @@ func (s InstanceIdRequiredException) GoString() string { func newErrorInstanceIdRequiredException(v protocol.ResponseMetadata) error { return &InstanceIdRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceIdRequiredException) Code() string { +func (s *InstanceIdRequiredException) Code() string { return "InstanceIdRequiredException" } // Message returns the exception's message. -func (s InstanceIdRequiredException) Message() string { +func (s *InstanceIdRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10993,22 +11258,22 @@ func (s InstanceIdRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceIdRequiredException) OrigErr() error { +func (s *InstanceIdRequiredException) OrigErr() error { return nil } -func (s InstanceIdRequiredException) Error() string { +func (s *InstanceIdRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceIdRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceIdRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceIdRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceIdRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about an on-premises instance. @@ -11093,8 +11358,8 @@ func (s *InstanceInfo) SetTags(v []*Tag) *InstanceInfo { // The maximum number of allowed on-premises instances in a single call was // exceeded. type InstanceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11111,17 +11376,17 @@ func (s InstanceLimitExceededException) GoString() string { func newErrorInstanceLimitExceededException(v protocol.ResponseMetadata) error { return &InstanceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceLimitExceededException) Code() string { +func (s *InstanceLimitExceededException) Code() string { return "InstanceLimitExceededException" } // Message returns the exception's message. -func (s InstanceLimitExceededException) Message() string { +func (s *InstanceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11129,28 +11394,28 @@ func (s InstanceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceLimitExceededException) OrigErr() error { +func (s *InstanceLimitExceededException) OrigErr() error { return nil } -func (s InstanceLimitExceededException) Error() string { +func (s *InstanceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified on-premises instance name is already registered. type InstanceNameAlreadyRegisteredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11167,17 +11432,17 @@ func (s InstanceNameAlreadyRegisteredException) GoString() string { func newErrorInstanceNameAlreadyRegisteredException(v protocol.ResponseMetadata) error { return &InstanceNameAlreadyRegisteredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceNameAlreadyRegisteredException) Code() string { +func (s *InstanceNameAlreadyRegisteredException) Code() string { return "InstanceNameAlreadyRegisteredException" } // Message returns the exception's message. -func (s InstanceNameAlreadyRegisteredException) Message() string { +func (s *InstanceNameAlreadyRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11185,28 +11450,28 @@ func (s InstanceNameAlreadyRegisteredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceNameAlreadyRegisteredException) OrigErr() error { +func (s *InstanceNameAlreadyRegisteredException) OrigErr() error { return nil } -func (s InstanceNameAlreadyRegisteredException) Error() string { +func (s *InstanceNameAlreadyRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceNameAlreadyRegisteredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceNameAlreadyRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceNameAlreadyRegisteredException) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceNameAlreadyRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // An on-premises instance name was not specified. type InstanceNameRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11223,17 +11488,17 @@ func (s InstanceNameRequiredException) GoString() string { func newErrorInstanceNameRequiredException(v protocol.ResponseMetadata) error { return &InstanceNameRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceNameRequiredException) Code() string { +func (s *InstanceNameRequiredException) Code() string { return "InstanceNameRequiredException" } // Message returns the exception's message. -func (s InstanceNameRequiredException) Message() string { +func (s *InstanceNameRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11241,28 +11506,28 @@ func (s InstanceNameRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceNameRequiredException) OrigErr() error { +func (s *InstanceNameRequiredException) OrigErr() error { return nil } -func (s InstanceNameRequiredException) Error() string { +func (s *InstanceNameRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceNameRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceNameRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceNameRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceNameRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified on-premises instance is not registered. type InstanceNotRegisteredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11279,17 +11544,17 @@ func (s InstanceNotRegisteredException) GoString() string { func newErrorInstanceNotRegisteredException(v protocol.ResponseMetadata) error { return &InstanceNotRegisteredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceNotRegisteredException) Code() string { +func (s *InstanceNotRegisteredException) Code() string { return "InstanceNotRegisteredException" } // Message returns the exception's message. -func (s InstanceNotRegisteredException) Message() string { +func (s *InstanceNotRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11297,22 +11562,22 @@ func (s InstanceNotRegisteredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceNotRegisteredException) OrigErr() error { +func (s *InstanceNotRegisteredException) OrigErr() error { return nil } -func (s InstanceNotRegisteredException) Error() string { +func (s *InstanceNotRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceNotRegisteredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceNotRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceNotRegisteredException) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceNotRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about an instance in a deployment. @@ -11335,7 +11600,7 @@ type InstanceSummary struct { // * GREEN: The instance is part of the replacement environment. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // A timestamp that indicaties when the instance information was last updated. + // A timestamp that indicates when the instance information was last updated. LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // A list of lifecycle events for this instance. @@ -11424,7 +11689,7 @@ type InstanceTarget struct { // The status an EC2/On-premises deployment's target instance. Status *string `locationName:"status" type:"string" enum:"TargetStatus"` - // The ARN of the target. + // The Amazon Resource Name (ARN) of the target. TargetArn *string `locationName:"targetArn" type:"string"` // The unique ID of a deployment target that has a type of instanceTarget. @@ -11495,8 +11760,8 @@ func (s *InstanceTarget) SetTargetId(v string) *InstanceTarget { // // * The alarm configuration is enabled, but the alarm list is empty. type InvalidAlarmConfigException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11513,17 +11778,17 @@ func (s InvalidAlarmConfigException) GoString() string { func newErrorInvalidAlarmConfigException(v protocol.ResponseMetadata) error { return &InvalidAlarmConfigException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAlarmConfigException) Code() string { +func (s *InvalidAlarmConfigException) Code() string { return "InvalidAlarmConfigException" } // Message returns the exception's message. -func (s InvalidAlarmConfigException) Message() string { +func (s *InvalidAlarmConfigException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11531,28 +11796,28 @@ func (s InvalidAlarmConfigException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAlarmConfigException) OrigErr() error { +func (s *InvalidAlarmConfigException) OrigErr() error { return nil } -func (s InvalidAlarmConfigException) Error() string { +func (s *InvalidAlarmConfigException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAlarmConfigException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAlarmConfigException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAlarmConfigException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAlarmConfigException) RequestID() string { + return s.RespMetadata.RequestID } // The application name was specified in an invalid format. type InvalidApplicationNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11569,17 +11834,17 @@ func (s InvalidApplicationNameException) GoString() string { func newErrorInvalidApplicationNameException(v protocol.ResponseMetadata) error { return &InvalidApplicationNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApplicationNameException) Code() string { +func (s *InvalidApplicationNameException) Code() string { return "InvalidApplicationNameException" } // Message returns the exception's message. -func (s InvalidApplicationNameException) Message() string { +func (s *InvalidApplicationNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11587,28 +11852,28 @@ func (s InvalidApplicationNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApplicationNameException) OrigErr() error { +func (s *InvalidApplicationNameException) OrigErr() error { return nil } -func (s InvalidApplicationNameException) Error() string { +func (s *InvalidApplicationNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApplicationNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApplicationNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApplicationNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApplicationNameException) RequestID() string { + return s.RespMetadata.RequestID } // The specified ARN is not in a valid format. type InvalidArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11625,17 +11890,17 @@ func (s InvalidArnException) GoString() string { func newErrorInvalidArnException(v protocol.ResponseMetadata) error { return &InvalidArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArnException) Code() string { +func (s *InvalidArnException) Code() string { return "InvalidArnException" } // Message returns the exception's message. -func (s InvalidArnException) Message() string { +func (s *InvalidArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11643,30 +11908,30 @@ func (s InvalidArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArnException) OrigErr() error { +func (s *InvalidArnException) OrigErr() error { return nil } -func (s InvalidArnException) Error() string { +func (s *InvalidArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArnException) RequestID() string { + return s.RespMetadata.RequestID } // The automatic rollback configuration was specified in an invalid format. // For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. type InvalidAutoRollbackConfigException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11683,17 +11948,17 @@ func (s InvalidAutoRollbackConfigException) GoString() string { func newErrorInvalidAutoRollbackConfigException(v protocol.ResponseMetadata) error { return &InvalidAutoRollbackConfigException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAutoRollbackConfigException) Code() string { +func (s *InvalidAutoRollbackConfigException) Code() string { return "InvalidAutoRollbackConfigException" } // Message returns the exception's message. -func (s InvalidAutoRollbackConfigException) Message() string { +func (s *InvalidAutoRollbackConfigException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11701,28 +11966,28 @@ func (s InvalidAutoRollbackConfigException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAutoRollbackConfigException) OrigErr() error { +func (s *InvalidAutoRollbackConfigException) OrigErr() error { return nil } -func (s InvalidAutoRollbackConfigException) Error() string { +func (s *InvalidAutoRollbackConfigException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAutoRollbackConfigException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAutoRollbackConfigException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAutoRollbackConfigException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAutoRollbackConfigException) RequestID() string { + return s.RespMetadata.RequestID } // The Auto Scaling group was specified in an invalid format or does not exist. type InvalidAutoScalingGroupException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11739,17 +12004,17 @@ func (s InvalidAutoScalingGroupException) GoString() string { func newErrorInvalidAutoScalingGroupException(v protocol.ResponseMetadata) error { return &InvalidAutoScalingGroupException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAutoScalingGroupException) Code() string { +func (s *InvalidAutoScalingGroupException) Code() string { return "InvalidAutoScalingGroupException" } // Message returns the exception's message. -func (s InvalidAutoScalingGroupException) Message() string { +func (s *InvalidAutoScalingGroupException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11757,30 +12022,30 @@ func (s InvalidAutoScalingGroupException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAutoScalingGroupException) OrigErr() error { +func (s *InvalidAutoScalingGroupException) OrigErr() error { return nil } -func (s InvalidAutoScalingGroupException) Error() string { +func (s *InvalidAutoScalingGroupException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAutoScalingGroupException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAutoScalingGroupException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAutoScalingGroupException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAutoScalingGroupException) RequestID() string { + return s.RespMetadata.RequestID } // The configuration for the blue/green deployment group was provided in an // invalid format. For information about deployment configuration format, see // CreateDeploymentConfig. type InvalidBlueGreenDeploymentConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11797,17 +12062,17 @@ func (s InvalidBlueGreenDeploymentConfigurationException) GoString() string { func newErrorInvalidBlueGreenDeploymentConfigurationException(v protocol.ResponseMetadata) error { return &InvalidBlueGreenDeploymentConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidBlueGreenDeploymentConfigurationException) Code() string { +func (s *InvalidBlueGreenDeploymentConfigurationException) Code() string { return "InvalidBlueGreenDeploymentConfigurationException" } // Message returns the exception's message. -func (s InvalidBlueGreenDeploymentConfigurationException) Message() string { +func (s *InvalidBlueGreenDeploymentConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11815,28 +12080,28 @@ func (s InvalidBlueGreenDeploymentConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidBlueGreenDeploymentConfigurationException) OrigErr() error { +func (s *InvalidBlueGreenDeploymentConfigurationException) OrigErr() error { return nil } -func (s InvalidBlueGreenDeploymentConfigurationException) Error() string { +func (s *InvalidBlueGreenDeploymentConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidBlueGreenDeploymentConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidBlueGreenDeploymentConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidBlueGreenDeploymentConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidBlueGreenDeploymentConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // The bucket name either doesn't exist or was specified in an invalid format. type InvalidBucketNameFilterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11853,17 +12118,17 @@ func (s InvalidBucketNameFilterException) GoString() string { func newErrorInvalidBucketNameFilterException(v protocol.ResponseMetadata) error { return &InvalidBucketNameFilterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidBucketNameFilterException) Code() string { +func (s *InvalidBucketNameFilterException) Code() string { return "InvalidBucketNameFilterException" } // Message returns the exception's message. -func (s InvalidBucketNameFilterException) Message() string { +func (s *InvalidBucketNameFilterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11871,28 +12136,29 @@ func (s InvalidBucketNameFilterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidBucketNameFilterException) OrigErr() error { +func (s *InvalidBucketNameFilterException) OrigErr() error { return nil } -func (s InvalidBucketNameFilterException) Error() string { +func (s *InvalidBucketNameFilterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidBucketNameFilterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidBucketNameFilterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidBucketNameFilterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidBucketNameFilterException) RequestID() string { + return s.RespMetadata.RequestID } -// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// The computePlatform is invalid. The computePlatform should be Lambda, Server, +// or ECS. type InvalidComputePlatformException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11909,17 +12175,17 @@ func (s InvalidComputePlatformException) GoString() string { func newErrorInvalidComputePlatformException(v protocol.ResponseMetadata) error { return &InvalidComputePlatformException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidComputePlatformException) Code() string { +func (s *InvalidComputePlatformException) Code() string { return "InvalidComputePlatformException" } // Message returns the exception's message. -func (s InvalidComputePlatformException) Message() string { +func (s *InvalidComputePlatformException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11927,28 +12193,28 @@ func (s InvalidComputePlatformException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidComputePlatformException) OrigErr() error { +func (s *InvalidComputePlatformException) OrigErr() error { return nil } -func (s InvalidComputePlatformException) Error() string { +func (s *InvalidComputePlatformException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidComputePlatformException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidComputePlatformException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidComputePlatformException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidComputePlatformException) RequestID() string { + return s.RespMetadata.RequestID } // The deployed state filter was specified in an invalid format. type InvalidDeployedStateFilterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11965,17 +12231,17 @@ func (s InvalidDeployedStateFilterException) GoString() string { func newErrorInvalidDeployedStateFilterException(v protocol.ResponseMetadata) error { return &InvalidDeployedStateFilterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeployedStateFilterException) Code() string { +func (s *InvalidDeployedStateFilterException) Code() string { return "InvalidDeployedStateFilterException" } // Message returns the exception's message. -func (s InvalidDeployedStateFilterException) Message() string { +func (s *InvalidDeployedStateFilterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11983,28 +12249,28 @@ func (s InvalidDeployedStateFilterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeployedStateFilterException) OrigErr() error { +func (s *InvalidDeployedStateFilterException) OrigErr() error { return nil } -func (s InvalidDeployedStateFilterException) Error() string { +func (s *InvalidDeployedStateFilterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeployedStateFilterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeployedStateFilterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeployedStateFilterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeployedStateFilterException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment configuration name was specified in an invalid format. type InvalidDeploymentConfigNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12021,17 +12287,17 @@ func (s InvalidDeploymentConfigNameException) GoString() string { func newErrorInvalidDeploymentConfigNameException(v protocol.ResponseMetadata) error { return &InvalidDeploymentConfigNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentConfigNameException) Code() string { +func (s *InvalidDeploymentConfigNameException) Code() string { return "InvalidDeploymentConfigNameException" } // Message returns the exception's message. -func (s InvalidDeploymentConfigNameException) Message() string { +func (s *InvalidDeploymentConfigNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12039,28 +12305,28 @@ func (s InvalidDeploymentConfigNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentConfigNameException) OrigErr() error { +func (s *InvalidDeploymentConfigNameException) OrigErr() error { return nil } -func (s InvalidDeploymentConfigNameException) Error() string { +func (s *InvalidDeploymentConfigNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentConfigNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentConfigNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentConfigNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentConfigNameException) RequestID() string { + return s.RespMetadata.RequestID } // The deployment group name was specified in an invalid format. type InvalidDeploymentGroupNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12077,17 +12343,17 @@ func (s InvalidDeploymentGroupNameException) GoString() string { func newErrorInvalidDeploymentGroupNameException(v protocol.ResponseMetadata) error { return &InvalidDeploymentGroupNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentGroupNameException) Code() string { +func (s *InvalidDeploymentGroupNameException) Code() string { return "InvalidDeploymentGroupNameException" } // Message returns the exception's message. -func (s InvalidDeploymentGroupNameException) Message() string { +func (s *InvalidDeploymentGroupNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12095,28 +12361,28 @@ func (s InvalidDeploymentGroupNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentGroupNameException) OrigErr() error { +func (s *InvalidDeploymentGroupNameException) OrigErr() error { return nil } -func (s InvalidDeploymentGroupNameException) Error() string { +func (s *InvalidDeploymentGroupNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentGroupNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentGroupNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentGroupNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentGroupNameException) RequestID() string { + return s.RespMetadata.RequestID } // At least one of the deployment IDs was specified in an invalid format. type InvalidDeploymentIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12133,17 +12399,17 @@ func (s InvalidDeploymentIdException) GoString() string { func newErrorInvalidDeploymentIdException(v protocol.ResponseMetadata) error { return &InvalidDeploymentIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentIdException) Code() string { +func (s *InvalidDeploymentIdException) Code() string { return "InvalidDeploymentIdException" } // Message returns the exception's message. -func (s InvalidDeploymentIdException) Message() string { +func (s *InvalidDeploymentIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12151,29 +12417,29 @@ func (s InvalidDeploymentIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentIdException) OrigErr() error { +func (s *InvalidDeploymentIdException) OrigErr() error { return nil } -func (s InvalidDeploymentIdException) Error() string { +func (s *InvalidDeploymentIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentIdException) RequestID() string { + return s.RespMetadata.RequestID } // An instance type was specified for an in-place deployment. Instance types // are supported for blue/green deployments only. type InvalidDeploymentInstanceTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12190,17 +12456,17 @@ func (s InvalidDeploymentInstanceTypeException) GoString() string { func newErrorInvalidDeploymentInstanceTypeException(v protocol.ResponseMetadata) error { return &InvalidDeploymentInstanceTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentInstanceTypeException) Code() string { +func (s *InvalidDeploymentInstanceTypeException) Code() string { return "InvalidDeploymentInstanceTypeException" } // Message returns the exception's message. -func (s InvalidDeploymentInstanceTypeException) Message() string { +func (s *InvalidDeploymentInstanceTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12208,28 +12474,28 @@ func (s InvalidDeploymentInstanceTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentInstanceTypeException) OrigErr() error { +func (s *InvalidDeploymentInstanceTypeException) OrigErr() error { return nil } -func (s InvalidDeploymentInstanceTypeException) Error() string { +func (s *InvalidDeploymentInstanceTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentInstanceTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentInstanceTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentInstanceTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentInstanceTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The specified deployment status doesn't exist or cannot be determined. type InvalidDeploymentStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12246,17 +12512,17 @@ func (s InvalidDeploymentStatusException) GoString() string { func newErrorInvalidDeploymentStatusException(v protocol.ResponseMetadata) error { return &InvalidDeploymentStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentStatusException) Code() string { +func (s *InvalidDeploymentStatusException) Code() string { return "InvalidDeploymentStatusException" } // Message returns the exception's message. -func (s InvalidDeploymentStatusException) Message() string { +func (s *InvalidDeploymentStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12264,30 +12530,30 @@ func (s InvalidDeploymentStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentStatusException) OrigErr() error { +func (s *InvalidDeploymentStatusException) OrigErr() error { return nil } -func (s InvalidDeploymentStatusException) Error() string { +func (s *InvalidDeploymentStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentStatusException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid deployment style was specified. Valid deployment types include // "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" // and "WITHOUT_TRAFFIC_CONTROL." type InvalidDeploymentStyleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12304,17 +12570,17 @@ func (s InvalidDeploymentStyleException) GoString() string { func newErrorInvalidDeploymentStyleException(v protocol.ResponseMetadata) error { return &InvalidDeploymentStyleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentStyleException) Code() string { +func (s *InvalidDeploymentStyleException) Code() string { return "InvalidDeploymentStyleException" } // Message returns the exception's message. -func (s InvalidDeploymentStyleException) Message() string { +func (s *InvalidDeploymentStyleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12322,28 +12588,28 @@ func (s InvalidDeploymentStyleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentStyleException) OrigErr() error { +func (s *InvalidDeploymentStyleException) OrigErr() error { return nil } -func (s InvalidDeploymentStyleException) Error() string { +func (s *InvalidDeploymentStyleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentStyleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentStyleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentStyleException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentStyleException) RequestID() string { + return s.RespMetadata.RequestID } // The target ID provided was not valid. type InvalidDeploymentTargetIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12360,17 +12626,17 @@ func (s InvalidDeploymentTargetIdException) GoString() string { func newErrorInvalidDeploymentTargetIdException(v protocol.ResponseMetadata) error { return &InvalidDeploymentTargetIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentTargetIdException) Code() string { +func (s *InvalidDeploymentTargetIdException) Code() string { return "InvalidDeploymentTargetIdException" } // Message returns the exception's message. -func (s InvalidDeploymentTargetIdException) Message() string { +func (s *InvalidDeploymentTargetIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12378,28 +12644,28 @@ func (s InvalidDeploymentTargetIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentTargetIdException) OrigErr() error { +func (s *InvalidDeploymentTargetIdException) OrigErr() error { return nil } -func (s InvalidDeploymentTargetIdException) Error() string { +func (s *InvalidDeploymentTargetIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentTargetIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentTargetIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentTargetIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentTargetIdException) RequestID() string { + return s.RespMetadata.RequestID } // The wait type is invalid. type InvalidDeploymentWaitTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12416,17 +12682,17 @@ func (s InvalidDeploymentWaitTypeException) GoString() string { func newErrorInvalidDeploymentWaitTypeException(v protocol.ResponseMetadata) error { return &InvalidDeploymentWaitTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeploymentWaitTypeException) Code() string { +func (s *InvalidDeploymentWaitTypeException) Code() string { return "InvalidDeploymentWaitTypeException" } // Message returns the exception's message. -func (s InvalidDeploymentWaitTypeException) Message() string { +func (s *InvalidDeploymentWaitTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12434,29 +12700,29 @@ func (s InvalidDeploymentWaitTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeploymentWaitTypeException) OrigErr() error { +func (s *InvalidDeploymentWaitTypeException) OrigErr() error { return nil } -func (s InvalidDeploymentWaitTypeException) Error() string { +func (s *InvalidDeploymentWaitTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeploymentWaitTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeploymentWaitTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeploymentWaitTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeploymentWaitTypeException) RequestID() string { + return s.RespMetadata.RequestID } // A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but // only one of these data types can be used in a single call. type InvalidEC2TagCombinationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12473,17 +12739,17 @@ func (s InvalidEC2TagCombinationException) GoString() string { func newErrorInvalidEC2TagCombinationException(v protocol.ResponseMetadata) error { return &InvalidEC2TagCombinationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEC2TagCombinationException) Code() string { +func (s *InvalidEC2TagCombinationException) Code() string { return "InvalidEC2TagCombinationException" } // Message returns the exception's message. -func (s InvalidEC2TagCombinationException) Message() string { +func (s *InvalidEC2TagCombinationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12491,28 +12757,28 @@ func (s InvalidEC2TagCombinationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEC2TagCombinationException) OrigErr() error { +func (s *InvalidEC2TagCombinationException) OrigErr() error { return nil } -func (s InvalidEC2TagCombinationException) Error() string { +func (s *InvalidEC2TagCombinationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEC2TagCombinationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEC2TagCombinationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEC2TagCombinationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEC2TagCombinationException) RequestID() string { + return s.RespMetadata.RequestID } // The tag was specified in an invalid format. type InvalidEC2TagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12529,17 +12795,17 @@ func (s InvalidEC2TagException) GoString() string { func newErrorInvalidEC2TagException(v protocol.ResponseMetadata) error { return &InvalidEC2TagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEC2TagException) Code() string { +func (s *InvalidEC2TagException) Code() string { return "InvalidEC2TagException" } // Message returns the exception's message. -func (s InvalidEC2TagException) Message() string { +func (s *InvalidEC2TagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12547,28 +12813,28 @@ func (s InvalidEC2TagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEC2TagException) OrigErr() error { +func (s *InvalidEC2TagException) OrigErr() error { return nil } -func (s InvalidEC2TagException) Error() string { +func (s *InvalidEC2TagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEC2TagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEC2TagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEC2TagException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEC2TagException) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon ECS service identifier is not valid. type InvalidECSServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12585,17 +12851,17 @@ func (s InvalidECSServiceException) GoString() string { func newErrorInvalidECSServiceException(v protocol.ResponseMetadata) error { return &InvalidECSServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidECSServiceException) Code() string { +func (s *InvalidECSServiceException) Code() string { return "InvalidECSServiceException" } // Message returns the exception's message. -func (s InvalidECSServiceException) Message() string { +func (s *InvalidECSServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12603,22 +12869,78 @@ func (s InvalidECSServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidECSServiceException) OrigErr() error { +func (s *InvalidECSServiceException) OrigErr() error { return nil } -func (s InvalidECSServiceException) Error() string { +func (s *InvalidECSServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidECSServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidECSServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidECSServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidECSServiceException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The external ID was specified in an invalid format. +type InvalidExternalIdException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s InvalidExternalIdException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InvalidExternalIdException) GoString() string { + return s.String() +} + +func newErrorInvalidExternalIdException(v protocol.ResponseMetadata) error { + return &InvalidExternalIdException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidExternalIdException) Code() string { + return "InvalidExternalIdException" +} + +// Message returns the exception's message. +func (s *InvalidExternalIdException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidExternalIdException) OrigErr() error { + return nil +} + +func (s *InvalidExternalIdException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidExternalIdException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidExternalIdException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy @@ -12626,8 +12948,8 @@ func (s InvalidECSServiceException) RequestID() string { // but weren't part of the previous successful deployment. Valid values include // "DISALLOW," "OVERWRITE," and "RETAIN." type InvalidFileExistsBehaviorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12644,17 +12966,17 @@ func (s InvalidFileExistsBehaviorException) GoString() string { func newErrorInvalidFileExistsBehaviorException(v protocol.ResponseMetadata) error { return &InvalidFileExistsBehaviorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFileExistsBehaviorException) Code() string { +func (s *InvalidFileExistsBehaviorException) Code() string { return "InvalidFileExistsBehaviorException" } // Message returns the exception's message. -func (s InvalidFileExistsBehaviorException) Message() string { +func (s *InvalidFileExistsBehaviorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12662,28 +12984,28 @@ func (s InvalidFileExistsBehaviorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFileExistsBehaviorException) OrigErr() error { +func (s *InvalidFileExistsBehaviorException) OrigErr() error { return nil } -func (s InvalidFileExistsBehaviorException) Error() string { +func (s *InvalidFileExistsBehaviorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFileExistsBehaviorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFileExistsBehaviorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFileExistsBehaviorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFileExistsBehaviorException) RequestID() string { + return s.RespMetadata.RequestID } // The GitHub token is not valid. type InvalidGitHubAccountTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12700,17 +13022,17 @@ func (s InvalidGitHubAccountTokenException) GoString() string { func newErrorInvalidGitHubAccountTokenException(v protocol.ResponseMetadata) error { return &InvalidGitHubAccountTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidGitHubAccountTokenException) Code() string { +func (s *InvalidGitHubAccountTokenException) Code() string { return "InvalidGitHubAccountTokenException" } // Message returns the exception's message. -func (s InvalidGitHubAccountTokenException) Message() string { +func (s *InvalidGitHubAccountTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12718,28 +13040,28 @@ func (s InvalidGitHubAccountTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidGitHubAccountTokenException) OrigErr() error { +func (s *InvalidGitHubAccountTokenException) OrigErr() error { return nil } -func (s InvalidGitHubAccountTokenException) Error() string { +func (s *InvalidGitHubAccountTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidGitHubAccountTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidGitHubAccountTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidGitHubAccountTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidGitHubAccountTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The format of the specified GitHub account connection name is invalid. type InvalidGitHubAccountTokenNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12756,17 +13078,17 @@ func (s InvalidGitHubAccountTokenNameException) GoString() string { func newErrorInvalidGitHubAccountTokenNameException(v protocol.ResponseMetadata) error { return &InvalidGitHubAccountTokenNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidGitHubAccountTokenNameException) Code() string { +func (s *InvalidGitHubAccountTokenNameException) Code() string { return "InvalidGitHubAccountTokenNameException" } // Message returns the exception's message. -func (s InvalidGitHubAccountTokenNameException) Message() string { +func (s *InvalidGitHubAccountTokenNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12774,28 +13096,28 @@ func (s InvalidGitHubAccountTokenNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidGitHubAccountTokenNameException) OrigErr() error { +func (s *InvalidGitHubAccountTokenNameException) OrigErr() error { return nil } -func (s InvalidGitHubAccountTokenNameException) Error() string { +func (s *InvalidGitHubAccountTokenNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidGitHubAccountTokenNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidGitHubAccountTokenNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidGitHubAccountTokenNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidGitHubAccountTokenNameException) RequestID() string { + return s.RespMetadata.RequestID } // The IAM session ARN was specified in an invalid format. type InvalidIamSessionArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12812,17 +13134,17 @@ func (s InvalidIamSessionArnException) GoString() string { func newErrorInvalidIamSessionArnException(v protocol.ResponseMetadata) error { return &InvalidIamSessionArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidIamSessionArnException) Code() string { +func (s *InvalidIamSessionArnException) Code() string { return "InvalidIamSessionArnException" } // Message returns the exception's message. -func (s InvalidIamSessionArnException) Message() string { +func (s *InvalidIamSessionArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12830,28 +13152,28 @@ func (s InvalidIamSessionArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidIamSessionArnException) OrigErr() error { +func (s *InvalidIamSessionArnException) OrigErr() error { return nil } -func (s InvalidIamSessionArnException) Error() string { +func (s *InvalidIamSessionArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidIamSessionArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidIamSessionArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidIamSessionArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidIamSessionArnException) RequestID() string { + return s.RespMetadata.RequestID } // The IAM user ARN was specified in an invalid format. type InvalidIamUserArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12868,17 +13190,17 @@ func (s InvalidIamUserArnException) GoString() string { func newErrorInvalidIamUserArnException(v protocol.ResponseMetadata) error { return &InvalidIamUserArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidIamUserArnException) Code() string { +func (s *InvalidIamUserArnException) Code() string { return "InvalidIamUserArnException" } // Message returns the exception's message. -func (s InvalidIamUserArnException) Message() string { +func (s *InvalidIamUserArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12886,29 +13208,29 @@ func (s InvalidIamUserArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidIamUserArnException) OrigErr() error { +func (s *InvalidIamUserArnException) OrigErr() error { return nil } -func (s InvalidIamUserArnException) Error() string { +func (s *InvalidIamUserArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidIamUserArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidIamUserArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidIamUserArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidIamUserArnException) RequestID() string { + return s.RespMetadata.RequestID } // The IgnoreApplicationStopFailures value is invalid. For AWS Lambda deployments, // false is expected. For EC2/On-premises deployments, true or false is expected. type InvalidIgnoreApplicationStopFailuresValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12925,17 +13247,17 @@ func (s InvalidIgnoreApplicationStopFailuresValueException) GoString() string { func newErrorInvalidIgnoreApplicationStopFailuresValueException(v protocol.ResponseMetadata) error { return &InvalidIgnoreApplicationStopFailuresValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidIgnoreApplicationStopFailuresValueException) Code() string { +func (s *InvalidIgnoreApplicationStopFailuresValueException) Code() string { return "InvalidIgnoreApplicationStopFailuresValueException" } // Message returns the exception's message. -func (s InvalidIgnoreApplicationStopFailuresValueException) Message() string { +func (s *InvalidIgnoreApplicationStopFailuresValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12943,28 +13265,28 @@ func (s InvalidIgnoreApplicationStopFailuresValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidIgnoreApplicationStopFailuresValueException) OrigErr() error { +func (s *InvalidIgnoreApplicationStopFailuresValueException) OrigErr() error { return nil } -func (s InvalidIgnoreApplicationStopFailuresValueException) Error() string { +func (s *InvalidIgnoreApplicationStopFailuresValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidIgnoreApplicationStopFailuresValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidIgnoreApplicationStopFailuresValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidIgnoreApplicationStopFailuresValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidIgnoreApplicationStopFailuresValueException) RequestID() string { + return s.RespMetadata.RequestID } // The input was specified in an invalid format. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12981,17 +13303,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12999,28 +13321,28 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // The on-premises instance name was specified in an invalid format. type InvalidInstanceNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13037,17 +13359,17 @@ func (s InvalidInstanceNameException) GoString() string { func newErrorInvalidInstanceNameException(v protocol.ResponseMetadata) error { return &InvalidInstanceNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInstanceNameException) Code() string { +func (s *InvalidInstanceNameException) Code() string { return "InvalidInstanceNameException" } // Message returns the exception's message. -func (s InvalidInstanceNameException) Message() string { +func (s *InvalidInstanceNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13055,28 +13377,28 @@ func (s InvalidInstanceNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInstanceNameException) OrigErr() error { +func (s *InvalidInstanceNameException) OrigErr() error { return nil } -func (s InvalidInstanceNameException) Error() string { +func (s *InvalidInstanceNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInstanceNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInstanceNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInstanceNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInstanceNameException) RequestID() string { + return s.RespMetadata.RequestID } // The specified instance status does not exist. type InvalidInstanceStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13093,17 +13415,17 @@ func (s InvalidInstanceStatusException) GoString() string { func newErrorInvalidInstanceStatusException(v protocol.ResponseMetadata) error { return &InvalidInstanceStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInstanceStatusException) Code() string { +func (s *InvalidInstanceStatusException) Code() string { return "InvalidInstanceStatusException" } // Message returns the exception's message. -func (s InvalidInstanceStatusException) Message() string { +func (s *InvalidInstanceStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13111,30 +13433,30 @@ func (s InvalidInstanceStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInstanceStatusException) OrigErr() error { +func (s *InvalidInstanceStatusException) OrigErr() error { return nil } -func (s InvalidInstanceStatusException) Error() string { +func (s *InvalidInstanceStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInstanceStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInstanceStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInstanceStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInstanceStatusException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid instance type was specified for instances in a blue/green deployment. // Valid values include "Blue" for an original environment and "Green" for a // replacement environment. type InvalidInstanceTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13151,17 +13473,17 @@ func (s InvalidInstanceTypeException) GoString() string { func newErrorInvalidInstanceTypeException(v protocol.ResponseMetadata) error { return &InvalidInstanceTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInstanceTypeException) Code() string { +func (s *InvalidInstanceTypeException) Code() string { return "InvalidInstanceTypeException" } // Message returns the exception's message. -func (s InvalidInstanceTypeException) Message() string { +func (s *InvalidInstanceTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13169,28 +13491,28 @@ func (s InvalidInstanceTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInstanceTypeException) OrigErr() error { +func (s *InvalidInstanceTypeException) OrigErr() error { return nil } -func (s InvalidInstanceTypeException) Error() string { +func (s *InvalidInstanceTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInstanceTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInstanceTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInstanceTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInstanceTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The specified key prefix filter was specified in an invalid format. type InvalidKeyPrefixFilterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13207,17 +13529,17 @@ func (s InvalidKeyPrefixFilterException) GoString() string { func newErrorInvalidKeyPrefixFilterException(v protocol.ResponseMetadata) error { return &InvalidKeyPrefixFilterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidKeyPrefixFilterException) Code() string { +func (s *InvalidKeyPrefixFilterException) Code() string { return "InvalidKeyPrefixFilterException" } // Message returns the exception's message. -func (s InvalidKeyPrefixFilterException) Message() string { +func (s *InvalidKeyPrefixFilterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13225,29 +13547,29 @@ func (s InvalidKeyPrefixFilterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidKeyPrefixFilterException) OrigErr() error { +func (s *InvalidKeyPrefixFilterException) OrigErr() error { return nil } -func (s InvalidKeyPrefixFilterException) Error() string { +func (s *InvalidKeyPrefixFilterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidKeyPrefixFilterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidKeyPrefixFilterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidKeyPrefixFilterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidKeyPrefixFilterException) RequestID() string { + return s.RespMetadata.RequestID } // A lifecycle event hook is invalid. Review the hooks section in your AppSpec // file to ensure the lifecycle events and hooks functions are valid. type InvalidLifecycleEventHookExecutionIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13264,17 +13586,17 @@ func (s InvalidLifecycleEventHookExecutionIdException) GoString() string { func newErrorInvalidLifecycleEventHookExecutionIdException(v protocol.ResponseMetadata) error { return &InvalidLifecycleEventHookExecutionIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLifecycleEventHookExecutionIdException) Code() string { +func (s *InvalidLifecycleEventHookExecutionIdException) Code() string { return "InvalidLifecycleEventHookExecutionIdException" } // Message returns the exception's message. -func (s InvalidLifecycleEventHookExecutionIdException) Message() string { +func (s *InvalidLifecycleEventHookExecutionIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13282,29 +13604,29 @@ func (s InvalidLifecycleEventHookExecutionIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLifecycleEventHookExecutionIdException) OrigErr() error { +func (s *InvalidLifecycleEventHookExecutionIdException) OrigErr() error { return nil } -func (s InvalidLifecycleEventHookExecutionIdException) Error() string { +func (s *InvalidLifecycleEventHookExecutionIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLifecycleEventHookExecutionIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLifecycleEventHookExecutionIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLifecycleEventHookExecutionIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLifecycleEventHookExecutionIdException) RequestID() string { + return s.RespMetadata.RequestID } // The result of a Lambda validation function that verifies a lifecycle event // is invalid. It should return Succeeded or Failed. type InvalidLifecycleEventHookExecutionStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13321,17 +13643,17 @@ func (s InvalidLifecycleEventHookExecutionStatusException) GoString() string { func newErrorInvalidLifecycleEventHookExecutionStatusException(v protocol.ResponseMetadata) error { return &InvalidLifecycleEventHookExecutionStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLifecycleEventHookExecutionStatusException) Code() string { +func (s *InvalidLifecycleEventHookExecutionStatusException) Code() string { return "InvalidLifecycleEventHookExecutionStatusException" } // Message returns the exception's message. -func (s InvalidLifecycleEventHookExecutionStatusException) Message() string { +func (s *InvalidLifecycleEventHookExecutionStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13339,28 +13661,28 @@ func (s InvalidLifecycleEventHookExecutionStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLifecycleEventHookExecutionStatusException) OrigErr() error { +func (s *InvalidLifecycleEventHookExecutionStatusException) OrigErr() error { return nil } -func (s InvalidLifecycleEventHookExecutionStatusException) Error() string { +func (s *InvalidLifecycleEventHookExecutionStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLifecycleEventHookExecutionStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLifecycleEventHookExecutionStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLifecycleEventHookExecutionStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLifecycleEventHookExecutionStatusException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid load balancer name, or no load balancer name, was specified. type InvalidLoadBalancerInfoException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13377,17 +13699,17 @@ func (s InvalidLoadBalancerInfoException) GoString() string { func newErrorInvalidLoadBalancerInfoException(v protocol.ResponseMetadata) error { return &InvalidLoadBalancerInfoException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLoadBalancerInfoException) Code() string { +func (s *InvalidLoadBalancerInfoException) Code() string { return "InvalidLoadBalancerInfoException" } // Message returns the exception's message. -func (s InvalidLoadBalancerInfoException) Message() string { +func (s *InvalidLoadBalancerInfoException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13395,28 +13717,28 @@ func (s InvalidLoadBalancerInfoException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLoadBalancerInfoException) OrigErr() error { +func (s *InvalidLoadBalancerInfoException) OrigErr() error { return nil } -func (s InvalidLoadBalancerInfoException) Error() string { +func (s *InvalidLoadBalancerInfoException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLoadBalancerInfoException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLoadBalancerInfoException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLoadBalancerInfoException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLoadBalancerInfoException) RequestID() string { + return s.RespMetadata.RequestID } // The minimum healthy instance value was specified in an invalid format. type InvalidMinimumHealthyHostValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13433,17 +13755,17 @@ func (s InvalidMinimumHealthyHostValueException) GoString() string { func newErrorInvalidMinimumHealthyHostValueException(v protocol.ResponseMetadata) error { return &InvalidMinimumHealthyHostValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMinimumHealthyHostValueException) Code() string { +func (s *InvalidMinimumHealthyHostValueException) Code() string { return "InvalidMinimumHealthyHostValueException" } // Message returns the exception's message. -func (s InvalidMinimumHealthyHostValueException) Message() string { +func (s *InvalidMinimumHealthyHostValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13451,28 +13773,28 @@ func (s InvalidMinimumHealthyHostValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMinimumHealthyHostValueException) OrigErr() error { +func (s *InvalidMinimumHealthyHostValueException) OrigErr() error { return nil } -func (s InvalidMinimumHealthyHostValueException) Error() string { +func (s *InvalidMinimumHealthyHostValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMinimumHealthyHostValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMinimumHealthyHostValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMinimumHealthyHostValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMinimumHealthyHostValueException) RequestID() string { + return s.RespMetadata.RequestID } // The next token was specified in an invalid format. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13489,17 +13811,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13507,29 +13829,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, // but only one of these data types can be used in a single call. type InvalidOnPremisesTagCombinationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13546,17 +13868,17 @@ func (s InvalidOnPremisesTagCombinationException) GoString() string { func newErrorInvalidOnPremisesTagCombinationException(v protocol.ResponseMetadata) error { return &InvalidOnPremisesTagCombinationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOnPremisesTagCombinationException) Code() string { +func (s *InvalidOnPremisesTagCombinationException) Code() string { return "InvalidOnPremisesTagCombinationException" } // Message returns the exception's message. -func (s InvalidOnPremisesTagCombinationException) Message() string { +func (s *InvalidOnPremisesTagCombinationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13564,28 +13886,28 @@ func (s InvalidOnPremisesTagCombinationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOnPremisesTagCombinationException) OrigErr() error { +func (s *InvalidOnPremisesTagCombinationException) OrigErr() error { return nil } -func (s InvalidOnPremisesTagCombinationException) Error() string { +func (s *InvalidOnPremisesTagCombinationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOnPremisesTagCombinationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOnPremisesTagCombinationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOnPremisesTagCombinationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOnPremisesTagCombinationException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid operation was detected. type InvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13602,17 +13924,17 @@ func (s InvalidOperationException) GoString() string { func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { return &InvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOperationException) Code() string { +func (s *InvalidOperationException) Code() string { return "InvalidOperationException" } // Message returns the exception's message. -func (s InvalidOperationException) Message() string { +func (s *InvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13620,28 +13942,28 @@ func (s InvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOperationException) OrigErr() error { +func (s *InvalidOperationException) OrigErr() error { return nil } -func (s InvalidOperationException) Error() string { +func (s *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // The registration status was specified in an invalid format. type InvalidRegistrationStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13658,17 +13980,17 @@ func (s InvalidRegistrationStatusException) GoString() string { func newErrorInvalidRegistrationStatusException(v protocol.ResponseMetadata) error { return &InvalidRegistrationStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRegistrationStatusException) Code() string { +func (s *InvalidRegistrationStatusException) Code() string { return "InvalidRegistrationStatusException" } // Message returns the exception's message. -func (s InvalidRegistrationStatusException) Message() string { +func (s *InvalidRegistrationStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13676,28 +13998,28 @@ func (s InvalidRegistrationStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRegistrationStatusException) OrigErr() error { +func (s *InvalidRegistrationStatusException) OrigErr() error { return nil } -func (s InvalidRegistrationStatusException) Error() string { +func (s *InvalidRegistrationStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRegistrationStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRegistrationStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRegistrationStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRegistrationStatusException) RequestID() string { + return s.RespMetadata.RequestID } // The revision was specified in an invalid format. type InvalidRevisionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13714,17 +14036,17 @@ func (s InvalidRevisionException) GoString() string { func newErrorInvalidRevisionException(v protocol.ResponseMetadata) error { return &InvalidRevisionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRevisionException) Code() string { +func (s *InvalidRevisionException) Code() string { return "InvalidRevisionException" } // Message returns the exception's message. -func (s InvalidRevisionException) Message() string { +func (s *InvalidRevisionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13732,30 +14054,30 @@ func (s InvalidRevisionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRevisionException) OrigErr() error { +func (s *InvalidRevisionException) OrigErr() error { return nil } -func (s InvalidRevisionException) Error() string { +func (s *InvalidRevisionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRevisionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRevisionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRevisionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRevisionException) RequestID() string { + return s.RespMetadata.RequestID } // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate // permissions to Amazon EC2 Auto Scaling. type InvalidRoleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13772,17 +14094,17 @@ func (s InvalidRoleException) GoString() string { func newErrorInvalidRoleException(v protocol.ResponseMetadata) error { return &InvalidRoleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRoleException) Code() string { +func (s *InvalidRoleException) Code() string { return "InvalidRoleException" } // Message returns the exception's message. -func (s InvalidRoleException) Message() string { +func (s *InvalidRoleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13790,29 +14112,29 @@ func (s InvalidRoleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRoleException) OrigErr() error { +func (s *InvalidRoleException) OrigErr() error { return nil } -func (s InvalidRoleException) Error() string { +func (s *InvalidRoleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRoleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRoleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRoleException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRoleException) RequestID() string { + return s.RespMetadata.RequestID } // The column name to sort by is either not present or was specified in an invalid // format. type InvalidSortByException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13829,17 +14151,17 @@ func (s InvalidSortByException) GoString() string { func newErrorInvalidSortByException(v protocol.ResponseMetadata) error { return &InvalidSortByException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSortByException) Code() string { +func (s *InvalidSortByException) Code() string { return "InvalidSortByException" } // Message returns the exception's message. -func (s InvalidSortByException) Message() string { +func (s *InvalidSortByException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13847,28 +14169,28 @@ func (s InvalidSortByException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSortByException) OrigErr() error { +func (s *InvalidSortByException) OrigErr() error { return nil } -func (s InvalidSortByException) Error() string { +func (s *InvalidSortByException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSortByException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSortByException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSortByException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSortByException) RequestID() string { + return s.RespMetadata.RequestID } // The sort order was specified in an invalid format. type InvalidSortOrderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13885,17 +14207,17 @@ func (s InvalidSortOrderException) GoString() string { func newErrorInvalidSortOrderException(v protocol.ResponseMetadata) error { return &InvalidSortOrderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSortOrderException) Code() string { +func (s *InvalidSortOrderException) Code() string { return "InvalidSortOrderException" } // Message returns the exception's message. -func (s InvalidSortOrderException) Message() string { +func (s *InvalidSortOrderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13903,28 +14225,28 @@ func (s InvalidSortOrderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSortOrderException) OrigErr() error { +func (s *InvalidSortOrderException) OrigErr() error { return nil } -func (s InvalidSortOrderException) Error() string { +func (s *InvalidSortOrderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSortOrderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSortOrderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSortOrderException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSortOrderException) RequestID() string { + return s.RespMetadata.RequestID } // The tag was specified in an invalid format. type InvalidTagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13941,17 +14263,17 @@ func (s InvalidTagException) GoString() string { func newErrorInvalidTagException(v protocol.ResponseMetadata) error { return &InvalidTagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagException) Code() string { +func (s *InvalidTagException) Code() string { return "InvalidTagException" } // Message returns the exception's message. -func (s InvalidTagException) Message() string { +func (s *InvalidTagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13959,28 +14281,28 @@ func (s InvalidTagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagException) OrigErr() error { +func (s *InvalidTagException) OrigErr() error { return nil } -func (s InvalidTagException) Error() string { +func (s *InvalidTagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagException) RequestID() string { + return s.RespMetadata.RequestID } // The tag filter was specified in an invalid format. type InvalidTagFilterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13997,17 +14319,17 @@ func (s InvalidTagFilterException) GoString() string { func newErrorInvalidTagFilterException(v protocol.ResponseMetadata) error { return &InvalidTagFilterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagFilterException) Code() string { +func (s *InvalidTagFilterException) Code() string { return "InvalidTagFilterException" } // Message returns the exception's message. -func (s InvalidTagFilterException) Message() string { +func (s *InvalidTagFilterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14015,28 +14337,28 @@ func (s InvalidTagFilterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagFilterException) OrigErr() error { +func (s *InvalidTagFilterException) OrigErr() error { return nil } -func (s InvalidTagFilterException) Error() string { +func (s *InvalidTagFilterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagFilterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagFilterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagFilterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagFilterException) RequestID() string { + return s.RespMetadata.RequestID } // The specified tags are not valid. type InvalidTagsToAddException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14053,17 +14375,17 @@ func (s InvalidTagsToAddException) GoString() string { func newErrorInvalidTagsToAddException(v protocol.ResponseMetadata) error { return &InvalidTagsToAddException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagsToAddException) Code() string { +func (s *InvalidTagsToAddException) Code() string { return "InvalidTagsToAddException" } // Message returns the exception's message. -func (s InvalidTagsToAddException) Message() string { +func (s *InvalidTagsToAddException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14071,28 +14393,28 @@ func (s InvalidTagsToAddException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagsToAddException) OrigErr() error { +func (s *InvalidTagsToAddException) OrigErr() error { return nil } -func (s InvalidTagsToAddException) Error() string { +func (s *InvalidTagsToAddException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagsToAddException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagsToAddException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagsToAddException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagsToAddException) RequestID() string { + return s.RespMetadata.RequestID } // The target filter name is invalid. type InvalidTargetFilterNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14109,17 +14431,17 @@ func (s InvalidTargetFilterNameException) GoString() string { func newErrorInvalidTargetFilterNameException(v protocol.ResponseMetadata) error { return &InvalidTargetFilterNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetFilterNameException) Code() string { +func (s *InvalidTargetFilterNameException) Code() string { return "InvalidTargetFilterNameException" } // Message returns the exception's message. -func (s InvalidTargetFilterNameException) Message() string { +func (s *InvalidTargetFilterNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14127,28 +14449,28 @@ func (s InvalidTargetFilterNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetFilterNameException) OrigErr() error { +func (s *InvalidTargetFilterNameException) OrigErr() error { return nil } -func (s InvalidTargetFilterNameException) Error() string { +func (s *InvalidTargetFilterNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetFilterNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetFilterNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetFilterNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetFilterNameException) RequestID() string { + return s.RespMetadata.RequestID } // A target group pair associated with this deployment is not valid. type InvalidTargetGroupPairException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14165,17 +14487,17 @@ func (s InvalidTargetGroupPairException) GoString() string { func newErrorInvalidTargetGroupPairException(v protocol.ResponseMetadata) error { return &InvalidTargetGroupPairException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetGroupPairException) Code() string { +func (s *InvalidTargetGroupPairException) Code() string { return "InvalidTargetGroupPairException" } // Message returns the exception's message. -func (s InvalidTargetGroupPairException) Message() string { +func (s *InvalidTargetGroupPairException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14183,22 +14505,22 @@ func (s InvalidTargetGroupPairException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetGroupPairException) OrigErr() error { +func (s *InvalidTargetGroupPairException) OrigErr() error { return nil } -func (s InvalidTargetGroupPairException) Error() string { +func (s *InvalidTargetGroupPairException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetGroupPairException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetGroupPairException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetGroupPairException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetGroupPairException) RequestID() string { + return s.RespMetadata.RequestID } // The target instance configuration is invalid. Possible causes include: @@ -14212,8 +14534,8 @@ func (s InvalidTargetGroupPairException) RequestID() string { // // * A specified tag is not currently applied to any instances. type InvalidTargetInstancesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14230,17 +14552,17 @@ func (s InvalidTargetInstancesException) GoString() string { func newErrorInvalidTargetInstancesException(v protocol.ResponseMetadata) error { return &InvalidTargetInstancesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetInstancesException) Code() string { +func (s *InvalidTargetInstancesException) Code() string { return "InvalidTargetInstancesException" } // Message returns the exception's message. -func (s InvalidTargetInstancesException) Message() string { +func (s *InvalidTargetInstancesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14248,28 +14570,28 @@ func (s InvalidTargetInstancesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetInstancesException) OrigErr() error { +func (s *InvalidTargetInstancesException) OrigErr() error { return nil } -func (s InvalidTargetInstancesException) Error() string { +func (s *InvalidTargetInstancesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetInstancesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetInstancesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetInstancesException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetInstancesException) RequestID() string { + return s.RespMetadata.RequestID } // The specified time range was specified in an invalid format. type InvalidTimeRangeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14286,17 +14608,17 @@ func (s InvalidTimeRangeException) GoString() string { func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error { return &InvalidTimeRangeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTimeRangeException) Code() string { +func (s *InvalidTimeRangeException) Code() string { return "InvalidTimeRangeException" } // Message returns the exception's message. -func (s InvalidTimeRangeException) Message() string { +func (s *InvalidTimeRangeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14304,29 +14626,29 @@ func (s InvalidTimeRangeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTimeRangeException) OrigErr() error { +func (s *InvalidTimeRangeException) OrigErr() error { return nil } -func (s InvalidTimeRangeException) Error() string { +func (s *InvalidTimeRangeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTimeRangeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTimeRangeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTimeRangeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTimeRangeException) RequestID() string { + return s.RespMetadata.RequestID } // The configuration that specifies how traffic is routed during a deployment // is invalid. type InvalidTrafficRoutingConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14343,17 +14665,17 @@ func (s InvalidTrafficRoutingConfigurationException) GoString() string { func newErrorInvalidTrafficRoutingConfigurationException(v protocol.ResponseMetadata) error { return &InvalidTrafficRoutingConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTrafficRoutingConfigurationException) Code() string { +func (s *InvalidTrafficRoutingConfigurationException) Code() string { return "InvalidTrafficRoutingConfigurationException" } // Message returns the exception's message. -func (s InvalidTrafficRoutingConfigurationException) Message() string { +func (s *InvalidTrafficRoutingConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14361,28 +14683,28 @@ func (s InvalidTrafficRoutingConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTrafficRoutingConfigurationException) OrigErr() error { +func (s *InvalidTrafficRoutingConfigurationException) OrigErr() error { return nil } -func (s InvalidTrafficRoutingConfigurationException) Error() string { +func (s *InvalidTrafficRoutingConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTrafficRoutingConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTrafficRoutingConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTrafficRoutingConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTrafficRoutingConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // The trigger was specified in an invalid format. type InvalidTriggerConfigException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14399,17 +14721,17 @@ func (s InvalidTriggerConfigException) GoString() string { func newErrorInvalidTriggerConfigException(v protocol.ResponseMetadata) error { return &InvalidTriggerConfigException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTriggerConfigException) Code() string { +func (s *InvalidTriggerConfigException) Code() string { return "InvalidTriggerConfigException" } // Message returns the exception's message. -func (s InvalidTriggerConfigException) Message() string { +func (s *InvalidTriggerConfigException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14417,29 +14739,29 @@ func (s InvalidTriggerConfigException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTriggerConfigException) OrigErr() error { +func (s *InvalidTriggerConfigException) OrigErr() error { return nil } -func (s InvalidTriggerConfigException) Error() string { +func (s *InvalidTriggerConfigException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTriggerConfigException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTriggerConfigException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTriggerConfigException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTriggerConfigException) RequestID() string { + return s.RespMetadata.RequestID } // The UpdateOutdatedInstancesOnly value is invalid. For AWS Lambda deployments, // false is expected. For EC2/On-premises deployments, true or false is expected. type InvalidUpdateOutdatedInstancesOnlyValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14456,17 +14778,17 @@ func (s InvalidUpdateOutdatedInstancesOnlyValueException) GoString() string { func newErrorInvalidUpdateOutdatedInstancesOnlyValueException(v protocol.ResponseMetadata) error { return &InvalidUpdateOutdatedInstancesOnlyValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidUpdateOutdatedInstancesOnlyValueException) Code() string { +func (s *InvalidUpdateOutdatedInstancesOnlyValueException) Code() string { return "InvalidUpdateOutdatedInstancesOnlyValueException" } // Message returns the exception's message. -func (s InvalidUpdateOutdatedInstancesOnlyValueException) Message() string { +func (s *InvalidUpdateOutdatedInstancesOnlyValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14474,22 +14796,22 @@ func (s InvalidUpdateOutdatedInstancesOnlyValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidUpdateOutdatedInstancesOnlyValueException) OrigErr() error { +func (s *InvalidUpdateOutdatedInstancesOnlyValueException) OrigErr() error { return nil } -func (s InvalidUpdateOutdatedInstancesOnlyValueException) Error() string { +func (s *InvalidUpdateOutdatedInstancesOnlyValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidUpdateOutdatedInstancesOnlyValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidUpdateOutdatedInstancesOnlyValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidUpdateOutdatedInstancesOnlyValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidUpdateOutdatedInstancesOnlyValueException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a Lambda function specified in a deployment. @@ -14499,8 +14821,9 @@ type LambdaFunctionInfo struct { // The version of a Lambda function that production traffic points to. CurrentVersion *string `locationName:"currentVersion" type:"string"` - // The alias of a Lambda function. For more information, see Introduction to - // AWS Lambda Aliases (https://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). + // The alias of a Lambda function. For more information, see AWS Lambda Function + // Aliases (https://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html) + // in the AWS Lambda Developer Guide. FunctionAlias *string `locationName:"functionAlias" type:"string"` // The name of a Lambda function. @@ -14574,7 +14897,7 @@ type LambdaTarget struct { // The status an AWS Lambda deployment's target Lambda function. Status *string `locationName:"status" type:"string" enum:"TargetStatus"` - // The ARN of the target. + // The Amazon Resource Name (ARN) of the target. TargetArn *string `locationName:"targetArn" type:"string"` // The unique ID of a deployment target that has a type of lambdaTarget. @@ -14762,8 +15085,8 @@ func (s *LifecycleEvent) SetStatus(v string) *LifecycleEvent { // An attempt to return the status of an already completed lifecycle event occurred. type LifecycleEventAlreadyCompletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14780,17 +15103,17 @@ func (s LifecycleEventAlreadyCompletedException) GoString() string { func newErrorLifecycleEventAlreadyCompletedException(v protocol.ResponseMetadata) error { return &LifecycleEventAlreadyCompletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LifecycleEventAlreadyCompletedException) Code() string { +func (s *LifecycleEventAlreadyCompletedException) Code() string { return "LifecycleEventAlreadyCompletedException" } // Message returns the exception's message. -func (s LifecycleEventAlreadyCompletedException) Message() string { +func (s *LifecycleEventAlreadyCompletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14798,28 +15121,28 @@ func (s LifecycleEventAlreadyCompletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LifecycleEventAlreadyCompletedException) OrigErr() error { +func (s *LifecycleEventAlreadyCompletedException) OrigErr() error { return nil } -func (s LifecycleEventAlreadyCompletedException) Error() string { +func (s *LifecycleEventAlreadyCompletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LifecycleEventAlreadyCompletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LifecycleEventAlreadyCompletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LifecycleEventAlreadyCompletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *LifecycleEventAlreadyCompletedException) RequestID() string { + return s.RespMetadata.RequestID } // The limit for lifecycle hooks was exceeded. type LifecycleHookLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14836,17 +15159,17 @@ func (s LifecycleHookLimitExceededException) GoString() string { func newErrorLifecycleHookLimitExceededException(v protocol.ResponseMetadata) error { return &LifecycleHookLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LifecycleHookLimitExceededException) Code() string { +func (s *LifecycleHookLimitExceededException) Code() string { return "LifecycleHookLimitExceededException" } // Message returns the exception's message. -func (s LifecycleHookLimitExceededException) Message() string { +func (s *LifecycleHookLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14854,22 +15177,22 @@ func (s LifecycleHookLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LifecycleHookLimitExceededException) OrigErr() error { +func (s *LifecycleHookLimitExceededException) OrigErr() error { return nil } -func (s LifecycleHookLimitExceededException) Error() string { +func (s *LifecycleHookLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LifecycleHookLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LifecycleHookLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LifecycleHookLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LifecycleHookLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a ListApplicationRevisions operation. @@ -14883,7 +15206,7 @@ type ListApplicationRevisionsInput struct { ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` // Whether to list revisions based on whether the revision is the target revision - // of an deployment group: + // of a deployment group: // // * include: List revisions that are target revisions of a deployment group. // @@ -15469,6 +15792,10 @@ type ListDeploymentsInput struct { // If it is not specified, then applicationName must not be specified. DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` + // The unique ID of an external resource for returning deployments linked to + // the external resource. + ExternalId *string `locationName:"externalId" type:"string"` + // A subset of deployments to list by status: // // * Created: Include created deployments in the resulting list. @@ -15533,6 +15860,12 @@ func (s *ListDeploymentsInput) SetDeploymentGroupName(v string) *ListDeployments return s } +// SetExternalId sets the ExternalId field's value. +func (s *ListDeploymentsInput) SetExternalId(v string) *ListDeploymentsInput { + s.ExternalId = &v + return s +} + // SetIncludeOnlyStatuses sets the IncludeOnlyStatuses field's value. func (s *ListDeploymentsInput) SetIncludeOnlyStatuses(v []*string) *ListDeploymentsInput { s.IncludeOnlyStatuses = v @@ -15870,16 +16203,16 @@ type MinimumHealthyHosts struct { // The minimum healthy instance type: // - // * HOST_COUNT: The minimum number of healthy instance as an absolute value. + // * HOST_COUNT: The minimum number of healthy instances as an absolute value. // - // * FLEET_PERCENT: The minimum number of healthy instance as a percentage - // of the total number of instance in the deployment. + // * FLEET_PERCENT: The minimum number of healthy instances as a percentage + // of the total number of instances in the deployment. // - // In an example of nine instance, if a HOST_COUNT of six is specified, deploy + // In an example of nine instances, if a HOST_COUNT of six is specified, deploy // to up to three instances at a time. The deployment is successful if six or // more instances are deployed to successfully. Otherwise, the deployment fails. - // If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a - // time. The deployment is successful if four or more instance are deployed + // If a FLEET_PERCENT of 40 is specified, deploy to up to five instances at + // a time. The deployment is successful if four or more instances are deployed // to successfully. Otherwise, the deployment fails. // // In a call to the GetDeploymentConfig, CodeDeployDefault.OneAtATime returns @@ -15925,8 +16258,8 @@ func (s *MinimumHealthyHosts) SetValue(v int64) *MinimumHealthyHosts { // Both an IAM user ARN and an IAM session ARN were included in the request. // Use only one ARN type. type MultipleIamArnsProvidedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15943,17 +16276,17 @@ func (s MultipleIamArnsProvidedException) GoString() string { func newErrorMultipleIamArnsProvidedException(v protocol.ResponseMetadata) error { return &MultipleIamArnsProvidedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MultipleIamArnsProvidedException) Code() string { +func (s *MultipleIamArnsProvidedException) Code() string { return "MultipleIamArnsProvidedException" } // Message returns the exception's message. -func (s MultipleIamArnsProvidedException) Message() string { +func (s *MultipleIamArnsProvidedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15961,22 +16294,22 @@ func (s MultipleIamArnsProvidedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MultipleIamArnsProvidedException) OrigErr() error { +func (s *MultipleIamArnsProvidedException) OrigErr() error { return nil } -func (s MultipleIamArnsProvidedException) Error() string { +func (s *MultipleIamArnsProvidedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MultipleIamArnsProvidedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MultipleIamArnsProvidedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MultipleIamArnsProvidedException) RequestID() string { - return s.respMetadata.RequestID +func (s *MultipleIamArnsProvidedException) RequestID() string { + return s.RespMetadata.RequestID } // Information about groups of on-premises instance tags. @@ -16007,8 +16340,8 @@ func (s *OnPremisesTagSet) SetOnPremisesTagSetList(v [][]*TagFilter) *OnPremises // The API used does not support the deployment. type OperationNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16025,17 +16358,17 @@ func (s OperationNotSupportedException) GoString() string { func newErrorOperationNotSupportedException(v protocol.ResponseMetadata) error { return &OperationNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotSupportedException) Code() string { +func (s *OperationNotSupportedException) Code() string { return "OperationNotSupportedException" } // Message returns the exception's message. -func (s OperationNotSupportedException) Message() string { +func (s *OperationNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16043,22 +16376,22 @@ func (s OperationNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotSupportedException) OrigErr() error { +func (s *OperationNotSupportedException) OrigErr() error { return nil } -func (s OperationNotSupportedException) Error() string { +func (s *OperationNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } type PutLifecycleEventHookExecutionStatusInput struct { @@ -16389,8 +16722,8 @@ func (s RemoveTagsFromOnPremisesInstancesOutput) GoString() string { // The ARN of a resource is required, but was not found. type ResourceArnRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16407,17 +16740,17 @@ func (s ResourceArnRequiredException) GoString() string { func newErrorResourceArnRequiredException(v protocol.ResponseMetadata) error { return &ResourceArnRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceArnRequiredException) Code() string { +func (s *ResourceArnRequiredException) Code() string { return "ResourceArnRequiredException" } // Message returns the exception's message. -func (s ResourceArnRequiredException) Message() string { +func (s *ResourceArnRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16425,28 +16758,28 @@ func (s ResourceArnRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceArnRequiredException) OrigErr() error { +func (s *ResourceArnRequiredException) OrigErr() error { return nil } -func (s ResourceArnRequiredException) Error() string { +func (s *ResourceArnRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceArnRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceArnRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceArnRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceArnRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource could not be validated. type ResourceValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16463,17 +16796,17 @@ func (s ResourceValidationException) GoString() string { func newErrorResourceValidationException(v protocol.ResponseMetadata) error { return &ResourceValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceValidationException) Code() string { +func (s *ResourceValidationException) Code() string { return "ResourceValidationException" } // Message returns the exception's message. -func (s ResourceValidationException) Message() string { +func (s *ResourceValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16481,28 +16814,28 @@ func (s ResourceValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceValidationException) OrigErr() error { +func (s *ResourceValidationException) OrigErr() error { return nil } -func (s ResourceValidationException) Error() string { +func (s *ResourceValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceValidationException) RequestID() string { + return s.RespMetadata.RequestID } // The named revision does not exist with the IAM user or AWS account. type RevisionDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16519,17 +16852,17 @@ func (s RevisionDoesNotExistException) GoString() string { func newErrorRevisionDoesNotExistException(v protocol.ResponseMetadata) error { return &RevisionDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RevisionDoesNotExistException) Code() string { +func (s *RevisionDoesNotExistException) Code() string { return "RevisionDoesNotExistException" } // Message returns the exception's message. -func (s RevisionDoesNotExistException) Message() string { +func (s *RevisionDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16537,22 +16870,22 @@ func (s RevisionDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RevisionDoesNotExistException) OrigErr() error { +func (s *RevisionDoesNotExistException) OrigErr() error { return nil } -func (s RevisionDoesNotExistException) Error() string { +func (s *RevisionDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RevisionDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RevisionDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RevisionDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *RevisionDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Information about an application revision. @@ -16609,6 +16942,10 @@ type RevisionLocation struct { // // * String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments // only). + // + // * AppSpecContent: An AppSpecContent object that contains the contents + // of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content + // is formatted as JSON or YAML stored as a RawString. RevisionType *string `locationName:"revisionType" type:"string" enum:"RevisionLocationType"` // Information about the location of a revision stored in Amazon S3. @@ -16661,8 +16998,8 @@ func (s *RevisionLocation) SetString_(v *RawString) *RevisionLocation { // The revision ID was not specified. type RevisionRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16679,17 +17016,17 @@ func (s RevisionRequiredException) GoString() string { func newErrorRevisionRequiredException(v protocol.ResponseMetadata) error { return &RevisionRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RevisionRequiredException) Code() string { +func (s *RevisionRequiredException) Code() string { return "RevisionRequiredException" } // Message returns the exception's message. -func (s RevisionRequiredException) Message() string { +func (s *RevisionRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16697,28 +17034,28 @@ func (s RevisionRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RevisionRequiredException) OrigErr() error { +func (s *RevisionRequiredException) OrigErr() error { return nil } -func (s RevisionRequiredException) Error() string { +func (s *RevisionRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RevisionRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RevisionRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RevisionRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RevisionRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The role ID was not specified. type RoleRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16735,17 +17072,17 @@ func (s RoleRequiredException) GoString() string { func newErrorRoleRequiredException(v protocol.ResponseMetadata) error { return &RoleRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RoleRequiredException) Code() string { +func (s *RoleRequiredException) Code() string { return "RoleRequiredException" } // Message returns the exception's message. -func (s RoleRequiredException) Message() string { +func (s *RoleRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16753,22 +17090,22 @@ func (s RoleRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RoleRequiredException) OrigErr() error { +func (s *RoleRequiredException) OrigErr() error { return nil } -func (s RoleRequiredException) Error() string { +func (s *RoleRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RoleRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RoleRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RoleRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *RoleRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a deployment rollback. @@ -17099,8 +17436,8 @@ func (s *TagFilter) SetValue(v string) *TagFilter { // The maximum allowed number of tags was exceeded. type TagLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17117,17 +17454,17 @@ func (s TagLimitExceededException) GoString() string { func newErrorTagLimitExceededException(v protocol.ResponseMetadata) error { return &TagLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagLimitExceededException) Code() string { +func (s *TagLimitExceededException) Code() string { return "TagLimitExceededException" } // Message returns the exception's message. -func (s TagLimitExceededException) Message() string { +func (s *TagLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17135,28 +17472,28 @@ func (s TagLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagLimitExceededException) OrigErr() error { +func (s *TagLimitExceededException) OrigErr() error { return nil } -func (s TagLimitExceededException) Error() string { +func (s *TagLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A tag was not specified. type TagRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17173,17 +17510,17 @@ func (s TagRequiredException) GoString() string { func newErrorTagRequiredException(v protocol.ResponseMetadata) error { return &TagRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagRequiredException) Code() string { +func (s *TagRequiredException) Code() string { return "TagRequiredException" } // Message returns the exception's message. -func (s TagRequiredException) Message() string { +func (s *TagRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17191,22 +17528,22 @@ func (s TagRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagRequiredException) OrigErr() error { +func (s *TagRequiredException) OrigErr() error { return nil } -func (s TagRequiredException) Error() string { +func (s *TagRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagRequiredException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -17282,8 +17619,8 @@ func (s TagResourceOutput) GoString() string { // The number of tag groups included in the tag set list exceeded the maximum // allowed limit of 3. type TagSetListLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17300,17 +17637,17 @@ func (s TagSetListLimitExceededException) GoString() string { func newErrorTagSetListLimitExceededException(v protocol.ResponseMetadata) error { return &TagSetListLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagSetListLimitExceededException) Code() string { +func (s *TagSetListLimitExceededException) Code() string { return "TagSetListLimitExceededException" } // Message returns the exception's message. -func (s TagSetListLimitExceededException) Message() string { +func (s *TagSetListLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17318,22 +17655,22 @@ func (s TagSetListLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagSetListLimitExceededException) OrigErr() error { +func (s *TagSetListLimitExceededException) OrigErr() error { return nil } -func (s TagSetListLimitExceededException) Error() string { +func (s *TagSetListLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagSetListLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagSetListLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagSetListLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagSetListLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a target group in Elastic Load Balancing to use in a deployment. @@ -17465,8 +17802,8 @@ func (s *TargetInstances) SetTagFilters(v []*EC2TagFilter) *TargetInstances { // An API function was called too frequently. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17483,17 +17820,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17501,27 +17838,28 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // A configuration that shifts traffic from one version of a Lambda function -// to another in two increments. The original and target Lambda function versions -// are specified in the deployment's AppSpec file. +// or ECS task set to another in two increments. The original and target Lambda +// function versions or ECS task sets are specified in the deployment's AppSpec +// file. type TimeBasedCanary struct { _ struct{} `type:"structure"` @@ -17557,9 +17895,9 @@ func (s *TimeBasedCanary) SetCanaryPercentage(v int64) *TimeBasedCanary { } // A configuration that shifts traffic from one version of a Lambda function -// to another in equal increments, with an equal number of minutes between each -// increment. The original and target Lambda function versions are specified -// in the deployment's AppSpec file. +// or ECS task set to another in equal increments, with an equal number of minutes +// between each increment. The original and target Lambda function versions +// or ECS task sets are specified in the deployment's AppSpec file. type TimeBasedLinear struct { _ struct{} `type:"structure"` @@ -17636,9 +17974,9 @@ func (s *TimeRange) SetStart(v time.Time) *TimeRange { type TrafficRoute struct { _ struct{} `type:"structure"` - // The ARN of one listener. The listener identifies the route between a target - // group and a load balancer. This is an array of strings with a maximum size - // of one. + // The Amazon Resource Name (ARN) of one listener. The listener identifies the + // route between a target group and a load balancer. This is an array of strings + // with a maximum size of one. ListenerArns []*string `locationName:"listenerArns" type:"list"` } @@ -17659,23 +17997,25 @@ func (s *TrafficRoute) SetListenerArns(v []*string) *TrafficRoute { } // The configuration that specifies how traffic is shifted from one version -// of a Lambda function to another version during an AWS Lambda deployment. +// of a Lambda function to another version during an AWS Lambda deployment, +// or from one Amazon ECS task set to another during an Amazon ECS deployment. type TrafficRoutingConfig struct { _ struct{} `type:"structure"` // A configuration that shifts traffic from one version of a Lambda function - // to another in two increments. The original and target Lambda function versions - // are specified in the deployment's AppSpec file. + // or ECS task set to another in two increments. The original and target Lambda + // function versions or ECS task sets are specified in the deployment's AppSpec + // file. TimeBasedCanary *TimeBasedCanary `locationName:"timeBasedCanary" type:"structure"` // A configuration that shifts traffic from one version of a Lambda function - // to another in equal increments, with an equal number of minutes between each - // increment. The original and target Lambda function versions are specified - // in the deployment's AppSpec file. + // or ECS task set to another in equal increments, with an equal number of minutes + // between each increment. The original and target Lambda function versions + // or ECS task sets are specified in the deployment's AppSpec file. TimeBasedLinear *TimeBasedLinear `locationName:"timeBasedLinear" type:"structure"` // The type of traffic shifting (TimeBasedCanary or TimeBasedLinear) used by - // a deployment configuration . + // a deployment configuration. Type *string `locationName:"type" type:"string" enum:"TrafficRoutingType"` } @@ -17717,8 +18057,9 @@ type TriggerConfig struct { // The name of the notification trigger. TriggerName *string `locationName:"triggerName" type:"string"` - // The ARN of the Amazon Simple Notification Service topic through which notifications - // about deployment or instance events are sent. + // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service + // topic through which notifications about deployment or instance events are + // sent. TriggerTargetArn *string `locationName:"triggerTargetArn" type:"string"` } @@ -17752,8 +18093,8 @@ func (s *TriggerConfig) SetTriggerTargetArn(v string) *TriggerConfig { // The maximum allowed number of triggers was exceeded. type TriggerTargetsLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17770,17 +18111,17 @@ func (s TriggerTargetsLimitExceededException) GoString() string { func newErrorTriggerTargetsLimitExceededException(v protocol.ResponseMetadata) error { return &TriggerTargetsLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TriggerTargetsLimitExceededException) Code() string { +func (s *TriggerTargetsLimitExceededException) Code() string { return "TriggerTargetsLimitExceededException" } // Message returns the exception's message. -func (s TriggerTargetsLimitExceededException) Message() string { +func (s *TriggerTargetsLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17788,28 +18129,28 @@ func (s TriggerTargetsLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TriggerTargetsLimitExceededException) OrigErr() error { +func (s *TriggerTargetsLimitExceededException) OrigErr() error { return nil } -func (s TriggerTargetsLimitExceededException) Error() string { +func (s *TriggerTargetsLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TriggerTargetsLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TriggerTargetsLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TriggerTargetsLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TriggerTargetsLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A call was submitted that is not supported for the specified deployment type. type UnsupportedActionForDeploymentTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17826,17 +18167,17 @@ func (s UnsupportedActionForDeploymentTypeException) GoString() string { func newErrorUnsupportedActionForDeploymentTypeException(v protocol.ResponseMetadata) error { return &UnsupportedActionForDeploymentTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedActionForDeploymentTypeException) Code() string { +func (s *UnsupportedActionForDeploymentTypeException) Code() string { return "UnsupportedActionForDeploymentTypeException" } // Message returns the exception's message. -func (s UnsupportedActionForDeploymentTypeException) Message() string { +func (s *UnsupportedActionForDeploymentTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17844,29 +18185,29 @@ func (s UnsupportedActionForDeploymentTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedActionForDeploymentTypeException) OrigErr() error { +func (s *UnsupportedActionForDeploymentTypeException) OrigErr() error { return nil } -func (s UnsupportedActionForDeploymentTypeException) Error() string { +func (s *UnsupportedActionForDeploymentTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedActionForDeploymentTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedActionForDeploymentTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedActionForDeploymentTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedActionForDeploymentTypeException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { _ struct{} `type:"structure"` - // The ARN that specifies from which resource to disassociate the tags with - // the keys in the TagKeys input paramter. + // The Amazon Resource Name (ARN) that specifies from which resource to disassociate + // the tags with the keys in the TagKeys input parameter. // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -18069,7 +18410,7 @@ type UpdateDeploymentGroupInput struct { ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` // Information about triggers to change when the deployment group is updated. - // For examples, see Modify Triggers in an AWS CodeDeploy Deployment Group (https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html) + // For examples, see Edit a Trigger in a CodeDeploy Deployment Group (https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html) // in the AWS CodeDeploy User Guide. TriggerConfigurations []*TriggerConfig `locationName:"triggerConfigurations" type:"list"` } @@ -18301,6 +18642,15 @@ const ( // DeploymentCreatorCodeDeployRollback is a DeploymentCreator enum value DeploymentCreatorCodeDeployRollback = "codeDeployRollback" + + // DeploymentCreatorCodeDeploy is a DeploymentCreator enum value + DeploymentCreatorCodeDeploy = "CodeDeploy" + + // DeploymentCreatorCloudFormation is a DeploymentCreator enum value + DeploymentCreatorCloudFormation = "CloudFormation" + + // DeploymentCreatorCloudFormationRollback is a DeploymentCreator enum value + DeploymentCreatorCloudFormationRollback = "CloudFormationRollback" ) const ( @@ -18329,6 +18679,9 @@ const ( // DeploymentStatusInProgress is a DeploymentStatus enum value DeploymentStatusInProgress = "InProgress" + // DeploymentStatusBaking is a DeploymentStatus enum value + DeploymentStatusBaking = "Baking" + // DeploymentStatusSucceeded is a DeploymentStatus enum value DeploymentStatusSucceeded = "Succeeded" @@ -18351,6 +18704,9 @@ const ( // DeploymentTargetTypeEcstarget is a DeploymentTargetType enum value DeploymentTargetTypeEcstarget = "ECSTarget" + + // DeploymentTargetTypeCloudFormationTarget is a DeploymentTargetType enum value + DeploymentTargetTypeCloudFormationTarget = "CloudFormationTarget" ) const ( @@ -18479,6 +18835,9 @@ const ( // ErrorCodeTimeout is a ErrorCode enum value ErrorCodeTimeout = "TIMEOUT" + + // ErrorCodeCloudformationStackFailure is a ErrorCode enum value + ErrorCodeCloudformationStackFailure = "CLOUDFORMATION_STACK_FAILURE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go index 89a7dac6881..11057d7b21e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go @@ -68,7 +68,7 @@ const ( // "DeploymentConfigAlreadyExistsException". // // A deployment configuration with the specified name with the IAM user or AWS - // account already exists . + // account already exists. ErrCodeDeploymentConfigAlreadyExistsException = "DeploymentConfigAlreadyExistsException" // ErrCodeDeploymentConfigDoesNotExistException for service response error code @@ -318,7 +318,8 @@ const ( // ErrCodeInvalidComputePlatformException for service response error code // "InvalidComputePlatformException". // - // The computePlatform is invalid. The computePlatform should be Lambda or Server. + // The computePlatform is invalid. The computePlatform should be Lambda, Server, + // or ECS. ErrCodeInvalidComputePlatformException = "InvalidComputePlatformException" // ErrCodeInvalidDeployedStateFilterException for service response error code @@ -397,6 +398,12 @@ const ( // The Amazon ECS service identifier is not valid. ErrCodeInvalidECSServiceException = "InvalidECSServiceException" + // ErrCodeInvalidExternalIdException for service response error code + // "InvalidExternalIdException". + // + // The external ID was specified in an invalid format. + ErrCodeInvalidExternalIdException = "InvalidExternalIdException" + // ErrCodeInvalidFileExistsBehaviorException for service response error code // "InvalidFileExistsBehaviorException". // @@ -772,6 +779,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "InvalidEC2TagCombinationException": newErrorInvalidEC2TagCombinationException, "InvalidEC2TagException": newErrorInvalidEC2TagException, "InvalidECSServiceException": newErrorInvalidECSServiceException, + "InvalidExternalIdException": newErrorInvalidExternalIdException, "InvalidFileExistsBehaviorException": newErrorInvalidFileExistsBehaviorException, "InvalidGitHubAccountTokenException": newErrorInvalidGitHubAccountTokenException, "InvalidGitHubAccountTokenNameException": newErrorInvalidGitHubAccountTokenNameException, 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 49b9395f614..0c40af453e0 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 @@ -4684,8 +4684,8 @@ func (s *ActionExecutionResult) SetExternalExecutionUrl(v string) *ActionExecuti // The specified action cannot be found. type ActionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4702,17 +4702,17 @@ func (s ActionNotFoundException) GoString() string { func newErrorActionNotFoundException(v protocol.ResponseMetadata) error { return &ActionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActionNotFoundException) Code() string { +func (s *ActionNotFoundException) Code() string { return "ActionNotFoundException" } // Message returns the exception's message. -func (s ActionNotFoundException) Message() string { +func (s *ActionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4720,22 +4720,22 @@ func (s ActionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActionNotFoundException) OrigErr() error { +func (s *ActionNotFoundException) OrigErr() error { return nil } -func (s ActionNotFoundException) Error() string { +func (s *ActionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ActionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ActionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about the version (or revision) of an action. @@ -5037,8 +5037,8 @@ func (s *ActionTypeId) SetVersion(v string) *ActionTypeId { // The specified action type cannot be found. type ActionTypeNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5055,17 +5055,17 @@ func (s ActionTypeNotFoundException) GoString() string { func newErrorActionTypeNotFoundException(v protocol.ResponseMetadata) error { return &ActionTypeNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActionTypeNotFoundException) Code() string { +func (s *ActionTypeNotFoundException) Code() string { return "ActionTypeNotFoundException" } // Message returns the exception's message. -func (s ActionTypeNotFoundException) Message() string { +func (s *ActionTypeNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5073,22 +5073,22 @@ func (s ActionTypeNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActionTypeNotFoundException) OrigErr() error { +func (s *ActionTypeNotFoundException) OrigErr() error { return nil } -func (s ActionTypeNotFoundException) Error() string { +func (s *ActionTypeNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ActionTypeNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActionTypeNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActionTypeNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ActionTypeNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about the settings for an action type. @@ -5176,8 +5176,8 @@ func (s *ActionTypeSettings) SetThirdPartyConfigurationUrl(v string) *ActionType // The approval action has already been approved or rejected. type ApprovalAlreadyCompletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5194,17 +5194,17 @@ func (s ApprovalAlreadyCompletedException) GoString() string { func newErrorApprovalAlreadyCompletedException(v protocol.ResponseMetadata) error { return &ApprovalAlreadyCompletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ApprovalAlreadyCompletedException) Code() string { +func (s *ApprovalAlreadyCompletedException) Code() string { return "ApprovalAlreadyCompletedException" } // Message returns the exception's message. -func (s ApprovalAlreadyCompletedException) Message() string { +func (s *ApprovalAlreadyCompletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5212,22 +5212,22 @@ func (s ApprovalAlreadyCompletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ApprovalAlreadyCompletedException) OrigErr() error { +func (s *ApprovalAlreadyCompletedException) OrigErr() error { return nil } -func (s ApprovalAlreadyCompletedException) Error() string { +func (s *ApprovalAlreadyCompletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ApprovalAlreadyCompletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ApprovalAlreadyCompletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ApprovalAlreadyCompletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ApprovalAlreadyCompletedException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about the result of an approval request. @@ -5661,8 +5661,8 @@ func (s *BlockerDeclaration) SetType(v string) *BlockerDeclaration { // Unable to modify the tag due to a simultaneous update request. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -5679,17 +5679,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5697,22 +5697,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a CreateCustomActionType operation. @@ -6465,8 +6465,8 @@ func (s DisableStageTransitionOutput) GoString() string { // out of sequence tasks. If you already chose to stop and abandon, you cannot // make that request again. type DuplicatedStopRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -6483,17 +6483,17 @@ func (s DuplicatedStopRequestException) GoString() string { func newErrorDuplicatedStopRequestException(v protocol.ResponseMetadata) error { return &DuplicatedStopRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicatedStopRequestException) Code() string { +func (s *DuplicatedStopRequestException) Code() string { return "DuplicatedStopRequestException" } // Message returns the exception's message. -func (s DuplicatedStopRequestException) Message() string { +func (s *DuplicatedStopRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6501,22 +6501,22 @@ func (s DuplicatedStopRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicatedStopRequestException) OrigErr() error { +func (s *DuplicatedStopRequestException) OrigErr() error { return nil } -func (s DuplicatedStopRequestException) Error() string { +func (s *DuplicatedStopRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicatedStopRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicatedStopRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicatedStopRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicatedStopRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of an EnableStageTransition action. @@ -7347,8 +7347,8 @@ func (s *InputArtifact) SetName(v string) *InputArtifact { // The action declaration was specified in an invalid format. type InvalidActionDeclarationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7365,17 +7365,17 @@ func (s InvalidActionDeclarationException) GoString() string { func newErrorInvalidActionDeclarationException(v protocol.ResponseMetadata) error { return &InvalidActionDeclarationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidActionDeclarationException) Code() string { +func (s *InvalidActionDeclarationException) Code() string { return "InvalidActionDeclarationException" } // Message returns the exception's message. -func (s InvalidActionDeclarationException) Message() string { +func (s *InvalidActionDeclarationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7383,28 +7383,28 @@ func (s InvalidActionDeclarationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidActionDeclarationException) OrigErr() error { +func (s *InvalidActionDeclarationException) OrigErr() error { return nil } -func (s InvalidActionDeclarationException) Error() string { +func (s *InvalidActionDeclarationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidActionDeclarationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidActionDeclarationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidActionDeclarationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidActionDeclarationException) RequestID() string { + return s.RespMetadata.RequestID } // The approval request already received a response or has expired. type InvalidApprovalTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7421,17 +7421,17 @@ func (s InvalidApprovalTokenException) GoString() string { func newErrorInvalidApprovalTokenException(v protocol.ResponseMetadata) error { return &InvalidApprovalTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApprovalTokenException) Code() string { +func (s *InvalidApprovalTokenException) Code() string { return "InvalidApprovalTokenException" } // Message returns the exception's message. -func (s InvalidApprovalTokenException) Message() string { +func (s *InvalidApprovalTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7439,28 +7439,28 @@ func (s InvalidApprovalTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApprovalTokenException) OrigErr() error { +func (s *InvalidApprovalTokenException) OrigErr() error { return nil } -func (s InvalidApprovalTokenException) Error() string { +func (s *InvalidApprovalTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApprovalTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApprovalTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApprovalTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApprovalTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource ARN is invalid. type InvalidArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -7477,17 +7477,17 @@ func (s InvalidArnException) GoString() string { func newErrorInvalidArnException(v protocol.ResponseMetadata) error { return &InvalidArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArnException) Code() string { +func (s *InvalidArnException) Code() string { return "InvalidArnException" } // Message returns the exception's message. -func (s InvalidArnException) Message() string { +func (s *InvalidArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7495,28 +7495,28 @@ func (s InvalidArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArnException) OrigErr() error { +func (s *InvalidArnException) OrigErr() error { return nil } -func (s InvalidArnException) Error() string { +func (s *InvalidArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArnException) RequestID() string { + return s.RespMetadata.RequestID } // Reserved for future use. type InvalidBlockerDeclarationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7533,17 +7533,17 @@ func (s InvalidBlockerDeclarationException) GoString() string { func newErrorInvalidBlockerDeclarationException(v protocol.ResponseMetadata) error { return &InvalidBlockerDeclarationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidBlockerDeclarationException) Code() string { +func (s *InvalidBlockerDeclarationException) Code() string { return "InvalidBlockerDeclarationException" } // Message returns the exception's message. -func (s InvalidBlockerDeclarationException) Message() string { +func (s *InvalidBlockerDeclarationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7551,28 +7551,28 @@ func (s InvalidBlockerDeclarationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidBlockerDeclarationException) OrigErr() error { +func (s *InvalidBlockerDeclarationException) OrigErr() error { return nil } -func (s InvalidBlockerDeclarationException) Error() string { +func (s *InvalidBlockerDeclarationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidBlockerDeclarationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidBlockerDeclarationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidBlockerDeclarationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidBlockerDeclarationException) RequestID() string { + return s.RespMetadata.RequestID } // The client token was specified in an invalid format type InvalidClientTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7589,17 +7589,17 @@ func (s InvalidClientTokenException) GoString() string { func newErrorInvalidClientTokenException(v protocol.ResponseMetadata) error { return &InvalidClientTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidClientTokenException) Code() string { +func (s *InvalidClientTokenException) Code() string { return "InvalidClientTokenException" } // Message returns the exception's message. -func (s InvalidClientTokenException) Message() string { +func (s *InvalidClientTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7607,28 +7607,28 @@ func (s InvalidClientTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidClientTokenException) OrigErr() error { +func (s *InvalidClientTokenException) OrigErr() error { return nil } -func (s InvalidClientTokenException) Error() string { +func (s *InvalidClientTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidClientTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidClientTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidClientTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidClientTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The job was specified in an invalid format or cannot be found. type InvalidJobException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7645,17 +7645,17 @@ func (s InvalidJobException) GoString() string { func newErrorInvalidJobException(v protocol.ResponseMetadata) error { return &InvalidJobException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidJobException) Code() string { +func (s *InvalidJobException) Code() string { return "InvalidJobException" } // Message returns the exception's message. -func (s InvalidJobException) Message() string { +func (s *InvalidJobException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7663,28 +7663,28 @@ func (s InvalidJobException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidJobException) OrigErr() error { +func (s *InvalidJobException) OrigErr() error { return nil } -func (s InvalidJobException) Error() string { +func (s *InvalidJobException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidJobException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidJobException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidJobException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidJobException) RequestID() string { + return s.RespMetadata.RequestID } // The job state was specified in an invalid format. type InvalidJobStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7701,17 +7701,17 @@ func (s InvalidJobStateException) GoString() string { func newErrorInvalidJobStateException(v protocol.ResponseMetadata) error { return &InvalidJobStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidJobStateException) Code() string { +func (s *InvalidJobStateException) Code() string { return "InvalidJobStateException" } // Message returns the exception's message. -func (s InvalidJobStateException) Message() string { +func (s *InvalidJobStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7719,29 +7719,29 @@ func (s InvalidJobStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidJobStateException) OrigErr() error { +func (s *InvalidJobStateException) OrigErr() error { return nil } -func (s InvalidJobStateException) Error() string { +func (s *InvalidJobStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidJobStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidJobStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidJobStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidJobStateException) RequestID() string { + return s.RespMetadata.RequestID } // The next token was specified in an invalid format. Make sure that the next // token you provide is the token returned by a previous call. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7758,17 +7758,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7776,28 +7776,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The nonce was specified in an invalid format. type InvalidNonceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7814,17 +7814,17 @@ func (s InvalidNonceException) GoString() string { func newErrorInvalidNonceException(v protocol.ResponseMetadata) error { return &InvalidNonceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNonceException) Code() string { +func (s *InvalidNonceException) Code() string { return "InvalidNonceException" } // Message returns the exception's message. -func (s InvalidNonceException) Message() string { +func (s *InvalidNonceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7832,28 +7832,28 @@ func (s InvalidNonceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNonceException) OrigErr() error { +func (s *InvalidNonceException) OrigErr() error { return nil } -func (s InvalidNonceException) Error() string { +func (s *InvalidNonceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNonceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNonceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNonceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNonceException) RequestID() string { + return s.RespMetadata.RequestID } // The stage declaration was specified in an invalid format. type InvalidStageDeclarationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7870,17 +7870,17 @@ func (s InvalidStageDeclarationException) GoString() string { func newErrorInvalidStageDeclarationException(v protocol.ResponseMetadata) error { return &InvalidStageDeclarationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStageDeclarationException) Code() string { +func (s *InvalidStageDeclarationException) Code() string { return "InvalidStageDeclarationException" } // Message returns the exception's message. -func (s InvalidStageDeclarationException) Message() string { +func (s *InvalidStageDeclarationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7888,28 +7888,28 @@ func (s InvalidStageDeclarationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStageDeclarationException) OrigErr() error { +func (s *InvalidStageDeclarationException) OrigErr() error { return nil } -func (s InvalidStageDeclarationException) Error() string { +func (s *InvalidStageDeclarationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStageDeclarationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStageDeclarationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStageDeclarationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStageDeclarationException) RequestID() string { + return s.RespMetadata.RequestID } // The structure was specified in an invalid format. type InvalidStructureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7926,17 +7926,17 @@ func (s InvalidStructureException) GoString() string { func newErrorInvalidStructureException(v protocol.ResponseMetadata) error { return &InvalidStructureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStructureException) Code() string { +func (s *InvalidStructureException) Code() string { return "InvalidStructureException" } // Message returns the exception's message. -func (s InvalidStructureException) Message() string { +func (s *InvalidStructureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7944,28 +7944,28 @@ func (s InvalidStructureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStructureException) OrigErr() error { +func (s *InvalidStructureException) OrigErr() error { return nil } -func (s InvalidStructureException) Error() string { +func (s *InvalidStructureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStructureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStructureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStructureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStructureException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource tags are invalid. type InvalidTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -7982,17 +7982,17 @@ func (s InvalidTagsException) GoString() string { func newErrorInvalidTagsException(v protocol.ResponseMetadata) error { return &InvalidTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagsException) Code() string { +func (s *InvalidTagsException) Code() string { return "InvalidTagsException" } // Message returns the exception's message. -func (s InvalidTagsException) Message() string { +func (s *InvalidTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8000,28 +8000,28 @@ func (s InvalidTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagsException) OrigErr() error { +func (s *InvalidTagsException) OrigErr() error { return nil } -func (s InvalidTagsException) Error() string { +func (s *InvalidTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified authentication type is in an invalid format. type InvalidWebhookAuthenticationParametersException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8038,17 +8038,17 @@ func (s InvalidWebhookAuthenticationParametersException) GoString() string { func newErrorInvalidWebhookAuthenticationParametersException(v protocol.ResponseMetadata) error { return &InvalidWebhookAuthenticationParametersException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidWebhookAuthenticationParametersException) Code() string { +func (s *InvalidWebhookAuthenticationParametersException) Code() string { return "InvalidWebhookAuthenticationParametersException" } // Message returns the exception's message. -func (s InvalidWebhookAuthenticationParametersException) Message() string { +func (s *InvalidWebhookAuthenticationParametersException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8056,28 +8056,28 @@ func (s InvalidWebhookAuthenticationParametersException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidWebhookAuthenticationParametersException) OrigErr() error { +func (s *InvalidWebhookAuthenticationParametersException) OrigErr() error { return nil } -func (s InvalidWebhookAuthenticationParametersException) Error() string { +func (s *InvalidWebhookAuthenticationParametersException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidWebhookAuthenticationParametersException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidWebhookAuthenticationParametersException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidWebhookAuthenticationParametersException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidWebhookAuthenticationParametersException) RequestID() string { + return s.RespMetadata.RequestID } // The specified event filter rule is in an invalid format. type InvalidWebhookFilterPatternException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8094,17 +8094,17 @@ func (s InvalidWebhookFilterPatternException) GoString() string { func newErrorInvalidWebhookFilterPatternException(v protocol.ResponseMetadata) error { return &InvalidWebhookFilterPatternException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidWebhookFilterPatternException) Code() string { +func (s *InvalidWebhookFilterPatternException) Code() string { return "InvalidWebhookFilterPatternException" } // Message returns the exception's message. -func (s InvalidWebhookFilterPatternException) Message() string { +func (s *InvalidWebhookFilterPatternException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8112,22 +8112,22 @@ func (s InvalidWebhookFilterPatternException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidWebhookFilterPatternException) OrigErr() error { +func (s *InvalidWebhookFilterPatternException) OrigErr() error { return nil } -func (s InvalidWebhookFilterPatternException) Error() string { +func (s *InvalidWebhookFilterPatternException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidWebhookFilterPatternException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidWebhookFilterPatternException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidWebhookFilterPatternException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidWebhookFilterPatternException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about a job. @@ -8323,8 +8323,8 @@ func (s *JobDetails) SetId(v string) *JobDetails { // The job was specified in an invalid format or cannot be found. type JobNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8341,17 +8341,17 @@ func (s JobNotFoundException) GoString() string { func newErrorJobNotFoundException(v protocol.ResponseMetadata) error { return &JobNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s JobNotFoundException) Code() string { +func (s *JobNotFoundException) Code() string { return "JobNotFoundException" } // Message returns the exception's message. -func (s JobNotFoundException) Message() string { +func (s *JobNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8359,29 +8359,29 @@ func (s JobNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s JobNotFoundException) OrigErr() error { +func (s *JobNotFoundException) OrigErr() error { return nil } -func (s JobNotFoundException) Error() string { +func (s *JobNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s JobNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *JobNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s JobNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *JobNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The number of pipelines associated with the AWS account has exceeded the // limit allowed for the account. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8398,17 +8398,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8416,22 +8416,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListActionExecutionsInput struct { @@ -9086,8 +9086,8 @@ func (s *ListWebhooksOutput) SetWebhooks(v []*ListWebhookItem) *ListWebhooksOutp // The stage has failed in a later run of the pipeline and the pipelineExecutionId // associated with the request is out of date. type NotLatestPipelineExecutionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9104,17 +9104,17 @@ func (s NotLatestPipelineExecutionException) GoString() string { func newErrorNotLatestPipelineExecutionException(v protocol.ResponseMetadata) error { return &NotLatestPipelineExecutionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotLatestPipelineExecutionException) Code() string { +func (s *NotLatestPipelineExecutionException) Code() string { return "NotLatestPipelineExecutionException" } // Message returns the exception's message. -func (s NotLatestPipelineExecutionException) Message() string { +func (s *NotLatestPipelineExecutionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9122,22 +9122,22 @@ func (s NotLatestPipelineExecutionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotLatestPipelineExecutionException) OrigErr() error { +func (s *NotLatestPipelineExecutionException) OrigErr() error { return nil } -func (s NotLatestPipelineExecutionException) Error() string { +func (s *NotLatestPipelineExecutionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotLatestPipelineExecutionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotLatestPipelineExecutionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotLatestPipelineExecutionException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotLatestPipelineExecutionException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about the output of an action. @@ -9192,8 +9192,8 @@ func (s *OutputArtifact) SetName(v string) *OutputArtifact { // Exceeded the total size limit for all variables in the pipeline. type OutputVariablesSizeExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -9210,17 +9210,17 @@ func (s OutputVariablesSizeExceededException) GoString() string { func newErrorOutputVariablesSizeExceededException(v protocol.ResponseMetadata) error { return &OutputVariablesSizeExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OutputVariablesSizeExceededException) Code() string { +func (s *OutputVariablesSizeExceededException) Code() string { return "OutputVariablesSizeExceededException" } // Message returns the exception's message. -func (s OutputVariablesSizeExceededException) Message() string { +func (s *OutputVariablesSizeExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9228,22 +9228,22 @@ func (s OutputVariablesSizeExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OutputVariablesSizeExceededException) OrigErr() error { +func (s *OutputVariablesSizeExceededException) OrigErr() error { return nil } -func (s OutputVariablesSizeExceededException) Error() string { +func (s *OutputVariablesSizeExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OutputVariablesSizeExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OutputVariablesSizeExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OutputVariablesSizeExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *OutputVariablesSizeExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about a pipeline to a job worker. @@ -9532,8 +9532,8 @@ func (s *PipelineExecution) SetStatus(v string) *PipelineExecution { // The pipeline execution was specified in an invalid format or cannot be found, // or an execution ID does not belong to the specified pipeline. type PipelineExecutionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9550,17 +9550,17 @@ func (s PipelineExecutionNotFoundException) GoString() string { func newErrorPipelineExecutionNotFoundException(v protocol.ResponseMetadata) error { return &PipelineExecutionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineExecutionNotFoundException) Code() string { +func (s *PipelineExecutionNotFoundException) Code() string { return "PipelineExecutionNotFoundException" } // Message returns the exception's message. -func (s PipelineExecutionNotFoundException) Message() string { +func (s *PipelineExecutionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9568,29 +9568,29 @@ func (s PipelineExecutionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineExecutionNotFoundException) OrigErr() error { +func (s *PipelineExecutionNotFoundException) OrigErr() error { return nil } -func (s PipelineExecutionNotFoundException) Error() string { +func (s *PipelineExecutionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineExecutionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineExecutionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineExecutionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineExecutionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Unable to stop the pipeline execution. The execution might already be in // a Stopped state, or it might no longer be in progress. type PipelineExecutionNotStoppableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -9607,17 +9607,17 @@ func (s PipelineExecutionNotStoppableException) GoString() string { func newErrorPipelineExecutionNotStoppableException(v protocol.ResponseMetadata) error { return &PipelineExecutionNotStoppableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineExecutionNotStoppableException) Code() string { +func (s *PipelineExecutionNotStoppableException) Code() string { return "PipelineExecutionNotStoppableException" } // Message returns the exception's message. -func (s PipelineExecutionNotStoppableException) Message() string { +func (s *PipelineExecutionNotStoppableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9625,22 +9625,22 @@ func (s PipelineExecutionNotStoppableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineExecutionNotStoppableException) OrigErr() error { +func (s *PipelineExecutionNotStoppableException) OrigErr() error { return nil } -func (s PipelineExecutionNotStoppableException) Error() string { +func (s *PipelineExecutionNotStoppableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineExecutionNotStoppableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineExecutionNotStoppableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineExecutionNotStoppableException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineExecutionNotStoppableException) RequestID() string { + return s.RespMetadata.RequestID } // Summary information about a pipeline execution. @@ -9786,8 +9786,8 @@ func (s *PipelineMetadata) SetUpdated(v time.Time) *PipelineMetadata { // The specified pipeline name is already in use. type PipelineNameInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9804,17 +9804,17 @@ func (s PipelineNameInUseException) GoString() string { func newErrorPipelineNameInUseException(v protocol.ResponseMetadata) error { return &PipelineNameInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineNameInUseException) Code() string { +func (s *PipelineNameInUseException) Code() string { return "PipelineNameInUseException" } // Message returns the exception's message. -func (s PipelineNameInUseException) Message() string { +func (s *PipelineNameInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9822,28 +9822,28 @@ func (s PipelineNameInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineNameInUseException) OrigErr() error { +func (s *PipelineNameInUseException) OrigErr() error { return nil } -func (s PipelineNameInUseException) Error() string { +func (s *PipelineNameInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineNameInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineNameInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineNameInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineNameInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The pipeline was specified in an invalid format or cannot be found. type PipelineNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9860,17 +9860,17 @@ func (s PipelineNotFoundException) GoString() string { func newErrorPipelineNotFoundException(v protocol.ResponseMetadata) error { return &PipelineNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineNotFoundException) Code() string { +func (s *PipelineNotFoundException) Code() string { return "PipelineNotFoundException" } // Message returns the exception's message. -func (s PipelineNotFoundException) Message() string { +func (s *PipelineNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9878,22 +9878,22 @@ func (s PipelineNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineNotFoundException) OrigErr() error { +func (s *PipelineNotFoundException) OrigErr() error { return nil } -func (s PipelineNotFoundException) Error() string { +func (s *PipelineNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Returns a summary of a pipeline. @@ -9949,8 +9949,8 @@ func (s *PipelineSummary) SetVersion(v int64) *PipelineSummary { // The pipeline version was specified in an invalid format or cannot be found. type PipelineVersionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9967,17 +9967,17 @@ func (s PipelineVersionNotFoundException) GoString() string { func newErrorPipelineVersionNotFoundException(v protocol.ResponseMetadata) error { return &PipelineVersionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineVersionNotFoundException) Code() string { +func (s *PipelineVersionNotFoundException) Code() string { return "PipelineVersionNotFoundException" } // Message returns the exception's message. -func (s PipelineVersionNotFoundException) Message() string { +func (s *PipelineVersionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9985,22 +9985,22 @@ func (s PipelineVersionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineVersionNotFoundException) OrigErr() error { +func (s *PipelineVersionNotFoundException) OrigErr() error { return nil } -func (s PipelineVersionNotFoundException) Error() string { +func (s *PipelineVersionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineVersionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineVersionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineVersionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineVersionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a PollForJobs action. @@ -10980,8 +10980,8 @@ func (s RegisterWebhookWithThirdPartyOutput) GoString() string { // The resource was specified in an invalid format. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10998,17 +10998,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11016,22 +11016,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input of a RetryStageExecution action. @@ -11427,8 +11427,8 @@ func (s *StageExecution) SetStatus(v string) *StageExecution { // The stage was specified in an invalid format or cannot be found. type StageNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11445,17 +11445,17 @@ func (s StageNotFoundException) GoString() string { func newErrorStageNotFoundException(v protocol.ResponseMetadata) error { return &StageNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StageNotFoundException) Code() string { +func (s *StageNotFoundException) Code() string { return "StageNotFoundException" } // Message returns the exception's message. -func (s StageNotFoundException) Message() string { +func (s *StageNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11463,29 +11463,29 @@ func (s StageNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StageNotFoundException) OrigErr() error { +func (s *StageNotFoundException) OrigErr() error { return nil } -func (s StageNotFoundException) Error() string { +func (s *StageNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StageNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StageNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StageNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *StageNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Unable to retry. The pipeline structure or stage state might have changed // while actions awaited retry, or the stage contains no failed actions. type StageNotRetryableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11502,17 +11502,17 @@ func (s StageNotRetryableException) GoString() string { func newErrorStageNotRetryableException(v protocol.ResponseMetadata) error { return &StageNotRetryableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StageNotRetryableException) Code() string { +func (s *StageNotRetryableException) Code() string { return "StageNotRetryableException" } // Message returns the exception's message. -func (s StageNotRetryableException) Message() string { +func (s *StageNotRetryableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11520,22 +11520,22 @@ func (s StageNotRetryableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StageNotRetryableException) OrigErr() error { +func (s *StageNotRetryableException) OrigErr() error { return nil } -func (s StageNotRetryableException) Error() string { +func (s *StageNotRetryableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StageNotRetryableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StageNotRetryableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StageNotRetryableException) RequestID() string { - return s.respMetadata.RequestID +func (s *StageNotRetryableException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about the state of the stage. @@ -12106,8 +12106,8 @@ func (s *ThirdPartyJobDetails) SetNonce(v string) *ThirdPartyJobDetails { // The tags limit for a resource has been exceeded. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" min:"1" type:"string"` } @@ -12124,17 +12124,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12142,22 +12142,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about the state of transitions between one stage and @@ -12349,8 +12349,8 @@ func (s *UpdatePipelineOutput) SetPipeline(v *PipelineDeclaration) *UpdatePipeli // The validation was specified in an invalid format. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12367,17 +12367,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12385,22 +12385,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // The authentication applied to incoming webhook trigger requests. @@ -12673,8 +12673,8 @@ func (s *WebhookFilterRule) SetMatchEquals(v string) *WebhookFilterRule { // The specified webhook was entered in an invalid format or cannot be found. type WebhookNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12691,17 +12691,17 @@ func (s WebhookNotFoundException) GoString() string { func newErrorWebhookNotFoundException(v protocol.ResponseMetadata) error { return &WebhookNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WebhookNotFoundException) Code() string { +func (s *WebhookNotFoundException) Code() string { return "WebhookNotFoundException" } // Message returns the exception's message. -func (s WebhookNotFoundException) Message() string { +func (s *WebhookNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12709,22 +12709,22 @@ func (s WebhookNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WebhookNotFoundException) OrigErr() error { +func (s *WebhookNotFoundException) OrigErr() error { return nil } -func (s WebhookNotFoundException) Error() string { +func (s *WebhookNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WebhookNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WebhookNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WebhookNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *WebhookNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/codestarnotifications/api.go b/vendor/github.com/aws/aws-sdk-go/service/codestarnotifications/api.go index c69e76f54dc..9f8640133b4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codestarnotifications/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codestarnotifications/api.go @@ -1305,8 +1305,8 @@ func (c *CodeStarNotifications) UpdateNotificationRuleWithContext(ctx aws.Contex // AWS CodeStar Notifications can't create the notification rule because you // do not have sufficient permissions. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1323,17 +1323,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1341,29 +1341,29 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // AWS CodeStar Notifications can't complete the request because the resource // is being modified by another process. Wait a few minutes and try again. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1380,17 +1380,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1398,28 +1398,28 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Some or all of the configuration is incomplete, missing, or not valid. type ConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1436,17 +1436,17 @@ func (s ConfigurationException) GoString() string { func newErrorConfigurationException(v protocol.ResponseMetadata) error { return &ConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConfigurationException) Code() string { +func (s *ConfigurationException) Code() string { return "ConfigurationException" } // Message returns the exception's message. -func (s ConfigurationException) Message() string { +func (s *ConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1454,22 +1454,22 @@ func (s ConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConfigurationException) OrigErr() error { +func (s *ConfigurationException) OrigErr() error { return nil } -func (s ConfigurationException) Error() string { +func (s *ConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } type CreateNotificationRuleInput struct { @@ -1989,8 +1989,8 @@ func (s *EventTypeSummary) SetServiceName(v string) *EventTypeSummary { // The value for the enumeration token used in the request to return the next // batch of the results is not valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2007,17 +2007,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2025,30 +2025,30 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // One of the AWS CodeStar Notifications limits has been exceeded. Limits apply // to accounts, notification rules, notifications, resources, and targets. For // more information, see Limits. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2065,17 +2065,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2083,22 +2083,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a filter to apply to the list of returned event types. @@ -2677,8 +2677,8 @@ func (s *NotificationRuleSummary) SetId(v string) *NotificationRuleSummary { // A resource with the same name or ID already exists. Notification rule names // must be unique in your AWS account. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2695,17 +2695,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2713,29 +2713,29 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // AWS CodeStar Notifications can't find a resource that matches the provided // ARN. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2752,17 +2752,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2770,22 +2770,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type SubscribeInput struct { @@ -3312,8 +3312,8 @@ func (s UpdateNotificationRuleOutput) GoString() string { // One or more parameter values are not valid. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -3330,17 +3330,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3348,22 +3348,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } const ( 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 6b104b41f68..adea5962eaa 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 @@ -2161,8 +2161,8 @@ func (c *CognitoIdentity) UpdateIdentityPoolWithContext(ctx aws.Context, input * // Thrown if there are parallel requests to modify a resource. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by a ConcurrentModificationException. Message_ *string `locationName:"message" type:"string"` @@ -2180,17 +2180,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2198,22 +2198,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Input to the CreateIdentityPool action. @@ -2620,8 +2620,8 @@ func (s *DescribeIdentityPoolInput) SetIdentityPoolId(v string) *DescribeIdentit // The provided developer user identifier is already registered with Cognito // under a different identity ID. type DeveloperUserAlreadyRegisteredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // This developer user identifier is already registered with Cognito. Message_ *string `locationName:"message" type:"string"` @@ -2639,17 +2639,17 @@ func (s DeveloperUserAlreadyRegisteredException) GoString() string { func newErrorDeveloperUserAlreadyRegisteredException(v protocol.ResponseMetadata) error { return &DeveloperUserAlreadyRegisteredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeveloperUserAlreadyRegisteredException) Code() string { +func (s *DeveloperUserAlreadyRegisteredException) Code() string { return "DeveloperUserAlreadyRegisteredException" } // Message returns the exception's message. -func (s DeveloperUserAlreadyRegisteredException) Message() string { +func (s *DeveloperUserAlreadyRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2657,29 +2657,29 @@ func (s DeveloperUserAlreadyRegisteredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeveloperUserAlreadyRegisteredException) OrigErr() error { +func (s *DeveloperUserAlreadyRegisteredException) OrigErr() error { return nil } -func (s DeveloperUserAlreadyRegisteredException) Error() string { +func (s *DeveloperUserAlreadyRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeveloperUserAlreadyRegisteredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeveloperUserAlreadyRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeveloperUserAlreadyRegisteredException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeveloperUserAlreadyRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // An exception thrown when a dependent service such as Facebook or Twitter // is not responding type ExternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by an ExternalServiceException Message_ *string `locationName:"message" type:"string"` @@ -2697,17 +2697,17 @@ func (s ExternalServiceException) GoString() string { func newErrorExternalServiceException(v protocol.ResponseMetadata) error { return &ExternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExternalServiceException) Code() string { +func (s *ExternalServiceException) Code() string { return "ExternalServiceException" } // Message returns the exception's message. -func (s ExternalServiceException) Message() string { +func (s *ExternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2715,22 +2715,22 @@ func (s ExternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExternalServiceException) OrigErr() error { +func (s *ExternalServiceException) OrigErr() error { return nil } -func (s ExternalServiceException) Error() string { +func (s *ExternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // Input to the GetCredentialsForIdentity action. @@ -3489,8 +3489,8 @@ func (s *IdentityPoolShortDescription) SetIdentityPoolName(v string) *IdentityPo // Thrown when the service encounters an error during processing the request. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by an InternalErrorException. Message_ *string `locationName:"message" type:"string"` @@ -3508,17 +3508,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3526,29 +3526,29 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // Thrown if the identity pool has no role associated for the given auth type // (auth/unauth) or if the AssumeRole fails. type InvalidIdentityPoolConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned for an InvalidIdentityPoolConfigurationException Message_ *string `locationName:"message" type:"string"` @@ -3566,17 +3566,17 @@ func (s InvalidIdentityPoolConfigurationException) GoString() string { func newErrorInvalidIdentityPoolConfigurationException(v protocol.ResponseMetadata) error { return &InvalidIdentityPoolConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidIdentityPoolConfigurationException) Code() string { +func (s *InvalidIdentityPoolConfigurationException) Code() string { return "InvalidIdentityPoolConfigurationException" } // Message returns the exception's message. -func (s InvalidIdentityPoolConfigurationException) Message() string { +func (s *InvalidIdentityPoolConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3584,28 +3584,28 @@ func (s InvalidIdentityPoolConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidIdentityPoolConfigurationException) OrigErr() error { +func (s *InvalidIdentityPoolConfigurationException) OrigErr() error { return nil } -func (s InvalidIdentityPoolConfigurationException) Error() string { +func (s *InvalidIdentityPoolConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidIdentityPoolConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidIdentityPoolConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidIdentityPoolConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidIdentityPoolConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // Thrown for missing or bad input parameter(s). type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by an InvalidParameterException. Message_ *string `locationName:"message" type:"string"` @@ -3623,17 +3623,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3641,28 +3641,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // Thrown when the total number of user pools has exceeded a preset limit. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by a LimitExceededException. Message_ *string `locationName:"message" type:"string"` @@ -3680,17 +3680,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3698,22 +3698,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Input to the ListIdentities action. @@ -4354,8 +4354,8 @@ func (s *MergeDeveloperIdentitiesOutput) SetIdentityId(v string) *MergeDeveloper // Thrown when a user is not authorized to access the requested resource. type NotAuthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by a NotAuthorizedException Message_ *string `locationName:"message" type:"string"` @@ -4373,17 +4373,17 @@ func (s NotAuthorizedException) GoString() string { func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { return &NotAuthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotAuthorizedException) Code() string { +func (s *NotAuthorizedException) Code() string { return "NotAuthorizedException" } // Message returns the exception's message. -func (s NotAuthorizedException) Message() string { +func (s *NotAuthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4391,22 +4391,22 @@ func (s NotAuthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotAuthorizedException) OrigErr() error { +func (s *NotAuthorizedException) OrigErr() error { return nil } -func (s NotAuthorizedException) Error() string { +func (s *NotAuthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotAuthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotAuthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotAuthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotAuthorizedException) RequestID() string { + return s.RespMetadata.RequestID } // A provider representing an Amazon Cognito user pool and its client ID. @@ -4479,8 +4479,8 @@ func (s *Provider) SetServerSideTokenCheck(v bool) *Provider { // Thrown when a user tries to use a login which is already linked to another // account. type ResourceConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by a ResourceConflictException. Message_ *string `locationName:"message" type:"string"` @@ -4498,17 +4498,17 @@ func (s ResourceConflictException) GoString() string { func newErrorResourceConflictException(v protocol.ResponseMetadata) error { return &ResourceConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceConflictException) Code() string { +func (s *ResourceConflictException) Code() string { return "ResourceConflictException" } // Message returns the exception's message. -func (s ResourceConflictException) Message() string { +func (s *ResourceConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4516,29 +4516,29 @@ func (s ResourceConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceConflictException) OrigErr() error { +func (s *ResourceConflictException) OrigErr() error { return nil } -func (s ResourceConflictException) Error() string { +func (s *ResourceConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Thrown when the requested resource (for example, a dataset or record) does // not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned by a ResourceNotFoundException. Message_ *string `locationName:"message" type:"string"` @@ -4556,17 +4556,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4574,22 +4574,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A role mapping. @@ -4882,8 +4882,8 @@ func (s TagResourceOutput) GoString() string { // Thrown when a request is throttled. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Message returned by a TooManyRequestsException Message_ *string `locationName:"message" type:"string"` @@ -4901,17 +4901,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4919,22 +4919,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Input to the UnlinkDeveloperIdentity action. 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 8fd262b54ff..428171c8443 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 @@ -6058,11 +6058,12 @@ func (c *CognitoIdentityProvider) ForgotPasswordRequest(input *ForgotPasswordInp // // Calling this API causes a message to be sent to the end user with a confirmation // code that is required to change the user's password. For the Username parameter, -// you can use the username or user alias. If a verified phone number exists -// for the user, the confirmation code is sent to the phone number. Otherwise, -// if a verified email exists, the confirmation code is sent to the email. If -// neither a verified phone number nor a verified email exists, InvalidParameterException -// is thrown. To use the confirmation code for resetting the password, call . +// you can use the username or user alias. The method used to send the confirmation +// code is sent according to the specified AccountRecoverySetting. For more +// information, see Recovering User Accounts in the Amazon Cognito Developer +// Guide. If neither a verified phone number nor a verified email exists, an +// InvalidParameterException is thrown. To use the confirmation code for resetting +// the password, call . // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -14772,8 +14773,8 @@ func (s AdminUserGlobalSignOutOutput) GoString() string { // account. This exception tells user that an account with this email or phone // already exists. type AliasExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message sent to the user when an alias exists. Message_ *string `locationName:"message" type:"string"` @@ -14791,17 +14792,17 @@ func (s AliasExistsException) GoString() string { func newErrorAliasExistsException(v protocol.ResponseMetadata) error { return &AliasExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AliasExistsException) Code() string { +func (s *AliasExistsException) Code() string { return "AliasExistsException" } // Message returns the exception's message. -func (s AliasExistsException) Message() string { +func (s *AliasExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14809,26 +14810,30 @@ func (s AliasExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AliasExistsException) OrigErr() error { +func (s *AliasExistsException) OrigErr() error { return nil } -func (s AliasExistsException) Error() string { +func (s *AliasExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AliasExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AliasExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AliasExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *AliasExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon Pinpoint analytics configuration for collecting metrics for a // user pool. +// +// Cognito User Pools only supports sending events to Amazon Pinpoint projects +// in the US East (N. Virginia) us-east-1 Region, regardless of the region in +// which the user pool resides. type AnalyticsConfigurationType struct { _ struct{} `type:"structure"` @@ -14913,6 +14918,10 @@ func (s *AnalyticsConfigurationType) SetUserDataShared(v bool) *AnalyticsConfigu // // An endpoint uniquely identifies a mobile device, email address, or phone // number that can receive messages from Amazon Pinpoint analytics. +// +// Cognito User Pools only supports sending events to Amazon Pinpoint projects +// in the US East (N. Virginia) us-east-1 Region, regardless of the region in +// which the user pool resides. type AnalyticsMetadataType struct { _ struct{} `type:"structure"` @@ -15392,8 +15401,8 @@ func (s *CodeDeliveryDetailsType) SetDestination(v string) *CodeDeliveryDetailsT // This exception is thrown when a verification code fails to deliver successfully. type CodeDeliveryFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message sent when a verification code fails to deliver successfully. Message_ *string `locationName:"message" type:"string"` @@ -15411,17 +15420,17 @@ func (s CodeDeliveryFailureException) GoString() string { func newErrorCodeDeliveryFailureException(v protocol.ResponseMetadata) error { return &CodeDeliveryFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CodeDeliveryFailureException) Code() string { +func (s *CodeDeliveryFailureException) Code() string { return "CodeDeliveryFailureException" } // Message returns the exception's message. -func (s CodeDeliveryFailureException) Message() string { +func (s *CodeDeliveryFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15429,29 +15438,29 @@ func (s CodeDeliveryFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CodeDeliveryFailureException) OrigErr() error { +func (s *CodeDeliveryFailureException) OrigErr() error { return nil } -func (s CodeDeliveryFailureException) Error() string { +func (s *CodeDeliveryFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CodeDeliveryFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CodeDeliveryFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CodeDeliveryFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *CodeDeliveryFailureException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown if the provided code does not match what the server // was expecting. type CodeMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message provided when the code mismatch exception is thrown. Message_ *string `locationName:"message" type:"string"` @@ -15469,17 +15478,17 @@ func (s CodeMismatchException) GoString() string { func newErrorCodeMismatchException(v protocol.ResponseMetadata) error { return &CodeMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CodeMismatchException) Code() string { +func (s *CodeMismatchException) Code() string { return "CodeMismatchException" } // Message returns the exception's message. -func (s CodeMismatchException) Message() string { +func (s *CodeMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15487,22 +15496,22 @@ func (s CodeMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CodeMismatchException) OrigErr() error { +func (s *CodeMismatchException) OrigErr() error { return nil } -func (s CodeMismatchException) Error() string { +func (s *CodeMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CodeMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CodeMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CodeMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *CodeMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // The compromised credentials actions type @@ -15600,8 +15609,8 @@ func (s *CompromisedCredentialsRiskConfigurationType) SetEventFilter(v []*string // This exception is thrown if two or more modifications are happening concurrently. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message provided when the concurrent exception is thrown. Message_ *string `locationName:"message" type:"string"` @@ -15619,17 +15628,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15637,22 +15646,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Confirms the device request. @@ -16356,7 +16365,7 @@ type CreateIdentityProviderInput struct { // discovery URL specified by oidc_issuer key jwks_uri if not available from // discovery URL specified by oidc_issuer key authorize_scopes // - // * For SAML providers: MetadataFile OR MetadataURL IDPSignOut optional + // * For SAML providers: MetadataFile OR MetadataURL IDPSignout optional // // ProviderDetails is a required field ProviderDetails map[string]*string `type:"map" required:"true"` @@ -16726,6 +16735,10 @@ type CreateUserPoolClientInput struct { // The Amazon Pinpoint analytics configuration for collecting metrics for this // user pool. + // + // Cognito User Pools only supports sending events to Amazon Pinpoint projects + // in the US East (N. Virginia) us-east-1 Region, regardless of the region in + // which the user pool resides. AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` // A list of allowed redirect (callback) URLs for the identity providers. @@ -18821,8 +18834,8 @@ func (s *DomainDescriptionType) SetVersion(v string) *DomainDescriptionType { // This exception is thrown when the provider is already supported by the user // pool. type DuplicateProviderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18839,17 +18852,17 @@ func (s DuplicateProviderException) GoString() string { func newErrorDuplicateProviderException(v protocol.ResponseMetadata) error { return &DuplicateProviderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateProviderException) Code() string { +func (s *DuplicateProviderException) Code() string { return "DuplicateProviderException" } // Message returns the exception's message. -func (s DuplicateProviderException) Message() string { +func (s *DuplicateProviderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18857,22 +18870,22 @@ func (s DuplicateProviderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateProviderException) OrigErr() error { +func (s *DuplicateProviderException) OrigErr() error { return nil } -func (s DuplicateProviderException) Error() string { +func (s *DuplicateProviderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateProviderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateProviderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateProviderException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateProviderException) RequestID() string { + return s.RespMetadata.RequestID } // The email configuration type. @@ -19017,8 +19030,8 @@ func (s *EmailConfigurationType) SetSourceArn(v string) *EmailConfigurationType // This exception is thrown when there is a code mismatch and the service fails // to configure the software token TOTP multi-factor authentication (MFA). type EnableSoftwareTokenMFAException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19035,17 +19048,17 @@ func (s EnableSoftwareTokenMFAException) GoString() string { func newErrorEnableSoftwareTokenMFAException(v protocol.ResponseMetadata) error { return &EnableSoftwareTokenMFAException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EnableSoftwareTokenMFAException) Code() string { +func (s *EnableSoftwareTokenMFAException) Code() string { return "EnableSoftwareTokenMFAException" } // Message returns the exception's message. -func (s EnableSoftwareTokenMFAException) Message() string { +func (s *EnableSoftwareTokenMFAException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19053,22 +19066,22 @@ func (s EnableSoftwareTokenMFAException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EnableSoftwareTokenMFAException) OrigErr() error { +func (s *EnableSoftwareTokenMFAException) OrigErr() error { return nil } -func (s EnableSoftwareTokenMFAException) Error() string { +func (s *EnableSoftwareTokenMFAException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EnableSoftwareTokenMFAException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EnableSoftwareTokenMFAException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EnableSoftwareTokenMFAException) RequestID() string { - return s.respMetadata.RequestID +func (s *EnableSoftwareTokenMFAException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the user context data captured at the time of an event request. @@ -19181,6 +19194,10 @@ func (s *EventFeedbackType) SetProvider(v string) *EventFeedbackType { type EventRiskType struct { _ struct{} `type:"structure"` + // Indicates whether compromised credentials were detected during an authentication + // event. + CompromisedCredentialsDetected *bool `type:"boolean"` + // The risk decision. RiskDecision *string `type:"string" enum:"RiskDecisionType"` @@ -19198,6 +19215,12 @@ func (s EventRiskType) GoString() string { return s.String() } +// SetCompromisedCredentialsDetected sets the CompromisedCredentialsDetected field's value. +func (s *EventRiskType) SetCompromisedCredentialsDetected(v bool) *EventRiskType { + s.CompromisedCredentialsDetected = &v + return s +} + // SetRiskDecision sets the RiskDecision field's value. func (s *EventRiskType) SetRiskDecision(v string) *EventRiskType { s.RiskDecision = &v @@ -19212,8 +19235,8 @@ func (s *EventRiskType) SetRiskLevel(v string) *EventRiskType { // This exception is thrown if a code has expired. type ExpiredCodeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the expired code exception is thrown. Message_ *string `locationName:"message" type:"string"` @@ -19231,17 +19254,17 @@ func (s ExpiredCodeException) GoString() string { func newErrorExpiredCodeException(v protocol.ResponseMetadata) error { return &ExpiredCodeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExpiredCodeException) Code() string { +func (s *ExpiredCodeException) Code() string { return "ExpiredCodeException" } // Message returns the exception's message. -func (s ExpiredCodeException) Message() string { +func (s *ExpiredCodeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19249,22 +19272,22 @@ func (s ExpiredCodeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExpiredCodeException) OrigErr() error { +func (s *ExpiredCodeException) OrigErr() error { return nil } -func (s ExpiredCodeException) Error() string { +func (s *ExpiredCodeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExpiredCodeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExpiredCodeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExpiredCodeException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExpiredCodeException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the request to forget the device. @@ -20331,8 +20354,8 @@ func (s GlobalSignOutOutput) GoString() string { // This exception is thrown when Amazon Cognito encounters a group that already // exists in the user pool. type GroupExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20349,17 +20372,17 @@ func (s GroupExistsException) GoString() string { func newErrorGroupExistsException(v protocol.ResponseMetadata) error { return &GroupExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GroupExistsException) Code() string { +func (s *GroupExistsException) Code() string { return "GroupExistsException" } // Message returns the exception's message. -func (s GroupExistsException) Message() string { +func (s *GroupExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20367,22 +20390,22 @@ func (s GroupExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GroupExistsException) OrigErr() error { +func (s *GroupExistsException) OrigErr() error { return nil } -func (s GroupExistsException) Error() string { +func (s *GroupExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GroupExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GroupExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GroupExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *GroupExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The group type. @@ -20891,8 +20914,8 @@ func (s *InitiateAuthOutput) SetSession(v string) *InitiateAuthOutput { // This exception is thrown when Amazon Cognito encounters an internal error. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when Amazon Cognito throws an internal error exception. Message_ *string `locationName:"message" type:"string"` @@ -20910,17 +20933,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20928,29 +20951,29 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when Amazon Cognito is not allowed to use your email // identity. HTTP status code: 400. type InvalidEmailRoleAccessPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when you have an unverified email address or the identity // policy is not set on an email address that Amazon Cognito can access. @@ -20969,17 +20992,17 @@ func (s InvalidEmailRoleAccessPolicyException) GoString() string { func newErrorInvalidEmailRoleAccessPolicyException(v protocol.ResponseMetadata) error { return &InvalidEmailRoleAccessPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidEmailRoleAccessPolicyException) Code() string { +func (s *InvalidEmailRoleAccessPolicyException) Code() string { return "InvalidEmailRoleAccessPolicyException" } // Message returns the exception's message. -func (s InvalidEmailRoleAccessPolicyException) Message() string { +func (s *InvalidEmailRoleAccessPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20987,29 +21010,29 @@ func (s InvalidEmailRoleAccessPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidEmailRoleAccessPolicyException) OrigErr() error { +func (s *InvalidEmailRoleAccessPolicyException) OrigErr() error { return nil } -func (s InvalidEmailRoleAccessPolicyException) Error() string { +func (s *InvalidEmailRoleAccessPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidEmailRoleAccessPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidEmailRoleAccessPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidEmailRoleAccessPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidEmailRoleAccessPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the Amazon Cognito service encounters an invalid // AWS Lambda response. type InvalidLambdaResponseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service throws an invalid AWS // Lambda response exception. @@ -21028,17 +21051,17 @@ func (s InvalidLambdaResponseException) GoString() string { func newErrorInvalidLambdaResponseException(v protocol.ResponseMetadata) error { return &InvalidLambdaResponseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLambdaResponseException) Code() string { +func (s *InvalidLambdaResponseException) Code() string { return "InvalidLambdaResponseException" } // Message returns the exception's message. -func (s InvalidLambdaResponseException) Message() string { +func (s *InvalidLambdaResponseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21046,28 +21069,28 @@ func (s InvalidLambdaResponseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLambdaResponseException) OrigErr() error { +func (s *InvalidLambdaResponseException) OrigErr() error { return nil } -func (s InvalidLambdaResponseException) Error() string { +func (s *InvalidLambdaResponseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLambdaResponseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLambdaResponseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLambdaResponseException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLambdaResponseException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the specified OAuth flow is invalid. type InvalidOAuthFlowException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21084,17 +21107,17 @@ func (s InvalidOAuthFlowException) GoString() string { func newErrorInvalidOAuthFlowException(v protocol.ResponseMetadata) error { return &InvalidOAuthFlowException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOAuthFlowException) Code() string { +func (s *InvalidOAuthFlowException) Code() string { return "InvalidOAuthFlowException" } // Message returns the exception's message. -func (s InvalidOAuthFlowException) Message() string { +func (s *InvalidOAuthFlowException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21102,29 +21125,29 @@ func (s InvalidOAuthFlowException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOAuthFlowException) OrigErr() error { +func (s *InvalidOAuthFlowException) OrigErr() error { return nil } -func (s InvalidOAuthFlowException) Error() string { +func (s *InvalidOAuthFlowException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOAuthFlowException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOAuthFlowException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOAuthFlowException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOAuthFlowException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the Amazon Cognito service encounters an invalid // parameter. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service throws an invalid parameter // exception. @@ -21143,17 +21166,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21161,29 +21184,29 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the Amazon Cognito service encounters an invalid // password. type InvalidPasswordException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service throws an invalid user // password exception. @@ -21202,17 +21225,17 @@ func (s InvalidPasswordException) GoString() string { func newErrorInvalidPasswordException(v protocol.ResponseMetadata) error { return &InvalidPasswordException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPasswordException) Code() string { +func (s *InvalidPasswordException) Code() string { return "InvalidPasswordException" } // Message returns the exception's message. -func (s InvalidPasswordException) Message() string { +func (s *InvalidPasswordException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21220,29 +21243,29 @@ func (s InvalidPasswordException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPasswordException) OrigErr() error { +func (s *InvalidPasswordException) OrigErr() error { return nil } -func (s InvalidPasswordException) Error() string { +func (s *InvalidPasswordException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPasswordException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPasswordException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPasswordException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPasswordException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is returned when the role provided for SMS configuration does // not have permission to publish using Amazon SNS. type InvalidSmsRoleAccessPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message retuned when the invalid SMS role access policy exception is // thrown. @@ -21261,17 +21284,17 @@ func (s InvalidSmsRoleAccessPolicyException) GoString() string { func newErrorInvalidSmsRoleAccessPolicyException(v protocol.ResponseMetadata) error { return &InvalidSmsRoleAccessPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSmsRoleAccessPolicyException) Code() string { +func (s *InvalidSmsRoleAccessPolicyException) Code() string { return "InvalidSmsRoleAccessPolicyException" } // Message returns the exception's message. -func (s InvalidSmsRoleAccessPolicyException) Message() string { +func (s *InvalidSmsRoleAccessPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21279,22 +21302,22 @@ func (s InvalidSmsRoleAccessPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSmsRoleAccessPolicyException) OrigErr() error { +func (s *InvalidSmsRoleAccessPolicyException) OrigErr() error { return nil } -func (s InvalidSmsRoleAccessPolicyException) Error() string { +func (s *InvalidSmsRoleAccessPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSmsRoleAccessPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSmsRoleAccessPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSmsRoleAccessPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSmsRoleAccessPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the trust relationship is invalid for the role @@ -21302,8 +21325,8 @@ func (s InvalidSmsRoleAccessPolicyException) RequestID() string { // or the external ID provided in the role does not match what is provided in // the SMS configuration for the user pool. type InvalidSmsRoleTrustRelationshipException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the role trust relationship for the SMS message // is invalid. @@ -21322,17 +21345,17 @@ func (s InvalidSmsRoleTrustRelationshipException) GoString() string { func newErrorInvalidSmsRoleTrustRelationshipException(v protocol.ResponseMetadata) error { return &InvalidSmsRoleTrustRelationshipException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSmsRoleTrustRelationshipException) Code() string { +func (s *InvalidSmsRoleTrustRelationshipException) Code() string { return "InvalidSmsRoleTrustRelationshipException" } // Message returns the exception's message. -func (s InvalidSmsRoleTrustRelationshipException) Message() string { +func (s *InvalidSmsRoleTrustRelationshipException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21340,28 +21363,28 @@ func (s InvalidSmsRoleTrustRelationshipException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSmsRoleTrustRelationshipException) OrigErr() error { +func (s *InvalidSmsRoleTrustRelationshipException) OrigErr() error { return nil } -func (s InvalidSmsRoleTrustRelationshipException) Error() string { +func (s *InvalidSmsRoleTrustRelationshipException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSmsRoleTrustRelationshipException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSmsRoleTrustRelationshipException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSmsRoleTrustRelationshipException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSmsRoleTrustRelationshipException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the user pool configuration is invalid. type InvalidUserPoolConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the user pool configuration is invalid. Message_ *string `locationName:"message" type:"string"` @@ -21379,17 +21402,17 @@ func (s InvalidUserPoolConfigurationException) GoString() string { func newErrorInvalidUserPoolConfigurationException(v protocol.ResponseMetadata) error { return &InvalidUserPoolConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidUserPoolConfigurationException) Code() string { +func (s *InvalidUserPoolConfigurationException) Code() string { return "InvalidUserPoolConfigurationException" } // Message returns the exception's message. -func (s InvalidUserPoolConfigurationException) Message() string { +func (s *InvalidUserPoolConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21397,22 +21420,22 @@ func (s InvalidUserPoolConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidUserPoolConfigurationException) OrigErr() error { +func (s *InvalidUserPoolConfigurationException) OrigErr() error { return nil } -func (s InvalidUserPoolConfigurationException) Error() string { +func (s *InvalidUserPoolConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidUserPoolConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidUserPoolConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidUserPoolConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidUserPoolConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the configuration for AWS Lambda triggers. @@ -21563,8 +21586,8 @@ func (s *LambdaConfigType) SetVerifyAuthChallengeResponse(v string) *LambdaConfi // This exception is thrown when a user exceeds the limit for a requested AWS // resource. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when Amazon Cognito throws a limit exceeded exception. Message_ *string `locationName:"message" type:"string"` @@ -21582,17 +21605,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21600,22 +21623,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the request to list the devices. @@ -22641,8 +22664,8 @@ func (s *ListUsersOutput) SetUsers(v []*UserType) *ListUsersOutput { // This exception is thrown when Amazon Cognito cannot find a multi-factor authentication // (MFA) method. type MFAMethodNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when Amazon Cognito throws an MFA method not found exception. Message_ *string `locationName:"message" type:"string"` @@ -22660,17 +22683,17 @@ func (s MFAMethodNotFoundException) GoString() string { func newErrorMFAMethodNotFoundException(v protocol.ResponseMetadata) error { return &MFAMethodNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MFAMethodNotFoundException) Code() string { +func (s *MFAMethodNotFoundException) Code() string { return "MFAMethodNotFoundException" } // Message returns the exception's message. -func (s MFAMethodNotFoundException) Message() string { +func (s *MFAMethodNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22678,22 +22701,22 @@ func (s MFAMethodNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MFAMethodNotFoundException) OrigErr() error { +func (s *MFAMethodNotFoundException) OrigErr() error { return nil } -func (s MFAMethodNotFoundException) Error() string { +func (s *MFAMethodNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MFAMethodNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MFAMethodNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MFAMethodNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *MFAMethodNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // This data type is no longer supported. You can use it only for SMS MFA configurations. @@ -22846,8 +22869,8 @@ func (s *NewDeviceMetadataType) SetDeviceKey(v string) *NewDeviceMetadataType { // This exception is thrown when a user is not authorized. type NotAuthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service returns a not authorized // exception. @@ -22866,17 +22889,17 @@ func (s NotAuthorizedException) GoString() string { func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { return &NotAuthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotAuthorizedException) Code() string { +func (s *NotAuthorizedException) Code() string { return "NotAuthorizedException" } // Message returns the exception's message. -func (s NotAuthorizedException) Message() string { +func (s *NotAuthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22884,22 +22907,22 @@ func (s NotAuthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotAuthorizedException) OrigErr() error { +func (s *NotAuthorizedException) OrigErr() error { return nil } -func (s NotAuthorizedException) Error() string { +func (s *NotAuthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotAuthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotAuthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotAuthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotAuthorizedException) RequestID() string { + return s.RespMetadata.RequestID } // The notify configuration type. @@ -23204,8 +23227,8 @@ func (s *PasswordPolicyType) SetTemporaryPasswordValidityDays(v int64) *Password // This exception is thrown when a password reset is required. type PasswordResetRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when a password reset is required. Message_ *string `locationName:"message" type:"string"` @@ -23223,17 +23246,17 @@ func (s PasswordResetRequiredException) GoString() string { func newErrorPasswordResetRequiredException(v protocol.ResponseMetadata) error { return &PasswordResetRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PasswordResetRequiredException) Code() string { +func (s *PasswordResetRequiredException) Code() string { return "PasswordResetRequiredException" } // Message returns the exception's message. -func (s PasswordResetRequiredException) Message() string { +func (s *PasswordResetRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23241,28 +23264,28 @@ func (s PasswordResetRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PasswordResetRequiredException) OrigErr() error { +func (s *PasswordResetRequiredException) OrigErr() error { return nil } -func (s PasswordResetRequiredException) Error() string { +func (s *PasswordResetRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PasswordResetRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PasswordResetRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PasswordResetRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *PasswordResetRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when a precondition is not met. type PreconditionNotMetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when a precondition is not met. Message_ *string `locationName:"message" type:"string"` @@ -23280,17 +23303,17 @@ func (s PreconditionNotMetException) GoString() string { func newErrorPreconditionNotMetException(v protocol.ResponseMetadata) error { return &PreconditionNotMetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PreconditionNotMetException) Code() string { +func (s *PreconditionNotMetException) Code() string { return "PreconditionNotMetException" } // Message returns the exception's message. -func (s PreconditionNotMetException) Message() string { +func (s *PreconditionNotMetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23298,22 +23321,22 @@ func (s PreconditionNotMetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PreconditionNotMetException) OrigErr() error { +func (s *PreconditionNotMetException) OrigErr() error { return nil } -func (s PreconditionNotMetException) Error() string { +func (s *PreconditionNotMetException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PreconditionNotMetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PreconditionNotMetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PreconditionNotMetException) RequestID() string { - return s.respMetadata.RequestID +func (s *PreconditionNotMetException) RequestID() string { + return s.RespMetadata.RequestID } // A container for identity provider details. @@ -23638,8 +23661,8 @@ func (s *ResendConfirmationCodeOutput) SetCodeDeliveryDetails(v *CodeDeliveryDet // This exception is thrown when the Amazon Cognito service cannot find the // requested resource. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service returns a resource not // found exception. @@ -23658,17 +23681,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23676,22 +23699,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A resource server scope. @@ -24272,8 +24295,8 @@ func (s *SchemaAttributeType) SetStringAttributeConstraints(v *StringAttributeCo // This exception is thrown when the specified scope does not exist. type ScopeDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -24290,17 +24313,17 @@ func (s ScopeDoesNotExistException) GoString() string { func newErrorScopeDoesNotExistException(v protocol.ResponseMetadata) error { return &ScopeDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ScopeDoesNotExistException) Code() string { +func (s *ScopeDoesNotExistException) Code() string { return "ScopeDoesNotExistException" } // Message returns the exception's message. -func (s ScopeDoesNotExistException) Message() string { +func (s *ScopeDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24308,22 +24331,22 @@ func (s ScopeDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ScopeDoesNotExistException) OrigErr() error { +func (s *ScopeDoesNotExistException) OrigErr() error { return nil } -func (s ScopeDoesNotExistException) Error() string { +func (s *ScopeDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ScopeDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ScopeDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ScopeDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *ScopeDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } type SetRiskConfigurationInput struct { @@ -25176,8 +25199,8 @@ func (s *SmsMfaConfigType) SetSmsConfiguration(v *SmsConfigurationType) *SmsMfaC // This exception is thrown when the software token TOTP multi-factor authentication // (MFA) is not enabled for the user pool. type SoftwareTokenMFANotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25194,17 +25217,17 @@ func (s SoftwareTokenMFANotFoundException) GoString() string { func newErrorSoftwareTokenMFANotFoundException(v protocol.ResponseMetadata) error { return &SoftwareTokenMFANotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SoftwareTokenMFANotFoundException) Code() string { +func (s *SoftwareTokenMFANotFoundException) Code() string { return "SoftwareTokenMFANotFoundException" } // Message returns the exception's message. -func (s SoftwareTokenMFANotFoundException) Message() string { +func (s *SoftwareTokenMFANotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25212,22 +25235,22 @@ func (s SoftwareTokenMFANotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SoftwareTokenMFANotFoundException) OrigErr() error { +func (s *SoftwareTokenMFANotFoundException) OrigErr() error { return nil } -func (s SoftwareTokenMFANotFoundException) Error() string { +func (s *SoftwareTokenMFANotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SoftwareTokenMFANotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SoftwareTokenMFANotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SoftwareTokenMFANotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *SoftwareTokenMFANotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The type used for enabling software token MFA at the user pool level. @@ -25560,8 +25583,8 @@ func (s TagResourceOutput) GoString() string { // This exception is thrown when the user has made too many failed attempts // for a given action (e.g., sign in). type TooManyFailedAttemptsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service returns a too many failed // attempts exception. @@ -25580,17 +25603,17 @@ func (s TooManyFailedAttemptsException) GoString() string { func newErrorTooManyFailedAttemptsException(v protocol.ResponseMetadata) error { return &TooManyFailedAttemptsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyFailedAttemptsException) Code() string { +func (s *TooManyFailedAttemptsException) Code() string { return "TooManyFailedAttemptsException" } // Message returns the exception's message. -func (s TooManyFailedAttemptsException) Message() string { +func (s *TooManyFailedAttemptsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25598,29 +25621,29 @@ func (s TooManyFailedAttemptsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyFailedAttemptsException) OrigErr() error { +func (s *TooManyFailedAttemptsException) OrigErr() error { return nil } -func (s TooManyFailedAttemptsException) Error() string { +func (s *TooManyFailedAttemptsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyFailedAttemptsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyFailedAttemptsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyFailedAttemptsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyFailedAttemptsException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the user has made too many requests for a given // operation. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service returns a too many requests // exception. @@ -25639,17 +25662,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25657,22 +25680,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // A container for the UI customization information for a user pool's built-in @@ -25757,8 +25780,8 @@ func (s *UICustomizationType) SetUserPoolId(v string) *UICustomizationType { // This exception is thrown when the Amazon Cognito service encounters an unexpected // exception with the AWS Lambda service. type UnexpectedLambdaException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service returns an unexpected // AWS Lambda exception. @@ -25777,17 +25800,17 @@ func (s UnexpectedLambdaException) GoString() string { func newErrorUnexpectedLambdaException(v protocol.ResponseMetadata) error { return &UnexpectedLambdaException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnexpectedLambdaException) Code() string { +func (s *UnexpectedLambdaException) Code() string { return "UnexpectedLambdaException" } // Message returns the exception's message. -func (s UnexpectedLambdaException) Message() string { +func (s *UnexpectedLambdaException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25795,28 +25818,28 @@ func (s UnexpectedLambdaException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnexpectedLambdaException) OrigErr() error { +func (s *UnexpectedLambdaException) OrigErr() error { return nil } -func (s UnexpectedLambdaException) Error() string { +func (s *UnexpectedLambdaException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnexpectedLambdaException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnexpectedLambdaException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnexpectedLambdaException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnexpectedLambdaException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the specified identifier is not supported. type UnsupportedIdentityProviderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -25833,17 +25856,17 @@ func (s UnsupportedIdentityProviderException) GoString() string { func newErrorUnsupportedIdentityProviderException(v protocol.ResponseMetadata) error { return &UnsupportedIdentityProviderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedIdentityProviderException) Code() string { +func (s *UnsupportedIdentityProviderException) Code() string { return "UnsupportedIdentityProviderException" } // Message returns the exception's message. -func (s UnsupportedIdentityProviderException) Message() string { +func (s *UnsupportedIdentityProviderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25851,28 +25874,28 @@ func (s UnsupportedIdentityProviderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedIdentityProviderException) OrigErr() error { +func (s *UnsupportedIdentityProviderException) OrigErr() error { return nil } -func (s UnsupportedIdentityProviderException) Error() string { +func (s *UnsupportedIdentityProviderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedIdentityProviderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedIdentityProviderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedIdentityProviderException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedIdentityProviderException) RequestID() string { + return s.RespMetadata.RequestID } // The request failed because the user is in an unsupported state. type UnsupportedUserStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the user is in an unsupported state. Message_ *string `locationName:"message" type:"string"` @@ -25890,17 +25913,17 @@ func (s UnsupportedUserStateException) GoString() string { func newErrorUnsupportedUserStateException(v protocol.ResponseMetadata) error { return &UnsupportedUserStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedUserStateException) Code() string { +func (s *UnsupportedUserStateException) Code() string { return "UnsupportedUserStateException" } // Message returns the exception's message. -func (s UnsupportedUserStateException) Message() string { +func (s *UnsupportedUserStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25908,22 +25931,22 @@ func (s UnsupportedUserStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedUserStateException) OrigErr() error { +func (s *UnsupportedUserStateException) OrigErr() error { return nil } -func (s UnsupportedUserStateException) Error() string { +func (s *UnsupportedUserStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedUserStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedUserStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedUserStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedUserStateException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -26692,6 +26715,10 @@ type UpdateUserPoolClientInput struct { // The Amazon Pinpoint analytics configuration for collecting metrics for this // user pool. + // + // Cognito User Pools only supports sending events to Amazon Pinpoint projects + // in the US East (N. Virginia) us-east-1 Region, regardless of the region in + // which the user pool resides. AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` // A list of allowed redirect (callback) URLs for the identity providers. @@ -27404,8 +27431,8 @@ func (s *UserContextDataType) SetEncodedData(v string) *UserContextDataType { // This exception is thrown when you are trying to modify a user pool while // a user import job is in progress for that pool. type UserImportInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the user pool has an import job running. Message_ *string `locationName:"message" type:"string"` @@ -27423,17 +27450,17 @@ func (s UserImportInProgressException) GoString() string { func newErrorUserImportInProgressException(v protocol.ResponseMetadata) error { return &UserImportInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserImportInProgressException) Code() string { +func (s *UserImportInProgressException) Code() string { return "UserImportInProgressException" } // Message returns the exception's message. -func (s UserImportInProgressException) Message() string { +func (s *UserImportInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27441,22 +27468,22 @@ func (s UserImportInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserImportInProgressException) OrigErr() error { +func (s *UserImportInProgressException) OrigErr() error { return nil } -func (s UserImportInProgressException) Error() string { +func (s *UserImportInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UserImportInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserImportInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserImportInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserImportInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // The user import job type. @@ -27617,8 +27644,8 @@ func (s *UserImportJobType) SetUserPoolId(v string) *UserImportJobType { // This exception is thrown when the Amazon Cognito service encounters a user // validation exception with the AWS Lambda service. type UserLambdaValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when the Amazon Cognito service returns a user validation // exception with the AWS Lambda service. @@ -27637,17 +27664,17 @@ func (s UserLambdaValidationException) GoString() string { func newErrorUserLambdaValidationException(v protocol.ResponseMetadata) error { return &UserLambdaValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserLambdaValidationException) Code() string { +func (s *UserLambdaValidationException) Code() string { return "UserLambdaValidationException" } // Message returns the exception's message. -func (s UserLambdaValidationException) Message() string { +func (s *UserLambdaValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27655,28 +27682,28 @@ func (s UserLambdaValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserLambdaValidationException) OrigErr() error { +func (s *UserLambdaValidationException) OrigErr() error { return nil } -func (s UserLambdaValidationException) Error() string { +func (s *UserLambdaValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UserLambdaValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserLambdaValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserLambdaValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserLambdaValidationException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when a user is not confirmed successfully. type UserNotConfirmedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when a user is not confirmed successfully. Message_ *string `locationName:"message" type:"string"` @@ -27694,17 +27721,17 @@ func (s UserNotConfirmedException) GoString() string { func newErrorUserNotConfirmedException(v protocol.ResponseMetadata) error { return &UserNotConfirmedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserNotConfirmedException) Code() string { +func (s *UserNotConfirmedException) Code() string { return "UserNotConfirmedException" } // Message returns the exception's message. -func (s UserNotConfirmedException) Message() string { +func (s *UserNotConfirmedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27712,28 +27739,28 @@ func (s UserNotConfirmedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserNotConfirmedException) OrigErr() error { +func (s *UserNotConfirmedException) OrigErr() error { return nil } -func (s UserNotConfirmedException) Error() string { +func (s *UserNotConfirmedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UserNotConfirmedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserNotConfirmedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserNotConfirmedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserNotConfirmedException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when a user is not found. type UserNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when a user is not found. Message_ *string `locationName:"message" type:"string"` @@ -27751,17 +27778,17 @@ func (s UserNotFoundException) GoString() string { func newErrorUserNotFoundException(v protocol.ResponseMetadata) error { return &UserNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserNotFoundException) Code() string { +func (s *UserNotFoundException) Code() string { return "UserNotFoundException" } // Message returns the exception's message. -func (s UserNotFoundException) Message() string { +func (s *UserNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27769,28 +27796,28 @@ func (s UserNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserNotFoundException) OrigErr() error { +func (s *UserNotFoundException) OrigErr() error { return nil } -func (s UserNotFoundException) Error() string { +func (s *UserNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UserNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when user pool add-ons are not enabled. type UserPoolAddOnNotEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -27807,17 +27834,17 @@ func (s UserPoolAddOnNotEnabledException) GoString() string { func newErrorUserPoolAddOnNotEnabledException(v protocol.ResponseMetadata) error { return &UserPoolAddOnNotEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserPoolAddOnNotEnabledException) Code() string { +func (s *UserPoolAddOnNotEnabledException) Code() string { return "UserPoolAddOnNotEnabledException" } // Message returns the exception's message. -func (s UserPoolAddOnNotEnabledException) Message() string { +func (s *UserPoolAddOnNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27825,22 +27852,22 @@ func (s UserPoolAddOnNotEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserPoolAddOnNotEnabledException) OrigErr() error { +func (s *UserPoolAddOnNotEnabledException) OrigErr() error { return nil } -func (s UserPoolAddOnNotEnabledException) Error() string { +func (s *UserPoolAddOnNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UserPoolAddOnNotEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserPoolAddOnNotEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserPoolAddOnNotEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserPoolAddOnNotEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // The user pool add-ons type. @@ -27953,6 +27980,10 @@ type UserPoolClientType struct { AllowedOAuthScopes []*string `type:"list"` // The Amazon Pinpoint analytics configuration for the user pool client. + // + // Cognito User Pools only supports sending events to Amazon Pinpoint projects + // in the US East (N. Virginia) us-east-1 Region, regardless of the region in + // which the user pool resides. AnalyticsConfiguration *AnalyticsConfigurationType `type:"structure"` // A list of allowed redirect (callback) URLs for the identity providers. @@ -28323,8 +28354,8 @@ func (s *UserPoolPolicyType) SetPasswordPolicy(v *PasswordPolicyType) *UserPoolP // This exception is thrown when a user pool tag cannot be set or updated. type UserPoolTaggingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28341,17 +28372,17 @@ func (s UserPoolTaggingException) GoString() string { func newErrorUserPoolTaggingException(v protocol.ResponseMetadata) error { return &UserPoolTaggingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserPoolTaggingException) Code() string { +func (s *UserPoolTaggingException) Code() string { return "UserPoolTaggingException" } // Message returns the exception's message. -func (s UserPoolTaggingException) Message() string { +func (s *UserPoolTaggingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28359,22 +28390,22 @@ func (s UserPoolTaggingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserPoolTaggingException) OrigErr() error { +func (s *UserPoolTaggingException) OrigErr() error { return nil } -func (s UserPoolTaggingException) Error() string { +func (s *UserPoolTaggingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UserPoolTaggingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserPoolTaggingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserPoolTaggingException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserPoolTaggingException) RequestID() string { + return s.RespMetadata.RequestID } // A container for information about the user pool. @@ -28845,8 +28876,8 @@ func (s *UsernameConfigurationType) SetCaseSensitive(v bool) *UsernameConfigurat // This exception is thrown when Amazon Cognito encounters a user name that // already exists in the user pool. type UsernameExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message returned when Amazon Cognito throws a user name exists exception. Message_ *string `locationName:"message" type:"string"` @@ -28864,17 +28895,17 @@ func (s UsernameExistsException) GoString() string { func newErrorUsernameExistsException(v protocol.ResponseMetadata) error { return &UsernameExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UsernameExistsException) Code() string { +func (s *UsernameExistsException) Code() string { return "UsernameExistsException" } // Message returns the exception's message. -func (s UsernameExistsException) Message() string { +func (s *UsernameExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28882,22 +28913,22 @@ func (s UsernameExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UsernameExistsException) OrigErr() error { +func (s *UsernameExistsException) OrigErr() error { return nil } -func (s UsernameExistsException) Error() string { +func (s *UsernameExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UsernameExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UsernameExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UsernameExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *UsernameExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The template for verification messages. 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 42c7282c8c1..f767f1baf2d 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 @@ -10602,8 +10602,8 @@ func (s *ConformancePackStatusDetail) SetStackArn(v string) *ConformancePackStat // You have specified a template that is not valid or supported. type ConformancePackTemplateValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10620,17 +10620,17 @@ func (s ConformancePackTemplateValidationException) GoString() string { func newErrorConformancePackTemplateValidationException(v protocol.ResponseMetadata) error { return &ConformancePackTemplateValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConformancePackTemplateValidationException) Code() string { +func (s *ConformancePackTemplateValidationException) Code() string { return "ConformancePackTemplateValidationException" } // Message returns the exception's message. -func (s ConformancePackTemplateValidationException) Message() string { +func (s *ConformancePackTemplateValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10638,22 +10638,22 @@ func (s ConformancePackTemplateValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConformancePackTemplateValidationException) OrigErr() error { +func (s *ConformancePackTemplateValidationException) OrigErr() error { return nil } -func (s ConformancePackTemplateValidationException) Error() string { +func (s *ConformancePackTemplateValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConformancePackTemplateValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConformancePackTemplateValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConformancePackTemplateValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConformancePackTemplateValidationException) RequestID() string { + return s.RespMetadata.RequestID } type DeleteAggregationAuthorizationInput struct { @@ -15624,8 +15624,8 @@ func (s *GroupedResourceCount) SetResourceCount(v int64) *GroupedResourceCount { // Your Amazon S3 bucket policy does not permit AWS Config to write to it. type InsufficientDeliveryPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15642,17 +15642,17 @@ func (s InsufficientDeliveryPolicyException) GoString() string { func newErrorInsufficientDeliveryPolicyException(v protocol.ResponseMetadata) error { return &InsufficientDeliveryPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientDeliveryPolicyException) Code() string { +func (s *InsufficientDeliveryPolicyException) Code() string { return "InsufficientDeliveryPolicyException" } // Message returns the exception's message. -func (s InsufficientDeliveryPolicyException) Message() string { +func (s *InsufficientDeliveryPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15660,22 +15660,22 @@ func (s InsufficientDeliveryPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientDeliveryPolicyException) OrigErr() error { +func (s *InsufficientDeliveryPolicyException) OrigErr() error { return nil } -func (s InsufficientDeliveryPolicyException) Error() string { +func (s *InsufficientDeliveryPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientDeliveryPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientDeliveryPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientDeliveryPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientDeliveryPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // Indicates one of the following errors: @@ -15694,8 +15694,8 @@ func (s InsufficientDeliveryPolicyException) RequestID() string { // pack cannot be created because you do not have permissions: To call IAM // GetRole action or create a service linked role. To read Amazon S3 bucket. type InsufficientPermissionsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15712,17 +15712,17 @@ func (s InsufficientPermissionsException) GoString() string { func newErrorInsufficientPermissionsException(v protocol.ResponseMetadata) error { return &InsufficientPermissionsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientPermissionsException) Code() string { +func (s *InsufficientPermissionsException) Code() string { return "InsufficientPermissionsException" } // Message returns the exception's message. -func (s InsufficientPermissionsException) Message() string { +func (s *InsufficientPermissionsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15730,28 +15730,28 @@ func (s InsufficientPermissionsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientPermissionsException) OrigErr() error { +func (s *InsufficientPermissionsException) OrigErr() error { return nil } -func (s InsufficientPermissionsException) Error() string { +func (s *InsufficientPermissionsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientPermissionsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientPermissionsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientPermissionsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientPermissionsException) RequestID() string { + return s.RespMetadata.RequestID } // You have provided a configuration recorder name that is not valid. type InvalidConfigurationRecorderNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15768,17 +15768,17 @@ func (s InvalidConfigurationRecorderNameException) GoString() string { func newErrorInvalidConfigurationRecorderNameException(v protocol.ResponseMetadata) error { return &InvalidConfigurationRecorderNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidConfigurationRecorderNameException) Code() string { +func (s *InvalidConfigurationRecorderNameException) Code() string { return "InvalidConfigurationRecorderNameException" } // Message returns the exception's message. -func (s InvalidConfigurationRecorderNameException) Message() string { +func (s *InvalidConfigurationRecorderNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15786,28 +15786,28 @@ func (s InvalidConfigurationRecorderNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidConfigurationRecorderNameException) OrigErr() error { +func (s *InvalidConfigurationRecorderNameException) OrigErr() error { return nil } -func (s InvalidConfigurationRecorderNameException) Error() string { +func (s *InvalidConfigurationRecorderNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidConfigurationRecorderNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidConfigurationRecorderNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidConfigurationRecorderNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidConfigurationRecorderNameException) RequestID() string { + return s.RespMetadata.RequestID } // The specified delivery channel name is not valid. type InvalidDeliveryChannelNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15824,17 +15824,17 @@ func (s InvalidDeliveryChannelNameException) GoString() string { func newErrorInvalidDeliveryChannelNameException(v protocol.ResponseMetadata) error { return &InvalidDeliveryChannelNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeliveryChannelNameException) Code() string { +func (s *InvalidDeliveryChannelNameException) Code() string { return "InvalidDeliveryChannelNameException" } // Message returns the exception's message. -func (s InvalidDeliveryChannelNameException) Message() string { +func (s *InvalidDeliveryChannelNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15842,28 +15842,28 @@ func (s InvalidDeliveryChannelNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeliveryChannelNameException) OrigErr() error { +func (s *InvalidDeliveryChannelNameException) OrigErr() error { return nil } -func (s InvalidDeliveryChannelNameException) Error() string { +func (s *InvalidDeliveryChannelNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeliveryChannelNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeliveryChannelNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeliveryChannelNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeliveryChannelNameException) RequestID() string { + return s.RespMetadata.RequestID } // The syntax of the query is incorrect. type InvalidExpressionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15880,17 +15880,17 @@ func (s InvalidExpressionException) GoString() string { func newErrorInvalidExpressionException(v protocol.ResponseMetadata) error { return &InvalidExpressionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidExpressionException) Code() string { +func (s *InvalidExpressionException) Code() string { return "InvalidExpressionException" } // Message returns the exception's message. -func (s InvalidExpressionException) Message() string { +func (s *InvalidExpressionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15898,28 +15898,28 @@ func (s InvalidExpressionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidExpressionException) OrigErr() error { +func (s *InvalidExpressionException) OrigErr() error { return nil } -func (s InvalidExpressionException) Error() string { +func (s *InvalidExpressionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidExpressionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidExpressionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidExpressionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidExpressionException) RequestID() string { + return s.RespMetadata.RequestID } // The specified limit is outside the allowable range. type InvalidLimitException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15936,17 +15936,17 @@ func (s InvalidLimitException) GoString() string { func newErrorInvalidLimitException(v protocol.ResponseMetadata) error { return &InvalidLimitException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLimitException) Code() string { +func (s *InvalidLimitException) Code() string { return "InvalidLimitException" } // Message returns the exception's message. -func (s InvalidLimitException) Message() string { +func (s *InvalidLimitException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15954,29 +15954,29 @@ func (s InvalidLimitException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLimitException) OrigErr() error { +func (s *InvalidLimitException) OrigErr() error { return nil } -func (s InvalidLimitException) Error() string { +func (s *InvalidLimitException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLimitException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLimitException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLimitException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLimitException) RequestID() string { + return s.RespMetadata.RequestID } // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15993,17 +15993,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16011,29 +16011,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // One or more of the specified parameters are invalid. Verify that your parameters // are valid and try again. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16050,17 +16050,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16068,29 +16068,29 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Config throws an exception if the recording group does not contain a // valid list of resource types. Invalid values might also be incorrectly formatted. type InvalidRecordingGroupException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16107,17 +16107,17 @@ func (s InvalidRecordingGroupException) GoString() string { func newErrorInvalidRecordingGroupException(v protocol.ResponseMetadata) error { return &InvalidRecordingGroupException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRecordingGroupException) Code() string { +func (s *InvalidRecordingGroupException) Code() string { return "InvalidRecordingGroupException" } // Message returns the exception's message. -func (s InvalidRecordingGroupException) Message() string { +func (s *InvalidRecordingGroupException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16125,28 +16125,28 @@ func (s InvalidRecordingGroupException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRecordingGroupException) OrigErr() error { +func (s *InvalidRecordingGroupException) OrigErr() error { return nil } -func (s InvalidRecordingGroupException) Error() string { +func (s *InvalidRecordingGroupException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRecordingGroupException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRecordingGroupException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRecordingGroupException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRecordingGroupException) RequestID() string { + return s.RespMetadata.RequestID } // The specified ResultToken is invalid. type InvalidResultTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16163,17 +16163,17 @@ func (s InvalidResultTokenException) GoString() string { func newErrorInvalidResultTokenException(v protocol.ResponseMetadata) error { return &InvalidResultTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResultTokenException) Code() string { +func (s *InvalidResultTokenException) Code() string { return "InvalidResultTokenException" } // Message returns the exception's message. -func (s InvalidResultTokenException) Message() string { +func (s *InvalidResultTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16181,28 +16181,28 @@ func (s InvalidResultTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResultTokenException) OrigErr() error { +func (s *InvalidResultTokenException) OrigErr() error { return nil } -func (s InvalidResultTokenException) Error() string { +func (s *InvalidResultTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResultTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResultTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResultTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResultTokenException) RequestID() string { + return s.RespMetadata.RequestID } // You have provided a null or empty role ARN. type InvalidRoleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16219,17 +16219,17 @@ func (s InvalidRoleException) GoString() string { func newErrorInvalidRoleException(v protocol.ResponseMetadata) error { return &InvalidRoleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRoleException) Code() string { +func (s *InvalidRoleException) Code() string { return "InvalidRoleException" } // Message returns the exception's message. -func (s InvalidRoleException) Message() string { +func (s *InvalidRoleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16237,28 +16237,28 @@ func (s InvalidRoleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRoleException) OrigErr() error { +func (s *InvalidRoleException) OrigErr() error { return nil } -func (s InvalidRoleException) Error() string { +func (s *InvalidRoleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRoleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRoleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRoleException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRoleException) RequestID() string { + return s.RespMetadata.RequestID } // The specified Amazon S3 key prefix is not valid. type InvalidS3KeyPrefixException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16275,17 +16275,17 @@ func (s InvalidS3KeyPrefixException) GoString() string { func newErrorInvalidS3KeyPrefixException(v protocol.ResponseMetadata) error { return &InvalidS3KeyPrefixException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidS3KeyPrefixException) Code() string { +func (s *InvalidS3KeyPrefixException) Code() string { return "InvalidS3KeyPrefixException" } // Message returns the exception's message. -func (s InvalidS3KeyPrefixException) Message() string { +func (s *InvalidS3KeyPrefixException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16293,28 +16293,28 @@ func (s InvalidS3KeyPrefixException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidS3KeyPrefixException) OrigErr() error { +func (s *InvalidS3KeyPrefixException) OrigErr() error { return nil } -func (s InvalidS3KeyPrefixException) Error() string { +func (s *InvalidS3KeyPrefixException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidS3KeyPrefixException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidS3KeyPrefixException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidS3KeyPrefixException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidS3KeyPrefixException) RequestID() string { + return s.RespMetadata.RequestID } // The specified Amazon SNS topic does not exist. type InvalidSNSTopicARNException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16331,17 +16331,17 @@ func (s InvalidSNSTopicARNException) GoString() string { func newErrorInvalidSNSTopicARNException(v protocol.ResponseMetadata) error { return &InvalidSNSTopicARNException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSNSTopicARNException) Code() string { +func (s *InvalidSNSTopicARNException) Code() string { return "InvalidSNSTopicARNException" } // Message returns the exception's message. -func (s InvalidSNSTopicARNException) Message() string { +func (s *InvalidSNSTopicARNException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16349,29 +16349,29 @@ func (s InvalidSNSTopicARNException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSNSTopicARNException) OrigErr() error { +func (s *InvalidSNSTopicARNException) OrigErr() error { return nil } -func (s InvalidSNSTopicARNException) Error() string { +func (s *InvalidSNSTopicARNException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSNSTopicARNException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSNSTopicARNException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSNSTopicARNException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSNSTopicARNException) RequestID() string { + return s.RespMetadata.RequestID } // The specified time range is not valid. The earlier time is not chronologically // before the later time. type InvalidTimeRangeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16388,17 +16388,17 @@ func (s InvalidTimeRangeException) GoString() string { func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error { return &InvalidTimeRangeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTimeRangeException) Code() string { +func (s *InvalidTimeRangeException) Code() string { return "InvalidTimeRangeException" } // Message returns the exception's message. -func (s InvalidTimeRangeException) Message() string { +func (s *InvalidTimeRangeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16406,29 +16406,29 @@ func (s InvalidTimeRangeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTimeRangeException) OrigErr() error { +func (s *InvalidTimeRangeException) OrigErr() error { return nil } -func (s InvalidTimeRangeException) Error() string { +func (s *InvalidTimeRangeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTimeRangeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTimeRangeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTimeRangeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTimeRangeException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot delete the delivery channel you specified because the configuration // recorder is running. type LastDeliveryChannelDeleteFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16445,17 +16445,17 @@ func (s LastDeliveryChannelDeleteFailedException) GoString() string { func newErrorLastDeliveryChannelDeleteFailedException(v protocol.ResponseMetadata) error { return &LastDeliveryChannelDeleteFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LastDeliveryChannelDeleteFailedException) Code() string { +func (s *LastDeliveryChannelDeleteFailedException) Code() string { return "LastDeliveryChannelDeleteFailedException" } // Message returns the exception's message. -func (s LastDeliveryChannelDeleteFailedException) Message() string { +func (s *LastDeliveryChannelDeleteFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16463,22 +16463,22 @@ func (s LastDeliveryChannelDeleteFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LastDeliveryChannelDeleteFailedException) OrigErr() error { +func (s *LastDeliveryChannelDeleteFailedException) OrigErr() error { return nil } -func (s LastDeliveryChannelDeleteFailedException) Error() string { +func (s *LastDeliveryChannelDeleteFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LastDeliveryChannelDeleteFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LastDeliveryChannelDeleteFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LastDeliveryChannelDeleteFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *LastDeliveryChannelDeleteFailedException) RequestID() string { + return s.RespMetadata.RequestID } // For StartConfigRulesEvaluation API, this exception is thrown if an evaluation @@ -16488,8 +16488,8 @@ func (s LastDeliveryChannelDeleteFailedException) RequestID() string { // For PutConfigurationAggregator API, this exception is thrown if the number // of accounts and aggregators exceeds the limit. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16506,17 +16506,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16524,22 +16524,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAggregateDiscoveredResourcesInput struct { @@ -16890,8 +16890,8 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput // You have reached the limit (100,000) of active custom resource types in your // account. Delete unused resources using DeleteResourceConfig. type MaxActiveResourcesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16908,17 +16908,17 @@ func (s MaxActiveResourcesExceededException) GoString() string { func newErrorMaxActiveResourcesExceededException(v protocol.ResponseMetadata) error { return &MaxActiveResourcesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxActiveResourcesExceededException) Code() string { +func (s *MaxActiveResourcesExceededException) Code() string { return "MaxActiveResourcesExceededException" } // Message returns the exception's message. -func (s MaxActiveResourcesExceededException) Message() string { +func (s *MaxActiveResourcesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16926,30 +16926,30 @@ func (s MaxActiveResourcesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxActiveResourcesExceededException) OrigErr() error { +func (s *MaxActiveResourcesExceededException) OrigErr() error { return nil } -func (s MaxActiveResourcesExceededException) Error() string { +func (s *MaxActiveResourcesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxActiveResourcesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxActiveResourcesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxActiveResourcesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxActiveResourcesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Failed to add the AWS Config rule because the account already contains the // maximum number of 150 rules. Consider deleting any deactivated rules before // you add new rules. type MaxNumberOfConfigRulesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16966,17 +16966,17 @@ func (s MaxNumberOfConfigRulesExceededException) GoString() string { func newErrorMaxNumberOfConfigRulesExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfConfigRulesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfConfigRulesExceededException) Code() string { +func (s *MaxNumberOfConfigRulesExceededException) Code() string { return "MaxNumberOfConfigRulesExceededException" } // Message returns the exception's message. -func (s MaxNumberOfConfigRulesExceededException) Message() string { +func (s *MaxNumberOfConfigRulesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16984,28 +16984,28 @@ func (s MaxNumberOfConfigRulesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfConfigRulesExceededException) OrigErr() error { +func (s *MaxNumberOfConfigRulesExceededException) OrigErr() error { return nil } -func (s MaxNumberOfConfigRulesExceededException) Error() string { +func (s *MaxNumberOfConfigRulesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfConfigRulesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfConfigRulesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfConfigRulesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfConfigRulesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the limit of the number of recorders you can create. type MaxNumberOfConfigurationRecordersExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17022,17 +17022,17 @@ func (s MaxNumberOfConfigurationRecordersExceededException) GoString() string { func newErrorMaxNumberOfConfigurationRecordersExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfConfigurationRecordersExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfConfigurationRecordersExceededException) Code() string { +func (s *MaxNumberOfConfigurationRecordersExceededException) Code() string { return "MaxNumberOfConfigurationRecordersExceededException" } // Message returns the exception's message. -func (s MaxNumberOfConfigurationRecordersExceededException) Message() string { +func (s *MaxNumberOfConfigurationRecordersExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17040,29 +17040,29 @@ func (s MaxNumberOfConfigurationRecordersExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfConfigurationRecordersExceededException) OrigErr() error { +func (s *MaxNumberOfConfigurationRecordersExceededException) OrigErr() error { return nil } -func (s MaxNumberOfConfigurationRecordersExceededException) Error() string { +func (s *MaxNumberOfConfigurationRecordersExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfConfigurationRecordersExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfConfigurationRecordersExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfConfigurationRecordersExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfConfigurationRecordersExceededException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the limit (6) of the number of conformance packs in an account // (6 conformance pack with 25 AWS Config rules per pack). type MaxNumberOfConformancePacksExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17079,17 +17079,17 @@ func (s MaxNumberOfConformancePacksExceededException) GoString() string { func newErrorMaxNumberOfConformancePacksExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfConformancePacksExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfConformancePacksExceededException) Code() string { +func (s *MaxNumberOfConformancePacksExceededException) Code() string { return "MaxNumberOfConformancePacksExceededException" } // Message returns the exception's message. -func (s MaxNumberOfConformancePacksExceededException) Message() string { +func (s *MaxNumberOfConformancePacksExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17097,28 +17097,28 @@ func (s MaxNumberOfConformancePacksExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfConformancePacksExceededException) OrigErr() error { +func (s *MaxNumberOfConformancePacksExceededException) OrigErr() error { return nil } -func (s MaxNumberOfConformancePacksExceededException) Error() string { +func (s *MaxNumberOfConformancePacksExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfConformancePacksExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfConformancePacksExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfConformancePacksExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfConformancePacksExceededException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the limit of the number of delivery channels you can create. type MaxNumberOfDeliveryChannelsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17135,17 +17135,17 @@ func (s MaxNumberOfDeliveryChannelsExceededException) GoString() string { func newErrorMaxNumberOfDeliveryChannelsExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfDeliveryChannelsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfDeliveryChannelsExceededException) Code() string { +func (s *MaxNumberOfDeliveryChannelsExceededException) Code() string { return "MaxNumberOfDeliveryChannelsExceededException" } // Message returns the exception's message. -func (s MaxNumberOfDeliveryChannelsExceededException) Message() string { +func (s *MaxNumberOfDeliveryChannelsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17153,29 +17153,29 @@ func (s MaxNumberOfDeliveryChannelsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfDeliveryChannelsExceededException) OrigErr() error { +func (s *MaxNumberOfDeliveryChannelsExceededException) OrigErr() error { return nil } -func (s MaxNumberOfDeliveryChannelsExceededException) Error() string { +func (s *MaxNumberOfDeliveryChannelsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfDeliveryChannelsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfDeliveryChannelsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfDeliveryChannelsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfDeliveryChannelsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the limit of the number of organization config rules you // can create. type MaxNumberOfOrganizationConfigRulesExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17192,17 +17192,17 @@ func (s MaxNumberOfOrganizationConfigRulesExceededException) GoString() string { func newErrorMaxNumberOfOrganizationConfigRulesExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfOrganizationConfigRulesExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfOrganizationConfigRulesExceededException) Code() string { +func (s *MaxNumberOfOrganizationConfigRulesExceededException) Code() string { return "MaxNumberOfOrganizationConfigRulesExceededException" } // Message returns the exception's message. -func (s MaxNumberOfOrganizationConfigRulesExceededException) Message() string { +func (s *MaxNumberOfOrganizationConfigRulesExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17210,30 +17210,30 @@ func (s MaxNumberOfOrganizationConfigRulesExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfOrganizationConfigRulesExceededException) OrigErr() error { +func (s *MaxNumberOfOrganizationConfigRulesExceededException) OrigErr() error { return nil } -func (s MaxNumberOfOrganizationConfigRulesExceededException) Error() string { +func (s *MaxNumberOfOrganizationConfigRulesExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfOrganizationConfigRulesExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfOrganizationConfigRulesExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfOrganizationConfigRulesExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfOrganizationConfigRulesExceededException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the limit (6) of the number of organization conformance // packs in an account (6 conformance pack with 25 AWS Config rules per pack // per account). type MaxNumberOfOrganizationConformancePacksExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17250,17 +17250,17 @@ func (s MaxNumberOfOrganizationConformancePacksExceededException) GoString() str func newErrorMaxNumberOfOrganizationConformancePacksExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfOrganizationConformancePacksExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfOrganizationConformancePacksExceededException) Code() string { +func (s *MaxNumberOfOrganizationConformancePacksExceededException) Code() string { return "MaxNumberOfOrganizationConformancePacksExceededException" } // Message returns the exception's message. -func (s MaxNumberOfOrganizationConformancePacksExceededException) Message() string { +func (s *MaxNumberOfOrganizationConformancePacksExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17268,29 +17268,29 @@ func (s MaxNumberOfOrganizationConformancePacksExceededException) Message() stri } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfOrganizationConformancePacksExceededException) OrigErr() error { +func (s *MaxNumberOfOrganizationConformancePacksExceededException) OrigErr() error { return nil } -func (s MaxNumberOfOrganizationConformancePacksExceededException) Error() string { +func (s *MaxNumberOfOrganizationConformancePacksExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfOrganizationConformancePacksExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfOrganizationConformancePacksExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfOrganizationConformancePacksExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfOrganizationConformancePacksExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Failed to add the retention configuration because a retention configuration // with that name already exists. type MaxNumberOfRetentionConfigurationsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17307,17 +17307,17 @@ func (s MaxNumberOfRetentionConfigurationsExceededException) GoString() string { func newErrorMaxNumberOfRetentionConfigurationsExceededException(v protocol.ResponseMetadata) error { return &MaxNumberOfRetentionConfigurationsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxNumberOfRetentionConfigurationsExceededException) Code() string { +func (s *MaxNumberOfRetentionConfigurationsExceededException) Code() string { return "MaxNumberOfRetentionConfigurationsExceededException" } // Message returns the exception's message. -func (s MaxNumberOfRetentionConfigurationsExceededException) Message() string { +func (s *MaxNumberOfRetentionConfigurationsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17325,22 +17325,22 @@ func (s MaxNumberOfRetentionConfigurationsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxNumberOfRetentionConfigurationsExceededException) OrigErr() error { +func (s *MaxNumberOfRetentionConfigurationsExceededException) OrigErr() error { return nil } -func (s MaxNumberOfRetentionConfigurationsExceededException) Error() string { +func (s *MaxNumberOfRetentionConfigurationsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxNumberOfRetentionConfigurationsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxNumberOfRetentionConfigurationsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxNumberOfRetentionConfigurationsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxNumberOfRetentionConfigurationsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Organization config rule creation or deletion status in each member account. @@ -17450,8 +17450,8 @@ func (s *MemberAccountStatus) SetMemberAccountRuleStatus(v string) *MemberAccoun // There are no configuration recorders available to provide the role needed // to describe your resources. Create a configuration recorder. type NoAvailableConfigurationRecorderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17468,17 +17468,17 @@ func (s NoAvailableConfigurationRecorderException) GoString() string { func newErrorNoAvailableConfigurationRecorderException(v protocol.ResponseMetadata) error { return &NoAvailableConfigurationRecorderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoAvailableConfigurationRecorderException) Code() string { +func (s *NoAvailableConfigurationRecorderException) Code() string { return "NoAvailableConfigurationRecorderException" } // Message returns the exception's message. -func (s NoAvailableConfigurationRecorderException) Message() string { +func (s *NoAvailableConfigurationRecorderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17486,28 +17486,28 @@ func (s NoAvailableConfigurationRecorderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoAvailableConfigurationRecorderException) OrigErr() error { +func (s *NoAvailableConfigurationRecorderException) OrigErr() error { return nil } -func (s NoAvailableConfigurationRecorderException) Error() string { +func (s *NoAvailableConfigurationRecorderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoAvailableConfigurationRecorderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoAvailableConfigurationRecorderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoAvailableConfigurationRecorderException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoAvailableConfigurationRecorderException) RequestID() string { + return s.RespMetadata.RequestID } // There is no delivery channel available to record configurations. type NoAvailableDeliveryChannelException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17524,17 +17524,17 @@ func (s NoAvailableDeliveryChannelException) GoString() string { func newErrorNoAvailableDeliveryChannelException(v protocol.ResponseMetadata) error { return &NoAvailableDeliveryChannelException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoAvailableDeliveryChannelException) Code() string { +func (s *NoAvailableDeliveryChannelException) Code() string { return "NoAvailableDeliveryChannelException" } // Message returns the exception's message. -func (s NoAvailableDeliveryChannelException) Message() string { +func (s *NoAvailableDeliveryChannelException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17542,28 +17542,28 @@ func (s NoAvailableDeliveryChannelException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoAvailableDeliveryChannelException) OrigErr() error { +func (s *NoAvailableDeliveryChannelException) OrigErr() error { return nil } -func (s NoAvailableDeliveryChannelException) Error() string { +func (s *NoAvailableDeliveryChannelException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoAvailableDeliveryChannelException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoAvailableDeliveryChannelException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoAvailableDeliveryChannelException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoAvailableDeliveryChannelException) RequestID() string { + return s.RespMetadata.RequestID } // Organization is no longer available. type NoAvailableOrganizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17580,17 +17580,17 @@ func (s NoAvailableOrganizationException) GoString() string { func newErrorNoAvailableOrganizationException(v protocol.ResponseMetadata) error { return &NoAvailableOrganizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoAvailableOrganizationException) Code() string { +func (s *NoAvailableOrganizationException) Code() string { return "NoAvailableOrganizationException" } // Message returns the exception's message. -func (s NoAvailableOrganizationException) Message() string { +func (s *NoAvailableOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17598,28 +17598,28 @@ func (s NoAvailableOrganizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoAvailableOrganizationException) OrigErr() error { +func (s *NoAvailableOrganizationException) OrigErr() error { return nil } -func (s NoAvailableOrganizationException) Error() string { +func (s *NoAvailableOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoAvailableOrganizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoAvailableOrganizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoAvailableOrganizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoAvailableOrganizationException) RequestID() string { + return s.RespMetadata.RequestID } // There is no configuration recorder running. type NoRunningConfigurationRecorderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17636,17 +17636,17 @@ func (s NoRunningConfigurationRecorderException) GoString() string { func newErrorNoRunningConfigurationRecorderException(v protocol.ResponseMetadata) error { return &NoRunningConfigurationRecorderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoRunningConfigurationRecorderException) Code() string { +func (s *NoRunningConfigurationRecorderException) Code() string { return "NoRunningConfigurationRecorderException" } // Message returns the exception's message. -func (s NoRunningConfigurationRecorderException) Message() string { +func (s *NoRunningConfigurationRecorderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17654,28 +17654,28 @@ func (s NoRunningConfigurationRecorderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoRunningConfigurationRecorderException) OrigErr() error { +func (s *NoRunningConfigurationRecorderException) OrigErr() error { return nil } -func (s NoRunningConfigurationRecorderException) Error() string { +func (s *NoRunningConfigurationRecorderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoRunningConfigurationRecorderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoRunningConfigurationRecorderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoRunningConfigurationRecorderException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoRunningConfigurationRecorderException) RequestID() string { + return s.RespMetadata.RequestID } // The specified Amazon S3 bucket does not exist. type NoSuchBucketException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17692,17 +17692,17 @@ func (s NoSuchBucketException) GoString() string { func newErrorNoSuchBucketException(v protocol.ResponseMetadata) error { return &NoSuchBucketException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchBucketException) Code() string { +func (s *NoSuchBucketException) Code() string { return "NoSuchBucketException" } // Message returns the exception's message. -func (s NoSuchBucketException) Message() string { +func (s *NoSuchBucketException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17710,29 +17710,29 @@ func (s NoSuchBucketException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchBucketException) OrigErr() error { +func (s *NoSuchBucketException) OrigErr() error { return nil } -func (s NoSuchBucketException) Error() string { +func (s *NoSuchBucketException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchBucketException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchBucketException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchBucketException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchBucketException) RequestID() string { + return s.RespMetadata.RequestID } // One or more AWS Config rules in the request are invalid. Verify that the // rule names are correct and try again. type NoSuchConfigRuleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17749,17 +17749,17 @@ func (s NoSuchConfigRuleException) GoString() string { func newErrorNoSuchConfigRuleException(v protocol.ResponseMetadata) error { return &NoSuchConfigRuleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchConfigRuleException) Code() string { +func (s *NoSuchConfigRuleException) Code() string { return "NoSuchConfigRuleException" } // Message returns the exception's message. -func (s NoSuchConfigRuleException) Message() string { +func (s *NoSuchConfigRuleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17767,28 +17767,28 @@ func (s NoSuchConfigRuleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchConfigRuleException) OrigErr() error { +func (s *NoSuchConfigRuleException) OrigErr() error { return nil } -func (s NoSuchConfigRuleException) Error() string { +func (s *NoSuchConfigRuleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchConfigRuleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchConfigRuleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchConfigRuleException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchConfigRuleException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Config rule that you passed in the filter does not exist. type NoSuchConfigRuleInConformancePackException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17805,17 +17805,17 @@ func (s NoSuchConfigRuleInConformancePackException) GoString() string { func newErrorNoSuchConfigRuleInConformancePackException(v protocol.ResponseMetadata) error { return &NoSuchConfigRuleInConformancePackException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchConfigRuleInConformancePackException) Code() string { +func (s *NoSuchConfigRuleInConformancePackException) Code() string { return "NoSuchConfigRuleInConformancePackException" } // Message returns the exception's message. -func (s NoSuchConfigRuleInConformancePackException) Message() string { +func (s *NoSuchConfigRuleInConformancePackException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17823,28 +17823,28 @@ func (s NoSuchConfigRuleInConformancePackException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchConfigRuleInConformancePackException) OrigErr() error { +func (s *NoSuchConfigRuleInConformancePackException) OrigErr() error { return nil } -func (s NoSuchConfigRuleInConformancePackException) Error() string { +func (s *NoSuchConfigRuleInConformancePackException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchConfigRuleInConformancePackException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchConfigRuleInConformancePackException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchConfigRuleInConformancePackException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchConfigRuleInConformancePackException) RequestID() string { + return s.RespMetadata.RequestID } // You have specified a configuration aggregator that does not exist. type NoSuchConfigurationAggregatorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17861,17 +17861,17 @@ func (s NoSuchConfigurationAggregatorException) GoString() string { func newErrorNoSuchConfigurationAggregatorException(v protocol.ResponseMetadata) error { return &NoSuchConfigurationAggregatorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchConfigurationAggregatorException) Code() string { +func (s *NoSuchConfigurationAggregatorException) Code() string { return "NoSuchConfigurationAggregatorException" } // Message returns the exception's message. -func (s NoSuchConfigurationAggregatorException) Message() string { +func (s *NoSuchConfigurationAggregatorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17879,28 +17879,28 @@ func (s NoSuchConfigurationAggregatorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchConfigurationAggregatorException) OrigErr() error { +func (s *NoSuchConfigurationAggregatorException) OrigErr() error { return nil } -func (s NoSuchConfigurationAggregatorException) Error() string { +func (s *NoSuchConfigurationAggregatorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchConfigurationAggregatorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchConfigurationAggregatorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchConfigurationAggregatorException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchConfigurationAggregatorException) RequestID() string { + return s.RespMetadata.RequestID } // You have specified a configuration recorder that does not exist. type NoSuchConfigurationRecorderException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17917,17 +17917,17 @@ func (s NoSuchConfigurationRecorderException) GoString() string { func newErrorNoSuchConfigurationRecorderException(v protocol.ResponseMetadata) error { return &NoSuchConfigurationRecorderException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchConfigurationRecorderException) Code() string { +func (s *NoSuchConfigurationRecorderException) Code() string { return "NoSuchConfigurationRecorderException" } // Message returns the exception's message. -func (s NoSuchConfigurationRecorderException) Message() string { +func (s *NoSuchConfigurationRecorderException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17935,28 +17935,28 @@ func (s NoSuchConfigurationRecorderException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchConfigurationRecorderException) OrigErr() error { +func (s *NoSuchConfigurationRecorderException) OrigErr() error { return nil } -func (s NoSuchConfigurationRecorderException) Error() string { +func (s *NoSuchConfigurationRecorderException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchConfigurationRecorderException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchConfigurationRecorderException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchConfigurationRecorderException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchConfigurationRecorderException) RequestID() string { + return s.RespMetadata.RequestID } // You specified one or more conformance packs that do not exist. type NoSuchConformancePackException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17973,17 +17973,17 @@ func (s NoSuchConformancePackException) GoString() string { func newErrorNoSuchConformancePackException(v protocol.ResponseMetadata) error { return &NoSuchConformancePackException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchConformancePackException) Code() string { +func (s *NoSuchConformancePackException) Code() string { return "NoSuchConformancePackException" } // Message returns the exception's message. -func (s NoSuchConformancePackException) Message() string { +func (s *NoSuchConformancePackException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17991,28 +17991,28 @@ func (s NoSuchConformancePackException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchConformancePackException) OrigErr() error { +func (s *NoSuchConformancePackException) OrigErr() error { return nil } -func (s NoSuchConformancePackException) Error() string { +func (s *NoSuchConformancePackException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchConformancePackException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchConformancePackException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchConformancePackException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchConformancePackException) RequestID() string { + return s.RespMetadata.RequestID } // You have specified a delivery channel that does not exist. type NoSuchDeliveryChannelException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18029,17 +18029,17 @@ func (s NoSuchDeliveryChannelException) GoString() string { func newErrorNoSuchDeliveryChannelException(v protocol.ResponseMetadata) error { return &NoSuchDeliveryChannelException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchDeliveryChannelException) Code() string { +func (s *NoSuchDeliveryChannelException) Code() string { return "NoSuchDeliveryChannelException" } // Message returns the exception's message. -func (s NoSuchDeliveryChannelException) Message() string { +func (s *NoSuchDeliveryChannelException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18047,28 +18047,28 @@ func (s NoSuchDeliveryChannelException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchDeliveryChannelException) OrigErr() error { +func (s *NoSuchDeliveryChannelException) OrigErr() error { return nil } -func (s NoSuchDeliveryChannelException) Error() string { +func (s *NoSuchDeliveryChannelException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchDeliveryChannelException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchDeliveryChannelException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchDeliveryChannelException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchDeliveryChannelException) RequestID() string { + return s.RespMetadata.RequestID } // You specified one or more organization config rules that do not exist. type NoSuchOrganizationConfigRuleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18085,17 +18085,17 @@ func (s NoSuchOrganizationConfigRuleException) GoString() string { func newErrorNoSuchOrganizationConfigRuleException(v protocol.ResponseMetadata) error { return &NoSuchOrganizationConfigRuleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchOrganizationConfigRuleException) Code() string { +func (s *NoSuchOrganizationConfigRuleException) Code() string { return "NoSuchOrganizationConfigRuleException" } // Message returns the exception's message. -func (s NoSuchOrganizationConfigRuleException) Message() string { +func (s *NoSuchOrganizationConfigRuleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18103,22 +18103,22 @@ func (s NoSuchOrganizationConfigRuleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchOrganizationConfigRuleException) OrigErr() error { +func (s *NoSuchOrganizationConfigRuleException) OrigErr() error { return nil } -func (s NoSuchOrganizationConfigRuleException) Error() string { +func (s *NoSuchOrganizationConfigRuleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchOrganizationConfigRuleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchOrganizationConfigRuleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchOrganizationConfigRuleException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchOrganizationConfigRuleException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Config organization conformance pack that you passed in the filter does @@ -18127,8 +18127,8 @@ func (s NoSuchOrganizationConfigRuleException) RequestID() string { // For DeleteOrganizationConformancePack, you tried to delete an organization // conformance pack that does not exist. type NoSuchOrganizationConformancePackException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18145,17 +18145,17 @@ func (s NoSuchOrganizationConformancePackException) GoString() string { func newErrorNoSuchOrganizationConformancePackException(v protocol.ResponseMetadata) error { return &NoSuchOrganizationConformancePackException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchOrganizationConformancePackException) Code() string { +func (s *NoSuchOrganizationConformancePackException) Code() string { return "NoSuchOrganizationConformancePackException" } // Message returns the exception's message. -func (s NoSuchOrganizationConformancePackException) Message() string { +func (s *NoSuchOrganizationConformancePackException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18163,28 +18163,28 @@ func (s NoSuchOrganizationConformancePackException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchOrganizationConformancePackException) OrigErr() error { +func (s *NoSuchOrganizationConformancePackException) OrigErr() error { return nil } -func (s NoSuchOrganizationConformancePackException) Error() string { +func (s *NoSuchOrganizationConformancePackException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchOrganizationConformancePackException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchOrganizationConformancePackException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchOrganizationConformancePackException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchOrganizationConformancePackException) RequestID() string { + return s.RespMetadata.RequestID } // You specified an AWS Config rule without a remediation configuration. type NoSuchRemediationConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18201,17 +18201,17 @@ func (s NoSuchRemediationConfigurationException) GoString() string { func newErrorNoSuchRemediationConfigurationException(v protocol.ResponseMetadata) error { return &NoSuchRemediationConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchRemediationConfigurationException) Code() string { +func (s *NoSuchRemediationConfigurationException) Code() string { return "NoSuchRemediationConfigurationException" } // Message returns the exception's message. -func (s NoSuchRemediationConfigurationException) Message() string { +func (s *NoSuchRemediationConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18219,28 +18219,28 @@ func (s NoSuchRemediationConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchRemediationConfigurationException) OrigErr() error { +func (s *NoSuchRemediationConfigurationException) OrigErr() error { return nil } -func (s NoSuchRemediationConfigurationException) Error() string { +func (s *NoSuchRemediationConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchRemediationConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchRemediationConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchRemediationConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchRemediationConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // You tried to delete a remediation exception that does not exist. type NoSuchRemediationExceptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18257,17 +18257,17 @@ func (s NoSuchRemediationExceptionException) GoString() string { func newErrorNoSuchRemediationExceptionException(v protocol.ResponseMetadata) error { return &NoSuchRemediationExceptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchRemediationExceptionException) Code() string { +func (s *NoSuchRemediationExceptionException) Code() string { return "NoSuchRemediationExceptionException" } // Message returns the exception's message. -func (s NoSuchRemediationExceptionException) Message() string { +func (s *NoSuchRemediationExceptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18275,28 +18275,28 @@ func (s NoSuchRemediationExceptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchRemediationExceptionException) OrigErr() error { +func (s *NoSuchRemediationExceptionException) OrigErr() error { return nil } -func (s NoSuchRemediationExceptionException) Error() string { +func (s *NoSuchRemediationExceptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchRemediationExceptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchRemediationExceptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchRemediationExceptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchRemediationExceptionException) RequestID() string { + return s.RespMetadata.RequestID } // You have specified a retention configuration that does not exist. type NoSuchRetentionConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18313,17 +18313,17 @@ func (s NoSuchRetentionConfigurationException) GoString() string { func newErrorNoSuchRetentionConfigurationException(v protocol.ResponseMetadata) error { return &NoSuchRetentionConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchRetentionConfigurationException) Code() string { +func (s *NoSuchRetentionConfigurationException) Code() string { return "NoSuchRetentionConfigurationException" } // Message returns the exception's message. -func (s NoSuchRetentionConfigurationException) Message() string { +func (s *NoSuchRetentionConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18331,22 +18331,22 @@ func (s NoSuchRetentionConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchRetentionConfigurationException) OrigErr() error { +func (s *NoSuchRetentionConfigurationException) OrigErr() error { return nil } -func (s NoSuchRetentionConfigurationException) Error() string { +func (s *NoSuchRetentionConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchRetentionConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchRetentionConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchRetentionConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchRetentionConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // For PutConfigAggregator API, no permission to call EnableAWSServiceAccess @@ -18356,8 +18356,8 @@ func (s NoSuchRetentionConfigurationException) RequestID() string { // Config throws an exception if APIs are called from member accounts. All APIs // must be called from organization master account. type OrganizationAccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18374,17 +18374,17 @@ func (s OrganizationAccessDeniedException) GoString() string { func newErrorOrganizationAccessDeniedException(v protocol.ResponseMetadata) error { return &OrganizationAccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationAccessDeniedException) Code() string { +func (s *OrganizationAccessDeniedException) Code() string { return "OrganizationAccessDeniedException" } // Message returns the exception's message. -func (s OrganizationAccessDeniedException) Message() string { +func (s *OrganizationAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18392,22 +18392,22 @@ func (s OrganizationAccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationAccessDeniedException) OrigErr() error { +func (s *OrganizationAccessDeniedException) OrigErr() error { return nil } -func (s OrganizationAccessDeniedException) Error() string { +func (s *OrganizationAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationAccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationAccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationAccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationAccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // This object contains regions to set up the aggregator and an IAM role to @@ -18475,8 +18475,8 @@ func (s *OrganizationAggregationSource) SetRoleArn(v string) *OrganizationAggreg // AWS Config resource cannot be created because your organization does not // have all features enabled. type OrganizationAllFeaturesNotEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18493,17 +18493,17 @@ func (s OrganizationAllFeaturesNotEnabledException) GoString() string { func newErrorOrganizationAllFeaturesNotEnabledException(v protocol.ResponseMetadata) error { return &OrganizationAllFeaturesNotEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationAllFeaturesNotEnabledException) Code() string { +func (s *OrganizationAllFeaturesNotEnabledException) Code() string { return "OrganizationAllFeaturesNotEnabledException" } // Message returns the exception's message. -func (s OrganizationAllFeaturesNotEnabledException) Message() string { +func (s *OrganizationAllFeaturesNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18511,22 +18511,22 @@ func (s OrganizationAllFeaturesNotEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationAllFeaturesNotEnabledException) OrigErr() error { +func (s *OrganizationAllFeaturesNotEnabledException) OrigErr() error { return nil } -func (s OrganizationAllFeaturesNotEnabledException) Error() string { +func (s *OrganizationAllFeaturesNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationAllFeaturesNotEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationAllFeaturesNotEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationAllFeaturesNotEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationAllFeaturesNotEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // An organization config rule that has information about config rules that @@ -19009,8 +19009,8 @@ func (s *OrganizationConformancePackStatus) SetStatus(v string) *OrganizationCon // You have specified a template that is not valid or supported. type OrganizationConformancePackTemplateValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19027,17 +19027,17 @@ func (s OrganizationConformancePackTemplateValidationException) GoString() strin func newErrorOrganizationConformancePackTemplateValidationException(v protocol.ResponseMetadata) error { return &OrganizationConformancePackTemplateValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationConformancePackTemplateValidationException) Code() string { +func (s *OrganizationConformancePackTemplateValidationException) Code() string { return "OrganizationConformancePackTemplateValidationException" } // Message returns the exception's message. -func (s OrganizationConformancePackTemplateValidationException) Message() string { +func (s *OrganizationConformancePackTemplateValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19045,22 +19045,22 @@ func (s OrganizationConformancePackTemplateValidationException) Message() string } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationConformancePackTemplateValidationException) OrigErr() error { +func (s *OrganizationConformancePackTemplateValidationException) OrigErr() error { return nil } -func (s OrganizationConformancePackTemplateValidationException) Error() string { +func (s *OrganizationConformancePackTemplateValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationConformancePackTemplateValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationConformancePackTemplateValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationConformancePackTemplateValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationConformancePackTemplateValidationException) RequestID() string { + return s.RespMetadata.RequestID } // An object that specifies organization custom rule metadata such as resource @@ -19420,8 +19420,8 @@ func (s *OrganizationResourceDetailedStatusFilters) SetStatus(v string) *Organiz // The configuration item size is outside the allowable range. type OversizedConfigurationItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19438,17 +19438,17 @@ func (s OversizedConfigurationItemException) GoString() string { func newErrorOversizedConfigurationItemException(v protocol.ResponseMetadata) error { return &OversizedConfigurationItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OversizedConfigurationItemException) Code() string { +func (s *OversizedConfigurationItemException) Code() string { return "OversizedConfigurationItemException" } // Message returns the exception's message. -func (s OversizedConfigurationItemException) Message() string { +func (s *OversizedConfigurationItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19456,22 +19456,22 @@ func (s OversizedConfigurationItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OversizedConfigurationItemException) OrigErr() error { +func (s *OversizedConfigurationItemException) OrigErr() error { return nil } -func (s OversizedConfigurationItemException) Error() string { +func (s *OversizedConfigurationItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OversizedConfigurationItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OversizedConfigurationItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OversizedConfigurationItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *OversizedConfigurationItemException) RequestID() string { + return s.RespMetadata.RequestID } // An object that represents the account ID and region of an aggregator account @@ -21409,8 +21409,8 @@ func (s *RemediationExecutionStep) SetStopTime(v time.Time) *RemediationExecutio // Remediation action is in progress. You can either cancel execution in AWS // Systems Manager or wait and try again later. type RemediationInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21427,17 +21427,17 @@ func (s RemediationInProgressException) GoString() string { func newErrorRemediationInProgressException(v protocol.ResponseMetadata) error { return &RemediationInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RemediationInProgressException) Code() string { +func (s *RemediationInProgressException) Code() string { return "RemediationInProgressException" } // Message returns the exception's message. -func (s RemediationInProgressException) Message() string { +func (s *RemediationInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21445,22 +21445,22 @@ func (s RemediationInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RemediationInProgressException) OrigErr() error { +func (s *RemediationInProgressException) OrigErr() error { return nil } -func (s RemediationInProgressException) Error() string { +func (s *RemediationInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RemediationInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RemediationInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RemediationInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *RemediationInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // The value is either a dynamic (resource) value or a static value. You must @@ -21751,8 +21751,8 @@ func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { // * For DeleteConformancePack, a conformance pack creation, update, and // deletion is in progress. Try your request again later. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21769,17 +21769,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21787,22 +21787,22 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The details that identify a resource within AWS Config, including the resource @@ -21864,8 +21864,8 @@ func (s *ResourceKey) SetResourceType(v string) *ResourceKey { // You have specified a resource that is either unknown or has not been discovered. type ResourceNotDiscoveredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21882,17 +21882,17 @@ func (s ResourceNotDiscoveredException) GoString() string { func newErrorResourceNotDiscoveredException(v protocol.ResponseMetadata) error { return &ResourceNotDiscoveredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotDiscoveredException) Code() string { +func (s *ResourceNotDiscoveredException) Code() string { return "ResourceNotDiscoveredException" } // Message returns the exception's message. -func (s ResourceNotDiscoveredException) Message() string { +func (s *ResourceNotDiscoveredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21900,28 +21900,28 @@ func (s ResourceNotDiscoveredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotDiscoveredException) OrigErr() error { +func (s *ResourceNotDiscoveredException) OrigErr() error { return nil } -func (s ResourceNotDiscoveredException) Error() string { +func (s *ResourceNotDiscoveredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotDiscoveredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotDiscoveredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotDiscoveredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotDiscoveredException) RequestID() string { + return s.RespMetadata.RequestID } // You have specified a resource that does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -21938,17 +21938,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21956,22 +21956,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The dynamic value of the resource. @@ -23074,8 +23074,8 @@ func (s TagResourceOutput) GoString() string { // You have reached the limit of the number of tags you can use. You have more // than 50 tags. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23092,17 +23092,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23110,22 +23110,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -23204,8 +23204,8 @@ func (s UntagResourceOutput) GoString() string { // The requested action is not valid. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23222,17 +23222,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23240,22 +23240,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go index b29c73560f7..0c07466c9c7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go @@ -540,8 +540,8 @@ func (s *DescribeReportDefinitionsOutput) SetReportDefinitions(v []*ReportDefini // A report with the specified name already exists in the account. Specify a // different report name. type DuplicateReportNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` @@ -559,17 +559,17 @@ func (s DuplicateReportNameException) GoString() string { func newErrorDuplicateReportNameException(v protocol.ResponseMetadata) error { return &DuplicateReportNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateReportNameException) Code() string { +func (s *DuplicateReportNameException) Code() string { return "DuplicateReportNameException" } // Message returns the exception's message. -func (s DuplicateReportNameException) Message() string { +func (s *DuplicateReportNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -577,29 +577,29 @@ func (s DuplicateReportNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateReportNameException) OrigErr() error { +func (s *DuplicateReportNameException) OrigErr() error { return nil } -func (s DuplicateReportNameException) Error() string { +func (s *DuplicateReportNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateReportNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateReportNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateReportNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateReportNameException) RequestID() string { + return s.RespMetadata.RequestID } // An error on the server occurred during the processing of your request. Try // again later. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` @@ -617,17 +617,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -635,22 +635,22 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ModifyReportDefinitionInput struct { @@ -964,8 +964,8 @@ func (s *ReportDefinition) SetTimeUnit(v string) *ReportDefinition { // This account already has five reports defined. To define a new report, you // must delete an existing report. type ReportLimitReachedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` @@ -983,17 +983,17 @@ func (s ReportLimitReachedException) GoString() string { func newErrorReportLimitReachedException(v protocol.ResponseMetadata) error { return &ReportLimitReachedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReportLimitReachedException) Code() string { +func (s *ReportLimitReachedException) Code() string { return "ReportLimitReachedException" } // Message returns the exception's message. -func (s ReportLimitReachedException) Message() string { +func (s *ReportLimitReachedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1001,28 +1001,28 @@ func (s ReportLimitReachedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReportLimitReachedException) OrigErr() error { +func (s *ReportLimitReachedException) OrigErr() error { return nil } -func (s ReportLimitReachedException) Error() string { +func (s *ReportLimitReachedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReportLimitReachedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReportLimitReachedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReportLimitReachedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReportLimitReachedException) RequestID() string { + return s.RespMetadata.RequestID } // The input fails to satisfy the constraints specified by an AWS service. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message to show the detail of the exception. Message_ *string `locationName:"Message" type:"string"` @@ -1040,17 +1040,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1058,22 +1058,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // The region of the S3 bucket that AWS delivers the report into. 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 88ebd6c8235..eb43d9e24ad 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 @@ -4951,8 +4951,8 @@ func (c *DatabaseMigrationService) TestConnectionWithContext(ctx aws.Context, in // AWS DMS was denied access to the endpoint. Check that the role is correctly // configured. type AccessDeniedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4969,17 +4969,17 @@ func (s AccessDeniedFault) GoString() string { func newErrorAccessDeniedFault(v protocol.ResponseMetadata) error { return &AccessDeniedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedFault) Code() string { +func (s *AccessDeniedFault) Code() string { return "AccessDeniedFault" } // Message returns the exception's message. -func (s AccessDeniedFault) Message() string { +func (s *AccessDeniedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4987,22 +4987,22 @@ func (s AccessDeniedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedFault) OrigErr() error { +func (s *AccessDeniedFault) OrigErr() error { return nil } -func (s AccessDeniedFault) Error() string { +func (s *AccessDeniedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedFault) RequestID() string { + return s.RespMetadata.RequestID } // Describes a quota for an AWS account, for example, the number of replication @@ -5498,15 +5498,15 @@ type CreateEndpointInput struct { // in the AWS Database Migration Service User Guide. ExtraConnectionAttributes *string `type:"string"` - // Settings in JSON format for the target Apache Kafka endpoint. For information - // about other available settings, see Using Object Mapping to Migrate Data - // to Apache Kafka (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping) + // Settings in JSON format for the target Apache Kafka endpoint. For more information + // about the available settings, see Using Apache Kafka as a Target for AWS + // Database Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html) // in the AWS Database Migration User Guide. KafkaSettings *KafkaSettings `type:"structure"` // Settings in JSON format for the target endpoint for Amazon Kinesis Data Streams. - // For information about other available settings, see Using Object Mapping - // to Migrate Data to a Kinesis Data Stream (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping) + // For more information about the available settings, see Using Amazon Kinesis + // Data Streams as a Target for AWS Database Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html) // in the AWS Database Migration User Guide. KinesisSettings *KinesisSettings `type:"structure"` @@ -5521,11 +5521,17 @@ type CreateEndpointInput struct { KmsKeyId *string `type:"string"` // Settings in JSON format for the source MongoDB endpoint. For more information - // about the available settings, see the configuration properties section in - // Using MongoDB as a Target for AWS Database Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html) + // about the available settings, see Using MongoDB as a Target for AWS Database + // Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html#CHAP_Source.MongoDB.Configuration) // in the AWS Database Migration Service User Guide. MongoDbSettings *MongoDbSettings `type:"structure"` + // Settings in JSON format for the target Amazon Neptune endpoint. For more + // information about the available settings, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings + // (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings) + // in the AWS Database Migration Service User Guide. + NeptuneSettings *NeptuneSettings `type:"structure"` + // The password to be used to log in to the endpoint database. Password *string `type:"string" sensitive:"true"` @@ -5591,6 +5597,11 @@ func (s *CreateEndpointInput) Validate() error { invalidParams.AddNested("ElasticsearchSettings", err.(request.ErrInvalidParams)) } } + if s.NeptuneSettings != nil { + if err := s.NeptuneSettings.Validate(); err != nil { + invalidParams.AddNested("NeptuneSettings", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -5682,6 +5693,12 @@ func (s *CreateEndpointInput) SetMongoDbSettings(v *MongoDbSettings) *CreateEndp return s } +// SetNeptuneSettings sets the NeptuneSettings field's value. +func (s *CreateEndpointInput) SetNeptuneSettings(v *NeptuneSettings) *CreateEndpointInput { + s.NeptuneSettings = v + return s +} + // SetPassword sets the Password field's value. func (s *CreateEndpointInput) SetPassword(v string) *CreateEndpointInput { s.Password = &v @@ -6290,7 +6307,7 @@ type CreateReplicationTaskInput struct { ReplicationTaskIdentifier *string `type:"string" required:"true"` // Overall settings for the task, in JSON format. For more information, see - // Task Settings (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html) + // Specifying Task Settings for AWS Database Migration Service Tasks (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html) // in the AWS Database Migration User Guide. ReplicationTaskSettings *string `type:"string"` @@ -6300,7 +6317,7 @@ type CreateReplicationTaskInput struct { SourceEndpointArn *string `type:"string" required:"true"` // The table mappings for the task, in JSON format. For more information, see - // Table Mapping (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html) + // Using Table Mapping to Specify Task Settings (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html) // in the AWS Database Migration User Guide. // // TableMappings is a required field @@ -6313,6 +6330,12 @@ type CreateReplicationTaskInput struct { // // TargetEndpointArn is a required field TargetEndpointArn *string `type:"string" required:"true"` + + // Supplemental information that the task requires to migrate the data for certain + // source and target endpoints. For more information, see Specifying Supplemental + // Data for Task Settings (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html) + // in the AWS Database Migration User Guide. + TaskData *string `type:"string"` } // String returns the string representation @@ -6419,6 +6442,12 @@ func (s *CreateReplicationTaskInput) SetTargetEndpointArn(v string) *CreateRepli return s } +// SetTaskData sets the TaskData field's value. +func (s *CreateReplicationTaskInput) SetTaskData(v string) *CreateReplicationTaskInput { + s.TaskData = &v + return s +} + type CreateReplicationTaskOutput struct { _ struct{} `type:"structure"` @@ -8156,6 +8185,8 @@ type DescribeReplicationSubnetGroupsInput struct { _ struct{} `type:"structure"` // Filters applied to the describe action. + // + // Valid filter names: replication-subnet-group-id Filters []*Filter `type:"list"` // An optional pagination token provided by a previous request. If this parameter @@ -8941,6 +8972,10 @@ type Endpoint struct { // MongoDbSettings structure. MongoDbSettings *MongoDbSettings `type:"structure"` + // The settings for the MongoDB source endpoint. For more information, see the + // NeptuneSettings structure. + NeptuneSettings *NeptuneSettings `type:"structure"` + // The port value used to access the endpoint. Port *int64 `type:"integer"` @@ -9079,6 +9114,12 @@ func (s *Endpoint) SetMongoDbSettings(v *MongoDbSettings) *Endpoint { return s } +// SetNeptuneSettings sets the NeptuneSettings field's value. +func (s *Endpoint) SetNeptuneSettings(v *NeptuneSettings) *Endpoint { + s.NeptuneSettings = v + return s +} + // SetPort sets the Port field's value. func (s *Endpoint) SetPort(v int64) *Endpoint { s.Port = &v @@ -9485,8 +9526,8 @@ func (s *ImportCertificateOutput) SetCertificate(v *Certificate) *ImportCertific // There are not enough resources allocated to the database migration. type InsufficientResourceCapacityFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9503,17 +9544,17 @@ func (s InsufficientResourceCapacityFault) GoString() string { func newErrorInsufficientResourceCapacityFault(v protocol.ResponseMetadata) error { return &InsufficientResourceCapacityFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientResourceCapacityFault) Code() string { +func (s *InsufficientResourceCapacityFault) Code() string { return "InsufficientResourceCapacityFault" } // Message returns the exception's message. -func (s InsufficientResourceCapacityFault) Message() string { +func (s *InsufficientResourceCapacityFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9521,28 +9562,28 @@ func (s InsufficientResourceCapacityFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientResourceCapacityFault) OrigErr() error { +func (s *InsufficientResourceCapacityFault) OrigErr() error { return nil } -func (s InsufficientResourceCapacityFault) Error() string { +func (s *InsufficientResourceCapacityFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientResourceCapacityFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientResourceCapacityFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientResourceCapacityFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientResourceCapacityFault) RequestID() string { + return s.RespMetadata.RequestID } // The certificate was not valid. type InvalidCertificateFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9559,17 +9600,17 @@ func (s InvalidCertificateFault) GoString() string { func newErrorInvalidCertificateFault(v protocol.ResponseMetadata) error { return &InvalidCertificateFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCertificateFault) Code() string { +func (s *InvalidCertificateFault) Code() string { return "InvalidCertificateFault" } // Message returns the exception's message. -func (s InvalidCertificateFault) Message() string { +func (s *InvalidCertificateFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9577,29 +9618,29 @@ func (s InvalidCertificateFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCertificateFault) OrigErr() error { +func (s *InvalidCertificateFault) OrigErr() error { return nil } -func (s InvalidCertificateFault) Error() string { +func (s *InvalidCertificateFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCertificateFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCertificateFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCertificateFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCertificateFault) RequestID() string { + return s.RespMetadata.RequestID } // The resource is in a state that prevents it from being used for database // migration. type InvalidResourceStateFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9616,17 +9657,17 @@ func (s InvalidResourceStateFault) GoString() string { func newErrorInvalidResourceStateFault(v protocol.ResponseMetadata) error { return &InvalidResourceStateFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceStateFault) Code() string { +func (s *InvalidResourceStateFault) Code() string { return "InvalidResourceStateFault" } // Message returns the exception's message. -func (s InvalidResourceStateFault) Message() string { +func (s *InvalidResourceStateFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9634,28 +9675,28 @@ func (s InvalidResourceStateFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceStateFault) OrigErr() error { +func (s *InvalidResourceStateFault) OrigErr() error { return nil } -func (s InvalidResourceStateFault) Error() string { +func (s *InvalidResourceStateFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceStateFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceStateFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceStateFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceStateFault) RequestID() string { + return s.RespMetadata.RequestID } // The subnet provided is invalid. type InvalidSubnet struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9672,17 +9713,17 @@ func (s InvalidSubnet) GoString() string { func newErrorInvalidSubnet(v protocol.ResponseMetadata) error { return &InvalidSubnet{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSubnet) Code() string { +func (s *InvalidSubnet) Code() string { return "InvalidSubnet" } // Message returns the exception's message. -func (s InvalidSubnet) Message() string { +func (s *InvalidSubnet) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9690,29 +9731,29 @@ func (s InvalidSubnet) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSubnet) OrigErr() error { +func (s *InvalidSubnet) OrigErr() error { return nil } -func (s InvalidSubnet) Error() string { +func (s *InvalidSubnet) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSubnet) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSubnet) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSubnet) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSubnet) RequestID() string { + return s.RespMetadata.RequestID } // The ciphertext references a key that doesn't exist or that the DMS account // doesn't have access to. type KMSAccessDeniedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9729,17 +9770,17 @@ func (s KMSAccessDeniedFault) GoString() string { func newErrorKMSAccessDeniedFault(v protocol.ResponseMetadata) error { return &KMSAccessDeniedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSAccessDeniedFault) Code() string { +func (s *KMSAccessDeniedFault) Code() string { return "KMSAccessDeniedFault" } // Message returns the exception's message. -func (s KMSAccessDeniedFault) Message() string { +func (s *KMSAccessDeniedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9747,28 +9788,28 @@ func (s KMSAccessDeniedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSAccessDeniedFault) OrigErr() error { +func (s *KMSAccessDeniedFault) OrigErr() error { return nil } -func (s KMSAccessDeniedFault) Error() string { +func (s *KMSAccessDeniedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSAccessDeniedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSAccessDeniedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSAccessDeniedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSAccessDeniedFault) RequestID() string { + return s.RespMetadata.RequestID } // The specified master key (CMK) isn't enabled. type KMSDisabledFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9785,17 +9826,17 @@ func (s KMSDisabledFault) GoString() string { func newErrorKMSDisabledFault(v protocol.ResponseMetadata) error { return &KMSDisabledFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSDisabledFault) Code() string { +func (s *KMSDisabledFault) Code() string { return "KMSDisabledFault" } // Message returns the exception's message. -func (s KMSDisabledFault) Message() string { +func (s *KMSDisabledFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9803,28 +9844,28 @@ func (s KMSDisabledFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSDisabledFault) OrigErr() error { +func (s *KMSDisabledFault) OrigErr() error { return nil } -func (s KMSDisabledFault) Error() string { +func (s *KMSDisabledFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSDisabledFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSDisabledFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSDisabledFault) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSDisabledFault) RequestID() string { + return s.RespMetadata.RequestID } // The state of the specified AWS KMS resource isn't valid for this request. type KMSInvalidStateFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9841,17 +9882,17 @@ func (s KMSInvalidStateFault) GoString() string { func newErrorKMSInvalidStateFault(v protocol.ResponseMetadata) error { return &KMSInvalidStateFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSInvalidStateFault) Code() string { +func (s *KMSInvalidStateFault) Code() string { return "KMSInvalidStateFault" } // Message returns the exception's message. -func (s KMSInvalidStateFault) Message() string { +func (s *KMSInvalidStateFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9859,28 +9900,28 @@ func (s KMSInvalidStateFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSInvalidStateFault) OrigErr() error { +func (s *KMSInvalidStateFault) OrigErr() error { return nil } -func (s KMSInvalidStateFault) Error() string { +func (s *KMSInvalidStateFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSInvalidStateFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSInvalidStateFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSInvalidStateFault) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSInvalidStateFault) RequestID() string { + return s.RespMetadata.RequestID } // AWS DMS cannot access the AWS KMS key. type KMSKeyNotAccessibleFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9897,17 +9938,17 @@ func (s KMSKeyNotAccessibleFault) GoString() string { func newErrorKMSKeyNotAccessibleFault(v protocol.ResponseMetadata) error { return &KMSKeyNotAccessibleFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSKeyNotAccessibleFault) Code() string { +func (s *KMSKeyNotAccessibleFault) Code() string { return "KMSKeyNotAccessibleFault" } // Message returns the exception's message. -func (s KMSKeyNotAccessibleFault) Message() string { +func (s *KMSKeyNotAccessibleFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9915,28 +9956,28 @@ func (s KMSKeyNotAccessibleFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSKeyNotAccessibleFault) OrigErr() error { +func (s *KMSKeyNotAccessibleFault) OrigErr() error { return nil } -func (s KMSKeyNotAccessibleFault) Error() string { +func (s *KMSKeyNotAccessibleFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSKeyNotAccessibleFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSKeyNotAccessibleFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSKeyNotAccessibleFault) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSKeyNotAccessibleFault) RequestID() string { + return s.RespMetadata.RequestID } // The specified AWS KMS entity or resource can't be found. type KMSNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9953,17 +9994,17 @@ func (s KMSNotFoundFault) GoString() string { func newErrorKMSNotFoundFault(v protocol.ResponseMetadata) error { return &KMSNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSNotFoundFault) Code() string { +func (s *KMSNotFoundFault) Code() string { return "KMSNotFoundFault" } // Message returns the exception's message. -func (s KMSNotFoundFault) Message() string { +func (s *KMSNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9971,28 +10012,28 @@ func (s KMSNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSNotFoundFault) OrigErr() error { +func (s *KMSNotFoundFault) OrigErr() error { return nil } -func (s KMSNotFoundFault) Error() string { +func (s *KMSNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // This request triggered AWS KMS request throttling. type KMSThrottlingFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10009,17 +10050,17 @@ func (s KMSThrottlingFault) GoString() string { func newErrorKMSThrottlingFault(v protocol.ResponseMetadata) error { return &KMSThrottlingFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSThrottlingFault) Code() string { +func (s *KMSThrottlingFault) Code() string { return "KMSThrottlingFault" } // Message returns the exception's message. -func (s KMSThrottlingFault) Message() string { +func (s *KMSThrottlingFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10027,22 +10068,22 @@ func (s KMSThrottlingFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSThrottlingFault) OrigErr() error { +func (s *KMSThrottlingFault) OrigErr() error { return nil } -func (s KMSThrottlingFault) Error() string { +func (s *KMSThrottlingFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSThrottlingFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSThrottlingFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSThrottlingFault) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSThrottlingFault) RequestID() string { + return s.RespMetadata.RequestID } // Provides information that describes an Apache Kafka endpoint. This information @@ -10316,15 +10357,15 @@ type ModifyEndpointInput struct { // pass the empty string ("") as an argument. ExtraConnectionAttributes *string `type:"string"` - // Settings in JSON format for the target Apache Kafka endpoint. For information - // about other available settings, see Using Object Mapping to Migrate Data - // to Apache Kafka (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping) + // Settings in JSON format for the target Apache Kafka endpoint. For more information + // about the available settings, see Using Apache Kafka as a Target for AWS + // Database Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html) // in the AWS Database Migration User Guide. KafkaSettings *KafkaSettings `type:"structure"` // Settings in JSON format for the target endpoint for Amazon Kinesis Data Streams. - // For information about other available settings, see Using Object Mapping - // to Migrate Data to a Kinesis Data Stream (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping) + // For more information about the available settings, see Using Amazon Kinesis + // Data Streams as a Target for AWS Database Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html) // in the AWS Database Migration User Guide. KinesisSettings *KinesisSettings `type:"structure"` @@ -10334,6 +10375,12 @@ type ModifyEndpointInput struct { // in the AWS Database Migration Service User Guide. MongoDbSettings *MongoDbSettings `type:"structure"` + // Settings in JSON format for the target Amazon Neptune endpoint. For more + // information about the available settings, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings + // (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings) + // in the AWS Database Migration Service User Guide. + NeptuneSettings *NeptuneSettings `type:"structure"` + // The password to be used to login to the endpoint database. Password *string `type:"string" sensitive:"true"` @@ -10389,6 +10436,11 @@ func (s *ModifyEndpointInput) Validate() error { invalidParams.AddNested("ElasticsearchSettings", err.(request.ErrInvalidParams)) } } + if s.NeptuneSettings != nil { + if err := s.NeptuneSettings.Validate(); err != nil { + invalidParams.AddNested("NeptuneSettings", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10480,6 +10532,12 @@ func (s *ModifyEndpointInput) SetMongoDbSettings(v *MongoDbSettings) *ModifyEndp return s } +// SetNeptuneSettings sets the NeptuneSettings field's value. +func (s *ModifyEndpointInput) SetNeptuneSettings(v *NeptuneSettings) *ModifyEndpointInput { + s.NeptuneSettings = v + return s +} + // SetPassword sets the Password field's value. func (s *ModifyEndpointInput) SetPassword(v string) *ModifyEndpointInput { s.Password = &v @@ -10986,7 +11044,7 @@ type ModifyReplicationTaskInput struct { // * Cannot end with a hyphen or contain two consecutive hyphens. ReplicationTaskIdentifier *string `type:"string"` - // JSON file that contains settings for the task, such as target metadata settings. + // JSON file that contains settings for the task, such as task metadata settings. ReplicationTaskSettings *string `type:"string"` // When using the AWS CLI or boto3, provide the path of the JSON file that contains @@ -10994,6 +11052,12 @@ type ModifyReplicationTaskInput struct { // DMS API, provide the JSON as the parameter value, for example: --table-mappings // file://mappingfile.json TableMappings *string `type:"string"` + + // Supplemental information that the task requires to migrate the data for certain + // source and target endpoints. For more information, see Specifying Supplemental + // Data for Task Settings (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html) + // in the AWS Database Migration User Guide. + TaskData *string `type:"string"` } // String returns the string representation @@ -11067,6 +11131,12 @@ func (s *ModifyReplicationTaskInput) SetTableMappings(v string) *ModifyReplicati return s } +// SetTaskData sets the TaskData field's value. +func (s *ModifyReplicationTaskInput) SetTaskData(v string) *ModifyReplicationTaskInput { + s.TaskData = &v + return s +} + type ModifyReplicationTaskOutput struct { _ struct{} `type:"structure"` @@ -11239,6 +11309,119 @@ func (s *MongoDbSettings) SetUsername(v string) *MongoDbSettings { return s } +// Provides information that defines an Amazon Neptune endpoint. +type NeptuneSettings struct { + _ struct{} `type:"structure"` + + // The number of milliseconds for AWS DMS to wait to retry a bulk-load of migrated + // graph data to the Neptune target database before raising an error. The default + // is 250. + ErrorRetryDuration *int64 `type:"integer"` + + // If you want IAM authorization enabled for this endpoint, set this parameter + // to true and attach the appropriate role policy document to your service role + // specified by ServiceAccessRoleArn. The default is false. + IamAuthEnabled *bool `type:"boolean"` + + // The maximum size in KB of migrated graph data stored in a CSV file before + // AWS DMS bulk-loads the data to the Neptune target database. The default is + // 1048576 KB. If successful, AWS DMS clears the bucket, ready to store the + // next batch of migrated graph data. + MaxFileSize *int64 `type:"integer"` + + // The number of times for AWS DMS to retry a bulk-load of migrated graph data + // to the Neptune target database before raising an error. The default is 5. + MaxRetryCount *int64 `type:"integer"` + + // A folder path where you where you want AWS DMS to store migrated graph data + // in the S3 bucket specified by S3BucketName + // + // S3BucketFolder is a required field + S3BucketFolder *string `type:"string" required:"true"` + + // The name of the S3 bucket for AWS DMS to temporarily store migrated graph + // data in CSV files before bulk-loading it to the Neptune target database. + // AWS DMS maps the SQL source data to graph data before storing it in these + // CSV files. + // + // S3BucketName is a required field + S3BucketName *string `type:"string" required:"true"` + + // The ARN of the service role you have created for the Neptune target endpoint. + // For more information, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.ServiceRole + // (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.ServiceRole) + // in the AWS Database Migration Service User Guide. + ServiceAccessRoleArn *string `type:"string"` +} + +// String returns the string representation +func (s NeptuneSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NeptuneSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NeptuneSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NeptuneSettings"} + if s.S3BucketFolder == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketFolder")) + } + if s.S3BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetErrorRetryDuration sets the ErrorRetryDuration field's value. +func (s *NeptuneSettings) SetErrorRetryDuration(v int64) *NeptuneSettings { + s.ErrorRetryDuration = &v + return s +} + +// SetIamAuthEnabled sets the IamAuthEnabled field's value. +func (s *NeptuneSettings) SetIamAuthEnabled(v bool) *NeptuneSettings { + s.IamAuthEnabled = &v + return s +} + +// SetMaxFileSize sets the MaxFileSize field's value. +func (s *NeptuneSettings) SetMaxFileSize(v int64) *NeptuneSettings { + s.MaxFileSize = &v + return s +} + +// SetMaxRetryCount sets the MaxRetryCount field's value. +func (s *NeptuneSettings) SetMaxRetryCount(v int64) *NeptuneSettings { + s.MaxRetryCount = &v + return s +} + +// SetS3BucketFolder sets the S3BucketFolder field's value. +func (s *NeptuneSettings) SetS3BucketFolder(v string) *NeptuneSettings { + s.S3BucketFolder = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *NeptuneSettings) SetS3BucketName(v string) *NeptuneSettings { + s.S3BucketName = &v + return s +} + +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *NeptuneSettings) SetServiceAccessRoleArn(v string) *NeptuneSettings { + s.ServiceAccessRoleArn = &v + return s +} + // In response to the DescribeOrderableReplicationInstances operation, this // object describes an available replication instance. This description includes // the replication instance's type, engine version, and allocated storage. @@ -12501,8 +12684,8 @@ func (s *ReplicationSubnetGroup) SetVpcId(v string) *ReplicationSubnetGroup { // The replication subnet group does not cover enough Availability Zones (AZs). // Edit the replication subnet group and add more AZs. type ReplicationSubnetGroupDoesNotCoverEnoughAZs struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12519,17 +12702,17 @@ func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) GoString() string { func newErrorReplicationSubnetGroupDoesNotCoverEnoughAZs(v protocol.ResponseMetadata) error { return &ReplicationSubnetGroupDoesNotCoverEnoughAZs{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) Code() string { +func (s *ReplicationSubnetGroupDoesNotCoverEnoughAZs) Code() string { return "ReplicationSubnetGroupDoesNotCoverEnoughAZs" } // Message returns the exception's message. -func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) Message() string { +func (s *ReplicationSubnetGroupDoesNotCoverEnoughAZs) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12537,22 +12720,22 @@ func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) OrigErr() error { +func (s *ReplicationSubnetGroupDoesNotCoverEnoughAZs) OrigErr() error { return nil } -func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) Error() string { +func (s *ReplicationSubnetGroupDoesNotCoverEnoughAZs) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReplicationSubnetGroupDoesNotCoverEnoughAZs) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReplicationSubnetGroupDoesNotCoverEnoughAZs) RequestID() string { - return s.respMetadata.RequestID +func (s *ReplicationSubnetGroupDoesNotCoverEnoughAZs) RequestID() string { + return s.RespMetadata.RequestID } // Provides information that describes a replication task created by the CreateReplicationTask @@ -12637,6 +12820,12 @@ type ReplicationTask struct { // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. TargetEndpointArn *string `type:"string"` + + // Supplemental information that the task requires to migrate the data for certain + // source and target endpoints. For more information, see Specifying Supplemental + // Data for Task Settings (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.TaskData.html) + // in the AWS Database Migration User Guide. + TaskData *string `type:"string"` } // String returns the string representation @@ -12751,6 +12940,12 @@ func (s *ReplicationTask) SetTargetEndpointArn(v string) *ReplicationTask { return s } +// SetTaskData sets the TaskData field's value. +func (s *ReplicationTask) SetTaskData(v string) *ReplicationTask { + s.TaskData = &v + return s +} + // The task assessment report in JSON format. type ReplicationTaskAssessmentResult struct { _ struct{} `type:"structure"` @@ -12949,8 +13144,8 @@ func (s *ReplicationTaskStats) SetTablesQueued(v int64) *ReplicationTaskStats { // The resource you are attempting to create already exists. type ResourceAlreadyExistsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -12969,17 +13164,17 @@ func (s ResourceAlreadyExistsFault) GoString() string { func newErrorResourceAlreadyExistsFault(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsFault) Code() string { +func (s *ResourceAlreadyExistsFault) Code() string { return "ResourceAlreadyExistsFault" } // Message returns the exception's message. -func (s ResourceAlreadyExistsFault) Message() string { +func (s *ResourceAlreadyExistsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12987,28 +13182,28 @@ func (s ResourceAlreadyExistsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsFault) OrigErr() error { +func (s *ResourceAlreadyExistsFault) OrigErr() error { return nil } -func (s ResourceAlreadyExistsFault) Error() string { +func (s *ResourceAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsFault) RequestID() string { + return s.RespMetadata.RequestID } // The resource could not be found. type ResourceNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13025,17 +13220,17 @@ func (s ResourceNotFoundFault) GoString() string { func newErrorResourceNotFoundFault(v protocol.ResponseMetadata) error { return &ResourceNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundFault) Code() string { +func (s *ResourceNotFoundFault) Code() string { return "ResourceNotFoundFault" } // Message returns the exception's message. -func (s ResourceNotFoundFault) Message() string { +func (s *ResourceNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13043,22 +13238,22 @@ func (s ResourceNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundFault) OrigErr() error { +func (s *ResourceNotFoundFault) OrigErr() error { return nil } -func (s ResourceNotFoundFault) Error() string { +func (s *ResourceNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // Identifies an AWS DMS resource and any pending actions for it. @@ -13099,8 +13294,8 @@ func (s *ResourcePendingMaintenanceActions) SetResourceIdentifier(v string) *Res // The quota for this resource quota has been exceeded. type ResourceQuotaExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13117,17 +13312,17 @@ func (s ResourceQuotaExceededFault) GoString() string { func newErrorResourceQuotaExceededFault(v protocol.ResponseMetadata) error { return &ResourceQuotaExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceQuotaExceededFault) Code() string { +func (s *ResourceQuotaExceededFault) Code() string { return "ResourceQuotaExceededFault" } // Message returns the exception's message. -func (s ResourceQuotaExceededFault) Message() string { +func (s *ResourceQuotaExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13135,22 +13330,22 @@ func (s ResourceQuotaExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceQuotaExceededFault) OrigErr() error { +func (s *ResourceQuotaExceededFault) OrigErr() error { return nil } -func (s ResourceQuotaExceededFault) Error() string { +func (s *ResourceQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceQuotaExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceQuotaExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceQuotaExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceQuotaExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // Settings for exporting data to Amazon S3. @@ -13529,8 +13724,8 @@ func (s *S3Settings) SetTimestampColumnName(v string) *S3Settings { // The SNS topic is invalid. type SNSInvalidTopicFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13547,17 +13742,17 @@ func (s SNSInvalidTopicFault) GoString() string { func newErrorSNSInvalidTopicFault(v protocol.ResponseMetadata) error { return &SNSInvalidTopicFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SNSInvalidTopicFault) Code() string { +func (s *SNSInvalidTopicFault) Code() string { return "SNSInvalidTopicFault" } // Message returns the exception's message. -func (s SNSInvalidTopicFault) Message() string { +func (s *SNSInvalidTopicFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13565,28 +13760,28 @@ func (s SNSInvalidTopicFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SNSInvalidTopicFault) OrigErr() error { +func (s *SNSInvalidTopicFault) OrigErr() error { return nil } -func (s SNSInvalidTopicFault) Error() string { +func (s *SNSInvalidTopicFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SNSInvalidTopicFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SNSInvalidTopicFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SNSInvalidTopicFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SNSInvalidTopicFault) RequestID() string { + return s.RespMetadata.RequestID } // You are not authorized for the SNS subscription. type SNSNoAuthorizationFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13603,17 +13798,17 @@ func (s SNSNoAuthorizationFault) GoString() string { func newErrorSNSNoAuthorizationFault(v protocol.ResponseMetadata) error { return &SNSNoAuthorizationFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SNSNoAuthorizationFault) Code() string { +func (s *SNSNoAuthorizationFault) Code() string { return "SNSNoAuthorizationFault" } // Message returns the exception's message. -func (s SNSNoAuthorizationFault) Message() string { +func (s *SNSNoAuthorizationFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13621,22 +13816,22 @@ func (s SNSNoAuthorizationFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SNSNoAuthorizationFault) OrigErr() error { +func (s *SNSNoAuthorizationFault) OrigErr() error { return nil } -func (s SNSNoAuthorizationFault) Error() string { +func (s *SNSNoAuthorizationFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SNSNoAuthorizationFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SNSNoAuthorizationFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SNSNoAuthorizationFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SNSNoAuthorizationFault) RequestID() string { + return s.RespMetadata.RequestID } type StartReplicationTaskAssessmentInput struct { @@ -13891,8 +14086,8 @@ func (s *StopReplicationTaskOutput) SetReplicationTask(v *ReplicationTask) *Stop // The storage quota has been exceeded. type StorageQuotaExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13909,17 +14104,17 @@ func (s StorageQuotaExceededFault) GoString() string { func newErrorStorageQuotaExceededFault(v protocol.ResponseMetadata) error { return &StorageQuotaExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StorageQuotaExceededFault) Code() string { +func (s *StorageQuotaExceededFault) Code() string { return "StorageQuotaExceededFault" } // Message returns the exception's message. -func (s StorageQuotaExceededFault) Message() string { +func (s *StorageQuotaExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13927,22 +14122,22 @@ func (s StorageQuotaExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StorageQuotaExceededFault) OrigErr() error { +func (s *StorageQuotaExceededFault) OrigErr() error { return nil } -func (s StorageQuotaExceededFault) Error() string { +func (s *StorageQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StorageQuotaExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StorageQuotaExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StorageQuotaExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *StorageQuotaExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // In response to a request by the DescribeReplicationSubnetGroup operation, @@ -13991,8 +14186,8 @@ func (s *Subnet) SetSubnetStatus(v string) *Subnet { // The specified subnet is already in use. type SubnetAlreadyInUse struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14009,17 +14204,17 @@ func (s SubnetAlreadyInUse) GoString() string { func newErrorSubnetAlreadyInUse(v protocol.ResponseMetadata) error { return &SubnetAlreadyInUse{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetAlreadyInUse) Code() string { +func (s *SubnetAlreadyInUse) Code() string { return "SubnetAlreadyInUse" } // Message returns the exception's message. -func (s SubnetAlreadyInUse) Message() string { +func (s *SubnetAlreadyInUse) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14027,22 +14222,22 @@ func (s SubnetAlreadyInUse) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetAlreadyInUse) OrigErr() error { +func (s *SubnetAlreadyInUse) OrigErr() error { return nil } -func (s SubnetAlreadyInUse) Error() string { +func (s *SubnetAlreadyInUse) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetAlreadyInUse) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetAlreadyInUse) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetAlreadyInUse) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetAlreadyInUse) RequestID() string { + return s.RespMetadata.RequestID } // Provides information about types of supported endpoints in response to a @@ -14065,6 +14260,11 @@ type SupportedEndpointType struct { // "kafka", "elasticsearch", "documentdb", and "sqlserver". EngineName *string `type:"string"` + // The earliest AWS DMS engine version that supports this endpoint engine. Note + // that endpoint engines released with AWS DMS versions earlier than 3.1.1 do + // not return a value for this parameter. + ReplicationInstanceEngineMinimumVersion *string `type:"string"` + // Indicates if Change Data Capture (CDC) is supported. SupportsCDC *bool `type:"boolean"` } @@ -14097,6 +14297,12 @@ func (s *SupportedEndpointType) SetEngineName(v string) *SupportedEndpointType { return s } +// SetReplicationInstanceEngineMinimumVersion sets the ReplicationInstanceEngineMinimumVersion field's value. +func (s *SupportedEndpointType) SetReplicationInstanceEngineMinimumVersion(v string) *SupportedEndpointType { + s.ReplicationInstanceEngineMinimumVersion = &v + return s +} + // SetSupportsCDC sets the SupportsCDC field's value. func (s *SupportedEndpointType) SetSupportsCDC(v bool) *SupportedEndpointType { s.SupportsCDC = &v @@ -14477,8 +14683,8 @@ func (s *TestConnectionOutput) SetConnection(v *Connection) *TestConnectionOutpu // An upgrade dependency is preventing the database migration. type UpgradeDependencyFailureFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14495,17 +14701,17 @@ func (s UpgradeDependencyFailureFault) GoString() string { func newErrorUpgradeDependencyFailureFault(v protocol.ResponseMetadata) error { return &UpgradeDependencyFailureFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UpgradeDependencyFailureFault) Code() string { +func (s *UpgradeDependencyFailureFault) Code() string { return "UpgradeDependencyFailureFault" } // Message returns the exception's message. -func (s UpgradeDependencyFailureFault) Message() string { +func (s *UpgradeDependencyFailureFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14513,22 +14719,22 @@ func (s UpgradeDependencyFailureFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UpgradeDependencyFailureFault) OrigErr() error { +func (s *UpgradeDependencyFailureFault) OrigErr() error { return nil } -func (s UpgradeDependencyFailureFault) Error() string { +func (s *UpgradeDependencyFailureFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UpgradeDependencyFailureFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UpgradeDependencyFailureFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UpgradeDependencyFailureFault) RequestID() string { - return s.respMetadata.RequestID +func (s *UpgradeDependencyFailureFault) RequestID() string { + return s.RespMetadata.RequestID } // Describes status of a security group associated with the virtual private diff --git a/vendor/github.com/aws/aws-sdk-go/service/dataexchange/api.go b/vendor/github.com/aws/aws-sdk-go/service/dataexchange/api.go index c95c96bec5d..eefda3be8c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dataexchange/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dataexchange/api.go @@ -2211,8 +2211,8 @@ func (c *DataExchange) UpdateRevisionWithContext(ctx aws.Context, input *UpdateR // Access to the resource is denied. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Access to the resource is denied. Message_ *string `locationName:"Message" type:"string"` @@ -2230,17 +2230,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2248,22 +2248,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The destination for the asset. @@ -2591,8 +2591,8 @@ func (s CancelJobOutput) GoString() string { // The request couldn't be completed because it conflicted with the current // state of the resource. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The request couldn't be completed because it conflicted with the current // state of the resource. @@ -2617,17 +2617,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2635,22 +2635,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // A request to create a data set that contains one or more revisions. @@ -3658,6 +3658,9 @@ type ExportAssetsToS3RequestDetails struct { // DataSetId is a required field DataSetId *string `type:"string" required:"true"` + // Encryption configuration for the export job. + Encryption *ExportServerSideEncryption `type:"structure"` + // The unique identifier for the revision associated with this export request. // // RevisionId is a required field @@ -3696,6 +3699,11 @@ func (s *ExportAssetsToS3RequestDetails) Validate() error { } } } + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3715,6 +3723,12 @@ func (s *ExportAssetsToS3RequestDetails) SetDataSetId(v string) *ExportAssetsToS return s } +// SetEncryption sets the Encryption field's value. +func (s *ExportAssetsToS3RequestDetails) SetEncryption(v *ExportServerSideEncryption) *ExportAssetsToS3RequestDetails { + s.Encryption = v + return s +} + // SetRevisionId sets the RevisionId field's value. func (s *ExportAssetsToS3RequestDetails) SetRevisionId(v string) *ExportAssetsToS3RequestDetails { s.RevisionId = &v @@ -3735,6 +3749,9 @@ type ExportAssetsToS3ResponseDetails struct { // DataSetId is a required field DataSetId *string `type:"string" required:"true"` + // Encryption configuration of the export job. + Encryption *ExportServerSideEncryption `type:"structure"` + // The unique identifier for the revision associated with this export response. // // RevisionId is a required field @@ -3763,12 +3780,76 @@ func (s *ExportAssetsToS3ResponseDetails) SetDataSetId(v string) *ExportAssetsTo return s } +// SetEncryption sets the Encryption field's value. +func (s *ExportAssetsToS3ResponseDetails) SetEncryption(v *ExportServerSideEncryption) *ExportAssetsToS3ResponseDetails { + s.Encryption = v + return s +} + // SetRevisionId sets the RevisionId field's value. func (s *ExportAssetsToS3ResponseDetails) SetRevisionId(v string) *ExportAssetsToS3ResponseDetails { s.RevisionId = &v return s } +// Encryption configuration of the export job. Includes the encryption type +// as well as the AWS KMS key. The KMS key is only necessary if you chose the +// KMS encryption type. +type ExportServerSideEncryption struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the the AWS KMS key you want to use to + // encrypt the Amazon S3 objects. This parameter is required if you choose aws:kms + // as an encryption type. + // + // KmsKeyArn is a required field + KmsKeyArn *string `type:"string" required:"true"` + + // The type of server side encryption used for encrypting the objects in Amazon + // S3. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"ServerSideEncryptionTypes"` +} + +// String returns the string representation +func (s ExportServerSideEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportServerSideEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportServerSideEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportServerSideEncryption"} + if s.KmsKeyArn == nil { + invalidParams.Add(request.NewErrParamRequired("KmsKeyArn")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *ExportServerSideEncryption) SetKmsKeyArn(v string) *ExportServerSideEncryption { + s.KmsKeyArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *ExportServerSideEncryption) SetType(v string) *ExportServerSideEncryption { + s.Type = &v + return s +} + type GetAssetInput struct { _ struct{} `type:"structure"` @@ -4683,8 +4764,8 @@ func (s *ImportAssetsFromS3ResponseDetails) SetRevisionId(v string) *ImportAsset // An exception occurred with the service. type InternalServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message identifying the service exception that occurred. Message_ *string `locationName:"Message" type:"string"` @@ -4702,17 +4783,17 @@ func (s InternalServerException) GoString() string { func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerException) Code() string { +func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. -func (s InternalServerException) Message() string { +func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4720,22 +4801,22 @@ func (s InternalServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerException) OrigErr() error { +func (s *InternalServerException) OrigErr() error { return nil } -func (s InternalServerException) Error() string { +func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Data Exchange Jobs are asynchronous import or export operations used @@ -4865,7 +4946,7 @@ type JobError struct { // Message is a required field Message *string `type:"string" required:"true"` - // The unqiue identifier for the resource related to the error. + // The unique identifier for the resource related to the error. ResourceId *string `type:"string"` // The type of resource related to the error. @@ -5460,8 +5541,8 @@ func (s *RequestDetails) SetImportAssetsFromS3(v *ImportAssetsFromS3RequestDetai // The resource couldn't be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The resource couldn't be found. Message_ *string `locationName:"Message" type:"string"` @@ -5485,17 +5566,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5503,22 +5584,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Details for the response. @@ -5707,8 +5788,8 @@ func (s *S3SnapshotAsset) SetSize(v float64) *S3SnapshotAsset { // The request has exceeded the quotas imposed by the service. type ServiceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` LimitName *string `type:"string" enum:"LimitName"` @@ -5729,17 +5810,17 @@ func (s ServiceLimitExceededException) GoString() string { func newErrorServiceLimitExceededException(v protocol.ResponseMetadata) error { return &ServiceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceLimitExceededException) Code() string { +func (s *ServiceLimitExceededException) Code() string { return "ServiceLimitExceededException" } // Message returns the exception's message. -func (s ServiceLimitExceededException) Message() string { +func (s *ServiceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5747,22 +5828,22 @@ func (s ServiceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceLimitExceededException) OrigErr() error { +func (s *ServiceLimitExceededException) OrigErr() error { return nil } -func (s ServiceLimitExceededException) Error() string { +func (s *ServiceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type StartJobInput struct { @@ -5885,8 +5966,8 @@ func (s TagResourceOutput) GoString() string { // The limit on the number of requests per second was exceeded. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The limit on the number of requests per second was exceeded. Message_ *string `locationName:"Message" type:"string"` @@ -5904,17 +5985,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5922,22 +6003,22 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -6523,8 +6604,8 @@ func (s *UpdateRevisionOutput) SetUpdatedAt(v time.Time) *UpdateRevisionOutput { // The request was invalid. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message that informs you about what was invalid about the request. Message_ *string `locationName:"Message" type:"string"` @@ -6542,17 +6623,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6560,22 +6641,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // The type of file your data is stored in. Currently, the supported asset type @@ -6690,6 +6771,15 @@ const ( ResourceTypeJob = "JOB" ) +// The types of encryption supported in export jobs to Amazon S3. +const ( + // ServerSideEncryptionTypesAwsKms is a ServerSideEncryptionTypes enum value + ServerSideEncryptionTypesAwsKms = "aws:kms" + + // ServerSideEncryptionTypesAes256 is a ServerSideEncryptionTypes enum value + ServerSideEncryptionTypesAes256 = "AES256" +) + const ( // StateWaiting is a State enum value StateWaiting = "WAITING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go index 196fab8abbf..d4067601430 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go @@ -2899,8 +2899,8 @@ func (s *InstanceIdentity) SetSignature(v string) *InstanceIdentity { // An internal service error occurred. type InternalServiceError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Description of the error message. Message_ *string `locationName:"message" type:"string"` @@ -2918,17 +2918,17 @@ func (s InternalServiceError) GoString() string { func newErrorInternalServiceError(v protocol.ResponseMetadata) error { return &InternalServiceError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceError) Code() string { +func (s *InternalServiceError) Code() string { return "InternalServiceError" } // Message returns the exception's message. -func (s InternalServiceError) Message() string { +func (s *InternalServiceError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2936,30 +2936,30 @@ func (s InternalServiceError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceError) OrigErr() error { +func (s *InternalServiceError) OrigErr() error { return nil } -func (s InternalServiceError) Error() string { +func (s *InternalServiceError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceError) RequestID() string { + return s.RespMetadata.RequestID } // The request was not valid. Verify that your request was properly formatted, // that the signature was generated with the correct credentials, and that you // haven't exceeded any of the service limits for your account. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Description of the error message. Message_ *string `locationName:"message" type:"string"` @@ -2977,17 +2977,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2995,22 +2995,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Contains the parameters for ListPipelines. @@ -3344,8 +3344,8 @@ func (s *ParameterValue) SetStringValue(v string) *ParameterValue { // The specified pipeline has been deleted. type PipelineDeletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Description of the error message. Message_ *string `locationName:"message" type:"string"` @@ -3363,17 +3363,17 @@ func (s PipelineDeletedException) GoString() string { func newErrorPipelineDeletedException(v protocol.ResponseMetadata) error { return &PipelineDeletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineDeletedException) Code() string { +func (s *PipelineDeletedException) Code() string { return "PipelineDeletedException" } // Message returns the exception's message. -func (s PipelineDeletedException) Message() string { +func (s *PipelineDeletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3381,22 +3381,22 @@ func (s PipelineDeletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineDeletedException) OrigErr() error { +func (s *PipelineDeletedException) OrigErr() error { return nil } -func (s PipelineDeletedException) Error() string { +func (s *PipelineDeletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineDeletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineDeletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineDeletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineDeletedException) RequestID() string { + return s.RespMetadata.RequestID } // Contains pipeline metadata. @@ -3507,8 +3507,8 @@ func (s *PipelineIdName) SetName(v string) *PipelineIdName { // The specified pipeline was not found. Verify that you used the correct user // and account identifiers. type PipelineNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Description of the error message. Message_ *string `locationName:"message" type:"string"` @@ -3526,17 +3526,17 @@ func (s PipelineNotFoundException) GoString() string { func newErrorPipelineNotFoundException(v protocol.ResponseMetadata) error { return &PipelineNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PipelineNotFoundException) Code() string { +func (s *PipelineNotFoundException) Code() string { return "PipelineNotFoundException" } // Message returns the exception's message. -func (s PipelineNotFoundException) Message() string { +func (s *PipelineNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3544,22 +3544,22 @@ func (s PipelineNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PipelineNotFoundException) OrigErr() error { +func (s *PipelineNotFoundException) OrigErr() error { return nil } -func (s PipelineNotFoundException) Error() string { +func (s *PipelineNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PipelineNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PipelineNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PipelineNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *PipelineNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a pipeline object. This can be a logical, physical, @@ -4612,8 +4612,8 @@ func (s *Tag) SetValue(v string) *Tag { // The specified task was not found. type TaskNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Description of the error message. Message_ *string `locationName:"message" type:"string"` @@ -4631,17 +4631,17 @@ func (s TaskNotFoundException) GoString() string { func newErrorTaskNotFoundException(v protocol.ResponseMetadata) error { return &TaskNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TaskNotFoundException) Code() string { +func (s *TaskNotFoundException) Code() string { return "TaskNotFoundException" } // Message returns the exception's message. -func (s TaskNotFoundException) Message() string { +func (s *TaskNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4649,22 +4649,22 @@ func (s TaskNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TaskNotFoundException) OrigErr() error { +func (s *TaskNotFoundException) OrigErr() error { return nil } -func (s TaskNotFoundException) Error() string { +func (s *TaskNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TaskNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TaskNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TaskNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *TaskNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a pipeline task that is assigned to a task runner. diff --git a/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go b/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go index affac0d7d75..79b332bbf01 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/datasync/api.go @@ -5272,8 +5272,8 @@ func (s *FilterRule) SetValue(v string) *FilterRule { // This exception is thrown when an error occurs in the AWS DataSync service. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorCode *string `locationName:"errorCode" type:"string"` @@ -5292,17 +5292,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5310,28 +5310,28 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the client submits a malformed request. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorCode *string `locationName:"errorCode" type:"string"` @@ -5350,17 +5350,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5368,22 +5368,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // ListAgentsRequest 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 b9c5343888f..8a2add4a30e 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 @@ -2188,8 +2188,8 @@ func (s *Cluster) SetTotalNodes(v int64) *Cluster { // You already have a DAX cluster with the given identifier. type ClusterAlreadyExistsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2206,17 +2206,17 @@ func (s ClusterAlreadyExistsFault) GoString() string { func newErrorClusterAlreadyExistsFault(v protocol.ResponseMetadata) error { return &ClusterAlreadyExistsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterAlreadyExistsFault) Code() string { +func (s *ClusterAlreadyExistsFault) Code() string { return "ClusterAlreadyExistsFault" } // Message returns the exception's message. -func (s ClusterAlreadyExistsFault) Message() string { +func (s *ClusterAlreadyExistsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2224,28 +2224,28 @@ func (s ClusterAlreadyExistsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterAlreadyExistsFault) OrigErr() error { +func (s *ClusterAlreadyExistsFault) OrigErr() error { return nil } -func (s ClusterAlreadyExistsFault) Error() string { +func (s *ClusterAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterAlreadyExistsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterAlreadyExistsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterAlreadyExistsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterAlreadyExistsFault) RequestID() string { + return s.RespMetadata.RequestID } // The requested cluster ID does not refer to an existing DAX cluster. type ClusterNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2262,17 +2262,17 @@ func (s ClusterNotFoundFault) GoString() string { func newErrorClusterNotFoundFault(v protocol.ResponseMetadata) error { return &ClusterNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterNotFoundFault) Code() string { +func (s *ClusterNotFoundFault) Code() string { return "ClusterNotFoundFault" } // Message returns the exception's message. -func (s ClusterNotFoundFault) Message() string { +func (s *ClusterNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2280,29 +2280,29 @@ func (s ClusterNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterNotFoundFault) OrigErr() error { +func (s *ClusterNotFoundFault) OrigErr() error { return nil } -func (s ClusterNotFoundFault) Error() string { +func (s *ClusterNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // You have attempted to exceed the maximum number of DAX clusters for your // AWS account. type ClusterQuotaForCustomerExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2319,17 +2319,17 @@ func (s ClusterQuotaForCustomerExceededFault) GoString() string { func newErrorClusterQuotaForCustomerExceededFault(v protocol.ResponseMetadata) error { return &ClusterQuotaForCustomerExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterQuotaForCustomerExceededFault) Code() string { +func (s *ClusterQuotaForCustomerExceededFault) Code() string { return "ClusterQuotaForCustomerExceededFault" } // Message returns the exception's message. -func (s ClusterQuotaForCustomerExceededFault) Message() string { +func (s *ClusterQuotaForCustomerExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2337,22 +2337,22 @@ func (s ClusterQuotaForCustomerExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterQuotaForCustomerExceededFault) OrigErr() error { +func (s *ClusterQuotaForCustomerExceededFault) OrigErr() error { return nil } -func (s ClusterQuotaForCustomerExceededFault) Error() string { +func (s *ClusterQuotaForCustomerExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterQuotaForCustomerExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterQuotaForCustomerExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterQuotaForCustomerExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterQuotaForCustomerExceededFault) RequestID() string { + return s.RespMetadata.RequestID } type CreateClusterInput struct { @@ -3744,8 +3744,8 @@ func (s *IncreaseReplicationFactorOutput) SetCluster(v *Cluster) *IncreaseReplic // There are not enough system resources to create the cluster you requested // (or to resize an already-existing cluster). type InsufficientClusterCapacityFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3762,17 +3762,17 @@ func (s InsufficientClusterCapacityFault) GoString() string { func newErrorInsufficientClusterCapacityFault(v protocol.ResponseMetadata) error { return &InsufficientClusterCapacityFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientClusterCapacityFault) Code() string { +func (s *InsufficientClusterCapacityFault) Code() string { return "InsufficientClusterCapacityFault" } // Message returns the exception's message. -func (s InsufficientClusterCapacityFault) Message() string { +func (s *InsufficientClusterCapacityFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3780,28 +3780,28 @@ func (s InsufficientClusterCapacityFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientClusterCapacityFault) OrigErr() error { +func (s *InsufficientClusterCapacityFault) OrigErr() error { return nil } -func (s InsufficientClusterCapacityFault) Error() string { +func (s *InsufficientClusterCapacityFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientClusterCapacityFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientClusterCapacityFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientClusterCapacityFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientClusterCapacityFault) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon Resource Name (ARN) supplied in the request is not valid. type InvalidARNFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3818,17 +3818,17 @@ func (s InvalidARNFault) GoString() string { func newErrorInvalidARNFault(v protocol.ResponseMetadata) error { return &InvalidARNFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidARNFault) Code() string { +func (s *InvalidARNFault) Code() string { return "InvalidARNFault" } // Message returns the exception's message. -func (s InvalidARNFault) Message() string { +func (s *InvalidARNFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3836,28 +3836,28 @@ func (s InvalidARNFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidARNFault) OrigErr() error { +func (s *InvalidARNFault) OrigErr() error { return nil } -func (s InvalidARNFault) Error() string { +func (s *InvalidARNFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidARNFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidARNFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidARNFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidARNFault) RequestID() string { + return s.RespMetadata.RequestID } // The requested DAX cluster is not in the available state. type InvalidClusterStateFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3874,17 +3874,17 @@ func (s InvalidClusterStateFault) GoString() string { func newErrorInvalidClusterStateFault(v protocol.ResponseMetadata) error { return &InvalidClusterStateFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidClusterStateFault) Code() string { +func (s *InvalidClusterStateFault) Code() string { return "InvalidClusterStateFault" } // Message returns the exception's message. -func (s InvalidClusterStateFault) Message() string { +func (s *InvalidClusterStateFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3892,28 +3892,28 @@ func (s InvalidClusterStateFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidClusterStateFault) OrigErr() error { +func (s *InvalidClusterStateFault) OrigErr() error { return nil } -func (s InvalidClusterStateFault) Error() string { +func (s *InvalidClusterStateFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidClusterStateFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidClusterStateFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidClusterStateFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidClusterStateFault) RequestID() string { + return s.RespMetadata.RequestID } // Two or more incompatible parameters were specified. type InvalidParameterCombinationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3930,17 +3930,17 @@ func (s InvalidParameterCombinationException) GoString() string { func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error { return &InvalidParameterCombinationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterCombinationException) Code() string { +func (s *InvalidParameterCombinationException) Code() string { return "InvalidParameterCombinationException" } // Message returns the exception's message. -func (s InvalidParameterCombinationException) Message() string { +func (s *InvalidParameterCombinationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3948,28 +3948,28 @@ func (s InvalidParameterCombinationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterCombinationException) OrigErr() error { +func (s *InvalidParameterCombinationException) OrigErr() error { return nil } -func (s InvalidParameterCombinationException) Error() string { +func (s *InvalidParameterCombinationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterCombinationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterCombinationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterCombinationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterCombinationException) RequestID() string { + return s.RespMetadata.RequestID } // One or more parameters in a parameter group are in an invalid state. type InvalidParameterGroupStateFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3986,17 +3986,17 @@ func (s InvalidParameterGroupStateFault) GoString() string { func newErrorInvalidParameterGroupStateFault(v protocol.ResponseMetadata) error { return &InvalidParameterGroupStateFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterGroupStateFault) Code() string { +func (s *InvalidParameterGroupStateFault) Code() string { return "InvalidParameterGroupStateFault" } // Message returns the exception's message. -func (s InvalidParameterGroupStateFault) Message() string { +func (s *InvalidParameterGroupStateFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4004,28 +4004,28 @@ func (s InvalidParameterGroupStateFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterGroupStateFault) OrigErr() error { +func (s *InvalidParameterGroupStateFault) OrigErr() error { return nil } -func (s InvalidParameterGroupStateFault) Error() string { +func (s *InvalidParameterGroupStateFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterGroupStateFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterGroupStateFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterGroupStateFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterGroupStateFault) RequestID() string { + return s.RespMetadata.RequestID } // The value for a parameter is invalid. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4042,17 +4042,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4060,28 +4060,28 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid subnet identifier was specified. type InvalidSubnet struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4098,17 +4098,17 @@ func (s InvalidSubnet) GoString() string { func newErrorInvalidSubnet(v protocol.ResponseMetadata) error { return &InvalidSubnet{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSubnet) Code() string { +func (s *InvalidSubnet) Code() string { return "InvalidSubnet" } // Message returns the exception's message. -func (s InvalidSubnet) Message() string { +func (s *InvalidSubnet) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4116,28 +4116,28 @@ func (s InvalidSubnet) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSubnet) OrigErr() error { +func (s *InvalidSubnet) OrigErr() error { return nil } -func (s InvalidSubnet) Error() string { +func (s *InvalidSubnet) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSubnet) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSubnet) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSubnet) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSubnet) RequestID() string { + return s.RespMetadata.RequestID } // The VPC network is in an invalid state. type InvalidVPCNetworkStateFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4154,17 +4154,17 @@ func (s InvalidVPCNetworkStateFault) GoString() string { func newErrorInvalidVPCNetworkStateFault(v protocol.ResponseMetadata) error { return &InvalidVPCNetworkStateFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidVPCNetworkStateFault) Code() string { +func (s *InvalidVPCNetworkStateFault) Code() string { return "InvalidVPCNetworkStateFault" } // Message returns the exception's message. -func (s InvalidVPCNetworkStateFault) Message() string { +func (s *InvalidVPCNetworkStateFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4172,22 +4172,22 @@ func (s InvalidVPCNetworkStateFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidVPCNetworkStateFault) OrigErr() error { +func (s *InvalidVPCNetworkStateFault) OrigErr() error { return nil } -func (s InvalidVPCNetworkStateFault) Error() string { +func (s *InvalidVPCNetworkStateFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidVPCNetworkStateFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidVPCNetworkStateFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidVPCNetworkStateFault) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidVPCNetworkStateFault) RequestID() string { + return s.RespMetadata.RequestID } type ListTagsInput struct { @@ -4347,8 +4347,8 @@ func (s *Node) SetParameterGroupStatus(v string) *Node { // None of the nodes in the cluster have the given node ID. type NodeNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4365,17 +4365,17 @@ func (s NodeNotFoundFault) GoString() string { func newErrorNodeNotFoundFault(v protocol.ResponseMetadata) error { return &NodeNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NodeNotFoundFault) Code() string { +func (s *NodeNotFoundFault) Code() string { return "NodeNotFoundFault" } // Message returns the exception's message. -func (s NodeNotFoundFault) Message() string { +func (s *NodeNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4383,28 +4383,28 @@ func (s NodeNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NodeNotFoundFault) OrigErr() error { +func (s *NodeNotFoundFault) OrigErr() error { return nil } -func (s NodeNotFoundFault) Error() string { +func (s *NodeNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NodeNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NodeNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NodeNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *NodeNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // You have attempted to exceed the maximum number of nodes for a DAX cluster. type NodeQuotaForClusterExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4421,17 +4421,17 @@ func (s NodeQuotaForClusterExceededFault) GoString() string { func newErrorNodeQuotaForClusterExceededFault(v protocol.ResponseMetadata) error { return &NodeQuotaForClusterExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NodeQuotaForClusterExceededFault) Code() string { +func (s *NodeQuotaForClusterExceededFault) Code() string { return "NodeQuotaForClusterExceededFault" } // Message returns the exception's message. -func (s NodeQuotaForClusterExceededFault) Message() string { +func (s *NodeQuotaForClusterExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4439,28 +4439,28 @@ func (s NodeQuotaForClusterExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NodeQuotaForClusterExceededFault) OrigErr() error { +func (s *NodeQuotaForClusterExceededFault) OrigErr() error { return nil } -func (s NodeQuotaForClusterExceededFault) Error() string { +func (s *NodeQuotaForClusterExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NodeQuotaForClusterExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NodeQuotaForClusterExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NodeQuotaForClusterExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *NodeQuotaForClusterExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // You have attempted to exceed the maximum number of nodes for your AWS account. type NodeQuotaForCustomerExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4477,17 +4477,17 @@ func (s NodeQuotaForCustomerExceededFault) GoString() string { func newErrorNodeQuotaForCustomerExceededFault(v protocol.ResponseMetadata) error { return &NodeQuotaForCustomerExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NodeQuotaForCustomerExceededFault) Code() string { +func (s *NodeQuotaForCustomerExceededFault) Code() string { return "NodeQuotaForCustomerExceededFault" } // Message returns the exception's message. -func (s NodeQuotaForCustomerExceededFault) Message() string { +func (s *NodeQuotaForCustomerExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4495,22 +4495,22 @@ func (s NodeQuotaForCustomerExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NodeQuotaForCustomerExceededFault) OrigErr() error { +func (s *NodeQuotaForCustomerExceededFault) OrigErr() error { return nil } -func (s NodeQuotaForCustomerExceededFault) Error() string { +func (s *NodeQuotaForCustomerExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NodeQuotaForCustomerExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NodeQuotaForCustomerExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NodeQuotaForCustomerExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *NodeQuotaForCustomerExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // Represents a parameter value that is applicable to a particular node type. @@ -4725,8 +4725,8 @@ func (s *ParameterGroup) SetParameterGroupName(v string) *ParameterGroup { // The specified parameter group already exists. type ParameterGroupAlreadyExistsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4743,17 +4743,17 @@ func (s ParameterGroupAlreadyExistsFault) GoString() string { func newErrorParameterGroupAlreadyExistsFault(v protocol.ResponseMetadata) error { return &ParameterGroupAlreadyExistsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterGroupAlreadyExistsFault) Code() string { +func (s *ParameterGroupAlreadyExistsFault) Code() string { return "ParameterGroupAlreadyExistsFault" } // Message returns the exception's message. -func (s ParameterGroupAlreadyExistsFault) Message() string { +func (s *ParameterGroupAlreadyExistsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4761,28 +4761,28 @@ func (s ParameterGroupAlreadyExistsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterGroupAlreadyExistsFault) OrigErr() error { +func (s *ParameterGroupAlreadyExistsFault) OrigErr() error { return nil } -func (s ParameterGroupAlreadyExistsFault) Error() string { +func (s *ParameterGroupAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterGroupAlreadyExistsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterGroupAlreadyExistsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterGroupAlreadyExistsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterGroupAlreadyExistsFault) RequestID() string { + return s.RespMetadata.RequestID } // The specified parameter group does not exist. type ParameterGroupNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4799,17 +4799,17 @@ func (s ParameterGroupNotFoundFault) GoString() string { func newErrorParameterGroupNotFoundFault(v protocol.ResponseMetadata) error { return &ParameterGroupNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterGroupNotFoundFault) Code() string { +func (s *ParameterGroupNotFoundFault) Code() string { return "ParameterGroupNotFoundFault" } // Message returns the exception's message. -func (s ParameterGroupNotFoundFault) Message() string { +func (s *ParameterGroupNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4817,28 +4817,28 @@ func (s ParameterGroupNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterGroupNotFoundFault) OrigErr() error { +func (s *ParameterGroupNotFoundFault) OrigErr() error { return nil } -func (s ParameterGroupNotFoundFault) Error() string { +func (s *ParameterGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterGroupNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterGroupNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterGroupNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterGroupNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // You have attempted to exceed the maximum number of parameter groups. type ParameterGroupQuotaExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4855,17 +4855,17 @@ func (s ParameterGroupQuotaExceededFault) GoString() string { func newErrorParameterGroupQuotaExceededFault(v protocol.ResponseMetadata) error { return &ParameterGroupQuotaExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterGroupQuotaExceededFault) Code() string { +func (s *ParameterGroupQuotaExceededFault) Code() string { return "ParameterGroupQuotaExceededFault" } // Message returns the exception's message. -func (s ParameterGroupQuotaExceededFault) Message() string { +func (s *ParameterGroupQuotaExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4873,22 +4873,22 @@ func (s ParameterGroupQuotaExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterGroupQuotaExceededFault) OrigErr() error { +func (s *ParameterGroupQuotaExceededFault) OrigErr() error { return nil } -func (s ParameterGroupQuotaExceededFault) Error() string { +func (s *ParameterGroupQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterGroupQuotaExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterGroupQuotaExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterGroupQuotaExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterGroupQuotaExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // The status of a parameter group. @@ -5149,8 +5149,8 @@ func (s *SecurityGroupMembership) SetStatus(v string) *SecurityGroupMembership { // The specified service linked role (SLR) was not found. type ServiceLinkedRoleNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5167,17 +5167,17 @@ func (s ServiceLinkedRoleNotFoundFault) GoString() string { func newErrorServiceLinkedRoleNotFoundFault(v protocol.ResponseMetadata) error { return &ServiceLinkedRoleNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceLinkedRoleNotFoundFault) Code() string { +func (s *ServiceLinkedRoleNotFoundFault) Code() string { return "ServiceLinkedRoleNotFoundFault" } // Message returns the exception's message. -func (s ServiceLinkedRoleNotFoundFault) Message() string { +func (s *ServiceLinkedRoleNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5185,22 +5185,22 @@ func (s ServiceLinkedRoleNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceLinkedRoleNotFoundFault) OrigErr() error { +func (s *ServiceLinkedRoleNotFoundFault) OrigErr() error { return nil } -func (s ServiceLinkedRoleNotFoundFault) Error() string { +func (s *ServiceLinkedRoleNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceLinkedRoleNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceLinkedRoleNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceLinkedRoleNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceLinkedRoleNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // Represents the subnet associated with a DAX cluster. This parameter refers @@ -5295,8 +5295,8 @@ func (s *SubnetGroup) SetVpcId(v string) *SubnetGroup { // The specified subnet group already exists. type SubnetGroupAlreadyExistsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5313,17 +5313,17 @@ func (s SubnetGroupAlreadyExistsFault) GoString() string { func newErrorSubnetGroupAlreadyExistsFault(v protocol.ResponseMetadata) error { return &SubnetGroupAlreadyExistsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetGroupAlreadyExistsFault) Code() string { +func (s *SubnetGroupAlreadyExistsFault) Code() string { return "SubnetGroupAlreadyExistsFault" } // Message returns the exception's message. -func (s SubnetGroupAlreadyExistsFault) Message() string { +func (s *SubnetGroupAlreadyExistsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5331,28 +5331,28 @@ func (s SubnetGroupAlreadyExistsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetGroupAlreadyExistsFault) OrigErr() error { +func (s *SubnetGroupAlreadyExistsFault) OrigErr() error { return nil } -func (s SubnetGroupAlreadyExistsFault) Error() string { +func (s *SubnetGroupAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetGroupAlreadyExistsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetGroupAlreadyExistsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetGroupAlreadyExistsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetGroupAlreadyExistsFault) RequestID() string { + return s.RespMetadata.RequestID } // The specified subnet group is currently in use. type SubnetGroupInUseFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5369,17 +5369,17 @@ func (s SubnetGroupInUseFault) GoString() string { func newErrorSubnetGroupInUseFault(v protocol.ResponseMetadata) error { return &SubnetGroupInUseFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetGroupInUseFault) Code() string { +func (s *SubnetGroupInUseFault) Code() string { return "SubnetGroupInUseFault" } // Message returns the exception's message. -func (s SubnetGroupInUseFault) Message() string { +func (s *SubnetGroupInUseFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5387,28 +5387,28 @@ func (s SubnetGroupInUseFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetGroupInUseFault) OrigErr() error { +func (s *SubnetGroupInUseFault) OrigErr() error { return nil } -func (s SubnetGroupInUseFault) Error() string { +func (s *SubnetGroupInUseFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetGroupInUseFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetGroupInUseFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetGroupInUseFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetGroupInUseFault) RequestID() string { + return s.RespMetadata.RequestID } // The requested subnet group name does not refer to an existing subnet group. type SubnetGroupNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5425,17 +5425,17 @@ func (s SubnetGroupNotFoundFault) GoString() string { func newErrorSubnetGroupNotFoundFault(v protocol.ResponseMetadata) error { return &SubnetGroupNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetGroupNotFoundFault) Code() string { +func (s *SubnetGroupNotFoundFault) Code() string { return "SubnetGroupNotFoundFault" } // Message returns the exception's message. -func (s SubnetGroupNotFoundFault) Message() string { +func (s *SubnetGroupNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5443,29 +5443,29 @@ func (s SubnetGroupNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetGroupNotFoundFault) OrigErr() error { +func (s *SubnetGroupNotFoundFault) OrigErr() error { return nil } -func (s SubnetGroupNotFoundFault) Error() string { +func (s *SubnetGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetGroupNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetGroupNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetGroupNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetGroupNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // The request cannot be processed because it would exceed the allowed number // of subnets in a subnet group. type SubnetGroupQuotaExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5482,17 +5482,17 @@ func (s SubnetGroupQuotaExceededFault) GoString() string { func newErrorSubnetGroupQuotaExceededFault(v protocol.ResponseMetadata) error { return &SubnetGroupQuotaExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetGroupQuotaExceededFault) Code() string { +func (s *SubnetGroupQuotaExceededFault) Code() string { return "SubnetGroupQuotaExceededFault" } // Message returns the exception's message. -func (s SubnetGroupQuotaExceededFault) Message() string { +func (s *SubnetGroupQuotaExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5500,28 +5500,28 @@ func (s SubnetGroupQuotaExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetGroupQuotaExceededFault) OrigErr() error { +func (s *SubnetGroupQuotaExceededFault) OrigErr() error { return nil } -func (s SubnetGroupQuotaExceededFault) Error() string { +func (s *SubnetGroupQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetGroupQuotaExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetGroupQuotaExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetGroupQuotaExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetGroupQuotaExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // The requested subnet is being used by another subnet group. type SubnetInUse struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5538,17 +5538,17 @@ func (s SubnetInUse) GoString() string { func newErrorSubnetInUse(v protocol.ResponseMetadata) error { return &SubnetInUse{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetInUse) Code() string { +func (s *SubnetInUse) Code() string { return "SubnetInUse" } // Message returns the exception's message. -func (s SubnetInUse) Message() string { +func (s *SubnetInUse) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5556,29 +5556,29 @@ func (s SubnetInUse) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetInUse) OrigErr() error { +func (s *SubnetInUse) OrigErr() error { return nil } -func (s SubnetInUse) Error() string { +func (s *SubnetInUse) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetInUse) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetInUse) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetInUse) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetInUse) RequestID() string { + return s.RespMetadata.RequestID } // The request cannot be processed because it would exceed the allowed number // of subnets in a subnet group. type SubnetQuotaExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5595,17 +5595,17 @@ func (s SubnetQuotaExceededFault) GoString() string { func newErrorSubnetQuotaExceededFault(v protocol.ResponseMetadata) error { return &SubnetQuotaExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetQuotaExceededFault) Code() string { +func (s *SubnetQuotaExceededFault) Code() string { return "SubnetQuotaExceededFault" } // Message returns the exception's message. -func (s SubnetQuotaExceededFault) Message() string { +func (s *SubnetQuotaExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5613,22 +5613,22 @@ func (s SubnetQuotaExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetQuotaExceededFault) OrigErr() error { +func (s *SubnetQuotaExceededFault) OrigErr() error { return nil } -func (s SubnetQuotaExceededFault) Error() string { +func (s *SubnetQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetQuotaExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetQuotaExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetQuotaExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetQuotaExceededFault) RequestID() string { + return s.RespMetadata.RequestID } // A description of a tag. Every tag is a key-value pair. You can add up to @@ -5675,8 +5675,8 @@ func (s *Tag) SetValue(v string) *Tag { // The tag does not exist. type TagNotFoundFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5693,17 +5693,17 @@ func (s TagNotFoundFault) GoString() string { func newErrorTagNotFoundFault(v protocol.ResponseMetadata) error { return &TagNotFoundFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagNotFoundFault) Code() string { +func (s *TagNotFoundFault) Code() string { return "TagNotFoundFault" } // Message returns the exception's message. -func (s TagNotFoundFault) Message() string { +func (s *TagNotFoundFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5711,28 +5711,28 @@ func (s TagNotFoundFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagNotFoundFault) OrigErr() error { +func (s *TagNotFoundFault) OrigErr() error { return nil } -func (s TagNotFoundFault) Error() string { +func (s *TagNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagNotFoundFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagNotFoundFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagNotFoundFault) RequestID() string { - return s.respMetadata.RequestID +func (s *TagNotFoundFault) RequestID() string { + return s.RespMetadata.RequestID } // You have exceeded the maximum number of tags for this DAX cluster. type TagQuotaPerResourceExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5749,17 +5749,17 @@ func (s TagQuotaPerResourceExceeded) GoString() string { func newErrorTagQuotaPerResourceExceeded(v protocol.ResponseMetadata) error { return &TagQuotaPerResourceExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagQuotaPerResourceExceeded) Code() string { +func (s *TagQuotaPerResourceExceeded) Code() string { return "TagQuotaPerResourceExceeded" } // Message returns the exception's message. -func (s TagQuotaPerResourceExceeded) Message() string { +func (s *TagQuotaPerResourceExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5767,22 +5767,22 @@ func (s TagQuotaPerResourceExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagQuotaPerResourceExceeded) OrigErr() error { +func (s *TagQuotaPerResourceExceeded) OrigErr() error { return nil } -func (s TagQuotaPerResourceExceeded) Error() string { +func (s *TagQuotaPerResourceExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagQuotaPerResourceExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagQuotaPerResourceExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagQuotaPerResourceExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *TagQuotaPerResourceExceeded) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { 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 a458895b251..794dbc5c295 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 @@ -8007,8 +8007,8 @@ func (s *AccountSettings) SetUnmeteredRemoteAccessDevices(v map[string]*int64) * // An invalid argument was specified. type ArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Any additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -8026,17 +8026,17 @@ func (s ArgumentException) GoString() string { func newErrorArgumentException(v protocol.ResponseMetadata) error { return &ArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ArgumentException) Code() string { +func (s *ArgumentException) Code() string { return "ArgumentException" } // Message returns the exception's message. -func (s ArgumentException) Message() string { +func (s *ArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8044,22 +8044,22 @@ func (s ArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ArgumentException) OrigErr() error { +func (s *ArgumentException) OrigErr() error { return nil } -func (s ArgumentException) Error() string { +func (s *ArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *ArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the output of a test. Examples of artifacts include logs and screenshots. @@ -8228,8 +8228,8 @@ func (s *CPU) SetFrequency(v string) *CPU { // The requested object could not be deleted. type CannotDeleteException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8246,17 +8246,17 @@ func (s CannotDeleteException) GoString() string { func newErrorCannotDeleteException(v protocol.ResponseMetadata) error { return &CannotDeleteException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CannotDeleteException) Code() string { +func (s *CannotDeleteException) Code() string { return "CannotDeleteException" } // Message returns the exception's message. -func (s CannotDeleteException) Message() string { +func (s *CannotDeleteException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8264,22 +8264,22 @@ func (s CannotDeleteException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CannotDeleteException) OrigErr() error { +func (s *CannotDeleteException) OrigErr() error { return nil } -func (s CannotDeleteException) Error() string { +func (s *CannotDeleteException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CannotDeleteException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CannotDeleteException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CannotDeleteException) RequestID() string { - return s.respMetadata.RequestID +func (s *CannotDeleteException) RequestID() string { + return s.RespMetadata.RequestID } // Represents entity counters. @@ -12177,8 +12177,8 @@ func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) // An entity with the same name already exists. type IdempotencyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Any additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -12196,17 +12196,17 @@ func (s IdempotencyException) GoString() string { func newErrorIdempotencyException(v protocol.ResponseMetadata) error { return &IdempotencyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotencyException) Code() string { +func (s *IdempotencyException) Code() string { return "IdempotencyException" } // Message returns the exception's message. -func (s IdempotencyException) Message() string { +func (s *IdempotencyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12214,22 +12214,22 @@ func (s IdempotencyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotencyException) OrigErr() error { +func (s *IdempotencyException) OrigErr() error { return nil } -func (s IdempotencyException) Error() string { +func (s *IdempotencyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotencyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotencyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotencyException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotencyException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about incompatibility. @@ -12442,8 +12442,8 @@ func (s *InstanceProfile) SetRebootAfterUse(v bool) *InstanceProfile { // An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com // (mailto:aws-devicefarm-support@amazon.com) if you see this error. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12460,17 +12460,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12478,29 +12478,29 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // There was an error with the update request, or you do not have sufficient // permissions to update this VPC endpoint configuration. type InvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12517,17 +12517,17 @@ func (s InvalidOperationException) GoString() string { func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { return &InvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOperationException) Code() string { +func (s *InvalidOperationException) Code() string { return "InvalidOperationException" } // Message returns the exception's message. -func (s InvalidOperationException) Message() string { +func (s *InvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12535,22 +12535,22 @@ func (s InvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOperationException) OrigErr() error { +func (s *InvalidOperationException) OrigErr() error { return nil } -func (s InvalidOperationException) Error() string { +func (s *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a device. @@ -12781,8 +12781,8 @@ func (s *Job) SetVideoEndpoint(v string) *Job { // A limit was exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Any additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -12800,17 +12800,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12818,22 +12818,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a request to the list artifacts operation. @@ -15349,8 +15349,8 @@ func (s *NetworkProfile) SetUplinkLossPercent(v int64) *NetworkProfile { // Exception gets thrown when a user is not eligible to perform the specified // transaction. type NotEligibleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The HTTP response code of a Not Eligible exception. Message_ *string `locationName:"message" type:"string"` @@ -15368,17 +15368,17 @@ func (s NotEligibleException) GoString() string { func newErrorNotEligibleException(v protocol.ResponseMetadata) error { return &NotEligibleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotEligibleException) Code() string { +func (s *NotEligibleException) Code() string { return "NotEligibleException" } // Message returns the exception's message. -func (s NotEligibleException) Message() string { +func (s *NotEligibleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15386,28 +15386,28 @@ func (s NotEligibleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotEligibleException) OrigErr() error { +func (s *NotEligibleException) OrigErr() error { return nil } -func (s NotEligibleException) Error() string { +func (s *NotEligibleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotEligibleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotEligibleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotEligibleException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotEligibleException) RequestID() string { + return s.RespMetadata.RequestID } // The specified entity was not found. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Any additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -15425,17 +15425,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15443,22 +15443,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the metadata of a device offering. @@ -17457,8 +17457,8 @@ func (s *ScheduleRunTest) SetType(v string) *ScheduleRunTest { // There was a problem with the service account. type ServiceAccountException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Any additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -17476,17 +17476,17 @@ func (s ServiceAccountException) GoString() string { func newErrorServiceAccountException(v protocol.ResponseMetadata) error { return &ServiceAccountException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceAccountException) Code() string { +func (s *ServiceAccountException) Code() string { return "ServiceAccountException" } // Message returns the exception's message. -func (s ServiceAccountException) Message() string { +func (s *ServiceAccountException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17494,22 +17494,22 @@ func (s ServiceAccountException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceAccountException) OrigErr() error { +func (s *ServiceAccountException) OrigErr() error { return nil } -func (s ServiceAccountException) Error() string { +func (s *ServiceAccountException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceAccountException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceAccountException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceAccountException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceAccountException) RequestID() string { + return s.RespMetadata.RequestID } type StopJobInput struct { @@ -17963,8 +17963,8 @@ func (s *Tag) SetValue(v string) *Tag { // The operation was not successful. Try again. type TagOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -17983,17 +17983,17 @@ func (s TagOperationException) GoString() string { func newErrorTagOperationException(v protocol.ResponseMetadata) error { return &TagOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagOperationException) Code() string { +func (s *TagOperationException) Code() string { return "TagOperationException" } // Message returns the exception's message. -func (s TagOperationException) Message() string { +func (s *TagOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18001,29 +18001,29 @@ func (s TagOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagOperationException) OrigErr() error { +func (s *TagOperationException) OrigErr() error { return nil } -func (s TagOperationException) Error() string { +func (s *TagOperationException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TagOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagOperationException) RequestID() string { + return s.RespMetadata.RequestID } // The request doesn't comply with the AWS Identity and Access Management (IAM) // tag policy. Correct your request and then retry it. type TagPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -18042,17 +18042,17 @@ func (s TagPolicyException) GoString() string { func newErrorTagPolicyException(v protocol.ResponseMetadata) error { return &TagPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagPolicyException) Code() string { +func (s *TagPolicyException) Code() string { return "TagPolicyException" } // Message returns the exception's message. -func (s TagPolicyException) Message() string { +func (s *TagPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18060,22 +18060,22 @@ func (s TagPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagPolicyException) OrigErr() error { +func (s *TagPolicyException) OrigErr() error { return nil } -func (s TagPolicyException) Error() string { +func (s *TagPolicyException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TagPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagPolicyException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -18581,8 +18581,8 @@ func (s *TestGridSessionArtifact) SetUrl(v string) *TestGridSessionArtifact { // The list of tags on the repository is over the limit. The maximum number // of tags that can be applied to a repository is 50. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -18601,17 +18601,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18619,22 +18619,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } // Represents information about free trial device minutes for an AWS account. 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 4cd291e1480..fe73bb92626 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 @@ -5660,8 +5660,8 @@ func (s *BGPPeer) SetCustomerAddress(v string) *BGPPeer { // One or more parameters are not valid. type ClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5678,17 +5678,17 @@ func (s ClientException) GoString() string { func newErrorClientException(v protocol.ResponseMetadata) error { return &ClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientException) Code() string { +func (s *ClientException) Code() string { return "DirectConnectClientException" } // Message returns the exception's message. -func (s ClientException) Message() string { +func (s *ClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5696,22 +5696,22 @@ func (s ClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientException) OrigErr() error { +func (s *ClientException) OrigErr() error { return nil } -func (s ClientException) Error() string { +func (s *ClientException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientException) RequestID() string { + return s.RespMetadata.RequestID } type ConfirmConnectionInput struct { @@ -8714,8 +8714,8 @@ func (s *DisassociateConnectionFromLagInput) SetLagId(v string) *DisassociateCon // A tag key was specified more than once. type DuplicateTagKeysException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8732,17 +8732,17 @@ func (s DuplicateTagKeysException) GoString() string { func newErrorDuplicateTagKeysException(v protocol.ResponseMetadata) error { return &DuplicateTagKeysException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateTagKeysException) Code() string { +func (s *DuplicateTagKeysException) Code() string { return "DuplicateTagKeysException" } // Message returns the exception's message. -func (s DuplicateTagKeysException) Message() string { +func (s *DuplicateTagKeysException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8750,22 +8750,22 @@ func (s DuplicateTagKeysException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateTagKeysException) OrigErr() error { +func (s *DuplicateTagKeysException) OrigErr() error { return nil } -func (s DuplicateTagKeysException) Error() string { +func (s *DuplicateTagKeysException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateTagKeysException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateTagKeysException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateTagKeysException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateTagKeysException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a Direct Connect gateway, which enables you to connect @@ -10534,8 +10534,8 @@ func (s *RouteFilterPrefix) SetCidr(v string) *RouteFilterPrefix { // A server-side error occurred. type ServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10552,17 +10552,17 @@ func (s ServerException) GoString() string { func newErrorServerException(v protocol.ResponseMetadata) error { return &ServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerException) Code() string { +func (s *ServerException) Code() string { return "DirectConnectServerException" } // Message returns the exception's message. -func (s ServerException) Message() string { +func (s *ServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10570,22 +10570,22 @@ func (s ServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerException) OrigErr() error { +func (s *ServerException) OrigErr() error { return nil } -func (s ServerException) Error() string { +func (s *ServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a tag. @@ -10720,8 +10720,8 @@ func (s TagResourceOutput) GoString() string { // You have reached the limit on the number of tags that can be assigned. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10738,17 +10738,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10756,22 +10756,22 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 ce66195e46f..231dfd334d1 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 @@ -5569,8 +5569,8 @@ func (s *AcceptSharedDirectoryOutput) SetSharedDirectory(v *SharedDirectory) *Ac // You do not have sufficient access to perform this action. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -5591,17 +5591,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5609,22 +5609,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type AddIpRoutesInput struct { @@ -5872,8 +5872,8 @@ func (s *Attribute) SetValue(v string) *Attribute { // An authentication error occurred. type AuthenticationFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The textual message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -5894,17 +5894,17 @@ func (s AuthenticationFailedException) GoString() string { func newErrorAuthenticationFailedException(v protocol.ResponseMetadata) error { return &AuthenticationFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AuthenticationFailedException) Code() string { +func (s *AuthenticationFailedException) Code() string { return "AuthenticationFailedException" } // Message returns the exception's message. -func (s AuthenticationFailedException) Message() string { +func (s *AuthenticationFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5912,22 +5912,22 @@ func (s AuthenticationFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AuthenticationFailedException) OrigErr() error { +func (s *AuthenticationFailedException) OrigErr() error { return nil } -func (s AuthenticationFailedException) Error() string { +func (s *AuthenticationFailedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AuthenticationFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AuthenticationFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AuthenticationFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AuthenticationFailedException) RequestID() string { + return s.RespMetadata.RequestID } type CancelSchemaExtensionInput struct { @@ -6067,8 +6067,8 @@ func (s *Certificate) SetStateReason(v string) *Certificate { // The certificate has already been registered into the system. type CertificateAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -6089,17 +6089,17 @@ func (s CertificateAlreadyExistsException) GoString() string { func newErrorCertificateAlreadyExistsException(v protocol.ResponseMetadata) error { return &CertificateAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateAlreadyExistsException) Code() string { +func (s *CertificateAlreadyExistsException) Code() string { return "CertificateAlreadyExistsException" } // Message returns the exception's message. -func (s CertificateAlreadyExistsException) Message() string { +func (s *CertificateAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6107,28 +6107,28 @@ func (s CertificateAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateAlreadyExistsException) OrigErr() error { +func (s *CertificateAlreadyExistsException) OrigErr() error { return nil } -func (s CertificateAlreadyExistsException) Error() string { +func (s *CertificateAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The certificate is not present in the system for describe or deregister activities. type CertificateDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -6149,17 +6149,17 @@ func (s CertificateDoesNotExistException) GoString() string { func newErrorCertificateDoesNotExistException(v protocol.ResponseMetadata) error { return &CertificateDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateDoesNotExistException) Code() string { +func (s *CertificateDoesNotExistException) Code() string { return "CertificateDoesNotExistException" } // Message returns the exception's message. -func (s CertificateDoesNotExistException) Message() string { +func (s *CertificateDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6167,29 +6167,29 @@ func (s CertificateDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateDoesNotExistException) OrigErr() error { +func (s *CertificateDoesNotExistException) OrigErr() error { return nil } -func (s CertificateDoesNotExistException) Error() string { +func (s *CertificateDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The certificate is being used for the LDAP security connection and cannot // be removed without disabling LDAP security. type CertificateInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -6210,17 +6210,17 @@ func (s CertificateInUseException) GoString() string { func newErrorCertificateInUseException(v protocol.ResponseMetadata) error { return &CertificateInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateInUseException) Code() string { +func (s *CertificateInUseException) Code() string { return "CertificateInUseException" } // Message returns the exception's message. -func (s CertificateInUseException) Message() string { +func (s *CertificateInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6228,22 +6228,22 @@ func (s CertificateInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateInUseException) OrigErr() error { +func (s *CertificateInUseException) OrigErr() error { return nil } -func (s CertificateInUseException) Error() string { +func (s *CertificateInUseException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Contains general information about a certificate. @@ -6300,8 +6300,8 @@ func (s *CertificateInfo) SetState(v string) *CertificateInfo { // The certificate could not be added because the certificate limit has been // reached. type CertificateLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -6322,17 +6322,17 @@ func (s CertificateLimitExceededException) GoString() string { func newErrorCertificateLimitExceededException(v protocol.ResponseMetadata) error { return &CertificateLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateLimitExceededException) Code() string { +func (s *CertificateLimitExceededException) Code() string { return "CertificateLimitExceededException" } // Message returns the exception's message. -func (s CertificateLimitExceededException) Message() string { +func (s *CertificateLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6340,28 +6340,28 @@ func (s CertificateLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateLimitExceededException) OrigErr() error { +func (s *CertificateLimitExceededException) OrigErr() error { return nil } -func (s CertificateLimitExceededException) Error() string { +func (s *CertificateLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A client exception has occurred. type ClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -6382,17 +6382,17 @@ func (s ClientException) GoString() string { func newErrorClientException(v protocol.ResponseMetadata) error { return &ClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientException) Code() string { +func (s *ClientException) Code() string { return "ClientException" } // Message returns the exception's message. -func (s ClientException) Message() string { +func (s *ClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6400,22 +6400,22 @@ func (s ClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientException) OrigErr() error { +func (s *ClientException) OrigErr() error { return nil } -func (s ClientException) Error() string { +func (s *ClientException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a computer account in a directory. @@ -8813,8 +8813,8 @@ func (s *DescribeTrustsOutput) SetTrusts(v []*Trust) *DescribeTrustsOutput { // The specified directory has already been shared with this AWS account. type DirectoryAlreadySharedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -8835,17 +8835,17 @@ func (s DirectoryAlreadySharedException) GoString() string { func newErrorDirectoryAlreadySharedException(v protocol.ResponseMetadata) error { return &DirectoryAlreadySharedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryAlreadySharedException) Code() string { +func (s *DirectoryAlreadySharedException) Code() string { return "DirectoryAlreadySharedException" } // Message returns the exception's message. -func (s DirectoryAlreadySharedException) Message() string { +func (s *DirectoryAlreadySharedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8853,22 +8853,22 @@ func (s DirectoryAlreadySharedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryAlreadySharedException) OrigErr() error { +func (s *DirectoryAlreadySharedException) OrigErr() error { return nil } -func (s DirectoryAlreadySharedException) Error() string { +func (s *DirectoryAlreadySharedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryAlreadySharedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryAlreadySharedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryAlreadySharedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryAlreadySharedException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information for the ConnectDirectory operation when an AD Connector @@ -9284,8 +9284,8 @@ func (s *DirectoryDescription) SetVpcSettings(v *DirectoryVpcSettingsDescription // The specified directory does not exist in the system. type DirectoryDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9306,17 +9306,17 @@ func (s DirectoryDoesNotExistException) GoString() string { func newErrorDirectoryDoesNotExistException(v protocol.ResponseMetadata) error { return &DirectoryDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryDoesNotExistException) Code() string { +func (s *DirectoryDoesNotExistException) Code() string { return "DirectoryDoesNotExistException" } // Message returns the exception's message. -func (s DirectoryDoesNotExistException) Message() string { +func (s *DirectoryDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9324,30 +9324,30 @@ func (s DirectoryDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryDoesNotExistException) OrigErr() error { +func (s *DirectoryDoesNotExistException) OrigErr() error { return nil } -func (s DirectoryDoesNotExistException) Error() string { +func (s *DirectoryDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of directories in the region has been reached. You can // use the GetDirectoryLimits operation to determine your directory limits in // the region. type DirectoryLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9368,17 +9368,17 @@ func (s DirectoryLimitExceededException) GoString() string { func newErrorDirectoryLimitExceededException(v protocol.ResponseMetadata) error { return &DirectoryLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryLimitExceededException) Code() string { +func (s *DirectoryLimitExceededException) Code() string { return "DirectoryLimitExceededException" } // Message returns the exception's message. -func (s DirectoryLimitExceededException) Message() string { +func (s *DirectoryLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9386,22 +9386,22 @@ func (s DirectoryLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryLimitExceededException) OrigErr() error { +func (s *DirectoryLimitExceededException) OrigErr() error { return nil } -func (s DirectoryLimitExceededException) Error() string { +func (s *DirectoryLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Contains directory limit information for a Region. @@ -9503,8 +9503,8 @@ func (s *DirectoryLimits) SetConnectedDirectoriesLimitReached(v bool) *Directory // The specified directory has not been shared with this AWS account. type DirectoryNotSharedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9525,17 +9525,17 @@ func (s DirectoryNotSharedException) GoString() string { func newErrorDirectoryNotSharedException(v protocol.ResponseMetadata) error { return &DirectoryNotSharedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryNotSharedException) Code() string { +func (s *DirectoryNotSharedException) Code() string { return "DirectoryNotSharedException" } // Message returns the exception's message. -func (s DirectoryNotSharedException) Message() string { +func (s *DirectoryNotSharedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9543,28 +9543,28 @@ func (s DirectoryNotSharedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryNotSharedException) OrigErr() error { +func (s *DirectoryNotSharedException) OrigErr() error { return nil } -func (s DirectoryNotSharedException) Error() string { +func (s *DirectoryNotSharedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryNotSharedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryNotSharedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryNotSharedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryNotSharedException) RequestID() string { + return s.RespMetadata.RequestID } // The specified directory is unavailable or could not be found. type DirectoryUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -9585,17 +9585,17 @@ func (s DirectoryUnavailableException) GoString() string { func newErrorDirectoryUnavailableException(v protocol.ResponseMetadata) error { return &DirectoryUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryUnavailableException) Code() string { +func (s *DirectoryUnavailableException) Code() string { return "DirectoryUnavailableException" } // Message returns the exception's message. -func (s DirectoryUnavailableException) Message() string { +func (s *DirectoryUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9603,22 +9603,22 @@ func (s DirectoryUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryUnavailableException) OrigErr() error { +func (s *DirectoryUnavailableException) OrigErr() error { return nil } -func (s DirectoryUnavailableException) Error() string { +func (s *DirectoryUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation. @@ -10043,8 +10043,8 @@ func (s *DomainController) SetVpcId(v string) *DomainController { // The maximum allowed number of domain controllers per directory was exceeded. // The default limit per directory is 20 domain controllers. type DomainControllerLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10065,17 +10065,17 @@ func (s DomainControllerLimitExceededException) GoString() string { func newErrorDomainControllerLimitExceededException(v protocol.ResponseMetadata) error { return &DomainControllerLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DomainControllerLimitExceededException) Code() string { +func (s *DomainControllerLimitExceededException) Code() string { return "DomainControllerLimitExceededException" } // Message returns the exception's message. -func (s DomainControllerLimitExceededException) Message() string { +func (s *DomainControllerLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10083,22 +10083,22 @@ func (s DomainControllerLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DomainControllerLimitExceededException) OrigErr() error { +func (s *DomainControllerLimitExceededException) OrigErr() error { return nil } -func (s DomainControllerLimitExceededException) Error() string { +func (s *DomainControllerLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DomainControllerLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DomainControllerLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DomainControllerLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DomainControllerLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type EnableLDAPSInput struct { @@ -10330,8 +10330,8 @@ func (s EnableSsoOutput) GoString() string { // The specified entity already exists. type EntityAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10352,17 +10352,17 @@ func (s EntityAlreadyExistsException) GoString() string { func newErrorEntityAlreadyExistsException(v protocol.ResponseMetadata) error { return &EntityAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityAlreadyExistsException) Code() string { +func (s *EntityAlreadyExistsException) Code() string { return "EntityAlreadyExistsException" } // Message returns the exception's message. -func (s EntityAlreadyExistsException) Message() string { +func (s *EntityAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10370,28 +10370,28 @@ func (s EntityAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityAlreadyExistsException) OrigErr() error { +func (s *EntityAlreadyExistsException) OrigErr() error { return nil } -func (s EntityAlreadyExistsException) Error() string { +func (s *EntityAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified entity could not be found. type EntityDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10412,17 +10412,17 @@ func (s EntityDoesNotExistException) GoString() string { func newErrorEntityDoesNotExistException(v protocol.ResponseMetadata) error { return &EntityDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityDoesNotExistException) Code() string { +func (s *EntityDoesNotExistException) Code() string { return "EntityDoesNotExistException" } // Message returns the exception's message. -func (s EntityDoesNotExistException) Message() string { +func (s *EntityDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10430,22 +10430,22 @@ func (s EntityDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityDoesNotExistException) OrigErr() error { +func (s *EntityDoesNotExistException) OrigErr() error { return nil } -func (s EntityDoesNotExistException) Error() string { +func (s *EntityDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Information about SNS topic and AWS Directory Service directory associations. @@ -10615,8 +10615,8 @@ func (s *GetSnapshotLimitsOutput) SetSnapshotLimits(v *SnapshotLimits) *GetSnaps // The account does not have sufficient permission to perform the operation. type InsufficientPermissionsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10637,17 +10637,17 @@ func (s InsufficientPermissionsException) GoString() string { func newErrorInsufficientPermissionsException(v protocol.ResponseMetadata) error { return &InsufficientPermissionsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientPermissionsException) Code() string { +func (s *InsufficientPermissionsException) Code() string { return "InsufficientPermissionsException" } // Message returns the exception's message. -func (s InsufficientPermissionsException) Message() string { +func (s *InsufficientPermissionsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10655,28 +10655,28 @@ func (s InsufficientPermissionsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientPermissionsException) OrigErr() error { +func (s *InsufficientPermissionsException) OrigErr() error { return nil } -func (s InsufficientPermissionsException) Error() string { +func (s *InsufficientPermissionsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientPermissionsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientPermissionsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientPermissionsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientPermissionsException) RequestID() string { + return s.RespMetadata.RequestID } // The certificate PEM that was provided has incorrect encoding. type InvalidCertificateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10697,17 +10697,17 @@ func (s InvalidCertificateException) GoString() string { func newErrorInvalidCertificateException(v protocol.ResponseMetadata) error { return &InvalidCertificateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCertificateException) Code() string { +func (s *InvalidCertificateException) Code() string { return "InvalidCertificateException" } // Message returns the exception's message. -func (s InvalidCertificateException) Message() string { +func (s *InvalidCertificateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10715,29 +10715,29 @@ func (s InvalidCertificateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCertificateException) OrigErr() error { +func (s *InvalidCertificateException) OrigErr() error { return nil } -func (s InvalidCertificateException) Error() string { +func (s *InvalidCertificateException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCertificateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCertificateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCertificateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCertificateException) RequestID() string { + return s.RespMetadata.RequestID } // The LDAP activities could not be performed because they are limited by the // LDAPS status. type InvalidLDAPSStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10758,17 +10758,17 @@ func (s InvalidLDAPSStatusException) GoString() string { func newErrorInvalidLDAPSStatusException(v protocol.ResponseMetadata) error { return &InvalidLDAPSStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLDAPSStatusException) Code() string { +func (s *InvalidLDAPSStatusException) Code() string { return "InvalidLDAPSStatusException" } // Message returns the exception's message. -func (s InvalidLDAPSStatusException) Message() string { +func (s *InvalidLDAPSStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10776,28 +10776,28 @@ func (s InvalidLDAPSStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLDAPSStatusException) OrigErr() error { +func (s *InvalidLDAPSStatusException) OrigErr() error { return nil } -func (s InvalidLDAPSStatusException) Error() string { +func (s *InvalidLDAPSStatusException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLDAPSStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLDAPSStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLDAPSStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLDAPSStatusException) RequestID() string { + return s.RespMetadata.RequestID } // The NextToken value is not valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10818,17 +10818,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10836,28 +10836,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // One or more parameters are not valid. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10878,17 +10878,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10896,29 +10896,29 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The new password provided by the user does not meet the password complexity // requirements defined in your directory. type InvalidPasswordException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10939,17 +10939,17 @@ func (s InvalidPasswordException) GoString() string { func newErrorInvalidPasswordException(v protocol.ResponseMetadata) error { return &InvalidPasswordException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPasswordException) Code() string { +func (s *InvalidPasswordException) Code() string { return "InvalidPasswordException" } // Message returns the exception's message. -func (s InvalidPasswordException) Message() string { +func (s *InvalidPasswordException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10957,28 +10957,28 @@ func (s InvalidPasswordException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPasswordException) OrigErr() error { +func (s *InvalidPasswordException) OrigErr() error { return nil } -func (s InvalidPasswordException) Error() string { +func (s *InvalidPasswordException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPasswordException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPasswordException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPasswordException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPasswordException) RequestID() string { + return s.RespMetadata.RequestID } // The specified shared target is not valid. type InvalidTargetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -10999,17 +10999,17 @@ func (s InvalidTargetException) GoString() string { func newErrorInvalidTargetException(v protocol.ResponseMetadata) error { return &InvalidTargetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTargetException) Code() string { +func (s *InvalidTargetException) Code() string { return "InvalidTargetException" } // Message returns the exception's message. -func (s InvalidTargetException) Message() string { +func (s *InvalidTargetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11017,22 +11017,22 @@ func (s InvalidTargetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTargetException) OrigErr() error { +func (s *InvalidTargetException) OrigErr() error { return nil } -func (s InvalidTargetException) Error() string { +func (s *InvalidTargetException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTargetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTargetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTargetException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTargetException) RequestID() string { + return s.RespMetadata.RequestID } // IP address block. This is often the address block of the DNS server used @@ -11143,8 +11143,8 @@ func (s *IpRouteInfo) SetIpRouteStatusReason(v string) *IpRouteInfo { // The maximum allowed number of IP addresses was exceeded. The default limit // is 100 IP address blocks. type IpRouteLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -11165,17 +11165,17 @@ func (s IpRouteLimitExceededException) GoString() string { func newErrorIpRouteLimitExceededException(v protocol.ResponseMetadata) error { return &IpRouteLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IpRouteLimitExceededException) Code() string { +func (s *IpRouteLimitExceededException) Code() string { return "IpRouteLimitExceededException" } // Message returns the exception's message. -func (s IpRouteLimitExceededException) Message() string { +func (s *IpRouteLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11183,22 +11183,22 @@ func (s IpRouteLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IpRouteLimitExceededException) OrigErr() error { +func (s *IpRouteLimitExceededException) OrigErr() error { return nil } -func (s IpRouteLimitExceededException) Error() string { +func (s *IpRouteLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s IpRouteLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IpRouteLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IpRouteLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *IpRouteLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Contains general information about the LDAPS settings. @@ -11734,8 +11734,8 @@ func (s *LogSubscription) SetSubscriptionCreatedDateTime(v time.Time) *LogSubscr // The LDAP activities could not be performed because at least one valid certificate // must be registered with the system. type NoAvailableCertificateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -11756,17 +11756,17 @@ func (s NoAvailableCertificateException) GoString() string { func newErrorNoAvailableCertificateException(v protocol.ResponseMetadata) error { return &NoAvailableCertificateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoAvailableCertificateException) Code() string { +func (s *NoAvailableCertificateException) Code() string { return "NoAvailableCertificateException" } // Message returns the exception's message. -func (s NoAvailableCertificateException) Message() string { +func (s *NoAvailableCertificateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11774,28 +11774,28 @@ func (s NoAvailableCertificateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoAvailableCertificateException) OrigErr() error { +func (s *NoAvailableCertificateException) OrigErr() error { return nil } -func (s NoAvailableCertificateException) Error() string { +func (s *NoAvailableCertificateException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NoAvailableCertificateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoAvailableCertificateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoAvailableCertificateException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoAvailableCertificateException) RequestID() string { + return s.RespMetadata.RequestID } // Exception encountered while trying to access your AWS organization. type OrganizationsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -11816,17 +11816,17 @@ func (s OrganizationsException) GoString() string { func newErrorOrganizationsException(v protocol.ResponseMetadata) error { return &OrganizationsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationsException) Code() string { +func (s *OrganizationsException) Code() string { return "OrganizationsException" } // Message returns the exception's message. -func (s OrganizationsException) Message() string { +func (s *OrganizationsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11834,22 +11834,22 @@ func (s OrganizationsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationsException) OrigErr() error { +func (s *OrganizationsException) OrigErr() error { return nil } -func (s OrganizationsException) Error() string { +func (s *OrganizationsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationsException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationsException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the directory owner account details that have been shared to the @@ -12603,8 +12603,8 @@ func (s *SchemaExtensionInfo) SetStartDateTime(v time.Time) *SchemaExtensionInfo // An exception has occurred in AWS Directory Service. type ServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -12625,17 +12625,17 @@ func (s ServiceException) GoString() string { func newErrorServiceException(v protocol.ResponseMetadata) error { return &ServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceException) Code() string { +func (s *ServiceException) Code() string { return "ServiceException" } // Message returns the exception's message. -func (s ServiceException) Message() string { +func (s *ServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12643,22 +12643,22 @@ func (s ServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceException) OrigErr() error { +func (s *ServiceException) OrigErr() error { return nil } -func (s ServiceException) Error() string { +func (s *ServiceException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceException) RequestID() string { + return s.RespMetadata.RequestID } type ShareDirectoryInput struct { @@ -12774,8 +12774,8 @@ func (s *ShareDirectoryOutput) SetSharedDirectoryId(v string) *ShareDirectoryOut // The maximum number of AWS accounts that you can share with this directory // has been reached. type ShareLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -12796,17 +12796,17 @@ func (s ShareLimitExceededException) GoString() string { func newErrorShareLimitExceededException(v protocol.ResponseMetadata) error { return &ShareLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ShareLimitExceededException) Code() string { +func (s *ShareLimitExceededException) Code() string { return "ShareLimitExceededException" } // Message returns the exception's message. -func (s ShareLimitExceededException) Message() string { +func (s *ShareLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12814,22 +12814,22 @@ func (s ShareLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ShareLimitExceededException) OrigErr() error { +func (s *ShareLimitExceededException) OrigErr() error { return nil } -func (s ShareLimitExceededException) Error() string { +func (s *ShareLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ShareLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ShareLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ShareLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ShareLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Identifier that contains details about the directory consumer account. @@ -13065,8 +13065,8 @@ func (s *Snapshot) SetType(v string) *Snapshot { // You can use the GetSnapshotLimits operation to determine the snapshot limits // for a directory. type SnapshotLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -13087,17 +13087,17 @@ func (s SnapshotLimitExceededException) GoString() string { func newErrorSnapshotLimitExceededException(v protocol.ResponseMetadata) error { return &SnapshotLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SnapshotLimitExceededException) Code() string { +func (s *SnapshotLimitExceededException) Code() string { return "SnapshotLimitExceededException" } // Message returns the exception's message. -func (s SnapshotLimitExceededException) Message() string { +func (s *SnapshotLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13105,22 +13105,22 @@ func (s SnapshotLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SnapshotLimitExceededException) OrigErr() error { +func (s *SnapshotLimitExceededException) OrigErr() error { return nil } -func (s SnapshotLimitExceededException) Error() string { +func (s *SnapshotLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s SnapshotLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SnapshotLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SnapshotLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *SnapshotLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Contains manual snapshot limit information for a directory. @@ -13337,8 +13337,8 @@ func (s *Tag) SetValue(v string) *Tag { // The maximum allowed number of tags was exceeded. type TagLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -13359,17 +13359,17 @@ func (s TagLimitExceededException) GoString() string { func newErrorTagLimitExceededException(v protocol.ResponseMetadata) error { return &TagLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagLimitExceededException) Code() string { +func (s *TagLimitExceededException) Code() string { return "TagLimitExceededException" } // Message returns the exception's message. -func (s TagLimitExceededException) Message() string { +func (s *TagLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13377,22 +13377,22 @@ func (s TagLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagLimitExceededException) OrigErr() error { +func (s *TagLimitExceededException) OrigErr() error { return nil } -func (s TagLimitExceededException) Error() string { +func (s *TagLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TagLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a trust relationship between an AWS Managed Microsoft AD directory @@ -13653,8 +13653,8 @@ func (s *UnshareTarget) SetType(v string) *UnshareTarget { // The operation is not supported. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -13675,17 +13675,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13693,22 +13693,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } // Updates a conditional forwarder. @@ -14020,8 +14020,8 @@ func (s *UpdateTrustOutput) SetTrustId(v string) *UpdateTrustOutput { // The user provided a username that does not exist in your directory. type UserDoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The descriptive message for the exception. Message_ *string `locationName:"Message" type:"string"` @@ -14042,17 +14042,17 @@ func (s UserDoesNotExistException) GoString() string { func newErrorUserDoesNotExistException(v protocol.ResponseMetadata) error { return &UserDoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserDoesNotExistException) Code() string { +func (s *UserDoesNotExistException) Code() string { return "UserDoesNotExistException" } // Message returns the exception's message. -func (s UserDoesNotExistException) Message() string { +func (s *UserDoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14060,22 +14060,22 @@ func (s UserDoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserDoesNotExistException) OrigErr() error { +func (s *UserDoesNotExistException) OrigErr() error { return nil } -func (s UserDoesNotExistException) Error() string { +func (s *UserDoesNotExistException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UserDoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserDoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserDoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserDoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // Initiates the verification of an existing trust relationship between an AWS diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go index 6182bf173f9..4ad17a35eda 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go @@ -833,8 +833,8 @@ func (s *CreateLifecyclePolicyOutput) SetPolicyId(v string) *CreateLifecyclePoli type CreateRule struct { _ struct{} `type:"structure"` - // The interval between snapshots. The supported values are 2, 3, 4, 6, 8, 12, - // and 24. + // The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, + // 12, and 24. // // Interval is a required field Interval *int64 `min:"1" type:"integer" required:"true"` @@ -1337,8 +1337,8 @@ func (s *GetLifecyclePolicyOutput) SetPolicy(v *LifecyclePolicy) *GetLifecyclePo // The service failed in an unexpected way. type InternalServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -1357,17 +1357,17 @@ func (s InternalServerException) GoString() string { func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerException) Code() string { +func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. -func (s InternalServerException) Message() string { +func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1375,28 +1375,28 @@ func (s InternalServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerException) OrigErr() error { +func (s *InternalServerException) OrigErr() error { return nil } -func (s InternalServerException) Error() string { +func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID } // Bad request. The request is missing required parameters or has invalid parameters. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -1421,17 +1421,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1439,22 +1439,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Detailed information about a lifecycle policy. @@ -1616,8 +1616,8 @@ func (s *LifecyclePolicySummary) SetTags(v map[string]*string) *LifecyclePolicyS // The request failed because a limit was exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -1639,17 +1639,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1657,22 +1657,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListTagsForResourceInput struct { @@ -1868,8 +1868,8 @@ func (s *PolicyDetails) SetTargetTags(v []*Tag) *PolicyDetails { // A requested resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -1894,17 +1894,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1912,22 +1912,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the retention rule for a lifecycle policy. You can retain snapshots 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 995fa6d5101..ea2ca2c3350 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 @@ -670,7 +670,7 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // relationship between two or more DynamoDB tables with the same table name // in the provided Regions. // -// This method only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) +// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. // // If you want to add a new replica table to a global table, each of the following @@ -693,6 +693,14 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // * The global secondary indexes must have the same hash key and sort key // (if present). // +// If local secondary indexes are specified, then the following conditions must +// also be met: +// +// * The local secondary indexes must have the same name. +// +// * The local secondary indexes must have the same hash key and sort key +// (if present). +// // Write capacity settings should be set consistently across your replica tables // and secondary indexes. DynamoDB strongly recommends enabling auto scaling // to manage the write capacity settings for all of your global tables replicas @@ -1839,8 +1847,10 @@ func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) ( // // Returns information about the specified global table. // -// This method only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) -// of global tables. +// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) +// of global tables. If you are using global tables Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) +// you can use DescribeTable (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html) +// instead. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1949,7 +1959,7 @@ func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTable // // Describes Region-specific settings for a global table. // -// This method only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) +// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2311,7 +2321,7 @@ func (c *DynamoDB) DescribeTableReplicaAutoScalingRequest(input *DescribeTableRe // // Describes auto scaling settings across replicas of the global table at once. // -// This method only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) +// This operation only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2912,7 +2922,7 @@ func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *r // // Lists all global tables that have a replica in the specified Region. // -// This method only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) +// This operation only applies to Version 2017.11.29 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html) // of global tables. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3325,9 +3335,15 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou // * PutItem in the AWS SDK for Ruby V2 (http://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem) // // When you add an item, the primary key attributes are the only required attributes. -// Attribute values cannot be null. String and Binary type attributes must have -// lengths greater than zero. Set type attributes cannot be empty. Requests -// with empty values will be rejected with a ValidationException exception. +// Attribute values cannot be null. +// +// Empty String and Binary attribute values are allowed. Attribute values of +// type String and Binary must have a length greater than zero if the attribute +// is used as a key attribute for a table or index. Set type attributes cannot +// be empty. +// +// Invalid Requests with empty values will be rejected with a ValidationException +// exception. // // To prevent a new item from replacing an existing item, use a conditional // expression that contains the attribute_not_exists function with the name @@ -5709,7 +5725,7 @@ func (c *DynamoDB) UpdateTableReplicaAutoScalingRequest(input *UpdateTableReplic // // Updates auto scaling settings on your global tables at once. // -// This method only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) +// This operation only applies to Version 2019.11.21 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) // of global tables. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6808,8 +6824,8 @@ func (s *BackupDetails) SetBackupType(v string) *BackupDetails { // There is another ongoing conflicting backup control plane operation on the // table. The backup is either being created, deleted or restored to a table. type BackupInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6826,17 +6842,17 @@ func (s BackupInUseException) GoString() string { func newErrorBackupInUseException(v protocol.ResponseMetadata) error { return &BackupInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BackupInUseException) Code() string { +func (s *BackupInUseException) Code() string { return "BackupInUseException" } // Message returns the exception's message. -func (s BackupInUseException) Message() string { +func (s *BackupInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6844,28 +6860,28 @@ func (s BackupInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BackupInUseException) OrigErr() error { +func (s *BackupInUseException) OrigErr() error { return nil } -func (s BackupInUseException) Error() string { +func (s *BackupInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BackupInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BackupInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BackupInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *BackupInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Backup not found for the given BackupARN. type BackupNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6882,17 +6898,17 @@ func (s BackupNotFoundException) GoString() string { func newErrorBackupNotFoundException(v protocol.ResponseMetadata) error { return &BackupNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BackupNotFoundException) Code() string { +func (s *BackupNotFoundException) Code() string { return "BackupNotFoundException" } // Message returns the exception's message. -func (s BackupNotFoundException) Message() string { +func (s *BackupNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6900,22 +6916,22 @@ func (s BackupNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BackupNotFoundException) OrigErr() error { +func (s *BackupNotFoundException) OrigErr() error { return nil } -func (s BackupNotFoundException) Error() string { +func (s *BackupNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BackupNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BackupNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BackupNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *BackupNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details for the backup. @@ -7818,8 +7834,8 @@ func (s *ConditionCheck) SetTableName(v string) *ConditionCheck { // A condition specified in the operation could not be evaluated. type ConditionalCheckFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The conditional request failed. Message_ *string `locationName:"message" type:"string"` @@ -7837,17 +7853,17 @@ func (s ConditionalCheckFailedException) GoString() string { func newErrorConditionalCheckFailedException(v protocol.ResponseMetadata) error { return &ConditionalCheckFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConditionalCheckFailedException) Code() string { +func (s *ConditionalCheckFailedException) Code() string { return "ConditionalCheckFailedException" } // Message returns the exception's message. -func (s ConditionalCheckFailedException) Message() string { +func (s *ConditionalCheckFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7855,22 +7871,22 @@ func (s ConditionalCheckFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConditionalCheckFailedException) OrigErr() error { +func (s *ConditionalCheckFailedException) OrigErr() error { return nil } -func (s ConditionalCheckFailedException) Error() string { +func (s *ConditionalCheckFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConditionalCheckFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConditionalCheckFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConditionalCheckFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConditionalCheckFailedException) RequestID() string { + return s.RespMetadata.RequestID } // The capacity units consumed by an operation. The data returned includes the @@ -7994,8 +8010,8 @@ func (s *ContinuousBackupsDescription) SetPointInTimeRecoveryDescription(v *Poin // Backups have not yet been enabled for this table. type ContinuousBackupsUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8012,17 +8028,17 @@ func (s ContinuousBackupsUnavailableException) GoString() string { func newErrorContinuousBackupsUnavailableException(v protocol.ResponseMetadata) error { return &ContinuousBackupsUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ContinuousBackupsUnavailableException) Code() string { +func (s *ContinuousBackupsUnavailableException) Code() string { return "ContinuousBackupsUnavailableException" } // Message returns the exception's message. -func (s ContinuousBackupsUnavailableException) Message() string { +func (s *ContinuousBackupsUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8030,22 +8046,22 @@ func (s ContinuousBackupsUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ContinuousBackupsUnavailableException) OrigErr() error { +func (s *ContinuousBackupsUnavailableException) OrigErr() error { return nil } -func (s ContinuousBackupsUnavailableException) Error() string { +func (s *ContinuousBackupsUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ContinuousBackupsUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ContinuousBackupsUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ContinuousBackupsUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ContinuousBackupsUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Represents a Contributor Insights summary entry.. @@ -11273,8 +11289,8 @@ func (s *GlobalTable) SetReplicationGroup(v []*Replica) *GlobalTable { // The specified global table already exists. type GlobalTableAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11291,17 +11307,17 @@ func (s GlobalTableAlreadyExistsException) GoString() string { func newErrorGlobalTableAlreadyExistsException(v protocol.ResponseMetadata) error { return &GlobalTableAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GlobalTableAlreadyExistsException) Code() string { +func (s *GlobalTableAlreadyExistsException) Code() string { return "GlobalTableAlreadyExistsException" } // Message returns the exception's message. -func (s GlobalTableAlreadyExistsException) Message() string { +func (s *GlobalTableAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11309,22 +11325,22 @@ func (s GlobalTableAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GlobalTableAlreadyExistsException) OrigErr() error { +func (s *GlobalTableAlreadyExistsException) OrigErr() error { return nil } -func (s GlobalTableAlreadyExistsException) Error() string { +func (s *GlobalTableAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GlobalTableAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GlobalTableAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GlobalTableAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *GlobalTableAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about the global table. @@ -11469,8 +11485,8 @@ func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapac // The specified global table does not exist. type GlobalTableNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11487,17 +11503,17 @@ func (s GlobalTableNotFoundException) GoString() string { func newErrorGlobalTableNotFoundException(v protocol.ResponseMetadata) error { return &GlobalTableNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GlobalTableNotFoundException) Code() string { +func (s *GlobalTableNotFoundException) Code() string { return "GlobalTableNotFoundException" } // Message returns the exception's message. -func (s GlobalTableNotFoundException) Message() string { +func (s *GlobalTableNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11505,29 +11521,29 @@ func (s GlobalTableNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GlobalTableNotFoundException) OrigErr() error { +func (s *GlobalTableNotFoundException) OrigErr() error { return nil } -func (s GlobalTableNotFoundException) Error() string { +func (s *GlobalTableNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GlobalTableNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GlobalTableNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GlobalTableNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *GlobalTableNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // DynamoDB rejected the request because you retried a request with a different // payload but with an idempotent token that was already used. type IdempotentParameterMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -11544,17 +11560,17 @@ func (s IdempotentParameterMismatchException) GoString() string { func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotentParameterMismatchException) Code() string { +func (s *IdempotentParameterMismatchException) Code() string { return "IdempotentParameterMismatchException" } // Message returns the exception's message. -func (s IdempotentParameterMismatchException) Message() string { +func (s *IdempotentParameterMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11562,28 +11578,28 @@ func (s IdempotentParameterMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotentParameterMismatchException) OrigErr() error { +func (s *IdempotentParameterMismatchException) OrigErr() error { return nil } -func (s IdempotentParameterMismatchException) Error() string { +func (s *IdempotentParameterMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotentParameterMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotentParameterMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotentParameterMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotentParameterMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // The operation tried to access a nonexistent index. type IndexNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11600,17 +11616,17 @@ func (s IndexNotFoundException) GoString() string { func newErrorIndexNotFoundException(v protocol.ResponseMetadata) error { return &IndexNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IndexNotFoundException) Code() string { +func (s *IndexNotFoundException) Code() string { return "IndexNotFoundException" } // Message returns the exception's message. -func (s IndexNotFoundException) Message() string { +func (s *IndexNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11618,28 +11634,28 @@ func (s IndexNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IndexNotFoundException) OrigErr() error { +func (s *IndexNotFoundException) OrigErr() error { return nil } -func (s IndexNotFoundException) Error() string { +func (s *IndexNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IndexNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IndexNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IndexNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *IndexNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An error occurred on the server side. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The server encountered an internal error trying to fulfill the request. Message_ *string `locationName:"message" type:"string"` @@ -11657,17 +11673,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11675,29 +11691,29 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime // and LatestRestorableDateTime. type InvalidRestoreTimeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11714,17 +11730,17 @@ func (s InvalidRestoreTimeException) GoString() string { func newErrorInvalidRestoreTimeException(v protocol.ResponseMetadata) error { return &InvalidRestoreTimeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRestoreTimeException) Code() string { +func (s *InvalidRestoreTimeException) Code() string { return "InvalidRestoreTimeException" } // Message returns the exception's message. -func (s InvalidRestoreTimeException) Message() string { +func (s *InvalidRestoreTimeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11732,22 +11748,22 @@ func (s InvalidRestoreTimeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRestoreTimeException) OrigErr() error { +func (s *InvalidRestoreTimeException) OrigErr() error { return nil } -func (s InvalidRestoreTimeException) Error() string { +func (s *InvalidRestoreTimeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRestoreTimeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRestoreTimeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRestoreTimeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRestoreTimeException) RequestID() string { + return s.RespMetadata.RequestID } // Information about item collections, if any, that were affected by the operation. @@ -11798,8 +11814,8 @@ func (s *ItemCollectionMetrics) SetSizeEstimateRangeGB(v []*float64) *ItemCollec // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. type ItemCollectionSizeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The total size of an item collection has exceeded the maximum limit of 10 // gigabytes. @@ -11818,17 +11834,17 @@ func (s ItemCollectionSizeLimitExceededException) GoString() string { func newErrorItemCollectionSizeLimitExceededException(v protocol.ResponseMetadata) error { return &ItemCollectionSizeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ItemCollectionSizeLimitExceededException) Code() string { +func (s *ItemCollectionSizeLimitExceededException) Code() string { return "ItemCollectionSizeLimitExceededException" } // Message returns the exception's message. -func (s ItemCollectionSizeLimitExceededException) Message() string { +func (s *ItemCollectionSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11836,22 +11852,22 @@ func (s ItemCollectionSizeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ItemCollectionSizeLimitExceededException) OrigErr() error { +func (s *ItemCollectionSizeLimitExceededException) OrigErr() error { return nil } -func (s ItemCollectionSizeLimitExceededException) Error() string { +func (s *ItemCollectionSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ItemCollectionSizeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ItemCollectionSizeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ItemCollectionSizeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ItemCollectionSizeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Details for the requested item. @@ -12104,8 +12120,8 @@ func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes // // There is a soft account limit of 256 tables. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Too many operations for a given subscriber. Message_ *string `locationName:"message" type:"string"` @@ -12123,17 +12139,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12141,22 +12157,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListBackupsInput struct { @@ -13006,8 +13022,8 @@ func (s *PointInTimeRecoverySpecification) SetPointInTimeRecoveryEnabled(v bool) // Point in time recovery has not yet been enabled for this source table. type PointInTimeRecoveryUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13024,17 +13040,17 @@ func (s PointInTimeRecoveryUnavailableException) GoString() string { func newErrorPointInTimeRecoveryUnavailableException(v protocol.ResponseMetadata) error { return &PointInTimeRecoveryUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PointInTimeRecoveryUnavailableException) Code() string { +func (s *PointInTimeRecoveryUnavailableException) Code() string { return "PointInTimeRecoveryUnavailableException" } // Message returns the exception's message. -func (s PointInTimeRecoveryUnavailableException) Message() string { +func (s *PointInTimeRecoveryUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13042,22 +13058,22 @@ func (s PointInTimeRecoveryUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PointInTimeRecoveryUnavailableException) OrigErr() error { +func (s *PointInTimeRecoveryUnavailableException) OrigErr() error { return nil } -func (s PointInTimeRecoveryUnavailableException) Error() string { +func (s *PointInTimeRecoveryUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PointInTimeRecoveryUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PointInTimeRecoveryUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PointInTimeRecoveryUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *PointInTimeRecoveryUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Represents attributes that are copied (projected) from the table into an @@ -13269,8 +13285,8 @@ func (s *ProvisionedThroughputDescription) SetWriteCapacityUnits(v int64) *Provi // Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) // in the Amazon DynamoDB Developer Guide. type ProvisionedThroughputExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You exceeded your maximum allowed provisioned throughput. Message_ *string `locationName:"message" type:"string"` @@ -13288,17 +13304,17 @@ func (s ProvisionedThroughputExceededException) GoString() string { func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { return &ProvisionedThroughputExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ProvisionedThroughputExceededException) Code() string { +func (s *ProvisionedThroughputExceededException) Code() string { return "ProvisionedThroughputExceededException" } // Message returns the exception's message. -func (s ProvisionedThroughputExceededException) Message() string { +func (s *ProvisionedThroughputExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13306,22 +13322,22 @@ func (s ProvisionedThroughputExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ProvisionedThroughputExceededException) OrigErr() error { +func (s *ProvisionedThroughputExceededException) OrigErr() error { return nil } -func (s ProvisionedThroughputExceededException) Error() string { +func (s *ProvisionedThroughputExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ProvisionedThroughputExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ProvisionedThroughputExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ProvisionedThroughputExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ProvisionedThroughputExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Replica-specific provisioned throughput settings. If not specified, uses @@ -13564,6 +13580,10 @@ type PutItemInput struct { // types for those attributes must match those of the schema in the table's // attribute definition. // + // Empty String and Binary attribute values are allowed. Attribute values of + // type String and Binary must have a length greater than zero if the attribute + // is used as a key attribute for a table or index. + // // For more information about primary keys, see Primary Key (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey) // in the Amazon DynamoDB Developer Guide. // @@ -14360,8 +14380,8 @@ func (s *Replica) SetRegionName(v string) *Replica { // The specified replica is already part of the global table. type ReplicaAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14378,17 +14398,17 @@ func (s ReplicaAlreadyExistsException) GoString() string { func newErrorReplicaAlreadyExistsException(v protocol.ResponseMetadata) error { return &ReplicaAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReplicaAlreadyExistsException) Code() string { +func (s *ReplicaAlreadyExistsException) Code() string { return "ReplicaAlreadyExistsException" } // Message returns the exception's message. -func (s ReplicaAlreadyExistsException) Message() string { +func (s *ReplicaAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14396,22 +14416,22 @@ func (s ReplicaAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReplicaAlreadyExistsException) OrigErr() error { +func (s *ReplicaAlreadyExistsException) OrigErr() error { return nil } -func (s ReplicaAlreadyExistsException) Error() string { +func (s *ReplicaAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReplicaAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReplicaAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReplicaAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReplicaAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the auto scaling settings of the replica. @@ -15010,8 +15030,8 @@ func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUn // The specified replica is no longer part of the global table. type ReplicaNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15028,17 +15048,17 @@ func (s ReplicaNotFoundException) GoString() string { func newErrorReplicaNotFoundException(v protocol.ResponseMetadata) error { return &ReplicaNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReplicaNotFoundException) Code() string { +func (s *ReplicaNotFoundException) Code() string { return "ReplicaNotFoundException" } // Message returns the exception's message. -func (s ReplicaNotFoundException) Message() string { +func (s *ReplicaNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15046,22 +15066,22 @@ func (s ReplicaNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReplicaNotFoundException) OrigErr() error { +func (s *ReplicaNotFoundException) OrigErr() error { return nil } -func (s ReplicaNotFoundException) Error() string { +func (s *ReplicaNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReplicaNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReplicaNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReplicaNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReplicaNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the properties of a replica. @@ -15400,8 +15420,8 @@ func (s *ReplicationGroupUpdate) SetUpdate(v *UpdateReplicationGroupMemberAction // contact AWS Support at AWS Support (https://aws.amazon.com/support) to request // a limit increase. type RequestLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15418,17 +15438,17 @@ func (s RequestLimitExceeded) GoString() string { func newErrorRequestLimitExceeded(v protocol.ResponseMetadata) error { return &RequestLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestLimitExceeded) Code() string { +func (s *RequestLimitExceeded) Code() string { return "RequestLimitExceeded" } // Message returns the exception's message. -func (s RequestLimitExceeded) Message() string { +func (s *RequestLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15436,30 +15456,30 @@ func (s RequestLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestLimitExceeded) OrigErr() error { +func (s *RequestLimitExceeded) OrigErr() error { return nil } -func (s RequestLimitExceeded) Error() string { +func (s *RequestLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // The operation conflicts with the resource's availability. For example, you // attempted to recreate an existing table, or tried to delete a table currently // in the CREATING state. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The resource which is being attempted to be changed is in use. Message_ *string `locationName:"message" type:"string"` @@ -15477,17 +15497,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15495,29 +15515,29 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The resource which is being requested does not exist. Message_ *string `locationName:"message" type:"string"` @@ -15535,17 +15555,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15553,22 +15573,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details for the restore. @@ -16792,8 +16812,8 @@ func (s *StreamSpecification) SetStreamViewType(v string) *StreamSpecification { // A target table with the specified name already exists. type TableAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16810,17 +16830,17 @@ func (s TableAlreadyExistsException) GoString() string { func newErrorTableAlreadyExistsException(v protocol.ResponseMetadata) error { return &TableAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TableAlreadyExistsException) Code() string { +func (s *TableAlreadyExistsException) Code() string { return "TableAlreadyExistsException" } // Message returns the exception's message. -func (s TableAlreadyExistsException) Message() string { +func (s *TableAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16828,22 +16848,22 @@ func (s TableAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TableAlreadyExistsException) OrigErr() error { +func (s *TableAlreadyExistsException) OrigErr() error { return nil } -func (s TableAlreadyExistsException) Error() string { +func (s *TableAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TableAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TableAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TableAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TableAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the auto scaling configuration for a global table. @@ -17246,8 +17266,8 @@ func (s *TableDescription) SetTableStatus(v string) *TableDescription { // A target table with the specified name is either being created or deleted. type TableInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17264,17 +17284,17 @@ func (s TableInUseException) GoString() string { func newErrorTableInUseException(v protocol.ResponseMetadata) error { return &TableInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TableInUseException) Code() string { +func (s *TableInUseException) Code() string { return "TableInUseException" } // Message returns the exception's message. -func (s TableInUseException) Message() string { +func (s *TableInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17282,29 +17302,29 @@ func (s TableInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TableInUseException) OrigErr() error { +func (s *TableInUseException) OrigErr() error { return nil } -func (s TableInUseException) Error() string { +func (s *TableInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TableInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TableInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TableInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *TableInUseException) RequestID() string { + return s.RespMetadata.RequestID } // A source table with the name TableName does not currently exist within the // subscriber's account. type TableNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17321,17 +17341,17 @@ func (s TableNotFoundException) GoString() string { func newErrorTableNotFoundException(v protocol.ResponseMetadata) error { return &TableNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TableNotFoundException) Code() string { +func (s *TableNotFoundException) Code() string { return "TableNotFoundException" } // Message returns the exception's message. -func (s TableNotFoundException) Message() string { +func (s *TableNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17339,22 +17359,22 @@ func (s TableNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TableNotFoundException) OrigErr() error { +func (s *TableNotFoundException) OrigErr() error { return nil } -func (s TableNotFoundException) Error() string { +func (s *TableNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TableNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TableNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TableNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *TableNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a tag. A tag is a key-value pair. You can add up to 50 tags to @@ -18070,8 +18090,8 @@ func (s *TransactWriteItemsOutput) SetItemCollectionMetrics(v map[string][]*Item // The provided expression refers to an attribute that does not exist in // the item. type TransactionCanceledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A list of cancellation reasons. CancellationReasons []*CancellationReason `min:"1" type:"list"` @@ -18091,17 +18111,17 @@ func (s TransactionCanceledException) GoString() string { func newErrorTransactionCanceledException(v protocol.ResponseMetadata) error { return &TransactionCanceledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TransactionCanceledException) Code() string { +func (s *TransactionCanceledException) Code() string { return "TransactionCanceledException" } // Message returns the exception's message. -func (s TransactionCanceledException) Message() string { +func (s *TransactionCanceledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18109,28 +18129,28 @@ func (s TransactionCanceledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TransactionCanceledException) OrigErr() error { +func (s *TransactionCanceledException) OrigErr() error { return nil } -func (s TransactionCanceledException) Error() string { +func (s *TransactionCanceledException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TransactionCanceledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TransactionCanceledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TransactionCanceledException) RequestID() string { - return s.respMetadata.RequestID +func (s *TransactionCanceledException) RequestID() string { + return s.RespMetadata.RequestID } // Operation was rejected because there is an ongoing transaction for the item. type TransactionConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18147,17 +18167,17 @@ func (s TransactionConflictException) GoString() string { func newErrorTransactionConflictException(v protocol.ResponseMetadata) error { return &TransactionConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TransactionConflictException) Code() string { +func (s *TransactionConflictException) Code() string { return "TransactionConflictException" } // Message returns the exception's message. -func (s TransactionConflictException) Message() string { +func (s *TransactionConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18165,28 +18185,28 @@ func (s TransactionConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TransactionConflictException) OrigErr() error { +func (s *TransactionConflictException) OrigErr() error { return nil } -func (s TransactionConflictException) Error() string { +func (s *TransactionConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TransactionConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TransactionConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TransactionConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *TransactionConflictException) RequestID() string { + return s.RespMetadata.RequestID } // The transaction with the given request token is already in progress. type TransactionInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18203,17 +18223,17 @@ func (s TransactionInProgressException) GoString() string { func newErrorTransactionInProgressException(v protocol.ResponseMetadata) error { return &TransactionInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TransactionInProgressException) Code() string { +func (s *TransactionInProgressException) Code() string { return "TransactionInProgressException" } // Message returns the exception's message. -func (s TransactionInProgressException) Message() string { +func (s *TransactionInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18221,22 +18241,22 @@ func (s TransactionInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TransactionInProgressException) OrigErr() error { +func (s *TransactionInProgressException) OrigErr() error { return nil } -func (s TransactionInProgressException) Error() string { +func (s *TransactionInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TransactionInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TransactionInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TransactionInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *TransactionInProgressException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 cfcfb3e6c09..12e7f421b12 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 @@ -4678,6 +4678,8 @@ func (c *EC2) CreateLaunchTemplateRequest(input *CreateLaunchTemplateInput) (req // Creates a launch template. A launch template contains the parameters to launch // an instance. When you launch an instance using RunInstances, you can specify // a launch template instead of providing the launch parameters in the request. +// For more information, see Launching an instance from a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html)in +// the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4757,6 +4759,9 @@ func (c *EC2) CreateLaunchTemplateVersionRequest(input *CreateLaunchTemplateVers // Launch template versions are numbered in the order in which they are created. // You cannot specify, change, or replace the numbering of launch template versions. // +// For more information, see Managing launch template versions (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions)in +// the Amazon Elastic Compute Cloud User Guide. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -5377,7 +5382,6 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req output = &CreatePlacementGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11235,9 +11239,13 @@ func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req * // your VPN connection have been compromised, you can delete the VPN connection // and create a new one that has new keys, without needing to delete the VPC // or virtual private gateway. If you create a new VPN connection, you must -// reconfigure the customer gateway using the new configuration information +// reconfigure the customer gateway device using the new configuration information // returned with the new VPN connection ID. // +// For certificate-based authentication, delete all AWS Certificate Manager +// (ACM) private certificates used for the AWS-side tunnel endpoints for the +// VPN connection before deleting the VPN connection. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -11585,6 +11593,81 @@ func (c *EC2) DeregisterImageWithContext(ctx aws.Context, input *DeregisterImage return out, req.Send() } +const opDeregisterInstanceEventNotificationAttributes = "DeregisterInstanceEventNotificationAttributes" + +// DeregisterInstanceEventNotificationAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterInstanceEventNotificationAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterInstanceEventNotificationAttributes for more information on using the DeregisterInstanceEventNotificationAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterInstanceEventNotificationAttributesRequest method. +// req, resp := client.DeregisterInstanceEventNotificationAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterInstanceEventNotificationAttributes +func (c *EC2) DeregisterInstanceEventNotificationAttributesRequest(input *DeregisterInstanceEventNotificationAttributesInput) (req *request.Request, output *DeregisterInstanceEventNotificationAttributesOutput) { + op := &request.Operation{ + Name: opDeregisterInstanceEventNotificationAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeregisterInstanceEventNotificationAttributesInput{} + } + + output = &DeregisterInstanceEventNotificationAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeregisterInstanceEventNotificationAttributes API operation for Amazon Elastic Compute Cloud. +// +// Deregisters tag keys to prevent tags that have the specified tag keys from +// being included in scheduled event notifications for resources in the 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 Amazon Elastic Compute Cloud's +// API operation DeregisterInstanceEventNotificationAttributes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterInstanceEventNotificationAttributes +func (c *EC2) DeregisterInstanceEventNotificationAttributes(input *DeregisterInstanceEventNotificationAttributesInput) (*DeregisterInstanceEventNotificationAttributesOutput, error) { + req, out := c.DeregisterInstanceEventNotificationAttributesRequest(input) + return out, req.Send() +} + +// DeregisterInstanceEventNotificationAttributesWithContext is the same as DeregisterInstanceEventNotificationAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterInstanceEventNotificationAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeregisterInstanceEventNotificationAttributesWithContext(ctx aws.Context, input *DeregisterInstanceEventNotificationAttributesInput, opts ...request.Option) (*DeregisterInstanceEventNotificationAttributesOutput, error) { + req, out := c.DeregisterInstanceEventNotificationAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeregisterTransitGatewayMulticastGroupMembers = "DeregisterTransitGatewayMulticastGroupMembers" // DeregisterTransitGatewayMulticastGroupMembersRequest generates a "aws/request.Request" representing the @@ -16194,6 +16277,81 @@ func (c *EC2) DescribeInstanceCreditSpecificationsPagesWithContext(ctx aws.Conte return p.Err() } +const opDescribeInstanceEventNotificationAttributes = "DescribeInstanceEventNotificationAttributes" + +// DescribeInstanceEventNotificationAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInstanceEventNotificationAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInstanceEventNotificationAttributes for more information on using the DescribeInstanceEventNotificationAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInstanceEventNotificationAttributesRequest method. +// req, resp := client.DescribeInstanceEventNotificationAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceEventNotificationAttributes +func (c *EC2) DescribeInstanceEventNotificationAttributesRequest(input *DescribeInstanceEventNotificationAttributesInput) (req *request.Request, output *DescribeInstanceEventNotificationAttributesOutput) { + op := &request.Operation{ + Name: opDescribeInstanceEventNotificationAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeInstanceEventNotificationAttributesInput{} + } + + output = &DescribeInstanceEventNotificationAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInstanceEventNotificationAttributes API operation for Amazon Elastic Compute Cloud. +// +// Describes the tag keys that are registered to appear in scheduled event notifications +// for resources in the current 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 Amazon Elastic Compute Cloud's +// API operation DescribeInstanceEventNotificationAttributes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceEventNotificationAttributes +func (c *EC2) DescribeInstanceEventNotificationAttributes(input *DescribeInstanceEventNotificationAttributesInput) (*DescribeInstanceEventNotificationAttributesOutput, error) { + req, out := c.DescribeInstanceEventNotificationAttributesRequest(input) + return out, req.Send() +} + +// DescribeInstanceEventNotificationAttributesWithContext is the same as DescribeInstanceEventNotificationAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInstanceEventNotificationAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeInstanceEventNotificationAttributesWithContext(ctx aws.Context, input *DescribeInstanceEventNotificationAttributesInput, opts ...request.Option) (*DescribeInstanceEventNotificationAttributesOutput, error) { + req, out := c.DescribeInstanceEventNotificationAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeInstanceStatus = "DescribeInstanceStatus" // DescribeInstanceStatusRequest generates a "aws/request.Request" representing the @@ -21232,8 +21390,8 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // You can use DescribeSpotInstanceRequests to find a running Spot Instance // by examining the response. If the status of the Spot Instance is fulfilled, // the instance ID appears in the response and contains the identifier of the -// instance. Alternatively, you can use DescribeInstances with a filter to look -// for instances where the instance lifecycle is spot. +// instance. Alternatively, you can use DescribeInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances) +// with a filter to look for instances where the instance lifecycle is spot. // // We recommend that you set MaxResults to a value between 5 and 1000 to limit // the number of results returned. This paginates the output, which makes the @@ -25869,6 +26027,8 @@ func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLin // ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. // +// You must specify a VPC ID in the request. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -26185,7 +26345,7 @@ func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) // DisassociateRouteTable API operation for Amazon Elastic Compute Cloud. // -// Disassociates a subnet from a route table. +// Disassociates a subnet or gateway from a route table. // // After you perform this action, the subnet no longer uses the routes in the // route table. Instead, it uses the routes in the VPC's main route table. For @@ -27055,6 +27215,8 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkD // see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. // +// You must specify a VPC ID in the request. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -27359,6 +27521,10 @@ func (c *EC2) ExportTransitGatewayRoutesRequest(input *ExportTransitGatewayRoute // S3 bucket. By default, all routes are exported. Alternatively, you can filter // by CIDR range. // +// The routes are saved to the specified bucket in a JSON file. For more information, +// see Export Route Tables to Amazon S3 (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-export-route-tables) +// in Transit Gateways. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -29439,8 +29605,10 @@ func (c *EC2) ModifyAvailabilityZoneGroupRequest(input *ModifyAvailabilityZoneGr // ModifyAvailabilityZoneGroup API operation for Amazon Elastic Compute Cloud. // -// Enables or disables a Zone Group for your account. To use Local Zones, you -// must first enable the Zone Group. +// Enables or disables an Availability Zone group for your account. +// +// Use describe-availability-zones (https://docs.aws.amazon.com/AWSEC2ApiDocReef/build/server-root/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) +// to view the value for GroupName. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -32439,8 +32607,9 @@ func (c *EC2) ModifyVpnConnectionRequest(input *ModifyVpnConnectionInput) (req * // ModifyVpnConnection API operation for Amazon Elastic Compute Cloud. // -// Modifies the target gateway of an AWS Site-to-Site VPN connection. The following -// migration options are available: +// Modifies the customer gateway or the target gateway of an AWS Site-to-Site +// VPN connection. To modify the target gateway, the following migration options +// are available: // // * An existing virtual private gateway to a new virtual private gateway // @@ -33357,6 +33526,83 @@ func (c *EC2) RegisterImageWithContext(ctx aws.Context, input *RegisterImageInpu return out, req.Send() } +const opRegisterInstanceEventNotificationAttributes = "RegisterInstanceEventNotificationAttributes" + +// RegisterInstanceEventNotificationAttributesRequest generates a "aws/request.Request" representing the +// client's request for the RegisterInstanceEventNotificationAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterInstanceEventNotificationAttributes for more information on using the RegisterInstanceEventNotificationAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterInstanceEventNotificationAttributesRequest method. +// req, resp := client.RegisterInstanceEventNotificationAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterInstanceEventNotificationAttributes +func (c *EC2) RegisterInstanceEventNotificationAttributesRequest(input *RegisterInstanceEventNotificationAttributesInput) (req *request.Request, output *RegisterInstanceEventNotificationAttributesOutput) { + op := &request.Operation{ + Name: opRegisterInstanceEventNotificationAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterInstanceEventNotificationAttributesInput{} + } + + output = &RegisterInstanceEventNotificationAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterInstanceEventNotificationAttributes API operation for Amazon Elastic Compute Cloud. +// +// Registers a set of tag keys to include in scheduled event notifications for +// your resources. +// +// To remove tags, use . +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation RegisterInstanceEventNotificationAttributes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterInstanceEventNotificationAttributes +func (c *EC2) RegisterInstanceEventNotificationAttributes(input *RegisterInstanceEventNotificationAttributesInput) (*RegisterInstanceEventNotificationAttributesOutput, error) { + req, out := c.RegisterInstanceEventNotificationAttributesRequest(input) + return out, req.Send() +} + +// RegisterInstanceEventNotificationAttributesWithContext is the same as RegisterInstanceEventNotificationAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterInstanceEventNotificationAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) RegisterInstanceEventNotificationAttributesWithContext(ctx aws.Context, input *RegisterInstanceEventNotificationAttributesInput, opts ...request.Option) (*RegisterInstanceEventNotificationAttributesOutput, error) { + req, out := c.RegisterInstanceEventNotificationAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRegisterTransitGatewayMulticastGroupMembers = "RegisterTransitGatewayMulticastGroupMembers" // RegisterTransitGatewayMulticastGroupMembersRequest generates a "aws/request.Request" representing the @@ -34618,9 +34864,9 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // ensuring that the Spot Instances in your Spot Fleet are in different Spot // pools, you can improve the availability of your fleet. // -// You can specify tags for the Spot Fleet and Spot Instances. You cannot tag -// other resource types in a Spot Fleet request because only the spot-fleet-request -// and instance resource types are supported. +// You can specify tags for the Spot Fleet request and instances launched by +// the fleet. You cannot tag other resource types in a Spot Fleet request because +// only the spot-fleet-request and instance resource types are supported. // // For more information, see Spot Fleet Requests (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) // in the Amazon EC2 User Guide for Linux Instances. @@ -36411,9 +36657,10 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ // your Linux instance, Amazon EC2 charges a one-minute minimum for instance // usage, and thereafter charges per second for instance usage. // -// You can't hibernate Spot Instances, and you can't stop or hibernate instance -// store-backed instances. For information about using hibernation for Spot -// Instances, see Hibernating Interrupted Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances) +// You can't stop or hibernate instance store-backed instances. You can't use +// the Stop action to hibernate Spot Instances, but you can specify that Amazon +// EC2 should hibernate Spot Instances when they are interrupted. For more information, +// see Hibernating Interrupted Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances) // in the Amazon Elastic Compute Cloud User Guide. // // When you stop or hibernate an instance, we shut it down. You can restart @@ -37837,7 +38084,11 @@ type AllocateAddressInput struct { // The location from which the IP address is advertised. Use this parameter // to limit the address to this location. // - // Use DescribeVpcs (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html) + // A network border group is a unique set of Availability Zones or Local Zones + // from where AWS advertises IP addresses and limits the addresses to the group. + // IP addresses cannot move between network border groups. + // + // Use DescribeAvailabilityZones (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) // to view the network border groups. // // You cannot use a network border group with EC2 Classic. If you attempt this @@ -39988,7 +40239,8 @@ func (s *AuthorizationRule) SetStatus(v *ClientVpnAuthorizationRuleStatus) *Auth type AuthorizeClientVpnIngressInput struct { _ struct{} `type:"structure"` - // The ID of the Active Directory group to grant access. + // The ID of the group to grant access to, for example, the Active Directory + // group or identity provider (IdP) group. AccessGroupId *string `type:"string"` // Indicates whether to grant access to all clients. Use true to grant all clients @@ -42471,9 +42723,8 @@ func (s *ClientData) SetUploadStart(v time.Time) *ClientData { return s } -// Describes the authentication methods used by a Client VPN endpoint. Client -// VPN supports Active Directory and mutual authentication. For more information, -// see Authentication (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) +// Describes the authentication methods used by a Client VPN endpoint. For more +// information, see Authentication (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) // in the AWS Client VPN Administrator Guide. type ClientVpnAuthentication struct { _ struct{} `type:"structure"` @@ -42481,6 +42732,9 @@ type ClientVpnAuthentication struct { // Information about the Active Directory, if applicable. ActiveDirectory *DirectoryServiceAuthentication `locationName:"activeDirectory" type:"structure"` + // Information about the IAM SAML identity provider, if applicable. + FederatedAuthentication *FederatedAuthentication `locationName:"federatedAuthentication" type:"structure"` + // Information about the authentication certificates, if applicable. MutualAuthentication *CertificateAuthentication `locationName:"mutualAuthentication" type:"structure"` @@ -42504,6 +42758,12 @@ func (s *ClientVpnAuthentication) SetActiveDirectory(v *DirectoryServiceAuthenti return s } +// SetFederatedAuthentication sets the FederatedAuthentication field's value. +func (s *ClientVpnAuthentication) SetFederatedAuthentication(v *FederatedAuthentication) *ClientVpnAuthentication { + s.FederatedAuthentication = v + return s +} + // SetMutualAuthentication sets the MutualAuthentication field's value. func (s *ClientVpnAuthentication) SetMutualAuthentication(v *CertificateAuthentication) *ClientVpnAuthentication { s.MutualAuthentication = v @@ -42517,8 +42777,7 @@ func (s *ClientVpnAuthentication) SetType(v string) *ClientVpnAuthentication { } // Describes the authentication method to be used by a Client VPN endpoint. -// Client VPN supports Active Directory and mutual authentication. For more -// information, see Authentication (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) +// For more information, see Authentication (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) // in the AWS Client VPN Administrator Guide. type ClientVpnAuthenticationRequest struct { _ struct{} `type:"structure"` @@ -42527,13 +42786,15 @@ type ClientVpnAuthenticationRequest struct { // provide this information if Type is directory-service-authentication. ActiveDirectory *DirectoryServiceAuthenticationRequest `type:"structure"` + // Information about the IAM SAML identity provider to be used, if applicable. + // You must provide this information if Type is federated-authentication. + FederatedAuthentication *FederatedAuthenticationRequest `type:"structure"` + // Information about the authentication certificates to be used, if applicable. // You must provide this information if Type is certificate-authentication. MutualAuthentication *CertificateAuthenticationRequest `type:"structure"` - // The type of client authentication to be used. Specify certificate-authentication - // to use certificate-based authentication, or directory-service-authentication - // to use Active Directory authentication. + // The type of client authentication to be used. Type *string `type:"string" enum:"ClientVpnAuthenticationType"` } @@ -42553,6 +42814,12 @@ func (s *ClientVpnAuthenticationRequest) SetActiveDirectory(v *DirectoryServiceA return s } +// SetFederatedAuthentication sets the FederatedAuthentication field's value. +func (s *ClientVpnAuthenticationRequest) SetFederatedAuthentication(v *FederatedAuthenticationRequest) *ClientVpnAuthenticationRequest { + s.FederatedAuthentication = v + return s +} + // SetMutualAuthentication sets the MutualAuthentication field's value. func (s *ClientVpnAuthenticationRequest) SetMutualAuthentication(v *CertificateAuthenticationRequest) *ClientVpnAuthenticationRequest { s.MutualAuthentication = v @@ -45546,8 +45813,6 @@ type CreateFlowLogsInput struct { // // Specify the fields using the ${field-id} format, separated by spaces. For // the AWS CLI, use single quotation marks (' ') to surround the parameter value. - // - // Only applicable to flow logs that are published to an Amazon S3 bucket. LogFormat *string `type:"string"` // The name of a new or existing CloudWatch Logs log group where Amazon EC2 @@ -46140,6 +46405,9 @@ type CreateKeyPairInput struct { // // KeyName is a required field KeyName *string `type:"string" required:"true"` + + // The tags to apply to the new key pair. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -46177,6 +46445,12 @@ func (s *CreateKeyPairInput) SetKeyName(v string) *CreateKeyPairInput { return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateKeyPairInput) SetTagSpecifications(v []*TagSpecification) *CreateKeyPairInput { + s.TagSpecifications = v + return s +} + // Describes a key pair. type CreateKeyPairOutput struct { _ struct{} `type:"structure"` @@ -46192,6 +46466,9 @@ type CreateKeyPairOutput struct { // The ID of the key pair. KeyPairId *string `locationName:"keyPairId" type:"string"` + + // Any tags applied to the key pair. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -46228,6 +46505,12 @@ func (s *CreateKeyPairOutput) SetKeyPairId(v string) *CreateKeyPairOutput { return s } +// SetTags sets the Tags field's value. +func (s *CreateKeyPairOutput) SetTags(v []*Tag) *CreateKeyPairOutput { + s.Tags = v + return s +} + type CreateLaunchTemplateInput struct { _ struct{} `type:"structure"` @@ -46335,6 +46618,11 @@ type CreateLaunchTemplateOutput struct { // Information about the launch template. LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` + + // If the launch template contains parameters or parameter combinations that + // are not valid, an error code and an error message are returned for each issue + // that's found. + Warning *ValidationWarning `locationName:"warning" type:"structure"` } // String returns the string representation @@ -46353,6 +46641,12 @@ func (s *CreateLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *Creat return s } +// SetWarning sets the Warning field's value. +func (s *CreateLaunchTemplateOutput) SetWarning(v *ValidationWarning) *CreateLaunchTemplateOutput { + s.Warning = v + return s +} + type CreateLaunchTemplateVersionInput struct { _ struct{} `type:"structure"` @@ -46470,6 +46764,11 @@ type CreateLaunchTemplateVersionOutput struct { // Information about the launch template version. LaunchTemplateVersion *LaunchTemplateVersion `locationName:"launchTemplateVersion" type:"structure"` + + // If the new version of the launch template contains parameters or parameter + // combinations that are not valid, an error code and an error message are returned + // for each issue that's found. + Warning *ValidationWarning `locationName:"warning" type:"structure"` } // String returns the string representation @@ -46488,6 +46787,12 @@ func (s *CreateLaunchTemplateVersionOutput) SetLaunchTemplateVersion(v *LaunchTe return s } +// SetWarning sets the Warning field's value. +func (s *CreateLaunchTemplateVersionOutput) SetWarning(v *ValidationWarning) *CreateLaunchTemplateVersionOutput { + s.Warning = v + return s +} + type CreateLocalGatewayRouteInput struct { _ struct{} `type:"structure"` @@ -46604,6 +46909,9 @@ type CreateLocalGatewayRouteTableVpcAssociationInput struct { // LocalGatewayRouteTableId is a required field LocalGatewayRouteTableId *string `type:"string" required:"true"` + // The tags to assign to the local gateway route table VPC association. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + // The ID of the VPC. // // VpcId is a required field @@ -46648,6 +46956,12 @@ func (s *CreateLocalGatewayRouteTableVpcAssociationInput) SetLocalGatewayRouteTa return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateLocalGatewayRouteTableVpcAssociationInput) SetTagSpecifications(v []*TagSpecification) *CreateLocalGatewayRouteTableVpcAssociationInput { + s.TagSpecifications = v + return s +} + // SetVpcId sets the VpcId field's value. func (s *CreateLocalGatewayRouteTableVpcAssociationInput) SetVpcId(v string) *CreateLocalGatewayRouteTableVpcAssociationInput { s.VpcId = &v @@ -47332,6 +47646,9 @@ type CreatePlacementGroupInput struct { // The placement strategy. Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` + + // The tags to apply to the new placement group. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -47368,8 +47685,17 @@ func (s *CreatePlacementGroupInput) SetStrategy(v string) *CreatePlacementGroupI return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreatePlacementGroupInput) SetTagSpecifications(v []*TagSpecification) *CreatePlacementGroupInput { + s.TagSpecifications = v + return s +} + type CreatePlacementGroupOutput struct { _ struct{} `type:"structure"` + + // Describes a placement group. + PlacementGroup *PlacementGroup `locationName:"placementGroup" type:"structure"` } // String returns the string representation @@ -47382,6 +47708,12 @@ func (s CreatePlacementGroupOutput) GoString() string { return s.String() } +// SetPlacementGroup sets the PlacementGroup field's value. +func (s *CreatePlacementGroupOutput) SetPlacementGroup(v *PlacementGroup) *CreatePlacementGroupOutput { + s.PlacementGroup = v + return s +} + // Contains the parameters for CreateReservedInstancesListing. type CreateReservedInstancesListingInput struct { _ struct{} `type:"structure"` @@ -48105,6 +48437,9 @@ type CreateSubnetInput struct { // for example us-west-2-lax-1a. For information about the Regions that support // Local Zones, see Available Regions (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions) // in the Amazon Elastic Compute Cloud User Guide. + // + // To create a subnet in an Outpost, set this value to the Availability Zone + // for the Outpost and specify the Outpost ARN. AvailabilityZone *string `type:"string"` // The AZ ID or the Local Zone ID of the subnet. @@ -48125,7 +48460,8 @@ type CreateSubnetInput struct { // must use a /64 prefix length. Ipv6CidrBlock *string `type:"string"` - // The Amazon Resource Name (ARN) of the Outpost. + // The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost + // ARN, you must also specify the Availability Zone of the Outpost subnet. OutpostArn *string `type:"string"` // The ID of the VPC. @@ -51661,9 +51997,10 @@ type DeleteKeyPairInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The name of the key pair. - // - // KeyName is a required field - KeyName *string `type:"string" required:"true"` + KeyName *string `type:"string"` + + // The ID of the key pair. + KeyPairId *string `type:"string"` } // String returns the string representation @@ -51676,19 +52013,6 @@ func (s DeleteKeyPairInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetDryRun sets the DryRun field's value. func (s *DeleteKeyPairInput) SetDryRun(v bool) *DeleteKeyPairInput { s.DryRun = &v @@ -51701,6 +52025,12 @@ func (s *DeleteKeyPairInput) SetKeyName(v string) *DeleteKeyPairInput { return s } +// SetKeyPairId sets the KeyPairId field's value. +func (s *DeleteKeyPairInput) SetKeyPairId(v string) *DeleteKeyPairInput { + s.KeyPairId = &v + return s +} + type DeleteKeyPairOutput struct { _ struct{} `type:"structure"` } @@ -54678,6 +55008,101 @@ func (s DeregisterImageOutput) GoString() string { return s.String() } +type DeregisterInstanceEventNotificationAttributesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Information about the tag keys to deregister. + InstanceTagAttribute *DeregisterInstanceTagAttributeRequest `type:"structure"` +} + +// String returns the string representation +func (s DeregisterInstanceEventNotificationAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterInstanceEventNotificationAttributesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DeregisterInstanceEventNotificationAttributesInput) SetDryRun(v bool) *DeregisterInstanceEventNotificationAttributesInput { + s.DryRun = &v + return s +} + +// SetInstanceTagAttribute sets the InstanceTagAttribute field's value. +func (s *DeregisterInstanceEventNotificationAttributesInput) SetInstanceTagAttribute(v *DeregisterInstanceTagAttributeRequest) *DeregisterInstanceEventNotificationAttributesInput { + s.InstanceTagAttribute = v + return s +} + +type DeregisterInstanceEventNotificationAttributesOutput struct { + _ struct{} `type:"structure"` + + // The resulting set of tag keys. + InstanceTagAttribute *InstanceTagNotificationAttribute `locationName:"instanceTagAttribute" type:"structure"` +} + +// String returns the string representation +func (s DeregisterInstanceEventNotificationAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterInstanceEventNotificationAttributesOutput) GoString() string { + return s.String() +} + +// SetInstanceTagAttribute sets the InstanceTagAttribute field's value. +func (s *DeregisterInstanceEventNotificationAttributesOutput) SetInstanceTagAttribute(v *InstanceTagNotificationAttribute) *DeregisterInstanceEventNotificationAttributesOutput { + s.InstanceTagAttribute = v + return s +} + +// Information about the tag keys to deregister for the current Region. You +// can either specify individual tag keys or deregister all tag keys in the +// current Region. You must specify either IncludeAllTagsOfInstance or InstanceTagKeys +// in the request +type DeregisterInstanceTagAttributeRequest struct { + _ struct{} `type:"structure"` + + // Indicates whether to deregister all tag keys in the current Region. Specify + // false to deregister all tag keys. + IncludeAllTagsOfInstance *bool `type:"boolean"` + + // Information about the tag keys to deregister. + InstanceTagKeys []*string `locationName:"InstanceTagKey" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DeregisterInstanceTagAttributeRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterInstanceTagAttributeRequest) GoString() string { + return s.String() +} + +// SetIncludeAllTagsOfInstance sets the IncludeAllTagsOfInstance field's value. +func (s *DeregisterInstanceTagAttributeRequest) SetIncludeAllTagsOfInstance(v bool) *DeregisterInstanceTagAttributeRequest { + s.IncludeAllTagsOfInstance = &v + return s +} + +// SetInstanceTagKeys sets the InstanceTagKeys field's value. +func (s *DeregisterInstanceTagAttributeRequest) SetInstanceTagKeys(v []*string) *DeregisterInstanceTagAttributeRequest { + s.InstanceTagKeys = v + return s +} + type DeregisterTransitGatewayMulticastGroupMembersInput struct { _ struct{} `type:"structure"` @@ -55367,6 +55792,57 @@ type DescribeCapacityReservationsInput struct { DryRun *bool `type:"boolean"` // One or more filters. + // + // * instance-type - The type of instance for which the Capacity Reservation + // reserves capacity. + // + // * owner-id - The ID of the AWS account that owns the Capacity Reservation. + // + // * availability-zone-id - The Availability Zone ID of the Capacity Reservation. + // + // * instance-platform - The type of operating system for which the Capacity + // Reservation reserves capacity. + // + // * availability-zone - The Availability Zone ID of the Capacity Reservation. + // + // * tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity + // Reservation can have one of the following tenancy settings: default - + // The Capacity Reservation is created on hardware that is shared with other + // AWS accounts. dedicated - The Capacity Reservation is created on single-tenant + // hardware that is dedicated to a single AWS account. + // + // * state - The current state of the Capacity Reservation. A Capacity Reservation + // can be in one of the following states: active- The Capacity Reservation + // is active and the capacity is available for your use. expired - The Capacity + // Reservation expired automatically at the date and time specified in your + // request. The reserved capacity is no longer available for your use. cancelled + // - The Capacity Reservation was manually cancelled. The reserved capacity + // is no longer available for your use. pending - The Capacity Reservation + // request was successful but the capacity provisioning is still pending. + // failed - The Capacity Reservation request has failed. A request might + // fail due to invalid request parameters, capacity constraints, or instance + // limit constraints. Failed requests are retained for 60 minutes. + // + // * end-date - The date and time at which the Capacity Reservation expires. + // When a Capacity Reservation expires, the reserved capacity is released + // and you can no longer launch instances into it. The Capacity Reservation's + // state changes to expired when it reaches its end date and time. + // + // * end-date-type - Indicates the way in which the Capacity Reservation + // ends. A Capacity Reservation can have one of the following end types: + // unlimited - The Capacity Reservation remains active until you explicitly + // cancel it. limited - The Capacity Reservation expires automatically at + // a specified date and time. + // + // * instance-match-criteria - Indicates the type of instance launches that + // the Capacity Reservation accepts. The options include: open - The Capacity + // Reservation accepts all instances that have matching attributes (instance + // type, platform, and Availability Zone). Instances that have matching attributes + // launch into the Capacity Reservation automatically without specifying + // any additional parameters. targeted - The Capacity Reservation only accepts + // instances that have matching attributes (instance type, platform, and + // Availability Zone), and explicitly target the Capacity Reservation. This + // ensures that only permitted instances can use the reserved capacity. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of results to return for the request in a single page. @@ -58447,8 +58923,7 @@ type DescribeIamInstanceProfileAssociationsInput struct { // // * instance-id - The ID of the instance. // - // * state - The state of the association (associating | associated | disassociating - // | disassociated). + // * state - The state of the association (associating | associated | disassociating). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of results to return in a single call. To retrieve the @@ -59527,6 +60002,55 @@ func (s *DescribeInstanceCreditSpecificationsOutput) SetNextToken(v string) *Des return s } +type DescribeInstanceEventNotificationAttributesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeInstanceEventNotificationAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceEventNotificationAttributesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeInstanceEventNotificationAttributesInput) SetDryRun(v bool) *DescribeInstanceEventNotificationAttributesInput { + s.DryRun = &v + return s +} + +type DescribeInstanceEventNotificationAttributesOutput struct { + _ struct{} `type:"structure"` + + // Information about the registered tag keys. + InstanceTagAttribute *InstanceTagNotificationAttribute `locationName:"instanceTagAttribute" type:"structure"` +} + +// String returns the string representation +func (s DescribeInstanceEventNotificationAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceEventNotificationAttributesOutput) GoString() string { + return s.String() +} + +// SetInstanceTagAttribute sets the InstanceTagAttribute field's value. +func (s *DescribeInstanceEventNotificationAttributesOutput) SetInstanceTagAttribute(v *InstanceTagNotificationAttribute) *DescribeInstanceEventNotificationAttributesOutput { + s.InstanceTagAttribute = v + return s +} + type DescribeInstanceStatusInput struct { _ struct{} `type:"structure"` @@ -59821,10 +60345,10 @@ type DescribeInstanceTypesInput struct { // generation instance type of an instance family. (true | false) // // * ebs-info.ebs-optimized-support - Indicates whether the instance type - // is EBS-optimized. (true | false) + // is EBS-optimized. (supported | unsupported | default) // // * ebs-info.encryption-support - Indicates whether EBS encryption is supported. - // (true | false) + // (supported | unsupported) // // * free-tier-eligible - Indicates whether the instance type is eligible // to use in the free tier. (true | false) @@ -60030,7 +60554,8 @@ type DescribeInstancesInput struct { // * host-id - The ID of the Dedicated Host on which the instance is running, // if applicable. // - // * hypervisor - The hypervisor type of the instance (ovm | xen). + // * hypervisor - The hypervisor type of the instance (ovm | xen). The value + // xen is used for both Xen and Nitro hypervisors. // // * iam-instance-profile.arn - The instance profile associated with the // instance. Specified as an ARN. @@ -60585,9 +61110,21 @@ type DescribeKeyPairsInput struct { // The filters. // + // * key-pair-id - The ID of the key pair. + // // * fingerprint - The fingerprint of the key pair. // // * key-name - The name of the key pair. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The key pair names. @@ -60965,6 +61502,18 @@ type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput struct DryRun *bool `type:"boolean"` // One or more filters. + // + // * local-gateway-id - The ID of a local gateway. + // + // * local-gateway-route-table-id - The ID of the local gateway route table. + // + // * local-gateway-route-table-virtual-interface-group-association-id - The + // ID of the association. + // + // * local-gateway-route-table-virtual-interface-group-id - The ID of the + // virtual interface group. + // + // * state - The state of the association. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The IDs of the associations. @@ -61074,6 +61623,16 @@ type DescribeLocalGatewayRouteTableVpcAssociationsInput struct { DryRun *bool `type:"boolean"` // One or more filters. + // + // * local-gateway-id - The ID of a local gateway. + // + // * local-gateway-route-table-id - The ID of the local gateway route table. + // + // * local-gateway-route-table-vpc-association-id - The ID of the association. + // + // * state - The state of the association. + // + // * vpc-id - The ID of the VPC. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The IDs of the associations. @@ -61183,6 +61742,14 @@ type DescribeLocalGatewayRouteTablesInput struct { DryRun *bool `type:"boolean"` // One or more filters. + // + // * local-gateway-id - The ID of a local gateway. + // + // * local-gateway-route-table-id - The ID of a local gateway route table. + // + // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost. + // + // * state - The state of the local gateway route table. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The IDs of the local gateway route tables. @@ -61292,6 +61859,13 @@ type DescribeLocalGatewayVirtualInterfaceGroupsInput struct { DryRun *bool `type:"boolean"` // One or more filters. + // + // * local-gateway-id - The ID of a local gateway. + // + // * local-gateway-virtual-interface-id - The ID of the virtual interface. + // + // * local-gateway-virtual-interface-group-id - The ID of the virtual interface + // group. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The IDs of the virtual interface groups. @@ -61512,7 +62086,21 @@ type DescribeLocalGatewaysInput struct { // One or more filters. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The IDs of the local gateways. + // One or more filters. + // + // * local-gateway-id - The ID of a local gateway. + // + // * local-gateway-route-table-id - The ID of the local gateway route table. + // + // * local-gateway-route-table-virtual-interface-group-association-id - The + // ID of the association. + // + // * local-gateway-route-table-virtual-interface-group-id - The ID of the + // virtual interface group. + // + // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost. + // + // * state - The state of the association. LocalGatewayIds []*string `locationName:"LocalGatewayId" locationNameList:"item" type:"list"` // The maximum number of results to return with a single call. To retrieve the @@ -62479,6 +63067,16 @@ type DescribePlacementGroupsInput struct { // | deleted). // // * strategy - The strategy of the placement group (cluster | spread | partition). + // + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources that have a tag with a specific key, regardless + // of the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The IDs of the placement groups. @@ -65574,12 +66172,12 @@ type DescribeTagsInput struct { // * resource-id - The ID of the resource. // // * resource-type - The resource type (customer-gateway | dedicated-host - // | dhcp-options | elastic-ip | fleet | fpga-image | image | instance | - // host-reservation | internet-gateway | launch-template | natgateway | network-acl - // | network-interface | placement-group | reserved-instances | route-table - // | security-group | snapshot | spot-instances-request | subnet | volume - // | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | - // vpn-connection | vpn-gateway). + // | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | + // image | instance | internet-gateway | key-pair | launch-template | natgateway + // | network-acl | network-interface | placement-group | reserved-instances + // | route-table | security-group | snapshot | spot-instances-request | subnet + // | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection + // | vpn-connection | vpn-gateway). // // * tag: - The key/value combination of the tag. For example, specify // "tag:Owner" for the filter name and "TeamA" for the filter value to find @@ -66283,7 +66881,20 @@ type DescribeTransitGatewayPeeringAttachmentsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more filters. + // One or more filters. The possible values are: + // + // * transit-gateway-attachment-id - The ID of the transit gateway attachment. + // + // * local-owner-id - The ID of your AWS account. + // + // * remote-owner-id - The ID of the AWS account in the remote Region that + // owns the transit gateway. + // + // * state - The state of the peering attachment (available | deleted | deleting + // | failed | modifying | pendingAcceptance | pending | rollingBack | rejected + // | rejecting). + // + // * transit-gateway-id - The ID of the transit gateway. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of results to return with a single call. To retrieve the @@ -70164,7 +70775,7 @@ type DisassociateRouteTableInput struct { _ struct{} `type:"structure"` // The association ID representing the current association between the route - // table and subnet. + // table and subnet or gateway. // // AssociationId is a required field AssociationId *string `locationName:"associationId" type:"string" required:"true"` @@ -73181,6 +73792,54 @@ func (s *FailedQueuedPurchaseDeletion) SetReservedInstancesId(v string) *FailedQ return s } +// Describes the IAM SAML identity provider used for federated authentication. +type FederatedAuthentication struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM SAML identity provider. + SamlProviderArn *string `locationName:"samlProviderArn" type:"string"` +} + +// String returns the string representation +func (s FederatedAuthentication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FederatedAuthentication) GoString() string { + return s.String() +} + +// SetSamlProviderArn sets the SamlProviderArn field's value. +func (s *FederatedAuthentication) SetSamlProviderArn(v string) *FederatedAuthentication { + s.SamlProviderArn = &v + return s +} + +// The IAM SAML identity provider used for federated authentication. +type FederatedAuthenticationRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM SAML identity provider. + SAMLProviderArn *string `type:"string"` +} + +// String returns the string representation +func (s FederatedAuthenticationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FederatedAuthenticationRequest) GoString() string { + return s.String() +} + +// SetSAMLProviderArn sets the SAMLProviderArn field's value. +func (s *FederatedAuthenticationRequest) SetSAMLProviderArn(v string) *FederatedAuthenticationRequest { + s.SAMLProviderArn = &v + return s +} + // A filter name and value pair that is used to return a more specific list // of results from a describe operation. Filters can be used to match a set // of resources by specific criteria, such as tags, attributes, or IDs. The @@ -78406,6 +79065,9 @@ type ImportKeyPairInput struct { // // PublicKeyMaterial is a required field PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"` + + // The tags to apply to the imported key pair. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -78452,6 +79114,12 @@ func (s *ImportKeyPairInput) SetPublicKeyMaterial(v []byte) *ImportKeyPairInput return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *ImportKeyPairInput) SetTagSpecifications(v []*TagSpecification) *ImportKeyPairInput { + s.TagSpecifications = v + return s +} + type ImportKeyPairOutput struct { _ struct{} `type:"structure"` @@ -78460,6 +79128,12 @@ type ImportKeyPairOutput struct { // The key pair name you provided. KeyName *string `locationName:"keyName" type:"string"` + + // The ID of the resulting key pair. + KeyPairId *string `locationName:"keyPairId" type:"string"` + + // The tags applied to the imported key pair. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -78484,6 +79158,18 @@ func (s *ImportKeyPairOutput) SetKeyName(v string) *ImportKeyPairOutput { return s } +// SetKeyPairId sets the KeyPairId field's value. +func (s *ImportKeyPairOutput) SetKeyPairId(v string) *ImportKeyPairOutput { + s.KeyPairId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ImportKeyPairOutput) SetTags(v []*Tag) *ImportKeyPairOutput { + s.Tags = v + return s +} + type ImportSnapshotInput struct { _ struct{} `type:"structure"` @@ -78989,7 +79675,8 @@ type Instance struct { // Indicates whether the instance is enabled for hibernation. HibernationOptions *HibernationOptions `locationName:"hibernationOptions" type:"structure"` - // The hypervisor type of the instance. + // The hypervisor type of the instance. The value xen is used for both Xen and + // Nitro hypervisors. Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` // The IAM instance profile associated with the instance, if applicable. @@ -80843,6 +81530,41 @@ func (s *InstanceStorageInfo) SetTotalSizeInGB(v int64) *InstanceStorageInfo { return s } +// Describes the registered tag keys for the current Region. +type InstanceTagNotificationAttribute struct { + _ struct{} `type:"structure"` + + // Indicates wheter all tag keys in the current Region are registered to appear + // in scheduled event notifications. true indicates that all tag keys in the + // current Region are registered. + IncludeAllTagsOfInstance *bool `locationName:"includeAllTagsOfInstance" type:"boolean"` + + // The registered tag keys. + InstanceTagKeys []*string `locationName:"instanceTagKeySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s InstanceTagNotificationAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceTagNotificationAttribute) GoString() string { + return s.String() +} + +// SetIncludeAllTagsOfInstance sets the IncludeAllTagsOfInstance field's value. +func (s *InstanceTagNotificationAttribute) SetIncludeAllTagsOfInstance(v bool) *InstanceTagNotificationAttribute { + s.IncludeAllTagsOfInstance = &v + return s +} + +// SetInstanceTagKeys sets the InstanceTagKeys field's value. +func (s *InstanceTagNotificationAttribute) SetInstanceTagKeys(v []*string) *InstanceTagNotificationAttribute { + s.InstanceTagKeys = v + return s +} + // Describes the instance type. type InstanceTypeInfo struct { _ struct{} `type:"structure"` @@ -84471,13 +85193,14 @@ type ModifyAvailabilityZoneGroupInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The names of the Zone Group. + // The name of the Availability Zone Group. // // GroupName is a required field GroupName *string `type:"string" required:"true"` - // Indicates whether to enable or disable Zone Group membership. The valid values - // are opted-in. + // Indicates whether to enable or disable membership. The valid values are opted-in. + // You must contact AWS Support (https://console.aws.amazon.com/support/home#/case/create%3FissueType=customer-service%26serviceCode=general-info%26getting-started%26categoryCode=using-aws%26services) + // to disable an Availability Zone group. // // OptInStatus is a required field OptInStatus *string `type:"string" required:"true" enum:"ModifyAvailabilityZoneOptInStatus"` @@ -86970,8 +87693,20 @@ type ModifySubnetAttributeInput struct { // or later of the Amazon EC2 API. AssignIpv6AddressOnCreation *AttributeBooleanValue `type:"structure"` - // Specify true to indicate that ENIs attached to instances created in the specified - // subnet should be assigned a public IPv4 address. + // The customer-owned IPv4 address pool associated with the subnet. + // + // You must set this value when you specify true for MapCustomerOwnedIpOnLaunch. + CustomerOwnedIpv4Pool *string `type:"string"` + + // Specify true to indicate that network interfaces attached to instances created + // in the specified subnet should be assigned a customer-owned IPv4 address. + // + // When this value is true, you must specify the customer-owned IP pool using + // CustomerOwnedIpv4Pool. + MapCustomerOwnedIpOnLaunch *AttributeBooleanValue `type:"structure"` + + // Specify true to indicate that network interfaces attached to instances created + // in the specified subnet should be assigned a public IPv4 address. MapPublicIpOnLaunch *AttributeBooleanValue `type:"structure"` // The ID of the subnet. @@ -87009,6 +87744,18 @@ func (s *ModifySubnetAttributeInput) SetAssignIpv6AddressOnCreation(v *Attribute return s } +// SetCustomerOwnedIpv4Pool sets the CustomerOwnedIpv4Pool field's value. +func (s *ModifySubnetAttributeInput) SetCustomerOwnedIpv4Pool(v string) *ModifySubnetAttributeInput { + s.CustomerOwnedIpv4Pool = &v + return s +} + +// SetMapCustomerOwnedIpOnLaunch sets the MapCustomerOwnedIpOnLaunch field's value. +func (s *ModifySubnetAttributeInput) SetMapCustomerOwnedIpOnLaunch(v *AttributeBooleanValue) *ModifySubnetAttributeInput { + s.MapCustomerOwnedIpOnLaunch = v + return s +} + // SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. func (s *ModifySubnetAttributeInput) SetMapPublicIpOnLaunch(v *AttributeBooleanValue) *ModifySubnetAttributeInput { s.MapPublicIpOnLaunch = v @@ -90962,9 +91709,10 @@ type Placement struct { _ struct{} `type:"structure"` // The affinity setting for the instance on the Dedicated Host. This parameter - // is not supported for the ImportInstance command. + // is not supported for the ImportInstance (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) + // command. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). Affinity *string `locationName:"affinity" type:"string"` // The Availability Zone of the instance. @@ -90972,41 +91720,43 @@ type Placement struct { // If not specified, an Availability Zone will be automatically chosen for you // based on the load balancing criteria for the Region. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The name of the placement group the instance is in. GroupName *string `locationName:"groupName" type:"string"` // The ID of the Dedicated Host on which the instance resides. This parameter - // is not supported for the ImportInstance command. + // is not supported for the ImportInstance (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) + // command. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). HostId *string `locationName:"hostId" type:"string"` // The ARN of the host resource group in which to launch the instances. If you // specify a host resource group ARN, omit the Tenancy parameter or set it to // host. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). HostResourceGroupArn *string `locationName:"hostResourceGroupArn" type:"string"` // The number of the partition the instance is in. Valid only if the placement // group strategy is set to partition. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). PartitionNumber *int64 `locationName:"partitionNumber" type:"integer"` // Reserved for future use. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). SpreadDomain *string `locationName:"spreadDomain" type:"string"` // The tenancy of the instance (if the instance is running in a VPC). An instance // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy - // is not supported for the ImportInstance command. + // is not supported for the ImportInstance (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) + // command. // - // This parameter is not supported by . + // This parameter is not supported by CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` } @@ -92816,6 +93566,101 @@ func (s *RegisterImageOutput) SetImageId(v string) *RegisterImageOutput { return s } +type RegisterInstanceEventNotificationAttributesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Information about the tag keys to register. + InstanceTagAttribute *RegisterInstanceTagAttributeRequest `type:"structure"` +} + +// String returns the string representation +func (s RegisterInstanceEventNotificationAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterInstanceEventNotificationAttributesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *RegisterInstanceEventNotificationAttributesInput) SetDryRun(v bool) *RegisterInstanceEventNotificationAttributesInput { + s.DryRun = &v + return s +} + +// SetInstanceTagAttribute sets the InstanceTagAttribute field's value. +func (s *RegisterInstanceEventNotificationAttributesInput) SetInstanceTagAttribute(v *RegisterInstanceTagAttributeRequest) *RegisterInstanceEventNotificationAttributesInput { + s.InstanceTagAttribute = v + return s +} + +type RegisterInstanceEventNotificationAttributesOutput struct { + _ struct{} `type:"structure"` + + // The resulting set of tag keys. + InstanceTagAttribute *InstanceTagNotificationAttribute `locationName:"instanceTagAttribute" type:"structure"` +} + +// String returns the string representation +func (s RegisterInstanceEventNotificationAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterInstanceEventNotificationAttributesOutput) GoString() string { + return s.String() +} + +// SetInstanceTagAttribute sets the InstanceTagAttribute field's value. +func (s *RegisterInstanceEventNotificationAttributesOutput) SetInstanceTagAttribute(v *InstanceTagNotificationAttribute) *RegisterInstanceEventNotificationAttributesOutput { + s.InstanceTagAttribute = v + return s +} + +// Information about the tag keys to register for the current Region. You can +// either specify individual tag keys or register all tag keys in the current +// Region. You must specify either IncludeAllTagsOfInstance or InstanceTagKeys +// in the request +type RegisterInstanceTagAttributeRequest struct { + _ struct{} `type:"structure"` + + // Indicates whether to register all tag keys in the current Region. Specify + // true to register all tag keys. + IncludeAllTagsOfInstance *bool `type:"boolean"` + + // The tag keys to register. + InstanceTagKeys []*string `locationName:"InstanceTagKey" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s RegisterInstanceTagAttributeRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterInstanceTagAttributeRequest) GoString() string { + return s.String() +} + +// SetIncludeAllTagsOfInstance sets the IncludeAllTagsOfInstance field's value. +func (s *RegisterInstanceTagAttributeRequest) SetIncludeAllTagsOfInstance(v bool) *RegisterInstanceTagAttributeRequest { + s.IncludeAllTagsOfInstance = &v + return s +} + +// SetInstanceTagKeys sets the InstanceTagKeys field's value. +func (s *RegisterInstanceTagAttributeRequest) SetInstanceTagKeys(v []*string) *RegisterInstanceTagAttributeRequest { + s.InstanceTagKeys = v + return s +} + type RegisterTransitGatewayMulticastGroupMembersInput struct { _ struct{} `type:"structure"` @@ -97451,10 +98296,13 @@ type RunInstancesInput struct { CapacityReservationSpecification *CapacityReservationSpecification `type:"structure"` // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // the request. If you do not specify a client token, a randomly generated token + // is used for the request to ensure idempotency. + // + // For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). // // Constraints: Maximum 64 ASCII characters - ClientToken *string `locationName:"clientToken" type:"string"` + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` // The CPU options for the instance. For more information, see Optimizing CPU // Options (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) @@ -101091,8 +101939,8 @@ type SpotFleetRequestConfigData struct { // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites) // in the Amazon EC2 User Guide for Linux Instances. Spot Fleet can terminate // Spot Instances on your behalf when you cancel its Spot Fleet request using - // CancelSpotFleetRequests or when the Spot Fleet request expires, if you set - // TerminateInstancesWithExpiration. + // CancelSpotFleetRequests (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests) + // or when the Spot Fleet request expires, if you set TerminateInstancesWithExpiration. // // IamFleetRole is a required field IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` @@ -101174,8 +102022,11 @@ type SpotFleetRequestConfigData struct { // The key-value pair for tagging the Spot Fleet request on creation. The value // for ResourceType must be spot-fleet-request, otherwise the Spot Fleet request // fails. To tag instances at launch, specify the tags in the launch template - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). - // For information about tagging after launch, see Tagging Your Resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) + // (valid only if you use LaunchTemplateConfigs) or in the SpotFleetTagSpecification + // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html) + // (valid only if you use LaunchSpecifications). For information about tagging + // after launch, see Tagging Your Resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The number of units to request for the Spot Fleet. You can choose to set @@ -101395,8 +102246,9 @@ func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetReques type SpotFleetTagSpecification struct { _ struct{} `type:"structure"` - // The type of resource. Currently, the only resource types that are supported - // are spot-fleet-request and instance. + // The type of resource. Currently, the only resource type that is supported + // is instance. To tag the Spot Fleet request on creation, use the TagSpecifications + // parameter in SpotFleetRequestConfigData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags. @@ -101717,9 +102569,9 @@ type SpotMarketOptions struct { // default is the On-Demand price. MaxPrice *string `type:"string"` - // The Spot Instance request type. For RunInstances, persistent Spot Instance - // requests are only supported when InstanceInterruptionBehavior is set to either - // hibernate or stop. + // The Spot Instance request type. For RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances), + // persistent Spot Instance requests are only supported when InstanceInterruptionBehavior + // is set to either hibernate or stop. SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` // The end date of the request. For a one-time request, the request remains @@ -102618,12 +103470,20 @@ type Subnet struct { // The IPv4 CIDR block assigned to the subnet. CidrBlock *string `locationName:"cidrBlock" type:"string"` + // The customer-owned IPv4 address pool associated with the subnet. + CustomerOwnedIpv4Pool *string `locationName:"customerOwnedIpv4Pool" type:"string"` + // Indicates whether this is the default subnet for the Availability Zone. DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"` // Information about the IPv6 CIDR blocks associated with the subnet. Ipv6CidrBlockAssociationSet []*SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociationSet" locationNameList:"item" type:"list"` + // Indicates whether a network interface created in this subnet (including a + // network interface created by RunInstances) receives a customer-owned IPv4 + // address. + MapCustomerOwnedIpOnLaunch *bool `locationName:"mapCustomerOwnedIpOnLaunch" type:"boolean"` + // Indicates whether instances launched in this subnet receive a public IPv4 // address. MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` @@ -102690,6 +103550,12 @@ func (s *Subnet) SetCidrBlock(v string) *Subnet { return s } +// SetCustomerOwnedIpv4Pool sets the CustomerOwnedIpv4Pool field's value. +func (s *Subnet) SetCustomerOwnedIpv4Pool(v string) *Subnet { + s.CustomerOwnedIpv4Pool = &v + return s +} + // SetDefaultForAz sets the DefaultForAz field's value. func (s *Subnet) SetDefaultForAz(v bool) *Subnet { s.DefaultForAz = &v @@ -102702,6 +103568,12 @@ func (s *Subnet) SetIpv6CidrBlockAssociationSet(v []*SubnetIpv6CidrBlockAssociat return s } +// SetMapCustomerOwnedIpOnLaunch sets the MapCustomerOwnedIpOnLaunch field's value. +func (s *Subnet) SetMapCustomerOwnedIpOnLaunch(v bool) *Subnet { + s.MapCustomerOwnedIpOnLaunch = &v + return s +} + // SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. func (s *Subnet) SetMapPublicIpOnLaunch(v bool) *Subnet { s.MapPublicIpOnLaunch = &v @@ -103003,10 +103875,10 @@ type TagSpecification struct { // The type of resource to tag. Currently, the resource types that support tagging // on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host - // | fleet | fpga-image | instance | key-pair | launch-template | spot-fleet-request - // | placement-group | snapshot | traffic-mirror-filter | traffic-mirror-session - // | traffic-mirror-target | transit-gateway | transit-gateway-attachment | - // transit-gateway-route-table | vpc-endpoint (for interface VPC endpoints)| + // | fleet | fpga-image | instance | key-pair | launch-template | | natgateway + // | spot-fleet-request | placement-group | snapshot | traffic-mirror-filter + // | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment + // | transit-gateway-route-table | vpc-endpoint (for interface VPC endpoints)| // vpc-endpoint-service (for gateway VPC endpoints) | volume | vpc-flow-log. // // To tag a resource after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). @@ -103051,7 +103923,8 @@ func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { // reaches the maximum amount that you're willing to pay. When the maximum amount // you're willing to pay is reached, the fleet stops launching instances even // if it hasn’t met the target capacity. The MaxTotalPrice parameters are -// located in and +// located in OnDemandOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptions.html) +// and SpotOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptions) type TargetCapacitySpecification struct { _ struct{} `type:"structure"` @@ -103117,7 +103990,8 @@ func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCap // instances until it reaches the maximum amount that you're willing to pay. // When the maximum amount you're willing to pay is reached, the fleet stops // launching instances even if it hasn’t met the target capacity. The MaxTotalPrice -// parameters are located in and . +// parameters are located in OnDemandOptionsRequest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptionsRequest) +// and SpotOptionsRequest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptionsRequest). type TargetCapacitySpecificationRequest struct { _ struct{} `type:"structure"` @@ -106558,6 +107432,70 @@ func (s *VCpuInfo) SetValidThreadsPerCore(v []*int64) *VCpuInfo { return s } +// The error code and error message that is returned for a parameter or parameter +// combination that is not valid when a new launch template or new version of +// a launch template is created. +type ValidationError struct { + _ struct{} `type:"structure"` + + // The error code that indicates why the parameter or parameter combination + // is not valid. For more information about error codes, see Error Codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). + Code *string `locationName:"code" type:"string"` + + // The error message that describes why the parameter or parameter combination + // is not valid. For more information about error messages, see Error Codes + // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ValidationError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationError) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ValidationError) SetCode(v string) *ValidationError { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ValidationError) SetMessage(v string) *ValidationError { + s.Message = &v + return s +} + +// The error codes and error messages that are returned for the parameters or +// parameter combinations that are not valid when a new launch template or new +// version of a launch template is created. +type ValidationWarning struct { + _ struct{} `type:"structure"` + + // The error codes and error messages. + Errors []*ValidationError `locationName:"errorSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s ValidationWarning) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationWarning) GoString() string { + return s.String() +} + +// SetErrors sets the Errors field's value. +func (s *ValidationWarning) SetErrors(v []*ValidationError) *ValidationWarning { + s.Errors = v + return s +} + // Describes telemetry for a VPN tunnel. type VgwTelemetry struct { _ struct{} `type:"structure"` @@ -109106,6 +110044,9 @@ const ( // ClientVpnAuthenticationTypeDirectoryServiceAuthentication is a ClientVpnAuthenticationType enum value ClientVpnAuthenticationTypeDirectoryServiceAuthentication = "directory-service-authentication" + + // ClientVpnAuthenticationTypeFederatedAuthentication is a ClientVpnAuthenticationType enum value + ClientVpnAuthenticationTypeFederatedAuthentication = "federated-authentication" ) const ( @@ -110612,6 +111553,33 @@ const ( // InstanceTypeInf124xlarge is a InstanceType enum value InstanceTypeInf124xlarge = "inf1.24xlarge" + + // InstanceTypeM6gMetal is a InstanceType enum value + InstanceTypeM6gMetal = "m6g.metal" + + // InstanceTypeM6gMedium is a InstanceType enum value + InstanceTypeM6gMedium = "m6g.medium" + + // InstanceTypeM6gLarge is a InstanceType enum value + InstanceTypeM6gLarge = "m6g.large" + + // InstanceTypeM6gXlarge is a InstanceType enum value + InstanceTypeM6gXlarge = "m6g.xlarge" + + // InstanceTypeM6g2xlarge is a InstanceType enum value + InstanceTypeM6g2xlarge = "m6g.2xlarge" + + // InstanceTypeM6g4xlarge is a InstanceType enum value + InstanceTypeM6g4xlarge = "m6g.4xlarge" + + // InstanceTypeM6g8xlarge is a InstanceType enum value + InstanceTypeM6g8xlarge = "m6g.8xlarge" + + // InstanceTypeM6g12xlarge is a InstanceType enum value + InstanceTypeM6g12xlarge = "m6g.12xlarge" + + // InstanceTypeM6g16xlarge is a InstanceType enum value + InstanceTypeM6g16xlarge = "m6g.16xlarge" ) const ( 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 2a5e6e3cd46..12e2e1bd6a6 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 @@ -60,14 +60,12 @@ func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabil // Checks the availability of one or more image layers in a repository. // // When an image is pushed to a repository, each image layer is checked to verify -// if it has been uploaded before. If it is, then the image layer is skipped. +// if it has been uploaded before. If it has been uploaded, then the image layer +// is skipped. // -// When an image is pulled from a repository, each image layer is checked once -// to verify it is available to be pulled. -// -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. +// This operation is used by the Amazon ECR proxy and is not generally used +// by customers for pulling and pushing images. In most cases, you should use +// the docker CLI to pull, tag, and push images. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -347,9 +345,9 @@ func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req * // When an image is pushed, the CompleteLayerUpload API is called once per each // new image layer to verify that the upload has completed. // -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. +// This operation is used by the Amazon ECR proxy and is not generally used +// by customers for pulling and pushing images. In most cases, you should use +// the docker CLI to pull, tag, and push images. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -485,8 +483,7 @@ func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *reques // // * LimitExceededException // The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) +// for your account. For more information, see Amazon ECR Service Quotas (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html) // in the Amazon Elastic Container Registry User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository @@ -1375,11 +1372,11 @@ func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) // layer. You can only get URLs for image layers that are referenced in an image. // // When an image is pulled, the GetDownloadUrlForLayer API is called once per -// image layer. +// image layer that is not already cached. // -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. +// This operation is used by the Amazon ECR proxy and is not generally used +// by customers for pulling and pushing images. In most cases, you should use +// the docker CLI to pull, tag, and push images. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1807,12 +1804,12 @@ func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req * // Notifies Amazon ECR that you intend to upload an image layer. // // When an image is pushed, the InitiateLayerUpload API is called once per image -// layer that has not already been uploaded. Whether an image layer has been -// uploaded before is determined by the BatchCheckLayerAvailability API action. +// layer that has not already been uploaded. Whether or not an image layer has +// been uploaded is determined by the BatchCheckLayerAvailability API action. // -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. +// This operation is used by the Amazon ECR proxy and is not generally used +// by customers for pulling and pushing images. In most cases, you should use +// the docker CLI to pull, tag, and push images. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2141,12 +2138,12 @@ func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, outpu // Creates or updates the image manifest and tags associated with an image. // // When an image is pushed and all new image layers have been uploaded, the -// PutImage API is called once to create or update the image manifest and tags -// associated with the image. +// PutImage API is called once to create or update the image manifest and the +// tags associated with the image. // -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. +// This operation is used by the Amazon ECR proxy and is not generally used +// by customers for pulling and pushing images. In most cases, you should use +// the docker CLI to pull, tag, and push images. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2175,10 +2172,12 @@ func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, outpu // The specified layers could not be found, or the specified layer is not valid // for this repository. // +// * ReferencedImagesNotFoundException +// The manifest list is referencing an image that does not exist. +// // * LimitExceededException // The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) +// for your account. For more information, see Amazon ECR Service Quotas (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html) // in the Amazon Elastic Container Registry User Guide. // // * ImageTagAlreadyExistsException @@ -2516,7 +2515,7 @@ func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req * // SetRepositoryPolicy API operation for Amazon EC2 Container Registry. // // Applies a repository policy to the specified repository to control access -// permissions. For more information, see Amazon ECR Repository Policies (https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicies.html) +// permissions. For more information, see Amazon ECR Repository Policies (https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policies.html) // in the Amazon Elastic Container Registry User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2624,6 +2623,14 @@ func (c *ECR) StartImageScanRequest(input *StartImageScanInput) (req *request.Re // The specified parameter is invalid. Review the available parameters for the // API request. // +// * UnsupportedImageTypeException +// The image is of a type that cannot be scanned. +// +// * LimitExceededException +// The operation did not succeed because it would have exceeded a service limit +// for your account. For more information, see Amazon ECR Service Quotas (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html) +// in the Amazon Elastic Container Registry User Guide. +// // * RepositoryNotFoundException // The specified repository could not be found. Check the spelling of the specified // repository and ensure that you are performing operations on the correct registry. @@ -2994,9 +3001,9 @@ func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request. // size of each image layer part can be 20971520 bytes (or about 20MB). The // UploadLayerPart API is called once per each new image layer part. // -// This operation is used by the Amazon ECR proxy, and it is not intended for -// general use by customers for pulling and pushing images. In most cases, you -// should use the docker CLI to pull, tag, and push images. +// This operation is used by the Amazon ECR proxy and is not generally used +// by customers for pulling and pushing images. In most cases, you should use +// the docker CLI to pull, tag, and push images. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3027,8 +3034,7 @@ func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request. // // * LimitExceededException // The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) +// for your account. For more information, see Amazon ECR Service Quotas (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html) // in the Amazon Elastic Container Registry User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart @@ -4457,8 +4463,8 @@ func (s *DescribeRepositoriesOutput) SetRepositories(v []*Repository) *DescribeR // The specified layer upload does not contain any layer parts. type EmptyUploadException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -4476,17 +4482,17 @@ func (s EmptyUploadException) GoString() string { func newErrorEmptyUploadException(v protocol.ResponseMetadata) error { return &EmptyUploadException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EmptyUploadException) Code() string { +func (s *EmptyUploadException) Code() string { return "EmptyUploadException" } // Message returns the exception's message. -func (s EmptyUploadException) Message() string { +func (s *EmptyUploadException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4494,22 +4500,22 @@ func (s EmptyUploadException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EmptyUploadException) OrigErr() error { +func (s *EmptyUploadException) OrigErr() error { return nil } -func (s EmptyUploadException) Error() string { +func (s *EmptyUploadException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EmptyUploadException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EmptyUploadException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EmptyUploadException) RequestID() string { - return s.respMetadata.RequestID +func (s *EmptyUploadException) RequestID() string { + return s.RespMetadata.RequestID } type GetAuthorizationTokenInput struct { @@ -5070,6 +5076,9 @@ type Image struct { // The image manifest associated with the image. ImageManifest *string `locationName:"imageManifest" min:"1" type:"string"` + // The media type associated with the image manifest. + ImageManifestMediaType *string `locationName:"imageManifestMediaType" type:"string"` + // The AWS account ID associated with the registry containing the image. RegistryId *string `locationName:"registryId" type:"string"` @@ -5099,6 +5108,12 @@ func (s *Image) SetImageManifest(v string) *Image { return s } +// SetImageManifestMediaType sets the ImageManifestMediaType field's value. +func (s *Image) SetImageManifestMediaType(v string) *Image { + s.ImageManifestMediaType = &v + return s +} + // SetRegistryId sets the RegistryId field's value. func (s *Image) SetRegistryId(v string) *Image { s.RegistryId = &v @@ -5114,8 +5129,8 @@ func (s *Image) SetRepositoryName(v string) *Image { // The specified image has already been pushed, and there were no changes to // the manifest or image tag after the last push. type ImageAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -5133,17 +5148,17 @@ func (s ImageAlreadyExistsException) GoString() string { func newErrorImageAlreadyExistsException(v protocol.ResponseMetadata) error { return &ImageAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ImageAlreadyExistsException) Code() string { +func (s *ImageAlreadyExistsException) Code() string { return "ImageAlreadyExistsException" } // Message returns the exception's message. -func (s ImageAlreadyExistsException) Message() string { +func (s *ImageAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5151,22 +5166,22 @@ func (s ImageAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ImageAlreadyExistsException) OrigErr() error { +func (s *ImageAlreadyExistsException) OrigErr() error { return nil } -func (s ImageAlreadyExistsException) Error() string { +func (s *ImageAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ImageAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ImageAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ImageAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ImageAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An object that describes an image returned by a DescribeImages operation. @@ -5188,6 +5203,9 @@ type ImageDetail struct { // The size, in bytes, of the image in the repository. // + // If the image is a manifest list, this will be the max size of all manifests + // in the list. + // // Beginning with Docker version 1.9, the Docker client compresses image layers // before pushing them to a V2 Docker registry. The output of the docker images // command shows the uncompressed image size, so it may return a larger image @@ -5352,8 +5370,8 @@ func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier { // The image requested does not exist in the specified repository. type ImageNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5370,17 +5388,17 @@ func (s ImageNotFoundException) GoString() string { func newErrorImageNotFoundException(v protocol.ResponseMetadata) error { return &ImageNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ImageNotFoundException) Code() string { +func (s *ImageNotFoundException) Code() string { return "ImageNotFoundException" } // Message returns the exception's message. -func (s ImageNotFoundException) Message() string { +func (s *ImageNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5388,22 +5406,22 @@ func (s ImageNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ImageNotFoundException) OrigErr() error { +func (s *ImageNotFoundException) OrigErr() error { return nil } -func (s ImageNotFoundException) Error() string { +func (s *ImageNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ImageNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ImageNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ImageNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ImageNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about an image scan finding. @@ -5623,8 +5641,8 @@ func (s *ImageScanningConfiguration) SetScanOnPush(v bool) *ImageScanningConfigu // The specified image is tagged with a tag that already exists. The repository // is configured for tag immutability. type ImageTagAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5641,17 +5659,17 @@ func (s ImageTagAlreadyExistsException) GoString() string { func newErrorImageTagAlreadyExistsException(v protocol.ResponseMetadata) error { return &ImageTagAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ImageTagAlreadyExistsException) Code() string { +func (s *ImageTagAlreadyExistsException) Code() string { return "ImageTagAlreadyExistsException" } // Message returns the exception's message. -func (s ImageTagAlreadyExistsException) Message() string { +func (s *ImageTagAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5659,22 +5677,22 @@ func (s ImageTagAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ImageTagAlreadyExistsException) OrigErr() error { +func (s *ImageTagAlreadyExistsException) OrigErr() error { return nil } -func (s ImageTagAlreadyExistsException) Error() string { +func (s *ImageTagAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ImageTagAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ImageTagAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ImageTagAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ImageTagAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } type InitiateLayerUploadInput struct { @@ -5765,8 +5783,8 @@ func (s *InitiateLayerUploadOutput) SetUploadId(v string) *InitiateLayerUploadOu // The layer digest calculation performed by Amazon ECR upon receipt of the // image layer does not match the digest specified. type InvalidLayerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -5784,17 +5802,17 @@ func (s InvalidLayerException) GoString() string { func newErrorInvalidLayerException(v protocol.ResponseMetadata) error { return &InvalidLayerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLayerException) Code() string { +func (s *InvalidLayerException) Code() string { return "InvalidLayerException" } // Message returns the exception's message. -func (s InvalidLayerException) Message() string { +func (s *InvalidLayerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5802,29 +5820,29 @@ func (s InvalidLayerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLayerException) OrigErr() error { +func (s *InvalidLayerException) OrigErr() error { return nil } -func (s InvalidLayerException) Error() string { +func (s *InvalidLayerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLayerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLayerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLayerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLayerException) RequestID() string { + return s.RespMetadata.RequestID } // The layer part size is not valid, or the first byte specified is not consecutive // to the last byte of a previous layer part upload. type InvalidLayerPartException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The last valid byte received from the layer part upload that is associated // with the exception. @@ -5855,17 +5873,17 @@ func (s InvalidLayerPartException) GoString() string { func newErrorInvalidLayerPartException(v protocol.ResponseMetadata) error { return &InvalidLayerPartException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLayerPartException) Code() string { +func (s *InvalidLayerPartException) Code() string { return "InvalidLayerPartException" } // Message returns the exception's message. -func (s InvalidLayerPartException) Message() string { +func (s *InvalidLayerPartException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5873,29 +5891,29 @@ func (s InvalidLayerPartException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLayerPartException) OrigErr() error { +func (s *InvalidLayerPartException) OrigErr() error { return nil } -func (s InvalidLayerPartException) Error() string { +func (s *InvalidLayerPartException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLayerPartException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLayerPartException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLayerPartException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLayerPartException) RequestID() string { + return s.RespMetadata.RequestID } // The specified parameter is invalid. Review the available parameters for the // API request. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -5913,17 +5931,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5931,30 +5949,30 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // An invalid parameter has been specified. Tag keys can have a maximum character // length of 128 characters, and tag values can have a maximum length of 256 // characters. type InvalidTagParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5971,17 +5989,17 @@ func (s InvalidTagParameterException) GoString() string { func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error { return &InvalidTagParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagParameterException) Code() string { +func (s *InvalidTagParameterException) Code() string { return "InvalidTagParameterException" } // Message returns the exception's message. -func (s InvalidTagParameterException) Message() string { +func (s *InvalidTagParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5989,22 +6007,22 @@ func (s InvalidTagParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagParameterException) OrigErr() error { +func (s *InvalidTagParameterException) OrigErr() error { return nil } -func (s InvalidTagParameterException) Error() string { +func (s *InvalidTagParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagParameterException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing an Amazon ECR image layer. @@ -6061,8 +6079,8 @@ func (s *Layer) SetMediaType(v string) *Layer { // The image layer already exists in the associated repository. type LayerAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -6080,17 +6098,17 @@ func (s LayerAlreadyExistsException) GoString() string { func newErrorLayerAlreadyExistsException(v protocol.ResponseMetadata) error { return &LayerAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LayerAlreadyExistsException) Code() string { +func (s *LayerAlreadyExistsException) Code() string { return "LayerAlreadyExistsException" } // Message returns the exception's message. -func (s LayerAlreadyExistsException) Message() string { +func (s *LayerAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6098,22 +6116,22 @@ func (s LayerAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LayerAlreadyExistsException) OrigErr() error { +func (s *LayerAlreadyExistsException) OrigErr() error { return nil } -func (s LayerAlreadyExistsException) Error() string { +func (s *LayerAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LayerAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LayerAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LayerAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *LayerAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing an Amazon ECR image layer failure. @@ -6161,8 +6179,8 @@ func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure { // The specified layer is not available because it is not associated with an // image. Unassociated image layers may be cleaned up at any time. type LayerInaccessibleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -6180,17 +6198,17 @@ func (s LayerInaccessibleException) GoString() string { func newErrorLayerInaccessibleException(v protocol.ResponseMetadata) error { return &LayerInaccessibleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LayerInaccessibleException) Code() string { +func (s *LayerInaccessibleException) Code() string { return "LayerInaccessibleException" } // Message returns the exception's message. -func (s LayerInaccessibleException) Message() string { +func (s *LayerInaccessibleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6198,28 +6216,28 @@ func (s LayerInaccessibleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LayerInaccessibleException) OrigErr() error { +func (s *LayerInaccessibleException) OrigErr() error { return nil } -func (s LayerInaccessibleException) Error() string { +func (s *LayerInaccessibleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LayerInaccessibleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LayerInaccessibleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LayerInaccessibleException) RequestID() string { - return s.respMetadata.RequestID +func (s *LayerInaccessibleException) RequestID() string { + return s.RespMetadata.RequestID } // Layer parts must be at least 5 MiB in size. type LayerPartTooSmallException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -6237,17 +6255,17 @@ func (s LayerPartTooSmallException) GoString() string { func newErrorLayerPartTooSmallException(v protocol.ResponseMetadata) error { return &LayerPartTooSmallException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LayerPartTooSmallException) Code() string { +func (s *LayerPartTooSmallException) Code() string { return "LayerPartTooSmallException" } // Message returns the exception's message. -func (s LayerPartTooSmallException) Message() string { +func (s *LayerPartTooSmallException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6255,29 +6273,29 @@ func (s LayerPartTooSmallException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LayerPartTooSmallException) OrigErr() error { +func (s *LayerPartTooSmallException) OrigErr() error { return nil } -func (s LayerPartTooSmallException) Error() string { +func (s *LayerPartTooSmallException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LayerPartTooSmallException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LayerPartTooSmallException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LayerPartTooSmallException) RequestID() string { - return s.respMetadata.RequestID +func (s *LayerPartTooSmallException) RequestID() string { + return s.RespMetadata.RequestID } // The specified layers could not be found, or the specified layer is not valid // for this repository. type LayersNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -6295,17 +6313,17 @@ func (s LayersNotFoundException) GoString() string { func newErrorLayersNotFoundException(v protocol.ResponseMetadata) error { return &LayersNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LayersNotFoundException) Code() string { +func (s *LayersNotFoundException) Code() string { return "LayersNotFoundException" } // Message returns the exception's message. -func (s LayersNotFoundException) Message() string { +func (s *LayersNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6313,28 +6331,28 @@ func (s LayersNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LayersNotFoundException) OrigErr() error { +func (s *LayersNotFoundException) OrigErr() error { return nil } -func (s LayersNotFoundException) Error() string { +func (s *LayersNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LayersNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LayersNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LayersNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *LayersNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The lifecycle policy could not be found, and no policy is set to the repository. type LifecyclePolicyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6351,17 +6369,17 @@ func (s LifecyclePolicyNotFoundException) GoString() string { func newErrorLifecyclePolicyNotFoundException(v protocol.ResponseMetadata) error { return &LifecyclePolicyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LifecyclePolicyNotFoundException) Code() string { +func (s *LifecyclePolicyNotFoundException) Code() string { return "LifecyclePolicyNotFoundException" } // Message returns the exception's message. -func (s LifecyclePolicyNotFoundException) Message() string { +func (s *LifecyclePolicyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6369,22 +6387,22 @@ func (s LifecyclePolicyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LifecyclePolicyNotFoundException) OrigErr() error { +func (s *LifecyclePolicyNotFoundException) OrigErr() error { return nil } -func (s LifecyclePolicyNotFoundException) Error() string { +func (s *LifecyclePolicyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LifecyclePolicyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LifecyclePolicyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LifecyclePolicyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *LifecyclePolicyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The filter for the lifecycle policy preview. @@ -6414,8 +6432,8 @@ func (s *LifecyclePolicyPreviewFilter) SetTagStatus(v string) *LifecyclePolicyPr // The previous lifecycle policy preview request has not completed. Please try // again later. type LifecyclePolicyPreviewInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6432,17 +6450,17 @@ func (s LifecyclePolicyPreviewInProgressException) GoString() string { func newErrorLifecyclePolicyPreviewInProgressException(v protocol.ResponseMetadata) error { return &LifecyclePolicyPreviewInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LifecyclePolicyPreviewInProgressException) Code() string { +func (s *LifecyclePolicyPreviewInProgressException) Code() string { return "LifecyclePolicyPreviewInProgressException" } // Message returns the exception's message. -func (s LifecyclePolicyPreviewInProgressException) Message() string { +func (s *LifecyclePolicyPreviewInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6450,28 +6468,28 @@ func (s LifecyclePolicyPreviewInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LifecyclePolicyPreviewInProgressException) OrigErr() error { +func (s *LifecyclePolicyPreviewInProgressException) OrigErr() error { return nil } -func (s LifecyclePolicyPreviewInProgressException) Error() string { +func (s *LifecyclePolicyPreviewInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LifecyclePolicyPreviewInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LifecyclePolicyPreviewInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LifecyclePolicyPreviewInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *LifecyclePolicyPreviewInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // There is no dry run for this repository. type LifecyclePolicyPreviewNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6488,17 +6506,17 @@ func (s LifecyclePolicyPreviewNotFoundException) GoString() string { func newErrorLifecyclePolicyPreviewNotFoundException(v protocol.ResponseMetadata) error { return &LifecyclePolicyPreviewNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LifecyclePolicyPreviewNotFoundException) Code() string { +func (s *LifecyclePolicyPreviewNotFoundException) Code() string { return "LifecyclePolicyPreviewNotFoundException" } // Message returns the exception's message. -func (s LifecyclePolicyPreviewNotFoundException) Message() string { +func (s *LifecyclePolicyPreviewNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6506,22 +6524,22 @@ func (s LifecyclePolicyPreviewNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LifecyclePolicyPreviewNotFoundException) OrigErr() error { +func (s *LifecyclePolicyPreviewNotFoundException) OrigErr() error { return nil } -func (s LifecyclePolicyPreviewNotFoundException) Error() string { +func (s *LifecyclePolicyPreviewNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LifecyclePolicyPreviewNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LifecyclePolicyPreviewNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LifecyclePolicyPreviewNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *LifecyclePolicyPreviewNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The result of the lifecycle policy preview. @@ -6634,12 +6652,11 @@ func (s *LifecyclePolicyRuleAction) SetType(v string) *LifecyclePolicyRuleAction } // The operation did not succeed because it would have exceeded a service limit -// for your account. For more information, see Amazon ECR Default Service Limits -// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) +// for your account. For more information, see Amazon ECR Service Quotas (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html) // in the Amazon Elastic Container Registry User Guide. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -6657,17 +6674,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6675,22 +6692,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing a filter on a ListImages operation. @@ -6917,6 +6934,11 @@ type PutImageInput struct { // ImageManifest is a required field ImageManifest *string `locationName:"imageManifest" min:"1" type:"string" required:"true"` + // The media type of the image manifest. If you push an image manifest that + // does not contain the mediaType field, you must specify the imageManifestMediaType + // in the request. + ImageManifestMediaType *string `locationName:"imageManifestMediaType" type:"string"` + // The tag to associate with the image. This parameter is required for images // that use the Docker Image Manifest V2 Schema 2 or OCI formats. ImageTag *string `locationName:"imageTag" min:"1" type:"string"` @@ -6973,6 +6995,12 @@ func (s *PutImageInput) SetImageManifest(v string) *PutImageInput { return s } +// SetImageManifestMediaType sets the ImageManifestMediaType field's value. +func (s *PutImageInput) SetImageManifestMediaType(v string) *PutImageInput { + s.ImageManifestMediaType = &v + return s +} + // SetImageTag sets the ImageTag field's value. func (s *PutImageInput) SetImageTag(v string) *PutImageInput { s.ImageTag = &v @@ -7342,6 +7370,62 @@ func (s *PutLifecyclePolicyOutput) SetRepositoryName(v string) *PutLifecyclePoli return s } +// The manifest list is referencing an image that does not exist. +type ReferencedImagesNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ReferencedImagesNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReferencedImagesNotFoundException) GoString() string { + return s.String() +} + +func newErrorReferencedImagesNotFoundException(v protocol.ResponseMetadata) error { + return &ReferencedImagesNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ReferencedImagesNotFoundException) Code() string { + return "ReferencedImagesNotFoundException" +} + +// Message returns the exception's message. +func (s *ReferencedImagesNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ReferencedImagesNotFoundException) OrigErr() error { + return nil +} + +func (s *ReferencedImagesNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ReferencedImagesNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ReferencedImagesNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + // An object representing a repository. type Repository struct { _ struct{} `type:"structure"` @@ -7426,8 +7510,8 @@ func (s *Repository) SetRepositoryUri(v string) *Repository { // The specified repository already exists in the specified registry. type RepositoryAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -7445,17 +7529,17 @@ func (s RepositoryAlreadyExistsException) GoString() string { func newErrorRepositoryAlreadyExistsException(v protocol.ResponseMetadata) error { return &RepositoryAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryAlreadyExistsException) Code() string { +func (s *RepositoryAlreadyExistsException) Code() string { return "RepositoryAlreadyExistsException" } // Message returns the exception's message. -func (s RepositoryAlreadyExistsException) Message() string { +func (s *RepositoryAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7463,29 +7547,29 @@ func (s RepositoryAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryAlreadyExistsException) OrigErr() error { +func (s *RepositoryAlreadyExistsException) OrigErr() error { return nil } -func (s RepositoryAlreadyExistsException) Error() string { +func (s *RepositoryAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified repository contains images. To delete a repository that contains // images, you must force the deletion with the force parameter. type RepositoryNotEmptyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -7503,17 +7587,17 @@ func (s RepositoryNotEmptyException) GoString() string { func newErrorRepositoryNotEmptyException(v protocol.ResponseMetadata) error { return &RepositoryNotEmptyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryNotEmptyException) Code() string { +func (s *RepositoryNotEmptyException) Code() string { return "RepositoryNotEmptyException" } // Message returns the exception's message. -func (s RepositoryNotEmptyException) Message() string { +func (s *RepositoryNotEmptyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7521,29 +7605,29 @@ func (s RepositoryNotEmptyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryNotEmptyException) OrigErr() error { +func (s *RepositoryNotEmptyException) OrigErr() error { return nil } -func (s RepositoryNotEmptyException) Error() string { +func (s *RepositoryNotEmptyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryNotEmptyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryNotEmptyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryNotEmptyException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryNotEmptyException) RequestID() string { + return s.RespMetadata.RequestID } // The specified repository could not be found. Check the spelling of the specified // repository and ensure that you are performing operations on the correct registry. type RepositoryNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -7561,17 +7645,17 @@ func (s RepositoryNotFoundException) GoString() string { func newErrorRepositoryNotFoundException(v protocol.ResponseMetadata) error { return &RepositoryNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryNotFoundException) Code() string { +func (s *RepositoryNotFoundException) Code() string { return "RepositoryNotFoundException" } // Message returns the exception's message. -func (s RepositoryNotFoundException) Message() string { +func (s *RepositoryNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7579,29 +7663,29 @@ func (s RepositoryNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryNotFoundException) OrigErr() error { +func (s *RepositoryNotFoundException) OrigErr() error { return nil } -func (s RepositoryNotFoundException) Error() string { +func (s *RepositoryNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The specified repository and registry combination does not have an associated // repository policy. type RepositoryPolicyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -7619,17 +7703,17 @@ func (s RepositoryPolicyNotFoundException) GoString() string { func newErrorRepositoryPolicyNotFoundException(v protocol.ResponseMetadata) error { return &RepositoryPolicyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RepositoryPolicyNotFoundException) Code() string { +func (s *RepositoryPolicyNotFoundException) Code() string { return "RepositoryPolicyNotFoundException" } // Message returns the exception's message. -func (s RepositoryPolicyNotFoundException) Message() string { +func (s *RepositoryPolicyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7637,29 +7721,29 @@ func (s RepositoryPolicyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RepositoryPolicyNotFoundException) OrigErr() error { +func (s *RepositoryPolicyNotFoundException) OrigErr() error { return nil } -func (s RepositoryPolicyNotFoundException) Error() string { +func (s *RepositoryPolicyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RepositoryPolicyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RepositoryPolicyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RepositoryPolicyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *RepositoryPolicyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The specified image scan could not be found. Ensure that image scanning is // enabled on the repository and try again. type ScanNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7676,17 +7760,17 @@ func (s ScanNotFoundException) GoString() string { func newErrorScanNotFoundException(v protocol.ResponseMetadata) error { return &ScanNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ScanNotFoundException) Code() string { +func (s *ScanNotFoundException) Code() string { return "ScanNotFoundException" } // Message returns the exception's message. -func (s ScanNotFoundException) Message() string { +func (s *ScanNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7694,28 +7778,28 @@ func (s ScanNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ScanNotFoundException) OrigErr() error { +func (s *ScanNotFoundException) OrigErr() error { return nil } -func (s ScanNotFoundException) Error() string { +func (s *ScanNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ScanNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ScanNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ScanNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ScanNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // These errors are usually caused by a server-side issue. type ServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -7733,17 +7817,17 @@ func (s ServerException) GoString() string { func newErrorServerException(v protocol.ResponseMetadata) error { return &ServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerException) Code() string { +func (s *ServerException) Code() string { return "ServerException" } // Message returns the exception's message. -func (s ServerException) Message() string { +func (s *ServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7751,22 +7835,22 @@ func (s ServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerException) OrigErr() error { +func (s *ServerException) OrigErr() error { return nil } -func (s ServerException) Error() string { +func (s *ServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerException) RequestID() string { + return s.RespMetadata.RequestID } type SetRepositoryPolicyInput struct { @@ -7778,7 +7862,7 @@ type SetRepositoryPolicyInput struct { Force *bool `locationName:"force" type:"boolean"` // The JSON repository policy text to apply to the repository. For more information, - // see Amazon ECR Repository Policy Examples (https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicyExamples.html) + // see Amazon ECR Repository Policies (https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policy-examples.html) // in the Amazon Elastic Container Registry User Guide. // // PolicyText is a required field @@ -8233,8 +8317,8 @@ func (s TagResourceOutput) GoString() string { // The list of tags on the repository is over the limit. The maximum number // of tags that can be applied to a repository is 50. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8251,17 +8335,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8269,22 +8353,78 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The image is of a type that cannot be scanned. +type UnsupportedImageTypeException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s UnsupportedImageTypeException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnsupportedImageTypeException) GoString() string { + return s.String() +} + +func newErrorUnsupportedImageTypeException(v protocol.ResponseMetadata) error { + return &UnsupportedImageTypeException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *UnsupportedImageTypeException) Code() string { + return "UnsupportedImageTypeException" +} + +// Message returns the exception's message. +func (s *UnsupportedImageTypeException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *UnsupportedImageTypeException) OrigErr() error { + return nil +} + +func (s *UnsupportedImageTypeException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *UnsupportedImageTypeException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *UnsupportedImageTypeException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -8364,12 +8504,14 @@ type UploadLayerPartInput struct { // LayerPartBlob is a required field LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"` - // The integer value of the first byte of the layer part. + // The position of the first byte of the layer part witin the overall image + // layer. // // PartFirstByte is a required field PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"` - // The integer value of the last byte of the layer part. + // The position of the last byte of the layer part within the overall image + // layer. // // PartLastByte is a required field PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"` @@ -8517,8 +8659,8 @@ func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput { // The upload could not be found, or the specified upload id is not valid for // this repository. type UploadNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message associated with the exception. Message_ *string `locationName:"message" type:"string"` @@ -8536,17 +8678,17 @@ func (s UploadNotFoundException) GoString() string { func newErrorUploadNotFoundException(v protocol.ResponseMetadata) error { return &UploadNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UploadNotFoundException) Code() string { +func (s *UploadNotFoundException) Code() string { return "UploadNotFoundException" } // Message returns the exception's message. -func (s UploadNotFoundException) Message() string { +func (s *UploadNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8554,22 +8696,22 @@ func (s UploadNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UploadNotFoundException) OrigErr() error { +func (s *UploadNotFoundException) OrigErr() error { return nil } -func (s UploadNotFoundException) Error() string { +func (s *UploadNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UploadNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UploadNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UploadNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *UploadNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } const ( @@ -8612,6 +8754,9 @@ const ( // ImageFailureCodeMissingDigestAndTag is a ImageFailureCode enum value ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag" + + // ImageFailureCodeImageReferencedByManifestList is a ImageFailureCode enum value + ImageFailureCodeImageReferencedByManifestList = "ImageReferencedByManifestList" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go index 732d865bf40..bf44256bd1c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go @@ -112,11 +112,16 @@ const ( // "LimitExceededException". // // The operation did not succeed because it would have exceeded a service limit - // for your account. For more information, see Amazon ECR Default Service Limits - // (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) + // for your account. For more information, see Amazon ECR Service Quotas (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html) // in the Amazon Elastic Container Registry User Guide. ErrCodeLimitExceededException = "LimitExceededException" + // ErrCodeReferencedImagesNotFoundException for service response error code + // "ReferencedImagesNotFoundException". + // + // The manifest list is referencing an image that does not exist. + ErrCodeReferencedImagesNotFoundException = "ReferencedImagesNotFoundException" + // ErrCodeRepositoryAlreadyExistsException for service response error code // "RepositoryAlreadyExistsException". // @@ -164,6 +169,12 @@ const ( // of tags that can be applied to a repository is 50. ErrCodeTooManyTagsException = "TooManyTagsException" + // ErrCodeUnsupportedImageTypeException for service response error code + // "UnsupportedImageTypeException". + // + // The image is of a type that cannot be scanned. + ErrCodeUnsupportedImageTypeException = "UnsupportedImageTypeException" + // ErrCodeUploadNotFoundException for service response error code // "UploadNotFoundException". // @@ -189,6 +200,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "LifecyclePolicyPreviewInProgressException": newErrorLifecyclePolicyPreviewInProgressException, "LifecyclePolicyPreviewNotFoundException": newErrorLifecyclePolicyPreviewNotFoundException, "LimitExceededException": newErrorLimitExceededException, + "ReferencedImagesNotFoundException": newErrorReferencedImagesNotFoundException, "RepositoryAlreadyExistsException": newErrorRepositoryAlreadyExistsException, "RepositoryNotEmptyException": newErrorRepositoryNotEmptyException, "RepositoryNotFoundException": newErrorRepositoryNotFoundException, @@ -196,5 +208,6 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "ScanNotFoundException": newErrorScanNotFoundException, "ServerException": newErrorServerException, "TooManyTagsException": newErrorTooManyTagsException, + "UnsupportedImageTypeException": newErrorUnsupportedImageTypeException, "UploadNotFoundException": newErrorUploadNotFoundException, } 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 912efcd8dc7..8a85c7cd85e 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 @@ -256,7 +256,7 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // Runs and maintains a desired number of tasks from a specified task definition. // If the number of tasks running in a service drops below the desiredCount, // Amazon ECS runs another copy of the task in the specified cluster. To update -// an existing service, see UpdateService. +// an existing service, see the UpdateService action. // // In addition to maintaining the desired count of tasks in your service, you // can optionally run your service behind one or more load balancers. The load @@ -280,7 +280,9 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // // * DAEMON - The daemon scheduling strategy deploys exactly one task on // each active container instance that meets all of the task placement constraints -// that you specify in your cluster. When using this strategy, you don't +// that you specify in your cluster. The service scheduler also evaluates +// the task placement constraints for running tasks and will stop tasks that +// do not meet the placement constraints. When using this strategy, you don't // need to specify a desired number of tasks, a task placement strategy, // or use Service Auto Scaling policies. For more information, see Service // Scheduler Concepts (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html) @@ -5132,24 +5134,32 @@ func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Requ // UpdateService API operation for Amazon EC2 Container Service. // +// +// Updating the task placement strategies and constraints on an Amazon ECS service +// remains in preview and is a Beta Service as defined by and subject to the +// Beta Service Participation Service Terms located at https://aws.amazon.com/service-terms +// (https://aws.amazon.com/service-terms) ("Beta Terms"). These Beta Terms apply +// to your participation in this preview. +// // Modifies the parameters of a service. // // For services using the rolling update (ECS) deployment controller, the desired -// count, deployment configuration, network configuration, or task definition -// used can be updated. +// count, deployment configuration, network configuration, task placement constraints +// and strategies, or task definition used can be updated. // // For services using the blue/green (CODE_DEPLOY) deployment controller, only -// the desired count, deployment configuration, and health check grace period -// can be updated using this API. If the network configuration, platform version, -// or task definition need to be updated, a new AWS CodeDeploy deployment should -// be created. For more information, see CreateDeployment (https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) +// the desired count, deployment configuration, task placement constraints and +// strategies, and health check grace period can be updated using this API. +// If the network configuration, platform version, or task definition need to +// be updated, a new AWS CodeDeploy deployment should be created. For more information, +// see CreateDeployment (https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) // in the AWS CodeDeploy API Reference. // // For services using an external deployment controller, you can update only -// the desired count and health check grace period using this API. If the launch -// type, load balancer, network configuration, platform version, or task definition -// need to be updated, you should create a new task set. For more information, -// see CreateTaskSet. +// the desired count, task placement constraints and strategies, and health +// check grace period using this API. If the launch type, load balancer, network +// configuration, platform version, or task definition need to be updated, you +// should create a new task set. For more information, see CreateTaskSet. // // You can add to or subtract from the number of instantiations of a task definition // in a service by specifying the cluster that the service is running in and @@ -5516,8 +5526,8 @@ func (c *ECS) UpdateTaskSetWithContext(ctx aws.Context, input *UpdateTaskSetInpu // You do not have authorization to perform the requested action. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5534,17 +5544,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5552,22 +5562,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing a container instance or task attachment. @@ -5756,8 +5766,8 @@ func (s *Attribute) SetValue(v string) *Attribute { // of a resource with ListAttributes. You can remove existing attributes on // a resource with DeleteAttributes. type AttributeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5774,17 +5784,17 @@ func (s AttributeLimitExceededException) GoString() string { func newErrorAttributeLimitExceededException(v protocol.ResponseMetadata) error { return &AttributeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AttributeLimitExceededException) Code() string { +func (s *AttributeLimitExceededException) Code() string { return "AttributeLimitExceededException" } // Message returns the exception's message. -func (s AttributeLimitExceededException) Message() string { +func (s *AttributeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5792,22 +5802,22 @@ func (s AttributeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AttributeLimitExceededException) OrigErr() error { +func (s *AttributeLimitExceededException) OrigErr() error { return nil } -func (s AttributeLimitExceededException) Error() string { +func (s *AttributeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AttributeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AttributeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AttributeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *AttributeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The details of the Auto Scaling group for the capacity provider. @@ -5955,8 +5965,8 @@ func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { // Your AWS account has been blocked. For more information, contact AWS Support // (http://aws.amazon.com/contact-us/). type BlockedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5973,17 +5983,17 @@ func (s BlockedException) GoString() string { func newErrorBlockedException(v protocol.ResponseMetadata) error { return &BlockedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BlockedException) Code() string { +func (s *BlockedException) Code() string { return "BlockedException" } // Message returns the exception's message. -func (s BlockedException) Message() string { +func (s *BlockedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5991,22 +6001,22 @@ func (s BlockedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BlockedException) OrigErr() error { +func (s *BlockedException) OrigErr() error { return nil } -func (s BlockedException) Error() string { +func (s *BlockedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BlockedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BlockedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BlockedException) RequestID() string { - return s.respMetadata.RequestID +func (s *BlockedException) RequestID() string { + return s.RespMetadata.RequestID } // The details of a capacity provider. @@ -6104,7 +6114,7 @@ type CapacityProviderStrategyItem struct { // can have a base defined. Base *int64 `locationName:"base" type:"integer"` - // The short name or full Amazon Resource Name (ARN) of the capacity provider. + // The short name of the capacity provider. // // CapacityProvider is a required field CapacityProvider *string `locationName:"capacityProvider" type:"string" required:"true"` @@ -6166,8 +6176,8 @@ func (s *CapacityProviderStrategyItem) SetWeight(v int64) *CapacityProviderStrat // or resource on behalf of a user that doesn't have permissions to use the // action or resource, or specifying an identifier that is not valid. type ClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6184,17 +6194,17 @@ func (s ClientException) GoString() string { func newErrorClientException(v protocol.ResponseMetadata) error { return &ClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientException) Code() string { +func (s *ClientException) Code() string { return "ClientException" } // Message returns the exception's message. -func (s ClientException) Message() string { +func (s *ClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6202,22 +6212,22 @@ func (s ClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientException) OrigErr() error { +func (s *ClientException) OrigErr() error { return nil } -func (s ClientException) Error() string { +func (s *ClientException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientException) RequestID() string { + return s.RespMetadata.RequestID } // A regional grouping of one or more container instances on which you can run @@ -6462,8 +6472,8 @@ func (s *Cluster) SetTags(v []*Tag) *Cluster { // deregister the container instances before you can delete the cluster. For // more information, see DeregisterContainerInstance. type ClusterContainsContainerInstancesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6480,17 +6490,17 @@ func (s ClusterContainsContainerInstancesException) GoString() string { func newErrorClusterContainsContainerInstancesException(v protocol.ResponseMetadata) error { return &ClusterContainsContainerInstancesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterContainsContainerInstancesException) Code() string { +func (s *ClusterContainsContainerInstancesException) Code() string { return "ClusterContainsContainerInstancesException" } // Message returns the exception's message. -func (s ClusterContainsContainerInstancesException) Message() string { +func (s *ClusterContainsContainerInstancesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6498,30 +6508,30 @@ func (s ClusterContainsContainerInstancesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterContainsContainerInstancesException) OrigErr() error { +func (s *ClusterContainsContainerInstancesException) OrigErr() error { return nil } -func (s ClusterContainsContainerInstancesException) Error() string { +func (s *ClusterContainsContainerInstancesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterContainsContainerInstancesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterContainsContainerInstancesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterContainsContainerInstancesException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterContainsContainerInstancesException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot delete a cluster that contains services. First, update the service // to reduce its desired task count to 0 and then delete the service. For more // information, see UpdateService and DeleteService. type ClusterContainsServicesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6538,17 +6548,17 @@ func (s ClusterContainsServicesException) GoString() string { func newErrorClusterContainsServicesException(v protocol.ResponseMetadata) error { return &ClusterContainsServicesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterContainsServicesException) Code() string { +func (s *ClusterContainsServicesException) Code() string { return "ClusterContainsServicesException" } // Message returns the exception's message. -func (s ClusterContainsServicesException) Message() string { +func (s *ClusterContainsServicesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6556,28 +6566,28 @@ func (s ClusterContainsServicesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterContainsServicesException) OrigErr() error { +func (s *ClusterContainsServicesException) OrigErr() error { return nil } -func (s ClusterContainsServicesException) Error() string { +func (s *ClusterContainsServicesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterContainsServicesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterContainsServicesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterContainsServicesException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterContainsServicesException) RequestID() string { + return s.RespMetadata.RequestID } // You cannot delete a cluster that has active tasks. type ClusterContainsTasksException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6594,17 +6604,17 @@ func (s ClusterContainsTasksException) GoString() string { func newErrorClusterContainsTasksException(v protocol.ResponseMetadata) error { return &ClusterContainsTasksException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterContainsTasksException) Code() string { +func (s *ClusterContainsTasksException) Code() string { return "ClusterContainsTasksException" } // Message returns the exception's message. -func (s ClusterContainsTasksException) Message() string { +func (s *ClusterContainsTasksException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6612,29 +6622,29 @@ func (s ClusterContainsTasksException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterContainsTasksException) OrigErr() error { +func (s *ClusterContainsTasksException) OrigErr() error { return nil } -func (s ClusterContainsTasksException) Error() string { +func (s *ClusterContainsTasksException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterContainsTasksException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterContainsTasksException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterContainsTasksException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterContainsTasksException) RequestID() string { + return s.RespMetadata.RequestID } // The specified cluster could not be found. You can view your available clusters // with ListClusters. Amazon ECS clusters are Region-specific. type ClusterNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6651,17 +6661,17 @@ func (s ClusterNotFoundException) GoString() string { func newErrorClusterNotFoundException(v protocol.ResponseMetadata) error { return &ClusterNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClusterNotFoundException) Code() string { +func (s *ClusterNotFoundException) Code() string { return "ClusterNotFoundException" } // Message returns the exception's message. -func (s ClusterNotFoundException) Message() string { +func (s *ClusterNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6669,22 +6679,22 @@ func (s ClusterNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClusterNotFoundException) OrigErr() error { +func (s *ClusterNotFoundException) OrigErr() error { return nil } -func (s ClusterNotFoundException) Error() string { +func (s *ClusterNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClusterNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClusterNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClusterNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClusterNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The settings to use when creating a cluster. This parameter is used to enable @@ -7050,6 +7060,27 @@ type ContainerDefinition struct { // such as credential data. Environment []*KeyValuePair `locationName:"environment" type:"list"` + // A list of files containing the environment variables to pass to a container. + // This parameter maps to the --env-file option to docker run (https://docs.docker.com/engine/reference/run/). + // + // You can specify up to ten environment files. The file must have a .env file + // extension. Each line in an environment file should contain an environment + // variable in VARIABLE=VALUE format. Lines beginning with # are treated as + // comments and are ignored. For more information on the environment variable + // file syntax, see Declare default environment variables in file (https://docs.docker.com/compose/env-file/). + // + // If there are environment variables specified using the environment parameter + // in a container definition, they take precedence over the variables contained + // within an environment file. If multiple environment files are specified that + // contain the same variable, they are processed from the top down. It is recommended + // to use unique variable names. For more information, see Specifying Environment + // Variables (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) + // in the Amazon Elastic Container Service Developer Guide. + // + // This field is not valid for containers in tasks using the Fargate launch + // type. + EnvironmentFiles []*EnvironmentFile `locationName:"environmentFiles" type:"list"` + // If the essential parameter of a container is marked as true, and that container // fails or stops for any reason, all other containers that are part of the // task are stopped. If the essential parameter of a container is marked as @@ -7080,10 +7111,11 @@ type ContainerDefinition struct { // in the Amazon Elastic Container Service Developer Guide. FirelensConfiguration *FirelensConfiguration `locationName:"firelensConfiguration" type:"structure"` - // The health check command and associated configuration parameters for the - // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the HEALTHCHECK parameter of docker run (https://docs.docker.com/engine/reference/run/). + // The container health check command and associated configuration parameters + // for the container. This parameter maps to HealthCheck in the Create a container + // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section + // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and + // the HEALTHCHECK parameter of docker run (https://docs.docker.com/engine/reference/run/). HealthCheck *HealthCheck `locationName:"healthCheck" type:"structure"` // The hostname to use for your container. This parameter maps to Hostname in @@ -7327,10 +7359,19 @@ type ContainerDefinition struct { // give up and not start. This results in the task transitioning to a STOPPED // state. // - // For tasks using the EC2 launch type, the container instances require at least - // version 1.26.0 of the container agent to enable a container start timeout - // value. However, we recommend using the latest container agent version. For - // information about checking your agent version and updating to the latest + // For tasks using the Fargate launch type, this parameter requires that the + // task or service uses platform version 1.3.0 or later. If this parameter is + // not specified, the default value of 3 minutes is used. + // + // For tasks using the EC2 launch type, if the startTimeout parameter is not + // specified, the value set for the Amazon ECS container agent configuration + // variable ECS_CONTAINER_START_TIMEOUT is used by default. If neither the startTimeout + // parameter or the ECS_CONTAINER_START_TIMEOUT agent configuration variable + // are set, then the default values of 3 minutes for Linux containers and 8 + // minutes on Windows containers are used. Your container instances require + // at least version 1.26.0 of the container agent to enable a container start + // timeout value. However, we recommend using the latest container agent version. + // For information about checking your agent version and updating to the latest // version, see Updating the Amazon ECS Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) // in the Amazon Elastic Container Service Developer Guide. If you are using // an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 @@ -7339,24 +7380,25 @@ type ContainerDefinition struct { // agent and ecs-init. For more information, see Amazon ECS-optimized Linux // AMI (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) // in the Amazon Elastic Container Service Developer Guide. - // - // For tasks using the Fargate launch type, the task or service requires platform - // version 1.3.0 or later. StartTimeout *int64 `locationName:"startTimeout" type:"integer"` // Time duration (in seconds) to wait before the container is forcefully killed // if it doesn't exit normally on its own. // - // For tasks using the Fargate launch type, the max stopTimeout value is 2 minutes - // and the task or service requires platform version 1.3.0 or later. - // - // For tasks using the EC2 launch type, the stop timeout value for the container - // takes precedence over the ECS_CONTAINER_STOP_TIMEOUT container agent configuration - // parameter, if used. Container instances require at least version 1.26.0 of - // the container agent to enable a container stop timeout value. However, we - // recommend using the latest container agent version. For information about - // checking your agent version and updating to the latest version, see Updating - // the Amazon ECS Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) + // For tasks using the Fargate launch type, the task or service requires platform + // version 1.3.0 or later. The max stop timeout value is 120 seconds and if + // the parameter is not specified, the default value of 30 seconds is used. + // + // For tasks using the EC2 launch type, if the stopTimeout parameter is not + // specified, the value set for the Amazon ECS container agent configuration + // variable ECS_CONTAINER_STOP_TIMEOUT is used by default. If neither the stopTimeout + // parameter or the ECS_CONTAINER_STOP_TIMEOUT agent configuration variable + // are set, then the default values of 30 seconds for Linux containers and 30 + // seconds on Windows containers are used. Your container instances require + // at least version 1.26.0 of the container agent to enable a container stop + // timeout value. However, we recommend using the latest container agent version. + // For information about checking your agent version and updating to the latest + // version, see Updating the Amazon ECS Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) // in the Amazon Elastic Container Service Developer Guide. If you are using // an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 // of the ecs-init package. If your container instances are launched from version @@ -7451,6 +7493,16 @@ func (s *ContainerDefinition) Validate() error { } } } + if s.EnvironmentFiles != nil { + for i, v := range s.EnvironmentFiles { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnvironmentFiles", i), err.(request.ErrInvalidParams)) + } + } + } if s.ExtraHosts != nil { for i, v := range s.ExtraHosts { if v == nil { @@ -7583,6 +7635,12 @@ func (s *ContainerDefinition) SetEnvironment(v []*KeyValuePair) *ContainerDefini return s } +// SetEnvironmentFiles sets the EnvironmentFiles field's value. +func (s *ContainerDefinition) SetEnvironmentFiles(v []*EnvironmentFile) *ContainerDefinition { + s.EnvironmentFiles = v + return s +} + // SetEssential sets the Essential field's value. func (s *ContainerDefinition) SetEssential(v bool) *ContainerDefinition { s.Essential = &v @@ -8098,6 +8156,10 @@ type ContainerOverride struct { // You must also specify a container name. Environment []*KeyValuePair `locationName:"environment" type:"list"` + // A list of files containing the environment variables to pass to a container, + // instead of the value from the container definition. + EnvironmentFiles []*EnvironmentFile `locationName:"environmentFiles" type:"list"` + // The hard limit (in MiB) of memory to present to the container, instead of // the default value from the task definition. If your container attempts to // exceed the memory specified here, the container is killed. You must also @@ -8132,6 +8194,16 @@ func (s ContainerOverride) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ContainerOverride) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ContainerOverride"} + if s.EnvironmentFiles != nil { + for i, v := range s.EnvironmentFiles { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EnvironmentFiles", i), err.(request.ErrInvalidParams)) + } + } + } if s.ResourceRequirements != nil { for i, v := range s.ResourceRequirements { if v == nil { @@ -8167,6 +8239,12 @@ func (s *ContainerOverride) SetEnvironment(v []*KeyValuePair) *ContainerOverride return s } +// SetEnvironmentFiles sets the EnvironmentFiles field's value. +func (s *ContainerOverride) SetEnvironmentFiles(v []*EnvironmentFile) *ContainerOverride { + s.EnvironmentFiles = v + return s +} + // SetMemory sets the Memory field's value. func (s *ContainerOverride) SetMemory(v int64) *ContainerOverride { s.Memory = &v @@ -8399,8 +8477,7 @@ func (s *CreateCapacityProviderOutput) SetCapacityProvider(v *CapacityProvider) type CreateClusterInput struct { _ struct{} `type:"structure"` - // The short name or full Amazon Resource Name (ARN) of one or more capacity - // providers to associate with the cluster. + // The short name of one or more capacity providers to associate with the cluster. // // If specifying a capacity provider that uses an Auto Scaling group, the capacity // provider must already be created and not already associated with another @@ -8631,13 +8708,16 @@ type CreateServiceInput struct { // The period of time, in seconds, that the Amazon ECS service scheduler should // ignore unhealthy Elastic Load Balancing target health checks after a task - // has first started. This is only valid if your service is configured to use - // a load balancer. If your service's tasks take a while to start and respond - // to Elastic Load Balancing health checks, you can specify a health check grace - // period of up to 2,147,483,647 seconds. During that time, the ECS service - // scheduler ignores health check status. This grace period can prevent the - // ECS service scheduler from marking tasks as unhealthy and stopping them before - // they have time to come up. + // has first started. This is only used when your service is configured to use + // a load balancer. If your service has a load balancer defined and you don't + // specify a health check grace period value, the default value of 0 is used. + // + // If your service's tasks take a while to start and respond to Elastic Load + // Balancing health checks, you can specify a health check grace period of up + // to 2,147,483,647 seconds. During that time, the Amazon ECS service scheduler + // ignores health check status. This grace period can prevent the service scheduler + // from marking tasks as unhealthy and stopping them before they have time to + // come up. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` // The launch type on which to run your service. For more information, see Amazon @@ -8764,11 +8844,13 @@ type CreateServiceInput struct { // // * DAEMON-The daemon scheduling strategy deploys exactly one task on each // active container instance that meets all of the task placement constraints - // that you specify in your cluster. When you're using this strategy, you - // don't need to specify a desired number of tasks, a task placement strategy, - // or use Service Auto Scaling policies. Tasks using the Fargate launch type - // or the CODE_DEPLOY or EXTERNAL deployment controller types don't support - // the DAEMON scheduling strategy. + // that you specify in your cluster. The service scheduler also evaluates + // the task placement constraints for running tasks and will stop tasks that + // do not meet the placement constraints. When you're using this strategy, + // you don't need to specify a desired number of tasks, a task placement + // strategy, or use Service Auto Scaling policies. Tasks using the Fargate + // launch type or the CODE_DEPLOY or EXTERNAL deployment controller types + // don't support the DAEMON scheduling strategy. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, @@ -11061,26 +11143,84 @@ func (s *DockerVolumeConfiguration) SetScope(v string) *DockerVolumeConfiguratio return s } +// The authorization configuration details for the Amazon EFS file system. +type EFSAuthorizationConfig struct { + _ struct{} `type:"structure"` + + // The Amazon EFS access point ID to use. If an access point is specified, the + // root directory value specified in the EFSVolumeConfiguration will be relative + // to the directory set for the access point. If an access point is used, transit + // encryption must be enabled in the EFSVolumeConfiguration. For more information, + // see Working with Amazon EFS Access Points (https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) + // in the Amazon Elastic File System User Guide. + AccessPointId *string `locationName:"accessPointId" type:"string"` + + // Whether or not to use the Amazon ECS task IAM role defined in a task definition + // when mounting the Amazon EFS file system. If enabled, transit encryption + // must be enabled in the EFSVolumeConfiguration. If this parameter is omitted, + // the default value of DISABLED is used. For more information, see Using Amazon + // EFS Access Points (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html#efs-volume-accesspoints) + // in the Amazon Elastic Container Service Developer Guide. + Iam *string `locationName:"iam" type:"string" enum:"EFSAuthorizationConfigIAM"` +} + +// String returns the string representation +func (s EFSAuthorizationConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EFSAuthorizationConfig) GoString() string { + return s.String() +} + +// SetAccessPointId sets the AccessPointId field's value. +func (s *EFSAuthorizationConfig) SetAccessPointId(v string) *EFSAuthorizationConfig { + s.AccessPointId = &v + return s +} + +// SetIam sets the Iam field's value. +func (s *EFSAuthorizationConfig) SetIam(v string) *EFSAuthorizationConfig { + s.Iam = &v + return s +} + // This parameter is specified when you are using an Amazon Elastic File System -// (Amazon EFS) file storage. Amazon EFS file systems are only supported when -// you are using the EC2 launch type. -// -// EFSVolumeConfiguration remains in preview and is a Beta Service as defined -// by and subject to the Beta Service Participation Service Terms located at -// https://aws.amazon.com/service-terms (https://aws.amazon.com/service-terms) -// ("Beta Terms"). These Beta Terms apply to your participation in this preview -// of EFSVolumeConfiguration. +// file system for task storage. For more information, see Amazon EFS Volumes +// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html) +// in the Amazon Elastic Container Service Developer Guide. type EFSVolumeConfiguration struct { _ struct{} `type:"structure"` + // The authorization configuration details for the Amazon EFS file system. + AuthorizationConfig *EFSAuthorizationConfig `locationName:"authorizationConfig" type:"structure"` + // The Amazon EFS file system ID to use. // // FileSystemId is a required field FileSystemId *string `locationName:"fileSystemId" type:"string" required:"true"` // The directory within the Amazon EFS file system to mount as the root directory - // inside the host. + // inside the host. If this parameter is omitted, the root of the Amazon EFS + // volume will be used. Specifying / will have the same effect as omitting this + // parameter. RootDirectory *string `locationName:"rootDirectory" type:"string"` + + // Whether or not to enable encryption for Amazon EFS data in transit between + // the Amazon ECS host and the Amazon EFS server. Transit encryption must be + // enabled if Amazon EFS IAM authorization is used. If this parameter is omitted, + // the default value of DISABLED is used. For more information, see Encrypting + // Data in Transit (https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html) + // in the Amazon Elastic File System User Guide. + TransitEncryption *string `locationName:"transitEncryption" type:"string" enum:"EFSTransitEncryption"` + + // The port to use when sending encrypted data between the Amazon ECS host and + // the Amazon EFS server. If you do not specify a transit encryption port, it + // will use the port selection strategy that the Amazon EFS mount helper uses. + // For more information, see EFS Mount Helper (https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html) + // in the Amazon Elastic File System User Guide. + TransitEncryptionPort *int64 `locationName:"transitEncryptionPort" type:"integer"` } // String returns the string representation @@ -11106,6 +11246,12 @@ func (s *EFSVolumeConfiguration) Validate() error { return nil } +// SetAuthorizationConfig sets the AuthorizationConfig field's value. +func (s *EFSVolumeConfiguration) SetAuthorizationConfig(v *EFSAuthorizationConfig) *EFSVolumeConfiguration { + s.AuthorizationConfig = v + return s +} + // SetFileSystemId sets the FileSystemId field's value. func (s *EFSVolumeConfiguration) SetFileSystemId(v string) *EFSVolumeConfiguration { s.FileSystemId = &v @@ -11118,6 +11264,88 @@ func (s *EFSVolumeConfiguration) SetRootDirectory(v string) *EFSVolumeConfigurat return s } +// SetTransitEncryption sets the TransitEncryption field's value. +func (s *EFSVolumeConfiguration) SetTransitEncryption(v string) *EFSVolumeConfiguration { + s.TransitEncryption = &v + return s +} + +// SetTransitEncryptionPort sets the TransitEncryptionPort field's value. +func (s *EFSVolumeConfiguration) SetTransitEncryptionPort(v int64) *EFSVolumeConfiguration { + s.TransitEncryptionPort = &v + return s +} + +// A list of files containing the environment variables to pass to a container. +// You can specify up to ten environment files. The file must have a .env file +// extension. Each line in an environment file should contain an environment +// variable in VARIABLE=VALUE format. Lines beginning with # are treated as +// comments and are ignored. For more information on the environment variable +// file syntax, see Declare default environment variables in file (https://docs.docker.com/compose/env-file/). +// +// If there are environment variables specified using the environment parameter +// in a container definition, they take precedence over the variables contained +// within an environment file. If multiple environment files are specified that +// contain the same variable, they are processed from the top down. It is recommended +// to use unique variable names. For more information, see Specifying Environment +// Variables (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) +// in the Amazon Elastic Container Service Developer Guide. +// +// This field is not valid for containers in tasks using the Fargate launch +// type. +type EnvironmentFile struct { + _ struct{} `type:"structure"` + + // The file type to use. The only supported value is s3. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"EnvironmentFileType"` + + // The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment + // variable file. + // + // Value is a required field + Value *string `locationName:"value" type:"string" required:"true"` +} + +// String returns the string representation +func (s EnvironmentFile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnvironmentFile) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnvironmentFile) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnvironmentFile"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetType sets the Type field's value. +func (s *EnvironmentFile) SetType(v string) *EnvironmentFile { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *EnvironmentFile) SetValue(v string) *EnvironmentFile { + s.Value = &v + return s +} + // A failed resource. type Failure struct { _ struct{} `type:"structure"` @@ -11222,6 +11450,36 @@ func (s *FirelensConfiguration) SetType(v string) *FirelensConfiguration { // that exist in the container image (such as those specified in a parent image // or from the image's Dockerfile). // +// You can view the health status of both individual containers and a task with +// the DescribeTasks API operation or when viewing the task details in the console. +// +// The following describes the possible healthStatus values for a container: +// +// * HEALTHY-The container health check has passed successfully. +// +// * UNHEALTHY-The container health check has failed. +// +// * UNKNOWN-The container health check is being evaluated or there is no +// container health check defined. +// +// The following describes the possible healthStatus values for a task. The +// container health check status of nonessential containers do not have an effect +// on the health status of a task. +// +// * HEALTHY-All essential containers within the task have passed their health +// checks. +// +// * UNHEALTHY-One or more essential containers have failed their health +// check. +// +// * UNKNOWN-The essential containers within the task are still having their +// health checks evaluated or there are no container health checks defined. +// +// If a task is run manually, and not as part of a service, the task will continue +// its lifecycle regardless of its health status. For tasks that are part of +// a service, if the task reports as unhealthy then the task will be stopped +// and the service scheduler will replace it. +// // The following are notes about container health check support: // // * Container health checks require version 1.17.0 or greater of the Amazon @@ -11514,8 +11772,8 @@ func (s *InferenceAcceleratorOverride) SetDeviceType(v string) *InferenceAcceler // The specified parameter is invalid. Review the available parameters for the // API request. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11532,17 +11790,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11550,22 +11808,22 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The Linux capabilities for the container that are added to or dropped from @@ -11584,8 +11842,9 @@ type KernelCapabilities struct { // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cap-add option to docker run (https://docs.docker.com/engine/reference/run/). // - // If you are using tasks that use the Fargate launch type, the add parameter - // is not supported. + // The SYS_PTRACE capability is supported for tasks that use the Fargate launch + // type if they are also using platform version 1.4.0. The other capabilities + // are not supported for any platform versions. // // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" @@ -11673,8 +11932,8 @@ func (s *KeyValuePair) SetValue(v string) *KeyValuePair { // The limit for the resource has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11691,17 +11950,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11709,22 +11968,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Linux-specific options that are applied to the container, such as Linux KernelCapabilities. @@ -11734,8 +11993,9 @@ type LinuxParameters struct { // The Linux capabilities for the container that are added to or dropped from // the default configuration provided by Docker. // - // If you are using tasks that use the Fargate launch type, capabilities is - // supported but the add parameter is not supported. + // For tasks that use the Fargate launch type, capabilities is supported for + // all platform versions but the add parameter is only supported if using platform + // version 1.4.0 or later. Capabilities *KernelCapabilities `locationName:"capabilities" type:"structure"` // Any host devices to expose to the container. This parameter maps to Devices @@ -12884,8 +13144,10 @@ func (s *ListTasksOutput) SetTaskArns(v []*string) *ListTasksOutput { return s } -// Details on the load balancer or load balancers to use with a service or task -// set. +// The load balancer configuration to use with a service or task set. +// +// For specific notes and restrictions regarding the use of load balancers with +// services and task sets, see the CreateService and CreateTaskSet actions. type LoadBalancer struct { _ struct{} `type:"structure"` @@ -12905,15 +13167,15 @@ type LoadBalancer struct { // // A load balancer name is only specified when using a Classic Load Balancer. // If you are using an Application Load Balancer or a Network Load Balancer - // this should be omitted. + // the load balancer name parameter should be omitted. LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target // group or groups associated with a service or task set. // // A target group ARN is only specified when using an Application Load Balancer - // or Network Load Balancer. If you are using a Classic Load Balancer this should - // be omitted. + // or Network Load Balancer. If you are using a Classic Load Balancer the target + // group ARN should be omitted. // // For services using the ECS deployment controller, you can specify one or // multiple target groups. For more information, see Registering Multiple Target @@ -13191,8 +13453,8 @@ func (s *ManagedScaling) SetTargetCapacity(v int64) *ManagedScaling { // with an update. This could be because the agent running on the container // instance is an older or custom version that does not use our version information. type MissingVersionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13209,17 +13471,17 @@ func (s MissingVersionException) GoString() string { func newErrorMissingVersionException(v protocol.ResponseMetadata) error { return &MissingVersionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MissingVersionException) Code() string { +func (s *MissingVersionException) Code() string { return "MissingVersionException" } // Message returns the exception's message. -func (s MissingVersionException) Message() string { +func (s *MissingVersionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13227,22 +13489,22 @@ func (s MissingVersionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MissingVersionException) OrigErr() error { +func (s *MissingVersionException) OrigErr() error { return nil } -func (s MissingVersionException) Error() string { +func (s *MissingVersionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MissingVersionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MissingVersionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MissingVersionException) RequestID() string { - return s.respMetadata.RequestID +func (s *MissingVersionException) RequestID() string { + return s.RespMetadata.RequestID } // Details on a volume mount point that is used in a container definition. @@ -13432,8 +13694,8 @@ func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface { // be because the agent is already running the latest version, or it is so old // that there is no update path to the current version. type NoUpdateAvailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13450,17 +13712,17 @@ func (s NoUpdateAvailableException) GoString() string { func newErrorNoUpdateAvailableException(v protocol.ResponseMetadata) error { return &NoUpdateAvailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoUpdateAvailableException) Code() string { +func (s *NoUpdateAvailableException) Code() string { return "NoUpdateAvailableException" } // Message returns the exception's message. -func (s NoUpdateAvailableException) Message() string { +func (s *NoUpdateAvailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13468,22 +13730,22 @@ func (s NoUpdateAvailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoUpdateAvailableException) OrigErr() error { +func (s *NoUpdateAvailableException) OrigErr() error { return nil } -func (s NoUpdateAvailableException) Error() string { +func (s *NoUpdateAvailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoUpdateAvailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoUpdateAvailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoUpdateAvailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoUpdateAvailableException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing a constraint on task placement. For more information, @@ -13635,8 +13897,8 @@ func (s *PlatformDevice) SetType(v string) *PlatformDevice { // The specified platform version does not satisfy the task definition's required // capabilities. type PlatformTaskDefinitionIncompatibilityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13653,17 +13915,17 @@ func (s PlatformTaskDefinitionIncompatibilityException) GoString() string { func newErrorPlatformTaskDefinitionIncompatibilityException(v protocol.ResponseMetadata) error { return &PlatformTaskDefinitionIncompatibilityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PlatformTaskDefinitionIncompatibilityException) Code() string { +func (s *PlatformTaskDefinitionIncompatibilityException) Code() string { return "PlatformTaskDefinitionIncompatibilityException" } // Message returns the exception's message. -func (s PlatformTaskDefinitionIncompatibilityException) Message() string { +func (s *PlatformTaskDefinitionIncompatibilityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13671,28 +13933,28 @@ func (s PlatformTaskDefinitionIncompatibilityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PlatformTaskDefinitionIncompatibilityException) OrigErr() error { +func (s *PlatformTaskDefinitionIncompatibilityException) OrigErr() error { return nil } -func (s PlatformTaskDefinitionIncompatibilityException) Error() string { +func (s *PlatformTaskDefinitionIncompatibilityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PlatformTaskDefinitionIncompatibilityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PlatformTaskDefinitionIncompatibilityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PlatformTaskDefinitionIncompatibilityException) RequestID() string { - return s.respMetadata.RequestID +func (s *PlatformTaskDefinitionIncompatibilityException) RequestID() string { + return s.RespMetadata.RequestID } // The specified platform version does not exist. type PlatformUnknownException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13709,17 +13971,17 @@ func (s PlatformUnknownException) GoString() string { func newErrorPlatformUnknownException(v protocol.ResponseMetadata) error { return &PlatformUnknownException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PlatformUnknownException) Code() string { +func (s *PlatformUnknownException) Code() string { return "PlatformUnknownException" } // Message returns the exception's message. -func (s PlatformUnknownException) Message() string { +func (s *PlatformUnknownException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13727,22 +13989,22 @@ func (s PlatformUnknownException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PlatformUnknownException) OrigErr() error { +func (s *PlatformUnknownException) OrigErr() error { return nil } -func (s PlatformUnknownException) Error() string { +func (s *PlatformUnknownException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PlatformUnknownException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PlatformUnknownException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PlatformUnknownException) RequestID() string { - return s.respMetadata.RequestID +func (s *PlatformUnknownException) RequestID() string { + return s.RespMetadata.RequestID } // Port mappings allow containers to access ports on the host container instance @@ -15065,8 +15327,8 @@ func (s *Resource) SetType(v string) *Resource { // The specified resource is in-use and cannot be removed. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15083,17 +15345,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15101,28 +15363,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource could not be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15139,17 +15401,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15157,22 +15419,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The type and amount of a resource to assign to a container. The supported @@ -15676,8 +15938,8 @@ func (s *Secret) SetValueFrom(v string) *Secret { // These errors are usually caused by a server issue. type ServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15694,17 +15956,17 @@ func (s ServerException) GoString() string { func newErrorServerException(v protocol.ResponseMetadata) error { return &ServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerException) Code() string { +func (s *ServerException) Code() string { return "ServerException" } // Message returns the exception's message. -func (s ServerException) Message() string { +func (s *ServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15712,22 +15974,22 @@ func (s ServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerException) OrigErr() error { +func (s *ServerException) OrigErr() error { return nil } -func (s ServerException) Error() string { +func (s *ServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerException) RequestID() string { + return s.RespMetadata.RequestID } // Details on a service within a cluster @@ -15831,9 +16093,11 @@ type Service struct { // and constraints to customize task placement decisions. // // * DAEMON-The daemon scheduling strategy deploys exactly one task on each - // container instance in your cluster. When you are using this strategy, - // do not specify a desired number of tasks or any task placement strategies. - // Fargate tasks do not support the DAEMON scheduling strategy. + // active container instance that meets all of the task placement constraints + // that you specify in your cluster. The service scheduler also evaluates + // the task placement constraints for running tasks and will stop tasks that + // do not meet the placement constraints. Fargate tasks do not support the + // DAEMON scheduling strategy. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` // The ARN that identifies the service. The ARN contains the arn:aws:ecs namespace, @@ -16123,8 +16387,8 @@ func (s *ServiceEvent) SetMessage(v string) *ServiceEvent { // The specified service is not active. You can't update a service that is inactive. // If you have previously deleted a service, you can re-create it with CreateService. type ServiceNotActiveException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16141,17 +16405,17 @@ func (s ServiceNotActiveException) GoString() string { func newErrorServiceNotActiveException(v protocol.ResponseMetadata) error { return &ServiceNotActiveException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceNotActiveException) Code() string { +func (s *ServiceNotActiveException) Code() string { return "ServiceNotActiveException" } // Message returns the exception's message. -func (s ServiceNotActiveException) Message() string { +func (s *ServiceNotActiveException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16159,29 +16423,29 @@ func (s ServiceNotActiveException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceNotActiveException) OrigErr() error { +func (s *ServiceNotActiveException) OrigErr() error { return nil } -func (s ServiceNotActiveException) Error() string { +func (s *ServiceNotActiveException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceNotActiveException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceNotActiveException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceNotActiveException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceNotActiveException) RequestID() string { + return s.RespMetadata.RequestID } // The specified service could not be found. You can view your available services // with ListServices. Amazon ECS services are cluster-specific and Region-specific. type ServiceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16198,17 +16462,17 @@ func (s ServiceNotFoundException) GoString() string { func newErrorServiceNotFoundException(v protocol.ResponseMetadata) error { return &ServiceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceNotFoundException) Code() string { +func (s *ServiceNotFoundException) Code() string { return "ServiceNotFoundException" } // Message returns the exception's message. -func (s ServiceNotFoundException) Message() string { +func (s *ServiceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16216,22 +16480,22 @@ func (s ServiceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceNotFoundException) OrigErr() error { +func (s *ServiceNotFoundException) OrigErr() error { return nil } -func (s ServiceNotFoundException) Error() string { +func (s *ServiceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Details of the service registry. @@ -17223,8 +17487,8 @@ func (s TagResourceOutput) GoString() string { // instances with ListContainerInstances. Amazon ECS container instances are // cluster-specific and Region-specific. type TargetNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17241,17 +17505,17 @@ func (s TargetNotFoundException) GoString() string { func newErrorTargetNotFoundException(v protocol.ResponseMetadata) error { return &TargetNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TargetNotFoundException) Code() string { +func (s *TargetNotFoundException) Code() string { return "TargetNotFoundException" } // Message returns the exception's message. -func (s TargetNotFoundException) Message() string { +func (s *TargetNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17259,22 +17523,22 @@ func (s TargetNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TargetNotFoundException) OrigErr() error { +func (s *TargetNotFoundException) OrigErr() error { return nil } -func (s TargetNotFoundException) Error() string { +func (s *TargetNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TargetNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TargetNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TargetNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *TargetNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Details on a task in a cluster. @@ -17906,7 +18170,7 @@ type TaskDefinition struct { // The short name or full Amazon Resource Name (ARN) of the AWS Identity and // Access Management (IAM) role that grants containers in the task permission // to call AWS APIs on your behalf. For more information, see Amazon ECS Task - // Role (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_IAM_role.html) + // Role (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) // in the Amazon Elastic Container Service Developer Guide. // // IAM roles for tasks on Windows require that the -EnableTaskIAMRole option @@ -18490,8 +18754,8 @@ func (s *TaskSet) SetUpdatedAt(v time.Time) *TaskSet { // sets with DescribeTaskSets. Task sets are specific to each cluster, service // and Region. type TaskSetNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18508,17 +18772,17 @@ func (s TaskSetNotFoundException) GoString() string { func newErrorTaskSetNotFoundException(v protocol.ResponseMetadata) error { return &TaskSetNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TaskSetNotFoundException) Code() string { +func (s *TaskSetNotFoundException) Code() string { return "TaskSetNotFoundException" } // Message returns the exception's message. -func (s TaskSetNotFoundException) Message() string { +func (s *TaskSetNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18526,22 +18790,22 @@ func (s TaskSetNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TaskSetNotFoundException) OrigErr() error { +func (s *TaskSetNotFoundException) OrigErr() error { return nil } -func (s TaskSetNotFoundException) Error() string { +func (s *TaskSetNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TaskSetNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TaskSetNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TaskSetNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *TaskSetNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The container path, mount options, and size of the tmpfs mount. @@ -18682,8 +18946,8 @@ func (s *Ulimit) SetSoftLimit(v int64) *Ulimit { // The specified task is not supported in this Region. type UnsupportedFeatureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18700,17 +18964,17 @@ func (s UnsupportedFeatureException) GoString() string { func newErrorUnsupportedFeatureException(v protocol.ResponseMetadata) error { return &UnsupportedFeatureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedFeatureException) Code() string { +func (s *UnsupportedFeatureException) Code() string { return "UnsupportedFeatureException" } // Message returns the exception's message. -func (s UnsupportedFeatureException) Message() string { +func (s *UnsupportedFeatureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18718,22 +18982,22 @@ func (s UnsupportedFeatureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedFeatureException) OrigErr() error { +func (s *UnsupportedFeatureException) OrigErr() error { return nil } -func (s UnsupportedFeatureException) Error() string { +func (s *UnsupportedFeatureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedFeatureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedFeatureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedFeatureException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedFeatureException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -19064,8 +19328,8 @@ func (s *UpdateContainerInstancesStateOutput) SetFailures(v []*Failure) *UpdateC // process can get stuck in that state. However, when the agent reconnects, // it resumes where it stopped previously. type UpdateInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19082,17 +19346,17 @@ func (s UpdateInProgressException) GoString() string { func newErrorUpdateInProgressException(v protocol.ResponseMetadata) error { return &UpdateInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UpdateInProgressException) Code() string { +func (s *UpdateInProgressException) Code() string { return "UpdateInProgressException" } // Message returns the exception's message. -func (s UpdateInProgressException) Message() string { +func (s *UpdateInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19100,22 +19364,22 @@ func (s UpdateInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UpdateInProgressException) OrigErr() error { +func (s *UpdateInProgressException) OrigErr() error { return nil } -func (s UpdateInProgressException) Error() string { +func (s *UpdateInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UpdateInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UpdateInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UpdateInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *UpdateInProgressException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateServiceInput struct { @@ -19124,9 +19388,28 @@ type UpdateServiceInput struct { // The capacity provider strategy to update the service to use. // // If the service is using the default capacity provider strategy for the cluster, - // the service can be updated to use one or more capacity providers. However, - // when a service is using a non-default capacity provider strategy, the service - // cannot be updated to use the cluster's default capacity provider strategy. + // the service can be updated to use one or more capacity providers as opposed + // to the default capacity provider strategy. However, when a service is using + // a capacity provider strategy that is not the default capacity provider strategy, + // the service cannot be updated to use the cluster's default capacity provider + // strategy. + // + // A capacity provider strategy consists of one or more capacity providers along + // with the base and weight to assign to them. A capacity provider must be associated + // with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders + // API is used to associate a capacity provider with a cluster. Only capacity + // providers with an ACTIVE or UPDATING status can be used. + // + // If specifying a capacity provider that uses an Auto Scaling group, the capacity + // provider must already be created. New capacity providers can be created with + // the CreateCapacityProvider API operation. + // + // To use a AWS Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT + // capacity providers. The AWS Fargate capacity providers are available to all + // accounts and only need to be associated with a cluster to be used. + // + // The PutClusterCapacityProviders API operation is used to update the list + // of available capacity providers for a cluster after the cluster is created. CapacityProviderStrategy []*CapacityProviderStrategyItem `locationName:"capacityProviderStrategy" type:"list"` // The short name or full Amazon Resource Name (ARN) of the cluster that your @@ -19163,6 +19446,25 @@ type UpdateServiceInput struct { // An object representing the network configuration for a task or service. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + // An array of task placement constraint objects to update the service to use. + // If no value is specified, the existing placement constraints for the service + // will remain unchanged. If this value is specified, it will override any existing + // placement constraints defined for the service. To remove all existing placement + // constraints, specify an empty array. + // + // You can specify a maximum of 10 constraints per task (this limit includes + // constraints in the task definition and those specified at runtime). + PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"` + + // The task placement strategy objects to update the service to use. If no value + // is specified, the existing placement strategy for the service will remain + // unchanged. If this value is specified, it will override the existing placement + // strategy defined for the service. To remove an existing placement strategy, + // specify an empty object. + // + // You can specify a maximum of five strategy rules per service. + PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` + // The platform version on which your tasks in the service are running. A platform // version is only specified for tasks using the Fargate launch type. If a platform // version is not specified, the LATEST platform version is used by default. @@ -19263,6 +19565,18 @@ func (s *UpdateServiceInput) SetNetworkConfiguration(v *NetworkConfiguration) *U return s } +// SetPlacementConstraints sets the PlacementConstraints field's value. +func (s *UpdateServiceInput) SetPlacementConstraints(v []*PlacementConstraint) *UpdateServiceInput { + s.PlacementConstraints = v + return s +} + +// SetPlacementStrategy sets the PlacementStrategy field's value. +func (s *UpdateServiceInput) SetPlacementStrategy(v []*PlacementStrategy) *UpdateServiceInput { + s.PlacementStrategy = v + return s +} + // SetPlatformVersion sets the PlatformVersion field's value. func (s *UpdateServiceInput) SetPlatformVersion(v string) *UpdateServiceInput { s.PlatformVersion = &v @@ -19823,6 +20137,27 @@ const ( DeviceCgroupPermissionMknod = "mknod" ) +const ( + // EFSAuthorizationConfigIAMEnabled is a EFSAuthorizationConfigIAM enum value + EFSAuthorizationConfigIAMEnabled = "ENABLED" + + // EFSAuthorizationConfigIAMDisabled is a EFSAuthorizationConfigIAM enum value + EFSAuthorizationConfigIAMDisabled = "DISABLED" +) + +const ( + // EFSTransitEncryptionEnabled is a EFSTransitEncryption enum value + EFSTransitEncryptionEnabled = "ENABLED" + + // EFSTransitEncryptionDisabled is a EFSTransitEncryption enum value + EFSTransitEncryptionDisabled = "DISABLED" +) + +const ( + // EnvironmentFileTypeS3 is a EnvironmentFileType enum value + EnvironmentFileTypeS3 = "s3" +) + const ( // FirelensConfigurationTypeFluentd is a FirelensConfigurationType enum value FirelensConfigurationTypeFluentd = "fluentd" 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 515a9d05855..c2bb5354400 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 @@ -2280,8 +2280,8 @@ func (c *EFS) PutFileSystemPolicyRequest(input *PutFileSystemPolicyInput) (req * // statements. A file system always has exactly one file system policy, which // can be the default policy or an explicit policy set or updated using this // API operation. When an explicit policy is set, it overrides the default policy. -// For more information about the default file system policy, see Using Resource-based -// Policies with EFS (https://docs.aws.amazon.com/efs/latest/ug/res-based-policies-efs.html). +// For more information about the default file system policy, see Default EFS +// File System Policy (https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html#default-filesystempolicy). // // This operation requires permissions for the elasticfilesystem:PutFileSystemPolicy // action. @@ -2749,8 +2749,8 @@ func (c *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSyst // Returned if the access point you are trying to create already exists, with // the creation token you provided in the request. type AccessPointAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // AccessPointId is a required field AccessPointId *string `type:"string" required:"true"` @@ -2773,17 +2773,17 @@ func (s AccessPointAlreadyExists) GoString() string { func newErrorAccessPointAlreadyExists(v protocol.ResponseMetadata) error { return &AccessPointAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessPointAlreadyExists) Code() string { +func (s *AccessPointAlreadyExists) Code() string { return "AccessPointAlreadyExists" } // Message returns the exception's message. -func (s AccessPointAlreadyExists) Message() string { +func (s *AccessPointAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2791,22 +2791,22 @@ func (s AccessPointAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessPointAlreadyExists) OrigErr() error { +func (s *AccessPointAlreadyExists) OrigErr() error { return nil } -func (s AccessPointAlreadyExists) Error() string { +func (s *AccessPointAlreadyExists) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessPointAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessPointAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessPointAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessPointAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // Provides a description of an EFS file system access point. @@ -2920,8 +2920,8 @@ func (s *AccessPointDescription) SetTags(v []*Tag) *AccessPointDescription { // Returned if the AWS account has already created the maximum number of access // points allowed per file system. type AccessPointLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -2941,17 +2941,17 @@ func (s AccessPointLimitExceeded) GoString() string { func newErrorAccessPointLimitExceeded(v protocol.ResponseMetadata) error { return &AccessPointLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessPointLimitExceeded) Code() string { +func (s *AccessPointLimitExceeded) Code() string { return "AccessPointLimitExceeded" } // Message returns the exception's message. -func (s AccessPointLimitExceeded) Message() string { +func (s *AccessPointLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2959,29 +2959,29 @@ func (s AccessPointLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessPointLimitExceeded) OrigErr() error { +func (s *AccessPointLimitExceeded) OrigErr() error { return nil } -func (s AccessPointLimitExceeded) Error() string { +func (s *AccessPointLimitExceeded) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessPointLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessPointLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessPointLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessPointLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the specified AccessPointId value doesn't exist in the requester's // AWS account. type AccessPointNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -3001,17 +3001,17 @@ func (s AccessPointNotFound) GoString() string { func newErrorAccessPointNotFound(v protocol.ResponseMetadata) error { return &AccessPointNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessPointNotFound) Code() string { +func (s *AccessPointNotFound) Code() string { return "AccessPointNotFound" } // Message returns the exception's message. -func (s AccessPointNotFound) Message() string { +func (s *AccessPointNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3019,29 +3019,29 @@ func (s AccessPointNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessPointNotFound) OrigErr() error { +func (s *AccessPointNotFound) OrigErr() error { return nil } -func (s AccessPointNotFound) Error() string { +func (s *AccessPointNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessPointNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessPointNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessPointNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessPointNotFound) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the request is malformed or contains an error such as an invalid // parameter value or a missing required parameter. type BadRequest struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -3061,17 +3061,17 @@ func (s BadRequest) GoString() string { func newErrorBadRequest(v protocol.ResponseMetadata) error { return &BadRequest{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequest) Code() string { +func (s *BadRequest) Code() string { return "BadRequest" } // Message returns the exception's message. -func (s BadRequest) Message() string { +func (s *BadRequest) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3079,22 +3079,22 @@ func (s BadRequest) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequest) OrigErr() error { +func (s *BadRequest) OrigErr() error { return nil } -func (s BadRequest) Error() string { +func (s *BadRequest) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequest) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequest) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequest) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequest) RequestID() string { + return s.RespMetadata.RequestID } type CreateAccessPointInput struct { @@ -3340,6 +3340,9 @@ type CreateFileSystemInput struct { // // If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter // must be set to true. + // + // EFS accepts only symmetric CMKs. You cannot use asymmetric CMKs with EFS + // file systems. KmsKeyId *string `min:"1" type:"string"` // The performance mode of the file system. We recommend generalPurpose performance @@ -3977,8 +3980,8 @@ func (s DeleteTagsOutput) GoString() string { // The service timed out trying to fulfill the request, and the client should // try the call again. type DependencyTimeout struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -3998,17 +4001,17 @@ func (s DependencyTimeout) GoString() string { func newErrorDependencyTimeout(v protocol.ResponseMetadata) error { return &DependencyTimeout{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DependencyTimeout) Code() string { +func (s *DependencyTimeout) Code() string { return "DependencyTimeout" } // Message returns the exception's message. -func (s DependencyTimeout) Message() string { +func (s *DependencyTimeout) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4016,22 +4019,22 @@ func (s DependencyTimeout) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DependencyTimeout) OrigErr() error { +func (s *DependencyTimeout) OrigErr() error { return nil } -func (s DependencyTimeout) Error() string { +func (s *DependencyTimeout) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DependencyTimeout) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DependencyTimeout) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DependencyTimeout) RequestID() string { - return s.respMetadata.RequestID +func (s *DependencyTimeout) RequestID() string { + return s.RespMetadata.RequestID } type DescribeAccessPointsInput struct { @@ -4699,8 +4702,8 @@ func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { // Returned if the file system you are trying to create already exists, with // the creation token you provided. type FileSystemAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -4723,17 +4726,17 @@ func (s FileSystemAlreadyExists) GoString() string { func newErrorFileSystemAlreadyExists(v protocol.ResponseMetadata) error { return &FileSystemAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileSystemAlreadyExists) Code() string { +func (s *FileSystemAlreadyExists) Code() string { return "FileSystemAlreadyExists" } // Message returns the exception's message. -func (s FileSystemAlreadyExists) Message() string { +func (s *FileSystemAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4741,22 +4744,22 @@ func (s FileSystemAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileSystemAlreadyExists) OrigErr() error { +func (s *FileSystemAlreadyExists) OrigErr() error { return nil } -func (s FileSystemAlreadyExists) Error() string { +func (s *FileSystemAlreadyExists) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s FileSystemAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileSystemAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileSystemAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *FileSystemAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // A description of the file system. @@ -4943,8 +4946,8 @@ func (s *FileSystemDescription) SetThroughputMode(v string) *FileSystemDescripti // Returned if a file system has mount targets. type FileSystemInUse struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -4964,17 +4967,17 @@ func (s FileSystemInUse) GoString() string { func newErrorFileSystemInUse(v protocol.ResponseMetadata) error { return &FileSystemInUse{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileSystemInUse) Code() string { +func (s *FileSystemInUse) Code() string { return "FileSystemInUse" } // Message returns the exception's message. -func (s FileSystemInUse) Message() string { +func (s *FileSystemInUse) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4982,29 +4985,29 @@ func (s FileSystemInUse) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileSystemInUse) OrigErr() error { +func (s *FileSystemInUse) OrigErr() error { return nil } -func (s FileSystemInUse) Error() string { +func (s *FileSystemInUse) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s FileSystemInUse) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileSystemInUse) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileSystemInUse) RequestID() string { - return s.respMetadata.RequestID +func (s *FileSystemInUse) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the AWS account has already created the maximum number of file // systems allowed per account. type FileSystemLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5024,17 +5027,17 @@ func (s FileSystemLimitExceeded) GoString() string { func newErrorFileSystemLimitExceeded(v protocol.ResponseMetadata) error { return &FileSystemLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileSystemLimitExceeded) Code() string { +func (s *FileSystemLimitExceeded) Code() string { return "FileSystemLimitExceeded" } // Message returns the exception's message. -func (s FileSystemLimitExceeded) Message() string { +func (s *FileSystemLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5042,29 +5045,29 @@ func (s FileSystemLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileSystemLimitExceeded) OrigErr() error { +func (s *FileSystemLimitExceeded) OrigErr() error { return nil } -func (s FileSystemLimitExceeded) Error() string { +func (s *FileSystemLimitExceeded) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s FileSystemLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileSystemLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileSystemLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *FileSystemLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. type FileSystemNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5084,17 +5087,17 @@ func (s FileSystemNotFound) GoString() string { func newErrorFileSystemNotFound(v protocol.ResponseMetadata) error { return &FileSystemNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileSystemNotFound) Code() string { +func (s *FileSystemNotFound) Code() string { return "FileSystemNotFound" } // Message returns the exception's message. -func (s FileSystemNotFound) Message() string { +func (s *FileSystemNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5102,22 +5105,22 @@ func (s FileSystemNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileSystemNotFound) OrigErr() error { +func (s *FileSystemNotFound) OrigErr() error { return nil } -func (s FileSystemNotFound) Error() string { +func (s *FileSystemNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s FileSystemNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileSystemNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileSystemNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *FileSystemNotFound) RequestID() string { + return s.RespMetadata.RequestID } // The latest known metered size (in bytes) of data stored in the file system, @@ -5185,8 +5188,8 @@ func (s *FileSystemSize) SetValueInStandard(v int64) *FileSystemSize { // Returned if the file system's lifecycle state is not "available". type IncorrectFileSystemLifeCycleState struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5206,17 +5209,17 @@ func (s IncorrectFileSystemLifeCycleState) GoString() string { func newErrorIncorrectFileSystemLifeCycleState(v protocol.ResponseMetadata) error { return &IncorrectFileSystemLifeCycleState{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncorrectFileSystemLifeCycleState) Code() string { +func (s *IncorrectFileSystemLifeCycleState) Code() string { return "IncorrectFileSystemLifeCycleState" } // Message returns the exception's message. -func (s IncorrectFileSystemLifeCycleState) Message() string { +func (s *IncorrectFileSystemLifeCycleState) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5224,28 +5227,28 @@ func (s IncorrectFileSystemLifeCycleState) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncorrectFileSystemLifeCycleState) OrigErr() error { +func (s *IncorrectFileSystemLifeCycleState) OrigErr() error { return nil } -func (s IncorrectFileSystemLifeCycleState) Error() string { +func (s *IncorrectFileSystemLifeCycleState) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s IncorrectFileSystemLifeCycleState) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncorrectFileSystemLifeCycleState) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncorrectFileSystemLifeCycleState) RequestID() string { - return s.respMetadata.RequestID +func (s *IncorrectFileSystemLifeCycleState) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the mount target is not in the correct state for the operation. type IncorrectMountTargetState struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5265,17 +5268,17 @@ func (s IncorrectMountTargetState) GoString() string { func newErrorIncorrectMountTargetState(v protocol.ResponseMetadata) error { return &IncorrectMountTargetState{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncorrectMountTargetState) Code() string { +func (s *IncorrectMountTargetState) Code() string { return "IncorrectMountTargetState" } // Message returns the exception's message. -func (s IncorrectMountTargetState) Message() string { +func (s *IncorrectMountTargetState) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5283,22 +5286,22 @@ func (s IncorrectMountTargetState) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncorrectMountTargetState) OrigErr() error { +func (s *IncorrectMountTargetState) OrigErr() error { return nil } -func (s IncorrectMountTargetState) Error() string { +func (s *IncorrectMountTargetState) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s IncorrectMountTargetState) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncorrectMountTargetState) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncorrectMountTargetState) RequestID() string { - return s.respMetadata.RequestID +func (s *IncorrectMountTargetState) RequestID() string { + return s.RespMetadata.RequestID } // Returned if there's not enough capacity to provision additional throughput. @@ -5307,8 +5310,8 @@ func (s IncorrectMountTargetState) RequestID() string { // of an existing file system, or when you attempt to change an existing file // system from bursting to provisioned throughput mode. type InsufficientThroughputCapacity struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5328,17 +5331,17 @@ func (s InsufficientThroughputCapacity) GoString() string { func newErrorInsufficientThroughputCapacity(v protocol.ResponseMetadata) error { return &InsufficientThroughputCapacity{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientThroughputCapacity) Code() string { +func (s *InsufficientThroughputCapacity) Code() string { return "InsufficientThroughputCapacity" } // Message returns the exception's message. -func (s InsufficientThroughputCapacity) Message() string { +func (s *InsufficientThroughputCapacity) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5346,28 +5349,28 @@ func (s InsufficientThroughputCapacity) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientThroughputCapacity) OrigErr() error { +func (s *InsufficientThroughputCapacity) OrigErr() error { return nil } -func (s InsufficientThroughputCapacity) Error() string { +func (s *InsufficientThroughputCapacity) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientThroughputCapacity) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientThroughputCapacity) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientThroughputCapacity) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientThroughputCapacity) RequestID() string { + return s.RespMetadata.RequestID } // Returned if an error occurred on the server side. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5387,17 +5390,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5405,30 +5408,30 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the FileSystemPolicy is is malformed or contains an error such // as an invalid parameter value or a missing required parameter. Returned in // the case of a policy lockout safety check error. type InvalidPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorCode *string `min:"1" type:"string"` @@ -5447,17 +5450,17 @@ func (s InvalidPolicyException) GoString() string { func newErrorInvalidPolicyException(v protocol.ResponseMetadata) error { return &InvalidPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPolicyException) Code() string { +func (s *InvalidPolicyException) Code() string { return "InvalidPolicyException" } // Message returns the exception's message. -func (s InvalidPolicyException) Message() string { +func (s *InvalidPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5465,29 +5468,29 @@ func (s InvalidPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPolicyException) OrigErr() error { +func (s *InvalidPolicyException) OrigErr() error { return nil } -func (s InvalidPolicyException) Error() string { +func (s *InvalidPolicyException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the request specified an IpAddress that is already in use in // the subnet. type IpAddressInUse struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5507,17 +5510,17 @@ func (s IpAddressInUse) GoString() string { func newErrorIpAddressInUse(v protocol.ResponseMetadata) error { return &IpAddressInUse{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IpAddressInUse) Code() string { +func (s *IpAddressInUse) Code() string { return "IpAddressInUse" } // Message returns the exception's message. -func (s IpAddressInUse) Message() string { +func (s *IpAddressInUse) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5525,22 +5528,22 @@ func (s IpAddressInUse) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IpAddressInUse) OrigErr() error { +func (s *IpAddressInUse) OrigErr() error { return nil } -func (s IpAddressInUse) Error() string { +func (s *IpAddressInUse) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s IpAddressInUse) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IpAddressInUse) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IpAddressInUse) RequestID() string { - return s.respMetadata.RequestID +func (s *IpAddressInUse) RequestID() string { + return s.RespMetadata.RequestID } // Describes a policy used by EFS lifecycle management to transition files to @@ -5735,8 +5738,8 @@ func (s ModifyMountTargetSecurityGroupsOutput) GoString() string { // Returned if the mount target would violate one of the specified restrictions // based on the file system's existing mount targets. type MountTargetConflict struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5756,17 +5759,17 @@ func (s MountTargetConflict) GoString() string { func newErrorMountTargetConflict(v protocol.ResponseMetadata) error { return &MountTargetConflict{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MountTargetConflict) Code() string { +func (s *MountTargetConflict) Code() string { return "MountTargetConflict" } // Message returns the exception's message. -func (s MountTargetConflict) Message() string { +func (s *MountTargetConflict) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5774,22 +5777,22 @@ func (s MountTargetConflict) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MountTargetConflict) OrigErr() error { +func (s *MountTargetConflict) OrigErr() error { return nil } -func (s MountTargetConflict) Error() string { +func (s *MountTargetConflict) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s MountTargetConflict) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MountTargetConflict) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MountTargetConflict) RequestID() string { - return s.respMetadata.RequestID +func (s *MountTargetConflict) RequestID() string { + return s.RespMetadata.RequestID } // Provides a description of a mount target. @@ -5905,8 +5908,8 @@ func (s *MountTargetDescription) SetSubnetId(v string) *MountTargetDescription { // Returned if there is no mount target with the specified ID found in the caller's // account. type MountTargetNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5926,17 +5929,17 @@ func (s MountTargetNotFound) GoString() string { func newErrorMountTargetNotFound(v protocol.ResponseMetadata) error { return &MountTargetNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MountTargetNotFound) Code() string { +func (s *MountTargetNotFound) Code() string { return "MountTargetNotFound" } // Message returns the exception's message. -func (s MountTargetNotFound) Message() string { +func (s *MountTargetNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5944,22 +5947,22 @@ func (s MountTargetNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MountTargetNotFound) OrigErr() error { +func (s *MountTargetNotFound) OrigErr() error { return nil } -func (s MountTargetNotFound) Error() string { +func (s *MountTargetNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s MountTargetNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MountTargetNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MountTargetNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *MountTargetNotFound) RequestID() string { + return s.RespMetadata.RequestID } // The calling account has reached the limit for elastic network interfaces @@ -5969,8 +5972,8 @@ func (s MountTargetNotFound) RequestID() string { // in the Amazon VPC User Guide (see the Network interfaces per VPC entry in // the table). type NetworkInterfaceLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -5990,17 +5993,17 @@ func (s NetworkInterfaceLimitExceeded) GoString() string { func newErrorNetworkInterfaceLimitExceeded(v protocol.ResponseMetadata) error { return &NetworkInterfaceLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NetworkInterfaceLimitExceeded) Code() string { +func (s *NetworkInterfaceLimitExceeded) Code() string { return "NetworkInterfaceLimitExceeded" } // Message returns the exception's message. -func (s NetworkInterfaceLimitExceeded) Message() string { +func (s *NetworkInterfaceLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6008,29 +6011,29 @@ func (s NetworkInterfaceLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NetworkInterfaceLimitExceeded) OrigErr() error { +func (s *NetworkInterfaceLimitExceeded) OrigErr() error { return nil } -func (s NetworkInterfaceLimitExceeded) Error() string { +func (s *NetworkInterfaceLimitExceeded) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NetworkInterfaceLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NetworkInterfaceLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NetworkInterfaceLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *NetworkInterfaceLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Returned if IpAddress was not specified in the request and there are no free // IP addresses in the subnet. type NoFreeAddressesInSubnet struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6050,17 +6053,17 @@ func (s NoFreeAddressesInSubnet) GoString() string { func newErrorNoFreeAddressesInSubnet(v protocol.ResponseMetadata) error { return &NoFreeAddressesInSubnet{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoFreeAddressesInSubnet) Code() string { +func (s *NoFreeAddressesInSubnet) Code() string { return "NoFreeAddressesInSubnet" } // Message returns the exception's message. -func (s NoFreeAddressesInSubnet) Message() string { +func (s *NoFreeAddressesInSubnet) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6068,29 +6071,29 @@ func (s NoFreeAddressesInSubnet) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoFreeAddressesInSubnet) OrigErr() error { +func (s *NoFreeAddressesInSubnet) OrigErr() error { return nil } -func (s NoFreeAddressesInSubnet) Error() string { +func (s *NoFreeAddressesInSubnet) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NoFreeAddressesInSubnet) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoFreeAddressesInSubnet) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoFreeAddressesInSubnet) RequestID() string { - return s.respMetadata.RequestID +func (s *NoFreeAddressesInSubnet) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the default file system policy is in effect for the EFS file // system specified. type PolicyNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorCode *string `min:"1" type:"string"` @@ -6109,17 +6112,17 @@ func (s PolicyNotFound) GoString() string { func newErrorPolicyNotFound(v protocol.ResponseMetadata) error { return &PolicyNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyNotFound) Code() string { +func (s *PolicyNotFound) Code() string { return "PolicyNotFound" } // Message returns the exception's message. -func (s PolicyNotFound) Message() string { +func (s *PolicyNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6127,22 +6130,22 @@ func (s PolicyNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyNotFound) OrigErr() error { +func (s *PolicyNotFound) OrigErr() error { return nil } -func (s PolicyNotFound) Error() string { +func (s *PolicyNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyNotFound) RequestID() string { + return s.RespMetadata.RequestID } // The full POSIX identity, including the user ID, group ID, and any secondary @@ -6468,8 +6471,8 @@ func (s *RootDirectory) SetPath(v string) *RootDirectory { // Returned if the size of SecurityGroups specified in the request is greater // than five. type SecurityGroupLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6489,17 +6492,17 @@ func (s SecurityGroupLimitExceeded) GoString() string { func newErrorSecurityGroupLimitExceeded(v protocol.ResponseMetadata) error { return &SecurityGroupLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SecurityGroupLimitExceeded) Code() string { +func (s *SecurityGroupLimitExceeded) Code() string { return "SecurityGroupLimitExceeded" } // Message returns the exception's message. -func (s SecurityGroupLimitExceeded) Message() string { +func (s *SecurityGroupLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6507,29 +6510,29 @@ func (s SecurityGroupLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SecurityGroupLimitExceeded) OrigErr() error { +func (s *SecurityGroupLimitExceeded) OrigErr() error { return nil } -func (s SecurityGroupLimitExceeded) Error() string { +func (s *SecurityGroupLimitExceeded) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s SecurityGroupLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SecurityGroupLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SecurityGroupLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *SecurityGroupLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Returned if one of the specified security groups doesn't exist in the subnet's // VPC. type SecurityGroupNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6549,17 +6552,17 @@ func (s SecurityGroupNotFound) GoString() string { func newErrorSecurityGroupNotFound(v protocol.ResponseMetadata) error { return &SecurityGroupNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SecurityGroupNotFound) Code() string { +func (s *SecurityGroupNotFound) Code() string { return "SecurityGroupNotFound" } // Message returns the exception's message. -func (s SecurityGroupNotFound) Message() string { +func (s *SecurityGroupNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6567,28 +6570,28 @@ func (s SecurityGroupNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SecurityGroupNotFound) OrigErr() error { +func (s *SecurityGroupNotFound) OrigErr() error { return nil } -func (s SecurityGroupNotFound) Error() string { +func (s *SecurityGroupNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s SecurityGroupNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SecurityGroupNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SecurityGroupNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *SecurityGroupNotFound) RequestID() string { + return s.RespMetadata.RequestID } // Returned if there is no subnet with ID SubnetId provided in the request. type SubnetNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6608,17 +6611,17 @@ func (s SubnetNotFound) GoString() string { func newErrorSubnetNotFound(v protocol.ResponseMetadata) error { return &SubnetNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetNotFound) Code() string { +func (s *SubnetNotFound) Code() string { return "SubnetNotFound" } // Message returns the exception's message. -func (s SubnetNotFound) Message() string { +func (s *SubnetNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6626,22 +6629,22 @@ func (s SubnetNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetNotFound) OrigErr() error { +func (s *SubnetNotFound) OrigErr() error { return nil } -func (s SubnetNotFound) Error() string { +func (s *SubnetNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetNotFound) RequestID() string { + return s.RespMetadata.RequestID } // A tag is a key-value pair. Allowed characters are letters, white space, and @@ -6782,8 +6785,8 @@ func (s TagResourceOutput) GoString() string { // Returned if the throughput mode or amount of provisioned throughput can't // be changed because the throughput limit of 1024 MiB/s has been reached. type ThroughputLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6803,17 +6806,17 @@ func (s ThroughputLimitExceeded) GoString() string { func newErrorThroughputLimitExceeded(v protocol.ResponseMetadata) error { return &ThroughputLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThroughputLimitExceeded) Code() string { +func (s *ThroughputLimitExceeded) Code() string { return "ThroughputLimitExceeded" } // Message returns the exception's message. -func (s ThroughputLimitExceeded) Message() string { +func (s *ThroughputLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6821,29 +6824,29 @@ func (s ThroughputLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThroughputLimitExceeded) OrigErr() error { +func (s *ThroughputLimitExceeded) OrigErr() error { return nil } -func (s ThroughputLimitExceeded) Error() string { +func (s *ThroughputLimitExceeded) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ThroughputLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThroughputLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThroughputLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ThroughputLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Returned if you don’t wait at least 24 hours before changing the throughput // mode, or decreasing the Provisioned Throughput value. type TooManyRequests struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6863,17 +6866,17 @@ func (s TooManyRequests) GoString() string { func newErrorTooManyRequests(v protocol.ResponseMetadata) error { return &TooManyRequests{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequests) Code() string { +func (s *TooManyRequests) Code() string { return "TooManyRequests" } // Message returns the exception's message. -func (s TooManyRequests) Message() string { +func (s *TooManyRequests) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6881,27 +6884,27 @@ func (s TooManyRequests) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequests) OrigErr() error { +func (s *TooManyRequests) OrigErr() error { return nil } -func (s TooManyRequests) Error() string { +func (s *TooManyRequests) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequests) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequests) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequests) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequests) RequestID() string { + return s.RespMetadata.RequestID } type UnsupportedAvailabilityZone struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // ErrorCode is a required field ErrorCode *string `min:"1" type:"string" required:"true"` @@ -6921,17 +6924,17 @@ func (s UnsupportedAvailabilityZone) GoString() string { func newErrorUnsupportedAvailabilityZone(v protocol.ResponseMetadata) error { return &UnsupportedAvailabilityZone{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedAvailabilityZone) Code() string { +func (s *UnsupportedAvailabilityZone) Code() string { return "UnsupportedAvailabilityZone" } // Message returns the exception's message. -func (s UnsupportedAvailabilityZone) Message() string { +func (s *UnsupportedAvailabilityZone) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6939,22 +6942,22 @@ func (s UnsupportedAvailabilityZone) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedAvailabilityZone) OrigErr() error { +func (s *UnsupportedAvailabilityZone) OrigErr() error { return nil } -func (s UnsupportedAvailabilityZone) Error() string { +func (s *UnsupportedAvailabilityZone) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedAvailabilityZone) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedAvailabilityZone) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedAvailabilityZone) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedAvailabilityZone) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -6967,7 +6970,9 @@ type UntagResourceInput struct { // The keys of the key:value tag pairs that you want to remove from the specified // EFS resource. - TagKeys []*string `min:"1" type:"list"` + // + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"` } // String returns the string representation @@ -6989,6 +6994,9 @@ func (s *UntagResourceInput) Validate() error { if s.ResourceId != nil && len(*s.ResourceId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } if s.TagKeys != nil && len(s.TagKeys) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go index b37ef9e7de7..5c5f2e20ac1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -452,7 +452,8 @@ func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // in the Amazon EKS User Guide. // // If you have managed node groups or Fargate profiles attached to the cluster, -// you must delete them first. For more information, see DeleteNodegroup andDeleteFargateProfile. +// you must delete them first. For more information, see DeleteNodegroup and +// DeleteFargateProfile. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1443,8 +1444,9 @@ func (c *EKS) ListNodegroupsRequest(input *ListNodegroupsInput) (req *request.Re // ListNodegroups API operation for Amazon Elastic Kubernetes Service. // -// Lists the Amazon EKS node groups associated with the specified cluster in -// your AWS account in the specified Region. +// Lists the Amazon EKS managed node groups associated with the specified cluster +// in your AWS account in the specified Region. Self-managed node groups are +// not listed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2449,8 +2451,8 @@ func (s *AutoScalingGroup) SetName(v string) *AutoScalingGroup { // This exception is thrown if the request contains a semantic error. The precise // meaning will depend on the API, and will be documented in the error message. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2467,17 +2469,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2485,22 +2487,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing the certificate-authority-data for your cluster. @@ -2533,8 +2535,8 @@ func (s *Certificate) SetData(v string) *Certificate { // an action or resource on behalf of a user that doesn't have permissions to // use the action or resource or specifying an identifier that is not valid. type ClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -2557,17 +2559,17 @@ func (s ClientException) GoString() string { func newErrorClientException(v protocol.ResponseMetadata) error { return &ClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientException) Code() string { +func (s *ClientException) Code() string { return "ClientException" } // Message returns the exception's message. -func (s ClientException) Message() string { +func (s *ClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2575,22 +2577,22 @@ func (s ClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientException) OrigErr() error { +func (s *ClientException) OrigErr() error { return nil } -func (s ClientException) Error() string { +func (s *ClientException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing an Amazon EKS cluster. @@ -3092,12 +3094,13 @@ type CreateNodegroupInput struct { // are created. Labels map[string]*string `locationName:"labels" type:"map"` - // The IAM role associated with your node group. The Amazon EKS worker node - // kubelet daemon makes calls to AWS APIs on your behalf. Worker nodes receive - // permissions for these API calls through an IAM instance profile and associated - // policies. Before you can launch worker nodes and register them into a cluster, - // you must create an IAM role for those worker nodes to use when they are launched. - // For more information, see Amazon EKS Worker Node IAM Role (https://docs.aws.amazon.com/eks/latest/userguide/worker_node_IAM_role.html) + // The Amazon Resource Name (ARN) of the IAM role to associate with your node + // group. The Amazon EKS worker node kubelet daemon makes calls to AWS APIs + // on your behalf. Worker nodes receive permissions for these API calls through + // an IAM instance profile and associated policies. Before you can launch worker + // nodes and register them into a cluster, you must create an IAM role for those + // worker nodes to use when they are launched. For more information, see Amazon + // EKS Worker Node IAM Role (https://docs.aws.amazon.com/eks/latest/userguide/worker_node_IAM_role.html) // in the Amazon EKS User Guide . // // NodeRole is a required field @@ -4095,8 +4098,8 @@ func (s *Identity) SetOidc(v *OIDC) *Identity { // The specified parameter is invalid. Review the available parameters for the // API request. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -4122,17 +4125,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4140,29 +4143,29 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The request is invalid given the state of the cluster. Check the state of // the cluster and the associated operations. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -4185,17 +4188,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4203,22 +4206,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing an issue with an Amazon EKS resource. @@ -5197,8 +5200,8 @@ func (s *NodegroupScalingConfig) SetMinSize(v int64) *NodegroupScalingConfig { // A service resource associated with the request could not be found. Clients // should not retry such requests. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5215,17 +5218,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5233,22 +5236,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An object representing the OpenID Connect (https://openid.net/connect/) identity @@ -5350,8 +5353,8 @@ func (s *RemoteAccessConfig) SetSourceSecurityGroups(v []*string) *RemoteAccessC // The specified resource is in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -5374,17 +5377,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5392,28 +5395,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // You have encountered a service limit on the specified resource. type ResourceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -5436,17 +5439,17 @@ func (s ResourceLimitExceededException) GoString() string { func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceededException) Code() string { +func (s *ResourceLimitExceededException) Code() string { return "ResourceLimitExceededException" } // Message returns the exception's message. -func (s ResourceLimitExceededException) Message() string { +func (s *ResourceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5454,30 +5457,30 @@ func (s ResourceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceededException) OrigErr() error { +func (s *ResourceLimitExceededException) OrigErr() error { return nil } -func (s ResourceLimitExceededException) Error() string { +func (s *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource could not be found. You can view your available clusters // with ListClusters. You can view your available managed node groups with ListNodegroups. // Amazon EKS clusters and node groups are Region-specific. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -5503,17 +5506,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5521,28 +5524,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // These errors are usually caused by a server-side issue. type ServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -5565,17 +5568,17 @@ func (s ServerException) GoString() string { func newErrorServerException(v protocol.ResponseMetadata) error { return &ServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerException) Code() string { +func (s *ServerException) Code() string { return "ServerException" } // Message returns the exception's message. -func (s ServerException) Message() string { +func (s *ServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5583,28 +5586,28 @@ func (s ServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerException) OrigErr() error { +func (s *ServerException) OrigErr() error { return nil } -func (s ServerException) Error() string { +func (s *ServerException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerException) RequestID() string { + return s.RespMetadata.RequestID } // The service is unavailable. Back off and retry the operation. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5621,17 +5624,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5639,22 +5642,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -5735,8 +5738,8 @@ func (s TagResourceOutput) GoString() string { // Availability Zones for your account, from which you can choose subnets for // your cluster. type UnsupportedAvailabilityZoneException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The Amazon EKS cluster associated with the exception. ClusterName *string `locationName:"clusterName" type:"string"` @@ -5763,17 +5766,17 @@ func (s UnsupportedAvailabilityZoneException) GoString() string { func newErrorUnsupportedAvailabilityZoneException(v protocol.ResponseMetadata) error { return &UnsupportedAvailabilityZoneException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedAvailabilityZoneException) Code() string { +func (s *UnsupportedAvailabilityZoneException) Code() string { return "UnsupportedAvailabilityZoneException" } // Message returns the exception's message. -func (s UnsupportedAvailabilityZoneException) Message() string { +func (s *UnsupportedAvailabilityZoneException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5781,22 +5784,22 @@ func (s UnsupportedAvailabilityZoneException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedAvailabilityZoneException) OrigErr() error { +func (s *UnsupportedAvailabilityZoneException) OrigErr() error { return nil } -func (s UnsupportedAvailabilityZoneException) Error() string { +func (s *UnsupportedAvailabilityZoneException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedAvailabilityZoneException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedAvailabilityZoneException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedAvailabilityZoneException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedAvailabilityZoneException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -6742,12 +6745,21 @@ const ( // NodegroupIssueCodeEc2subnetNotFound is a NodegroupIssueCode enum value NodegroupIssueCodeEc2subnetNotFound = "Ec2SubnetNotFound" + // NodegroupIssueCodeEc2subnetInvalidConfiguration is a NodegroupIssueCode enum value + NodegroupIssueCodeEc2subnetInvalidConfiguration = "Ec2SubnetInvalidConfiguration" + // NodegroupIssueCodeIamInstanceProfileNotFound is a NodegroupIssueCode enum value NodegroupIssueCodeIamInstanceProfileNotFound = "IamInstanceProfileNotFound" + // NodegroupIssueCodeIamLimitExceeded is a NodegroupIssueCode enum value + NodegroupIssueCodeIamLimitExceeded = "IamLimitExceeded" + // NodegroupIssueCodeIamNodeRoleNotFound is a NodegroupIssueCode enum value NodegroupIssueCodeIamNodeRoleNotFound = "IamNodeRoleNotFound" + // NodegroupIssueCodeNodeCreationFailure is a NodegroupIssueCode enum value + NodegroupIssueCodeNodeCreationFailure = "NodeCreationFailure" + // NodegroupIssueCodeAsgInstanceLaunchFailures is a NodegroupIssueCode enum value NodegroupIssueCodeAsgInstanceLaunchFailures = "AsgInstanceLaunchFailures" 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 d72e03e5ed4..259ff9518e1 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 @@ -1039,6 +1039,106 @@ func (c *ElastiCache) CreateCacheSubnetGroupWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateGlobalReplicationGroup = "CreateGlobalReplicationGroup" + +// CreateGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateGlobalReplicationGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGlobalReplicationGroup for more information on using the CreateGlobalReplicationGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGlobalReplicationGroupRequest method. +// req, resp := client.CreateGlobalReplicationGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateGlobalReplicationGroup +func (c *ElastiCache) CreateGlobalReplicationGroupRequest(input *CreateGlobalReplicationGroupInput) (req *request.Request, output *CreateGlobalReplicationGroupOutput) { + op := &request.Operation{ + Name: opCreateGlobalReplicationGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateGlobalReplicationGroupInput{} + } + + output = &CreateGlobalReplicationGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGlobalReplicationGroup API operation for Amazon ElastiCache. +// +// Global Datastore for Redis offers fully managed, fast, reliable and secure +// cross-region replication. Using Global Datastore for Redis, you can create +// cross-region read replica clusters for ElastiCache for Redis to enable low-latency +// reads and disaster recovery across regions. For more information, see Replication +// Across Regions Using Global Datastore (/AmazonElastiCache/latest/red-ug/Redis-Global-Clusters.html). +// +// * The GlobalReplicationGroupIdSuffix is the name of the Global Datastore. +// +// * The PrimaryReplicationGroupId represents the name of the primary cluster +// that accepts writes and will replicate updates to the secondary cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation CreateGlobalReplicationGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeGlobalReplicationGroupAlreadyExistsFault "GlobalReplicationGroupAlreadyExistsFault" +// The Global Datastore name already exists. +// +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// The specified service linked role (SLR) was not found. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CreateGlobalReplicationGroup +func (c *ElastiCache) CreateGlobalReplicationGroup(input *CreateGlobalReplicationGroupInput) (*CreateGlobalReplicationGroupOutput, error) { + req, out := c.CreateGlobalReplicationGroupRequest(input) + return out, req.Send() +} + +// CreateGlobalReplicationGroupWithContext is the same as CreateGlobalReplicationGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGlobalReplicationGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) CreateGlobalReplicationGroupWithContext(ctx aws.Context, input *CreateGlobalReplicationGroupInput, opts ...request.Option) (*CreateGlobalReplicationGroupOutput, error) { + req, out := c.CreateGlobalReplicationGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateReplicationGroup = "CreateReplicationGroup" // CreateReplicationGroupRequest generates a "aws/request.Request" representing the @@ -1086,6 +1186,9 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) // replication group. // +// This API can be used to create a standalone regional replication group or +// a secondary replication group associated with a Global Datastore. +// // A Redis (cluster mode disabled) replication group is a collection of clusters, // where one of the clusters is a read/write primary and the others are read-only // replicas. Writes to the primary are asynchronously propagated to the replicas. @@ -1166,6 +1269,12 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // number of node groups (shards) in a single replication group. The default // maximum is 90 // +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist +// +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. +// // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. // @@ -1309,6 +1418,94 @@ func (c *ElastiCache) CreateSnapshotWithContext(ctx aws.Context, input *CreateSn return out, req.Send() } +const opDecreaseNodeGroupsInGlobalReplicationGroup = "DecreaseNodeGroupsInGlobalReplicationGroup" + +// DecreaseNodeGroupsInGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the DecreaseNodeGroupsInGlobalReplicationGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DecreaseNodeGroupsInGlobalReplicationGroup for more information on using the DecreaseNodeGroupsInGlobalReplicationGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DecreaseNodeGroupsInGlobalReplicationGroupRequest method. +// req, resp := client.DecreaseNodeGroupsInGlobalReplicationGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseNodeGroupsInGlobalReplicationGroup +func (c *ElastiCache) DecreaseNodeGroupsInGlobalReplicationGroupRequest(input *DecreaseNodeGroupsInGlobalReplicationGroupInput) (req *request.Request, output *DecreaseNodeGroupsInGlobalReplicationGroupOutput) { + op := &request.Operation{ + Name: opDecreaseNodeGroupsInGlobalReplicationGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DecreaseNodeGroupsInGlobalReplicationGroupInput{} + } + + output = &DecreaseNodeGroupsInGlobalReplicationGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DecreaseNodeGroupsInGlobalReplicationGroup API operation for Amazon ElastiCache. +// +// Decreases the number of node groups in a Global Datastore +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation DecreaseNodeGroupsInGlobalReplicationGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist +// +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseNodeGroupsInGlobalReplicationGroup +func (c *ElastiCache) DecreaseNodeGroupsInGlobalReplicationGroup(input *DecreaseNodeGroupsInGlobalReplicationGroupInput) (*DecreaseNodeGroupsInGlobalReplicationGroupOutput, error) { + req, out := c.DecreaseNodeGroupsInGlobalReplicationGroupRequest(input) + return out, req.Send() +} + +// DecreaseNodeGroupsInGlobalReplicationGroupWithContext is the same as DecreaseNodeGroupsInGlobalReplicationGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DecreaseNodeGroupsInGlobalReplicationGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) DecreaseNodeGroupsInGlobalReplicationGroupWithContext(ctx aws.Context, input *DecreaseNodeGroupsInGlobalReplicationGroupInput, opts ...request.Option) (*DecreaseNodeGroupsInGlobalReplicationGroupOutput, error) { + req, out := c.DecreaseNodeGroupsInGlobalReplicationGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDecreaseReplicaCount = "DecreaseReplicaCount" // DecreaseReplicaCountRequest generates a "aws/request.Request" representing the @@ -1353,7 +1550,7 @@ func (c *ElastiCache) DecreaseReplicaCountRequest(input *DecreaseReplicaCountInp // DecreaseReplicaCount API operation for Amazon ElastiCache. // -// Dynamically decreases the number of replics in a Redis (cluster mode disabled) +// Dynamically decreases the number of replicas in a Redis (cluster mode disabled) // replication group or the number of replica nodes in one or more node groups // (shards) of a Redis (cluster mode enabled) replication group. This operation // is performed with no cluster down time. @@ -1821,6 +2018,105 @@ func (c *ElastiCache) DeleteCacheSubnetGroupWithContext(ctx aws.Context, input * return out, req.Send() } +const opDeleteGlobalReplicationGroup = "DeleteGlobalReplicationGroup" + +// DeleteGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGlobalReplicationGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGlobalReplicationGroup for more information on using the DeleteGlobalReplicationGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGlobalReplicationGroupRequest method. +// req, resp := client.DeleteGlobalReplicationGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteGlobalReplicationGroup +func (c *ElastiCache) DeleteGlobalReplicationGroupRequest(input *DeleteGlobalReplicationGroupInput) (req *request.Request, output *DeleteGlobalReplicationGroupOutput) { + op := &request.Operation{ + Name: opDeleteGlobalReplicationGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteGlobalReplicationGroupInput{} + } + + output = &DeleteGlobalReplicationGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGlobalReplicationGroup API operation for Amazon ElastiCache. +// +// Deleting a Global Datastore is a two-step process: +// +// * First, you must DisassociateGlobalReplicationGroup to remove the secondary +// clusters in the Global Datastore. +// +// * Once the Global Datastore contains only the primary cluster, you can +// use DeleteGlobalReplicationGroup API to delete the Global Datastore while +// retainining the primary cluster using Retain…= true. +// +// Since the Global Datastore has only a primary cluster, you can delete the +// Global Datastore while retaining the primary by setting RetainPrimaryCluster=true. +// +// When you receive a successful response from this operation, Amazon ElastiCache +// immediately begins deleting the selected resources; you cannot cancel or +// revert this operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation DeleteGlobalReplicationGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist +// +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteGlobalReplicationGroup +func (c *ElastiCache) DeleteGlobalReplicationGroup(input *DeleteGlobalReplicationGroupInput) (*DeleteGlobalReplicationGroupOutput, error) { + req, out := c.DeleteGlobalReplicationGroupRequest(input) + return out, req.Send() +} + +// DeleteGlobalReplicationGroupWithContext is the same as DeleteGlobalReplicationGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGlobalReplicationGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) DeleteGlobalReplicationGroupWithContext(ctx aws.Context, input *DeleteGlobalReplicationGroupInput, opts ...request.Option) (*DeleteGlobalReplicationGroupOutput, error) { + req, out := c.DeleteGlobalReplicationGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteReplicationGroup = "DeleteReplicationGroup" // DeleteReplicationGroupRequest generates a "aws/request.Request" representing the @@ -3189,35 +3485,35 @@ func (c *ElastiCache) DescribeEventsPagesWithContext(ctx aws.Context, input *Des return p.Err() } -const opDescribeReplicationGroups = "DescribeReplicationGroups" +const opDescribeGlobalReplicationGroups = "DescribeGlobalReplicationGroups" -// DescribeReplicationGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationGroups operation. The "output" return +// DescribeGlobalReplicationGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGlobalReplicationGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeReplicationGroups for more information on using the DescribeReplicationGroups +// See DescribeGlobalReplicationGroups for more information on using the DescribeGlobalReplicationGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeReplicationGroupsRequest method. -// req, resp := client.DescribeReplicationGroupsRequest(params) +// // Example sending a request using the DescribeGlobalReplicationGroupsRequest method. +// req, resp := client.DescribeGlobalReplicationGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReplicationGroups -func (c *ElastiCache) DescribeReplicationGroupsRequest(input *DescribeReplicationGroupsInput) (req *request.Request, output *DescribeReplicationGroupsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeGlobalReplicationGroups +func (c *ElastiCache) DescribeGlobalReplicationGroupsRequest(input *DescribeGlobalReplicationGroupsInput) (req *request.Request, output *DescribeGlobalReplicationGroupsOutput) { op := &request.Operation{ - Name: opDescribeReplicationGroups, + Name: opDescribeGlobalReplicationGroups, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -3229,32 +3525,29 @@ func (c *ElastiCache) DescribeReplicationGroupsRequest(input *DescribeReplicatio } if input == nil { - input = &DescribeReplicationGroupsInput{} + input = &DescribeGlobalReplicationGroupsInput{} } - output = &DescribeReplicationGroupsOutput{} + output = &DescribeGlobalReplicationGroupsOutput{} req = c.newRequest(op, input, output) return } -// DescribeReplicationGroups API operation for Amazon ElastiCache. -// -// Returns information about a particular replication group. If no identifier -// is specified, DescribeReplicationGroups returns information about all replication -// groups. +// DescribeGlobalReplicationGroups API operation for Amazon ElastiCache. // -// This operation is valid for Redis only. +// Returns information about a particular global replication group. If no identifier +// is specified, returns information about all Global Datastores. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation DescribeReplicationGroups for usage and error information. +// API operation DescribeGlobalReplicationGroups for usage and error information. // // Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -3262,65 +3555,65 @@ func (c *ElastiCache) DescribeReplicationGroupsRequest(input *DescribeReplicatio // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReplicationGroups -func (c *ElastiCache) DescribeReplicationGroups(input *DescribeReplicationGroupsInput) (*DescribeReplicationGroupsOutput, error) { - req, out := c.DescribeReplicationGroupsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeGlobalReplicationGroups +func (c *ElastiCache) DescribeGlobalReplicationGroups(input *DescribeGlobalReplicationGroupsInput) (*DescribeGlobalReplicationGroupsOutput, error) { + req, out := c.DescribeGlobalReplicationGroupsRequest(input) return out, req.Send() } -// DescribeReplicationGroupsWithContext is the same as DescribeReplicationGroups with the addition of +// DescribeGlobalReplicationGroupsWithContext is the same as DescribeGlobalReplicationGroups with the addition of // the ability to pass a context and additional request options. // -// See DescribeReplicationGroups for details on how to use this API operation. +// See DescribeGlobalReplicationGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) DescribeReplicationGroupsWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.Option) (*DescribeReplicationGroupsOutput, error) { - req, out := c.DescribeReplicationGroupsRequest(input) +func (c *ElastiCache) DescribeGlobalReplicationGroupsWithContext(ctx aws.Context, input *DescribeGlobalReplicationGroupsInput, opts ...request.Option) (*DescribeGlobalReplicationGroupsOutput, error) { + req, out := c.DescribeGlobalReplicationGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeReplicationGroupsPages iterates over the pages of a DescribeReplicationGroups operation, +// DescribeGlobalReplicationGroupsPages iterates over the pages of a DescribeGlobalReplicationGroups operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeReplicationGroups method for more information on how to use this operation. +// See DescribeGlobalReplicationGroups 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 DescribeReplicationGroups operation. +// // Example iterating over at most 3 pages of a DescribeGlobalReplicationGroups operation. // pageNum := 0 -// err := client.DescribeReplicationGroupsPages(params, -// func(page *elasticache.DescribeReplicationGroupsOutput, lastPage bool) bool { +// err := client.DescribeGlobalReplicationGroupsPages(params, +// func(page *elasticache.DescribeGlobalReplicationGroupsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *ElastiCache) DescribeReplicationGroupsPages(input *DescribeReplicationGroupsInput, fn func(*DescribeReplicationGroupsOutput, bool) bool) error { - return c.DescribeReplicationGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *ElastiCache) DescribeGlobalReplicationGroupsPages(input *DescribeGlobalReplicationGroupsInput, fn func(*DescribeGlobalReplicationGroupsOutput, bool) bool) error { + return c.DescribeGlobalReplicationGroupsPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeReplicationGroupsPagesWithContext same as DescribeReplicationGroupsPages except +// DescribeGlobalReplicationGroupsPagesWithContext same as DescribeGlobalReplicationGroupsPages 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 *ElastiCache) DescribeReplicationGroupsPagesWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, fn func(*DescribeReplicationGroupsOutput, bool) bool, opts ...request.Option) error { +func (c *ElastiCache) DescribeGlobalReplicationGroupsPagesWithContext(ctx aws.Context, input *DescribeGlobalReplicationGroupsInput, fn func(*DescribeGlobalReplicationGroupsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationGroupsInput + var inCpy *DescribeGlobalReplicationGroupsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeReplicationGroupsRequest(inCpy) + req, _ := c.DescribeGlobalReplicationGroupsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -3328,7 +3621,7 @@ func (c *ElastiCache) DescribeReplicationGroupsPagesWithContext(ctx aws.Context, } for p.Next() { - if !fn(p.Page().(*DescribeReplicationGroupsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeGlobalReplicationGroupsOutput), !p.HasNextPage()) { break } } @@ -3336,33 +3629,180 @@ func (c *ElastiCache) DescribeReplicationGroupsPagesWithContext(ctx aws.Context, return p.Err() } -const opDescribeReservedCacheNodes = "DescribeReservedCacheNodes" +const opDescribeReplicationGroups = "DescribeReplicationGroups" -// DescribeReservedCacheNodesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedCacheNodes operation. The "output" return +// DescribeReplicationGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReplicationGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeReservedCacheNodes for more information on using the DescribeReservedCacheNodes +// See DescribeReplicationGroups for more information on using the DescribeReplicationGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeReservedCacheNodesRequest method. -// req, resp := client.DescribeReservedCacheNodesRequest(params) +// // Example sending a request using the DescribeReplicationGroupsRequest method. +// req, resp := client.DescribeReplicationGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReservedCacheNodes -func (c *ElastiCache) DescribeReservedCacheNodesRequest(input *DescribeReservedCacheNodesInput) (req *request.Request, output *DescribeReservedCacheNodesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReplicationGroups +func (c *ElastiCache) DescribeReplicationGroupsRequest(input *DescribeReplicationGroupsInput) (req *request.Request, output *DescribeReplicationGroupsOutput) { + op := &request.Operation{ + Name: opDescribeReplicationGroups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReplicationGroupsInput{} + } + + output = &DescribeReplicationGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReplicationGroups API operation for Amazon ElastiCache. +// +// Returns information about a particular replication group. If no identifier +// is specified, DescribeReplicationGroups returns information about all replication +// groups. +// +// This operation is valid for Redis only. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation DescribeReplicationGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReplicationGroups +func (c *ElastiCache) DescribeReplicationGroups(input *DescribeReplicationGroupsInput) (*DescribeReplicationGroupsOutput, error) { + req, out := c.DescribeReplicationGroupsRequest(input) + return out, req.Send() +} + +// DescribeReplicationGroupsWithContext is the same as DescribeReplicationGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReplicationGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) DescribeReplicationGroupsWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, opts ...request.Option) (*DescribeReplicationGroupsOutput, error) { + req, out := c.DescribeReplicationGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReplicationGroupsPages iterates over the pages of a DescribeReplicationGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReplicationGroups 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 DescribeReplicationGroups operation. +// pageNum := 0 +// err := client.DescribeReplicationGroupsPages(params, +// func(page *elasticache.DescribeReplicationGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElastiCache) DescribeReplicationGroupsPages(input *DescribeReplicationGroupsInput, fn func(*DescribeReplicationGroupsOutput, bool) bool) error { + return c.DescribeReplicationGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReplicationGroupsPagesWithContext same as DescribeReplicationGroupsPages 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 *ElastiCache) DescribeReplicationGroupsPagesWithContext(ctx aws.Context, input *DescribeReplicationGroupsInput, fn func(*DescribeReplicationGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReplicationGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeReplicationGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeReservedCacheNodes = "DescribeReservedCacheNodes" + +// DescribeReservedCacheNodesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservedCacheNodes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReservedCacheNodes for more information on using the DescribeReservedCacheNodes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReservedCacheNodesRequest method. +// req, resp := client.DescribeReservedCacheNodesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DescribeReservedCacheNodes +func (c *ElastiCache) DescribeReservedCacheNodesRequest(input *DescribeReservedCacheNodesInput) (req *request.Request, output *DescribeReservedCacheNodesOutput) { op := &request.Operation{ Name: opDescribeReservedCacheNodes, HTTPMethod: "POST", @@ -4057,98 +4497,67 @@ func (c *ElastiCache) DescribeUpdateActionsPagesWithContext(ctx aws.Context, inp return p.Err() } -const opIncreaseReplicaCount = "IncreaseReplicaCount" +const opDisassociateGlobalReplicationGroup = "DisassociateGlobalReplicationGroup" -// IncreaseReplicaCountRequest generates a "aws/request.Request" representing the -// client's request for the IncreaseReplicaCount operation. The "output" return +// DisassociateGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateGlobalReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See IncreaseReplicaCount for more information on using the IncreaseReplicaCount +// See DisassociateGlobalReplicationGroup for more information on using the DisassociateGlobalReplicationGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the IncreaseReplicaCountRequest method. -// req, resp := client.IncreaseReplicaCountRequest(params) +// // Example sending a request using the DisassociateGlobalReplicationGroupRequest method. +// req, resp := client.DisassociateGlobalReplicationGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount -func (c *ElastiCache) IncreaseReplicaCountRequest(input *IncreaseReplicaCountInput) (req *request.Request, output *IncreaseReplicaCountOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DisassociateGlobalReplicationGroup +func (c *ElastiCache) DisassociateGlobalReplicationGroupRequest(input *DisassociateGlobalReplicationGroupInput) (req *request.Request, output *DisassociateGlobalReplicationGroupOutput) { op := &request.Operation{ - Name: opIncreaseReplicaCount, + Name: opDisassociateGlobalReplicationGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &IncreaseReplicaCountInput{} + input = &DisassociateGlobalReplicationGroupInput{} } - output = &IncreaseReplicaCountOutput{} + output = &DisassociateGlobalReplicationGroupOutput{} req = c.newRequest(op, input, output) return } -// IncreaseReplicaCount API operation for Amazon ElastiCache. +// DisassociateGlobalReplicationGroup API operation for Amazon ElastiCache. // -// Dynamically increases the number of replics in a Redis (cluster mode disabled) -// replication group or the number of replica nodes in one or more node groups -// (shards) of a Redis (cluster mode enabled) replication group. This operation -// is performed with no cluster down time. +// Remove a secondary cluster from the Global Datastore using the Global Datastore +// name. The secondary cluster will no longer receive updates from the primary +// cluster, but will remain as a standalone cluster in that AWS 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 Amazon ElastiCache's -// API operation IncreaseReplicaCount for usage and error information. +// API operation DisassociateGlobalReplicationGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. For more information, see InsufficientCacheClusterCapacity (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY) -// in the ElastiCache User Guide. -// -// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of clusters per customer. -// -// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum allowed -// number of node groups (shards) in a single replication group. The default -// maximum is 90 -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. -// -// * ErrCodeNoOperationFault "NoOperationFault" -// The operation was not performed because no changes were required. +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist // -// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" -// The KMS key supplied is not valid. +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -4156,303 +4565,295 @@ func (c *ElastiCache) IncreaseReplicaCountRequest(input *IncreaseReplicaCountInp // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount -func (c *ElastiCache) IncreaseReplicaCount(input *IncreaseReplicaCountInput) (*IncreaseReplicaCountOutput, error) { - req, out := c.IncreaseReplicaCountRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DisassociateGlobalReplicationGroup +func (c *ElastiCache) DisassociateGlobalReplicationGroup(input *DisassociateGlobalReplicationGroupInput) (*DisassociateGlobalReplicationGroupOutput, error) { + req, out := c.DisassociateGlobalReplicationGroupRequest(input) return out, req.Send() } -// IncreaseReplicaCountWithContext is the same as IncreaseReplicaCount with the addition of +// DisassociateGlobalReplicationGroupWithContext is the same as DisassociateGlobalReplicationGroup with the addition of // the ability to pass a context and additional request options. // -// See IncreaseReplicaCount for details on how to use this API operation. +// See DisassociateGlobalReplicationGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) IncreaseReplicaCountWithContext(ctx aws.Context, input *IncreaseReplicaCountInput, opts ...request.Option) (*IncreaseReplicaCountOutput, error) { - req, out := c.IncreaseReplicaCountRequest(input) +func (c *ElastiCache) DisassociateGlobalReplicationGroupWithContext(ctx aws.Context, input *DisassociateGlobalReplicationGroupInput, opts ...request.Option) (*DisassociateGlobalReplicationGroupOutput, error) { + req, out := c.DisassociateGlobalReplicationGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" +const opFailoverGlobalReplicationGroup = "FailoverGlobalReplicationGroup" -// ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the -// client's request for the ListAllowedNodeTypeModifications operation. The "output" return +// FailoverGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the FailoverGlobalReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListAllowedNodeTypeModifications for more information on using the ListAllowedNodeTypeModifications +// See FailoverGlobalReplicationGroup for more information on using the FailoverGlobalReplicationGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListAllowedNodeTypeModificationsRequest method. -// req, resp := client.ListAllowedNodeTypeModificationsRequest(params) +// // Example sending a request using the FailoverGlobalReplicationGroupRequest method. +// req, resp := client.FailoverGlobalReplicationGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListAllowedNodeTypeModifications -func (c *ElastiCache) ListAllowedNodeTypeModificationsRequest(input *ListAllowedNodeTypeModificationsInput) (req *request.Request, output *ListAllowedNodeTypeModificationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/FailoverGlobalReplicationGroup +func (c *ElastiCache) FailoverGlobalReplicationGroupRequest(input *FailoverGlobalReplicationGroupInput) (req *request.Request, output *FailoverGlobalReplicationGroupOutput) { op := &request.Operation{ - Name: opListAllowedNodeTypeModifications, + Name: opFailoverGlobalReplicationGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListAllowedNodeTypeModificationsInput{} + input = &FailoverGlobalReplicationGroupInput{} } - output = &ListAllowedNodeTypeModificationsOutput{} + output = &FailoverGlobalReplicationGroupOutput{} req = c.newRequest(op, input, output) return } -// ListAllowedNodeTypeModifications API operation for Amazon ElastiCache. -// -// Lists all available node types that you can scale your Redis cluster's or -// replication group's current node type. +// FailoverGlobalReplicationGroup API operation for Amazon ElastiCache. // -// When you use the ModifyCacheCluster or ModifyReplicationGroup operations -// to scale your cluster or replication group, the value of the CacheNodeType -// parameter must be one of the node types returned by this operation. +// Used to failover the primary region to a selected secondary region. The selected +// secondary region will be come primary, and all other clusters will become +// secondary. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ListAllowedNodeTypeModifications for usage and error information. +// API operation FailoverGlobalReplicationGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist // -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListAllowedNodeTypeModifications -func (c *ElastiCache) ListAllowedNodeTypeModifications(input *ListAllowedNodeTypeModificationsInput) (*ListAllowedNodeTypeModificationsOutput, error) { - req, out := c.ListAllowedNodeTypeModificationsRequest(input) +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/FailoverGlobalReplicationGroup +func (c *ElastiCache) FailoverGlobalReplicationGroup(input *FailoverGlobalReplicationGroupInput) (*FailoverGlobalReplicationGroupOutput, error) { + req, out := c.FailoverGlobalReplicationGroupRequest(input) return out, req.Send() } -// ListAllowedNodeTypeModificationsWithContext is the same as ListAllowedNodeTypeModifications with the addition of +// FailoverGlobalReplicationGroupWithContext is the same as FailoverGlobalReplicationGroup with the addition of // the ability to pass a context and additional request options. // -// See ListAllowedNodeTypeModifications for details on how to use this API operation. +// See FailoverGlobalReplicationGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ListAllowedNodeTypeModificationsWithContext(ctx aws.Context, input *ListAllowedNodeTypeModificationsInput, opts ...request.Option) (*ListAllowedNodeTypeModificationsOutput, error) { - req, out := c.ListAllowedNodeTypeModificationsRequest(input) +func (c *ElastiCache) FailoverGlobalReplicationGroupWithContext(ctx aws.Context, input *FailoverGlobalReplicationGroupInput, opts ...request.Option) (*FailoverGlobalReplicationGroupOutput, error) { + req, out := c.FailoverGlobalReplicationGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListTagsForResource = "ListTagsForResource" +const opIncreaseNodeGroupsInGlobalReplicationGroup = "IncreaseNodeGroupsInGlobalReplicationGroup" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return +// IncreaseNodeGroupsInGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the IncreaseNodeGroupsInGlobalReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See IncreaseNodeGroupsInGlobalReplicationGroup for more information on using the IncreaseNodeGroupsInGlobalReplicationGroup // API call, and error handling. // // This method is useful when you want to 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 IncreaseNodeGroupsInGlobalReplicationGroupRequest method. +// req, resp := client.IncreaseNodeGroupsInGlobalReplicationGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListTagsForResource -func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *TagListMessage) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseNodeGroupsInGlobalReplicationGroup +func (c *ElastiCache) IncreaseNodeGroupsInGlobalReplicationGroupRequest(input *IncreaseNodeGroupsInGlobalReplicationGroupInput) (req *request.Request, output *IncreaseNodeGroupsInGlobalReplicationGroupOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opIncreaseNodeGroupsInGlobalReplicationGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListTagsForResourceInput{} + input = &IncreaseNodeGroupsInGlobalReplicationGroupInput{} } - output = &TagListMessage{} + output = &IncreaseNodeGroupsInGlobalReplicationGroupOutput{} req = c.newRequest(op, input, output) return } -// ListTagsForResource API operation for Amazon ElastiCache. +// IncreaseNodeGroupsInGlobalReplicationGroup API operation for Amazon ElastiCache. // -// Lists all cost allocation tags currently on the named resource. A cost allocation -// tag is a key-value pair where the key is case-sensitive and the value is -// optional. You can use cost allocation tags to categorize and track your AWS -// costs. -// -// If the cluster is not in the available state, ListTagsForResource returns -// an error. -// -// You can have a maximum of 50 cost allocation tags on an ElastiCache resource. -// For more information, see Monitoring Costs with Tags (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html). +// Increase the number of node groups in the Global Datastore // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ListTagsForResource for usage and error information. +// API operation IncreaseNodeGroupsInGlobalReplicationGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist // -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. // -// * ErrCodeInvalidARNFault "InvalidARN" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListTagsForResource -func (c *ElastiCache) ListTagsForResource(input *ListTagsForResourceInput) (*TagListMessage, error) { - req, out := c.ListTagsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseNodeGroupsInGlobalReplicationGroup +func (c *ElastiCache) IncreaseNodeGroupsInGlobalReplicationGroup(input *IncreaseNodeGroupsInGlobalReplicationGroupInput) (*IncreaseNodeGroupsInGlobalReplicationGroupOutput, error) { + req, out := c.IncreaseNodeGroupsInGlobalReplicationGroupRequest(input) return out, req.Send() } -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// IncreaseNodeGroupsInGlobalReplicationGroupWithContext is the same as IncreaseNodeGroupsInGlobalReplicationGroup 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 IncreaseNodeGroupsInGlobalReplicationGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*TagListMessage, error) { - req, out := c.ListTagsForResourceRequest(input) +func (c *ElastiCache) IncreaseNodeGroupsInGlobalReplicationGroupWithContext(ctx aws.Context, input *IncreaseNodeGroupsInGlobalReplicationGroupInput, opts ...request.Option) (*IncreaseNodeGroupsInGlobalReplicationGroupOutput, error) { + req, out := c.IncreaseNodeGroupsInGlobalReplicationGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opModifyCacheCluster = "ModifyCacheCluster" +const opIncreaseReplicaCount = "IncreaseReplicaCount" -// ModifyCacheClusterRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCacheCluster operation. The "output" return +// IncreaseReplicaCountRequest generates a "aws/request.Request" representing the +// client's request for the IncreaseReplicaCount operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ModifyCacheCluster for more information on using the ModifyCacheCluster +// See IncreaseReplicaCount for more information on using the IncreaseReplicaCount // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ModifyCacheClusterRequest method. -// req, resp := client.ModifyCacheClusterRequest(params) +// // Example sending a request using the IncreaseReplicaCountRequest method. +// req, resp := client.IncreaseReplicaCountRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheCluster -func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) (req *request.Request, output *ModifyCacheClusterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount +func (c *ElastiCache) IncreaseReplicaCountRequest(input *IncreaseReplicaCountInput) (req *request.Request, output *IncreaseReplicaCountOutput) { op := &request.Operation{ - Name: opModifyCacheCluster, + Name: opIncreaseReplicaCount, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ModifyCacheClusterInput{} + input = &IncreaseReplicaCountInput{} } - output = &ModifyCacheClusterOutput{} + output = &IncreaseReplicaCountOutput{} req = c.newRequest(op, input, output) return } -// ModifyCacheCluster API operation for Amazon ElastiCache. +// IncreaseReplicaCount API operation for Amazon ElastiCache. // -// Modifies the settings for a cluster. You can use this operation to change -// one or more cluster configuration parameters by specifying the parameters -// and the new values. +// Dynamically increases the number of replics in a Redis (cluster mode disabled) +// replication group or the number of replica nodes in one or more node groups +// (shards) of a Redis (cluster mode enabled) replication group. This operation +// is performed with no cluster down time. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyCacheCluster for usage and error information. +// API operation IncreaseReplicaCount for usage and error information. // // Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" // The requested cluster is not in the available state. // -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. // // * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" // The requested cache node type is not available in the specified Availability // Zone. For more information, see InsufficientCacheClusterCapacity (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY) // in the ElastiCache User Guide. // -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. -// -// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" +// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number -// of cache nodes in a single cluster. +// of clusters per customer. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 90 // // * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" // The request cannot be processed because it would exceed the allowed number // of cache nodes per customer. // -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. -// -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. +// * ErrCodeNoOperationFault "NoOperationFault" +// The operation was not performed because no changes were required. // -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. +// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" +// The KMS key supplied is not valid. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -4460,282 +4861,271 @@ func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheCluster -func (c *ElastiCache) ModifyCacheCluster(input *ModifyCacheClusterInput) (*ModifyCacheClusterOutput, error) { - req, out := c.ModifyCacheClusterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount +func (c *ElastiCache) IncreaseReplicaCount(input *IncreaseReplicaCountInput) (*IncreaseReplicaCountOutput, error) { + req, out := c.IncreaseReplicaCountRequest(input) return out, req.Send() } -// ModifyCacheClusterWithContext is the same as ModifyCacheCluster with the addition of +// IncreaseReplicaCountWithContext is the same as IncreaseReplicaCount with the addition of // the ability to pass a context and additional request options. // -// See ModifyCacheCluster for details on how to use this API operation. +// See IncreaseReplicaCount for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ModifyCacheClusterWithContext(ctx aws.Context, input *ModifyCacheClusterInput, opts ...request.Option) (*ModifyCacheClusterOutput, error) { - req, out := c.ModifyCacheClusterRequest(input) +func (c *ElastiCache) IncreaseReplicaCountWithContext(ctx aws.Context, input *IncreaseReplicaCountInput, opts ...request.Option) (*IncreaseReplicaCountOutput, error) { + req, out := c.IncreaseReplicaCountRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opModifyCacheParameterGroup = "ModifyCacheParameterGroup" +const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" -// ModifyCacheParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCacheParameterGroup operation. The "output" return +// ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the +// client's request for the ListAllowedNodeTypeModifications operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ModifyCacheParameterGroup for more information on using the ModifyCacheParameterGroup +// See ListAllowedNodeTypeModifications for more information on using the ListAllowedNodeTypeModifications // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ModifyCacheParameterGroupRequest method. -// req, resp := client.ModifyCacheParameterGroupRequest(params) +// // Example sending a request using the ListAllowedNodeTypeModificationsRequest method. +// req, resp := client.ListAllowedNodeTypeModificationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheParameterGroup -func (c *ElastiCache) ModifyCacheParameterGroupRequest(input *ModifyCacheParameterGroupInput) (req *request.Request, output *CacheParameterGroupNameMessage) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListAllowedNodeTypeModifications +func (c *ElastiCache) ListAllowedNodeTypeModificationsRequest(input *ListAllowedNodeTypeModificationsInput) (req *request.Request, output *ListAllowedNodeTypeModificationsOutput) { op := &request.Operation{ - Name: opModifyCacheParameterGroup, + Name: opListAllowedNodeTypeModifications, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ModifyCacheParameterGroupInput{} + input = &ListAllowedNodeTypeModificationsInput{} } - output = &CacheParameterGroupNameMessage{} + output = &ListAllowedNodeTypeModificationsOutput{} req = c.newRequest(op, input, output) return } -// ModifyCacheParameterGroup API operation for Amazon ElastiCache. +// ListAllowedNodeTypeModifications API operation for Amazon ElastiCache. // -// Modifies the parameters of a cache parameter group. You can modify up to -// 20 parameters in a single request by submitting a list parameter name and -// value pairs. +// Lists all available node types that you can scale your Redis cluster's or +// replication group's current node type. +// +// When you use the ModifyCacheCluster or ModifyReplicationGroup operations +// to scale your cluster or replication group, the value of the CacheNodeType +// parameter must be one of the node types returned by this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyCacheParameterGroup for usage and error information. +// API operation ListAllowedNodeTypeModifications for usage and error information. // // Returned Error Codes: -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. -// -// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" -// The current state of the cache parameter group does not allow the requested -// operation to occur. +// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" +// The requested cluster ID does not refer to an existing cluster. // -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. // // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheParameterGroup -func (c *ElastiCache) ModifyCacheParameterGroup(input *ModifyCacheParameterGroupInput) (*CacheParameterGroupNameMessage, error) { - req, out := c.ModifyCacheParameterGroupRequest(input) +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListAllowedNodeTypeModifications +func (c *ElastiCache) ListAllowedNodeTypeModifications(input *ListAllowedNodeTypeModificationsInput) (*ListAllowedNodeTypeModificationsOutput, error) { + req, out := c.ListAllowedNodeTypeModificationsRequest(input) return out, req.Send() } -// ModifyCacheParameterGroupWithContext is the same as ModifyCacheParameterGroup with the addition of +// ListAllowedNodeTypeModificationsWithContext is the same as ListAllowedNodeTypeModifications with the addition of // the ability to pass a context and additional request options. // -// See ModifyCacheParameterGroup for details on how to use this API operation. +// See ListAllowedNodeTypeModifications for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ModifyCacheParameterGroupWithContext(ctx aws.Context, input *ModifyCacheParameterGroupInput, opts ...request.Option) (*CacheParameterGroupNameMessage, error) { - req, out := c.ModifyCacheParameterGroupRequest(input) +func (c *ElastiCache) ListAllowedNodeTypeModificationsWithContext(ctx aws.Context, input *ListAllowedNodeTypeModificationsInput, opts ...request.Option) (*ListAllowedNodeTypeModificationsOutput, error) { + req, out := c.ListAllowedNodeTypeModificationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opModifyCacheSubnetGroup = "ModifyCacheSubnetGroup" +const opListTagsForResource = "ListTagsForResource" -// ModifyCacheSubnetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyCacheSubnetGroup operation. The "output" return +// 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 // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ModifyCacheSubnetGroup for more information on using the ModifyCacheSubnetGroup +// 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 ModifyCacheSubnetGroupRequest method. -// req, resp := client.ModifyCacheSubnetGroupRequest(params) +// // 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/elasticache-2015-02-02/ModifyCacheSubnetGroup -func (c *ElastiCache) ModifyCacheSubnetGroupRequest(input *ModifyCacheSubnetGroupInput) (req *request.Request, output *ModifyCacheSubnetGroupOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListTagsForResource +func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *TagListMessage) { op := &request.Operation{ - Name: opModifyCacheSubnetGroup, + Name: opListTagsForResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ModifyCacheSubnetGroupInput{} + input = &ListTagsForResourceInput{} } - output = &ModifyCacheSubnetGroupOutput{} + output = &TagListMessage{} req = c.newRequest(op, input, output) return } -// ModifyCacheSubnetGroup API operation for Amazon ElastiCache. +// ListTagsForResource API operation for Amazon ElastiCache. // -// Modifies an existing cache subnet group. +// Lists all cost allocation tags currently on the named resource. A cost allocation +// tag is a key-value pair where the key is case-sensitive and the value is +// optional. You can use cost allocation tags to categorize and track your AWS +// costs. +// +// If the cluster is not in the available state, ListTagsForResource returns +// an error. +// +// You can have a maximum of 50 cost allocation tags on an ElastiCache resource. +// For more information, see Monitoring Costs with Tags (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyCacheSubnetGroup for usage and error information. +// API operation ListTagsForResource for usage and error information. // // Returned Error Codes: -// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" -// The requested cache subnet group name does not refer to an existing cache -// subnet group. -// -// * ErrCodeCacheSubnetQuotaExceededFault "CacheSubnetQuotaExceededFault" -// The request cannot be processed because it would exceed the allowed number -// of subnets in a cache subnet group. +// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" +// The requested cluster ID does not refer to an existing cluster. // -// * ErrCodeSubnetInUse "SubnetInUse" -// The requested subnet is being used by another cache subnet group. +// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" +// The requested snapshot name does not refer to an existing snapshot. // -// * ErrCodeInvalidSubnet "InvalidSubnet" -// An invalid subnet identifier was specified. +// * ErrCodeInvalidARNFault "InvalidARN" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheSubnetGroup -func (c *ElastiCache) ModifyCacheSubnetGroup(input *ModifyCacheSubnetGroupInput) (*ModifyCacheSubnetGroupOutput, error) { - req, out := c.ModifyCacheSubnetGroupRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ListTagsForResource +func (c *ElastiCache) ListTagsForResource(input *ListTagsForResourceInput) (*TagListMessage, error) { + req, out := c.ListTagsForResourceRequest(input) return out, req.Send() } -// ModifyCacheSubnetGroupWithContext is the same as ModifyCacheSubnetGroup with the addition of +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of // the ability to pass a context and additional request options. // -// See ModifyCacheSubnetGroup for details on how to use this API operation. +// 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 *ElastiCache) ModifyCacheSubnetGroupWithContext(ctx aws.Context, input *ModifyCacheSubnetGroupInput, opts ...request.Option) (*ModifyCacheSubnetGroupOutput, error) { - req, out := c.ModifyCacheSubnetGroupRequest(input) +func (c *ElastiCache) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*TagListMessage, error) { + req, out := c.ListTagsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opModifyReplicationGroup = "ModifyReplicationGroup" +const opModifyCacheCluster = "ModifyCacheCluster" -// ModifyReplicationGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationGroup operation. The "output" return +// ModifyCacheClusterRequest generates a "aws/request.Request" representing the +// client's request for the ModifyCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ModifyReplicationGroup for more information on using the ModifyReplicationGroup +// See ModifyCacheCluster for more information on using the ModifyCacheCluster // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ModifyReplicationGroupRequest method. -// req, resp := client.ModifyReplicationGroupRequest(params) +// // Example sending a request using the ModifyCacheClusterRequest method. +// req, resp := client.ModifyCacheClusterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroup -func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGroupInput) (req *request.Request, output *ModifyReplicationGroupOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheCluster +func (c *ElastiCache) ModifyCacheClusterRequest(input *ModifyCacheClusterInput) (req *request.Request, output *ModifyCacheClusterOutput) { op := &request.Operation{ - Name: opModifyReplicationGroup, + Name: opModifyCacheCluster, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ModifyReplicationGroupInput{} + input = &ModifyCacheClusterInput{} } - output = &ModifyReplicationGroupOutput{} + output = &ModifyCacheClusterOutput{} req = c.newRequest(op, input, output) return } -// ModifyReplicationGroup API operation for Amazon ElastiCache. -// -// Modifies the settings for a replication group. -// -// For Redis (cluster mode enabled) clusters, this operation cannot be used -// to change a cluster's node type or engine version. For more information, -// see: -// -// * Scaling for Amazon ElastiCache for Redis (cluster mode enabled) (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html) -// in the ElastiCache User Guide -// -// * ModifyReplicationGroupShardConfiguration (https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html) -// in the ElastiCache API Reference +// ModifyCacheCluster API operation for Amazon ElastiCache. // -// This operation is valid for Redis only. +// Modifies the settings for a cluster. You can use this operation to change +// one or more cluster configuration parameters by specifying the parameters +// and the new values. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyReplicationGroup for usage and error information. +// API operation ModifyCacheCluster for usage and error information. // // Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" // The requested cluster is not in the available state. // @@ -4769,120 +5159,97 @@ func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGrou // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" // The VPC network is in an invalid state. // -// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" -// The KMS key supplied is not valid. -// // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. // // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroup -func (c *ElastiCache) ModifyReplicationGroup(input *ModifyReplicationGroupInput) (*ModifyReplicationGroupOutput, error) { - req, out := c.ModifyReplicationGroupRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheCluster +func (c *ElastiCache) ModifyCacheCluster(input *ModifyCacheClusterInput) (*ModifyCacheClusterOutput, error) { + req, out := c.ModifyCacheClusterRequest(input) return out, req.Send() } -// ModifyReplicationGroupWithContext is the same as ModifyReplicationGroup with the addition of +// ModifyCacheClusterWithContext is the same as ModifyCacheCluster with the addition of // the ability to pass a context and additional request options. // -// See ModifyReplicationGroup for details on how to use this API operation. +// See ModifyCacheCluster for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ModifyReplicationGroupWithContext(ctx aws.Context, input *ModifyReplicationGroupInput, opts ...request.Option) (*ModifyReplicationGroupOutput, error) { - req, out := c.ModifyReplicationGroupRequest(input) +func (c *ElastiCache) ModifyCacheClusterWithContext(ctx aws.Context, input *ModifyCacheClusterInput, opts ...request.Option) (*ModifyCacheClusterOutput, error) { + req, out := c.ModifyCacheClusterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardConfiguration" +const opModifyCacheParameterGroup = "ModifyCacheParameterGroup" -// ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return +// ModifyCacheParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ModifyReplicationGroupShardConfiguration for more information on using the ModifyReplicationGroupShardConfiguration +// See ModifyCacheParameterGroup for more information on using the ModifyCacheParameterGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ModifyReplicationGroupShardConfigurationRequest method. -// req, resp := client.ModifyReplicationGroupShardConfigurationRequest(params) +// // Example sending a request using the ModifyCacheParameterGroupRequest method. +// req, resp := client.ModifyCacheParameterGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration -func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *ModifyReplicationGroupShardConfigurationInput) (req *request.Request, output *ModifyReplicationGroupShardConfigurationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheParameterGroup +func (c *ElastiCache) ModifyCacheParameterGroupRequest(input *ModifyCacheParameterGroupInput) (req *request.Request, output *CacheParameterGroupNameMessage) { op := &request.Operation{ - Name: opModifyReplicationGroupShardConfiguration, + Name: opModifyCacheParameterGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ModifyReplicationGroupShardConfigurationInput{} + input = &ModifyCacheParameterGroupInput{} } - output = &ModifyReplicationGroupShardConfigurationOutput{} + output = &CacheParameterGroupNameMessage{} req = c.newRequest(op, input, output) return } -// ModifyReplicationGroupShardConfiguration API operation for Amazon ElastiCache. +// ModifyCacheParameterGroup API operation for Amazon ElastiCache. // -// Modifies a replication group's shards (node groups) by allowing you to add -// shards, remove shards, or rebalance the keyspaces among exisiting shards. +// Modifies the parameters of a cache parameter group. You can modify up to +// 20 parameters in a single request by submitting a list parameter name and +// value pairs. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ModifyReplicationGroupShardConfiguration for usage and error information. +// API operation ModifyCacheParameterGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. -// -// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// The VPC network is in an invalid state. -// -// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" -// The requested cache node type is not available in the specified Availability -// Zone. For more information, see InsufficientCacheClusterCapacity (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY) -// in the ElastiCache User Guide. -// -// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" -// The request cannot be processed because it would exceed the maximum allowed -// number of node groups (shards) in a single replication group. The default -// maximum is 90 -// -// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" -// The request cannot be processed because it would exceed the allowed number -// of cache nodes per customer. +// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" +// The requested cache parameter group name does not refer to an existing cache +// parameter group. // -// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" -// The KMS key supplied is not valid. +// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" +// The current state of the cache parameter group does not allow the requested +// operation to occur. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -4890,370 +5257,421 @@ func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *Mod // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration -func (c *ElastiCache) ModifyReplicationGroupShardConfiguration(input *ModifyReplicationGroupShardConfigurationInput) (*ModifyReplicationGroupShardConfigurationOutput, error) { - req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheParameterGroup +func (c *ElastiCache) ModifyCacheParameterGroup(input *ModifyCacheParameterGroupInput) (*CacheParameterGroupNameMessage, error) { + req, out := c.ModifyCacheParameterGroupRequest(input) return out, req.Send() } -// ModifyReplicationGroupShardConfigurationWithContext is the same as ModifyReplicationGroupShardConfiguration with the addition of +// ModifyCacheParameterGroupWithContext is the same as ModifyCacheParameterGroup with the addition of // the ability to pass a context and additional request options. // -// See ModifyReplicationGroupShardConfiguration for details on how to use this API operation. +// See ModifyCacheParameterGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ModifyReplicationGroupShardConfigurationWithContext(ctx aws.Context, input *ModifyReplicationGroupShardConfigurationInput, opts ...request.Option) (*ModifyReplicationGroupShardConfigurationOutput, error) { - req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) +func (c *ElastiCache) ModifyCacheParameterGroupWithContext(ctx aws.Context, input *ModifyCacheParameterGroupInput, opts ...request.Option) (*CacheParameterGroupNameMessage, error) { + req, out := c.ModifyCacheParameterGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering" +const opModifyCacheSubnetGroup = "ModifyCacheSubnetGroup" -// PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedCacheNodesOffering operation. The "output" return +// ModifyCacheSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PurchaseReservedCacheNodesOffering for more information on using the PurchaseReservedCacheNodesOffering +// See ModifyCacheSubnetGroup for more information on using the ModifyCacheSubnetGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PurchaseReservedCacheNodesOfferingRequest method. -// req, resp := client.PurchaseReservedCacheNodesOfferingRequest(params) +// // Example sending a request using the ModifyCacheSubnetGroupRequest method. +// req, resp := client.ModifyCacheSubnetGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PurchaseReservedCacheNodesOffering -func (c *ElastiCache) PurchaseReservedCacheNodesOfferingRequest(input *PurchaseReservedCacheNodesOfferingInput) (req *request.Request, output *PurchaseReservedCacheNodesOfferingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheSubnetGroup +func (c *ElastiCache) ModifyCacheSubnetGroupRequest(input *ModifyCacheSubnetGroupInput) (req *request.Request, output *ModifyCacheSubnetGroupOutput) { op := &request.Operation{ - Name: opPurchaseReservedCacheNodesOffering, + Name: opModifyCacheSubnetGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PurchaseReservedCacheNodesOfferingInput{} + input = &ModifyCacheSubnetGroupInput{} } - output = &PurchaseReservedCacheNodesOfferingOutput{} + output = &ModifyCacheSubnetGroupOutput{} req = c.newRequest(op, input, output) return } -// PurchaseReservedCacheNodesOffering API operation for Amazon ElastiCache. +// ModifyCacheSubnetGroup API operation for Amazon ElastiCache. // -// Allows you to purchase a reserved cache node offering. +// Modifies an existing cache subnet group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation PurchaseReservedCacheNodesOffering for usage and error information. +// API operation ModifyCacheSubnetGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeReservedCacheNodesOfferingNotFoundFault "ReservedCacheNodesOfferingNotFound" -// The requested cache node offering does not exist. -// -// * ErrCodeReservedCacheNodeAlreadyExistsFault "ReservedCacheNodeAlreadyExists" -// You already have a reservation with the given identifier. +// * ErrCodeCacheSubnetGroupNotFoundFault "CacheSubnetGroupNotFoundFault" +// The requested cache subnet group name does not refer to an existing cache +// subnet group. // -// * ErrCodeReservedCacheNodeQuotaExceededFault "ReservedCacheNodeQuotaExceeded" -// The request cannot be processed because it would exceed the user's cache -// node quota. +// * ErrCodeCacheSubnetQuotaExceededFault "CacheSubnetQuotaExceededFault" +// The request cannot be processed because it would exceed the allowed number +// of subnets in a cache subnet group. // -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. +// * ErrCodeSubnetInUse "SubnetInUse" +// The requested subnet is being used by another cache subnet group. // -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. +// * ErrCodeInvalidSubnet "InvalidSubnet" +// An invalid subnet identifier was specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PurchaseReservedCacheNodesOffering -func (c *ElastiCache) PurchaseReservedCacheNodesOffering(input *PurchaseReservedCacheNodesOfferingInput) (*PurchaseReservedCacheNodesOfferingOutput, error) { - req, out := c.PurchaseReservedCacheNodesOfferingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyCacheSubnetGroup +func (c *ElastiCache) ModifyCacheSubnetGroup(input *ModifyCacheSubnetGroupInput) (*ModifyCacheSubnetGroupOutput, error) { + req, out := c.ModifyCacheSubnetGroupRequest(input) return out, req.Send() } -// PurchaseReservedCacheNodesOfferingWithContext is the same as PurchaseReservedCacheNodesOffering with the addition of +// ModifyCacheSubnetGroupWithContext is the same as ModifyCacheSubnetGroup with the addition of // the ability to pass a context and additional request options. // -// See PurchaseReservedCacheNodesOffering for details on how to use this API operation. +// See ModifyCacheSubnetGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) PurchaseReservedCacheNodesOfferingWithContext(ctx aws.Context, input *PurchaseReservedCacheNodesOfferingInput, opts ...request.Option) (*PurchaseReservedCacheNodesOfferingOutput, error) { - req, out := c.PurchaseReservedCacheNodesOfferingRequest(input) +func (c *ElastiCache) ModifyCacheSubnetGroupWithContext(ctx aws.Context, input *ModifyCacheSubnetGroupInput, opts ...request.Option) (*ModifyCacheSubnetGroupOutput, error) { + req, out := c.ModifyCacheSubnetGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRebootCacheCluster = "RebootCacheCluster" +const opModifyGlobalReplicationGroup = "ModifyGlobalReplicationGroup" -// RebootCacheClusterRequest generates a "aws/request.Request" representing the -// client's request for the RebootCacheCluster operation. The "output" return +// ModifyGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyGlobalReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RebootCacheCluster for more information on using the RebootCacheCluster +// See ModifyGlobalReplicationGroup for more information on using the ModifyGlobalReplicationGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RebootCacheClusterRequest method. -// req, resp := client.RebootCacheClusterRequest(params) +// // Example sending a request using the ModifyGlobalReplicationGroupRequest method. +// req, resp := client.ModifyGlobalReplicationGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster -func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) (req *request.Request, output *RebootCacheClusterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyGlobalReplicationGroup +func (c *ElastiCache) ModifyGlobalReplicationGroupRequest(input *ModifyGlobalReplicationGroupInput) (req *request.Request, output *ModifyGlobalReplicationGroupOutput) { op := &request.Operation{ - Name: opRebootCacheCluster, + Name: opModifyGlobalReplicationGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RebootCacheClusterInput{} + input = &ModifyGlobalReplicationGroupInput{} } - output = &RebootCacheClusterOutput{} + output = &ModifyGlobalReplicationGroupOutput{} req = c.newRequest(op, input, output) return } -// RebootCacheCluster API operation for Amazon ElastiCache. -// -// Reboots some, or all, of the cache nodes within a provisioned cluster. This -// operation applies any modified cache parameter groups to the cluster. The -// reboot operation takes place as soon as possible, and results in a momentary -// outage to the cluster. During the reboot, the cluster status is set to REBOOTING. -// -// The reboot causes the contents of the cache (for each cache node being rebooted) -// to be lost. -// -// When the reboot is complete, a cluster event is created. -// -// Rebooting a cluster is currently supported on Memcached and Redis (cluster -// mode disabled) clusters. Rebooting is not supported on Redis (cluster mode -// enabled) clusters. +// ModifyGlobalReplicationGroup API operation for Amazon ElastiCache. // -// If you make changes to parameters that require a Redis (cluster mode enabled) -// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html) -// for an alternate process. +// Modifies the settings for a Global Datastore. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation RebootCacheCluster for usage and error information. +// API operation ModifyGlobalReplicationGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" -// The requested cluster is not in the available state. +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist // -// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" -// The requested cluster ID does not refer to an existing cluster. +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster -func (c *ElastiCache) RebootCacheCluster(input *RebootCacheClusterInput) (*RebootCacheClusterOutput, error) { - req, out := c.RebootCacheClusterRequest(input) +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyGlobalReplicationGroup +func (c *ElastiCache) ModifyGlobalReplicationGroup(input *ModifyGlobalReplicationGroupInput) (*ModifyGlobalReplicationGroupOutput, error) { + req, out := c.ModifyGlobalReplicationGroupRequest(input) return out, req.Send() } -// RebootCacheClusterWithContext is the same as RebootCacheCluster with the addition of +// ModifyGlobalReplicationGroupWithContext is the same as ModifyGlobalReplicationGroup with the addition of // the ability to pass a context and additional request options. // -// See RebootCacheCluster for details on how to use this API operation. +// See ModifyGlobalReplicationGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) RebootCacheClusterWithContext(ctx aws.Context, input *RebootCacheClusterInput, opts ...request.Option) (*RebootCacheClusterOutput, error) { - req, out := c.RebootCacheClusterRequest(input) +func (c *ElastiCache) ModifyGlobalReplicationGroupWithContext(ctx aws.Context, input *ModifyGlobalReplicationGroupInput, opts ...request.Option) (*ModifyGlobalReplicationGroupOutput, error) { + req, out := c.ModifyGlobalReplicationGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRemoveTagsFromResource = "RemoveTagsFromResource" +const opModifyReplicationGroup = "ModifyReplicationGroup" -// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTagsFromResource operation. The "output" return +// ModifyReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource +// See ModifyReplicationGroup for more information on using the ModifyReplicationGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RemoveTagsFromResourceRequest method. -// req, resp := client.RemoveTagsFromResourceRequest(params) +// // Example sending a request using the ModifyReplicationGroupRequest method. +// req, resp := client.ModifyReplicationGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RemoveTagsFromResource -func (c *ElastiCache) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *TagListMessage) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroup +func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGroupInput) (req *request.Request, output *ModifyReplicationGroupOutput) { op := &request.Operation{ - Name: opRemoveTagsFromResource, + Name: opModifyReplicationGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RemoveTagsFromResourceInput{} + input = &ModifyReplicationGroupInput{} } - output = &TagListMessage{} + output = &ModifyReplicationGroupOutput{} req = c.newRequest(op, input, output) return } -// RemoveTagsFromResource API operation for Amazon ElastiCache. +// ModifyReplicationGroup API operation for Amazon ElastiCache. // -// Removes the tags identified by the TagKeys list from the named resource. +// Modifies the settings for a replication group. +// +// * Scaling for Amazon ElastiCache for Redis (cluster mode enabled) (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html) +// in the ElastiCache User Guide +// +// * ModifyReplicationGroupShardConfiguration (https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html) +// in the ElastiCache API Reference +// +// This operation is valid for Redis only. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation RemoveTagsFromResource for usage and error information. +// API operation ModifyReplicationGroup for usage and error information. // // Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" +// The current state of the cache security group does not allow deletion. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. For more information, see InsufficientCacheClusterCapacity (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY) +// in the ElastiCache User Guide. +// // * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" // The requested cluster ID does not refer to an existing cluster. // -// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" -// The requested snapshot name does not refer to an existing snapshot. +// * ErrCodeNodeQuotaForClusterExceededFault "NodeQuotaForClusterExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes in a single cluster. // -// * ErrCodeInvalidARNFault "InvalidARN" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. // -// * ErrCodeTagNotFoundFault "TagNotFound" -// The requested tag was not found on this resource. +// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" +// The requested cache security group name does not refer to an existing cache +// security group. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RemoveTagsFromResource -func (c *ElastiCache) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*TagListMessage, error) { - req, out := c.RemoveTagsFromResourceRequest(input) +// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" +// The requested cache parameter group name does not refer to an existing cache +// parameter group. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" +// The KMS key supplied is not valid. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroup +func (c *ElastiCache) ModifyReplicationGroup(input *ModifyReplicationGroupInput) (*ModifyReplicationGroupOutput, error) { + req, out := c.ModifyReplicationGroupRequest(input) return out, req.Send() } -// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of +// ModifyReplicationGroupWithContext is the same as ModifyReplicationGroup with the addition of // the ability to pass a context and additional request options. // -// See RemoveTagsFromResource for details on how to use this API operation. +// See ModifyReplicationGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*TagListMessage, error) { - req, out := c.RemoveTagsFromResourceRequest(input) +func (c *ElastiCache) ModifyReplicationGroupWithContext(ctx aws.Context, input *ModifyReplicationGroupInput, opts ...request.Option) (*ModifyReplicationGroupOutput, error) { + req, out := c.ModifyReplicationGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opResetCacheParameterGroup = "ResetCacheParameterGroup" +const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardConfiguration" -// ResetCacheParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ResetCacheParameterGroup operation. The "output" return +// ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ResetCacheParameterGroup for more information on using the ResetCacheParameterGroup +// See ModifyReplicationGroupShardConfiguration for more information on using the ModifyReplicationGroupShardConfiguration // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ResetCacheParameterGroupRequest method. -// req, resp := client.ResetCacheParameterGroupRequest(params) +// // Example sending a request using the ModifyReplicationGroupShardConfigurationRequest method. +// req, resp := client.ModifyReplicationGroupShardConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ResetCacheParameterGroup -func (c *ElastiCache) ResetCacheParameterGroupRequest(input *ResetCacheParameterGroupInput) (req *request.Request, output *CacheParameterGroupNameMessage) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration +func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *ModifyReplicationGroupShardConfigurationInput) (req *request.Request, output *ModifyReplicationGroupShardConfigurationOutput) { op := &request.Operation{ - Name: opResetCacheParameterGroup, + Name: opModifyReplicationGroupShardConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ResetCacheParameterGroupInput{} + input = &ModifyReplicationGroupShardConfigurationInput{} } - output = &CacheParameterGroupNameMessage{} + output = &ModifyReplicationGroupShardConfigurationOutput{} req = c.newRequest(op, input, output) return } -// ResetCacheParameterGroup API operation for Amazon ElastiCache. +// ModifyReplicationGroupShardConfiguration API operation for Amazon ElastiCache. // -// Modifies the parameters of a cache parameter group to the engine or system -// default value. You can reset specific parameters by submitting a list of -// parameter names. To reset the entire cache parameter group, specify the ResetAllParameters -// and CacheParameterGroupName parameters. +// Modifies a replication group's shards (node groups) by allowing you to add +// shards, remove shards, or rebalance the keyspaces among exisiting shards. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation ResetCacheParameterGroup for usage and error information. +// API operation ModifyReplicationGroupShardConfiguration for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" -// The current state of the cache parameter group does not allow the requested -// operation to occur. +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. // -// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" -// The requested cache parameter group name does not refer to an existing cache -// parameter group. +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. For more information, see InsufficientCacheClusterCapacity (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY) +// in the ElastiCache User Guide. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 90 +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. +// +// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" +// The KMS key supplied is not valid. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -5261,93 +5679,91 @@ func (c *ElastiCache) ResetCacheParameterGroupRequest(input *ResetCacheParameter // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ResetCacheParameterGroup -func (c *ElastiCache) ResetCacheParameterGroup(input *ResetCacheParameterGroupInput) (*CacheParameterGroupNameMessage, error) { - req, out := c.ResetCacheParameterGroupRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyReplicationGroupShardConfiguration +func (c *ElastiCache) ModifyReplicationGroupShardConfiguration(input *ModifyReplicationGroupShardConfigurationInput) (*ModifyReplicationGroupShardConfigurationOutput, error) { + req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) return out, req.Send() } -// ResetCacheParameterGroupWithContext is the same as ResetCacheParameterGroup with the addition of +// ModifyReplicationGroupShardConfigurationWithContext is the same as ModifyReplicationGroupShardConfiguration with the addition of // the ability to pass a context and additional request options. // -// See ResetCacheParameterGroup for details on how to use this API operation. +// See ModifyReplicationGroupShardConfiguration for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) ResetCacheParameterGroupWithContext(ctx aws.Context, input *ResetCacheParameterGroupInput, opts ...request.Option) (*CacheParameterGroupNameMessage, error) { - req, out := c.ResetCacheParameterGroupRequest(input) +func (c *ElastiCache) ModifyReplicationGroupShardConfigurationWithContext(ctx aws.Context, input *ModifyReplicationGroupShardConfigurationInput, opts ...request.Option) (*ModifyReplicationGroupShardConfigurationOutput, error) { + req, out := c.ModifyReplicationGroupShardConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRevokeCacheSecurityGroupIngress = "RevokeCacheSecurityGroupIngress" +const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering" -// RevokeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the -// client's request for the RevokeCacheSecurityGroupIngress operation. The "output" return +// PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseReservedCacheNodesOffering operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RevokeCacheSecurityGroupIngress for more information on using the RevokeCacheSecurityGroupIngress +// See PurchaseReservedCacheNodesOffering for more information on using the PurchaseReservedCacheNodesOffering // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RevokeCacheSecurityGroupIngressRequest method. -// req, resp := client.RevokeCacheSecurityGroupIngressRequest(params) +// // Example sending a request using the PurchaseReservedCacheNodesOfferingRequest method. +// req, resp := client.PurchaseReservedCacheNodesOfferingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngress -func (c *ElastiCache) RevokeCacheSecurityGroupIngressRequest(input *RevokeCacheSecurityGroupIngressInput) (req *request.Request, output *RevokeCacheSecurityGroupIngressOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PurchaseReservedCacheNodesOffering +func (c *ElastiCache) PurchaseReservedCacheNodesOfferingRequest(input *PurchaseReservedCacheNodesOfferingInput) (req *request.Request, output *PurchaseReservedCacheNodesOfferingOutput) { op := &request.Operation{ - Name: opRevokeCacheSecurityGroupIngress, + Name: opPurchaseReservedCacheNodesOffering, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RevokeCacheSecurityGroupIngressInput{} + input = &PurchaseReservedCacheNodesOfferingInput{} } - output = &RevokeCacheSecurityGroupIngressOutput{} + output = &PurchaseReservedCacheNodesOfferingOutput{} req = c.newRequest(op, input, output) return } -// RevokeCacheSecurityGroupIngress API operation for Amazon ElastiCache. +// PurchaseReservedCacheNodesOffering API operation for Amazon ElastiCache. // -// Revokes ingress from a cache security group. Use this operation to disallow -// access from an Amazon EC2 security group that had been previously authorized. +// Allows you to purchase a reserved cache node offering. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation RevokeCacheSecurityGroupIngress for usage and error information. +// API operation PurchaseReservedCacheNodesOffering for usage and error information. // // Returned Error Codes: -// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" -// The requested cache security group name does not refer to an existing cache -// security group. +// * ErrCodeReservedCacheNodesOfferingNotFoundFault "ReservedCacheNodesOfferingNotFound" +// The requested cache node offering does not exist. // -// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// The specified Amazon EC2 security group is not authorized for the specified -// cache security group. +// * ErrCodeReservedCacheNodeAlreadyExistsFault "ReservedCacheNodeAlreadyExists" +// You already have a reservation with the given identifier. // -// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" -// The current state of the cache security group does not allow deletion. +// * ErrCodeReservedCacheNodeQuotaExceededFault "ReservedCacheNodeQuotaExceeded" +// The request cannot be processed because it would exceed the user's cache +// node quota. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -5355,1659 +5771,2936 @@ func (c *ElastiCache) RevokeCacheSecurityGroupIngressRequest(input *RevokeCacheS // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" // Two or more incompatible parameters were specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngress -func (c *ElastiCache) RevokeCacheSecurityGroupIngress(input *RevokeCacheSecurityGroupIngressInput) (*RevokeCacheSecurityGroupIngressOutput, error) { - req, out := c.RevokeCacheSecurityGroupIngressRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/PurchaseReservedCacheNodesOffering +func (c *ElastiCache) PurchaseReservedCacheNodesOffering(input *PurchaseReservedCacheNodesOfferingInput) (*PurchaseReservedCacheNodesOfferingOutput, error) { + req, out := c.PurchaseReservedCacheNodesOfferingRequest(input) return out, req.Send() } -// RevokeCacheSecurityGroupIngressWithContext is the same as RevokeCacheSecurityGroupIngress with the addition of +// PurchaseReservedCacheNodesOfferingWithContext is the same as PurchaseReservedCacheNodesOffering with the addition of // the ability to pass a context and additional request options. // -// See RevokeCacheSecurityGroupIngress for details on how to use this API operation. +// See PurchaseReservedCacheNodesOffering for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) RevokeCacheSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeCacheSecurityGroupIngressInput, opts ...request.Option) (*RevokeCacheSecurityGroupIngressOutput, error) { - req, out := c.RevokeCacheSecurityGroupIngressRequest(input) +func (c *ElastiCache) PurchaseReservedCacheNodesOfferingWithContext(ctx aws.Context, input *PurchaseReservedCacheNodesOfferingInput, opts ...request.Option) (*PurchaseReservedCacheNodesOfferingOutput, error) { + req, out := c.PurchaseReservedCacheNodesOfferingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartMigration = "StartMigration" +const opRebalanceSlotsInGlobalReplicationGroup = "RebalanceSlotsInGlobalReplicationGroup" -// StartMigrationRequest generates a "aws/request.Request" representing the -// client's request for the StartMigration operation. The "output" return +// RebalanceSlotsInGlobalReplicationGroupRequest generates a "aws/request.Request" representing the +// client's request for the RebalanceSlotsInGlobalReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartMigration for more information on using the StartMigration +// See RebalanceSlotsInGlobalReplicationGroup for more information on using the RebalanceSlotsInGlobalReplicationGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartMigrationRequest method. -// req, resp := client.StartMigrationRequest(params) +// // Example sending a request using the RebalanceSlotsInGlobalReplicationGroupRequest method. +// req, resp := client.RebalanceSlotsInGlobalReplicationGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/StartMigration -func (c *ElastiCache) StartMigrationRequest(input *StartMigrationInput) (req *request.Request, output *StartMigrationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebalanceSlotsInGlobalReplicationGroup +func (c *ElastiCache) RebalanceSlotsInGlobalReplicationGroupRequest(input *RebalanceSlotsInGlobalReplicationGroupInput) (req *request.Request, output *RebalanceSlotsInGlobalReplicationGroupOutput) { op := &request.Operation{ - Name: opStartMigration, + Name: opRebalanceSlotsInGlobalReplicationGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartMigrationInput{} + input = &RebalanceSlotsInGlobalReplicationGroupInput{} } - output = &StartMigrationOutput{} + output = &RebalanceSlotsInGlobalReplicationGroupOutput{} req = c.newRequest(op, input, output) return } -// StartMigration API operation for Amazon ElastiCache. +// RebalanceSlotsInGlobalReplicationGroup API operation for Amazon ElastiCache. // -// Start the migration of data. +// Redistribute slots to ensure uniform distribution across existing shards +// in the cluster. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation StartMigration for usage and error information. +// API operation RebalanceSlotsInGlobalReplicationGroup for usage and error information. // // Returned Error Codes: -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. +// * ErrCodeGlobalReplicationGroupNotFoundFault "GlobalReplicationGroupNotFoundFault" +// The Global Datastore does not exist // -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeReplicationGroupAlreadyUnderMigrationFault "ReplicationGroupAlreadyUnderMigrationFault" -// The targeted replication group is not available. +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/StartMigration -func (c *ElastiCache) StartMigration(input *StartMigrationInput) (*StartMigrationOutput, error) { - req, out := c.StartMigrationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebalanceSlotsInGlobalReplicationGroup +func (c *ElastiCache) RebalanceSlotsInGlobalReplicationGroup(input *RebalanceSlotsInGlobalReplicationGroupInput) (*RebalanceSlotsInGlobalReplicationGroupOutput, error) { + req, out := c.RebalanceSlotsInGlobalReplicationGroupRequest(input) return out, req.Send() } -// StartMigrationWithContext is the same as StartMigration with the addition of +// RebalanceSlotsInGlobalReplicationGroupWithContext is the same as RebalanceSlotsInGlobalReplicationGroup with the addition of // the ability to pass a context and additional request options. // -// See StartMigration for details on how to use this API operation. +// See RebalanceSlotsInGlobalReplicationGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) StartMigrationWithContext(ctx aws.Context, input *StartMigrationInput, opts ...request.Option) (*StartMigrationOutput, error) { - req, out := c.StartMigrationRequest(input) +func (c *ElastiCache) RebalanceSlotsInGlobalReplicationGroupWithContext(ctx aws.Context, input *RebalanceSlotsInGlobalReplicationGroupInput, opts ...request.Option) (*RebalanceSlotsInGlobalReplicationGroupOutput, error) { + req, out := c.RebalanceSlotsInGlobalReplicationGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTestFailover = "TestFailover" +const opRebootCacheCluster = "RebootCacheCluster" -// TestFailoverRequest generates a "aws/request.Request" representing the -// client's request for the TestFailover operation. The "output" return +// RebootCacheClusterRequest generates a "aws/request.Request" representing the +// client's request for the RebootCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TestFailover for more information on using the TestFailover +// See RebootCacheCluster for more information on using the RebootCacheCluster // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the TestFailoverRequest method. -// req, resp := client.TestFailoverRequest(params) +// // Example sending a request using the RebootCacheClusterRequest method. +// req, resp := client.RebootCacheClusterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover -func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *request.Request, output *TestFailoverOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster +func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) (req *request.Request, output *RebootCacheClusterOutput) { op := &request.Operation{ - Name: opTestFailover, + Name: opRebootCacheCluster, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TestFailoverInput{} + input = &RebootCacheClusterInput{} } - output = &TestFailoverOutput{} + output = &RebootCacheClusterOutput{} req = c.newRequest(op, input, output) return } -// TestFailover API operation for Amazon ElastiCache. -// -// Represents the input of a TestFailover operation which test automatic failover -// on a specified node group (called shard in the console) in a replication -// group (called cluster in the console). -// -// Note the following +// RebootCacheCluster API operation for Amazon ElastiCache. // -// * A customer can use this operation to test automatic failover on up to -// 5 shards (called node groups in the ElastiCache API and AWS CLI) in any -// rolling 24-hour period. +// Reboots some, or all, of the cache nodes within a provisioned cluster. This +// operation applies any modified cache parameter groups to the cluster. The +// reboot operation takes place as soon as possible, and results in a momentary +// outage to the cluster. During the reboot, the cluster status is set to REBOOTING. // -// * If calling this operation on shards in different clusters (called replication -// groups in the API and CLI), the calls can be made concurrently. +// The reboot causes the contents of the cache (for each cache node being rebooted) +// to be lost. // -// * If calling this operation multiple times on different shards in the -// same Redis (cluster mode enabled) replication group, the first node replacement -// must complete before a subsequent call can be made. +// When the reboot is complete, a cluster event is created. // -// * To determine whether the node replacement is complete you can check -// Events using the Amazon ElastiCache console, the AWS CLI, or the ElastiCache -// API. Look for the following automatic failover related events, listed -// here in order of occurrance: Replication group message: Test Failover -// API called for node group Cache cluster message: Failover -// from master node to replica node completed -// Replication group message: Failover from master node -// to replica node completed Cache cluster message: Recovering -// cache nodes Cache cluster message: Finished recovery for cache -// nodes For more information see: Viewing ElastiCache Events (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html) -// in the ElastiCache User Guide DescribeEvents (https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html) -// in the ElastiCache API Reference +// Rebooting a cluster is currently supported on Memcached and Redis (cluster +// mode disabled) clusters. Rebooting is not supported on Redis (cluster mode +// enabled) clusters. // -// Also see, Testing Multi-AZ with Automatic Failover (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test) -// in the ElastiCache User Guide. +// If you make changes to parameters that require a Redis (cluster mode enabled) +// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html) +// for an alternate process. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon ElastiCache's -// API operation TestFailover for usage and error information. +// API operation RebootCacheCluster for usage and error information. // // Returned Error Codes: -// * ErrCodeAPICallRateForCustomerExceededFault "APICallRateForCustomerExceeded" -// The customer has exceeded the allowed rate of API calls. -// // * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" // The requested cluster is not in the available state. // -// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" -// The requested replication group is not in the available state. -// -// * ErrCodeNodeGroupNotFoundFault "NodeGroupNotFoundFault" -// The node group specified by the NodeGroupId parameter could not be found. -// Please verify that the node group exists and that you spelled the NodeGroupId -// value correctly. -// -// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" -// The specified replication group does not exist. -// -// * ErrCodeTestFailoverNotAvailableFault "TestFailoverNotAvailableFault" -// The TestFailover action is not available. -// -// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" -// The KMS key supplied is not valid. -// -// * ErrCodeInvalidParameterValueException "InvalidParameterValue" -// The value for a parameter is invalid. -// -// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" -// Two or more incompatible parameters were specified. +// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" +// The requested cluster ID does not refer to an existing cluster. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover -func (c *ElastiCache) TestFailover(input *TestFailoverInput) (*TestFailoverOutput, error) { - req, out := c.TestFailoverRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheCluster +func (c *ElastiCache) RebootCacheCluster(input *RebootCacheClusterInput) (*RebootCacheClusterOutput, error) { + req, out := c.RebootCacheClusterRequest(input) return out, req.Send() } -// TestFailoverWithContext is the same as TestFailover with the addition of +// RebootCacheClusterWithContext is the same as RebootCacheCluster with the addition of // the ability to pass a context and additional request options. // -// See TestFailover for details on how to use this API operation. +// See RebootCacheCluster for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElastiCache) TestFailoverWithContext(ctx aws.Context, input *TestFailoverInput, opts ...request.Option) (*TestFailoverOutput, error) { - req, out := c.TestFailoverRequest(input) +func (c *ElastiCache) RebootCacheClusterWithContext(ctx aws.Context, input *RebootCacheClusterInput, opts ...request.Option) (*RebootCacheClusterOutput, error) { + req, out := c.RebootCacheClusterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// Represents the input of an AddTagsToResource operation. -type AddTagsToResourceInput struct { - _ struct{} `type:"structure"` +const opRemoveTagsFromResource = "RemoveTagsFromResource" - // The Amazon Resource Name (ARN) of the resource to which the tags are to be - // added, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster - // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. ElastiCache - // resources are cluster and snapshot. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS - // Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // ResourceName is a required field - ResourceName *string `type:"string" required:"true"` +// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the +// client's request for the RemoveTagsFromResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveTagsFromResourceRequest method. +// req, resp := client.RemoveTagsFromResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RemoveTagsFromResource +func (c *ElastiCache) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *TagListMessage) { + op := &request.Operation{ + Name: opRemoveTagsFromResource, + HTTPMethod: "POST", + HTTPPath: "/", + } - // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. A tag key must be accompanied by a tag value. - // - // Tags is a required field - Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` + if input == nil { + input = &RemoveTagsFromResourceInput{} + } + + output = &TagListMessage{} + req = c.newRequest(op, input, output) + return } -// String returns the string representation -func (s AddTagsToResourceInput) String() string { - return awsutil.Prettify(s) +// RemoveTagsFromResource API operation for Amazon ElastiCache. +// +// Removes the tags identified by the TagKeys list from the named 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 ElastiCache's +// API operation RemoveTagsFromResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCacheClusterNotFoundFault "CacheClusterNotFound" +// The requested cluster ID does not refer to an existing cluster. +// +// * ErrCodeSnapshotNotFoundFault "SnapshotNotFoundFault" +// The requested snapshot name does not refer to an existing snapshot. +// +// * ErrCodeInvalidARNFault "InvalidARN" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeTagNotFoundFault "TagNotFound" +// The requested tag was not found on this resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RemoveTagsFromResource +func (c *ElastiCache) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*TagListMessage, error) { + req, out := c.RemoveTagsFromResourceRequest(input) + return out, req.Send() } -// GoString returns the string representation -func (s AddTagsToResourceInput) GoString() string { - return s.String() +// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveTagsFromResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*TagListMessage, error) { + req, out := c.RemoveTagsFromResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsToResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } +const opResetCacheParameterGroup = "ResetCacheParameterGroup" - if invalidParams.Len() > 0 { - return invalidParams +// ResetCacheParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ResetCacheParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResetCacheParameterGroup for more information on using the ResetCacheParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResetCacheParameterGroupRequest method. +// req, resp := client.ResetCacheParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ResetCacheParameterGroup +func (c *ElastiCache) ResetCacheParameterGroupRequest(input *ResetCacheParameterGroupInput) (req *request.Request, output *CacheParameterGroupNameMessage) { + op := &request.Operation{ + Name: opResetCacheParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", } - return nil -} -// SetResourceName sets the ResourceName field's value. -func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { - s.ResourceName = &v - return s -} + if input == nil { + input = &ResetCacheParameterGroupInput{} + } -// SetTags sets the Tags field's value. -func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { - s.Tags = v - return s + output = &CacheParameterGroupNameMessage{} + req = c.newRequest(op, input, output) + return } -// Represents the input of an AuthorizeCacheSecurityGroupIngress operation. -type AuthorizeCacheSecurityGroupIngressInput struct { +// ResetCacheParameterGroup API operation for Amazon ElastiCache. +// +// Modifies the parameters of a cache parameter group to the engine or system +// default value. You can reset specific parameters by submitting a list of +// parameter names. To reset the entire cache parameter group, specify the ResetAllParameters +// and CacheParameterGroupName parameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation ResetCacheParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidCacheParameterGroupStateFault "InvalidCacheParameterGroupState" +// The current state of the cache parameter group does not allow the requested +// operation to occur. +// +// * ErrCodeCacheParameterGroupNotFoundFault "CacheParameterGroupNotFound" +// The requested cache parameter group name does not refer to an existing cache +// parameter group. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// * ErrCodeInvalidGlobalReplicationGroupStateFault "InvalidGlobalReplicationGroupState" +// The Global Datastore is not available or in primary-only state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ResetCacheParameterGroup +func (c *ElastiCache) ResetCacheParameterGroup(input *ResetCacheParameterGroupInput) (*CacheParameterGroupNameMessage, error) { + req, out := c.ResetCacheParameterGroupRequest(input) + return out, req.Send() +} + +// ResetCacheParameterGroupWithContext is the same as ResetCacheParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ResetCacheParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) ResetCacheParameterGroupWithContext(ctx aws.Context, input *ResetCacheParameterGroupInput, opts ...request.Option) (*CacheParameterGroupNameMessage, error) { + req, out := c.ResetCacheParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRevokeCacheSecurityGroupIngress = "RevokeCacheSecurityGroupIngress" + +// RevokeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the +// client's request for the RevokeCacheSecurityGroupIngress operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RevokeCacheSecurityGroupIngress for more information on using the RevokeCacheSecurityGroupIngress +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RevokeCacheSecurityGroupIngressRequest method. +// req, resp := client.RevokeCacheSecurityGroupIngressRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngress +func (c *ElastiCache) RevokeCacheSecurityGroupIngressRequest(input *RevokeCacheSecurityGroupIngressInput) (req *request.Request, output *RevokeCacheSecurityGroupIngressOutput) { + op := &request.Operation{ + Name: opRevokeCacheSecurityGroupIngress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeCacheSecurityGroupIngressInput{} + } + + output = &RevokeCacheSecurityGroupIngressOutput{} + req = c.newRequest(op, input, output) + return +} + +// RevokeCacheSecurityGroupIngress API operation for Amazon ElastiCache. +// +// Revokes ingress from a cache security group. Use this operation to disallow +// access from an Amazon EC2 security group that had been previously authorized. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation RevokeCacheSecurityGroupIngress for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCacheSecurityGroupNotFoundFault "CacheSecurityGroupNotFound" +// The requested cache security group name does not refer to an existing cache +// security group. +// +// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" +// The specified Amazon EC2 security group is not authorized for the specified +// cache security group. +// +// * ErrCodeInvalidCacheSecurityGroupStateFault "InvalidCacheSecurityGroupState" +// The current state of the cache security group does not allow deletion. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RevokeCacheSecurityGroupIngress +func (c *ElastiCache) RevokeCacheSecurityGroupIngress(input *RevokeCacheSecurityGroupIngressInput) (*RevokeCacheSecurityGroupIngressOutput, error) { + req, out := c.RevokeCacheSecurityGroupIngressRequest(input) + return out, req.Send() +} + +// RevokeCacheSecurityGroupIngressWithContext is the same as RevokeCacheSecurityGroupIngress with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeCacheSecurityGroupIngress for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) RevokeCacheSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeCacheSecurityGroupIngressInput, opts ...request.Option) (*RevokeCacheSecurityGroupIngressOutput, error) { + req, out := c.RevokeCacheSecurityGroupIngressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartMigration = "StartMigration" + +// StartMigrationRequest generates a "aws/request.Request" representing the +// client's request for the StartMigration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartMigration for more information on using the StartMigration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartMigrationRequest method. +// req, resp := client.StartMigrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/StartMigration +func (c *ElastiCache) StartMigrationRequest(input *StartMigrationInput) (req *request.Request, output *StartMigrationOutput) { + op := &request.Operation{ + Name: opStartMigration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartMigrationInput{} + } + + output = &StartMigrationOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartMigration API operation for Amazon ElastiCache. +// +// Start the migration of data. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation StartMigration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeReplicationGroupAlreadyUnderMigrationFault "ReplicationGroupAlreadyUnderMigrationFault" +// The targeted replication group is not available. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/StartMigration +func (c *ElastiCache) StartMigration(input *StartMigrationInput) (*StartMigrationOutput, error) { + req, out := c.StartMigrationRequest(input) + return out, req.Send() +} + +// StartMigrationWithContext is the same as StartMigration with the addition of +// the ability to pass a context and additional request options. +// +// See StartMigration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) StartMigrationWithContext(ctx aws.Context, input *StartMigrationInput, opts ...request.Option) (*StartMigrationOutput, error) { + req, out := c.StartMigrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTestFailover = "TestFailover" + +// TestFailoverRequest generates a "aws/request.Request" representing the +// client's request for the TestFailover operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TestFailover for more information on using the TestFailover +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TestFailoverRequest method. +// req, resp := client.TestFailoverRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover +func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *request.Request, output *TestFailoverOutput) { + op := &request.Operation{ + Name: opTestFailover, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestFailoverInput{} + } + + output = &TestFailoverOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestFailover API operation for Amazon ElastiCache. +// +// Represents the input of a TestFailover operation which test automatic failover +// on a specified node group (called shard in the console) in a replication +// group (called cluster in the console). +// +// Note the following +// +// * A customer can use this operation to test automatic failover on up to +// 5 shards (called node groups in the ElastiCache API and AWS CLI) in any +// rolling 24-hour period. +// +// * If calling this operation on shards in different clusters (called replication +// groups in the API and CLI), the calls can be made concurrently. +// +// * If calling this operation multiple times on different shards in the +// same Redis (cluster mode enabled) replication group, the first node replacement +// must complete before a subsequent call can be made. +// +// * To determine whether the node replacement is complete you can check +// Events using the Amazon ElastiCache console, the AWS CLI, or the ElastiCache +// API. Look for the following automatic failover related events, listed +// here in order of occurrance: Replication group message: Test Failover +// API called for node group Cache cluster message: Failover +// from master node to replica node completed +// Replication group message: Failover from master node +// to replica node completed Cache cluster message: Recovering +// cache nodes Cache cluster message: Finished recovery for cache +// nodes For more information see: Viewing ElastiCache Events (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html) +// in the ElastiCache User Guide DescribeEvents (https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html) +// in the ElastiCache API Reference +// +// Also see, Testing Multi-AZ with Automatic Failover (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test) +// in the ElastiCache User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation TestFailover for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAPICallRateForCustomerExceededFault "APICallRateForCustomerExceeded" +// The customer has exceeded the allowed rate of API calls. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeNodeGroupNotFoundFault "NodeGroupNotFoundFault" +// The node group specified by the NodeGroupId parameter could not be found. +// Please verify that the node group exists and that you spelled the NodeGroupId +// value correctly. +// +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeTestFailoverNotAvailableFault "TestFailoverNotAvailableFault" +// The TestFailover action is not available. +// +// * ErrCodeInvalidKMSKeyFault "InvalidKMSKeyFault" +// The KMS key supplied is not valid. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/TestFailover +func (c *ElastiCache) TestFailover(input *TestFailoverInput) (*TestFailoverOutput, error) { + req, out := c.TestFailoverRequest(input) + return out, req.Send() +} + +// TestFailoverWithContext is the same as TestFailover with the addition of +// the ability to pass a context and additional request options. +// +// See TestFailover for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) TestFailoverWithContext(ctx aws.Context, input *TestFailoverInput, opts ...request.Option) (*TestFailoverOutput, error) { + req, out := c.TestFailoverRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Represents the input of an AddTagsToResource operation. +type AddTagsToResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource to which the tags are to be + // added, for example arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster + // or arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot. ElastiCache + // resources are cluster and snapshot. + // + // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS + // Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // A list of cost allocation tags to be added to this resource. A tag is a key-value + // pair. A tag key must be accompanied by a tag value. + // + // Tags is a required field + Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` +} + +// String returns the string representation +func (s AddTagsToResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsToResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { + s.ResourceName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { + s.Tags = v + return s +} + +// Represents the input of an AuthorizeCacheSecurityGroupIngress operation. +type AuthorizeCacheSecurityGroupIngressInput struct { + _ struct{} `type:"structure"` + + // The cache security group that allows network ingress. + // + // CacheSecurityGroupName is a required field + CacheSecurityGroupName *string `type:"string" required:"true"` + + // The Amazon EC2 security group to be authorized for ingress to the cache security + // group. + // + // EC2SecurityGroupName is a required field + EC2SecurityGroupName *string `type:"string" required:"true"` + + // The AWS account number of the Amazon EC2 security group owner. Note that + // this is not the same thing as an AWS access key ID - you must provide a valid + // AWS account number for this parameter. + // + // EC2SecurityGroupOwnerId is a required field + EC2SecurityGroupOwnerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AuthorizeCacheSecurityGroupIngressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeCacheSecurityGroupIngressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeCacheSecurityGroupIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeCacheSecurityGroupIngressInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) + } + if s.EC2SecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupName")) + } + if s.EC2SecurityGroupOwnerId == nil { + invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupOwnerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. +func (s *AuthorizeCacheSecurityGroupIngressInput) SetCacheSecurityGroupName(v string) *AuthorizeCacheSecurityGroupIngressInput { + s.CacheSecurityGroupName = &v + return s +} + +// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. +func (s *AuthorizeCacheSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeCacheSecurityGroupIngressInput { + s.EC2SecurityGroupName = &v + return s +} + +// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. +func (s *AuthorizeCacheSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeCacheSecurityGroupIngressInput { + s.EC2SecurityGroupOwnerId = &v + return s +} + +type AuthorizeCacheSecurityGroupIngressOutput struct { + _ struct{} `type:"structure"` + + // Represents the output of one of the following operations: + // + // * AuthorizeCacheSecurityGroupIngress + // + // * CreateCacheSecurityGroup + // + // * RevokeCacheSecurityGroupIngress + CacheSecurityGroup *CacheSecurityGroup `type:"structure"` +} + +// String returns the string representation +func (s AuthorizeCacheSecurityGroupIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeCacheSecurityGroupIngressOutput) GoString() string { + return s.String() +} + +// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. +func (s *AuthorizeCacheSecurityGroupIngressOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *AuthorizeCacheSecurityGroupIngressOutput { + s.CacheSecurityGroup = v + return s +} + +// Describes an Availability Zone in which the cluster is launched. +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The name of the Availability Zone. + Name *string `type:"string"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { + s.Name = &v + return s +} + +type BatchApplyUpdateActionInput struct { + _ struct{} `type:"structure"` + + // The cache cluster IDs + CacheClusterIds []*string `type:"list"` + + // The replication group IDs + ReplicationGroupIds []*string `type:"list"` + + // The unique ID of the service update + // + // ServiceUpdateName is a required field + ServiceUpdateName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s BatchApplyUpdateActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchApplyUpdateActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchApplyUpdateActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchApplyUpdateActionInput"} + if s.ServiceUpdateName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceUpdateName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCacheClusterIds sets the CacheClusterIds field's value. +func (s *BatchApplyUpdateActionInput) SetCacheClusterIds(v []*string) *BatchApplyUpdateActionInput { + s.CacheClusterIds = v + return s +} + +// SetReplicationGroupIds sets the ReplicationGroupIds field's value. +func (s *BatchApplyUpdateActionInput) SetReplicationGroupIds(v []*string) *BatchApplyUpdateActionInput { + s.ReplicationGroupIds = v + return s +} + +// SetServiceUpdateName sets the ServiceUpdateName field's value. +func (s *BatchApplyUpdateActionInput) SetServiceUpdateName(v string) *BatchApplyUpdateActionInput { + s.ServiceUpdateName = &v + return s +} + +type BatchApplyUpdateActionOutput struct { + _ struct{} `type:"structure"` + + // Update actions that have been processed successfully + ProcessedUpdateActions []*ProcessedUpdateAction `locationNameList:"ProcessedUpdateAction" type:"list"` + + // Update actions that haven't been processed successfully + UnprocessedUpdateActions []*UnprocessedUpdateAction `locationNameList:"UnprocessedUpdateAction" type:"list"` +} + +// String returns the string representation +func (s BatchApplyUpdateActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchApplyUpdateActionOutput) GoString() string { + return s.String() +} + +// SetProcessedUpdateActions sets the ProcessedUpdateActions field's value. +func (s *BatchApplyUpdateActionOutput) SetProcessedUpdateActions(v []*ProcessedUpdateAction) *BatchApplyUpdateActionOutput { + s.ProcessedUpdateActions = v + return s +} + +// SetUnprocessedUpdateActions sets the UnprocessedUpdateActions field's value. +func (s *BatchApplyUpdateActionOutput) SetUnprocessedUpdateActions(v []*UnprocessedUpdateAction) *BatchApplyUpdateActionOutput { + s.UnprocessedUpdateActions = v + return s +} + +type BatchStopUpdateActionInput struct { + _ struct{} `type:"structure"` + + // The cache cluster IDs + CacheClusterIds []*string `type:"list"` + + // The replication group IDs + ReplicationGroupIds []*string `type:"list"` + + // The unique ID of the service update + // + // ServiceUpdateName is a required field + ServiceUpdateName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s BatchStopUpdateActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchStopUpdateActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchStopUpdateActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchStopUpdateActionInput"} + if s.ServiceUpdateName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceUpdateName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCacheClusterIds sets the CacheClusterIds field's value. +func (s *BatchStopUpdateActionInput) SetCacheClusterIds(v []*string) *BatchStopUpdateActionInput { + s.CacheClusterIds = v + return s +} + +// SetReplicationGroupIds sets the ReplicationGroupIds field's value. +func (s *BatchStopUpdateActionInput) SetReplicationGroupIds(v []*string) *BatchStopUpdateActionInput { + s.ReplicationGroupIds = v + return s +} + +// SetServiceUpdateName sets the ServiceUpdateName field's value. +func (s *BatchStopUpdateActionInput) SetServiceUpdateName(v string) *BatchStopUpdateActionInput { + s.ServiceUpdateName = &v + return s +} + +type BatchStopUpdateActionOutput struct { + _ struct{} `type:"structure"` + + // Update actions that have been processed successfully + ProcessedUpdateActions []*ProcessedUpdateAction `locationNameList:"ProcessedUpdateAction" type:"list"` + + // Update actions that haven't been processed successfully + UnprocessedUpdateActions []*UnprocessedUpdateAction `locationNameList:"UnprocessedUpdateAction" type:"list"` +} + +// String returns the string representation +func (s BatchStopUpdateActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchStopUpdateActionOutput) GoString() string { + return s.String() +} + +// SetProcessedUpdateActions sets the ProcessedUpdateActions field's value. +func (s *BatchStopUpdateActionOutput) SetProcessedUpdateActions(v []*ProcessedUpdateAction) *BatchStopUpdateActionOutput { + s.ProcessedUpdateActions = v + return s +} + +// SetUnprocessedUpdateActions sets the UnprocessedUpdateActions field's value. +func (s *BatchStopUpdateActionOutput) SetUnprocessedUpdateActions(v []*UnprocessedUpdateAction) *BatchStopUpdateActionOutput { + s.UnprocessedUpdateActions = v + return s +} + +// Contains all of the attributes of a specific cluster. +type CacheCluster struct { _ struct{} `type:"structure"` - // The cache security group that allows network ingress. + // A flag that enables encryption at-rest when set to true. + // + // You cannot modify the value of AtRestEncryptionEnabled after the cluster + // is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled + // to true when you create a cluster. + // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6, 4.x or later. + // + // Default: false + AtRestEncryptionEnabled *bool `type:"boolean"` + + // A flag that enables using an AuthToken (password) when issuing Redis commands. + // + // Default: false + AuthTokenEnabled *bool `type:"boolean"` + + // The date the auth token was last modified + AuthTokenLastModifiedDate *time.Time `type:"timestamp"` + + // This parameter is currently disabled. + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // The date and time when the cluster was created. + CacheClusterCreateTime *time.Time `type:"timestamp"` + + // The user-supplied identifier of the cluster. This identifier is a unique + // key that identifies a cluster. + CacheClusterId *string `type:"string"` + + // The current state of this cluster, one of the following values: available, + // creating, deleted, deleting, incompatible-network, modifying, rebooting cluster + // nodes, restore-failed, or snapshotting. + CacheClusterStatus *string `type:"string"` + + // The name of the compute and memory capacity node type for the cluster. + // + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. + // + // * General purpose: Current generation: M5 node types: cache.m5.large, + // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, + // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // * Compute optimized: Previous generation: (not recommended) C1 node types: + // cache.c1.xlarge + // + // * Memory optimized: Current generation: R5 node types: cache.r5.large, + // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, + // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, + // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: + // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // cache.r3.8xlarge + // + // Additional node type info + // + // * All current generation instance types are created in Amazon VPC by default. + // + // * Redis append-only files (AOF) are not supported for T1 or T2 instances. + // + // * Redis Multi-AZ with automatic failover is not supported on T1 instances. + // + // * Redis configuration variables appendonly and appendfsync are not supported + // on Redis version 2.8.22 and later. + CacheNodeType *string `type:"string"` + + // A list of cache nodes that are members of the cluster. + CacheNodes []*CacheNode `locationNameList:"CacheNode" type:"list"` + + // Status of the cache parameter group. + CacheParameterGroup *CacheParameterGroupStatus `type:"structure"` + + // A list of cache security group elements, composed of name and status sub-elements. + CacheSecurityGroups []*CacheSecurityGroupMembership `locationNameList:"CacheSecurityGroup" type:"list"` + + // The name of the cache subnet group associated with the cluster. + CacheSubnetGroupName *string `type:"string"` + + // The URL of the web page where you can download the latest ElastiCache client + // library. + ClientDownloadLandingPage *string `type:"string"` + + // Represents a Memcached cluster endpoint which, if Automatic Discovery is + // enabled on the cluster, can be used by an application to connect to any node + // in the cluster. The configuration endpoint will always have .cfg in it. // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` + // Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 + ConfigurationEndpoint *Endpoint `type:"structure"` - // The Amazon EC2 security group to be authorized for ingress to the cache security - // group. + // The name of the cache engine (memcached or redis) to be used for this cluster. + Engine *string `type:"string"` + + // The version of the cache engine that is used in this cluster. + EngineVersion *string `type:"string"` + + // Describes a notification topic and its status. Notification topics are used + // for publishing ElastiCache events to subscribers using Amazon Simple Notification + // Service (SNS). + NotificationConfiguration *NotificationConfiguration `type:"structure"` + + // The number of cache nodes in the cluster. // - // EC2SecurityGroupName is a required field - EC2SecurityGroupName *string `type:"string" required:"true"` + // For clusters running Redis, this value must be 1. For clusters running Memcached, + // this value must be between 1 and 20. + NumCacheNodes *int64 `type:"integer"` - // The AWS account number of the Amazon EC2 security group owner. Note that - // this is not the same thing as an AWS access key ID - you must provide a valid - // AWS account number for this parameter. + // A group of settings that are applied to the cluster in the future, or that + // are currently being applied. + PendingModifiedValues *PendingModifiedValues `type:"structure"` + + // The name of the Availability Zone in which the cluster is located or "Multiple" + // if the cache nodes are located in different Availability Zones. + PreferredAvailabilityZone *string `type:"string"` + + // Specifies the weekly time range during which maintenance on the cluster is + // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi + // (24H Clock UTC). The minimum maintenance window is a 60 minute period. // - // EC2SecurityGroupOwnerId is a required field - EC2SecurityGroupOwnerId *string `type:"string" required:"true"` + // Valid values for ddd are: + // + // * sun + // + // * mon + // + // * tue + // + // * wed + // + // * thu + // + // * fri + // + // * sat + // + // Example: sun:23:00-mon:01:30 + PreferredMaintenanceWindow *string `type:"string"` + + // The replication group to which this cluster belongs. If this field is empty, + // the cluster is not associated with any replication group. + ReplicationGroupId *string `type:"string"` + + // A list of VPC Security Groups associated with the cluster. + SecurityGroups []*SecurityGroupMembership `type:"list"` + + // The number of days for which ElastiCache retains automatic cluster snapshots + // before deleting them. For example, if you set SnapshotRetentionLimit to 5, + // a snapshot that was taken today is retained for 5 days before being deleted. + // + // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned + // off. + SnapshotRetentionLimit *int64 `type:"integer"` + + // The daily time range (in UTC) during which ElastiCache begins taking a daily + // snapshot of your cluster. + // + // Example: 05:00-09:00 + SnapshotWindow *string `type:"string"` + + // A flag that enables in-transit encryption when set to true. + // + // You cannot modify the value of TransitEncryptionEnabled after the cluster + // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled + // to true when you create a cluster. + // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6, 4.x or later. + // + // Default: false + TransitEncryptionEnabled *bool `type:"boolean"` } // String returns the string representation -func (s AuthorizeCacheSecurityGroupIngressInput) String() string { +func (s CacheCluster) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s AuthorizeCacheSecurityGroupIngressInput) GoString() string { - return s.String() +// GoString returns the string representation +func (s CacheCluster) GoString() string { + return s.String() +} + +// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. +func (s *CacheCluster) SetAtRestEncryptionEnabled(v bool) *CacheCluster { + s.AtRestEncryptionEnabled = &v + return s +} + +// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. +func (s *CacheCluster) SetAuthTokenEnabled(v bool) *CacheCluster { + s.AuthTokenEnabled = &v + return s +} + +// SetAuthTokenLastModifiedDate sets the AuthTokenLastModifiedDate field's value. +func (s *CacheCluster) SetAuthTokenLastModifiedDate(v time.Time) *CacheCluster { + s.AuthTokenLastModifiedDate = &v + return s +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *CacheCluster) SetAutoMinorVersionUpgrade(v bool) *CacheCluster { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetCacheClusterCreateTime sets the CacheClusterCreateTime field's value. +func (s *CacheCluster) SetCacheClusterCreateTime(v time.Time) *CacheCluster { + s.CacheClusterCreateTime = &v + return s +} + +// SetCacheClusterId sets the CacheClusterId field's value. +func (s *CacheCluster) SetCacheClusterId(v string) *CacheCluster { + s.CacheClusterId = &v + return s +} + +// SetCacheClusterStatus sets the CacheClusterStatus field's value. +func (s *CacheCluster) SetCacheClusterStatus(v string) *CacheCluster { + s.CacheClusterStatus = &v + return s +} + +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *CacheCluster) SetCacheNodeType(v string) *CacheCluster { + s.CacheNodeType = &v + return s +} + +// SetCacheNodes sets the CacheNodes field's value. +func (s *CacheCluster) SetCacheNodes(v []*CacheNode) *CacheCluster { + s.CacheNodes = v + return s +} + +// SetCacheParameterGroup sets the CacheParameterGroup field's value. +func (s *CacheCluster) SetCacheParameterGroup(v *CacheParameterGroupStatus) *CacheCluster { + s.CacheParameterGroup = v + return s +} + +// SetCacheSecurityGroups sets the CacheSecurityGroups field's value. +func (s *CacheCluster) SetCacheSecurityGroups(v []*CacheSecurityGroupMembership) *CacheCluster { + s.CacheSecurityGroups = v + return s +} + +// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. +func (s *CacheCluster) SetCacheSubnetGroupName(v string) *CacheCluster { + s.CacheSubnetGroupName = &v + return s +} + +// SetClientDownloadLandingPage sets the ClientDownloadLandingPage field's value. +func (s *CacheCluster) SetClientDownloadLandingPage(v string) *CacheCluster { + s.ClientDownloadLandingPage = &v + return s +} + +// SetConfigurationEndpoint sets the ConfigurationEndpoint field's value. +func (s *CacheCluster) SetConfigurationEndpoint(v *Endpoint) *CacheCluster { + s.ConfigurationEndpoint = v + return s +} + +// SetEngine sets the Engine field's value. +func (s *CacheCluster) SetEngine(v string) *CacheCluster { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *CacheCluster) SetEngineVersion(v string) *CacheCluster { + s.EngineVersion = &v + return s +} + +// SetNotificationConfiguration sets the NotificationConfiguration field's value. +func (s *CacheCluster) SetNotificationConfiguration(v *NotificationConfiguration) *CacheCluster { + s.NotificationConfiguration = v + return s +} + +// SetNumCacheNodes sets the NumCacheNodes field's value. +func (s *CacheCluster) SetNumCacheNodes(v int64) *CacheCluster { + s.NumCacheNodes = &v + return s +} + +// SetPendingModifiedValues sets the PendingModifiedValues field's value. +func (s *CacheCluster) SetPendingModifiedValues(v *PendingModifiedValues) *CacheCluster { + s.PendingModifiedValues = v + return s +} + +// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. +func (s *CacheCluster) SetPreferredAvailabilityZone(v string) *CacheCluster { + s.PreferredAvailabilityZone = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CacheCluster) SetPreferredMaintenanceWindow(v string) *CacheCluster { + s.PreferredMaintenanceWindow = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeCacheSecurityGroupIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeCacheSecurityGroupIngressInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) - } - if s.EC2SecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupName")) - } - if s.EC2SecurityGroupOwnerId == nil { - invalidParams.Add(request.NewErrParamRequired("EC2SecurityGroupOwnerId")) - } +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *CacheCluster) SetReplicationGroupId(v string) *CacheCluster { + s.ReplicationGroupId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *CacheCluster) SetSecurityGroups(v []*SecurityGroupMembership) *CacheCluster { + s.SecurityGroups = v + return s } -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *AuthorizeCacheSecurityGroupIngressInput) SetCacheSecurityGroupName(v string) *AuthorizeCacheSecurityGroupIngressInput { - s.CacheSecurityGroupName = &v +// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. +func (s *CacheCluster) SetSnapshotRetentionLimit(v int64) *CacheCluster { + s.SnapshotRetentionLimit = &v return s } -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *AuthorizeCacheSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeCacheSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v +// SetSnapshotWindow sets the SnapshotWindow field's value. +func (s *CacheCluster) SetSnapshotWindow(v string) *CacheCluster { + s.SnapshotWindow = &v return s } -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *AuthorizeCacheSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeCacheSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v +// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. +func (s *CacheCluster) SetTransitEncryptionEnabled(v bool) *CacheCluster { + s.TransitEncryptionEnabled = &v return s } -type AuthorizeCacheSecurityGroupIngressOutput struct { +// Provides all of the details about a particular cache engine version. +type CacheEngineVersion struct { _ struct{} `type:"structure"` - // Represents the output of one of the following operations: - // - // * AuthorizeCacheSecurityGroupIngress - // - // * CreateCacheSecurityGroup + // The description of the cache engine. + CacheEngineDescription *string `type:"string"` + + // The description of the cache engine version. + CacheEngineVersionDescription *string `type:"string"` + + // The name of the cache parameter group family associated with this cache engine. // - // * RevokeCacheSecurityGroupIngress - CacheSecurityGroup *CacheSecurityGroup `type:"structure"` + // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 + // | redis4.0 | redis5.0 | + CacheParameterGroupFamily *string `type:"string"` + + // The name of the cache engine. + Engine *string `type:"string"` + + // The version number of the cache engine. + EngineVersion *string `type:"string"` } // String returns the string representation -func (s AuthorizeCacheSecurityGroupIngressOutput) String() string { +func (s CacheEngineVersion) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AuthorizeCacheSecurityGroupIngressOutput) GoString() string { +func (s CacheEngineVersion) GoString() string { return s.String() } -// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. -func (s *AuthorizeCacheSecurityGroupIngressOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *AuthorizeCacheSecurityGroupIngressOutput { - s.CacheSecurityGroup = v +// SetCacheEngineDescription sets the CacheEngineDescription field's value. +func (s *CacheEngineVersion) SetCacheEngineDescription(v string) *CacheEngineVersion { + s.CacheEngineDescription = &v return s } -// Describes an Availability Zone in which the cluster is launched. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // The name of the Availability Zone. - Name *string `type:"string"` +// SetCacheEngineVersionDescription sets the CacheEngineVersionDescription field's value. +func (s *CacheEngineVersion) SetCacheEngineVersionDescription(v string) *CacheEngineVersion { + s.CacheEngineVersionDescription = &v + return s } -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) +// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. +func (s *CacheEngineVersion) SetCacheParameterGroupFamily(v string) *CacheEngineVersion { + s.CacheParameterGroupFamily = &v + return s } -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() +// SetEngine sets the Engine field's value. +func (s *CacheEngineVersion) SetEngine(v string) *CacheEngineVersion { + s.Engine = &v + return s } -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v +// SetEngineVersion sets the EngineVersion field's value. +func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { + s.EngineVersion = &v return s } -type BatchApplyUpdateActionInput struct { +// Represents an individual cache node within a cluster. Each cache node runs +// its own instance of the cluster's protocol-compliant caching software - either +// Memcached or Redis. +// +// The following node types are supported by ElastiCache. Generally speaking, +// the current generation types provide more memory and computational power +// at lower cost when compared to their equivalent previous generation counterparts. +// +// * General purpose: Current generation: M5 node types: cache.m5.large, +// cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, +// cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, +// cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, +// cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium +// Previous generation: (not recommended) T1 node types: cache.t1.micro M1 +// node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge +// M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge +// +// * Compute optimized: Previous generation: (not recommended) C1 node types: +// cache.c1.xlarge +// +// * Memory optimized: Current generation: R5 node types: cache.r5.large, +// cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, +// cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, +// cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: +// (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge +// R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, +// cache.r3.8xlarge +// +// Additional node type info +// +// * All current generation instance types are created in Amazon VPC by default. +// +// * Redis append-only files (AOF) are not supported for T1 or T2 instances. +// +// * Redis Multi-AZ with automatic failover is not supported on T1 instances. +// +// * Redis configuration variables appendonly and appendfsync are not supported +// on Redis version 2.8.22 and later. +type CacheNode struct { _ struct{} `type:"structure"` - // The cache cluster IDs - CacheClusterIds []*string `type:"list"` + // The date and time when the cache node was created. + CacheNodeCreateTime *time.Time `type:"timestamp"` - // The replication group IDs - ReplicationGroupIds []*string `type:"list"` + // The cache node identifier. A node ID is a numeric identifier (0001, 0002, + // etc.). The combination of cluster ID and node ID uniquely identifies every + // cache node used in a customer's AWS account. + CacheNodeId *string `type:"string"` - // The unique ID of the service update - // - // ServiceUpdateName is a required field - ServiceUpdateName *string `type:"string" required:"true"` + // The current state of this cache node, one of the following values: available, + // creating, rebooting, or deleting. + CacheNodeStatus *string `type:"string"` + + // The Availability Zone where this node was created and now resides. + CustomerAvailabilityZone *string `type:"string"` + + // The hostname for connecting to this cache node. + Endpoint *Endpoint `type:"structure"` + + // The status of the parameter group applied to this cache node. + ParameterGroupStatus *string `type:"string"` + + // The ID of the primary node to which this read replica node is synchronized. + // If this field is empty, this node is not associated with a primary cluster. + SourceCacheNodeId *string `type:"string"` } // String returns the string representation -func (s BatchApplyUpdateActionInput) String() string { +func (s CacheNode) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s BatchApplyUpdateActionInput) GoString() string { +func (s CacheNode) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchApplyUpdateActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchApplyUpdateActionInput"} - if s.ServiceUpdateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceUpdateName")) - } +// SetCacheNodeCreateTime sets the CacheNodeCreateTime field's value. +func (s *CacheNode) SetCacheNodeCreateTime(v time.Time) *CacheNode { + s.CacheNodeCreateTime = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCacheNodeId sets the CacheNodeId field's value. +func (s *CacheNode) SetCacheNodeId(v string) *CacheNode { + s.CacheNodeId = &v + return s } -// SetCacheClusterIds sets the CacheClusterIds field's value. -func (s *BatchApplyUpdateActionInput) SetCacheClusterIds(v []*string) *BatchApplyUpdateActionInput { - s.CacheClusterIds = v +// SetCacheNodeStatus sets the CacheNodeStatus field's value. +func (s *CacheNode) SetCacheNodeStatus(v string) *CacheNode { + s.CacheNodeStatus = &v return s } -// SetReplicationGroupIds sets the ReplicationGroupIds field's value. -func (s *BatchApplyUpdateActionInput) SetReplicationGroupIds(v []*string) *BatchApplyUpdateActionInput { - s.ReplicationGroupIds = v +// SetCustomerAvailabilityZone sets the CustomerAvailabilityZone field's value. +func (s *CacheNode) SetCustomerAvailabilityZone(v string) *CacheNode { + s.CustomerAvailabilityZone = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *CacheNode) SetEndpoint(v *Endpoint) *CacheNode { + s.Endpoint = v + return s +} + +// SetParameterGroupStatus sets the ParameterGroupStatus field's value. +func (s *CacheNode) SetParameterGroupStatus(v string) *CacheNode { + s.ParameterGroupStatus = &v + return s +} + +// SetSourceCacheNodeId sets the SourceCacheNodeId field's value. +func (s *CacheNode) SetSourceCacheNodeId(v string) *CacheNode { + s.SourceCacheNodeId = &v return s } -// SetServiceUpdateName sets the ServiceUpdateName field's value. -func (s *BatchApplyUpdateActionInput) SetServiceUpdateName(v string) *BatchApplyUpdateActionInput { - s.ServiceUpdateName = &v - return s -} +// A parameter that has a different value for each cache node type it is applied +// to. For example, in a Redis cluster, a cache.m1.large cache node type would +// have a larger maxmemory value than a cache.m1.small type. +type CacheNodeTypeSpecificParameter struct { + _ struct{} `type:"structure"` + + // The valid range of values for the parameter. + AllowedValues *string `type:"string"` + + // A list of cache node types and their corresponding values for this parameter. + CacheNodeTypeSpecificValues []*CacheNodeTypeSpecificValue `locationNameList:"CacheNodeTypeSpecificValue" type:"list"` + + // Indicates whether a change to the parameter is applied immediately or requires + // a reboot for the change to be applied. You can force a reboot or wait until + // the next maintenance window's reboot. For more information, see Rebooting + // a Cluster (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). + ChangeType *string `type:"string" enum:"ChangeType"` + + // The valid data type for the parameter. + DataType *string `type:"string"` + + // A description of the parameter. + Description *string `type:"string"` + + // Indicates whether (true) or not (false) the parameter can be modified. Some + // parameters have security or operational implications that prevent them from + // being changed. + IsModifiable *bool `type:"boolean"` -type BatchApplyUpdateActionOutput struct { - _ struct{} `type:"structure"` + // The earliest cache engine version to which the parameter can apply. + MinimumEngineVersion *string `type:"string"` - // Update actions that have been processed successfully - ProcessedUpdateActions []*ProcessedUpdateAction `locationNameList:"ProcessedUpdateAction" type:"list"` + // The name of the parameter. + ParameterName *string `type:"string"` - // Update actions that haven't been processed successfully - UnprocessedUpdateActions []*UnprocessedUpdateAction `locationNameList:"UnprocessedUpdateAction" type:"list"` + // The source of the parameter value. + Source *string `type:"string"` } // String returns the string representation -func (s BatchApplyUpdateActionOutput) String() string { +func (s CacheNodeTypeSpecificParameter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s BatchApplyUpdateActionOutput) GoString() string { +func (s CacheNodeTypeSpecificParameter) GoString() string { return s.String() } -// SetProcessedUpdateActions sets the ProcessedUpdateActions field's value. -func (s *BatchApplyUpdateActionOutput) SetProcessedUpdateActions(v []*ProcessedUpdateAction) *BatchApplyUpdateActionOutput { - s.ProcessedUpdateActions = v +// SetAllowedValues sets the AllowedValues field's value. +func (s *CacheNodeTypeSpecificParameter) SetAllowedValues(v string) *CacheNodeTypeSpecificParameter { + s.AllowedValues = &v return s } -// SetUnprocessedUpdateActions sets the UnprocessedUpdateActions field's value. -func (s *BatchApplyUpdateActionOutput) SetUnprocessedUpdateActions(v []*UnprocessedUpdateAction) *BatchApplyUpdateActionOutput { - s.UnprocessedUpdateActions = v +// SetCacheNodeTypeSpecificValues sets the CacheNodeTypeSpecificValues field's value. +func (s *CacheNodeTypeSpecificParameter) SetCacheNodeTypeSpecificValues(v []*CacheNodeTypeSpecificValue) *CacheNodeTypeSpecificParameter { + s.CacheNodeTypeSpecificValues = v return s } -type BatchStopUpdateActionInput struct { - _ struct{} `type:"structure"` - - // The cache cluster IDs - CacheClusterIds []*string `type:"list"` - - // The replication group IDs - ReplicationGroupIds []*string `type:"list"` - - // The unique ID of the service update - // - // ServiceUpdateName is a required field - ServiceUpdateName *string `type:"string" required:"true"` +// SetChangeType sets the ChangeType field's value. +func (s *CacheNodeTypeSpecificParameter) SetChangeType(v string) *CacheNodeTypeSpecificParameter { + s.ChangeType = &v + return s } -// String returns the string representation -func (s BatchStopUpdateActionInput) String() string { - return awsutil.Prettify(s) +// SetDataType sets the DataType field's value. +func (s *CacheNodeTypeSpecificParameter) SetDataType(v string) *CacheNodeTypeSpecificParameter { + s.DataType = &v + return s } -// GoString returns the string representation -func (s BatchStopUpdateActionInput) GoString() string { - return s.String() +// SetDescription sets the Description field's value. +func (s *CacheNodeTypeSpecificParameter) SetDescription(v string) *CacheNodeTypeSpecificParameter { + s.Description = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *BatchStopUpdateActionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchStopUpdateActionInput"} - if s.ServiceUpdateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceUpdateName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetIsModifiable sets the IsModifiable field's value. +func (s *CacheNodeTypeSpecificParameter) SetIsModifiable(v bool) *CacheNodeTypeSpecificParameter { + s.IsModifiable = &v + return s } -// SetCacheClusterIds sets the CacheClusterIds field's value. -func (s *BatchStopUpdateActionInput) SetCacheClusterIds(v []*string) *BatchStopUpdateActionInput { - s.CacheClusterIds = v +// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. +func (s *CacheNodeTypeSpecificParameter) SetMinimumEngineVersion(v string) *CacheNodeTypeSpecificParameter { + s.MinimumEngineVersion = &v return s } -// SetReplicationGroupIds sets the ReplicationGroupIds field's value. -func (s *BatchStopUpdateActionInput) SetReplicationGroupIds(v []*string) *BatchStopUpdateActionInput { - s.ReplicationGroupIds = v +// SetParameterName sets the ParameterName field's value. +func (s *CacheNodeTypeSpecificParameter) SetParameterName(v string) *CacheNodeTypeSpecificParameter { + s.ParameterName = &v return s } -// SetServiceUpdateName sets the ServiceUpdateName field's value. -func (s *BatchStopUpdateActionInput) SetServiceUpdateName(v string) *BatchStopUpdateActionInput { - s.ServiceUpdateName = &v +// SetSource sets the Source field's value. +func (s *CacheNodeTypeSpecificParameter) SetSource(v string) *CacheNodeTypeSpecificParameter { + s.Source = &v return s } -type BatchStopUpdateActionOutput struct { +// A value that applies only to a certain cache node type. +type CacheNodeTypeSpecificValue struct { _ struct{} `type:"structure"` - // Update actions that have been processed successfully - ProcessedUpdateActions []*ProcessedUpdateAction `locationNameList:"ProcessedUpdateAction" type:"list"` + // The cache node type for which this value applies. + CacheNodeType *string `type:"string"` - // Update actions that haven't been processed successfully - UnprocessedUpdateActions []*UnprocessedUpdateAction `locationNameList:"UnprocessedUpdateAction" type:"list"` + // The value for the cache node type. + Value *string `type:"string"` } // String returns the string representation -func (s BatchStopUpdateActionOutput) String() string { +func (s CacheNodeTypeSpecificValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s BatchStopUpdateActionOutput) GoString() string { +func (s CacheNodeTypeSpecificValue) GoString() string { return s.String() } -// SetProcessedUpdateActions sets the ProcessedUpdateActions field's value. -func (s *BatchStopUpdateActionOutput) SetProcessedUpdateActions(v []*ProcessedUpdateAction) *BatchStopUpdateActionOutput { - s.ProcessedUpdateActions = v +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *CacheNodeTypeSpecificValue) SetCacheNodeType(v string) *CacheNodeTypeSpecificValue { + s.CacheNodeType = &v return s } -// SetUnprocessedUpdateActions sets the UnprocessedUpdateActions field's value. -func (s *BatchStopUpdateActionOutput) SetUnprocessedUpdateActions(v []*UnprocessedUpdateAction) *BatchStopUpdateActionOutput { - s.UnprocessedUpdateActions = v +// SetValue sets the Value field's value. +func (s *CacheNodeTypeSpecificValue) SetValue(v string) *CacheNodeTypeSpecificValue { + s.Value = &v return s } -// Contains all of the attributes of a specific cluster. -type CacheCluster struct { +// The status of the service update on the cache node +type CacheNodeUpdateStatus struct { _ struct{} `type:"structure"` - // A flag that enables encryption at-rest when set to true. - // - // You cannot modify the value of AtRestEncryptionEnabled after the cluster - // is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled - // to true when you create a cluster. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6, 4.x or later. - // - // Default: false - AtRestEncryptionEnabled *bool `type:"boolean"` + // The node ID of the cache cluster + CacheNodeId *string `type:"string"` - // A flag that enables using an AuthToken (password) when issuing Redis commands. - // - // Default: false - AuthTokenEnabled *bool `type:"boolean"` + // The deletion date of the node + NodeDeletionDate *time.Time `type:"timestamp"` - // The date the auth token was last modified - AuthTokenLastModifiedDate *time.Time `type:"timestamp"` + // The end date of the update for a node + NodeUpdateEndDate *time.Time `type:"timestamp"` - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` + // Reflects whether the update was initiated by the customer or automatically + // applied + NodeUpdateInitiatedBy *string `type:"string" enum:"NodeUpdateInitiatedBy"` - // The date and time when the cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp"` + // The date when the update is triggered + NodeUpdateInitiatedDate *time.Time `type:"timestamp"` - // The user-supplied identifier of the cluster. This identifier is a unique - // key that identifies a cluster. - CacheClusterId *string `type:"string"` + // The start date of the update for a node + NodeUpdateStartDate *time.Time `type:"timestamp"` - // The current state of this cluster, one of the following values: available, - // creating, deleted, deleting, incompatible-network, modifying, rebooting cluster - // nodes, restore-failed, or snapshotting. - CacheClusterStatus *string `type:"string"` + // The update status of the node + NodeUpdateStatus *string `type:"string" enum:"NodeUpdateStatus"` - // The name of the compute and memory capacity node type for the cluster. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: Current generation: M5 node types: cache.m5.large, - // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, - // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge - // - // * Compute optimized: Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge - // - // * Memory optimized: Current generation: R5 node types: cache.r5.large, - // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, - // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, - // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: - // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // Additional node type info - // - // * All current generation instance types are created in Amazon VPC by default. - // - // * Redis append-only files (AOF) are not supported for T1 or T2 instances. - // - // * Redis Multi-AZ with automatic failover is not supported on T1 instances. - // - // * Redis configuration variables appendonly and appendfsync are not supported - // on Redis version 2.8.22 and later. - CacheNodeType *string `type:"string"` + // The date when the NodeUpdateStatus was last modified> + NodeUpdateStatusModifiedDate *time.Time `type:"timestamp"` +} - // A list of cache nodes that are members of the cluster. - CacheNodes []*CacheNode `locationNameList:"CacheNode" type:"list"` +// String returns the string representation +func (s CacheNodeUpdateStatus) String() string { + return awsutil.Prettify(s) +} - // Status of the cache parameter group. - CacheParameterGroup *CacheParameterGroupStatus `type:"structure"` +// GoString returns the string representation +func (s CacheNodeUpdateStatus) GoString() string { + return s.String() +} + +// SetCacheNodeId sets the CacheNodeId field's value. +func (s *CacheNodeUpdateStatus) SetCacheNodeId(v string) *CacheNodeUpdateStatus { + s.CacheNodeId = &v + return s +} + +// SetNodeDeletionDate sets the NodeDeletionDate field's value. +func (s *CacheNodeUpdateStatus) SetNodeDeletionDate(v time.Time) *CacheNodeUpdateStatus { + s.NodeDeletionDate = &v + return s +} + +// SetNodeUpdateEndDate sets the NodeUpdateEndDate field's value. +func (s *CacheNodeUpdateStatus) SetNodeUpdateEndDate(v time.Time) *CacheNodeUpdateStatus { + s.NodeUpdateEndDate = &v + return s +} + +// SetNodeUpdateInitiatedBy sets the NodeUpdateInitiatedBy field's value. +func (s *CacheNodeUpdateStatus) SetNodeUpdateInitiatedBy(v string) *CacheNodeUpdateStatus { + s.NodeUpdateInitiatedBy = &v + return s +} + +// SetNodeUpdateInitiatedDate sets the NodeUpdateInitiatedDate field's value. +func (s *CacheNodeUpdateStatus) SetNodeUpdateInitiatedDate(v time.Time) *CacheNodeUpdateStatus { + s.NodeUpdateInitiatedDate = &v + return s +} + +// SetNodeUpdateStartDate sets the NodeUpdateStartDate field's value. +func (s *CacheNodeUpdateStatus) SetNodeUpdateStartDate(v time.Time) *CacheNodeUpdateStatus { + s.NodeUpdateStartDate = &v + return s +} - // A list of cache security group elements, composed of name and status sub-elements. - CacheSecurityGroups []*CacheSecurityGroupMembership `locationNameList:"CacheSecurityGroup" type:"list"` +// SetNodeUpdateStatus sets the NodeUpdateStatus field's value. +func (s *CacheNodeUpdateStatus) SetNodeUpdateStatus(v string) *CacheNodeUpdateStatus { + s.NodeUpdateStatus = &v + return s +} - // The name of the cache subnet group associated with the cluster. - CacheSubnetGroupName *string `type:"string"` +// SetNodeUpdateStatusModifiedDate sets the NodeUpdateStatusModifiedDate field's value. +func (s *CacheNodeUpdateStatus) SetNodeUpdateStatusModifiedDate(v time.Time) *CacheNodeUpdateStatus { + s.NodeUpdateStatusModifiedDate = &v + return s +} - // The URL of the web page where you can download the latest ElastiCache client - // library. - ClientDownloadLandingPage *string `type:"string"` +// Represents the output of a CreateCacheParameterGroup operation. +type CacheParameterGroup struct { + _ struct{} `type:"structure"` - // Represents a Memcached cluster endpoint which, if Automatic Discovery is - // enabled on the cluster, can be used by an application to connect to any node - // in the cluster. The configuration endpoint will always have .cfg in it. + // The name of the cache parameter group family that this cache parameter group + // is compatible with. // - // Example: mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211 - ConfigurationEndpoint *Endpoint `type:"structure"` - - // The name of the cache engine (memcached or redis) to be used for this cluster. - Engine *string `type:"string"` + // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 + // | redis4.0 | redis5.0 | + CacheParameterGroupFamily *string `type:"string"` - // The version of the cache engine that is used in this cluster. - EngineVersion *string `type:"string"` + // The name of the cache parameter group. + CacheParameterGroupName *string `type:"string"` - // Describes a notification topic and its status. Notification topics are used - // for publishing ElastiCache events to subscribers using Amazon Simple Notification - // Service (SNS). - NotificationConfiguration *NotificationConfiguration `type:"structure"` + // The description for this cache parameter group. + Description *string `type:"string"` - // The number of cache nodes in the cluster. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. - NumCacheNodes *int64 `type:"integer"` + // Indicates whether the parameter group is associated with a Global Datastore + IsGlobal *bool `type:"boolean"` +} - // A group of settings that are applied to the cluster in the future, or that - // are currently being applied. - PendingModifiedValues *PendingModifiedValues `type:"structure"` +// String returns the string representation +func (s CacheParameterGroup) String() string { + return awsutil.Prettify(s) +} - // The name of the Availability Zone in which the cluster is located or "Multiple" - // if the cache nodes are located in different Availability Zones. - PreferredAvailabilityZone *string `type:"string"` +// GoString returns the string representation +func (s CacheParameterGroup) GoString() string { + return s.String() +} - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` +// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. +func (s *CacheParameterGroup) SetCacheParameterGroupFamily(v string) *CacheParameterGroup { + s.CacheParameterGroupFamily = &v + return s +} - // The replication group to which this cluster belongs. If this field is empty, - // the cluster is not associated with any replication group. - ReplicationGroupId *string `type:"string"` +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *CacheParameterGroup) SetCacheParameterGroupName(v string) *CacheParameterGroup { + s.CacheParameterGroupName = &v + return s +} - // A list of VPC Security Groups associated with the cluster. - SecurityGroups []*SecurityGroupMembership `type:"list"` +// SetDescription sets the Description field's value. +func (s *CacheParameterGroup) SetDescription(v string) *CacheParameterGroup { + s.Description = &v + return s +} - // The number of days for which ElastiCache retains automatic cluster snapshots - // before deleting them. For example, if you set SnapshotRetentionLimit to 5, - // a snapshot that was taken today is retained for 5 days before being deleted. - // - // If the value of SnapshotRetentionLimit is set to zero (0), backups are turned - // off. - SnapshotRetentionLimit *int64 `type:"integer"` +// SetIsGlobal sets the IsGlobal field's value. +func (s *CacheParameterGroup) SetIsGlobal(v bool) *CacheParameterGroup { + s.IsGlobal = &v + return s +} - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your cluster. - // - // Example: 05:00-09:00 - SnapshotWindow *string `type:"string"` +// Represents the output of one of the following operations: +// +// * ModifyCacheParameterGroup +// +// * ResetCacheParameterGroup +type CacheParameterGroupNameMessage struct { + _ struct{} `type:"structure"` - // A flag that enables in-transit encryption when set to true. - // - // You cannot modify the value of TransitEncryptionEnabled after the cluster - // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - // to true when you create a cluster. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6, 4.x or later. - // - // Default: false - TransitEncryptionEnabled *bool `type:"boolean"` + // The name of the cache parameter group. + CacheParameterGroupName *string `type:"string"` } // String returns the string representation -func (s CacheCluster) String() string { +func (s CacheParameterGroupNameMessage) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheCluster) GoString() string { +func (s CacheParameterGroupNameMessage) GoString() string { return s.String() } -// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. -func (s *CacheCluster) SetAtRestEncryptionEnabled(v bool) *CacheCluster { - s.AtRestEncryptionEnabled = &v +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *CacheParameterGroupNameMessage) SetCacheParameterGroupName(v string) *CacheParameterGroupNameMessage { + s.CacheParameterGroupName = &v return s } -// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. -func (s *CacheCluster) SetAuthTokenEnabled(v bool) *CacheCluster { - s.AuthTokenEnabled = &v - return s +// Status of the cache parameter group. +type CacheParameterGroupStatus struct { + _ struct{} `type:"structure"` + + // A list of the cache node IDs which need to be rebooted for parameter changes + // to be applied. A node ID is a numeric identifier (0001, 0002, etc.). + CacheNodeIdsToReboot []*string `locationNameList:"CacheNodeId" type:"list"` + + // The name of the cache parameter group. + CacheParameterGroupName *string `type:"string"` + + // The status of parameter updates. + ParameterApplyStatus *string `type:"string"` } -// SetAuthTokenLastModifiedDate sets the AuthTokenLastModifiedDate field's value. -func (s *CacheCluster) SetAuthTokenLastModifiedDate(v time.Time) *CacheCluster { - s.AuthTokenLastModifiedDate = &v - return s +// String returns the string representation +func (s CacheParameterGroupStatus) String() string { + return awsutil.Prettify(s) } -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CacheCluster) SetAutoMinorVersionUpgrade(v bool) *CacheCluster { - s.AutoMinorVersionUpgrade = &v - return s +// GoString returns the string representation +func (s CacheParameterGroupStatus) GoString() string { + return s.String() } -// SetCacheClusterCreateTime sets the CacheClusterCreateTime field's value. -func (s *CacheCluster) SetCacheClusterCreateTime(v time.Time) *CacheCluster { - s.CacheClusterCreateTime = &v +// SetCacheNodeIdsToReboot sets the CacheNodeIdsToReboot field's value. +func (s *CacheParameterGroupStatus) SetCacheNodeIdsToReboot(v []*string) *CacheParameterGroupStatus { + s.CacheNodeIdsToReboot = v return s } -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *CacheCluster) SetCacheClusterId(v string) *CacheCluster { - s.CacheClusterId = &v +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *CacheParameterGroupStatus) SetCacheParameterGroupName(v string) *CacheParameterGroupStatus { + s.CacheParameterGroupName = &v return s } -// SetCacheClusterStatus sets the CacheClusterStatus field's value. -func (s *CacheCluster) SetCacheClusterStatus(v string) *CacheCluster { - s.CacheClusterStatus = &v +// SetParameterApplyStatus sets the ParameterApplyStatus field's value. +func (s *CacheParameterGroupStatus) SetParameterApplyStatus(v string) *CacheParameterGroupStatus { + s.ParameterApplyStatus = &v return s } -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CacheCluster) SetCacheNodeType(v string) *CacheCluster { - s.CacheNodeType = &v - return s +// Represents the output of one of the following operations: +// +// * AuthorizeCacheSecurityGroupIngress +// +// * CreateCacheSecurityGroup +// +// * RevokeCacheSecurityGroupIngress +type CacheSecurityGroup struct { + _ struct{} `type:"structure"` + + // The name of the cache security group. + CacheSecurityGroupName *string `type:"string"` + + // The description of the cache security group. + Description *string `type:"string"` + + // A list of Amazon EC2 security groups that are associated with this cache + // security group. + EC2SecurityGroups []*EC2SecurityGroup `locationNameList:"EC2SecurityGroup" type:"list"` + + // The AWS account ID of the cache security group owner. + OwnerId *string `type:"string"` } -// SetCacheNodes sets the CacheNodes field's value. -func (s *CacheCluster) SetCacheNodes(v []*CacheNode) *CacheCluster { - s.CacheNodes = v - return s +// String returns the string representation +func (s CacheSecurityGroup) String() string { + return awsutil.Prettify(s) } -// SetCacheParameterGroup sets the CacheParameterGroup field's value. -func (s *CacheCluster) SetCacheParameterGroup(v *CacheParameterGroupStatus) *CacheCluster { - s.CacheParameterGroup = v - return s +// GoString returns the string representation +func (s CacheSecurityGroup) GoString() string { + return s.String() } -// SetCacheSecurityGroups sets the CacheSecurityGroups field's value. -func (s *CacheCluster) SetCacheSecurityGroups(v []*CacheSecurityGroupMembership) *CacheCluster { - s.CacheSecurityGroups = v +// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. +func (s *CacheSecurityGroup) SetCacheSecurityGroupName(v string) *CacheSecurityGroup { + s.CacheSecurityGroupName = &v return s } -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CacheCluster) SetCacheSubnetGroupName(v string) *CacheCluster { - s.CacheSubnetGroupName = &v +// SetDescription sets the Description field's value. +func (s *CacheSecurityGroup) SetDescription(v string) *CacheSecurityGroup { + s.Description = &v return s } -// SetClientDownloadLandingPage sets the ClientDownloadLandingPage field's value. -func (s *CacheCluster) SetClientDownloadLandingPage(v string) *CacheCluster { - s.ClientDownloadLandingPage = &v +// SetEC2SecurityGroups sets the EC2SecurityGroups field's value. +func (s *CacheSecurityGroup) SetEC2SecurityGroups(v []*EC2SecurityGroup) *CacheSecurityGroup { + s.EC2SecurityGroups = v return s } -// SetConfigurationEndpoint sets the ConfigurationEndpoint field's value. -func (s *CacheCluster) SetConfigurationEndpoint(v *Endpoint) *CacheCluster { - s.ConfigurationEndpoint = v +// SetOwnerId sets the OwnerId field's value. +func (s *CacheSecurityGroup) SetOwnerId(v string) *CacheSecurityGroup { + s.OwnerId = &v return s } -// SetEngine sets the Engine field's value. -func (s *CacheCluster) SetEngine(v string) *CacheCluster { - s.Engine = &v - return s +// Represents a cluster's status within a particular cache security group. +type CacheSecurityGroupMembership struct { + _ struct{} `type:"structure"` + + // The name of the cache security group. + CacheSecurityGroupName *string `type:"string"` + + // The membership status in the cache security group. The status changes when + // a cache security group is modified, or when the cache security groups assigned + // to a cluster are modified. + Status *string `type:"string"` } -// SetEngineVersion sets the EngineVersion field's value. -func (s *CacheCluster) SetEngineVersion(v string) *CacheCluster { - s.EngineVersion = &v - return s +// String returns the string representation +func (s CacheSecurityGroupMembership) String() string { + return awsutil.Prettify(s) } -// SetNotificationConfiguration sets the NotificationConfiguration field's value. -func (s *CacheCluster) SetNotificationConfiguration(v *NotificationConfiguration) *CacheCluster { - s.NotificationConfiguration = v - return s +// GoString returns the string representation +func (s CacheSecurityGroupMembership) GoString() string { + return s.String() } -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *CacheCluster) SetNumCacheNodes(v int64) *CacheCluster { - s.NumCacheNodes = &v +// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. +func (s *CacheSecurityGroupMembership) SetCacheSecurityGroupName(v string) *CacheSecurityGroupMembership { + s.CacheSecurityGroupName = &v return s } -// SetPendingModifiedValues sets the PendingModifiedValues field's value. -func (s *CacheCluster) SetPendingModifiedValues(v *PendingModifiedValues) *CacheCluster { - s.PendingModifiedValues = v +// SetStatus sets the Status field's value. +func (s *CacheSecurityGroupMembership) SetStatus(v string) *CacheSecurityGroupMembership { + s.Status = &v return s } -// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. -func (s *CacheCluster) SetPreferredAvailabilityZone(v string) *CacheCluster { - s.PreferredAvailabilityZone = &v - return s +// Represents the output of one of the following operations: +// +// * CreateCacheSubnetGroup +// +// * ModifyCacheSubnetGroup +type CacheSubnetGroup struct { + _ struct{} `type:"structure"` + + // The description of the cache subnet group. + CacheSubnetGroupDescription *string `type:"string"` + + // The name of the cache subnet group. + CacheSubnetGroupName *string `type:"string"` + + // A list of subnets associated with the cache subnet group. + Subnets []*Subnet `locationNameList:"Subnet" type:"list"` + + // The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet + // group. + VpcId *string `type:"string"` } -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CacheCluster) SetPreferredMaintenanceWindow(v string) *CacheCluster { - s.PreferredMaintenanceWindow = &v - return s +// String returns the string representation +func (s CacheSubnetGroup) String() string { + return awsutil.Prettify(s) } -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CacheCluster) SetReplicationGroupId(v string) *CacheCluster { - s.ReplicationGroupId = &v - return s +// GoString returns the string representation +func (s CacheSubnetGroup) GoString() string { + return s.String() } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CacheCluster) SetSecurityGroups(v []*SecurityGroupMembership) *CacheCluster { - s.SecurityGroups = v +// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. +func (s *CacheSubnetGroup) SetCacheSubnetGroupDescription(v string) *CacheSubnetGroup { + s.CacheSubnetGroupDescription = &v return s } -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *CacheCluster) SetSnapshotRetentionLimit(v int64) *CacheCluster { - s.SnapshotRetentionLimit = &v +// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. +func (s *CacheSubnetGroup) SetCacheSubnetGroupName(v string) *CacheSubnetGroup { + s.CacheSubnetGroupName = &v return s } -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *CacheCluster) SetSnapshotWindow(v string) *CacheCluster { - s.SnapshotWindow = &v +// SetSubnets sets the Subnets field's value. +func (s *CacheSubnetGroup) SetSubnets(v []*Subnet) *CacheSubnetGroup { + s.Subnets = v return s } -// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. -func (s *CacheCluster) SetTransitEncryptionEnabled(v bool) *CacheCluster { - s.TransitEncryptionEnabled = &v +// SetVpcId sets the VpcId field's value. +func (s *CacheSubnetGroup) SetVpcId(v string) *CacheSubnetGroup { + s.VpcId = &v return s } -// Provides all of the details about a particular cache engine version. -type CacheEngineVersion struct { +type CompleteMigrationInput struct { _ struct{} `type:"structure"` - // The description of the cache engine. - CacheEngineDescription *string `type:"string"` - - // The description of the cache engine version. - CacheEngineVersionDescription *string `type:"string"` + // Forces the migration to stop without ensuring that data is in sync. It is + // recommended to use this option only to abort the migration and not recommended + // when application wants to continue migration to ElastiCache. + Force *bool `type:"boolean"` - // The name of the cache parameter group family associated with this cache engine. + // The ID of the replication group to which data is being migrated. // - // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 - // | redis4.0 | redis5.0 | - CacheParameterGroupFamily *string `type:"string"` - - // The name of the cache engine. - Engine *string `type:"string"` - - // The version number of the cache engine. - EngineVersion *string `type:"string"` + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` } // String returns the string representation -func (s CacheEngineVersion) String() string { +func (s CompleteMigrationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheEngineVersion) GoString() string { +func (s CompleteMigrationInput) GoString() string { return s.String() } -// SetCacheEngineDescription sets the CacheEngineDescription field's value. -func (s *CacheEngineVersion) SetCacheEngineDescription(v string) *CacheEngineVersion { - s.CacheEngineDescription = &v - return s -} - -// SetCacheEngineVersionDescription sets the CacheEngineVersionDescription field's value. -func (s *CacheEngineVersion) SetCacheEngineVersionDescription(v string) *CacheEngineVersion { - s.CacheEngineVersionDescription = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteMigrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteMigrationInput"} + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *CacheEngineVersion) SetCacheParameterGroupFamily(v string) *CacheEngineVersion { - s.CacheParameterGroupFamily = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetEngine sets the Engine field's value. -func (s *CacheEngineVersion) SetEngine(v string) *CacheEngineVersion { - s.Engine = &v +// SetForce sets the Force field's value. +func (s *CompleteMigrationInput) SetForce(v bool) *CompleteMigrationInput { + s.Force = &v return s } -// SetEngineVersion sets the EngineVersion field's value. -func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { - s.EngineVersion = &v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *CompleteMigrationInput) SetReplicationGroupId(v string) *CompleteMigrationInput { + s.ReplicationGroupId = &v return s } -// Represents an individual cache node within a cluster. Each cache node runs -// its own instance of the cluster's protocol-compliant caching software - either -// Memcached or Redis. -// -// The following node types are supported by ElastiCache. Generally speaking, -// the current generation types provide more memory and computational power -// at lower cost when compared to their equivalent previous generation counterparts. -// -// * General purpose: Current generation: M5 node types: cache.m5.large, -// cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, -// cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, -// cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, -// cache.t2.medium Previous generation: (not recommended) T1 node types: -// cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, -// cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, -// cache.m3.2xlarge -// -// * Compute optimized: Previous generation: (not recommended) C1 node types: -// cache.c1.xlarge -// -// * Memory optimized: Current generation: R5 node types: cache.r5.large, -// cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, -// cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, -// cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: -// (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge -// R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, -// cache.r3.8xlarge -// -// Additional node type info -// -// * All current generation instance types are created in Amazon VPC by default. -// -// * Redis append-only files (AOF) are not supported for T1 or T2 instances. -// -// * Redis Multi-AZ with automatic failover is not supported on T1 instances. -// -// * Redis configuration variables appendonly and appendfsync are not supported -// on Redis version 2.8.22 and later. -type CacheNode struct { +type CompleteMigrationOutput struct { _ struct{} `type:"structure"` - // The date and time when the cache node was created. - CacheNodeCreateTime *time.Time `type:"timestamp"` + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} - // The cache node identifier. A node ID is a numeric identifier (0001, 0002, - // etc.). The combination of cluster ID and node ID uniquely identifies every - // cache node used in a customer's AWS account. - CacheNodeId *string `type:"string"` +// String returns the string representation +func (s CompleteMigrationOutput) String() string { + return awsutil.Prettify(s) +} - // The current state of this cache node. - CacheNodeStatus *string `type:"string"` +// GoString returns the string representation +func (s CompleteMigrationOutput) GoString() string { + return s.String() +} - // The Availability Zone where this node was created and now resides. - CustomerAvailabilityZone *string `type:"string"` +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *CompleteMigrationOutput) SetReplicationGroup(v *ReplicationGroup) *CompleteMigrationOutput { + s.ReplicationGroup = v + return s +} - // The hostname for connecting to this cache node. - Endpoint *Endpoint `type:"structure"` +// Node group (shard) configuration options when adding or removing replicas. +// Each node group (shard) configuration has the following members: NodeGroupId, +// NewReplicaCount, and PreferredAvailabilityZones. +type ConfigureShard struct { + _ struct{} `type:"structure"` + + // The number of replicas you want in this node group at the end of this operation. + // The maximum value for NewReplicaCount is 5. The minimum value depends upon + // the type of Redis replication group you are working with. + // + // The minimum number of replicas in a shard or replication group is: + // + // * Redis (cluster mode disabled) If Multi-AZ with Automatic Failover is + // enabled: 1 If Multi-AZ with Automatic Failover is not enable: 0 + // + // * Redis (cluster mode enabled): 0 (though you will not be able to failover + // to a replica if your primary node fails) + // + // NewReplicaCount is a required field + NewReplicaCount *int64 `type:"integer" required:"true"` - // The status of the parameter group applied to this cache node. - ParameterGroupStatus *string `type:"string"` + // The 4-digit id for the node group you are configuring. For Redis (cluster + // mode disabled) replication groups, the node group id is always 0001. To find + // a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a + // Shard's Id (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html). + // + // NodeGroupId is a required field + NodeGroupId *string `min:"1" type:"string" required:"true"` - // The ID of the primary node to which this read replica node is synchronized. - // If this field is empty, this node is not associated with a primary cluster. - SourceCacheNodeId *string `type:"string"` + // A list of PreferredAvailabilityZone strings that specify which availability + // zones the replication group's nodes are to be in. The nummber of PreferredAvailabilityZone + // values must equal the value of NewReplicaCount plus 1 to account for the + // primary node. If this member of ReplicaConfiguration is omitted, ElastiCache + // for Redis selects the availability zone for each of the replicas. + PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` } // String returns the string representation -func (s CacheNode) String() string { +func (s ConfigureShard) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheNode) GoString() string { +func (s ConfigureShard) GoString() string { return s.String() } -// SetCacheNodeCreateTime sets the CacheNodeCreateTime field's value. -func (s *CacheNode) SetCacheNodeCreateTime(v time.Time) *CacheNode { - s.CacheNodeCreateTime = &v - return s -} - -// SetCacheNodeId sets the CacheNodeId field's value. -func (s *CacheNode) SetCacheNodeId(v string) *CacheNode { - s.CacheNodeId = &v - return s -} - -// SetCacheNodeStatus sets the CacheNodeStatus field's value. -func (s *CacheNode) SetCacheNodeStatus(v string) *CacheNode { - s.CacheNodeStatus = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigureShard) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigureShard"} + if s.NewReplicaCount == nil { + invalidParams.Add(request.NewErrParamRequired("NewReplicaCount")) + } + if s.NodeGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) + } + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } -// SetCustomerAvailabilityZone sets the CustomerAvailabilityZone field's value. -func (s *CacheNode) SetCustomerAvailabilityZone(v string) *CacheNode { - s.CustomerAvailabilityZone = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetEndpoint sets the Endpoint field's value. -func (s *CacheNode) SetEndpoint(v *Endpoint) *CacheNode { - s.Endpoint = v +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *ConfigureShard) SetNewReplicaCount(v int64) *ConfigureShard { + s.NewReplicaCount = &v return s } -// SetParameterGroupStatus sets the ParameterGroupStatus field's value. -func (s *CacheNode) SetParameterGroupStatus(v string) *CacheNode { - s.ParameterGroupStatus = &v +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *ConfigureShard) SetNodeGroupId(v string) *ConfigureShard { + s.NodeGroupId = &v return s } -// SetSourceCacheNodeId sets the SourceCacheNodeId field's value. -func (s *CacheNode) SetSourceCacheNodeId(v string) *CacheNode { - s.SourceCacheNodeId = &v +// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. +func (s *ConfigureShard) SetPreferredAvailabilityZones(v []*string) *ConfigureShard { + s.PreferredAvailabilityZones = v return s } -// A parameter that has a different value for each cache node type it is applied -// to. For example, in a Redis cluster, a cache.m1.large cache node type would -// have a larger maxmemory value than a cache.m1.small type. -type CacheNodeTypeSpecificParameter struct { +// Represents the input of a CopySnapshotMessage operation. +type CopySnapshotInput struct { _ struct{} `type:"structure"` - // The valid range of values for the parameter. - AllowedValues *string `type:"string"` - - // A list of cache node types and their corresponding values for this parameter. - CacheNodeTypeSpecificValues []*CacheNodeTypeSpecificValue `locationNameList:"CacheNodeTypeSpecificValue" type:"list"` - - // Indicates whether a change to the parameter is applied immediately or requires - // a reboot for the change to be applied. You can force a reboot or wait until - // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). - ChangeType *string `type:"string" enum:"ChangeType"` - - // The valid data type for the parameter. - DataType *string `type:"string"` - - // A description of the parameter. - Description *string `type:"string"` - - // Indicates whether (true) or not (false) the parameter can be modified. Some - // parameters have security or operational implications that prevent them from - // being changed. - IsModifiable *bool `type:"boolean"` + // The ID of the KMS key used to encrypt the target snapshot. + KmsKeyId *string `type:"string"` - // The earliest cache engine version to which the parameter can apply. - MinimumEngineVersion *string `type:"string"` + // The name of an existing snapshot from which to make a copy. + // + // SourceSnapshotName is a required field + SourceSnapshotName *string `type:"string" required:"true"` - // The name of the parameter. - ParameterName *string `type:"string"` + // The Amazon S3 bucket to which the snapshot is exported. This parameter is + // used only when exporting a snapshot for external access. + // + // When using this parameter to export a snapshot, be sure Amazon ElastiCache + // has the needed permissions to this S3 bucket. For more information, see Step + // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access) + // in the Amazon ElastiCache User Guide. + // + // For more information, see Exporting a Snapshot (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) + // in the Amazon ElastiCache User Guide. + TargetBucket *string `type:"string"` - // The source of the parameter value. - Source *string `type:"string"` + // A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, + // therefore this name must be unique within its context - ElastiCache or an + // Amazon S3 bucket if exporting. + // + // TargetSnapshotName is a required field + TargetSnapshotName *string `type:"string" required:"true"` } // String returns the string representation -func (s CacheNodeTypeSpecificParameter) String() string { +func (s CopySnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheNodeTypeSpecificParameter) GoString() string { +func (s CopySnapshotInput) GoString() string { return s.String() } -// SetAllowedValues sets the AllowedValues field's value. -func (s *CacheNodeTypeSpecificParameter) SetAllowedValues(v string) *CacheNodeTypeSpecificParameter { - s.AllowedValues = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopySnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} + if s.SourceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) + } + if s.TargetSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetCacheNodeTypeSpecificValues sets the CacheNodeTypeSpecificValues field's value. -func (s *CacheNodeTypeSpecificParameter) SetCacheNodeTypeSpecificValues(v []*CacheNodeTypeSpecificValue) *CacheNodeTypeSpecificParameter { - s.CacheNodeTypeSpecificValues = v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CopySnapshotInput) SetKmsKeyId(v string) *CopySnapshotInput { + s.KmsKeyId = &v return s } -// SetChangeType sets the ChangeType field's value. -func (s *CacheNodeTypeSpecificParameter) SetChangeType(v string) *CacheNodeTypeSpecificParameter { - s.ChangeType = &v +// SetSourceSnapshotName sets the SourceSnapshotName field's value. +func (s *CopySnapshotInput) SetSourceSnapshotName(v string) *CopySnapshotInput { + s.SourceSnapshotName = &v return s } -// SetDataType sets the DataType field's value. -func (s *CacheNodeTypeSpecificParameter) SetDataType(v string) *CacheNodeTypeSpecificParameter { - s.DataType = &v +// SetTargetBucket sets the TargetBucket field's value. +func (s *CopySnapshotInput) SetTargetBucket(v string) *CopySnapshotInput { + s.TargetBucket = &v return s } -// SetDescription sets the Description field's value. -func (s *CacheNodeTypeSpecificParameter) SetDescription(v string) *CacheNodeTypeSpecificParameter { - s.Description = &v +// SetTargetSnapshotName sets the TargetSnapshotName field's value. +func (s *CopySnapshotInput) SetTargetSnapshotName(v string) *CopySnapshotInput { + s.TargetSnapshotName = &v return s } -// SetIsModifiable sets the IsModifiable field's value. -func (s *CacheNodeTypeSpecificParameter) SetIsModifiable(v bool) *CacheNodeTypeSpecificParameter { - s.IsModifiable = &v - return s +type CopySnapshotOutput struct { + _ struct{} `type:"structure"` + + // Represents a copy of an entire Redis cluster as of the time when the snapshot + // was taken. + Snapshot *Snapshot `type:"structure"` } -// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. -func (s *CacheNodeTypeSpecificParameter) SetMinimumEngineVersion(v string) *CacheNodeTypeSpecificParameter { - s.MinimumEngineVersion = &v +// String returns the string representation +func (s CopySnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopySnapshotOutput) GoString() string { + return s.String() +} + +// SetSnapshot sets the Snapshot field's value. +func (s *CopySnapshotOutput) SetSnapshot(v *Snapshot) *CopySnapshotOutput { + s.Snapshot = v return s } -// SetParameterName sets the ParameterName field's value. -func (s *CacheNodeTypeSpecificParameter) SetParameterName(v string) *CacheNodeTypeSpecificParameter { - s.ParameterName = &v - return s -} +// Represents the input of a CreateCacheCluster operation. +type CreateCacheClusterInput struct { + _ struct{} `type:"structure"` + + // Specifies whether the nodes in this Memcached cluster are created in a single + // Availability Zone or created across multiple Availability Zones in the cluster's + // region. + // + // This parameter is only supported for Memcached clusters. + // + // If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache + // assumes single-az mode. + AZMode *string `type:"string" enum:"AZMode"` + + // Reserved parameter. The password used to access a password protected server. + // + // Password constraints: + // + // * Must be only printable ASCII characters. + // + // * Must be at least 16 characters and no more than 128 characters in length. + // + // * The only permitted printable special characters are !, &, #, $, ^, <, + // >, and -. Other printable special characters cannot be used in the AUTH + // token. + // + // For more information, see AUTH password (http://redis.io/commands/AUTH) at + // http://redis.io/commands/AUTH. + AuthToken *string `type:"string"` + + // This parameter is currently disabled. + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // The node group (shard) identifier. This parameter is stored as a lowercase + // string. + // + // Constraints: + // + // * A name must contain from 1 to 50 alphanumeric characters or hyphens. + // + // * The first character must be a letter. + // + // * A name cannot end with a hyphen or contain two consecutive hyphens. + // + // CacheClusterId is a required field + CacheClusterId *string `type:"string" required:"true"` + + // The compute and memory capacity of the nodes in the node group (shard). + // + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. + // + // * General purpose: Current generation: M5 node types: cache.m5.large, + // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, + // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // * Compute optimized: Previous generation: (not recommended) C1 node types: + // cache.c1.xlarge + // + // * Memory optimized: Current generation: R5 node types: cache.r5.large, + // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, + // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, + // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: + // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // cache.r3.8xlarge + // + // Additional node type info + // + // * All current generation instance types are created in Amazon VPC by default. + // + // * Redis append-only files (AOF) are not supported for T1 or T2 instances. + // + // * Redis Multi-AZ with automatic failover is not supported on T1 instances. + // + // * Redis configuration variables appendonly and appendfsync are not supported + // on Redis version 2.8.22 and later. + CacheNodeType *string `type:"string"` -// SetSource sets the Source field's value. -func (s *CacheNodeTypeSpecificParameter) SetSource(v string) *CacheNodeTypeSpecificParameter { - s.Source = &v - return s -} + // The name of the parameter group to associate with this cluster. If this argument + // is omitted, the default parameter group for the specified engine is used. + // You cannot use any parameter group which has cluster-enabled='yes' when creating + // a cluster. + CacheParameterGroupName *string `type:"string"` -// A value that applies only to a certain cache node type. -type CacheNodeTypeSpecificValue struct { - _ struct{} `type:"structure"` + // A list of security group names to associate with this cluster. + // + // Use this parameter only when you are creating a cluster outside of an Amazon + // Virtual Private Cloud (Amazon VPC). + CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - // The cache node type for which this value applies. - CacheNodeType *string `type:"string"` + // The name of the subnet group to be used for the cluster. + // + // Use this parameter only when you are creating a cluster in an Amazon Virtual + // Private Cloud (Amazon VPC). + // + // If you're going to launch your cluster in an Amazon VPC, you need to create + // a subnet group before you start creating a cluster. For more information, + // see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). + CacheSubnetGroupName *string `type:"string"` - // The value for the cache node type. - Value *string `type:"string"` -} + // The name of the cache engine to be used for this cluster. + // + // Valid values for this parameter are: memcached | redis + Engine *string `type:"string"` -// String returns the string representation -func (s CacheNodeTypeSpecificValue) String() string { - return awsutil.Prettify(s) -} + // The version number of the cache engine to be used for this cluster. To view + // the supported cache engine versions, use the DescribeCacheEngineVersions + // operation. + // + // Important: You can upgrade to a newer engine version (see Selecting a Cache + // Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), + // but you cannot downgrade to an earlier engine version. If you want to use + // an earlier engine version, you must delete the existing cluster or replication + // group and create it anew with the earlier engine version. + EngineVersion *string `type:"string"` -// GoString returns the string representation -func (s CacheNodeTypeSpecificValue) GoString() string { - return s.String() -} + // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service + // (SNS) topic to which notifications are sent. + // + // The Amazon SNS topic owner must be the same as the cluster owner. + NotificationTopicArn *string `type:"string"` -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CacheNodeTypeSpecificValue) SetCacheNodeType(v string) *CacheNodeTypeSpecificValue { - s.CacheNodeType = &v - return s -} + // The initial number of cache nodes that the cluster has. + // + // For clusters running Redis, this value must be 1. For clusters running Memcached, + // this value must be between 1 and 20. + // + // If you need more than 20 nodes for your Memcached cluster, please fill out + // the ElastiCache Limit Increase Request form at http://aws.amazon.com/contact-us/elasticache-node-limit-request/ + // (http://aws.amazon.com/contact-us/elasticache-node-limit-request/). + NumCacheNodes *int64 `type:"integer"` -// SetValue sets the Value field's value. -func (s *CacheNodeTypeSpecificValue) SetValue(v string) *CacheNodeTypeSpecificValue { - s.Value = &v - return s -} + // The port number on which each of the cache nodes accepts connections. + Port *int64 `type:"integer"` -// The status of the service update on the cache node -type CacheNodeUpdateStatus struct { - _ struct{} `type:"structure"` + // The EC2 Availability Zone in which the cluster is created. + // + // All nodes belonging to this Memcached cluster are placed in the preferred + // Availability Zone. If you want to create your nodes across multiple Availability + // Zones, use PreferredAvailabilityZones. + // + // Default: System chosen Availability Zone. + PreferredAvailabilityZone *string `type:"string"` - // The node ID of the cache cluster - CacheNodeId *string `type:"string"` + // A list of the Availability Zones in which cache nodes are created. The order + // of the zones in the list is not important. + // + // This option is only supported on Memcached. + // + // If you are creating your cluster in an Amazon VPC (recommended) you can only + // locate nodes in Availability Zones that are associated with the subnets in + // the selected subnet group. + // + // The number of Availability Zones listed must equal the value of NumCacheNodes. + // + // If you want all the nodes in the same Availability Zone, use PreferredAvailabilityZone + // instead, or repeat the Availability Zone multiple times in the list. + // + // Default: System chosen Availability Zones. + PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` - // The deletion date of the node - NodeDeletionDate *time.Time `type:"timestamp"` + // Specifies the weekly time range during which maintenance on the cluster is + // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi + // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid + // values for ddd are: + // + // Specifies the weekly time range during which maintenance on the cluster is + // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi + // (24H Clock UTC). The minimum maintenance window is a 60 minute period. + // + // Valid values for ddd are: + // + // * sun + // + // * mon + // + // * tue + // + // * wed + // + // * thu + // + // * fri + // + // * sat + // + // Example: sun:23:00-mon:01:30 + PreferredMaintenanceWindow *string `type:"string"` - // The end date of the update for a node - NodeUpdateEndDate *time.Time `type:"timestamp"` + // 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. + // + // If the specified replication group is Multi-AZ enabled and the Availability + // Zone is not specified, the cluster is created in Availability Zones that + // provide the best spread of read replicas across Availability Zones. + // + // This parameter is only valid if the Engine parameter is redis. + ReplicationGroupId *string `type:"string"` - // Reflects whether the update was initiated by the customer or automatically - // applied - NodeUpdateInitiatedBy *string `type:"string" enum:"NodeUpdateInitiatedBy"` + // One or more VPC security groups associated with the cluster. + // + // Use this parameter only when you are creating a cluster in an Amazon Virtual + // Private Cloud (Amazon VPC). + SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - // The date when the update is triggered - NodeUpdateInitiatedDate *time.Time `type:"timestamp"` + // A single-element string list containing an Amazon Resource Name (ARN) that + // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot + // file is used to populate the node group (shard). The Amazon S3 object name + // in the ARN cannot contain any commas. + // + // This parameter is only valid if the Engine parameter is redis. + // + // Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb + SnapshotArns []*string `locationNameList:"SnapshotArn" type:"list"` - // The start date of the update for a node - NodeUpdateStartDate *time.Time `type:"timestamp"` + // The name of a Redis snapshot from which to restore data into the new node + // group (shard). The snapshot status changes to restoring while the new node + // group (shard) is being created. + // + // This parameter is only valid if the Engine parameter is redis. + SnapshotName *string `type:"string"` - // The update status of the node - NodeUpdateStatus *string `type:"string" enum:"NodeUpdateStatus"` + // The number of days for which ElastiCache retains automatic snapshots before + // deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot + // taken today is retained for 5 days before being deleted. + // + // This parameter is only valid if the Engine parameter is redis. + // + // Default: 0 (i.e., automatic backups are disabled for this cache cluster). + SnapshotRetentionLimit *int64 `type:"integer"` - // The date when the NodeUpdateStatus was last modified> - NodeUpdateStatusModifiedDate *time.Time `type:"timestamp"` + // The daily time range (in UTC) during which ElastiCache begins taking a daily + // snapshot of your node group (shard). + // + // Example: 05:00-09:00 + // + // If you do not specify this parameter, ElastiCache automatically chooses an + // appropriate time range. + // + // This parameter is only valid if the Engine parameter is redis. + SnapshotWindow *string `type:"string"` + + // A list of cost allocation tags to be added to this resource. + Tags []*Tag `locationNameList:"Tag" type:"list"` } // String returns the string representation -func (s CacheNodeUpdateStatus) String() string { +func (s CreateCacheClusterInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheNodeUpdateStatus) GoString() string { +func (s CreateCacheClusterInput) GoString() string { return s.String() } -// SetCacheNodeId sets the CacheNodeId field's value. -func (s *CacheNodeUpdateStatus) SetCacheNodeId(v string) *CacheNodeUpdateStatus { - s.CacheNodeId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCacheClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheClusterInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetNodeDeletionDate sets the NodeDeletionDate field's value. -func (s *CacheNodeUpdateStatus) SetNodeDeletionDate(v time.Time) *CacheNodeUpdateStatus { - s.NodeDeletionDate = &v +// SetAZMode sets the AZMode field's value. +func (s *CreateCacheClusterInput) SetAZMode(v string) *CreateCacheClusterInput { + s.AZMode = &v return s } -// SetNodeUpdateEndDate sets the NodeUpdateEndDate field's value. -func (s *CacheNodeUpdateStatus) SetNodeUpdateEndDate(v time.Time) *CacheNodeUpdateStatus { - s.NodeUpdateEndDate = &v +// SetAuthToken sets the AuthToken field's value. +func (s *CreateCacheClusterInput) SetAuthToken(v string) *CreateCacheClusterInput { + s.AuthToken = &v return s } -// SetNodeUpdateInitiatedBy sets the NodeUpdateInitiatedBy field's value. -func (s *CacheNodeUpdateStatus) SetNodeUpdateInitiatedBy(v string) *CacheNodeUpdateStatus { - s.NodeUpdateInitiatedBy = &v +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *CreateCacheClusterInput) SetAutoMinorVersionUpgrade(v bool) *CreateCacheClusterInput { + s.AutoMinorVersionUpgrade = &v return s } -// SetNodeUpdateInitiatedDate sets the NodeUpdateInitiatedDate field's value. -func (s *CacheNodeUpdateStatus) SetNodeUpdateInitiatedDate(v time.Time) *CacheNodeUpdateStatus { - s.NodeUpdateInitiatedDate = &v +// SetCacheClusterId sets the CacheClusterId field's value. +func (s *CreateCacheClusterInput) SetCacheClusterId(v string) *CreateCacheClusterInput { + s.CacheClusterId = &v return s } -// SetNodeUpdateStartDate sets the NodeUpdateStartDate field's value. -func (s *CacheNodeUpdateStatus) SetNodeUpdateStartDate(v time.Time) *CacheNodeUpdateStatus { - s.NodeUpdateStartDate = &v +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *CreateCacheClusterInput) SetCacheNodeType(v string) *CreateCacheClusterInput { + s.CacheNodeType = &v return s } -// SetNodeUpdateStatus sets the NodeUpdateStatus field's value. -func (s *CacheNodeUpdateStatus) SetNodeUpdateStatus(v string) *CacheNodeUpdateStatus { - s.NodeUpdateStatus = &v +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *CreateCacheClusterInput) SetCacheParameterGroupName(v string) *CreateCacheClusterInput { + s.CacheParameterGroupName = &v return s } -// SetNodeUpdateStatusModifiedDate sets the NodeUpdateStatusModifiedDate field's value. -func (s *CacheNodeUpdateStatus) SetNodeUpdateStatusModifiedDate(v time.Time) *CacheNodeUpdateStatus { - s.NodeUpdateStatusModifiedDate = &v +// SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. +func (s *CreateCacheClusterInput) SetCacheSecurityGroupNames(v []*string) *CreateCacheClusterInput { + s.CacheSecurityGroupNames = v return s } -// Represents the output of a CreateCacheParameterGroup operation. -type CacheParameterGroup struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group family that this cache parameter group - // is compatible with. - // - // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 - // | redis4.0 | redis5.0 | - CacheParameterGroupFamily *string `type:"string"` - - // The name of the cache parameter group. - CacheParameterGroupName *string `type:"string"` - - // The description for this cache parameter group. - Description *string `type:"string"` +// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. +func (s *CreateCacheClusterInput) SetCacheSubnetGroupName(v string) *CreateCacheClusterInput { + s.CacheSubnetGroupName = &v + return s } -// String returns the string representation -func (s CacheParameterGroup) String() string { - return awsutil.Prettify(s) +// SetEngine sets the Engine field's value. +func (s *CreateCacheClusterInput) SetEngine(v string) *CreateCacheClusterInput { + s.Engine = &v + return s } -// GoString returns the string representation -func (s CacheParameterGroup) GoString() string { - return s.String() +// SetEngineVersion sets the EngineVersion field's value. +func (s *CreateCacheClusterInput) SetEngineVersion(v string) *CreateCacheClusterInput { + s.EngineVersion = &v + return s } -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *CacheParameterGroup) SetCacheParameterGroupFamily(v string) *CacheParameterGroup { - s.CacheParameterGroupFamily = &v +// SetNotificationTopicArn sets the NotificationTopicArn field's value. +func (s *CreateCacheClusterInput) SetNotificationTopicArn(v string) *CreateCacheClusterInput { + s.NotificationTopicArn = &v return s } -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CacheParameterGroup) SetCacheParameterGroupName(v string) *CacheParameterGroup { - s.CacheParameterGroupName = &v +// SetNumCacheNodes sets the NumCacheNodes field's value. +func (s *CreateCacheClusterInput) SetNumCacheNodes(v int64) *CreateCacheClusterInput { + s.NumCacheNodes = &v return s } -// SetDescription sets the Description field's value. -func (s *CacheParameterGroup) SetDescription(v string) *CacheParameterGroup { - s.Description = &v +// SetPort sets the Port field's value. +func (s *CreateCacheClusterInput) SetPort(v int64) *CreateCacheClusterInput { + s.Port = &v return s } -// Represents the output of one of the following operations: -// -// * ModifyCacheParameterGroup -// -// * ResetCacheParameterGroup -type CacheParameterGroupNameMessage struct { - _ struct{} `type:"structure"` - - // The name of the cache parameter group. - CacheParameterGroupName *string `type:"string"` +// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. +func (s *CreateCacheClusterInput) SetPreferredAvailabilityZone(v string) *CreateCacheClusterInput { + s.PreferredAvailabilityZone = &v + return s } -// String returns the string representation -func (s CacheParameterGroupNameMessage) String() string { - return awsutil.Prettify(s) +// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. +func (s *CreateCacheClusterInput) SetPreferredAvailabilityZones(v []*string) *CreateCacheClusterInput { + s.PreferredAvailabilityZones = v + return s } -// GoString returns the string representation -func (s CacheParameterGroupNameMessage) GoString() string { - return s.String() +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateCacheClusterInput) SetPreferredMaintenanceWindow(v string) *CreateCacheClusterInput { + s.PreferredMaintenanceWindow = &v + return s } -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CacheParameterGroupNameMessage) SetCacheParameterGroupName(v string) *CacheParameterGroupNameMessage { - s.CacheParameterGroupName = &v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *CreateCacheClusterInput) SetReplicationGroupId(v string) *CreateCacheClusterInput { + s.ReplicationGroupId = &v return s } -// Status of the cache parameter group. -type CacheParameterGroupStatus struct { - _ struct{} `type:"structure"` - - // A list of the cache node IDs which need to be rebooted for parameter changes - // to be applied. A node ID is a numeric identifier (0001, 0002, etc.). - CacheNodeIdsToReboot []*string `locationNameList:"CacheNodeId" type:"list"` - - // The name of the cache parameter group. - CacheParameterGroupName *string `type:"string"` - - // The status of parameter updates. - ParameterApplyStatus *string `type:"string"` +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateCacheClusterInput) SetSecurityGroupIds(v []*string) *CreateCacheClusterInput { + s.SecurityGroupIds = v + return s } -// String returns the string representation -func (s CacheParameterGroupStatus) String() string { - return awsutil.Prettify(s) +// SetSnapshotArns sets the SnapshotArns field's value. +func (s *CreateCacheClusterInput) SetSnapshotArns(v []*string) *CreateCacheClusterInput { + s.SnapshotArns = v + return s } -// GoString returns the string representation -func (s CacheParameterGroupStatus) GoString() string { - return s.String() +// SetSnapshotName sets the SnapshotName field's value. +func (s *CreateCacheClusterInput) SetSnapshotName(v string) *CreateCacheClusterInput { + s.SnapshotName = &v + return s } -// SetCacheNodeIdsToReboot sets the CacheNodeIdsToReboot field's value. -func (s *CacheParameterGroupStatus) SetCacheNodeIdsToReboot(v []*string) *CacheParameterGroupStatus { - s.CacheNodeIdsToReboot = v +// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. +func (s *CreateCacheClusterInput) SetSnapshotRetentionLimit(v int64) *CreateCacheClusterInput { + s.SnapshotRetentionLimit = &v return s } -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CacheParameterGroupStatus) SetCacheParameterGroupName(v string) *CacheParameterGroupStatus { - s.CacheParameterGroupName = &v +// SetSnapshotWindow sets the SnapshotWindow field's value. +func (s *CreateCacheClusterInput) SetSnapshotWindow(v string) *CreateCacheClusterInput { + s.SnapshotWindow = &v return s } -// SetParameterApplyStatus sets the ParameterApplyStatus field's value. -func (s *CacheParameterGroupStatus) SetParameterApplyStatus(v string) *CacheParameterGroupStatus { - s.ParameterApplyStatus = &v +// SetTags sets the Tags field's value. +func (s *CreateCacheClusterInput) SetTags(v []*Tag) *CreateCacheClusterInput { + s.Tags = v return s } -// Represents the output of one of the following operations: -// -// * AuthorizeCacheSecurityGroupIngress -// -// * CreateCacheSecurityGroup -// -// * RevokeCacheSecurityGroupIngress -type CacheSecurityGroup struct { +type CreateCacheClusterOutput struct { _ struct{} `type:"structure"` - // The name of the cache security group. - CacheSecurityGroupName *string `type:"string"` - - // The description of the cache security group. - Description *string `type:"string"` - - // A list of Amazon EC2 security groups that are associated with this cache - // security group. - EC2SecurityGroups []*EC2SecurityGroup `locationNameList:"EC2SecurityGroup" type:"list"` - - // The AWS account ID of the cache security group owner. - OwnerId *string `type:"string"` + // Contains all of the attributes of a specific cluster. + CacheCluster *CacheCluster `type:"structure"` } // String returns the string representation -func (s CacheSecurityGroup) String() string { +func (s CreateCacheClusterOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheSecurityGroup) GoString() string { +func (s CreateCacheClusterOutput) GoString() string { return s.String() } -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *CacheSecurityGroup) SetCacheSecurityGroupName(v string) *CacheSecurityGroup { - s.CacheSecurityGroupName = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CacheSecurityGroup) SetDescription(v string) *CacheSecurityGroup { - s.Description = &v - return s -} - -// SetEC2SecurityGroups sets the EC2SecurityGroups field's value. -func (s *CacheSecurityGroup) SetEC2SecurityGroups(v []*EC2SecurityGroup) *CacheSecurityGroup { - s.EC2SecurityGroups = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *CacheSecurityGroup) SetOwnerId(v string) *CacheSecurityGroup { - s.OwnerId = &v +// SetCacheCluster sets the CacheCluster field's value. +func (s *CreateCacheClusterOutput) SetCacheCluster(v *CacheCluster) *CreateCacheClusterOutput { + s.CacheCluster = v return s } -// Represents a cluster's status within a particular cache security group. -type CacheSecurityGroupMembership struct { +// Represents the input of a CreateCacheParameterGroup operation. +type CreateCacheParameterGroupInput struct { _ struct{} `type:"structure"` - // The name of the cache security group. - CacheSecurityGroupName *string `type:"string"` + // The name of the cache parameter group family that the cache parameter group + // can be used with. + // + // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 + // | redis4.0 | redis5.0 | + // + // CacheParameterGroupFamily is a required field + CacheParameterGroupFamily *string `type:"string" required:"true"` - // The membership status in the cache security group. The status changes when - // a cache security group is modified, or when the cache security groups assigned - // to a cluster are modified. - Status *string `type:"string"` + // A user-specified name for the cache parameter group. + // + // CacheParameterGroupName is a required field + CacheParameterGroupName *string `type:"string" required:"true"` + + // A user-specified description for the cache parameter group. + // + // Description is a required field + Description *string `type:"string" required:"true"` } // String returns the string representation -func (s CacheSecurityGroupMembership) String() string { +func (s CreateCacheParameterGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheSecurityGroupMembership) GoString() string { +func (s CreateCacheParameterGroupInput) GoString() string { return s.String() } -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *CacheSecurityGroupMembership) SetCacheSecurityGroupName(v string) *CacheSecurityGroupMembership { - s.CacheSecurityGroupName = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCacheParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheParameterGroupInput"} + if s.CacheParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) + } + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetStatus sets the Status field's value. -func (s *CacheSecurityGroupMembership) SetStatus(v string) *CacheSecurityGroupMembership { - s.Status = &v +// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. +func (s *CreateCacheParameterGroupInput) SetCacheParameterGroupFamily(v string) *CreateCacheParameterGroupInput { + s.CacheParameterGroupFamily = &v return s } -// Represents the output of one of the following operations: -// -// * CreateCacheSubnetGroup -// -// * ModifyCacheSubnetGroup -type CacheSubnetGroup struct { - _ struct{} `type:"structure"` - - // The description of the cache subnet group. - CacheSubnetGroupDescription *string `type:"string"` +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *CreateCacheParameterGroupInput) SetCacheParameterGroupName(v string) *CreateCacheParameterGroupInput { + s.CacheParameterGroupName = &v + return s +} - // The name of the cache subnet group. - CacheSubnetGroupName *string `type:"string"` +// SetDescription sets the Description field's value. +func (s *CreateCacheParameterGroupInput) SetDescription(v string) *CreateCacheParameterGroupInput { + s.Description = &v + return s +} - // A list of subnets associated with the cache subnet group. - Subnets []*Subnet `locationNameList:"Subnet" type:"list"` +type CreateCacheParameterGroupOutput struct { + _ struct{} `type:"structure"` - // The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet - // group. - VpcId *string `type:"string"` + // Represents the output of a CreateCacheParameterGroup operation. + CacheParameterGroup *CacheParameterGroup `type:"structure"` } // String returns the string representation -func (s CacheSubnetGroup) String() string { +func (s CreateCacheParameterGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheSubnetGroup) GoString() string { +func (s CreateCacheParameterGroupOutput) GoString() string { return s.String() } -// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. -func (s *CacheSubnetGroup) SetCacheSubnetGroupDescription(v string) *CacheSubnetGroup { - s.CacheSubnetGroupDescription = &v - return s -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CacheSubnetGroup) SetCacheSubnetGroupName(v string) *CacheSubnetGroup { - s.CacheSubnetGroupName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *CacheSubnetGroup) SetSubnets(v []*Subnet) *CacheSubnetGroup { - s.Subnets = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CacheSubnetGroup) SetVpcId(v string) *CacheSubnetGroup { - s.VpcId = &v +// SetCacheParameterGroup sets the CacheParameterGroup field's value. +func (s *CreateCacheParameterGroupOutput) SetCacheParameterGroup(v *CacheParameterGroup) *CreateCacheParameterGroupOutput { + s.CacheParameterGroup = v return s } -type CompleteMigrationInput struct { +// Represents the input of a CreateCacheSecurityGroup operation. +type CreateCacheSecurityGroupInput struct { _ struct{} `type:"structure"` - // Forces the migration to stop without ensuring that data is in sync. It is - // recommended to use this option only to abort the migration and not recommended - // when application wants to continue migration to ElastiCache. - Force *bool `type:"boolean"` + // A name for the cache security group. This value is stored as a lowercase + // string. + // + // Constraints: Must contain no more than 255 alphanumeric characters. Cannot + // be the word "Default". + // + // Example: mysecuritygroup + // + // CacheSecurityGroupName is a required field + CacheSecurityGroupName *string `type:"string" required:"true"` - // The ID of the replication group to which data is being migrated. + // A description for the cache security group. // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` + // Description is a required field + Description *string `type:"string" required:"true"` } // String returns the string representation -func (s CompleteMigrationInput) String() string { +func (s CreateCacheSecurityGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CompleteMigrationInput) GoString() string { +func (s CreateCacheSecurityGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CompleteMigrationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompleteMigrationInput"} - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) +func (s *CreateCacheSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheSecurityGroupInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) } if invalidParams.Len() > 0 { @@ -7016,99 +8709,92 @@ func (s *CompleteMigrationInput) Validate() error { return nil } -// SetForce sets the Force field's value. -func (s *CompleteMigrationInput) SetForce(v bool) *CompleteMigrationInput { - s.Force = &v +// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. +func (s *CreateCacheSecurityGroupInput) SetCacheSecurityGroupName(v string) *CreateCacheSecurityGroupInput { + s.CacheSecurityGroupName = &v return s } -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CompleteMigrationInput) SetReplicationGroupId(v string) *CompleteMigrationInput { - s.ReplicationGroupId = &v +// SetDescription sets the Description field's value. +func (s *CreateCacheSecurityGroupInput) SetDescription(v string) *CreateCacheSecurityGroupInput { + s.Description = &v return s } -type CompleteMigrationOutput struct { +type CreateCacheSecurityGroupOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` + // Represents the output of one of the following operations: + // + // * AuthorizeCacheSecurityGroupIngress + // + // * CreateCacheSecurityGroup + // + // * RevokeCacheSecurityGroupIngress + CacheSecurityGroup *CacheSecurityGroup `type:"structure"` } // String returns the string representation -func (s CompleteMigrationOutput) String() string { +func (s CreateCacheSecurityGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CompleteMigrationOutput) GoString() string { +func (s CreateCacheSecurityGroupOutput) GoString() string { return s.String() } -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *CompleteMigrationOutput) SetReplicationGroup(v *ReplicationGroup) *CompleteMigrationOutput { - s.ReplicationGroup = v +// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. +func (s *CreateCacheSecurityGroupOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *CreateCacheSecurityGroupOutput { + s.CacheSecurityGroup = v return s } -// Node group (shard) configuration options when adding or removing replicas. -// Each node group (shard) configuration has the following members: NodeGroupId, -// NewReplicaCount, and PreferredAvailabilityZones. -type ConfigureShard struct { +// Represents the input of a CreateCacheSubnetGroup operation. +type CreateCacheSubnetGroupInput struct { _ struct{} `type:"structure"` - // The number of replicas you want in this node group at the end of this operation. - // The maximum value for NewReplicaCount is 5. The minimum value depends upon - // the type of Redis replication group you are working with. + // A description for the cache subnet group. // - // The minimum number of replicas in a shard or replication group is: + // CacheSubnetGroupDescription is a required field + CacheSubnetGroupDescription *string `type:"string" required:"true"` + + // A name for the cache subnet group. This value is stored as a lowercase string. // - // * Redis (cluster mode disabled) If Multi-AZ with Automatic Failover is - // enabled: 1 If Multi-AZ with Automatic Failover is not enable: 0 + // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. // - // * Redis (cluster mode enabled): 0 (though you will not be able to failover - // to a replica if your primary node fails) + // Example: mysubnetgroup // - // NewReplicaCount is a required field - NewReplicaCount *int64 `type:"integer" required:"true"` + // CacheSubnetGroupName is a required field + CacheSubnetGroupName *string `type:"string" required:"true"` - // The 4-digit id for the node group you are configuring. For Redis (cluster - // mode disabled) replication groups, the node group id is always 0001. To find - // a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a - // Shard's Id (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html). + // A list of VPC subnet IDs for the cache subnet group. // - // NodeGroupId is a required field - NodeGroupId *string `min:"1" type:"string" required:"true"` - - // A list of PreferredAvailabilityZone strings that specify which availability - // zones the replication group's nodes are to be in. The nummber of PreferredAvailabilityZone - // values must equal the value of NewReplicaCount plus 1 to account for the - // primary node. If this member of ReplicaConfiguration is omitted, ElastiCache - // for Redis selects the availability zone for each of the replicas. - PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` + // SubnetIds is a required field + SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` } // String returns the string representation -func (s ConfigureShard) String() string { +func (s CreateCacheSubnetGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ConfigureShard) GoString() string { +func (s CreateCacheSubnetGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigureShard) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigureShard"} - if s.NewReplicaCount == nil { - invalidParams.Add(request.NewErrParamRequired("NewReplicaCount")) +func (s *CreateCacheSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCacheSubnetGroupInput"} + if s.CacheSubnetGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupDescription")) } - if s.NodeGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) + if s.CacheSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) } - if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) } if invalidParams.Len() > 0 { @@ -7117,74 +8803,88 @@ func (s *ConfigureShard) Validate() error { return nil } -// SetNewReplicaCount sets the NewReplicaCount field's value. -func (s *ConfigureShard) SetNewReplicaCount(v int64) *ConfigureShard { - s.NewReplicaCount = &v +// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. +func (s *CreateCacheSubnetGroupInput) SetCacheSubnetGroupDescription(v string) *CreateCacheSubnetGroupInput { + s.CacheSubnetGroupDescription = &v + return s +} + +// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. +func (s *CreateCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *CreateCacheSubnetGroupInput { + s.CacheSubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateCacheSubnetGroupInput) SetSubnetIds(v []*string) *CreateCacheSubnetGroupInput { + s.SubnetIds = v return s } -// SetNodeGroupId sets the NodeGroupId field's value. -func (s *ConfigureShard) SetNodeGroupId(v string) *ConfigureShard { - s.NodeGroupId = &v - return s +type CreateCacheSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // Represents the output of one of the following operations: + // + // * CreateCacheSubnetGroup + // + // * ModifyCacheSubnetGroup + CacheSubnetGroup *CacheSubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateCacheSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCacheSubnetGroupOutput) GoString() string { + return s.String() } -// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. -func (s *ConfigureShard) SetPreferredAvailabilityZones(v []*string) *ConfigureShard { - s.PreferredAvailabilityZones = v +// SetCacheSubnetGroup sets the CacheSubnetGroup field's value. +func (s *CreateCacheSubnetGroupOutput) SetCacheSubnetGroup(v *CacheSubnetGroup) *CreateCacheSubnetGroupOutput { + s.CacheSubnetGroup = v return s } -// Represents the input of a CopySnapshotMessage operation. -type CopySnapshotInput struct { +type CreateGlobalReplicationGroupInput struct { _ struct{} `type:"structure"` - // The ID of the KMS key used to encrypt the target snapshot. - KmsKeyId *string `type:"string"` - - // The name of an existing snapshot from which to make a copy. - // - // SourceSnapshotName is a required field - SourceSnapshotName *string `type:"string" required:"true"` + // Provides details of the Global Datastore + GlobalReplicationGroupDescription *string `type:"string"` - // The Amazon S3 bucket to which the snapshot is exported. This parameter is - // used only when exporting a snapshot for external access. - // - // When using this parameter to export a snapshot, be sure Amazon ElastiCache - // has the needed permissions to this S3 bucket. For more information, see Step - // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access) - // in the Amazon ElastiCache User Guide. + // The suffix name of a Global Datastore. The suffix guarantees uniqueness of + // the Global Datastore name across multiple regions. // - // For more information, see Exporting a Snapshot (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) - // in the Amazon ElastiCache User Guide. - TargetBucket *string `type:"string"` + // GlobalReplicationGroupIdSuffix is a required field + GlobalReplicationGroupIdSuffix *string `type:"string" required:"true"` - // A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, - // therefore this name must be unique within its context - ElastiCache or an - // Amazon S3 bucket if exporting. + // The name of the primary cluster that accepts writes and will replicate updates + // to the secondary cluster. // - // TargetSnapshotName is a required field - TargetSnapshotName *string `type:"string" required:"true"` + // PrimaryReplicationGroupId is a required field + PrimaryReplicationGroupId *string `type:"string" required:"true"` } // String returns the string representation -func (s CopySnapshotInput) String() string { +func (s CreateGlobalReplicationGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CopySnapshotInput) GoString() string { +func (s CreateGlobalReplicationGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CopySnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} - if s.SourceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) +func (s *CreateGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGlobalReplicationGroupInput"} + if s.GlobalReplicationGroupIdSuffix == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupIdSuffix")) } - if s.TargetSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("TargetSnapshotName")) + if s.PrimaryReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("PrimaryReplicationGroupId")) } if invalidParams.Len() > 0 { @@ -7193,70 +8893,78 @@ func (s *CopySnapshotInput) Validate() error { return nil } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopySnapshotInput) SetKmsKeyId(v string) *CopySnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetSourceSnapshotName sets the SourceSnapshotName field's value. -func (s *CopySnapshotInput) SetSourceSnapshotName(v string) *CopySnapshotInput { - s.SourceSnapshotName = &v +// SetGlobalReplicationGroupDescription sets the GlobalReplicationGroupDescription field's value. +func (s *CreateGlobalReplicationGroupInput) SetGlobalReplicationGroupDescription(v string) *CreateGlobalReplicationGroupInput { + s.GlobalReplicationGroupDescription = &v return s } -// SetTargetBucket sets the TargetBucket field's value. -func (s *CopySnapshotInput) SetTargetBucket(v string) *CopySnapshotInput { - s.TargetBucket = &v +// SetGlobalReplicationGroupIdSuffix sets the GlobalReplicationGroupIdSuffix field's value. +func (s *CreateGlobalReplicationGroupInput) SetGlobalReplicationGroupIdSuffix(v string) *CreateGlobalReplicationGroupInput { + s.GlobalReplicationGroupIdSuffix = &v return s } -// SetTargetSnapshotName sets the TargetSnapshotName field's value. -func (s *CopySnapshotInput) SetTargetSnapshotName(v string) *CopySnapshotInput { - s.TargetSnapshotName = &v +// SetPrimaryReplicationGroupId sets the PrimaryReplicationGroupId field's value. +func (s *CreateGlobalReplicationGroupInput) SetPrimaryReplicationGroupId(v string) *CreateGlobalReplicationGroupInput { + s.PrimaryReplicationGroupId = &v return s } -type CopySnapshotOutput struct { +type CreateGlobalReplicationGroupOutput struct { _ struct{} `type:"structure"` - // Represents a copy of an entire Redis cluster as of the time when the snapshot - // was taken. - Snapshot *Snapshot `type:"structure"` + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` } // String returns the string representation -func (s CopySnapshotOutput) String() string { +func (s CreateGlobalReplicationGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CopySnapshotOutput) GoString() string { +func (s CreateGlobalReplicationGroupOutput) GoString() string { return s.String() } -// SetSnapshot sets the Snapshot field's value. -func (s *CopySnapshotOutput) SetSnapshot(v *Snapshot) *CopySnapshotOutput { - s.Snapshot = v +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *CreateGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *CreateGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v return s } -// Represents the input of a CreateCacheCluster operation. -type CreateCacheClusterInput struct { +// Represents the input of a CreateReplicationGroup operation. +type CreateReplicationGroupInput struct { _ struct{} `type:"structure"` - // Specifies whether the nodes in this Memcached cluster are created in a single - // Availability Zone or created across multiple Availability Zones in the cluster's - // region. + // A flag that enables encryption at rest when set to true. // - // This parameter is only supported for Memcached clusters. + // You cannot modify the value of AtRestEncryptionEnabled after the replication + // group is created. To enable encryption at rest on a replication group you + // must set AtRestEncryptionEnabled to true when you create the replication + // group. // - // If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache - // assumes single-az mode. - AZMode *string `type:"string" enum:"AZMode"` + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6, 4.x or later. + // + // Default: false + AtRestEncryptionEnabled *bool `type:"boolean"` // Reserved parameter. The password used to access a password protected server. // + // AuthToken can be specified only on replication groups where TransitEncryptionEnabled + // is true. + // + // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, + // an AuthToken, and a CacheSubnetGroup. + // // Password constraints: // // * Must be only printable ASCII characters. @@ -7274,19 +8982,26 @@ type CreateCacheClusterInput struct { // This parameter is currently disabled. AutoMinorVersionUpgrade *bool `type:"boolean"` - // The node group (shard) identifier. This parameter is stored as a lowercase - // string. + // Specifies whether a read-only replica is automatically promoted to read/write + // primary if the existing primary fails. // - // Constraints: + // If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ + // is disabled for this replication group. // - // * A name must contain from 1 to 50 alphanumeric characters or hyphens. + // AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) + // replication groups. // - // * The first character must be a letter. + // Default: false // - // * A name cannot end with a hyphen or contain two consecutive hyphens. + // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover + // on: // - // CacheClusterId is a required field - CacheClusterId *string `type:"string" required:"true"` + // * Redis versions earlier than 2.8.6. + // + // * Redis (cluster mode disabled): T1 node types. + // + // * Redis (cluster mode enabled): T1 node types. + AutomaticFailoverEnabled *bool `type:"boolean"` // The compute and memory capacity of the nodes in the node group (shard). // @@ -7297,11 +9012,11 @@ type CreateCacheClusterInput struct { // * General purpose: Current generation: M5 node types: cache.m5.large, // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge // // * Compute optimized: Previous generation: (not recommended) C1 node types: // cache.c1.xlarge @@ -7326,88 +9041,111 @@ type CreateCacheClusterInput struct { // on Redis version 2.8.22 and later. CacheNodeType *string `type:"string"` - // The name of the parameter group to associate with this cluster. If this argument - // is omitted, the default parameter group for the specified engine is used. - // You cannot use any parameter group which has cluster-enabled='yes' when creating - // a cluster. + // 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. + // + // If you are restoring to an engine version that is different than the original, + // you must specify the default version of that version. For example, CacheParameterGroupName=default.redis4.0. + // + // If you are running Redis version 3.2.4 or later, only one node group (shard), + // and want to use a default parameter group, we recommend that you specify + // the parameter group by name. + // + // * To create a Redis (cluster mode disabled) replication group, use CacheParameterGroupName=default.redis3.2. + // + // * To create a Redis (cluster mode enabled) replication group, use CacheParameterGroupName=default.redis3.2.cluster.on. CacheParameterGroupName *string `type:"string"` - // A list of security group names to associate with this cluster. - // - // Use this parameter only when you are creating a cluster outside of an Amazon - // Virtual Private Cloud (Amazon VPC). + // A list of cache security group names to associate with this replication group. CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - // The name of the subnet group to be used for the cluster. - // - // Use this parameter only when you are creating a cluster in an Amazon Virtual - // Private Cloud (Amazon VPC). + // The name of the cache subnet group to be used for the replication group. // // If you're going to launch your cluster in an Amazon VPC, you need to create // a subnet group before you start creating a cluster. For more information, // see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` - // The name of the cache engine to be used for this cluster. - // - // Valid values for this parameter are: memcached | redis + // The name of the cache engine to be used for the clusters in this replication + // group. Engine *string `type:"string"` - // The version number of the cache engine to be used for this cluster. To view - // the supported cache engine versions, use the DescribeCacheEngineVersions + // The version number of the cache engine to be used for the clusters in this + // replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), - // but you cannot downgrade to an earlier engine version. If you want to use - // an earlier engine version, you must delete the existing cluster or replication - // group and create it anew with the earlier engine version. + // Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) + // in the ElastiCache User Guide, but you cannot downgrade to an earlier engine + // version. If you want to use an earlier engine version, you must delete the + // existing cluster or replication group and create it anew with the earlier + // engine version. EngineVersion *string `type:"string"` + // The name of the Global Datastore + GlobalReplicationGroupId *string `type:"string"` + + // The ID of the KMS key used to encrypt the disk in the cluster. + KmsKeyId *string `type:"string"` + + // A list of node group (shard) configuration options. Each node group (shard) + // configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, + // ReplicaCount, and Slots. + // + // If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode + // enabled) replication group, you can use this parameter to individually configure + // each node group (shard), or you can omit this parameter. However, it is required + // when seeding a Redis (cluster mode enabled) cluster from a S3 rdb file. You + // must configure each node group (shard) using this parameter because you must + // specify the slots for each node group. + NodeGroupConfiguration []*NodeGroupConfiguration `locationNameList:"NodeGroupConfiguration" type:"list"` + // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service // (SNS) topic to which notifications are sent. // // The Amazon SNS topic owner must be the same as the cluster owner. NotificationTopicArn *string `type:"string"` - // The initial number of cache nodes that the cluster has. - // - // For clusters running Redis, this value must be 1. For clusters running Memcached, - // this value must be between 1 and 20. + // The number of clusters this replication group initially has. // - // If you need more than 20 nodes for your Memcached cluster, please fill out - // the ElastiCache Limit Increase Request form at http://aws.amazon.com/contact-us/elasticache-node-limit-request/ - // (http://aws.amazon.com/contact-us/elasticache-node-limit-request/). - NumCacheNodes *int64 `type:"integer"` - - // The port number on which each of the cache nodes accepts connections. - Port *int64 `type:"integer"` - - // The EC2 Availability Zone in which the cluster is created. + // This parameter is not used if there is more than one node group (shard). + // You should use ReplicasPerNodeGroup instead. // - // All nodes belonging to this Memcached cluster are placed in the preferred - // Availability Zone. If you want to create your nodes across multiple Availability - // Zones, use PreferredAvailabilityZones. + // If AutomaticFailoverEnabled is true, the value of this parameter must be + // at least 2. If AutomaticFailoverEnabled is false you can omit this parameter + // (it will default to 1), or you can explicitly set it to a value between 2 + // and 6. // - // Default: System chosen Availability Zone. - PreferredAvailabilityZone *string `type:"string"` + // The maximum permitted value for NumCacheClusters is 6 (1 primary plus 5 replicas). + NumCacheClusters *int64 `type:"integer"` - // A list of the Availability Zones in which cache nodes are created. The order - // of the zones in the list is not important. + // An optional parameter that specifies the number of node groups (shards) for + // this Redis (cluster mode enabled) replication group. For Redis (cluster mode + // disabled) either omit this parameter or set it to 1. // - // This option is only supported on Memcached. + // Default: 1 + NumNodeGroups *int64 `type:"integer"` + + // The port number on which each member of the replication group accepts connections. + Port *int64 `type:"integer"` + + // A list of EC2 Availability Zones in which the replication group's clusters + // are created. The order of the Availability Zones in the list is the order + // in which clusters are allocated. The primary cluster is created in the first + // AZ in the list. // - // If you are creating your cluster in an Amazon VPC (recommended) you can only - // locate nodes in Availability Zones that are associated with the subnets in - // the selected subnet group. + // This parameter is not used if there is more than one node group (shard). + // You should use NodeGroupConfiguration instead. // - // The number of Availability Zones listed must equal the value of NumCacheNodes. + // If you are creating your replication group in an Amazon VPC (recommended), + // you can only locate clusters in Availability Zones associated with the subnets + // in the selected subnet group. // - // If you want all the nodes in the same Availability Zone, use PreferredAvailabilityZone - // instead, or repeat the Availability Zone multiple times in the list. + // The number of Availability Zones listed must equal the value of NumCacheClusters. // - // Default: System chosen Availability Zones. - PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` + // Default: system chosen Availability Zones. + PreferredCacheClusterAZs []*string `locationNameList:"AvailabilityZone" type:"list"` // Specifies the weekly time range during which maintenance on the cluster is // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi @@ -7428,57 +9166,72 @@ type CreateCacheClusterInput struct { // // * wed // - // * thu + // * thu + // + // * fri + // + // * sat + // + // Example: sun:23:00-mon:01:30 + PreferredMaintenanceWindow *string `type:"string"` + + // The identifier of the cluster that serves as the primary for this replication + // group. This cluster must already exist and have a status of available. + // + // This parameter is not required if NumCacheClusters, NumNodeGroups, or ReplicasPerNodeGroup + // is specified. + PrimaryClusterId *string `type:"string"` + + // An optional parameter that specifies the number of replica nodes in each + // node group (shard). Valid values are 0 to 5. + ReplicasPerNodeGroup *int64 `type:"integer"` + + // A user-created description for the replication group. + // + // ReplicationGroupDescription is a required field + ReplicationGroupDescription *string `type:"string" required:"true"` + + // The replication group identifier. This parameter is stored as a lowercase + // string. // - // * fri + // Constraints: // - // * sat + // * A name must contain from 1 to 40 alphanumeric characters or hyphens. // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` - - // 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. + // * The first character must be a letter. // - // If the specified replication group is Multi-AZ enabled and the Availability - // Zone is not specified, the cluster is created in Availability Zones that - // provide the best spread of read replicas across Availability Zones. + // * A name cannot end with a hyphen or contain two consecutive hyphens. // - // This parameter is only valid if the Engine parameter is redis. - ReplicationGroupId *string `type:"string"` + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` - // One or more VPC security groups associated with the cluster. + // One or more Amazon VPC security groups associated with this replication group. // - // Use this parameter only when you are creating a cluster in an Amazon Virtual - // Private Cloud (Amazon VPC). + // Use this parameter only when you are creating a replication group in an Amazon + // Virtual Private Cloud (Amazon VPC). SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` - // A single-element string list containing an Amazon Resource Name (ARN) that - // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot - // file is used to populate the node group (shard). The Amazon S3 object name - // in the ARN cannot contain any commas. - // - // This parameter is only valid if the Engine parameter is redis. + // A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB + // snapshot files stored in Amazon S3. The snapshot files are used to populate + // the new replication group. The Amazon S3 object name in the ARN cannot contain + // any commas. The new replication group will have the number of node groups + // (console: shards) specified by the parameter NumNodeGroups or the number + // of node groups configured by NodeGroupConfiguration regardless of the number + // of ARNs specified here. // // Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb SnapshotArns []*string `locationNameList:"SnapshotArn" type:"list"` - // The name of a Redis snapshot from which to restore data into the new node - // group (shard). The snapshot status changes to restoring while the new node - // group (shard) is being created. - // - // This parameter is only valid if the Engine parameter is redis. + // The name of a snapshot from which to restore data into the new replication + // group. The snapshot status changes to restoring while the new replication + // group is being created. SnapshotName *string `type:"string"` // The number of days for which ElastiCache retains automatic snapshots before // deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot - // taken today is retained for 5 days before being deleted. - // - // This parameter is only valid if the Engine parameter is redis. + // that was taken today is retained for 5 days before being deleted. // - // Default: 0 (i.e., automatic backups are disabled for this cache cluster). + // Default: 0 (i.e., automatic backups are disabled for this cluster). SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily @@ -7488,29 +9241,63 @@ type CreateCacheClusterInput struct { // // If you do not specify this parameter, ElastiCache automatically chooses an // appropriate time range. - // - // This parameter is only valid if the Engine parameter is redis. SnapshotWindow *string `type:"string"` - // A list of cost allocation tags to be added to this resource. + // A list of cost allocation tags to be added to this resource. Tags are comma-separated + // key,value pairs (e.g. Key=myKey, Value=myKeyValue. You can include multiple + // tags as shown following: Key=myKey, Value=myKeyValue Key=mySecondKey, Value=mySecondKeyValue. Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A flag that enables in-transit encryption when set to true. + // + // You cannot modify the value of TransitEncryptionEnabled after the cluster + // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled + // to true when you create a cluster. + // + // This parameter is valid only if the Engine parameter is redis, the EngineVersion + // parameter is 3.2.6, 4.x or later, and the cluster is being created in an + // Amazon VPC. + // + // If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. + // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6, 4.x or later. + // + // Default: false + // + // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, + // an AuthToken, and a CacheSubnetGroup. + TransitEncryptionEnabled *bool `type:"boolean"` } // String returns the string representation -func (s CreateCacheClusterInput) String() string { +func (s CreateReplicationGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheClusterInput) GoString() string { +func (s CreateReplicationGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheClusterInput"} - if s.CacheClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) +func (s *CreateReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateReplicationGroupInput"} + if s.ReplicationGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupDescription")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.NodeGroupConfiguration != nil { + for i, v := range s.NodeGroupConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeGroupConfiguration", i), err.(request.ErrInvalidParams)) + } + } } if invalidParams.Len() > 0 { @@ -7519,212 +9306,245 @@ func (s *CreateCacheClusterInput) Validate() error { return nil } -// SetAZMode sets the AZMode field's value. -func (s *CreateCacheClusterInput) SetAZMode(v string) *CreateCacheClusterInput { - s.AZMode = &v +// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. +func (s *CreateReplicationGroupInput) SetAtRestEncryptionEnabled(v bool) *CreateReplicationGroupInput { + s.AtRestEncryptionEnabled = &v return s } // SetAuthToken sets the AuthToken field's value. -func (s *CreateCacheClusterInput) SetAuthToken(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetAuthToken(v string) *CreateReplicationGroupInput { s.AuthToken = &v return s } // SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateCacheClusterInput) SetAutoMinorVersionUpgrade(v bool) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetAutoMinorVersionUpgrade(v bool) *CreateReplicationGroupInput { s.AutoMinorVersionUpgrade = &v return s } -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *CreateCacheClusterInput) SetCacheClusterId(v string) *CreateCacheClusterInput { - s.CacheClusterId = &v +// SetAutomaticFailoverEnabled sets the AutomaticFailoverEnabled field's value. +func (s *CreateReplicationGroupInput) SetAutomaticFailoverEnabled(v bool) *CreateReplicationGroupInput { + s.AutomaticFailoverEnabled = &v return s } // SetCacheNodeType sets the CacheNodeType field's value. -func (s *CreateCacheClusterInput) SetCacheNodeType(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetCacheNodeType(v string) *CreateReplicationGroupInput { s.CacheNodeType = &v return s } // SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CreateCacheClusterInput) SetCacheParameterGroupName(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetCacheParameterGroupName(v string) *CreateReplicationGroupInput { s.CacheParameterGroupName = &v return s } // SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. -func (s *CreateCacheClusterInput) SetCacheSecurityGroupNames(v []*string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetCacheSecurityGroupNames(v []*string) *CreateReplicationGroupInput { s.CacheSecurityGroupNames = v return s } // SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CreateCacheClusterInput) SetCacheSubnetGroupName(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetCacheSubnetGroupName(v string) *CreateReplicationGroupInput { s.CacheSubnetGroupName = &v return s } // SetEngine sets the Engine field's value. -func (s *CreateCacheClusterInput) SetEngine(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetEngine(v string) *CreateReplicationGroupInput { s.Engine = &v return s } // SetEngineVersion sets the EngineVersion field's value. -func (s *CreateCacheClusterInput) SetEngineVersion(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetEngineVersion(v string) *CreateReplicationGroupInput { s.EngineVersion = &v return s } +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *CreateReplicationGroupInput) SetGlobalReplicationGroupId(v string) *CreateReplicationGroupInput { + s.GlobalReplicationGroupId = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateReplicationGroupInput) SetKmsKeyId(v string) *CreateReplicationGroupInput { + s.KmsKeyId = &v + return s +} + +// SetNodeGroupConfiguration sets the NodeGroupConfiguration field's value. +func (s *CreateReplicationGroupInput) SetNodeGroupConfiguration(v []*NodeGroupConfiguration) *CreateReplicationGroupInput { + s.NodeGroupConfiguration = v + return s +} + // SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *CreateCacheClusterInput) SetNotificationTopicArn(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetNotificationTopicArn(v string) *CreateReplicationGroupInput { s.NotificationTopicArn = &v return s } -// SetNumCacheNodes sets the NumCacheNodes field's value. -func (s *CreateCacheClusterInput) SetNumCacheNodes(v int64) *CreateCacheClusterInput { - s.NumCacheNodes = &v +// SetNumCacheClusters sets the NumCacheClusters field's value. +func (s *CreateReplicationGroupInput) SetNumCacheClusters(v int64) *CreateReplicationGroupInput { + s.NumCacheClusters = &v return s } -// SetPort sets the Port field's value. -func (s *CreateCacheClusterInput) SetPort(v int64) *CreateCacheClusterInput { - s.Port = &v +// SetNumNodeGroups sets the NumNodeGroups field's value. +func (s *CreateReplicationGroupInput) SetNumNodeGroups(v int64) *CreateReplicationGroupInput { + s.NumNodeGroups = &v return s } -// SetPreferredAvailabilityZone sets the PreferredAvailabilityZone field's value. -func (s *CreateCacheClusterInput) SetPreferredAvailabilityZone(v string) *CreateCacheClusterInput { - s.PreferredAvailabilityZone = &v +// SetPort sets the Port field's value. +func (s *CreateReplicationGroupInput) SetPort(v int64) *CreateReplicationGroupInput { + s.Port = &v return s } -// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. -func (s *CreateCacheClusterInput) SetPreferredAvailabilityZones(v []*string) *CreateCacheClusterInput { - s.PreferredAvailabilityZones = v +// SetPreferredCacheClusterAZs sets the PreferredCacheClusterAZs field's value. +func (s *CreateReplicationGroupInput) SetPreferredCacheClusterAZs(v []*string) *CreateReplicationGroupInput { + s.PreferredCacheClusterAZs = v return s } // SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateCacheClusterInput) SetPreferredMaintenanceWindow(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetPreferredMaintenanceWindow(v string) *CreateReplicationGroupInput { s.PreferredMaintenanceWindow = &v return s } +// SetPrimaryClusterId sets the PrimaryClusterId field's value. +func (s *CreateReplicationGroupInput) SetPrimaryClusterId(v string) *CreateReplicationGroupInput { + s.PrimaryClusterId = &v + return s +} + +// SetReplicasPerNodeGroup sets the ReplicasPerNodeGroup field's value. +func (s *CreateReplicationGroupInput) SetReplicasPerNodeGroup(v int64) *CreateReplicationGroupInput { + s.ReplicasPerNodeGroup = &v + return s +} + +// SetReplicationGroupDescription sets the ReplicationGroupDescription field's value. +func (s *CreateReplicationGroupInput) SetReplicationGroupDescription(v string) *CreateReplicationGroupInput { + s.ReplicationGroupDescription = &v + return s +} + // SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CreateCacheClusterInput) SetReplicationGroupId(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetReplicationGroupId(v string) *CreateReplicationGroupInput { s.ReplicationGroupId = &v return s } // SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateCacheClusterInput) SetSecurityGroupIds(v []*string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetSecurityGroupIds(v []*string) *CreateReplicationGroupInput { s.SecurityGroupIds = v return s } // SetSnapshotArns sets the SnapshotArns field's value. -func (s *CreateCacheClusterInput) SetSnapshotArns(v []*string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetSnapshotArns(v []*string) *CreateReplicationGroupInput { s.SnapshotArns = v return s } // SetSnapshotName sets the SnapshotName field's value. -func (s *CreateCacheClusterInput) SetSnapshotName(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetSnapshotName(v string) *CreateReplicationGroupInput { s.SnapshotName = &v return s } // SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *CreateCacheClusterInput) SetSnapshotRetentionLimit(v int64) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetSnapshotRetentionLimit(v int64) *CreateReplicationGroupInput { s.SnapshotRetentionLimit = &v return s } // SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *CreateCacheClusterInput) SetSnapshotWindow(v string) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetSnapshotWindow(v string) *CreateReplicationGroupInput { s.SnapshotWindow = &v return s } // SetTags sets the Tags field's value. -func (s *CreateCacheClusterInput) SetTags(v []*Tag) *CreateCacheClusterInput { +func (s *CreateReplicationGroupInput) SetTags(v []*Tag) *CreateReplicationGroupInput { s.Tags = v return s } -type CreateCacheClusterOutput struct { +// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. +func (s *CreateReplicationGroupInput) SetTransitEncryptionEnabled(v bool) *CreateReplicationGroupInput { + s.TransitEncryptionEnabled = &v + return s +} + +type CreateReplicationGroupOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific cluster. - CacheCluster *CacheCluster `type:"structure"` + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` } // String returns the string representation -func (s CreateCacheClusterOutput) String() string { +func (s CreateReplicationGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheClusterOutput) GoString() string { +func (s CreateReplicationGroupOutput) GoString() string { return s.String() } -// SetCacheCluster sets the CacheCluster field's value. -func (s *CreateCacheClusterOutput) SetCacheCluster(v *CacheCluster) *CreateCacheClusterOutput { - s.CacheCluster = v +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *CreateReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *CreateReplicationGroupOutput { + s.ReplicationGroup = v return s } -// Represents the input of a CreateCacheParameterGroup operation. -type CreateCacheParameterGroupInput struct { +// Represents the input of a CreateSnapshot operation. +type CreateSnapshotInput struct { _ struct{} `type:"structure"` - // The name of the cache parameter group family that the cache parameter group - // can be used with. - // - // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 - // | redis4.0 | redis5.0 | - // - // CacheParameterGroupFamily is a required field - CacheParameterGroupFamily *string `type:"string" required:"true"` - - // A user-specified name for the cache parameter group. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` + // The identifier of an existing cluster. The snapshot is created from this + // cluster. + CacheClusterId *string `type:"string"` - // A user-specified description for the cache parameter group. + // The ID of the KMS key used to encrypt the snapshot. + KmsKeyId *string `type:"string"` + + // The identifier of an existing replication group. The snapshot is created + // from this replication group. + ReplicationGroupId *string `type:"string"` + + // A name for the snapshot being created. // - // Description is a required field - Description *string `type:"string" required:"true"` + // SnapshotName is a required field + SnapshotName *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateCacheParameterGroupInput) String() string { +func (s CreateSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheParameterGroupInput) GoString() string { +func (s CreateSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheParameterGroupInput"} - if s.CacheParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) - } - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.SnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotName")) } if invalidParams.Len() > 0 { @@ -7733,86 +9553,143 @@ func (s *CreateCacheParameterGroupInput) Validate() error { return nil } -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *CreateCacheParameterGroupInput) SetCacheParameterGroupFamily(v string) *CreateCacheParameterGroupInput { - s.CacheParameterGroupFamily = &v +// SetCacheClusterId sets the CacheClusterId field's value. +func (s *CreateSnapshotInput) SetCacheClusterId(v string) *CreateSnapshotInput { + s.CacheClusterId = &v return s } -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CreateCacheParameterGroupInput) SetCacheParameterGroupName(v string) *CreateCacheParameterGroupInput { - s.CacheParameterGroupName = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateSnapshotInput) SetKmsKeyId(v string) *CreateSnapshotInput { + s.KmsKeyId = &v return s } -// SetDescription sets the Description field's value. -func (s *CreateCacheParameterGroupInput) SetDescription(v string) *CreateCacheParameterGroupInput { - s.Description = &v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *CreateSnapshotInput) SetReplicationGroupId(v string) *CreateSnapshotInput { + s.ReplicationGroupId = &v return s } -type CreateCacheParameterGroupOutput struct { +// SetSnapshotName sets the SnapshotName field's value. +func (s *CreateSnapshotInput) SetSnapshotName(v string) *CreateSnapshotInput { + s.SnapshotName = &v + return s +} + +type CreateSnapshotOutput struct { _ struct{} `type:"structure"` - // Represents the output of a CreateCacheParameterGroup operation. - CacheParameterGroup *CacheParameterGroup `type:"structure"` + // Represents a copy of an entire Redis cluster as of the time when the snapshot + // was taken. + Snapshot *Snapshot `type:"structure"` } // String returns the string representation -func (s CreateCacheParameterGroupOutput) String() string { +func (s CreateSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheParameterGroupOutput) GoString() string { +func (s CreateSnapshotOutput) GoString() string { return s.String() } -// SetCacheParameterGroup sets the CacheParameterGroup field's value. -func (s *CreateCacheParameterGroupOutput) SetCacheParameterGroup(v *CacheParameterGroup) *CreateCacheParameterGroupOutput { - s.CacheParameterGroup = v +// SetSnapshot sets the Snapshot field's value. +func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { + s.Snapshot = v return s } -// Represents the input of a CreateCacheSecurityGroup operation. -type CreateCacheSecurityGroupInput struct { +// The endpoint from which data should be migrated. +type CustomerNodeEndpoint struct { _ struct{} `type:"structure"` - // A name for the cache security group. This value is stored as a lowercase - // string. - // - // Constraints: Must contain no more than 255 alphanumeric characters. Cannot - // be the word "Default". + // The address of the node endpoint + Address *string `type:"string"` + + // The port of the node endpoint + Port *int64 `type:"integer"` +} + +// String returns the string representation +func (s CustomerNodeEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomerNodeEndpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *CustomerNodeEndpoint) SetAddress(v string) *CustomerNodeEndpoint { + s.Address = &v + return s +} + +// SetPort sets the Port field's value. +func (s *CustomerNodeEndpoint) SetPort(v int64) *CustomerNodeEndpoint { + s.Port = &v + return s +} + +type DecreaseNodeGroupsInGlobalReplicationGroupInput struct { + _ struct{} `type:"structure"` + + // Indicates that the shard reconfiguration process begins immediately. At present, + // the only permitted value for this parameter is true. // - // Example: mysecuritygroup + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // If the value of NodeGroupCount is less than the current number of node groups + // (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. + // NodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. + // ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove + // from the cluster. + GlobalNodeGroupsToRemove []*string `locationNameList:"GlobalNodeGroupId" type:"list"` + + // If the value of NodeGroupCount is less than the current number of node groups + // (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. + // NodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. + // ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove + // from the cluster. + GlobalNodeGroupsToRetain []*string `locationNameList:"GlobalNodeGroupId" type:"list"` + + // The name of the Global Datastore // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` - // A description for the cache security group. + // The number of node groups (shards) that results from the modification of + // the shard configuration // - // Description is a required field - Description *string `type:"string" required:"true"` + // NodeGroupCount is a required field + NodeGroupCount *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s CreateCacheSecurityGroupInput) String() string { +func (s DecreaseNodeGroupsInGlobalReplicationGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheSecurityGroupInput) GoString() string { +func (s DecreaseNodeGroupsInGlobalReplicationGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheSecurityGroupInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) +func (s *DecreaseNodeGroupsInGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecreaseNodeGroupsInGlobalReplicationGroupInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) } - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + if s.NodeGroupCount == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupCount")) } if invalidParams.Len() > 0 { @@ -7821,92 +9698,132 @@ func (s *CreateCacheSecurityGroupInput) Validate() error { return nil } -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *CreateCacheSecurityGroupInput) SetCacheSecurityGroupName(v string) *CreateCacheSecurityGroupInput { - s.CacheSecurityGroupName = &v +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *DecreaseNodeGroupsInGlobalReplicationGroupInput) SetApplyImmediately(v bool) *DecreaseNodeGroupsInGlobalReplicationGroupInput { + s.ApplyImmediately = &v return s } -// SetDescription sets the Description field's value. -func (s *CreateCacheSecurityGroupInput) SetDescription(v string) *CreateCacheSecurityGroupInput { - s.Description = &v +// SetGlobalNodeGroupsToRemove sets the GlobalNodeGroupsToRemove field's value. +func (s *DecreaseNodeGroupsInGlobalReplicationGroupInput) SetGlobalNodeGroupsToRemove(v []*string) *DecreaseNodeGroupsInGlobalReplicationGroupInput { + s.GlobalNodeGroupsToRemove = v return s } -type CreateCacheSecurityGroupOutput struct { +// SetGlobalNodeGroupsToRetain sets the GlobalNodeGroupsToRetain field's value. +func (s *DecreaseNodeGroupsInGlobalReplicationGroupInput) SetGlobalNodeGroupsToRetain(v []*string) *DecreaseNodeGroupsInGlobalReplicationGroupInput { + s.GlobalNodeGroupsToRetain = v + return s +} + +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *DecreaseNodeGroupsInGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *DecreaseNodeGroupsInGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v + return s +} + +// SetNodeGroupCount sets the NodeGroupCount field's value. +func (s *DecreaseNodeGroupsInGlobalReplicationGroupInput) SetNodeGroupCount(v int64) *DecreaseNodeGroupsInGlobalReplicationGroupInput { + s.NodeGroupCount = &v + return s +} + +type DecreaseNodeGroupsInGlobalReplicationGroupOutput struct { _ struct{} `type:"structure"` - // Represents the output of one of the following operations: - // - // * AuthorizeCacheSecurityGroupIngress - // - // * CreateCacheSecurityGroup + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. // - // * RevokeCacheSecurityGroupIngress - CacheSecurityGroup *CacheSecurityGroup `type:"structure"` + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` } // String returns the string representation -func (s CreateCacheSecurityGroupOutput) String() string { +func (s DecreaseNodeGroupsInGlobalReplicationGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheSecurityGroupOutput) GoString() string { +func (s DecreaseNodeGroupsInGlobalReplicationGroupOutput) GoString() string { return s.String() } -// SetCacheSecurityGroup sets the CacheSecurityGroup field's value. -func (s *CreateCacheSecurityGroupOutput) SetCacheSecurityGroup(v *CacheSecurityGroup) *CreateCacheSecurityGroupOutput { - s.CacheSecurityGroup = v +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *DecreaseNodeGroupsInGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *DecreaseNodeGroupsInGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v return s } -// Represents the input of a CreateCacheSubnetGroup operation. -type CreateCacheSubnetGroupInput struct { +type DecreaseReplicaCountInput struct { _ struct{} `type:"structure"` - // A description for the cache subnet group. + // If True, the number of replica nodes is decreased immediately. ApplyImmediately=False + // is not currently supported. // - // CacheSubnetGroupDescription is a required field - CacheSubnetGroupDescription *string `type:"string" required:"true"` + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` - // A name for the cache subnet group. This value is stored as a lowercase string. + // The number of read replica nodes you want at the completion of this operation. + // For Redis (cluster mode disabled) replication groups, this is the number + // of replica nodes in the replication group. For Redis (cluster mode enabled) + // replication groups, this is the number of replica nodes in each of the replication + // group's node groups. // - // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. + // The minimum number of replicas in a shard or replication group is: // - // Example: mysubnetgroup + // * Redis (cluster mode disabled) If Multi-AZ with Automatic Failover is + // enabled: 1 If Multi-AZ with Automatic Failover is not enabled: 0 // - // CacheSubnetGroupName is a required field - CacheSubnetGroupName *string `type:"string" required:"true"` + // * Redis (cluster mode enabled): 0 (though you will not be able to failover + // to a replica if your primary node fails) + NewReplicaCount *int64 `type:"integer"` - // A list of VPC subnet IDs for the cache subnet group. + // A list of ConfigureShard objects that can be used to configure each shard + // in a Redis (cluster mode enabled) replication group. The ConfigureShard has + // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. + ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` + + // A list of the node ids to remove from the replication group or node group + // (shard). + ReplicasToRemove []*string `type:"list"` + + // The id of the replication group from which you want to remove replica nodes. // - // SubnetIds is a required field - SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateCacheSubnetGroupInput) String() string { +func (s DecreaseReplicaCountInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheSubnetGroupInput) GoString() string { +func (s DecreaseReplicaCountInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCacheSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCacheSubnetGroupInput"} - if s.CacheSubnetGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupDescription")) +func (s *DecreaseReplicaCountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicaCountInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) } - if s.CacheSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } - if s.SubnetIds == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + if s.ReplicaConfiguration != nil { + for i, v := range s.ReplicaConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) + } + } } if invalidParams.Len() > 0 { @@ -7915,406 +9832,270 @@ func (s *CreateCacheSubnetGroupInput) Validate() error { return nil } -// SetCacheSubnetGroupDescription sets the CacheSubnetGroupDescription field's value. -func (s *CreateCacheSubnetGroupInput) SetCacheSubnetGroupDescription(v string) *CreateCacheSubnetGroupInput { - s.CacheSubnetGroupDescription = &v +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *DecreaseReplicaCountInput) SetApplyImmediately(v bool) *DecreaseReplicaCountInput { + s.ApplyImmediately = &v return s } -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CreateCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *CreateCacheSubnetGroupInput { - s.CacheSubnetGroupName = &v +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *DecreaseReplicaCountInput) SetNewReplicaCount(v int64) *DecreaseReplicaCountInput { + s.NewReplicaCount = &v return s } -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateCacheSubnetGroupInput) SetSubnetIds(v []*string) *CreateCacheSubnetGroupInput { - s.SubnetIds = v +// SetReplicaConfiguration sets the ReplicaConfiguration field's value. +func (s *DecreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *DecreaseReplicaCountInput { + s.ReplicaConfiguration = v return s } -type CreateCacheSubnetGroupOutput struct { +// SetReplicasToRemove sets the ReplicasToRemove field's value. +func (s *DecreaseReplicaCountInput) SetReplicasToRemove(v []*string) *DecreaseReplicaCountInput { + s.ReplicasToRemove = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *DecreaseReplicaCountInput) SetReplicationGroupId(v string) *DecreaseReplicaCountInput { + s.ReplicationGroupId = &v + return s +} + +type DecreaseReplicaCountOutput struct { _ struct{} `type:"structure"` - // Represents the output of one of the following operations: - // - // * CreateCacheSubnetGroup - // - // * ModifyCacheSubnetGroup - CacheSubnetGroup *CacheSubnetGroup `type:"structure"` + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` } // String returns the string representation -func (s CreateCacheSubnetGroupOutput) String() string { +func (s DecreaseReplicaCountOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCacheSubnetGroupOutput) GoString() string { +func (s DecreaseReplicaCountOutput) GoString() string { return s.String() } -// SetCacheSubnetGroup sets the CacheSubnetGroup field's value. -func (s *CreateCacheSubnetGroupOutput) SetCacheSubnetGroup(v *CacheSubnetGroup) *CreateCacheSubnetGroupOutput { - s.CacheSubnetGroup = v +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *DecreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *DecreaseReplicaCountOutput { + s.ReplicationGroup = v return s } -// Represents the input of a CreateReplicationGroup operation. -type CreateReplicationGroupInput struct { +// Represents the input of a DeleteCacheCluster operation. +type DeleteCacheClusterInput struct { _ struct{} `type:"structure"` - // A flag that enables encryption at rest when set to true. - // - // You cannot modify the value of AtRestEncryptionEnabled after the replication - // group is created. To enable encryption at rest on a replication group you - // must set AtRestEncryptionEnabled to true when you create the replication - // group. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6, 4.x or later. - // - // Default: false - AtRestEncryptionEnabled *bool `type:"boolean"` - - // Reserved parameter. The password used to access a password protected server. - // - // AuthToken can be specified only on replication groups where TransitEncryptionEnabled - // is true. - // - // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, - // an AuthToken, and a CacheSubnetGroup. - // - // Password constraints: - // - // * Must be only printable ASCII characters. - // - // * Must be at least 16 characters and no more than 128 characters in length. - // - // * The only permitted printable special characters are !, &, #, $, ^, <, - // >, and -. Other printable special characters cannot be used in the AUTH - // token. - // - // For more information, see AUTH password (http://redis.io/commands/AUTH) at - // http://redis.io/commands/AUTH. - AuthToken *string `type:"string"` - - // This parameter is currently disabled. - AutoMinorVersionUpgrade *bool `type:"boolean"` - - // Specifies whether a read-only replica is 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. - // - // AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) - // replication groups. - // - // Default: false - // - // Amazon ElastiCache for Redis does not support Multi-AZ with automatic failover - // on: - // - // * Redis versions earlier than 2.8.6. - // - // * Redis (cluster mode disabled): T1 node types. - // - // * Redis (cluster mode enabled): T1 node types. - AutomaticFailoverEnabled *bool `type:"boolean"` - - // The compute and memory capacity of the nodes in the node group (shard). - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: Current generation: M5 node types: cache.m5.large, - // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, - // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge - // - // * Compute optimized: Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge - // - // * Memory optimized: Current generation: R5 node types: cache.r5.large, - // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, - // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, - // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: - // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // Additional node type info - // - // * All current generation instance types are created in Amazon VPC by default. - // - // * Redis append-only files (AOF) are not supported for T1 or T2 instances. - // - // * Redis Multi-AZ with automatic failover is not supported on T1 instances. - // - // * Redis configuration variables appendonly and appendfsync are not supported - // on Redis version 2.8.22 and later. - CacheNodeType *string `type:"string"` - - // 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. - // - // If you are restoring to an engine version that is different than the original, - // you must specify the default version of that version. For example, CacheParameterGroupName=default.redis4.0. - // - // If you are running Redis version 3.2.4 or later, only one node group (shard), - // and want to use a default parameter group, we recommend that you specify - // the parameter group by name. - // - // * To create a Redis (cluster mode disabled) replication group, use CacheParameterGroupName=default.redis3.2. - // - // * To create a Redis (cluster mode enabled) replication group, use CacheParameterGroupName=default.redis3.2.cluster.on. - CacheParameterGroupName *string `type:"string"` - - // A list of cache security group names to associate with this replication group. - CacheSecurityGroupNames []*string `locationNameList:"CacheSecurityGroupName" type:"list"` - - // The name of the cache subnet group to be used for the replication group. + // The cluster identifier for the cluster to be deleted. This parameter is not + // case sensitive. // - // If you're going to launch your cluster in an Amazon VPC, you need to create - // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). - CacheSubnetGroupName *string `type:"string"` + // CacheClusterId is a required field + CacheClusterId *string `type:"string" required:"true"` - // The name of the cache engine to be used for the clusters in this replication - // group. - Engine *string `type:"string"` + // The user-supplied name of a final cluster snapshot. This is the unique name + // that identifies the snapshot. ElastiCache creates the snapshot, and then + // deletes the cluster immediately afterward. + FinalSnapshotIdentifier *string `type:"string"` +} - // The version number of the cache engine to be used for the clusters in this - // replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions - // operation. - // - // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) - // in the ElastiCache User Guide, but you cannot downgrade to an earlier engine - // version. If you want to use an earlier engine version, you must delete the - // existing cluster or replication group and create it anew with the earlier - // engine version. - EngineVersion *string `type:"string"` +// String returns the string representation +func (s DeleteCacheClusterInput) String() string { + return awsutil.Prettify(s) +} - // The ID of the KMS key used to encrypt the disk on the cluster. - KmsKeyId *string `type:"string"` +// GoString returns the string representation +func (s DeleteCacheClusterInput) GoString() string { + return s.String() +} - // A list of node group (shard) configuration options. Each node group (shard) - // configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, - // ReplicaCount, and Slots. - // - // If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode - // enabled) replication group, you can use this parameter to individually configure - // each node group (shard), or you can omit this parameter. However, when seeding - // a Redis (cluster mode enabled) cluster from a S3 rdb file, you must configure - // each node group (shard) using this parameter because you must specify the - // slots for each node group. - NodeGroupConfiguration []*NodeGroupConfiguration `locationNameList:"NodeGroupConfiguration" type:"list"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheClusterInput"} + if s.CacheClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) + } - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) topic to which notifications are sent. - // - // The Amazon SNS topic owner must be the same as the cluster owner. - NotificationTopicArn *string `type:"string"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The number of clusters this replication group initially has. - // - // This parameter is not used if there is more than one node group (shard). - // You should use ReplicasPerNodeGroup instead. - // - // If AutomaticFailoverEnabled is true, the value of this parameter must be - // at least 2. If AutomaticFailoverEnabled is false you can omit this parameter - // (it will default to 1), or you can explicitly set it to a value between 2 - // and 6. - // - // The maximum permitted value for NumCacheClusters is 6 (1 primary plus 5 replicas). - NumCacheClusters *int64 `type:"integer"` +// SetCacheClusterId sets the CacheClusterId field's value. +func (s *DeleteCacheClusterInput) SetCacheClusterId(v string) *DeleteCacheClusterInput { + s.CacheClusterId = &v + return s +} - // An optional parameter that specifies the number of node groups (shards) for - // this Redis (cluster mode enabled) replication group. For Redis (cluster mode - // disabled) either omit this parameter or set it to 1. - // - // Default: 1 - NumNodeGroups *int64 `type:"integer"` +// SetFinalSnapshotIdentifier sets the FinalSnapshotIdentifier field's value. +func (s *DeleteCacheClusterInput) SetFinalSnapshotIdentifier(v string) *DeleteCacheClusterInput { + s.FinalSnapshotIdentifier = &v + return s +} - // The port number on which each member of the replication group accepts connections. - Port *int64 `type:"integer"` +type DeleteCacheClusterOutput struct { + _ struct{} `type:"structure"` - // A list of EC2 Availability Zones in which the replication group's clusters - // are created. The order of the Availability Zones in the list is the order - // in which clusters are allocated. The primary cluster is created in the first - // AZ in the list. - // - // This parameter is not used if there is more than one node group (shard). - // You should use NodeGroupConfiguration instead. - // - // If you are creating your replication group in an Amazon VPC (recommended), - // you can only locate clusters in Availability Zones associated with the subnets - // in the selected subnet group. - // - // The number of Availability Zones listed must equal the value of NumCacheClusters. - // - // Default: system chosen Availability Zones. - PreferredCacheClusterAZs []*string `locationNameList:"AvailabilityZone" type:"list"` + // Contains all of the attributes of a specific cluster. + CacheCluster *CacheCluster `type:"structure"` +} - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid - // values for ddd are: - // - // Specifies the weekly time range during which maintenance on the cluster is - // performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi - // (24H Clock UTC). The minimum maintenance window is a 60 minute period. - // - // Valid values for ddd are: - // - // * sun - // - // * mon - // - // * tue - // - // * wed - // - // * thu - // - // * fri - // - // * sat - // - // Example: sun:23:00-mon:01:30 - PreferredMaintenanceWindow *string `type:"string"` +// String returns the string representation +func (s DeleteCacheClusterOutput) String() string { + return awsutil.Prettify(s) +} - // The identifier of the cluster that serves as the primary for this replication - // group. This cluster must already exist and have a status of available. - // - // This parameter is not required if NumCacheClusters, NumNodeGroups, or ReplicasPerNodeGroup - // is specified. - PrimaryClusterId *string `type:"string"` +// GoString returns the string representation +func (s DeleteCacheClusterOutput) GoString() string { + return s.String() +} - // An optional parameter that specifies the number of replica nodes in each - // node group (shard). Valid values are 0 to 5. - ReplicasPerNodeGroup *int64 `type:"integer"` +// SetCacheCluster sets the CacheCluster field's value. +func (s *DeleteCacheClusterOutput) SetCacheCluster(v *CacheCluster) *DeleteCacheClusterOutput { + s.CacheCluster = v + return s +} - // A user-created description for the replication group. - // - // ReplicationGroupDescription is a required field - ReplicationGroupDescription *string `type:"string" required:"true"` +// Represents the input of a DeleteCacheParameterGroup operation. +type DeleteCacheParameterGroupInput struct { + _ struct{} `type:"structure"` - // The replication group identifier. This parameter is stored as a lowercase - // string. - // - // Constraints: - // - // * A name must contain from 1 to 40 alphanumeric characters or hyphens. - // - // * The first character must be a letter. + // The name of the cache parameter group to delete. // - // * A name cannot end with a hyphen or contain two consecutive hyphens. + // The specified cache security group must not be associated with any clusters. // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` + // CacheParameterGroupName is a required field + CacheParameterGroupName *string `type:"string" required:"true"` +} - // 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 (Amazon VPC). - SecurityGroupIds []*string `locationNameList:"SecurityGroupId" type:"list"` +// String returns the string representation +func (s DeleteCacheParameterGroupInput) String() string { + return awsutil.Prettify(s) +} - // A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB - // snapshot files stored in Amazon S3. The snapshot files are used to populate - // the new replication group. The Amazon S3 object name in the ARN cannot contain - // any commas. The new replication group will have the number of node groups - // (console: shards) specified by the parameter NumNodeGroups or the number - // of node groups configured by NodeGroupConfiguration regardless of the number - // of ARNs specified here. - // - // Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb - SnapshotArns []*string `locationNameList:"SnapshotArn" type:"list"` +// GoString returns the string representation +func (s DeleteCacheParameterGroupInput) GoString() string { + return s.String() +} - // The name of a snapshot from which to restore data into the new replication - // group. The snapshot status changes to restoring while the new replication - // group is being created. - SnapshotName *string `type:"string"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheParameterGroupInput"} + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) + } - // The number of days for which ElastiCache retains automatic snapshots before - // deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot - // that was taken today is retained for 5 days before being deleted. - // - // Default: 0 (i.e., automatic backups are disabled for this cluster). - SnapshotRetentionLimit *int64 `type:"integer"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The daily time range (in UTC) during which ElastiCache begins taking a daily - // snapshot of your node group (shard). - // - // Example: 05:00-09:00 - // - // If you do not specify this parameter, ElastiCache automatically chooses an - // appropriate time range. - SnapshotWindow *string `type:"string"` +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *DeleteCacheParameterGroupInput) SetCacheParameterGroupName(v string) *DeleteCacheParameterGroupInput { + s.CacheParameterGroupName = &v + return s +} - // A list of cost allocation tags to be added to this resource. Tags are comma-separated - // key,value pairs (e.g. Key=myKey, Value=myKeyValue. You can include multiple - // tags as shown following: Key=myKey, Value=myKeyValue Key=mySecondKey, Value=mySecondKeyValue. - Tags []*Tag `locationNameList:"Tag" type:"list"` +type DeleteCacheParameterGroupOutput struct { + _ struct{} `type:"structure"` +} - // A flag that enables in-transit encryption when set to true. - // - // You cannot modify the value of TransitEncryptionEnabled after the cluster - // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled - // to true when you create a cluster. - // - // This parameter is valid only if the Engine parameter is redis, the EngineVersion - // parameter is 3.2.6, 4.x or later, and the cluster is being created in an - // Amazon VPC. - // - // If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. - // - // Required: Only available when creating a replication group in an Amazon VPC - // using redis version 3.2.6, 4.x or later. +// String returns the string representation +func (s DeleteCacheParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCacheParameterGroupOutput) GoString() string { + return s.String() +} + +// Represents the input of a DeleteCacheSecurityGroup operation. +type DeleteCacheSecurityGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the cache security group to delete. // - // Default: false + // You cannot delete the default security group. // - // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, - // an AuthToken, and a CacheSubnetGroup. - TransitEncryptionEnabled *bool `type:"boolean"` + // CacheSecurityGroupName is a required field + CacheSecurityGroupName *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateReplicationGroupInput) String() string { +func (s DeleteCacheSecurityGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateReplicationGroupInput) GoString() string { +func (s DeleteCacheSecurityGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReplicationGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReplicationGroupInput"} - if s.ReplicationGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupDescription")) +func (s *DeleteCacheSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSecurityGroupInput"} + if s.CacheSecurityGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + + if invalidParams.Len() > 0 { + return invalidParams } - if s.NodeGroupConfiguration != nil { - for i, v := range s.NodeGroupConfiguration { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeGroupConfiguration", i), err.(request.ErrInvalidParams)) - } - } + return nil +} + +// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. +func (s *DeleteCacheSecurityGroupInput) SetCacheSecurityGroupName(v string) *DeleteCacheSecurityGroupInput { + s.CacheSecurityGroupName = &v + return s +} + +type DeleteCacheSecurityGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCacheSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCacheSecurityGroupOutput) GoString() string { + return s.String() +} + +// Represents the input of a DeleteCacheSubnetGroup operation. +type DeleteCacheSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the cache subnet group to delete. + // + // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. + // + // CacheSubnetGroupName is a required field + CacheSubnetGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCacheSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCacheSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCacheSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSubnetGroupInput"} + if s.CacheSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) } if invalidParams.Len() > 0 { @@ -8323,181 +10104,170 @@ func (s *CreateReplicationGroupInput) Validate() error { return nil } -// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. -func (s *CreateReplicationGroupInput) SetAtRestEncryptionEnabled(v bool) *CreateReplicationGroupInput { - s.AtRestEncryptionEnabled = &v +// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. +func (s *DeleteCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *DeleteCacheSubnetGroupInput { + s.CacheSubnetGroupName = &v return s } -// SetAuthToken sets the AuthToken field's value. -func (s *CreateReplicationGroupInput) SetAuthToken(v string) *CreateReplicationGroupInput { - s.AuthToken = &v - return s +type DeleteCacheSubnetGroupOutput struct { + _ struct{} `type:"structure"` } -// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. -func (s *CreateReplicationGroupInput) SetAutoMinorVersionUpgrade(v bool) *CreateReplicationGroupInput { - s.AutoMinorVersionUpgrade = &v - return s +// String returns the string representation +func (s DeleteCacheSubnetGroupOutput) String() string { + return awsutil.Prettify(s) } -// SetAutomaticFailoverEnabled sets the AutomaticFailoverEnabled field's value. -func (s *CreateReplicationGroupInput) SetAutomaticFailoverEnabled(v bool) *CreateReplicationGroupInput { - s.AutomaticFailoverEnabled = &v - return s +// GoString returns the string representation +func (s DeleteCacheSubnetGroupOutput) GoString() string { + return s.String() } -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *CreateReplicationGroupInput) SetCacheNodeType(v string) *CreateReplicationGroupInput { - s.CacheNodeType = &v - return s -} +type DeleteGlobalReplicationGroupInput struct { + _ struct{} `type:"structure"` -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *CreateReplicationGroupInput) SetCacheParameterGroupName(v string) *CreateReplicationGroupInput { - s.CacheParameterGroupName = &v - return s -} + // The name of the Global Datastore + // + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` -// SetCacheSecurityGroupNames sets the CacheSecurityGroupNames field's value. -func (s *CreateReplicationGroupInput) SetCacheSecurityGroupNames(v []*string) *CreateReplicationGroupInput { - s.CacheSecurityGroupNames = v - return s + // The primary replication group is retained as a standalone replication group. + // + // RetainPrimaryReplicationGroup is a required field + RetainPrimaryReplicationGroup *bool `type:"boolean" required:"true"` } -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *CreateReplicationGroupInput) SetCacheSubnetGroupName(v string) *CreateReplicationGroupInput { - s.CacheSubnetGroupName = &v - return s +// String returns the string representation +func (s DeleteGlobalReplicationGroupInput) String() string { + return awsutil.Prettify(s) } -// SetEngine sets the Engine field's value. -func (s *CreateReplicationGroupInput) SetEngine(v string) *CreateReplicationGroupInput { - s.Engine = &v - return s +// GoString returns the string representation +func (s DeleteGlobalReplicationGroupInput) GoString() string { + return s.String() } -// SetEngineVersion sets the EngineVersion field's value. -func (s *CreateReplicationGroupInput) SetEngineVersion(v string) *CreateReplicationGroupInput { - s.EngineVersion = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalReplicationGroupInput"} + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + if s.RetainPrimaryReplicationGroup == nil { + invalidParams.Add(request.NewErrParamRequired("RetainPrimaryReplicationGroup")) + } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateReplicationGroupInput) SetKmsKeyId(v string) *CreateReplicationGroupInput { - s.KmsKeyId = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetNodeGroupConfiguration sets the NodeGroupConfiguration field's value. -func (s *CreateReplicationGroupInput) SetNodeGroupConfiguration(v []*NodeGroupConfiguration) *CreateReplicationGroupInput { - s.NodeGroupConfiguration = v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *DeleteGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *DeleteGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v return s } -// SetNotificationTopicArn sets the NotificationTopicArn field's value. -func (s *CreateReplicationGroupInput) SetNotificationTopicArn(v string) *CreateReplicationGroupInput { - s.NotificationTopicArn = &v +// SetRetainPrimaryReplicationGroup sets the RetainPrimaryReplicationGroup field's value. +func (s *DeleteGlobalReplicationGroupInput) SetRetainPrimaryReplicationGroup(v bool) *DeleteGlobalReplicationGroupInput { + s.RetainPrimaryReplicationGroup = &v return s } -// SetNumCacheClusters sets the NumCacheClusters field's value. -func (s *CreateReplicationGroupInput) SetNumCacheClusters(v int64) *CreateReplicationGroupInput { - s.NumCacheClusters = &v - return s -} +type DeleteGlobalReplicationGroupOutput struct { + _ struct{} `type:"structure"` -// SetNumNodeGroups sets the NumNodeGroups field's value. -func (s *CreateReplicationGroupInput) SetNumNodeGroups(v int64) *CreateReplicationGroupInput { - s.NumNodeGroups = &v - return s + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` } -// SetPort sets the Port field's value. -func (s *CreateReplicationGroupInput) SetPort(v int64) *CreateReplicationGroupInput { - s.Port = &v - return s +// String returns the string representation +func (s DeleteGlobalReplicationGroupOutput) String() string { + return awsutil.Prettify(s) } -// SetPreferredCacheClusterAZs sets the PreferredCacheClusterAZs field's value. -func (s *CreateReplicationGroupInput) SetPreferredCacheClusterAZs(v []*string) *CreateReplicationGroupInput { - s.PreferredCacheClusterAZs = v - return s +// GoString returns the string representation +func (s DeleteGlobalReplicationGroupOutput) GoString() string { + return s.String() } -// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. -func (s *CreateReplicationGroupInput) SetPreferredMaintenanceWindow(v string) *CreateReplicationGroupInput { - s.PreferredMaintenanceWindow = &v +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *DeleteGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *DeleteGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v return s } -// SetPrimaryClusterId sets the PrimaryClusterId field's value. -func (s *CreateReplicationGroupInput) SetPrimaryClusterId(v string) *CreateReplicationGroupInput { - s.PrimaryClusterId = &v - return s -} +// Represents the input of a DeleteReplicationGroup operation. +type DeleteReplicationGroupInput struct { + _ struct{} `type:"structure"` -// SetReplicasPerNodeGroup sets the ReplicasPerNodeGroup field's value. -func (s *CreateReplicationGroupInput) SetReplicasPerNodeGroup(v int64) *CreateReplicationGroupInput { - s.ReplicasPerNodeGroup = &v - return s -} + // The name of a final node group (shard) snapshot. ElastiCache creates the + // snapshot from the primary node in the cluster, rather than one of the replicas; + // this is to ensure that it captures the freshest data. After the final snapshot + // is taken, the replication group is immediately deleted. + FinalSnapshotIdentifier *string `type:"string"` -// SetReplicationGroupDescription sets the ReplicationGroupDescription field's value. -func (s *CreateReplicationGroupInput) SetReplicationGroupDescription(v string) *CreateReplicationGroupInput { - s.ReplicationGroupDescription = &v - return s -} + // The identifier for the cluster to be deleted. This parameter is not case + // sensitive. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CreateReplicationGroupInput) SetReplicationGroupId(v string) *CreateReplicationGroupInput { - s.ReplicationGroupId = &v - return s + // If set to true, all of the read replicas are deleted, but the primary node + // is retained. + RetainPrimaryCluster *bool `type:"boolean"` } -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateReplicationGroupInput) SetSecurityGroupIds(v []*string) *CreateReplicationGroupInput { - s.SecurityGroupIds = v - return s +// String returns the string representation +func (s DeleteReplicationGroupInput) String() string { + return awsutil.Prettify(s) } -// SetSnapshotArns sets the SnapshotArns field's value. -func (s *CreateReplicationGroupInput) SetSnapshotArns(v []*string) *CreateReplicationGroupInput { - s.SnapshotArns = v - return s +// GoString returns the string representation +func (s DeleteReplicationGroupInput) GoString() string { + return s.String() } -// SetSnapshotName sets the SnapshotName field's value. -func (s *CreateReplicationGroupInput) SetSnapshotName(v string) *CreateReplicationGroupInput { - s.SnapshotName = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationGroupInput"} + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } -// SetSnapshotRetentionLimit sets the SnapshotRetentionLimit field's value. -func (s *CreateReplicationGroupInput) SetSnapshotRetentionLimit(v int64) *CreateReplicationGroupInput { - s.SnapshotRetentionLimit = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSnapshotWindow sets the SnapshotWindow field's value. -func (s *CreateReplicationGroupInput) SetSnapshotWindow(v string) *CreateReplicationGroupInput { - s.SnapshotWindow = &v +// SetFinalSnapshotIdentifier sets the FinalSnapshotIdentifier field's value. +func (s *DeleteReplicationGroupInput) SetFinalSnapshotIdentifier(v string) *DeleteReplicationGroupInput { + s.FinalSnapshotIdentifier = &v return s } -// SetTags sets the Tags field's value. -func (s *CreateReplicationGroupInput) SetTags(v []*Tag) *CreateReplicationGroupInput { - s.Tags = v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *DeleteReplicationGroupInput) SetReplicationGroupId(v string) *DeleteReplicationGroupInput { + s.ReplicationGroupId = &v return s } -// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. -func (s *CreateReplicationGroupInput) SetTransitEncryptionEnabled(v bool) *CreateReplicationGroupInput { - s.TransitEncryptionEnabled = &v +// SetRetainPrimaryCluster sets the RetainPrimaryCluster field's value. +func (s *DeleteReplicationGroupInput) SetRetainPrimaryCluster(v bool) *DeleteReplicationGroupInput { + s.RetainPrimaryCluster = &v return s } -type CreateReplicationGroupOutput struct { +type DeleteReplicationGroupOutput struct { _ struct{} `type:"structure"` // Contains all of the attributes of a specific Redis replication group. @@ -8505,90 +10275,61 @@ type CreateReplicationGroupOutput struct { } // String returns the string representation -func (s CreateReplicationGroupOutput) String() string { +func (s DeleteReplicationGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateReplicationGroupOutput) GoString() string { +func (s DeleteReplicationGroupOutput) GoString() string { return s.String() } // SetReplicationGroup sets the ReplicationGroup field's value. -func (s *CreateReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *CreateReplicationGroupOutput { +func (s *DeleteReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *DeleteReplicationGroupOutput { s.ReplicationGroup = v return s } -// Represents the input of a CreateSnapshot operation. -type CreateSnapshotInput struct { +// Represents the input of a DeleteSnapshot operation. +type DeleteSnapshotInput struct { _ struct{} `type:"structure"` - // The identifier of an existing cluster. The snapshot is created from this - // cluster. - CacheClusterId *string `type:"string"` - - // The ID of the KMS key used to encrypt the snapshot. - KmsKeyId *string `type:"string"` - - // The identifier of an existing replication group. The snapshot is created - // from this replication group. - ReplicationGroupId *string `type:"string"` - - // A name for the snapshot being created. + // The name of the snapshot to be deleted. // // SnapshotName is a required field SnapshotName *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateSnapshotInput) String() string { +func (s DeleteSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSnapshotInput) GoString() string { +func (s DeleteSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} +func (s *DeleteSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} if s.SnapshotName == nil { invalidParams.Add(request.NewErrParamRequired("SnapshotName")) } - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *CreateSnapshotInput) SetCacheClusterId(v string) *CreateSnapshotInput { - s.CacheClusterId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateSnapshotInput) SetKmsKeyId(v string) *CreateSnapshotInput { - s.KmsKeyId = &v - return s -} - -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *CreateSnapshotInput) SetReplicationGroupId(v string) *CreateSnapshotInput { - s.ReplicationGroupId = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetSnapshotName sets the SnapshotName field's value. -func (s *CreateSnapshotInput) SetSnapshotName(v string) *CreateSnapshotInput { +func (s *DeleteSnapshotInput) SetSnapshotName(v string) *DeleteSnapshotInput { s.SnapshotName = &v return s } -type CreateSnapshotOutput struct { +type DeleteSnapshotOutput struct { _ struct{} `type:"structure"` // Represents a copy of an entire Redis cluster as of the time when the snapshot @@ -8597,338 +10338,381 @@ type CreateSnapshotOutput struct { } // String returns the string representation -func (s CreateSnapshotOutput) String() string { +func (s DeleteSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSnapshotOutput) GoString() string { +func (s DeleteSnapshotOutput) GoString() string { return s.String() } // SetSnapshot sets the Snapshot field's value. -func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { +func (s *DeleteSnapshotOutput) SetSnapshot(v *Snapshot) *DeleteSnapshotOutput { s.Snapshot = v return s } -// The endpoint from which data should be migrated. -type CustomerNodeEndpoint struct { +// Represents the input of a DescribeCacheClusters operation. +type DescribeCacheClustersInput struct { _ struct{} `type:"structure"` - // The address of the node endpoint - Address *string `type:"string"` + // The user-supplied cluster identifier. If this parameter is specified, only + // information about that specific cluster is returned. This parameter isn't + // case sensitive. + CacheClusterId *string `type:"string"` - // The port of the node endpoint - Port *int64 `type:"integer"` + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a marker is included in the response + // so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + MaxRecords *int64 `type:"integer"` + + // An optional flag that can be included in the DescribeCacheCluster request + // to show only nodes (API/CLI: clusters) that are not members of a replication + // group. In practice, this mean Memcached and single node Redis clusters. + ShowCacheClustersNotInReplicationGroups *bool `type:"boolean"` + + // An optional flag that can be included in the DescribeCacheCluster request + // to retrieve information about the individual cache nodes. + ShowCacheNodeInfo *bool `type:"boolean"` } // String returns the string representation -func (s CustomerNodeEndpoint) String() string { +func (s DescribeCacheClustersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CustomerNodeEndpoint) GoString() string { +func (s DescribeCacheClustersInput) GoString() string { return s.String() } -// SetAddress sets the Address field's value. -func (s *CustomerNodeEndpoint) SetAddress(v string) *CustomerNodeEndpoint { - s.Address = &v +// SetCacheClusterId sets the CacheClusterId field's value. +func (s *DescribeCacheClustersInput) SetCacheClusterId(v string) *DescribeCacheClustersInput { + s.CacheClusterId = &v return s } -// SetPort sets the Port field's value. -func (s *CustomerNodeEndpoint) SetPort(v int64) *CustomerNodeEndpoint { - s.Port = &v +// SetMarker sets the Marker field's value. +func (s *DescribeCacheClustersInput) SetMarker(v string) *DescribeCacheClustersInput { + s.Marker = &v return s } -type DecreaseReplicaCountInput struct { - _ struct{} `type:"structure"` +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeCacheClustersInput) SetMaxRecords(v int64) *DescribeCacheClustersInput { + s.MaxRecords = &v + return s +} - // If True, the number of replica nodes is decreased immediately. ApplyImmediately=False - // is not currently supported. - // - // ApplyImmediately is a required field - ApplyImmediately *bool `type:"boolean" required:"true"` +// SetShowCacheClustersNotInReplicationGroups sets the ShowCacheClustersNotInReplicationGroups field's value. +func (s *DescribeCacheClustersInput) SetShowCacheClustersNotInReplicationGroups(v bool) *DescribeCacheClustersInput { + s.ShowCacheClustersNotInReplicationGroups = &v + return s +} - // The number of read replica nodes you want at the completion of this operation. - // For Redis (cluster mode disabled) replication groups, this is the number - // of replica nodes in the replication group. For Redis (cluster mode enabled) - // replication groups, this is the number of replica nodes in each of the replication - // group's node groups. - // - // The minimum number of replicas in a shard or replication group is: - // - // * Redis (cluster mode disabled) If Multi-AZ with Automatic Failover is - // enabled: 1 If Multi-AZ with Automatic Failover is not enabled: 0 - // - // * Redis (cluster mode enabled): 0 (though you will not be able to failover - // to a replica if your primary node fails) - NewReplicaCount *int64 `type:"integer"` +// SetShowCacheNodeInfo sets the ShowCacheNodeInfo field's value. +func (s *DescribeCacheClustersInput) SetShowCacheNodeInfo(v bool) *DescribeCacheClustersInput { + s.ShowCacheNodeInfo = &v + return s +} - // A list of ConfigureShard objects that can be used to configure each shard - // in a Redis (cluster mode enabled) replication group. The ConfigureShard has - // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. - ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` +// Represents the output of a DescribeCacheClusters operation. +type DescribeCacheClustersOutput struct { + _ struct{} `type:"structure"` - // A list of the node ids to remove from the replication group or node group - // (shard). - ReplicasToRemove []*string `type:"list"` + // A list of clusters. Each item in the list contains detailed information about + // one cluster. + CacheClusters []*CacheCluster `locationNameList:"CacheCluster" type:"list"` - // The id of the replication group from which you want to remove replica nodes. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` } // String returns the string representation -func (s DecreaseReplicaCountInput) String() string { +func (s DescribeCacheClustersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DecreaseReplicaCountInput) GoString() string { +func (s DescribeCacheClustersOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DecreaseReplicaCountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicaCountInput"} - if s.ApplyImmediately == nil { - invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) - } - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - if s.ReplicaConfiguration != nil { - for i, v := range s.ReplicaConfiguration { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyImmediately sets the ApplyImmediately field's value. -func (s *DecreaseReplicaCountInput) SetApplyImmediately(v bool) *DecreaseReplicaCountInput { - s.ApplyImmediately = &v +// SetCacheClusters sets the CacheClusters field's value. +func (s *DescribeCacheClustersOutput) SetCacheClusters(v []*CacheCluster) *DescribeCacheClustersOutput { + s.CacheClusters = v return s } -// SetNewReplicaCount sets the NewReplicaCount field's value. -func (s *DecreaseReplicaCountInput) SetNewReplicaCount(v int64) *DecreaseReplicaCountInput { - s.NewReplicaCount = &v +// SetMarker sets the Marker field's value. +func (s *DescribeCacheClustersOutput) SetMarker(v string) *DescribeCacheClustersOutput { + s.Marker = &v return s } -// SetReplicaConfiguration sets the ReplicaConfiguration field's value. -func (s *DecreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *DecreaseReplicaCountInput { - s.ReplicaConfiguration = v - return s -} +// Represents the input of a DescribeCacheEngineVersions operation. +type DescribeCacheEngineVersionsInput struct { + _ struct{} `type:"structure"` -// SetReplicasToRemove sets the ReplicasToRemove field's value. -func (s *DecreaseReplicaCountInput) SetReplicasToRemove(v []*string) *DecreaseReplicaCountInput { - s.ReplicasToRemove = v - return s -} + // The name of a specific cache parameter group family to return details for. + // + // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 + // | redis4.0 | redis5.0 | + // + // Constraints: + // + // * Must be 1 to 255 alphanumeric characters + // + // * First character must be a letter + // + // * Cannot end with a hyphen or contain two consecutive hyphens + CacheParameterGroupFamily *string `type:"string"` -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DecreaseReplicaCountInput) SetReplicationGroupId(v string) *DecreaseReplicaCountInput { - s.ReplicationGroupId = &v - return s -} + // If true, specifies that only the default version of the specified engine + // or engine and major version combination is to be returned. + DefaultOnly *bool `type:"boolean"` -type DecreaseReplicaCountOutput struct { - _ struct{} `type:"structure"` + // The cache engine to return. Valid values: memcached | redis + Engine *string `type:"string"` - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` + // The cache engine version to return. + // + // Example: 1.4.14 + EngineVersion *string `type:"string"` + + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a marker is included in the response + // so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + MaxRecords *int64 `type:"integer"` } // String returns the string representation -func (s DecreaseReplicaCountOutput) String() string { +func (s DescribeCacheEngineVersionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DecreaseReplicaCountOutput) GoString() string { +func (s DescribeCacheEngineVersionsInput) GoString() string { return s.String() } -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *DecreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *DecreaseReplicaCountOutput { - s.ReplicationGroup = v +// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. +func (s *DescribeCacheEngineVersionsInput) SetCacheParameterGroupFamily(v string) *DescribeCacheEngineVersionsInput { + s.CacheParameterGroupFamily = &v return s } -// Represents the input of a DeleteCacheCluster operation. -type DeleteCacheClusterInput struct { - _ struct{} `type:"structure"` - - // The cluster identifier for the cluster to be deleted. This parameter is not - // case sensitive. - // - // CacheClusterId is a required field - CacheClusterId *string `type:"string" required:"true"` - - // The user-supplied name of a final cluster snapshot. This is the unique name - // that identifies the snapshot. ElastiCache creates the snapshot, and then - // deletes the cluster immediately afterward. - FinalSnapshotIdentifier *string `type:"string"` -} - -// String returns the string representation -func (s DeleteCacheClusterInput) String() string { - return awsutil.Prettify(s) +// SetDefaultOnly sets the DefaultOnly field's value. +func (s *DescribeCacheEngineVersionsInput) SetDefaultOnly(v bool) *DescribeCacheEngineVersionsInput { + s.DefaultOnly = &v + return s } -// GoString returns the string representation -func (s DeleteCacheClusterInput) GoString() string { - return s.String() +// SetEngine sets the Engine field's value. +func (s *DescribeCacheEngineVersionsInput) SetEngine(v string) *DescribeCacheEngineVersionsInput { + s.Engine = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheClusterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheClusterInput"} - if s.CacheClusterId == nil { - invalidParams.Add(request.NewErrParamRequired("CacheClusterId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEngineVersion sets the EngineVersion field's value. +func (s *DescribeCacheEngineVersionsInput) SetEngineVersion(v string) *DescribeCacheEngineVersionsInput { + s.EngineVersion = &v + return s } -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *DeleteCacheClusterInput) SetCacheClusterId(v string) *DeleteCacheClusterInput { - s.CacheClusterId = &v +// SetMarker sets the Marker field's value. +func (s *DescribeCacheEngineVersionsInput) SetMarker(v string) *DescribeCacheEngineVersionsInput { + s.Marker = &v return s } -// SetFinalSnapshotIdentifier sets the FinalSnapshotIdentifier field's value. -func (s *DeleteCacheClusterInput) SetFinalSnapshotIdentifier(v string) *DeleteCacheClusterInput { - s.FinalSnapshotIdentifier = &v +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeCacheEngineVersionsInput) SetMaxRecords(v int64) *DescribeCacheEngineVersionsInput { + s.MaxRecords = &v return s } -type DeleteCacheClusterOutput struct { +// Represents the output of a DescribeCacheEngineVersions operation. +type DescribeCacheEngineVersionsOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific cluster. - CacheCluster *CacheCluster `type:"structure"` + // A list of cache engine version details. Each element in the list contains + // detailed information about one cache engine version. + CacheEngineVersions []*CacheEngineVersion `locationNameList:"CacheEngineVersion" type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` } // String returns the string representation -func (s DeleteCacheClusterOutput) String() string { +func (s DescribeCacheEngineVersionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCacheClusterOutput) GoString() string { +func (s DescribeCacheEngineVersionsOutput) GoString() string { return s.String() } -// SetCacheCluster sets the CacheCluster field's value. -func (s *DeleteCacheClusterOutput) SetCacheCluster(v *CacheCluster) *DeleteCacheClusterOutput { - s.CacheCluster = v +// SetCacheEngineVersions sets the CacheEngineVersions field's value. +func (s *DescribeCacheEngineVersionsOutput) SetCacheEngineVersions(v []*CacheEngineVersion) *DescribeCacheEngineVersionsOutput { + s.CacheEngineVersions = v return s } -// Represents the input of a DeleteCacheParameterGroup operation. -type DeleteCacheParameterGroupInput struct { +// SetMarker sets the Marker field's value. +func (s *DescribeCacheEngineVersionsOutput) SetMarker(v string) *DescribeCacheEngineVersionsOutput { + s.Marker = &v + return s +} + +// Represents the input of a DescribeCacheParameterGroups operation. +type DescribeCacheParameterGroupsInput struct { _ struct{} `type:"structure"` - // The name of the cache parameter group to delete. + // The name of a specific cache parameter group to return details for. + CacheParameterGroupName *string `type:"string"` + + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a marker is included in the response + // so that the remaining results can be retrieved. // - // The specified cache security group must not be associated with any clusters. + // Default: 100 // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` + // Constraints: minimum 20; maximum 100. + MaxRecords *int64 `type:"integer"` } // String returns the string representation -func (s DeleteCacheParameterGroupInput) String() string { +func (s DescribeCacheParameterGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCacheParameterGroupInput) GoString() string { +func (s DescribeCacheParameterGroupsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheParameterGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheParameterGroupInput"} - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *DescribeCacheParameterGroupsInput) SetCacheParameterGroupName(v string) *DescribeCacheParameterGroupsInput { + s.CacheParameterGroupName = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMarker sets the Marker field's value. +func (s *DescribeCacheParameterGroupsInput) SetMarker(v string) *DescribeCacheParameterGroupsInput { + s.Marker = &v + return s } -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *DeleteCacheParameterGroupInput) SetCacheParameterGroupName(v string) *DeleteCacheParameterGroupInput { - s.CacheParameterGroupName = &v +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeCacheParameterGroupsInput) SetMaxRecords(v int64) *DescribeCacheParameterGroupsInput { + s.MaxRecords = &v return s } -type DeleteCacheParameterGroupOutput struct { +// Represents the output of a DescribeCacheParameterGroups operation. +type DescribeCacheParameterGroupsOutput struct { _ struct{} `type:"structure"` + + // A list of cache parameter groups. Each element in the list contains detailed + // information about one cache parameter group. + CacheParameterGroups []*CacheParameterGroup `locationNameList:"CacheParameterGroup" type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` } // String returns the string representation -func (s DeleteCacheParameterGroupOutput) String() string { +func (s DescribeCacheParameterGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCacheParameterGroupOutput) GoString() string { +func (s DescribeCacheParameterGroupsOutput) GoString() string { return s.String() } -// Represents the input of a DeleteCacheSecurityGroup operation. -type DeleteCacheSecurityGroupInput struct { +// SetCacheParameterGroups sets the CacheParameterGroups field's value. +func (s *DescribeCacheParameterGroupsOutput) SetCacheParameterGroups(v []*CacheParameterGroup) *DescribeCacheParameterGroupsOutput { + s.CacheParameterGroups = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeCacheParameterGroupsOutput) SetMarker(v string) *DescribeCacheParameterGroupsOutput { + s.Marker = &v + return s +} + +// Represents the input of a DescribeCacheParameters operation. +type DescribeCacheParametersInput struct { _ struct{} `type:"structure"` - // The name of the cache security group to delete. + // The name of a specific cache parameter group to return details for. // - // You cannot delete the default security group. + // CacheParameterGroupName is a required field + CacheParameterGroupName *string `type:"string" required:"true"` + + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a marker is included in the response + // so that the remaining results can be retrieved. // - // CacheSecurityGroupName is a required field - CacheSecurityGroupName *string `type:"string" required:"true"` + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + MaxRecords *int64 `type:"integer"` + + // The parameter types to return. + // + // Valid values: user | system | engine-default + Source *string `type:"string"` } // String returns the string representation -func (s DeleteCacheSecurityGroupInput) String() string { +func (s DescribeCacheParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCacheSecurityGroupInput) GoString() string { +func (s DescribeCacheParametersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSecurityGroupInput"} - if s.CacheSecurityGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSecurityGroupName")) +func (s *DescribeCacheParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCacheParametersInput"} + if s.CacheParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) } if invalidParams.Len() > 0 { @@ -8937,237 +10721,252 @@ func (s *DeleteCacheSecurityGroupInput) Validate() error { return nil } -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *DeleteCacheSecurityGroupInput) SetCacheSecurityGroupName(v string) *DeleteCacheSecurityGroupInput { - s.CacheSecurityGroupName = &v +// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. +func (s *DescribeCacheParametersInput) SetCacheParameterGroupName(v string) *DescribeCacheParametersInput { + s.CacheParameterGroupName = &v return s } -type DeleteCacheSecurityGroupOutput struct { - _ struct{} `type:"structure"` +// SetMarker sets the Marker field's value. +func (s *DescribeCacheParametersInput) SetMarker(v string) *DescribeCacheParametersInput { + s.Marker = &v + return s } -// String returns the string representation -func (s DeleteCacheSecurityGroupOutput) String() string { - return awsutil.Prettify(s) +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeCacheParametersInput) SetMaxRecords(v int64) *DescribeCacheParametersInput { + s.MaxRecords = &v + return s } -// GoString returns the string representation -func (s DeleteCacheSecurityGroupOutput) GoString() string { - return s.String() +// SetSource sets the Source field's value. +func (s *DescribeCacheParametersInput) SetSource(v string) *DescribeCacheParametersInput { + s.Source = &v + return s } -// Represents the input of a DeleteCacheSubnetGroup operation. -type DeleteCacheSubnetGroupInput struct { +// Represents the output of a DescribeCacheParameters operation. +type DescribeCacheParametersOutput struct { _ struct{} `type:"structure"` - // The name of the cache subnet group to delete. - // - // Constraints: Must contain no more than 255 alphanumeric characters or hyphens. - // - // CacheSubnetGroupName is a required field - CacheSubnetGroupName *string `type:"string" required:"true"` + // A list of parameters specific to a particular cache node type. Each element + // in the list contains detailed information about one parameter. + CacheNodeTypeSpecificParameters []*CacheNodeTypeSpecificParameter `locationNameList:"CacheNodeTypeSpecificParameter" type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` + + // A list of Parameter instances. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` } // String returns the string representation -func (s DeleteCacheSubnetGroupInput) String() string { +func (s DescribeCacheParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCacheSubnetGroupInput) GoString() string { +func (s DescribeCacheParametersOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCacheSubnetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCacheSubnetGroupInput"} - if s.CacheSubnetGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheSubnetGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *DeleteCacheSubnetGroupInput) SetCacheSubnetGroupName(v string) *DeleteCacheSubnetGroupInput { - s.CacheSubnetGroupName = &v +// SetCacheNodeTypeSpecificParameters sets the CacheNodeTypeSpecificParameters field's value. +func (s *DescribeCacheParametersOutput) SetCacheNodeTypeSpecificParameters(v []*CacheNodeTypeSpecificParameter) *DescribeCacheParametersOutput { + s.CacheNodeTypeSpecificParameters = v return s } -type DeleteCacheSubnetGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCacheSubnetGroupOutput) String() string { - return awsutil.Prettify(s) +// SetMarker sets the Marker field's value. +func (s *DescribeCacheParametersOutput) SetMarker(v string) *DescribeCacheParametersOutput { + s.Marker = &v + return s } -// GoString returns the string representation -func (s DeleteCacheSubnetGroupOutput) GoString() string { - return s.String() +// SetParameters sets the Parameters field's value. +func (s *DescribeCacheParametersOutput) SetParameters(v []*Parameter) *DescribeCacheParametersOutput { + s.Parameters = v + return s } -// Represents the input of a DeleteReplicationGroup operation. -type DeleteReplicationGroupInput struct { +// Represents the input of a DescribeCacheSecurityGroups operation. +type DescribeCacheSecurityGroupsInput struct { _ struct{} `type:"structure"` - // The name of a final node group (shard) snapshot. ElastiCache creates the - // snapshot from the primary node in the cluster, rather than one of the replicas; - // this is to ensure that it captures the freshest data. After the final snapshot - // is taken, the replication group is immediately deleted. - FinalSnapshotIdentifier *string `type:"string"` + // The name of the cache security group to return details for. + CacheSecurityGroupName *string `type:"string"` - // The identifier for the cluster to be deleted. This parameter is not case - // sensitive. - // - // ReplicationGroupId is a required field - ReplicationGroupId *string `type:"string" required:"true"` + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` - // If set to true, all of the read replicas are deleted, but the primary node - // is retained. - RetainPrimaryCluster *bool `type:"boolean"` + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a marker is included in the response + // so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + MaxRecords *int64 `type:"integer"` } // String returns the string representation -func (s DeleteReplicationGroupInput) String() string { +func (s DescribeCacheSecurityGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteReplicationGroupInput) GoString() string { +func (s DescribeCacheSecurityGroupsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReplicationGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationGroupInput"} - if s.ReplicationGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFinalSnapshotIdentifier sets the FinalSnapshotIdentifier field's value. -func (s *DeleteReplicationGroupInput) SetFinalSnapshotIdentifier(v string) *DeleteReplicationGroupInput { - s.FinalSnapshotIdentifier = &v +// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. +func (s *DescribeCacheSecurityGroupsInput) SetCacheSecurityGroupName(v string) *DescribeCacheSecurityGroupsInput { + s.CacheSecurityGroupName = &v return s } -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DeleteReplicationGroupInput) SetReplicationGroupId(v string) *DeleteReplicationGroupInput { - s.ReplicationGroupId = &v +// SetMarker sets the Marker field's value. +func (s *DescribeCacheSecurityGroupsInput) SetMarker(v string) *DescribeCacheSecurityGroupsInput { + s.Marker = &v return s } -// SetRetainPrimaryCluster sets the RetainPrimaryCluster field's value. -func (s *DeleteReplicationGroupInput) SetRetainPrimaryCluster(v bool) *DeleteReplicationGroupInput { - s.RetainPrimaryCluster = &v +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeCacheSecurityGroupsInput) SetMaxRecords(v int64) *DescribeCacheSecurityGroupsInput { + s.MaxRecords = &v return s } -type DeleteReplicationGroupOutput struct { +// Represents the output of a DescribeCacheSecurityGroups operation. +type DescribeCacheSecurityGroupsOutput struct { _ struct{} `type:"structure"` - // Contains all of the attributes of a specific Redis replication group. - ReplicationGroup *ReplicationGroup `type:"structure"` + // A list of cache security groups. Each element in the list contains detailed + // information about one group. + CacheSecurityGroups []*CacheSecurityGroup `locationNameList:"CacheSecurityGroup" type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` } // String returns the string representation -func (s DeleteReplicationGroupOutput) String() string { +func (s DescribeCacheSecurityGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteReplicationGroupOutput) GoString() string { +func (s DescribeCacheSecurityGroupsOutput) GoString() string { return s.String() } -// SetReplicationGroup sets the ReplicationGroup field's value. -func (s *DeleteReplicationGroupOutput) SetReplicationGroup(v *ReplicationGroup) *DeleteReplicationGroupOutput { - s.ReplicationGroup = v +// SetCacheSecurityGroups sets the CacheSecurityGroups field's value. +func (s *DescribeCacheSecurityGroupsOutput) SetCacheSecurityGroups(v []*CacheSecurityGroup) *DescribeCacheSecurityGroupsOutput { + s.CacheSecurityGroups = v return s } -// Represents the input of a DeleteSnapshot operation. -type DeleteSnapshotInput struct { +// SetMarker sets the Marker field's value. +func (s *DescribeCacheSecurityGroupsOutput) SetMarker(v string) *DescribeCacheSecurityGroupsOutput { + s.Marker = &v + return s +} + +// Represents the input of a DescribeCacheSubnetGroups operation. +type DescribeCacheSubnetGroupsInput struct { _ struct{} `type:"structure"` - // The name of the snapshot to be deleted. + // The name of the cache subnet group to return details for. + CacheSubnetGroupName *string `type:"string"` + + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a marker is included in the response + // so that the remaining results can be retrieved. // - // SnapshotName is a required field - SnapshotName *string `type:"string" required:"true"` + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + MaxRecords *int64 `type:"integer"` } // String returns the string representation -func (s DeleteSnapshotInput) String() string { +func (s DescribeCacheSubnetGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSnapshotInput) GoString() string { +func (s DescribeCacheSubnetGroupsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} - if s.SnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotName")) - } +// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. +func (s *DescribeCacheSubnetGroupsInput) SetCacheSubnetGroupName(v string) *DescribeCacheSubnetGroupsInput { + s.CacheSubnetGroupName = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMarker sets the Marker field's value. +func (s *DescribeCacheSubnetGroupsInput) SetMarker(v string) *DescribeCacheSubnetGroupsInput { + s.Marker = &v + return s } -// SetSnapshotName sets the SnapshotName field's value. -func (s *DeleteSnapshotInput) SetSnapshotName(v string) *DeleteSnapshotInput { - s.SnapshotName = &v +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeCacheSubnetGroupsInput) SetMaxRecords(v int64) *DescribeCacheSubnetGroupsInput { + s.MaxRecords = &v return s } -type DeleteSnapshotOutput struct { +// Represents the output of a DescribeCacheSubnetGroups operation. +type DescribeCacheSubnetGroupsOutput struct { _ struct{} `type:"structure"` - // Represents a copy of an entire Redis cluster as of the time when the snapshot - // was taken. - Snapshot *Snapshot `type:"structure"` + // A list of cache subnet groups. Each element in the list contains detailed + // information about one group. + CacheSubnetGroups []*CacheSubnetGroup `locationNameList:"CacheSubnetGroup" type:"list"` + + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` } // String returns the string representation -func (s DeleteSnapshotOutput) String() string { +func (s DescribeCacheSubnetGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSnapshotOutput) GoString() string { +func (s DescribeCacheSubnetGroupsOutput) GoString() string { return s.String() } -// SetSnapshot sets the Snapshot field's value. -func (s *DeleteSnapshotOutput) SetSnapshot(v *Snapshot) *DeleteSnapshotOutput { - s.Snapshot = v +// SetCacheSubnetGroups sets the CacheSubnetGroups field's value. +func (s *DescribeCacheSubnetGroupsOutput) SetCacheSubnetGroups(v []*CacheSubnetGroup) *DescribeCacheSubnetGroupsOutput { + s.CacheSubnetGroups = v return s } -// Represents the input of a DescribeCacheClusters operation. -type DescribeCacheClustersInput struct { +// SetMarker sets the Marker field's value. +func (s *DescribeCacheSubnetGroupsOutput) SetMarker(v string) *DescribeCacheSubnetGroupsOutput { + s.Marker = &v + return s +} + +// Represents the input of a DescribeEngineDefaultParameters operation. +type DescribeEngineDefaultParametersInput struct { _ struct{} `type:"structure"` - // The user-supplied cluster identifier. If this parameter is specified, only - // information about that specific cluster is returned. This parameter isn't - // case sensitive. - CacheClusterId *string `type:"string"` + // The name of the cache parameter group family. + // + // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 + // | redis4.0 | redis5.0 | + // + // CacheParameterGroupFamily is a required field + CacheParameterGroupFamily *string `type:"string" required:"true"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -9182,120 +10981,84 @@ type DescribeCacheClustersInput struct { // // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` - - // An optional flag that can be included in the DescribeCacheCluster request - // to show only nodes (API/CLI: clusters) that are not members of a replication - // group. In practice, this mean Memcached and single node Redis clusters. - ShowCacheClustersNotInReplicationGroups *bool `type:"boolean"` - - // An optional flag that can be included in the DescribeCacheCluster request - // to retrieve information about the individual cache nodes. - ShowCacheNodeInfo *bool `type:"boolean"` } // String returns the string representation -func (s DescribeCacheClustersInput) String() string { +func (s DescribeEngineDefaultParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheClustersInput) GoString() string { +func (s DescribeEngineDefaultParametersInput) GoString() string { return s.String() } -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *DescribeCacheClustersInput) SetCacheClusterId(v string) *DescribeCacheClustersInput { - s.CacheClusterId = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} + if s.CacheParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. +func (s *DescribeEngineDefaultParametersInput) SetCacheParameterGroupFamily(v string) *DescribeEngineDefaultParametersInput { + s.CacheParameterGroupFamily = &v return s } // SetMarker sets the Marker field's value. -func (s *DescribeCacheClustersInput) SetMarker(v string) *DescribeCacheClustersInput { +func (s *DescribeEngineDefaultParametersInput) SetMarker(v string) *DescribeEngineDefaultParametersInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheClustersInput) SetMaxRecords(v int64) *DescribeCacheClustersInput { +func (s *DescribeEngineDefaultParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultParametersInput { s.MaxRecords = &v return s } -// SetShowCacheClustersNotInReplicationGroups sets the ShowCacheClustersNotInReplicationGroups field's value. -func (s *DescribeCacheClustersInput) SetShowCacheClustersNotInReplicationGroups(v bool) *DescribeCacheClustersInput { - s.ShowCacheClustersNotInReplicationGroups = &v - return s -} - -// SetShowCacheNodeInfo sets the ShowCacheNodeInfo field's value. -func (s *DescribeCacheClustersInput) SetShowCacheNodeInfo(v bool) *DescribeCacheClustersInput { - s.ShowCacheNodeInfo = &v - return s -} - -// Represents the output of a DescribeCacheClusters operation. -type DescribeCacheClustersOutput struct { +type DescribeEngineDefaultParametersOutput struct { _ struct{} `type:"structure"` - // A list of clusters. Each item in the list contains detailed information about - // one cluster. - CacheClusters []*CacheCluster `locationNameList:"CacheCluster" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` + // Represents the output of a DescribeEngineDefaultParameters operation. + EngineDefaults *EngineDefaults `type:"structure"` } // String returns the string representation -func (s DescribeCacheClustersOutput) String() string { +func (s DescribeEngineDefaultParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheClustersOutput) GoString() string { +func (s DescribeEngineDefaultParametersOutput) GoString() string { return s.String() } -// SetCacheClusters sets the CacheClusters field's value. -func (s *DescribeCacheClustersOutput) SetCacheClusters(v []*CacheCluster) *DescribeCacheClustersOutput { - s.CacheClusters = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeCacheClustersOutput) SetMarker(v string) *DescribeCacheClustersOutput { - s.Marker = &v +// SetEngineDefaults sets the EngineDefaults field's value. +func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultParametersOutput { + s.EngineDefaults = v return s } -// Represents the input of a DescribeCacheEngineVersions operation. -type DescribeCacheEngineVersionsInput struct { +// Represents the input of a DescribeEvents operation. +type DescribeEventsInput struct { _ struct{} `type:"structure"` - // The name of a specific cache parameter group family to return details for. - // - // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 - // | redis4.0 | redis5.0 | - // - // Constraints: - // - // * Must be 1 to 255 alphanumeric characters - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - CacheParameterGroupFamily *string `type:"string"` - - // If true, specifies that only the default version of the specified engine - // or engine and major version combination is to be returned. - DefaultOnly *bool `type:"boolean"` - - // The cache engine to return. Valid values: memcached | redis - Engine *string `type:"string"` + // The number of minutes worth of events to retrieve. + Duration *int64 `type:"integer"` - // The cache engine version to return. + // The end of the time interval for which to retrieve events, specified in ISO + // 8601 format. // - // Example: 1.4.14 - EngineVersion *string `type:"string"` + // Example: 2017-03-30T07:03:49.555Z + EndTime *time.Time `type:"timestamp"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -9310,94 +11073,113 @@ type DescribeCacheEngineVersionsInput struct { // // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` + + // The identifier of the event source for which events are returned. If not + // specified, all sources are included in the response. + SourceIdentifier *string `type:"string"` + + // The event source to retrieve events for. If no value is specified, all events + // are returned. + SourceType *string `type:"string" enum:"SourceType"` + + // The beginning of the time interval to retrieve events for, specified in ISO + // 8601 format. + // + // Example: 2017-03-30T07:03:49.555Z + StartTime *time.Time `type:"timestamp"` } // String returns the string representation -func (s DescribeCacheEngineVersionsInput) String() string { +func (s DescribeEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheEngineVersionsInput) GoString() string { +func (s DescribeEventsInput) GoString() string { return s.String() } -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *DescribeCacheEngineVersionsInput) SetCacheParameterGroupFamily(v string) *DescribeCacheEngineVersionsInput { - s.CacheParameterGroupFamily = &v +// SetDuration sets the Duration field's value. +func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { + s.Duration = &v return s } -// SetDefaultOnly sets the DefaultOnly field's value. -func (s *DescribeCacheEngineVersionsInput) SetDefaultOnly(v bool) *DescribeCacheEngineVersionsInput { - s.DefaultOnly = &v +// SetEndTime sets the EndTime field's value. +func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { + s.EndTime = &v return s } -// SetEngine sets the Engine field's value. -func (s *DescribeCacheEngineVersionsInput) SetEngine(v string) *DescribeCacheEngineVersionsInput { - s.Engine = &v +// SetMarker sets the Marker field's value. +func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { + s.Marker = &v return s } -// SetEngineVersion sets the EngineVersion field's value. -func (s *DescribeCacheEngineVersionsInput) SetEngineVersion(v string) *DescribeCacheEngineVersionsInput { - s.EngineVersion = &v +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { + s.MaxRecords = &v return s } -// SetMarker sets the Marker field's value. -func (s *DescribeCacheEngineVersionsInput) SetMarker(v string) *DescribeCacheEngineVersionsInput { - s.Marker = &v +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { + s.SourceIdentifier = &v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheEngineVersionsInput) SetMaxRecords(v int64) *DescribeCacheEngineVersionsInput { - s.MaxRecords = &v +// SetSourceType sets the SourceType field's value. +func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { + s.SourceType = &v return s } -// Represents the output of a DescribeCacheEngineVersions operation. -type DescribeCacheEngineVersionsOutput struct { +// SetStartTime sets the StartTime field's value. +func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { + s.StartTime = &v + return s +} + +// Represents the output of a DescribeEvents operation. +type DescribeEventsOutput struct { _ struct{} `type:"structure"` - // A list of cache engine version details. Each element in the list contains - // detailed information about one cache engine version. - CacheEngineVersions []*CacheEngineVersion `locationNameList:"CacheEngineVersion" type:"list"` + // A list of events. Each element in the list contains detailed information + // about one event. + Events []*Event `locationNameList:"Event" type:"list"` // Provides an identifier to allow retrieval of paginated results. Marker *string `type:"string"` } // String returns the string representation -func (s DescribeCacheEngineVersionsOutput) String() string { +func (s DescribeEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheEngineVersionsOutput) GoString() string { +func (s DescribeEventsOutput) GoString() string { return s.String() } -// SetCacheEngineVersions sets the CacheEngineVersions field's value. -func (s *DescribeCacheEngineVersionsOutput) SetCacheEngineVersions(v []*CacheEngineVersion) *DescribeCacheEngineVersionsOutput { - s.CacheEngineVersions = v +// SetEvents sets the Events field's value. +func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { + s.Events = v return s } // SetMarker sets the Marker field's value. -func (s *DescribeCacheEngineVersionsOutput) SetMarker(v string) *DescribeCacheEngineVersionsOutput { +func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { s.Marker = &v return s } -// Represents the input of a DescribeCacheParameterGroups operation. -type DescribeCacheParameterGroupsInput struct { +type DescribeGlobalReplicationGroupsInput struct { _ struct{} `type:"structure"` - // The name of a specific cache parameter group to return details for. - CacheParameterGroupName *string `type:"string"` + // The name of the Global Datastore + GlobalReplicationGroupId *string `type:"string"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -9407,84 +11189,85 @@ type DescribeCacheParameterGroupsInput struct { // The maximum number of records to include in the response. If more records // exist than the specified MaxRecords value, a marker is included in the response // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` + + // Returns the list of members that comprise the Global Datastore. + ShowMemberInfo *bool `type:"boolean"` } // String returns the string representation -func (s DescribeCacheParameterGroupsInput) String() string { +func (s DescribeGlobalReplicationGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheParameterGroupsInput) GoString() string { +func (s DescribeGlobalReplicationGroupsInput) GoString() string { return s.String() } -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *DescribeCacheParameterGroupsInput) SetCacheParameterGroupName(v string) *DescribeCacheParameterGroupsInput { - s.CacheParameterGroupName = &v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *DescribeGlobalReplicationGroupsInput) SetGlobalReplicationGroupId(v string) *DescribeGlobalReplicationGroupsInput { + s.GlobalReplicationGroupId = &v return s } // SetMarker sets the Marker field's value. -func (s *DescribeCacheParameterGroupsInput) SetMarker(v string) *DescribeCacheParameterGroupsInput { +func (s *DescribeGlobalReplicationGroupsInput) SetMarker(v string) *DescribeGlobalReplicationGroupsInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheParameterGroupsInput) SetMaxRecords(v int64) *DescribeCacheParameterGroupsInput { +func (s *DescribeGlobalReplicationGroupsInput) SetMaxRecords(v int64) *DescribeGlobalReplicationGroupsInput { s.MaxRecords = &v return s } -// Represents the output of a DescribeCacheParameterGroups operation. -type DescribeCacheParameterGroupsOutput struct { +// SetShowMemberInfo sets the ShowMemberInfo field's value. +func (s *DescribeGlobalReplicationGroupsInput) SetShowMemberInfo(v bool) *DescribeGlobalReplicationGroupsInput { + s.ShowMemberInfo = &v + return s +} + +type DescribeGlobalReplicationGroupsOutput struct { _ struct{} `type:"structure"` - // A list of cache parameter groups. Each element in the list contains detailed - // information about one cache parameter group. - CacheParameterGroups []*CacheParameterGroup `locationNameList:"CacheParameterGroup" type:"list"` + // Indicates the slot configuration and global identifier for each slice group. + GlobalReplicationGroups []*GlobalReplicationGroup `locationNameList:"GlobalReplicationGroup" type:"list"` - // Provides an identifier to allow retrieval of paginated results. + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. + // > Marker *string `type:"string"` } // String returns the string representation -func (s DescribeCacheParameterGroupsOutput) String() string { +func (s DescribeGlobalReplicationGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheParameterGroupsOutput) GoString() string { +func (s DescribeGlobalReplicationGroupsOutput) GoString() string { return s.String() } -// SetCacheParameterGroups sets the CacheParameterGroups field's value. -func (s *DescribeCacheParameterGroupsOutput) SetCacheParameterGroups(v []*CacheParameterGroup) *DescribeCacheParameterGroupsOutput { - s.CacheParameterGroups = v +// SetGlobalReplicationGroups sets the GlobalReplicationGroups field's value. +func (s *DescribeGlobalReplicationGroupsOutput) SetGlobalReplicationGroups(v []*GlobalReplicationGroup) *DescribeGlobalReplicationGroupsOutput { + s.GlobalReplicationGroups = v return s } // SetMarker sets the Marker field's value. -func (s *DescribeCacheParameterGroupsOutput) SetMarker(v string) *DescribeCacheParameterGroupsOutput { +func (s *DescribeGlobalReplicationGroupsOutput) SetMarker(v string) *DescribeGlobalReplicationGroupsOutput { s.Marker = &v return s } -// Represents the input of a DescribeCacheParameters operation. -type DescribeCacheParametersInput struct { +// Represents the input of a DescribeReplicationGroups operation. +type DescribeReplicationGroupsInput struct { _ struct{} `type:"structure"` - // The name of a specific cache parameter group to return details for. - // - // CacheParameterGroupName is a required field - CacheParameterGroupName *string `type:"string" required:"true"` - // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response // includes only records beyond the marker, up to the value specified by MaxRecords. @@ -9499,108 +11282,124 @@ type DescribeCacheParametersInput struct { // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` - // The parameter types to return. + // The identifier for the replication group to be described. This parameter + // is not case sensitive. // - // Valid values: user | system | engine-default - Source *string `type:"string"` + // If you do not specify this parameter, information about all replication groups + // is returned. + ReplicationGroupId *string `type:"string"` } // String returns the string representation -func (s DescribeCacheParametersInput) String() string { +func (s DescribeReplicationGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheParametersInput) GoString() string { +func (s DescribeReplicationGroupsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCacheParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCacheParametersInput"} - if s.CacheParameterGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupName sets the CacheParameterGroupName field's value. -func (s *DescribeCacheParametersInput) SetCacheParameterGroupName(v string) *DescribeCacheParametersInput { - s.CacheParameterGroupName = &v - return s -} - // SetMarker sets the Marker field's value. -func (s *DescribeCacheParametersInput) SetMarker(v string) *DescribeCacheParametersInput { +func (s *DescribeReplicationGroupsInput) SetMarker(v string) *DescribeReplicationGroupsInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheParametersInput) SetMaxRecords(v int64) *DescribeCacheParametersInput { +func (s *DescribeReplicationGroupsInput) SetMaxRecords(v int64) *DescribeReplicationGroupsInput { s.MaxRecords = &v return s } -// SetSource sets the Source field's value. -func (s *DescribeCacheParametersInput) SetSource(v string) *DescribeCacheParametersInput { - s.Source = &v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *DescribeReplicationGroupsInput) SetReplicationGroupId(v string) *DescribeReplicationGroupsInput { + s.ReplicationGroupId = &v return s } -// Represents the output of a DescribeCacheParameters operation. -type DescribeCacheParametersOutput struct { +// Represents the output of a DescribeReplicationGroups operation. +type DescribeReplicationGroupsOutput struct { _ struct{} `type:"structure"` - // A list of parameters specific to a particular cache node type. Each element - // in the list contains detailed information about one parameter. - CacheNodeTypeSpecificParameters []*CacheNodeTypeSpecificParameter `locationNameList:"CacheNodeTypeSpecificParameter" type:"list"` - // Provides an identifier to allow retrieval of paginated results. Marker *string `type:"string"` - // A list of Parameter instances. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` + // A list of replication groups. Each item in the list contains detailed information + // about one replication group. + ReplicationGroups []*ReplicationGroup `locationNameList:"ReplicationGroup" type:"list"` } // String returns the string representation -func (s DescribeCacheParametersOutput) String() string { +func (s DescribeReplicationGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheParametersOutput) GoString() string { +func (s DescribeReplicationGroupsOutput) GoString() string { return s.String() } -// SetCacheNodeTypeSpecificParameters sets the CacheNodeTypeSpecificParameters field's value. -func (s *DescribeCacheParametersOutput) SetCacheNodeTypeSpecificParameters(v []*CacheNodeTypeSpecificParameter) *DescribeCacheParametersOutput { - s.CacheNodeTypeSpecificParameters = v - return s -} - // SetMarker sets the Marker field's value. -func (s *DescribeCacheParametersOutput) SetMarker(v string) *DescribeCacheParametersOutput { +func (s *DescribeReplicationGroupsOutput) SetMarker(v string) *DescribeReplicationGroupsOutput { s.Marker = &v return s } -// SetParameters sets the Parameters field's value. -func (s *DescribeCacheParametersOutput) SetParameters(v []*Parameter) *DescribeCacheParametersOutput { - s.Parameters = v +// SetReplicationGroups sets the ReplicationGroups field's value. +func (s *DescribeReplicationGroupsOutput) SetReplicationGroups(v []*ReplicationGroup) *DescribeReplicationGroupsOutput { + s.ReplicationGroups = v return s } -// Represents the input of a DescribeCacheSecurityGroups operation. -type DescribeCacheSecurityGroupsInput struct { +// Represents the input of a DescribeReservedCacheNodes operation. +type DescribeReservedCacheNodesInput struct { _ struct{} `type:"structure"` - // The name of the cache security group to return details for. - CacheSecurityGroupName *string `type:"string"` + // The cache node type filter value. Use this parameter to show only those reservations + // matching the specified cache node type. + // + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. + // + // * General purpose: Current generation: M5 node types: cache.m5.large, + // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, + // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // * Compute optimized: Previous generation: (not recommended) C1 node types: + // cache.c1.xlarge + // + // * Memory optimized: Current generation: R5 node types: cache.r5.large, + // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, + // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, + // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: + // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // cache.r3.8xlarge + // + // Additional node type info + // + // * All current generation instance types are created in Amazon VPC by default. + // + // * Redis append-only files (AOF) are not supported for T1 or T2 instances. + // + // * Redis Multi-AZ with automatic failover is not supported on T1 instances. + // + // * Redis configuration variables appendonly and appendfsync are not supported + // on Redis version 2.8.22 and later. + CacheNodeType *string `type:"string"` + + // The duration filter value, specified in years or seconds. Use this parameter + // to show only reservations for this duration. + // + // Valid Values: 1 | 3 | 31536000 | 94608000 + Duration *string `type:"string"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -9615,76 +11414,132 @@ type DescribeCacheSecurityGroupsInput struct { // // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` + + // The offering type filter value. Use this parameter to show only the available + // offerings matching the specified offering type. + // + // Valid values: "Light Utilization"|"Medium Utilization"|"Heavy Utilization" + OfferingType *string `type:"string"` + + // The product description filter value. Use this parameter to show only those + // reservations matching the specified product description. + ProductDescription *string `type:"string"` + + // The reserved cache node identifier filter value. Use this parameter to show + // only the reservation that matches the specified reservation ID. + ReservedCacheNodeId *string `type:"string"` + + // The offering identifier filter value. Use this parameter to show only purchased + // reservations matching the specified offering identifier. + ReservedCacheNodesOfferingId *string `type:"string"` } // String returns the string representation -func (s DescribeCacheSecurityGroupsInput) String() string { +func (s DescribeReservedCacheNodesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheSecurityGroupsInput) GoString() string { +func (s DescribeReservedCacheNodesInput) GoString() string { return s.String() } -// SetCacheSecurityGroupName sets the CacheSecurityGroupName field's value. -func (s *DescribeCacheSecurityGroupsInput) SetCacheSecurityGroupName(v string) *DescribeCacheSecurityGroupsInput { - s.CacheSecurityGroupName = &v +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *DescribeReservedCacheNodesInput) SetCacheNodeType(v string) *DescribeReservedCacheNodesInput { + s.CacheNodeType = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DescribeReservedCacheNodesInput) SetDuration(v string) *DescribeReservedCacheNodesInput { + s.Duration = &v return s } // SetMarker sets the Marker field's value. -func (s *DescribeCacheSecurityGroupsInput) SetMarker(v string) *DescribeCacheSecurityGroupsInput { +func (s *DescribeReservedCacheNodesInput) SetMarker(v string) *DescribeReservedCacheNodesInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheSecurityGroupsInput) SetMaxRecords(v int64) *DescribeCacheSecurityGroupsInput { +func (s *DescribeReservedCacheNodesInput) SetMaxRecords(v int64) *DescribeReservedCacheNodesInput { s.MaxRecords = &v return s } -// Represents the output of a DescribeCacheSecurityGroups operation. -type DescribeCacheSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of cache security groups. Each element in the list contains detailed - // information about one group. - CacheSecurityGroups []*CacheSecurityGroup `locationNameList:"CacheSecurityGroup" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeReservedCacheNodesInput) SetOfferingType(v string) *DescribeReservedCacheNodesInput { + s.OfferingType = &v + return s } -// GoString returns the string representation -func (s DescribeCacheSecurityGroupsOutput) GoString() string { - return s.String() +// SetProductDescription sets the ProductDescription field's value. +func (s *DescribeReservedCacheNodesInput) SetProductDescription(v string) *DescribeReservedCacheNodesInput { + s.ProductDescription = &v + return s } -// SetCacheSecurityGroups sets the CacheSecurityGroups field's value. -func (s *DescribeCacheSecurityGroupsOutput) SetCacheSecurityGroups(v []*CacheSecurityGroup) *DescribeCacheSecurityGroupsOutput { - s.CacheSecurityGroups = v +// SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. +func (s *DescribeReservedCacheNodesInput) SetReservedCacheNodeId(v string) *DescribeReservedCacheNodesInput { + s.ReservedCacheNodeId = &v return s } -// SetMarker sets the Marker field's value. -func (s *DescribeCacheSecurityGroupsOutput) SetMarker(v string) *DescribeCacheSecurityGroupsOutput { - s.Marker = &v +// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. +func (s *DescribeReservedCacheNodesInput) SetReservedCacheNodesOfferingId(v string) *DescribeReservedCacheNodesInput { + s.ReservedCacheNodesOfferingId = &v return s } -// Represents the input of a DescribeCacheSubnetGroups operation. -type DescribeCacheSubnetGroupsInput struct { +// Represents the input of a DescribeReservedCacheNodesOfferings operation. +type DescribeReservedCacheNodesOfferingsInput struct { _ struct{} `type:"structure"` - // The name of the cache subnet group to return details for. - CacheSubnetGroupName *string `type:"string"` + // The cache node type filter value. Use this parameter to show only the available + // offerings matching the specified cache node type. + // + // The following node types are supported by ElastiCache. Generally speaking, + // the current generation types provide more memory and computational power + // at lower cost when compared to their equivalent previous generation counterparts. + // + // * General purpose: Current generation: M5 node types: cache.m5.large, + // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, + // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // + // * Compute optimized: Previous generation: (not recommended) C1 node types: + // cache.c1.xlarge + // + // * Memory optimized: Current generation: R5 node types: cache.r5.large, + // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, + // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, + // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: + // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge + // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, + // cache.r3.8xlarge + // + // Additional node type info + // + // * All current generation instance types are created in Amazon VPC by default. + // + // * Redis append-only files (AOF) are not supported for T1 or T2 instances. + // + // * Redis Multi-AZ with automatic failover is not supported on T1 instances. + // + // * Redis configuration variables appendonly and appendfsync are not supported + // on Redis version 2.8.22 and later. + CacheNodeType *string `type:"string"` + + // Duration filter value, specified in years or seconds. Use this parameter + // to show only reservations for a given duration. + // + // Valid Values: 1 | 3 | 31536000 | 94608000 + Duration *string `type:"string"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -9699,293 +11554,238 @@ type DescribeCacheSubnetGroupsInput struct { // // Constraints: minimum 20; maximum 100. MaxRecords *int64 `type:"integer"` + + // The offering type filter value. Use this parameter to show only the available + // offerings matching the specified offering type. + // + // Valid Values: "Light Utilization"|"Medium Utilization"|"Heavy Utilization" + OfferingType *string `type:"string"` + + // The product description filter value. Use this parameter to show only the + // available offerings matching the specified product description. + ProductDescription *string `type:"string"` + + // The offering identifier filter value. Use this parameter to show only the + // available offering that matches the specified reservation identifier. + // + // Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 + ReservedCacheNodesOfferingId *string `type:"string"` } // String returns the string representation -func (s DescribeCacheSubnetGroupsInput) String() string { +func (s DescribeReservedCacheNodesOfferingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCacheSubnetGroupsInput) GoString() string { +func (s DescribeReservedCacheNodesOfferingsInput) GoString() string { return s.String() } -// SetCacheSubnetGroupName sets the CacheSubnetGroupName field's value. -func (s *DescribeCacheSubnetGroupsInput) SetCacheSubnetGroupName(v string) *DescribeCacheSubnetGroupsInput { - s.CacheSubnetGroupName = &v +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *DescribeReservedCacheNodesOfferingsInput) SetCacheNodeType(v string) *DescribeReservedCacheNodesOfferingsInput { + s.CacheNodeType = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DescribeReservedCacheNodesOfferingsInput) SetDuration(v string) *DescribeReservedCacheNodesOfferingsInput { + s.Duration = &v return s } // SetMarker sets the Marker field's value. -func (s *DescribeCacheSubnetGroupsInput) SetMarker(v string) *DescribeCacheSubnetGroupsInput { +func (s *DescribeReservedCacheNodesOfferingsInput) SetMarker(v string) *DescribeReservedCacheNodesOfferingsInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeCacheSubnetGroupsInput) SetMaxRecords(v int64) *DescribeCacheSubnetGroupsInput { +func (s *DescribeReservedCacheNodesOfferingsInput) SetMaxRecords(v int64) *DescribeReservedCacheNodesOfferingsInput { s.MaxRecords = &v return s } -// Represents the output of a DescribeCacheSubnetGroups operation. -type DescribeCacheSubnetGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of cache subnet groups. Each element in the list contains detailed - // information about one group. - CacheSubnetGroups []*CacheSubnetGroup `locationNameList:"CacheSubnetGroup" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` -} - -// String returns the string representation -func (s DescribeCacheSubnetGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeCacheSubnetGroupsOutput) GoString() string { - return s.String() +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeReservedCacheNodesOfferingsInput) SetOfferingType(v string) *DescribeReservedCacheNodesOfferingsInput { + s.OfferingType = &v + return s } -// SetCacheSubnetGroups sets the CacheSubnetGroups field's value. -func (s *DescribeCacheSubnetGroupsOutput) SetCacheSubnetGroups(v []*CacheSubnetGroup) *DescribeCacheSubnetGroupsOutput { - s.CacheSubnetGroups = v +// SetProductDescription sets the ProductDescription field's value. +func (s *DescribeReservedCacheNodesOfferingsInput) SetProductDescription(v string) *DescribeReservedCacheNodesOfferingsInput { + s.ProductDescription = &v return s } -// SetMarker sets the Marker field's value. -func (s *DescribeCacheSubnetGroupsOutput) SetMarker(v string) *DescribeCacheSubnetGroupsOutput { - s.Marker = &v +// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. +func (s *DescribeReservedCacheNodesOfferingsInput) SetReservedCacheNodesOfferingId(v string) *DescribeReservedCacheNodesOfferingsInput { + s.ReservedCacheNodesOfferingId = &v return s } -// Represents the input of a DescribeEngineDefaultParameters operation. -type DescribeEngineDefaultParametersInput struct { +// Represents the output of a DescribeReservedCacheNodesOfferings operation. +type DescribeReservedCacheNodesOfferingsOutput struct { _ struct{} `type:"structure"` - // The name of the cache parameter group family. - // - // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 - // | redis4.0 | redis5.0 | - // - // CacheParameterGroupFamily is a required field - CacheParameterGroupFamily *string `type:"string" required:"true"` - - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. + // Provides an identifier to allow retrieval of paginated results. Marker *string `type:"string"` - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` + // A list of reserved cache node offerings. Each element in the list contains + // detailed information about one offering. + ReservedCacheNodesOfferings []*ReservedCacheNodesOffering `locationNameList:"ReservedCacheNodesOffering" type:"list"` } // String returns the string representation -func (s DescribeEngineDefaultParametersInput) String() string { +func (s DescribeReservedCacheNodesOfferingsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEngineDefaultParametersInput) GoString() string { +func (s DescribeReservedCacheNodesOfferingsOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEngineDefaultParametersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultParametersInput"} - if s.CacheParameterGroupFamily == nil { - invalidParams.Add(request.NewErrParamRequired("CacheParameterGroupFamily")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *DescribeEngineDefaultParametersInput) SetCacheParameterGroupFamily(v string) *DescribeEngineDefaultParametersInput { - s.CacheParameterGroupFamily = &v - return s -} - // SetMarker sets the Marker field's value. -func (s *DescribeEngineDefaultParametersInput) SetMarker(v string) *DescribeEngineDefaultParametersInput { +func (s *DescribeReservedCacheNodesOfferingsOutput) SetMarker(v string) *DescribeReservedCacheNodesOfferingsOutput { s.Marker = &v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEngineDefaultParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultParametersInput { - s.MaxRecords = &v +// SetReservedCacheNodesOfferings sets the ReservedCacheNodesOfferings field's value. +func (s *DescribeReservedCacheNodesOfferingsOutput) SetReservedCacheNodesOfferings(v []*ReservedCacheNodesOffering) *DescribeReservedCacheNodesOfferingsOutput { + s.ReservedCacheNodesOfferings = v return s } -type DescribeEngineDefaultParametersOutput struct { +// Represents the output of a DescribeReservedCacheNodes operation. +type DescribeReservedCacheNodesOutput struct { _ struct{} `type:"structure"` - // Represents the output of a DescribeEngineDefaultParameters operation. - EngineDefaults *EngineDefaults `type:"structure"` + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` + + // A list of reserved cache nodes. Each element in the list contains detailed + // information about one node. + ReservedCacheNodes []*ReservedCacheNode `locationNameList:"ReservedCacheNode" type:"list"` } // String returns the string representation -func (s DescribeEngineDefaultParametersOutput) String() string { +func (s DescribeReservedCacheNodesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEngineDefaultParametersOutput) GoString() string { +func (s DescribeReservedCacheNodesOutput) GoString() string { return s.String() } -// SetEngineDefaults sets the EngineDefaults field's value. -func (s *DescribeEngineDefaultParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultParametersOutput { - s.EngineDefaults = v +// SetMarker sets the Marker field's value. +func (s *DescribeReservedCacheNodesOutput) SetMarker(v string) *DescribeReservedCacheNodesOutput { + s.Marker = &v return s } -// Represents the input of a DescribeEvents operation. -type DescribeEventsInput struct { - _ struct{} `type:"structure"` - - // The number of minutes worth of events to retrieve. - Duration *int64 `type:"integer"` +// SetReservedCacheNodes sets the ReservedCacheNodes field's value. +func (s *DescribeReservedCacheNodesOutput) SetReservedCacheNodes(v []*ReservedCacheNode) *DescribeReservedCacheNodesOutput { + s.ReservedCacheNodes = v + return s +} - // The end of the time interval for which to retrieve events, specified in ISO - // 8601 format. - // - // Example: 2017-03-30T07:03:49.555Z - EndTime *time.Time `type:"timestamp"` +type DescribeServiceUpdatesInput struct { + _ struct{} `type:"structure"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response // includes only records beyond the marker, up to the value specified by MaxRecords. Marker *string `type:"string"` - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. + // The maximum number of records to include in the response MaxRecords *int64 `type:"integer"` - // The identifier of the event source for which events are returned. If not - // specified, all sources are included in the response. - SourceIdentifier *string `type:"string"` - - // The event source to retrieve events for. If no value is specified, all events - // are returned. - SourceType *string `type:"string" enum:"SourceType"` + // The unique ID of the service update + ServiceUpdateName *string `type:"string"` - // The beginning of the time interval to retrieve events for, specified in ISO - // 8601 format. - // - // Example: 2017-03-30T07:03:49.555Z - StartTime *time.Time `type:"timestamp"` + // The status of the service update + ServiceUpdateStatus []*string `type:"list"` } // String returns the string representation -func (s DescribeEventsInput) String() string { +func (s DescribeServiceUpdatesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventsInput) GoString() string { +func (s DescribeServiceUpdatesInput) GoString() string { return s.String() } -// SetDuration sets the Duration field's value. -func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { - s.Duration = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { - s.EndTime = &v - return s -} - // SetMarker sets the Marker field's value. -func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { +func (s *DescribeServiceUpdatesInput) SetMarker(v string) *DescribeServiceUpdatesInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { +func (s *DescribeServiceUpdatesInput) SetMaxRecords(v int64) *DescribeServiceUpdatesInput { s.MaxRecords = &v return s } -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { - s.SourceType = &v +// SetServiceUpdateName sets the ServiceUpdateName field's value. +func (s *DescribeServiceUpdatesInput) SetServiceUpdateName(v string) *DescribeServiceUpdatesInput { + s.ServiceUpdateName = &v return s } -// SetStartTime sets the StartTime field's value. -func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { - s.StartTime = &v +// SetServiceUpdateStatus sets the ServiceUpdateStatus field's value. +func (s *DescribeServiceUpdatesInput) SetServiceUpdateStatus(v []*string) *DescribeServiceUpdatesInput { + s.ServiceUpdateStatus = v return s } -// Represents the output of a DescribeEvents operation. -type DescribeEventsOutput struct { +type DescribeServiceUpdatesOutput struct { _ struct{} `type:"structure"` - // A list of events. Each element in the list contains detailed information - // about one event. - Events []*Event `locationNameList:"Event" type:"list"` - - // Provides an identifier to allow retrieval of paginated results. + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. Marker *string `type:"string"` + + // A list of service updates + ServiceUpdates []*ServiceUpdate `locationNameList:"ServiceUpdate" type:"list"` } // String returns the string representation -func (s DescribeEventsOutput) String() string { +func (s DescribeServiceUpdatesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { +func (s DescribeServiceUpdatesOutput) GoString() string { return s.String() } -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v +// SetMarker sets the Marker field's value. +func (s *DescribeServiceUpdatesOutput) SetMarker(v string) *DescribeServiceUpdatesOutput { + s.Marker = &v return s } -// SetMarker sets the Marker field's value. -func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { - s.Marker = &v +// SetServiceUpdates sets the ServiceUpdates field's value. +func (s *DescribeServiceUpdatesOutput) SetServiceUpdates(v []*ServiceUpdate) *DescribeServiceUpdatesOutput { + s.ServiceUpdates = v return s } -// Represents the input of a DescribeReplicationGroups operation. -type DescribeReplicationGroupsInput struct { +// Represents the input of a DescribeSnapshotsMessage operation. +type DescribeSnapshotsInput struct { _ struct{} `type:"structure"` + // A user-supplied cluster identifier. If this parameter is specified, only + // snapshots associated with that specific cluster are described. + CacheClusterId *string `type:"string"` + // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response // includes only records beyond the marker, up to the value specified by MaxRecords. @@ -9995,961 +11795,1021 @@ type DescribeReplicationGroupsInput struct { // exist than the specified MaxRecords value, a marker is included in the response // so that the remaining results can be retrieved. // - // Default: 100 + // Default: 50 // - // Constraints: minimum 20; maximum 100. + // Constraints: minimum 20; maximum 50. MaxRecords *int64 `type:"integer"` - // The identifier for the replication group to be described. This parameter - // is not case sensitive. - // - // If you do not specify this parameter, information about all replication groups - // is returned. + // A user-supplied replication group identifier. If this parameter is specified, + // only snapshots associated with that specific replication group are described. ReplicationGroupId *string `type:"string"` + + // A Boolean value which if true, the node group (shard) configuration is included + // in the snapshot description. + ShowNodeGroupConfig *bool `type:"boolean"` + + // A user-supplied name of the snapshot. If this parameter is specified, only + // this snapshot are described. + SnapshotName *string `type:"string"` + + // If set to system, the output shows snapshots that were automatically created + // by ElastiCache. If set to user the output shows snapshots that were manually + // created. If omitted, the output shows both automatically and manually created + // snapshots. + SnapshotSource *string `type:"string"` } // String returns the string representation -func (s DescribeReplicationGroupsInput) String() string { +func (s DescribeSnapshotsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReplicationGroupsInput) GoString() string { +func (s DescribeSnapshotsInput) GoString() string { return s.String() } +// SetCacheClusterId sets the CacheClusterId field's value. +func (s *DescribeSnapshotsInput) SetCacheClusterId(v string) *DescribeSnapshotsInput { + s.CacheClusterId = &v + return s +} + // SetMarker sets the Marker field's value. -func (s *DescribeReplicationGroupsInput) SetMarker(v string) *DescribeReplicationGroupsInput { +func (s *DescribeSnapshotsInput) SetMarker(v string) *DescribeSnapshotsInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReplicationGroupsInput) SetMaxRecords(v int64) *DescribeReplicationGroupsInput { +func (s *DescribeSnapshotsInput) SetMaxRecords(v int64) *DescribeSnapshotsInput { s.MaxRecords = &v return s } // SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DescribeReplicationGroupsInput) SetReplicationGroupId(v string) *DescribeReplicationGroupsInput { +func (s *DescribeSnapshotsInput) SetReplicationGroupId(v string) *DescribeSnapshotsInput { s.ReplicationGroupId = &v return s } -// Represents the output of a DescribeReplicationGroups operation. -type DescribeReplicationGroupsOutput struct { +// SetShowNodeGroupConfig sets the ShowNodeGroupConfig field's value. +func (s *DescribeSnapshotsInput) SetShowNodeGroupConfig(v bool) *DescribeSnapshotsInput { + s.ShowNodeGroupConfig = &v + return s +} + +// SetSnapshotName sets the SnapshotName field's value. +func (s *DescribeSnapshotsInput) SetSnapshotName(v string) *DescribeSnapshotsInput { + s.SnapshotName = &v + return s +} + +// SetSnapshotSource sets the SnapshotSource field's value. +func (s *DescribeSnapshotsInput) SetSnapshotSource(v string) *DescribeSnapshotsInput { + s.SnapshotSource = &v + return s +} + +// Represents the output of a DescribeSnapshots operation. +type DescribeSnapshotsOutput struct { _ struct{} `type:"structure"` - // Provides an identifier to allow retrieval of paginated results. + // An optional marker returned from a prior request. Use this marker for pagination + // of results from this operation. If this parameter is specified, the response + // includes only records beyond the marker, up to the value specified by MaxRecords. Marker *string `type:"string"` - // A list of replication groups. Each item in the list contains detailed information - // about one replication group. - ReplicationGroups []*ReplicationGroup `locationNameList:"ReplicationGroup" type:"list"` + // A list of snapshots. Each item in the list contains detailed information + // about one snapshot. + Snapshots []*Snapshot `locationNameList:"Snapshot" type:"list"` } // String returns the string representation -func (s DescribeReplicationGroupsOutput) String() string { +func (s DescribeSnapshotsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReplicationGroupsOutput) GoString() string { +func (s DescribeSnapshotsOutput) GoString() string { return s.String() } // SetMarker sets the Marker field's value. -func (s *DescribeReplicationGroupsOutput) SetMarker(v string) *DescribeReplicationGroupsOutput { +func (s *DescribeSnapshotsOutput) SetMarker(v string) *DescribeSnapshotsOutput { s.Marker = &v return s } -// SetReplicationGroups sets the ReplicationGroups field's value. -func (s *DescribeReplicationGroupsOutput) SetReplicationGroups(v []*ReplicationGroup) *DescribeReplicationGroupsOutput { - s.ReplicationGroups = v +// SetSnapshots sets the Snapshots field's value. +func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { + s.Snapshots = v return s } -// Represents the input of a DescribeReservedCacheNodes operation. -type DescribeReservedCacheNodesInput struct { +type DescribeUpdateActionsInput struct { _ struct{} `type:"structure"` - // The cache node type filter value. Use this parameter to show only those reservations - // matching the specified cache node type. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: Current generation: M5 node types: cache.m5.large, - // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, - // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge - // - // * Compute optimized: Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge - // - // * Memory optimized: Current generation: R5 node types: cache.r5.large, - // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, - // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, - // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: - // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // Additional node type info - // - // * All current generation instance types are created in Amazon VPC by default. - // - // * Redis append-only files (AOF) are not supported for T1 or T2 instances. - // - // * Redis Multi-AZ with automatic failover is not supported on T1 instances. - // - // * Redis configuration variables appendonly and appendfsync are not supported - // on Redis version 2.8.22 and later. - CacheNodeType *string `type:"string"` + // The cache cluster IDs + CacheClusterIds []*string `type:"list"` - // The duration filter value, specified in years or seconds. Use this parameter - // to show only reservations for this duration. - // - // Valid Values: 1 | 3 | 31536000 | 94608000 - Duration *string `type:"string"` + // The Elasticache engine to which the update applies. Either Redis or Memcached + Engine *string `type:"string"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response // includes only records beyond the marker, up to the value specified by MaxRecords. Marker *string `type:"string"` - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. + // The maximum number of records to include in the response MaxRecords *int64 `type:"integer"` - // The offering type filter value. Use this parameter to show only the available - // offerings matching the specified offering type. - // - // Valid values: "Light Utilization"|"Medium Utilization"|"Heavy Utilization" - OfferingType *string `type:"string"` + // The replication group IDs + ReplicationGroupIds []*string `type:"list"` - // The product description filter value. Use this parameter to show only those - // reservations matching the specified product description. - ProductDescription *string `type:"string"` + // The unique ID of the service update + ServiceUpdateName *string `type:"string"` - // The reserved cache node identifier filter value. Use this parameter to show - // only the reservation that matches the specified reservation ID. - ReservedCacheNodeId *string `type:"string"` + // The status of the service update + ServiceUpdateStatus []*string `type:"list"` - // The offering identifier filter value. Use this parameter to show only purchased - // reservations matching the specified offering identifier. - ReservedCacheNodesOfferingId *string `type:"string"` + // The range of time specified to search for service updates that are in available + // status + ServiceUpdateTimeRange *TimeRangeFilter `type:"structure"` + + // Dictates whether to include node level update status in the response + ShowNodeLevelUpdateStatus *bool `type:"boolean"` + + // The status of the update action. + UpdateActionStatus []*string `type:"list"` } // String returns the string representation -func (s DescribeReservedCacheNodesInput) String() string { +func (s DescribeUpdateActionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedCacheNodesInput) GoString() string { +func (s DescribeUpdateActionsInput) GoString() string { return s.String() } -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *DescribeReservedCacheNodesInput) SetCacheNodeType(v string) *DescribeReservedCacheNodesInput { - s.CacheNodeType = &v +// SetCacheClusterIds sets the CacheClusterIds field's value. +func (s *DescribeUpdateActionsInput) SetCacheClusterIds(v []*string) *DescribeUpdateActionsInput { + s.CacheClusterIds = v return s } -// SetDuration sets the Duration field's value. -func (s *DescribeReservedCacheNodesInput) SetDuration(v string) *DescribeReservedCacheNodesInput { - s.Duration = &v +// SetEngine sets the Engine field's value. +func (s *DescribeUpdateActionsInput) SetEngine(v string) *DescribeUpdateActionsInput { + s.Engine = &v return s } // SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesInput) SetMarker(v string) *DescribeReservedCacheNodesInput { +func (s *DescribeUpdateActionsInput) SetMarker(v string) *DescribeUpdateActionsInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedCacheNodesInput) SetMaxRecords(v int64) *DescribeReservedCacheNodesInput { +func (s *DescribeUpdateActionsInput) SetMaxRecords(v int64) *DescribeUpdateActionsInput { s.MaxRecords = &v return s } -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedCacheNodesInput) SetOfferingType(v string) *DescribeReservedCacheNodesInput { - s.OfferingType = &v +// SetReplicationGroupIds sets the ReplicationGroupIds field's value. +func (s *DescribeUpdateActionsInput) SetReplicationGroupIds(v []*string) *DescribeUpdateActionsInput { + s.ReplicationGroupIds = v return s } -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedCacheNodesInput) SetProductDescription(v string) *DescribeReservedCacheNodesInput { - s.ProductDescription = &v +// SetServiceUpdateName sets the ServiceUpdateName field's value. +func (s *DescribeUpdateActionsInput) SetServiceUpdateName(v string) *DescribeUpdateActionsInput { + s.ServiceUpdateName = &v return s } -// SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. -func (s *DescribeReservedCacheNodesInput) SetReservedCacheNodeId(v string) *DescribeReservedCacheNodesInput { - s.ReservedCacheNodeId = &v +// SetServiceUpdateStatus sets the ServiceUpdateStatus field's value. +func (s *DescribeUpdateActionsInput) SetServiceUpdateStatus(v []*string) *DescribeUpdateActionsInput { + s.ServiceUpdateStatus = v return s } -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *DescribeReservedCacheNodesInput) SetReservedCacheNodesOfferingId(v string) *DescribeReservedCacheNodesInput { - s.ReservedCacheNodesOfferingId = &v +// SetServiceUpdateTimeRange sets the ServiceUpdateTimeRange field's value. +func (s *DescribeUpdateActionsInput) SetServiceUpdateTimeRange(v *TimeRangeFilter) *DescribeUpdateActionsInput { + s.ServiceUpdateTimeRange = v return s } -// Represents the input of a DescribeReservedCacheNodesOfferings operation. -type DescribeReservedCacheNodesOfferingsInput struct { - _ struct{} `type:"structure"` +// SetShowNodeLevelUpdateStatus sets the ShowNodeLevelUpdateStatus field's value. +func (s *DescribeUpdateActionsInput) SetShowNodeLevelUpdateStatus(v bool) *DescribeUpdateActionsInput { + s.ShowNodeLevelUpdateStatus = &v + return s +} - // The cache node type filter value. Use this parameter to show only the available - // offerings matching the specified cache node type. - // - // The following node types are supported by ElastiCache. Generally speaking, - // the current generation types provide more memory and computational power - // at lower cost when compared to their equivalent previous generation counterparts. - // - // * General purpose: Current generation: M5 node types: cache.m5.large, - // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, - // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge - // - // * Compute optimized: Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge - // - // * Memory optimized: Current generation: R5 node types: cache.r5.large, - // cache.r5.xlarge, cache.r5.2xlarge, cache.r5.4xlarge, cache.r5.12xlarge, - // cache.r5.24xlarge R4 node types: cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, - // cache.r4.4xlarge, cache.r4.8xlarge, cache.r4.16xlarge Previous generation: - // (not recommended) M2 node types: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge - // R3 node types: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, - // cache.r3.8xlarge - // - // Additional node type info - // - // * All current generation instance types are created in Amazon VPC by default. - // - // * Redis append-only files (AOF) are not supported for T1 or T2 instances. - // - // * Redis Multi-AZ with automatic failover is not supported on T1 instances. - // - // * Redis configuration variables appendonly and appendfsync are not supported - // on Redis version 2.8.22 and later. - CacheNodeType *string `type:"string"` +// SetUpdateActionStatus sets the UpdateActionStatus field's value. +func (s *DescribeUpdateActionsInput) SetUpdateActionStatus(v []*string) *DescribeUpdateActionsInput { + s.UpdateActionStatus = v + return s +} - // Duration filter value, specified in years or seconds. Use this parameter - // to show only reservations for a given duration. - // - // Valid Values: 1 | 3 | 31536000 | 94608000 - Duration *string `type:"string"` +type DescribeUpdateActionsOutput struct { + _ struct{} `type:"structure"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response // includes only records beyond the marker, up to the value specified by MaxRecords. Marker *string `type:"string"` - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - MaxRecords *int64 `type:"integer"` + // Returns a list of update actions + UpdateActions []*UpdateAction `locationNameList:"UpdateAction" type:"list"` +} - // The offering type filter value. Use this parameter to show only the available - // offerings matching the specified offering type. +// String returns the string representation +func (s DescribeUpdateActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUpdateActionsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeUpdateActionsOutput) SetMarker(v string) *DescribeUpdateActionsOutput { + s.Marker = &v + return s +} + +// SetUpdateActions sets the UpdateActions field's value. +func (s *DescribeUpdateActionsOutput) SetUpdateActions(v []*UpdateAction) *DescribeUpdateActionsOutput { + s.UpdateActions = v + return s +} + +type DisassociateGlobalReplicationGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the Global Datastore // - // Valid Values: "Light Utilization"|"Medium Utilization"|"Heavy Utilization" - OfferingType *string `type:"string"` + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` - // The product description filter value. Use this parameter to show only the - // available offerings matching the specified product description. - ProductDescription *string `type:"string"` + // The name of the secondary cluster you wish to remove from the Global Datastore + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` - // The offering identifier filter value. Use this parameter to show only the - // available offering that matches the specified reservation identifier. + // The AWS region of secondary cluster you wish to remove from the Global Datastore // - // Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706 - ReservedCacheNodesOfferingId *string `type:"string"` + // ReplicationGroupRegion is a required field + ReplicationGroupRegion *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeReservedCacheNodesOfferingsInput) String() string { +func (s DisassociateGlobalReplicationGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedCacheNodesOfferingsInput) GoString() string { +func (s DisassociateGlobalReplicationGroupInput) GoString() string { return s.String() } -// SetCacheNodeType sets the CacheNodeType field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetCacheNodeType(v string) *DescribeReservedCacheNodesOfferingsInput { - s.CacheNodeType = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateGlobalReplicationGroupInput"} + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.ReplicationGroupRegion == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupRegion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDuration sets the Duration field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetDuration(v string) *DescribeReservedCacheNodesOfferingsInput { - s.Duration = &v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *DisassociateGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *DisassociateGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v return s } -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetMarker(v string) *DescribeReservedCacheNodesOfferingsInput { - s.Marker = &v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *DisassociateGlobalReplicationGroupInput) SetReplicationGroupId(v string) *DisassociateGlobalReplicationGroupInput { + s.ReplicationGroupId = &v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetMaxRecords(v int64) *DescribeReservedCacheNodesOfferingsInput { - s.MaxRecords = &v +// SetReplicationGroupRegion sets the ReplicationGroupRegion field's value. +func (s *DisassociateGlobalReplicationGroupInput) SetReplicationGroupRegion(v string) *DisassociateGlobalReplicationGroupInput { + s.ReplicationGroupRegion = &v return s } -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetOfferingType(v string) *DescribeReservedCacheNodesOfferingsInput { - s.OfferingType = &v - return s +type DisassociateGlobalReplicationGroupOutput struct { + _ struct{} `type:"structure"` + + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s DisassociateGlobalReplicationGroupOutput) String() string { + return awsutil.Prettify(s) } -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetProductDescription(v string) *DescribeReservedCacheNodesOfferingsInput { - s.ProductDescription = &v - return s +// GoString returns the string representation +func (s DisassociateGlobalReplicationGroupOutput) GoString() string { + return s.String() } -// SetReservedCacheNodesOfferingId sets the ReservedCacheNodesOfferingId field's value. -func (s *DescribeReservedCacheNodesOfferingsInput) SetReservedCacheNodesOfferingId(v string) *DescribeReservedCacheNodesOfferingsInput { - s.ReservedCacheNodesOfferingId = &v +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *DisassociateGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *DisassociateGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v return s } -// Represents the output of a DescribeReservedCacheNodesOfferings operation. -type DescribeReservedCacheNodesOfferingsOutput struct { +// Provides ownership and status information for an Amazon EC2 security group. +type EC2SecurityGroup struct { _ struct{} `type:"structure"` - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` + // The name of the Amazon EC2 security group. + EC2SecurityGroupName *string `type:"string"` - // A list of reserved cache node offerings. Each element in the list contains - // detailed information about one offering. - ReservedCacheNodesOfferings []*ReservedCacheNodesOffering `locationNameList:"ReservedCacheNodesOffering" type:"list"` + // The AWS account ID of the Amazon EC2 security group owner. + EC2SecurityGroupOwnerId *string `type:"string"` + + // The status of the Amazon EC2 security group. + Status *string `type:"string"` } // String returns the string representation -func (s DescribeReservedCacheNodesOfferingsOutput) String() string { +func (s EC2SecurityGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedCacheNodesOfferingsOutput) GoString() string { +func (s EC2SecurityGroup) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesOfferingsOutput) SetMarker(v string) *DescribeReservedCacheNodesOfferingsOutput { - s.Marker = &v +// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. +func (s *EC2SecurityGroup) SetEC2SecurityGroupName(v string) *EC2SecurityGroup { + s.EC2SecurityGroupName = &v return s } -// SetReservedCacheNodesOfferings sets the ReservedCacheNodesOfferings field's value. -func (s *DescribeReservedCacheNodesOfferingsOutput) SetReservedCacheNodesOfferings(v []*ReservedCacheNodesOffering) *DescribeReservedCacheNodesOfferingsOutput { - s.ReservedCacheNodesOfferings = v +// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. +func (s *EC2SecurityGroup) SetEC2SecurityGroupOwnerId(v string) *EC2SecurityGroup { + s.EC2SecurityGroupOwnerId = &v return s } -// Represents the output of a DescribeReservedCacheNodes operation. -type DescribeReservedCacheNodesOutput struct { +// SetStatus sets the Status field's value. +func (s *EC2SecurityGroup) SetStatus(v string) *EC2SecurityGroup { + s.Status = &v + return s +} + +// Represents the information required for client programs to connect to a cache +// node. +type Endpoint struct { _ struct{} `type:"structure"` - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` + // The DNS hostname of the cache node. + Address *string `type:"string"` - // A list of reserved cache nodes. Each element in the list contains detailed - // information about one node. - ReservedCacheNodes []*ReservedCacheNode `locationNameList:"ReservedCacheNode" type:"list"` + // The port number that the cache engine is listening on. + Port *int64 `type:"integer"` } // String returns the string representation -func (s DescribeReservedCacheNodesOutput) String() string { +func (s Endpoint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedCacheNodesOutput) GoString() string { +func (s Endpoint) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeReservedCacheNodesOutput) SetMarker(v string) *DescribeReservedCacheNodesOutput { - s.Marker = &v +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v return s } -// SetReservedCacheNodes sets the ReservedCacheNodes field's value. -func (s *DescribeReservedCacheNodesOutput) SetReservedCacheNodes(v []*ReservedCacheNode) *DescribeReservedCacheNodesOutput { - s.ReservedCacheNodes = v +// SetPort sets the Port field's value. +func (s *Endpoint) SetPort(v int64) *Endpoint { + s.Port = &v return s } -type DescribeServiceUpdatesInput struct { +// Represents the output of a DescribeEngineDefaultParameters operation. +type EngineDefaults struct { _ struct{} `type:"structure"` - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` + // A list of parameters specific to a particular cache node type. Each element + // in the list contains detailed information about one parameter. + CacheNodeTypeSpecificParameters []*CacheNodeTypeSpecificParameter `locationNameList:"CacheNodeTypeSpecificParameter" type:"list"` - // The maximum number of records to include in the response - MaxRecords *int64 `type:"integer"` + // Specifies the name of the cache parameter group family to which the engine + // default parameters apply. + // + // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 + // | redis4.0 | redis5.0 | + CacheParameterGroupFamily *string `type:"string"` - // The unique ID of the service update - ServiceUpdateName *string `type:"string"` + // Provides an identifier to allow retrieval of paginated results. + Marker *string `type:"string"` - // The status of the service update - ServiceUpdateStatus []*string `type:"list"` + // Contains a list of engine default parameters. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` } // String returns the string representation -func (s DescribeServiceUpdatesInput) String() string { +func (s EngineDefaults) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeServiceUpdatesInput) GoString() string { +func (s EngineDefaults) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeServiceUpdatesInput) SetMarker(v string) *DescribeServiceUpdatesInput { - s.Marker = &v +// SetCacheNodeTypeSpecificParameters sets the CacheNodeTypeSpecificParameters field's value. +func (s *EngineDefaults) SetCacheNodeTypeSpecificParameters(v []*CacheNodeTypeSpecificParameter) *EngineDefaults { + s.CacheNodeTypeSpecificParameters = v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeServiceUpdatesInput) SetMaxRecords(v int64) *DescribeServiceUpdatesInput { - s.MaxRecords = &v +// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. +func (s *EngineDefaults) SetCacheParameterGroupFamily(v string) *EngineDefaults { + s.CacheParameterGroupFamily = &v return s } -// SetServiceUpdateName sets the ServiceUpdateName field's value. -func (s *DescribeServiceUpdatesInput) SetServiceUpdateName(v string) *DescribeServiceUpdatesInput { - s.ServiceUpdateName = &v +// SetMarker sets the Marker field's value. +func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { + s.Marker = &v return s } -// SetServiceUpdateStatus sets the ServiceUpdateStatus field's value. -func (s *DescribeServiceUpdatesInput) SetServiceUpdateStatus(v []*string) *DescribeServiceUpdatesInput { - s.ServiceUpdateStatus = v +// SetParameters sets the Parameters field's value. +func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { + s.Parameters = v return s } -type DescribeServiceUpdatesOutput struct { +// Represents a single occurrence of something interesting within the system. +// Some examples of events are creating a cluster, adding or removing a cache +// node, or rebooting a node. +type Event struct { _ struct{} `type:"structure"` - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` + // The date and time when the event occurred. + Date *time.Time `type:"timestamp"` - // A list of service updates - ServiceUpdates []*ServiceUpdate `locationNameList:"ServiceUpdate" type:"list"` + // The text of the event. + Message *string `type:"string"` + + // The identifier for the source of the event. For example, if the event occurred + // at the cluster level, the identifier would be the name of the cluster. + SourceIdentifier *string `type:"string"` + + // Specifies the origin of this event - a cluster, a parameter group, a security + // group, etc. + SourceType *string `type:"string" enum:"SourceType"` } // String returns the string representation -func (s DescribeServiceUpdatesOutput) String() string { +func (s Event) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeServiceUpdatesOutput) GoString() string { +func (s Event) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeServiceUpdatesOutput) SetMarker(v string) *DescribeServiceUpdatesOutput { - s.Marker = &v +// SetDate sets the Date field's value. +func (s *Event) SetDate(v time.Time) *Event { + s.Date = &v return s } -// SetServiceUpdates sets the ServiceUpdates field's value. -func (s *DescribeServiceUpdatesOutput) SetServiceUpdates(v []*ServiceUpdate) *DescribeServiceUpdatesOutput { - s.ServiceUpdates = v +// SetMessage sets the Message field's value. +func (s *Event) SetMessage(v string) *Event { + s.Message = &v return s } -// Represents the input of a DescribeSnapshotsMessage operation. -type DescribeSnapshotsInput struct { - _ struct{} `type:"structure"` +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *Event) SetSourceIdentifier(v string) *Event { + s.SourceIdentifier = &v + return s +} - // A user-supplied cluster identifier. If this parameter is specified, only - // snapshots associated with that specific cluster are described. - CacheClusterId *string `type:"string"` +// SetSourceType sets the SourceType field's value. +func (s *Event) SetSourceType(v string) *Event { + s.SourceType = &v + return s +} - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` +type FailoverGlobalReplicationGroupInput struct { + _ struct{} `type:"structure"` - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a marker is included in the response - // so that the remaining results can be retrieved. - // - // Default: 50 + // The name of the Global Datastore // - // Constraints: minimum 20; maximum 50. - MaxRecords *int64 `type:"integer"` - - // A user-supplied replication group identifier. If this parameter is specified, - // only snapshots associated with that specific replication group are described. - ReplicationGroupId *string `type:"string"` - - // A Boolean value which if true, the node group (shard) configuration is included - // in the snapshot description. - ShowNodeGroupConfig *bool `type:"boolean"` + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` - // A user-supplied name of the snapshot. If this parameter is specified, only - // this snapshot are described. - SnapshotName *string `type:"string"` + // The AWS region of the primary cluster of the Global Datastore + // + // PrimaryRegion is a required field + PrimaryRegion *string `type:"string" required:"true"` - // If set to system, the output shows snapshots that were automatically created - // by ElastiCache. If set to user the output shows snapshots that were manually - // created. If omitted, the output shows both automatically and manually created - // snapshots. - SnapshotSource *string `type:"string"` + // The name of the primary replication group + // + // PrimaryReplicationGroupId is a required field + PrimaryReplicationGroupId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeSnapshotsInput) String() string { +func (s FailoverGlobalReplicationGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotsInput) GoString() string { +func (s FailoverGlobalReplicationGroupInput) GoString() string { return s.String() } -// SetCacheClusterId sets the CacheClusterId field's value. -func (s *DescribeSnapshotsInput) SetCacheClusterId(v string) *DescribeSnapshotsInput { - s.CacheClusterId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *FailoverGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FailoverGlobalReplicationGroupInput"} + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + if s.PrimaryRegion == nil { + invalidParams.Add(request.NewErrParamRequired("PrimaryRegion")) + } + if s.PrimaryReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("PrimaryReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotsInput) SetMarker(v string) *DescribeSnapshotsInput { - s.Marker = &v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *FailoverGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *FailoverGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSnapshotsInput) SetMaxRecords(v int64) *DescribeSnapshotsInput { - s.MaxRecords = &v +// SetPrimaryRegion sets the PrimaryRegion field's value. +func (s *FailoverGlobalReplicationGroupInput) SetPrimaryRegion(v string) *FailoverGlobalReplicationGroupInput { + s.PrimaryRegion = &v return s } -// SetReplicationGroupId sets the ReplicationGroupId field's value. -func (s *DescribeSnapshotsInput) SetReplicationGroupId(v string) *DescribeSnapshotsInput { - s.ReplicationGroupId = &v +// SetPrimaryReplicationGroupId sets the PrimaryReplicationGroupId field's value. +func (s *FailoverGlobalReplicationGroupInput) SetPrimaryReplicationGroupId(v string) *FailoverGlobalReplicationGroupInput { + s.PrimaryReplicationGroupId = &v return s } -// SetShowNodeGroupConfig sets the ShowNodeGroupConfig field's value. -func (s *DescribeSnapshotsInput) SetShowNodeGroupConfig(v bool) *DescribeSnapshotsInput { - s.ShowNodeGroupConfig = &v - return s +type FailoverGlobalReplicationGroupOutput struct { + _ struct{} `type:"structure"` + + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` } -// SetSnapshotName sets the SnapshotName field's value. -func (s *DescribeSnapshotsInput) SetSnapshotName(v string) *DescribeSnapshotsInput { - s.SnapshotName = &v - return s +// String returns the string representation +func (s FailoverGlobalReplicationGroupOutput) String() string { + return awsutil.Prettify(s) } -// SetSnapshotSource sets the SnapshotSource field's value. -func (s *DescribeSnapshotsInput) SetSnapshotSource(v string) *DescribeSnapshotsInput { - s.SnapshotSource = &v +// GoString returns the string representation +func (s FailoverGlobalReplicationGroupOutput) GoString() string { + return s.String() +} + +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *FailoverGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *FailoverGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v return s } -// Represents the output of a DescribeSnapshots operation. -type DescribeSnapshotsOutput struct { +// Indicates the slot configuration and global identifier for a slice group. +type GlobalNodeGroup struct { _ struct{} `type:"structure"` - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` + // The name of the global node group + GlobalNodeGroupId *string `type:"string"` - // A list of snapshots. Each item in the list contains detailed information - // about one snapshot. - Snapshots []*Snapshot `locationNameList:"Snapshot" type:"list"` + // The keyspace for this node group + Slots *string `type:"string"` } // String returns the string representation -func (s DescribeSnapshotsOutput) String() string { +func (s GlobalNodeGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotsOutput) GoString() string { +func (s GlobalNodeGroup) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotsOutput) SetMarker(v string) *DescribeSnapshotsOutput { - s.Marker = &v +// SetGlobalNodeGroupId sets the GlobalNodeGroupId field's value. +func (s *GlobalNodeGroup) SetGlobalNodeGroupId(v string) *GlobalNodeGroup { + s.GlobalNodeGroupId = &v return s } -// SetSnapshots sets the Snapshots field's value. -func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { - s.Snapshots = v +// SetSlots sets the Slots field's value. +func (s *GlobalNodeGroup) SetSlots(v string) *GlobalNodeGroup { + s.Slots = &v return s } -type DescribeUpdateActionsInput struct { +// Consists of a primary cluster that accepts writes and an associated secondary +// cluster that resides in a different AWS region. The secondary cluster accepts +// only reads. The primary cluster automatically replicates updates to the secondary +// cluster. +// +// * The GlobalReplicationGroupIdSuffix represents the name of the Global +// Datastore, which is what you use to associate a secondary cluster. +type GlobalReplicationGroup struct { _ struct{} `type:"structure"` - // The cache cluster IDs - CacheClusterIds []*string `type:"list"` + // A flag that enables encryption at rest when set to true. + // + // You cannot modify the value of AtRestEncryptionEnabled after the replication + // group is created. To enable encryption at rest on a replication group you + // must set AtRestEncryptionEnabled to true when you create the replication + // group. + // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6, 4.x or later. + AtRestEncryptionEnabled *bool `type:"boolean"` - // The Elasticache engine to which the update applies. Either Redis or Memcached - Engine *string `type:"string"` + // A flag that enables using an AuthToken (password) when issuing Redis commands. + // + // Default: false + AuthTokenEnabled *bool `type:"boolean"` - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` + // The cache node type of the Global Datastore + CacheNodeType *string `type:"string"` - // The maximum number of records to include in the response - MaxRecords *int64 `type:"integer"` + // A flag that indicates whether the Global Datastore is cluster enabled. + ClusterEnabled *bool `type:"boolean"` - // The replication group IDs - ReplicationGroupIds []*string `type:"list"` + // The Elasticache engine. For Redis only. + Engine *string `type:"string"` - // The unique ID of the service update - ServiceUpdateName *string `type:"string"` + // The Elasticache Redis engine version. For preview, it is Redis version 5.0.5 + // only. + EngineVersion *string `type:"string"` - // The status of the service update - ServiceUpdateStatus []*string `type:"list"` + // Indicates the slot configuration and global identifier for each slice group. + GlobalNodeGroups []*GlobalNodeGroup `locationNameList:"GlobalNodeGroup" type:"list"` - // The range of time specified to search for service updates that are in available - // status - ServiceUpdateTimeRange *TimeRangeFilter `type:"structure"` + // The optional description of the Global Datastore + GlobalReplicationGroupDescription *string `type:"string"` - // Dictates whether to include node level update status in the response - ShowNodeLevelUpdateStatus *bool `type:"boolean"` + // The name of the Global Datastore + GlobalReplicationGroupId *string `type:"string"` - // The status of the update action. - UpdateActionStatus []*string `type:"list"` + // The replication groups that comprise the Global Datastore. + Members []*GlobalReplicationGroupMember `locationNameList:"GlobalReplicationGroupMember" type:"list"` + + // The status of the Global Datastore + Status *string `type:"string"` + + // A flag that enables in-transit encryption when set to true. You cannot modify + // the value of TransitEncryptionEnabled after the cluster is created. To enable + // in-transit encryption on a cluster you must set TransitEncryptionEnabled + // to true when you create a cluster. + TransitEncryptionEnabled *bool `type:"boolean"` } // String returns the string representation -func (s DescribeUpdateActionsInput) String() string { +func (s GlobalReplicationGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeUpdateActionsInput) GoString() string { +func (s GlobalReplicationGroup) GoString() string { return s.String() } -// SetCacheClusterIds sets the CacheClusterIds field's value. -func (s *DescribeUpdateActionsInput) SetCacheClusterIds(v []*string) *DescribeUpdateActionsInput { - s.CacheClusterIds = v +// SetAtRestEncryptionEnabled sets the AtRestEncryptionEnabled field's value. +func (s *GlobalReplicationGroup) SetAtRestEncryptionEnabled(v bool) *GlobalReplicationGroup { + s.AtRestEncryptionEnabled = &v return s } -// SetEngine sets the Engine field's value. -func (s *DescribeUpdateActionsInput) SetEngine(v string) *DescribeUpdateActionsInput { - s.Engine = &v +// SetAuthTokenEnabled sets the AuthTokenEnabled field's value. +func (s *GlobalReplicationGroup) SetAuthTokenEnabled(v bool) *GlobalReplicationGroup { + s.AuthTokenEnabled = &v return s } -// SetMarker sets the Marker field's value. -func (s *DescribeUpdateActionsInput) SetMarker(v string) *DescribeUpdateActionsInput { - s.Marker = &v +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *GlobalReplicationGroup) SetCacheNodeType(v string) *GlobalReplicationGroup { + s.CacheNodeType = &v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeUpdateActionsInput) SetMaxRecords(v int64) *DescribeUpdateActionsInput { - s.MaxRecords = &v +// SetClusterEnabled sets the ClusterEnabled field's value. +func (s *GlobalReplicationGroup) SetClusterEnabled(v bool) *GlobalReplicationGroup { + s.ClusterEnabled = &v return s } -// SetReplicationGroupIds sets the ReplicationGroupIds field's value. -func (s *DescribeUpdateActionsInput) SetReplicationGroupIds(v []*string) *DescribeUpdateActionsInput { - s.ReplicationGroupIds = v +// SetEngine sets the Engine field's value. +func (s *GlobalReplicationGroup) SetEngine(v string) *GlobalReplicationGroup { + s.Engine = &v return s } -// SetServiceUpdateName sets the ServiceUpdateName field's value. -func (s *DescribeUpdateActionsInput) SetServiceUpdateName(v string) *DescribeUpdateActionsInput { - s.ServiceUpdateName = &v +// SetEngineVersion sets the EngineVersion field's value. +func (s *GlobalReplicationGroup) SetEngineVersion(v string) *GlobalReplicationGroup { + s.EngineVersion = &v return s } -// SetServiceUpdateStatus sets the ServiceUpdateStatus field's value. -func (s *DescribeUpdateActionsInput) SetServiceUpdateStatus(v []*string) *DescribeUpdateActionsInput { - s.ServiceUpdateStatus = v +// SetGlobalNodeGroups sets the GlobalNodeGroups field's value. +func (s *GlobalReplicationGroup) SetGlobalNodeGroups(v []*GlobalNodeGroup) *GlobalReplicationGroup { + s.GlobalNodeGroups = v return s } -// SetServiceUpdateTimeRange sets the ServiceUpdateTimeRange field's value. -func (s *DescribeUpdateActionsInput) SetServiceUpdateTimeRange(v *TimeRangeFilter) *DescribeUpdateActionsInput { - s.ServiceUpdateTimeRange = v +// SetGlobalReplicationGroupDescription sets the GlobalReplicationGroupDescription field's value. +func (s *GlobalReplicationGroup) SetGlobalReplicationGroupDescription(v string) *GlobalReplicationGroup { + s.GlobalReplicationGroupDescription = &v return s } -// SetShowNodeLevelUpdateStatus sets the ShowNodeLevelUpdateStatus field's value. -func (s *DescribeUpdateActionsInput) SetShowNodeLevelUpdateStatus(v bool) *DescribeUpdateActionsInput { - s.ShowNodeLevelUpdateStatus = &v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *GlobalReplicationGroup) SetGlobalReplicationGroupId(v string) *GlobalReplicationGroup { + s.GlobalReplicationGroupId = &v return s } -// SetUpdateActionStatus sets the UpdateActionStatus field's value. -func (s *DescribeUpdateActionsInput) SetUpdateActionStatus(v []*string) *DescribeUpdateActionsInput { - s.UpdateActionStatus = v +// SetMembers sets the Members field's value. +func (s *GlobalReplicationGroup) SetMembers(v []*GlobalReplicationGroupMember) *GlobalReplicationGroup { + s.Members = v return s } -type DescribeUpdateActionsOutput struct { +// SetStatus sets the Status field's value. +func (s *GlobalReplicationGroup) SetStatus(v string) *GlobalReplicationGroup { + s.Status = &v + return s +} + +// SetTransitEncryptionEnabled sets the TransitEncryptionEnabled field's value. +func (s *GlobalReplicationGroup) SetTransitEncryptionEnabled(v bool) *GlobalReplicationGroup { + s.TransitEncryptionEnabled = &v + return s +} + +// The name of the Global Datastore and role of this replication group in the +// Global Datastore. +type GlobalReplicationGroupInfo struct { _ struct{} `type:"structure"` - // An optional marker returned from a prior request. Use this marker for pagination - // of results from this operation. If this parameter is specified, the response - // includes only records beyond the marker, up to the value specified by MaxRecords. - Marker *string `type:"string"` + // The name of the Global Datastore + GlobalReplicationGroupId *string `type:"string"` - // Returns a list of update actions - UpdateActions []*UpdateAction `locationNameList:"UpdateAction" type:"list"` + // The role of the replication group in a Global Datastore. Can be primary or + // secondary. + GlobalReplicationGroupMemberRole *string `type:"string"` } // String returns the string representation -func (s DescribeUpdateActionsOutput) String() string { +func (s GlobalReplicationGroupInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeUpdateActionsOutput) GoString() string { +func (s GlobalReplicationGroupInfo) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeUpdateActionsOutput) SetMarker(v string) *DescribeUpdateActionsOutput { - s.Marker = &v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *GlobalReplicationGroupInfo) SetGlobalReplicationGroupId(v string) *GlobalReplicationGroupInfo { + s.GlobalReplicationGroupId = &v return s } -// SetUpdateActions sets the UpdateActions field's value. -func (s *DescribeUpdateActionsOutput) SetUpdateActions(v []*UpdateAction) *DescribeUpdateActionsOutput { - s.UpdateActions = v +// SetGlobalReplicationGroupMemberRole sets the GlobalReplicationGroupMemberRole field's value. +func (s *GlobalReplicationGroupInfo) SetGlobalReplicationGroupMemberRole(v string) *GlobalReplicationGroupInfo { + s.GlobalReplicationGroupMemberRole = &v return s } -// Provides ownership and status information for an Amazon EC2 security group. -type EC2SecurityGroup struct { +// A member of a Global Datastore. It contains the Replication Group Id, the +// AWS region and the role of the replication group. +type GlobalReplicationGroupMember struct { _ struct{} `type:"structure"` - // The name of the Amazon EC2 security group. - EC2SecurityGroupName *string `type:"string"` + // Indicates whether automatic failover is enabled for the replication group. + AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` - // The AWS account ID of the Amazon EC2 security group owner. - EC2SecurityGroupOwnerId *string `type:"string"` + // The replication group id of the Global Datastore member. + ReplicationGroupId *string `type:"string"` - // The status of the Amazon EC2 security group. + // The AWS region of the Global Datastore member. + ReplicationGroupRegion *string `type:"string"` + + // Indicates the role of the replication group, primary or secondary. + Role *string `type:"string"` + + // The status of the membership of the replication group. Status *string `type:"string"` } // String returns the string representation -func (s EC2SecurityGroup) String() string { +func (s GlobalReplicationGroupMember) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EC2SecurityGroup) GoString() string { +func (s GlobalReplicationGroupMember) GoString() string { return s.String() } -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupName(v string) *EC2SecurityGroup { - s.EC2SecurityGroupName = &v +// SetAutomaticFailover sets the AutomaticFailover field's value. +func (s *GlobalReplicationGroupMember) SetAutomaticFailover(v string) *GlobalReplicationGroupMember { + s.AutomaticFailover = &v return s } -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *EC2SecurityGroup) SetEC2SecurityGroupOwnerId(v string) *EC2SecurityGroup { - s.EC2SecurityGroupOwnerId = &v +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *GlobalReplicationGroupMember) SetReplicationGroupId(v string) *GlobalReplicationGroupMember { + s.ReplicationGroupId = &v return s } -// SetStatus sets the Status field's value. -func (s *EC2SecurityGroup) SetStatus(v string) *EC2SecurityGroup { - s.Status = &v +// SetReplicationGroupRegion sets the ReplicationGroupRegion field's value. +func (s *GlobalReplicationGroupMember) SetReplicationGroupRegion(v string) *GlobalReplicationGroupMember { + s.ReplicationGroupRegion = &v return s } -// Represents the information required for client programs to connect to a cache -// node. -type Endpoint struct { - _ struct{} `type:"structure"` - - // The DNS hostname of the cache node. - Address *string `type:"string"` - - // The port number that the cache engine is listening on. - Port *int64 `type:"integer"` -} - -// String returns the string representation -func (s Endpoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s Endpoint) GoString() string { - return s.String() -} - -// SetAddress sets the Address field's value. -func (s *Endpoint) SetAddress(v string) *Endpoint { - s.Address = &v +// SetRole sets the Role field's value. +func (s *GlobalReplicationGroupMember) SetRole(v string) *GlobalReplicationGroupMember { + s.Role = &v return s } -// SetPort sets the Port field's value. -func (s *Endpoint) SetPort(v int64) *Endpoint { - s.Port = &v +// SetStatus sets the Status field's value. +func (s *GlobalReplicationGroupMember) SetStatus(v string) *GlobalReplicationGroupMember { + s.Status = &v return s } -// Represents the output of a DescribeEngineDefaultParameters operation. -type EngineDefaults struct { +type IncreaseNodeGroupsInGlobalReplicationGroupInput struct { _ struct{} `type:"structure"` - // A list of parameters specific to a particular cache node type. Each element - // in the list contains detailed information about one parameter. - CacheNodeTypeSpecificParameters []*CacheNodeTypeSpecificParameter `locationNameList:"CacheNodeTypeSpecificParameter" type:"list"` + // Indicates that the process begins immediately. At present, the only permitted + // value for this parameter is true. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` - // Specifies the name of the cache parameter group family to which the engine - // default parameters apply. + // The name of the Global Datastore // - // Valid values are: memcached1.4 | memcached1.5 | redis2.6 | redis2.8 | redis3.2 - // | redis4.0 | redis5.0 | - CacheParameterGroupFamily *string `type:"string"` + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` - // Provides an identifier to allow retrieval of paginated results. - Marker *string `type:"string"` + // The number of node groups you wish to add + // + // NodeGroupCount is a required field + NodeGroupCount *int64 `type:"integer" required:"true"` - // Contains a list of engine default parameters. - Parameters []*Parameter `locationNameList:"Parameter" type:"list"` + // Describes the replication group IDs, the AWS regions where they are stored + // and the shard configuration for each that comprise the Global Datastore + RegionalConfigurations []*RegionalConfiguration `locationNameList:"RegionalConfiguration" type:"list"` } // String returns the string representation -func (s EngineDefaults) String() string { +func (s IncreaseNodeGroupsInGlobalReplicationGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EngineDefaults) GoString() string { +func (s IncreaseNodeGroupsInGlobalReplicationGroupInput) GoString() string { return s.String() } -// SetCacheNodeTypeSpecificParameters sets the CacheNodeTypeSpecificParameters field's value. -func (s *EngineDefaults) SetCacheNodeTypeSpecificParameters(v []*CacheNodeTypeSpecificParameter) *EngineDefaults { - s.CacheNodeTypeSpecificParameters = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *IncreaseNodeGroupsInGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IncreaseNodeGroupsInGlobalReplicationGroupInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + if s.NodeGroupCount == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupCount")) + } + if s.RegionalConfigurations != nil { + for i, v := range s.RegionalConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RegionalConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *IncreaseNodeGroupsInGlobalReplicationGroupInput) SetApplyImmediately(v bool) *IncreaseNodeGroupsInGlobalReplicationGroupInput { + s.ApplyImmediately = &v return s } -// SetCacheParameterGroupFamily sets the CacheParameterGroupFamily field's value. -func (s *EngineDefaults) SetCacheParameterGroupFamily(v string) *EngineDefaults { - s.CacheParameterGroupFamily = &v +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *IncreaseNodeGroupsInGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *IncreaseNodeGroupsInGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v return s } -// SetMarker sets the Marker field's value. -func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { - s.Marker = &v +// SetNodeGroupCount sets the NodeGroupCount field's value. +func (s *IncreaseNodeGroupsInGlobalReplicationGroupInput) SetNodeGroupCount(v int64) *IncreaseNodeGroupsInGlobalReplicationGroupInput { + s.NodeGroupCount = &v return s } -// SetParameters sets the Parameters field's value. -func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { - s.Parameters = v +// SetRegionalConfigurations sets the RegionalConfigurations field's value. +func (s *IncreaseNodeGroupsInGlobalReplicationGroupInput) SetRegionalConfigurations(v []*RegionalConfiguration) *IncreaseNodeGroupsInGlobalReplicationGroupInput { + s.RegionalConfigurations = v return s } -// Represents a single occurrence of something interesting within the system. -// Some examples of events are creating a cluster, adding or removing a cache -// node, or rebooting a node. -type Event struct { +type IncreaseNodeGroupsInGlobalReplicationGroupOutput struct { _ struct{} `type:"structure"` - // The date and time when the event occurred. - Date *time.Time `type:"timestamp"` - - // The text of the event. - Message *string `type:"string"` - - // The identifier for the source of the event. For example, if the event occurred - // at the cluster level, the identifier would be the name of the cluster. - SourceIdentifier *string `type:"string"` - - // Specifies the origin of this event - a cluster, a parameter group, a security - // group, etc. - SourceType *string `type:"string" enum:"SourceType"` + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` } // String returns the string representation -func (s Event) String() string { +func (s IncreaseNodeGroupsInGlobalReplicationGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Event) GoString() string { +func (s IncreaseNodeGroupsInGlobalReplicationGroupOutput) GoString() string { return s.String() } -// SetDate sets the Date field's value. -func (s *Event) SetDate(v time.Time) *Event { - s.Date = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Event) SetMessage(v string) *Event { - s.Message = &v - return s -} - -// SetSourceIdentifier sets the SourceIdentifier field's value. -func (s *Event) SetSourceIdentifier(v string) *Event { - s.SourceIdentifier = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *Event) SetSourceType(v string) *Event { - s.SourceType = &v +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *IncreaseNodeGroupsInGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *IncreaseNodeGroupsInGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v return s } @@ -11111,11 +12971,9 @@ type ListAllowedNodeTypeModificationsOutput struct { _ struct{} `type:"structure"` // A string list, each element of which specifies a cache node type which you - // can use to scale your cluster or replication group. - // - // When scaling down on a Redis cluster or replication group using ModifyCacheCluster - // or ModifyReplicationGroup, use a value from this list for the CacheNodeType - // parameter. + // can use to scale your cluster or replication group. When scaling down a Redis + // cluster or replication group using ModifyCacheCluster or ModifyReplicationGroup, + // use a value from this list for the CacheNodeType parameter. ScaleDownModifications []*string `type:"list"` // A string list, each element of which specifies a cache node type which you @@ -11737,6 +13595,127 @@ func (s *ModifyCacheSubnetGroupOutput) SetCacheSubnetGroup(v *CacheSubnetGroup) return s } +type ModifyGlobalReplicationGroupInput struct { + _ struct{} `type:"structure"` + + // This parameter causes the modifications in this request and any pending modifications + // to be applied, asynchronously and as soon as possible. Modifications to Global + // Replication Groups cannot be requested to be applied in PreferredMaintenceWindow. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // Determines whether a read replica is automatically promoted to read/write + // primary if the existing primary encounters a failure. + AutomaticFailoverEnabled *bool `type:"boolean"` + + // A valid cache node type that you want to scale this Global Datastore to. + CacheNodeType *string `type:"string"` + + // The upgraded version of the cache engine to be run on the clusters in the + // Global Datastore. + EngineVersion *string `type:"string"` + + // A description of the Global Datastore + GlobalReplicationGroupDescription *string `type:"string"` + + // The name of the Global Datastore + // + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyGlobalReplicationGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyGlobalReplicationGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyGlobalReplicationGroupInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *ModifyGlobalReplicationGroupInput) SetApplyImmediately(v bool) *ModifyGlobalReplicationGroupInput { + s.ApplyImmediately = &v + return s +} + +// SetAutomaticFailoverEnabled sets the AutomaticFailoverEnabled field's value. +func (s *ModifyGlobalReplicationGroupInput) SetAutomaticFailoverEnabled(v bool) *ModifyGlobalReplicationGroupInput { + s.AutomaticFailoverEnabled = &v + return s +} + +// SetCacheNodeType sets the CacheNodeType field's value. +func (s *ModifyGlobalReplicationGroupInput) SetCacheNodeType(v string) *ModifyGlobalReplicationGroupInput { + s.CacheNodeType = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *ModifyGlobalReplicationGroupInput) SetEngineVersion(v string) *ModifyGlobalReplicationGroupInput { + s.EngineVersion = &v + return s +} + +// SetGlobalReplicationGroupDescription sets the GlobalReplicationGroupDescription field's value. +func (s *ModifyGlobalReplicationGroupInput) SetGlobalReplicationGroupDescription(v string) *ModifyGlobalReplicationGroupInput { + s.GlobalReplicationGroupDescription = &v + return s +} + +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *ModifyGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *ModifyGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v + return s +} + +type ModifyGlobalReplicationGroupOutput struct { + _ struct{} `type:"structure"` + + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s ModifyGlobalReplicationGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyGlobalReplicationGroupOutput) GoString() string { + return s.String() +} + +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *ModifyGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *ModifyGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v + return s +} + // Represents the input of a ModifyReplicationGroups operation. type ModifyReplicationGroupInput struct { _ struct{} `type:"structure"` @@ -13031,6 +15010,87 @@ func (s *PurchaseReservedCacheNodesOfferingOutput) SetReservedCacheNode(v *Reser return s } +type RebalanceSlotsInGlobalReplicationGroupInput struct { + _ struct{} `type:"structure"` + + // If True, redistribution is applied immediately. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // The name of the Global Datastore + // + // GlobalReplicationGroupId is a required field + GlobalReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RebalanceSlotsInGlobalReplicationGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebalanceSlotsInGlobalReplicationGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebalanceSlotsInGlobalReplicationGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebalanceSlotsInGlobalReplicationGroupInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.GlobalReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *RebalanceSlotsInGlobalReplicationGroupInput) SetApplyImmediately(v bool) *RebalanceSlotsInGlobalReplicationGroupInput { + s.ApplyImmediately = &v + return s +} + +// SetGlobalReplicationGroupId sets the GlobalReplicationGroupId field's value. +func (s *RebalanceSlotsInGlobalReplicationGroupInput) SetGlobalReplicationGroupId(v string) *RebalanceSlotsInGlobalReplicationGroupInput { + s.GlobalReplicationGroupId = &v + return s +} + +type RebalanceSlotsInGlobalReplicationGroupOutput struct { + _ struct{} `type:"structure"` + + // Consists of a primary cluster that accepts writes and an associated secondary + // cluster that resides in a different AWS region. The secondary cluster accepts + // only reads. The primary cluster automatically replicates updates to the secondary + // cluster. + // + // * The GlobalReplicationGroupIdSuffix represents the name of the Global + // Datastore, which is what you use to associate a secondary cluster. + GlobalReplicationGroup *GlobalReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s RebalanceSlotsInGlobalReplicationGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebalanceSlotsInGlobalReplicationGroupOutput) GoString() string { + return s.String() +} + +// SetGlobalReplicationGroup sets the GlobalReplicationGroup field's value. +func (s *RebalanceSlotsInGlobalReplicationGroupOutput) SetGlobalReplicationGroup(v *GlobalReplicationGroup) *RebalanceSlotsInGlobalReplicationGroupOutput { + s.GlobalReplicationGroup = v + return s +} + // Represents the input of a RebootCacheCluster operation. type RebootCacheClusterInput struct { _ struct{} `type:"structure"` @@ -13142,6 +15202,84 @@ func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge return s } +// A list of the replication groups +type RegionalConfiguration struct { + _ struct{} `type:"structure"` + + // The name of the secondary cluster + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` + + // The AWS region where the cluster is stored + // + // ReplicationGroupRegion is a required field + ReplicationGroupRegion *string `type:"string" required:"true"` + + // A list of PreferredAvailabilityZones objects that specifies the configuration + // of a node group in the resharded cluster. + // + // ReshardingConfiguration is a required field + ReshardingConfiguration []*ReshardingConfiguration `locationNameList:"ReshardingConfiguration" type:"list" required:"true"` +} + +// String returns the string representation +func (s RegionalConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegionalConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegionalConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegionalConfiguration"} + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.ReplicationGroupRegion == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupRegion")) + } + if s.ReshardingConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("ReshardingConfiguration")) + } + if s.ReshardingConfiguration != nil { + for i, v := range s.ReshardingConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReshardingConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *RegionalConfiguration) SetReplicationGroupId(v string) *RegionalConfiguration { + s.ReplicationGroupId = &v + return s +} + +// SetReplicationGroupRegion sets the ReplicationGroupRegion field's value. +func (s *RegionalConfiguration) SetReplicationGroupRegion(v string) *RegionalConfiguration { + s.ReplicationGroupRegion = &v + return s +} + +// SetReshardingConfiguration sets the ReshardingConfiguration field's value. +func (s *RegionalConfiguration) SetReshardingConfiguration(v []*ReshardingConfiguration) *RegionalConfiguration { + s.ReshardingConfiguration = v + return s +} + // Represents the input of a RemoveTagsFromResource operation. type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` @@ -13255,6 +15393,10 @@ type ReplicationGroup struct { // The user supplied description of the replication group. Description *string `type:"string"` + // The name of the Global Datastore and role of this replication group in the + // Global Datastore. + GlobalReplicationGroupInfo *GlobalReplicationGroupInfo `type:"structure"` + // The ID of the KMS key used to encrypt the disk in the cluster. KmsKeyId *string `type:"string"` @@ -13372,6 +15514,12 @@ func (s *ReplicationGroup) SetDescription(v string) *ReplicationGroup { return s } +// SetGlobalReplicationGroupInfo sets the GlobalReplicationGroupInfo field's value. +func (s *ReplicationGroup) SetGlobalReplicationGroupInfo(v *GlobalReplicationGroupInfo) *ReplicationGroup { + s.GlobalReplicationGroupInfo = v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *ReplicationGroup) SetKmsKeyId(v string) *ReplicationGroup { s.KmsKeyId = &v @@ -13511,11 +15659,11 @@ type ReservedCacheNode struct { // * General purpose: Current generation: M5 node types: cache.m5.large, // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge // // * Compute optimized: Previous generation: (not recommended) C1 node types: // cache.c1.xlarge @@ -13677,11 +15825,11 @@ type ReservedCacheNodesOffering struct { // * General purpose: Current generation: M5 node types: cache.m5.large, // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge // // * Compute optimized: Previous generation: (not recommended) C1 node types: // cache.c1.xlarge @@ -14241,11 +16389,11 @@ type Snapshot struct { // * General purpose: Current generation: M5 node types: cache.m5.large, // cache.m5.xlarge, cache.m5.2xlarge, cache.m5.4xlarge, cache.m5.12xlarge, // cache.m5.24xlarge M4 node types: cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, - // cache.m4.4xlarge, cache.m4.10xlarge T2 node types: cache.t2.micro, cache.t2.small, - // cache.t2.medium Previous generation: (not recommended) T1 node types: - // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, - // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, - // cache.m3.2xlarge + // cache.m4.4xlarge, cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // Previous generation: (not recommended) T1 node types: cache.t1.micro M1 + // node types: cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge + // M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge // // * Compute optimized: Previous generation: (not recommended) C1 node types: // cache.c1.xlarge @@ -15209,4 +17357,13 @@ const ( // UpdateActionStatusComplete is a UpdateActionStatus enum value UpdateActionStatusComplete = "complete" + + // UpdateActionStatusScheduling is a UpdateActionStatus enum value + UpdateActionStatusScheduling = "scheduling" + + // UpdateActionStatusScheduled is a UpdateActionStatus enum value + UpdateActionStatusScheduled = "scheduled" + + // UpdateActionStatusNotApplicable is a UpdateActionStatus enum value + UpdateActionStatusNotApplicable = "not-applicable" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go index 25579b1d5d6..4e78aa9320e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go @@ -117,6 +117,18 @@ const ( // of clusters per customer. ErrCodeClusterQuotaForCustomerExceededFault = "ClusterQuotaForCustomerExceeded" + // ErrCodeGlobalReplicationGroupAlreadyExistsFault for service response error code + // "GlobalReplicationGroupAlreadyExistsFault". + // + // The Global Datastore name already exists. + ErrCodeGlobalReplicationGroupAlreadyExistsFault = "GlobalReplicationGroupAlreadyExistsFault" + + // ErrCodeGlobalReplicationGroupNotFoundFault for service response error code + // "GlobalReplicationGroupNotFoundFault". + // + // The Global Datastore does not exist + ErrCodeGlobalReplicationGroupNotFoundFault = "GlobalReplicationGroupNotFoundFault" + // ErrCodeInsufficientCacheClusterCapacityFault for service response error code // "InsufficientCacheClusterCapacity". // @@ -150,6 +162,12 @@ const ( // The current state of the cache security group does not allow deletion. ErrCodeInvalidCacheSecurityGroupStateFault = "InvalidCacheSecurityGroupState" + // ErrCodeInvalidGlobalReplicationGroupStateFault for service response error code + // "InvalidGlobalReplicationGroupState". + // + // The Global Datastore is not available or in primary-only state. + ErrCodeInvalidGlobalReplicationGroupStateFault = "InvalidGlobalReplicationGroupState" + // ErrCodeInvalidKMSKeyFault for service response error code // "InvalidKMSKeyFault". // 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 2e91780c444..0a41523adeb 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 @@ -479,8 +479,8 @@ func (c *ElasticBeanstalk) CreateApplicationVersionRequest(input *CreateApplicat // Omit both SourceBuildInformation and SourceBundle to use the default sample // application. // -// Once you create an application version with a specified Amazon S3 bucket -// and key location, you cannot change that Amazon S3 location. If you change +// After you create an application version with a specified Amazon S3 bucket +// and key location, you can't change that Amazon S3 location. If you change // the Amazon S3 location, you receive an exception when you attempt to launch // an environment from the application version. // @@ -581,9 +581,11 @@ func (c *ElasticBeanstalk) CreateConfigurationTemplateRequest(input *CreateConfi // CreateConfigurationTemplate API operation for AWS Elastic Beanstalk. // -// Creates a configuration template. Templates are associated with a specific -// application and are used to deploy different versions of the application -// with the same configuration settings. +// Creates an AWS Elastic Beanstalk configuration template, associated with +// a specific Elastic Beanstalk application. You define application configuration +// settings in a configuration template. You can then use the configuration +// template to deploy different versions of the application with the same configuration +// settings. // // Templates aren't associated with any environment. The EnvironmentName response // element is always null. @@ -680,8 +682,8 @@ func (c *ElasticBeanstalk) CreateEnvironmentRequest(input *CreateEnvironmentInpu // CreateEnvironment API operation for AWS Elastic Beanstalk. // -// Launches an environment for the specified application using the specified -// configuration. +// Launches an AWS Elastic Beanstalk environment for the specified application +// using the specified 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 @@ -2406,7 +2408,11 @@ func (c *ElasticBeanstalk) DescribePlatformVersionRequest(input *DescribePlatfor // DescribePlatformVersion API operation for AWS Elastic Beanstalk. // -// Describes the version of the platform. +// Describes a platform version. Provides full details. Compare to ListPlatformVersions, +// which provides summary information about a list of platform versions. +// +// For definitions of platform version and other platform-related terms, see +// AWS Elastic Beanstalk Platforms Glossary (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-glossary.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 @@ -2520,6 +2526,142 @@ func (c *ElasticBeanstalk) ListAvailableSolutionStacksWithContext(ctx aws.Contex return out, req.Send() } +const opListPlatformBranches = "ListPlatformBranches" + +// ListPlatformBranchesRequest generates a "aws/request.Request" representing the +// client's request for the ListPlatformBranches operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPlatformBranches for more information on using the ListPlatformBranches +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPlatformBranchesRequest method. +// req, resp := client.ListPlatformBranchesRequest(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/ListPlatformBranches +func (c *ElasticBeanstalk) ListPlatformBranchesRequest(input *ListPlatformBranchesInput) (req *request.Request, output *ListPlatformBranchesOutput) { + op := &request.Operation{ + Name: opListPlatformBranches, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPlatformBranchesInput{} + } + + output = &ListPlatformBranchesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPlatformBranches API operation for AWS Elastic Beanstalk. +// +// Lists the platform branches available for your account in an AWS Region. +// Provides summary information about each platform branch. +// +// For definitions of platform branch and other platform-related terms, see +// AWS Elastic Beanstalk Platforms Glossary (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-glossary.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elastic Beanstalk's +// API operation ListPlatformBranches for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ListPlatformBranches +func (c *ElasticBeanstalk) ListPlatformBranches(input *ListPlatformBranchesInput) (*ListPlatformBranchesOutput, error) { + req, out := c.ListPlatformBranchesRequest(input) + return out, req.Send() +} + +// ListPlatformBranchesWithContext is the same as ListPlatformBranches with the addition of +// the ability to pass a context and additional request options. +// +// See ListPlatformBranches for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the 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) ListPlatformBranchesWithContext(ctx aws.Context, input *ListPlatformBranchesInput, opts ...request.Option) (*ListPlatformBranchesOutput, error) { + req, out := c.ListPlatformBranchesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPlatformBranchesPages iterates over the pages of a ListPlatformBranches operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPlatformBranches 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 ListPlatformBranches operation. +// pageNum := 0 +// err := client.ListPlatformBranchesPages(params, +// func(page *elasticbeanstalk.ListPlatformBranchesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticBeanstalk) ListPlatformBranchesPages(input *ListPlatformBranchesInput, fn func(*ListPlatformBranchesOutput, bool) bool) error { + return c.ListPlatformBranchesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPlatformBranchesPagesWithContext same as ListPlatformBranchesPages 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 *ElasticBeanstalk) ListPlatformBranchesPagesWithContext(ctx aws.Context, input *ListPlatformBranchesInput, fn func(*ListPlatformBranchesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPlatformBranchesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPlatformBranchesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListPlatformBranchesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListPlatformVersions = "ListPlatformVersions" // ListPlatformVersionsRequest generates a "aws/request.Request" representing the @@ -2564,7 +2706,12 @@ func (c *ElasticBeanstalk) ListPlatformVersionsRequest(input *ListPlatformVersio // ListPlatformVersions API operation for AWS Elastic Beanstalk. // -// Lists the available platforms. +// Lists the platform versions available for your account in an AWS Region. +// Provides summary information about each platform version. Compare to DescribePlatformVersion, +// which provides full details about a single platform version. +// +// For definitions of platform version and other platform-related terms, see +// AWS Elastic Beanstalk Platforms Glossary (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-glossary.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 @@ -2647,12 +2794,11 @@ func (c *ElasticBeanstalk) ListTagsForResourceRequest(input *ListTagsForResource // ListTagsForResource API operation for AWS Elastic Beanstalk. // -// Returns the tags applied to an AWS Elastic Beanstalk resource. The response +// Return the tags applied to an AWS Elastic Beanstalk resource. The response // contains a list of tag key-value pairs. // -// Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. -// For details about environment tagging, see Tagging Resources in Your Elastic -// Beanstalk Environment (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.tagging.html). +// Elastic Beanstalk supports tagging of all of its resources. For details about +// resource tagging, see Tagging Application Resources (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-tagging-resources.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 @@ -3641,9 +3787,8 @@ func (c *ElasticBeanstalk) UpdateTagsForResourceRequest(input *UpdateTagsForReso // Update the list of tags applied to an AWS Elastic Beanstalk resource. Two // lists can be passed: TagsToAdd for tags to add or update, and TagsToRemove. // -// Currently, Elastic Beanstalk only supports tagging of Elastic Beanstalk environments. -// For details about environment tagging, see Tagging Resources in Your Elastic -// Beanstalk Environment (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.tagging.html). +// Elastic Beanstalk supports tagging of all of its resources. For details about +// resource tagging, see Tagging Application Resources (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-tagging-resources.html). // // If you create a custom IAM user policy to control permission to this operation, // specify one of the following two virtual actions (or both) instead of the @@ -4031,8 +4176,8 @@ func (s *ApplicationMetrics) SetStatusCodes(v *StatusCodes) *ApplicationMetrics // The resource lifecycle configuration for an application. Defines lifecycle // settings for resources that belong to the application, and the service role -// that Elastic Beanstalk assumes in order to apply lifecycle settings. The -// version lifecycle configuration defines lifecycle settings for application +// that AWS Elastic Beanstalk assumes in order to apply lifecycle settings. +// The version lifecycle configuration defines lifecycle settings for application // versions. type ApplicationResourceLifecycleConfig struct { _ struct{} `type:"structure"` @@ -4048,7 +4193,7 @@ type ApplicationResourceLifecycleConfig struct { // Role to another value. ServiceRole *string `type:"string"` - // The application version lifecycle configuration. + // Defines lifecycle settings for application versions. VersionLifecycleConfig *ApplicationVersionLifecycleConfig `type:"structure"` } @@ -4955,19 +5100,20 @@ func (s *ConfigurationOptionDescription) SetValueType(v string) *ConfigurationOp } // A specification identifying an individual configuration option along with -// its current value. For a list of possible option values, go to Option Values -// (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html) +// its current value. For a list of possible namespaces and option values, see +// Option Values (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html) // in the AWS Elastic Beanstalk Developer Guide. type ConfigurationOptionSetting struct { _ struct{} `type:"structure"` - // A unique namespace identifying the option's associated AWS resource. + // A unique namespace that identifies the option's associated AWS resource. Namespace *string `type:"string"` // The name of the configuration option. OptionName *string `type:"string"` - // A unique resource name for a time-based scaling configuration option. + // A unique resource name for the option setting. Use it for a time–based + // scaling configuration option. ResourceName *string `min:"1" type:"string"` // The current value for the configuration option. @@ -5058,7 +5204,7 @@ type ConfigurationSettingsDescription struct { // set. OptionSettings []*ConfigurationOptionSetting `type:"list"` - // The ARN of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` // The name of the solution stack this configuration set uses. @@ -5143,19 +5289,16 @@ func (s *ConfigurationSettingsDescription) SetTemplateName(v string) *Configurat type CreateApplicationInput struct { _ struct{} `type:"structure"` - // The name of the application. - // - // Constraint: This name must be unique within your account. If the specified - // name already exists, the action returns an InvalidParameterValue error. + // The name of the application. Must be unique within your account. // // ApplicationName is a required field ApplicationName *string `min:"1" type:"string" required:"true"` - // Describes the application. + // Your description of the application. Description *string `type:"string"` - // Specify an application resource lifecycle configuration to prevent your application - // from accumulating too many versions. + // Specifies an application resource lifecycle configuration to prevent your + // application from accumulating too many versions. ResourceLifecycleConfig *ApplicationResourceLifecycleConfig `type:"structure"` // Specifies the tags applied to the application. @@ -5246,7 +5389,7 @@ type CreateApplicationVersionInput struct { // Settings for an AWS CodeBuild build. BuildConfiguration *BuildConfiguration `type:"structure"` - // Describes this version. + // A description of this application version. Description *string `type:"string"` // Pre-processes and validates the environment manifest (env.yaml) and configuration @@ -5403,54 +5546,62 @@ func (s *CreateApplicationVersionInput) SetVersionLabel(v string) *CreateApplica type CreateConfigurationTemplateInput struct { _ struct{} `type:"structure"` - // The name of the application to associate with this configuration template. - // If no application is found with this name, AWS Elastic Beanstalk returns - // an InvalidParameterValue error. + // The name of the Elastic Beanstalk application to associate with this configuration + // template. // // ApplicationName is a required field ApplicationName *string `min:"1" type:"string" required:"true"` - // Describes this configuration. + // An optional description for this configuration. Description *string `type:"string"` - // The ID of the environment used with this configuration template. + // The ID of an environment whose settings you want to use to create the configuration + // template. You must specify EnvironmentId if you don't specify PlatformArn, + // SolutionStackName, or SourceConfiguration. EnvironmentId *string `type:"string"` - // If specified, AWS Elastic Beanstalk sets the specified configuration option - // to the requested value. The new value overrides the value obtained from the - // solution stack or the source configuration template. + // Option values for the Elastic Beanstalk configuration, such as the instance + // type. If specified, these values override the values obtained from the solution + // stack or the source configuration template. For a complete list of Elastic + // Beanstalk configuration options, see Option Values (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html) + // in the AWS Elastic Beanstalk Developer Guide. OptionSettings []*ConfigurationOptionSetting `type:"list"` - // The ARN of the custom platform. + // The Amazon Resource Name (ARN) of the custom platform. For more information, + // see Custom Platforms (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html) + // in the AWS Elastic Beanstalk Developer Guide. + // + // If you specify PlatformArn, then don't specify SolutionStackName. PlatformArn *string `type:"string"` - // The name of the solution stack used by this configuration. The solution stack - // specifies the operating system, architecture, and application server for - // a configuration template. It determines the set of configuration options - // as well as the possible and default values. + // The name of an Elastic Beanstalk solution stack (platform version) that this + // configuration uses. For example, 64bit Amazon Linux 2013.09 running Tomcat + // 7 Java 7. A solution stack specifies the operating system, runtime, and application + // server for a configuration template. It also determines the set of configuration + // options as well as the possible and default values. For more information, + // see Supported Platforms (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html) + // in the AWS Elastic Beanstalk Developer Guide. // - // Use ListAvailableSolutionStacks to obtain a list of available solution stacks. + // You must specify SolutionStackName if you don't specify PlatformArn, EnvironmentId, + // or SourceConfiguration. // - // A solution stack name or a source configuration parameter must be specified, - // otherwise AWS Elastic Beanstalk returns an InvalidParameterValue error. - // - // If a solution stack name is not specified and the source configuration parameter - // is specified, AWS Elastic Beanstalk uses the same solution stack as the source - // configuration template. + // Use the ListAvailableSolutionStacks (https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_ListAvailableSolutionStacks.html) + // API to obtain a list of available solution stacks. SolutionStackName *string `type:"string"` - // If specified, AWS Elastic Beanstalk uses the configuration values from the - // specified configuration template to create a new configuration. + // An Elastic Beanstalk configuration template to base this one on. If specified, + // Elastic Beanstalk uses the configuration values from the specified configuration + // template to create a new configuration. // - // Values specified in the OptionSettings parameter of this call overrides any - // values obtained from the SourceConfiguration. + // Values specified in OptionSettings override any values obtained from the + // SourceConfiguration. // - // If no configuration template is found, returns an InvalidParameterValue error. + // You must specify SourceConfiguration if you don't specify PlatformArn, EnvironmentId, + // or SolutionStackName. // - // Constraint: If both the solution stack name parameter and the source configuration - // parameters are specified, the solution stack of the source configuration - // template must match the specified solution stack name or else AWS Elastic - // Beanstalk returns an InvalidParameterCombination error. + // Constraint: If both solution stack name and source configuration are specified, + // the solution stack of the source configuration template must match the specified + // solution stack name. SourceConfiguration *SourceConfiguration `type:"structure"` // Specifies the tags applied to the configuration template. @@ -5460,9 +5611,6 @@ type CreateConfigurationTemplateInput struct { // // Constraint: This name must be unique per application. // - // Default: If a configuration template already exists with this name, AWS Elastic - // Beanstalk returns an InvalidParameterValue error. - // // TemplateName is a required field TemplateName *string `min:"1" type:"string" required:"true"` } @@ -5581,31 +5729,29 @@ func (s *CreateConfigurationTemplateInput) SetTemplateName(v string) *CreateConf type CreateEnvironmentInput struct { _ struct{} `type:"structure"` - // The name of the application that contains the version to be deployed. - // - // If no application is found with this name, CreateEnvironment returns an InvalidParameterValue - // error. + // The name of the application that is associated with this environment. // // ApplicationName is a required field ApplicationName *string `min:"1" type:"string" required:"true"` // If specified, the environment attempts to use this value as the prefix for - // the CNAME. If not specified, the CNAME is generated automatically by appending - // a random alphanumeric string to the environment name. + // the CNAME in your Elastic Beanstalk environment URL. If not specified, the + // CNAME is generated automatically by appending a random alphanumeric string + // to the environment name. CNAMEPrefix *string `min:"4" type:"string"` - // Describes this environment. + // Your description for this environment. Description *string `type:"string"` - // A unique name for the deployment environment. Used in the application URL. + // A unique name for the environment. // // Constraint: Must be from 4 to 40 characters in length. The name can contain - // only letters, numbers, and hyphens. It cannot start or end with a hyphen. + // only letters, numbers, and hyphens. It can't start or end with a hyphen. // This name must be unique within a region in your account. If the specified - // name already exists in the region, AWS Elastic Beanstalk returns an InvalidParameterValue + // name already exists in the region, Elastic Beanstalk returns an InvalidParameterValue // error. // - // Default: If the CNAME parameter is not specified, the environment name becomes + // If you don't specify the CNAMEPrefix parameter, the environment name becomes // part of the CNAME, and therefore part of the visible URL for your application. EnvironmentName *string `min:"4" type:"string"` @@ -5626,35 +5772,42 @@ type CreateEnvironmentInput struct { // set for this new environment. OptionsToRemove []*OptionSpecification `type:"list"` - // The ARN of the platform. + // The Amazon Resource Name (ARN) of the custom platform to use with the environment. + // For more information, see Custom Platforms (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html) + // in the AWS Elastic Beanstalk Developer Guide. + // + // If you specify PlatformArn, don't specify SolutionStackName. PlatformArn *string `type:"string"` - // This is an alternative to specifying a template name. If specified, AWS Elastic - // Beanstalk sets the configuration values to the default values associated - // with the specified solution stack. - // + // The name of an Elastic Beanstalk solution stack (platform version) to use + // with the environment. If specified, Elastic Beanstalk sets the configuration + // values to the default values associated with the specified solution stack. // For a list of current solution stacks, see Elastic Beanstalk Supported Platforms - // (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html). + // (https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html) + // in the AWS Elastic Beanstalk Platforms guide. + // + // If you specify SolutionStackName, don't specify PlatformArn or TemplateName. SolutionStackName *string `type:"string"` // Specifies the tags applied to resources in the environment. Tags []*Tag `type:"list"` - // The name of the configuration template to use in deployment. If no configuration - // template is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue - // error. + // The name of the Elastic Beanstalk configuration template to use with the + // environment. + // + // If you specify TemplateName, then don't specify SolutionStackName. TemplateName *string `min:"1" type:"string"` - // This specifies the tier to use for creating this environment. + // Specifies the tier to use in creating this environment. The environment tier + // that you choose determines whether Elastic Beanstalk provisions resources + // to support a web application that handles HTTP(S) requests or a web application + // that handles background-processing tasks. Tier *EnvironmentTier `type:"structure"` // The name of the application version to deploy. // - // If the specified application has no associated application versions, AWS - // Elastic Beanstalk UpdateEnvironment returns an InvalidParameterValue error. - // - // Default: If not specified, AWS Elastic Beanstalk attempts to launch the sample - // application in the container. + // Default: If not specified, Elastic Beanstalk attempts to deploy the sample + // application. VersionLabel *string `min:"1" type:"string"` } @@ -6735,7 +6888,7 @@ type DescribeConfigurationOptionsOutput struct { // A list of ConfigurationOptionDescription. Options []*ConfigurationOptionDescription `type:"list"` - // The ARN of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` // The name of the solution stack these configuration options belong to. @@ -7415,7 +7568,9 @@ type DescribeEventsInput struct { // Pagination token. If specified, the events return the next batch of results. NextToken *string `type:"string"` - // The ARN of the version of the custom platform. + // The ARN of a custom platform version. If specified, AWS Elastic Beanstalk + // restricts the returned descriptions to those associated with this custom + // platform version. PlatformArn *string `type:"string"` // If specified, AWS Elastic Beanstalk restricts the described events to include @@ -7698,7 +7853,7 @@ func (s *DescribeInstancesHealthOutput) SetRefreshedAt(v time.Time) *DescribeIns type DescribePlatformVersionInput struct { _ struct{} `type:"structure"` - // The ARN of the version of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` } @@ -7721,7 +7876,7 @@ func (s *DescribePlatformVersionInput) SetPlatformArn(v string) *DescribePlatfor type DescribePlatformVersionOutput struct { _ struct{} `type:"structure"` - // Detailed information about the version of the platform. + // Detailed information about the platform version. PlatformDescription *PlatformDescription `type:"structure"` } @@ -7807,7 +7962,7 @@ type EnvironmentDescription struct { // For more information, see Health Colors and Statuses (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html). HealthStatus *string `type:"string" enum:"EnvironmentHealthStatus"` - // The ARN of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` // The description of the AWS resources used by this environment. @@ -8283,7 +8438,7 @@ type EventDescription struct { // The event message. Message *string `type:"string"` - // The ARN of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` // The web service request ID for the activity of this event. @@ -8672,18 +8827,135 @@ func (s *ListAvailableSolutionStacksOutput) SetSolutionStacks(v []*string) *List return s } +type ListPlatformBranchesInput struct { + _ struct{} `type:"structure"` + + // Criteria for restricting the resulting list of platform branches. The filter + // is evaluated as a logical conjunction (AND) of the separate SearchFilter + // terms. + // + // The following list shows valid attribute values for each of the SearchFilter + // terms. Most operators take a single value. The in and not_in operators can + // take multiple values. + // + // * Attribute = BranchName: Operator: = | != | begins_with | ends_with | + // contains | in | not_in + // + // * Attribute = LifecycleState: Operator: = | != | in | not_in Values: beta + // | supported | deprecated | retired + // + // * Attribute = PlatformName: Operator: = | != | begins_with | ends_with + // | contains | in | not_in + // + // * Attribute = TierType: Operator: = | != Values: WebServer/Standard | + // Worker/SQS/HTTP + // + // Array size: limited to 10 SearchFilter objects. + // + // Within each SearchFilter item, the Values array is limited to 10 items. + Filters []*SearchFilter `type:"list"` + + // The maximum number of platform branch values returned in one call. + MaxRecords *int64 `min:"1" type:"integer"` + + // For a paginated request. Specify a token from a previous response page to + // retrieve the next response page. All other parameter values must be identical + // to the ones specified in the initial request. + // + // If no NextToken is specified, the first page is retrieved. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListPlatformBranchesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPlatformBranchesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPlatformBranchesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPlatformBranchesInput"} + if s.MaxRecords != nil && *s.MaxRecords < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListPlatformBranchesInput) SetFilters(v []*SearchFilter) *ListPlatformBranchesInput { + s.Filters = v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *ListPlatformBranchesInput) SetMaxRecords(v int64) *ListPlatformBranchesInput { + s.MaxRecords = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPlatformBranchesInput) SetNextToken(v string) *ListPlatformBranchesInput { + s.NextToken = &v + return s +} + +type ListPlatformBranchesOutput struct { + _ struct{} `type:"structure"` + + // In a paginated request, if this value isn't null, it's the token that you + // can pass in a subsequent request to get the next response page. + NextToken *string `type:"string"` + + // Summary information about the platform branches. + PlatformBranchSummaryList []*PlatformBranchSummary `type:"list"` +} + +// String returns the string representation +func (s ListPlatformBranchesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPlatformBranchesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPlatformBranchesOutput) SetNextToken(v string) *ListPlatformBranchesOutput { + s.NextToken = &v + return s +} + +// SetPlatformBranchSummaryList sets the PlatformBranchSummaryList field's value. +func (s *ListPlatformBranchesOutput) SetPlatformBranchSummaryList(v []*PlatformBranchSummary) *ListPlatformBranchesOutput { + s.PlatformBranchSummaryList = v + return s +} + type ListPlatformVersionsInput struct { _ struct{} `type:"structure"` - // List only the platforms where the platform member value relates to one of - // the supplied values. + // Criteria for restricting the resulting list of platform versions. The filter + // is interpreted as a logical conjunction (AND) of the separate PlatformFilter + // terms. Filters []*PlatformFilter `type:"list"` - // The maximum number of platform values returned in one call. + // The maximum number of platform version values returned in one call. MaxRecords *int64 `min:"1" type:"integer"` - // The starting index into the remaining list of platforms. Use the NextToken - // value from a previous ListPlatformVersion call. + // For a paginated request. Specify a token from a previous response page to + // retrieve the next response page. All other parameter values must be identical + // to the ones specified in the initial request. + // + // If no NextToken is specified, the first page is retrieved. NextToken *string `type:"string"` } @@ -8731,11 +9003,11 @@ func (s *ListPlatformVersionsInput) SetNextToken(v string) *ListPlatformVersions type ListPlatformVersionsOutput struct { _ struct{} `type:"structure"` - // The starting index into the remaining list of platforms. if this value is - // not null, you can use it in a subsequent ListPlatformVersion call. + // In a paginated request, if this value isn't null, it's the token that you + // can pass in a subsequent request to get the next response page. NextToken *string `type:"string"` - // Detailed information about the platforms. + // Summary information about the platform versions. PlatformSummaryList []*PlatformSummary `type:"list"` } @@ -8766,7 +9038,7 @@ type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the resouce for which a tag list is requested. // - // Must be the ARN of an Elastic Beanstalk environment. + // Must be the ARN of an Elastic Beanstalk resource. // // ResourceArn is a required field ResourceArn *string `type:"string" required:"true"` @@ -8804,7 +9076,7 @@ func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResource type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the resouce for which a tag list was requested. + // The Amazon Resource Name (ARN) of the resource for which a tag list was requested. ResourceArn *string `type:"string"` // A list of tag key-value pairs. @@ -9289,62 +9561,149 @@ func (s *OptionSpecification) SetResourceName(v string) *OptionSpecification { return s } -// Detailed information about a platform. +// Summary information about a platform branch. +type PlatformBranchSummary struct { + _ struct{} `type:"structure"` + + // The name of the platform branch. + BranchName *string `type:"string"` + + // An ordinal number that designates the order in which platform branches have + // been added to a platform. This can be helpful, for example, if your code + // calls the ListPlatformBranches action and then displays a list of platform + // branches. + // + // A larger BranchOrder value designates a newer platform branch within the + // platform. + BranchOrder *int64 `type:"integer"` + + // The support life cycle state of the platform branch. + // + // Possible values: beta | supported | deprecated | retired + LifecycleState *string `type:"string"` + + // The name of the platform to which this platform branch belongs. + PlatformName *string `type:"string"` + + // The environment tiers that platform versions in this branch support. + // + // Possible values: WebServer/Standard | Worker/SQS/HTTP + SupportedTierList []*string `type:"list"` +} + +// String returns the string representation +func (s PlatformBranchSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PlatformBranchSummary) GoString() string { + return s.String() +} + +// SetBranchName sets the BranchName field's value. +func (s *PlatformBranchSummary) SetBranchName(v string) *PlatformBranchSummary { + s.BranchName = &v + return s +} + +// SetBranchOrder sets the BranchOrder field's value. +func (s *PlatformBranchSummary) SetBranchOrder(v int64) *PlatformBranchSummary { + s.BranchOrder = &v + return s +} + +// SetLifecycleState sets the LifecycleState field's value. +func (s *PlatformBranchSummary) SetLifecycleState(v string) *PlatformBranchSummary { + s.LifecycleState = &v + return s +} + +// SetPlatformName sets the PlatformName field's value. +func (s *PlatformBranchSummary) SetPlatformName(v string) *PlatformBranchSummary { + s.PlatformName = &v + return s +} + +// SetSupportedTierList sets the SupportedTierList field's value. +func (s *PlatformBranchSummary) SetSupportedTierList(v []*string) *PlatformBranchSummary { + s.SupportedTierList = v + return s +} + +// Detailed information about a platform version. type PlatformDescription struct { _ struct{} `type:"structure"` - // The custom AMIs supported by the platform. + // The custom AMIs supported by the platform version. CustomAmiList []*CustomAmi `type:"list"` - // The date when the platform was created. + // The date when the platform version was created. DateCreated *time.Time `type:"timestamp"` - // The date when the platform was last updated. + // The date when the platform version was last updated. DateUpdated *time.Time `type:"timestamp"` - // The description of the platform. + // The description of the platform version. Description *string `type:"string"` - // The frameworks supported by the platform. + // The frameworks supported by the platform version. Frameworks []*PlatformFramework `type:"list"` - // Information about the maintainer of the platform. + // Information about the maintainer of the platform version. Maintainer *string `type:"string"` - // The operating system used by the platform. + // The operating system used by the platform version. OperatingSystemName *string `type:"string"` - // The version of the operating system used by the platform. + // The version of the operating system used by the platform version. OperatingSystemVersion *string `type:"string"` - // The ARN of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` - // The category of the platform. + // The state of the platform version's branch in its lifecycle. + // + // Possible values: Beta | Supported | Deprecated | Retired + PlatformBranchLifecycleState *string `type:"string"` + + // The platform branch to which the platform version belongs. + PlatformBranchName *string `type:"string"` + + // The category of the platform version. PlatformCategory *string `type:"string"` - // The name of the platform. + // The state of the platform version in its lifecycle. + // + // Possible values: Recommended | null + // + // If a null value is returned, the platform version isn't the recommended one + // for its branch. Each platform branch has a single recommended platform version, + // typically the most recent one. + PlatformLifecycleState *string `type:"string"` + + // The name of the platform version. PlatformName *string `type:"string"` - // The AWS account ID of the person who created the platform. + // The AWS account ID of the person who created the platform version. PlatformOwner *string `type:"string"` - // The status of the platform. + // The status of the platform version. PlatformStatus *string `type:"string" enum:"PlatformStatus"` - // The version of the platform. + // The version of the platform version. PlatformVersion *string `type:"string"` - // The programming languages supported by the platform. + // The programming languages supported by the platform version. ProgrammingLanguages []*PlatformProgrammingLanguage `type:"list"` - // The name of the solution stack used by the platform. + // The name of the solution stack used by the platform version. SolutionStackName *string `type:"string"` - // The additions supported by the platform. + // The additions supported by the platform version. SupportedAddonList []*string `type:"list"` - // The tiers supported by the platform. + // The tiers supported by the platform version. SupportedTierList []*string `type:"list"` } @@ -9412,12 +9771,30 @@ func (s *PlatformDescription) SetPlatformArn(v string) *PlatformDescription { return s } +// SetPlatformBranchLifecycleState sets the PlatformBranchLifecycleState field's value. +func (s *PlatformDescription) SetPlatformBranchLifecycleState(v string) *PlatformDescription { + s.PlatformBranchLifecycleState = &v + return s +} + +// SetPlatformBranchName sets the PlatformBranchName field's value. +func (s *PlatformDescription) SetPlatformBranchName(v string) *PlatformDescription { + s.PlatformBranchName = &v + return s +} + // SetPlatformCategory sets the PlatformCategory field's value. func (s *PlatformDescription) SetPlatformCategory(v string) *PlatformDescription { s.PlatformCategory = &v return s } +// SetPlatformLifecycleState sets the PlatformLifecycleState field's value. +func (s *PlatformDescription) SetPlatformLifecycleState(v string) *PlatformDescription { + s.PlatformLifecycleState = &v + return s +} + // SetPlatformName sets the PlatformName field's value. func (s *PlatformDescription) SetPlatformName(v string) *PlatformDescription { s.PlatformName = &v @@ -9466,27 +9843,36 @@ func (s *PlatformDescription) SetSupportedTierList(v []*string) *PlatformDescrip return s } -// Specify criteria to restrict the results when listing custom platforms. -// -// The filter is evaluated as the expression: +// Describes criteria to restrict the results when listing platform versions. // -// Type Operator Values[i] +// The filter is evaluated as follows: Type Operator Values[1] type PlatformFilter struct { _ struct{} `type:"structure"` // The operator to apply to the Type with each of the Values. // - // Valid Values: = (equal to) | != (not equal to) | < (less than) | <= (less - // than or equal to) | > (greater than) | >= (greater than or equal to) | contains - // | begins_with | ends_with + // Valid values: = | != | < | <= | > | >= | contains | begins_with | ends_with Operator *string `type:"string"` - // The custom platform attribute to which the filter values are applied. + // The platform version attribute to which the filter values are applied. // - // Valid Values: PlatformName | PlatformVersion | PlatformStatus | PlatformOwner + // Valid values: PlatformName | PlatformVersion | PlatformStatus | PlatformBranchName + // | PlatformLifecycleState | PlatformOwner | SupportedTier | SupportedAddon + // | ProgrammingLanguageName | OperatingSystemName Type *string `type:"string"` - // The list of values applied to the custom platform attribute. + // The list of values applied to the filtering platform version attribute. Only + // one value is supported for all current operators. + // + // The following list shows valid filter values for some filter attributes. + // + // * PlatformStatus: Creating | Failed | Ready | Deleting | Deleted + // + // * PlatformLifecycleState: recommended + // + // * SupportedTier: WebServer/Standard | Worker/SQS/HTTP + // + // * SupportedAddon: Log/S3 | Monitoring/Healthd | WorkerDaemon/SQSD Values []*string `type:"list"` } @@ -9518,7 +9904,7 @@ func (s *PlatformFilter) SetValues(v []*string) *PlatformFilter { return s } -// A framework supported by the custom platform. +// A framework supported by the platform. type PlatformFramework struct { _ struct{} `type:"structure"` @@ -9584,33 +9970,52 @@ func (s *PlatformProgrammingLanguage) SetVersion(v string) *PlatformProgrammingL return s } -// Detailed information about a platform. +// Summary information about a platform version. type PlatformSummary struct { _ struct{} `type:"structure"` - // The operating system used by the platform. + // The operating system used by the platform version. OperatingSystemName *string `type:"string"` - // The version of the operating system used by the platform. + // The version of the operating system used by the platform version. OperatingSystemVersion *string `type:"string"` - // The ARN of the platform. + // The ARN of the platform version. PlatformArn *string `type:"string"` - // The category of platform. + // The state of the platform version's branch in its lifecycle. + // + // Possible values: beta | supported | deprecated | retired + PlatformBranchLifecycleState *string `type:"string"` + + // The platform branch to which the platform version belongs. + PlatformBranchName *string `type:"string"` + + // The category of platform version. PlatformCategory *string `type:"string"` - // The AWS account ID of the person who created the platform. + // The state of the platform version in its lifecycle. + // + // Possible values: recommended | empty + // + // If an empty value is returned, the platform version is supported but isn't + // the recommended one for its branch. + PlatformLifecycleState *string `type:"string"` + + // The AWS account ID of the person who created the platform version. PlatformOwner *string `type:"string"` - // The status of the platform. You can create an environment from the platform - // once it is ready. + // The status of the platform version. You can create an environment from the + // platform version once it is ready. PlatformStatus *string `type:"string" enum:"PlatformStatus"` - // The additions associated with the platform. + // The version string of the platform version. + PlatformVersion *string `type:"string"` + + // The additions associated with the platform version. SupportedAddonList []*string `type:"list"` - // The tiers in which the platform runs. + // The tiers in which the platform version runs. SupportedTierList []*string `type:"list"` } @@ -9642,12 +10047,30 @@ func (s *PlatformSummary) SetPlatformArn(v string) *PlatformSummary { return s } +// SetPlatformBranchLifecycleState sets the PlatformBranchLifecycleState field's value. +func (s *PlatformSummary) SetPlatformBranchLifecycleState(v string) *PlatformSummary { + s.PlatformBranchLifecycleState = &v + return s +} + +// SetPlatformBranchName sets the PlatformBranchName field's value. +func (s *PlatformSummary) SetPlatformBranchName(v string) *PlatformSummary { + s.PlatformBranchName = &v + return s +} + // SetPlatformCategory sets the PlatformCategory field's value. func (s *PlatformSummary) SetPlatformCategory(v string) *PlatformSummary { s.PlatformCategory = &v return s } +// SetPlatformLifecycleState sets the PlatformLifecycleState field's value. +func (s *PlatformSummary) SetPlatformLifecycleState(v string) *PlatformSummary { + s.PlatformLifecycleState = &v + return s +} + // SetPlatformOwner sets the PlatformOwner field's value. func (s *PlatformSummary) SetPlatformOwner(v string) *PlatformSummary { s.PlatformOwner = &v @@ -9660,6 +10083,12 @@ func (s *PlatformSummary) SetPlatformStatus(v string) *PlatformSummary { return s } +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *PlatformSummary) SetPlatformVersion(v string) *PlatformSummary { + s.PlatformVersion = &v + return s +} + // SetSupportedAddonList sets the SupportedAddonList field's value. func (s *PlatformSummary) SetSupportedAddonList(v []*string) *PlatformSummary { s.SupportedAddonList = v @@ -10144,6 +10573,63 @@ func (s *S3Location) SetS3Key(v string) *S3Location { return s } +// Describes criteria to restrict a list of results. +// +// For operators that apply a single value to the attribute, the filter is evaluated +// as follows: Attribute Operator Values[1] +// +// Some operators, e.g. in, can apply multiple values. In this case, the filter +// is evaluated as a logical union (OR) of applications of the operator to the +// attribute with each one of the values: (Attribute Operator Values[1]) OR +// (Attribute Operator Values[2]) OR ... +// +// The valid values for attributes of SearchFilter depend on the API action. +// For valid values, see the reference page for the API action you're calling +// that takes a SearchFilter parameter. +type SearchFilter struct { + _ struct{} `type:"structure"` + + // The result attribute to which the filter values are applied. Valid values + // vary by API action. + Attribute *string `type:"string"` + + // The operator to apply to the Attribute with each of the Values. Valid values + // vary by Attribute. + Operator *string `type:"string"` + + // The list of values applied to the Attribute and Operator attributes. Number + // of values and valid values vary by Attribute. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s SearchFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchFilter) GoString() string { + return s.String() +} + +// SetAttribute sets the Attribute field's value. +func (s *SearchFilter) SetAttribute(v string) *SearchFilter { + s.Attribute = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *SearchFilter) SetOperator(v string) *SearchFilter { + s.Operator = &v + return s +} + +// SetValues sets the Values field's value. +func (s *SearchFilter) SetValues(v []*string) *SearchFilter { + s.Values = v + return s +} + // Detailed health information about an Amazon EC2 instance in your Elastic // Beanstalk environment. type SingleInstanceHealth struct { @@ -10372,7 +10858,7 @@ func (s *SourceBuildInformation) SetSourceType(v string) *SourceBuildInformation return s } -// A specification for an environment configuration +// A specification for an environment configuration. type SourceConfiguration struct { _ struct{} `type:"structure"` @@ -11304,7 +11790,7 @@ type UpdateTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the resouce to be updated. // - // Must be the ARN of an Elastic Beanstalk environment. + // Must be the ARN of an Elastic Beanstalk resource. // // ResourceArn is a required field ResourceArn *string `type:"string" required:"true"` 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 3acde019b39..ce50a0588d5 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 @@ -105,6 +105,103 @@ func (c *ElasticsearchService) AddTagsWithContext(ctx aws.Context, input *AddTag return out, req.Send() } +const opAssociatePackage = "AssociatePackage" + +// AssociatePackageRequest generates a "aws/request.Request" representing the +// client's request for the AssociatePackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociatePackage for more information on using the AssociatePackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociatePackageRequest method. +// req, resp := client.AssociatePackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) AssociatePackageRequest(input *AssociatePackageInput) (req *request.Request, output *AssociatePackageOutput) { + op := &request.Operation{ + Name: opAssociatePackage, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/packages/associate/{PackageID}/{DomainName}", + } + + if input == nil { + input = &AssociatePackageInput{} + } + + output = &AssociatePackageOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociatePackage API operation for Amazon Elasticsearch Service. +// +// Associates a package with an Amazon ES domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation AssociatePackage for usage and error information. +// +// Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ResourceNotFoundException +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ConflictException +// An error occurred because the client attempts to remove a resource that is +// currently in use. Returns HTTP status code 409. +// +func (c *ElasticsearchService) AssociatePackage(input *AssociatePackageInput) (*AssociatePackageOutput, error) { + req, out := c.AssociatePackageRequest(input) + return out, req.Send() +} + +// AssociatePackageWithContext is the same as AssociatePackage with the addition of +// the ability to pass a context and additional request options. +// +// See AssociatePackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) AssociatePackageWithContext(ctx aws.Context, input *AssociatePackageInput, opts ...request.Option) (*AssociatePackageOutput, error) { + req, out := c.AssociatePackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCancelElasticsearchServiceSoftwareUpdate = "CancelElasticsearchServiceSoftwareUpdate" // CancelElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the @@ -299,6 +396,107 @@ func (c *ElasticsearchService) CreateElasticsearchDomainWithContext(ctx aws.Cont return out, req.Send() } +const opCreatePackage = "CreatePackage" + +// CreatePackageRequest generates a "aws/request.Request" representing the +// client's request for the CreatePackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePackage for more information on using the CreatePackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePackageRequest method. +// req, resp := client.CreatePackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) CreatePackageRequest(input *CreatePackageInput) (req *request.Request, output *CreatePackageOutput) { + op := &request.Operation{ + Name: opCreatePackage, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/packages", + } + + if input == nil { + input = &CreatePackageInput{} + } + + output = &CreatePackageOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePackage API operation for Amazon Elasticsearch Service. +// +// Create a package for use with Amazon ES domains. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation CreatePackage for usage and error information. +// +// Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * LimitExceededException +// An exception for trying to create more than allowed resources or sub-resources. +// Gives http status code of 409. +// +// * InvalidTypeException +// An exception for trying to create or access sub-resource that is either invalid +// or not supported. Gives http status code of 409. +// +// * ResourceAlreadyExistsException +// An exception for creating a resource that already exists. Gives http status +// code of 400. +// +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) CreatePackage(input *CreatePackageInput) (*CreatePackageOutput, error) { + req, out := c.CreatePackageRequest(input) + return out, req.Send() +} + +// CreatePackageWithContext is the same as CreatePackage with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) CreatePackageWithContext(ctx aws.Context, input *CreatePackageInput, opts ...request.Option) (*CreatePackageOutput, error) { + req, out := c.CreatePackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteElasticsearchDomain = "DeleteElasticsearchDomain" // DeleteElasticsearchDomainRequest generates a "aws/request.Request" representing the @@ -479,6 +677,103 @@ func (c *ElasticsearchService) DeleteElasticsearchServiceRoleWithContext(ctx aws return out, req.Send() } +const opDeletePackage = "DeletePackage" + +// DeletePackageRequest generates a "aws/request.Request" representing the +// client's request for the DeletePackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePackage for more information on using the DeletePackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePackageRequest method. +// req, resp := client.DeletePackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DeletePackageRequest(input *DeletePackageInput) (req *request.Request, output *DeletePackageOutput) { + op := &request.Operation{ + Name: opDeletePackage, + HTTPMethod: "DELETE", + HTTPPath: "/2015-01-01/packages/{PackageID}", + } + + if input == nil { + input = &DeletePackageInput{} + } + + output = &DeletePackageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeletePackage API operation for Amazon Elasticsearch Service. +// +// Delete the package. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation DeletePackage for usage and error information. +// +// Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ResourceNotFoundException +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ConflictException +// An error occurred because the client attempts to remove a resource that is +// currently in use. Returns HTTP status code 409. +// +func (c *ElasticsearchService) DeletePackage(input *DeletePackageInput) (*DeletePackageOutput, error) { + req, out := c.DeletePackageRequest(input) + return out, req.Send() +} + +// DeletePackageWithContext is the same as DeletePackage with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DeletePackageWithContext(ctx aws.Context, input *DeletePackageInput, opts ...request.Option) (*DeletePackageOutput, error) { + req, out := c.DeletePackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" // DescribeElasticsearchDomainRequest generates a "aws/request.Request" representing the @@ -845,35 +1140,35 @@ func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsWithContex return out, req.Send() } -const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasticsearchInstanceOfferings" +const opDescribePackages = "DescribePackages" -// DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return +// DescribePackagesRequest generates a "aws/request.Request" representing the +// client's request for the DescribePackages operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeReservedElasticsearchInstanceOfferings for more information on using the DescribeReservedElasticsearchInstanceOfferings +// See DescribePackages for more information on using the DescribePackages // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeReservedElasticsearchInstanceOfferingsRequest method. -// req, resp := client.DescribeReservedElasticsearchInstanceOfferingsRequest(params) +// // Example sending a request using the DescribePackagesRequest method. +// req, resp := client.DescribePackagesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsRequest(input *DescribeReservedElasticsearchInstanceOfferingsInput) (req *request.Request, output *DescribeReservedElasticsearchInstanceOfferingsOutput) { +func (c *ElasticsearchService) DescribePackagesRequest(input *DescribePackagesInput) (req *request.Request, output *DescribePackagesOutput) { op := &request.Operation{ - Name: opDescribeReservedElasticsearchInstanceOfferings, - HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/reservedInstanceOfferings", + Name: opDescribePackages, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/packages/describe", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, @@ -883,45 +1178,197 @@ func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsReq } if input == nil { - input = &DescribeReservedElasticsearchInstanceOfferingsInput{} + input = &DescribePackagesInput{} } - output = &DescribeReservedElasticsearchInstanceOfferingsOutput{} + output = &DescribePackagesOutput{} req = c.newRequest(op, input, output) return } -// DescribeReservedElasticsearchInstanceOfferings API operation for Amazon Elasticsearch Service. +// DescribePackages API operation for Amazon Elasticsearch Service. // -// Lists available reserved Elasticsearch instance offerings. +// Describes all packages available to Amazon ES. Includes options for filtering, +// limiting the number of results, and pagination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation DescribeReservedElasticsearchInstanceOfferings for usage and error information. +// API operation DescribePackages for usage and error information. // // Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// // * ResourceNotFoundException // An exception for accessing or deleting a resource that does not exist. Gives // http status code of 400. // +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// // * ValidationException // An exception for missing / invalid input fields. Gives http status code of // 400. // -// * DisabledOperationException -// An error occured because the client wanted to access a not supported operation. -// Gives http status code of 409. -// -// * InternalException -// The request processing has failed because of an unknown error, exception -// or failure (the failure is internal to the service) . Gives http status code -// of 500. -// -func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferings(input *DescribeReservedElasticsearchInstanceOfferingsInput) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { - req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) +func (c *ElasticsearchService) DescribePackages(input *DescribePackagesInput) (*DescribePackagesOutput, error) { + req, out := c.DescribePackagesRequest(input) + return out, req.Send() +} + +// DescribePackagesWithContext is the same as DescribePackages with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePackages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DescribePackagesWithContext(ctx aws.Context, input *DescribePackagesInput, opts ...request.Option) (*DescribePackagesOutput, error) { + req, out := c.DescribePackagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribePackagesPages iterates over the pages of a DescribePackages operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribePackages 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 DescribePackages operation. +// pageNum := 0 +// err := client.DescribePackagesPages(params, +// func(page *elasticsearchservice.DescribePackagesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) DescribePackagesPages(input *DescribePackagesInput, fn func(*DescribePackagesOutput, bool) bool) error { + return c.DescribePackagesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribePackagesPagesWithContext same as DescribePackagesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DescribePackagesPagesWithContext(ctx aws.Context, input *DescribePackagesInput, fn func(*DescribePackagesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribePackagesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribePackagesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribePackagesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasticsearchInstanceOfferings" + +// DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReservedElasticsearchInstanceOfferings for more information on using the DescribeReservedElasticsearchInstanceOfferings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReservedElasticsearchInstanceOfferingsRequest method. +// req, resp := client.DescribeReservedElasticsearchInstanceOfferingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsRequest(input *DescribeReservedElasticsearchInstanceOfferingsInput) (req *request.Request, output *DescribeReservedElasticsearchInstanceOfferingsOutput) { + op := &request.Operation{ + Name: opDescribeReservedElasticsearchInstanceOfferings, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/reservedInstanceOfferings", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReservedElasticsearchInstanceOfferingsInput{} + } + + output = &DescribeReservedElasticsearchInstanceOfferingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservedElasticsearchInstanceOfferings API operation for Amazon Elasticsearch Service. +// +// Lists available reserved Elasticsearch instance offerings. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation DescribeReservedElasticsearchInstanceOfferings for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * DisabledOperationException +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferings(input *DescribeReservedElasticsearchInstanceOfferingsInput) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { + req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) return out, req.Send() } @@ -1141,6 +1588,103 @@ func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPagesWithCo return p.Err() } +const opDissociatePackage = "DissociatePackage" + +// DissociatePackageRequest generates a "aws/request.Request" representing the +// client's request for the DissociatePackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DissociatePackage for more information on using the DissociatePackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DissociatePackageRequest method. +// req, resp := client.DissociatePackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DissociatePackageRequest(input *DissociatePackageInput) (req *request.Request, output *DissociatePackageOutput) { + op := &request.Operation{ + Name: opDissociatePackage, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/packages/dissociate/{PackageID}/{DomainName}", + } + + if input == nil { + input = &DissociatePackageInput{} + } + + output = &DissociatePackageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DissociatePackage API operation for Amazon Elasticsearch Service. +// +// Dissociates a package from the Amazon ES domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation DissociatePackage for usage and error information. +// +// Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ResourceNotFoundException +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ConflictException +// An error occurred because the client attempts to remove a resource that is +// currently in use. Returns HTTP status code 409. +// +func (c *ElasticsearchService) DissociatePackage(input *DissociatePackageInput) (*DissociatePackageOutput, error) { + req, out := c.DissociatePackageRequest(input) + return out, req.Send() +} + +// DissociatePackageWithContext is the same as DissociatePackage with the addition of +// the ability to pass a context and additional request options. +// +// See DissociatePackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DissociatePackageWithContext(ctx aws.Context, input *DissociatePackageInput, opts ...request.Option) (*DissociatePackageOutput, error) { + req, out := c.DissociatePackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetCompatibleElasticsearchVersions = "GetCompatibleElasticsearchVersions" // GetCompatibleElasticsearchVersionsRequest generates a "aws/request.Request" representing the @@ -1563,35 +2107,35 @@ func (c *ElasticsearchService) ListDomainNamesWithContext(ctx aws.Context, input return out, req.Send() } -const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" +const opListDomainsForPackage = "ListDomainsForPackage" -// ListElasticsearchInstanceTypesRequest generates a "aws/request.Request" representing the -// client's request for the ListElasticsearchInstanceTypes operation. The "output" return +// ListDomainsForPackageRequest generates a "aws/request.Request" representing the +// client's request for the ListDomainsForPackage operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListElasticsearchInstanceTypes for more information on using the ListElasticsearchInstanceTypes +// See ListDomainsForPackage for more information on using the ListDomainsForPackage // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListElasticsearchInstanceTypesRequest method. -// req, resp := client.ListElasticsearchInstanceTypesRequest(params) +// // Example sending a request using the ListDomainsForPackageRequest method. +// req, resp := client.ListDomainsForPackageRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *ListElasticsearchInstanceTypesInput) (req *request.Request, output *ListElasticsearchInstanceTypesOutput) { +func (c *ElasticsearchService) ListDomainsForPackageRequest(input *ListDomainsForPackageInput) (req *request.Request, output *ListDomainsForPackageOutput) { op := &request.Operation{ - Name: opListElasticsearchInstanceTypes, + Name: opListDomainsForPackage, HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/instanceTypes/{ElasticsearchVersion}", + HTTPPath: "/2015-01-01/packages/{PackageID}/domains", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, @@ -1601,24 +2145,24 @@ func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *List } if input == nil { - input = &ListElasticsearchInstanceTypesInput{} + input = &ListDomainsForPackageInput{} } - output = &ListElasticsearchInstanceTypesOutput{} + output = &ListDomainsForPackageOutput{} req = c.newRequest(op, input, output) return } -// ListElasticsearchInstanceTypes API operation for Amazon Elasticsearch Service. +// ListDomainsForPackage API operation for Amazon Elasticsearch Service. // -// List all Elasticsearch instance types that are supported for given ElasticsearchVersion +// Lists all Amazon ES domains associated with the package. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Elasticsearch Service's -// API operation ListElasticsearchInstanceTypes for usage and error information. +// API operation ListDomainsForPackage for usage and error information. // // Returned Error Types: // * BaseException @@ -1633,68 +2177,72 @@ func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *List // An exception for accessing or deleting a resource that does not exist. Gives // http status code of 400. // +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// // * ValidationException // An exception for missing / invalid input fields. Gives http status code of // 400. // -func (c *ElasticsearchService) ListElasticsearchInstanceTypes(input *ListElasticsearchInstanceTypesInput) (*ListElasticsearchInstanceTypesOutput, error) { - req, out := c.ListElasticsearchInstanceTypesRequest(input) +func (c *ElasticsearchService) ListDomainsForPackage(input *ListDomainsForPackageInput) (*ListDomainsForPackageOutput, error) { + req, out := c.ListDomainsForPackageRequest(input) return out, req.Send() } -// ListElasticsearchInstanceTypesWithContext is the same as ListElasticsearchInstanceTypes with the addition of +// ListDomainsForPackageWithContext is the same as ListDomainsForPackage with the addition of // the ability to pass a context and additional request options. // -// See ListElasticsearchInstanceTypes for details on how to use this API operation. +// See ListDomainsForPackage for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElasticsearchService) ListElasticsearchInstanceTypesWithContext(ctx aws.Context, input *ListElasticsearchInstanceTypesInput, opts ...request.Option) (*ListElasticsearchInstanceTypesOutput, error) { - req, out := c.ListElasticsearchInstanceTypesRequest(input) +func (c *ElasticsearchService) ListDomainsForPackageWithContext(ctx aws.Context, input *ListDomainsForPackageInput, opts ...request.Option) (*ListDomainsForPackageOutput, error) { + req, out := c.ListDomainsForPackageRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListElasticsearchInstanceTypesPages iterates over the pages of a ListElasticsearchInstanceTypes operation, +// ListDomainsForPackagePages iterates over the pages of a ListDomainsForPackage operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListElasticsearchInstanceTypes method for more information on how to use this operation. +// See ListDomainsForPackage 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 ListElasticsearchInstanceTypes operation. +// // Example iterating over at most 3 pages of a ListDomainsForPackage operation. // pageNum := 0 -// err := client.ListElasticsearchInstanceTypesPages(params, -// func(page *elasticsearchservice.ListElasticsearchInstanceTypesOutput, lastPage bool) bool { +// err := client.ListDomainsForPackagePages(params, +// func(page *elasticsearchservice.ListDomainsForPackageOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *ElasticsearchService) ListElasticsearchInstanceTypesPages(input *ListElasticsearchInstanceTypesInput, fn func(*ListElasticsearchInstanceTypesOutput, bool) bool) error { - return c.ListElasticsearchInstanceTypesPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *ElasticsearchService) ListDomainsForPackagePages(input *ListDomainsForPackageInput, fn func(*ListDomainsForPackageOutput, bool) bool) error { + return c.ListDomainsForPackagePagesWithContext(aws.BackgroundContext(), input, fn) } -// ListElasticsearchInstanceTypesPagesWithContext same as ListElasticsearchInstanceTypesPages except +// ListDomainsForPackagePagesWithContext same as ListDomainsForPackagePages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ElasticsearchService) ListElasticsearchInstanceTypesPagesWithContext(ctx aws.Context, input *ListElasticsearchInstanceTypesInput, fn func(*ListElasticsearchInstanceTypesOutput, bool) bool, opts ...request.Option) error { +func (c *ElasticsearchService) ListDomainsForPackagePagesWithContext(ctx aws.Context, input *ListDomainsForPackageInput, fn func(*ListDomainsForPackageOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListElasticsearchInstanceTypesInput + var inCpy *ListDomainsForPackageInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListElasticsearchInstanceTypesRequest(inCpy) + req, _ := c.ListDomainsForPackageRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -1702,7 +2250,7 @@ func (c *ElasticsearchService) ListElasticsearchInstanceTypesPagesWithContext(ct } for p.Next() { - if !fn(p.Page().(*ListElasticsearchInstanceTypesOutput), !p.HasNextPage()) { + if !fn(p.Page().(*ListDomainsForPackageOutput), !p.HasNextPage()) { break } } @@ -1710,35 +2258,35 @@ func (c *ElasticsearchService) ListElasticsearchInstanceTypesPagesWithContext(ct return p.Err() } -const opListElasticsearchVersions = "ListElasticsearchVersions" +const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" -// ListElasticsearchVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListElasticsearchVersions operation. The "output" return +// ListElasticsearchInstanceTypesRequest generates a "aws/request.Request" representing the +// client's request for the ListElasticsearchInstanceTypes operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListElasticsearchVersions for more information on using the ListElasticsearchVersions +// See ListElasticsearchInstanceTypes for more information on using the ListElasticsearchInstanceTypes // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListElasticsearchVersionsRequest method. -// req, resp := client.ListElasticsearchVersionsRequest(params) +// // Example sending a request using the ListElasticsearchInstanceTypesRequest method. +// req, resp := client.ListElasticsearchInstanceTypesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } -func (c *ElasticsearchService) ListElasticsearchVersionsRequest(input *ListElasticsearchVersionsInput) (req *request.Request, output *ListElasticsearchVersionsOutput) { +func (c *ElasticsearchService) ListElasticsearchInstanceTypesRequest(input *ListElasticsearchInstanceTypesInput) (req *request.Request, output *ListElasticsearchInstanceTypesOutput) { op := &request.Operation{ - Name: opListElasticsearchVersions, + Name: opListElasticsearchInstanceTypes, HTTPMethod: "GET", - HTTPPath: "/2015-01-01/es/versions", + HTTPPath: "/2015-01-01/es/instanceTypes/{ElasticsearchVersion}", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, @@ -1748,7 +2296,154 @@ func (c *ElasticsearchService) ListElasticsearchVersionsRequest(input *ListElast } if input == nil { - input = &ListElasticsearchVersionsInput{} + input = &ListElasticsearchInstanceTypesInput{} + } + + output = &ListElasticsearchInstanceTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListElasticsearchInstanceTypes API operation for Amazon Elasticsearch Service. +// +// List all Elasticsearch instance types that are supported for given ElasticsearchVersion +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation ListElasticsearchInstanceTypes for usage and error information. +// +// Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ResourceNotFoundException +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) ListElasticsearchInstanceTypes(input *ListElasticsearchInstanceTypesInput) (*ListElasticsearchInstanceTypesOutput, error) { + req, out := c.ListElasticsearchInstanceTypesRequest(input) + return out, req.Send() +} + +// ListElasticsearchInstanceTypesWithContext is the same as ListElasticsearchInstanceTypes with the addition of +// the ability to pass a context and additional request options. +// +// See ListElasticsearchInstanceTypes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) ListElasticsearchInstanceTypesWithContext(ctx aws.Context, input *ListElasticsearchInstanceTypesInput, opts ...request.Option) (*ListElasticsearchInstanceTypesOutput, error) { + req, out := c.ListElasticsearchInstanceTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListElasticsearchInstanceTypesPages iterates over the pages of a ListElasticsearchInstanceTypes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListElasticsearchInstanceTypes 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 ListElasticsearchInstanceTypes operation. +// pageNum := 0 +// err := client.ListElasticsearchInstanceTypesPages(params, +// func(page *elasticsearchservice.ListElasticsearchInstanceTypesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) ListElasticsearchInstanceTypesPages(input *ListElasticsearchInstanceTypesInput, fn func(*ListElasticsearchInstanceTypesOutput, bool) bool) error { + return c.ListElasticsearchInstanceTypesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListElasticsearchInstanceTypesPagesWithContext same as ListElasticsearchInstanceTypesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) ListElasticsearchInstanceTypesPagesWithContext(ctx aws.Context, input *ListElasticsearchInstanceTypesInput, fn func(*ListElasticsearchInstanceTypesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListElasticsearchInstanceTypesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListElasticsearchInstanceTypesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListElasticsearchInstanceTypesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListElasticsearchVersions = "ListElasticsearchVersions" + +// ListElasticsearchVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListElasticsearchVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListElasticsearchVersions for more information on using the ListElasticsearchVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListElasticsearchVersionsRequest method. +// req, resp := client.ListElasticsearchVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) ListElasticsearchVersionsRequest(input *ListElasticsearchVersionsInput) (req *request.Request, output *ListElasticsearchVersionsOutput) { + op := &request.Operation{ + Name: opListElasticsearchVersions, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/versions", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListElasticsearchVersionsInput{} } output = &ListElasticsearchVersionsOutput{} @@ -1857,6 +2552,157 @@ func (c *ElasticsearchService) ListElasticsearchVersionsPagesWithContext(ctx aws return p.Err() } +const opListPackagesForDomain = "ListPackagesForDomain" + +// ListPackagesForDomainRequest generates a "aws/request.Request" representing the +// client's request for the ListPackagesForDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPackagesForDomain for more information on using the ListPackagesForDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPackagesForDomainRequest method. +// req, resp := client.ListPackagesForDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) ListPackagesForDomainRequest(input *ListPackagesForDomainInput) (req *request.Request, output *ListPackagesForDomainOutput) { + op := &request.Operation{ + Name: opListPackagesForDomain, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/domain/{DomainName}/packages", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPackagesForDomainInput{} + } + + output = &ListPackagesForDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPackagesForDomain API operation for Amazon Elasticsearch Service. +// +// Lists all packages associated with the Amazon ES domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation ListPackagesForDomain for usage and error information. +// +// Returned Error Types: +// * BaseException +// An error occurred while processing the request. +// +// * InternalException +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ResourceNotFoundException +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * AccessDeniedException +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +// +// * ValidationException +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) ListPackagesForDomain(input *ListPackagesForDomainInput) (*ListPackagesForDomainOutput, error) { + req, out := c.ListPackagesForDomainRequest(input) + return out, req.Send() +} + +// ListPackagesForDomainWithContext is the same as ListPackagesForDomain with the addition of +// the ability to pass a context and additional request options. +// +// See ListPackagesForDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) ListPackagesForDomainWithContext(ctx aws.Context, input *ListPackagesForDomainInput, opts ...request.Option) (*ListPackagesForDomainOutput, error) { + req, out := c.ListPackagesForDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPackagesForDomainPages iterates over the pages of a ListPackagesForDomain operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPackagesForDomain 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 ListPackagesForDomain operation. +// pageNum := 0 +// err := client.ListPackagesForDomainPages(params, +// func(page *elasticsearchservice.ListPackagesForDomainOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) ListPackagesForDomainPages(input *ListPackagesForDomainInput, fn func(*ListPackagesForDomainOutput, bool) bool) error { + return c.ListPackagesForDomainPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPackagesForDomainPagesWithContext same as ListPackagesForDomainPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) ListPackagesForDomainPagesWithContext(ctx aws.Context, input *ListPackagesForDomainInput, fn func(*ListPackagesForDomainOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPackagesForDomainInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPackagesForDomainRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListPackagesForDomainOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the @@ -2415,6 +3261,63 @@ func (c *ElasticsearchService) UpgradeElasticsearchDomainWithContext(ctx aws.Con return out, req.Send() } +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + // The configured access rules for the domain's document and search endpoints, // and the current status of those rules. type AccessPoliciesStatus struct { @@ -2754,10 +3657,94 @@ func (s *AdvancedSecurityOptionsStatus) SetStatus(v *OptionStatus) *AdvancedSecu return s } +// Container for request parameters to AssociatePackage operation. +type AssociatePackageInput struct { + _ struct{} `type:"structure"` + + // Name of the domain that you want to associate the package with. + // + // DomainName is a required field + DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` + + // Internal ID of the package that you want to associate with a domain. Use + // DescribePackages to find this value. + // + // PackageID is a required field + PackageID *string `location:"uri" locationName:"PackageID" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociatePackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatePackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociatePackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociatePackageInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.PackageID == nil { + invalidParams.Add(request.NewErrParamRequired("PackageID")) + } + if s.PackageID != nil && len(*s.PackageID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PackageID", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *AssociatePackageInput) SetDomainName(v string) *AssociatePackageInput { + s.DomainName = &v + return s +} + +// SetPackageID sets the PackageID field's value. +func (s *AssociatePackageInput) SetPackageID(v string) *AssociatePackageInput { + s.PackageID = &v + return s +} + +// Container for response returned by AssociatePackage operation. +type AssociatePackageOutput struct { + _ struct{} `type:"structure"` + + // DomainPackageDetails + DomainPackageDetails *DomainPackageDetails `type:"structure"` +} + +// String returns the string representation +func (s AssociatePackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatePackageOutput) GoString() string { + return s.String() +} + +// SetDomainPackageDetails sets the DomainPackageDetails field's value. +func (s *AssociatePackageOutput) SetDomainPackageDetails(v *DomainPackageDetails) *AssociatePackageOutput { + s.DomainPackageDetails = v + return s +} + // An error occurred while processing the request. type BaseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description of the error. Message_ *string `locationName:"message" type:"string"` @@ -2775,17 +3762,17 @@ func (s BaseException) GoString() string { func newErrorBaseException(v protocol.ResponseMetadata) error { return &BaseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BaseException) Code() string { +func (s *BaseException) Code() string { return "BaseException" } // Message returns the exception's message. -func (s BaseException) Message() string { +func (s *BaseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2793,22 +3780,22 @@ func (s BaseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BaseException) OrigErr() error { +func (s *BaseException) OrigErr() error { return nil } -func (s BaseException) Error() string { +func (s *BaseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BaseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BaseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BaseException) RequestID() string { - return s.respMetadata.RequestID +func (s *BaseException) RequestID() string { + return s.RespMetadata.RequestID } // Container for the parameters to the CancelElasticsearchServiceSoftwareUpdate @@ -3025,6 +4012,63 @@ func (s *CompatibleVersionsMap) SetTargetVersions(v []*string) *CompatibleVersio return s } +// An error occurred because the client attempts to remove a resource that is +// currently in use. Returns HTTP status code 409. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConflictException) GoString() string { + return s.String() +} + +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + type CreateElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -3183,58 +4227,166 @@ func (s *CreateElasticsearchDomainInput) SetElasticsearchVersion(v string) *Crea return s } -// SetEncryptionAtRestOptions sets the EncryptionAtRestOptions field's value. -func (s *CreateElasticsearchDomainInput) SetEncryptionAtRestOptions(v *EncryptionAtRestOptions) *CreateElasticsearchDomainInput { - s.EncryptionAtRestOptions = v - return s +// SetEncryptionAtRestOptions sets the EncryptionAtRestOptions field's value. +func (s *CreateElasticsearchDomainInput) SetEncryptionAtRestOptions(v *EncryptionAtRestOptions) *CreateElasticsearchDomainInput { + s.EncryptionAtRestOptions = v + return s +} + +// SetLogPublishingOptions sets the LogPublishingOptions field's value. +func (s *CreateElasticsearchDomainInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *CreateElasticsearchDomainInput { + s.LogPublishingOptions = v + return s +} + +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *CreateElasticsearchDomainInput) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *CreateElasticsearchDomainInput { + s.NodeToNodeEncryptionOptions = v + return s +} + +// SetSnapshotOptions sets the SnapshotOptions field's value. +func (s *CreateElasticsearchDomainInput) SetSnapshotOptions(v *SnapshotOptions) *CreateElasticsearchDomainInput { + s.SnapshotOptions = v + return s +} + +// SetVPCOptions sets the VPCOptions field's value. +func (s *CreateElasticsearchDomainInput) SetVPCOptions(v *VPCOptions) *CreateElasticsearchDomainInput { + s.VPCOptions = v + return s +} + +// The result of a CreateElasticsearchDomain operation. Contains the status +// of the newly created Elasticsearch domain. +type CreateElasticsearchDomainOutput struct { + _ struct{} `type:"structure"` + + // The status of the newly created Elasticsearch domain. + DomainStatus *ElasticsearchDomainStatus `type:"structure"` +} + +// String returns the string representation +func (s CreateElasticsearchDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateElasticsearchDomainOutput) GoString() string { + return s.String() +} + +// SetDomainStatus sets the DomainStatus field's value. +func (s *CreateElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomainStatus) *CreateElasticsearchDomainOutput { + s.DomainStatus = v + return s +} + +// Container for request parameters to CreatePackage operation. +type CreatePackageInput struct { + _ struct{} `type:"structure"` + + // Description of the package. + PackageDescription *string `type:"string"` + + // Unique identifier for the package. + // + // PackageName is a required field + PackageName *string `min:"3" type:"string" required:"true"` + + // The customer S3 location PackageSource for importing the package. + // + // PackageSource is a required field + PackageSource *PackageSource `type:"structure" required:"true"` + + // Type of package. Currently supports only TXT-DICTIONARY. + // + // PackageType is a required field + PackageType *string `type:"string" required:"true" enum:"PackageType"` +} + +// String returns the string representation +func (s CreatePackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePackageInput"} + if s.PackageName == nil { + invalidParams.Add(request.NewErrParamRequired("PackageName")) + } + if s.PackageName != nil && len(*s.PackageName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("PackageName", 3)) + } + if s.PackageSource == nil { + invalidParams.Add(request.NewErrParamRequired("PackageSource")) + } + if s.PackageType == nil { + invalidParams.Add(request.NewErrParamRequired("PackageType")) + } + if s.PackageSource != nil { + if err := s.PackageSource.Validate(); err != nil { + invalidParams.AddNested("PackageSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLogPublishingOptions sets the LogPublishingOptions field's value. -func (s *CreateElasticsearchDomainInput) SetLogPublishingOptions(v map[string]*LogPublishingOption) *CreateElasticsearchDomainInput { - s.LogPublishingOptions = v +// SetPackageDescription sets the PackageDescription field's value. +func (s *CreatePackageInput) SetPackageDescription(v string) *CreatePackageInput { + s.PackageDescription = &v return s } -// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. -func (s *CreateElasticsearchDomainInput) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *CreateElasticsearchDomainInput { - s.NodeToNodeEncryptionOptions = v +// SetPackageName sets the PackageName field's value. +func (s *CreatePackageInput) SetPackageName(v string) *CreatePackageInput { + s.PackageName = &v return s } -// SetSnapshotOptions sets the SnapshotOptions field's value. -func (s *CreateElasticsearchDomainInput) SetSnapshotOptions(v *SnapshotOptions) *CreateElasticsearchDomainInput { - s.SnapshotOptions = v +// SetPackageSource sets the PackageSource field's value. +func (s *CreatePackageInput) SetPackageSource(v *PackageSource) *CreatePackageInput { + s.PackageSource = v return s } -// SetVPCOptions sets the VPCOptions field's value. -func (s *CreateElasticsearchDomainInput) SetVPCOptions(v *VPCOptions) *CreateElasticsearchDomainInput { - s.VPCOptions = v +// SetPackageType sets the PackageType field's value. +func (s *CreatePackageInput) SetPackageType(v string) *CreatePackageInput { + s.PackageType = &v return s } -// The result of a CreateElasticsearchDomain operation. Contains the status -// of the newly created Elasticsearch domain. -type CreateElasticsearchDomainOutput struct { +// Container for response returned by CreatePackage operation. +type CreatePackageOutput struct { _ struct{} `type:"structure"` - // The status of the newly created Elasticsearch domain. - DomainStatus *ElasticsearchDomainStatus `type:"structure"` + // Information about the package PackageDetails. + PackageDetails *PackageDetails `type:"structure"` } // String returns the string representation -func (s CreateElasticsearchDomainOutput) String() string { +func (s CreatePackageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateElasticsearchDomainOutput) GoString() string { +func (s CreatePackageOutput) GoString() string { return s.String() } -// SetDomainStatus sets the DomainStatus field's value. -func (s *CreateElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomainStatus) *CreateElasticsearchDomainOutput { - s.DomainStatus = v +// SetPackageDetails sets the PackageDetails field's value. +func (s *CreatePackageOutput) SetPackageDetails(v *PackageDetails) *CreatePackageOutput { + s.PackageDetails = v return s } @@ -3335,6 +4487,73 @@ func (s DeleteElasticsearchServiceRoleOutput) GoString() string { return s.String() } +// Container for request parameters to DeletePackage operation. +type DeletePackageInput struct { + _ struct{} `type:"structure"` + + // Internal ID of the package that you want to delete. Use DescribePackages + // to find this value. + // + // PackageID is a required field + PackageID *string `location:"uri" locationName:"PackageID" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePackageInput"} + if s.PackageID == nil { + invalidParams.Add(request.NewErrParamRequired("PackageID")) + } + if s.PackageID != nil && len(*s.PackageID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PackageID", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPackageID sets the PackageID field's value. +func (s *DeletePackageInput) SetPackageID(v string) *DeletePackageInput { + s.PackageID = &v + return s +} + +// Container for response parameters to DeletePackage operation. +type DeletePackageOutput struct { + _ struct{} `type:"structure"` + + // PackageDetails + PackageDetails *PackageDetails `type:"structure"` +} + +// String returns the string representation +func (s DeletePackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePackageOutput) GoString() string { + return s.String() +} + +// SetPackageDetails sets the PackageDetails field's value. +func (s *DeletePackageOutput) SetPackageDetails(v *PackageDetails) *DeletePackageOutput { + s.PackageDetails = v + return s +} + // Container for the parameters to the DescribeElasticsearchDomainConfig operation. // Specifies the domain name for which you want configuration information. type DescribeElasticsearchDomainConfigInput struct { @@ -3647,6 +4866,114 @@ func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[st return s } +// Filter to apply in DescribePackage response. +type DescribePackagesFilter struct { + _ struct{} `type:"structure"` + + // Any field from PackageDetails. + Name *string `type:"string" enum:"DescribePackagesFilterName"` + + // A list of values for the specified field. + Value []*string `type:"list"` +} + +// String returns the string representation +func (s DescribePackagesFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePackagesFilter) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *DescribePackagesFilter) SetName(v string) *DescribePackagesFilter { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *DescribePackagesFilter) SetValue(v []*string) *DescribePackagesFilter { + s.Value = v + return s +} + +// Container for request parameters to DescribePackage operation. +type DescribePackagesInput struct { + _ struct{} `type:"structure"` + + // Only returns packages that match the DescribePackagesFilterList values. + Filters []*DescribePackagesFilter `type:"list"` + + // Limits results to a maximum number of packages. + MaxResults *int64 `type:"integer"` + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribePackagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePackagesInput) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *DescribePackagesInput) SetFilters(v []*DescribePackagesFilter) *DescribePackagesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribePackagesInput) SetMaxResults(v int64) *DescribePackagesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePackagesInput) SetNextToken(v string) *DescribePackagesInput { + s.NextToken = &v + return s +} + +// Container for response returned by DescribePackages operation. +type DescribePackagesOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `type:"string"` + + // List of PackageDetails objects. + PackageDetailsList []*PackageDetails `type:"list"` +} + +// String returns the string representation +func (s DescribePackagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePackagesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePackagesOutput) SetNextToken(v string) *DescribePackagesOutput { + s.NextToken = &v + return s +} + +// SetPackageDetailsList sets the PackageDetailsList field's value. +func (s *DescribePackagesOutput) SetPackageDetailsList(v []*PackageDetails) *DescribePackagesOutput { + s.PackageDetailsList = v + return s +} + // Container for parameters to DescribeReservedElasticsearchInstanceOfferings type DescribeReservedElasticsearchInstanceOfferingsInput struct { _ struct{} `type:"structure"` @@ -3807,8 +5134,8 @@ func (s *DescribeReservedElasticsearchInstancesOutput) SetReservedElasticsearchI // An error occured because the client wanted to access a not supported operation. // Gives http status code of 409. type DisabledOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3825,17 +5152,17 @@ func (s DisabledOperationException) GoString() string { func newErrorDisabledOperationException(v protocol.ResponseMetadata) error { return &DisabledOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DisabledOperationException) Code() string { +func (s *DisabledOperationException) Code() string { return "DisabledOperationException" } // Message returns the exception's message. -func (s DisabledOperationException) Message() string { +func (s *DisabledOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3843,22 +5170,106 @@ func (s DisabledOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DisabledOperationException) OrigErr() error { +func (s *DisabledOperationException) OrigErr() error { return nil } -func (s DisabledOperationException) Error() string { +func (s *DisabledOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DisabledOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DisabledOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DisabledOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *DisabledOperationException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Container for request parameters to DissociatePackage operation. +type DissociatePackageInput struct { + _ struct{} `type:"structure"` + + // Name of the domain that you want to associate the package with. + // + // DomainName is a required field + DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` + + // Internal ID of the package that you want to associate with a domain. Use + // DescribePackages to find this value. + // + // PackageID is a required field + PackageID *string `location:"uri" locationName:"PackageID" type:"string" required:"true"` +} + +// String returns the string representation +func (s DissociatePackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DissociatePackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DissociatePackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DissociatePackageInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.PackageID == nil { + invalidParams.Add(request.NewErrParamRequired("PackageID")) + } + if s.PackageID != nil && len(*s.PackageID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PackageID", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DissociatePackageInput) SetDomainName(v string) *DissociatePackageInput { + s.DomainName = &v + return s +} + +// SetPackageID sets the PackageID field's value. +func (s *DissociatePackageInput) SetPackageID(v string) *DissociatePackageInput { + s.PackageID = &v + return s +} + +// Container for response returned by DissociatePackage operation. +type DissociatePackageOutput struct { + _ struct{} `type:"structure"` + + // DomainPackageDetails + DomainPackageDetails *DomainPackageDetails `type:"structure"` +} + +// String returns the string representation +func (s DissociatePackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DissociatePackageOutput) GoString() string { + return s.String() +} + +// SetDomainPackageDetails sets the DomainPackageDetails field's value. +func (s *DissociatePackageOutput) SetDomainPackageDetails(v *DomainPackageDetails) *DissociatePackageOutput { + s.DomainPackageDetails = v + return s } // Options to configure endpoint for the Elasticsearch domain. @@ -3950,14 +5361,102 @@ func (s DomainInfo) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s DomainInfo) GoString() string { - return s.String() +// GoString returns the string representation +func (s DomainInfo) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *DomainInfo) SetDomainName(v string) *DomainInfo { + s.DomainName = &v + return s +} + +// Information on a package that is associated with a domain. +type DomainPackageDetails struct { + _ struct{} `type:"structure"` + + // Name of the domain you've associated a package with. + DomainName *string `min:"3" type:"string"` + + // State of the association. Values are ASSOCIATING/ASSOCIATION_FAILED/ACTIVE/DISSOCIATING/DISSOCIATION_FAILED. + DomainPackageStatus *string `type:"string" enum:"DomainPackageStatus"` + + // Additional information if the package is in an error state. Null otherwise. + ErrorDetails *ErrorDetails `type:"structure"` + + // Timestamp of the most-recent update to the association status. + LastUpdated *time.Time `type:"timestamp"` + + // Internal ID of the package. + PackageID *string `type:"string"` + + // User specified name of the package. + PackageName *string `min:"3" type:"string"` + + // Currently supports only TXT-DICTIONARY. + PackageType *string `type:"string" enum:"PackageType"` + + // The relative path on Amazon ES nodes, which can be used as synonym_path when + // the package is synonym file. + ReferencePath *string `type:"string"` +} + +// String returns the string representation +func (s DomainPackageDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainPackageDetails) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *DomainPackageDetails) SetDomainName(v string) *DomainPackageDetails { + s.DomainName = &v + return s +} + +// SetDomainPackageStatus sets the DomainPackageStatus field's value. +func (s *DomainPackageDetails) SetDomainPackageStatus(v string) *DomainPackageDetails { + s.DomainPackageStatus = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *DomainPackageDetails) SetErrorDetails(v *ErrorDetails) *DomainPackageDetails { + s.ErrorDetails = v + return s +} + +// SetLastUpdated sets the LastUpdated field's value. +func (s *DomainPackageDetails) SetLastUpdated(v time.Time) *DomainPackageDetails { + s.LastUpdated = &v + return s +} + +// SetPackageID sets the PackageID field's value. +func (s *DomainPackageDetails) SetPackageID(v string) *DomainPackageDetails { + s.PackageID = &v + return s +} + +// SetPackageName sets the PackageName field's value. +func (s *DomainPackageDetails) SetPackageName(v string) *DomainPackageDetails { + s.PackageName = &v + return s +} + +// SetPackageType sets the PackageType field's value. +func (s *DomainPackageDetails) SetPackageType(v string) *DomainPackageDetails { + s.PackageType = &v + return s } -// SetDomainName sets the DomainName field's value. -func (s *DomainInfo) SetDomainName(v string) *DomainInfo { - s.DomainName = &v +// SetReferencePath sets the ReferencePath field's value. +func (s *DomainPackageDetails) SetReferencePath(v string) *DomainPackageDetails { + s.ReferencePath = &v return s } @@ -4708,6 +6207,36 @@ func (s *EncryptionAtRestOptionsStatus) SetStatus(v *OptionStatus) *EncryptionAt return s } +type ErrorDetails struct { + _ struct{} `type:"structure"` + + ErrorMessage *string `type:"string"` + + ErrorType *string `type:"string"` +} + +// String returns the string representation +func (s ErrorDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ErrorDetails) GoString() string { + return s.String() +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ErrorDetails) SetErrorMessage(v string) *ErrorDetails { + s.ErrorMessage = &v + return s +} + +// SetErrorType sets the ErrorType field's value. +func (s *ErrorDetails) SetErrorType(v string) *ErrorDetails { + s.ErrorType = &v + return s +} + // Container for request parameters to GetCompatibleElasticsearchVersions operation. type GetCompatibleElasticsearchVersionsInput struct { _ struct{} `type:"structure"` @@ -5039,8 +6568,8 @@ func (s *InstanceLimits) SetInstanceCountLimits(v *InstanceCountLimits) *Instanc // or failure (the failure is internal to the service) . Gives http status code // of 500. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5057,17 +6586,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5075,29 +6604,29 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // An exception for trying to create or access sub-resource that is either invalid // or not supported. Gives http status code of 409. type InvalidTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5114,17 +6643,17 @@ func (s InvalidTypeException) GoString() string { func newErrorInvalidTypeException(v protocol.ResponseMetadata) error { return &InvalidTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTypeException) Code() string { +func (s *InvalidTypeException) Code() string { return "InvalidTypeException" } // Message returns the exception's message. -func (s InvalidTypeException) Message() string { +func (s *InvalidTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5132,29 +6661,29 @@ func (s InvalidTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTypeException) OrigErr() error { +func (s *InvalidTypeException) OrigErr() error { return nil } -func (s InvalidTypeException) Error() string { +func (s *InvalidTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTypeException) RequestID() string { + return s.RespMetadata.RequestID } // An exception for trying to create more than allowed resources or sub-resources. // Gives http status code of 409. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5171,17 +6700,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5189,22 +6718,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Limits for given InstanceType and for each of it's role. Limits contains @@ -5292,6 +6821,99 @@ func (s *ListDomainNamesOutput) SetDomainNames(v []*DomainInfo) *ListDomainNames return s } +// Container for request parameters to ListDomainsForPackage operation. +type ListDomainsForPackageInput struct { + _ struct{} `type:"structure"` + + // Limits results to a maximum number of domains. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The package for which to list domains. + // + // PackageID is a required field + PackageID *string `location:"uri" locationName:"PackageID" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListDomainsForPackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainsForPackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDomainsForPackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDomainsForPackageInput"} + if s.PackageID == nil { + invalidParams.Add(request.NewErrParamRequired("PackageID")) + } + if s.PackageID != nil && len(*s.PackageID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PackageID", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDomainsForPackageInput) SetMaxResults(v int64) *ListDomainsForPackageInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDomainsForPackageInput) SetNextToken(v string) *ListDomainsForPackageInput { + s.NextToken = &v + return s +} + +// SetPackageID sets the PackageID field's value. +func (s *ListDomainsForPackageInput) SetPackageID(v string) *ListDomainsForPackageInput { + s.PackageID = &v + return s +} + +// Container for response parameters to ListDomainsForPackage operation. +type ListDomainsForPackageOutput struct { + _ struct{} `type:"structure"` + + // List of DomainPackageDetails objects. + DomainPackageDetailsList []*DomainPackageDetails `type:"list"` + + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDomainsForPackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainsForPackageOutput) GoString() string { + return s.String() +} + +// SetDomainPackageDetailsList sets the DomainPackageDetailsList field's value. +func (s *ListDomainsForPackageOutput) SetDomainPackageDetailsList(v []*DomainPackageDetails) *ListDomainsForPackageOutput { + s.DomainPackageDetailsList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDomainsForPackageOutput) SetNextToken(v string) *ListDomainsForPackageOutput { + s.NextToken = &v + return s +} + // Container for the parameters to the ListElasticsearchInstanceTypes operation. type ListElasticsearchInstanceTypesInput struct { _ struct{} `type:"structure"` @@ -5482,6 +7104,101 @@ func (s *ListElasticsearchVersionsOutput) SetNextToken(v string) *ListElasticsea return s } +// Container for request parameters to ListPackagesForDomain operation. +type ListPackagesForDomainInput struct { + _ struct{} `type:"structure"` + + // The name of the domain for which you want to list associated packages. + // + // DomainName is a required field + DomainName *string `location:"uri" locationName:"DomainName" min:"3" type:"string" required:"true"` + + // Limits results to a maximum number of packages. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListPackagesForDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPackagesForDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPackagesForDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPackagesForDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *ListPackagesForDomainInput) SetDomainName(v string) *ListPackagesForDomainInput { + s.DomainName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListPackagesForDomainInput) SetMaxResults(v int64) *ListPackagesForDomainInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPackagesForDomainInput) SetNextToken(v string) *ListPackagesForDomainInput { + s.NextToken = &v + return s +} + +// Container for response parameters to ListPackagesForDomain operation. +type ListPackagesForDomainOutput struct { + _ struct{} `type:"structure"` + + // List of DomainPackageDetails objects. + DomainPackageDetailsList []*DomainPackageDetails `type:"list"` + + // Pagination token that needs to be supplied to the next call to get the next + // page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListPackagesForDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPackagesForDomainOutput) GoString() string { + return s.String() +} + +// SetDomainPackageDetailsList sets the DomainPackageDetailsList field's value. +func (s *ListPackagesForDomainOutput) SetDomainPackageDetailsList(v []*DomainPackageDetails) *ListPackagesForDomainOutput { + s.DomainPackageDetailsList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPackagesForDomainOutput) SetNextToken(v string) *ListPackagesForDomainOutput { + s.NextToken = &v + return s +} + // Container for the parameters to the ListTags operation. Specify the ARN for // the Elasticsearch domain to which the tags are attached that you want to // view are attached. @@ -5812,6 +7529,130 @@ func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { return s } +// Basic information about a package. +type PackageDetails struct { + _ struct{} `type:"structure"` + + // Timestamp which tells creation date of the package. + CreatedAt *time.Time `type:"timestamp"` + + // Additional information if the package is in an error state. Null otherwise. + ErrorDetails *ErrorDetails `type:"structure"` + + // User-specified description of the package. + PackageDescription *string `type:"string"` + + // Internal ID of the package. + PackageID *string `type:"string"` + + // User specified name of the package. + PackageName *string `min:"3" type:"string"` + + // Current state of the package. Values are COPYING/COPY_FAILED/AVAILABLE/DELETING/DELETE_FAILED + PackageStatus *string `type:"string" enum:"PackageStatus"` + + // Currently supports only TXT-DICTIONARY. + PackageType *string `type:"string" enum:"PackageType"` +} + +// String returns the string representation +func (s PackageDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PackageDetails) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *PackageDetails) SetCreatedAt(v time.Time) *PackageDetails { + s.CreatedAt = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *PackageDetails) SetErrorDetails(v *ErrorDetails) *PackageDetails { + s.ErrorDetails = v + return s +} + +// SetPackageDescription sets the PackageDescription field's value. +func (s *PackageDetails) SetPackageDescription(v string) *PackageDetails { + s.PackageDescription = &v + return s +} + +// SetPackageID sets the PackageID field's value. +func (s *PackageDetails) SetPackageID(v string) *PackageDetails { + s.PackageID = &v + return s +} + +// SetPackageName sets the PackageName field's value. +func (s *PackageDetails) SetPackageName(v string) *PackageDetails { + s.PackageName = &v + return s +} + +// SetPackageStatus sets the PackageStatus field's value. +func (s *PackageDetails) SetPackageStatus(v string) *PackageDetails { + s.PackageStatus = &v + return s +} + +// SetPackageType sets the PackageType field's value. +func (s *PackageDetails) SetPackageType(v string) *PackageDetails { + s.PackageType = &v + return s +} + +// The S3 location for importing the package specified as S3BucketName and S3Key +type PackageSource struct { + _ struct{} `type:"structure"` + + // Name of the bucket containing the package. + S3BucketName *string `min:"3" type:"string"` + + // Key (file name) of the package. + S3Key *string `type:"string"` +} + +// String returns the string representation +func (s PackageSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PackageSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PackageSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PackageSource"} + if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *PackageSource) SetS3BucketName(v string) *PackageSource { + s.S3BucketName = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *PackageSource) SetS3Key(v string) *PackageSource { + s.S3Key = &v + return s +} + // Container for parameters to PurchaseReservedElasticsearchInstanceOffering type PurchaseReservedElasticsearchInstanceOfferingInput struct { _ struct{} `type:"structure"` @@ -6248,8 +8089,8 @@ func (s *ReservedElasticsearchInstanceOffering) SetUsagePrice(v float64) *Reserv // An exception for creating a resource that already exists. Gives http status // code of 400. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6266,17 +8107,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6284,29 +8125,29 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An exception for accessing or deleting a resource that does not exist. Gives // http status code of 400. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6323,17 +8164,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6341,22 +8182,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The current options of an Elasticsearch domain service software options. @@ -6380,6 +8221,10 @@ type ServiceSoftwareOptions struct { // The new service software version if one is available. NewVersion *string `type:"string"` + // True if a service software is never automatically updated. False if a service + // software is automatically updated after AutomatedUpdateDate. + OptionalDeployment *bool `type:"boolean"` + // True if you are able to update you service software version. False if you // are not able to update your service software version. UpdateAvailable *bool `type:"boolean"` @@ -6429,6 +8274,12 @@ func (s *ServiceSoftwareOptions) SetNewVersion(v string) *ServiceSoftwareOptions return s } +// SetOptionalDeployment sets the OptionalDeployment field's value. +func (s *ServiceSoftwareOptions) SetOptionalDeployment(v bool) *ServiceSoftwareOptions { + s.OptionalDeployment = &v + return s +} + // SetUpdateAvailable sets the UpdateAvailable field's value. func (s *ServiceSoftwareOptions) SetUpdateAvailable(v bool) *ServiceSoftwareOptions { s.UpdateAvailable = &v @@ -7273,8 +9124,8 @@ func (s *VPCOptions) SetSubnetIds(v []*string) *VPCOptions { // An exception for missing / invalid input fields. Gives http status code of // 400. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7291,17 +9142,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7309,22 +9160,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the zone awareness configuration for the domain cluster, such as @@ -7371,6 +9222,34 @@ const ( DeploymentStatusEligible = "ELIGIBLE" ) +const ( + // DescribePackagesFilterNamePackageId is a DescribePackagesFilterName enum value + DescribePackagesFilterNamePackageId = "PackageID" + + // DescribePackagesFilterNamePackageName is a DescribePackagesFilterName enum value + DescribePackagesFilterNamePackageName = "PackageName" + + // DescribePackagesFilterNamePackageStatus is a DescribePackagesFilterName enum value + DescribePackagesFilterNamePackageStatus = "PackageStatus" +) + +const ( + // DomainPackageStatusAssociating is a DomainPackageStatus enum value + DomainPackageStatusAssociating = "ASSOCIATING" + + // DomainPackageStatusAssociationFailed is a DomainPackageStatus enum value + DomainPackageStatusAssociationFailed = "ASSOCIATION_FAILED" + + // DomainPackageStatusActive is a DomainPackageStatus enum value + DomainPackageStatusActive = "ACTIVE" + + // DomainPackageStatusDissociating is a DomainPackageStatus enum value + DomainPackageStatusDissociating = "DISSOCIATING" + + // DomainPackageStatusDissociationFailed is a DomainPackageStatus enum value + DomainPackageStatusDissociationFailed = "DISSOCIATION_FAILED" +) + const ( // ESPartitionInstanceTypeM3MediumElasticsearch is a ESPartitionInstanceType enum value ESPartitionInstanceTypeM3MediumElasticsearch = "m3.medium.elasticsearch" @@ -7593,6 +9472,37 @@ const ( OptionStateActive = "Active" ) +const ( + // PackageStatusCopying is a PackageStatus enum value + PackageStatusCopying = "COPYING" + + // PackageStatusCopyFailed is a PackageStatus enum value + PackageStatusCopyFailed = "COPY_FAILED" + + // PackageStatusValidating is a PackageStatus enum value + PackageStatusValidating = "VALIDATING" + + // PackageStatusValidationFailed is a PackageStatus enum value + PackageStatusValidationFailed = "VALIDATION_FAILED" + + // PackageStatusAvailable is a PackageStatus enum value + PackageStatusAvailable = "AVAILABLE" + + // PackageStatusDeleting is a PackageStatus enum value + PackageStatusDeleting = "DELETING" + + // PackageStatusDeleted is a PackageStatus enum value + PackageStatusDeleted = "DELETED" + + // PackageStatusDeleteFailed is a PackageStatus enum value + PackageStatusDeleteFailed = "DELETE_FAILED" +) + +const ( + // PackageTypeTxtDictionary is a PackageType enum value + PackageTypeTxtDictionary = "TXT-DICTIONARY" +) + const ( // ReservedElasticsearchInstancePaymentOptionAllUpfront is a ReservedElasticsearchInstancePaymentOption enum value ReservedElasticsearchInstancePaymentOptionAllUpfront = "ALL_UPFRONT" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go index 9773068cafa..d0ca4fe8804 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go @@ -8,12 +8,26 @@ import ( const ( + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // An error occurred because user does not have permissions to access the resource. + // Returns HTTP status code 403. + ErrCodeAccessDeniedException = "AccessDeniedException" + // ErrCodeBaseException for service response error code // "BaseException". // // An error occurred while processing the request. ErrCodeBaseException = "BaseException" + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // An error occurred because the client attempts to remove a resource that is + // currently in use. Returns HTTP status code 409. + ErrCodeConflictException = "ConflictException" + // ErrCodeDisabledOperationException for service response error code // "DisabledOperationException". // @@ -66,7 +80,9 @@ const ( ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, "BaseException": newErrorBaseException, + "ConflictException": newErrorConflictException, "DisabledOperationException": newErrorDisabledOperationException, "InternalException": newErrorInternalException, "InvalidTypeException": newErrorInvalidTypeException, 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 504a3e30815..7d37b50e969 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 @@ -1865,8 +1865,8 @@ func (c *ElasticTranscoder) UpdatePipelineStatusWithContext(ctx aws.Context, inp // General authentication failure. The request was not signed correctly. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1883,17 +1883,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1901,22 +1901,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The file to be used as album art. There can be multiple artworks associated @@ -4095,8 +4095,8 @@ func (s *HlsContentProtection) SetMethod(v string) *HlsContentProtection { } type IncompatibleVersionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4113,17 +4113,17 @@ func (s IncompatibleVersionException) GoString() string { func newErrorIncompatibleVersionException(v protocol.ResponseMetadata) error { return &IncompatibleVersionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncompatibleVersionException) Code() string { +func (s *IncompatibleVersionException) Code() string { return "IncompatibleVersionException" } // Message returns the exception's message. -func (s IncompatibleVersionException) Message() string { +func (s *IncompatibleVersionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4131,22 +4131,22 @@ func (s IncompatibleVersionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncompatibleVersionException) OrigErr() error { +func (s *IncompatibleVersionException) OrigErr() error { return nil } -func (s IncompatibleVersionException) Error() string { +func (s *IncompatibleVersionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncompatibleVersionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncompatibleVersionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncompatibleVersionException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncompatibleVersionException) RequestID() string { + return s.RespMetadata.RequestID } // The captions to be created, if any. @@ -4224,8 +4224,8 @@ func (s *InputCaptions) SetMergePolicy(v string) *InputCaptions { // Elastic Transcoder encountered an unexpected exception while trying to fulfill // the request. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4242,17 +4242,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4260,22 +4260,22 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // A section of the response body that provides information about the job that @@ -5131,8 +5131,8 @@ func (s *JobWatermark) SetPresetWatermarkId(v string) *JobWatermark { // Too many operations for a given AWS account. For example, the number of pipelines // exceeds the maximum allowed. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5149,17 +5149,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5167,22 +5167,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The ListJobsByPipelineRequest structure. @@ -6763,8 +6763,8 @@ func (s *ReadPresetOutput) SetPreset(v *Preset) *ReadPresetOutput { // The resource you are attempting to change is in use. For example, you are // attempting to delete a pipeline that is currently in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6781,17 +6781,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6799,30 +6799,30 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource does not exist or is not available. For example, the // pipeline to which you're trying to add a job doesn't exist or is still being // created. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6839,17 +6839,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6857,22 +6857,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The TestRoleRequest structure. @@ -7708,8 +7708,8 @@ func (s *UpdatePipelineStatusOutput) SetPipeline(v *Pipeline) *UpdatePipelineSta // One or more required parameter values were not provided in the request. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7726,17 +7726,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7744,22 +7744,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // The VideoParameters structure. 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 f0de166ef22..3633bd5f97e 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 @@ -1059,6 +1059,80 @@ func (c *EMR) GetBlockPublicAccessConfigurationWithContext(ctx aws.Context, inpu return out, req.Send() } +const opGetManagedScalingPolicy = "GetManagedScalingPolicy" + +// GetManagedScalingPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetManagedScalingPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetManagedScalingPolicy for more information on using the GetManagedScalingPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetManagedScalingPolicyRequest method. +// req, resp := client.GetManagedScalingPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetManagedScalingPolicy +func (c *EMR) GetManagedScalingPolicyRequest(input *GetManagedScalingPolicyInput) (req *request.Request, output *GetManagedScalingPolicyOutput) { + op := &request.Operation{ + Name: opGetManagedScalingPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetManagedScalingPolicyInput{} + } + + output = &GetManagedScalingPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetManagedScalingPolicy API operation for Amazon Elastic MapReduce. +// +// Fetches the attached managed scaling policy for an Amazon EMR cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic MapReduce's +// API operation GetManagedScalingPolicy for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetManagedScalingPolicy +func (c *EMR) GetManagedScalingPolicy(input *GetManagedScalingPolicyInput) (*GetManagedScalingPolicyOutput, error) { + req, out := c.GetManagedScalingPolicyRequest(input) + return out, req.Send() +} + +// GetManagedScalingPolicyWithContext is the same as GetManagedScalingPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetManagedScalingPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EMR) GetManagedScalingPolicyWithContext(ctx aws.Context, input *GetManagedScalingPolicyInput, opts ...request.Option) (*GetManagedScalingPolicyOutput, error) { + req, out := c.GetManagedScalingPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListBootstrapActions = "ListBootstrapActions" // ListBootstrapActionsRequest generates a "aws/request.Request" representing the @@ -2473,6 +2547,84 @@ func (c *EMR) PutBlockPublicAccessConfigurationWithContext(ctx aws.Context, inpu return out, req.Send() } +const opPutManagedScalingPolicy = "PutManagedScalingPolicy" + +// PutManagedScalingPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutManagedScalingPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutManagedScalingPolicy for more information on using the PutManagedScalingPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutManagedScalingPolicyRequest method. +// req, resp := client.PutManagedScalingPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutManagedScalingPolicy +func (c *EMR) PutManagedScalingPolicyRequest(input *PutManagedScalingPolicyInput) (req *request.Request, output *PutManagedScalingPolicyOutput) { + op := &request.Operation{ + Name: opPutManagedScalingPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutManagedScalingPolicyInput{} + } + + output = &PutManagedScalingPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutManagedScalingPolicy API operation for Amazon Elastic MapReduce. +// +// Creates or updates a managed scaling policy for an Amazon EMR cluster. The +// managed scaling policy defines the limits for resources, such as EC2 instances +// that can be added or terminated from a cluster. The policy only applies to +// the core and task nodes. The master node cannot be scaled after initial 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 Elastic MapReduce's +// API operation PutManagedScalingPolicy for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutManagedScalingPolicy +func (c *EMR) PutManagedScalingPolicy(input *PutManagedScalingPolicyInput) (*PutManagedScalingPolicyOutput, error) { + req, out := c.PutManagedScalingPolicyRequest(input) + return out, req.Send() +} + +// PutManagedScalingPolicyWithContext is the same as PutManagedScalingPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutManagedScalingPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EMR) PutManagedScalingPolicyWithContext(ctx aws.Context, input *PutManagedScalingPolicyInput, opts ...request.Option) (*PutManagedScalingPolicyOutput, error) { + req, out := c.PutManagedScalingPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveAutoScalingPolicy = "RemoveAutoScalingPolicy" // RemoveAutoScalingPolicyRequest generates a "aws/request.Request" representing the @@ -2549,6 +2701,81 @@ func (c *EMR) RemoveAutoScalingPolicyWithContext(ctx aws.Context, input *RemoveA return out, req.Send() } +const opRemoveManagedScalingPolicy = "RemoveManagedScalingPolicy" + +// RemoveManagedScalingPolicyRequest generates a "aws/request.Request" representing the +// client's request for the RemoveManagedScalingPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveManagedScalingPolicy for more information on using the RemoveManagedScalingPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveManagedScalingPolicyRequest method. +// req, resp := client.RemoveManagedScalingPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveManagedScalingPolicy +func (c *EMR) RemoveManagedScalingPolicyRequest(input *RemoveManagedScalingPolicyInput) (req *request.Request, output *RemoveManagedScalingPolicyOutput) { + op := &request.Operation{ + Name: opRemoveManagedScalingPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveManagedScalingPolicyInput{} + } + + output = &RemoveManagedScalingPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveManagedScalingPolicy API operation for Amazon Elastic MapReduce. +// +// Removes a managed scaling policy from a specified EMR cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic MapReduce's +// API operation RemoveManagedScalingPolicy for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveManagedScalingPolicy +func (c *EMR) RemoveManagedScalingPolicy(input *RemoveManagedScalingPolicyInput) (*RemoveManagedScalingPolicyOutput, error) { + req, out := c.RemoveManagedScalingPolicyRequest(input) + return out, req.Send() +} + +// RemoveManagedScalingPolicyWithContext is the same as RemoveManagedScalingPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveManagedScalingPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EMR) RemoveManagedScalingPolicyWithContext(ctx aws.Context, input *RemoveManagedScalingPolicyInput, opts ...request.Option) (*RemoveManagedScalingPolicyOutput, error) { + req, out := c.RemoveManagedScalingPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the @@ -4646,6 +4873,97 @@ func (s *Command) SetScriptPath(v string) *Command { return s } +// The EC2 unit limits for a managed scaling policy. The managed scaling activity +// of a cluster can not be above or below these limits. The limit only applies +// to the core and task nodes. The master node cannot be scaled after initial +// configuration. +type ComputeLimits struct { + _ struct{} `type:"structure"` + + // The upper boundary of EC2 units. It is measured through VCPU cores or instances + // for instance groups and measured through units for instance fleets. Managed + // scaling activities are not allowed beyond this boundary. The limit only applies + // to the core and task nodes. The master node cannot be scaled after initial + // configuration. + // + // MaximumCapacityUnits is a required field + MaximumCapacityUnits *int64 `type:"integer" required:"true"` + + // The upper boundary of on-demand EC2 units. It is measured through VCPU cores + // or instances for instance groups and measured through units for instance + // fleets. The on-demand units are not allowed to scale beyond this boundary. + // The limit only applies to the core and task nodes. The master node cannot + // be scaled after initial configuration. + MaximumOnDemandCapacityUnits *int64 `type:"integer"` + + // The lower boundary of EC2 units. It is measured through VCPU cores or instances + // for instance groups and measured through units for instance fleets. Managed + // scaling activities are not allowed beyond this boundary. The limit only applies + // to the core and task nodes. The master node cannot be scaled after initial + // configuration. + // + // MinimumCapacityUnits is a required field + MinimumCapacityUnits *int64 `type:"integer" required:"true"` + + // The unit type used for specifying a managed scaling policy. + // + // UnitType is a required field + UnitType *string `type:"string" required:"true" enum:"ComputeLimitsUnitType"` +} + +// String returns the string representation +func (s ComputeLimits) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComputeLimits) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ComputeLimits) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ComputeLimits"} + if s.MaximumCapacityUnits == nil { + invalidParams.Add(request.NewErrParamRequired("MaximumCapacityUnits")) + } + if s.MinimumCapacityUnits == nil { + invalidParams.Add(request.NewErrParamRequired("MinimumCapacityUnits")) + } + if s.UnitType == nil { + invalidParams.Add(request.NewErrParamRequired("UnitType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaximumCapacityUnits sets the MaximumCapacityUnits field's value. +func (s *ComputeLimits) SetMaximumCapacityUnits(v int64) *ComputeLimits { + s.MaximumCapacityUnits = &v + return s +} + +// SetMaximumOnDemandCapacityUnits sets the MaximumOnDemandCapacityUnits field's value. +func (s *ComputeLimits) SetMaximumOnDemandCapacityUnits(v int64) *ComputeLimits { + s.MaximumOnDemandCapacityUnits = &v + return s +} + +// SetMinimumCapacityUnits sets the MinimumCapacityUnits field's value. +func (s *ComputeLimits) SetMinimumCapacityUnits(v int64) *ComputeLimits { + s.MinimumCapacityUnits = &v + return s +} + +// SetUnitType sets the UnitType field's value. +func (s *ComputeLimits) SetUnitType(v string) *ComputeLimits { + s.UnitType = &v + return s +} + // // Amazon EMR releases 4.x or later. // @@ -5521,6 +5839,12 @@ type GetBlockPublicAccessConfigurationOutput struct { // and public access is allowed on this port. You can change this by updating // the block public access configuration to remove the exception. // + // For accounts that created clusters in a Region before November 25, 2019, + // block public access is disabled by default in that Region. To use this feature, + // you must manually enable and configure it. For accounts that did not create + // an EMR cluster in a Region before this date, block public access is enabled + // by default in that Region. + // // BlockPublicAccessConfiguration is a required field BlockPublicAccessConfiguration *BlockPublicAccessConfiguration `type:"structure" required:"true"` @@ -5555,6 +5879,68 @@ func (s *GetBlockPublicAccessConfigurationOutput) SetBlockPublicAccessConfigurat return s } +type GetManagedScalingPolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the ID of the cluster for which the managed scaling policy will + // be fetched. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetManagedScalingPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetManagedScalingPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetManagedScalingPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetManagedScalingPolicyInput"} + 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 *GetManagedScalingPolicyInput) SetClusterId(v string) *GetManagedScalingPolicyInput { + s.ClusterId = &v + return s +} + +type GetManagedScalingPolicyOutput struct { + _ struct{} `type:"structure"` + + // Specifies the managed scaling policy that is attached to an Amazon EMR cluster. + ManagedScalingPolicy *ManagedScalingPolicy `type:"structure"` +} + +// String returns the string representation +func (s GetManagedScalingPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetManagedScalingPolicyOutput) GoString() string { + return s.String() +} + +// SetManagedScalingPolicy sets the ManagedScalingPolicy field's value. +func (s *GetManagedScalingPolicyOutput) SetManagedScalingPolicy(v *ManagedScalingPolicy) *GetManagedScalingPolicyOutput { + s.ManagedScalingPolicy = v + return s +} + // A job flow step consisting of a JAR file whose main function will be executed. // The main function submits a job for Hadoop to execute and waits for the job // to finish or fail. @@ -7392,8 +7778,8 @@ func (s *InstanceTypeSpecification) SetWeightedCapacity(v int64) *InstanceTypeSp // Indicates that an error occurred while processing the request and that the // request was not completed. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7410,17 +7796,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7428,28 +7814,28 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // This exception occurs when there is an internal failure in the EMR service. type InternalServerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message associated with the exception. Message_ *string `locationName:"Message" type:"string"` @@ -7467,17 +7853,17 @@ func (s InternalServerException) GoString() string { func newErrorInternalServerException(v protocol.ResponseMetadata) error { return &InternalServerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerException) Code() string { +func (s *InternalServerException) Code() string { return "InternalServerException" } // Message returns the exception's message. -func (s InternalServerException) Message() string { +func (s *InternalServerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7485,28 +7871,28 @@ func (s InternalServerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerException) OrigErr() error { +func (s *InternalServerException) OrigErr() error { return nil } -func (s InternalServerException) Error() string { +func (s *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID } // This exception occurs when there is something wrong with user input. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error code associated with the exception. ErrorCode *string `min:"1" type:"string"` @@ -7527,17 +7913,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7545,22 +7931,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // A description of a cluster (job flow). @@ -8933,6 +9319,51 @@ func (s *ListStepsOutput) SetSteps(v []*StepSummary) *ListStepsOutput { return s } +// Managed scaling policy for an Amazon EMR cluster. The policy specifies the +// limits for resources that can be added or terminated from a cluster. The +// policy only applies to the core and task nodes. The master node cannot be +// scaled after initial configuration. +type ManagedScalingPolicy struct { + _ struct{} `type:"structure"` + + // The EC2 unit limits for a managed scaling policy. The managed scaling activity + // of a cluster is not allowed to go above or below these limits. The limit + // only applies to the core and task nodes. The master node cannot be scaled + // after initial configuration. + ComputeLimits *ComputeLimits `type:"structure"` +} + +// String returns the string representation +func (s ManagedScalingPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ManagedScalingPolicy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ManagedScalingPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ManagedScalingPolicy"} + if s.ComputeLimits != nil { + if err := s.ComputeLimits.Validate(); err != nil { + invalidParams.AddNested("ComputeLimits", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetComputeLimits sets the ComputeLimits field's value. +func (s *ManagedScalingPolicy) SetComputeLimits(v *ComputeLimits) *ManagedScalingPolicy { + s.ComputeLimits = v + return s +} + // A CloudWatch dimension, which is specified using a Key (known as a Name in // CloudWatch), Value pair. By default, Amazon EMR uses one dimension whose // Key is JobFlowID and Value is a variable representing the cluster ID, which @@ -9407,6 +9838,12 @@ type PutBlockPublicAccessConfigurationInput struct { // and public access is allowed on this port. You can change this by updating // BlockPublicSecurityGroupRules to remove the exception. // + // For accounts that created clusters in a Region before November 25, 2019, + // block public access is disabled by default in that Region. To use this feature, + // you must manually enable and configure it. For accounts that did not create + // an EMR cluster in a Region before this date, block public access is enabled + // by default in that Region. + // // BlockPublicAccessConfiguration is a required field BlockPublicAccessConfiguration *BlockPublicAccessConfiguration `type:"structure" required:"true"` } @@ -9459,6 +9896,77 @@ func (s PutBlockPublicAccessConfigurationOutput) GoString() string { return s.String() } +type PutManagedScalingPolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the ID of an EMR cluster where the managed scaling policy is attached. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // Specifies the constraints for the managed scaling policy. + // + // ManagedScalingPolicy is a required field + ManagedScalingPolicy *ManagedScalingPolicy `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutManagedScalingPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutManagedScalingPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutManagedScalingPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutManagedScalingPolicyInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + if s.ManagedScalingPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ManagedScalingPolicy")) + } + if s.ManagedScalingPolicy != nil { + if err := s.ManagedScalingPolicy.Validate(); err != nil { + invalidParams.AddNested("ManagedScalingPolicy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *PutManagedScalingPolicyInput) SetClusterId(v string) *PutManagedScalingPolicyInput { + s.ClusterId = &v + return s +} + +// SetManagedScalingPolicy sets the ManagedScalingPolicy field's value. +func (s *PutManagedScalingPolicyInput) SetManagedScalingPolicy(v *ManagedScalingPolicy) *PutManagedScalingPolicyInput { + s.ManagedScalingPolicy = v + return s +} + +type PutManagedScalingPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutManagedScalingPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutManagedScalingPolicyOutput) GoString() string { + return s.String() +} + type RemoveAutoScalingPolicyInput struct { _ struct{} `type:"structure"` @@ -9526,6 +10034,59 @@ func (s RemoveAutoScalingPolicyOutput) GoString() string { return s.String() } +type RemoveManagedScalingPolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the ID of the cluster from which the managed scaling policy will + // be removed. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveManagedScalingPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveManagedScalingPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveManagedScalingPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveManagedScalingPolicyInput"} + 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 *RemoveManagedScalingPolicyInput) SetClusterId(v string) *RemoveManagedScalingPolicyInput { + s.ClusterId = &v + return s +} + +type RemoveManagedScalingPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveManagedScalingPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveManagedScalingPolicyOutput) GoString() string { + return s.String() +} + // This input identifies a cluster and a list of tags to remove. type RemoveTagsInput struct { _ struct{} `type:"structure"` @@ -9663,6 +10224,9 @@ type RunJobFlowInput struct { // is not provided, logs are not created. LogUri *string `type:"string"` + // The specified managed scaling policy for an Amazon EMR cluster. + ManagedScalingPolicy *ManagedScalingPolicy `type:"structure"` + // The name of the job flow. // // Name is a required field @@ -9804,6 +10368,11 @@ func (s *RunJobFlowInput) Validate() error { invalidParams.AddNested("KerberosAttributes", err.(request.ErrInvalidParams)) } } + if s.ManagedScalingPolicy != nil { + if err := s.ManagedScalingPolicy.Validate(); err != nil { + invalidParams.AddNested("ManagedScalingPolicy", err.(request.ErrInvalidParams)) + } + } if s.Steps != nil { for i, v := range s.Steps { if v == nil { @@ -9893,6 +10462,12 @@ func (s *RunJobFlowInput) SetLogUri(v string) *RunJobFlowInput { return s } +// SetManagedScalingPolicy sets the ManagedScalingPolicy field's value. +func (s *RunJobFlowInput) SetManagedScalingPolicy(v *ManagedScalingPolicy) *RunJobFlowInput { + s.ManagedScalingPolicy = v + return s +} + // SetName sets the Name field's value. func (s *RunJobFlowInput) SetName(v string) *RunJobFlowInput { s.Name = &v @@ -11404,6 +11979,17 @@ const ( ComparisonOperatorLessThanOrEqual = "LESS_THAN_OR_EQUAL" ) +const ( + // ComputeLimitsUnitTypeInstanceFleetUnits is a ComputeLimitsUnitType enum value + ComputeLimitsUnitTypeInstanceFleetUnits = "InstanceFleetUnits" + + // ComputeLimitsUnitTypeInstances is a ComputeLimitsUnitType enum value + ComputeLimitsUnitTypeInstances = "Instances" + + // ComputeLimitsUnitTypeVcpu is a ComputeLimitsUnitType enum value + ComputeLimitsUnitTypeVcpu = "VCPU" +) + const ( // InstanceCollectionTypeInstanceFleet is a InstanceCollectionType enum value InstanceCollectionTypeInstanceFleet = "INSTANCE_FLEET" 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 b07a4fc7ed5..63f397348f4 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 @@ -866,9 +866,11 @@ func (c *Firehose) StartDeliveryStreamEncryptionRequest(input *StartDeliveryStre // // Even if encryption is currently enabled for a delivery stream, you can still // invoke this operation on it to change the ARN of the CMK or both its type -// and ARN. In this case, Kinesis Data Firehose schedules the grant it had on -// the old CMK for retirement and creates a grant that enables it to use the -// new CMK to encrypt and decrypt data and to manage the grant. +// and ARN. If you invoke this method to change the CMK, and the old CMK is +// of type CUSTOMER_MANAGED_CMK, Kinesis Data Firehose schedules the grant it +// had on the old CMK for retirement. If the new CMK is of type CUSTOMER_MANAGED_CMK, +// Kinesis Data Firehose creates a grant that enables it to use the new CMK +// to encrypt and decrypt data and to manage the grant. // // If a delivery stream already has encryption enabled and then you invoke this // operation to change the ARN of the CMK or both its type and ARN and you get @@ -876,10 +878,12 @@ func (c *Firehose) StartDeliveryStreamEncryptionRequest(input *StartDeliveryStre // In this case, encryption remains enabled with the old CMK. // // If the encryption status of your delivery stream is ENABLING_FAILED, you -// can invoke this operation again. +// can invoke this operation again with a valid CMK. The CMK must be enabled +// and the key policy mustn't explicitly deny the permission for Kinesis Data +// Firehose to invoke KMS encrypt and decrypt operations. // -// You can only enable SSE for a delivery stream that uses DirectPut as its -// source. +// You can enable SSE for a delivery stream only if it's a delivery stream that +// uses DirectPut as its source. // // The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations // have a combined limit of 25 calls per delivery stream per 24 hours. For example, @@ -1470,8 +1474,8 @@ func (s *CloudWatchLoggingOptions) SetLogStreamName(v string) *CloudWatchLogging // Another modification has already happened. Fetch VersionId again and use // it to update the destination. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -1489,17 +1493,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1507,22 +1511,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a COPY command for Amazon Redshift. @@ -1831,14 +1835,17 @@ type DataFormatConversionConfiguration struct { Enabled *bool `type:"boolean"` // Specifies the deserializer that you want Kinesis Data Firehose to use to - // convert the format of your data from JSON. + // convert the format of your data from JSON. This parameter is required if + // Enabled is set to true. InputFormatConfiguration *InputFormatConfiguration `type:"structure"` // Specifies the serializer that you want Kinesis Data Firehose to use to convert - // the format of your data to the Parquet or ORC format. + // the format of your data to the Parquet or ORC format. This parameter is required + // if Enabled is set to true. OutputFormatConfiguration *OutputFormatConfiguration `type:"structure"` // Specifies the AWS Glue Data Catalog table that contains the column information. + // This parameter is required if Enabled is set to true. SchemaConfiguration *SchemaConfiguration `type:"structure"` } @@ -1860,6 +1867,11 @@ func (s *DataFormatConversionConfiguration) Validate() error { invalidParams.AddNested("OutputFormatConfiguration", err.(request.ErrInvalidParams)) } } + if s.SchemaConfiguration != nil { + if err := s.SchemaConfiguration.Validate(); err != nil { + invalidParams.AddNested("SchemaConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2179,8 +2191,8 @@ func (s *DeliveryStreamEncryptionConfiguration) SetStatus(v string) *DeliveryStr return s } -// Used to specify the type and Amazon Resource Name (ARN) of the CMK needed -// for Server-Side Encryption (SSE). +// Specifies the type and Amazon Resource Name (ARN) of the CMK to use for Server-Side +// Encryption (SSE). type DeliveryStreamEncryptionConfigurationInput struct { _ struct{} `type:"structure"` @@ -2200,8 +2212,17 @@ type DeliveryStreamEncryptionConfigurationInput struct { // manages that grant. // // When you invoke StartDeliveryStreamEncryption to change the CMK for a delivery - // stream that is already encrypted with a customer managed CMK, Kinesis Data - // Firehose schedules the grant it had on the old CMK for retirement. + // stream that is encrypted with a customer managed CMK, Kinesis Data Firehose + // schedules the grant it had on the old CMK for retirement. + // + // You can use a CMK of type CUSTOMER_MANAGED_CMK to encrypt up to 500 delivery + // streams. If a CreateDeliveryStream or StartDeliveryStreamEncryption operation + // exceeds this limit, Kinesis Data Firehose throws a LimitExceededException. + // + // To encrypt your delivery stream, use symmetric CMKs. Kinesis Data Firehose + // doesn't support asymmetric CMKs. For information about symmetric and asymmetric + // CMKs, see About Symmetric and Asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html) + // in the AWS Key Management Service developer guide. // // KeyType is a required field KeyType *string `type:"string" required:"true" enum:"KeyType"` @@ -2581,6 +2602,9 @@ type ElasticsearchDestinationConfiguration struct { // // For Elasticsearch 7.x, don't specify a TypeName. TypeName *string `type:"string"` + + // The details of the VPC of the Amazon ES destination. + VpcConfiguration *VpcConfiguration `type:"structure"` } // String returns the string representation @@ -2632,6 +2656,11 @@ func (s *ElasticsearchDestinationConfiguration) Validate() error { invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) } } + if s.VpcConfiguration != nil { + if err := s.VpcConfiguration.Validate(); err != nil { + invalidParams.AddNested("VpcConfiguration", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2711,6 +2740,12 @@ func (s *ElasticsearchDestinationConfiguration) SetTypeName(v string) *Elasticse return s } +// SetVpcConfiguration sets the VpcConfiguration field's value. +func (s *ElasticsearchDestinationConfiguration) SetVpcConfiguration(v *VpcConfiguration) *ElasticsearchDestinationConfiguration { + s.VpcConfiguration = v + return s +} + // The destination description in Amazon ES. type ElasticsearchDestinationDescription struct { _ struct{} `type:"structure"` @@ -2758,6 +2793,9 @@ type ElasticsearchDestinationDescription struct { // The Elasticsearch type name. This applies to Elasticsearch 6.x and lower // versions. For Elasticsearch 7.x, there's no value for TypeName. TypeName *string `type:"string"` + + // The details of the VPC of the Amazon ES destination. + VpcConfigurationDescription *VpcConfigurationDescription `type:"structure"` } // String returns the string representation @@ -2842,6 +2880,12 @@ func (s *ElasticsearchDestinationDescription) SetTypeName(v string) *Elasticsear return s } +// SetVpcConfigurationDescription sets the VpcConfigurationDescription field's value. +func (s *ElasticsearchDestinationDescription) SetVpcConfigurationDescription(v *VpcConfigurationDescription) *ElasticsearchDestinationDescription { + s.VpcConfigurationDescription = v + return s +} + // Describes an update for a destination in Amazon ES. type ElasticsearchDestinationUpdate struct { _ struct{} `type:"structure"` @@ -3600,7 +3644,7 @@ type FailureDescription struct { // A message providing details about the error that caused the failure. // // Details is a required field - Details *string `type:"string" required:"true"` + Details *string `min:"1" type:"string" required:"true"` // The type of error that caused the failure. // @@ -3665,7 +3709,7 @@ func (s *HiveJsonSerDe) SetTimestampFormats(v []*string) *HiveJsonSerDe { } // Specifies the deserializer you want to use to convert the format of the input -// data. +// data. This parameter is required if Enabled is set to true. type InputFormatConfiguration struct { _ struct{} `type:"structure"` @@ -3693,8 +3737,8 @@ func (s *InputFormatConfiguration) SetDeserializer(v *Deserializer) *InputFormat // The specified input parameter has a value that is not valid. type InvalidArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -3712,17 +3756,17 @@ func (s InvalidArgumentException) GoString() string { func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { return &InvalidArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgumentException) Code() string { +func (s *InvalidArgumentException) Code() string { return "InvalidArgumentException" } // Message returns the exception's message. -func (s InvalidArgumentException) Message() string { +func (s *InvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3730,22 +3774,22 @@ func (s InvalidArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgumentException) OrigErr() error { +func (s *InvalidArgumentException) OrigErr() error { return nil } -func (s InvalidArgumentException) Error() string { +func (s *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // Kinesis Data Firehose throws this exception when an attempt to put records @@ -3753,8 +3797,8 @@ func (s InvalidArgumentException) RequestID() string { // KMS service throws one of the following exception types: AccessDeniedException, // InvalidStateException, DisabledException, or NotFoundException. type InvalidKMSResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -3773,17 +3817,17 @@ func (s InvalidKMSResourceException) GoString() string { func newErrorInvalidKMSResourceException(v protocol.ResponseMetadata) error { return &InvalidKMSResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidKMSResourceException) Code() string { +func (s *InvalidKMSResourceException) Code() string { return "InvalidKMSResourceException" } // Message returns the exception's message. -func (s InvalidKMSResourceException) Message() string { +func (s *InvalidKMSResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3791,22 +3835,22 @@ func (s InvalidKMSResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidKMSResourceException) OrigErr() error { +func (s *InvalidKMSResourceException) OrigErr() error { return nil } -func (s InvalidKMSResourceException) Error() string { +func (s *InvalidKMSResourceException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidKMSResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidKMSResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidKMSResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidKMSResourceException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an encryption key for a destination in Amazon S3. @@ -3964,8 +4008,8 @@ func (s *KinesisStreamSourceDescription) SetRoleARN(v string) *KinesisStreamSour // You have already reached the limit for a requested resource. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -3983,17 +4027,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4001,22 +4045,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListDeliveryStreamsInput struct { @@ -4438,7 +4482,8 @@ func (s *OrcSerDe) SetStripeSizeBytes(v int64) *OrcSerDe { } // Specifies the serializer that you want Kinesis Data Firehose to use to convert -// the format of your data before it writes it to Amazon S3. +// the format of your data before it writes it to Amazon S3. This parameter +// is required if Enabled is set to true. type OutputFormatConfiguration struct { _ struct{} `type:"structure"` @@ -5540,8 +5585,8 @@ func (s *RedshiftRetryOptions) SetDurationInSeconds(v int64) *RedshiftRetryOptio // The resource is already in use and not available for this operation. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5559,17 +5604,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5577,28 +5622,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource could not be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5616,17 +5661,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5634,22 +5679,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the configuration of a destination in Amazon S3. @@ -6021,35 +6066,36 @@ func (s *S3DestinationUpdate) SetRoleARN(v string) *S3DestinationUpdate { } // Specifies the schema to which you want Kinesis Data Firehose to configure -// your data before it writes it to Amazon S3. +// your data before it writes it to Amazon S3. This parameter is required if +// Enabled is set to true. type SchemaConfiguration struct { _ struct{} `type:"structure"` // The ID of the AWS Glue Data Catalog. If you don't supply this, the AWS account // ID is used by default. - CatalogId *string `type:"string"` + CatalogId *string `min:"1" type:"string"` // Specifies the name of the AWS Glue database that contains the schema for // the output data. - DatabaseName *string `type:"string"` + DatabaseName *string `min:"1" type:"string"` // If you don't specify an AWS Region, the default is the current Region. - Region *string `type:"string"` + Region *string `min:"1" type:"string"` // The role that Kinesis Data Firehose can use to access AWS Glue. This role // must be in the same account you use for Kinesis Data Firehose. Cross-account // roles aren't allowed. - RoleARN *string `type:"string"` + RoleARN *string `min:"1" type:"string"` // Specifies the AWS Glue table that contains the column information that constitutes // your data schema. - TableName *string `type:"string"` + TableName *string `min:"1" type:"string"` // Specifies the table version for the output data schema. If you don't specify // this version ID, or if you set it to LATEST, Kinesis Data Firehose uses the // most recent version. This means that any updates to the table are automatically // picked up. - VersionId *string `type:"string"` + VersionId *string `min:"1" type:"string"` } // String returns the string representation @@ -6062,6 +6108,34 @@ func (s SchemaConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *SchemaConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SchemaConfiguration"} + if s.CatalogId != nil && len(*s.CatalogId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) + } + if s.Region != nil && len(*s.Region) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Region", 1)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.TableName != nil && len(*s.TableName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) + } + if s.VersionId != nil && len(*s.VersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetCatalogId sets the CatalogId field's value. func (s *SchemaConfiguration) SetCatalogId(v string) *SchemaConfiguration { s.CatalogId = &v @@ -6161,8 +6235,8 @@ func (s *Serializer) SetParquetSerDe(v *ParquetSerDe) *Serializer { // been exceeded. For more information about limits and how to request an increase, // see Amazon Kinesis Data Firehose Limits (https://docs.aws.amazon.com/firehose/latest/dev/limits.html). type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -6180,17 +6254,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6198,22 +6272,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Details about a Kinesis data stream used as the source for a Kinesis Data @@ -7154,6 +7228,173 @@ func (s UpdateDestinationOutput) GoString() string { return s.String() } +// The details of the VPC of the Amazon ES destination. +type VpcConfiguration struct { + _ struct{} `type:"structure"` + + // The ARN of the IAM role that you want the delivery stream to use to create + // endpoints in the destination VPC. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` + + // The IDs of the security groups that you want Kinesis Data Firehose to use + // when it creates ENIs in the VPC of the Amazon ES destination. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `min:"1" type:"list" required:"true"` + + // The IDs of the subnets that you want Kinesis Data Firehose to use to create + // ENIs in the VPC of the Amazon ES destination. Make sure that the routing + // tables and inbound and outbound rules allow traffic to flow from the subnets + // whose IDs are specified here to the subnets that have the destination Amazon + // ES endpoints. Kinesis Data Firehose creates at least one ENI in each of the + // subnets that are specified here. Do not delete or modify these ENIs. + // + // The number of ENIs that Kinesis Data Firehose creates in the subnets specified + // here scales up and down automatically based on throughput. To enable Kinesis + // Data Firehose to scale up the number of ENIs to match throughput, ensure + // that you have sufficient quota. To help you calculate the quota you need, + // assume that Kinesis Data Firehose can create up to three ENIs for this delivery + // stream for each of the subnets specified here. For more information about + // ENI quota, see Network Interfaces (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-enis) + // in the Amazon VPC Quotas topic. + // + // SubnetIds is a required field + SubnetIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s VpcConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VpcConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VpcConfiguration"} + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.SecurityGroupIds != nil && len(s.SecurityGroupIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityGroupIds", 1)) + } + 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 +} + +// SetRoleARN sets the RoleARN field's value. +func (s *VpcConfiguration) SetRoleARN(v string) *VpcConfiguration { + s.RoleARN = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfiguration) SetSecurityGroupIds(v []*string) *VpcConfiguration { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfiguration) SetSubnetIds(v []*string) *VpcConfiguration { + s.SubnetIds = v + return s +} + +// The details of the VPC of the Amazon ES destination. +type VpcConfigurationDescription struct { + _ struct{} `type:"structure"` + + // The ARN of the IAM role that you want the delivery stream uses to create + // endpoints in the destination VPC. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` + + // The IDs of the security groups that Kinesis Data Firehose uses when it creates + // ENIs in the VPC of the Amazon ES destination. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `min:"1" type:"list" required:"true"` + + // The IDs of the subnets that Kinesis Data Firehose uses to create ENIs in + // the VPC of the Amazon ES destination. Make sure that the routing tables and + // inbound and outbound rules allow traffic to flow from the subnets whose IDs + // are specified here to the subnets that have the destination Amazon ES endpoints. + // Kinesis Data Firehose creates at least one ENI in each of the subnets that + // are specified here. Do not delete or modify these ENIs. + // + // The number of ENIs that Kinesis Data Firehose creates in the subnets specified + // here scales up and down automatically based on throughput. To enable Kinesis + // Data Firehose to scale up the number of ENIs to match throughput, ensure + // that you have sufficient quota. To help you calculate the quota you need, + // assume that Kinesis Data Firehose can create up to three ENIs for this delivery + // stream for each of the subnets specified here. For more information about + // ENI quota, see Network Interfaces (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-enis) + // in the Amazon VPC Quotas topic. + // + // SubnetIds is a required field + SubnetIds []*string `min:"1" type:"list" required:"true"` + + // The ID of the Amazon ES destination's VPC. + // + // VpcId is a required field + VpcId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s VpcConfigurationDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfigurationDescription) GoString() string { + return s.String() +} + +// SetRoleARN sets the RoleARN field's value. +func (s *VpcConfigurationDescription) SetRoleARN(v string) *VpcConfigurationDescription { + s.RoleARN = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfigurationDescription) SetSecurityGroupIds(v []*string) *VpcConfigurationDescription { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfigurationDescription) SetSubnetIds(v []*string) *VpcConfigurationDescription { + s.SubnetIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *VpcConfigurationDescription) SetVpcId(v string) *VpcConfigurationDescription { + s.VpcId = &v + return s +} + const ( // CompressionFormatUncompressed is a CompressionFormat enum value CompressionFormatUncompressed = "UNCOMPRESSED" @@ -7166,6 +7407,9 @@ const ( // CompressionFormatSnappy is a CompressionFormat enum value CompressionFormatSnappy = "Snappy" + + // CompressionFormatHadoopSnappy is a CompressionFormat enum value + CompressionFormatHadoopSnappy = "HADOOP_SNAPPY" ) const ( @@ -7210,6 +7454,27 @@ const ( // DeliveryStreamFailureTypeKmsOptInRequired is a DeliveryStreamFailureType enum value DeliveryStreamFailureTypeKmsOptInRequired = "KMS_OPT_IN_REQUIRED" + // DeliveryStreamFailureTypeCreateEniFailed is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeCreateEniFailed = "CREATE_ENI_FAILED" + + // DeliveryStreamFailureTypeDeleteEniFailed is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeDeleteEniFailed = "DELETE_ENI_FAILED" + + // DeliveryStreamFailureTypeSubnetNotFound is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeSubnetNotFound = "SUBNET_NOT_FOUND" + + // DeliveryStreamFailureTypeSecurityGroupNotFound is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeSecurityGroupNotFound = "SECURITY_GROUP_NOT_FOUND" + + // DeliveryStreamFailureTypeEniAccessDenied is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeEniAccessDenied = "ENI_ACCESS_DENIED" + + // DeliveryStreamFailureTypeSubnetAccessDenied is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeSubnetAccessDenied = "SUBNET_ACCESS_DENIED" + + // DeliveryStreamFailureTypeSecurityGroupAccessDenied is a DeliveryStreamFailureType enum value + DeliveryStreamFailureTypeSecurityGroupAccessDenied = "SECURITY_GROUP_ACCESS_DENIED" + // DeliveryStreamFailureTypeUnknownError is a DeliveryStreamFailureType enum value DeliveryStreamFailureTypeUnknownError = "UNKNOWN_ERROR" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go index 52cabde0cc2..36baa3ac82a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -1501,15 +1501,18 @@ func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, out // * A Shield Advanced policy, which applies Shield Advanced protection to // specified accounts and resources // -// * An AWS WAF policy, which contains a rule group and defines which resources -// are to be protected by that rule group +// * An AWS WAF policy (type WAFV2), which defines rule groups to run first +// in the corresponding AWS WAF web ACL and rule groups to run last in the +// web ACL. +// +// * An AWS WAF Classic policy (type WAF), which defines a rule group. // // * A security group policy, which manages VPC security groups across your // AWS organization. // -// Each policy is specific to one of the three types. If you want to enforce -// more than one policy type across accounts, you can create multiple policies. -// You can create multiple policies for each type. +// Each policy is specific to one of the types. If you want to enforce more +// than one policy type across accounts, create multiple policies. You can create +// multiple policies for each type. // // You must be subscribed to Shield Advanced to create a Shield Advanced policy. // For more information about subscribing to Shield Advanced, see CreateSubscription @@ -2488,8 +2491,8 @@ func (s *GetProtectionStatusOutput) SetServiceType(v string) *GetProtectionStatu // The operation failed because of a system problem, even though the request // was valid. Retry your request. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2506,17 +2509,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2524,28 +2527,28 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The parameters of the request were invalid. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2562,17 +2565,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2580,30 +2583,30 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // 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. type InvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2620,17 +2623,17 @@ func (s InvalidOperationException) GoString() string { func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { return &InvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOperationException) Code() string { +func (s *InvalidOperationException) Code() string { return "InvalidOperationException" } // Message returns the exception's message. -func (s InvalidOperationException) Message() string { +func (s *InvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2638,28 +2641,28 @@ func (s InvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOperationException) OrigErr() error { +func (s *InvalidOperationException) OrigErr() error { return nil } -func (s InvalidOperationException) Error() string { +func (s *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // The value of the Type parameter is invalid. type InvalidTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2676,17 +2679,17 @@ func (s InvalidTypeException) GoString() string { func newErrorInvalidTypeException(v protocol.ResponseMetadata) error { return &InvalidTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTypeException) Code() string { +func (s *InvalidTypeException) Code() string { return "InvalidTypeException" } // Message returns the exception's message. -func (s InvalidTypeException) Message() string { +func (s *InvalidTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2694,22 +2697,22 @@ func (s InvalidTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTypeException) OrigErr() error { +func (s *InvalidTypeException) OrigErr() error { return nil } -func (s InvalidTypeException) Error() string { +func (s *InvalidTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The operation exceeds a resource limit, for example, the maximum number of @@ -2717,8 +2720,8 @@ func (s InvalidTypeException) RequestID() string { // see Firewall Manager Limits (https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) // in the AWS WAF Developer Guide. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2735,17 +2738,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2753,22 +2756,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListComplianceStatusInput struct { @@ -3134,13 +3137,28 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut type Policy struct { _ struct{} `type:"structure"` - // Specifies the AWS account IDs to exclude from the policy. The IncludeMap - // values are evaluated first, with all the appropriate account IDs added to - // the policy. Then the accounts listed in ExcludeMap are removed, resulting - // in the final list of accounts to add to the policy. + // Specifies the AWS account IDs and AWS Organizations organizational units + // (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying + // all accounts in the OU and in any of its child OUs, including any child OUs + // and accounts that are added at a later time. + // + // You can specify inclusions or exclusions, but not both. If you specify an + // IncludeMap, AWS Firewall Manager applies the policy to all accounts specified + // by the IncludeMap, and does not evaluate any ExcludeMap specifications. If + // you do not specify an IncludeMap, then Firewall Manager applies the policy + // to all accounts except for those specified by the ExcludeMap. + // + // You can specify account IDs, OUs, or a combination: // - // The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” - // : [“accountID1”, “accountID2”]}. + // * Specify account IDs by setting the key to ACCOUNT. For example, the + // following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”]}. + // + // * Specify OUs by setting the key to ORG_UNIT. For example, the following + // is a valid map: {“ORG_UNIT” : [“ouid111”, “ouid112”]}. + // + // * Specify accounts and OUs together in a single map, separated with a + // comma. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, + // “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}. ExcludeMap map[string][]*string `type:"map"` // If set to True, resources with the tags that are specified in the ResourceTag @@ -3151,13 +3169,28 @@ type Policy struct { // ExcludeResourceTags is a required field ExcludeResourceTags *bool `type:"boolean" required:"true"` - // Specifies the AWS account IDs to include in the policy. If IncludeMap is - // null, all accounts in the organization in AWS Organizations are included - // in the policy. If IncludeMap is not null, only values listed in IncludeMap - // are included in the policy. + // Specifies the AWS account IDs and AWS Organizations organizational units + // (OUs) to include in the policy. Specifying an OU is the equivalent of specifying + // all accounts in the OU and in any of its child OUs, including any child OUs + // and accounts that are added at a later time. + // + // You can specify inclusions or exclusions, but not both. If you specify an + // IncludeMap, AWS Firewall Manager applies the policy to all accounts specified + // by the IncludeMap, and does not evaluate any ExcludeMap specifications. If + // you do not specify an IncludeMap, then Firewall Manager applies the policy + // to all accounts except for those specified by the ExcludeMap. // - // The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” - // : [“accountID1”, “accountID2”]}. + // You can specify account IDs, OUs, or a combination: + // + // * Specify account IDs by setting the key to ACCOUNT. For example, the + // following is a valid map: {“ACCOUNT” : [“accountID1”, “accountID2”]}. + // + // * Specify OUs by setting the key to ORG_UNIT. For example, the following + // is a valid map: {“ORG_UNIT” : [“ouid111”, “ouid112”]}. + // + // * Specify accounts and OUs together in a single map, separated with a + // comma. For example, the following is a valid map: {“ACCOUNT” : [“accountID1”, + // “accountID2”], “ORG_UNIT” : [“ouid111”, “ouid112”]}. IncludeMap map[string][]*string `type:"map"` // The ID of the AWS Firewall Manager policy. @@ -3749,8 +3782,8 @@ func (s *PutPolicyOutput) SetPolicyArn(v string) *PutPolicyOutput { // The specified resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3767,17 +3800,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3785,22 +3818,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The resource tags that AWS Firewall Manager uses to determine if a particular @@ -3868,12 +3901,14 @@ type SecurityServicePolicyData struct { // Details about the service that are specific to the service type, in JSON // format. For service type SHIELD_ADVANCED, this is an empty string. // - // * Example: WAF ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": + // * Example: WAFV2 "ManagedServiceData": "{\"type\":\"WAFV2\",\"defaultAction\":{\"type\":\"ALLOW\"},\"preProcessRuleGroups\":[{\"managedRuleGroupIdentifier\":null,\"ruleGroupArn\":\"rulegrouparn\",\"overrideAction\":{\"type\":\"COUNT\"},\"excludedRules\":[{\"name\":\"EntityName\"}],\"ruleGroupType\":\"RuleGroup\"}],\"postProcessRuleGroups\":[{\"managedRuleGroupIdentifier\":{\"managedRuleGroupName\":\"AWSManagedRulesAdminProtectionRuleSet\",\"vendor\":\"AWS\"},\"ruleGroupArn\":\"rulegrouparn\",\"overrideAction\":{\"type\":\"NONE\"},\"excludedRules\":[],\"ruleGroupType\":\"ManagedRuleGroup\"}],\"overrideCustomerWebACLAssociation\":false}" + // + // * Example: WAF Classic "ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": // [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", \"overrideAction\" // : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": \"BLOCK\"}} // - // * Example: SECURITY_GROUPS_COMMON "SecurityServicePolicyData":{"Type":"SECURITY_GROUPS_COMMON","ManagedServiceData":"{\"type\":\"SECURITY_GROUPS_COMMON\",\"revertManualSecurityGroupChanges\":false,\"exclusiveResourceSecurityGroupManagement\":false,\"securityGroups\":[{\"id\":\" - // sg-000e55995d61a06bd\"}]}"},"RemediationEnabled":false,"ResourceType":"AWS::EC2::NetworkInterface"} + // * Example: SECURITY_GROUPS_COMMON "SecurityServicePolicyData":{"Type":"SECURITY_GROUPS_COMMON","ManagedServiceData":"{\"type\":\"SECURITY_GROUPS_COMMON\",\"revertManualSecurityGroupChanges\":false,\"exclusiveResourceSecurityGroupManagement\":false, + // \"applyToAllEC2InstanceENIs\":false,\"securityGroups\":[{\"id\":\" sg-000e55995d61a06bd\"}]}"},"RemediationEnabled":false,"ResourceType":"AWS::EC2::NetworkInterface"} // // * Example: SECURITY_GROUPS_CONTENT_AUDIT "SecurityServicePolicyData":{"Type":"SECURITY_GROUPS_CONTENT_AUDIT","ManagedServiceData":"{\"type\":\"SECURITY_GROUPS_CONTENT_AUDIT\",\"securityGroups\":[{\"id\":\" // sg-000e55995d61a06bd \"}],\"securityGroupAction\":{\"type\":\"ALLOW\"}}"},"RemediationEnabled":false,"ResourceType":"AWS::EC2::NetworkInterface"} @@ -4169,6 +4204,9 @@ const ( const ( // CustomerPolicyScopeIdTypeAccount is a CustomerPolicyScopeIdType enum value CustomerPolicyScopeIdTypeAccount = "ACCOUNT" + + // CustomerPolicyScopeIdTypeOrgUnit is a CustomerPolicyScopeIdType enum value + CustomerPolicyScopeIdTypeOrgUnit = "ORG_UNIT" ) const ( @@ -4197,6 +4235,9 @@ const ( // SecurityServiceTypeWaf is a SecurityServiceType enum value SecurityServiceTypeWaf = "WAF" + // SecurityServiceTypeWafv2 is a SecurityServiceType enum value + SecurityServiceTypeWafv2 = "WAFV2" + // SecurityServiceTypeShieldAdvanced is a SecurityServiceType enum value SecurityServiceTypeShieldAdvanced = "SHIELD_ADVANCED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/forecastservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/forecastservice/api.go index 93cc9f06625..e6425c8afb7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/forecastservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/forecastservice/api.go @@ -6469,8 +6469,8 @@ func (s *IntegerParameterRange) SetScalingType(v string) *IntegerParameterRange // We can't process the request because it includes an invalid value or a value // that exceeds the valid range. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6487,17 +6487,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6505,28 +6505,28 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // The token is not valid. Tokens expire after 24 hours. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6543,17 +6543,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6561,28 +6561,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The limit on the number of resources per account has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6599,17 +6599,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6617,22 +6617,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListDatasetGroupsInput struct { @@ -7575,8 +7575,8 @@ func (s *PredictorSummary) SetStatus(v string) *PredictorSummary { // There is already a resource with this name. Try again with a different name. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7593,17 +7593,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7611,28 +7611,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource is in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7649,17 +7649,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7667,29 +7667,29 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // We can't find a resource with that Amazon Resource Name (ARN). Check the // ARN and try again. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7706,17 +7706,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7724,22 +7724,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The path to the file(s) in an Amazon Simple Storage Service (Amazon S3) bucket, diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go index eb676ca1590..91aa12c43ec 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go @@ -293,8 +293,8 @@ func (c *FSx) CreateDataRepositoryTaskRequest(input *CreateDataRepositoryTaskInp // repository. A CreateDataRepositoryTask operation will fail if a data repository // is not linked to the FSx file system. To learn more about data repository // tasks, see Using Data Repository Tasks (https://docs.aws.amazon.com/fsx/latest/LustreGuide/data-repository-tasks.html). -// To learn more about linking a data repository to your file system, see Step -// 1: Create Your Amazon FSx for Lustre File System (https://docs.aws.amazon.com/fsx/latest/LustreGuide/getting-started-step1.html). +// To learn more about linking a data repository to your file system, see Setting +// the Export Prefix (https://docs.aws.amazon.com/fsx/latest/LustreGuide/export-data-repository.html#export-prefix). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1772,8 +1772,8 @@ func (s *ActiveDirectoryBackupAttributes) SetDomainName(v string) *ActiveDirecto // An Active Directory error. type ActiveDirectoryError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The directory ID of the directory that an error pertains to. // @@ -1799,17 +1799,17 @@ func (s ActiveDirectoryError) GoString() string { func newErrorActiveDirectoryError(v protocol.ResponseMetadata) error { return &ActiveDirectoryError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActiveDirectoryError) Code() string { +func (s *ActiveDirectoryError) Code() string { return "ActiveDirectoryError" } // Message returns the exception's message. -func (s ActiveDirectoryError) Message() string { +func (s *ActiveDirectoryError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1817,22 +1817,22 @@ func (s ActiveDirectoryError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActiveDirectoryError) OrigErr() error { +func (s *ActiveDirectoryError) OrigErr() error { return nil } -func (s ActiveDirectoryError) Error() string { +func (s *ActiveDirectoryError) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ActiveDirectoryError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActiveDirectoryError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActiveDirectoryError) RequestID() string { - return s.respMetadata.RequestID +func (s *ActiveDirectoryError) RequestID() string { + return s.RespMetadata.RequestID } // A backup of an Amazon FSx for Windows File Server file system. You can create @@ -1991,8 +1991,8 @@ func (s *BackupFailureDetails) SetMessage(v string) *BackupFailureDetails { // Another backup is already under way. Wait for completion before initiating // additional backups of this file system. type BackupInProgress struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -2010,17 +2010,17 @@ func (s BackupInProgress) GoString() string { func newErrorBackupInProgress(v protocol.ResponseMetadata) error { return &BackupInProgress{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BackupInProgress) Code() string { +func (s *BackupInProgress) Code() string { return "BackupInProgress" } // Message returns the exception's message. -func (s BackupInProgress) Message() string { +func (s *BackupInProgress) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2028,28 +2028,28 @@ func (s BackupInProgress) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BackupInProgress) OrigErr() error { +func (s *BackupInProgress) OrigErr() error { return nil } -func (s BackupInProgress) Error() string { +func (s *BackupInProgress) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BackupInProgress) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BackupInProgress) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BackupInProgress) RequestID() string { - return s.respMetadata.RequestID +func (s *BackupInProgress) RequestID() string { + return s.RespMetadata.RequestID } // No Amazon FSx backups were found based upon the supplied parameters. type BackupNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -2067,17 +2067,17 @@ func (s BackupNotFound) GoString() string { func newErrorBackupNotFound(v protocol.ResponseMetadata) error { return &BackupNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BackupNotFound) Code() string { +func (s *BackupNotFound) Code() string { return "BackupNotFound" } // Message returns the exception's message. -func (s BackupNotFound) Message() string { +func (s *BackupNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2085,28 +2085,28 @@ func (s BackupNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BackupNotFound) OrigErr() error { +func (s *BackupNotFound) OrigErr() error { return nil } -func (s BackupNotFound) Error() string { +func (s *BackupNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BackupNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BackupNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BackupNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *BackupNotFound) RequestID() string { + return s.RespMetadata.RequestID } // You can't delete a backup while it's being used to restore a file system. type BackupRestoring struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The ID of a file system being restored from the backup. FileSystemId *string `min:"11" type:"string"` @@ -2127,17 +2127,17 @@ func (s BackupRestoring) GoString() string { func newErrorBackupRestoring(v protocol.ResponseMetadata) error { return &BackupRestoring{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BackupRestoring) Code() string { +func (s *BackupRestoring) Code() string { return "BackupRestoring" } // Message returns the exception's message. -func (s BackupRestoring) Message() string { +func (s *BackupRestoring) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2145,28 +2145,28 @@ func (s BackupRestoring) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BackupRestoring) OrigErr() error { +func (s *BackupRestoring) OrigErr() error { return nil } -func (s BackupRestoring) Error() string { +func (s *BackupRestoring) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BackupRestoring) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BackupRestoring) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BackupRestoring) RequestID() string { - return s.respMetadata.RequestID +func (s *BackupRestoring) RequestID() string { + return s.RespMetadata.RequestID } // A generic error indicating a failure with a client request. type BadRequest struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -2184,17 +2184,17 @@ func (s BadRequest) GoString() string { func newErrorBadRequest(v protocol.ResponseMetadata) error { return &BadRequest{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequest) Code() string { +func (s *BadRequest) Code() string { return "BadRequest" } // Message returns the exception's message. -func (s BadRequest) Message() string { +func (s *BadRequest) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2202,22 +2202,22 @@ func (s BadRequest) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequest) OrigErr() error { +func (s *BadRequest) OrigErr() error { return nil } -func (s BadRequest) Error() string { +func (s *BadRequest) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequest) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequest) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequest) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequest) RequestID() string { + return s.RespMetadata.RequestID } // Cancels a data repository task. @@ -2515,12 +2515,16 @@ type CreateDataRepositoryTaskInput struct { // (Optional) The path or paths on the Amazon FSx file system to use when the // data repository task is processed. The default path is the file system root - // directory. + // directory. The paths you provide need to be relative to the mount point of + // the file system. If the mount point is /mnt/fsx and /mnt/fsx/path1 is a directory + // or file on the file system you want to export, then the path to provide is + // path1. If a path that you provide isn't valid, the task fails. Paths []*string `type:"list"` // Defines whether or not Amazon FSx provides a CompletionReport once the task // has completed. A CompletionReport provides a detailed report on the files // that Amazon FSx processed that meet the criteria specified by the Scope parameter. + // For more information, see Working with Task Completion Reports (https://docs.aws.amazon.com/fsx/latest/LustreGuide/task-completion-report.html). // // Report is a required field Report *CompletionReport `type:"structure" required:"true"` @@ -2663,12 +2667,37 @@ type CreateFileSystemFromBackupInput struct { // A list of IDs for the security groups that apply to the specified network // interfaces created for file system access. These security groups apply to - // all network interfaces. This value isn't returned in later describe requests. + // all network interfaces. This value isn't returned in later DescribeFileSystem + // requests. SecurityGroupIds []*string `type:"list"` - // A list of IDs for the subnets that the file system will be accessible from. - // Currently, you can specify only one subnet. The file server is also launched - // in that subnet's Availability Zone. + // Sets the storage type for the Windows file system you're creating from a + // backup. Valid values are SSD and HDD. + // + // * Set to SSD to use solid state drive storage. Supported on all Windows + // deployment types. + // + // * Set to HDD to use hard disk drive storage. Supported on SINGLE_AZ_2 + // and MULTI_AZ_1 Windows file system deployment types. + // + // Default value is SSD. + // + // HDD and SSD storage types have different minimum storage capacity requirements. + // A restored file system's storage capacity is tied to the file system that + // was backed up. You can create a file system that uses HDD storage from a + // backup of a file system that used SSD storage only if the original SSD file + // system had a storage capacity of at least 2000 GiB. + StorageType *string `type:"string" enum:"StorageType"` + + // Specifies the IDs of the subnets that the file system will be accessible + // from. For Windows MULTI_AZ_1 file system deployment types, provide exactly + // two subnet IDs, one for the preferred file server and one for the standby + // file server. You specify one of these subnets as the preferred subnet using + // the WindowsConfiguration > PreferredSubnetID property. + // + // For Windows SINGLE_AZ_1 and SINGLE_AZ_2 deployment types and Lustre file + // systems, provide exactly one subnet ID. The file server is launched in that + // subnet's Availability Zone. // // SubnetIds is a required field SubnetIds []*string `type:"list" required:"true"` @@ -2749,6 +2778,12 @@ func (s *CreateFileSystemFromBackupInput) SetSecurityGroupIds(v []*string) *Crea return s } +// SetStorageType sets the StorageType field's value. +func (s *CreateFileSystemFromBackupInput) SetStorageType(v string) *CreateFileSystemFromBackupInput { + s.StorageType = &v + return s +} + // SetSubnetIds sets the SubnetIds field's value. func (s *CreateFileSystemFromBackupInput) SetSubnetIds(v []*string) *CreateFileSystemFromBackupInput { s.SubnetIds = v @@ -2814,8 +2849,7 @@ type CreateFileSystemInput struct { // in the AWS Key Management Service API Reference. KmsKeyId *string `min:"1" type:"string"` - // The Lustre configuration for the file system being created. This value is - // required if FileSystemType is set to LUSTRE. + // The Lustre configuration for the file system being created. LustreConfiguration *CreateFileSystemLustreConfiguration `type:"structure"` // A list of IDs specifying the security groups to apply to all network interfaces @@ -2823,27 +2857,47 @@ type CreateFileSystemInput struct { // to describe the file system. SecurityGroupIds []*string `type:"list"` - // The storage capacity of the file system being created. + // Sets the storage capacity of the file system that you're creating. // - // For Windows file systems, valid values are 32 GiB - 65,536 GiB. + // For Lustre file systems: // - // For SCRATCH_1 Lustre file systems, valid values are 1,200, 2,400, 3,600, - // then continuing in increments of 3600 GiB. For SCRATCH_2 and PERSISTENT_1 - // file systems, valid values are 1200, 2400, then continuing in increments - // of 2400 GiB. + // * For SCRATCH_2 and PERSISTENT_1 deployment types, valid values are 1.2, + // 2.4, and increments of 2.4 TiB. + // + // * For SCRATCH_1 deployment type, valid values are 1.2, 2.4, and increments + // of 3.6 TiB. + // + // For Windows file systems: + // + // * If StorageType=SSD, valid values are 32 GiB - 65,536 GiB (64 TiB). + // + // * If StorageType=HDD, valid values are 2000 GiB - 65,536 GiB (64 TiB). // // StorageCapacity is a required field StorageCapacity *int64 `type:"integer" required:"true"` + // Sets the storage type for the Amazon FSx for Windows file system you're creating. + // Valid values are SSD and HDD. + // + // * Set to SSD to use solid state drive storage. SSD is supported on all + // Windows deployment types. + // + // * Set to HDD to use hard disk drive storage. HDD is supported on SINGLE_AZ_2 + // and MULTI_AZ_1 Windows file system deployment types. + // + // Default value is SSD. For more information, see Storage Type Options (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/optimize-fsx-tco.html#saz-maz-storage-type) + // in the Amazon FSx for Windows User Guide. + StorageType *string `type:"string" enum:"StorageType"` + // Specifies the IDs of the subnets that the file system will be accessible // from. For Windows MULTI_AZ_1 file system deployment types, provide exactly // two subnet IDs, one for the preferred file server and one for the standby // file server. You specify one of these subnets as the preferred subnet using // the WindowsConfiguration > PreferredSubnetID property. // - // For Windows SINGLE_AZ_1 file system deployment types and Lustre file systems, - // provide exactly one subnet ID. The file server is launched in that subnet's - // Availability Zone. + // For Windows SINGLE_AZ_1 and SINGLE_AZ_2 file system deployment types and + // Lustre file systems, provide exactly one subnet ID. The file server is launched + // in that subnet's Availability Zone. // // SubnetIds is a required field SubnetIds []*string `type:"list" required:"true"` @@ -2852,8 +2906,7 @@ type CreateFileSystemInput struct { // Name tag appears in the console as the file system name. Tags []*Tag `min:"1" type:"list"` - // The Microsoft Windows configuration for the file system being created. This - // value is required if FileSystemType is set to WINDOWS. + // The Microsoft Windows configuration for the file system being created. WindowsConfiguration *CreateFileSystemWindowsConfiguration `type:"structure"` } @@ -2951,6 +3004,12 @@ func (s *CreateFileSystemInput) SetStorageCapacity(v int64) *CreateFileSystemInp return s } +// SetStorageType sets the StorageType field's value. +func (s *CreateFileSystemInput) SetStorageType(v string) *CreateFileSystemInput { + s.StorageType = &v + return s +} + // SetSubnetIds sets the SubnetIds field's value. func (s *CreateFileSystemInput) SetSubnetIds(v []*string) *CreateFileSystemInput { s.SubnetIds = v @@ -2969,8 +3028,7 @@ func (s *CreateFileSystemInput) SetWindowsConfiguration(v *CreateFileSystemWindo return s } -// The Lustre configuration for the file system being created. This value is -// required if FileSystemType is set to LUSTRE. +// The Lustre configuration for the file system being created. type CreateFileSystemLustreConfiguration struct { _ struct{} `type:"structure"` @@ -3027,13 +3085,12 @@ type CreateFileSystemLustreConfiguration struct { // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. ImportedFileChunkSize *int64 `min:"1" type:"integer"` - // (Optional) For the PERSISTENT_1 deployment type, describes the amount of - // read and write throughput for each 1 tebibyte of storage, in MB/s/TiB. File - // system throughput capacity is calculated by multiplying file system storage - // capacity (TiB) by the PerUnitStorageThroughput (MB/s/TiB). For a 2.4 TiB - // file system, provisioning 50 MB/s/TiB of PerUnitStorageThroughput yields - // 120 MB/s of file system throughput. You pay for the amount of throughput - // that you provision. (Default = 200 MB/s/TiB) + // Required for the PERSISTENT_1 deployment type, describes the amount of read + // and write throughput for each 1 tebibyte of storage, in MB/s/TiB. File system + // throughput capacity is calculated by multiplying file system storage capacity + // (TiB) by the PerUnitStorageThroughput (MB/s/TiB). For a 2.4 TiB file system, + // provisioning 50 MB/s/TiB of PerUnitStorageThroughput yields 117 MB/s of file + // system throughput. You pay for the amount of throughput that you provision. // // Valid values are 50, 100, 200. PerUnitStorageThroughput *int64 `min:"50" type:"integer"` @@ -3169,13 +3226,17 @@ type CreateFileSystemWindowsConfiguration struct { // * MULTI_AZ_1 - Deploys a high availability file system that is configured // for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability. // You can only deploy a Multi-AZ file system in AWS Regions that have a - // minimum of three Availability Zones. + // minimum of three Availability Zones. Also supports HDD storage type // // * SINGLE_AZ_1 - (Default) Choose to deploy a file system that is configured // for single AZ redundancy. // - // To learn more about high availability Multi-AZ file systems, see High Availability - // for Amazon FSx for Windows File Server (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html). + // * SINGLE_AZ_2 - The latest generation Single AZ file system. Specifies + // a file system that is configured for single AZ redundancy and supports + // HDD storage type. + // + // For more information, see Availability and Durability: Single-AZ and Multi-AZ + // File Systems (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html). DeploymentType *string `type:"string" enum:"WindowsDeploymentType"` // Required when DeploymentType is set to MULTI_AZ_1. This specifies the subnet @@ -3538,8 +3599,8 @@ func (s *DataRepositoryTask) SetType(v string) *DataRepositoryTask { // The data repository task could not be canceled because the task has already // ended. type DataRepositoryTaskEnded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -3557,17 +3618,17 @@ func (s DataRepositoryTaskEnded) GoString() string { func newErrorDataRepositoryTaskEnded(v protocol.ResponseMetadata) error { return &DataRepositoryTaskEnded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DataRepositoryTaskEnded) Code() string { +func (s *DataRepositoryTaskEnded) Code() string { return "DataRepositoryTaskEnded" } // Message returns the exception's message. -func (s DataRepositoryTaskEnded) Message() string { +func (s *DataRepositoryTaskEnded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3575,29 +3636,29 @@ func (s DataRepositoryTaskEnded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DataRepositoryTaskEnded) OrigErr() error { +func (s *DataRepositoryTaskEnded) OrigErr() error { return nil } -func (s DataRepositoryTaskEnded) Error() string { +func (s *DataRepositoryTaskEnded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DataRepositoryTaskEnded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DataRepositoryTaskEnded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DataRepositoryTaskEnded) RequestID() string { - return s.respMetadata.RequestID +func (s *DataRepositoryTaskEnded) RequestID() string { + return s.RespMetadata.RequestID } // An existing data repository task is currently executing on the file system. // Wait until the existing task has completed, then create the new task. type DataRepositoryTaskExecuting struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -3615,17 +3676,17 @@ func (s DataRepositoryTaskExecuting) GoString() string { func newErrorDataRepositoryTaskExecuting(v protocol.ResponseMetadata) error { return &DataRepositoryTaskExecuting{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DataRepositoryTaskExecuting) Code() string { +func (s *DataRepositoryTaskExecuting) Code() string { return "DataRepositoryTaskExecuting" } // Message returns the exception's message. -func (s DataRepositoryTaskExecuting) Message() string { +func (s *DataRepositoryTaskExecuting) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3633,22 +3694,22 @@ func (s DataRepositoryTaskExecuting) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DataRepositoryTaskExecuting) OrigErr() error { +func (s *DataRepositoryTaskExecuting) OrigErr() error { return nil } -func (s DataRepositoryTaskExecuting) Error() string { +func (s *DataRepositoryTaskExecuting) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DataRepositoryTaskExecuting) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DataRepositoryTaskExecuting) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DataRepositoryTaskExecuting) RequestID() string { - return s.respMetadata.RequestID +func (s *DataRepositoryTaskExecuting) RequestID() string { + return s.RespMetadata.RequestID } // Provides information about why a data repository task failed. Only populated @@ -3723,8 +3784,8 @@ func (s *DataRepositoryTaskFilter) SetValues(v []*string) *DataRepositoryTaskFil // The data repository task or tasks you specified could not be found. type DataRepositoryTaskNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -3742,17 +3803,17 @@ func (s DataRepositoryTaskNotFound) GoString() string { func newErrorDataRepositoryTaskNotFound(v protocol.ResponseMetadata) error { return &DataRepositoryTaskNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DataRepositoryTaskNotFound) Code() string { +func (s *DataRepositoryTaskNotFound) Code() string { return "DataRepositoryTaskNotFound" } // Message returns the exception's message. -func (s DataRepositoryTaskNotFound) Message() string { +func (s *DataRepositoryTaskNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3760,22 +3821,22 @@ func (s DataRepositoryTaskNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DataRepositoryTaskNotFound) OrigErr() error { +func (s *DataRepositoryTaskNotFound) OrigErr() error { return nil } -func (s DataRepositoryTaskNotFound) Error() string { +func (s *DataRepositoryTaskNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DataRepositoryTaskNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DataRepositoryTaskNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DataRepositoryTaskNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *DataRepositoryTaskNotFound) RequestID() string { + return s.RespMetadata.RequestID } // Provides the task status showing a running total of the total number of files @@ -4516,9 +4577,21 @@ type FileSystem struct { // The storage capacity of the file system in gigabytes (GB). StorageCapacity *int64 `type:"integer"` - // The ID of the subnet to contain the endpoint for the file system. One and - // only one is supported. The file system is launched in the Availability Zone - // associated with this subnet. + // The storage type of the file system. Valid values are SSD and HDD. If set + // to SSD, the file system uses solid state drive storage. If set to HDD, the + // file system uses hard disk drive storage. + StorageType *string `type:"string" enum:"StorageType"` + + // Specifies the IDs of the subnets that the file system is accessible from. + // For Windows MULTI_AZ_1 file system deployment type, there are two subnet + // IDs, one for the preferred file server and one for the standby file server. + // The preferred file server subnet identified in the PreferredSubnetID property. + // All other file systems have only one subnet ID. + // + // For Lustre file systems, and Single-AZ Windows file systems, this is the + // ID of the subnet that contains the endpoint for the file system. For MULTI_AZ_1 + // Windows file systems, the endpoint for the file system is available in the + // PreferredSubnetID. SubnetIds []*string `type:"list"` // The tags to associate with the file system. For more information, see Tagging @@ -4615,6 +4688,12 @@ func (s *FileSystem) SetStorageCapacity(v int64) *FileSystem { return s } +// SetStorageType sets the StorageType field's value. +func (s *FileSystem) SetStorageType(v string) *FileSystem { + s.StorageType = &v + return s +} + // SetSubnetIds sets the SubnetIds field's value. func (s *FileSystem) SetSubnetIds(v []*string) *FileSystem { s.SubnetIds = v @@ -4666,8 +4745,8 @@ func (s *FileSystemFailureDetails) SetMessage(v string) *FileSystemFailureDetail // No Amazon FSx file systems were found based upon supplied parameters. type FileSystemNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -4685,17 +4764,17 @@ func (s FileSystemNotFound) GoString() string { func newErrorFileSystemNotFound(v protocol.ResponseMetadata) error { return &FileSystemNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FileSystemNotFound) Code() string { +func (s *FileSystemNotFound) Code() string { return "FileSystemNotFound" } // Message returns the exception's message. -func (s FileSystemNotFound) Message() string { +func (s *FileSystemNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4703,22 +4782,22 @@ func (s FileSystemNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FileSystemNotFound) OrigErr() error { +func (s *FileSystemNotFound) OrigErr() error { return nil } -func (s FileSystemNotFound) Error() string { +func (s *FileSystemNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FileSystemNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FileSystemNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FileSystemNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *FileSystemNotFound) RequestID() string { + return s.RespMetadata.RequestID } // A filter used to restrict the results of describe calls. You can use multiple @@ -4760,8 +4839,8 @@ func (s *Filter) SetValues(v []*string) *Filter { // request token but different parameters settings. A client request token should // always uniquely identify a single request. type IncompatibleParameterError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -4784,17 +4863,17 @@ func (s IncompatibleParameterError) GoString() string { func newErrorIncompatibleParameterError(v protocol.ResponseMetadata) error { return &IncompatibleParameterError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncompatibleParameterError) Code() string { +func (s *IncompatibleParameterError) Code() string { return "IncompatibleParameterError" } // Message returns the exception's message. -func (s IncompatibleParameterError) Message() string { +func (s *IncompatibleParameterError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4802,28 +4881,28 @@ func (s IncompatibleParameterError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncompatibleParameterError) OrigErr() error { +func (s *IncompatibleParameterError) OrigErr() error { return nil } -func (s IncompatibleParameterError) Error() string { +func (s *IncompatibleParameterError) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s IncompatibleParameterError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncompatibleParameterError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncompatibleParameterError) RequestID() string { - return s.respMetadata.RequestID +func (s *IncompatibleParameterError) RequestID() string { + return s.RespMetadata.RequestID } // A generic error indicating a server-side failure. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -4841,17 +4920,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4859,28 +4938,28 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // The path provided for data repository export isn't valid. type InvalidExportPath struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -4898,17 +4977,17 @@ func (s InvalidExportPath) GoString() string { func newErrorInvalidExportPath(v protocol.ResponseMetadata) error { return &InvalidExportPath{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidExportPath) Code() string { +func (s *InvalidExportPath) Code() string { return "InvalidExportPath" } // Message returns the exception's message. -func (s InvalidExportPath) Message() string { +func (s *InvalidExportPath) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4916,28 +4995,28 @@ func (s InvalidExportPath) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidExportPath) OrigErr() error { +func (s *InvalidExportPath) OrigErr() error { return nil } -func (s InvalidExportPath) Error() string { +func (s *InvalidExportPath) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidExportPath) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidExportPath) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidExportPath) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidExportPath) RequestID() string { + return s.RespMetadata.RequestID } // The path provided for data repository import isn't valid. type InvalidImportPath struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -4955,17 +5034,17 @@ func (s InvalidImportPath) GoString() string { func newErrorInvalidImportPath(v protocol.ResponseMetadata) error { return &InvalidImportPath{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidImportPath) Code() string { +func (s *InvalidImportPath) Code() string { return "InvalidImportPath" } // Message returns the exception's message. -func (s InvalidImportPath) Message() string { +func (s *InvalidImportPath) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4973,22 +5052,22 @@ func (s InvalidImportPath) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidImportPath) OrigErr() error { +func (s *InvalidImportPath) OrigErr() error { return nil } -func (s InvalidImportPath) Error() string { +func (s *InvalidImportPath) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidImportPath) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidImportPath) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidImportPath) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidImportPath) RequestID() string { + return s.RespMetadata.RequestID } // One or more network settings specified in the request are invalid. InvalidVpcId @@ -4998,8 +5077,8 @@ func (s InvalidImportPath) RequestID() string { // of IDs for security groups that are either invalid or not part of the VPC // specified. type InvalidNetworkSettings struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The ID of your Amazon EC2 security group. This ID is used to control network // access to the endpoint that Amazon FSx creates on your behalf in each subnet. @@ -5029,17 +5108,17 @@ func (s InvalidNetworkSettings) GoString() string { func newErrorInvalidNetworkSettings(v protocol.ResponseMetadata) error { return &InvalidNetworkSettings{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNetworkSettings) Code() string { +func (s *InvalidNetworkSettings) Code() string { return "InvalidNetworkSettings" } // Message returns the exception's message. -func (s InvalidNetworkSettings) Message() string { +func (s *InvalidNetworkSettings) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5047,29 +5126,29 @@ func (s InvalidNetworkSettings) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNetworkSettings) OrigErr() error { +func (s *InvalidNetworkSettings) OrigErr() error { return nil } -func (s InvalidNetworkSettings) Error() string { +func (s *InvalidNetworkSettings) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNetworkSettings) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNetworkSettings) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNetworkSettings) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNetworkSettings) RequestID() string { + return s.RespMetadata.RequestID } // An invalid value for PerUnitStorageThroughput was provided. Please create // your file system again, using a valid value. type InvalidPerUnitStorageThroughput struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -5087,17 +5166,17 @@ func (s InvalidPerUnitStorageThroughput) GoString() string { func newErrorInvalidPerUnitStorageThroughput(v protocol.ResponseMetadata) error { return &InvalidPerUnitStorageThroughput{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPerUnitStorageThroughput) Code() string { +func (s *InvalidPerUnitStorageThroughput) Code() string { return "InvalidPerUnitStorageThroughput" } // Message returns the exception's message. -func (s InvalidPerUnitStorageThroughput) Message() string { +func (s *InvalidPerUnitStorageThroughput) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5105,22 +5184,22 @@ func (s InvalidPerUnitStorageThroughput) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPerUnitStorageThroughput) OrigErr() error { +func (s *InvalidPerUnitStorageThroughput) OrigErr() error { return nil } -func (s InvalidPerUnitStorageThroughput) Error() string { +func (s *InvalidPerUnitStorageThroughput) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPerUnitStorageThroughput) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPerUnitStorageThroughput) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPerUnitStorageThroughput) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPerUnitStorageThroughput) RequestID() string { + return s.RespMetadata.RequestID } // The request object for ListTagsForResource operation. @@ -5299,8 +5378,8 @@ func (s *LustreFileSystemConfiguration) SetWeeklyMaintenanceStartTime(v string) // A file system configuration is required for this operation. type MissingFileSystemConfiguration struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -5318,17 +5397,17 @@ func (s MissingFileSystemConfiguration) GoString() string { func newErrorMissingFileSystemConfiguration(v protocol.ResponseMetadata) error { return &MissingFileSystemConfiguration{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MissingFileSystemConfiguration) Code() string { +func (s *MissingFileSystemConfiguration) Code() string { return "MissingFileSystemConfiguration" } // Message returns the exception's message. -func (s MissingFileSystemConfiguration) Message() string { +func (s *MissingFileSystemConfiguration) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5336,29 +5415,29 @@ func (s MissingFileSystemConfiguration) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MissingFileSystemConfiguration) OrigErr() error { +func (s *MissingFileSystemConfiguration) OrigErr() error { return nil } -func (s MissingFileSystemConfiguration) Error() string { +func (s *MissingFileSystemConfiguration) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MissingFileSystemConfiguration) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MissingFileSystemConfiguration) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MissingFileSystemConfiguration) RequestID() string { - return s.respMetadata.RequestID +func (s *MissingFileSystemConfiguration) RequestID() string { + return s.RespMetadata.RequestID } // The resource specified for the tagging operation is not a resource type owned // by Amazon FSx. Use the API of the relevant service to perform the operation. type NotServiceResourceError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -5381,17 +5460,17 @@ func (s NotServiceResourceError) GoString() string { func newErrorNotServiceResourceError(v protocol.ResponseMetadata) error { return &NotServiceResourceError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotServiceResourceError) Code() string { +func (s *NotServiceResourceError) Code() string { return "NotServiceResourceError" } // Message returns the exception's message. -func (s NotServiceResourceError) Message() string { +func (s *NotServiceResourceError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5399,28 +5478,28 @@ func (s NotServiceResourceError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotServiceResourceError) OrigErr() error { +func (s *NotServiceResourceError) OrigErr() error { return nil } -func (s NotServiceResourceError) Error() string { +func (s *NotServiceResourceError) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotServiceResourceError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotServiceResourceError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotServiceResourceError) RequestID() string { - return s.respMetadata.RequestID +func (s *NotServiceResourceError) RequestID() string { + return s.RespMetadata.RequestID } // The resource specified does not support tagging. type ResourceDoesNotSupportTagging struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -5443,17 +5522,17 @@ func (s ResourceDoesNotSupportTagging) GoString() string { func newErrorResourceDoesNotSupportTagging(v protocol.ResponseMetadata) error { return &ResourceDoesNotSupportTagging{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDoesNotSupportTagging) Code() string { +func (s *ResourceDoesNotSupportTagging) Code() string { return "ResourceDoesNotSupportTagging" } // Message returns the exception's message. -func (s ResourceDoesNotSupportTagging) Message() string { +func (s *ResourceDoesNotSupportTagging) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5461,28 +5540,28 @@ func (s ResourceDoesNotSupportTagging) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDoesNotSupportTagging) OrigErr() error { +func (s *ResourceDoesNotSupportTagging) OrigErr() error { return nil } -func (s ResourceDoesNotSupportTagging) Error() string { +func (s *ResourceDoesNotSupportTagging) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDoesNotSupportTagging) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDoesNotSupportTagging) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDoesNotSupportTagging) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDoesNotSupportTagging) RequestID() string { + return s.RespMetadata.RequestID } // The resource specified by the Amazon Resource Name (ARN) can't be found. type ResourceNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -5505,17 +5584,17 @@ func (s ResourceNotFound) GoString() string { func newErrorResourceNotFound(v protocol.ResponseMetadata) error { return &ResourceNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFound) Code() string { +func (s *ResourceNotFound) Code() string { return "ResourceNotFound" } // Message returns the exception's message. -func (s ResourceNotFound) Message() string { +func (s *ResourceNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5523,22 +5602,22 @@ func (s ResourceNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFound) OrigErr() error { +func (s *ResourceNotFound) OrigErr() error { return nil } -func (s ResourceNotFound) Error() string { +func (s *ResourceNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFound) RequestID() string { + return s.RespMetadata.RequestID } // The configuration of the self-managed Microsoft Active Directory (AD) directory @@ -5826,8 +5905,8 @@ func (s *SelfManagedActiveDirectoryConfigurationUpdates) SetUserName(v string) * // An error indicating that a particular service limit was exceeded. You can // increase some service limits by contacting AWS Support. type ServiceLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Enumeration of the service limit that was exceeded. // @@ -5850,17 +5929,17 @@ func (s ServiceLimitExceeded) GoString() string { func newErrorServiceLimitExceeded(v protocol.ResponseMetadata) error { return &ServiceLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceLimitExceeded) Code() string { +func (s *ServiceLimitExceeded) Code() string { return "ServiceLimitExceeded" } // Message returns the exception's message. -func (s ServiceLimitExceeded) Message() string { +func (s *ServiceLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5868,22 +5947,22 @@ func (s ServiceLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceLimitExceeded) OrigErr() error { +func (s *ServiceLimitExceeded) OrigErr() error { return nil } -func (s ServiceLimitExceeded) Error() string { +func (s *ServiceLimitExceeded) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Specifies a key-value pair for a resource tag. @@ -6024,8 +6103,8 @@ func (s TagResourceOutput) GoString() string { // The requested operation is not supported for this resource or API. type UnsupportedOperation struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A detailed error message. Message_ *string `locationName:"Message" min:"1" type:"string"` @@ -6043,17 +6122,17 @@ func (s UnsupportedOperation) GoString() string { func newErrorUnsupportedOperation(v protocol.ResponseMetadata) error { return &UnsupportedOperation{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperation) Code() string { +func (s *UnsupportedOperation) Code() string { return "UnsupportedOperation" } // Message returns the exception's message. -func (s UnsupportedOperation) Message() string { +func (s *UnsupportedOperation) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6061,22 +6140,22 @@ func (s UnsupportedOperation) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperation) OrigErr() error { +func (s *UnsupportedOperation) OrigErr() error { return nil } -func (s UnsupportedOperation) Error() string { +func (s *UnsupportedOperation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperation) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperation) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperation) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperation) RequestID() string { + return s.RespMetadata.RequestID } // The request object for UntagResource action. @@ -6407,10 +6486,17 @@ type WindowsFileSystemConfiguration struct { // Specifies the file system deployment type, valid values are the following: // // * MULTI_AZ_1 - Specifies a high availability file system that is configured - // for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability. + // for Multi-AZ redundancy to tolerate temporary Availability Zone (AZ) unavailability, + // and supports SSD and HDD storage. // // * SINGLE_AZ_1 - (Default) Specifies a file system that is configured for - // single AZ redundancy. + // single AZ redundancy, only supports SSD storage. + // + // * SINGLE_AZ_2 - Latest generation Single AZ file system. Specifies a file + // system that is configured for single AZ redundancy and supports SSD and + // HDD storage. + // + // For more information, see Single-AZ and Multi-AZ File Systems (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html). DeploymentType *string `type:"string" enum:"WindowsDeploymentType"` // The list of maintenance operations in progress for this file system. @@ -6421,12 +6507,11 @@ type WindowsFileSystemConfiguration struct { // // Use this IP address when mounting the file system on Linux SMB clients or // Windows SMB clients that are not joined to a Microsoft Active Directory. - // Applicable for both SINGLE_AZ_1 and MULTI_AZ_1 deployment types. This IP - // address is temporarily unavailable when the file system is undergoing maintenance. + // Applicable for all Windows file system deployment types. This IP address + // is temporarily unavailable when the file system is undergoing maintenance. // For Linux and Windows SMB clients that are joined to an Active Directory, - // use the file system's DNSName instead. For more information and instruction - // on mapping and mounting file shares, see https://docs.aws.amazon.com/fsx/latest/WindowsGuide/accessing-file-shares.html - // (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/accessing-file-shares.html). + // use the file system's DNSName instead. For more information on mapping and + // mounting file shares, see Accessing File Shares (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/accessing-file-shares.html). PreferredFileServerIp *string `min:"7" type:"string"` // For MULTI_AZ_1 deployment types, it specifies the ID of the subnet where @@ -6434,13 +6519,16 @@ type WindowsFileSystemConfiguration struct { // in SubnetIds property. Amazon FSx serves traffic from this subnet except // in the event of a failover to the secondary file server. // - // For SINGLE_AZ_1 deployment types, this value is the same as that for SubnetIDs. + // For SINGLE_AZ_1 and SINGLE_AZ_2 deployment types, this value is the same + // as that for SubnetIDs. For more information, see Availability and Durability: + // Single-AZ and Multi-AZ File Systems (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/high-availability-multiAZ.html#single-multi-az-resources) PreferredSubnetId *string `min:"15" type:"string"` // For MULTI_AZ_1 deployment types, use this endpoint when performing administrative // tasks on the file system using Amazon FSx Remote PowerShell. // - // For SINGLE_AZ_1 deployment types, this is the DNS name of the file system. + // For SINGLE_AZ_1 and SINGLE_AZ_2 deployment types, this is the DNS name of + // the file system. // // This endpoint is temporarily unavailable when the file system is undergoing // maintenance. @@ -6703,10 +6791,22 @@ const ( ServiceLimitTotalUserInitiatedBackups = "TOTAL_USER_INITIATED_BACKUPS" ) +// The storage type for your Amazon FSx file system. +const ( + // StorageTypeSsd is a StorageType enum value + StorageTypeSsd = "SSD" + + // StorageTypeHdd is a StorageType enum value + StorageTypeHdd = "HDD" +) + const ( // WindowsDeploymentTypeMultiAz1 is a WindowsDeploymentType enum value WindowsDeploymentTypeMultiAz1 = "MULTI_AZ_1" // WindowsDeploymentTypeSingleAz1 is a WindowsDeploymentType enum value WindowsDeploymentTypeSingleAz1 = "SINGLE_AZ_1" + + // WindowsDeploymentTypeSingleAz2 is a WindowsDeploymentType enum value + WindowsDeploymentTypeSingleAz2 = "SINGLE_AZ_2" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go index 48ab3b57d31..41c2a1d5d4f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go @@ -49,6 +49,9 @@ const ( // svc := fsx.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *FSx { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "fsx" + } return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) } 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 9f89e27cd63..d4e7cf76e2d 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 @@ -145,6 +145,161 @@ func (c *GameLift) AcceptMatchWithContext(ctx aws.Context, input *AcceptMatchInp return out, req.Send() } +const opClaimGameServer = "ClaimGameServer" + +// ClaimGameServerRequest generates a "aws/request.Request" representing the +// client's request for the ClaimGameServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ClaimGameServer for more information on using the ClaimGameServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ClaimGameServerRequest method. +// req, resp := client.ClaimGameServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ClaimGameServer +func (c *GameLift) ClaimGameServerRequest(input *ClaimGameServerInput) (req *request.Request, output *ClaimGameServerOutput) { + op := &request.Operation{ + Name: opClaimGameServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ClaimGameServerInput{} + } + + output = &ClaimGameServerOutput{} + req = c.newRequest(op, input, output) + return +} + +// ClaimGameServer API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Locates an available game server and temporarily reserves it to host gameplay +// and players. This action is called by a game client or client service (such +// as a matchmaker) to request hosting resources for a new game session. In +// response, GameLift FleetIQ searches for an available game server in the specified +// game server group, places the game server in "claimed" status for 60 seconds, +// and returns connection information back to the requester so that players +// can connect to the game server. +// +// There are two ways you can claim a game server. For the first option, you +// provide a game server group ID only, which prompts GameLift FleetIQ to search +// for an available game server in the specified group and claim it. With this +// option, GameLift FleetIQ attempts to consolidate gameplay on as few instances +// as possible to minimize hosting costs. For the second option, you request +// a specific game server by its ID. This option results in a less efficient +// claiming process because it does not take advantage of consolidation and +// may fail if the requested game server is unavailable. +// +// To claim a game server, identify a game server group and (optionally) a game +// server ID. If your game requires that game data be provided to the game server +// at the start of a game, such as a game map or player information, you can +// provide it in your claim request. +// +// When a game server is successfully claimed, connection information is returned. +// A claimed game server's utilization status remains AVAILABLE, while the claim +// status is set to CLAIMED for up to 60 seconds. This time period allows the +// game server to be prompted to update its status to UTILIZED (using UpdateGameServer). +// If the game server's status is not updated within 60 seconds, the game server +// reverts to unclaimed status and is available to be claimed by another request. +// +// If you try to claim a specific game server, this request will fail in the +// following cases: (1) if the game server utilization status is UTILIZED, (2) +// if the game server claim status is CLAIMED, or (3) if the instance that the +// game server is running on is flagged as draining. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * RegisterGameServer +// +// * ListGameServers +// +// * ClaimGameServer +// +// * DescribeGameServer +// +// * UpdateGameServer +// +// * DeregisterGameServer +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation ClaimGameServer for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. +// +// * OutOfCapacityException +// The specified game server group has no available game servers to fulfill +// a ClaimGameServer request. Clients can retry such requests immediately or +// after a waiting period. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ClaimGameServer +func (c *GameLift) ClaimGameServer(input *ClaimGameServerInput) (*ClaimGameServerOutput, error) { + req, out := c.ClaimGameServerRequest(input) + return out, req.Send() +} + +// ClaimGameServerWithContext is the same as ClaimGameServer with the addition of +// the ability to pass a context and additional request options. +// +// See ClaimGameServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) ClaimGameServerWithContext(ctx aws.Context, input *ClaimGameServerInput, opts ...request.Option) (*ClaimGameServerOutput, error) { + req, out := c.ClaimGameServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the @@ -319,45 +474,40 @@ func (c *GameLift) CreateBuildRequest(input *CreateBuildInput) (req *request.Req // CreateBuild API operation for Amazon GameLift. // -// Creates a new Amazon GameLift build record for your game server binary files -// and points to the location of your game server build files in an Amazon Simple -// Storage Service (Amazon S3) location. -// -// Game server binaries must be combined into a zip file for use with Amazon -// GameLift. -// -// To create new builds directly from a file directory, use the AWS CLI command -// upload-build (https://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html) -// . This helper command uploads build files and creates a new build record -// in one step, and automatically handles the necessary permissions. -// -// The CreateBuild operation should be used only in the following scenarios: -// -// * To create a new game build with build files that are in an Amazon S3 -// bucket under your own AWS account. To use this option, you must first -// give Amazon GameLift access to that Amazon S3 bucket. Then call CreateBuild -// and specify a build name, operating system, and the Amazon S3 storage -// location of your game build. -// -// * To upload build files directly to Amazon GameLift's Amazon S3 account. -// To use this option, first call CreateBuild and specify a build name and -// operating system. This action creates a new build record and returns an -// Amazon S3 storage location (bucket and key only) and temporary access -// credentials. Use the credentials to manually upload your build file to -// the provided storage location (see the Amazon S3 topic Uploading Objects -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html)). -// You can upload build files to the GameLift Amazon S3 location only once. -// -// If successful, this operation creates a new build record with a unique build -// ID and places it in INITIALIZED status. You can use DescribeBuild to check -// the status of your build. A build must be in READY status before it can be -// used to create fleets. +// Creates a new Amazon GameLift build resource for your game server binary +// files. Game server binaries must be combined into a zip file for use with +// Amazon GameLift. +// +// When setting up a new game build for GameLift, we recommend using the AWS +// CLI command upload-build (https://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html) +// . This helper command combines two tasks: (1) it uploads your build files +// from a file directory to a GameLift Amazon S3 location, and (2) it creates +// a new build resource. +// +// The CreateBuild operation can used in the following scenarios: +// +// * To create a new game build with build files that are in an S3 location +// under an AWS account that you control. To use this option, you must first +// give Amazon GameLift access to the S3 bucket. With permissions in place, +// call CreateBuild and specify a build name, operating system, and the S3 +// storage location of your game build. +// +// * To directly upload your build files to a GameLift S3 location. To use +// this option, first call CreateBuild and specify a build name and operating +// system. This action creates a new build resource and also returns an S3 +// location with temporary access credentials. Use the credentials to manually +// upload your build files to the specified S3 location. For more information, +// see Uploading Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html) +// in the Amazon S3 Developer Guide. Build files can be uploaded to the GameLift +// S3 location once only; that can't be updated. +// +// If successful, this operation creates a new build resource with a unique +// build ID and places it in INITIALIZED status. A build must be in READY status +// before you can create fleets with it. // // Learn more // // Uploading Your Game (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) -// https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // // Create a Build with Files in Amazon S3 (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html#gamelift-build-cli-uploading-create-build) // @@ -476,17 +626,16 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // set some configuration options, and specify the game server to deploy on // the new fleet. // -// To create a new fleet, you must provide the following: (1) a fleet name, -// (2) an EC2 instance type and fleet type (spot or on-demand), (3) the build -// ID for your game build or script ID if using Realtime Servers, and (4) a -// runtime configuration, which determines how game servers will run on each -// instance in the fleet. +// To create a new fleet, provide the following: (1) a fleet name, (2) an EC2 +// instance type and fleet type (spot or on-demand), (3) the build ID for your +// game build or script ID if using Realtime Servers, and (4) a runtime configuration, +// which determines how game servers will run on each instance in the fleet. // // If the CreateFleet call is successful, Amazon GameLift performs the following // tasks. You can track the process of a fleet by checking the fleet status // or by monitoring fleet creation events: // -// * Creates a fleet record. Status: NEW. +// * Creates a fleet resource. Status: NEW. // // * Begins writing events to the fleet event log, which can be accessed // in the Amazon GameLift console. @@ -506,9 +655,9 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // Learn more // -// Setting Up Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// Setting Up Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // -// Debug Fleet Creation Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html#fleets-creating-debug-creation) +// Debug Fleet Creation Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html#fleets-creating-debug-creation) // // Related operations // @@ -522,7 +671,7 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -584,6 +733,162 @@ func (c *GameLift) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInp return out, req.Send() } +const opCreateGameServerGroup = "CreateGameServerGroup" + +// CreateGameServerGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateGameServerGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGameServerGroup for more information on using the CreateGameServerGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGameServerGroupRequest method. +// req, resp := client.CreateGameServerGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameServerGroup +func (c *GameLift) CreateGameServerGroupRequest(input *CreateGameServerGroupInput) (req *request.Request, output *CreateGameServerGroupOutput) { + op := &request.Operation{ + Name: opCreateGameServerGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateGameServerGroupInput{} + } + + output = &CreateGameServerGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGameServerGroup API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Creates a GameLift FleetIQ game server group to manage a collection of EC2 +// instances for game hosting. In addition to creating the game server group, +// this action also creates an Auto Scaling group in your AWS account and establishes +// a link between the two groups. You have full control over configuration of +// the Auto Scaling group, but GameLift FleetIQ routinely certain Auto Scaling +// group properties in order to optimize the group's instances for low-cost +// game hosting. You can view the status of your game server groups in the GameLift +// Console. Game server group metrics and events are emitted to Amazon CloudWatch. +// +// Prior creating a new game server group, you must set up the following: +// +// * An EC2 launch template. The template provides configuration settings +// for a set of EC2 instances and includes the game server build that you +// want to deploy and run on each instance. For more information on creating +// a launch template, see Launching an Instance from a Launch Template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) +// in the Amazon EC2 User Guide. +// +// * An IAM role. The role sets up limited access to your AWS account, allowing +// GameLift FleetIQ to create and manage the EC2 Auto Scaling group, get +// instance data, and emit metrics and events to CloudWatch. For more information +// on setting up an IAM permissions policy with principal access for GameLift, +// see Specifying a Principal in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-bucket-user-policy-specifying-principal-intro.html) +// in the Amazon S3 Developer Guide. +// +// To create a new game server group, provide a name and specify the IAM role +// and EC2 launch template. You also need to provide a list of instance types +// to be used in the group and set initial maximum and minimum limits on the +// group's instance count. You can optionally set an autoscaling policy with +// target tracking based on a GameLift FleetIQ metric. +// +// Once the game server group and corresponding Auto Scaling group are created, +// you have full access to change the Auto Scaling group's configuration as +// needed. Keep in mind, however, that some properties are periodically updated +// by GameLift FleetIQ as it balances the group's instances based on availability +// and cost. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Updating a GameLift FleetIQ-Linked Auto Scaling Group (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-asgroups.html) +// +// Related operations +// +// * CreateGameServerGroup +// +// * ListGameServerGroups +// +// * DescribeGameServerGroup +// +// * UpdateGameServerGroup +// +// * DeleteGameServerGroup +// +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation CreateGameServerGroup for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * LimitExceededException +// The requested operation would cause the resource to exceed the allowed service +// limit. Resolve the issue before retrying. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameServerGroup +func (c *GameLift) CreateGameServerGroup(input *CreateGameServerGroupInput) (*CreateGameServerGroupOutput, error) { + req, out := c.CreateGameServerGroupRequest(input) + return out, req.Send() +} + +// CreateGameServerGroupWithContext is the same as CreateGameServerGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGameServerGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) CreateGameServerGroupWithContext(ctx aws.Context, input *CreateGameServerGroupInput, opts ...request.Option) (*CreateGameServerGroupOutput, error) { + req, out := c.CreateGameServerGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateGameSession = "CreateGameSession" // CreateGameSessionRequest generates a "aws/request.Request" representing the @@ -824,6 +1129,14 @@ func (c *GameLift) CreateGameSessionQueueRequest(input *CreateGameSessionQueueIn // and, if desired, a set of latency policies. If successful, a new queue object // is returned. // +// Learn more +// +// Design a Game Session Queue (https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-design.html) +// +// Create a Game Session Queue (https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-creating.html) +// +// Related operations +// // * CreateGameSessionQueue // // * DescribeGameSessionQueues @@ -1969,16 +2282,16 @@ func (c *GameLift) DeleteBuildRequest(input *DeleteBuildInput) (req *request.Req // DeleteBuild API operation for Amazon GameLift. // -// Deletes a build. This action permanently deletes the build record and any -// uploaded build files. +// Deletes a build. This action permanently deletes the build resource and any +// uploaded build files. Deleting a build does not affect the status of any +// active fleets using the build, but you can no longer create new fleets with +// the deleted build. // -// To delete a build, specify its ID. Deleting a build does not affect the status -// of any active fleets using the build, but you can no longer create new fleets -// with the deleted build. +// To delete a build, specify the build ID. // // Learn more // -// Working with Builds (https://docs.aws.amazon.com/gamelift/latest/developerguide/build-intro.html) +// Upload a Custom Server Build (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) // // Related operations // @@ -2096,12 +2409,12 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // You do not need to explicitly delete the VPC peering connection--this is // done as part of the delete fleet process. // -// This action removes the fleet's resources and the fleet record. Once a fleet -// is deleted, you can no longer use that fleet. +// This action removes the fleet and its resources. Once a fleet is deleted, +// you can no longer use any of the resource in that fleet. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -2115,7 +2428,7 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2173,76 +2486,101 @@ func (c *GameLift) DeleteFleetWithContext(ctx aws.Context, input *DeleteFleetInp return out, req.Send() } -const opDeleteGameSessionQueue = "DeleteGameSessionQueue" +const opDeleteGameServerGroup = "DeleteGameServerGroup" -// DeleteGameSessionQueueRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGameSessionQueue operation. The "output" return +// DeleteGameServerGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGameServerGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteGameSessionQueue for more information on using the DeleteGameSessionQueue +// See DeleteGameServerGroup for more information on using the DeleteGameServerGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DeleteGameSessionQueueRequest method. -// req, resp := client.DeleteGameSessionQueueRequest(params) +// // Example sending a request using the DeleteGameServerGroupRequest method. +// req, resp := client.DeleteGameServerGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue -func (c *GameLift) DeleteGameSessionQueueRequest(input *DeleteGameSessionQueueInput) (req *request.Request, output *DeleteGameSessionQueueOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameServerGroup +func (c *GameLift) DeleteGameServerGroupRequest(input *DeleteGameServerGroupInput) (req *request.Request, output *DeleteGameServerGroupOutput) { op := &request.Operation{ - Name: opDeleteGameSessionQueue, + Name: opDeleteGameServerGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteGameSessionQueueInput{} + input = &DeleteGameServerGroupInput{} } - output = &DeleteGameSessionQueueOutput{} + output = &DeleteGameServerGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteGameSessionQueue API operation for Amazon GameLift. +// DeleteGameServerGroup API operation for Amazon GameLift. // -// Deletes a game session queue. This action means that any StartGameSessionPlacement -// requests that reference this queue will fail. To delete a queue, specify -// the queue name. +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. // -// * CreateGameSessionQueue +// Terminates a game server group and permanently deletes the game server group +// record. You have several options for how these resources are impacted when +// deleting the game server group. Depending on the type of delete action selected, +// this action may affect three types of resources: the game server group, the +// corresponding Auto Scaling group, and all game servers currently running +// in the group. // -// * DescribeGameSessionQueues +// To delete a game server group, identify the game server group to delete and +// specify the type of delete action to initiate. Game server groups can only +// be deleted if they are in ACTIVE or ERROR status. // -// * UpdateGameSessionQueue +// If the delete request is successful, a series of actions are kicked off. +// The game server group status is changed to DELETE_SCHEDULED, which prevents +// new game servers from being registered and stops autoscaling activity. Once +// all game servers in the game server group are de-registered, GameLift FleetIQ +// can begin deleting resources. If any of the delete actions fail, the game +// server group is placed in ERROR status. // -// * DeleteGameSessionQueue +// GameLift FleetIQ emits delete events to Amazon CloudWatch. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * CreateGameServerGroup +// +// * ListGameServerGroups +// +// * DescribeGameServerGroup +// +// * UpdateGameServerGroup +// +// * DeleteGameServerGroup +// +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon GameLift's -// API operation DeleteGameSessionQueue for usage and error information. +// API operation DeleteGameServerGroup for usage and error information. // // Returned Error Types: -// * InternalServiceException -// The service encountered an unrecoverable internal failure while processing -// the request. Clients can retry such requests immediately or after a waiting -// period. -// // * InvalidRequestException // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. @@ -2254,52 +2592,166 @@ func (c *GameLift) DeleteGameSessionQueueRequest(input *DeleteGameSessionQueueIn // * UnauthorizedException // The client failed authentication. Clients should not retry such requests. // -// * TaggingFailedException -// The requested tagging operation did not succeed. This may be due to invalid -// tag format or the maximum tag limit may have been exceeded. Resolve the issue -// before retrying. +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue -func (c *GameLift) DeleteGameSessionQueue(input *DeleteGameSessionQueueInput) (*DeleteGameSessionQueueOutput, error) { - req, out := c.DeleteGameSessionQueueRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameServerGroup +func (c *GameLift) DeleteGameServerGroup(input *DeleteGameServerGroupInput) (*DeleteGameServerGroupOutput, error) { + req, out := c.DeleteGameServerGroupRequest(input) return out, req.Send() } -// DeleteGameSessionQueueWithContext is the same as DeleteGameSessionQueue with the addition of +// DeleteGameServerGroupWithContext is the same as DeleteGameServerGroup with the addition of // the ability to pass a context and additional request options. // -// See DeleteGameSessionQueue for details on how to use this API operation. +// See DeleteGameServerGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) DeleteGameSessionQueueWithContext(ctx aws.Context, input *DeleteGameSessionQueueInput, opts ...request.Option) (*DeleteGameSessionQueueOutput, error) { - req, out := c.DeleteGameSessionQueueRequest(input) +func (c *GameLift) DeleteGameServerGroupWithContext(ctx aws.Context, input *DeleteGameServerGroupInput, opts ...request.Option) (*DeleteGameServerGroupOutput, error) { + req, out := c.DeleteGameServerGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteMatchmakingConfiguration = "DeleteMatchmakingConfiguration" +const opDeleteGameSessionQueue = "DeleteGameSessionQueue" -// DeleteMatchmakingConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMatchmakingConfiguration operation. The "output" return +// DeleteGameSessionQueueRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteMatchmakingConfiguration for more information on using the DeleteMatchmakingConfiguration +// See DeleteGameSessionQueue for more information on using the DeleteGameSessionQueue // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DeleteMatchmakingConfigurationRequest method. -// req, resp := client.DeleteMatchmakingConfigurationRequest(params) +// // Example sending a request using the DeleteGameSessionQueueRequest method. +// req, resp := client.DeleteGameSessionQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue +func (c *GameLift) DeleteGameSessionQueueRequest(input *DeleteGameSessionQueueInput) (req *request.Request, output *DeleteGameSessionQueueOutput) { + op := &request.Operation{ + Name: opDeleteGameSessionQueue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteGameSessionQueueInput{} + } + + output = &DeleteGameSessionQueueOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteGameSessionQueue API operation for Amazon GameLift. +// +// Deletes a game session queue. This action means that any StartGameSessionPlacement +// requests that reference this queue will fail. To delete a queue, specify +// the queue name. +// +// Learn more +// +// Using Multi-Region Queues (https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html) +// +// Related operations +// +// * CreateGameSessionQueue +// +// * DescribeGameSessionQueues +// +// * UpdateGameSessionQueue +// +// * DeleteGameSessionQueue +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation DeleteGameSessionQueue for usage and error information. +// +// Returned Error Types: +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * TaggingFailedException +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue +func (c *GameLift) DeleteGameSessionQueue(input *DeleteGameSessionQueueInput) (*DeleteGameSessionQueueOutput, error) { + req, out := c.DeleteGameSessionQueueRequest(input) + return out, req.Send() +} + +// DeleteGameSessionQueueWithContext is the same as DeleteGameSessionQueue with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGameSessionQueue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) DeleteGameSessionQueueWithContext(ctx aws.Context, input *DeleteGameSessionQueueInput, opts ...request.Option) (*DeleteGameSessionQueueOutput, error) { + req, out := c.DeleteGameSessionQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteMatchmakingConfiguration = "DeleteMatchmakingConfiguration" + +// DeleteMatchmakingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteMatchmakingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteMatchmakingConfiguration for more information on using the DeleteMatchmakingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteMatchmakingConfigurationRequest method. +// req, resp := client.DeleteMatchmakingConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled @@ -2971,6 +3423,126 @@ func (c *GameLift) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input return out, req.Send() } +const opDeregisterGameServer = "DeregisterGameServer" + +// DeregisterGameServerRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterGameServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterGameServer for more information on using the DeregisterGameServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterGameServerRequest method. +// req, resp := client.DeregisterGameServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeregisterGameServer +func (c *GameLift) DeregisterGameServerRequest(input *DeregisterGameServerInput) (req *request.Request, output *DeregisterGameServerOutput) { + op := &request.Operation{ + Name: opDeregisterGameServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeregisterGameServerInput{} + } + + output = &DeregisterGameServerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeregisterGameServer API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Removes the game server resource from the game server group. As a result +// of this action, the de-registered game server can no longer be claimed and +// will not returned in a list of active game servers. +// +// To de-register a game server, specify the game server group and game server +// ID. If successful, this action emits a CloudWatch event with termination +// time stamp and reason. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * RegisterGameServer +// +// * ListGameServers +// +// * ClaimGameServer +// +// * DescribeGameServer +// +// * UpdateGameServer +// +// * DeregisterGameServer +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation DeregisterGameServer for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeregisterGameServer +func (c *GameLift) DeregisterGameServer(input *DeregisterGameServerInput) (*DeregisterGameServerOutput, error) { + req, out := c.DeregisterGameServerRequest(input) + return out, req.Send() +} + +// DeregisterGameServerWithContext is the same as DeregisterGameServer with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterGameServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) DeregisterGameServerWithContext(ctx aws.Context, input *DeregisterGameServerInput, opts ...request.Option) (*DeregisterGameServerOutput, error) { + req, out := c.DeregisterGameServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAlias = "DescribeAlias" // DescribeAliasRequest generates a "aws/request.Request" representing the @@ -3123,12 +3695,13 @@ func (c *GameLift) DescribeBuildRequest(input *DescribeBuildInput) (req *request // DescribeBuild API operation for Amazon GameLift. // -// Retrieves properties for a build. To request a build record, specify a build -// ID. If successful, an object containing the build properties is returned. +// Retrieves properties for a custom game build. To request a build resource, +// specify a build ID. If successful, an object containing the build properties +// is returned. // // Learn more // -// Working with Builds (https://docs.aws.amazon.com/gamelift/latest/developerguide/build-intro.html) +// Upload a Custom Server Build (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) // // Related operations // @@ -3234,17 +3807,17 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // Retrieves the following information for the specified EC2 instance type: // -// * maximum number of instances allowed per AWS account (service limit) +// * Maximum number of instances allowed per AWS account (service limit). // -// * current usage level for the AWS account +// * Current usage for the AWS account. // -// Service limits vary depending on Region. Available Regions for Amazon GameLift -// can be found in the AWS Management Console for Amazon GameLift (see the drop-down -// list in the upper right corner). +// To learn more about the capabilities of each instance type, see Amazon EC2 +// Instance Types (http://aws.amazon.com/ec2/instance-types/). Note that the +// instance types offered may vary depending on the region. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -3254,14 +3827,11 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3349,21 +3919,23 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // DescribeFleetAttributes API operation for Amazon GameLift. // -// Retrieves fleet properties, including metadata, status, and configuration, -// for one or more fleets. You can request attributes for all fleets, or specify -// a list of one or more fleet IDs. When requesting multiple fleets, use the -// pagination parameters to retrieve results as a set of sequential pages. If -// successful, a FleetAttributes object is returned for each requested fleet -// ID. When specifying a list of fleet IDs, attribute objects are returned only -// for fleets that currently exist. +// Retrieves core properties, including configuration, status, and metadata, +// for a fleet. +// +// To get attributes for one or more fleets, provide a list of fleet IDs or +// fleet ARNs. To get attributes for all fleets, do not specify a fleet identifier. +// When requesting attributes for multiple fleets, use the pagination parameters +// to retrieve results as a set of sequential pages. If successful, a FleetAttributes +// object is returned for each fleet requested, unless the fleet identifier +// is not found. // // Some API actions may limit the number of fleet IDs allowed in one request. // If a request exceeds this limit, the request fails and the error message -// includes the maximum allowed. +// includes the maximum allowed number. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -3379,7 +3951,7 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3471,14 +4043,17 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // DescribeFleetCapacity API operation for Amazon GameLift. // -// Retrieves the current status of fleet capacity for one or more fleets. This -// information includes the number of instances that have been requested for -// the fleet and the number currently active. You can request capacity for all -// fleets, or specify a list of one or more fleet IDs. When requesting multiple -// fleets, use the pagination parameters to retrieve results as a set of sequential -// pages. If successful, a FleetCapacity object is returned for each requested -// fleet ID. When specifying a list of fleet IDs, attribute objects are returned -// only for fleets that currently exist. +// Retrieves the current capacity statistics for one or more fleets. These statistics +// present a snapshot of the fleet's instances and provide insight on current +// or imminent scaling activity. To get statistics on game hosting activity +// in the fleet, see DescribeFleetUtilization. +// +// You can request capacity for all fleets or specify a list of one or more +// fleet identifiers. When requesting multiple fleets, use the pagination parameters +// to retrieve results as a set of sequential pages. If successful, a FleetCapacity +// object is returned for each requested fleet ID. When a list of fleet IDs +// is provided, attribute objects are returned only for fleets that currently +// exist. // // Some API actions may limit the number of fleet IDs allowed in one request. // If a request exceeds this limit, the request fails and the error message @@ -3486,7 +4061,9 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// +// GameLift Metrics for Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html#gamelift-metrics-fleet) // // Related operations // @@ -3502,7 +4079,7 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3601,7 +4178,7 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -3617,7 +4194,7 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3709,16 +4286,19 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // DescribeFleetPortSettings API operation for Amazon GameLift. // -// Retrieves the inbound connection permissions for a fleet. Connection permissions -// include a range of IP addresses and port settings that incoming traffic can -// use to access server processes in the fleet. To get a fleet's inbound connection -// permissions, specify a fleet ID. If successful, a collection of IpPermission -// objects is returned for the requested fleet ID. If the requested fleet has -// been deleted, the result set is empty. +// Retrieves a fleet's inbound connection permissions. Connection permissions +// specify the range of IP addresses and port settings that incoming traffic +// can use to access server processes in the fleet. Game sessions that are running +// on instances in the fleet use connections that fall in this range. +// +// To get a fleet's inbound connection permissions, specify the fleet's unique +// identifier. If successful, a collection of IpPermission objects is returned +// for the requested fleet ID. If the requested fleet has been deleted, the +// result set is empty. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -3734,7 +4314,7 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3826,12 +4406,15 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // DescribeFleetUtilization API operation for Amazon GameLift. // -// Retrieves utilization statistics for one or more fleets. You can request -// utilization data for all fleets, or specify a list of one or more fleet IDs. -// When requesting multiple fleets, use the pagination parameters to retrieve -// results as a set of sequential pages. If successful, a FleetUtilization object -// is returned for each requested fleet ID. When specifying a list of fleet -// IDs, utilization objects are returned only for fleets that currently exist. +// Retrieves utilization statistics for one or more fleets. These statistics +// provide insight into how available hosting resources are currently being +// used. To get statistics on available hosting resources, see DescribeFleetCapacity. +// +// You can request utilization data for all fleets, or specify a list of one +// or more fleet IDs. When requesting multiple fleets, use the pagination parameters +// to retrieve results as a set of sequential pages. If successful, a FleetUtilization +// object is returned for each requested fleet ID, unless the fleet identifier +// is not found. // // Some API actions may limit the number of fleet IDs allowed in one request. // If a request exceeds this limit, the request fails and the error message @@ -3839,7 +4422,9 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// +// GameLift Metrics for Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html#gamelift-metrics-fleet) // // Related operations // @@ -3855,7 +4440,7 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3903,76 +4488,312 @@ func (c *GameLift) DescribeFleetUtilizationWithContext(ctx aws.Context, input *D return out, req.Send() } -const opDescribeGameSessionDetails = "DescribeGameSessionDetails" +const opDescribeGameServer = "DescribeGameServer" -// DescribeGameSessionDetailsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeGameSessionDetails operation. The "output" return +// DescribeGameServerRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGameServer operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeGameSessionDetails for more information on using the DescribeGameSessionDetails +// See DescribeGameServer for more information on using the DescribeGameServer // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeGameSessionDetailsRequest method. -// req, resp := client.DescribeGameSessionDetailsRequest(params) +// // Example sending a request using the DescribeGameServerRequest method. +// req, resp := client.DescribeGameServerRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionDetails -func (c *GameLift) DescribeGameSessionDetailsRequest(input *DescribeGameSessionDetailsInput) (req *request.Request, output *DescribeGameSessionDetailsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameServer +func (c *GameLift) DescribeGameServerRequest(input *DescribeGameServerInput) (req *request.Request, output *DescribeGameServerOutput) { op := &request.Operation{ - Name: opDescribeGameSessionDetails, + Name: opDescribeGameServer, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeGameSessionDetailsInput{} + input = &DescribeGameServerInput{} } - output = &DescribeGameSessionDetailsOutput{} + output = &DescribeGameServerOutput{} req = c.newRequest(op, input, output) return } -// DescribeGameSessionDetails API operation for Amazon GameLift. +// DescribeGameServer API operation for Amazon GameLift. // -// Retrieves properties, including the protection policy in force, for one or -// more game sessions. This action can be used in several ways: (1) provide -// a GameSessionId or GameSessionArn to request details for a specific game -// session; (2) provide either a FleetId or an AliasId to request properties -// for all game sessions running on a fleet. +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. // -// To get game session record(s), specify just one of the following: game session -// ID, fleet ID, or alias ID. You can filter this request by game session status. -// Use the pagination parameters to retrieve results as a set of sequential -// pages. If successful, a GameSessionDetail object is returned for each session -// matching the request. +// Retrieves information for a game server resource. Information includes the +// game server statuses, health check info, and the instance the game server +// is running on. // -// * CreateGameSession +// To retrieve game server information, specify the game server ID. If successful, +// the requested game server object is returned. // -// * DescribeGameSessions +// Learn more // -// * DescribeGameSessionDetails +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) // -// * SearchGameSessions +// Related operations // -// * UpdateGameSession +// * RegisterGameServer // -// * GetGameSessionLogUrl +// * ListGameServers // -// * Game session placements StartGameSessionPlacement DescribeGameSessionPlacement -// StopGameSessionPlacement +// * ClaimGameServer +// +// * DescribeGameServer +// +// * UpdateGameServer +// +// * DeregisterGameServer +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation DescribeGameServer for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameServer +func (c *GameLift) DescribeGameServer(input *DescribeGameServerInput) (*DescribeGameServerOutput, error) { + req, out := c.DescribeGameServerRequest(input) + return out, req.Send() +} + +// DescribeGameServerWithContext is the same as DescribeGameServer with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGameServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) DescribeGameServerWithContext(ctx aws.Context, input *DescribeGameServerInput, opts ...request.Option) (*DescribeGameServerOutput, error) { + req, out := c.DescribeGameServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeGameServerGroup = "DescribeGameServerGroup" + +// DescribeGameServerGroupRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGameServerGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeGameServerGroup for more information on using the DescribeGameServerGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeGameServerGroupRequest method. +// req, resp := client.DescribeGameServerGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameServerGroup +func (c *GameLift) DescribeGameServerGroupRequest(input *DescribeGameServerGroupInput) (req *request.Request, output *DescribeGameServerGroupOutput) { + op := &request.Operation{ + Name: opDescribeGameServerGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeGameServerGroupInput{} + } + + output = &DescribeGameServerGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGameServerGroup API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Retrieves information on a game server group. +// +// To get attributes for a game server group, provide a group name or ARN value. +// If successful, a GameServerGroup object is returned. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * CreateGameServerGroup +// +// * ListGameServerGroups +// +// * DescribeGameServerGroup +// +// * UpdateGameServerGroup +// +// * DeleteGameServerGroup +// +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation DescribeGameServerGroup for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameServerGroup +func (c *GameLift) DescribeGameServerGroup(input *DescribeGameServerGroupInput) (*DescribeGameServerGroupOutput, error) { + req, out := c.DescribeGameServerGroupRequest(input) + return out, req.Send() +} + +// DescribeGameServerGroupWithContext is the same as DescribeGameServerGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGameServerGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) DescribeGameServerGroupWithContext(ctx aws.Context, input *DescribeGameServerGroupInput, opts ...request.Option) (*DescribeGameServerGroupOutput, error) { + req, out := c.DescribeGameServerGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeGameSessionDetails = "DescribeGameSessionDetails" + +// DescribeGameSessionDetailsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGameSessionDetails operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeGameSessionDetails for more information on using the DescribeGameSessionDetails +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeGameSessionDetailsRequest method. +// req, resp := client.DescribeGameSessionDetailsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeGameSessionDetails +func (c *GameLift) DescribeGameSessionDetailsRequest(input *DescribeGameSessionDetailsInput) (req *request.Request, output *DescribeGameSessionDetailsOutput) { + op := &request.Operation{ + Name: opDescribeGameSessionDetails, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeGameSessionDetailsInput{} + } + + output = &DescribeGameSessionDetailsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGameSessionDetails API operation for Amazon GameLift. +// +// Retrieves properties, including the protection policy in force, for one or +// more game sessions. This action can be used in several ways: (1) provide +// a GameSessionId or GameSessionArn to request details for a specific game +// session; (2) provide either a FleetId or an AliasId to request properties +// for all game sessions running on a fleet. +// +// To get game session record(s), specify just one of the following: game session +// ID, fleet ID, or alias ID. You can filter this request by game session status. +// Use the pagination parameters to retrieve results as a set of sequential +// pages. If successful, a GameSessionDetail object is returned for each session +// matching the request. +// +// * CreateGameSession +// +// * DescribeGameSessions +// +// * DescribeGameSessionDetails +// +// * SearchGameSessions +// +// * UpdateGameSession +// +// * GetGameSessionLogUrl +// +// * Game session placements StartGameSessionPlacement DescribeGameSessionPlacement +// StopGameSessionPlacement // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4186,6 +5007,12 @@ func (c *GameLift) DescribeGameSessionQueuesRequest(input *DescribeGameSessionQu // for each requested queue. When specifying a list of queues, objects are returned // only for queues that currently exist in the Region. // +// Learn more +// +// View Your Queues (https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-console.html) +// +// Related operations +// // * CreateGameSessionQueue // // * DescribeGameSessionQueues @@ -4418,6 +5245,18 @@ func (c *GameLift) DescribeInstancesRequest(input *DescribeInstancesInput) (req // to retrieve results as a set of sequential pages. If successful, an Instance // object is returned for each result. // +// Learn more +// +// Remotely Access Fleet Instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html) +// +// Debug Fleet Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html) +// +// Related operations +// +// * DescribeInstances +// +// * GetInstanceAccess +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4973,13 +5812,19 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // DescribeRuntimeConfiguration API operation for Amazon GameLift. // -// Retrieves the current runtime configuration for the specified fleet. The -// runtime configuration tells Amazon GameLift how to launch server processes -// on instances in the fleet. +// Retrieves a fleet's runtime configuration settings. The runtime configuration +// tells Amazon GameLift which server processes to run (and how) on each instance +// in the fleet. +// +// To get a runtime configuration, specify the fleet's unique identifier. If +// successful, a RuntimeConfiguration object is returned for the requested fleet. +// If the requested fleet has been deleted, the result set is empty. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// +// Running Multiple Processes on a Fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html) // // Related operations // @@ -4995,7 +5840,7 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5639,22 +6484,34 @@ func (c *GameLift) GetInstanceAccessRequest(input *GetInstanceAccessInput) (req // GetInstanceAccess API operation for Amazon GameLift. // // Requests remote access to a fleet instance. Remote access is useful for debugging, -// gathering benchmarking data, or watching activity in real time. -// -// Access requires credentials that match the operating system of the instance. -// For a Windows instance, Amazon GameLift returns a user name and password -// as strings for use with a Windows Remote Desktop client. For a Linux instance, -// Amazon GameLift returns a user name and RSA private key, also as strings, -// for use with an SSH client. The private key must be saved in the proper format -// to a .pem file before using. If you're making this request using the AWS -// CLI, saving the secret can be handled as part of the GetInstanceAccess request. -// (See the example later in this topic). For more information on remote access, -// see Remotely Accessing an Instance (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html). +// gathering benchmarking data, or observing activity in real time. +// +// To remotely access an instance, you need credentials that match the operating +// system of the instance. For a Windows instance, Amazon GameLift returns a +// user name and password as strings for use with a Windows Remote Desktop client. +// For a Linux instance, Amazon GameLift returns a user name and RSA private +// key, also as strings, for use with an SSH client. The private key must be +// saved in the proper format to a .pem file before using. If you're making +// this request using the AWS CLI, saving the secret can be handled as part +// of the GetInstanceAccess request, as shown in one of the examples for this +// action. // // To request access to a specific instance, specify the IDs of both the instance // and the fleet it belongs to. You can retrieve a fleet's instance IDs by calling -// DescribeInstances. If successful, an InstanceAccess object is returned containing -// the instance's IP address and a set of credentials. +// DescribeInstances. If successful, an InstanceAccess object is returned that +// contains the instance's IP address and a set of credentials. +// +// Learn more +// +// Remotely Access Fleet Instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html) +// +// Debug Fleet Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html) +// +// Related operations +// +// * DescribeInstances +// +// * GetInstanceAccess // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5850,16 +6707,16 @@ func (c *GameLift) ListBuildsRequest(input *ListBuildsInput) (req *request.Reque // ListBuilds API operation for Amazon GameLift. // -// Retrieves build records for all builds associated with the AWS account in -// use. You can limit results to builds that are in a specific status by using -// the Status parameter. Use the pagination parameters to retrieve results in -// a set of sequential pages. +// Retrieves build resources for all builds associated with the AWS account +// in use. You can limit results to builds that are in a specific status by +// using the Status parameter. Use the pagination parameters to retrieve results +// in a set of sequential pages. // -// Build records are not listed in any particular order. +// Build resources are not listed in any particular order. // // Learn more // -// Working with Builds (https://docs.aws.amazon.com/gamelift/latest/developerguide/build-intro.html) +// Upload a Custom Server Build (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) // // Related operations // @@ -5959,16 +6816,16 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // ListFleets API operation for Amazon GameLift. // -// Retrieves a collection of fleet records for this AWS account. You can filter +// Retrieves a collection of fleet resources for this AWS account. You can filter // the result set to find only those fleets that are deployed with a specific // build or script. Use the pagination parameters to retrieve results in sequential // pages. // -// Fleet records are not listed in a particular order. +// Fleet resources are not listed in a particular order. // // Learn more // -// Set Up Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -5982,7 +6839,7 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6030,106 +6887,332 @@ func (c *GameLift) ListFleetsWithContext(ctx aws.Context, input *ListFleetsInput return out, req.Send() } -const opListScripts = "ListScripts" +const opListGameServerGroups = "ListGameServerGroups" -// ListScriptsRequest generates a "aws/request.Request" representing the -// client's request for the ListScripts operation. The "output" return +// ListGameServerGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListGameServerGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListScripts for more information on using the ListScripts +// See ListGameServerGroups for more information on using the ListGameServerGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListScriptsRequest method. -// req, resp := client.ListScriptsRequest(params) +// // Example sending a request using the ListGameServerGroupsRequest method. +// req, resp := client.ListGameServerGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListScripts -func (c *GameLift) ListScriptsRequest(input *ListScriptsInput) (req *request.Request, output *ListScriptsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListGameServerGroups +func (c *GameLift) ListGameServerGroupsRequest(input *ListGameServerGroupsInput) (req *request.Request, output *ListGameServerGroupsOutput) { op := &request.Operation{ - Name: opListScripts, + Name: opListGameServerGroups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListScriptsInput{} + input = &ListGameServerGroupsInput{} } - output = &ListScriptsOutput{} + output = &ListGameServerGroupsOutput{} req = c.newRequest(op, input, output) return } -// ListScripts API operation for Amazon GameLift. +// ListGameServerGroups API operation for Amazon GameLift. // -// Retrieves script records for all Realtime scripts that are associated with -// the AWS account in use. +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Retrieves information on all game servers groups that exist in the current +// AWS account for the selected region. Use the pagination parameters to retrieve +// results in a set of sequential pages. // // Learn more // -// Amazon GameLift Realtime Servers (https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-intro.html) +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) // // Related operations // -// * CreateScript +// * CreateGameServerGroup // -// * ListScripts +// * ListGameServerGroups // -// * DescribeScript +// * DescribeGameServerGroup // -// * UpdateScript +// * UpdateGameServerGroup // -// * DeleteScript +// * DeleteGameServerGroup +// +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon GameLift's -// API operation ListScripts for usage and error information. +// API operation ListGameServerGroups for usage and error information. // // Returned Error Types: -// * UnauthorizedException -// The client failed authentication. Clients should not retry such requests. -// // * InvalidRequestException // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. // +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// // * InternalServiceException // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting // period. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListScripts -func (c *GameLift) ListScripts(input *ListScriptsInput) (*ListScriptsOutput, error) { - req, out := c.ListScriptsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListGameServerGroups +func (c *GameLift) ListGameServerGroups(input *ListGameServerGroupsInput) (*ListGameServerGroupsOutput, error) { + req, out := c.ListGameServerGroupsRequest(input) return out, req.Send() } -// ListScriptsWithContext is the same as ListScripts with the addition of +// ListGameServerGroupsWithContext is the same as ListGameServerGroups with the addition of // the ability to pass a context and additional request options. // -// See ListScripts for details on how to use this API operation. +// See ListGameServerGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) ListScriptsWithContext(ctx aws.Context, input *ListScriptsInput, opts ...request.Option) (*ListScriptsOutput, error) { - req, out := c.ListScriptsRequest(input) +func (c *GameLift) ListGameServerGroupsWithContext(ctx aws.Context, input *ListGameServerGroupsInput, opts ...request.Option) (*ListGameServerGroupsOutput, error) { + req, out := c.ListGameServerGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGameServers = "ListGameServers" + +// ListGameServersRequest generates a "aws/request.Request" representing the +// client's request for the ListGameServers operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGameServers for more information on using the ListGameServers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGameServersRequest method. +// req, resp := client.ListGameServersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListGameServers +func (c *GameLift) ListGameServersRequest(input *ListGameServersInput) (req *request.Request, output *ListGameServersOutput) { + op := &request.Operation{ + Name: opListGameServers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListGameServersInput{} + } + + output = &ListGameServersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGameServers API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Retrieves information on all game servers that are currently running in a +// specified game server group. If there are custom key sort values for your +// game servers, you can opt to have the returned list sorted based on these +// values. Use the pagination parameters to retrieve results in a set of sequential +// pages. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * RegisterGameServer +// +// * ListGameServers +// +// * ClaimGameServer +// +// * DescribeGameServer +// +// * UpdateGameServer +// +// * DeregisterGameServer +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation ListGameServers for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListGameServers +func (c *GameLift) ListGameServers(input *ListGameServersInput) (*ListGameServersOutput, error) { + req, out := c.ListGameServersRequest(input) + return out, req.Send() +} + +// ListGameServersWithContext is the same as ListGameServers with the addition of +// the ability to pass a context and additional request options. +// +// See ListGameServers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) ListGameServersWithContext(ctx aws.Context, input *ListGameServersInput, opts ...request.Option) (*ListGameServersOutput, error) { + req, out := c.ListGameServersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListScripts = "ListScripts" + +// ListScriptsRequest generates a "aws/request.Request" representing the +// client's request for the ListScripts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListScripts for more information on using the ListScripts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListScriptsRequest method. +// req, resp := client.ListScriptsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListScripts +func (c *GameLift) ListScriptsRequest(input *ListScriptsInput) (req *request.Request, output *ListScriptsOutput) { + op := &request.Operation{ + Name: opListScripts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListScriptsInput{} + } + + output = &ListScriptsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListScripts API operation for Amazon GameLift. +// +// Retrieves script records for all Realtime scripts that are associated with +// the AWS account in use. +// +// Learn more +// +// Amazon GameLift Realtime Servers (https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-intro.html) +// +// Related operations +// +// * CreateScript +// +// * ListScripts +// +// * DescribeScript +// +// * UpdateScript +// +// * DeleteScript +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation ListScripts for usage and error information. +// +// Returned Error Types: +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListScripts +func (c *GameLift) ListScripts(input *ListScriptsInput) (*ListScriptsOutput, error) { + req, out := c.ListScriptsRequest(input) + return out, req.Send() +} + +// ListScriptsWithContext is the same as ListScripts with the addition of +// the ability to pass a context and additional request options. +// +// See ListScripts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) ListScriptsWithContext(ctx aws.Context, input *ListScriptsInput, opts ...request.Option) (*ListScriptsOutput, error) { + req, out := c.ListScriptsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -6439,6 +7522,139 @@ func (c *GameLift) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalin return out, req.Send() } +const opRegisterGameServer = "RegisterGameServer" + +// RegisterGameServerRequest generates a "aws/request.Request" representing the +// client's request for the RegisterGameServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterGameServer for more information on using the RegisterGameServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterGameServerRequest method. +// req, resp := client.RegisterGameServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/RegisterGameServer +func (c *GameLift) RegisterGameServerRequest(input *RegisterGameServerInput) (req *request.Request, output *RegisterGameServerOutput) { + op := &request.Operation{ + Name: opRegisterGameServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterGameServerInput{} + } + + output = &RegisterGameServerOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterGameServer API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Creates a new game server resource and notifies GameLift FleetIQ that the +// game server is ready to host gameplay and players. This action is called +// by a game server process that is running on an instance in a game server +// group. Registering game servers enables GameLift FleetIQ to track available +// game servers and enables game clients and services to claim a game server +// for a new game session. +// +// To register a game server, identify the game server group and instance where +// the game server is running, and provide a unique identifier for the game +// server. You can also include connection and game server data; when a game +// client or service requests a game server by calling ClaimGameServer, this +// information is returned in response. +// +// Once a game server is successfully registered, it is put in status AVAILABLE. +// A request to register a game server may fail if the instance it is in the +// process of shutting down as part of instance rebalancing or scale-down activity. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * RegisterGameServer +// +// * ListGameServers +// +// * ClaimGameServer +// +// * DescribeGameServer +// +// * UpdateGameServer +// +// * DeregisterGameServer +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation RegisterGameServer for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * LimitExceededException +// The requested operation would cause the resource to exceed the allowed service +// limit. Resolve the issue before retrying. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/RegisterGameServer +func (c *GameLift) RegisterGameServer(input *RegisterGameServerInput) (*RegisterGameServerOutput, error) { + req, out := c.RegisterGameServerRequest(input) + return out, req.Send() +} + +// RegisterGameServerWithContext is the same as RegisterGameServer with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterGameServer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) RegisterGameServerWithContext(ctx aws.Context, input *RegisterGameServerInput, opts ...request.Option) (*RegisterGameServerOutput, error) { + req, out := c.RegisterGameServerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRequestUploadCredentials = "RequestUploadCredentials" // RequestUploadCredentialsRequest generates a "aws/request.Request" representing the @@ -6493,7 +7709,7 @@ func (c *GameLift) RequestUploadCredentialsRequest(input *RequestUploadCredentia // // Learn more // -// Uploading Your Game (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) +// Create a Build with Files in S3 (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html#gamelift-build-cli-uploading-create-build) // // Related operations // @@ -6664,6 +7880,129 @@ func (c *GameLift) ResolveAliasWithContext(ctx aws.Context, input *ResolveAliasI return out, req.Send() } +const opResumeGameServerGroup = "ResumeGameServerGroup" + +// ResumeGameServerGroupRequest generates a "aws/request.Request" representing the +// client's request for the ResumeGameServerGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResumeGameServerGroup for more information on using the ResumeGameServerGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResumeGameServerGroupRequest method. +// req, resp := client.ResumeGameServerGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ResumeGameServerGroup +func (c *GameLift) ResumeGameServerGroupRequest(input *ResumeGameServerGroupInput) (req *request.Request, output *ResumeGameServerGroupOutput) { + op := &request.Operation{ + Name: opResumeGameServerGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResumeGameServerGroupInput{} + } + + output = &ResumeGameServerGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResumeGameServerGroup API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Reinstates activity on a game server group after it has been suspended. A +// game server group may be suspended by calling SuspendGameServerGroup, or +// it may have been involuntarily suspended due to a configuration problem. +// You can manually resume activity on the group once the configuration problem +// has been resolved. Refer to the game server group status and status reason +// for more information on why group activity is suspended. +// +// To resume activity, specify a game server group ARN and the type of activity +// to be resumed. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * CreateGameServerGroup +// +// * ListGameServerGroups +// +// * DescribeGameServerGroup +// +// * UpdateGameServerGroup +// +// * DeleteGameServerGroup +// +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation ResumeGameServerGroup for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ResumeGameServerGroup +func (c *GameLift) ResumeGameServerGroup(input *ResumeGameServerGroupInput) (*ResumeGameServerGroupOutput, error) { + req, out := c.ResumeGameServerGroupRequest(input) + return out, req.Send() +} + +// ResumeGameServerGroupWithContext is the same as ResumeGameServerGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ResumeGameServerGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) ResumeGameServerGroupWithContext(ctx aws.Context, input *ResumeGameServerGroupInput, opts ...request.Option) (*ResumeGameServerGroupOutput, error) { + req, out := c.ResumeGameServerGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSearchGameSessions = "SearchGameSessions" // SearchGameSessionsRequest generates a "aws/request.Request" representing the @@ -6882,7 +8221,7 @@ func (c *GameLift) StartFleetActionsRequest(input *StartFleetActionsInput) (req // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -6892,14 +8231,11 @@ func (c *GameLift) StartFleetActionsRequest(input *StartFleetActionsInput) (req // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7446,19 +8782,18 @@ func (c *GameLift) StopFleetActionsRequest(input *StopFleetActionsInput) (req *r // StopFleetActions API operation for Amazon GameLift. // // Suspends activity on a fleet. Currently, this operation is used to stop a -// fleet's auto-scaling activity. It is used to temporarily stop scaling events -// triggered by the fleet's scaling policies. The policies can be retained and -// auto-scaling activity can be restarted using StartFleetActions. You can view -// a fleet's stopped actions using DescribeFleetAttributes. +// fleet's auto-scaling activity. It is used to temporarily stop triggering +// scaling events. The policies can be retained and auto-scaling activity can +// be restarted using StartFleetActions. You can view a fleet's stopped actions +// using DescribeFleetAttributes. // // To stop fleet actions, specify the fleet ID and the type of actions to suspend. // When auto-scaling fleet actions are stopped, Amazon GameLift no longer initiates -// scaling events except to maintain the fleet's desired instances setting (FleetCapacity. -// Changes to the fleet's capacity must be done manually using UpdateFleetCapacity. +// scaling events except in response to manual changes using UpdateFleetCapacity. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -7468,14 +8803,11 @@ func (c *GameLift) StopFleetActionsRequest(input *StopFleetActionsInput) (req *r // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7669,48 +9001,177 @@ func (c *GameLift) StopMatchmakingRequest(input *StopMatchmakingInput) (req *req input = &StopMatchmakingInput{} } - output = &StopMatchmakingOutput{} + output = &StopMatchmakingOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopMatchmaking API operation for Amazon GameLift. +// +// Cancels a matchmaking ticket or match backfill ticket that is currently being +// processed. To stop the matchmaking operation, specify the ticket ID. If successful, +// work on the ticket is stopped, and the ticket status is changed to CANCELLED. +// +// This call is also used to turn off automatic backfill for an individual game +// session. This is for game sessions that are created with a matchmaking configuration +// that has automatic backfill enabled. The ticket ID is included in the MatchmakerData +// of an updated game session object, which is provided to the game server. +// +// If the action is successful, the service sends back an empty JSON struct +// with the HTTP 200 response (not an empty HTTP body). +// +// Learn more +// +// Add FlexMatch to a Game Client (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-client.html) +// +// Related operations +// +// * StartMatchmaking +// +// * DescribeMatchmaking +// +// * StopMatchmaking +// +// * AcceptMatch +// +// * StartMatchBackfill +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation StopMatchmaking for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * UnsupportedRegionException +// The requested operation is not supported in the Region specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopMatchmaking +func (c *GameLift) StopMatchmaking(input *StopMatchmakingInput) (*StopMatchmakingOutput, error) { + req, out := c.StopMatchmakingRequest(input) + return out, req.Send() +} + +// StopMatchmakingWithContext is the same as StopMatchmaking with the addition of +// the ability to pass a context and additional request options. +// +// See StopMatchmaking for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) StopMatchmakingWithContext(ctx aws.Context, input *StopMatchmakingInput, opts ...request.Option) (*StopMatchmakingOutput, error) { + req, out := c.StopMatchmakingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSuspendGameServerGroup = "SuspendGameServerGroup" + +// SuspendGameServerGroupRequest generates a "aws/request.Request" representing the +// client's request for the SuspendGameServerGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SuspendGameServerGroup for more information on using the SuspendGameServerGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SuspendGameServerGroupRequest method. +// req, resp := client.SuspendGameServerGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/SuspendGameServerGroup +func (c *GameLift) SuspendGameServerGroupRequest(input *SuspendGameServerGroupInput) (req *request.Request, output *SuspendGameServerGroupOutput) { + op := &request.Operation{ + Name: opSuspendGameServerGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SuspendGameServerGroupInput{} + } + + output = &SuspendGameServerGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// StopMatchmaking API operation for Amazon GameLift. +// SuspendGameServerGroup API operation for Amazon GameLift. // -// Cancels a matchmaking ticket or match backfill ticket that is currently being -// processed. To stop the matchmaking operation, specify the ticket ID. If successful, -// work on the ticket is stopped, and the ticket status is changed to CANCELLED. +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. // -// This call is also used to turn off automatic backfill for an individual game -// session. This is for game sessions that are created with a matchmaking configuration -// that has automatic backfill enabled. The ticket ID is included in the MatchmakerData -// of an updated game session object, which is provided to the game server. +// Temporarily stops activity on a game server group without terminating instances +// or the game server group. Activity can be restarted by calling ResumeGameServerGroup. +// Activities that can suspended are: // -// If the action is successful, the service sends back an empty JSON struct -// with the HTTP 200 response (not an empty HTTP body). +// * Instance type replacement. This activity evaluates the current Spot +// viability of all instance types that are defined for the game server group. +// It updates the Auto Scaling group to remove nonviable Spot instance types +// (which have a higher chance of game server interruptions) and rebalances +// capacity across the remaining viable Spot instance types. When this activity +// is suspended, the Auto Scaling group continues with its current balance, +// regardless of viability. Instance protection, utilization metrics, and +// capacity autoscaling activities continue to be active. +// +// To suspend activity, specify a game server group ARN and the type of activity +// to be suspended. // // Learn more // -// Add FlexMatch to a Game Client (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-client.html) +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) // // Related operations // -// * StartMatchmaking +// * CreateGameServerGroup // -// * DescribeMatchmaking +// * ListGameServerGroups // -// * StopMatchmaking +// * DescribeGameServerGroup // -// * AcceptMatch +// * UpdateGameServerGroup // -// * StartMatchBackfill +// * DeleteGameServerGroup +// +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon GameLift's -// API operation StopMatchmaking for usage and error information. +// API operation SuspendGameServerGroup for usage and error information. // // Returned Error Types: // * InvalidRequestException @@ -7721,31 +9182,31 @@ func (c *GameLift) StopMatchmakingRequest(input *StopMatchmakingInput) (req *req // A service resource associated with the request could not be found. Clients // should not retry such requests. // +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// // * InternalServiceException // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting // period. // -// * UnsupportedRegionException -// The requested operation is not supported in the Region specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopMatchmaking -func (c *GameLift) StopMatchmaking(input *StopMatchmakingInput) (*StopMatchmakingOutput, error) { - req, out := c.StopMatchmakingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/SuspendGameServerGroup +func (c *GameLift) SuspendGameServerGroup(input *SuspendGameServerGroupInput) (*SuspendGameServerGroupOutput, error) { + req, out := c.SuspendGameServerGroupRequest(input) return out, req.Send() } -// StopMatchmakingWithContext is the same as StopMatchmaking with the addition of +// SuspendGameServerGroupWithContext is the same as SuspendGameServerGroup with the addition of // the ability to pass a context and additional request options. // -// See StopMatchmaking for details on how to use this API operation. +// See SuspendGameServerGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) StopMatchmakingWithContext(ctx aws.Context, input *StopMatchmakingInput, opts ...request.Option) (*StopMatchmakingOutput, error) { - req, out := c.StopMatchmakingRequest(input) +func (c *GameLift) SuspendGameServerGroupWithContext(ctx aws.Context, input *SuspendGameServerGroupInput, opts ...request.Option) (*SuspendGameServerGroupOutput, error) { + req, out := c.SuspendGameServerGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -7817,7 +9278,7 @@ func (c *GameLift) TagResourceRequest(input *TagResourceInput) (req *request.Req // * MatchmakingRuleSet // // To add a tag to a resource, specify the unique ARN value for the resource -// and provide a trig list containing one or more tags. The operation succeeds +// and provide a tag list containing one or more tags. The operation succeeds // even if the list includes tags that are already assigned to the specified // resource. // @@ -8167,14 +9628,14 @@ func (c *GameLift) UpdateBuildRequest(input *UpdateBuildInput) (req *request.Req // UpdateBuild API operation for Amazon GameLift. // -// Updates metadata in a build record, including the build name and version. +// Updates metadata in a build resource, including the build name and version. // To update the metadata, specify the build ID to update and provide the new // values. If successful, a build object containing the updated metadata is // returned. // // Learn more // -// Working with Builds (https://docs.aws.amazon.com/gamelift/latest/developerguide/build-intro.html) +// Upload a Custom Server Build (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) // // Related operations // @@ -8284,7 +9745,7 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -8299,7 +9760,7 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8424,7 +9885,7 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -8439,7 +9900,7 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8485,147 +9946,414 @@ func (c *GameLift) UpdateFleetCapacity(input *UpdateFleetCapacityInput) (*Update return out, req.Send() } -// UpdateFleetCapacityWithContext is the same as UpdateFleetCapacity with the addition of +// UpdateFleetCapacityWithContext is the same as UpdateFleetCapacity with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFleetCapacity for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) UpdateFleetCapacityWithContext(ctx aws.Context, input *UpdateFleetCapacityInput, opts ...request.Option) (*UpdateFleetCapacityOutput, error) { + req, out := c.UpdateFleetCapacityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFleetPortSettings = "UpdateFleetPortSettings" + +// UpdateFleetPortSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFleetPortSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFleetPortSettings for more information on using the UpdateFleetPortSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFleetPortSettingsRequest method. +// req, resp := client.UpdateFleetPortSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetPortSettings +func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettingsInput) (req *request.Request, output *UpdateFleetPortSettingsOutput) { + op := &request.Operation{ + Name: opUpdateFleetPortSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateFleetPortSettingsInput{} + } + + output = &UpdateFleetPortSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFleetPortSettings API operation for Amazon GameLift. +// +// Updates port settings for a fleet. To update settings, specify the fleet +// ID to be updated and list the permissions you want to update. List the permissions +// you want to add in InboundPermissionAuthorizations, and permissions you want +// to remove in InboundPermissionRevocations. Permissions to be removed must +// match existing fleet permissions. If successful, the fleet ID for the updated +// fleet is returned. +// +// Learn more +// +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// +// Related operations +// +// * CreateFleet +// +// * ListFleets +// +// * DeleteFleet +// +// * DescribeFleetAttributes +// +// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings +// UpdateRuntimeConfiguration +// +// * StartFleetActions or StopFleetActions +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation UpdateFleetPortSettings for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. +// +// * InvalidFleetStatusException +// The requested operation would cause a conflict with the current state of +// a resource associated with the request and/or the fleet. Resolve the conflict +// before retrying. +// +// * LimitExceededException +// The requested operation would cause the resource to exceed the allowed service +// limit. Resolve the issue before retrying. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetPortSettings +func (c *GameLift) UpdateFleetPortSettings(input *UpdateFleetPortSettingsInput) (*UpdateFleetPortSettingsOutput, error) { + req, out := c.UpdateFleetPortSettingsRequest(input) + return out, req.Send() +} + +// UpdateFleetPortSettingsWithContext is the same as UpdateFleetPortSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFleetPortSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) UpdateFleetPortSettingsWithContext(ctx aws.Context, input *UpdateFleetPortSettingsInput, opts ...request.Option) (*UpdateFleetPortSettingsOutput, error) { + req, out := c.UpdateFleetPortSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGameServer = "UpdateGameServer" + +// UpdateGameServerRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGameServer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGameServer for more information on using the UpdateGameServer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGameServerRequest method. +// req, resp := client.UpdateGameServerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameServer +func (c *GameLift) UpdateGameServerRequest(input *UpdateGameServerInput) (req *request.Request, output *UpdateGameServerOutput) { + op := &request.Operation{ + Name: opUpdateGameServer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGameServerInput{} + } + + output = &UpdateGameServerOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGameServer API operation for Amazon GameLift. +// +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Updates information about a registered game server. This action is called +// by a game server process that is running on an instance in a game server +// group. There are three reasons to update game server information: (1) to +// change the utilization status of the game server, (2) to report game server +// health status, and (3) to change game server metadata. A registered game +// server should regularly report health and should update utilization status +// when it is supporting gameplay so that GameLift FleetIQ can accurately track +// game server availability. You can make all three types of updates in the +// same request. +// +// * To update the game server's utilization status, identify the game server +// and game server group and specify the current utilization status. Use +// this status to identify when game servers are currently hosting games +// and when they are available to be claimed. +// +// * To report health status, identify the game server and game server group +// and set health check to HEALTHY. If a game server does not report health +// status for a certain length of time, the game server is no longer considered +// healthy and will be eventually de-registered from the game server group +// to avoid affecting utilization metrics. The best practice is to report +// health every 60 seconds. +// +// * To change game server metadata, provide updated game server data and +// custom sort key values. +// +// Once a game server is successfully updated, the relevant statuses and timestamps +// are updated. +// +// Learn more +// +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Related operations +// +// * RegisterGameServer +// +// * ListGameServers +// +// * ClaimGameServer +// +// * DescribeGameServer +// +// * UpdateGameServer +// +// * DeregisterGameServer +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation UpdateGameServer for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * NotFoundException +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. +// +// * InternalServiceException +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameServer +func (c *GameLift) UpdateGameServer(input *UpdateGameServerInput) (*UpdateGameServerOutput, error) { + req, out := c.UpdateGameServerRequest(input) + return out, req.Send() +} + +// UpdateGameServerWithContext is the same as UpdateGameServer with the addition of // the ability to pass a context and additional request options. // -// See UpdateFleetCapacity for details on how to use this API operation. +// See UpdateGameServer for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) UpdateFleetCapacityWithContext(ctx aws.Context, input *UpdateFleetCapacityInput, opts ...request.Option) (*UpdateFleetCapacityOutput, error) { - req, out := c.UpdateFleetCapacityRequest(input) +func (c *GameLift) UpdateGameServerWithContext(ctx aws.Context, input *UpdateGameServerInput, opts ...request.Option) (*UpdateGameServerOutput, error) { + req, out := c.UpdateGameServerRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateFleetPortSettings = "UpdateFleetPortSettings" +const opUpdateGameServerGroup = "UpdateGameServerGroup" -// UpdateFleetPortSettingsRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFleetPortSettings operation. The "output" return +// UpdateGameServerGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGameServerGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateFleetPortSettings for more information on using the UpdateFleetPortSettings +// See UpdateGameServerGroup for more information on using the UpdateGameServerGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateFleetPortSettingsRequest method. -// req, resp := client.UpdateFleetPortSettingsRequest(params) +// // Example sending a request using the UpdateGameServerGroupRequest method. +// req, resp := client.UpdateGameServerGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetPortSettings -func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettingsInput) (req *request.Request, output *UpdateFleetPortSettingsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameServerGroup +func (c *GameLift) UpdateGameServerGroupRequest(input *UpdateGameServerGroupInput) (req *request.Request, output *UpdateGameServerGroupOutput) { op := &request.Operation{ - Name: opUpdateFleetPortSettings, + Name: opUpdateGameServerGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateFleetPortSettingsInput{} + input = &UpdateGameServerGroupInput{} } - output = &UpdateFleetPortSettingsOutput{} + output = &UpdateGameServerGroupOutput{} req = c.newRequest(op, input, output) return } -// UpdateFleetPortSettings API operation for Amazon GameLift. +// UpdateGameServerGroup API operation for Amazon GameLift. // -// Updates port settings for a fleet. To update settings, specify the fleet -// ID to be updated and list the permissions you want to update. List the permissions -// you want to add in InboundPermissionAuthorizations, and permissions you want -// to remove in InboundPermissionRevocations. Permissions to be removed must -// match existing fleet permissions. If successful, the fleet ID for the updated -// fleet is returned. +// This action is part of Amazon GameLift FleetIQ with game server groups, which +// is in preview release and is subject to change. +// +// Updates GameLift FleetIQ-specific properties for a game server group. These +// properties include instance rebalancing and game server protection. Many +// Auto Scaling group properties are updated directly. These include autoscaling +// policies, minimum/maximum/desired instance counts, and launch template. +// +// To update the game server group, specify the game server group ID and provide +// the updated values. +// +// Updated properties are validated to ensure that GameLift FleetIQ can continue +// to perform its core instance rebalancing activity. When you change Auto Scaling +// group properties directly and the changes cause errors with GameLift FleetIQ +// activities, an alert is sent. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// GameLift FleetIQ Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-intro.html) +// +// Updating a GameLift FleetIQ-Linked Auto Scaling Group (https://docs.aws.amazon.com/gamelift/latest/developerguide/gsg-asgroups.html) // // Related operations // -// * CreateFleet +// * CreateGameServerGroup // -// * ListFleets +// * ListGameServerGroups // -// * DeleteFleet +// * DescribeGameServerGroup // -// * DescribeFleetAttributes +// * UpdateGameServerGroup // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * DeleteGameServerGroup // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * ResumeGameServerGroup +// +// * SuspendGameServerGroup // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon GameLift's -// API operation UpdateFleetPortSettings for usage and error information. +// API operation UpdateGameServerGroup for usage and error information. // // Returned Error Types: +// * InvalidRequestException +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// // * NotFoundException // A service resource associated with the request could not be found. Clients // should not retry such requests. // -// * ConflictException -// The requested operation would cause a conflict with the current state of -// a service resource associated with the request. Resolve the conflict before -// retrying this request. -// -// * InvalidFleetStatusException -// The requested operation would cause a conflict with the current state of -// a resource associated with the request and/or the fleet. Resolve the conflict -// before retrying. -// -// * LimitExceededException -// The requested operation would cause the resource to exceed the allowed service -// limit. Resolve the issue before retrying. +// * UnauthorizedException +// The client failed authentication. Clients should not retry such requests. // // * InternalServiceException // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting // period. // -// * InvalidRequestException -// One or more parameter values in the request are invalid. Correct the invalid -// parameter values before retrying. -// -// * UnauthorizedException -// The client failed authentication. Clients should not retry such requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateFleetPortSettings -func (c *GameLift) UpdateFleetPortSettings(input *UpdateFleetPortSettingsInput) (*UpdateFleetPortSettingsOutput, error) { - req, out := c.UpdateFleetPortSettingsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameServerGroup +func (c *GameLift) UpdateGameServerGroup(input *UpdateGameServerGroupInput) (*UpdateGameServerGroupOutput, error) { + req, out := c.UpdateGameServerGroupRequest(input) return out, req.Send() } -// UpdateFleetPortSettingsWithContext is the same as UpdateFleetPortSettings with the addition of +// UpdateGameServerGroupWithContext is the same as UpdateGameServerGroup with the addition of // the ability to pass a context and additional request options. // -// See UpdateFleetPortSettings for details on how to use this API operation. +// See UpdateGameServerGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) UpdateFleetPortSettingsWithContext(ctx aws.Context, input *UpdateFleetPortSettingsInput, opts ...request.Option) (*UpdateFleetPortSettingsOutput, error) { - req, out := c.UpdateFleetPortSettingsRequest(input) +func (c *GameLift) UpdateGameServerGroupWithContext(ctx aws.Context, input *UpdateGameServerGroupInput, opts ...request.Option) (*UpdateGameServerGroupOutput, error) { + req, out := c.UpdateGameServerGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -8803,6 +10531,12 @@ func (c *GameLift) UpdateGameSessionQueueRequest(input *UpdateGameSessionQueueIn // the queue name to be updated and provide the new settings. When updating // destinations, provide a complete list of destinations. // +// Learn more +// +// Using Multi-Region Queues (https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html) +// +// Related operations +// // * CreateGameSessionQueue // // * DescribeGameSessionQueues @@ -9035,7 +10769,7 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html). +// Setting up GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // // Related operations // @@ -9050,7 +10784,7 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9438,9 +11172,9 @@ type Alias struct { // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) // that is assigned to a GameLift alias resource and uniquely identifies it. - // ARNs are unique across all Regions.. In a GameLift alias ARN, the resource + // ARNs are unique across all Regions. In a GameLift alias ARN, the resource // ID matches the alias ID value. - AliasArn *string `min:"1" type:"string"` + AliasArn *string `type:"string"` // A unique identifier for an alias. Alias IDs are unique within a Region. AliasId *string `type:"string"` @@ -9795,12 +11529,106 @@ func (s *CertificateConfiguration) SetCertificateType(v string) *CertificateConf return s } +type ClaimGameServerInput struct { + _ struct{} `type:"structure"` + + // A set of custom game server properties, formatted as a single string value, + // to be passed to the claimed game server. + GameServerData *string `min:"1" type:"string"` + + // An identifier for the game server group. When claiming a specific game server, + // this is the game server group whether the game server is located. When requesting + // that GameLift FleetIQ locate an available game server, this is the game server + // group to search on. You can use either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // A custom string that uniquely identifies the game server to claim. If this + // parameter is left empty, GameLift FleetIQ searches for an available game + // server in the specified game server group. + GameServerId *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s ClaimGameServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClaimGameServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClaimGameServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClaimGameServerInput"} + if s.GameServerData != nil && len(*s.GameServerData) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerData", 1)) + } + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.GameServerId != nil && len(*s.GameServerId) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GameServerId", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGameServerData sets the GameServerData field's value. +func (s *ClaimGameServerInput) SetGameServerData(v string) *ClaimGameServerInput { + s.GameServerData = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *ClaimGameServerInput) SetGameServerGroupName(v string) *ClaimGameServerInput { + s.GameServerGroupName = &v + return s +} + +// SetGameServerId sets the GameServerId field's value. +func (s *ClaimGameServerInput) SetGameServerId(v string) *ClaimGameServerInput { + s.GameServerId = &v + return s +} + +type ClaimGameServerOutput struct { + _ struct{} `type:"structure"` + + // Object that describes the newly claimed game server resource. + GameServer *GameServer `type:"structure"` +} + +// String returns the string representation +func (s ClaimGameServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClaimGameServerOutput) GoString() string { + return s.String() +} + +// SetGameServer sets the GameServer field's value. +func (s *ClaimGameServerOutput) SetGameServer(v *GameServer) *ClaimGameServerOutput { + s.GameServer = v + return s +} + // The requested operation would cause a conflict with the current state of // a service resource associated with the request. Resolve the conflict before // retrying this request. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -9817,17 +11645,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9835,22 +11663,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input for a request action. @@ -9990,11 +11818,11 @@ type CreateBuildInput struct { OperatingSystem *string `type:"string" enum:"OperatingSystem"` // Information indicating where your game build files are stored. Use this parameter - // only when creating a build with files stored in an Amazon S3 bucket that - // you own. The storage location must specify an Amazon S3 bucket name and key. - // The location must also specify a role ARN that you set up to allow Amazon - // GameLift to access your Amazon S3 bucket. The S3 bucket and your new build - // must be in the same Region. + // only when creating a build with files stored in an S3 bucket that you own. + // The storage location must specify an S3 bucket name and key. The location + // must also specify a role ARN that you set up to allow Amazon GameLift to + // access your S3 bucket. The S3 bucket and your new build must be in the same + // Region. StorageLocation *S3Location `type:"structure"` // A list of labels to assign to the new build resource. Tags are developer-defined @@ -10087,7 +11915,7 @@ func (s *CreateBuildInput) SetVersion(v string) *CreateBuildInput { type CreateBuildOutput struct { _ struct{} `type:"structure"` - // The newly created build record, including a unique build IDs and status. + // The newly created build resource, including a unique build IDs and status. Build *Build `type:"structure"` // Amazon S3 location for your game build file, including bucket name and key. @@ -10095,8 +11923,8 @@ type CreateBuildOutput struct { // This element is returned only when the operation is called without a storage // location. It contains credentials to use when you are uploading a build file - // to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have - // a limited life span. To refresh these credentials, call RequestUploadCredentials. + // to an S3 bucket that is owned by Amazon GameLift. Credentials have a limited + // life span. To refresh these credentials, call RequestUploadCredentials. UploadCredentials *AwsCredentials `type:"structure" sensitive:"true"` } @@ -10456,45 +12284,320 @@ func (s *CreateFleetInput) SetScriptId(v string) *CreateFleetInput { return s } -// SetServerLaunchParameters sets the ServerLaunchParameters field's value. -func (s *CreateFleetInput) SetServerLaunchParameters(v string) *CreateFleetInput { - s.ServerLaunchParameters = &v +// SetServerLaunchParameters sets the ServerLaunchParameters field's value. +func (s *CreateFleetInput) SetServerLaunchParameters(v string) *CreateFleetInput { + s.ServerLaunchParameters = &v + return s +} + +// SetServerLaunchPath sets the ServerLaunchPath field's value. +func (s *CreateFleetInput) SetServerLaunchPath(v string) *CreateFleetInput { + s.ServerLaunchPath = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateFleetInput) SetTags(v []*Tag) *CreateFleetInput { + s.Tags = v + return s +} + +// Represents the returned data in response to a request action. +type CreateFleetOutput struct { + _ struct{} `type:"structure"` + + // Properties for the newly created fleet. + FleetAttributes *FleetAttributes `type:"structure"` +} + +// String returns the string representation +func (s CreateFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetOutput) GoString() string { + return s.String() +} + +// SetFleetAttributes sets the FleetAttributes field's value. +func (s *CreateFleetOutput) SetFleetAttributes(v *FleetAttributes) *CreateFleetOutput { + s.FleetAttributes = v + return s +} + +type CreateGameServerGroupInput struct { + _ struct{} `type:"structure"` + + // Configuration settings to define a scaling policy for the Auto Scaling group + // that is optimized for game hosting. The scaling policy uses the metric "PercentUtilizedGameServers" + // to maintain a buffer of idle game servers that can immediately accommodate + // new games and players. Once the game server and Auto Scaling groups are created, + // you can update the scaling policy settings directly in Auto Scaling Groups. + AutoScalingPolicy *GameServerGroupAutoScalingPolicy `type:"structure"` + + // The fallback balancing method to use for the game server group when Spot + // instances in a Region become unavailable or are not viable for game hosting. + // Once triggered, this method remains active until Spot instances can once + // again be used. Method options include: + // + // * SPOT_ONLY -- If Spot instances are unavailable, the game server group + // provides no hosting capacity. No new instances are started, and the existing + // nonviable Spot instances are terminated (once current gameplay ends) and + // not replaced. + // + // * SPOT_PREFERRED -- If Spot instances are unavailable, the game server + // group continues to provide hosting capacity by using On-Demand instances. + // Existing nonviable Spot instances are terminated (once current gameplay + // ends) and replaced with new On-Demand instances. + BalancingStrategy *string `type:"string" enum:"BalancingStrategy"` + + // An identifier for the new game server group. This value is used to generate + // unique ARN identifiers for the EC2 Auto Scaling group and the GameLift FleetIQ + // game server group. The name must be unique per Region per AWS account. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // A flag that indicates whether instances in the game server group are protected + // from early termination. Unprotected instances that have active game servers + // running may by terminated during a scale-down event, causing players to be + // dropped from the game. Protected instances cannot be terminated while there + // are active game servers running. An exception to this is Spot Instances, + // which may be terminated by AWS regardless of protection status. This property + // is set to NO_PROTECTION by default. + GameServerProtectionPolicy *string `type:"string" enum:"GameServerProtectionPolicy"` + + // A set of EC2 instance types to use when creating instances in the group. + // The instance definitions must specify at least two different instance types + // that are supported by GameLift FleetIQ. For more information on instance + // types, see EC2 Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. + // + // InstanceDefinitions is a required field + InstanceDefinitions []*InstanceDefinition `min:"2" type:"list" required:"true"` + + // The EC2 launch template that contains configuration settings and game server + // code to be deployed to all instances in the game server group. You can specify + // the template using either the template name or ID. For help with creating + // a launch template, see Creating a Launch Template for an Auto Scaling Group + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) + // in the Amazon EC2 Auto Scaling User Guide. + // + // LaunchTemplate is a required field + LaunchTemplate *LaunchTemplateSpecification `type:"structure" required:"true"` + + // The maximum number of instances allowed in the EC2 Auto Scaling group. During + // autoscaling events, GameLift FleetIQ and EC2 do not scale up the group above + // this maximum. + // + // MaxSize is a required field + MaxSize *int64 `min:"1" type:"integer" required:"true"` + + // The minimum number of instances allowed in the EC2 Auto Scaling group. During + // autoscaling events, GameLift FleetIQ and EC2 do not scale down the group + // below this minimum. In production, this value should be set to at least 1. + // + // MinSize is a required field + MinSize *int64 `type:"integer" required:"true"` + + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling + // groups. The submitted role is validated to ensure that it contains the necessary + // permissions for game server groups. + // + // RoleArn is a required field + RoleArn *string `min:"1" type:"string" required:"true"` + + // A list of labels to assign to the new game server group resource. Tags are + // developer-defined key-value pairs. Tagging AWS resources are useful for resource + // management, access management, and cost allocation. For more information, + // see Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` + + // A list of virtual private cloud (VPC) subnets to use with instances in the + // game server group. By default, all GameLift FleetIQ-supported availability + // zones are used; this parameter allows you to specify VPCs that you've set + // up. + VpcSubnets []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s CreateGameServerGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGameServerGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGameServerGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGameServerGroupInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.InstanceDefinitions == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceDefinitions")) + } + if s.InstanceDefinitions != nil && len(s.InstanceDefinitions) < 2 { + invalidParams.Add(request.NewErrParamMinLen("InstanceDefinitions", 2)) + } + if s.LaunchTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplate")) + } + if s.MaxSize == nil { + invalidParams.Add(request.NewErrParamRequired("MaxSize")) + } + if s.MaxSize != nil && *s.MaxSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxSize", 1)) + } + if s.MinSize == nil { + invalidParams.Add(request.NewErrParamRequired("MinSize")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + if s.VpcSubnets != nil && len(s.VpcSubnets) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcSubnets", 1)) + } + if s.AutoScalingPolicy != nil { + if err := s.AutoScalingPolicy.Validate(); err != nil { + invalidParams.AddNested("AutoScalingPolicy", err.(request.ErrInvalidParams)) + } + } + if s.InstanceDefinitions != nil { + for i, v := range s.InstanceDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.LaunchTemplate != nil { + if err := s.LaunchTemplate.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingPolicy sets the AutoScalingPolicy field's value. +func (s *CreateGameServerGroupInput) SetAutoScalingPolicy(v *GameServerGroupAutoScalingPolicy) *CreateGameServerGroupInput { + s.AutoScalingPolicy = v + return s +} + +// SetBalancingStrategy sets the BalancingStrategy field's value. +func (s *CreateGameServerGroupInput) SetBalancingStrategy(v string) *CreateGameServerGroupInput { + s.BalancingStrategy = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *CreateGameServerGroupInput) SetGameServerGroupName(v string) *CreateGameServerGroupInput { + s.GameServerGroupName = &v + return s +} + +// SetGameServerProtectionPolicy sets the GameServerProtectionPolicy field's value. +func (s *CreateGameServerGroupInput) SetGameServerProtectionPolicy(v string) *CreateGameServerGroupInput { + s.GameServerProtectionPolicy = &v + return s +} + +// SetInstanceDefinitions sets the InstanceDefinitions field's value. +func (s *CreateGameServerGroupInput) SetInstanceDefinitions(v []*InstanceDefinition) *CreateGameServerGroupInput { + s.InstanceDefinitions = v + return s +} + +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *CreateGameServerGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *CreateGameServerGroupInput { + s.LaunchTemplate = v + return s +} + +// SetMaxSize sets the MaxSize field's value. +func (s *CreateGameServerGroupInput) SetMaxSize(v int64) *CreateGameServerGroupInput { + s.MaxSize = &v + return s +} + +// SetMinSize sets the MinSize field's value. +func (s *CreateGameServerGroupInput) SetMinSize(v int64) *CreateGameServerGroupInput { + s.MinSize = &v return s } -// SetServerLaunchPath sets the ServerLaunchPath field's value. -func (s *CreateFleetInput) SetServerLaunchPath(v string) *CreateFleetInput { - s.ServerLaunchPath = &v +// SetRoleArn sets the RoleArn field's value. +func (s *CreateGameServerGroupInput) SetRoleArn(v string) *CreateGameServerGroupInput { + s.RoleArn = &v return s } // SetTags sets the Tags field's value. -func (s *CreateFleetInput) SetTags(v []*Tag) *CreateFleetInput { +func (s *CreateGameServerGroupInput) SetTags(v []*Tag) *CreateGameServerGroupInput { s.Tags = v return s } -// Represents the returned data in response to a request action. -type CreateFleetOutput struct { +// SetVpcSubnets sets the VpcSubnets field's value. +func (s *CreateGameServerGroupInput) SetVpcSubnets(v []*string) *CreateGameServerGroupInput { + s.VpcSubnets = v + return s +} + +type CreateGameServerGroupOutput struct { _ struct{} `type:"structure"` - // Properties for the newly created fleet. - FleetAttributes *FleetAttributes `type:"structure"` + // The newly created game server group object, including the new ARN value for + // the GameLift FleetIQ game server group and the object's status. The EC2 Auto + // Scaling group ARN is initially null, since the group has not yet been created. + // This value is added once the game server group status reaches ACTIVE. + GameServerGroup *GameServerGroup `type:"structure"` } // String returns the string representation -func (s CreateFleetOutput) String() string { +func (s CreateGameServerGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFleetOutput) GoString() string { +func (s CreateGameServerGroupOutput) GoString() string { return s.String() } -// SetFleetAttributes sets the FleetAttributes field's value. -func (s *CreateFleetOutput) SetFleetAttributes(v *FleetAttributes) *CreateFleetOutput { - s.FleetAttributes = v +// SetGameServerGroup sets the GameServerGroup field's value. +func (s *CreateGameServerGroupOutput) SetGameServerGroup(v *GameServerGroup) *CreateGameServerGroupOutput { + s.GameServerGroup = v return s } @@ -11883,6 +13986,91 @@ func (s DeleteFleetOutput) GoString() string { return s.String() } +type DeleteGameServerGroupInput struct { + _ struct{} `type:"structure"` + + // The type of delete to perform. Options include: + // + // * SAFE_DELETE – Terminates the game server group and EC2 Auto Scaling + // group only when it has no game servers that are in IN_USE status. + // + // * FORCE_DELETE – Terminates the game server group, including all active + // game servers regardless of their utilization status, and the EC2 Auto + // Scaling group. + // + // * RETAIN – Does a safe delete of the game server group but retains the + // EC2 Auto Scaling group as is. + DeleteOption *string `type:"string" enum:"GameServerGroupDeleteOption"` + + // The unique identifier of the game server group to delete. Use either the + // GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGameServerGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGameServerGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGameServerGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGameServerGroupInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeleteOption sets the DeleteOption field's value. +func (s *DeleteGameServerGroupInput) SetDeleteOption(v string) *DeleteGameServerGroupInput { + s.DeleteOption = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *DeleteGameServerGroupInput) SetGameServerGroupName(v string) *DeleteGameServerGroupInput { + s.GameServerGroupName = &v + return s +} + +type DeleteGameServerGroupOutput struct { + _ struct{} `type:"structure"` + + // An object that describes the deleted game server group resource, with status + // updated to DELETE_SCHEDULED. + GameServerGroup *GameServerGroup `type:"structure"` +} + +// String returns the string representation +func (s DeleteGameServerGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGameServerGroupOutput) GoString() string { + return s.String() +} + +// SetGameServerGroup sets the GameServerGroup field's value. +func (s *DeleteGameServerGroupOutput) SetGameServerGroup(v *GameServerGroup) *DeleteGameServerGroupOutput { + s.GameServerGroup = v + return s +} + // Represents the input for a request action. type DeleteGameSessionQueueInput struct { _ struct{} `type:"structure"` @@ -12334,6 +14522,79 @@ func (s DeleteVpcPeeringConnectionOutput) GoString() string { return s.String() } +type DeregisterGameServerInput struct { + _ struct{} `type:"structure"` + + // An identifier for the game server group where the game server to be de-registered + // is running. Use either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // The identifier for the game server to be de-registered. + // + // GameServerId is a required field + GameServerId *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeregisterGameServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterGameServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterGameServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterGameServerInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.GameServerId == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerId")) + } + if s.GameServerId != nil && len(*s.GameServerId) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GameServerId", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *DeregisterGameServerInput) SetGameServerGroupName(v string) *DeregisterGameServerInput { + s.GameServerGroupName = &v + return s +} + +// SetGameServerId sets the GameServerId field's value. +func (s *DeregisterGameServerInput) SetGameServerId(v string) *DeregisterGameServerInput { + s.GameServerId = &v + return s +} + +type DeregisterGameServerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeregisterGameServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterGameServerOutput) GoString() string { + return s.String() +} + // Represents the input for a request action. type DescribeAliasInput struct { _ struct{} `type:"structure"` @@ -12519,8 +14780,11 @@ func (s *DescribeEC2InstanceLimitsOutput) SetEC2InstanceLimits(v []*EC2InstanceL type DescribeFleetAttributesInput struct { _ struct{} `type:"structure"` - // A unique identifier for a fleet(s) to retrieve attributes for. You can use - // either the fleet ID or ARN value. + // A list of unique fleet identifiers to retrieve attributes for. You can use + // either the fleet ID or ARN value. To retrieve attributes for all current + // fleets, do not include this parameter. If the list of fleet identifiers includes + // fleets that don't currently exist, the request succeeds but no attributes + // for that fleet are returned. FleetIds []*string `min:"1" type:"list"` // The maximum number of results to return. Use this parameter with NextToken @@ -12587,7 +14851,7 @@ type DescribeFleetAttributesOutput struct { _ struct{} `type:"structure"` // A collection of objects containing attribute metadata for each requested - // fleet ID. + // fleet ID. Attribute objects are returned only for fleets that currently exist. FleetAttributes []*FleetAttributes `type:"list"` // Token that indicates where to resume retrieving results on the next call @@ -12916,42 +15180,211 @@ type DescribeFleetUtilizationInput struct { _ struct{} `type:"structure"` // A unique identifier for a fleet(s) to retrieve utilization data for. You - // can use either the fleet ID or ARN value. + // can use either the fleet ID or ARN value. To retrieve attributes for all + // current fleets, do not include this parameter. If the list of fleet identifiers + // includes fleets that don't currently exist, the request succeeds but no attributes + // for that fleet are returned. FleetIds []*string `min:"1" type:"list"` - // The maximum number of results to return. Use this parameter with NextToken - // to get results as a set of sequential pages. This parameter is ignored when - // the request specifies one or a list of fleet IDs. - Limit *int64 `min:"1" type:"integer"` + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. This parameter is ignored when + // the request specifies one or a list of fleet IDs. + Limit *int64 `min:"1" type:"integer"` + + // Token that indicates the start of the next sequential page of results. Use + // the token that is returned with a previous call to this action. To start + // at the beginning of the result set, do not specify a value. This parameter + // is ignored when the request specifies one or a list of fleet IDs. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeFleetUtilizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetUtilizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetUtilizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetUtilizationInput"} + if s.FleetIds != nil && len(s.FleetIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FleetIds", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetIds sets the FleetIds field's value. +func (s *DescribeFleetUtilizationInput) SetFleetIds(v []*string) *DescribeFleetUtilizationInput { + s.FleetIds = v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeFleetUtilizationInput) SetLimit(v int64) *DescribeFleetUtilizationInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetUtilizationInput) SetNextToken(v string) *DescribeFleetUtilizationInput { + s.NextToken = &v + return s +} + +// Represents the returned data in response to a request action. +type DescribeFleetUtilizationOutput struct { + _ struct{} `type:"structure"` + + // A collection of objects containing utilization information for each requested + // fleet ID. + FleetUtilization []*FleetUtilization `type:"list"` + + // Token that indicates where to resume retrieving results on the next call + // to this action. If no token is returned, these results represent the end + // of the list. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeFleetUtilizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetUtilizationOutput) GoString() string { + return s.String() +} + +// SetFleetUtilization sets the FleetUtilization field's value. +func (s *DescribeFleetUtilizationOutput) SetFleetUtilization(v []*FleetUtilization) *DescribeFleetUtilizationOutput { + s.FleetUtilization = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetUtilizationOutput) SetNextToken(v string) *DescribeFleetUtilizationOutput { + s.NextToken = &v + return s +} + +type DescribeGameServerGroupInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the game server group being requested. Use either + // the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeGameServerGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGameServerGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGameServerGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGameServerGroupInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *DescribeGameServerGroupInput) SetGameServerGroupName(v string) *DescribeGameServerGroupInput { + s.GameServerGroupName = &v + return s +} + +type DescribeGameServerGroupOutput struct { + _ struct{} `type:"structure"` + + // An object that describes the requested game server group resource. + GameServerGroup *GameServerGroup `type:"structure"` +} + +// String returns the string representation +func (s DescribeGameServerGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGameServerGroupOutput) GoString() string { + return s.String() +} + +// SetGameServerGroup sets the GameServerGroup field's value. +func (s *DescribeGameServerGroupOutput) SetGameServerGroup(v *GameServerGroup) *DescribeGameServerGroupOutput { + s.GameServerGroup = v + return s +} + +type DescribeGameServerInput struct { + _ struct{} `type:"structure"` + + // An identifier for the game server group where the game server is running. + // Use either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start - // at the beginning of the result set, do not specify a value. This parameter - // is ignored when the request specifies one or a list of fleet IDs. - NextToken *string `min:"1" type:"string"` + // The identifier for the game server to be retrieved. + // + // GameServerId is a required field + GameServerId *string `min:"3" type:"string" required:"true"` } // String returns the string representation -func (s DescribeFleetUtilizationInput) String() string { +func (s DescribeGameServerInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetUtilizationInput) GoString() string { +func (s DescribeGameServerInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetUtilizationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetUtilizationInput"} - if s.FleetIds != nil && len(s.FleetIds) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FleetIds", 1)) +func (s *DescribeGameServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGameServerInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.GameServerId == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerId")) + } + if s.GameServerId != nil && len(*s.GameServerId) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GameServerId", 3)) } if invalidParams.Len() > 0 { @@ -12960,57 +15393,38 @@ func (s *DescribeFleetUtilizationInput) Validate() error { return nil } -// SetFleetIds sets the FleetIds field's value. -func (s *DescribeFleetUtilizationInput) SetFleetIds(v []*string) *DescribeFleetUtilizationInput { - s.FleetIds = v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeFleetUtilizationInput) SetLimit(v int64) *DescribeFleetUtilizationInput { - s.Limit = &v +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *DescribeGameServerInput) SetGameServerGroupName(v string) *DescribeGameServerInput { + s.GameServerGroupName = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetUtilizationInput) SetNextToken(v string) *DescribeFleetUtilizationInput { - s.NextToken = &v +// SetGameServerId sets the GameServerId field's value. +func (s *DescribeGameServerInput) SetGameServerId(v string) *DescribeGameServerInput { + s.GameServerId = &v return s } -// Represents the returned data in response to a request action. -type DescribeFleetUtilizationOutput struct { +type DescribeGameServerOutput struct { _ struct{} `type:"structure"` - // A collection of objects containing utilization information for each requested - // fleet ID. - FleetUtilization []*FleetUtilization `type:"list"` - - // Token that indicates where to resume retrieving results on the next call - // to this action. If no token is returned, these results represent the end - // of the list. - NextToken *string `min:"1" type:"string"` + // Object that describes the requested game server resource. + GameServer *GameServer `type:"structure"` } // String returns the string representation -func (s DescribeFleetUtilizationOutput) String() string { +func (s DescribeGameServerOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetUtilizationOutput) GoString() string { +func (s DescribeGameServerOutput) GoString() string { return s.String() } -// SetFleetUtilization sets the FleetUtilization field's value. -func (s *DescribeFleetUtilizationOutput) SetFleetUtilization(v []*FleetUtilization) *DescribeFleetUtilizationOutput { - s.FleetUtilization = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetUtilizationOutput) SetNextToken(v string) *DescribeFleetUtilizationOutput { - s.NextToken = &v +// SetGameServer sets the GameServer field's value. +func (s *DescribeGameServerOutput) SetGameServer(v *GameServer) *DescribeGameServerOutput { + s.GameServer = v return s } @@ -14393,7 +16807,7 @@ func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions type EC2InstanceCounts struct { _ struct{} `type:"structure"` @@ -14532,7 +16946,7 @@ type Event struct { // // Fleet creation events (ordered by fleet creation activity): // - // * FLEET_CREATED -- A fleet record was successfully created with a status + // * FLEET_CREATED -- A fleet resource was successfully created with a status // of NEW. Event messaging includes the fleet ID. // // * FLEET_STATE_DOWNLOADING -- Fleet status changed from NEW to DOWNLOADING. @@ -14700,7 +17114,7 @@ func (s *Event) SetResourceId(v string) *Event { // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions type FleetAttributes struct { _ struct{} `type:"structure"` @@ -14727,7 +17141,7 @@ type FleetAttributes struct { // that is assigned to a GameLift fleet resource and uniquely identifies it. // ARNs are unique across all Regions. In a GameLift fleet ARN, the resource // ID matches the FleetId value. - FleetArn *string `min:"1" type:"string"` + FleetArn *string `type:"string"` // A unique identifier for a fleet. FleetId *string `type:"string"` @@ -15002,7 +17416,7 @@ func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions type FleetCapacity struct { _ struct{} `type:"structure"` @@ -15051,8 +17465,8 @@ func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { // The specified fleet has no available instances to fulfill a CreateGameSession // request. Clients can retry such requests immediately or after a waiting period. type FleetCapacityExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -15069,17 +17483,17 @@ func (s FleetCapacityExceededException) GoString() string { func newErrorFleetCapacityExceededException(v protocol.ResponseMetadata) error { return &FleetCapacityExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FleetCapacityExceededException) Code() string { +func (s *FleetCapacityExceededException) Code() string { return "FleetCapacityExceededException" } // Message returns the exception's message. -func (s FleetCapacityExceededException) Message() string { +func (s *FleetCapacityExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15087,22 +17501,22 @@ func (s FleetCapacityExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FleetCapacityExceededException) OrigErr() error { +func (s *FleetCapacityExceededException) OrigErr() error { return nil } -func (s FleetCapacityExceededException) Error() string { +func (s *FleetCapacityExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FleetCapacityExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FleetCapacityExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FleetCapacityExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *FleetCapacityExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Current status of fleet utilization, including the number of game and player @@ -15118,7 +17532,7 @@ func (s FleetCapacityExceededException) RequestID() string { // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions type FleetUtilization struct { _ struct{} `type:"structure"` @@ -15203,23 +17617,431 @@ type GameProperty struct { } // String returns the string representation -func (s GameProperty) String() string { +func (s GameProperty) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GameProperty) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GameProperty) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GameProperty"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *GameProperty) SetKey(v string) *GameProperty { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *GameProperty) SetValue(v string) *GameProperty { + s.Value = &v + return s +} + +// This data type is part of Amazon GameLift FleetIQ with game server groups, +// which is in preview release and is subject to change. +// +// Properties describing a game server resource. +// +// A game server resource is created by a successful call to RegisterGameServer +// and deleted by calling DeregisterGameServer. +type GameServer struct { + _ struct{} `type:"structure"` + + // Indicates when an available game server has been reserved but has not yet + // started hosting a game. Once it is claimed, game server remains in CLAIMED + // status for a maximum of one minute. During this time, game clients must connect + // to the game server and start the game, which triggers the game server to + // update its utilization status. After one minute, the game server claim status + // reverts to null. + ClaimStatus *string `type:"string" enum:"GameServerClaimStatus"` + + // The port and IP address that must be used to establish a client connection + // to the game server. + ConnectionInfo *string `min:"1" type:"string"` + + // A game server tag that can be used to request sorted lists of game servers + // when calling ListGameServers. Custom sort keys are developer-defined. This + // property can be updated using UpdateGameServer. + CustomSortKey *string `min:"1" type:"string"` + + // A set of custom game server properties, formatted as a single string value. + // This data is passed to a game client or service in response to requests ListGameServers + // or ClaimGameServer. This property can be updated using UpdateGameServer. + GameServerData *string `min:"1" type:"string"` + + // The ARN identifier for the game server group where the game server is located. + GameServerGroupArn *string `min:"1" type:"string"` + + // The name identifier for the game server group where the game server is located. + GameServerGroupName *string `min:"1" type:"string"` + + // A custom string that uniquely identifies the game server. Game server IDs + // are developer-defined and are unique across all game server groups in an + // AWS account. + GameServerId *string `min:"3" type:"string"` + + // The unique identifier for the instance where the game server is located. + InstanceId *string `min:"19" type:"string"` + + // Time stamp indicating the last time the game server was claimed with a ClaimGameServer + // request. Format is a number expressed in Unix time as milliseconds (for example + // "1469498468.057"). This value is used to calculate when the game server's + // claim status. + LastClaimTime *time.Time `type:"timestamp"` + + // Time stamp indicating the last time the game server was updated with health + // status using an UpdateGameServer request. Format is a number expressed in + // Unix time as milliseconds (for example "1469498468.057"). After game server + // registration, this property is only changed when a game server update specifies + // a health check value. + LastHealthCheckTime *time.Time `type:"timestamp"` + + // Time stamp indicating when the game server resource was created with a RegisterGameServer + // request. Format is a number expressed in Unix time as milliseconds (for example + // "1469498468.057"). + RegistrationTime *time.Time `type:"timestamp"` + + // Indicates whether the game server is currently available for new games or + // is busy. Possible statuses include: + // + // * AVAILABLE - The game server is available to be claimed. A game server + // that has been claimed remains in this status until it reports game hosting + // activity. + // + // * IN_USE - The game server is currently hosting a game session with players. + UtilizationStatus *string `type:"string" enum:"GameServerUtilizationStatus"` +} + +// String returns the string representation +func (s GameServer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GameServer) GoString() string { + return s.String() +} + +// SetClaimStatus sets the ClaimStatus field's value. +func (s *GameServer) SetClaimStatus(v string) *GameServer { + s.ClaimStatus = &v + return s +} + +// SetConnectionInfo sets the ConnectionInfo field's value. +func (s *GameServer) SetConnectionInfo(v string) *GameServer { + s.ConnectionInfo = &v + return s +} + +// SetCustomSortKey sets the CustomSortKey field's value. +func (s *GameServer) SetCustomSortKey(v string) *GameServer { + s.CustomSortKey = &v + return s +} + +// SetGameServerData sets the GameServerData field's value. +func (s *GameServer) SetGameServerData(v string) *GameServer { + s.GameServerData = &v + return s +} + +// SetGameServerGroupArn sets the GameServerGroupArn field's value. +func (s *GameServer) SetGameServerGroupArn(v string) *GameServer { + s.GameServerGroupArn = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *GameServer) SetGameServerGroupName(v string) *GameServer { + s.GameServerGroupName = &v + return s +} + +// SetGameServerId sets the GameServerId field's value. +func (s *GameServer) SetGameServerId(v string) *GameServer { + s.GameServerId = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *GameServer) SetInstanceId(v string) *GameServer { + s.InstanceId = &v + return s +} + +// SetLastClaimTime sets the LastClaimTime field's value. +func (s *GameServer) SetLastClaimTime(v time.Time) *GameServer { + s.LastClaimTime = &v + return s +} + +// SetLastHealthCheckTime sets the LastHealthCheckTime field's value. +func (s *GameServer) SetLastHealthCheckTime(v time.Time) *GameServer { + s.LastHealthCheckTime = &v + return s +} + +// SetRegistrationTime sets the RegistrationTime field's value. +func (s *GameServer) SetRegistrationTime(v time.Time) *GameServer { + s.RegistrationTime = &v + return s +} + +// SetUtilizationStatus sets the UtilizationStatus field's value. +func (s *GameServer) SetUtilizationStatus(v string) *GameServer { + s.UtilizationStatus = &v + return s +} + +// This data type is part of Amazon GameLift FleetIQ with game server groups, +// which is in preview release and is subject to change. +// +// Properties describing a game server group resource. A game server group manages +// certain properties of a corresponding EC2 Auto Scaling group. +// +// A game server group is created by a successful call to CreateGameServerGroup +// and deleted by calling DeleteGameServerGroup. Game server group activity +// can be temporarily suspended and resumed by calling SuspendGameServerGroup +// and ResumeGameServerGroup. +type GameServerGroup struct { + _ struct{} `type:"structure"` + + // A generated unique ID for the EC2 Auto Scaling group with is associated with + // this game server group. + AutoScalingGroupArn *string `type:"string"` + + // The fallback balancing method to use for the game server group when Spot + // instances in a Region become unavailable or are not viable for game hosting. + // Once triggered, this method remains active until Spot instances can once + // again be used. Method options include: + // + // * SPOT_ONLY -- If Spot instances are unavailable, the game server group + // provides no hosting capacity. No new instances are started, and the existing + // nonviable Spot instances are terminated (once current gameplay ends) and + // not replaced. + // + // * SPOT_PREFERRED -- If Spot instances are unavailable, the game server + // group continues to provide hosting capacity by using On-Demand instances. + // Existing nonviable Spot instances are terminated (once current gameplay + // ends) and replaced with new On-Demand instances. + BalancingStrategy *string `type:"string" enum:"BalancingStrategy"` + + // A time stamp indicating when this data object was created. Format is a number + // expressed in Unix time as milliseconds (for example "1469498468.057"). + CreationTime *time.Time `type:"timestamp"` + + // A generated unique ID for the game server group. + GameServerGroupArn *string `min:"1" type:"string"` + + // A developer-defined identifier for the game server group. The name is unique + // per Region per AWS account. + GameServerGroupName *string `min:"1" type:"string"` + + // A flag that indicates whether instances in the game server group are protected + // from early termination. Unprotected instances that have active game servers + // running may be terminated during a scale-down event, causing players to be + // dropped from the game. Protected instances cannot be terminated while there + // are active game servers running except in the event of a forced game server + // group deletion (see DeleteGameServerGroup). An exception to this is Spot + // Instances, which may be terminated by AWS regardless of protection status. + GameServerProtectionPolicy *string `type:"string" enum:"GameServerProtectionPolicy"` + + // The set of EC2 instance types that GameLift FleetIQ can use when rebalancing + // and autoscaling instances in the group. + InstanceDefinitions []*InstanceDefinition `min:"2" type:"list"` + + // A time stamp indicating when this game server group was last updated. + LastUpdatedTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling + // groups. The submitted role is validated to ensure that it contains the necessary + // permissions for game server groups. + RoleArn *string `min:"1" type:"string"` + + // The current status of the game server group. Possible statuses include: + // + // * NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request. + // + // * ACTIVATING - GameLift FleetIQ is setting up a game server group, which + // includes creating an autoscaling group in your AWS account. + // + // * ACTIVE - The game server group has been successfully created. + // + // * DELETE_SCHEDULED - A request to delete the game server group has been + // received. + // + // * DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() + // request and is processing it. GameLift FleetIQ must first complete and + // release hosts before it deletes the autoscaling group and the game server + // group. + // + // * DELETED - The game server group has been successfully deleted. + // + // * ERROR - The asynchronous processes of activating or deleting a game + // server group has failed, resulting in an error state. + Status *string `type:"string" enum:"GameServerGroupStatus"` + + // Additional information about the current game server group status. This information + // may provide additional insight on groups that in ERROR status. + StatusReason *string `min:"1" type:"string"` + + // A list of activities that are currently suspended for this game server group. + // If this property is empty, all activities are occurring. + SuspendedActions []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s GameServerGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GameServerGroup) GoString() string { + return s.String() +} + +// SetAutoScalingGroupArn sets the AutoScalingGroupArn field's value. +func (s *GameServerGroup) SetAutoScalingGroupArn(v string) *GameServerGroup { + s.AutoScalingGroupArn = &v + return s +} + +// SetBalancingStrategy sets the BalancingStrategy field's value. +func (s *GameServerGroup) SetBalancingStrategy(v string) *GameServerGroup { + s.BalancingStrategy = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GameServerGroup) SetCreationTime(v time.Time) *GameServerGroup { + s.CreationTime = &v + return s +} + +// SetGameServerGroupArn sets the GameServerGroupArn field's value. +func (s *GameServerGroup) SetGameServerGroupArn(v string) *GameServerGroup { + s.GameServerGroupArn = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *GameServerGroup) SetGameServerGroupName(v string) *GameServerGroup { + s.GameServerGroupName = &v + return s +} + +// SetGameServerProtectionPolicy sets the GameServerProtectionPolicy field's value. +func (s *GameServerGroup) SetGameServerProtectionPolicy(v string) *GameServerGroup { + s.GameServerProtectionPolicy = &v + return s +} + +// SetInstanceDefinitions sets the InstanceDefinitions field's value. +func (s *GameServerGroup) SetInstanceDefinitions(v []*InstanceDefinition) *GameServerGroup { + s.InstanceDefinitions = v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *GameServerGroup) SetLastUpdatedTime(v time.Time) *GameServerGroup { + s.LastUpdatedTime = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *GameServerGroup) SetRoleArn(v string) *GameServerGroup { + s.RoleArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GameServerGroup) SetStatus(v string) *GameServerGroup { + s.Status = &v + return s +} + +// SetStatusReason sets the StatusReason field's value. +func (s *GameServerGroup) SetStatusReason(v string) *GameServerGroup { + s.StatusReason = &v + return s +} + +// SetSuspendedActions sets the SuspendedActions field's value. +func (s *GameServerGroup) SetSuspendedActions(v []*string) *GameServerGroup { + s.SuspendedActions = v + return s +} + +// This data type is part of Amazon GameLift FleetIQ with game server groups, +// which is in preview release and is subject to change. +// +// Configuration settings for intelligent autoscaling that uses target tracking. +// An autoscaling policy can be specified when a new game server group is created +// with CreateGameServerGroup. If a group has an autoscaling policy, the Auto +// Scaling group takes action based on this policy, in addition to (and potentially +// in conflict with) any other autoscaling policies that are separately applied +// to the Auto Scaling group. +type GameServerGroupAutoScalingPolicy struct { + _ struct{} `type:"structure"` + + // Length of time, in seconds, it takes for a new instance to start new game + // server processes and register with GameLift FleetIQ. Specifying a warm-up + // time can be useful, particularly with game servers that take a long time + // to start up, because it avoids prematurely starting new instances + EstimatedInstanceWarmup *int64 `min:"1" type:"integer"` + + // Settings for a target-based scaling policy applied to Auto Scaling group. + // These settings are used to create a target-based policy that tracks the GameLift + // FleetIQ metric "PercentUtilizedGameServers" and specifies a target value + // for the metric. As player usage changes, the policy triggers to adjust the + // game server group capacity so that the metric returns to the target value. + // + // TargetTrackingConfiguration is a required field + TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GameServerGroupAutoScalingPolicy) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GameProperty) GoString() string { +func (s GameServerGroupAutoScalingPolicy) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GameProperty) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GameProperty"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) +func (s *GameServerGroupAutoScalingPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GameServerGroupAutoScalingPolicy"} + if s.EstimatedInstanceWarmup != nil && *s.EstimatedInstanceWarmup < 1 { + invalidParams.Add(request.NewErrParamMinValue("EstimatedInstanceWarmup", 1)) } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) + if s.TargetTrackingConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("TargetTrackingConfiguration")) + } + if s.TargetTrackingConfiguration != nil { + if err := s.TargetTrackingConfiguration.Validate(); err != nil { + invalidParams.AddNested("TargetTrackingConfiguration", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -15228,15 +18050,15 @@ func (s *GameProperty) Validate() error { return nil } -// SetKey sets the Key field's value. -func (s *GameProperty) SetKey(v string) *GameProperty { - s.Key = &v +// SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value. +func (s *GameServerGroupAutoScalingPolicy) SetEstimatedInstanceWarmup(v int64) *GameServerGroupAutoScalingPolicy { + s.EstimatedInstanceWarmup = &v return s } -// SetValue sets the Value field's value. -func (s *GameProperty) SetValue(v string) *GameProperty { - s.Value = &v +// SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value. +func (s *GameServerGroupAutoScalingPolicy) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *GameServerGroupAutoScalingPolicy { + s.TargetTrackingConfiguration = v return s } @@ -15292,7 +18114,7 @@ type GameSession struct { // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) // associated with the GameLift fleet that this game session is running on. - FleetArn *string `min:"1" type:"string"` + FleetArn *string `type:"string"` // A unique identifier for a fleet that the game session is running on. FleetId *string `type:"string"` @@ -15595,8 +18417,8 @@ func (s *GameSessionDetail) SetProtectionPolicy(v string) *GameSessionDetail { // The game instance is currently full and cannot allow the requested player(s) // to join. Clients can retry such requests immediately or after a waiting period. type GameSessionFullException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -15613,17 +18435,17 @@ func (s GameSessionFullException) GoString() string { func newErrorGameSessionFullException(v protocol.ResponseMetadata) error { return &GameSessionFullException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GameSessionFullException) Code() string { +func (s *GameSessionFullException) Code() string { return "GameSessionFullException" } // Message returns the exception's message. -func (s GameSessionFullException) Message() string { +func (s *GameSessionFullException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15631,22 +18453,22 @@ func (s GameSessionFullException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GameSessionFullException) OrigErr() error { +func (s *GameSessionFullException) OrigErr() error { return nil } -func (s GameSessionFullException) Error() string { +func (s *GameSessionFullException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GameSessionFullException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GameSessionFullException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GameSessionFullException) RequestID() string { - return s.respMetadata.RequestID +func (s *GameSessionFullException) RequestID() string { + return s.RespMetadata.RequestID } // Object that describes a StartGameSessionPlacement request. This object includes @@ -16192,8 +19014,8 @@ func (s *GetInstanceAccessOutput) SetInstanceAccess(v *InstanceAccess) *GetInsta // A game session with this custom ID string already exists in this fleet. Resolve // this conflict before retrying this request. type IdempotentParameterMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -16210,17 +19032,17 @@ func (s IdempotentParameterMismatchException) GoString() string { func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotentParameterMismatchException) Code() string { +func (s *IdempotentParameterMismatchException) Code() string { return "IdempotentParameterMismatchException" } // Message returns the exception's message. -func (s IdempotentParameterMismatchException) Message() string { +func (s *IdempotentParameterMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16228,22 +19050,22 @@ func (s IdempotentParameterMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotentParameterMismatchException) OrigErr() error { +func (s *IdempotentParameterMismatchException) OrigErr() error { return nil } -func (s IdempotentParameterMismatchException) Error() string { +func (s *IdempotentParameterMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotentParameterMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotentParameterMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotentParameterMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotentParameterMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // Properties that describe an instance of a virtual computing resource that @@ -16454,12 +19276,73 @@ func (s *InstanceCredentials) SetUserName(v string) *InstanceCredentials { return s } +// This data type is part of Amazon GameLift FleetIQ with game server groups, +// which is in preview release and is subject to change. +// +// An allowed instance type for your game server group. GameLift FleetIQ periodically +// evaluates each defined instance type for viability. It then updates the Auto +// Scaling group with the list of viable instance types. +type InstanceDefinition struct { + _ struct{} `type:"structure"` + + // An EC2 instance type designation. + // + // InstanceType is a required field + InstanceType *string `type:"string" required:"true" enum:"GameServerGroupInstanceType"` + + // Instance weighting that indicates how much this instance type contributes + // to the total capacity of a game server group. Instance weights are used by + // GameLift FleetIQ to calculate the instance type's cost per unit hour and + // better identify the most cost-effective options. For detailed information + // on weighting instance capacity, see Instance Weighting (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html) + // in the Amazon EC2 Auto Scaling User Guide. Default value is "1". + WeightedCapacity *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InstanceDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InstanceDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InstanceDefinition"} + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.WeightedCapacity != nil && len(*s.WeightedCapacity) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WeightedCapacity", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceType sets the InstanceType field's value. +func (s *InstanceDefinition) SetInstanceType(v string) *InstanceDefinition { + s.InstanceType = &v + return s +} + +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *InstanceDefinition) SetWeightedCapacity(v string) *InstanceDefinition { + s.WeightedCapacity = &v + return s +} + // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting // period. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -16476,17 +19359,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16494,30 +19377,30 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation would cause a conflict with the current state of // a resource associated with the request and/or the fleet. Resolve the conflict // before retrying. type InvalidFleetStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -16534,17 +19417,17 @@ func (s InvalidFleetStatusException) GoString() string { func newErrorInvalidFleetStatusException(v protocol.ResponseMetadata) error { return &InvalidFleetStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFleetStatusException) Code() string { +func (s *InvalidFleetStatusException) Code() string { return "InvalidFleetStatusException" } // Message returns the exception's message. -func (s InvalidFleetStatusException) Message() string { +func (s *InvalidFleetStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16552,30 +19435,30 @@ func (s InvalidFleetStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFleetStatusException) OrigErr() error { +func (s *InvalidFleetStatusException) OrigErr() error { return nil } -func (s InvalidFleetStatusException) Error() string { +func (s *InvalidFleetStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFleetStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFleetStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFleetStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFleetStatusException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation would cause a conflict with the current state of // a resource associated with the request and/or the game instance. Resolve // the conflict before retrying. type InvalidGameSessionStatusException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -16592,17 +19475,17 @@ func (s InvalidGameSessionStatusException) GoString() string { func newErrorInvalidGameSessionStatusException(v protocol.ResponseMetadata) error { return &InvalidGameSessionStatusException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidGameSessionStatusException) Code() string { +func (s *InvalidGameSessionStatusException) Code() string { return "InvalidGameSessionStatusException" } // Message returns the exception's message. -func (s InvalidGameSessionStatusException) Message() string { +func (s *InvalidGameSessionStatusException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16610,29 +19493,29 @@ func (s InvalidGameSessionStatusException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidGameSessionStatusException) OrigErr() error { +func (s *InvalidGameSessionStatusException) OrigErr() error { return nil } -func (s InvalidGameSessionStatusException) Error() string { +func (s *InvalidGameSessionStatusException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidGameSessionStatusException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidGameSessionStatusException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidGameSessionStatusException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidGameSessionStatusException) RequestID() string { + return s.RespMetadata.RequestID } // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -16649,17 +19532,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16667,22 +19550,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // A range of IP addresses and port settings that allow inbound traffic to connect @@ -16781,11 +19664,78 @@ func (s *IpPermission) SetToPort(v int64) *IpPermission { return s } +// This data type is part of Amazon GameLift FleetIQ with game server groups, +// which is in preview release and is subject to change. +// +// An EC2 launch template that contains configuration settings and game server +// code to be deployed to all instances in a game server group. +type LaunchTemplateSpecification struct { + _ struct{} `type:"structure"` + + // A unique identifier for an existing EC2 launch template. + LaunchTemplateId *string `min:"1" type:"string"` + + // A readable identifier for an existing EC2 launch template. + LaunchTemplateName *string `min:"3" type:"string"` + + // The version of the EC2 launch template to use. If no version is specified, + // the default version will be used. EC2 allows you to specify a default version + // for a launch template, if none is set, the default is the first version created. + Version *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LaunchTemplateSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LaunchTemplateSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateSpecification"} + if s.LaunchTemplateId != nil && len(*s.LaunchTemplateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateId", 1)) + } + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { + s.LaunchTemplateId = &v + return s +} + +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { + s.LaunchTemplateName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { + s.Version = &v + return s +} + // The requested operation would cause the resource to exceed the allowed service // limit. Resolve the issue before retrying. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -16802,17 +19752,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16820,22 +19770,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input for a request action. @@ -17037,7 +19987,7 @@ func (s *ListBuildsInput) SetStatus(v string) *ListBuildsInput { type ListBuildsOutput struct { _ struct{} `type:"structure"` - // A collection of build records that match the request. + // A collection of build resources that match the request. Builds []*Build `type:"list"` // Token that indicates where to resume retrieving results on the next call @@ -17073,8 +20023,9 @@ type ListFleetsInput struct { _ struct{} `type:"structure"` // A unique identifier for a build to return fleets for. Use this parameter - // to return only fleets using the specified build. Use either the build ID - // or ARN value.To retrieve all fleets, leave this parameter empty. + // to return only fleets using a specified build. Use either the build ID or + // ARN value. To retrieve all fleets, do not include either a BuildId and ScriptID + // parameter. BuildId *string `type:"string"` // The maximum number of results to return. Use this parameter with NextToken @@ -17087,8 +20038,8 @@ type ListFleetsInput struct { NextToken *string `min:"1" type:"string"` // A unique identifier for a Realtime script to return fleets for. Use this - // parameter to return only fleets using the specified script. Use either the - // script ID or ARN value.To retrieve all fleets, leave this parameter empty. + // parameter to return only fleets using a specified script. Use either the + // script ID or ARN value. To retrieve all fleets, leave this parameter empty. ScriptId *string `type:"string"` } @@ -17118,63 +20069,262 @@ func (s *ListFleetsInput) Validate() error { return nil } -// SetBuildId sets the BuildId field's value. -func (s *ListFleetsInput) SetBuildId(v string) *ListFleetsInput { - s.BuildId = &v +// SetBuildId sets the BuildId field's value. +func (s *ListFleetsInput) SetBuildId(v string) *ListFleetsInput { + s.BuildId = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListFleetsInput) SetLimit(v int64) *ListFleetsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFleetsInput) SetNextToken(v string) *ListFleetsInput { + s.NextToken = &v + return s +} + +// SetScriptId sets the ScriptId field's value. +func (s *ListFleetsInput) SetScriptId(v string) *ListFleetsInput { + s.ScriptId = &v + return s +} + +// Represents the returned data in response to a request action. +type ListFleetsOutput struct { + _ struct{} `type:"structure"` + + // Set of fleet IDs matching the list request. You can retrieve additional information + // about all returned fleets by passing this result set to a call to DescribeFleetAttributes, + // DescribeFleetCapacity, or DescribeFleetUtilization. + FleetIds []*string `min:"1" type:"list"` + + // Token that indicates where to resume retrieving results on the next call + // to this action. If no token is returned, these results represent the end + // of the list. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFleetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFleetsOutput) GoString() string { + return s.String() +} + +// SetFleetIds sets the FleetIds field's value. +func (s *ListFleetsOutput) SetFleetIds(v []*string) *ListFleetsOutput { + s.FleetIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFleetsOutput) SetNextToken(v string) *ListFleetsOutput { + s.NextToken = &v + return s +} + +type ListGameServerGroupsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. + Limit *int64 `min:"1" type:"integer"` + + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start + // at the beginning of the result set, do not specify a value. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGameServerGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGameServerGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGameServerGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGameServerGroupsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListGameServerGroupsInput) SetLimit(v int64) *ListGameServerGroupsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGameServerGroupsInput) SetNextToken(v string) *ListGameServerGroupsInput { + s.NextToken = &v + return s +} + +type ListGameServerGroupsOutput struct { + _ struct{} `type:"structure"` + + // A collection of game server group objects that match the request. + GameServerGroups []*GameServerGroup `type:"list"` + + // A token that indicates where to resume retrieving results on the next call + // to this action. If no token is returned, these results represent the end + // of the list. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGameServerGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGameServerGroupsOutput) GoString() string { + return s.String() +} + +// SetGameServerGroups sets the GameServerGroups field's value. +func (s *ListGameServerGroupsOutput) SetGameServerGroups(v []*GameServerGroup) *ListGameServerGroupsOutput { + s.GameServerGroups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGameServerGroupsOutput) SetNextToken(v string) *ListGameServerGroupsOutput { + s.NextToken = &v + return s +} + +type ListGameServersInput struct { + _ struct{} `type:"structure"` + + // An identifier for the game server group for the game server you want to list. + // Use either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. + Limit *int64 `min:"1" type:"integer"` + + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start + // at the beginning of the result set, do not specify a value. + NextToken *string `min:"1" type:"string"` + + // Indicates how to sort the returned data based on the game servers' custom + // key sort value. If this parameter is left empty, the list of game servers + // is returned in no particular order. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s ListGameServersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGameServersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGameServersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGameServersInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *ListGameServersInput) SetGameServerGroupName(v string) *ListGameServersInput { + s.GameServerGroupName = &v return s } // SetLimit sets the Limit field's value. -func (s *ListFleetsInput) SetLimit(v int64) *ListFleetsInput { +func (s *ListGameServersInput) SetLimit(v int64) *ListGameServersInput { s.Limit = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListFleetsInput) SetNextToken(v string) *ListFleetsInput { +func (s *ListGameServersInput) SetNextToken(v string) *ListGameServersInput { s.NextToken = &v return s } -// SetScriptId sets the ScriptId field's value. -func (s *ListFleetsInput) SetScriptId(v string) *ListFleetsInput { - s.ScriptId = &v +// SetSortOrder sets the SortOrder field's value. +func (s *ListGameServersInput) SetSortOrder(v string) *ListGameServersInput { + s.SortOrder = &v return s } -// Represents the returned data in response to a request action. -type ListFleetsOutput struct { +type ListGameServersOutput struct { _ struct{} `type:"structure"` - // Set of fleet IDs matching the list request. You can retrieve additional information - // about all returned fleets by passing this result set to a call to DescribeFleetAttributes, - // DescribeFleetCapacity, or DescribeFleetUtilization. - FleetIds []*string `min:"1" type:"list"` + // A collection of game server objects that match the request. + GameServers []*GameServer `type:"list"` - // Token that indicates where to resume retrieving results on the next call + // A token that indicates where to resume retrieving results on the next call // to this action. If no token is returned, these results represent the end // of the list. NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s ListFleetsOutput) String() string { +func (s ListGameServersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListFleetsOutput) GoString() string { +func (s ListGameServersOutput) GoString() string { return s.String() } -// SetFleetIds sets the FleetIds field's value. -func (s *ListFleetsOutput) SetFleetIds(v []*string) *ListFleetsOutput { - s.FleetIds = v +// SetGameServers sets the GameServers field's value. +func (s *ListGameServersOutput) SetGameServers(v []*GameServer) *ListGameServersOutput { + s.GameServers = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListFleetsOutput) SetNextToken(v string) *ListFleetsOutput { +func (s *ListGameServersOutput) SetNextToken(v string) *ListGameServersOutput { s.NextToken = &v return s } @@ -17817,8 +20967,8 @@ func (s *MatchmakingTicket) SetTicketId(v string) *MatchmakingTicket { // A service resource associated with the request could not be found. Clients // should not retry such requests. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -17835,17 +20985,75 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *NotFoundException) OrigErr() error { + return nil +} + +func (s *NotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The specified game server group has no available game servers to fulfill +// a ClaimGameServer request. Clients can retry such requests immediately or +// after a waiting period. +type OutOfCapacityException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" min:"1" type:"string"` +} + +// String returns the string representation +func (s OutOfCapacityException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutOfCapacityException) GoString() string { + return s.String() +} + +func newErrorOutOfCapacityException(v protocol.ResponseMetadata) error { + return &OutOfCapacityException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *OutOfCapacityException) Code() string { + return "OutOfCapacityException" +} + +// Message returns the exception's message. +func (s *OutOfCapacityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17853,22 +21061,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *OutOfCapacityException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *OutOfCapacityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OutOfCapacityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *OutOfCapacityException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a player session that was created as part of a StartGameSessionPlacement @@ -18161,7 +21369,7 @@ type PlayerSession struct { // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) // associated with the GameLift fleet that the player's game session is running // on. - FleetArn *string `min:"1" type:"string"` + FleetArn *string `type:"string"` // A unique identifier for a fleet that the player's game session is running // on. @@ -18514,6 +21722,175 @@ func (s *PutScalingPolicyOutput) SetName(v string) *PutScalingPolicyOutput { return s } +type RegisterGameServerInput struct { + _ struct{} `type:"structure"` + + // Information needed to make inbound client connections to the game server. + // This might include IP address and port, DNS name, etc. + ConnectionInfo *string `min:"1" type:"string"` + + // A game server tag that can be used to request sorted lists of game servers + // using ListGameServers. Custom sort keys are developer-defined based on how + // you want to organize the retrieved game server information. + CustomSortKey *string `min:"1" type:"string"` + + // A set of custom game server properties, formatted as a single string value. + // This data is passed to a game client or service when it requests information + // on a game servers using ListGameServers or ClaimGameServer. + GameServerData *string `min:"1" type:"string"` + + // An identifier for the game server group where the game server is running. + // You can use either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // A custom string that uniquely identifies the new game server. Game server + // IDs are developer-defined and must be unique across all game server groups + // in your AWS account. + // + // GameServerId is a required field + GameServerId *string `min:"3" type:"string" required:"true"` + + // The unique identifier for the instance where the game server is running. + // This ID is available in the instance metadata. + // + // InstanceId is a required field + InstanceId *string `min:"19" type:"string" required:"true"` + + // A list of labels to assign to the new game server resource. Tags are developer-defined + // key-value pairs. Tagging AWS resources are useful for resource management, + // access management, and cost allocation. For more information, see Tagging + // AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s RegisterGameServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterGameServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterGameServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterGameServerInput"} + if s.ConnectionInfo != nil && len(*s.ConnectionInfo) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectionInfo", 1)) + } + if s.CustomSortKey != nil && len(*s.CustomSortKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomSortKey", 1)) + } + if s.GameServerData != nil && len(*s.GameServerData) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerData", 1)) + } + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.GameServerId == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerId")) + } + if s.GameServerId != nil && len(*s.GameServerId) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GameServerId", 3)) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.InstanceId != nil && len(*s.InstanceId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("InstanceId", 19)) + } + 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 +} + +// SetConnectionInfo sets the ConnectionInfo field's value. +func (s *RegisterGameServerInput) SetConnectionInfo(v string) *RegisterGameServerInput { + s.ConnectionInfo = &v + return s +} + +// SetCustomSortKey sets the CustomSortKey field's value. +func (s *RegisterGameServerInput) SetCustomSortKey(v string) *RegisterGameServerInput { + s.CustomSortKey = &v + return s +} + +// SetGameServerData sets the GameServerData field's value. +func (s *RegisterGameServerInput) SetGameServerData(v string) *RegisterGameServerInput { + s.GameServerData = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *RegisterGameServerInput) SetGameServerGroupName(v string) *RegisterGameServerInput { + s.GameServerGroupName = &v + return s +} + +// SetGameServerId sets the GameServerId field's value. +func (s *RegisterGameServerInput) SetGameServerId(v string) *RegisterGameServerInput { + s.GameServerId = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *RegisterGameServerInput) SetInstanceId(v string) *RegisterGameServerInput { + s.InstanceId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RegisterGameServerInput) SetTags(v []*Tag) *RegisterGameServerInput { + s.Tags = v + return s +} + +type RegisterGameServerOutput struct { + _ struct{} `type:"structure"` + + // Object that describes the newly created game server resource. + GameServer *GameServer `type:"structure"` +} + +// String returns the string representation +func (s RegisterGameServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterGameServerOutput) GoString() string { + return s.String() +} + +// SetGameServer sets the GameServer field's value. +func (s *RegisterGameServerOutput) SetGameServer(v *GameServer) *RegisterGameServerOutput { + s.GameServer = v + return s +} + // Represents the input for a request action. type RequestUploadCredentialsInput struct { _ struct{} `type:"structure"` @@ -18635,7 +22012,7 @@ type ResolveAliasOutput struct { // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) // associated with the GameLift fleet resource that this alias points to. - FleetArn *string `min:"1" type:"string"` + FleetArn *string `type:"string"` // The fleet identifier that the alias is pointing to. FleetId *string `type:"string"` @@ -18707,6 +22084,89 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc return s } +type ResumeGameServerGroupInput struct { + _ struct{} `type:"structure"` + + // The unique identifier of the game server group to resume activity on. Use + // either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // The action to resume for this game server group. + // + // ResumeActions is a required field + ResumeActions []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ResumeGameServerGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeGameServerGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResumeGameServerGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResumeGameServerGroupInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.ResumeActions == nil { + invalidParams.Add(request.NewErrParamRequired("ResumeActions")) + } + if s.ResumeActions != nil && len(s.ResumeActions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResumeActions", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *ResumeGameServerGroupInput) SetGameServerGroupName(v string) *ResumeGameServerGroupInput { + s.GameServerGroupName = &v + return s +} + +// SetResumeActions sets the ResumeActions field's value. +func (s *ResumeGameServerGroupInput) SetResumeActions(v []*string) *ResumeGameServerGroupInput { + s.ResumeActions = v + return s +} + +type ResumeGameServerGroupOutput struct { + _ struct{} `type:"structure"` + + // An object that describes the game server group resource, with the SuspendedActions + // property updated to reflect the resumed activity. + GameServerGroup *GameServerGroup `type:"structure"` +} + +// String returns the string representation +func (s ResumeGameServerGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeGameServerGroupOutput) GoString() string { + return s.String() +} + +// SetGameServerGroup sets the GameServerGroup field's value. +func (s *ResumeGameServerGroupOutput) SetGameServerGroup(v *GameServerGroup) *ResumeGameServerGroupOutput { + s.GameServerGroup = v + return s +} + // The routing configuration for a fleet alias. // // * CreateAlias @@ -18796,7 +22256,7 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // // * UpdateFleetAttributes // -// * Manage fleet actions: StartFleetActions StopFleetActions +// * StartFleetActions or StopFleetActions type RuntimeConfiguration struct { _ struct{} `type:"structure"` @@ -18872,13 +22332,13 @@ func (s *RuntimeConfiguration) SetServerProcesses(v []*ServerProcess) *RuntimeCo return s } -// The location in Amazon S3 where build or script files are stored for access -// by Amazon GameLift. This location is specified in CreateBuild, CreateScript, -// and UpdateScript requests. +// The location in S3 where build or script files are stored for access by Amazon +// GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript +// requests. type S3Location struct { _ struct{} `type:"structure"` - // An Amazon S3 bucket identifier. This is the name of the S3 bucket. + // An S3 bucket identifier. This is the name of the S3 bucket. Bucket *string `min:"1" type:"string"` // The name of the zip file that contains the build files or script files. @@ -19185,9 +22645,9 @@ type Script struct { // are uploaded from an S3 location, this value remains at "0". SizeOnDisk *int64 `min:"1" type:"long"` - // The location in Amazon S3 where build or script files are stored for access - // by Amazon GameLift. This location is specified in CreateBuild, CreateScript, - // and UpdateScript requests. + // The location in S3 where build or script files are stored for access by Amazon + // GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript + // requests. StorageLocation *S3Location `type:"structure"` // The version that is associated with a build or script. Version strings do @@ -19609,7 +23069,7 @@ type StartGameSessionPlacementInput struct { GameSessionName *string `min:"1" type:"string"` // Name of the queue to use to place the new game session. You can use either - // the qieue name or ARN value. + // the queue name or ARN value. // // GameSessionQueueName is a required field GameSessionQueueName *string `min:"1" type:"string" required:"true"` @@ -20198,20 +23658,103 @@ func (s *StopMatchmakingInput) SetTicketId(v string) *StopMatchmakingInput { return s } -type StopMatchmakingOutput struct { +type StopMatchmakingOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopMatchmakingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopMatchmakingOutput) GoString() string { + return s.String() +} + +type SuspendGameServerGroupInput struct { + _ struct{} `type:"structure"` + + // The unique identifier of the game server group to stop activity on. Use either + // the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // The action to suspend for this game server group. + // + // SuspendActions is a required field + SuspendActions []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s SuspendGameServerGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuspendGameServerGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SuspendGameServerGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SuspendGameServerGroupInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.SuspendActions == nil { + invalidParams.Add(request.NewErrParamRequired("SuspendActions")) + } + if s.SuspendActions != nil && len(s.SuspendActions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SuspendActions", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *SuspendGameServerGroupInput) SetGameServerGroupName(v string) *SuspendGameServerGroupInput { + s.GameServerGroupName = &v + return s +} + +// SetSuspendActions sets the SuspendActions field's value. +func (s *SuspendGameServerGroupInput) SetSuspendActions(v []*string) *SuspendGameServerGroupInput { + s.SuspendActions = v + return s +} + +type SuspendGameServerGroupOutput struct { _ struct{} `type:"structure"` + + // An object that describes the game server group resource, with the SuspendedActions + // property updated to reflect the suspended activity. + GameServerGroup *GameServerGroup `type:"structure"` } // String returns the string representation -func (s StopMatchmakingOutput) String() string { +func (s SuspendGameServerGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StopMatchmakingOutput) GoString() string { +func (s SuspendGameServerGroupOutput) GoString() string { return s.String() } +// SetGameServerGroup sets the GameServerGroup field's value. +func (s *SuspendGameServerGroupOutput) SetGameServerGroup(v *GameServerGroup) *SuspendGameServerGroupOutput { + s.GameServerGroup = v + return s +} + // A label that can be assigned to a GameLift resource. // // Learn more @@ -20373,8 +23916,8 @@ func (s TagResourceOutput) GoString() string { // tag format or the maximum tag limit may have been exceeded. Resolve the issue // before retrying. type TaggingFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -20391,17 +23934,17 @@ func (s TaggingFailedException) GoString() string { func newErrorTaggingFailedException(v protocol.ResponseMetadata) error { return &TaggingFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TaggingFailedException) Code() string { +func (s *TaggingFailedException) Code() string { return "TaggingFailedException" } // Message returns the exception's message. -func (s TaggingFailedException) Message() string { +func (s *TaggingFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20409,22 +23952,22 @@ func (s TaggingFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TaggingFailedException) OrigErr() error { +func (s *TaggingFailedException) OrigErr() error { return nil } -func (s TaggingFailedException) Error() string { +func (s *TaggingFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TaggingFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TaggingFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TaggingFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *TaggingFailedException) RequestID() string { + return s.RespMetadata.RequestID } // Settings for a target-based scaling policy (see ScalingPolicy. A target-based @@ -20486,14 +24029,60 @@ func (s *TargetConfiguration) SetTargetValue(v float64) *TargetConfiguration { return s } +// This data type is part of Amazon GameLift FleetIQ with game server groups, +// which is in preview release and is subject to change. +// +// Settings for a target-based scaling policy applied to Auto Scaling group. +// These settings are used to create a target-based policy that tracks the GameLift +// FleetIQ metric "PercentUtilizedGameServers" and specifies a target value +// for the metric. As player usage changes, the policy triggers to adjust the +// game server group capacity so that the metric returns to the target value. +type TargetTrackingConfiguration struct { + _ struct{} `type:"structure"` + + // Desired value to use with a game server group target-based scaling policy. + // + // TargetValue is a required field + TargetValue *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s TargetTrackingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetTrackingConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetTrackingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetTrackingConfiguration"} + if s.TargetValue == nil { + invalidParams.Add(request.NewErrParamRequired("TargetValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetValue sets the TargetValue field's value. +func (s *TargetTrackingConfiguration) SetTargetValue(v float64) *TargetTrackingConfiguration { + s.TargetValue = &v + return s +} + // The service is unable to resolve the routing for a particular alias because // it has a terminal RoutingStrategy associated with it. The message returned // in this exception is the message defined in the routing strategy itself. // Such requests should only be retried if the routing strategy for the specified // alias is modified. type TerminalRoutingStrategyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -20510,17 +24099,17 @@ func (s TerminalRoutingStrategyException) GoString() string { func newErrorTerminalRoutingStrategyException(v protocol.ResponseMetadata) error { return &TerminalRoutingStrategyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TerminalRoutingStrategyException) Code() string { +func (s *TerminalRoutingStrategyException) Code() string { return "TerminalRoutingStrategyException" } // Message returns the exception's message. -func (s TerminalRoutingStrategyException) Message() string { +func (s *TerminalRoutingStrategyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20528,28 +24117,28 @@ func (s TerminalRoutingStrategyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TerminalRoutingStrategyException) OrigErr() error { +func (s *TerminalRoutingStrategyException) OrigErr() error { return nil } -func (s TerminalRoutingStrategyException) Error() string { +func (s *TerminalRoutingStrategyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TerminalRoutingStrategyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TerminalRoutingStrategyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TerminalRoutingStrategyException) RequestID() string { - return s.respMetadata.RequestID +func (s *TerminalRoutingStrategyException) RequestID() string { + return s.RespMetadata.RequestID } // The client failed authentication. Clients should not retry such requests. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -20566,17 +24155,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20584,28 +24173,28 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation is not supported in the Region specified. type UnsupportedRegionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -20622,17 +24211,17 @@ func (s UnsupportedRegionException) GoString() string { func newErrorUnsupportedRegionException(v protocol.ResponseMetadata) error { return &UnsupportedRegionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedRegionException) Code() string { +func (s *UnsupportedRegionException) Code() string { return "UnsupportedRegionException" } // Message returns the exception's message. -func (s UnsupportedRegionException) Message() string { +func (s *UnsupportedRegionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20640,22 +24229,22 @@ func (s UnsupportedRegionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedRegionException) OrigErr() error { +func (s *UnsupportedRegionException) OrigErr() error { return nil } -func (s UnsupportedRegionException) Error() string { +func (s *UnsupportedRegionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedRegionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedRegionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedRegionException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedRegionException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -20670,8 +24259,9 @@ type UntagResourceInput struct { // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` - // A list of one or more tags to remove from the specified GameLift resource. - // Tags are developer-defined and structured as key-value pairs. + // A list of one or more tag keys to remove from the specified GameLift resource. + // An AWS resource can have only one tag with a specific tag key, so specifying + // the tag key identifies which tag to remove. // // TagKeys is a required field TagKeys []*string `type:"list" required:"true"` @@ -20901,7 +24491,7 @@ func (s *UpdateBuildInput) SetVersion(v string) *UpdateBuildInput { type UpdateBuildOutput struct { _ struct{} `type:"structure"` - // The updated build record. + // The updated build resource. Build *Build `type:"structure"` } @@ -21154,10 +24744,10 @@ type UpdateFleetPortSettingsInput struct { // FleetId is a required field FleetId *string `type:"string" required:"true"` - // A collection of port settings to be added to the fleet record. + // A collection of port settings to be added to the fleet resource. InboundPermissionAuthorizations []*IpPermission `type:"list"` - // A collection of port settings to be removed from the fleet record. + // A collection of port settings to be removed from the fleet resource. InboundPermissionRevocations []*IpPermission `type:"list"` } @@ -21246,6 +24836,280 @@ func (s *UpdateFleetPortSettingsOutput) SetFleetId(v string) *UpdateFleetPortSet return s } +type UpdateGameServerGroupInput struct { + _ struct{} `type:"structure"` + + // The fallback balancing method to use for the game server group when Spot + // instances in a Region become unavailable or are not viable for game hosting. + // Once triggered, this method remains active until Spot instances can once + // again be used. Method options include: + // + // * SPOT_ONLY -- If Spot instances are unavailable, the game server group + // provides no hosting capacity. No new instances are started, and the existing + // nonviable Spot instances are terminated (once current gameplay ends) and + // not replaced. + // + // * SPOT_PREFERRED -- If Spot instances are unavailable, the game server + // group continues to provide hosting capacity by using On-Demand instances. + // Existing nonviable Spot instances are terminated (once current gameplay + // ends) and replaced with new On-Demand instances. + BalancingStrategy *string `type:"string" enum:"BalancingStrategy"` + + // The unique identifier of the game server group to update. Use either the + // GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // A flag that indicates whether instances in the game server group are protected + // from early termination. Unprotected instances that have active game servers + // running may by terminated during a scale-down event, causing players to be + // dropped from the game. Protected instances cannot be terminated while there + // are active game servers running. An exception to this is Spot Instances, + // which may be terminated by AWS regardless of protection status. This property + // is set to NO_PROTECTION by default. + GameServerProtectionPolicy *string `type:"string" enum:"GameServerProtectionPolicy"` + + // An updated list of EC2 instance types to use when creating instances in the + // group. The instance definition must specify instance types that are supported + // by GameLift FleetIQ, and must include at least two instance types. This updated + // list replaces the entire current list of instance definitions for the game + // server group. For more information on instance types, see EC2 Instance Types + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide.. + InstanceDefinitions []*InstanceDefinition `min:"2" type:"list"` + + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling + // groups. The submitted role is validated to ensure that it contains the necessary + // permissions for game server groups. + RoleArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateGameServerGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGameServerGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGameServerGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGameServerGroupInput"} + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.InstanceDefinitions != nil && len(s.InstanceDefinitions) < 2 { + invalidParams.Add(request.NewErrParamMinLen("InstanceDefinitions", 2)) + } + if s.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + if s.InstanceDefinitions != nil { + for i, v := range s.InstanceDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBalancingStrategy sets the BalancingStrategy field's value. +func (s *UpdateGameServerGroupInput) SetBalancingStrategy(v string) *UpdateGameServerGroupInput { + s.BalancingStrategy = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *UpdateGameServerGroupInput) SetGameServerGroupName(v string) *UpdateGameServerGroupInput { + s.GameServerGroupName = &v + return s +} + +// SetGameServerProtectionPolicy sets the GameServerProtectionPolicy field's value. +func (s *UpdateGameServerGroupInput) SetGameServerProtectionPolicy(v string) *UpdateGameServerGroupInput { + s.GameServerProtectionPolicy = &v + return s +} + +// SetInstanceDefinitions sets the InstanceDefinitions field's value. +func (s *UpdateGameServerGroupInput) SetInstanceDefinitions(v []*InstanceDefinition) *UpdateGameServerGroupInput { + s.InstanceDefinitions = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *UpdateGameServerGroupInput) SetRoleArn(v string) *UpdateGameServerGroupInput { + s.RoleArn = &v + return s +} + +type UpdateGameServerGroupOutput struct { + _ struct{} `type:"structure"` + + // An object that describes the game server group resource with updated properties. + GameServerGroup *GameServerGroup `type:"structure"` +} + +// String returns the string representation +func (s UpdateGameServerGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGameServerGroupOutput) GoString() string { + return s.String() +} + +// SetGameServerGroup sets the GameServerGroup field's value. +func (s *UpdateGameServerGroupOutput) SetGameServerGroup(v *GameServerGroup) *UpdateGameServerGroupOutput { + s.GameServerGroup = v + return s +} + +type UpdateGameServerInput struct { + _ struct{} `type:"structure"` + + // A game server tag that can be used to request sorted lists of game servers + // using ListGameServers. Custom sort keys are developer-defined based on how + // you want to organize the retrieved game server information. + CustomSortKey *string `min:"1" type:"string"` + + // A set of custom game server properties, formatted as a single string value. + // This data is passed to a game client or service when it requests information + // on a game servers using DescribeGameServer or ClaimGameServer. + GameServerData *string `min:"1" type:"string"` + + // An identifier for the game server group where the game server is running. + // Use either the GameServerGroup name or ARN value. + // + // GameServerGroupName is a required field + GameServerGroupName *string `min:"1" type:"string" required:"true"` + + // The identifier for the game server to be updated. + // + // GameServerId is a required field + GameServerId *string `min:"3" type:"string" required:"true"` + + // Indicates health status of the game server. An update that explicitly includes + // this parameter updates the game server's LastHealthCheckTime time stamp. + HealthCheck *string `type:"string" enum:"GameServerHealthCheck"` + + // Indicates whether the game server is available or is currently hosting gameplay. + UtilizationStatus *string `type:"string" enum:"GameServerUtilizationStatus"` +} + +// String returns the string representation +func (s UpdateGameServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGameServerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGameServerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGameServerInput"} + if s.CustomSortKey != nil && len(*s.CustomSortKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomSortKey", 1)) + } + if s.GameServerData != nil && len(*s.GameServerData) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerData", 1)) + } + if s.GameServerGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerGroupName")) + } + if s.GameServerGroupName != nil && len(*s.GameServerGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GameServerGroupName", 1)) + } + if s.GameServerId == nil { + invalidParams.Add(request.NewErrParamRequired("GameServerId")) + } + if s.GameServerId != nil && len(*s.GameServerId) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GameServerId", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomSortKey sets the CustomSortKey field's value. +func (s *UpdateGameServerInput) SetCustomSortKey(v string) *UpdateGameServerInput { + s.CustomSortKey = &v + return s +} + +// SetGameServerData sets the GameServerData field's value. +func (s *UpdateGameServerInput) SetGameServerData(v string) *UpdateGameServerInput { + s.GameServerData = &v + return s +} + +// SetGameServerGroupName sets the GameServerGroupName field's value. +func (s *UpdateGameServerInput) SetGameServerGroupName(v string) *UpdateGameServerInput { + s.GameServerGroupName = &v + return s +} + +// SetGameServerId sets the GameServerId field's value. +func (s *UpdateGameServerInput) SetGameServerId(v string) *UpdateGameServerInput { + s.GameServerId = &v + return s +} + +// SetHealthCheck sets the HealthCheck field's value. +func (s *UpdateGameServerInput) SetHealthCheck(v string) *UpdateGameServerInput { + s.HealthCheck = &v + return s +} + +// SetUtilizationStatus sets the UtilizationStatus field's value. +func (s *UpdateGameServerInput) SetUtilizationStatus(v string) *UpdateGameServerInput { + s.UtilizationStatus = &v + return s +} + +type UpdateGameServerOutput struct { + _ struct{} `type:"structure"` + + // Object that describes the newly updated game server resource. + GameServer *GameServer `type:"structure"` +} + +// String returns the string representation +func (s UpdateGameServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGameServerOutput) GoString() string { + return s.String() +} + +// SetGameServer sets the GameServer field's value. +func (s *UpdateGameServerOutput) SetGameServer(v *GameServer) *UpdateGameServerOutput { + s.GameServer = v + return s +} + // Represents the input for a request action. type UpdateGameSessionInput struct { _ struct{} `type:"structure"` @@ -22095,7 +25959,7 @@ type VpcPeeringConnection struct { // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) // associated with the GameLift fleet resource for this connection. - FleetArn *string `min:"1" type:"string"` + FleetArn *string `type:"string"` // A unique identifier for a fleet. This ID determines the ID of the Amazon // GameLift VPC for your fleet. @@ -22232,6 +26096,14 @@ const ( BackfillModeManual = "MANUAL" ) +const ( + // BalancingStrategySpotOnly is a BalancingStrategy enum value + BalancingStrategySpotOnly = "SPOT_ONLY" + + // BalancingStrategySpotPreferred is a BalancingStrategy enum value + BalancingStrategySpotPreferred = "SPOT_PREFERRED" +) + const ( // BuildStatusInitialized is a BuildStatus enum value BuildStatusInitialized = "INITIALIZED" @@ -22584,6 +26456,193 @@ const ( FleetTypeSpot = "SPOT" ) +const ( + // GameServerClaimStatusClaimed is a GameServerClaimStatus enum value + GameServerClaimStatusClaimed = "CLAIMED" +) + +const ( + // GameServerGroupActionReplaceInstanceTypes is a GameServerGroupAction enum value + GameServerGroupActionReplaceInstanceTypes = "REPLACE_INSTANCE_TYPES" +) + +const ( + // GameServerGroupDeleteOptionSafeDelete is a GameServerGroupDeleteOption enum value + GameServerGroupDeleteOptionSafeDelete = "SAFE_DELETE" + + // GameServerGroupDeleteOptionForceDelete is a GameServerGroupDeleteOption enum value + GameServerGroupDeleteOptionForceDelete = "FORCE_DELETE" + + // GameServerGroupDeleteOptionRetain is a GameServerGroupDeleteOption enum value + GameServerGroupDeleteOptionRetain = "RETAIN" +) + +const ( + // GameServerGroupInstanceTypeC4Large is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC4Large = "c4.large" + + // GameServerGroupInstanceTypeC4Xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC4Xlarge = "c4.xlarge" + + // GameServerGroupInstanceTypeC42xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC42xlarge = "c4.2xlarge" + + // GameServerGroupInstanceTypeC44xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC44xlarge = "c4.4xlarge" + + // GameServerGroupInstanceTypeC48xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC48xlarge = "c4.8xlarge" + + // GameServerGroupInstanceTypeC5Large is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC5Large = "c5.large" + + // GameServerGroupInstanceTypeC5Xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC5Xlarge = "c5.xlarge" + + // GameServerGroupInstanceTypeC52xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC52xlarge = "c5.2xlarge" + + // GameServerGroupInstanceTypeC54xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC54xlarge = "c5.4xlarge" + + // GameServerGroupInstanceTypeC59xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC59xlarge = "c5.9xlarge" + + // GameServerGroupInstanceTypeC512xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC512xlarge = "c5.12xlarge" + + // GameServerGroupInstanceTypeC518xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC518xlarge = "c5.18xlarge" + + // GameServerGroupInstanceTypeC524xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeC524xlarge = "c5.24xlarge" + + // GameServerGroupInstanceTypeR4Large is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR4Large = "r4.large" + + // GameServerGroupInstanceTypeR4Xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR4Xlarge = "r4.xlarge" + + // GameServerGroupInstanceTypeR42xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR42xlarge = "r4.2xlarge" + + // GameServerGroupInstanceTypeR44xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR44xlarge = "r4.4xlarge" + + // GameServerGroupInstanceTypeR48xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR48xlarge = "r4.8xlarge" + + // GameServerGroupInstanceTypeR416xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR416xlarge = "r4.16xlarge" + + // GameServerGroupInstanceTypeR5Large is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR5Large = "r5.large" + + // GameServerGroupInstanceTypeR5Xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR5Xlarge = "r5.xlarge" + + // GameServerGroupInstanceTypeR52xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR52xlarge = "r5.2xlarge" + + // GameServerGroupInstanceTypeR54xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR54xlarge = "r5.4xlarge" + + // GameServerGroupInstanceTypeR58xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR58xlarge = "r5.8xlarge" + + // GameServerGroupInstanceTypeR512xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR512xlarge = "r5.12xlarge" + + // GameServerGroupInstanceTypeR516xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR516xlarge = "r5.16xlarge" + + // GameServerGroupInstanceTypeR524xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeR524xlarge = "r5.24xlarge" + + // GameServerGroupInstanceTypeM4Large is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM4Large = "m4.large" + + // GameServerGroupInstanceTypeM4Xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM4Xlarge = "m4.xlarge" + + // GameServerGroupInstanceTypeM42xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM42xlarge = "m4.2xlarge" + + // GameServerGroupInstanceTypeM44xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM44xlarge = "m4.4xlarge" + + // GameServerGroupInstanceTypeM410xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM410xlarge = "m4.10xlarge" + + // GameServerGroupInstanceTypeM5Large is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM5Large = "m5.large" + + // GameServerGroupInstanceTypeM5Xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM5Xlarge = "m5.xlarge" + + // GameServerGroupInstanceTypeM52xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM52xlarge = "m5.2xlarge" + + // GameServerGroupInstanceTypeM54xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM54xlarge = "m5.4xlarge" + + // GameServerGroupInstanceTypeM58xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM58xlarge = "m5.8xlarge" + + // GameServerGroupInstanceTypeM512xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM512xlarge = "m5.12xlarge" + + // GameServerGroupInstanceTypeM516xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM516xlarge = "m5.16xlarge" + + // GameServerGroupInstanceTypeM524xlarge is a GameServerGroupInstanceType enum value + GameServerGroupInstanceTypeM524xlarge = "m5.24xlarge" +) + +const ( + // GameServerGroupStatusNew is a GameServerGroupStatus enum value + GameServerGroupStatusNew = "NEW" + + // GameServerGroupStatusActivating is a GameServerGroupStatus enum value + GameServerGroupStatusActivating = "ACTIVATING" + + // GameServerGroupStatusActive is a GameServerGroupStatus enum value + GameServerGroupStatusActive = "ACTIVE" + + // GameServerGroupStatusDeleteScheduled is a GameServerGroupStatus enum value + GameServerGroupStatusDeleteScheduled = "DELETE_SCHEDULED" + + // GameServerGroupStatusDeleting is a GameServerGroupStatus enum value + GameServerGroupStatusDeleting = "DELETING" + + // GameServerGroupStatusDeleted is a GameServerGroupStatus enum value + GameServerGroupStatusDeleted = "DELETED" + + // GameServerGroupStatusError is a GameServerGroupStatus enum value + GameServerGroupStatusError = "ERROR" +) + +const ( + // GameServerHealthCheckHealthy is a GameServerHealthCheck enum value + GameServerHealthCheckHealthy = "HEALTHY" +) + +const ( + // GameServerProtectionPolicyNoProtection is a GameServerProtectionPolicy enum value + GameServerProtectionPolicyNoProtection = "NO_PROTECTION" + + // GameServerProtectionPolicyFullProtection is a GameServerProtectionPolicy enum value + GameServerProtectionPolicyFullProtection = "FULL_PROTECTION" +) + +const ( + // GameServerUtilizationStatusAvailable is a GameServerUtilizationStatus enum value + GameServerUtilizationStatusAvailable = "AVAILABLE" + + // GameServerUtilizationStatusUtilized is a GameServerUtilizationStatus enum value + GameServerUtilizationStatusUtilized = "UTILIZED" +) + const ( // GameSessionPlacementStatePending is a GameSessionPlacementState enum value GameSessionPlacementStatePending = "PENDING" @@ -22793,3 +26852,11 @@ const ( // ScalingStatusTypeError is a ScalingStatusType enum value ScalingStatusTypeError = "ERROR" ) + +const ( + // SortOrderAscending is a SortOrder enum value + SortOrderAscending = "ASCENDING" + + // SortOrderDescending is a SortOrder enum value + SortOrderDescending = "DESCENDING" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go index 9c054334111..b1cfaa1b4b6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go @@ -3,17 +3,32 @@ // Package gamelift provides the client and types for making API // requests to Amazon GameLift. // -// Amazon GameLift is a managed service for developers who need a scalable, -// dedicated server solution for their multiplayer games. Use Amazon GameLift -// for these tasks: (1) set up computing resources and deploy your game servers, -// (2) run game sessions and get players into games, (3) automatically scale -// your resources to meet player demand and manage costs, and (4) track in-depth -// metrics on game server performance and player usage. -// -// When setting up hosting resources, you can deploy your custom game server -// or use the Amazon GameLift Realtime Servers. Realtime Servers gives you the -// ability to quickly stand up lightweight, efficient game servers with the -// core Amazon GameLift infrastructure already built in. +// Amazon GameLift provides a range of multiplayer game hosting solutions. As +// a fully managed service, GameLift helps you: +// +// * Set up EC2-based computing resources and use GameLift FleetIQ to and +// deploy your game servers on low-cost, reliable Spot instances. +// +// * Track game server availability and route players into game sessions +// to minimize latency. +// +// * Automatically scale your resources to meet player demand and manage +// costs +// +// * Optionally add FlexMatch matchmaking. +// +// With GameLift as a managed service, you have the option to deploy your custom +// game server or use Amazon GameLift Realtime Servers to quickly stand up lightweight +// game servers for your game. Realtime Servers provides an efficient game server +// framework with core Amazon GameLift infrastructure already built in. +// +// Now in Public Preview: +// +// Use GameLift FleetIQ as a standalone feature with EC2 instances and Auto +// Scaling groups. GameLift FleetIQ provides optimizations that make low-cost +// Spot instances viable for game hosting. This extension of GameLift FleetIQ +// gives you access to these optimizations while managing your EC2 instances +// and Auto Scaling groups within your own AWS account. // // Get Amazon GameLift Tools and Resources // diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go index f9794d64250..ef6de30dc6d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/errors.go @@ -82,6 +82,14 @@ const ( // should not retry such requests. ErrCodeNotFoundException = "NotFoundException" + // ErrCodeOutOfCapacityException for service response error code + // "OutOfCapacityException". + // + // The specified game server group has no available game servers to fulfill + // a ClaimGameServer request. Clients can retry such requests immediately or + // after a waiting period. + ErrCodeOutOfCapacityException = "OutOfCapacityException" + // ErrCodeTaggingFailedException for service response error code // "TaggingFailedException". // @@ -124,6 +132,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "InvalidRequestException": newErrorInvalidRequestException, "LimitExceededException": newErrorLimitExceededException, "NotFoundException": newErrorNotFoundException, + "OutOfCapacityException": newErrorOutOfCapacityException, "TaggingFailedException": newErrorTaggingFailedException, "TerminalRoutingStrategyException": newErrorTerminalRoutingStrategyException, "UnauthorizedException": newErrorUnauthorizedException, 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 32e021c8728..4ddaba08c45 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 @@ -6179,8 +6179,8 @@ func (s *InputSerialization) SetCsv(v *CSVInput) *InputSerialization { // This error only applies to expedited retrievals and not to standard or bulk // retrievals. type InsufficientCapacityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -6201,17 +6201,17 @@ func (s InsufficientCapacityException) GoString() string { func newErrorInsufficientCapacityException(v protocol.ResponseMetadata) error { return &InsufficientCapacityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InsufficientCapacityException) Code() string { +func (s *InsufficientCapacityException) Code() string { return "InsufficientCapacityException" } // Message returns the exception's message. -func (s InsufficientCapacityException) Message() string { +func (s *InsufficientCapacityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6219,28 +6219,28 @@ func (s InsufficientCapacityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InsufficientCapacityException) OrigErr() error { +func (s *InsufficientCapacityException) OrigErr() error { return nil } -func (s InsufficientCapacityException) Error() string { +func (s *InsufficientCapacityException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InsufficientCapacityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InsufficientCapacityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InsufficientCapacityException) RequestID() string { - return s.respMetadata.RequestID +func (s *InsufficientCapacityException) RequestID() string { + return s.RespMetadata.RequestID } // Returned if a parameter of the request is incorrectly specified. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 400 Bad Request Code_ *string `locationName:"code" type:"string"` @@ -6264,17 +6264,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6282,22 +6282,22 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the options for a range inventory retrieval job. @@ -6815,8 +6815,8 @@ func (s *JobParameters) SetType(v string) *JobParameters { // Returned if the request results in a vault or account limit being exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 400 Bad Request Code_ *string `locationName:"code" type:"string"` @@ -6840,17 +6840,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6858,22 +6858,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Provides options for retrieving a job list for an Amazon S3 Glacier vault. @@ -7588,8 +7588,8 @@ func (s *ListVaultsOutput) SetVaultList(v []*DescribeVaultOutput) *ListVaultsOut // Returned if a required header or parameter is missing from the request. type MissingParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 400 Bad Request Code_ *string `locationName:"code" type:"string"` @@ -7613,17 +7613,17 @@ func (s MissingParameterValueException) GoString() string { func newErrorMissingParameterValueException(v protocol.ResponseMetadata) error { return &MissingParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MissingParameterValueException) Code() string { +func (s *MissingParameterValueException) Code() string { return "MissingParameterValueException" } // Message returns the exception's message. -func (s MissingParameterValueException) Message() string { +func (s *MissingParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7631,22 +7631,22 @@ func (s MissingParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MissingParameterValueException) OrigErr() error { +func (s *MissingParameterValueException) OrigErr() error { return nil } -func (s MissingParameterValueException) Error() string { +func (s *MissingParameterValueException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s MissingParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MissingParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MissingParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *MissingParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about the location where the select job results are @@ -7750,8 +7750,8 @@ func (s *PartListElement) SetSHA256TreeHash(v string) *PartListElement { // Returned if a retrieval job would exceed the current data policy's retrieval // rate limit. For more information about data retrieval policies, type PolicyEnforcedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // PolicyEnforcedException Code_ *string `locationName:"code" type:"string"` @@ -7775,17 +7775,17 @@ func (s PolicyEnforcedException) GoString() string { func newErrorPolicyEnforcedException(v protocol.ResponseMetadata) error { return &PolicyEnforcedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyEnforcedException) Code() string { +func (s *PolicyEnforcedException) Code() string { return "PolicyEnforcedException" } // Message returns the exception's message. -func (s PolicyEnforcedException) Message() string { +func (s *PolicyEnforcedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7793,22 +7793,22 @@ func (s PolicyEnforcedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyEnforcedException) OrigErr() error { +func (s *PolicyEnforcedException) OrigErr() error { return nil } -func (s PolicyEnforcedException) Error() string { +func (s *PolicyEnforcedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyEnforcedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyEnforcedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyEnforcedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyEnforcedException) RequestID() string { + return s.RespMetadata.RequestID } // The definition for a provisioned capacity unit. @@ -8012,8 +8012,8 @@ func (s RemoveTagsFromVaultOutput) GoString() string { // Returned if, when uploading an archive, Amazon S3 Glacier times out while // receiving the upload. type RequestTimeoutException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 408 Request Timeout Code_ *string `locationName:"code" type:"string"` @@ -8038,17 +8038,17 @@ func (s RequestTimeoutException) GoString() string { func newErrorRequestTimeoutException(v protocol.ResponseMetadata) error { return &RequestTimeoutException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestTimeoutException) Code() string { +func (s *RequestTimeoutException) Code() string { return "RequestTimeoutException" } // Message returns the exception's message. -func (s RequestTimeoutException) Message() string { +func (s *RequestTimeoutException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8056,29 +8056,29 @@ func (s RequestTimeoutException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestTimeoutException) OrigErr() error { +func (s *RequestTimeoutException) OrigErr() error { return nil } -func (s RequestTimeoutException) Error() string { +func (s *RequestTimeoutException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestTimeoutException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestTimeoutException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestTimeoutException) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the specified resource (such as a vault, upload ID, or job ID) // doesn't exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 404 Not Found Code_ *string `locationName:"code" type:"string"` @@ -8103,17 +8103,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8121,22 +8121,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about the location in Amazon S3 where the select job @@ -8301,8 +8301,8 @@ func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *Selec // Returned if the service cannot complete the request. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 500 Internal Server Error Code_ *string `locationName:"code" type:"string"` @@ -8326,17 +8326,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8344,22 +8344,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // SetDataRetrievalPolicy input. diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go index 1470135e8ab..4f7f98e02e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go @@ -1013,7 +1013,8 @@ func (c *GlobalAccelerator) DescribeEndpointGroupRequest(input *DescribeEndpoint // DescribeEndpointGroup API operation for AWS Global Accelerator. // -// Describe an endpoint group. +// Describe an endpoint group. To see an AWS CLI example of describing an endpoint +// group, scroll down to Example. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1271,7 +1272,8 @@ func (c *GlobalAccelerator) ListByoipCidrsRequest(input *ListByoipCidrsInput) (r // ListByoipCidrs API operation for AWS Global Accelerator. // // Lists the IP address ranges that were specified in calls to ProvisionByoipCidr -// (https://docs.aws.amazon.com/global-accelerator/latest/api/ProvisionByoipCidr.html). +// (https://docs.aws.amazon.com/global-accelerator/latest/api/ProvisionByoipCidr.html), +// including the current state and a history of state changes. // // To see an AWS CLI example of listing BYOIP CIDR addresses, scroll down to // Example. @@ -2505,8 +2507,8 @@ func (s *AcceleratorAttributes) SetFlowLogsS3Prefix(v string) *AcceleratorAttrib // The accelerator that you specified could not be disabled. type AcceleratorNotDisabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2523,17 +2525,17 @@ func (s AcceleratorNotDisabledException) GoString() string { func newErrorAcceleratorNotDisabledException(v protocol.ResponseMetadata) error { return &AcceleratorNotDisabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AcceleratorNotDisabledException) Code() string { +func (s *AcceleratorNotDisabledException) Code() string { return "AcceleratorNotDisabledException" } // Message returns the exception's message. -func (s AcceleratorNotDisabledException) Message() string { +func (s *AcceleratorNotDisabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2541,28 +2543,28 @@ func (s AcceleratorNotDisabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AcceleratorNotDisabledException) OrigErr() error { +func (s *AcceleratorNotDisabledException) OrigErr() error { return nil } -func (s AcceleratorNotDisabledException) Error() string { +func (s *AcceleratorNotDisabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AcceleratorNotDisabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AcceleratorNotDisabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AcceleratorNotDisabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *AcceleratorNotDisabledException) RequestID() string { + return s.RespMetadata.RequestID } // The accelerator that you specified doesn't exist. type AcceleratorNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2579,17 +2581,17 @@ func (s AcceleratorNotFoundException) GoString() string { func newErrorAcceleratorNotFoundException(v protocol.ResponseMetadata) error { return &AcceleratorNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AcceleratorNotFoundException) Code() string { +func (s *AcceleratorNotFoundException) Code() string { return "AcceleratorNotFoundException" } // Message returns the exception's message. -func (s AcceleratorNotFoundException) Message() string { +func (s *AcceleratorNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2597,28 +2599,28 @@ func (s AcceleratorNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AcceleratorNotFoundException) OrigErr() error { +func (s *AcceleratorNotFoundException) OrigErr() error { return nil } -func (s AcceleratorNotFoundException) Error() string { +func (s *AcceleratorNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AcceleratorNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AcceleratorNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AcceleratorNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AcceleratorNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // You don't have access permission. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2635,17 +2637,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2653,22 +2655,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type AdvertiseByoipCidrInput struct { @@ -2737,8 +2739,8 @@ func (s *AdvertiseByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *AdvertiseByoipCid // You must remove all dependent resources from a listener before you can delete // it. type AssociatedEndpointGroupFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2755,17 +2757,17 @@ func (s AssociatedEndpointGroupFoundException) GoString() string { func newErrorAssociatedEndpointGroupFoundException(v protocol.ResponseMetadata) error { return &AssociatedEndpointGroupFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociatedEndpointGroupFoundException) Code() string { +func (s *AssociatedEndpointGroupFoundException) Code() string { return "AssociatedEndpointGroupFoundException" } // Message returns the exception's message. -func (s AssociatedEndpointGroupFoundException) Message() string { +func (s *AssociatedEndpointGroupFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2773,30 +2775,30 @@ func (s AssociatedEndpointGroupFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociatedEndpointGroupFoundException) OrigErr() error { +func (s *AssociatedEndpointGroupFoundException) OrigErr() error { return nil } -func (s AssociatedEndpointGroupFoundException) Error() string { +func (s *AssociatedEndpointGroupFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociatedEndpointGroupFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociatedEndpointGroupFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociatedEndpointGroupFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociatedEndpointGroupFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The accelerator that you specified has a listener associated with it. You // must remove all dependent resources from an accelerator before you can delete // it. type AssociatedListenerFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2813,17 +2815,17 @@ func (s AssociatedListenerFoundException) GoString() string { func newErrorAssociatedListenerFoundException(v protocol.ResponseMetadata) error { return &AssociatedListenerFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociatedListenerFoundException) Code() string { +func (s *AssociatedListenerFoundException) Code() string { return "AssociatedListenerFoundException" } // Message returns the exception's message. -func (s AssociatedListenerFoundException) Message() string { +func (s *AssociatedListenerFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2831,26 +2833,26 @@ func (s AssociatedListenerFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociatedListenerFoundException) OrigErr() error { +func (s *AssociatedListenerFoundException) OrigErr() error { return nil } -func (s AssociatedListenerFoundException) Error() string { +func (s *AssociatedListenerFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociatedListenerFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociatedListenerFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociatedListenerFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociatedListenerFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Information about an IP address range that is provisioned for use with your -// AWS resources through bring your own IP addresses (BYOIP). +// AWS resources through bring your own IP address (BYOIP). // // The following describes each BYOIP State that your IP address range can be // in. @@ -2902,6 +2904,10 @@ type ByoipCidr struct { // The address range, in CIDR notation. Cidr *string `type:"string"` + // A history of status changes for an IP address range that that you bring to + // AWS Global Accelerator through bring your own IP address (BYOIP). + Events []*ByoipCidrEvent `type:"list"` + // The state of the address pool. State *string `type:"string" enum:"ByoipCidrState"` } @@ -2922,16 +2928,60 @@ func (s *ByoipCidr) SetCidr(v string) *ByoipCidr { return s } +// SetEvents sets the Events field's value. +func (s *ByoipCidr) SetEvents(v []*ByoipCidrEvent) *ByoipCidr { + s.Events = v + return s +} + // SetState sets the State field's value. func (s *ByoipCidr) SetState(v string) *ByoipCidr { s.State = &v return s } +// A complex type that contains a Message and a Timestamp value for changes +// that you make in the status an IP address range that you bring to AWS Global +// Accelerator through bring your own IP address (BYOIP). +type ByoipCidrEvent struct { + _ struct{} `type:"structure"` + + // A string that contains an Event message describing changes that you make + // in the status of an IP address range that you bring to AWS Global Accelerator + // through bring your own IP address (BYOIP). + Message *string `type:"string"` + + // A timestamp when you make a status change for an IP address range that you + // bring to AWS Global Accelerator through bring your own IP address (BYOIP). + Timestamp *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s ByoipCidrEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ByoipCidrEvent) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *ByoipCidrEvent) SetMessage(v string) *ByoipCidrEvent { + s.Message = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *ByoipCidrEvent) SetTimestamp(v time.Time) *ByoipCidrEvent { + s.Timestamp = &v + return s +} + // The CIDR that you specified was not found or is incorrect. type ByoipCidrNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2948,17 +2998,17 @@ func (s ByoipCidrNotFoundException) GoString() string { func newErrorByoipCidrNotFoundException(v protocol.ResponseMetadata) error { return &ByoipCidrNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ByoipCidrNotFoundException) Code() string { +func (s *ByoipCidrNotFoundException) Code() string { return "ByoipCidrNotFoundException" } // Message returns the exception's message. -func (s ByoipCidrNotFoundException) Message() string { +func (s *ByoipCidrNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2966,22 +3016,22 @@ func (s ByoipCidrNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ByoipCidrNotFoundException) OrigErr() error { +func (s *ByoipCidrNotFoundException) OrigErr() error { return nil } -func (s ByoipCidrNotFoundException) Error() string { +func (s *ByoipCidrNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ByoipCidrNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ByoipCidrNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ByoipCidrNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ByoipCidrNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Provides authorization for Amazon to bring a specific IP address range to @@ -3966,8 +4016,8 @@ type EndpointConfiguration struct { // X-Forwarded-For request header as traffic travels to applications on the // Application Load Balancer endpoint fronted by the accelerator. // - // For more information, see Viewing Client IP Addresses in AWS Global Accelerator - // (https://docs.aws.amazon.com/global-accelerator/latest/dg/introduction-how-it-works-client-ip.html) + // For more information, see Preserve Client IP Addresses in AWS Global Accelerator + // (https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html) // in the AWS Global Accelerator Developer Guide. ClientIPPreservationEnabled *bool `type:"boolean"` @@ -4237,8 +4287,8 @@ func (s *EndpointGroup) SetTrafficDialPercentage(v float64) *EndpointGroup { // The endpoint group that you specified already exists. type EndpointGroupAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4255,17 +4305,17 @@ func (s EndpointGroupAlreadyExistsException) GoString() string { func newErrorEndpointGroupAlreadyExistsException(v protocol.ResponseMetadata) error { return &EndpointGroupAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EndpointGroupAlreadyExistsException) Code() string { +func (s *EndpointGroupAlreadyExistsException) Code() string { return "EndpointGroupAlreadyExistsException" } // Message returns the exception's message. -func (s EndpointGroupAlreadyExistsException) Message() string { +func (s *EndpointGroupAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4273,28 +4323,28 @@ func (s EndpointGroupAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EndpointGroupAlreadyExistsException) OrigErr() error { +func (s *EndpointGroupAlreadyExistsException) OrigErr() error { return nil } -func (s EndpointGroupAlreadyExistsException) Error() string { +func (s *EndpointGroupAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EndpointGroupAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EndpointGroupAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EndpointGroupAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *EndpointGroupAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The endpoint group that you specified doesn't exist. type EndpointGroupNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4311,17 +4361,17 @@ func (s EndpointGroupNotFoundException) GoString() string { func newErrorEndpointGroupNotFoundException(v protocol.ResponseMetadata) error { return &EndpointGroupNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EndpointGroupNotFoundException) Code() string { +func (s *EndpointGroupNotFoundException) Code() string { return "EndpointGroupNotFoundException" } // Message returns the exception's message. -func (s EndpointGroupNotFoundException) Message() string { +func (s *EndpointGroupNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4329,29 +4379,29 @@ func (s EndpointGroupNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EndpointGroupNotFoundException) OrigErr() error { +func (s *EndpointGroupNotFoundException) OrigErr() error { return nil } -func (s EndpointGroupNotFoundException) Error() string { +func (s *EndpointGroupNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EndpointGroupNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EndpointGroupNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EndpointGroupNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *EndpointGroupNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The CIDR that you specified is not valid for this action. For example, the // state of the CIDR might be incorrect for this action. type IncorrectCidrStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4368,17 +4418,17 @@ func (s IncorrectCidrStateException) GoString() string { func newErrorIncorrectCidrStateException(v protocol.ResponseMetadata) error { return &IncorrectCidrStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncorrectCidrStateException) Code() string { +func (s *IncorrectCidrStateException) Code() string { return "IncorrectCidrStateException" } // Message returns the exception's message. -func (s IncorrectCidrStateException) Message() string { +func (s *IncorrectCidrStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4386,28 +4436,28 @@ func (s IncorrectCidrStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncorrectCidrStateException) OrigErr() error { +func (s *IncorrectCidrStateException) OrigErr() error { return nil } -func (s IncorrectCidrStateException) Error() string { +func (s *IncorrectCidrStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncorrectCidrStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncorrectCidrStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncorrectCidrStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncorrectCidrStateException) RequestID() string { + return s.RespMetadata.RequestID } // There was an internal error for AWS Global Accelerator. type InternalServiceErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4424,17 +4474,17 @@ func (s InternalServiceErrorException) GoString() string { func newErrorInternalServiceErrorException(v protocol.ResponseMetadata) error { return &InternalServiceErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceErrorException) Code() string { +func (s *InternalServiceErrorException) Code() string { return "InternalServiceErrorException" } // Message returns the exception's message. -func (s InternalServiceErrorException) Message() string { +func (s *InternalServiceErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4442,28 +4492,28 @@ func (s InternalServiceErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceErrorException) OrigErr() error { +func (s *InternalServiceErrorException) OrigErr() error { return nil } -func (s InternalServiceErrorException) Error() string { +func (s *InternalServiceErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceErrorException) RequestID() string { + return s.RespMetadata.RequestID } // An argument that you specified is invalid. type InvalidArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4480,17 +4530,17 @@ func (s InvalidArgumentException) GoString() string { func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { return &InvalidArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgumentException) Code() string { +func (s *InvalidArgumentException) Code() string { return "InvalidArgumentException" } // Message returns the exception's message. -func (s InvalidArgumentException) Message() string { +func (s *InvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4498,28 +4548,28 @@ func (s InvalidArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgumentException) OrigErr() error { +func (s *InvalidArgumentException) OrigErr() error { return nil } -func (s InvalidArgumentException) Error() string { +func (s *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // There isn't another item to return. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4536,17 +4586,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4554,29 +4604,29 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The port numbers that you specified are not valid numbers or are not unique // for this accelerator. type InvalidPortRangeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4593,17 +4643,17 @@ func (s InvalidPortRangeException) GoString() string { func newErrorInvalidPortRangeException(v protocol.ResponseMetadata) error { return &InvalidPortRangeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPortRangeException) Code() string { +func (s *InvalidPortRangeException) Code() string { return "InvalidPortRangeException" } // Message returns the exception's message. -func (s InvalidPortRangeException) Message() string { +func (s *InvalidPortRangeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4611,22 +4661,22 @@ func (s InvalidPortRangeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPortRangeException) OrigErr() error { +func (s *InvalidPortRangeException) OrigErr() error { return nil } -func (s InvalidPortRangeException) Error() string { +func (s *InvalidPortRangeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPortRangeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPortRangeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPortRangeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPortRangeException) RequestID() string { + return s.RespMetadata.RequestID } // A complex type for the set of IP addresses for an accelerator. @@ -4666,8 +4716,8 @@ func (s *IpSet) SetIpFamily(v string) *IpSet { // Processing your request would cause you to exceed an AWS Global Accelerator // limit. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4684,17 +4734,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4702,22 +4752,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAcceleratorsInput struct { @@ -5204,8 +5254,8 @@ func (s *Listener) SetProtocol(v string) *Listener { // The listener that you specified doesn't exist. type ListenerNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5222,17 +5272,17 @@ func (s ListenerNotFoundException) GoString() string { func newErrorListenerNotFoundException(v protocol.ResponseMetadata) error { return &ListenerNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ListenerNotFoundException) Code() string { +func (s *ListenerNotFoundException) Code() string { return "ListenerNotFoundException" } // Message returns the exception's message. -func (s ListenerNotFoundException) Message() string { +func (s *ListenerNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5240,22 +5290,22 @@ func (s ListenerNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ListenerNotFoundException) OrigErr() error { +func (s *ListenerNotFoundException) OrigErr() error { return nil } -func (s ListenerNotFoundException) Error() string { +func (s *ListenerNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ListenerNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ListenerNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ListenerNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ListenerNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A complex type for a range of ports for a listener. 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 b6f7683ddd5..58312d39b23 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 @@ -11279,6 +11279,98 @@ func (c *Glue) StopTriggerWithContext(ctx aws.Context, input *StopTriggerInput, return out, req.Send() } +const opStopWorkflowRun = "StopWorkflowRun" + +// StopWorkflowRunRequest generates a "aws/request.Request" representing the +// client's request for the StopWorkflowRun operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopWorkflowRun for more information on using the StopWorkflowRun +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopWorkflowRunRequest method. +// req, resp := client.StopWorkflowRunRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopWorkflowRun +func (c *Glue) StopWorkflowRunRequest(input *StopWorkflowRunInput) (req *request.Request, output *StopWorkflowRunOutput) { + op := &request.Operation{ + Name: opStopWorkflowRun, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopWorkflowRunInput{} + } + + output = &StopWorkflowRunOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopWorkflowRun API operation for AWS Glue. +// +// Stops the execution of the specified workflow run. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation StopWorkflowRun for usage and error information. +// +// Returned Error Types: +// * InvalidInputException +// The input provided was not valid. +// +// * EntityNotFoundException +// A specified entity does not exist +// +// * InternalServiceException +// An internal service error occurred. +// +// * OperationTimeoutException +// The operation timed out. +// +// * IllegalWorkflowStateException +// The workflow is in an invalid state to perform a requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StopWorkflowRun +func (c *Glue) StopWorkflowRun(input *StopWorkflowRunInput) (*StopWorkflowRunOutput, error) { + req, out := c.StopWorkflowRunRequest(input) + return out, req.Send() +} + +// StopWorkflowRunWithContext is the same as StopWorkflowRun with the addition of +// the ability to pass a context and additional request options. +// +// See StopWorkflowRun for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) StopWorkflowRunWithContext(ctx aws.Context, input *StopWorkflowRunInput, opts ...request.Option) (*StopWorkflowRunOutput, error) { + req, out := c.StopWorkflowRunRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the @@ -12663,8 +12755,8 @@ func (c *Glue) UpdateWorkflowWithContext(ctx aws.Context, input *UpdateWorkflowI // Access to a resource was denied. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -12682,17 +12774,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12700,22 +12792,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Defines an action to be initiated by a trigger. @@ -12831,8 +12923,8 @@ func (s *Action) SetTimeout(v int64) *Action { // A resource to be created or added already exists. type AlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -12850,17 +12942,17 @@ func (s AlreadyExistsException) GoString() string { func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { return &AlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlreadyExistsException) Code() string { +func (s *AlreadyExistsException) Code() string { return "AlreadyExistsException" } // Message returns the exception's message. -func (s AlreadyExistsException) Message() string { +func (s *AlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12868,22 +12960,22 @@ func (s AlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlreadyExistsException) OrigErr() error { +func (s *AlreadyExistsException) OrigErr() error { return nil } -func (s AlreadyExistsException) Error() string { +func (s *AlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } type BatchCreatePartitionInput struct { @@ -14714,8 +14806,8 @@ func (s *Column) SetType(v string) *Column { // Two processes are trying to modify a resource simultaneously. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -14733,17 +14825,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14751,28 +14843,28 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // Too many jobs are being run concurrently. type ConcurrentRunsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -14790,17 +14882,17 @@ func (s ConcurrentRunsExceededException) GoString() string { func newErrorConcurrentRunsExceededException(v protocol.ResponseMetadata) error { return &ConcurrentRunsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentRunsExceededException) Code() string { +func (s *ConcurrentRunsExceededException) Code() string { return "ConcurrentRunsExceededException" } // Message returns the exception's message. -func (s ConcurrentRunsExceededException) Message() string { +func (s *ConcurrentRunsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14808,22 +14900,22 @@ func (s ConcurrentRunsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentRunsExceededException) OrigErr() error { +func (s *ConcurrentRunsExceededException) OrigErr() error { return nil } -func (s ConcurrentRunsExceededException) Error() string { +func (s *ConcurrentRunsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentRunsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentRunsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentRunsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentRunsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Defines a condition under which a trigger fires. @@ -14843,8 +14935,9 @@ type Condition struct { // A logical operator. LogicalOperator *string `type:"string" enum:"LogicalOperator"` - // The condition state. Currently, the values supported are SUCCEEDED, STOPPED, - // TIMEOUT, and FAILED. + // The condition state. Currently, the only job states that a trigger can listen + // for are SUCCEEDED, STOPPED, FAILED, and TIMEOUT. The only crawler states + // that a trigger can listen for are SUCCEEDED, FAILED, and CANCELLED. State *string `type:"string" enum:"JobRunState"` } @@ -14906,8 +14999,8 @@ func (s *Condition) SetState(v string) *Condition { // A specified condition was not satisfied. type ConditionCheckFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -14925,17 +15018,17 @@ func (s ConditionCheckFailureException) GoString() string { func newErrorConditionCheckFailureException(v protocol.ResponseMetadata) error { return &ConditionCheckFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConditionCheckFailureException) Code() string { +func (s *ConditionCheckFailureException) Code() string { return "ConditionCheckFailureException" } // Message returns the exception's message. -func (s ConditionCheckFailureException) Message() string { +func (s *ConditionCheckFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14943,22 +15036,22 @@ func (s ConditionCheckFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConditionCheckFailureException) OrigErr() error { +func (s *ConditionCheckFailureException) OrigErr() error { return nil } -func (s ConditionCheckFailureException) Error() string { +func (s *ConditionCheckFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConditionCheckFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConditionCheckFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConditionCheckFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConditionCheckFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The confusion matrix shows you what your transform is predicting accurately @@ -15054,7 +15147,7 @@ type Connection struct { // // * INSTANCE_ID - The instance ID to use. // - // * JDBC_CONNECTION_URL - The URL for the JDBC connection. + // * JDBC_CONNECTION_URL - The URL for connecting to a JDBC data source. // // * JDBC_ENFORCE_SSL - A Boolean string (true, false) specifying whether // Secure Sockets Layer (SSL) with hostname matching is enforced for the @@ -15078,6 +15171,13 @@ type Connection struct { // used for domain match or distinguished name match to prevent a man-in-the-middle // attack. In Oracle database, this is used as the SSL_SERVER_CERT_DN; in // Microsoft SQL Server, this is used as the hostNameInCertificate. + // + // * CONNECTION_URL - The URL for connecting to a general (non-JDBC) data + // source. + // + // * KAFKA_BOOTSTRAP_SERVERS - A comma-separated list of host and port pairs + // that are the addresses of the Apache Kafka brokers in a Kafka cluster + // to which a Kafka client will connect to and bootstrap itself. ConnectionProperties map[string]*string `type:"map"` // The type of the connection. Currently, only JDBC is supported; SFTP is not @@ -15180,8 +15280,16 @@ type ConnectionInput struct { // ConnectionProperties is a required field ConnectionProperties map[string]*string `type:"map" required:"true"` - // The type of the connection. Currently, only JDBC is supported; SFTP is not - // supported. + // The type of the connection. Currently, these types are supported: + // + // * JDBC - Designates a connection to a database through Java Database Connectivity + // (JDBC). + // + // * KAFKA - Designates a connection to an Apache Kafka streaming platform. + // + // * MONGODB - Designates a connection to a MongoDB document database. + // + // SFTP is not supported. // // ConnectionType is a required field ConnectionType *string `type:"string" required:"true" enum:"ConnectionType"` @@ -15730,8 +15838,8 @@ func (s *CrawlerNodeDetails) SetCrawls(v []*Crawl) *CrawlerNodeDetails { // The specified crawler is not running. type CrawlerNotRunningException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -15749,17 +15857,17 @@ func (s CrawlerNotRunningException) GoString() string { func newErrorCrawlerNotRunningException(v protocol.ResponseMetadata) error { return &CrawlerNotRunningException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CrawlerNotRunningException) Code() string { +func (s *CrawlerNotRunningException) Code() string { return "CrawlerNotRunningException" } // Message returns the exception's message. -func (s CrawlerNotRunningException) Message() string { +func (s *CrawlerNotRunningException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15767,28 +15875,28 @@ func (s CrawlerNotRunningException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CrawlerNotRunningException) OrigErr() error { +func (s *CrawlerNotRunningException) OrigErr() error { return nil } -func (s CrawlerNotRunningException) Error() string { +func (s *CrawlerNotRunningException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CrawlerNotRunningException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CrawlerNotRunningException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CrawlerNotRunningException) RequestID() string { - return s.respMetadata.RequestID +func (s *CrawlerNotRunningException) RequestID() string { + return s.RespMetadata.RequestID } // The operation cannot be performed because the crawler is already running. type CrawlerRunningException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -15806,17 +15914,17 @@ func (s CrawlerRunningException) GoString() string { func newErrorCrawlerRunningException(v protocol.ResponseMetadata) error { return &CrawlerRunningException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CrawlerRunningException) Code() string { +func (s *CrawlerRunningException) Code() string { return "CrawlerRunningException" } // Message returns the exception's message. -func (s CrawlerRunningException) Message() string { +func (s *CrawlerRunningException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15824,28 +15932,28 @@ func (s CrawlerRunningException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CrawlerRunningException) OrigErr() error { +func (s *CrawlerRunningException) OrigErr() error { return nil } -func (s CrawlerRunningException) Error() string { +func (s *CrawlerRunningException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CrawlerRunningException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CrawlerRunningException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CrawlerRunningException) RequestID() string { - return s.respMetadata.RequestID +func (s *CrawlerRunningException) RequestID() string { + return s.RespMetadata.RequestID } // The specified crawler is stopping. type CrawlerStoppingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -15863,17 +15971,17 @@ func (s CrawlerStoppingException) GoString() string { func newErrorCrawlerStoppingException(v protocol.ResponseMetadata) error { return &CrawlerStoppingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CrawlerStoppingException) Code() string { +func (s *CrawlerStoppingException) Code() string { return "CrawlerStoppingException" } // Message returns the exception's message. -func (s CrawlerStoppingException) Message() string { +func (s *CrawlerStoppingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15881,22 +15989,22 @@ func (s CrawlerStoppingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CrawlerStoppingException) OrigErr() error { +func (s *CrawlerStoppingException) OrigErr() error { return nil } -func (s CrawlerStoppingException) Error() string { +func (s *CrawlerStoppingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CrawlerStoppingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CrawlerStoppingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CrawlerStoppingException) RequestID() string { - return s.respMetadata.RequestID +func (s *CrawlerStoppingException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies data stores to crawl. @@ -20351,8 +20459,8 @@ func (s *EncryptionConfiguration) SetS3Encryption(v []*S3Encryption) *Encryption // An encryption operation failed. type EncryptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -20370,17 +20478,17 @@ func (s EncryptionException) GoString() string { func newErrorEncryptionException(v protocol.ResponseMetadata) error { return &EncryptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionException) Code() string { +func (s *EncryptionException) Code() string { return "GlueEncryptionException" } // Message returns the exception's message. -func (s EncryptionException) Message() string { +func (s *EncryptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20388,28 +20496,28 @@ func (s EncryptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionException) OrigErr() error { +func (s *EncryptionException) OrigErr() error { return nil } -func (s EncryptionException) Error() string { +func (s *EncryptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionException) RequestID() string { + return s.RespMetadata.RequestID } // A specified entity does not exist type EntityNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -20427,17 +20535,17 @@ func (s EntityNotFoundException) GoString() string { func newErrorEntityNotFoundException(v protocol.ResponseMetadata) error { return &EntityNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityNotFoundException) Code() string { +func (s *EntityNotFoundException) Code() string { return "EntityNotFoundException" } // Message returns the exception's message. -func (s EntityNotFoundException) Message() string { +func (s *EntityNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20445,22 +20553,22 @@ func (s EntityNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityNotFoundException) OrigErr() error { +func (s *EntityNotFoundException) OrigErr() error { return nil } -func (s EntityNotFoundException) Error() string { +func (s *EntityNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an error. @@ -24475,9 +24583,7 @@ type GetUserDefinedFunctionsInput struct { CatalogId *string `min:"1" type:"string"` // The name of the catalog database where the functions are located. - // - // DatabaseName is a required field - DatabaseName *string `min:"1" type:"string" required:"true"` + DatabaseName *string `min:"1" type:"string"` // The maximum number of functions to return in one response. MaxResults *int64 `min:"1" type:"integer"` @@ -24508,9 +24614,6 @@ func (s *GetUserDefinedFunctionsInput) Validate() error { if s.CatalogId != nil && len(*s.CatalogId) < 1 { invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) } - if s.DatabaseName == nil { - invalidParams.Add(request.NewErrParamRequired("DatabaseName")) - } if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) } @@ -25030,8 +25133,8 @@ func (s *GrokClassifier) SetVersion(v int64) *GrokClassifier { // The same unique identifier was associated with two different records. type IdempotentParameterMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -25049,17 +25152,74 @@ func (s IdempotentParameterMismatchException) GoString() string { func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotentParameterMismatchException) Code() string { +func (s *IdempotentParameterMismatchException) Code() string { return "IdempotentParameterMismatchException" } // Message returns the exception's message. -func (s IdempotentParameterMismatchException) Message() string { +func (s *IdempotentParameterMismatchException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *IdempotentParameterMismatchException) OrigErr() error { + return nil +} + +func (s *IdempotentParameterMismatchException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *IdempotentParameterMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *IdempotentParameterMismatchException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The workflow is in an invalid state to perform a requested operation. +type IllegalWorkflowStateException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // A message describing the problem. + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s IllegalWorkflowStateException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IllegalWorkflowStateException) GoString() string { + return s.String() +} + +func newErrorIllegalWorkflowStateException(v protocol.ResponseMetadata) error { + return &IllegalWorkflowStateException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *IllegalWorkflowStateException) Code() string { + return "IllegalWorkflowStateException" +} + +// Message returns the exception's message. +func (s *IllegalWorkflowStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25067,22 +25227,22 @@ func (s IdempotentParameterMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotentParameterMismatchException) OrigErr() error { +func (s *IllegalWorkflowStateException) OrigErr() error { return nil } -func (s IdempotentParameterMismatchException) Error() string { +func (s *IllegalWorkflowStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotentParameterMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IllegalWorkflowStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotentParameterMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *IllegalWorkflowStateException) RequestID() string { + return s.RespMetadata.RequestID } type ImportCatalogToGlueInput struct { @@ -25172,8 +25332,8 @@ func (s *ImportLabelsTaskRunProperties) SetReplace(v bool) *ImportLabelsTaskRunP // An internal service error occurred. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -25191,17 +25351,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25209,28 +25369,28 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // The input provided was not valid. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -25248,17 +25408,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25266,22 +25426,22 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies a JDBC data store to crawl. @@ -25823,7 +25983,8 @@ type JobRun struct { // The name of the job definition being used in this run. JobName *string `min:"1" type:"string"` - // The current state of the job run. + // The current state of the job run. For more information about the statuses + // of jobs that have terminated abnormally, see AWS Glue Job Run Statuses (https://docs.aws.amazon.com/glue/latest/dg/job-run-statuses.html). JobRunState *string `type:"string" enum:"JobRunState"` // The last time that this job run was modified. @@ -27348,8 +27509,8 @@ func (s *MLTransform) SetWorkerType(v string) *MLTransform { // The machine learning transform is not ready to run. type MLTransformNotReadyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -27367,17 +27528,17 @@ func (s MLTransformNotReadyException) GoString() string { func newErrorMLTransformNotReadyException(v protocol.ResponseMetadata) error { return &MLTransformNotReadyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MLTransformNotReadyException) Code() string { +func (s *MLTransformNotReadyException) Code() string { return "MLTransformNotReadyException" } // Message returns the exception's message. -func (s MLTransformNotReadyException) Message() string { +func (s *MLTransformNotReadyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27385,22 +27546,22 @@ func (s MLTransformNotReadyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MLTransformNotReadyException) OrigErr() error { +func (s *MLTransformNotReadyException) OrigErr() error { return nil } -func (s MLTransformNotReadyException) Error() string { +func (s *MLTransformNotReadyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MLTransformNotReadyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MLTransformNotReadyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MLTransformNotReadyException) RequestID() string { - return s.respMetadata.RequestID +func (s *MLTransformNotReadyException) RequestID() string { + return s.RespMetadata.RequestID } // Defines a mapping. @@ -27474,8 +27635,8 @@ func (s *MappingEntry) SetTargetType(v string) *MappingEntry { // There is no applicable schedule. type NoScheduleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -27493,17 +27654,17 @@ func (s NoScheduleException) GoString() string { func newErrorNoScheduleException(v protocol.ResponseMetadata) error { return &NoScheduleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoScheduleException) Code() string { +func (s *NoScheduleException) Code() string { return "NoScheduleException" } // Message returns the exception's message. -func (s NoScheduleException) Message() string { +func (s *NoScheduleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27511,22 +27672,22 @@ func (s NoScheduleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoScheduleException) OrigErr() error { +func (s *NoScheduleException) OrigErr() error { return nil } -func (s NoScheduleException) Error() string { +func (s *NoScheduleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoScheduleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoScheduleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoScheduleException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoScheduleException) RequestID() string { + return s.RespMetadata.RequestID } // A node represents an AWS Glue component like Trigger, Job etc. which is part @@ -27639,8 +27800,8 @@ func (s *NotificationProperty) SetNotifyDelayAfter(v int64) *NotificationPropert // The operation timed out. type OperationTimeoutException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -27658,17 +27819,17 @@ func (s OperationTimeoutException) GoString() string { func newErrorOperationTimeoutException(v protocol.ResponseMetadata) error { return &OperationTimeoutException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationTimeoutException) Code() string { +func (s *OperationTimeoutException) Code() string { return "OperationTimeoutException" } // Message returns the exception's message. -func (s OperationTimeoutException) Message() string { +func (s *OperationTimeoutException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27676,22 +27837,22 @@ func (s OperationTimeoutException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationTimeoutException) OrigErr() error { +func (s *OperationTimeoutException) OrigErr() error { return nil } -func (s OperationTimeoutException) Error() string { +func (s *OperationTimeoutException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationTimeoutException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationTimeoutException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationTimeoutException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the sort order of a sorted column. @@ -28547,8 +28708,8 @@ func (s *ResetJobBookmarkOutput) SetJobBookmarkEntry(v *JobBookmarkEntry) *Reset // A resource numerical limit was exceeded. type ResourceNumberLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -28566,17 +28727,17 @@ func (s ResourceNumberLimitExceededException) GoString() string { func newErrorResourceNumberLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceNumberLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNumberLimitExceededException) Code() string { +func (s *ResourceNumberLimitExceededException) Code() string { return "ResourceNumberLimitExceededException" } // Message returns the exception's message. -func (s ResourceNumberLimitExceededException) Message() string { +func (s *ResourceNumberLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28584,22 +28745,22 @@ func (s ResourceNumberLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNumberLimitExceededException) OrigErr() error { +func (s *ResourceNumberLimitExceededException) OrigErr() error { return nil } -func (s ResourceNumberLimitExceededException) Error() string { +func (s *ResourceNumberLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNumberLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNumberLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNumberLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNumberLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The URIs for function resources. @@ -28753,8 +28914,8 @@ func (s *Schedule) SetState(v string) *Schedule { // The specified scheduler is not running. type SchedulerNotRunningException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -28772,17 +28933,17 @@ func (s SchedulerNotRunningException) GoString() string { func newErrorSchedulerNotRunningException(v protocol.ResponseMetadata) error { return &SchedulerNotRunningException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SchedulerNotRunningException) Code() string { +func (s *SchedulerNotRunningException) Code() string { return "SchedulerNotRunningException" } // Message returns the exception's message. -func (s SchedulerNotRunningException) Message() string { +func (s *SchedulerNotRunningException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28790,28 +28951,28 @@ func (s SchedulerNotRunningException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SchedulerNotRunningException) OrigErr() error { +func (s *SchedulerNotRunningException) OrigErr() error { return nil } -func (s SchedulerNotRunningException) Error() string { +func (s *SchedulerNotRunningException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SchedulerNotRunningException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SchedulerNotRunningException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SchedulerNotRunningException) RequestID() string { - return s.respMetadata.RequestID +func (s *SchedulerNotRunningException) RequestID() string { + return s.RespMetadata.RequestID } // The specified scheduler is already running. type SchedulerRunningException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -28829,17 +28990,17 @@ func (s SchedulerRunningException) GoString() string { func newErrorSchedulerRunningException(v protocol.ResponseMetadata) error { return &SchedulerRunningException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SchedulerRunningException) Code() string { +func (s *SchedulerRunningException) Code() string { return "SchedulerRunningException" } // Message returns the exception's message. -func (s SchedulerRunningException) Message() string { +func (s *SchedulerRunningException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28847,28 +29008,28 @@ func (s SchedulerRunningException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SchedulerRunningException) OrigErr() error { +func (s *SchedulerRunningException) OrigErr() error { return nil } -func (s SchedulerRunningException) Error() string { +func (s *SchedulerRunningException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SchedulerRunningException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SchedulerRunningException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SchedulerRunningException) RequestID() string { - return s.respMetadata.RequestID +func (s *SchedulerRunningException) RequestID() string { + return s.RespMetadata.RequestID } // The specified scheduler is transitioning. type SchedulerTransitioningException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -28886,17 +29047,17 @@ func (s SchedulerTransitioningException) GoString() string { func newErrorSchedulerTransitioningException(v protocol.ResponseMetadata) error { return &SchedulerTransitioningException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SchedulerTransitioningException) Code() string { +func (s *SchedulerTransitioningException) Code() string { return "SchedulerTransitioningException" } // Message returns the exception's message. -func (s SchedulerTransitioningException) Message() string { +func (s *SchedulerTransitioningException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28904,22 +29065,22 @@ func (s SchedulerTransitioningException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SchedulerTransitioningException) OrigErr() error { +func (s *SchedulerTransitioningException) OrigErr() error { return nil } -func (s SchedulerTransitioningException) Error() string { +func (s *SchedulerTransitioningException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SchedulerTransitioningException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SchedulerTransitioningException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SchedulerTransitioningException) RequestID() string { - return s.respMetadata.RequestID +func (s *SchedulerTransitioningException) RequestID() string { + return s.RespMetadata.RequestID } // A policy that specifies update and deletion behaviors for the crawler. @@ -30292,6 +30453,78 @@ func (s *StopTriggerOutput) SetName(v string) *StopTriggerOutput { return s } +type StopWorkflowRunInput struct { + _ struct{} `type:"structure"` + + // The name of the workflow to stop. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The ID of the workflow run to stop. + // + // RunId is a required field + RunId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopWorkflowRunInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopWorkflowRunInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopWorkflowRunInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopWorkflowRunInput"} + 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.RunId == nil { + invalidParams.Add(request.NewErrParamRequired("RunId")) + } + if s.RunId != nil && len(*s.RunId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RunId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *StopWorkflowRunInput) SetName(v string) *StopWorkflowRunInput { + s.Name = &v + return s +} + +// SetRunId sets the RunId field's value. +func (s *StopWorkflowRunInput) SetRunId(v string) *StopWorkflowRunInput { + s.RunId = &v + return s +} + +type StopWorkflowRunOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopWorkflowRunOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopWorkflowRunOutput) GoString() string { + return s.String() +} + // Describes the physical storage of table data. type StorageDescriptor struct { _ struct{} `type:"structure"` @@ -33711,8 +33944,8 @@ func (s *UserDefinedFunctionInput) SetResourceUris(v []*ResourceUri) *UserDefine // A value could not be validated. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -33730,17 +33963,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -33748,28 +33981,28 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // There was a version conflict. type VersionMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -33787,17 +34020,17 @@ func (s VersionMismatchException) GoString() string { func newErrorVersionMismatchException(v protocol.ResponseMetadata) error { return &VersionMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s VersionMismatchException) Code() string { +func (s *VersionMismatchException) Code() string { return "VersionMismatchException" } // Message returns the exception's message. -func (s VersionMismatchException) Message() string { +func (s *VersionMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -33805,22 +34038,22 @@ func (s VersionMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s VersionMismatchException) OrigErr() error { +func (s *VersionMismatchException) OrigErr() error { return nil } -func (s VersionMismatchException) Error() string { +func (s *VersionMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s VersionMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *VersionMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s VersionMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *VersionMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // A workflow represents a flow in which AWS Glue components should be executed @@ -34255,6 +34488,12 @@ const ( // ConnectionPropertyKeyCustomJdbcCertString is a ConnectionPropertyKey enum value ConnectionPropertyKeyCustomJdbcCertString = "CUSTOM_JDBC_CERT_STRING" + + // ConnectionPropertyKeyConnectionUrl is a ConnectionPropertyKey enum value + ConnectionPropertyKeyConnectionUrl = "CONNECTION_URL" + + // ConnectionPropertyKeyKafkaBootstrapServers is a ConnectionPropertyKey enum value + ConnectionPropertyKeyKafkaBootstrapServers = "KAFKA_BOOTSTRAP_SERVERS" ) const ( @@ -34263,18 +34502,27 @@ const ( // ConnectionTypeSftp is a ConnectionType enum value ConnectionTypeSftp = "SFTP" + + // ConnectionTypeMongodb is a ConnectionType enum value + ConnectionTypeMongodb = "MONGODB" + + // ConnectionTypeKafka is a ConnectionType enum value + ConnectionTypeKafka = "KAFKA" ) const ( // CrawlStateRunning is a CrawlState enum value CrawlStateRunning = "RUNNING" - // CrawlStateSucceeded is a CrawlState enum value - CrawlStateSucceeded = "SUCCEEDED" + // CrawlStateCancelling is a CrawlState enum value + CrawlStateCancelling = "CANCELLING" // CrawlStateCancelled is a CrawlState enum value CrawlStateCancelled = "CANCELLED" + // CrawlStateSucceeded is a CrawlState enum value + CrawlStateSucceeded = "SUCCEEDED" + // CrawlStateFailed is a CrawlState enum value CrawlStateFailed = "FAILED" ) @@ -34632,4 +34880,10 @@ const ( // WorkflowRunStatusCompleted is a WorkflowRunStatus enum value WorkflowRunStatusCompleted = "COMPLETED" + + // WorkflowRunStatusStopping is a WorkflowRunStatus enum value + WorkflowRunStatusStopping = "STOPPING" + + // WorkflowRunStatusStopped is a WorkflowRunStatus enum value + WorkflowRunStatusStopped = "STOPPED" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go index dc5ad7afd38..95a992b0233 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go @@ -74,6 +74,12 @@ const ( // The same unique identifier was associated with two different records. ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException" + // ErrCodeIllegalWorkflowStateException for service response error code + // "IllegalWorkflowStateException". + // + // The workflow is in an invalid state to perform a requested operation. + ErrCodeIllegalWorkflowStateException = "IllegalWorkflowStateException" + // ErrCodeInternalServiceException for service response error code // "InternalServiceException". // @@ -153,6 +159,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "GlueEncryptionException": newErrorEncryptionException, "EntityNotFoundException": newErrorEntityNotFoundException, "IdempotentParameterMismatchException": newErrorIdempotentParameterMismatchException, + "IllegalWorkflowStateException": newErrorIllegalWorkflowStateException, "InternalServiceException": newErrorInternalServiceException, "InvalidInputException": newErrorInvalidInputException, "MLTransformNotReadyException": newErrorMLTransformNotReadyException, diff --git a/vendor/github.com/aws/aws-sdk-go/service/greengrass/api.go b/vendor/github.com/aws/aws-sdk-go/service/greengrass/api.go index 1f62bf81a43..e67104de93f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/greengrass/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/greengrass/api.go @@ -7328,8 +7328,8 @@ func (s *AssociateServiceRoleToAccountOutput) SetAssociatedAt(v string) *Associa // General error information. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A list of error details. ErrorDetails []*ErrorDetail `type:"list"` @@ -7349,17 +7349,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7367,22 +7367,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a bulk deployment. You cannot start a new bulk deployment @@ -14206,8 +14206,8 @@ func (s *GroupVersion) SetSubscriptionDefinitionVersionArn(v string) *GroupVersi // General error information. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A list of error details. ErrorDetails []*ErrorDetail `type:"list"` @@ -14227,17 +14227,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14245,22 +14245,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ListBulkDeploymentDetailedReportsInput struct { 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 e6778de6480..5eb039eeb01 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 @@ -68,10 +68,10 @@ func (c *GuardDuty) AcceptInvitationRequest(input *AcceptInvitationInput) (req * // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/AcceptInvitation func (c *GuardDuty) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) { @@ -140,9 +140,9 @@ func (c *GuardDuty) ArchiveFindingsRequest(input *ArchiveFindingsInput) (req *re // ArchiveFindings API operation for Amazon GuardDuty. // -// Archives GuardDuty findings specified by the list of finding IDs. +// Archives GuardDuty findings that are specified by the list of finding IDs. // -// Only the master account can archive findings. Member accounts do not have +// Only the master account can archive findings. Member accounts don't have // permission to archive findings from their accounts. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -154,10 +154,10 @@ func (c *GuardDuty) ArchiveFindingsRequest(input *ArchiveFindingsInput) (req *re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ArchiveFindings func (c *GuardDuty) ArchiveFindings(input *ArchiveFindingsInput) (*ArchiveFindingsOutput, error) { @@ -227,8 +227,8 @@ func (c *GuardDuty) CreateDetectorRequest(input *CreateDetectorInput) (req *requ // // Creates a single Amazon GuardDuty detector. A detector is a resource that // represents the GuardDuty service. To start using GuardDuty, you must create -// a detector in each region that you enable the service. You can have only -// one detector per account per region. +// a detector in each Region where you enable the service. You can have only +// one detector per account per 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 @@ -239,10 +239,10 @@ func (c *GuardDuty) CreateDetectorRequest(input *CreateDetectorInput) (req *requ // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateDetector func (c *GuardDuty) CreateDetector(input *CreateDetectorInput) (*CreateDetectorOutput, error) { @@ -321,10 +321,10 @@ func (c *GuardDuty) CreateFilterRequest(input *CreateFilterInput) (req *request. // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter func (c *GuardDuty) CreateFilter(input *CreateFilterInput) (*CreateFilterOutput, error) { @@ -392,11 +392,11 @@ func (c *GuardDuty) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Re // CreateIPSet API operation for Amazon GuardDuty. // -// Creates a new IPSet, called Trusted IP list in the consoler user interface. -// An IPSet is a list IP addresses trusted for secure communication with AWS -// infrastructure and applications. GuardDuty does not generate findings for -// IP addresses included in IPSets. Only users from the master account can use -// this operation. +// Creates a new IPSet, which is called a trusted IP list in the console user +// interface. An IPSet is a list of IP addresses that are trusted for secure +// communication with AWS infrastructure and applications. GuardDuty doesn't +// generate findings for IP addresses that are included in IPSets. Only users +// from the master account can use this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -407,10 +407,10 @@ func (c *GuardDuty) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateIPSet func (c *GuardDuty) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) { @@ -491,10 +491,10 @@ func (c *GuardDuty) CreateMembersRequest(input *CreateMembersInput) (req *reques // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateMembers func (c *GuardDuty) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) { @@ -562,7 +562,7 @@ func (c *GuardDuty) CreatePublishingDestinationRequest(input *CreatePublishingDe // CreatePublishingDestination API operation for Amazon GuardDuty. // -// Creates a publishing destination to send findings to. The resource to send +// Creates a publishing destination to export findings to. The resource to export // findings to must exist before you use this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -574,10 +574,10 @@ func (c *GuardDuty) CreatePublishingDestinationRequest(input *CreatePublishingDe // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreatePublishingDestination func (c *GuardDuty) CreatePublishingDestination(input *CreatePublishingDestinationInput) (*CreatePublishingDestinationOutput, error) { @@ -659,10 +659,10 @@ func (c *GuardDuty) CreateSampleFindingsRequest(input *CreateSampleFindingsInput // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateSampleFindings func (c *GuardDuty) CreateSampleFindings(input *CreateSampleFindingsInput) (*CreateSampleFindingsOutput, error) { @@ -730,9 +730,9 @@ func (c *GuardDuty) CreateThreatIntelSetRequest(input *CreateThreatIntelSetInput // CreateThreatIntelSet API operation for Amazon GuardDuty. // -// Create a new ThreatIntelSet. ThreatIntelSets consist of known malicious IP -// addresses. GuardDuty generates findings based on ThreatIntelSets. Only users -// of the master account can use this operation. +// Creates a new ThreatIntelSet. ThreatIntelSets consist of known malicious +// IP addresses. GuardDuty generates findings based on ThreatIntelSets. Only +// users of the master account can use this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -743,10 +743,10 @@ func (c *GuardDuty) CreateThreatIntelSetRequest(input *CreateThreatIntelSetInput // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateThreatIntelSet func (c *GuardDuty) CreateThreatIntelSet(input *CreateThreatIntelSetInput) (*CreateThreatIntelSetOutput, error) { @@ -814,7 +814,7 @@ func (c *GuardDuty) DeclineInvitationsRequest(input *DeclineInvitationsInput) (r // DeclineInvitations API operation for Amazon GuardDuty. // -// Declines invitations sent to the current member account by AWS account specified +// Declines invitations sent to the current member account by AWS accounts specified // by their account IDs. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -826,10 +826,10 @@ func (c *GuardDuty) DeclineInvitationsRequest(input *DeclineInvitationsInput) (r // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeclineInvitations func (c *GuardDuty) DeclineInvitations(input *DeclineInvitationsInput) (*DeclineInvitationsOutput, error) { @@ -898,7 +898,7 @@ func (c *GuardDuty) DeleteDetectorRequest(input *DeleteDetectorInput) (req *requ // DeleteDetector API operation for Amazon GuardDuty. // -// Deletes a Amazon GuardDuty detector specified by the detector ID. +// Deletes an Amazon GuardDuty detector that is specified by the detector ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -909,10 +909,10 @@ func (c *GuardDuty) DeleteDetectorRequest(input *DeleteDetectorInput) (req *requ // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteDetector func (c *GuardDuty) DeleteDetector(input *DeleteDetectorInput) (*DeleteDetectorOutput, error) { @@ -992,10 +992,10 @@ func (c *GuardDuty) DeleteFilterRequest(input *DeleteFilterInput) (req *request. // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter func (c *GuardDuty) DeleteFilter(input *DeleteFilterInput) (*DeleteFilterOutput, error) { @@ -1064,7 +1064,7 @@ func (c *GuardDuty) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Re // DeleteIPSet API operation for Amazon GuardDuty. // -// Deletes the IPSet specified by the ipSetId. IPSets are called Trusted IP +// Deletes the IPSet specified by the ipSetId. IPSets are called trusted IP // lists in the console user interface. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1076,10 +1076,10 @@ func (c *GuardDuty) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteIPSet func (c *GuardDuty) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) { @@ -1159,10 +1159,10 @@ func (c *GuardDuty) DeleteInvitationsRequest(input *DeleteInvitationsInput) (req // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteInvitations func (c *GuardDuty) DeleteInvitations(input *DeleteInvitationsInput) (*DeleteInvitationsOutput, error) { @@ -1242,10 +1242,10 @@ func (c *GuardDuty) DeleteMembersRequest(input *DeleteMembersInput) (req *reques // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteMembers func (c *GuardDuty) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) { @@ -1325,10 +1325,10 @@ func (c *GuardDuty) DeletePublishingDestinationRequest(input *DeletePublishingDe // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeletePublishingDestination func (c *GuardDuty) DeletePublishingDestination(input *DeletePublishingDestinationInput) (*DeletePublishingDestinationOutput, error) { @@ -1397,7 +1397,7 @@ func (c *GuardDuty) DeleteThreatIntelSetRequest(input *DeleteThreatIntelSetInput // DeleteThreatIntelSet API operation for Amazon GuardDuty. // -// Deletes ThreatIntelSet specified by the ThreatIntelSet ID. +// Deletes the ThreatIntelSet specified by the ThreatIntelSet ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1408,10 +1408,10 @@ func (c *GuardDuty) DeleteThreatIntelSetRequest(input *DeleteThreatIntelSetInput // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteThreatIntelSet func (c *GuardDuty) DeleteThreatIntelSet(input *DeleteThreatIntelSetInput) (*DeleteThreatIntelSetOutput, error) { @@ -1435,6 +1435,89 @@ func (c *GuardDuty) DeleteThreatIntelSetWithContext(ctx aws.Context, input *Dele return out, req.Send() } +const opDescribeOrganizationConfiguration = "DescribeOrganizationConfiguration" + +// DescribeOrganizationConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOrganizationConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeOrganizationConfiguration for more information on using the DescribeOrganizationConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeOrganizationConfigurationRequest method. +// req, resp := client.DescribeOrganizationConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DescribeOrganizationConfiguration +func (c *GuardDuty) DescribeOrganizationConfigurationRequest(input *DescribeOrganizationConfigurationInput) (req *request.Request, output *DescribeOrganizationConfigurationOutput) { + op := &request.Operation{ + Name: opDescribeOrganizationConfiguration, + HTTPMethod: "GET", + HTTPPath: "/detector/{detectorId}/admin", + } + + if input == nil { + input = &DescribeOrganizationConfigurationInput{} + } + + output = &DescribeOrganizationConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOrganizationConfiguration API operation for Amazon GuardDuty. +// +// Returns information about the account selected as the delegated administrator +// for GuardDuty. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation DescribeOrganizationConfiguration for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// A bad request exception object. +// +// * InternalServerErrorException +// An internal server error exception object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DescribeOrganizationConfiguration +func (c *GuardDuty) DescribeOrganizationConfiguration(input *DescribeOrganizationConfigurationInput) (*DescribeOrganizationConfigurationOutput, error) { + req, out := c.DescribeOrganizationConfigurationRequest(input) + return out, req.Send() +} + +// DescribeOrganizationConfigurationWithContext is the same as DescribeOrganizationConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOrganizationConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) DescribeOrganizationConfigurationWithContext(ctx aws.Context, input *DescribeOrganizationConfigurationInput, opts ...request.Option) (*DescribeOrganizationConfigurationOutput, error) { + req, out := c.DescribeOrganizationConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribePublishingDestination = "DescribePublishingDestination" // DescribePublishingDestinationRequest generates a "aws/request.Request" representing the @@ -1491,10 +1574,10 @@ func (c *GuardDuty) DescribePublishingDestinationRequest(input *DescribePublishi // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DescribePublishingDestination func (c *GuardDuty) DescribePublishingDestination(input *DescribePublishingDestinationInput) (*DescribePublishingDestinationOutput, error) { @@ -1518,6 +1601,90 @@ func (c *GuardDuty) DescribePublishingDestinationWithContext(ctx aws.Context, in return out, req.Send() } +const opDisableOrganizationAdminAccount = "DisableOrganizationAdminAccount" + +// DisableOrganizationAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the DisableOrganizationAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableOrganizationAdminAccount for more information on using the DisableOrganizationAdminAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableOrganizationAdminAccountRequest method. +// req, resp := client.DisableOrganizationAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisableOrganizationAdminAccount +func (c *GuardDuty) DisableOrganizationAdminAccountRequest(input *DisableOrganizationAdminAccountInput) (req *request.Request, output *DisableOrganizationAdminAccountOutput) { + op := &request.Operation{ + Name: opDisableOrganizationAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/admin/disable", + } + + if input == nil { + input = &DisableOrganizationAdminAccountInput{} + } + + output = &DisableOrganizationAdminAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableOrganizationAdminAccount API operation for Amazon GuardDuty. +// +// Disables an AWS account within the Organization as the GuardDuty delegated +// 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 Amazon GuardDuty's +// API operation DisableOrganizationAdminAccount for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// A bad request exception object. +// +// * InternalServerErrorException +// An internal server error exception object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisableOrganizationAdminAccount +func (c *GuardDuty) DisableOrganizationAdminAccount(input *DisableOrganizationAdminAccountInput) (*DisableOrganizationAdminAccountOutput, error) { + req, out := c.DisableOrganizationAdminAccountRequest(input) + return out, req.Send() +} + +// DisableOrganizationAdminAccountWithContext is the same as DisableOrganizationAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisableOrganizationAdminAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) DisableOrganizationAdminAccountWithContext(ctx aws.Context, input *DisableOrganizationAdminAccountInput, opts ...request.Option) (*DisableOrganizationAdminAccountOutput, error) { + req, out := c.DisableOrganizationAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount" // DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the @@ -1574,10 +1741,10 @@ func (c *GuardDuty) DisassociateFromMasterAccountRequest(input *DisassociateFrom // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateFromMasterAccount func (c *GuardDuty) DisassociateFromMasterAccount(input *DisassociateFromMasterAccountInput) (*DisassociateFromMasterAccountOutput, error) { @@ -1657,10 +1824,10 @@ func (c *GuardDuty) DisassociateMembersRequest(input *DisassociateMembersInput) // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DisassociateMembers func (c *GuardDuty) DisassociateMembers(input *DisassociateMembersInput) (*DisassociateMembersOutput, error) { @@ -1684,6 +1851,90 @@ func (c *GuardDuty) DisassociateMembersWithContext(ctx aws.Context, input *Disas return out, req.Send() } +const opEnableOrganizationAdminAccount = "EnableOrganizationAdminAccount" + +// EnableOrganizationAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the EnableOrganizationAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableOrganizationAdminAccount for more information on using the EnableOrganizationAdminAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableOrganizationAdminAccountRequest method. +// req, resp := client.EnableOrganizationAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/EnableOrganizationAdminAccount +func (c *GuardDuty) EnableOrganizationAdminAccountRequest(input *EnableOrganizationAdminAccountInput) (req *request.Request, output *EnableOrganizationAdminAccountOutput) { + op := &request.Operation{ + Name: opEnableOrganizationAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/admin/enable", + } + + if input == nil { + input = &EnableOrganizationAdminAccountInput{} + } + + output = &EnableOrganizationAdminAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableOrganizationAdminAccount API operation for Amazon GuardDuty. +// +// Enables an AWS account within the organization as the GuardDuty delegated +// 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 Amazon GuardDuty's +// API operation EnableOrganizationAdminAccount for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// A bad request exception object. +// +// * InternalServerErrorException +// An internal server error exception object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/EnableOrganizationAdminAccount +func (c *GuardDuty) EnableOrganizationAdminAccount(input *EnableOrganizationAdminAccountInput) (*EnableOrganizationAdminAccountOutput, error) { + req, out := c.EnableOrganizationAdminAccountRequest(input) + return out, req.Send() +} + +// EnableOrganizationAdminAccountWithContext is the same as EnableOrganizationAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See EnableOrganizationAdminAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) EnableOrganizationAdminAccountWithContext(ctx aws.Context, input *EnableOrganizationAdminAccountInput, opts ...request.Option) (*EnableOrganizationAdminAccountOutput, error) { + req, out := c.EnableOrganizationAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetDetector = "GetDetector" // GetDetectorRequest generates a "aws/request.Request" representing the @@ -1739,10 +1990,10 @@ func (c *GuardDuty) GetDetectorRequest(input *GetDetectorInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetDetector func (c *GuardDuty) GetDetector(input *GetDetectorInput) (*GetDetectorOutput, error) { @@ -1821,10 +2072,10 @@ func (c *GuardDuty) GetFilterRequest(input *GetFilterInput) (req *request.Reques // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter func (c *GuardDuty) GetFilter(input *GetFilterInput) (*GetFilterOutput, error) { @@ -1903,10 +2154,10 @@ func (c *GuardDuty) GetFindingsRequest(input *GetFindingsInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindings func (c *GuardDuty) GetFindings(input *GetFindingsInput) (*GetFindingsOutput, error) { @@ -1974,7 +2225,7 @@ func (c *GuardDuty) GetFindingsStatisticsRequest(input *GetFindingsStatisticsInp // GetFindingsStatistics API operation for Amazon GuardDuty. // -// Lists Amazon GuardDuty findings' statistics for the specified detector ID. +// Lists Amazon GuardDuty findings statistics for the specified detector ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1985,10 +2236,10 @@ func (c *GuardDuty) GetFindingsStatisticsRequest(input *GetFindingsStatisticsInp // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFindingsStatistics func (c *GuardDuty) GetFindingsStatistics(input *GetFindingsStatisticsInput) (*GetFindingsStatisticsOutput, error) { @@ -2067,10 +2318,10 @@ func (c *GuardDuty) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetIPSet func (c *GuardDuty) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) { @@ -2150,10 +2401,10 @@ func (c *GuardDuty) GetInvitationsCountRequest(input *GetInvitationsCountInput) // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetInvitationsCount func (c *GuardDuty) GetInvitationsCount(input *GetInvitationsCountInput) (*GetInvitationsCountOutput, error) { @@ -2233,10 +2484,10 @@ func (c *GuardDuty) GetMasterAccountRequest(input *GetMasterAccountInput) (req * // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMasterAccount func (c *GuardDuty) GetMasterAccount(input *GetMasterAccountInput) (*GetMasterAccountOutput, error) { @@ -2316,10 +2567,10 @@ func (c *GuardDuty) GetMembersRequest(input *GetMembersInput) (req *request.Requ // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetMembers func (c *GuardDuty) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) { @@ -2398,10 +2649,10 @@ func (c *GuardDuty) GetThreatIntelSetRequest(input *GetThreatIntelSetInput) (req // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetThreatIntelSet func (c *GuardDuty) GetThreatIntelSet(input *GetThreatIntelSetInput) (*GetThreatIntelSetOutput, error) { @@ -2470,9 +2721,9 @@ func (c *GuardDuty) InviteMembersRequest(input *InviteMembersInput) (req *reques // InviteMembers API operation for Amazon GuardDuty. // // Invites other AWS accounts (created as members of the current AWS account -// by CreateMembers) to enable GuardDuty and allow the current AWS account to -// view and manage these accounts' GuardDuty findings on their behalf as the -// master account. +// by CreateMembers) to enable GuardDuty, and allow the current AWS account +// to view and manage these accounts' GuardDuty findings on their behalf as +// the master account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2483,10 +2734,10 @@ func (c *GuardDuty) InviteMembersRequest(input *InviteMembersInput) (req *reques // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/InviteMembers func (c *GuardDuty) InviteMembers(input *InviteMembersInput) (*InviteMembersOutput, error) { @@ -2571,10 +2822,10 @@ func (c *GuardDuty) ListDetectorsRequest(input *ListDetectorsInput) (req *reques // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListDetectors func (c *GuardDuty) ListDetectors(input *ListDetectorsInput) (*ListDetectorsOutput, error) { @@ -2711,10 +2962,10 @@ func (c *GuardDuty) ListFiltersRequest(input *ListFiltersInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters func (c *GuardDuty) ListFilters(input *ListFiltersInput) (*ListFiltersOutput, error) { @@ -2851,10 +3102,10 @@ func (c *GuardDuty) ListFindingsRequest(input *ListFindingsInput) (req *request. // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFindings func (c *GuardDuty) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) { @@ -2993,10 +3244,10 @@ func (c *GuardDuty) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Requ // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListIPSets func (c *GuardDuty) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) { @@ -3134,10 +3385,10 @@ func (c *GuardDuty) ListInvitationsRequest(input *ListInvitationsInput) (req *re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListInvitations func (c *GuardDuty) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) { @@ -3263,8 +3514,8 @@ func (c *GuardDuty) ListMembersRequest(input *ListMembersInput) (req *request.Re // ListMembers API operation for Amazon GuardDuty. // -// Lists details about all member accounts for the current GuardDuty master -// account. +// Lists details about associated member accounts for the current GuardDuty +// master account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3275,10 +3526,10 @@ func (c *GuardDuty) ListMembersRequest(input *ListMembersInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListMembers func (c *GuardDuty) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) { @@ -3302,43 +3553,183 @@ func (c *GuardDuty) ListMembersWithContext(ctx aws.Context, input *ListMembersIn return out, req.Send() } -// ListMembersPages iterates over the pages of a ListMembers operation, +// ListMembersPages iterates over the pages of a ListMembers operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListMembers 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 ListMembers operation. +// pageNum := 0 +// err := client.ListMembersPages(params, +// func(page *guardduty.ListMembersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *GuardDuty) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error { + return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListMembersPagesWithContext same as ListMembersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListMembersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListMembersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListOrganizationAdminAccounts = "ListOrganizationAdminAccounts" + +// ListOrganizationAdminAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListOrganizationAdminAccounts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListOrganizationAdminAccounts for more information on using the ListOrganizationAdminAccounts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListOrganizationAdminAccountsRequest method. +// req, resp := client.ListOrganizationAdminAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListOrganizationAdminAccounts +func (c *GuardDuty) ListOrganizationAdminAccountsRequest(input *ListOrganizationAdminAccountsInput) (req *request.Request, output *ListOrganizationAdminAccountsOutput) { + op := &request.Operation{ + Name: opListOrganizationAdminAccounts, + HTTPMethod: "GET", + HTTPPath: "/admin", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListOrganizationAdminAccountsInput{} + } + + output = &ListOrganizationAdminAccountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListOrganizationAdminAccounts API operation for Amazon GuardDuty. +// +// Lists the accounts configured as GuardDuty delegated administrators. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation ListOrganizationAdminAccounts for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// A bad request exception object. +// +// * InternalServerErrorException +// An internal server error exception object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListOrganizationAdminAccounts +func (c *GuardDuty) ListOrganizationAdminAccounts(input *ListOrganizationAdminAccountsInput) (*ListOrganizationAdminAccountsOutput, error) { + req, out := c.ListOrganizationAdminAccountsRequest(input) + return out, req.Send() +} + +// ListOrganizationAdminAccountsWithContext is the same as ListOrganizationAdminAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListOrganizationAdminAccounts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) ListOrganizationAdminAccountsWithContext(ctx aws.Context, input *ListOrganizationAdminAccountsInput, opts ...request.Option) (*ListOrganizationAdminAccountsOutput, error) { + req, out := c.ListOrganizationAdminAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListOrganizationAdminAccountsPages iterates over the pages of a ListOrganizationAdminAccounts operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListMembers method for more information on how to use this operation. +// See ListOrganizationAdminAccounts 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 ListMembers operation. +// // Example iterating over at most 3 pages of a ListOrganizationAdminAccounts operation. // pageNum := 0 -// err := client.ListMembersPages(params, -// func(page *guardduty.ListMembersOutput, lastPage bool) bool { +// err := client.ListOrganizationAdminAccountsPages(params, +// func(page *guardduty.ListOrganizationAdminAccountsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *GuardDuty) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error { - return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *GuardDuty) ListOrganizationAdminAccountsPages(input *ListOrganizationAdminAccountsInput, fn func(*ListOrganizationAdminAccountsOutput, bool) bool) error { + return c.ListOrganizationAdminAccountsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListMembersPagesWithContext same as ListMembersPages except +// ListOrganizationAdminAccountsPagesWithContext same as ListOrganizationAdminAccountsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GuardDuty) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error { +func (c *GuardDuty) ListOrganizationAdminAccountsPagesWithContext(ctx aws.Context, input *ListOrganizationAdminAccountsInput, fn func(*ListOrganizationAdminAccountsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListMembersInput + var inCpy *ListOrganizationAdminAccountsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListMembersRequest(inCpy) + req, _ := c.ListOrganizationAdminAccountsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -3346,7 +3737,7 @@ func (c *GuardDuty) ListMembersPagesWithContext(ctx aws.Context, input *ListMemb } for p.Next() { - if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) { + if !fn(p.Page().(*ListOrganizationAdminAccountsOutput), !p.HasNextPage()) { break } } @@ -3415,10 +3806,10 @@ func (c *GuardDuty) ListPublishingDestinationsRequest(input *ListPublishingDesti // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListPublishingDestinations func (c *GuardDuty) ListPublishingDestinations(input *ListPublishingDestinationsInput) (*ListPublishingDestinationsOutput, error) { @@ -3539,9 +3930,9 @@ func (c *GuardDuty) ListTagsForResourceRequest(input *ListTagsForResourceInput) // ListTagsForResource API operation for Amazon GuardDuty. // // Lists tags for a resource. Tagging is currently supported for detectors, -// finding filters, IP sets, and Threat Intel sets, with a limit of 50 tags +// finding filters, IP sets, and threat intel sets, with a limit of 50 tags // per resource. When invoked, this operation returns all assigned tags for -// a given resource.. +// 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 @@ -3552,10 +3943,10 @@ func (c *GuardDuty) ListTagsForResourceRequest(input *ListTagsForResourceInput) // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListTagsForResource func (c *GuardDuty) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { @@ -3642,10 +4033,10 @@ func (c *GuardDuty) ListThreatIntelSetsRequest(input *ListThreatIntelSetsInput) // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListThreatIntelSets func (c *GuardDuty) ListThreatIntelSets(input *ListThreatIntelSetsInput) (*ListThreatIntelSetsOutput, error) { @@ -3778,10 +4169,10 @@ func (c *GuardDuty) StartMonitoringMembersRequest(input *StartMonitoringMembersI // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMonitoringMembers func (c *GuardDuty) StartMonitoringMembers(input *StartMonitoringMembersInput) (*StartMonitoringMembersOutput, error) { @@ -3849,8 +4240,8 @@ func (c *GuardDuty) StopMonitoringMembersRequest(input *StopMonitoringMembersInp // StopMonitoringMembers API operation for Amazon GuardDuty. // -// Stops GuardDuty monitoring for the specified member accounnts. Use the StartMonitoringMembers -// to restart monitoring for those accounts. +// Stops GuardDuty monitoring for the specified member accounts. Use the StartMonitoringMembers +// operation to restart monitoring for those 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 @@ -3861,10 +4252,10 @@ func (c *GuardDuty) StopMonitoringMembersRequest(input *StopMonitoringMembersInp // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StopMonitoringMembers func (c *GuardDuty) StopMonitoringMembers(input *StopMonitoringMembersInput) (*StopMonitoringMembersOutput, error) { @@ -3944,10 +4335,10 @@ func (c *GuardDuty) TagResourceRequest(input *TagResourceInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/TagResource func (c *GuardDuty) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { @@ -4027,10 +4418,10 @@ func (c *GuardDuty) UnarchiveFindingsRequest(input *UnarchiveFindingsInput) (req // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UnarchiveFindings func (c *GuardDuty) UnarchiveFindings(input *UnarchiveFindingsInput) (*UnarchiveFindingsOutput, error) { @@ -4110,10 +4501,10 @@ func (c *GuardDuty) UntagResourceRequest(input *UntagResourceInput) (req *reques // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UntagResource func (c *GuardDuty) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { @@ -4193,10 +4584,10 @@ func (c *GuardDuty) UpdateDetectorRequest(input *UpdateDetectorInput) (req *requ // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateDetector func (c *GuardDuty) UpdateDetector(input *UpdateDetectorInput) (*UpdateDetectorOutput, error) { @@ -4275,10 +4666,10 @@ func (c *GuardDuty) UpdateFilterRequest(input *UpdateFilterInput) (req *request. // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter func (c *GuardDuty) UpdateFilter(input *UpdateFilterInput) (*UpdateFilterOutput, error) { @@ -4358,10 +4749,10 @@ func (c *GuardDuty) UpdateFindingsFeedbackRequest(input *UpdateFindingsFeedbackI // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFindingsFeedback func (c *GuardDuty) UpdateFindingsFeedback(input *UpdateFindingsFeedbackInput) (*UpdateFindingsFeedbackOutput, error) { @@ -4441,10 +4832,10 @@ func (c *GuardDuty) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Re // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateIPSet func (c *GuardDuty) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) { @@ -4468,6 +4859,89 @@ func (c *GuardDuty) UpdateIPSetWithContext(ctx aws.Context, input *UpdateIPSetIn return out, req.Send() } +const opUpdateOrganizationConfiguration = "UpdateOrganizationConfiguration" + +// UpdateOrganizationConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateOrganizationConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateOrganizationConfiguration for more information on using the UpdateOrganizationConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateOrganizationConfigurationRequest method. +// req, resp := client.UpdateOrganizationConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateOrganizationConfiguration +func (c *GuardDuty) UpdateOrganizationConfigurationRequest(input *UpdateOrganizationConfigurationInput) (req *request.Request, output *UpdateOrganizationConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateOrganizationConfiguration, + HTTPMethod: "POST", + HTTPPath: "/detector/{detectorId}/admin", + } + + if input == nil { + input = &UpdateOrganizationConfigurationInput{} + } + + output = &UpdateOrganizationConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateOrganizationConfiguration API operation for Amazon GuardDuty. +// +// Updates the delegated administrator account with the values provided. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation UpdateOrganizationConfiguration for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// A bad request exception object. +// +// * InternalServerErrorException +// An internal server error exception object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateOrganizationConfiguration +func (c *GuardDuty) UpdateOrganizationConfiguration(input *UpdateOrganizationConfigurationInput) (*UpdateOrganizationConfigurationOutput, error) { + req, out := c.UpdateOrganizationConfigurationRequest(input) + return out, req.Send() +} + +// UpdateOrganizationConfigurationWithContext is the same as UpdateOrganizationConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateOrganizationConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) UpdateOrganizationConfigurationWithContext(ctx aws.Context, input *UpdateOrganizationConfigurationInput, opts ...request.Option) (*UpdateOrganizationConfigurationOutput, error) { + req, out := c.UpdateOrganizationConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdatePublishingDestination = "UpdatePublishingDestination" // UpdatePublishingDestinationRequest generates a "aws/request.Request" representing the @@ -4524,10 +4998,10 @@ func (c *GuardDuty) UpdatePublishingDestinationRequest(input *UpdatePublishingDe // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdatePublishingDestination func (c *GuardDuty) UpdatePublishingDestination(input *UpdatePublishingDestinationInput) (*UpdatePublishingDestinationOutput, error) { @@ -4596,7 +5070,7 @@ func (c *GuardDuty) UpdateThreatIntelSetRequest(input *UpdateThreatIntelSetInput // UpdateThreatIntelSet API operation for Amazon GuardDuty. // -// Updates the ThreatIntelSet specified by ThreatIntelSet ID. +// Updates the ThreatIntelSet specified by the ThreatIntelSet ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4607,10 +5081,10 @@ func (c *GuardDuty) UpdateThreatIntelSetRequest(input *UpdateThreatIntelSetInput // // Returned Error Types: // * BadRequestException -// Bad request exception object. +// A bad request exception object. // // * InternalServerErrorException -// Internal server error exception object. +// An internal server error exception object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateThreatIntelSet func (c *GuardDuty) UpdateThreatIntelSet(input *UpdateThreatIntelSetInput) (*UpdateThreatIntelSetOutput, error) { @@ -4642,7 +5116,7 @@ type AcceptInvitationInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // This value is used to validate the master account to the member account. + // The value that is used to validate the master account to the member account. // // InvitationId is a required field InvitationId *string `locationName:"invitationId" type:"string" required:"true"` @@ -4721,7 +5195,7 @@ func (s AcceptInvitationOutput) GoString() string { type AccessKeyDetails struct { _ struct{} `type:"structure"` - // Access key ID of the user. + // The access key ID of the user. AccessKeyId *string `locationName:"accessKeyId" type:"string"` // The principal ID of the user. @@ -4772,12 +5246,12 @@ func (s *AccessKeyDetails) SetUserType(v string) *AccessKeyDetails { type AccountDetail struct { _ struct{} `type:"structure"` - // Member account ID. + // The member account ID. // // AccountId is a required field AccountId *string `locationName:"accountId" min:"12" type:"string" required:"true"` - // Member account's email address. + // The email address of the member account. // // Email is a required field Email *string `locationName:"email" min:"1" type:"string" required:"true"` @@ -4827,11 +5301,11 @@ func (s *AccountDetail) SetEmail(v string) *AccountDetail { return s } -// Contains information about action. +// Contains information about actions. type Action struct { _ struct{} `type:"structure"` - // GuardDuty Finding activity type. + // The GuardDuty finding activity type. ActionType *string `locationName:"actionType" type:"string"` // Information about the AWS_API_CALL action described in this finding. @@ -4887,6 +5361,40 @@ func (s *Action) SetPortProbeAction(v *PortProbeAction) *Action { return s } +// The account within the organization specified as the GuardDuty delegated +// administrator. +type AdminAccount struct { + _ struct{} `type:"structure"` + + // The AWS account ID for the account. + AdminAccountId *string `locationName:"adminAccountId" type:"string"` + + // Indicates whether the account is enabled as the delegated administrator. + AdminStatus *string `locationName:"adminStatus" min:"1" type:"string" enum:"AdminStatus"` +} + +// String returns the string representation +func (s AdminAccount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdminAccount) GoString() string { + return s.String() +} + +// SetAdminAccountId sets the AdminAccountId field's value. +func (s *AdminAccount) SetAdminAccountId(v string) *AdminAccount { + s.AdminAccountId = &v + return s +} + +// SetAdminStatus sets the AdminStatus field's value. +func (s *AdminAccount) SetAdminStatus(v string) *AdminAccount { + s.AdminStatus = &v + return s +} + type ArchiveFindingsInput struct { _ struct{} `type:"structure"` @@ -4896,7 +5404,7 @@ type ArchiveFindingsInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // IDs of the findings that you want to archive. + // The IDs of the findings that you want to archive. // // FindingIds is a required field FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` @@ -4961,19 +5469,19 @@ func (s ArchiveFindingsOutput) GoString() string { type AwsApiCallAction struct { _ struct{} `type:"structure"` - // AWS API name. + // The AWS API name. Api *string `locationName:"api" type:"string"` - // AWS API caller type. + // The AWS API caller type. CallerType *string `locationName:"callerType" type:"string"` - // Domain information for the AWS API call. + // The domain information for the AWS API call. DomainDetails *DomainDetails `locationName:"domainDetails" type:"structure"` - // Remote IP information of the connection. + // The remote IP information of the connection. RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` - // AWS service name whose API was invoked. + // The AWS service name whose API was invoked. ServiceName *string `locationName:"serviceName" type:"string"` } @@ -5017,10 +5525,10 @@ func (s *AwsApiCallAction) SetServiceName(v string) *AwsApiCallAction { return s } -// Bad request exception object. +// A bad request exception object. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message. Message_ *string `locationName:"message" type:"string"` @@ -5041,17 +5549,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5059,29 +5567,29 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about the city associated with the IP address. type City struct { _ struct{} `type:"structure"` - // City name of the remote IP address. + // The city name of the remote IP address. CityName *string `locationName:"cityName" type:"string"` } @@ -5119,7 +5627,7 @@ type Condition struct { // querying for findings. GreaterThan *int64 `locationName:"greaterThan" type:"long"` - // Represents a greater than equal condition to be applied to a single field + // Represents a greater than or equal condition to be applied to a single field // when querying for findings. GreaterThanOrEqual *int64 `locationName:"greaterThanOrEqual" type:"long"` @@ -5129,7 +5637,7 @@ type Condition struct { // Deprecated: Gt has been deprecated Gt *int64 `locationName:"gt" deprecated:"true" type:"integer"` - // Represents a greater than equal condition to be applied to a single field + // Represents a greater than or equal condition to be applied to a single field // when querying for findings. // // Deprecated: Gte has been deprecated @@ -5139,8 +5647,8 @@ type Condition struct { // for findings. LessThan *int64 `locationName:"lessThan" type:"long"` - // Represents a less than equal condition to be applied to a single field when - // querying for findings. + // Represents a less than or equal condition to be applied to a single field + // when querying for findings. LessThanOrEqual *int64 `locationName:"lessThanOrEqual" type:"long"` // Represents a less than condition to be applied to a single field when querying @@ -5149,8 +5657,8 @@ type Condition struct { // Deprecated: Lt has been deprecated Lt *int64 `locationName:"lt" deprecated:"true" type:"integer"` - // Represents a less than equal condition to be applied to a single field when - // querying for findings. + // Represents a less than or equal condition to be applied to a single field + // when querying for findings. // // Deprecated: Lte has been deprecated Lte *int64 `locationName:"lte" deprecated:"true" type:"integer"` @@ -5161,7 +5669,7 @@ type Condition struct { // Deprecated: Neq has been deprecated Neq []*string `locationName:"neq" deprecated:"true" type:"list"` - // Represents an not equal condition to be applied to a single field when querying + // Represents a not equal condition to be applied to a single field when querying // for findings. NotEquals []*string `locationName:"notEquals" type:"list"` } @@ -5248,15 +5756,14 @@ func (s *Condition) SetNotEquals(v []*string) *Condition { return s } -// Contains information about the country in which the remote IP address is -// located. +// Contains information about the country where the remote IP address is located. type Country struct { _ struct{} `type:"structure"` - // Country code of the remote IP address. + // The country code of the remote IP address. CountryCode *string `locationName:"countryCode" type:"string"` - // Country name of the remote IP address. + // The country name of the remote IP address. CountryName *string `locationName:"countryName" type:"string"` } @@ -5288,12 +5795,12 @@ type CreateDetectorInput struct { // The idempotency token for the create request. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - // A boolean value that specifies whether the detector is to be enabled. + // A Boolean value that specifies whether the detector is to be enabled. // // Enable is a required field Enable *bool `locationName:"enable" type:"boolean" required:"true"` - // A enum value that specifies how frequently customer got Finding updates published. + // An enum value that specifies how frequently updated findings are exported. FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` // The tags to be added to a new detector resource. @@ -5386,14 +5893,119 @@ type CreateFilterInput struct { // The description of the filter. Description *string `locationName:"description" type:"string"` - // The unique ID of the detector of the GuardDuty account for which you want - // to create a filter. + // The unique ID of the detector of the GuardDuty account that you want to create + // a filter for. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` // Represents the criteria to be used in the filter for querying findings. // + // You can only use the following attributes to query findings: + // + // * accountId + // + // * region + // + // * confidence + // + // * id + // + // * resource.accessKeyDetails.accessKeyId + // + // * resource.accessKeyDetails.principalId + // + // * resource.accessKeyDetails.userName + // + // * resource.accessKeyDetails.userType + // + // * resource.instanceDetails.iamInstanceProfile.id + // + // * resource.instanceDetails.imageId + // + // * resource.instanceDetails.instanceId + // + // * resource.instanceDetails.outpostArn + // + // * resource.instanceDetails.networkInterfaces.ipv6Addresses + // + // * resource.instanceDetails.networkInterfaces.privateIpAddresses.privateIpAddress + // + // * resource.instanceDetails.networkInterfaces.publicDnsName + // + // * resource.instanceDetails.networkInterfaces.publicIp + // + // * resource.instanceDetails.networkInterfaces.securityGroups.groupId + // + // * resource.instanceDetails.networkInterfaces.securityGroups.groupName + // + // * resource.instanceDetails.networkInterfaces.subnetId + // + // * resource.instanceDetails.networkInterfaces.vpcId + // + // * resource.instanceDetails.tags.key + // + // * resource.instanceDetails.tags.value + // + // * resource.resourceType + // + // * service.action.actionType + // + // * service.action.awsApiCallAction.api + // + // * service.action.awsApiCallAction.callerType + // + // * service.action.awsApiCallAction.remoteIpDetails.city.cityName + // + // * service.action.awsApiCallAction.remoteIpDetails.country.countryName + // + // * service.action.awsApiCallAction.remoteIpDetails.ipAddressV4 + // + // * service.action.awsApiCallAction.remoteIpDetails.organization.asn + // + // * service.action.awsApiCallAction.remoteIpDetails.organization.asnOrg + // + // * service.action.awsApiCallAction.serviceName + // + // * service.action.dnsRequestAction.domain + // + // * service.action.networkConnectionAction.blocked + // + // * service.action.networkConnectionAction.connectionDirection + // + // * service.action.networkConnectionAction.localPortDetails.port + // + // * service.action.networkConnectionAction.protocol + // + // * service.action.networkConnectionAction.localIpDetails.ipAddressV4 + // + // * service.action.networkConnectionAction.remoteIpDetails.city.cityName + // + // * service.action.networkConnectionAction.remoteIpDetails.country.countryName + // + // * service.action.networkConnectionAction.remoteIpDetails.ipAddressV4 + // + // * service.action.networkConnectionAction.remoteIpDetails.organization.asn + // + // * service.action.networkConnectionAction.remoteIpDetails.organization.asnOrg + // + // * service.action.networkConnectionAction.remotePortDetails.port + // + // * service.additionalInfo.threatListName + // + // * service.archived When this attribute is set to TRUE, only archived findings + // are listed. When it's set to FALSE, only unarchived findings are listed. + // When this attribute is not set, all existing findings are listed. + // + // * service.resourceRole + // + // * severity + // + // * type + // + // * updatedAt Type: ISO 8601 string format: YYYY-MM-DDTHH:MM:SS.SSSZ or + // YYYY-MM-DDTHH:MM:SSZ depending on whether the value contains milliseconds. + // // FindingCriteria is a required field FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure" required:"true"` @@ -5530,7 +6142,7 @@ func (s *CreateFilterOutput) SetName(v string) *CreateFilterOutput { type CreateIPSetInput struct { _ struct{} `type:"structure"` - // A boolean value that indicates whether GuardDuty is to start using the uploaded + // A Boolean value that indicates whether GuardDuty is to start using the uploaded // IPSet. // // Activate is a required field @@ -5539,8 +6151,8 @@ type CreateIPSetInput struct { // The idempotency token for the create request. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - // The unique ID of the detector of the GuardDuty account for which you want - // to create an IPSet. + // The unique ID of the detector of the GuardDuty account that you want to create + // an IPSet for. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -5550,14 +6162,15 @@ type CreateIPSetInput struct { // Format is a required field Format *string `locationName:"format" min:"1" type:"string" required:"true" enum:"IpSetFormat"` - // The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) + // The URI of the file that contains the IPSet. For example: . // // Location is a required field Location *string `locationName:"location" min:"1" type:"string" required:"true"` - // The user friendly name to identify the IPSet. This name is displayed in all - // findings that are triggered by activity that involves IP addresses included - // in this IPSet. + // The user-friendly name to identify the IPSet. + // + // Allowed characters are alphanumerics, spaces, hyphens (-), and underscores + // (_). // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` @@ -5692,8 +6305,8 @@ type CreateMembersInput struct { // AccountDetails is a required field AccountDetails []*AccountDetail `locationName:"accountDetails" min:"1" type:"list" required:"true"` - // The unique ID of the detector of the GuardDuty account with which you want - // to associate member accounts. + // The unique ID of the detector of the GuardDuty account that you want to associate + // member accounts with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -5756,8 +6369,8 @@ func (s *CreateMembersInput) SetDetectorId(v string) *CreateMembersInput { type CreateMembersOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that include the accountIds of the unprocessed accounts + // and a result string that explains why each was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -5785,14 +6398,14 @@ type CreatePublishingDestinationInput struct { // The idempotency token for the request. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - // Properties of the publishing destination, including the ARNs for the destination - // and the KMS key used for encryption. + // The properties of the publishing destination, including the ARNs for the + // destination and the KMS key used for encryption. // // DestinationProperties is a required field DestinationProperties *DestinationProperties `locationName:"destinationProperties" type:"structure" required:"true"` - // The type of resource for the publishing destination. Currently only S3 is - // supported. + // The type of resource for the publishing destination. Currently only Amazon + // S3 buckets are supported. // // DestinationType is a required field DestinationType *string `locationName:"destinationType" min:"1" type:"string" required:"true" enum:"DestinationType"` @@ -5865,7 +6478,7 @@ func (s *CreatePublishingDestinationInput) SetDetectorId(v string) *CreatePublis type CreatePublishingDestinationOutput struct { _ struct{} `type:"structure"` - // The ID of the publishing destination created. + // The ID of the publishing destination that is created. // // DestinationId is a required field DestinationId *string `locationName:"destinationId" type:"string" required:"true"` @@ -5895,7 +6508,7 @@ type CreateSampleFindingsInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // Types of sample findings to generate. + // The types of sample findings to generate. FindingTypes []*string `locationName:"findingTypes" type:"list"` } @@ -5954,7 +6567,7 @@ func (s CreateSampleFindingsOutput) GoString() string { type CreateThreatIntelSetInput struct { _ struct{} `type:"structure"` - // A boolean value that indicates whether GuardDuty is to start using the uploaded + // A Boolean value that indicates whether GuardDuty is to start using the uploaded // ThreatIntelSet. // // Activate is a required field @@ -5963,8 +6576,8 @@ type CreateThreatIntelSetInput struct { // The idempotency token for the create request. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` - // The unique ID of the detector of the GuardDuty account for which you want - // to create a threatIntelSet. + // The unique ID of the detector of the GuardDuty account that you want to create + // a threatIntelSet for. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -5974,18 +6587,18 @@ type CreateThreatIntelSetInput struct { // Format is a required field Format *string `locationName:"format" min:"1" type:"string" required:"true" enum:"ThreatIntelSetFormat"` - // The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). + // The URI of the file that contains the ThreatIntelSet. For example: . // // Location is a required field Location *string `locationName:"location" min:"1" type:"string" required:"true"` - // A user-friendly ThreatIntelSet name that is displayed in all finding generated + // A user-friendly ThreatIntelSet name displayed in all findings that are generated // by activity that involves IP addresses included in this ThreatIntelSet. // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` - // The tags to be added to a new Threat List resource. + // The tags to be added to a new threat list resource. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } @@ -6151,8 +6764,8 @@ func (s *DeclineInvitationsInput) SetAccountIds(v []*string) *DeclineInvitations type DeclineInvitationsOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain the unprocessed account and a result string + // that explains why it was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -6232,12 +6845,12 @@ func (s DeleteDetectorOutput) GoString() string { type DeleteFilterInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the filter is associated with. + // The unique ID of the detector that the filter is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // The name of the filter you want to delete. + // The name of the filter that you want to delete. // // FilterName is a required field FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` @@ -6418,8 +7031,8 @@ func (s *DeleteInvitationsInput) SetAccountIds(v []*string) *DeleteInvitationsIn type DeleteInvitationsOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain the unprocessed account and a result string + // that explains why it was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -6579,64 +7192,126 @@ func (s *DeletePublishingDestinationInput) SetDestinationId(v string) *DeletePub } // SetDetectorId sets the DetectorId field's value. -func (s *DeletePublishingDestinationInput) SetDetectorId(v string) *DeletePublishingDestinationInput { +func (s *DeletePublishingDestinationInput) SetDetectorId(v string) *DeletePublishingDestinationInput { + s.DetectorId = &v + return s +} + +type DeletePublishingDestinationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePublishingDestinationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePublishingDestinationOutput) GoString() string { + return s.String() +} + +type DeleteThreatIntelSetInput struct { + _ struct{} `type:"structure"` + + // The unique ID of the detector that the threatIntelSet is associated with. + // + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` + + // The unique ID of the threatIntelSet that you want to delete. + // + // ThreatIntelSetId is a required field + ThreatIntelSetId *string `location:"uri" locationName:"threatIntelSetId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteThreatIntelSetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteThreatIntelSetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteThreatIntelSetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteThreatIntelSetInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.ThreatIntelSetId == nil { + invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) + } + if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *DeleteThreatIntelSetInput) SetDetectorId(v string) *DeleteThreatIntelSetInput { s.DetectorId = &v return s } -type DeletePublishingDestinationOutput struct { +// SetThreatIntelSetId sets the ThreatIntelSetId field's value. +func (s *DeleteThreatIntelSetInput) SetThreatIntelSetId(v string) *DeleteThreatIntelSetInput { + s.ThreatIntelSetId = &v + return s +} + +type DeleteThreatIntelSetOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeletePublishingDestinationOutput) String() string { +func (s DeleteThreatIntelSetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeletePublishingDestinationOutput) GoString() string { +func (s DeleteThreatIntelSetOutput) GoString() string { return s.String() } -type DeleteThreatIntelSetInput struct { +type DescribeOrganizationConfigurationInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the threatIntelSet is associated with. + // The ID of the detector to retrieve information about the delegated administrator + // from. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - - // The unique ID of the threatIntelSet you want to delete. - // - // ThreatIntelSetId is a required field - ThreatIntelSetId *string `location:"uri" locationName:"threatIntelSetId" type:"string" required:"true"` } // String returns the string representation -func (s DeleteThreatIntelSetInput) String() string { +func (s DescribeOrganizationConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteThreatIntelSetInput) GoString() string { +func (s DescribeOrganizationConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteThreatIntelSetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteThreatIntelSetInput"} +func (s *DescribeOrganizationConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationConfigurationInput"} if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } if s.DetectorId != nil && len(*s.DetectorId) < 1 { invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) } - if s.ThreatIntelSetId == nil { - invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) - } - if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -6645,31 +7320,49 @@ func (s *DeleteThreatIntelSetInput) Validate() error { } // SetDetectorId sets the DetectorId field's value. -func (s *DeleteThreatIntelSetInput) SetDetectorId(v string) *DeleteThreatIntelSetInput { +func (s *DescribeOrganizationConfigurationInput) SetDetectorId(v string) *DescribeOrganizationConfigurationInput { s.DetectorId = &v return s } -// SetThreatIntelSetId sets the ThreatIntelSetId field's value. -func (s *DeleteThreatIntelSetInput) SetThreatIntelSetId(v string) *DeleteThreatIntelSetInput { - s.ThreatIntelSetId = &v - return s -} - -type DeleteThreatIntelSetOutput struct { +type DescribeOrganizationConfigurationOutput struct { _ struct{} `type:"structure"` + + // Indicates whether GuardDuty is automatically enabled for accounts added to + // the organization. + // + // AutoEnable is a required field + AutoEnable *bool `locationName:"autoEnable" type:"boolean" required:"true"` + + // Indicates whether the maximum number of allowed member accounts are already + // associated with the delegated administrator master account. + // + // MemberAccountLimitReached is a required field + MemberAccountLimitReached *bool `locationName:"memberAccountLimitReached" type:"boolean" required:"true"` } // String returns the string representation -func (s DeleteThreatIntelSetOutput) String() string { +func (s DescribeOrganizationConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteThreatIntelSetOutput) GoString() string { +func (s DescribeOrganizationConfigurationOutput) GoString() string { return s.String() } +// SetAutoEnable sets the AutoEnable field's value. +func (s *DescribeOrganizationConfigurationOutput) SetAutoEnable(v bool) *DescribeOrganizationConfigurationOutput { + s.AutoEnable = &v + return s +} + +// SetMemberAccountLimitReached sets the MemberAccountLimitReached field's value. +func (s *DescribeOrganizationConfigurationOutput) SetMemberAccountLimitReached(v bool) *DescribeOrganizationConfigurationOutput { + s.MemberAccountLimitReached = &v + return s +} + type DescribePublishingDestinationInput struct { _ struct{} `type:"structure"` @@ -6743,7 +7436,8 @@ type DescribePublishingDestinationOutput struct { // DestinationProperties is a required field DestinationProperties *DestinationProperties `locationName:"destinationProperties" type:"structure" required:"true"` - // The type of the publishing destination. Currently, only S3 is supported. + // The type of publishing destination. Currently, only Amazon S3 buckets are + // supported. // // DestinationType is a required field DestinationType *string `locationName:"destinationType" min:"1" type:"string" required:"true" enum:"DestinationType"` @@ -6800,8 +7494,8 @@ func (s *DescribePublishingDestinationOutput) SetStatus(v string) *DescribePubli return s } -// Contains information about a publishing destination, including the ID, type, -// and status. +// Contains information about the publishing destination, including the ID, +// type, and status. type Destination struct { _ struct{} `type:"structure"` @@ -6811,7 +7505,7 @@ type Destination struct { DestinationId *string `locationName:"destinationId" type:"string" required:"true"` // The type of resource used for the publishing destination. Currently, only - // S3 is supported. + // Amazon S3 buckets are supported. // // DestinationType is a required field DestinationType *string `locationName:"destinationType" min:"1" type:"string" required:"true" enum:"DestinationType"` @@ -6850,8 +7544,8 @@ func (s *Destination) SetStatus(v string) *Destination { return s } -// Contains the ARN of the resource to publish to, such as an S3 bucket, and -// the ARN of the KMS key to use to encrypt published findings. +// Contains the Amazon Resource Name (ARN) of the resource to publish to, such +// as an S3 bucket, and the ARN of the KMS key to use to encrypt published findings. type DestinationProperties struct { _ struct{} `type:"structure"` @@ -6884,6 +7578,59 @@ func (s *DestinationProperties) SetKmsKeyArn(v string) *DestinationProperties { return s } +type DisableOrganizationAdminAccountInput struct { + _ struct{} `type:"structure"` + + // The AWS Account ID for the organizations account to be disabled as a GuardDuty + // delegated administrator. + // + // AdminAccountId is a required field + AdminAccountId *string `locationName:"adminAccountId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableOrganizationAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableOrganizationAdminAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableOrganizationAdminAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableOrganizationAdminAccountInput"} + if s.AdminAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AdminAccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminAccountId sets the AdminAccountId field's value. +func (s *DisableOrganizationAdminAccountInput) SetAdminAccountId(v string) *DisableOrganizationAdminAccountInput { + s.AdminAccountId = &v + return s +} + +type DisableOrganizationAdminAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableOrganizationAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableOrganizationAdminAccountOutput) GoString() string { + return s.String() +} + type DisassociateFromMasterAccountInput struct { _ struct{} `type:"structure"` @@ -6943,13 +7690,13 @@ type DisassociateMembersInput struct { _ struct{} `type:"structure"` // A list of account IDs of the GuardDuty member accounts that you want to disassociate - // from master. + // from the master account. // // AccountIds is a required field AccountIds []*string `locationName:"accountIds" min:"1" type:"list" required:"true"` // The unique ID of the detector of the GuardDuty account whose members you - // want to disassociate from master. + // want to disassociate from the master account. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -7002,8 +7749,8 @@ func (s *DisassociateMembersInput) SetDetectorId(v string) *DisassociateMembersI type DisassociateMembersOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain the unprocessed account and a result string + // that explains why it was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -7029,7 +7776,7 @@ func (s *DisassociateMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccou type DnsRequestAction struct { _ struct{} `type:"structure"` - // Domain information for the API request. + // The domain information for the API request. Domain *string `locationName:"domain" type:"string"` } @@ -7053,7 +7800,7 @@ func (s *DnsRequestAction) SetDomain(v string) *DnsRequestAction { type DomainDetails struct { _ struct{} `type:"structure"` - // Domain information for the AWS API call. + // The domain information for the AWS API call. Domain *string `locationName:"domain" type:"string"` } @@ -7073,6 +7820,59 @@ func (s *DomainDetails) SetDomain(v string) *DomainDetails { return s } +type EnableOrganizationAdminAccountInput struct { + _ struct{} `type:"structure"` + + // The AWS Account ID for the organization account to be enabled as a GuardDuty + // delegated administrator. + // + // AdminAccountId is a required field + AdminAccountId *string `locationName:"adminAccountId" type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableOrganizationAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableOrganizationAdminAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableOrganizationAdminAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableOrganizationAdminAccountInput"} + if s.AdminAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AdminAccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminAccountId sets the AdminAccountId field's value. +func (s *EnableOrganizationAdminAccountInput) SetAdminAccountId(v string) *EnableOrganizationAdminAccountInput { + s.AdminAccountId = &v + return s +} + +type EnableOrganizationAdminAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableOrganizationAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableOrganizationAdminAccountOutput) GoString() string { + return s.String() +} + // Contains information about the reason that the finding was generated. type Evidence struct { _ struct{} `type:"structure"` @@ -7107,7 +7907,7 @@ type Finding struct { // AccountId is a required field AccountId *string `locationName:"accountId" type:"string" required:"true"` - // The ARN for the finding. + // The ARN of the finding. // // Arn is a required field Arn *string `locationName:"arn" type:"string" required:"true"` @@ -7115,7 +7915,7 @@ type Finding struct { // The confidence score for the finding. Confidence *float64 `locationName:"confidence" type:"double"` - // The time and date at which the finding was created. + // The time and date when the finding was created. // // CreatedAt is a required field CreatedAt *string `locationName:"createdAt" type:"string" required:"true"` @@ -7131,7 +7931,7 @@ type Finding struct { // The partition associated with the finding. Partition *string `locationName:"partition" type:"string"` - // The Region in which the finding was generated. + // The Region where the finding was generated. // // Region is a required field Region *string `locationName:"region" type:"string" required:"true"` @@ -7155,15 +7955,15 @@ type Finding struct { // Severity is a required field Severity *float64 `locationName:"severity" type:"double" required:"true"` - // The title for the finding. + // The title of the finding. Title *string `locationName:"title" type:"string"` - // The type of the finding. + // The type of finding. // // Type is a required field Type *string `locationName:"type" min:"1" type:"string" required:"true"` - // The time and date at which the finding was laste updated. + // The time and date when the finding was last updated. // // UpdatedAt is a required field UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` @@ -7298,7 +8098,7 @@ func (s *FindingCriteria) SetCriterion(v map[string]*Condition) *FindingCriteria type FindingStatistics struct { _ struct{} `type:"structure"` - // Represents a map of severity to count statistic for a set of findings + // Represents a map of severity to count statistics for a set of findings. CountBySeverity map[string]*int64 `locationName:"countBySeverity" type:"map"` } @@ -7322,10 +8122,10 @@ func (s *FindingStatistics) SetCountBySeverity(v map[string]*int64) *FindingStat type GeoLocation struct { _ struct{} `type:"structure"` - // Latitude information of remote IP address. + // The latitude information of the remote IP address. Lat *float64 `locationName:"lat" type:"double"` - // Longitude information of remote IP address. + // The longitude information of the remote IP address. Lon *float64 `locationName:"lon" type:"double"` } @@ -7395,10 +8195,10 @@ func (s *GetDetectorInput) SetDetectorId(v string) *GetDetectorInput { type GetDetectorOutput struct { _ struct{} `type:"structure"` - // Detector creation timestamp. + // The timestamp of when the detector was created. CreatedAt *string `locationName:"createdAt" type:"string"` - // Finding publishing frequency. + // The publishing frequency of the finding. FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` // The GuardDuty service role. @@ -7414,7 +8214,7 @@ type GetDetectorOutput struct { // The tags of the detector resource. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` - // Detector last update timestamp. + // The last-updated timestamp for the detector. UpdatedAt *string `locationName:"updatedAt" type:"string"` } @@ -7467,7 +8267,7 @@ func (s *GetDetectorOutput) SetUpdatedAt(v string) *GetDetectorOutput { type GetFilterInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the filter is associated with. + // The unique ID of the detector that the filter is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -7607,7 +8407,7 @@ type GetFindingsInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // IDs of the findings that you want to retrieve. + // The IDs of the findings that you want to retrieve. // // FindingIds is a required field FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` @@ -7697,10 +8497,10 @@ type GetFindingsStatisticsInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // Represents the criteria used for querying findings. + // Represents the criteria that is used for querying findings. FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` - // Types of finding statistics to retrieve. + // The types of finding statistics to retrieve. // // FindingStatisticTypes is a required field FindingStatisticTypes []*string `locationName:"findingStatisticTypes" type:"list" required:"true"` @@ -7756,7 +8556,7 @@ func (s *GetFindingsStatisticsInput) SetFindingStatisticTypes(v []*string) *GetF type GetFindingsStatisticsOutput struct { _ struct{} `type:"structure"` - // Finding statistics object. + // The finding statistics object. // // FindingStatistics is a required field FindingStatistics *FindingStatistics `locationName:"findingStatistics" type:"structure" required:"true"` @@ -7781,7 +8581,7 @@ func (s *GetFindingsStatisticsOutput) SetFindingStatistics(v *FindingStatistics) type GetIPSetInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the ipSet is associated with. + // The unique ID of the detector that the IPSet is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -7844,22 +8644,22 @@ type GetIPSetOutput struct { // Format is a required field Format *string `locationName:"format" min:"1" type:"string" required:"true" enum:"IpSetFormat"` - // The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) + // The URI of the file that contains the IPSet. For example: . // // Location is a required field Location *string `locationName:"location" min:"1" type:"string" required:"true"` - // The user friendly name for the IPSet. + // The user-friendly name for the IPSet. // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` - // The status of ipSet file uploaded. + // The status of IPSet file that was uploaded. // // Status is a required field Status *string `locationName:"status" min:"1" type:"string" required:"true" enum:"IpSetStatus"` - // The tags of the IP set resource. + // The tags of the IPSet resource. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } @@ -7984,7 +8784,7 @@ func (s *GetMasterAccountInput) SetDetectorId(v string) *GetMasterAccountInput { type GetMasterAccountOutput struct { _ struct{} `type:"structure"` - // Master account details. + // The master account details. // // Master is a required field Master *Master `locationName:"master" type:"structure" required:"true"` @@ -8073,8 +8873,8 @@ type GetMembersOutput struct { // Members is a required field Members []*Member `locationName:"members" type:"list" required:"true"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain the unprocessed account and a result string + // that explains why it was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -8105,12 +8905,12 @@ func (s *GetMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *GetM type GetThreatIntelSetInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the threatIntelSet is associated with. + // The unique ID of the detector that the threatIntelSet is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // The unique ID of the threatIntelSet you want to get. + // The unique ID of the threatIntelSet that you want to get. // // ThreatIntelSetId is a required field ThreatIntelSetId *string `location:"uri" locationName:"threatIntelSetId" type:"string" required:"true"` @@ -8168,12 +8968,12 @@ type GetThreatIntelSetOutput struct { // Format is a required field Format *string `locationName:"format" min:"1" type:"string" required:"true" enum:"ThreatIntelSetFormat"` - // The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). + // The URI of the file that contains the ThreatIntelSet. For example: . // // Location is a required field Location *string `locationName:"location" min:"1" type:"string" required:"true"` - // A user-friendly ThreatIntelSet name that is displayed in all finding generated + // A user-friendly ThreatIntelSet name displayed in all findings that are generated // by activity that involves IP addresses included in this ThreatIntelSet. // // Name is a required field @@ -8184,7 +8984,7 @@ type GetThreatIntelSetOutput struct { // Status is a required field Status *string `locationName:"status" min:"1" type:"string" required:"true" enum:"ThreatIntelSetStatus"` - // The tags of the Threat List resource. + // The tags of the threat list resource. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } @@ -8232,10 +9032,10 @@ func (s *GetThreatIntelSetOutput) SetTags(v map[string]*string) *GetThreatIntelS type IamInstanceProfile struct { _ struct{} `type:"structure"` - // AWS EC2 instance profile ARN. + // The profile ARN of the EC2 instance. Arn *string `locationName:"arn" type:"string"` - // AWS EC2 instance profile ID. + // The profile ID of the EC2 instance. Id *string `locationName:"id" type:"string"` } @@ -8265,7 +9065,7 @@ func (s *IamInstanceProfile) SetId(v string) *IamInstanceProfile { type InstanceDetails struct { _ struct{} `type:"structure"` - // The availability zone of the EC2 instance. + // The Availability Zone of the EC2 instance. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The profile information of the EC2 instance. @@ -8289,7 +9089,7 @@ type InstanceDetails struct { // The launch time of the EC2 instance. LaunchTime *string `locationName:"launchTime" type:"string"` - // The network interface information of the EC2 instance. + // The elastic network interface information of the EC2 instance. NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` // The Amazon Resource Name (ARN) of the AWS Outpost. Only applicable to AWS @@ -8394,10 +9194,10 @@ func (s *InstanceDetails) SetTags(v []*Tag) *InstanceDetails { return s } -// Internal server error exception object. +// An internal server error exception object. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The error message. Message_ *string `locationName:"message" type:"string"` @@ -8418,17 +9218,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8436,36 +9236,36 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about the invitation to become a member account. type Invitation struct { _ struct{} `type:"structure"` - // The ID of the account from which the invitations was sent. + // The ID of the account that the invitation was sent from. AccountId *string `locationName:"accountId" min:"12" type:"string"` // The ID of the invitation. This value is used to validate the inviter account // to the member account. InvitationId *string `locationName:"invitationId" type:"string"` - // Timestamp at which the invitation was sent. + // The timestamp when the invitation was sent. InvitedAt *string `locationName:"invitedAt" type:"string"` // The status of the relationship between the inviter and invitee accounts. @@ -8515,13 +9315,13 @@ type InviteMembersInput struct { // AccountIds is a required field AccountIds []*string `locationName:"accountIds" min:"1" type:"list" required:"true"` - // The unique ID of the detector of the GuardDuty account with which you want - // to invite members. + // The unique ID of the detector of the GuardDuty account that you want to invite + // members with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // A boolean value that specifies whether you want to disable email notification + // A Boolean value that specifies whether you want to disable email notification // to the accounts that you’re inviting to GuardDuty as members. DisableEmailNotification *bool `locationName:"disableEmailNotification" type:"boolean"` @@ -8589,8 +9389,8 @@ func (s *InviteMembersInput) SetMessage(v string) *InviteMembersInput { type InviteMembersOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain the unprocessed account and a result string + // that explains why it was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -8615,14 +9415,14 @@ func (s *InviteMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *I type ListDetectorsInput struct { _ struct{} `type:"structure"` - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 50. The maximum value is 50. + // You can use this parameter to indicate the maximum number of items that you + // want in the response. The default value is 50. The maximum value is 50. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // You can use this parameter when paginating results. Set the value of this // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. + // to the action, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` } @@ -8664,13 +9464,13 @@ func (s *ListDetectorsInput) SetNextToken(v string) *ListDetectorsInput { type ListDetectorsOutput struct { _ struct{} `type:"structure"` - // A list of detector Ids. + // A list of detector IDs. // // DetectorIds is a required field DetectorIds []*string `locationName:"detectorIds" type:"list" required:"true"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` } @@ -8699,19 +9499,19 @@ func (s *ListDetectorsOutput) SetNextToken(v string) *ListDetectorsOutput { type ListFiltersInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the filter is associated with. + // The unique ID of the detector that the filter is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 50. The maximum value is 50. + // You can use this parameter to indicate the maximum number of items that you + // want in the response. The default value is 50. The maximum value is 50. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // You can use this parameter when paginating results. Set the value of this // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. + // to the action, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` } @@ -8765,13 +9565,13 @@ func (s *ListFiltersInput) SetNextToken(v string) *ListFiltersInput { type ListFiltersOutput struct { _ struct{} `type:"structure"` - // A list of filter names + // A list of filter names. // // FilterNames is a required field FilterNames []*string `locationName:"filterNames" type:"list" required:"true"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` } @@ -8920,8 +9720,8 @@ type ListFindingsInput struct { // You can use this parameter when paginating results. Set the value of this // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. + // to the action, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. NextToken *string `locationName:"nextToken" type:"string"` // Represents the criteria used for sorting findings. @@ -8990,13 +9790,13 @@ func (s *ListFindingsInput) SetSortCriteria(v *SortCriteria) *ListFindingsInput type ListFindingsOutput struct { _ struct{} `type:"structure"` - // The IDs of the findings you are listing. + // The IDs of the findings that you're listing. // // FindingIds is a required field FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` } @@ -9025,7 +9825,7 @@ func (s *ListFindingsOutput) SetNextToken(v string) *ListFindingsOutput { type ListIPSetsInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the ipSet is associated with. + // The unique ID of the detector that the IPSet is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -9036,8 +9836,8 @@ type ListIPSetsInput struct { // You can use this parameter when paginating results. Set the value of this // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. + // to the action, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` } @@ -9096,8 +9896,8 @@ type ListIPSetsOutput struct { // IpSetIds is a required field IpSetIds []*string `locationName:"ipSetIds" type:"list" required:"true"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` } @@ -9126,14 +9926,14 @@ func (s *ListIPSetsOutput) SetNextToken(v string) *ListIPSetsOutput { type ListInvitationsInput struct { _ struct{} `type:"structure"` - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 50. The maximum value is 50. + // You can use this parameter to indicate the maximum number of items that you + // want in the response. The default value is 50. The maximum value is 50. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // You can use this parameter when paginating results. Set the value of this // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. + // to the action, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` } @@ -9178,8 +9978,8 @@ type ListInvitationsOutput struct { // A list of invitation descriptions. Invitations []*Invitation `locationName:"invitations" type:"list"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` } @@ -9219,12 +10019,14 @@ type ListMembersInput struct { // You can use this parameter when paginating results. Set the value of this // parameter to null on your first call to the list action. For subsequent calls - // to the action fill nextToken in the request with the value of NextToken from - // the previous response to continue listing data. + // to the action, fill nextToken in the request with the value of NextToken + // from the previous response to continue listing data. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - // Specifies whether to only return associated members or to return all members - // (including members which haven't been invited yet or have been disassociated). + // Specifies what member accounts the response includes based on their relationship + // status with the master account. The default value is "true". If set to "false" + // the response includes all existing member accounts (including members who + // haven't been invited yet or have been disassociated). OnlyAssociated *string `location:"querystring" locationName:"onlyAssociated" type:"string"` } @@ -9287,8 +10089,8 @@ type ListMembersOutput struct { // A list of members. Members []*Member `locationName:"members" type:"list"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` } @@ -9314,6 +10116,88 @@ func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput { return s } +type ListOrganizationAdminAccountsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return in the response. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // A token to use for paginating results that are returned in the response. + // Set the value of this parameter to null for the first request to a list action. + // For subsequent calls, use the NextToken value returned from the previous + // request to continue listing results after the first page. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListOrganizationAdminAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOrganizationAdminAccountsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListOrganizationAdminAccountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOrganizationAdminAccountsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListOrganizationAdminAccountsInput) SetMaxResults(v int64) *ListOrganizationAdminAccountsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOrganizationAdminAccountsInput) SetNextToken(v string) *ListOrganizationAdminAccountsInput { + s.NextToken = &v + return s +} + +type ListOrganizationAdminAccountsOutput struct { + _ struct{} `type:"structure"` + + // An AdminAccounts object that includes a list of accounts configured as GuardDuty + // delegated administrators. + AdminAccounts []*AdminAccount `locationName:"adminAccounts" type:"list"` + + // The pagination parameter to be used on the next list operation to retrieve + // more items. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListOrganizationAdminAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOrganizationAdminAccountsOutput) GoString() string { + return s.String() +} + +// SetAdminAccounts sets the AdminAccounts field's value. +func (s *ListOrganizationAdminAccountsOutput) SetAdminAccounts(v []*AdminAccount) *ListOrganizationAdminAccountsOutput { + s.AdminAccounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOrganizationAdminAccountsOutput) SetNextToken(v string) *ListOrganizationAdminAccountsOutput { + s.NextToken = &v + return s +} + type ListPublishingDestinationsInput struct { _ struct{} `type:"structure"` @@ -9325,10 +10209,10 @@ type ListPublishingDestinationsInput struct { // The maximum number of results to return in the response. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // A token to use for paginating results returned in the repsonse. Set the value - // of this parameter to null for the first request to a list action. For subsequent - // calls, use the NextToken value returned from the previous request to continue - // listing results after the first page. + // A token to use for paginating results that are returned in the response. + // Set the value of this parameter to null for the first request to a list action. + // For subsequent calls, use the NextToken value returned from the previous + // request to continue listing results after the first page. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` } @@ -9382,16 +10266,16 @@ func (s *ListPublishingDestinationsInput) SetNextToken(v string) *ListPublishing type ListPublishingDestinationsOutput struct { _ struct{} `type:"structure"` - // A Destinations obect that includes information about each publishing destination + // A Destinations object that includes information about each publishing destination // returned. // // Destinations is a required field Destinations []*Destination `locationName:"destinations" type:"list" required:"true"` - // A token to use for paginating results returned in the repsonse. Set the value - // of this parameter to null for the first request to a list action. For subsequent - // calls, use the NextToken value returned from the previous request to continue - // listing results after the first page. + // A token to use for paginating results that are returned in the response. + // Set the value of this parameter to null for the first request to a list action. + // For subsequent calls, use the NextToken value returned from the previous + // request to continue listing results after the first page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -9420,7 +10304,7 @@ func (s *ListPublishingDestinationsOutput) SetNextToken(v string) *ListPublishin type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) for the given GuardDuty resource + // The Amazon Resource Name (ARN) for the given GuardDuty resource. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` @@ -9484,18 +10368,18 @@ func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForRe type ListThreatIntelSetsInput struct { _ struct{} `type:"structure"` - // The unique ID of the detector the threatIntelSet is associated with. + // The unique ID of the detector that the threatIntelSet is associated with. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // You can use this parameter to indicate the maximum number of items you want - // in the response. The default value is 50. The maximum value is 50. + // You can use this parameter to indicate the maximum number of items that you + // want in the response. The default value is 50. The maximum value is 50. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // You can use this parameter to paginate results in the response. Set the value // of this parameter to null on your first call to the list action. For subsequent - // calls to the action fill nextToken in the request with the value of NextToken + // calls to the action, fill nextToken in the request with the value of NextToken // from the previous response to continue listing data. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` } @@ -9550,8 +10434,8 @@ func (s *ListThreatIntelSetsInput) SetNextToken(v string) *ListThreatIntelSetsIn type ListThreatIntelSetsOutput struct { _ struct{} `type:"structure"` - // Pagination parameter to be used on the next list operation to retrieve more - // items. + // The pagination parameter to be used on the next list operation to retrieve + // more items. NextToken *string `locationName:"nextToken" type:"string"` // The IDs of the ThreatIntelSet resources. @@ -9586,7 +10470,7 @@ func (s *ListThreatIntelSetsOutput) SetThreatIntelSetIds(v []*string) *ListThrea type LocalIpDetails struct { _ struct{} `type:"structure"` - // IPV4 remote address of the connection. + // The IPv4 local address of the connection. IpAddressV4 *string `locationName:"ipAddressV4" type:"string"` } @@ -9610,10 +10494,10 @@ func (s *LocalIpDetails) SetIpAddressV4(v string) *LocalIpDetails { type LocalPortDetails struct { _ struct{} `type:"structure"` - // Port number of the local connection. + // The port number of the local connection. Port *int64 `locationName:"port" type:"integer"` - // Port name of the local connection. + // The port name of the local connection. PortName *string `locationName:"portName" type:"string"` } @@ -9639,17 +10523,17 @@ func (s *LocalPortDetails) SetPortName(v string) *LocalPortDetails { return s } -// Contains information about the Master account and invitation. +// Contains information about the master account and invitation. type Master struct { _ struct{} `type:"structure"` - // The ID of the account used as the Master account. + // The ID of the account used as the master account. AccountId *string `locationName:"accountId" min:"12" type:"string"` - // This value is used to validate the master account to the member account. + // The value used to validate the master account to the member account. InvitationId *string `locationName:"invitationId" type:"string"` - // Timestamp at which the invitation was sent. + // The timestamp when the invitation was sent. InvitedAt *string `locationName:"invitedAt" type:"string"` // The status of the relationship between the master and member accounts. @@ -9690,27 +10574,27 @@ func (s *Master) SetRelationshipStatus(v string) *Master { return s } -// Continas information about the member account +// Contains information about the member account. type Member struct { _ struct{} `type:"structure"` - // Member account ID. + // The ID of the member account. // // AccountId is a required field AccountId *string `locationName:"accountId" min:"12" type:"string" required:"true"` - // Member account's detector ID. + // The detector ID of the member account. DetectorId *string `locationName:"detectorId" min:"1" type:"string"` - // Member account's email address. + // The email address of the member account. // // Email is a required field Email *string `locationName:"email" min:"1" type:"string" required:"true"` - // Timestamp at which the invitation was sent + // The timestamp when the invitation was sent. InvitedAt *string `locationName:"invitedAt" type:"string"` - // Master account ID. + // The master account ID. // // MasterId is a required field MasterId *string `locationName:"masterId" type:"string" required:"true"` @@ -9720,7 +10604,7 @@ type Member struct { // RelationshipStatus is a required field RelationshipStatus *string `locationName:"relationshipStatus" type:"string" required:"true"` - // Member last updated timestamp. + // The last-updated timestamp of the member. // // UpdatedAt is a required field UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` @@ -9783,25 +10667,25 @@ func (s *Member) SetUpdatedAt(v string) *Member { type NetworkConnectionAction struct { _ struct{} `type:"structure"` - // Network connection blocked information. + // Indicates whether EC2 blocked the network connection to your instance. Blocked *bool `locationName:"blocked" type:"boolean"` - // Network connection direction. + // The network connection direction. ConnectionDirection *string `locationName:"connectionDirection" type:"string"` - // Local IP information of the connection. + // The local IP information of the connection. LocalIpDetails *LocalIpDetails `locationName:"localIpDetails" type:"structure"` - // Local port information of the connection. + // The local port information of the connection. LocalPortDetails *LocalPortDetails `locationName:"localPortDetails" type:"structure"` - // Network connection protocol. + // The network connection protocol. Protocol *string `locationName:"protocol" type:"string"` - // Remote IP information of the connection. + // The remote IP information of the connection. RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` - // Remote port information of the connection. + // The remote port information of the connection. RemotePortDetails *RemotePortDetails `locationName:"remotePortDetails" type:"structure"` } @@ -9857,32 +10741,32 @@ func (s *NetworkConnectionAction) SetRemotePortDetails(v *RemotePortDetails) *Ne return s } -// Contains information about the network interface of the Ec2 instance. +// Contains information about the elastic network interface of the EC2 instance. type NetworkInterface struct { _ struct{} `type:"structure"` - // A list of EC2 instance IPv6 address information. + // A list of IPv6 addresses for the EC2 instance. Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` - // The ID of the network interface + // The ID of the network interface. NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // Private DNS name of the EC2 instance. + // The private DNS name of the EC2 instance. PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - // Private IP address of the EC2 instance. + // The private IP address of the EC2 instance. PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // Other private IP address information of the EC2 instance. PrivateIpAddresses []*PrivateIpAddressDetails `locationName:"privateIpAddresses" type:"list"` - // Public DNS name of the EC2 instance. + // The public DNS name of the EC2 instance. PublicDnsName *string `locationName:"publicDnsName" type:"string"` - // Public IP address of the EC2 instance. + // The public IP address of the EC2 instance. PublicIp *string `locationName:"publicIp" type:"string"` - // Security groups associated with the EC2 instance. + // The security groups associated with the EC2 instance. SecurityGroups []*SecurityGroup `locationName:"securityGroups" type:"list"` // The subnet ID of the EC2 instance. @@ -9962,20 +10846,21 @@ func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { return s } -// Continas information about the ISP organization of the remote IP address. +// Contains information about the ISP organization of the remote IP address. type Organization struct { _ struct{} `type:"structure"` - // Autonomous system number of the internet provider of the remote IP address. + // The Autonomous System Number (ASN) of the internet provider of the remote + // IP address. Asn *string `locationName:"asn" type:"string"` - // Organization that registered this ASN. + // The organization that registered this ASN. AsnOrg *string `locationName:"asnOrg" type:"string"` - // ISP information for the internet provider. + // The ISP information for the internet provider. Isp *string `locationName:"isp" type:"string"` - // Name of the internet provider. + // The name of the internet provider. Org *string `locationName:"org" type:"string"` } @@ -10017,10 +10902,11 @@ func (s *Organization) SetOrg(v string) *Organization { type PortProbeAction struct { _ struct{} `type:"structure"` - // Port probe blocked information. + // Indicates whether EC2 blocked the port probe to the instance, such as with + // an ACL. Blocked *bool `locationName:"blocked" type:"boolean"` - // A list of port probe details objects. + // A list of objects related to port probe details. PortProbeDetails []*PortProbeDetail `locationName:"portProbeDetails" type:"list"` } @@ -10050,13 +10936,13 @@ func (s *PortProbeAction) SetPortProbeDetails(v []*PortProbeDetail) *PortProbeAc type PortProbeDetail struct { _ struct{} `type:"structure"` - // Local IP information of the connection. + // The local IP information of the connection. LocalIpDetails *LocalIpDetails `locationName:"localIpDetails" type:"structure"` - // Local port information of the connection. + // The local port information of the connection. LocalPortDetails *LocalPortDetails `locationName:"localPortDetails" type:"structure"` - // Remote IP information of the connection. + // The remote IP information of the connection. RemoteIpDetails *RemoteIpDetails `locationName:"remoteIpDetails" type:"structure"` } @@ -10092,10 +10978,10 @@ func (s *PortProbeDetail) SetRemoteIpDetails(v *RemoteIpDetails) *PortProbeDetai type PrivateIpAddressDetails struct { _ struct{} `type:"structure"` - // Private DNS name of the EC2 instance. + // The private DNS name of the EC2 instance. PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - // Private IP address of the EC2 instance. + // The private IP address of the EC2 instance. PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } @@ -10121,14 +11007,14 @@ func (s *PrivateIpAddressDetails) SetPrivateIpAddress(v string) *PrivateIpAddres return s } -// Contains information about the product code for the Ec2 instance. +// Contains information about the product code for the EC2 instance. type ProductCode struct { _ struct{} `type:"structure"` - // Product code information. + // The product code information. Code *string `locationName:"code" type:"string"` - // Product code type. + // The product code type. ProductType *string `locationName:"productType" type:"string"` } @@ -10154,23 +11040,23 @@ func (s *ProductCode) SetProductType(v string) *ProductCode { return s } -// Continas information about the remote IP address of the connection. +// Contains information about the remote IP address of the connection. type RemoteIpDetails struct { _ struct{} `type:"structure"` - // City information of the remote IP address. + // The city information of the remote IP address. City *City `locationName:"city" type:"structure"` - // Country code of the remote IP address. + // The country code of the remote IP address. Country *Country `locationName:"country" type:"structure"` - // Location information of the remote IP address. + // The location information of the remote IP address. GeoLocation *GeoLocation `locationName:"geoLocation" type:"structure"` - // IPV4 remote address of the connection. + // The IPv4 remote address of the connection. IpAddressV4 *string `locationName:"ipAddressV4" type:"string"` - // ISP Organization information of the remote IP address. + // The ISP organization information of the remote IP address. Organization *Organization `locationName:"organization" type:"structure"` } @@ -10218,10 +11104,10 @@ func (s *RemoteIpDetails) SetOrganization(v *Organization) *RemoteIpDetails { type RemotePortDetails struct { _ struct{} `type:"structure"` - // Port number of the remote connection. + // The port number of the remote connection. Port *int64 `locationName:"port" type:"integer"` - // Port name of the remote connection. + // The port name of the remote connection. PortName *string `locationName:"portName" type:"string"` } @@ -10260,7 +11146,7 @@ type Resource struct { // prompted GuardDuty to generate a finding. InstanceDetails *InstanceDetails `locationName:"instanceDetails" type:"structure"` - // The type of the AWS resource. + // The type of AWS resource. ResourceType *string `locationName:"resourceType" type:"string"` } @@ -10296,10 +11182,10 @@ func (s *Resource) SetResourceType(v string) *Resource { type SecurityGroup struct { _ struct{} `type:"structure"` - // EC2 instance's security group ID. + // The security group ID of the EC2 instance. GroupId *string `locationName:"groupId" type:"string"` - // EC2 instance's security group name. + // The security group name of the EC2 instance. GroupName *string `locationName:"groupName" type:"string"` } @@ -10329,36 +11215,36 @@ func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { type Service struct { _ struct{} `type:"structure"` - // Information about the activity described in a finding. + // Information about the activity that is described in a finding. Action *Action `locationName:"action" type:"structure"` // Indicates whether this finding is archived. Archived *bool `locationName:"archived" type:"boolean"` - // Total count of the occurrences of this finding type. + // The total count of the occurrences of this finding type. Count *int64 `locationName:"count" type:"integer"` - // Detector ID for the GuardDuty service. + // The detector ID for the GuardDuty service. DetectorId *string `locationName:"detectorId" min:"1" type:"string"` - // First seen timestamp of the activity that prompted GuardDuty to generate + // The first-seen timestamp of the activity that prompted GuardDuty to generate // this finding. EventFirstSeen *string `locationName:"eventFirstSeen" type:"string"` - // Last seen timestamp of the activity that prompted GuardDuty to generate this - // finding. + // The last-seen timestamp of the activity that prompted GuardDuty to generate + // this finding. EventLastSeen *string `locationName:"eventLastSeen" type:"string"` // An evidence object associated with the service. Evidence *Evidence `locationName:"evidence" type:"structure"` - // Resource role information for this finding. + // The resource role information for this finding. ResourceRole *string `locationName:"resourceRole" type:"string"` // The name of the AWS service (GuardDuty) that generated a finding. ServiceName *string `locationName:"serviceName" type:"string"` - // Feedback left about the finding. + // Feedback that was submitted about the finding. UserFeedback *string `locationName:"userFeedback" type:"string"` } @@ -10436,11 +11322,11 @@ func (s *Service) SetUserFeedback(v string) *Service { type SortCriteria struct { _ struct{} `type:"structure"` - // Represents the finding attribute (for example, accountId) by which to sort - // findings. + // Represents the finding attribute (for example, accountId) to sort findings + // by. AttributeName *string `locationName:"attributeName" type:"string"` - // Order by which the sorted findings are to be displayed. + // The order by which the sorted findings are to be displayed. OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` } @@ -10528,8 +11414,8 @@ func (s *StartMonitoringMembersInput) SetDetectorId(v string) *StartMonitoringMe type StartMonitoringMembersOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain the unprocessed account and a result string + // that explains why it was unprocessed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -10554,14 +11440,13 @@ func (s *StartMonitoringMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAc type StopMonitoringMembersInput struct { _ struct{} `type:"structure"` - // A list of account IDs of the GuardDuty member accounts whose findings you - // want the master account to stop monitoring. + // A list of account IDs for the member accounts to stop monitoring. // // AccountIds is a required field AccountIds []*string `locationName:"accountIds" min:"1" type:"list" required:"true"` - // The unique ID of the detector of the GuardDuty account that you want to stop - // from monitor members' findings. + // The unique ID of the detector associated with the GuardDuty master account + // that is monitoring member accounts. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -10614,8 +11499,9 @@ func (s *StopMonitoringMembersInput) SetDetectorId(v string) *StopMonitoringMemb type StopMonitoringMembersOutput struct { _ struct{} `type:"structure"` - // A list of objects containing the unprocessed account and a result string - // explaining why it was unprocessed. + // A list of objects that contain an accountId for each account that could not + // be processed, and a result string that indicates why the account was not + // processed. // // UnprocessedAccounts is a required field UnprocessedAccounts []*UnprocessedAccount `locationName:"unprocessedAccounts" type:"list" required:"true"` @@ -10637,14 +11523,14 @@ func (s *StopMonitoringMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAcc return s } -// Contains information about a tag associated with the Ec2 instance. +// Contains information about a tag associated with the EC2 instance. type Tag struct { _ struct{} `type:"structure"` - // EC2 instance tag key. + // The EC2 instance tag key. Key *string `locationName:"key" type:"string"` - // EC2 instance tag value. + // The EC2 instance tag value. Value *string `locationName:"value" type:"string"` } @@ -10786,7 +11672,7 @@ type UnarchiveFindingsInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // IDs of the findings to unarchive. + // The IDs of the findings to unarchive. // // FindingIds is a required field FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` @@ -10847,11 +11733,11 @@ func (s UnarchiveFindingsOutput) GoString() string { return s.String() } -// Contains information about the accounts that were not processed. +// Contains information about the accounts that weren't processed. type UnprocessedAccount struct { _ struct{} `type:"structure"` - // AWS Account ID. + // The AWS account ID. // // AccountId is a required field AccountId *string `locationName:"accountId" min:"12" type:"string" required:"true"` @@ -10967,7 +11853,7 @@ type UpdateDetectorInput struct { // Specifies whether the detector is enabled or not enabled. Enable *bool `locationName:"enable" type:"boolean"` - // A enum value that specifies how frequently findings are exported, such as + // An enum value that specifies how frequently findings are exported, such as // to CloudWatch Events. FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` } @@ -11174,7 +12060,7 @@ type UpdateFindingsFeedbackInput struct { // Feedback is a required field Feedback *string `locationName:"feedback" type:"string" required:"true" enum:"Feedback"` - // IDs of the findings that you want to mark as useful or not useful. + // The IDs of the findings that you want to mark as useful or not useful. // // FindingIds is a required field FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` @@ -11253,7 +12139,7 @@ func (s UpdateFindingsFeedbackOutput) GoString() string { type UpdateIPSetInput struct { _ struct{} `type:"structure"` - // The updated boolean value that specifies whether the IPSet is active or not. + // The updated Boolean value that specifies whether the IPSet is active or not. Activate *bool `locationName:"activate" type:"boolean"` // The detectorID that specifies the GuardDuty service whose IPSet you want @@ -11267,7 +12153,7 @@ type UpdateIPSetInput struct { // IpSetId is a required field IpSetId *string `location:"uri" locationName:"ipSetId" type:"string" required:"true"` - // The updated URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). + // The updated URI of the file that contains the IPSet. For example: . Location *string `locationName:"location" min:"1" type:"string"` // The unique ID that specifies the IPSet that you want to update. @@ -11356,10 +12242,79 @@ func (s UpdateIPSetOutput) GoString() string { return s.String() } +type UpdateOrganizationConfigurationInput struct { + _ struct{} `type:"structure"` + + // Indicates whether to automatically enable member accounts in the organization. + // + // AutoEnable is a required field + AutoEnable *bool `locationName:"autoEnable" type:"boolean" required:"true"` + + // The ID of the detector to update the delegated administrator for. + // + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateOrganizationConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateOrganizationConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateOrganizationConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateOrganizationConfigurationInput"} + if s.AutoEnable == nil { + invalidParams.Add(request.NewErrParamRequired("AutoEnable")) + } + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoEnable sets the AutoEnable field's value. +func (s *UpdateOrganizationConfigurationInput) SetAutoEnable(v bool) *UpdateOrganizationConfigurationInput { + s.AutoEnable = &v + return s +} + +// SetDetectorId sets the DetectorId field's value. +func (s *UpdateOrganizationConfigurationInput) SetDetectorId(v string) *UpdateOrganizationConfigurationInput { + s.DetectorId = &v + return s +} + +type UpdateOrganizationConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateOrganizationConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateOrganizationConfigurationOutput) GoString() string { + return s.String() +} + type UpdatePublishingDestinationInput struct { _ struct{} `type:"structure"` - // The ID of the detector associated with the publishing destinations to update. + // The ID of the publishing destination to update. // // DestinationId is a required field DestinationId *string `location:"uri" locationName:"destinationId" type:"string" required:"true"` @@ -11368,7 +12323,7 @@ type UpdatePublishingDestinationInput struct { // of the publishing destination. DestinationProperties *DestinationProperties `locationName:"destinationProperties" type:"structure"` - // The ID of the + // The ID of the detector associated with the publishing destinations to update. // // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` @@ -11441,7 +12396,7 @@ func (s UpdatePublishingDestinationOutput) GoString() string { type UpdateThreatIntelSetInput struct { _ struct{} `type:"structure"` - // The updated boolean value that specifies whether the ThreateIntelSet is active + // The updated Boolean value that specifies whether the ThreateIntelSet is active // or not. Activate *bool `locationName:"activate" type:"boolean"` @@ -11451,8 +12406,7 @@ type UpdateThreatIntelSetInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" min:"1" type:"string" required:"true"` - // The updated URI of the file that contains the ThreateIntelSet. For example - // (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) + // The updated URI of the file that contains the ThreateIntelSet. For example: . Location *string `locationName:"location" min:"1" type:"string"` // The unique ID that specifies the ThreatIntelSet that you want to update. @@ -11546,6 +12500,14 @@ func (s UpdateThreatIntelSetOutput) GoString() string { return s.String() } +const ( + // AdminStatusEnabled is a AdminStatus enum value + AdminStatusEnabled = "ENABLED" + + // AdminStatusDisableInProgress is a AdminStatus enum value + AdminStatusDisableInProgress = "DISABLE_IN_PROGRESS" +) + const ( // DestinationTypeS3 is a DestinationType enum value DestinationTypeS3 = "S3" diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go index fcc8098dfda..c14c9641279 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/doc.go @@ -5,19 +5,22 @@ // // Amazon GuardDuty is a continuous security monitoring service that analyzes // and processes the following data sources: VPC Flow Logs, AWS CloudTrail event -// logs, and DNS logs. It uses threat intelligence feeds, such as lists of malicious -// IPs and domains, and machine learning to identify unexpected and potentially -// unauthorized and malicious activity within your AWS environment. This can +// logs, and DNS logs. It uses threat intelligence feeds (such as lists of malicious +// IPs and domains) and machine learning to identify unexpected, potentially +// unauthorized, and malicious activity within your AWS environment. This can // include issues like escalations of privileges, uses of exposed credentials, // or communication with malicious IPs, URLs, or domains. For example, GuardDuty -// can detect compromised EC2 instances serving malware or mining bitcoin. It -// also monitors AWS account access behavior for signs of compromise, such as -// unauthorized infrastructure deployments, like instances deployed in a region -// that has never been used, or unusual API calls, like a password policy change -// to reduce password strength. GuardDuty informs you of the status of your -// AWS environment by producing security findings that you can view in the GuardDuty -// console or through Amazon CloudWatch events. For more information, see Amazon -// GuardDuty User Guide (https://docs.aws.amazon.com/guardduty/latest/ug/what-is-guardduty.html). +// can detect compromised EC2 instances that serve malware or mine bitcoin. +// +// GuardDuty also monitors AWS account access behavior for signs of compromise. +// Some examples of this are unauthorized infrastructure deployments such as +// EC2 instances deployed in a Region that has never been used, or unusual API +// calls like a password policy change to reduce password strength. +// +// GuardDuty informs you of the status of your AWS environment by producing +// security findings that you can view in the GuardDuty console or through Amazon +// CloudWatch events. For more information, see the Amazon GuardDuty User Guide +// (https://docs.aws.amazon.com/guardduty/latest/ug/what-is-guardduty.html) . // // See https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go index 63b0c1f7db7..8a4f92d1b3f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/errors.go @@ -11,13 +11,13 @@ const ( // ErrCodeBadRequestException for service response error code // "BadRequestException". // - // Bad request exception object. + // A bad request exception object. ErrCodeBadRequestException = "BadRequestException" // ErrCodeInternalServerErrorException for service response error code // "InternalServerErrorException". // - // Internal server error exception object. + // An internal server error exception object. ErrCodeInternalServerErrorException = "InternalServerErrorException" ) 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 a17131ac18f..eb606e83573 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 @@ -5302,7 +5302,9 @@ func (c *IAM) GenerateServiceLastAccessedDetailsRequest(input *GenerateServiceLa // * GetServiceLastAccessedDetails – Use this operation for users, groups, // roles, or policies to list every AWS service that the resource could access // using permissions policies. For each service, the response includes information -// about the most recent access attempt. +// about the most recent access attempt. The JobId returned by GenerateServiceLastAccessedDetail +// must be used by the same role within a session, or by the same user when +// used to call GetServiceLastAccessedDetail. // // * GetServiceLastAccessedDetailsWithEntities – Use this operation for // groups and policies to list information about the associated entities @@ -16341,7 +16343,7 @@ func (s ChangePasswordOutput) GoString() string { // evaluating the Condition elements of the input policies. // // This data type is used as an input parameter to SimulateCustomPolicy and -// SimulatePrincipalPolicy . +// SimulatePrincipalPolicy. type ContextEntry struct { _ struct{} `type:"structure"` @@ -20381,8 +20383,10 @@ func (s *GenerateServiceLastAccessedDetailsInput) SetArn(v string) *GenerateServ type GenerateServiceLastAccessedDetailsOutput struct { _ struct{} `type:"structure"` - // The job ID that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities - // operations. + // The JobId that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities + // operations. The JobId returned by GenerateServiceLastAccessedDetail must + // be used by the same role within a session, or by the same user when used + // to call GetServiceLastAccessedDetail. JobId *string `min:"36" type:"string"` } @@ -22245,7 +22249,9 @@ type GetServiceLastAccessedDetailsInput struct { _ struct{} `type:"structure"` // The ID of the request generated by the GenerateServiceLastAccessedDetails - // operation. + // operation. The JobId returned by GenerateServiceLastAccessedDetail must be + // used by the same role within a session, or by the same user when used to + // call GetServiceLastAccessedDetail. // // JobId is a required field JobId *string `min:"36" type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/imagebuilder/api.go b/vendor/github.com/aws/aws-sdk-go/service/imagebuilder/api.go index 02e78844c4a..94d810886bf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/imagebuilder/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/imagebuilder/api.go @@ -3888,7 +3888,12 @@ func (c *Imagebuilder) PutComponentPolicyRequest(input *PutComponentPolicyInput) // PutComponentPolicy API operation for EC2 Image Builder. // -// Applies a policy to a component. +// Applies a policy to a component. We recommend that you call the RAM API CreateResourceShare +// (https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html) +// to share resources. If you call the Image Builder API PutComponentPolicy, +// you must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) +// in order for the resource to be visible to all principals with whom the resource +// is shared. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3990,7 +3995,12 @@ func (c *Imagebuilder) PutImagePolicyRequest(input *PutImagePolicyInput) (req *r // PutImagePolicy API operation for EC2 Image Builder. // -// Applies a policy to an image. +// Applies a policy to an image. We recommend that you call the RAM API CreateResourceShare +// (https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html) +// to share resources. If you call the Image Builder API PutImagePolicy, you +// must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) +// in order for the resource to be visible to all principals with whom the resource +// is shared. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4092,7 +4102,12 @@ func (c *Imagebuilder) PutImageRecipePolicyRequest(input *PutImageRecipePolicyIn // PutImageRecipePolicy API operation for EC2 Image Builder. // -// Applies a policy to an image recipe. +// Applies a policy to an image recipe. We recommend that you call the RAM API +// CreateResourceShare (https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html) +// to share resources. If you call the Image Builder API PutImageRecipePolicy, +// you must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) +// in order for the resource to be visible to all principals with whom the resource +// is shared. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4883,8 +4898,8 @@ func (s *AmiDistributionConfiguration) SetName(v string) *AmiDistributionConfigu // You have exceeded the permitted request rate for the specific operation. type CallRateLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4901,17 +4916,17 @@ func (s CallRateLimitExceededException) GoString() string { func newErrorCallRateLimitExceededException(v protocol.ResponseMetadata) error { return &CallRateLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CallRateLimitExceededException) Code() string { +func (s *CallRateLimitExceededException) Code() string { return "CallRateLimitExceededException" } // Message returns the exception's message. -func (s CallRateLimitExceededException) Message() string { +func (s *CallRateLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4919,22 +4934,22 @@ func (s CallRateLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CallRateLimitExceededException) OrigErr() error { +func (s *CallRateLimitExceededException) OrigErr() error { return nil } -func (s CallRateLimitExceededException) Error() string { +func (s *CallRateLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CallRateLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CallRateLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CallRateLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CallRateLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type CancelImageCreationInput struct { @@ -5032,8 +5047,8 @@ func (s *CancelImageCreationOutput) SetRequestId(v string) *CancelImageCreationO // or resource on behalf of a user that doesn't have permissions to use the // action or resource, or specifying an invalid resource identifier. type ClientException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5050,17 +5065,17 @@ func (s ClientException) GoString() string { func newErrorClientException(v protocol.ResponseMetadata) error { return &ClientException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientException) Code() string { +func (s *ClientException) Code() string { return "ClientException" } // Message returns the exception's message. -func (s ClientException) Message() string { +func (s *ClientException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5068,22 +5083,22 @@ func (s ClientException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientException) OrigErr() error { +func (s *ClientException) OrigErr() error { return nil } -func (s ClientException) Error() string { +func (s *ClientException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientException) RequestID() string { + return s.RespMetadata.RequestID } // A detailed view of a component. @@ -5120,6 +5135,11 @@ type Component struct { // The platform of the component. Platform *string `locationName:"platform" type:"string" enum:"Platform"` + // The operating system (OS) version supported by the component. If the OS information + // is available, a prefix match is performed against the parent image OS version + // during image recipe creation. + SupportedOsVersions []*string `locationName:"supportedOsVersions" min:"1" type:"list"` + // The tags associated with the component. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` @@ -5201,6 +5221,12 @@ func (s *Component) SetPlatform(v string) *Component { return s } +// SetSupportedOsVersions sets the SupportedOsVersions field's value. +func (s *Component) SetSupportedOsVersions(v []*string) *Component { + s.SupportedOsVersions = v + return s +} + // SetTags sets the Tags field's value. func (s *Component) SetTags(v map[string]*string) *Component { s.Tags = v @@ -5283,6 +5309,11 @@ type ComponentSummary struct { // The platform of the component. Platform *string `locationName:"platform" type:"string" enum:"Platform"` + // The operating system (OS) version supported by the component. If the OS information + // is available, a prefix match is performed against the parent image OS version + // during image recipe creation. + SupportedOsVersions []*string `locationName:"supportedOsVersions" min:"1" type:"list"` + // The tags associated with the component. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` @@ -5346,6 +5377,12 @@ func (s *ComponentSummary) SetPlatform(v string) *ComponentSummary { return s } +// SetSupportedOsVersions sets the SupportedOsVersions field's value. +func (s *ComponentSummary) SetSupportedOsVersions(v []*string) *ComponentSummary { + s.SupportedOsVersions = v + return s +} + // SetTags sets the Tags field's value. func (s *ComponentSummary) SetTags(v map[string]*string) *ComponentSummary { s.Tags = v @@ -5386,6 +5423,11 @@ type ComponentVersion struct { // The platform of the component. Platform *string `locationName:"platform" type:"string" enum:"Platform"` + // The operating system (OS) version supported by the component. If the OS information + // is available, a prefix match is performed against the parent image OS version + // during image recipe creation. + SupportedOsVersions []*string `locationName:"supportedOsVersions" min:"1" type:"list"` + // The type of the component denotes whether the component is used to build // the image or only to test it. Type *string `locationName:"type" type:"string" enum:"ComponentType"` @@ -5440,6 +5482,12 @@ func (s *ComponentVersion) SetPlatform(v string) *ComponentVersion { return s } +// SetSupportedOsVersions sets the SupportedOsVersions field's value. +func (s *ComponentVersion) SetSupportedOsVersions(v []*string) *ComponentVersion { + s.SupportedOsVersions = v + return s +} + // SetType sets the Type field's value. func (s *ComponentVersion) SetType(v string) *ComponentVersion { s.Type = &v @@ -5490,6 +5538,11 @@ type CreateComponentInput struct { // SemanticVersion is a required field SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` + // The operating system (OS) version supported by the component. If the OS information + // is available, a prefix match is performed against the parent image OS version + // during image recipe creation. + SupportedOsVersions []*string `locationName:"supportedOsVersions" min:"1" type:"list"` + // The tags of the component. Tags map[string]*string `locationName:"tags" min:"1" type:"map"` @@ -5537,6 +5590,9 @@ func (s *CreateComponentInput) Validate() error { if s.SemanticVersion == nil { invalidParams.Add(request.NewErrParamRequired("SemanticVersion")) } + if s.SupportedOsVersions != nil && len(s.SupportedOsVersions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SupportedOsVersions", 1)) + } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } @@ -5595,6 +5651,12 @@ func (s *CreateComponentInput) SetSemanticVersion(v string) *CreateComponentInpu return s } +// SetSupportedOsVersions sets the SupportedOsVersions field's value. +func (s *CreateComponentInput) SetSupportedOsVersions(v []*string) *CreateComponentInput { + s.SupportedOsVersions = v + return s +} + // SetTags sets the Tags field's value. func (s *CreateComponentInput) SetTags(v map[string]*string) *CreateComponentInput { s.Tags = v @@ -5799,6 +5861,12 @@ type CreateImageInput struct { // and configures the outputs of your pipeline. DistributionConfigurationArn *string `locationName:"distributionConfigurationArn" type:"string"` + // Collects additional information about the image being created, including + // the operating system (OS) version and package list. This information is used + // to enhance the overall experience of using EC2 Image Builder. Enabled by + // default. + EnhancedImageMetadataEnabled *bool `locationName:"enhancedImageMetadataEnabled" type:"boolean"` + // The Amazon Resource Name (ARN) of the image recipe that defines how images // are configured, tested, and assessed. // @@ -5867,6 +5935,12 @@ func (s *CreateImageInput) SetDistributionConfigurationArn(v string) *CreateImag return s } +// SetEnhancedImageMetadataEnabled sets the EnhancedImageMetadataEnabled field's value. +func (s *CreateImageInput) SetEnhancedImageMetadataEnabled(v bool) *CreateImageInput { + s.EnhancedImageMetadataEnabled = &v + return s +} + // SetImageRecipeArn sets the ImageRecipeArn field's value. func (s *CreateImageInput) SetImageRecipeArn(v string) *CreateImageInput { s.ImageRecipeArn = &v @@ -5945,6 +6019,12 @@ type CreateImagePipelineInput struct { // be used to configure and distribute images created by this image pipeline. DistributionConfigurationArn *string `locationName:"distributionConfigurationArn" type:"string"` + // Collects additional information about the image being created, including + // the operating system (OS) version and package list. This information is used + // to enhance the overall experience of using EC2 Image Builder. Enabled by + // default. + EnhancedImageMetadataEnabled *bool `locationName:"enhancedImageMetadataEnabled" type:"boolean"` + // The Amazon Resource Name (ARN) of the image recipe that will be used to configure // images created by this image pipeline. // @@ -6041,6 +6121,12 @@ func (s *CreateImagePipelineInput) SetDistributionConfigurationArn(v string) *Cr return s } +// SetEnhancedImageMetadataEnabled sets the EnhancedImageMetadataEnabled field's value. +func (s *CreateImagePipelineInput) SetEnhancedImageMetadataEnabled(v bool) *CreateImagePipelineInput { + s.EnhancedImageMetadataEnabled = &v + return s +} + // SetImageRecipeArn sets the ImageRecipeArn field's value. func (s *CreateImagePipelineInput) SetImageRecipeArn(v string) *CreateImagePipelineInput { s.ImageRecipeArn = &v @@ -6147,7 +6233,15 @@ type CreateImageRecipeInput struct { // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // The parent image of the image recipe. + // The parent image of the image recipe. The value of the string can be the + // ARN of the parent image or an AMI ID. The format for the ARN follows this + // example: arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/2019.x.x. + // The ARN ends with /20xx.x.x, which communicates to EC2 Image Builder that + // you want to use the latest AMI created in 20xx (year). You can provide the + // specific version that you want to use, or you can use a wildcard in all of + // the fields. If you enter an AMI ID for the string value, you must have access + // to the AMI, and the AMI must be in the same Region in which you are using + // Image Builder. // // ParentImage is a required field ParentImage *string `locationName:"parentImage" min:"1" type:"string" required:"true"` @@ -7328,8 +7422,8 @@ func (s *Filter) SetValues(v []*string) *Filter { // You are not authorized to perform the requested operation. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7346,17 +7440,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7364,22 +7458,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } type GetComponentInput struct { @@ -8022,8 +8116,8 @@ func (s *GetInfrastructureConfigurationOutput) SetRequestId(v string) *GetInfras // You have specified a client token for an operation using parameter values // that differ from a previous request that used the same client token. type IdempotentParameterMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8040,17 +8134,17 @@ func (s IdempotentParameterMismatchException) GoString() string { func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotentParameterMismatchException) Code() string { +func (s *IdempotentParameterMismatchException) Code() string { return "IdempotentParameterMismatchException" } // Message returns the exception's message. -func (s IdempotentParameterMismatchException) Message() string { +func (s *IdempotentParameterMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8058,22 +8152,22 @@ func (s IdempotentParameterMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotentParameterMismatchException) OrigErr() error { +func (s *IdempotentParameterMismatchException) OrigErr() error { return nil } -func (s IdempotentParameterMismatchException) Error() string { +func (s *IdempotentParameterMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotentParameterMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotentParameterMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotentParameterMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotentParameterMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // An image build version. @@ -8089,6 +8183,12 @@ type Image struct { // The distribution configuration used when creating this image. DistributionConfiguration *DistributionConfiguration `locationName:"distributionConfiguration" type:"structure"` + // Collects additional information about the image being created, including + // the operating system (OS) version and package list. This information is used + // to enhance the overall experience of using EC2 Image Builder. Enabled by + // default. + EnhancedImageMetadataEnabled *bool `locationName:"enhancedImageMetadataEnabled" type:"boolean"` + // The image recipe used when creating the image. ImageRecipe *ImageRecipe `locationName:"imageRecipe" type:"structure"` @@ -8101,6 +8201,10 @@ type Image struct { // The name of the image. Name *string `locationName:"name" type:"string"` + // The operating system version of the instance. For example, Amazon Linux 2, + // Ubuntu 18, or Microsoft Windows Server 2019. + OsVersion *string `locationName:"osVersion" min:"1" type:"string"` + // The output resources produced when creating this image. OutputResources *OutputResources `locationName:"outputResources" type:"structure"` @@ -8151,6 +8255,12 @@ func (s *Image) SetDistributionConfiguration(v *DistributionConfiguration) *Imag return s } +// SetEnhancedImageMetadataEnabled sets the EnhancedImageMetadataEnabled field's value. +func (s *Image) SetEnhancedImageMetadataEnabled(v bool) *Image { + s.EnhancedImageMetadataEnabled = &v + return s +} + // SetImageRecipe sets the ImageRecipe field's value. func (s *Image) SetImageRecipe(v *ImageRecipe) *Image { s.ImageRecipe = v @@ -8175,6 +8285,12 @@ func (s *Image) SetName(v string) *Image { return s } +// SetOsVersion sets the OsVersion field's value. +func (s *Image) SetOsVersion(v string) *Image { + s.OsVersion = &v + return s +} + // SetOutputResources sets the OutputResources field's value. func (s *Image) SetOutputResources(v *OutputResources) *Image { s.OutputResources = v @@ -8243,6 +8359,12 @@ type ImagePipeline struct { // with this image pipeline. DistributionConfigurationArn *string `locationName:"distributionConfigurationArn" type:"string"` + // Collects additional information about the image being created, including + // the operating system (OS) version and package list. This information is used + // to enhance the overall experience of using EC2 Image Builder. Enabled by + // default. + EnhancedImageMetadataEnabled *bool `locationName:"enhancedImageMetadataEnabled" type:"boolean"` + // The Amazon Resource Name (ARN) of the image recipe associated with this image // pipeline. ImageRecipeArn *string `locationName:"imageRecipeArn" type:"string"` @@ -8322,6 +8444,12 @@ func (s *ImagePipeline) SetDistributionConfigurationArn(v string) *ImagePipeline return s } +// SetEnhancedImageMetadataEnabled sets the EnhancedImageMetadataEnabled field's value. +func (s *ImagePipeline) SetEnhancedImageMetadataEnabled(v bool) *ImagePipeline { + s.EnhancedImageMetadataEnabled = &v + return s +} + // SetImageRecipeArn sets the ImageRecipeArn field's value. func (s *ImagePipeline) SetImageRecipeArn(v string) *ImagePipeline { s.ImageRecipeArn = &v @@ -8608,6 +8736,10 @@ type ImageSummary struct { // The name of the image. Name *string `locationName:"name" type:"string"` + // The operating system version of the instance. For example, Amazon Linux 2, + // Ubuntu 18, or Microsoft Windows Server 2019. + OsVersion *string `locationName:"osVersion" min:"1" type:"string"` + // The output resources produced when creating this image. OutputResources *OutputResources `locationName:"outputResources" type:"structure"` @@ -8655,6 +8787,12 @@ func (s *ImageSummary) SetName(v string) *ImageSummary { return s } +// SetOsVersion sets the OsVersion field's value. +func (s *ImageSummary) SetOsVersion(v string) *ImageSummary { + s.OsVersion = &v + return s +} + // SetOutputResources sets the OutputResources field's value. func (s *ImageSummary) SetOutputResources(v *OutputResources) *ImageSummary { s.OutputResources = v @@ -8750,6 +8888,10 @@ type ImageVersion struct { // The name of the image semantic version. Name *string `locationName:"name" type:"string"` + // The operating system version of the instance. For example, Amazon Linux 2, + // Ubuntu 18, or Microsoft Windows Server 2019. + OsVersion *string `locationName:"osVersion" min:"1" type:"string"` + // The owner of the image semantic version. Owner *string `locationName:"owner" min:"1" type:"string"` @@ -8788,6 +8930,12 @@ func (s *ImageVersion) SetName(v string) *ImageVersion { return s } +// SetOsVersion sets the OsVersion field's value. +func (s *ImageVersion) SetOsVersion(v string) *ImageVersion { + s.OsVersion = &v + return s +} + // SetOwner sets the Owner field's value. func (s *ImageVersion) SetOwner(v string) *ImageVersion { s.Owner = &v @@ -9315,8 +9463,8 @@ func (s *InstanceBlockDeviceMapping) SetVirtualName(v string) *InstanceBlockDevi // You have provided an invalid pagination token in your request. type InvalidPaginationTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9333,17 +9481,17 @@ func (s InvalidPaginationTokenException) GoString() string { func newErrorInvalidPaginationTokenException(v protocol.ResponseMetadata) error { return &InvalidPaginationTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPaginationTokenException) Code() string { +func (s *InvalidPaginationTokenException) Code() string { return "InvalidPaginationTokenException" } // Message returns the exception's message. -func (s InvalidPaginationTokenException) Message() string { +func (s *InvalidPaginationTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9351,29 +9499,29 @@ func (s InvalidPaginationTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPaginationTokenException) OrigErr() error { +func (s *InvalidPaginationTokenException) OrigErr() error { return nil } -func (s InvalidPaginationTokenException) Error() string { +func (s *InvalidPaginationTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPaginationTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPaginationTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPaginationTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPaginationTokenException) RequestID() string { + return s.RespMetadata.RequestID } // You have specified two or more mutually exclusive parameters. Review the // error message for details. type InvalidParameterCombinationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9390,17 +9538,17 @@ func (s InvalidParameterCombinationException) GoString() string { func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error { return &InvalidParameterCombinationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterCombinationException) Code() string { +func (s *InvalidParameterCombinationException) Code() string { return "InvalidParameterCombinationException" } // Message returns the exception's message. -func (s InvalidParameterCombinationException) Message() string { +func (s *InvalidParameterCombinationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9408,29 +9556,29 @@ func (s InvalidParameterCombinationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterCombinationException) OrigErr() error { +func (s *InvalidParameterCombinationException) OrigErr() error { return nil } -func (s InvalidParameterCombinationException) Error() string { +func (s *InvalidParameterCombinationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterCombinationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterCombinationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterCombinationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterCombinationException) RequestID() string { + return s.RespMetadata.RequestID } // The specified parameter is invalid. Review the available parameters for the // API request. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9447,17 +9595,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9465,28 +9613,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The value that you provided for the specified parameter is invalid. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9503,17 +9651,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9521,28 +9669,28 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // You have made a request for an action that is not supported by the service. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9559,17 +9707,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9577,28 +9725,28 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Your version number is out of bounds or does not follow the required syntax. type InvalidVersionNumberException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9615,17 +9763,17 @@ func (s InvalidVersionNumberException) GoString() string { func newErrorInvalidVersionNumberException(v protocol.ResponseMetadata) error { return &InvalidVersionNumberException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidVersionNumberException) Code() string { +func (s *InvalidVersionNumberException) Code() string { return "InvalidVersionNumberException" } // Message returns the exception's message. -func (s InvalidVersionNumberException) Message() string { +func (s *InvalidVersionNumberException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9633,22 +9781,22 @@ func (s InvalidVersionNumberException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidVersionNumberException) OrigErr() error { +func (s *InvalidVersionNumberException) OrigErr() error { return nil } -func (s InvalidVersionNumberException) Error() string { +func (s *InvalidVersionNumberException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidVersionNumberException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidVersionNumberException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidVersionNumberException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidVersionNumberException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the configuration for a launch permission. The launch permission @@ -11168,8 +11316,8 @@ func (s *PutImageRecipePolicyOutput) SetRequestId(v string) *PutImageRecipePolic // The resource that you are trying to create already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11186,17 +11334,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11204,29 +11352,29 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // You have attempted to mutate or delete a resource with a dependency that // prohibits this action. See the error message for more details. type ResourceDependencyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11243,17 +11391,17 @@ func (s ResourceDependencyException) GoString() string { func newErrorResourceDependencyException(v protocol.ResponseMetadata) error { return &ResourceDependencyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDependencyException) Code() string { +func (s *ResourceDependencyException) Code() string { return "ResourceDependencyException" } // Message returns the exception's message. -func (s ResourceDependencyException) Message() string { +func (s *ResourceDependencyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11261,29 +11409,29 @@ func (s ResourceDependencyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDependencyException) OrigErr() error { +func (s *ResourceDependencyException) OrigErr() error { return nil } -func (s ResourceDependencyException) Error() string { +func (s *ResourceDependencyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDependencyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDependencyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDependencyException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDependencyException) RequestID() string { + return s.RespMetadata.RequestID } // The resource that you are trying to operate on is currently in use. Review // the message details and retry later. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11300,17 +11448,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11318,28 +11466,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // At least one of the resources referenced by your request does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11356,17 +11504,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11374,22 +11522,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Amazon S3 logging configuration. @@ -11494,8 +11642,8 @@ func (s *Schedule) SetScheduleExpression(v string) *Schedule { // This exception is thrown when the service encounters an unrecoverable exception. type ServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11512,17 +11660,17 @@ func (s ServiceException) GoString() string { func newErrorServiceException(v protocol.ResponseMetadata) error { return &ServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceException) Code() string { +func (s *ServiceException) Code() string { return "ServiceException" } // Message returns the exception's message. -func (s ServiceException) Message() string { +func (s *ServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11530,28 +11678,28 @@ func (s ServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceException) OrigErr() error { +func (s *ServiceException) OrigErr() error { return nil } -func (s ServiceException) Error() string { +func (s *ServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceException) RequestID() string { + return s.RespMetadata.RequestID } // The service is unable to process your request at this time. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11568,17 +11716,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11586,22 +11734,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type StartImagePipelineExecutionInput struct { @@ -11982,6 +12130,12 @@ type UpdateImagePipelineInput struct { // be used to configure and distribute images updated by this image pipeline. DistributionConfigurationArn *string `locationName:"distributionConfigurationArn" type:"string"` + // Collects additional information about the image being created, including + // the operating system (OS) version and package list. This information is used + // to enhance the overall experience of using EC2 Image Builder. Enabled by + // default. + EnhancedImageMetadataEnabled *bool `locationName:"enhancedImageMetadataEnabled" type:"boolean"` + // The Amazon Resource Name (ARN) of the image pipeline that you want to update. // // ImagePipelineArn is a required field @@ -12072,6 +12226,12 @@ func (s *UpdateImagePipelineInput) SetDistributionConfigurationArn(v string) *Up return s } +// SetEnhancedImageMetadataEnabled sets the EnhancedImageMetadataEnabled field's value. +func (s *UpdateImagePipelineInput) SetEnhancedImageMetadataEnabled(v bool) *UpdateImagePipelineInput { + s.EnhancedImageMetadataEnabled = &v + return s +} + // SetImagePipelineArn sets the ImagePipelineArn field's value. func (s *UpdateImagePipelineInput) SetImagePipelineArn(v string) *UpdateImagePipelineInput { s.ImagePipelineArn = &v 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 14961577ca9..f7e27d35cc4 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 @@ -4027,8 +4027,8 @@ func (c *Inspector) UpdateAssessmentTargetWithContext(ctx aws.Context, input *Up // You do not have required permissions to access the requested resource. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can immediately retry your request. // @@ -4056,17 +4056,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4074,22 +4074,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type AddAttributesToFindingsInput struct { @@ -4373,8 +4373,8 @@ func (s *AgentPreview) SetOperatingSystem(v string) *AgentPreview { // You started an assessment run, but one of the instances is already participating // in another assessment run. type AgentsAlreadyRunningAssessmentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Agents is a required field Agents []*AgentAlreadyRunningAssessment `locationName:"agents" min:"1" type:"list" required:"true"` @@ -4403,17 +4403,17 @@ func (s AgentsAlreadyRunningAssessmentException) GoString() string { func newErrorAgentsAlreadyRunningAssessmentException(v protocol.ResponseMetadata) error { return &AgentsAlreadyRunningAssessmentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AgentsAlreadyRunningAssessmentException) Code() string { +func (s *AgentsAlreadyRunningAssessmentException) Code() string { return "AgentsAlreadyRunningAssessmentException" } // Message returns the exception's message. -func (s AgentsAlreadyRunningAssessmentException) Message() string { +func (s *AgentsAlreadyRunningAssessmentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4421,22 +4421,22 @@ func (s AgentsAlreadyRunningAssessmentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AgentsAlreadyRunningAssessmentException) OrigErr() error { +func (s *AgentsAlreadyRunningAssessmentException) OrigErr() error { return nil } -func (s AgentsAlreadyRunningAssessmentException) Error() string { +func (s *AgentsAlreadyRunningAssessmentException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AgentsAlreadyRunningAssessmentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AgentsAlreadyRunningAssessmentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AgentsAlreadyRunningAssessmentException) RequestID() string { - return s.respMetadata.RequestID +func (s *AgentsAlreadyRunningAssessmentException) RequestID() string { + return s.RespMetadata.RequestID } // A snapshot of an Amazon Inspector assessment run that contains the findings @@ -4827,8 +4827,8 @@ func (s *AssessmentRunFilter) SetStates(v []*string) *AssessmentRunFilter { // You cannot perform a specified action if an assessment run is currently in // progress. type AssessmentRunInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The ARNs of the assessment runs that are currently in progress. // @@ -4862,17 +4862,17 @@ func (s AssessmentRunInProgressException) GoString() string { func newErrorAssessmentRunInProgressException(v protocol.ResponseMetadata) error { return &AssessmentRunInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssessmentRunInProgressException) Code() string { +func (s *AssessmentRunInProgressException) Code() string { return "AssessmentRunInProgressException" } // Message returns the exception's message. -func (s AssessmentRunInProgressException) Message() string { +func (s *AssessmentRunInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4880,22 +4880,22 @@ func (s AssessmentRunInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssessmentRunInProgressException) OrigErr() error { +func (s *AssessmentRunInProgressException) OrigErr() error { return nil } -func (s AssessmentRunInProgressException) Error() string { +func (s *AssessmentRunInProgressException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AssessmentRunInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssessmentRunInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssessmentRunInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *AssessmentRunInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // Used as one of the elements of the AssessmentRun data type. @@ -7529,8 +7529,8 @@ func (s *GetTelemetryMetadataOutput) SetTelemetryMetadata(v []*TelemetryMetadata // Internal server error. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can immediately retry your request. // @@ -7553,17 +7553,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7571,29 +7571,29 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // Amazon Inspector cannot assume the cross-account role that it needs to list // your EC2 instances during the assessment run. type InvalidCrossAccountRoleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can immediately retry your request. // @@ -7621,17 +7621,17 @@ func (s InvalidCrossAccountRoleException) GoString() string { func newErrorInvalidCrossAccountRoleException(v protocol.ResponseMetadata) error { return &InvalidCrossAccountRoleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCrossAccountRoleException) Code() string { +func (s *InvalidCrossAccountRoleException) Code() string { return "InvalidCrossAccountRoleException" } // Message returns the exception's message. -func (s InvalidCrossAccountRoleException) Message() string { +func (s *InvalidCrossAccountRoleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7639,29 +7639,29 @@ func (s InvalidCrossAccountRoleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCrossAccountRoleException) OrigErr() error { +func (s *InvalidCrossAccountRoleException) OrigErr() error { return nil } -func (s InvalidCrossAccountRoleException) Error() string { +func (s *InvalidCrossAccountRoleException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCrossAccountRoleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCrossAccountRoleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCrossAccountRoleException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCrossAccountRoleException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because an invalid or out-of-range value was supplied // for an input parameter. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can immediately retry your request. // @@ -7689,17 +7689,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7707,29 +7707,29 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because it attempted to create resources beyond // the current AWS account limits. The error code describes the limit exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can immediately retry your request. // @@ -7757,17 +7757,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7775,22 +7775,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAssessmentRunAgentsInput struct { @@ -8834,8 +8834,8 @@ func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. type NoSuchEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can immediately retry your request. // @@ -8863,17 +8863,17 @@ func (s NoSuchEntityException) GoString() string { func newErrorNoSuchEntityException(v protocol.ResponseMetadata) error { return &NoSuchEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchEntityException) Code() string { +func (s *NoSuchEntityException) Code() string { return "NoSuchEntityException" } // Message returns the exception's message. -func (s NoSuchEntityException) Message() string { +func (s *NoSuchEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8881,22 +8881,22 @@ func (s NoSuchEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchEntityException) OrigErr() error { +func (s *NoSuchEntityException) OrigErr() error { return nil } -func (s NoSuchEntityException) Error() string { +func (s *NoSuchEntityException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchEntityException) RequestID() string { + return s.RespMetadata.RequestID } type PreviewAgentsInput struct { @@ -9005,8 +9005,8 @@ func (s *PreviewAgentsOutput) SetNextToken(v string) *PreviewAgentsOutput { // The request is rejected. The specified assessment template is currently generating // an exclusions preview. type PreviewGenerationInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9023,17 +9023,17 @@ func (s PreviewGenerationInProgressException) GoString() string { func newErrorPreviewGenerationInProgressException(v protocol.ResponseMetadata) error { return &PreviewGenerationInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PreviewGenerationInProgressException) Code() string { +func (s *PreviewGenerationInProgressException) Code() string { return "PreviewGenerationInProgressException" } // Message returns the exception's message. -func (s PreviewGenerationInProgressException) Message() string { +func (s *PreviewGenerationInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9041,22 +9041,22 @@ func (s PreviewGenerationInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PreviewGenerationInProgressException) OrigErr() error { +func (s *PreviewGenerationInProgressException) OrigErr() error { return nil } -func (s PreviewGenerationInProgressException) Error() string { +func (s *PreviewGenerationInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PreviewGenerationInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PreviewGenerationInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PreviewGenerationInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *PreviewGenerationInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a private IP address associated with a network @@ -9520,8 +9520,8 @@ func (s *ServiceAttributes) SetSchemaVersion(v int64) *ServiceAttributes { // The serice is temporary unavailable. type ServiceTemporarilyUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // You can wait and then retry your request. // @@ -9544,17 +9544,17 @@ func (s ServiceTemporarilyUnavailableException) GoString() string { func newErrorServiceTemporarilyUnavailableException(v protocol.ResponseMetadata) error { return &ServiceTemporarilyUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceTemporarilyUnavailableException) Code() string { +func (s *ServiceTemporarilyUnavailableException) Code() string { return "ServiceTemporarilyUnavailableException" } // Message returns the exception's message. -func (s ServiceTemporarilyUnavailableException) Message() string { +func (s *ServiceTemporarilyUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9562,22 +9562,22 @@ func (s ServiceTemporarilyUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceTemporarilyUnavailableException) OrigErr() error { +func (s *ServiceTemporarilyUnavailableException) OrigErr() error { return nil } -func (s ServiceTemporarilyUnavailableException) Error() string { +func (s *ServiceTemporarilyUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceTemporarilyUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceTemporarilyUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceTemporarilyUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceTemporarilyUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type SetTagsForResourceInput struct { @@ -10171,8 +10171,8 @@ func (s UnsubscribeFromEventOutput) GoString() string { // runs that took place or will take place after generating reports in Amazon // Inspector became available. type UnsupportedFeatureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // CanRetry is a required field CanRetry *bool `locationName:"canRetry" type:"boolean" required:"true"` @@ -10192,17 +10192,17 @@ func (s UnsupportedFeatureException) GoString() string { func newErrorUnsupportedFeatureException(v protocol.ResponseMetadata) error { return &UnsupportedFeatureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedFeatureException) Code() string { +func (s *UnsupportedFeatureException) Code() string { return "UnsupportedFeatureException" } // Message returns the exception's message. -func (s UnsupportedFeatureException) Message() string { +func (s *UnsupportedFeatureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10210,22 +10210,22 @@ func (s UnsupportedFeatureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedFeatureException) OrigErr() error { +func (s *UnsupportedFeatureException) OrigErr() error { return nil } -func (s UnsupportedFeatureException) Error() string { +func (s *UnsupportedFeatureException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedFeatureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedFeatureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedFeatureException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedFeatureException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateAssessmentTargetInput struct { 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 2d3ff733cd8..0a75d6e8d41 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 @@ -1725,6 +1725,97 @@ func (c *IoT) CreateCertificateFromCsrWithContext(ctx aws.Context, input *Create return out, req.Send() } +const opCreateDimension = "CreateDimension" + +// CreateDimensionRequest generates a "aws/request.Request" representing the +// client's request for the CreateDimension operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDimension for more information on using the CreateDimension +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDimensionRequest method. +// req, resp := client.CreateDimensionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CreateDimensionRequest(input *CreateDimensionInput) (req *request.Request, output *CreateDimensionOutput) { + op := &request.Operation{ + Name: opCreateDimension, + HTTPMethod: "POST", + HTTPPath: "/dimensions/{name}", + } + + if input == nil { + input = &CreateDimensionInput{} + } + + output = &CreateDimensionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDimension API operation for AWS IoT. +// +// Create a dimension that you can use to limit the scope of a metric used in +// a security profile for AWS IoT Device Defender. For example, using a TOPIC_FILTER +// dimension, you can narrow down the scope of the metric only to MQTT topics +// whose name match the pattern specified in the dimension. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT's +// API operation CreateDimension for usage and error information. +// +// Returned Error Types: +// * InternalFailureException +// An unexpected error has occurred. +// +// * InvalidRequestException +// The request is not valid. +// +// * LimitExceededException +// A limit has been exceeded. +// +// * ResourceAlreadyExistsException +// The resource already exists. +// +// * ThrottlingException +// The rate exceeds the limit. +// +func (c *IoT) CreateDimension(input *CreateDimensionInput) (*CreateDimensionOutput, error) { + req, out := c.CreateDimensionRequest(input) + return out, req.Send() +} + +// CreateDimensionWithContext is the same as CreateDimension with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDimension for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) CreateDimensionWithContext(ctx aws.Context, input *CreateDimensionInput, opts ...request.Option) (*CreateDimensionOutput, error) { + req, out := c.CreateDimensionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateDomainConfiguration = "CreateDomainConfiguration" // CreateDomainConfigurationRequest generates a "aws/request.Request" representing the @@ -3180,7 +3271,7 @@ func (c *IoT) CreateThingRequest(input *CreateThingInput) (req *request.Request, // call is made with the same thing name but different configuration a ResourceAlreadyExistsException // is thrown. // -// This is a control plane operation. See Authorization (https://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) +// This is a control plane operation. See Authorization (https://docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html) // for information about authorizing control plane actions. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3277,7 +3368,7 @@ func (c *IoT) CreateThingGroupRequest(input *CreateThingGroupInput) (req *reques // // Create a thing group. // -// This is a control plane operation. See Authorization (https://docs.aws.amazon.com/iot/latest/developerguide/authorization.html) +// This is a control plane operation. See Authorization (https://docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html) // for information about authorizing control plane actions. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4065,6 +4156,89 @@ func (c *IoT) DeleteCertificateWithContext(ctx aws.Context, input *DeleteCertifi return out, req.Send() } +const opDeleteDimension = "DeleteDimension" + +// DeleteDimensionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDimension operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDimension for more information on using the DeleteDimension +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDimensionRequest method. +// req, resp := client.DeleteDimensionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteDimensionRequest(input *DeleteDimensionInput) (req *request.Request, output *DeleteDimensionOutput) { + op := &request.Operation{ + Name: opDeleteDimension, + HTTPMethod: "DELETE", + HTTPPath: "/dimensions/{name}", + } + + if input == nil { + input = &DeleteDimensionInput{} + } + + output = &DeleteDimensionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDimension API operation for AWS IoT. +// +// Removes the specified dimension from 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 IoT's +// API operation DeleteDimension for usage and error information. +// +// Returned Error Types: +// * InternalFailureException +// An unexpected error has occurred. +// +// * InvalidRequestException +// The request is not valid. +// +// * ThrottlingException +// The rate exceeds the limit. +// +func (c *IoT) DeleteDimension(input *DeleteDimensionInput) (*DeleteDimensionOutput, error) { + req, out := c.DeleteDimensionRequest(input) + return out, req.Send() +} + +// DeleteDimensionWithContext is the same as DeleteDimension with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDimension for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DeleteDimensionWithContext(ctx aws.Context, input *DeleteDimensionInput, opts ...request.Option) (*DeleteDimensionOutput, error) { + req, out := c.DeleteDimensionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDomainConfiguration = "DeleteDomainConfiguration" // DeleteDomainConfigurationRequest generates a "aws/request.Request" representing the @@ -6884,6 +7058,91 @@ func (c *IoT) DescribeDefaultAuthorizerWithContext(ctx aws.Context, input *Descr return out, req.Send() } +const opDescribeDimension = "DescribeDimension" + +// DescribeDimensionRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDimension operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDimension for more information on using the DescribeDimension +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDimensionRequest method. +// req, resp := client.DescribeDimensionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DescribeDimensionRequest(input *DescribeDimensionInput) (req *request.Request, output *DescribeDimensionOutput) { + op := &request.Operation{ + Name: opDescribeDimension, + HTTPMethod: "GET", + HTTPPath: "/dimensions/{name}", + } + + if input == nil { + input = &DescribeDimensionInput{} + } + + output = &DescribeDimensionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDimension API operation for AWS IoT. +// +// Provides details about a dimension that is defined 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 IoT's +// API operation DescribeDimension for usage and error information. +// +// Returned Error Types: +// * InternalFailureException +// An unexpected error has occurred. +// +// * InvalidRequestException +// The request is not valid. +// +// * ResourceNotFoundException +// The specified resource does not exist. +// +// * ThrottlingException +// The rate exceeds the limit. +// +func (c *IoT) DescribeDimension(input *DescribeDimensionInput) (*DescribeDimensionOutput, error) { + req, out := c.DescribeDimensionRequest(input) + return out, req.Send() +} + +// DescribeDimensionWithContext is the same as DescribeDimension with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDimension for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) DescribeDimensionWithContext(ctx aws.Context, input *DescribeDimensionInput, opts ...request.Option) (*DescribeDimensionOutput, error) { + req, out := c.DescribeDimensionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeDomainConfiguration = "DescribeDomainConfiguration" // DescribeDomainConfigurationRequest generates a "aws/request.Request" representing the @@ -6944,6 +7203,9 @@ func (c *IoT) DescribeDomainConfigurationRequest(input *DescribeDomainConfigurat // * ThrottlingException // The rate exceeds the limit. // +// * InvalidRequestException +// The request is not valid. +// // * UnauthorizedException // You are not authorized to perform this operation. // @@ -11156,6 +11418,88 @@ func (c *IoT) ListCertificatesByCAWithContext(ctx aws.Context, input *ListCertif return out, req.Send() } +const opListDimensions = "ListDimensions" + +// ListDimensionsRequest generates a "aws/request.Request" representing the +// client's request for the ListDimensions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDimensions for more information on using the ListDimensions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDimensionsRequest method. +// req, resp := client.ListDimensionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListDimensionsRequest(input *ListDimensionsInput) (req *request.Request, output *ListDimensionsOutput) { + op := &request.Operation{ + Name: opListDimensions, + HTTPMethod: "GET", + HTTPPath: "/dimensions", + } + + if input == nil { + input = &ListDimensionsInput{} + } + + output = &ListDimensionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDimensions API operation for AWS IoT. +// +// List the set of dimensions that are defined for 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 IoT's +// API operation ListDimensions for usage and error information. +// +// Returned Error Types: +// * InternalFailureException +// An unexpected error has occurred. +// +// * InvalidRequestException +// The request is not valid. +// +// * ThrottlingException +// The rate exceeds the limit. +// +func (c *IoT) ListDimensions(input *ListDimensionsInput) (*ListDimensionsOutput, error) { + req, out := c.ListDimensionsRequest(input) + return out, req.Send() +} + +// ListDimensionsWithContext is the same as ListDimensions with the addition of +// the ability to pass a context and additional request options. +// +// See ListDimensions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) ListDimensionsWithContext(ctx aws.Context, input *ListDimensionsInput, opts ...request.Option) (*ListDimensionsOutput, error) { + req, out := c.ListDimensionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListDomainConfigurations = "ListDomainConfigurations" // ListDomainConfigurationsRequest generates a "aws/request.Request" representing the @@ -12731,6 +13075,9 @@ func (c *IoT) ListSecurityProfilesRequest(input *ListSecurityProfilesInput) (req // * InternalFailureException // An unexpected error has occurred. // +// * ResourceNotFoundException +// The specified resource does not exist. +// func (c *IoT) ListSecurityProfiles(input *ListSecurityProfilesInput) (*ListSecurityProfilesOutput, error) { req, out := c.ListSecurityProfilesRequest(input) return out, req.Send() @@ -14509,6 +14856,103 @@ func (c *IoT) RegisterCertificateWithContext(ctx aws.Context, input *RegisterCer return out, req.Send() } +const opRegisterCertificateWithoutCA = "RegisterCertificateWithoutCA" + +// RegisterCertificateWithoutCARequest generates a "aws/request.Request" representing the +// client's request for the RegisterCertificateWithoutCA operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterCertificateWithoutCA for more information on using the RegisterCertificateWithoutCA +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterCertificateWithoutCARequest method. +// req, resp := client.RegisterCertificateWithoutCARequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) RegisterCertificateWithoutCARequest(input *RegisterCertificateWithoutCAInput) (req *request.Request, output *RegisterCertificateWithoutCAOutput) { + op := &request.Operation{ + Name: opRegisterCertificateWithoutCA, + HTTPMethod: "POST", + HTTPPath: "/certificate/register-no-ca", + } + + if input == nil { + input = &RegisterCertificateWithoutCAInput{} + } + + output = &RegisterCertificateWithoutCAOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterCertificateWithoutCA API operation for AWS IoT. +// +// Register a certificate that does not have a certificate authority (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 IoT's +// API operation RegisterCertificateWithoutCA for usage and error information. +// +// Returned Error Types: +// * ResourceAlreadyExistsException +// The resource already exists. +// +// * InvalidRequestException +// The request is not valid. +// +// * CertificateStateException +// The certificate operation is not allowed. +// +// * CertificateValidationException +// The certificate is invalid. +// +// * ThrottlingException +// The rate exceeds the limit. +// +// * UnauthorizedException +// You are not authorized to perform this operation. +// +// * ServiceUnavailableException +// The service is temporarily unavailable. +// +// * InternalFailureException +// An unexpected error has occurred. +// +func (c *IoT) RegisterCertificateWithoutCA(input *RegisterCertificateWithoutCAInput) (*RegisterCertificateWithoutCAOutput, error) { + req, out := c.RegisterCertificateWithoutCARequest(input) + return out, req.Send() +} + +// RegisterCertificateWithoutCAWithContext is the same as RegisterCertificateWithoutCA with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterCertificateWithoutCA for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) RegisterCertificateWithoutCAWithContext(ctx aws.Context, input *RegisterCertificateWithoutCAInput, opts ...request.Option) (*RegisterCertificateWithoutCAOutput, error) { + req, out := c.RegisterCertificateWithoutCARequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRegisterThing = "RegisterThing" // RegisterThingRequest generates a "aws/request.Request" representing the @@ -16806,6 +17250,92 @@ func (c *IoT) UpdateCertificateWithContext(ctx aws.Context, input *UpdateCertifi return out, req.Send() } +const opUpdateDimension = "UpdateDimension" + +// UpdateDimensionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDimension operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDimension for more information on using the UpdateDimension +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDimensionRequest method. +// req, resp := client.UpdateDimensionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateDimensionRequest(input *UpdateDimensionInput) (req *request.Request, output *UpdateDimensionOutput) { + op := &request.Operation{ + Name: opUpdateDimension, + HTTPMethod: "PATCH", + HTTPPath: "/dimensions/{name}", + } + + if input == nil { + input = &UpdateDimensionInput{} + } + + output = &UpdateDimensionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDimension API operation for AWS IoT. +// +// Updates the definition for a dimension. You cannot change the type of a dimension +// after it is created (you can delete it and re-create 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 IoT's +// API operation UpdateDimension for usage and error information. +// +// Returned Error Types: +// * InternalFailureException +// An unexpected error has occurred. +// +// * InvalidRequestException +// The request is not valid. +// +// * ResourceNotFoundException +// The specified resource does not exist. +// +// * ThrottlingException +// The rate exceeds the limit. +// +func (c *IoT) UpdateDimension(input *UpdateDimensionInput) (*UpdateDimensionOutput, error) { + req, out := c.UpdateDimensionRequest(input) + return out, req.Send() +} + +// UpdateDimensionWithContext is the same as UpdateDimension with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDimension for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoT) UpdateDimensionWithContext(ctx aws.Context, input *UpdateDimensionInput, opts ...request.Option) (*UpdateDimensionOutput, error) { + req, out := c.UpdateDimensionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateDomainConfiguration = "UpdateDomainConfiguration" // UpdateDomainConfigurationRequest generates a "aws/request.Request" representing the @@ -18442,6 +18972,9 @@ type Action struct { // Change the state of a CloudWatch alarm. CloudwatchAlarm *CloudwatchAlarmAction `locationName:"cloudwatchAlarm" type:"structure"` + // Send data to CloudWatch Logs. + CloudwatchLogs *CloudwatchLogsAction `locationName:"cloudwatchLogs" type:"structure"` + // Capture a CloudWatch metric. CloudwatchMetric *CloudwatchMetricAction `locationName:"cloudwatchMetric" type:"structure"` @@ -18515,6 +19048,11 @@ func (s *Action) Validate() error { invalidParams.AddNested("CloudwatchAlarm", err.(request.ErrInvalidParams)) } } + if s.CloudwatchLogs != nil { + if err := s.CloudwatchLogs.Validate(); err != nil { + invalidParams.AddNested("CloudwatchLogs", err.(request.ErrInvalidParams)) + } + } if s.CloudwatchMetric != nil { if err := s.CloudwatchMetric.Validate(); err != nil { invalidParams.AddNested("CloudwatchMetric", err.(request.ErrInvalidParams)) @@ -18608,6 +19146,12 @@ func (s *Action) SetCloudwatchAlarm(v *CloudwatchAlarmAction) *Action { return s } +// SetCloudwatchLogs sets the CloudwatchLogs field's value. +func (s *Action) SetCloudwatchLogs(v *CloudwatchLogsAction) *Action { + s.CloudwatchLogs = v + return s +} + // SetCloudwatchMetric sets the CloudwatchMetric field's value. func (s *Action) SetCloudwatchMetric(v *CloudwatchMetricAction) *Action { s.CloudwatchMetric = v @@ -20231,7 +20775,9 @@ type AuthInfo struct { // The resources for which the principal is being authorized to perform the // specified action. - Resources []*string `locationName:"resources" type:"list"` + // + // Resources is a required field + Resources []*string `locationName:"resources" type:"list" required:"true"` } // String returns the string representation @@ -20244,6 +20790,19 @@ func (s AuthInfo) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthInfo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthInfo"} + if s.Resources == nil { + invalidParams.Add(request.NewErrParamRequired("Resources")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetActionType sets the ActionType field's value. func (s *AuthInfo) SetActionType(v string) *AuthInfo { s.ActionType = &v @@ -20571,6 +21130,11 @@ type Behavior struct { // What is measured by the behavior. Metric *string `locationName:"metric" type:"string"` + // The dimension for a metric in your behavior. For example, using a TOPIC_FILTER + // dimension, you can narrow down the scope of the metric only to MQTT topics + // whose name match the pattern specified in the dimension. + MetricDimension *MetricDimension `locationName:"metricDimension" type:"structure"` + // The name you have given to the behavior. // // Name is a required field @@ -20601,6 +21165,11 @@ func (s *Behavior) Validate() error { invalidParams.AddNested("Criteria", err.(request.ErrInvalidParams)) } } + if s.MetricDimension != nil { + if err := s.MetricDimension.Validate(); err != nil { + invalidParams.AddNested("MetricDimension", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -20620,6 +21189,12 @@ func (s *Behavior) SetMetric(v string) *Behavior { return s } +// SetMetricDimension sets the MetricDimension field's value. +func (s *Behavior) SetMetricDimension(v *MetricDimension) *Behavior { + s.MetricDimension = v + return s +} + // SetName sets the Name field's value. func (s *Behavior) SetName(v string) *Behavior { s.Name = &v @@ -21347,6 +21922,9 @@ type Certificate struct { // the certificate ID.) CertificateId *string `locationName:"certificateId" min:"64" type:"string"` + // The mode of the certificate. + CertificateMode *string `locationName:"certificateMode" type:"string" enum:"CertificateMode"` + // The date and time the certificate was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` @@ -21378,6 +21956,12 @@ func (s *Certificate) SetCertificateId(v string) *Certificate { return s } +// SetCertificateMode sets the CertificateMode field's value. +func (s *Certificate) SetCertificateMode(v string) *Certificate { + s.CertificateMode = &v + return s +} + // SetCreationDate sets the CreationDate field's value. func (s *Certificate) SetCreationDate(v time.Time) *Certificate { s.CreationDate = &v @@ -21394,8 +21978,8 @@ func (s *Certificate) SetStatus(v string) *Certificate { // are attempting to register. This is happens when you have registered more // than one CA certificate that has the same subject field and public key. type CertificateConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -21413,17 +21997,17 @@ func (s CertificateConflictException) GoString() string { func newErrorCertificateConflictException(v protocol.ResponseMetadata) error { return &CertificateConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateConflictException) Code() string { +func (s *CertificateConflictException) Code() string { return "CertificateConflictException" } // Message returns the exception's message. -func (s CertificateConflictException) Message() string { +func (s *CertificateConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21431,22 +22015,22 @@ func (s CertificateConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateConflictException) OrigErr() error { +func (s *CertificateConflictException) OrigErr() error { return nil } -func (s CertificateConflictException) Error() string { +func (s *CertificateConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a certificate. @@ -21462,6 +22046,9 @@ type CertificateDescription struct { // The ID of the certificate. CertificateId *string `locationName:"certificateId" min:"64" type:"string"` + // The mode of the certificate. + CertificateMode *string `locationName:"certificateMode" type:"string" enum:"CertificateMode"` + // The certificate data, in PEM format. CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` @@ -21521,6 +22108,12 @@ func (s *CertificateDescription) SetCertificateId(v string) *CertificateDescript return s } +// SetCertificateMode sets the CertificateMode field's value. +func (s *CertificateDescription) SetCertificateMode(v string) *CertificateDescription { + s.CertificateMode = &v + return s +} + // SetCertificatePem sets the CertificatePem field's value. func (s *CertificateDescription) SetCertificatePem(v string) *CertificateDescription { s.CertificatePem = &v @@ -21583,8 +22176,8 @@ func (s *CertificateDescription) SetValidity(v *CertificateValidity) *Certificat // The certificate operation is not allowed. type CertificateStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -21602,17 +22195,17 @@ func (s CertificateStateException) GoString() string { func newErrorCertificateStateException(v protocol.ResponseMetadata) error { return &CertificateStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateStateException) Code() string { +func (s *CertificateStateException) Code() string { return "CertificateStateException" } // Message returns the exception's message. -func (s CertificateStateException) Message() string { +func (s *CertificateStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21620,28 +22213,28 @@ func (s CertificateStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateStateException) OrigErr() error { +func (s *CertificateStateException) OrigErr() error { return nil } -func (s CertificateStateException) Error() string { +func (s *CertificateStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateStateException) RequestID() string { + return s.RespMetadata.RequestID } // The certificate is invalid. type CertificateValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -21659,17 +22252,17 @@ func (s CertificateValidationException) GoString() string { func newErrorCertificateValidationException(v protocol.ResponseMetadata) error { return &CertificateValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CertificateValidationException) Code() string { +func (s *CertificateValidationException) Code() string { return "CertificateValidationException" } // Message returns the exception's message. -func (s CertificateValidationException) Message() string { +func (s *CertificateValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21677,22 +22270,22 @@ func (s CertificateValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CertificateValidationException) OrigErr() error { +func (s *CertificateValidationException) OrigErr() error { return nil } -func (s CertificateValidationException) Error() string { +func (s *CertificateValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CertificateValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CertificateValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CertificateValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *CertificateValidationException) RequestID() string { + return s.RespMetadata.RequestID } // When the certificate is valid. @@ -21837,6 +22430,59 @@ func (s *CloudwatchAlarmAction) SetStateValue(v string) *CloudwatchAlarmAction { return s } +// Describes an action that sends data to CloudWatch Logs. +type CloudwatchLogsAction struct { + _ struct{} `type:"structure"` + + // The CloudWatch log group to which the action sends data. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" type:"string" required:"true"` + + // The IAM role that allows access to the CloudWatch log. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s CloudwatchLogsAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudwatchLogsAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudwatchLogsAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudwatchLogsAction"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CloudwatchLogsAction) SetLogGroupName(v string) *CloudwatchLogsAction { + s.LogGroupName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CloudwatchLogsAction) SetRoleArn(v string) *CloudwatchLogsAction { + s.RoleArn = &v + return s +} + // Describes an action that captures a CloudWatch metric. type CloudwatchMetricAction struct { _ struct{} `type:"structure"` @@ -22141,8 +22787,8 @@ func (s ConfirmTopicRuleDestinationOutput) GoString() string { // A conflicting resource update exception. This exception is thrown when two // pending updates cause a conflict. type ConflictingResourceUpdateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -22160,17 +22806,17 @@ func (s ConflictingResourceUpdateException) GoString() string { func newErrorConflictingResourceUpdateException(v protocol.ResponseMetadata) error { return &ConflictingResourceUpdateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictingResourceUpdateException) Code() string { +func (s *ConflictingResourceUpdateException) Code() string { return "ConflictingResourceUpdateException" } // Message returns the exception's message. -func (s ConflictingResourceUpdateException) Message() string { +func (s *ConflictingResourceUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22178,22 +22824,22 @@ func (s ConflictingResourceUpdateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictingResourceUpdateException) OrigErr() error { +func (s *ConflictingResourceUpdateException) OrigErr() error { return nil } -func (s ConflictingResourceUpdateException) Error() string { +func (s *ConflictingResourceUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictingResourceUpdateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictingResourceUpdateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictingResourceUpdateException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictingResourceUpdateException) RequestID() string { + return s.RespMetadata.RequestID } type CreateAuthorizerInput struct { @@ -22216,6 +22862,15 @@ type CreateAuthorizerInput struct { // The status of the create authorizer request. Status *string `locationName:"status" type:"string" enum:"AuthorizerStatus"` + // Metadata which can be used to manage the custom authorizer. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags []*Tag `locationName:"tags" type:"list"` + // The name of the token key used to extract the token from the HTTP headers. TokenKeyName *string `locationName:"tokenKeyName" min:"1" type:"string"` @@ -22249,6 +22904,16 @@ func (s *CreateAuthorizerInput) Validate() error { if s.TokenKeyName != nil && len(*s.TokenKeyName) < 1 { invalidParams.Add(request.NewErrParamMinLen("TokenKeyName", 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 @@ -22280,6 +22945,12 @@ func (s *CreateAuthorizerInput) SetStatus(v string) *CreateAuthorizerInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateAuthorizerInput) SetTags(v []*Tag) *CreateAuthorizerInput { + s.Tags = v + return s +} + // SetTokenKeyName sets the TokenKeyName field's value. func (s *CreateAuthorizerInput) SetTokenKeyName(v string) *CreateAuthorizerInput { s.TokenKeyName = &v @@ -22358,6 +23029,16 @@ func (s *CreateBillingGroupInput) Validate() error { if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 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 @@ -22519,6 +23200,147 @@ func (s *CreateCertificateFromCsrOutput) SetCertificatePem(v string) *CreateCert return s } +type CreateDimensionInput struct { + _ struct{} `type:"structure"` + + // Each dimension must have a unique client request token. If you try to create + // a new dimension with the same token as a dimension that already exists, an + // exception occurs. If you omit this value, AWS SDKs will automatically generate + // a unique client request. + ClientRequestToken *string `locationName:"clientRequestToken" min:"1" type:"string" idempotencyToken:"true"` + + // A unique identifier for the dimension. Choose something that describes the + // type and value to make it easy to remember what it does. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // Specifies the value or list of values for the dimension. For TOPIC_FILTER + // dimensions, this is a pattern used to match the MQTT topic (for example, + // "admin/#"). + // + // StringValues is a required field + StringValues []*string `locationName:"stringValues" min:"1" type:"list" required:"true"` + + // Metadata that can be used to manage the dimension. + Tags []*Tag `locationName:"tags" type:"list"` + + // Specifies the type of dimension. Supported types: TOPIC_FILTER. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"DimensionType"` +} + +// String returns the string representation +func (s CreateDimensionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDimensionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDimensionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDimensionInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.StringValues == nil { + invalidParams.Add(request.NewErrParamRequired("StringValues")) + } + if s.StringValues != nil && len(s.StringValues) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StringValues", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + 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 *CreateDimensionInput) SetClientRequestToken(v string) *CreateDimensionInput { + s.ClientRequestToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateDimensionInput) SetName(v string) *CreateDimensionInput { + s.Name = &v + return s +} + +// SetStringValues sets the StringValues field's value. +func (s *CreateDimensionInput) SetStringValues(v []*string) *CreateDimensionInput { + s.StringValues = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDimensionInput) SetTags(v []*Tag) *CreateDimensionInput { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *CreateDimensionInput) SetType(v string) *CreateDimensionInput { + s.Type = &v + return s +} + +type CreateDimensionOutput struct { + _ struct{} `type:"structure"` + + // The ARN (Amazon resource name) of the created dimension. + Arn *string `locationName:"arn" type:"string"` + + // A unique identifier for the dimension. + Name *string `locationName:"name" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateDimensionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDimensionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateDimensionOutput) SetArn(v string) *CreateDimensionOutput { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateDimensionOutput) SetName(v string) *CreateDimensionOutput { + s.Name = &v + return s +} + type CreateDomainConfigurationInput struct { _ struct{} `type:"structure"` @@ -22539,8 +23361,19 @@ type CreateDomainConfigurationInput struct { ServerCertificateArns []*string `locationName:"serverCertificateArns" type:"list"` // The type of service delivered by the endpoint. + // + // AWS IoT Core currently supports only the DATA service type. ServiceType *string `locationName:"serviceType" type:"string" enum:"ServiceType"` + // Metadata which can be used to manage the domain configuration. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags []*Tag `locationName:"tags" type:"list"` + // The certificate used to validate the server certificate and prove domain // name ownership. This certificate must be signed by a public certificate authority. // This value is not required for AWS-managed domains. @@ -22577,6 +23410,16 @@ func (s *CreateDomainConfigurationInput) Validate() error { invalidParams.AddNested("AuthorizerConfig", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -22614,6 +23457,12 @@ func (s *CreateDomainConfigurationInput) SetServiceType(v string) *CreateDomainC return s } +// SetTags sets the Tags field's value. +func (s *CreateDomainConfigurationInput) SetTags(v []*Tag) *CreateDomainConfigurationInput { + s.Tags = v + return s +} + // SetValidationCertificateArn sets the ValidationCertificateArn field's value. func (s *CreateDomainConfigurationInput) SetValidationCertificateArn(v string) *CreateDomainConfigurationInput { s.ValidationCertificateArn = &v @@ -22714,6 +23563,16 @@ func (s *CreateDynamicThingGroupInput) Validate() error { if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 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 @@ -22928,6 +23787,16 @@ func (s *CreateJobInput) Validate() error { invalidParams.AddNested("PresignedUrlConfig", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -23174,6 +24043,16 @@ func (s *CreateMitigationActionInput) Validate() error { invalidParams.AddNested("ActionParams", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -23344,6 +24223,16 @@ func (s *CreateOTAUpdateInput) Validate() error { } } } + 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 @@ -23490,6 +24379,15 @@ type CreatePolicyInput struct { // // PolicyName is a required field PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` + + // Metadata which can be used to manage the policy. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -23514,6 +24412,16 @@ func (s *CreatePolicyInput) Validate() error { if s.PolicyName != nil && len(*s.PolicyName) < 1 { invalidParams.Add(request.NewErrParamMinLen("PolicyName", 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 @@ -23533,6 +24441,12 @@ func (s *CreatePolicyInput) SetPolicyName(v string) *CreatePolicyInput { return s } +// SetTags sets the Tags field's value. +func (s *CreatePolicyInput) SetTags(v []*Tag) *CreatePolicyInput { + s.Tags = v + return s +} + // The output from the CreatePolicy operation. type CreatePolicyOutput struct { _ struct{} `type:"structure"` @@ -23803,6 +24717,9 @@ type CreateProvisioningTemplateInput struct { // True to enable the fleet provisioning template, otherwise false. Enabled *bool `locationName:"enabled" type:"boolean"` + // Creates a pre-provisioning hook template. + PreProvisioningHook *ProvisioningHook `locationName:"preProvisioningHook" type:"structure"` + // The role ARN for the role associated with the fleet provisioning template. // This IoT role grants permission to provision a device. // @@ -23857,6 +24774,21 @@ func (s *CreateProvisioningTemplateInput) Validate() error { if s.TemplateName != nil && len(*s.TemplateName) < 1 { invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) } + if s.PreProvisioningHook != nil { + if err := s.PreProvisioningHook.Validate(); err != nil { + invalidParams.AddNested("PreProvisioningHook", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -23876,6 +24808,12 @@ func (s *CreateProvisioningTemplateInput) SetEnabled(v bool) *CreateProvisioning return s } +// SetPreProvisioningHook sets the PreProvisioningHook field's value. +func (s *CreateProvisioningTemplateInput) SetPreProvisioningHook(v *ProvisioningHook) *CreateProvisioningTemplateInput { + s.PreProvisioningHook = v + return s +} + // SetProvisioningRoleArn sets the ProvisioningRoleArn field's value. func (s *CreateProvisioningTemplateInput) SetProvisioningRoleArn(v string) *CreateProvisioningTemplateInput { s.ProvisioningRoleArn = &v @@ -24072,6 +25010,15 @@ type CreateRoleAliasInput struct { // // RoleArn is a required field RoleArn *string `locationName:"roleArn" min:"20" type:"string" required:"true"` + + // Metadata which can be used to manage the role alias. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -24102,6 +25049,16 @@ func (s *CreateRoleAliasInput) Validate() error { if s.RoleArn != nil && len(*s.RoleArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) } + 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 @@ -24127,6 +25084,12 @@ func (s *CreateRoleAliasInput) SetRoleArn(v string) *CreateRoleAliasInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateRoleAliasInput) SetTags(v []*Tag) *CreateRoleAliasInput { + s.Tags = v + return s +} + type CreateRoleAliasOutput struct { _ struct{} `type:"structure"` @@ -24222,6 +25185,16 @@ func (s *CreateScheduledAuditInput) Validate() error { if s.TargetCheckNames == nil { invalidParams.Add(request.NewErrParamRequired("TargetCheckNames")) } + 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 @@ -24294,7 +25267,17 @@ type CreateSecurityProfileInput struct { // A list of metrics whose data is retained (stored). By default, data is retained // for any metric used in the profile's behaviors, but it is also retained for // any metric specified here. - AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" type:"list"` + // + // Note: This API field is deprecated. Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2 + // instead. + // + // Deprecated: Use additionalMetricsToRetainV2. + AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" deprecated:"true" type:"list"` + + // A list of metrics whose data is retained (stored). By default, data is retained + // for any metric used in the profile's behaviors, but it is also retained for + // any metric specified here. + AdditionalMetricsToRetainV2 []*MetricToRetain `locationName:"additionalMetricsToRetainV2" type:"list"` // Specifies the destinations to which alerts are sent. (Alerts are always sent // to the console.) Alerts are generated when a device (thing) violates a behavior. @@ -24335,6 +25318,16 @@ func (s *CreateSecurityProfileInput) Validate() error { if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) } + if s.AdditionalMetricsToRetainV2 != nil { + for i, v := range s.AdditionalMetricsToRetainV2 { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdditionalMetricsToRetainV2", i), err.(request.ErrInvalidParams)) + } + } + } if s.AlertTargets != nil { for i, v := range s.AlertTargets { if v == nil { @@ -24355,6 +25348,16 @@ func (s *CreateSecurityProfileInput) Validate() error { } } } + 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 @@ -24368,6 +25371,12 @@ func (s *CreateSecurityProfileInput) SetAdditionalMetricsToRetain(v []*string) * return s } +// SetAdditionalMetricsToRetainV2 sets the AdditionalMetricsToRetainV2 field's value. +func (s *CreateSecurityProfileInput) SetAdditionalMetricsToRetainV2(v []*MetricToRetain) *CreateSecurityProfileInput { + s.AdditionalMetricsToRetainV2 = v + return s +} + // SetAlertTargets sets the AlertTargets field's value. func (s *CreateSecurityProfileInput) SetAlertTargets(v map[string]*AlertTarget) *CreateSecurityProfileInput { s.AlertTargets = v @@ -24497,6 +25506,16 @@ func (s *CreateStreamInput) Validate() error { } } } + 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 @@ -24624,6 +25643,16 @@ func (s *CreateThingGroupInput) Validate() error { if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 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 @@ -24711,6 +25740,10 @@ type CreateThingInput struct { // The name of the thing to create. // + // You can't change a thing's name after you create it. To change a thing's + // name, you must create a new thing, give it the new name, and then delete + // the old thing. + // // ThingName is a required field ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` @@ -24853,6 +25886,16 @@ func (s *CreateThingTypeInput) Validate() error { if s.ThingTypeName != nil && len(*s.ThingTypeName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ThingTypeName", 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 @@ -25412,8 +26455,8 @@ func (s DeleteCertificateOutput) GoString() string { // You can't delete the resource because it is attached to one or more resources. type DeleteConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -25431,17 +26474,17 @@ func (s DeleteConflictException) GoString() string { func newErrorDeleteConflictException(v protocol.ResponseMetadata) error { return &DeleteConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeleteConflictException) Code() string { +func (s *DeleteConflictException) Code() string { return "DeleteConflictException" } // Message returns the exception's message. -func (s DeleteConflictException) Message() string { +func (s *DeleteConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -25449,22 +26492,77 @@ func (s DeleteConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeleteConflictException) OrigErr() error { +func (s *DeleteConflictException) OrigErr() error { return nil } -func (s DeleteConflictException) Error() string { +func (s *DeleteConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeleteConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeleteConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeleteConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeleteConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type DeleteDimensionInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the dimension that you want to delete. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDimensionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDimensionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDimensionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDimensionInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteDimensionInput) SetName(v string) *DeleteDimensionInput { + s.Name = &v + return s +} + +type DeleteDimensionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDimensionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDimensionOutput) GoString() string { + return s.String() } type DeleteDomainConfigurationInput struct { @@ -27588,6 +28686,116 @@ func (s *DescribeDefaultAuthorizerOutput) SetAuthorizerDescription(v *Authorizer return s } +type DescribeDimensionInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the dimension. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDimensionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDimensionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDimensionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDimensionInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeDimensionInput) SetName(v string) *DescribeDimensionInput { + s.Name = &v + return s +} + +type DescribeDimensionOutput struct { + _ struct{} `type:"structure"` + + // The ARN (Amazon resource name) for the dimension. + Arn *string `locationName:"arn" type:"string"` + + // The date the dimension was created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + + // The date the dimension was last modified. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` + + // The unique identifier for the dimension. + Name *string `locationName:"name" min:"1" type:"string"` + + // The value or list of values used to scope the dimension. For example, for + // topic filters, this is the pattern used to match the MQTT topic name. + StringValues []*string `locationName:"stringValues" min:"1" type:"list"` + + // The type of the dimension. + Type *string `locationName:"type" type:"string" enum:"DimensionType"` +} + +// String returns the string representation +func (s DescribeDimensionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDimensionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeDimensionOutput) SetArn(v string) *DescribeDimensionOutput { + s.Arn = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *DescribeDimensionOutput) SetCreationDate(v time.Time) *DescribeDimensionOutput { + s.CreationDate = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *DescribeDimensionOutput) SetLastModifiedDate(v time.Time) *DescribeDimensionOutput { + s.LastModifiedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeDimensionOutput) SetName(v string) *DescribeDimensionOutput { + s.Name = &v + return s +} + +// SetStringValues sets the StringValues field's value. +func (s *DescribeDimensionOutput) SetStringValues(v []*string) *DescribeDimensionOutput { + s.StringValues = v + return s +} + +// SetType sets the Type field's value. +func (s *DescribeDimensionOutput) SetType(v string) *DescribeDimensionOutput { + s.Type = &v + return s +} + type DescribeDomainConfigurationInput struct { _ struct{} `type:"structure"` @@ -27730,6 +28938,10 @@ type DescribeEndpointInput struct { // endpoint. // // * iot:Jobs - Returns an AWS IoT device management Jobs API endpoint. + // + // We strongly recommend that customers use the newer iot:Data-ATS endpoint + // type to avoid issues related to the widespread distrust of Symantec certificate + // authorities. EndpointType *string `location:"querystring" locationName:"endpointType" type:"string"` } @@ -28273,6 +29485,9 @@ type DescribeProvisioningTemplateOutput struct { // The date when the fleet provisioning template was last modified. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` + // Gets information about a pre-provisioned hook. + PreProvisioningHook *ProvisioningHook `locationName:"preProvisioningHook" type:"structure"` + // The ARN of the role associated with the provisioning template. This IoT role // grants permission to provision a device. ProvisioningRoleArn *string `locationName:"provisioningRoleArn" min:"20" type:"string"` @@ -28327,6 +29542,12 @@ func (s *DescribeProvisioningTemplateOutput) SetLastModifiedDate(v time.Time) *D return s } +// SetPreProvisioningHook sets the PreProvisioningHook field's value. +func (s *DescribeProvisioningTemplateOutput) SetPreProvisioningHook(v *ProvisioningHook) *DescribeProvisioningTemplateOutput { + s.PreProvisioningHook = v + return s +} + // SetProvisioningRoleArn sets the ProvisioningRoleArn field's value. func (s *DescribeProvisioningTemplateOutput) SetProvisioningRoleArn(v string) *DescribeProvisioningTemplateOutput { s.ProvisioningRoleArn = &v @@ -28683,7 +29904,17 @@ type DescribeSecurityProfileOutput struct { // A list of metrics whose data is retained (stored). By default, data is retained // for any metric used in the profile's behaviors, but it is also retained for // any metric specified here. - AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" type:"list"` + // + // Note: This API field is deprecated. Please use DescribeSecurityProfileResponse$additionalMetricsToRetainV2 + // instead. + // + // Deprecated: Use additionalMetricsToRetainV2. + AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" deprecated:"true" type:"list"` + + // A list of metrics whose data is retained (stored). By default, data is retained + // for any metric used in the profile's behaviors, but it is also retained for + // any metric specified here. + AdditionalMetricsToRetainV2 []*MetricToRetain `locationName:"additionalMetricsToRetainV2" type:"list"` // Where the alerts are sent. (Alerts are always sent to the console.) AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` @@ -28729,6 +29960,12 @@ func (s *DescribeSecurityProfileOutput) SetAdditionalMetricsToRetain(v []*string return s } +// SetAdditionalMetricsToRetainV2 sets the AdditionalMetricsToRetainV2 field's value. +func (s *DescribeSecurityProfileOutput) SetAdditionalMetricsToRetainV2(v []*MetricToRetain) *DescribeSecurityProfileOutput { + s.AdditionalMetricsToRetainV2 = v + return s +} + // SetAlertTargets sets the AlertTargets field's value. func (s *DescribeSecurityProfileOutput) SetAlertTargets(v map[string]*AlertTarget) *DescribeSecurityProfileOutput { s.AlertTargets = v @@ -29038,7 +30275,14 @@ type DescribeThingOutput struct { // The name of the billing group the thing belongs to. BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` - // The default client ID. + // The default MQTT client ID. For a typical device, the thing name is also + // used as the default MQTT client ID. Although we don’t require a mapping + // between a thing's registry name and its use of MQTT client IDs, certificates, + // or shadow state, we recommend that you choose a thing name and use it as + // the MQTT client ID for the registry and the Device Shadow service. + // + // This lets you better organize your AWS IoT fleet without removing the flexibility + // of the underlying device certificate model or shadows. DefaultClientId *string `locationName:"defaultClientId" type:"string"` // The ARN of the thing to describe. @@ -31723,7 +32967,7 @@ type HttpAction struct { // URL must be a prefix of the endpoint URL. If you do not specify a confirmation // URL AWS IoT uses the endpoint URL as the confirmation URL. If you use substitution // templates in the confirmationUrl, you must create and enable topic rule destinations - // that match each possible value of the substituion template before traffic + // that match each possible value of the substitution template before traffic // is allowed to your endpoint URL. ConfirmationUrl *string `locationName:"confirmationUrl" type:"string"` @@ -32059,8 +33303,8 @@ func (s *ImplicitDeny) SetPolicies(v []*Policy) *ImplicitDeny { // The index is not ready. type IndexNotReadyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32078,17 +33322,17 @@ func (s IndexNotReadyException) GoString() string { func newErrorIndexNotReadyException(v protocol.ResponseMetadata) error { return &IndexNotReadyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IndexNotReadyException) Code() string { +func (s *IndexNotReadyException) Code() string { return "IndexNotReadyException" } // Message returns the exception's message. -func (s IndexNotReadyException) Message() string { +func (s *IndexNotReadyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32096,28 +33340,28 @@ func (s IndexNotReadyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IndexNotReadyException) OrigErr() error { +func (s *IndexNotReadyException) OrigErr() error { return nil } -func (s IndexNotReadyException) Error() string { +func (s *IndexNotReadyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IndexNotReadyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IndexNotReadyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IndexNotReadyException) RequestID() string { - return s.respMetadata.RequestID +func (s *IndexNotReadyException) RequestID() string { + return s.RespMetadata.RequestID } // An unexpected error has occurred. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32135,17 +33379,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32153,28 +33397,28 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // An unexpected error has occurred. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32192,17 +33436,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32210,28 +33454,28 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The aggregation is invalid. type InvalidAggregationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -32248,17 +33492,17 @@ func (s InvalidAggregationException) GoString() string { func newErrorInvalidAggregationException(v protocol.ResponseMetadata) error { return &InvalidAggregationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAggregationException) Code() string { +func (s *InvalidAggregationException) Code() string { return "InvalidAggregationException" } // Message returns the exception's message. -func (s InvalidAggregationException) Message() string { +func (s *InvalidAggregationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32266,28 +33510,28 @@ func (s InvalidAggregationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAggregationException) OrigErr() error { +func (s *InvalidAggregationException) OrigErr() error { return nil } -func (s InvalidAggregationException) Error() string { +func (s *InvalidAggregationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAggregationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAggregationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAggregationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAggregationException) RequestID() string { + return s.RespMetadata.RequestID } // The query is invalid. type InvalidQueryException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32305,17 +33549,17 @@ func (s InvalidQueryException) GoString() string { func newErrorInvalidQueryException(v protocol.ResponseMetadata) error { return &InvalidQueryException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidQueryException) Code() string { +func (s *InvalidQueryException) Code() string { return "InvalidQueryException" } // Message returns the exception's message. -func (s InvalidQueryException) Message() string { +func (s *InvalidQueryException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32323,28 +33567,28 @@ func (s InvalidQueryException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidQueryException) OrigErr() error { +func (s *InvalidQueryException) OrigErr() error { return nil } -func (s InvalidQueryException) Error() string { +func (s *InvalidQueryException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidQueryException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidQueryException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidQueryException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidQueryException) RequestID() string { + return s.RespMetadata.RequestID } // The request is not valid. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32362,17 +33606,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32380,28 +33624,28 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The response is invalid. type InvalidResponseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32419,17 +33663,17 @@ func (s InvalidResponseException) GoString() string { func newErrorInvalidResponseException(v protocol.ResponseMetadata) error { return &InvalidResponseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResponseException) Code() string { +func (s *InvalidResponseException) Code() string { return "InvalidResponseException" } // Message returns the exception's message. -func (s InvalidResponseException) Message() string { +func (s *InvalidResponseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32437,30 +33681,30 @@ func (s InvalidResponseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResponseException) OrigErr() error { +func (s *InvalidResponseException) OrigErr() error { return nil } -func (s InvalidResponseException) Error() string { +func (s *InvalidResponseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResponseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResponseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResponseException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResponseException) RequestID() string { + return s.RespMetadata.RequestID } // An attempt was made to change to an invalid state, for example by deleting // a job or a job execution which is "IN_PROGRESS" without setting the force // parameter. type InvalidStateTransitionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -32478,17 +33722,17 @@ func (s InvalidStateTransitionException) GoString() string { func newErrorInvalidStateTransitionException(v protocol.ResponseMetadata) error { return &InvalidStateTransitionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateTransitionException) Code() string { +func (s *InvalidStateTransitionException) Code() string { return "InvalidStateTransitionException" } // Message returns the exception's message. -func (s InvalidStateTransitionException) Message() string { +func (s *InvalidStateTransitionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -32496,22 +33740,22 @@ func (s InvalidStateTransitionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateTransitionException) OrigErr() error { +func (s *InvalidStateTransitionException) OrigErr() error { return nil } -func (s InvalidStateTransitionException) Error() string { +func (s *InvalidStateTransitionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateTransitionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateTransitionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateTransitionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateTransitionException) RequestID() string { + return s.RespMetadata.RequestID } // Sends message data to an AWS IoT Analytics channel. @@ -33529,8 +34773,8 @@ func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction { // A limit has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -33548,17 +34792,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -33566,22 +34810,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListActiveViolationsInput struct { @@ -34789,6 +36033,85 @@ func (s *ListCertificatesOutput) SetNextMarker(v string) *ListCertificatesOutput return s } +type ListDimensionsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to retrieve at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListDimensionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDimensionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDimensionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDimensionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDimensionsInput) SetMaxResults(v int64) *ListDimensionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDimensionsInput) SetNextToken(v string) *ListDimensionsInput { + s.NextToken = &v + return s +} + +type ListDimensionsOutput struct { + _ struct{} `type:"structure"` + + // A list of the names of the defined dimensions. Use DescribeDimension to get + // details for a dimension. + DimensionNames []*string `locationName:"dimensionNames" type:"list"` + + // A token that can be used to retrieve the next set of results, or null if + // there are no additional results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListDimensionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDimensionsOutput) GoString() string { + return s.String() +} + +// SetDimensionNames sets the DimensionNames field's value. +func (s *ListDimensionsOutput) SetDimensionNames(v []*string) *ListDimensionsOutput { + s.DimensionNames = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDimensionsOutput) SetNextToken(v string) *ListDimensionsOutput { + s.NextToken = &v + return s +} + type ListDomainConfigurationsInput struct { _ struct{} `type:"structure"` @@ -36453,6 +37776,9 @@ func (s *ListSecurityProfilesForTargetOutput) SetSecurityProfileTargetMappings(v type ListSecurityProfilesInput struct { _ struct{} `type:"structure"` + // A filter to limit results to the security profiles that use the defined dimension. + DimensionName *string `location:"querystring" locationName:"dimensionName" min:"1" type:"string"` + // The maximum number of results to return at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` @@ -36473,6 +37799,9 @@ func (s ListSecurityProfilesInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ListSecurityProfilesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListSecurityProfilesInput"} + if s.DimensionName != nil && len(*s.DimensionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DimensionName", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -36483,6 +37812,12 @@ func (s *ListSecurityProfilesInput) Validate() error { return nil } +// SetDimensionName sets the DimensionName field's value. +func (s *ListSecurityProfilesInput) SetDimensionName(v string) *ListSecurityProfilesInput { + s.DimensionName = &v + return s +} + // SetMaxResults sets the MaxResults field's value. func (s *ListSecurityProfilesInput) SetMaxResults(v int64) *ListSecurityProfilesInput { s.MaxResults = &v @@ -38287,8 +39622,8 @@ func (s *LoggingOptionsPayload) SetRoleArn(v string) *LoggingOptionsPayload { // The policy documentation is not valid. type MalformedPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -38306,17 +39641,17 @@ func (s MalformedPolicyException) GoString() string { func newErrorMalformedPolicyException(v protocol.ResponseMetadata) error { return &MalformedPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedPolicyException) Code() string { +func (s *MalformedPolicyException) Code() string { return "MalformedPolicyException" } // Message returns the exception's message. -func (s MalformedPolicyException) Message() string { +func (s *MalformedPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -38324,22 +39659,131 @@ func (s MalformedPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedPolicyException) OrigErr() error { +func (s *MalformedPolicyException) OrigErr() error { return nil } -func (s MalformedPolicyException) Error() string { +func (s *MalformedPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedPolicyException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The dimension of a metric. +type MetricDimension struct { + _ struct{} `type:"structure"` + + // A unique identifier for the dimension. + // + // DimensionName is a required field + DimensionName *string `locationName:"dimensionName" min:"1" type:"string" required:"true"` + + // Defines how the dimensionValues of a dimension are interpreted. For example, + // for dimension type TOPIC_FILTER, the IN operator, a message will be counted + // only if its topic matches one of the topic filters. With NOT_IN operator, + // a message will be counted only if it doesn't match any of the topic filters. + // The operator is optional: if it's not provided (is null), it will be interpreted + // as IN. + Operator *string `locationName:"operator" type:"string" enum:"DimensionValueOperator"` +} + +// String returns the string representation +func (s MetricDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricDimension) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricDimension) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricDimension"} + if s.DimensionName == nil { + invalidParams.Add(request.NewErrParamRequired("DimensionName")) + } + if s.DimensionName != nil && len(*s.DimensionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DimensionName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDimensionName sets the DimensionName field's value. +func (s *MetricDimension) SetDimensionName(v string) *MetricDimension { + s.DimensionName = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *MetricDimension) SetOperator(v string) *MetricDimension { + s.Operator = &v + return s +} + +// The metric you want to retain. Dimensions are optional. +type MetricToRetain struct { + _ struct{} `type:"structure"` + + // What is measured by the behavior. + // + // Metric is a required field + Metric *string `locationName:"metric" type:"string" required:"true"` + + // The dimension of a metric. + MetricDimension *MetricDimension `locationName:"metricDimension" type:"structure"` +} + +// String returns the string representation +func (s MetricToRetain) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricToRetain) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricToRetain) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricToRetain"} + if s.Metric == nil { + invalidParams.Add(request.NewErrParamRequired("Metric")) + } + if s.MetricDimension != nil { + if err := s.MetricDimension.Validate(); err != nil { + invalidParams.AddNested("MetricDimension", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMetric sets the Metric field's value. +func (s *MetricToRetain) SetMetric(v string) *MetricToRetain { + s.Metric = &v + return s +} + +// SetMetricDimension sets the MetricDimension field's value. +func (s *MetricToRetain) SetMetricDimension(v *MetricDimension) *MetricToRetain { + s.MetricDimension = v + return s } // The value to be compared with the metric. @@ -38707,8 +40151,8 @@ func (s *NonCompliantResource) SetResourceType(v string) *NonCompliantResource { // The resource is not configured. type NotConfiguredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -38726,17 +40170,17 @@ func (s NotConfiguredException) GoString() string { func newErrorNotConfiguredException(v protocol.ResponseMetadata) error { return &NotConfiguredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotConfiguredException) Code() string { +func (s *NotConfiguredException) Code() string { return "NotConfiguredException" } // Message returns the exception's message. -func (s NotConfiguredException) Message() string { +func (s *NotConfiguredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -38744,22 +40188,22 @@ func (s NotConfiguredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotConfiguredException) OrigErr() error { +func (s *NotConfiguredException) OrigErr() error { return nil } -func (s NotConfiguredException) Error() string { +func (s *NotConfiguredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotConfiguredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotConfiguredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotConfiguredException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotConfiguredException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a file to be associated with an OTA update. @@ -39327,6 +40771,61 @@ func (s *PresignedUrlConfig) SetRoleArn(v string) *PresignedUrlConfig { return s } +// Structure that contains payloadVersion and targetArn. +type ProvisioningHook struct { + _ struct{} `type:"structure"` + + // The payload that was sent to the target function. + // + // Note: Only Lambda functions are currently supported. + PayloadVersion *string `locationName:"payloadVersion" min:"10" type:"string"` + + // The ARN of the target function. + // + // Note: Only Lambda functions are currently supported. + // + // TargetArn is a required field + TargetArn *string `locationName:"targetArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ProvisioningHook) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningHook) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisioningHook) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisioningHook"} + if s.PayloadVersion != nil && len(*s.PayloadVersion) < 10 { + invalidParams.Add(request.NewErrParamMinLen("PayloadVersion", 10)) + } + if s.TargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("TargetArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPayloadVersion sets the PayloadVersion field's value. +func (s *ProvisioningHook) SetPayloadVersion(v string) *ProvisioningHook { + s.PayloadVersion = &v + return s +} + +// SetTargetArn sets the TargetArn field's value. +func (s *ProvisioningHook) SetTargetArn(v string) *ProvisioningHook { + s.TargetArn = &v + return s +} + // A summary of information about a fleet provisioning template. type ProvisioningTemplateSummary struct { _ struct{} `type:"structure"` @@ -39688,6 +41187,15 @@ type RegisterCACertificateInput struct { // A boolean value that specifies if the CA certificate is set to active. SetAsActive *bool `location:"querystring" locationName:"setAsActive" type:"boolean"` + // Metadata which can be used to manage the CA certificate. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags []*Tag `locationName:"tags" type:"list"` + // The private key verification certificate. // // VerificationCertificate is a required field @@ -39724,6 +41232,16 @@ func (s *RegisterCACertificateInput) Validate() error { invalidParams.AddNested("RegistrationConfig", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -39755,6 +41273,12 @@ func (s *RegisterCACertificateInput) SetSetAsActive(v bool) *RegisterCACertifica return s } +// SetTags sets the Tags field's value. +func (s *RegisterCACertificateInput) SetTags(v []*Tag) *RegisterCACertificateInput { + s.Tags = v + return s +} + // SetVerificationCertificate sets the VerificationCertificate field's value. func (s *RegisterCACertificateInput) SetVerificationCertificate(v string) *RegisterCACertificateInput { s.VerificationCertificate = &v @@ -39901,14 +41425,98 @@ func (s *RegisterCertificateOutput) SetCertificateId(v string) *RegisterCertific return s } +type RegisterCertificateWithoutCAInput struct { + _ struct{} `type:"structure"` + + // The certificate data, in PEM format. + // + // CertificatePem is a required field + CertificatePem *string `locationName:"certificatePem" min:"1" type:"string" required:"true"` + + // The status of the register certificate request. + Status *string `locationName:"status" type:"string" enum:"CertificateStatus"` +} + +// String returns the string representation +func (s RegisterCertificateWithoutCAInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterCertificateWithoutCAInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterCertificateWithoutCAInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterCertificateWithoutCAInput"} + if s.CertificatePem == nil { + invalidParams.Add(request.NewErrParamRequired("CertificatePem")) + } + if s.CertificatePem != nil && len(*s.CertificatePem) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CertificatePem", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificatePem sets the CertificatePem field's value. +func (s *RegisterCertificateWithoutCAInput) SetCertificatePem(v string) *RegisterCertificateWithoutCAInput { + s.CertificatePem = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *RegisterCertificateWithoutCAInput) SetStatus(v string) *RegisterCertificateWithoutCAInput { + s.Status = &v + return s +} + +type RegisterCertificateWithoutCAOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the registered certificate. + CertificateArn *string `locationName:"certificateArn" type:"string"` + + // The ID of the registered certificate. (The last part of the certificate ARN + // contains the certificate ID. + CertificateId *string `locationName:"certificateId" min:"64" type:"string"` +} + +// String returns the string representation +func (s RegisterCertificateWithoutCAOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterCertificateWithoutCAOutput) GoString() string { + return s.String() +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *RegisterCertificateWithoutCAOutput) SetCertificateArn(v string) *RegisterCertificateWithoutCAOutput { + s.CertificateArn = &v + return s +} + +// SetCertificateId sets the CertificateId field's value. +func (s *RegisterCertificateWithoutCAOutput) SetCertificateId(v string) *RegisterCertificateWithoutCAOutput { + s.CertificateId = &v + return s +} + type RegisterThingInput struct { _ struct{} `type:"structure"` - // The parameters for provisioning a thing. See Programmatic Provisioning (https://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) + // The parameters for provisioning a thing. See Provisioning Templates (https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html) // for more information. Parameters map[string]*string `locationName:"parameters" type:"map"` - // The provisioning template. See Programmatic Provisioning (https://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) + // The provisioning template. See Provisioning Devices That Have Device Certificates + // (https://docs.aws.amazon.com/iot/latest/developerguide/provision-w-cert.html) // for more information. // // TemplateBody is a required field @@ -39953,7 +41561,7 @@ func (s *RegisterThingInput) SetTemplateBody(v string) *RegisterThingInput { type RegisterThingOutput struct { _ struct{} `type:"structure"` - // . + // The certificate data, in PEM format. CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` // ARNs for the generated resources. @@ -39984,8 +41592,8 @@ func (s *RegisterThingOutput) SetResourceArns(v map[string]*string) *RegisterThi // The registration code is invalid. type RegistrationCodeValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Additional information about the exception. Message_ *string `locationName:"message" type:"string"` @@ -40003,17 +41611,17 @@ func (s RegistrationCodeValidationException) GoString() string { func newErrorRegistrationCodeValidationException(v protocol.ResponseMetadata) error { return &RegistrationCodeValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RegistrationCodeValidationException) Code() string { +func (s *RegistrationCodeValidationException) Code() string { return "RegistrationCodeValidationException" } // Message returns the exception's message. -func (s RegistrationCodeValidationException) Message() string { +func (s *RegistrationCodeValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -40021,22 +41629,22 @@ func (s RegistrationCodeValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RegistrationCodeValidationException) OrigErr() error { +func (s *RegistrationCodeValidationException) OrigErr() error { return nil } -func (s RegistrationCodeValidationException) Error() string { +func (s *RegistrationCodeValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RegistrationCodeValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RegistrationCodeValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RegistrationCodeValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *RegistrationCodeValidationException) RequestID() string { + return s.RespMetadata.RequestID } // The registration configuration. @@ -40533,8 +42141,8 @@ func (s *RepublishAction) SetTopic(v string) *RepublishAction { // The resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -40558,17 +42166,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -40576,22 +42184,22 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Information that identifies the noncompliant resource. @@ -40713,8 +42321,8 @@ func (s *ResourceIdentifier) SetRoleAliasArn(v string) *ResourceIdentifier { // The specified resource does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -40732,17 +42340,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -40750,28 +42358,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The resource registration failed. type ResourceRegistrationFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -40789,17 +42397,17 @@ func (s ResourceRegistrationFailureException) GoString() string { func newErrorResourceRegistrationFailureException(v protocol.ResponseMetadata) error { return &ResourceRegistrationFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceRegistrationFailureException) Code() string { +func (s *ResourceRegistrationFailureException) Code() string { return "ResourceRegistrationFailureException" } // Message returns the exception's message. -func (s ResourceRegistrationFailureException) Message() string { +func (s *ResourceRegistrationFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -40807,22 +42415,22 @@ func (s ResourceRegistrationFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceRegistrationFailureException) OrigErr() error { +func (s *ResourceRegistrationFailureException) OrigErr() error { return nil } -func (s ResourceRegistrationFailureException) Error() string { +func (s *ResourceRegistrationFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceRegistrationFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceRegistrationFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceRegistrationFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceRegistrationFailureException) RequestID() string { + return s.RespMetadata.RequestID } // Role alias description. @@ -41472,8 +43080,8 @@ func (s *ServerCertificateSummary) SetServerCertificateStatusDetail(v string) *S // The service is temporarily unavailable. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -41491,17 +43099,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -41509,22 +43117,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type SetDefaultAuthorizerInput struct { @@ -42035,8 +43643,8 @@ func (s *SnsAction) SetTargetArn(v string) *SnsAction { // The Rule-SQL expression can't be parsed correctly. type SqlParseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -42054,17 +43662,17 @@ func (s SqlParseException) GoString() string { func newErrorSqlParseException(v protocol.ResponseMetadata) error { return &SqlParseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SqlParseException) Code() string { +func (s *SqlParseException) Code() string { return "SqlParseException" } // Message returns the exception's message. -func (s SqlParseException) Message() string { +func (s *SqlParseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42072,22 +43680,22 @@ func (s SqlParseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SqlParseException) OrigErr() error { +func (s *SqlParseException) OrigErr() error { return nil } -func (s SqlParseException) Error() string { +func (s *SqlParseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SqlParseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SqlParseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SqlParseException) RequestID() string { - return s.respMetadata.RequestID +func (s *SqlParseException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an action to publish data to an Amazon SQS queue. @@ -42981,10 +44589,12 @@ type Tag struct { _ struct{} `type:"structure"` // The tag's key. - Key *string `type:"string"` + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` // The tag's value. - Value *string `type:"string"` + Value *string `min:"1" type:"string"` } // String returns the string representation @@ -42997,6 +44607,25 @@ func (s Tag) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetKey sets the Key field's value. func (s *Tag) SetKey(v string) *Tag { s.Key = &v @@ -43042,6 +44671,16 @@ func (s *TagResourceInput) Validate() error { 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 @@ -43078,8 +44717,8 @@ func (s TagResourceOutput) GoString() string { // This exception occurs if you attempt to start a task with the same task-id // as an existing task but with a different clientRequestToken. type TaskAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -43096,17 +44735,17 @@ func (s TaskAlreadyExistsException) GoString() string { func newErrorTaskAlreadyExistsException(v protocol.ResponseMetadata) error { return &TaskAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TaskAlreadyExistsException) Code() string { +func (s *TaskAlreadyExistsException) Code() string { return "TaskAlreadyExistsException" } // Message returns the exception's message. -func (s TaskAlreadyExistsException) Message() string { +func (s *TaskAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -43114,22 +44753,22 @@ func (s TaskAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TaskAlreadyExistsException) OrigErr() error { +func (s *TaskAlreadyExistsException) OrigErr() error { return nil } -func (s TaskAlreadyExistsException) Error() string { +func (s *TaskAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TaskAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TaskAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TaskAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TaskAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Statistics for the checks performed during the audit. @@ -43320,6 +44959,16 @@ func (s *TestAuthorizationInput) Validate() error { if s.AuthInfos != nil && len(s.AuthInfos) < 1 { invalidParams.Add(request.NewErrParamMinLen("AuthInfos", 1)) } + if s.AuthInfos != nil { + for i, v := range s.AuthInfos { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AuthInfos", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -43407,7 +45056,7 @@ type TestInvokeAuthorizerInput struct { Token *string `locationName:"token" min:"1" type:"string"` // The signature made with the token and your custom authentication service's - // private key. + // private key. This value must be Base-64-encoded. TokenSignature *string `locationName:"tokenSignature" min:"1" type:"string"` } @@ -44138,8 +45787,8 @@ func (s *ThingTypeProperties) SetThingTypeDescription(v string) *ThingTypeProper // The rate exceeds the limit. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -44157,17 +45806,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -44175,22 +45824,22 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the amount of time each device has to finish its execution of the @@ -44711,8 +46360,8 @@ func (s *TopicRulePayload) SetSql(v string) *TopicRulePayload { // You can't revert the certificate transfer because the transfer is already // complete. type TransferAlreadyCompletedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -44730,17 +46379,17 @@ func (s TransferAlreadyCompletedException) GoString() string { func newErrorTransferAlreadyCompletedException(v protocol.ResponseMetadata) error { return &TransferAlreadyCompletedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TransferAlreadyCompletedException) Code() string { +func (s *TransferAlreadyCompletedException) Code() string { return "TransferAlreadyCompletedException" } // Message returns the exception's message. -func (s TransferAlreadyCompletedException) Message() string { +func (s *TransferAlreadyCompletedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -44748,22 +46397,22 @@ func (s TransferAlreadyCompletedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TransferAlreadyCompletedException) OrigErr() error { +func (s *TransferAlreadyCompletedException) OrigErr() error { return nil } -func (s TransferAlreadyCompletedException) Error() string { +func (s *TransferAlreadyCompletedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TransferAlreadyCompletedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TransferAlreadyCompletedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TransferAlreadyCompletedException) RequestID() string { - return s.respMetadata.RequestID +func (s *TransferAlreadyCompletedException) RequestID() string { + return s.RespMetadata.RequestID } // The input for the TransferCertificate operation. @@ -44862,8 +46511,8 @@ func (s *TransferCertificateOutput) SetTransferredCertificateArn(v string) *Tran // You can't transfer the certificate because authorization policies are still // attached. type TransferConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -44881,17 +46530,17 @@ func (s TransferConflictException) GoString() string { func newErrorTransferConflictException(v protocol.ResponseMetadata) error { return &TransferConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TransferConflictException) Code() string { +func (s *TransferConflictException) Code() string { return "TransferConflictException" } // Message returns the exception's message. -func (s TransferConflictException) Message() string { +func (s *TransferConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -44899,22 +46548,22 @@ func (s TransferConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TransferConflictException) OrigErr() error { +func (s *TransferConflictException) OrigErr() error { return nil } -func (s TransferConflictException) Error() string { +func (s *TransferConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TransferConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TransferConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TransferConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *TransferConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Data used to transfer a certificate to an AWS account. @@ -44979,8 +46628,8 @@ func (s *TransferData) SetTransferMessage(v string) *TransferData { // You are not authorized to perform this operation. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -44998,17 +46647,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -45016,22 +46665,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -45548,9 +47197,10 @@ type UpdateCertificateInput struct { // The new status. // - // Note: Setting the status to PENDING_TRANSFER will result in an exception - // being thrown. PENDING_TRANSFER is a status used internally by AWS IoT. It - // is not intended for developer use. + // Note: Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result + // in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are + // statuses used internally by AWS IoT. They are not intended for developer + // use. // // Note: The status value REGISTER_INACTIVE is deprecated and should not be // used. @@ -45655,6 +47305,138 @@ func (s *UpdateDeviceCertificateParams) SetAction(v string) *UpdateDeviceCertifi return s } +type UpdateDimensionInput struct { + _ struct{} `type:"structure"` + + // A unique identifier for the dimension. Choose something that describes the + // type and value to make it easy to remember what it does. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // Specifies the value or list of values for the dimension. For TOPIC_FILTER + // dimensions, this is a pattern used to match the MQTT topic (for example, + // "admin/#"). + // + // StringValues is a required field + StringValues []*string `locationName:"stringValues" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateDimensionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDimensionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDimensionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDimensionInput"} + 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.StringValues == nil { + invalidParams.Add(request.NewErrParamRequired("StringValues")) + } + if s.StringValues != nil && len(s.StringValues) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StringValues", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *UpdateDimensionInput) SetName(v string) *UpdateDimensionInput { + s.Name = &v + return s +} + +// SetStringValues sets the StringValues field's value. +func (s *UpdateDimensionInput) SetStringValues(v []*string) *UpdateDimensionInput { + s.StringValues = v + return s +} + +type UpdateDimensionOutput struct { + _ struct{} `type:"structure"` + + // The ARN (Amazon resource name) of the created dimension. + Arn *string `locationName:"arn" type:"string"` + + // The date and time, in milliseconds since epoch, when the dimension was initially + // created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` + + // The date and time, in milliseconds since epoch, when the dimension was most + // recently updated. + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` + + // A unique identifier for the dimension. + Name *string `locationName:"name" min:"1" type:"string"` + + // The value or list of values used to scope the dimension. For example, for + // topic filters, this is the pattern used to match the MQTT topic name. + StringValues []*string `locationName:"stringValues" min:"1" type:"list"` + + // The type of the dimension. + Type *string `locationName:"type" type:"string" enum:"DimensionType"` +} + +// String returns the string representation +func (s UpdateDimensionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDimensionOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *UpdateDimensionOutput) SetArn(v string) *UpdateDimensionOutput { + s.Arn = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *UpdateDimensionOutput) SetCreationDate(v time.Time) *UpdateDimensionOutput { + s.CreationDate = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *UpdateDimensionOutput) SetLastModifiedDate(v time.Time) *UpdateDimensionOutput { + s.LastModifiedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateDimensionOutput) SetName(v string) *UpdateDimensionOutput { + s.Name = &v + return s +} + +// SetStringValues sets the StringValues field's value. +func (s *UpdateDimensionOutput) SetStringValues(v []*string) *UpdateDimensionOutput { + s.StringValues = v + return s +} + +// SetType sets the Type field's value. +func (s *UpdateDimensionOutput) SetType(v string) *UpdateDimensionOutput { + s.Type = &v + return s +} + type UpdateDomainConfigurationInput struct { _ struct{} `type:"structure"` @@ -46219,10 +48001,16 @@ type UpdateProvisioningTemplateInput struct { // True to enable the fleet provisioning template, otherwise false. Enabled *bool `locationName:"enabled" type:"boolean"` + // Updates the pre-provisioning hook template. + PreProvisioningHook *ProvisioningHook `locationName:"preProvisioningHook" type:"structure"` + // The ARN of the role associated with the provisioning template. This IoT role // grants permission to provision a device. ProvisioningRoleArn *string `locationName:"provisioningRoleArn" min:"20" type:"string"` + // Removes pre-provisioning hook template. + RemovePreProvisioningHook *bool `locationName:"removePreProvisioningHook" type:"boolean"` + // The name of the fleet provisioning template. // // TemplateName is a required field @@ -46251,6 +48039,11 @@ func (s *UpdateProvisioningTemplateInput) Validate() error { if s.TemplateName != nil && len(*s.TemplateName) < 1 { invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) } + if s.PreProvisioningHook != nil { + if err := s.PreProvisioningHook.Validate(); err != nil { + invalidParams.AddNested("PreProvisioningHook", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -46276,12 +48069,24 @@ func (s *UpdateProvisioningTemplateInput) SetEnabled(v bool) *UpdateProvisioning return s } +// SetPreProvisioningHook sets the PreProvisioningHook field's value. +func (s *UpdateProvisioningTemplateInput) SetPreProvisioningHook(v *ProvisioningHook) *UpdateProvisioningTemplateInput { + s.PreProvisioningHook = v + return s +} + // SetProvisioningRoleArn sets the ProvisioningRoleArn field's value. func (s *UpdateProvisioningTemplateInput) SetProvisioningRoleArn(v string) *UpdateProvisioningTemplateInput { s.ProvisioningRoleArn = &v return s } +// SetRemovePreProvisioningHook sets the RemovePreProvisioningHook field's value. +func (s *UpdateProvisioningTemplateInput) SetRemovePreProvisioningHook(v bool) *UpdateProvisioningTemplateInput { + s.RemovePreProvisioningHook = &v + return s +} + // SetTemplateName sets the TemplateName field's value. func (s *UpdateProvisioningTemplateInput) SetTemplateName(v string) *UpdateProvisioningTemplateInput { s.TemplateName = &v @@ -46515,7 +48320,17 @@ type UpdateSecurityProfileInput struct { // A list of metrics whose data is retained (stored). By default, data is retained // for any metric used in the profile's behaviors, but it is also retained for // any metric specified here. - AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" type:"list"` + // + // Note: This API field is deprecated. Please use UpdateSecurityProfileRequest$additionalMetricsToRetainV2 + // instead. + // + // Deprecated: Use additionalMetricsToRetainV2. + AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" deprecated:"true" type:"list"` + + // A list of metrics whose data is retained (stored). By default, data is retained + // for any metric used in the profile's behaviors, but it is also retained for + // any metric specified here. + AdditionalMetricsToRetainV2 []*MetricToRetain `locationName:"additionalMetricsToRetainV2" type:"list"` // Where the alerts are sent. (Alerts are always sent to the console.) AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` @@ -46570,6 +48385,16 @@ func (s *UpdateSecurityProfileInput) Validate() error { if s.SecurityProfileName != nil && len(*s.SecurityProfileName) < 1 { invalidParams.Add(request.NewErrParamMinLen("SecurityProfileName", 1)) } + if s.AdditionalMetricsToRetainV2 != nil { + for i, v := range s.AdditionalMetricsToRetainV2 { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdditionalMetricsToRetainV2", i), err.(request.ErrInvalidParams)) + } + } + } if s.AlertTargets != nil { for i, v := range s.AlertTargets { if v == nil { @@ -46603,6 +48428,12 @@ func (s *UpdateSecurityProfileInput) SetAdditionalMetricsToRetain(v []*string) * return s } +// SetAdditionalMetricsToRetainV2 sets the AdditionalMetricsToRetainV2 field's value. +func (s *UpdateSecurityProfileInput) SetAdditionalMetricsToRetainV2(v []*MetricToRetain) *UpdateSecurityProfileInput { + s.AdditionalMetricsToRetainV2 = v + return s +} + // SetAlertTargets sets the AlertTargets field's value. func (s *UpdateSecurityProfileInput) SetAlertTargets(v map[string]*AlertTarget) *UpdateSecurityProfileInput { s.AlertTargets = v @@ -46657,7 +48488,17 @@ type UpdateSecurityProfileOutput struct { // A list of metrics whose data is retained (stored). By default, data is retained // for any metric used in the security profile's behaviors, but it is also retained // for any metric specified here. - AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" type:"list"` + // + // Note: This API field is deprecated. Please use UpdateSecurityProfileResponse$additionalMetricsToRetainV2 + // instead. + // + // Deprecated: Use additionalMetricsToRetainV2. + AdditionalMetricsToRetain []*string `locationName:"additionalMetricsToRetain" deprecated:"true" type:"list"` + + // A list of metrics whose data is retained (stored). By default, data is retained + // for any metric used in the profile's behaviors, but it is also retained for + // any metric specified here. + AdditionalMetricsToRetainV2 []*MetricToRetain `locationName:"additionalMetricsToRetainV2" type:"list"` // Where the alerts are sent. (Alerts are always sent to the console.) AlertTargets map[string]*AlertTarget `locationName:"alertTargets" type:"map"` @@ -46701,6 +48542,12 @@ func (s *UpdateSecurityProfileOutput) SetAdditionalMetricsToRetain(v []*string) return s } +// SetAdditionalMetricsToRetainV2 sets the AdditionalMetricsToRetainV2 field's value. +func (s *UpdateSecurityProfileOutput) SetAdditionalMetricsToRetainV2(v []*MetricToRetain) *UpdateSecurityProfileOutput { + s.AdditionalMetricsToRetainV2 = v + return s +} + // SetAlertTargets sets the AlertTargets field's value. func (s *UpdateSecurityProfileOutput) SetAlertTargets(v map[string]*AlertTarget) *UpdateSecurityProfileOutput { s.AlertTargets = v @@ -47074,6 +48921,9 @@ type UpdateThingInput struct { // The name of the thing to update. // + // You can't change a thing's name. To change a thing's name, you must create + // a new thing, give it the new name, and then delete the old thing. + // // ThingName is a required field ThingName *string `location:"uri" locationName:"thingName" min:"1" type:"string" required:"true"` @@ -47354,8 +49204,8 @@ func (s *ValidationError) SetErrorMessage(v string) *ValidationError { // An exception thrown when the version of an entity specified with the expectedVersion // parameter does not match the latest version in the system. type VersionConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -47373,17 +49223,17 @@ func (s VersionConflictException) GoString() string { func newErrorVersionConflictException(v protocol.ResponseMetadata) error { return &VersionConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s VersionConflictException) Code() string { +func (s *VersionConflictException) Code() string { return "VersionConflictException" } // Message returns the exception's message. -func (s VersionConflictException) Message() string { +func (s *VersionConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -47391,28 +49241,28 @@ func (s VersionConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s VersionConflictException) OrigErr() error { +func (s *VersionConflictException) OrigErr() error { return nil } -func (s VersionConflictException) Error() string { +func (s *VersionConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s VersionConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *VersionConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s VersionConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *VersionConflictException) RequestID() string { + return s.RespMetadata.RequestID } // The number of policy versions exceeds the limit. type VersionsLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -47430,17 +49280,17 @@ func (s VersionsLimitExceededException) GoString() string { func newErrorVersionsLimitExceededException(v protocol.ResponseMetadata) error { return &VersionsLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s VersionsLimitExceededException) Code() string { +func (s *VersionsLimitExceededException) Code() string { return "VersionsLimitExceededException" } // Message returns the exception's message. -func (s VersionsLimitExceededException) Message() string { +func (s *VersionsLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -47448,22 +49298,22 @@ func (s VersionsLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s VersionsLimitExceededException) OrigErr() error { +func (s *VersionsLimitExceededException) OrigErr() error { return nil } -func (s VersionsLimitExceededException) Error() string { +func (s *VersionsLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s VersionsLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *VersionsLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s VersionsLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *VersionsLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a Device Defender security profile behavior violation. @@ -47744,6 +49594,14 @@ const ( CannedAccessControlListLogDeliveryWrite = "log-delivery-write" ) +const ( + // CertificateModeDefault is a CertificateMode enum value + CertificateModeDefault = "DEFAULT" + + // CertificateModeSniOnly is a CertificateMode enum value + CertificateModeSniOnly = "SNI_ONLY" +) + const ( // CertificateStatusActive is a CertificateStatus enum value CertificateStatusActive = "ACTIVE" @@ -47818,6 +49676,19 @@ const ( DeviceCertificateUpdateActionDeactivate = "DEACTIVATE" ) +const ( + // DimensionTypeTopicFilter is a DimensionType enum value + DimensionTypeTopicFilter = "TOPIC_FILTER" +) + +const ( + // DimensionValueOperatorIn is a DimensionValueOperator enum value + DimensionValueOperatorIn = "IN" + + // DimensionValueOperatorNotIn is a DimensionValueOperator enum value + DimensionValueOperatorNotIn = "NOT_IN" +) + const ( // DomainConfigurationStatusEnabled is a DomainConfigurationStatus enum value DomainConfigurationStatusEnabled = "ENABLED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go index 7c5721e3fb8..74e040ef68f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go @@ -10,6 +10,14 @@ // organize resources associated with each device (Registry), configure logging, // and create and manage policies and credentials to authenticate devices. // +// The service endpoints that expose this API are listed in AWS IoT Core Endpoints +// and Quotas (https://docs.aws.amazon.com/general/latest/gr/iot-core.html). +// You must use the endpoint for the region that has the resources you want +// to access. +// +// The service name used by AWS Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// to sign the request is: execute-api. +// // For more information about how AWS IoT works, see the Developer Guide (https://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html). // // For information about how to use the credentials provider for AWS IoT, see diff --git a/vendor/github.com/aws/aws-sdk-go/service/iotanalytics/api.go b/vendor/github.com/aws/aws-sdk-go/service/iotanalytics/api.go index b101fafeb1a..02cec6c4758 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iotanalytics/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iotanalytics/api.go @@ -7191,8 +7191,8 @@ func (s *GlueConfiguration) SetTableName(v string) *GlueConfiguration { // There was an internal failure. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7209,17 +7209,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7227,28 +7227,28 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The request was not valid. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7265,17 +7265,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7283,22 +7283,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Configuration information for delivery of data set contents to AWS IoT Events. @@ -7454,8 +7454,8 @@ func (s *LambdaActivity) SetNext(v string) *LambdaActivity { // The command caused an internal limit to be exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7472,17 +7472,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7490,22 +7490,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListChannelsInput struct { @@ -8770,8 +8770,8 @@ func (s *ReprocessingSummary) SetStatus(v string) *ReprocessingSummary { // A resource with the same name already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -8794,17 +8794,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8812,22 +8812,22 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The configuration of the resource used to execute the "containerAction". @@ -8890,8 +8890,8 @@ func (s *ResourceConfiguration) SetVolumeSizeInGB(v int64) *ResourceConfiguratio // A resource with the specified name could not be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8908,17 +8908,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8926,22 +8926,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // How long, in days, message data is kept. @@ -9447,8 +9447,8 @@ func (s ServiceManagedDatastoreS3StorageSummary) GoString() string { // The service is temporarily unavailable. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9465,17 +9465,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9483,22 +9483,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // The SQL query to modify the message. @@ -9784,8 +9784,8 @@ func (s TagResourceOutput) GoString() string { // The request was denied due to request throttling. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9802,17 +9802,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9820,22 +9820,22 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the data set whose content generation triggers the new diff --git a/vendor/github.com/aws/aws-sdk-go/service/iotevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/iotevents/api.go index 5dd9219ab5e..3b5ecfef2bf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iotevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iotevents/api.go @@ -1515,6 +1515,10 @@ type Action struct { // // InputName is a required field InputName *string `locationName:"inputName" min:"1" type:"string" required:"true"` + + // You can configure the action payload when you send a message to an AWS IoT + // Events input. + Payload *Payload `locationName:"payload" type:"structure"` } // String returns the string representation @@ -1536,6 +1540,11 @@ func (s *Action) Validate() error { if s.InputName != nil && len(*s.InputName) < 1 { invalidParams.Add(request.NewErrParamMinLen("InputName", 1)) } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -1549,6 +1558,12 @@ func (s *Action) SetInputName(v string) *Action { return s } +// SetPayload sets the Payload field's value. +func (s *Action) SetPayload(v *Payload) *Action { + s.Payload = v + return s +} + // An action to be performed when the condition is TRUE. type ActionData struct { _ struct{} `type:"structure"` @@ -1556,14 +1571,36 @@ type ActionData struct { // Information needed to clear the timer. ClearTimer *ClearTimerAction `locationName:"clearTimer" type:"structure"` + // Writes to the DynamoDB table that you created. The default action payload + // contains all attribute-value pairs that have the information about the detector + // model instance and the event that triggered the action. You can also customize + // the payload (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). + // One column of the DynamoDB table receives all attribute-value pairs in the + // payload that you specify. For more information, see Actions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) + // in AWS IoT Events Developer Guide. + DynamoDB *DynamoDBAction `locationName:"dynamoDB" type:"structure"` + + // Writes to the DynamoDB table that you created. The default action payload + // contains all attribute-value pairs that have the information about the detector + // model instance and the event that triggered the action. You can also customize + // the payload (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). + // A separate column of the DynamoDB table receives one attribute-value pair + // in the payload that you specify. For more information, see Actions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) + // in AWS IoT Events Developer Guide. + DynamoDBv2 *DynamoDBv2Action `locationName:"dynamoDBv2" type:"structure"` + // Sends information about the detector model instance and the event that triggered // the action to an Amazon Kinesis Data Firehose delivery stream. Firehose *FirehoseAction `locationName:"firehose" type:"structure"` - // Sends an AWS IoT Events input, passing in information about the detector - // model instance and the event that triggered the action. + // Sends AWS IoT Events input, which passes information about the detector model + // instance and the event that triggered the action. IotEvents *Action `locationName:"iotEvents" type:"structure"` + // Sends information about the detector model instance and the event that triggered + // the action to an asset property in AWS IoT SiteWise . + IotSiteWise *IotSiteWiseAction `locationName:"iotSiteWise" type:"structure"` + // Publishes an MQTT message with the given topic to the AWS IoT message broker. IotTopicPublish *IotTopicPublishAction `locationName:"iotTopicPublish" type:"structure"` @@ -1606,6 +1643,16 @@ func (s *ActionData) Validate() error { invalidParams.AddNested("ClearTimer", err.(request.ErrInvalidParams)) } } + if s.DynamoDB != nil { + if err := s.DynamoDB.Validate(); err != nil { + invalidParams.AddNested("DynamoDB", err.(request.ErrInvalidParams)) + } + } + if s.DynamoDBv2 != nil { + if err := s.DynamoDBv2.Validate(); err != nil { + invalidParams.AddNested("DynamoDBv2", err.(request.ErrInvalidParams)) + } + } if s.Firehose != nil { if err := s.Firehose.Validate(); err != nil { invalidParams.AddNested("Firehose", err.(request.ErrInvalidParams)) @@ -1616,6 +1663,11 @@ func (s *ActionData) Validate() error { invalidParams.AddNested("IotEvents", err.(request.ErrInvalidParams)) } } + if s.IotSiteWise != nil { + if err := s.IotSiteWise.Validate(); err != nil { + invalidParams.AddNested("IotSiteWise", err.(request.ErrInvalidParams)) + } + } if s.IotTopicPublish != nil { if err := s.IotTopicPublish.Validate(); err != nil { invalidParams.AddNested("IotTopicPublish", err.(request.ErrInvalidParams)) @@ -1664,6 +1716,18 @@ func (s *ActionData) SetClearTimer(v *ClearTimerAction) *ActionData { return s } +// SetDynamoDB sets the DynamoDB field's value. +func (s *ActionData) SetDynamoDB(v *DynamoDBAction) *ActionData { + s.DynamoDB = v + return s +} + +// SetDynamoDBv2 sets the DynamoDBv2 field's value. +func (s *ActionData) SetDynamoDBv2(v *DynamoDBv2Action) *ActionData { + s.DynamoDBv2 = v + return s +} + // SetFirehose sets the Firehose field's value. func (s *ActionData) SetFirehose(v *FirehoseAction) *ActionData { s.Firehose = v @@ -1676,6 +1740,12 @@ func (s *ActionData) SetIotEvents(v *Action) *ActionData { return s } +// SetIotSiteWise sets the IotSiteWise field's value. +func (s *ActionData) SetIotSiteWise(v *IotSiteWiseAction) *ActionData { + s.IotSiteWise = v + return s +} + // SetIotTopicPublish sets the IotTopicPublish field's value. func (s *ActionData) SetIotTopicPublish(v *IotTopicPublishAction) *ActionData { s.IotTopicPublish = v @@ -1718,6 +1788,211 @@ func (s *ActionData) SetSqs(v *SqsAction) *ActionData { return s } +// A structure that contains timestamp information. For more information, see +// TimeInNanos (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TimeInNanos.html) +// in the AWS IoT SiteWise API Reference. +// +// For parameters that are string data type, you can specify the following options: +// +// * Use a string. For example, the timeInSeconds value can be '1586400675'. +// +// * Use an expression. For example, the timeInSeconds value can be '${$input.TemperatureInput.sensorData.timestamp/1000}'. +// For more information, see Expressions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) +// in the AWS IoT Events Developer Guide. +type AssetPropertyTimestamp struct { + _ struct{} `type:"structure"` + + // The nanosecond offset converted from timeInSeconds. The valid range is between + // 0-999999999. You can also specify an expression. + OffsetInNanos *string `locationName:"offsetInNanos" type:"string"` + + // The timestamp, in seconds, in the Unix epoch format. The valid range is between + // 1-31556889864403199. You can also specify an expression. + // + // TimeInSeconds is a required field + TimeInSeconds *string `locationName:"timeInSeconds" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssetPropertyTimestamp) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssetPropertyTimestamp) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssetPropertyTimestamp) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssetPropertyTimestamp"} + if s.TimeInSeconds == nil { + invalidParams.Add(request.NewErrParamRequired("TimeInSeconds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOffsetInNanos sets the OffsetInNanos field's value. +func (s *AssetPropertyTimestamp) SetOffsetInNanos(v string) *AssetPropertyTimestamp { + s.OffsetInNanos = &v + return s +} + +// SetTimeInSeconds sets the TimeInSeconds field's value. +func (s *AssetPropertyTimestamp) SetTimeInSeconds(v string) *AssetPropertyTimestamp { + s.TimeInSeconds = &v + return s +} + +// A structure that contains value information. For more information, see AssetPropertyValue +// (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetPropertyValue.html) +// in the AWS IoT SiteWise API Reference. +// +// For parameters that are string data type, you can specify the following options: +// +// * Use a string. For example, the quality value can be 'GOOD'. +// +// * Use an expression. For example, the quality value can be $input.TemperatureInput.sensorData.quality +// . For more information, see Expressions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) +// in the AWS IoT Events Developer Guide. +type AssetPropertyValue struct { + _ struct{} `type:"structure"` + + // The quality of the asset property value. The value must be GOOD, BAD, or + // UNCERTAIN. You can also specify an expression. + Quality *string `locationName:"quality" type:"string"` + + // The timestamp associated with the asset property value. The default is the + // current event time. + Timestamp *AssetPropertyTimestamp `locationName:"timestamp" type:"structure"` + + // The value to send to an asset property. + // + // Value is a required field + Value *AssetPropertyVariant `locationName:"value" type:"structure" required:"true"` +} + +// String returns the string representation +func (s AssetPropertyValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssetPropertyValue) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssetPropertyValue) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssetPropertyValue"} + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Timestamp != nil { + if err := s.Timestamp.Validate(); err != nil { + invalidParams.AddNested("Timestamp", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQuality sets the Quality field's value. +func (s *AssetPropertyValue) SetQuality(v string) *AssetPropertyValue { + s.Quality = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *AssetPropertyValue) SetTimestamp(v *AssetPropertyTimestamp) *AssetPropertyValue { + s.Timestamp = v + return s +} + +// SetValue sets the Value field's value. +func (s *AssetPropertyValue) SetValue(v *AssetPropertyVariant) *AssetPropertyValue { + s.Value = v + return s +} + +// A structure that contains an asset property value. For more information, +// see Variant (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_Variant.html) +// in the AWS IoT SiteWise API Reference. +// +// You must specify one of the following value types, depending on the dataType +// of the specified asset property. For more information, see AssetProperty +// (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetProperty.html) +// in the AWS IoT SiteWise API Reference. +// +// For parameters that are string data type, you can specify the following options: +// +// * Use a string. For example, the doubleValue value can be '47.9'. +// +// * Use an expression. For example, the doubleValue value can be $input.TemperatureInput.sensorData.temperature. +// For more information, see Expressions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) +// in the AWS IoT Events Developer Guide. +type AssetPropertyVariant struct { + _ struct{} `type:"structure"` + + // The asset property value is a Boolean value that must be TRUE or FALSE. You + // can also specify an expression. If you use an expression, the evaluated result + // should be a Boolean value. + BooleanValue *string `locationName:"booleanValue" type:"string"` + + // The asset property value is a double. You can also specify an expression. + // If you use an expression, the evaluated result should be a double. + DoubleValue *string `locationName:"doubleValue" type:"string"` + + // The asset property value is an integer. You can also specify an expression. + // If you use an expression, the evaluated result should be an integer. + IntegerValue *string `locationName:"integerValue" type:"string"` + + // The asset property value is a string. You can also specify an expression. + // If you use an expression, the evaluated result should be a string. + StringValue *string `locationName:"stringValue" type:"string"` +} + +// String returns the string representation +func (s AssetPropertyVariant) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssetPropertyVariant) GoString() string { + return s.String() +} + +// SetBooleanValue sets the BooleanValue field's value. +func (s *AssetPropertyVariant) SetBooleanValue(v string) *AssetPropertyVariant { + s.BooleanValue = &v + return s +} + +// SetDoubleValue sets the DoubleValue field's value. +func (s *AssetPropertyVariant) SetDoubleValue(v string) *AssetPropertyVariant { + s.DoubleValue = &v + return s +} + +// SetIntegerValue sets the IntegerValue field's value. +func (s *AssetPropertyVariant) SetIntegerValue(v string) *AssetPropertyVariant { + s.IntegerValue = &v + return s +} + +// SetStringValue sets the StringValue field's value. +func (s *AssetPropertyVariant) SetStringValue(v string) *AssetPropertyVariant { + s.StringValue = &v + return s +} + // The attributes from the JSON payload that are made available by the input. // Inputs are derived from messages sent to the AWS IoT Events system using // BatchPutMessage. Each such message contains a JSON payload. Those attributes @@ -2478,11 +2753,15 @@ type DetectorModelConfiguration struct { // are executed. EvaluationMethod *string `locationName:"evaluationMethod" type:"string" enum:"EvaluationMethod"` - // The input attribute key used to identify a device or system to create a detector - // (an instance of the detector model) and then to route each input received - // to the appropriate detector (instance). This parameter uses a JSON-path expression - // in the message payload of each input to specify the attribute-value pair - // that is used to identify the device associated with the input. + // The value used to identify a detector instance. When a device or system sends + // input, a new detector instance with a unique key value is created. AWS IoT + // Events can continue to route input to its corresponding detector instance + // based on this identifying information. + // + // This parameter uses a JSON-path expression to select the attribute-value + // pair in the message payload that is used for identification. To route the + // message to the correct detector instance, the device must send a message + // payload that contains the same attribute-value. Key *string `locationName:"key" min:"1" type:"string"` // The time the detector model was last updated. @@ -2766,6 +3045,267 @@ func (s *DetectorModelVersionSummary) SetStatus(v string) *DetectorModelVersionS return s } +// Defines an action to write to the Amazon DynamoDB table that you created. +// The standard action payload contains all attribute-value pairs that have +// the information about the detector model instance and the event that triggered +// the action. You can also customize the payload (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). +// One column of the DynamoDB table receives all attribute-value pairs in the +// payload that you specify. +// +// The tableName and hashKeyField values must match the table name and the partition +// key of the DynamoDB table. +// +// If the DynamoDB table also has a sort key, you must specify rangeKeyField. +// The rangeKeyField value must match the sort key. +// +// The hashKeyValue and rangeKeyValue use substitution templates. These templates +// provide data at runtime. The syntax is ${sql-expression}. +// +// You can use expressions for parameters that are string data type. For more +// information, see Expressions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) +// in the AWS IoT Events Developer Guide. +// +// If the defined payload type is a string, DynamoDBAction writes non-JSON data +// to the DynamoDB table as binary data. The DynamoDB console displays the data +// as Base64-encoded text. The payloadField is _raw. +type DynamoDBAction struct { + _ struct{} `type:"structure"` + + // The name of the hash key (also called the partition key). + // + // HashKeyField is a required field + HashKeyField *string `locationName:"hashKeyField" type:"string" required:"true"` + + // The data type for the hash key (also called the partition key). You can specify + // the following values: + // + // * STRING - The hash key is a string. + // + // * NUMBER - The hash key is a number. + // + // If you don't specify hashKeyType, the default value is STRING. + HashKeyType *string `locationName:"hashKeyType" type:"string"` + + // The value of the hash key (also called the partition key). + // + // HashKeyValue is a required field + HashKeyValue *string `locationName:"hashKeyValue" type:"string" required:"true"` + + // The type of operation to perform. You can specify the following values: + // + // * INSERT - Insert data as a new item into the DynamoDB table. This item + // uses the specified hash key as a partition key. If you specified a range + // key, the item uses the range key as a sort key. + // + // * UPDATE - Update an existing item of the DynamoDB table with new data. + // This item's partition key must match the specified hash key. If you specified + // a range key, the range key must match the item's sort key. + // + // * DELETE - Delete an existing item of the DynamoDB table. This item's + // partition key must match the specified hash key. If you specified a range + // key, the range key must match the item's sort key. + // + // If you don't specify this parameter, AWS IoT Events triggers the INSERT operation. + Operation *string `locationName:"operation" type:"string"` + + // Information needed to configure the payload. + // + // By default, AWS IoT Events generates a standard payload in JSON for any action. + // This action payload contains all attribute-value pairs that have the information + // about the detector model instance and the event triggered the action. To + // configure the action payload, you can use contentExpression. + Payload *Payload `locationName:"payload" type:"structure"` + + // The name of the DynamoDB column that receives the action payload. + // + // If you don't specify this parameter, the name of the DynamoDB column is payload. + PayloadField *string `locationName:"payloadField" type:"string"` + + // The name of the range key (also called the sort key). + RangeKeyField *string `locationName:"rangeKeyField" type:"string"` + + // The data type for the range key (also called the sort key), You can specify + // the following values: + // + // * STRING - The range key is a string. + // + // * NUMBER - The range key is number. + // + // If you don't specify rangeKeyField, the default value is STRING. + RangeKeyType *string `locationName:"rangeKeyType" type:"string"` + + // The value of the range key (also called the sort key). + RangeKeyValue *string `locationName:"rangeKeyValue" type:"string"` + + // The name of the DynamoDB table. + // + // TableName is a required field + TableName *string `locationName:"tableName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DynamoDBAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DynamoDBAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DynamoDBAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DynamoDBAction"} + if s.HashKeyField == nil { + invalidParams.Add(request.NewErrParamRequired("HashKeyField")) + } + if s.HashKeyValue == nil { + invalidParams.Add(request.NewErrParamRequired("HashKeyValue")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHashKeyField sets the HashKeyField field's value. +func (s *DynamoDBAction) SetHashKeyField(v string) *DynamoDBAction { + s.HashKeyField = &v + return s +} + +// SetHashKeyType sets the HashKeyType field's value. +func (s *DynamoDBAction) SetHashKeyType(v string) *DynamoDBAction { + s.HashKeyType = &v + return s +} + +// SetHashKeyValue sets the HashKeyValue field's value. +func (s *DynamoDBAction) SetHashKeyValue(v string) *DynamoDBAction { + s.HashKeyValue = &v + return s +} + +// SetOperation sets the Operation field's value. +func (s *DynamoDBAction) SetOperation(v string) *DynamoDBAction { + s.Operation = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *DynamoDBAction) SetPayload(v *Payload) *DynamoDBAction { + s.Payload = v + return s +} + +// SetPayloadField sets the PayloadField field's value. +func (s *DynamoDBAction) SetPayloadField(v string) *DynamoDBAction { + s.PayloadField = &v + return s +} + +// SetRangeKeyField sets the RangeKeyField field's value. +func (s *DynamoDBAction) SetRangeKeyField(v string) *DynamoDBAction { + s.RangeKeyField = &v + return s +} + +// SetRangeKeyType sets the RangeKeyType field's value. +func (s *DynamoDBAction) SetRangeKeyType(v string) *DynamoDBAction { + s.RangeKeyType = &v + return s +} + +// SetRangeKeyValue sets the RangeKeyValue field's value. +func (s *DynamoDBAction) SetRangeKeyValue(v string) *DynamoDBAction { + s.RangeKeyValue = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *DynamoDBAction) SetTableName(v string) *DynamoDBAction { + s.TableName = &v + return s +} + +// Defines an action to write to the Amazon DynamoDB table that you created. +// The default action payload contains all attribute-value pairs that have the +// information about the detector model instance and the event that triggered +// the action. You can also customize the payload (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). +// A separate column of the DynamoDB table receives one attribute-value pair +// in the payload that you specify. +// +// The type value for Payload must be JSON. +// +// You can use expressions for parameters that are strings. For more information, +// see Expressions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) +// in the AWS IoT Events Developer Guide. +type DynamoDBv2Action struct { + _ struct{} `type:"structure"` + + // Information needed to configure the payload. + // + // By default, AWS IoT Events generates a standard payload in JSON for any action. + // This action payload contains all attribute-value pairs that have the information + // about the detector model instance and the event triggered the action. To + // configure the action payload, you can use contentExpression. + Payload *Payload `locationName:"payload" type:"structure"` + + // The name of the DynamoDB table. + // + // TableName is a required field + TableName *string `locationName:"tableName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DynamoDBv2Action) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DynamoDBv2Action) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DynamoDBv2Action) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DynamoDBv2Action"} + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPayload sets the Payload field's value. +func (s *DynamoDBv2Action) SetPayload(v *Payload) *DynamoDBv2Action { + s.Payload = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *DynamoDBv2Action) SetTableName(v string) *DynamoDBv2Action { + s.TableName = &v + return s +} + // Specifies the actions to be performed when the condition evaluates to TRUE. type Event struct { _ struct{} `type:"structure"` @@ -2845,6 +3385,10 @@ type FirehoseAction struct { // DeliveryStreamName is a required field DeliveryStreamName *string `locationName:"deliveryStreamName" type:"string" required:"true"` + // You can configure the action payload when you send a message to an Amazon + // Kinesis Data Firehose delivery stream. + Payload *Payload `locationName:"payload" type:"structure"` + // A character separator that is used to separate records written to the Kinesis // Data Firehose delivery stream. Valid values are: '\n' (newline), '\t' (tab), // '\r\n' (Windows newline), ',' (comma). @@ -2867,6 +3411,11 @@ func (s *FirehoseAction) Validate() error { if s.DeliveryStreamName == nil { invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2880,6 +3429,12 @@ func (s *FirehoseAction) SetDeliveryStreamName(v string) *FirehoseAction { return s } +// SetPayload sets the Payload field's value. +func (s *FirehoseAction) SetPayload(v *Payload) *FirehoseAction { + s.Payload = v + return s +} + // SetSeparator sets the Separator field's value. func (s *FirehoseAction) SetSeparator(v string) *FirehoseAction { s.Separator = &v @@ -3125,8 +3680,8 @@ func (s *InputSummary) SetStatus(v string) *InputSummary { // An internal failure occurred. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -3144,17 +3699,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3162,28 +3717,28 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The request was invalid. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -3201,17 +3756,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3219,22 +3774,117 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Sends information about the detector model instance and the event that triggered +// the action to a specified asset property in AWS IoT SiteWise. +// +// You must specify either propertyAlias or both assetId and propertyId to identify +// the target asset property in AWS IoT SiteWise. +// +// For parameters that are string data type, you can specify the following options: +// +// * Use a string. For example, the propertyAlias value can be '/company/windfarm/3/turbine/7/temperature'. +// +// * Use an expression. For example, the propertyAlias value can be 'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/${$input.TemperatureInput.sensorData.turbineID}/temperature'. +// For more information, see Expressions (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) +// in the AWS IoT Events Developer Guide. +type IotSiteWiseAction struct { + _ struct{} `type:"structure"` + + // The ID of the asset that has the specified property. You can specify an expression. + AssetId *string `locationName:"assetId" type:"string"` + + // A unique identifier for this entry. You can use the entry ID to track which + // data entry causes an error in case of failure. The default is a new unique + // identifier. You can also specify an expression. + EntryId *string `locationName:"entryId" type:"string"` + + // The alias of the asset property. You can also specify an expression. + PropertyAlias *string `locationName:"propertyAlias" type:"string"` + + // The ID of the asset property. You can specify an expression. + PropertyId *string `locationName:"propertyId" type:"string"` + + // The value to send to the asset property. This value contains timestamp, quality, + // and value (TQV) information. + // + // PropertyValue is a required field + PropertyValue *AssetPropertyValue `locationName:"propertyValue" type:"structure" required:"true"` +} + +// String returns the string representation +func (s IotSiteWiseAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IotSiteWiseAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IotSiteWiseAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IotSiteWiseAction"} + if s.PropertyValue == nil { + invalidParams.Add(request.NewErrParamRequired("PropertyValue")) + } + if s.PropertyValue != nil { + if err := s.PropertyValue.Validate(); err != nil { + invalidParams.AddNested("PropertyValue", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssetId sets the AssetId field's value. +func (s *IotSiteWiseAction) SetAssetId(v string) *IotSiteWiseAction { + s.AssetId = &v + return s +} + +// SetEntryId sets the EntryId field's value. +func (s *IotSiteWiseAction) SetEntryId(v string) *IotSiteWiseAction { + s.EntryId = &v + return s +} + +// SetPropertyAlias sets the PropertyAlias field's value. +func (s *IotSiteWiseAction) SetPropertyAlias(v string) *IotSiteWiseAction { + s.PropertyAlias = &v + return s +} + +// SetPropertyId sets the PropertyId field's value. +func (s *IotSiteWiseAction) SetPropertyId(v string) *IotSiteWiseAction { + s.PropertyId = &v + return s +} + +// SetPropertyValue sets the PropertyValue field's value. +func (s *IotSiteWiseAction) SetPropertyValue(v *AssetPropertyValue) *IotSiteWiseAction { + s.PropertyValue = v + return s } // Information required to publish the MQTT message through the AWS IoT message @@ -3248,6 +3898,10 @@ type IotTopicPublishAction struct { // // MqttTopic is a required field MqttTopic *string `locationName:"mqttTopic" min:"1" type:"string" required:"true"` + + // You can configure the action payload when you publish a message to an AWS + // IoT Core topic. + Payload *Payload `locationName:"payload" type:"structure"` } // String returns the string representation @@ -3269,6 +3923,11 @@ func (s *IotTopicPublishAction) Validate() error { if s.MqttTopic != nil && len(*s.MqttTopic) < 1 { invalidParams.Add(request.NewErrParamMinLen("MqttTopic", 1)) } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3282,6 +3941,12 @@ func (s *IotTopicPublishAction) SetMqttTopic(v string) *IotTopicPublishAction { return s } +// SetPayload sets the Payload field's value. +func (s *IotTopicPublishAction) SetPayload(v *Payload) *IotTopicPublishAction { + s.Payload = v + return s +} + // Calls a Lambda function, passing in information about the detector model // instance and the event that triggered the action. type LambdaAction struct { @@ -3291,6 +3956,10 @@ type LambdaAction struct { // // FunctionArn is a required field FunctionArn *string `locationName:"functionArn" min:"1" type:"string" required:"true"` + + // You can configure the action payload when you send a message to a Lambda + // function. + Payload *Payload `locationName:"payload" type:"structure"` } // String returns the string representation @@ -3312,6 +3981,11 @@ func (s *LambdaAction) Validate() error { if s.FunctionArn != nil && len(*s.FunctionArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("FunctionArn", 1)) } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3325,10 +3999,16 @@ func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction { return s } +// SetPayload sets the Payload field's value. +func (s *LambdaAction) SetPayload(v *Payload) *LambdaAction { + s.Payload = v + return s +} + // A limit was exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -3346,17 +4026,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3364,22 +4044,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListDetectorModelVersionsInput struct { @@ -3945,6 +4625,71 @@ func (s *OnInputLifecycle) SetTransitionEvents(v []*TransitionEvent) *OnInputLif return s } +// Information needed to configure the payload. +// +// By default, AWS IoT Events generates a standard payload in JSON for any action. +// This action payload contains all attribute-value pairs that have the information +// about the detector model instance and the event triggered the action. To +// configure the action payload, you can use contentExpression. +type Payload struct { + _ struct{} `type:"structure"` + + // The content of the payload. You can use a string expression that includes + // quoted strings (''), variables ($variable.), input + // values ($input..), string concatenations, and + // quoted strings that contain ${} as the content. The recommended maximum size + // of a content expression is 1 KB. + // + // ContentExpression is a required field + ContentExpression *string `locationName:"contentExpression" min:"1" type:"string" required:"true"` + + // The value of the payload type can be either STRING or JSON. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"PayloadType"` +} + +// String returns the string representation +func (s Payload) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Payload) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Payload) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Payload"} + if s.ContentExpression == nil { + invalidParams.Add(request.NewErrParamRequired("ContentExpression")) + } + if s.ContentExpression != nil && len(*s.ContentExpression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContentExpression", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContentExpression sets the ContentExpression field's value. +func (s *Payload) SetContentExpression(v string) *Payload { + s.ContentExpression = &v + return s +} + +// SetType sets the Type field's value. +func (s *Payload) SetType(v string) *Payload { + s.Type = &v + return s +} + type PutLoggingOptionsInput struct { _ struct{} `type:"structure"` @@ -4002,7 +4747,9 @@ func (s PutLoggingOptionsOutput) GoString() string { return s.String() } -// Information needed to reset the timer. +// Information required to reset the timer. The timer is reset to the previously +// evaluated result of the duration. The duration expression isn't reevaluated +// when you reset the timer. type ResetTimerAction struct { _ struct{} `type:"structure"` @@ -4046,8 +4793,8 @@ func (s *ResetTimerAction) SetTimerName(v string) *ResetTimerAction { // The resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -4071,17 +4818,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4089,28 +4836,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The resource is in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -4128,17 +4875,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4146,28 +4893,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -4185,17 +4932,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4203,28 +4950,32 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Information required to publish the Amazon SNS message. type SNSTopicPublishAction struct { _ struct{} `type:"structure"` + // You can configure the action payload when you send a message as an Amazon + // SNS push notification. + Payload *Payload `locationName:"payload" type:"structure"` + // The ARN of the Amazon SNS target where the message is sent. // // TargetArn is a required field @@ -4250,6 +5001,11 @@ func (s *SNSTopicPublishAction) Validate() error { if s.TargetArn != nil && len(*s.TargetArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4257,6 +5013,12 @@ func (s *SNSTopicPublishAction) Validate() error { return nil } +// SetPayload sets the Payload field's value. +func (s *SNSTopicPublishAction) SetPayload(v *Payload) *SNSTopicPublishAction { + s.Payload = v + return s +} + // SetTargetArn sets the TargetArn field's value. func (s *SNSTopicPublishAction) SetTargetArn(v string) *SNSTopicPublishAction { s.TargetArn = &v @@ -4265,8 +5027,8 @@ func (s *SNSTopicPublishAction) SetTargetArn(v string) *SNSTopicPublishAction { // The service is currently unavailable. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -4284,17 +5046,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4302,33 +5064,41 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Information needed to set the timer. type SetTimerAction struct { _ struct{} `type:"structure"` + // The duration of the timer, in seconds. You can use a string expression that + // includes numbers, variables ($variable.), and input values + // ($input..) as the duration. The range of the duration + // is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. + // The evaluated result of the duration is rounded down to the nearest whole + // number. + DurationExpression *string `locationName:"durationExpression" min:"1" type:"string"` + // The number of seconds until the timer expires. The minimum value is 60 seconds // to ensure accuracy. The maximum value is 31622400 seconds. // - // Seconds is a required field - Seconds *int64 `locationName:"seconds" type:"integer" required:"true"` + // Deprecated: seconds is deprecated. You can use durationExpression for SetTimerAction. The value of seconds can be used as a string expression for durationExpression. + Seconds *int64 `locationName:"seconds" min:"1" deprecated:"true" type:"integer"` // The name of the timer. // @@ -4349,8 +5119,11 @@ func (s SetTimerAction) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *SetTimerAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SetTimerAction"} - if s.Seconds == nil { - invalidParams.Add(request.NewErrParamRequired("Seconds")) + if s.DurationExpression != nil && len(*s.DurationExpression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DurationExpression", 1)) + } + if s.Seconds != nil && *s.Seconds < 1 { + invalidParams.Add(request.NewErrParamMinValue("Seconds", 1)) } if s.TimerName == nil { invalidParams.Add(request.NewErrParamRequired("TimerName")) @@ -4365,6 +5138,12 @@ func (s *SetTimerAction) Validate() error { return nil } +// SetDurationExpression sets the DurationExpression field's value. +func (s *SetTimerAction) SetDurationExpression(v string) *SetTimerAction { + s.DurationExpression = &v + return s +} + // SetSeconds sets the Seconds field's value. func (s *SetTimerAction) SetSeconds(v int64) *SetTimerAction { s.Seconds = &v @@ -4441,6 +5220,10 @@ func (s *SetVariableAction) SetVariableName(v string) *SetVariableAction { type SqsAction struct { _ struct{} `type:"structure"` + // You can configure the action payload when you send a message to an Amazon + // SQS queue. + Payload *Payload `locationName:"payload" type:"structure"` + // The URL of the SQS queue where the data is written. // // QueueUrl is a required field @@ -4467,6 +5250,11 @@ func (s *SqsAction) Validate() error { if s.QueueUrl == nil { invalidParams.Add(request.NewErrParamRequired("QueueUrl")) } + if s.Payload != nil { + if err := s.Payload.Validate(); err != nil { + invalidParams.AddNested("Payload", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4474,6 +5262,12 @@ func (s *SqsAction) Validate() error { return nil } +// SetPayload sets the Payload field's value. +func (s *SqsAction) SetPayload(v *Payload) *SqsAction { + s.Payload = v + return s +} + // SetQueueUrl sets the QueueUrl field's value. func (s *SqsAction) SetQueueUrl(v string) *SqsAction { s.QueueUrl = &v @@ -4709,8 +5503,8 @@ func (s TagResourceOutput) GoString() string { // The request could not be completed due to throttling. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -4728,17 +5522,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4746,22 +5540,22 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the actions performed and the next state entered when a condition @@ -4857,8 +5651,8 @@ func (s *TransitionEvent) SetNextState(v string) *TransitionEvent { // The requested operation is not supported. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The message for the exception. Message_ *string `locationName:"message" type:"string"` @@ -4876,17 +5670,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4894,22 +5688,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -5248,3 +6042,11 @@ const ( // LoggingLevelDebug is a LoggingLevel enum value LoggingLevelDebug = "DEBUG" ) + +const ( + // PayloadTypeString is a PayloadType enum value + PayloadTypeString = "STRING" + + // PayloadTypeJson is a PayloadType enum value + PayloadTypeJson = "JSON" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iotevents/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iotevents/doc.go index 96fb49ba7e5..06ec1c6ac40 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iotevents/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iotevents/doc.go @@ -5,8 +5,8 @@ // // AWS IoT Events monitors your equipment or device fleets for failures or changes // in operation, and triggers actions when such events occur. You can use AWS -// IoT Events API commands to create, read, update, and delete inputs and detector -// models, and to list their versions. +// IoT Events API operations to create, read, update, and delete inputs and +// detector models, and to list their versions. // // See https://docs.aws.amazon.com/goto/WebAPI/iotevents-2018-07-27 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go index 620d2a10c85..07f1aab901f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go @@ -2275,8 +2275,8 @@ func (c *Kafka) UpdateMonitoringWithContext(ctx aws.Context, input *UpdateMonito // Returns information about an error. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -2295,17 +2295,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2313,22 +2313,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the EBS volume upgrade information. The broker identifier must @@ -3193,8 +3193,8 @@ func (s *ConfigurationRevision) SetRevision(v int64) *ConfigurationRevision { // Returns information about an error. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -3213,17 +3213,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3231,22 +3231,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Creates a cluster. @@ -4286,8 +4286,8 @@ func (s *Firehose) SetEnabled(v bool) *Firehose { // Returns information about an error. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -4306,17 +4306,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4324,22 +4324,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } type GetBootstrapBrokersInput struct { @@ -4418,8 +4418,8 @@ func (s *GetBootstrapBrokersOutput) SetBootstrapBrokerStringTls(v string) *GetBo // Returns information about an error. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -4438,17 +4438,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4456,22 +4456,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // Indicates whether you want to enable or disable the JMX Exporter. @@ -5408,8 +5408,8 @@ func (s *NodeInfo) SetZookeeperNodeInfo(v *ZookeeperNodeInfo) *NodeInfo { // Returns information about an error. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -5428,17 +5428,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5446,22 +5446,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // JMX and Node monitoring for the MSK cluster. @@ -5679,8 +5679,8 @@ func (s *S3) SetPrefix(v string) *S3 { // Returns information about an error. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -5699,17 +5699,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5717,22 +5717,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about storage volumes attached to MSK broker nodes. @@ -5868,8 +5868,8 @@ func (s *Tls) SetCertificateAuthorityArnList(v []*string) *Tls { // Returns information about an error. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -5888,17 +5888,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5906,28 +5906,28 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about an error. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` InvalidParameter *string `locationName:"invalidParameter" type:"string"` @@ -5946,17 +5946,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5964,22 +5964,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 96c089e5897..9ebd449de56 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 @@ -4603,8 +4603,8 @@ func (s *EnhancedMonitoringOutput) SetStreamName(v string) *EnhancedMonitoringOu // The provided iterator exceeds the maximum age allowed. type ExpiredIteratorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -4622,17 +4622,17 @@ func (s ExpiredIteratorException) GoString() string { func newErrorExpiredIteratorException(v protocol.ResponseMetadata) error { return &ExpiredIteratorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExpiredIteratorException) Code() string { +func (s *ExpiredIteratorException) Code() string { return "ExpiredIteratorException" } // Message returns the exception's message. -func (s ExpiredIteratorException) Message() string { +func (s *ExpiredIteratorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4640,28 +4640,28 @@ func (s ExpiredIteratorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExpiredIteratorException) OrigErr() error { +func (s *ExpiredIteratorException) OrigErr() error { return nil } -func (s ExpiredIteratorException) Error() string { +func (s *ExpiredIteratorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExpiredIteratorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExpiredIteratorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExpiredIteratorException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExpiredIteratorException) RequestID() string { + return s.RespMetadata.RequestID } // The pagination token passed to the operation is expired. type ExpiredNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4678,17 +4678,17 @@ func (s ExpiredNextTokenException) GoString() string { func newErrorExpiredNextTokenException(v protocol.ResponseMetadata) error { return &ExpiredNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExpiredNextTokenException) Code() string { +func (s *ExpiredNextTokenException) Code() string { return "ExpiredNextTokenException" } // Message returns the exception's message. -func (s ExpiredNextTokenException) Message() string { +func (s *ExpiredNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4696,22 +4696,22 @@ func (s ExpiredNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExpiredNextTokenException) OrigErr() error { +func (s *ExpiredNextTokenException) OrigErr() error { return nil } -func (s ExpiredNextTokenException) Error() string { +func (s *ExpiredNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExpiredNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExpiredNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExpiredNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExpiredNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input for GetRecords. @@ -5075,8 +5075,8 @@ func (s IncreaseStreamRetentionPeriodOutput) GoString() string { } type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5120,17 +5120,17 @@ func (s *InternalFailureException) MarshalEvent(pm protocol.PayloadMarshaler) (m func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5138,29 +5138,29 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // A specified parameter exceeds its restrictions, is not supported, or can't // be used. For more information, see the returned message. type InvalidArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5178,17 +5178,17 @@ func (s InvalidArgumentException) GoString() string { func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { return &InvalidArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgumentException) Code() string { +func (s *InvalidArgumentException) Code() string { return "InvalidArgumentException" } // Message returns the exception's message. -func (s InvalidArgumentException) Message() string { +func (s *InvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5196,29 +5196,29 @@ func (s InvalidArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgumentException) OrigErr() error { +func (s *InvalidArgumentException) OrigErr() error { return nil } -func (s InvalidArgumentException) Error() string { +func (s *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // The ciphertext references a key that doesn't exist or that you don't have // access to. type KMSAccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5263,17 +5263,17 @@ func (s *KMSAccessDeniedException) MarshalEvent(pm protocol.PayloadMarshaler) (m func newErrorKMSAccessDeniedException(v protocol.ResponseMetadata) error { return &KMSAccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSAccessDeniedException) Code() string { +func (s *KMSAccessDeniedException) Code() string { return "KMSAccessDeniedException" } // Message returns the exception's message. -func (s KMSAccessDeniedException) Message() string { +func (s *KMSAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5281,29 +5281,29 @@ func (s KMSAccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSAccessDeniedException) OrigErr() error { +func (s *KMSAccessDeniedException) OrigErr() error { return nil } -func (s KMSAccessDeniedException) Error() string { +func (s *KMSAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSAccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSAccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSAccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSAccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified customer master key (CMK) // isn't enabled. type KMSDisabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5348,17 +5348,17 @@ func (s *KMSDisabledException) MarshalEvent(pm protocol.PayloadMarshaler) (msg e func newErrorKMSDisabledException(v protocol.ResponseMetadata) error { return &KMSDisabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSDisabledException) Code() string { +func (s *KMSDisabledException) Code() string { return "KMSDisabledException" } // Message returns the exception's message. -func (s KMSDisabledException) Message() string { +func (s *KMSDisabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5366,22 +5366,22 @@ func (s KMSDisabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSDisabledException) OrigErr() error { +func (s *KMSDisabledException) OrigErr() error { return nil } -func (s KMSDisabledException) Error() string { +func (s *KMSDisabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSDisabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSDisabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSDisabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSDisabledException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the state of the specified resource isn't @@ -5389,8 +5389,8 @@ func (s KMSDisabledException) RequestID() string { // of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. type KMSInvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5435,17 +5435,17 @@ func (s *KMSInvalidStateException) MarshalEvent(pm protocol.PayloadMarshaler) (m func newErrorKMSInvalidStateException(v protocol.ResponseMetadata) error { return &KMSInvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSInvalidStateException) Code() string { +func (s *KMSInvalidStateException) Code() string { return "KMSInvalidStateException" } // Message returns the exception's message. -func (s KMSInvalidStateException) Message() string { +func (s *KMSInvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5453,29 +5453,29 @@ func (s KMSInvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSInvalidStateException) OrigErr() error { +func (s *KMSInvalidStateException) OrigErr() error { return nil } -func (s KMSInvalidStateException) Error() string { +func (s *KMSInvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSInvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSInvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSInvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSInvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified entity or resource can't be // found. type KMSNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5520,17 +5520,17 @@ func (s *KMSNotFoundException) MarshalEvent(pm protocol.PayloadMarshaler) (msg e func newErrorKMSNotFoundException(v protocol.ResponseMetadata) error { return &KMSNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSNotFoundException) Code() string { +func (s *KMSNotFoundException) Code() string { return "KMSNotFoundException" } // Message returns the exception's message. -func (s KMSNotFoundException) Message() string { +func (s *KMSNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5538,28 +5538,28 @@ func (s KMSNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSNotFoundException) OrigErr() error { +func (s *KMSNotFoundException) OrigErr() error { return nil } -func (s KMSNotFoundException) Error() string { +func (s *KMSNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The AWS access key ID needs a subscription for the service. type KMSOptInRequired struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5604,17 +5604,17 @@ func (s *KMSOptInRequired) MarshalEvent(pm protocol.PayloadMarshaler) (msg event func newErrorKMSOptInRequired(v protocol.ResponseMetadata) error { return &KMSOptInRequired{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSOptInRequired) Code() string { +func (s *KMSOptInRequired) Code() string { return "KMSOptInRequired" } // Message returns the exception's message. -func (s KMSOptInRequired) Message() string { +func (s *KMSOptInRequired) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5622,30 +5622,30 @@ func (s KMSOptInRequired) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSOptInRequired) OrigErr() error { +func (s *KMSOptInRequired) OrigErr() error { return nil } -func (s KMSOptInRequired) Error() string { +func (s *KMSOptInRequired) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSOptInRequired) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSOptInRequired) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSOptInRequired) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSOptInRequired) RequestID() string { + return s.RespMetadata.RequestID } // The request was denied due to request throttling. For more information about // throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) // in the AWS Key Management Service Developer Guide. type KMSThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5690,17 +5690,17 @@ func (s *KMSThrottlingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg func newErrorKMSThrottlingException(v protocol.ResponseMetadata) error { return &KMSThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSThrottlingException) Code() string { +func (s *KMSThrottlingException) Code() string { return "KMSThrottlingException" } // Message returns the exception's message. -func (s KMSThrottlingException) Message() string { +func (s *KMSThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5708,29 +5708,29 @@ func (s KMSThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSThrottlingException) OrigErr() error { +func (s *KMSThrottlingException) OrigErr() error { return nil } -func (s KMSThrottlingException) Error() string { +func (s *KMSThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource exceeds the maximum number allowed, or the number // of concurrent stream requests exceeds the maximum number allowed. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -5748,17 +5748,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5766,22 +5766,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListShardsInput struct { @@ -6387,8 +6387,8 @@ func (s MergeShardsOutput) GoString() string { // Exponential Backoff in AWS (http://docs.aws.amazon.com/general/latest/gr/api-retries.html) // in the AWS General Reference. type ProvisionedThroughputExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -6406,17 +6406,17 @@ func (s ProvisionedThroughputExceededException) GoString() string { func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { return &ProvisionedThroughputExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ProvisionedThroughputExceededException) Code() string { +func (s *ProvisionedThroughputExceededException) Code() string { return "ProvisionedThroughputExceededException" } // Message returns the exception's message. -func (s ProvisionedThroughputExceededException) Message() string { +func (s *ProvisionedThroughputExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6424,22 +6424,22 @@ func (s ProvisionedThroughputExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ProvisionedThroughputExceededException) OrigErr() error { +func (s *ProvisionedThroughputExceededException) OrigErr() error { return nil } -func (s ProvisionedThroughputExceededException) Error() string { +func (s *ProvisionedThroughputExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ProvisionedThroughputExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ProvisionedThroughputExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ProvisionedThroughputExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ProvisionedThroughputExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Represents the input for PutRecord. @@ -7107,8 +7107,8 @@ func (s RemoveTagsFromStreamOutput) GoString() string { // The resource is not available for this operation. For successful operation, // the resource must be in the ACTIVE state. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -7153,17 +7153,17 @@ func (s *ResourceInUseException) MarshalEvent(pm protocol.PayloadMarshaler) (msg func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7171,29 +7171,29 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource could not be found. The stream might not be specified // correctly. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message that provides information about the error. Message_ *string `locationName:"message" type:"string"` @@ -7238,17 +7238,17 @@ func (s *ResourceNotFoundException) MarshalEvent(pm protocol.PayloadMarshaler) ( func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7256,22 +7256,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The range of possible sequence numbers for the shard. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go index 7e8df003f38..7e877a1927c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go @@ -3197,8 +3197,8 @@ func (s *CloudWatchLoggingOptionUpdate) SetRoleARNUpdate(v string) *CloudWatchLo // User-provided application code (query) is invalid. This can be a simple syntax // error. type CodeValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Test Message_ *string `locationName:"message" type:"string"` @@ -3216,17 +3216,17 @@ func (s CodeValidationException) GoString() string { func newErrorCodeValidationException(v protocol.ResponseMetadata) error { return &CodeValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CodeValidationException) Code() string { +func (s *CodeValidationException) Code() string { return "CodeValidationException" } // Message returns the exception's message. -func (s CodeValidationException) Message() string { +func (s *CodeValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3234,30 +3234,30 @@ func (s CodeValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CodeValidationException) OrigErr() error { +func (s *CodeValidationException) OrigErr() error { return nil } -func (s CodeValidationException) Error() string { +func (s *CodeValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CodeValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CodeValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CodeValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *CodeValidationException) RequestID() string { + return s.RespMetadata.RequestID } // Exception thrown as a result of concurrent modification to an application. // For example, two individuals attempting to edit the same application at the // same time. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3274,17 +3274,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3292,22 +3292,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // TBD @@ -5125,8 +5125,8 @@ func (s *InputUpdate) SetNamePrefixUpdate(v string) *InputUpdate { // User-provided application configuration is not valid. type InvalidApplicationConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // test Message_ *string `locationName:"message" type:"string"` @@ -5144,17 +5144,17 @@ func (s InvalidApplicationConfigurationException) GoString() string { func newErrorInvalidApplicationConfigurationException(v protocol.ResponseMetadata) error { return &InvalidApplicationConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApplicationConfigurationException) Code() string { +func (s *InvalidApplicationConfigurationException) Code() string { return "InvalidApplicationConfigurationException" } // Message returns the exception's message. -func (s InvalidApplicationConfigurationException) Message() string { +func (s *InvalidApplicationConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5162,28 +5162,28 @@ func (s InvalidApplicationConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApplicationConfigurationException) OrigErr() error { +func (s *InvalidApplicationConfigurationException) OrigErr() error { return nil } -func (s InvalidApplicationConfigurationException) Error() string { +func (s *InvalidApplicationConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApplicationConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApplicationConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApplicationConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApplicationConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // Specified input parameter value is invalid. type InvalidArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5200,17 +5200,17 @@ func (s InvalidArgumentException) GoString() string { func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { return &InvalidArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgumentException) Code() string { +func (s *InvalidArgumentException) Code() string { return "InvalidArgumentException" } // Message returns the exception's message. -func (s InvalidArgumentException) Message() string { +func (s *InvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5218,22 +5218,22 @@ func (s InvalidArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgumentException) OrigErr() error { +func (s *InvalidArgumentException) OrigErr() error { return nil } -func (s InvalidArgumentException) Error() string { +func (s *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // Provides additional mapping information when JSON is the record format on @@ -6047,8 +6047,8 @@ func (s *LambdaOutputUpdate) SetRoleARNUpdate(v string) *LambdaOutputUpdate { // Exceeded the number of applications allowed. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6065,17 +6065,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6083,22 +6083,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListApplicationsInput struct { @@ -6976,8 +6976,8 @@ func (s *ReferenceDataSourceUpdate) SetTableNameUpdate(v string) *ReferenceDataS // Application is not available for this operation. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6994,17 +6994,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7012,28 +7012,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Specified application can't be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7050,17 +7050,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7068,22 +7068,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Discovery failed to get a record from the streaming source because of the @@ -7091,8 +7091,8 @@ func (s ResourceNotFoundException) RequestID() string { // see GetRecords (https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) // in the Amazon Kinesis Streams API Reference. type ResourceProvisionedThroughputExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7109,17 +7109,17 @@ func (s ResourceProvisionedThroughputExceededException) GoString() string { func newErrorResourceProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { return &ResourceProvisionedThroughputExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceProvisionedThroughputExceededException) Code() string { +func (s *ResourceProvisionedThroughputExceededException) Code() string { return "ResourceProvisionedThroughputExceededException" } // Message returns the exception's message. -func (s ResourceProvisionedThroughputExceededException) Message() string { +func (s *ResourceProvisionedThroughputExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7127,22 +7127,22 @@ func (s ResourceProvisionedThroughputExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceProvisionedThroughputExceededException) OrigErr() error { +func (s *ResourceProvisionedThroughputExceededException) OrigErr() error { return nil } -func (s ResourceProvisionedThroughputExceededException) Error() string { +func (s *ResourceProvisionedThroughputExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceProvisionedThroughputExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceProvisionedThroughputExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceProvisionedThroughputExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceProvisionedThroughputExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Provides a description of an Amazon S3 data source, including the Amazon @@ -7425,8 +7425,8 @@ func (s *S3ReferenceDataSourceUpdate) SetReferenceRoleARNUpdate(v string) *S3Ref // The service is unavailable. Back off and retry the operation. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7443,17 +7443,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7461,22 +7461,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the format of the data in the streaming source, and how each data @@ -7839,8 +7839,8 @@ func (s TagResourceOutput) GoString() string { // Note that the maximum number of application tags includes system tags. The // maximum number of user-defined application tags is 50. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7857,17 +7857,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7875,29 +7875,29 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } // Data format is not valid. Amazon Kinesis Analytics is not able to detect // schema for the given streaming source. type UnableToDetectSchemaException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -7918,17 +7918,17 @@ func (s UnableToDetectSchemaException) GoString() string { func newErrorUnableToDetectSchemaException(v protocol.ResponseMetadata) error { return &UnableToDetectSchemaException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnableToDetectSchemaException) Code() string { +func (s *UnableToDetectSchemaException) Code() string { return "UnableToDetectSchemaException" } // Message returns the exception's message. -func (s UnableToDetectSchemaException) Message() string { +func (s *UnableToDetectSchemaException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7936,29 +7936,29 @@ func (s UnableToDetectSchemaException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnableToDetectSchemaException) OrigErr() error { +func (s *UnableToDetectSchemaException) OrigErr() error { return nil } -func (s UnableToDetectSchemaException) Error() string { +func (s *UnableToDetectSchemaException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnableToDetectSchemaException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnableToDetectSchemaException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnableToDetectSchemaException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnableToDetectSchemaException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because a specified parameter is not supported or // a specified resource is not valid for this operation. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7975,17 +7975,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7993,22 +7993,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalyticsv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalyticsv2/api.go index 1428e9372f8..18315c28b01 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalyticsv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalyticsv2/api.go @@ -4751,8 +4751,8 @@ func (s *CodeContentUpdate) SetZipFileContentUpdate(v []byte) *CodeContentUpdate // The user-provided application code (query) is not valid. This can be a simple // syntax error. type CodeValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4769,17 +4769,17 @@ func (s CodeValidationException) GoString() string { func newErrorCodeValidationException(v protocol.ResponseMetadata) error { return &CodeValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CodeValidationException) Code() string { +func (s *CodeValidationException) Code() string { return "CodeValidationException" } // Message returns the exception's message. -func (s CodeValidationException) Message() string { +func (s *CodeValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4787,30 +4787,30 @@ func (s CodeValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CodeValidationException) OrigErr() error { +func (s *CodeValidationException) OrigErr() error { return nil } -func (s CodeValidationException) Error() string { +func (s *CodeValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CodeValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CodeValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CodeValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *CodeValidationException) RequestID() string { + return s.RespMetadata.RequestID } // Exception thrown as a result of concurrent modifications to an application. // This error can be the result of attempting to modify an application without // using the current application ID. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4827,17 +4827,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4845,22 +4845,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } type CreateApplicationInput struct { @@ -7339,8 +7339,8 @@ func (s *InputUpdate) SetNamePrefixUpdate(v string) *InputUpdate { // The user-provided application configuration is not valid. type InvalidApplicationConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7357,17 +7357,17 @@ func (s InvalidApplicationConfigurationException) GoString() string { func newErrorInvalidApplicationConfigurationException(v protocol.ResponseMetadata) error { return &InvalidApplicationConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidApplicationConfigurationException) Code() string { +func (s *InvalidApplicationConfigurationException) Code() string { return "InvalidApplicationConfigurationException" } // Message returns the exception's message. -func (s InvalidApplicationConfigurationException) Message() string { +func (s *InvalidApplicationConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7375,28 +7375,28 @@ func (s InvalidApplicationConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidApplicationConfigurationException) OrigErr() error { +func (s *InvalidApplicationConfigurationException) OrigErr() error { return nil } -func (s InvalidApplicationConfigurationException) Error() string { +func (s *InvalidApplicationConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidApplicationConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidApplicationConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidApplicationConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidApplicationConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // The specified input parameter value is not valid. type InvalidArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7413,17 +7413,17 @@ func (s InvalidArgumentException) GoString() string { func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { return &InvalidArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgumentException) Code() string { +func (s *InvalidArgumentException) Code() string { return "InvalidArgumentException" } // Message returns the exception's message. -func (s InvalidArgumentException) Message() string { +func (s *InvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7431,28 +7431,28 @@ func (s InvalidArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgumentException) OrigErr() error { +func (s *InvalidArgumentException) OrigErr() error { return nil } -func (s InvalidArgumentException) Error() string { +func (s *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // The request JSON is not valid for the operation. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7469,17 +7469,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7487,22 +7487,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // For an SQL-based Amazon Kinesis Data Analytics application, provides additional @@ -8206,8 +8206,8 @@ func (s *LambdaOutputUpdate) SetResourceARNUpdate(v string) *LambdaOutputUpdate // The number of allowed resources has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8224,17 +8224,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8242,22 +8242,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListApplicationSnapshotsInput struct { @@ -9692,8 +9692,8 @@ func (s *ReferenceDataSourceUpdate) SetTableNameUpdate(v string) *ReferenceDataS // The application is not available for this operation. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -9710,17 +9710,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9728,28 +9728,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Specified application can't be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -9766,17 +9766,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9784,22 +9784,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Discovery failed to get a record from the streaming source because of the @@ -9807,8 +9807,8 @@ func (s ResourceNotFoundException) RequestID() string { // see GetRecords (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) // in the Amazon Kinesis Streams API Reference. type ResourceProvisionedThroughputExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -9825,17 +9825,17 @@ func (s ResourceProvisionedThroughputExceededException) GoString() string { func newErrorResourceProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { return &ResourceProvisionedThroughputExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceProvisionedThroughputExceededException) Code() string { +func (s *ResourceProvisionedThroughputExceededException) Code() string { return "ResourceProvisionedThroughputExceededException" } // Message returns the exception's message. -func (s ResourceProvisionedThroughputExceededException) Message() string { +func (s *ResourceProvisionedThroughputExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9843,22 +9843,22 @@ func (s ResourceProvisionedThroughputExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceProvisionedThroughputExceededException) OrigErr() error { +func (s *ResourceProvisionedThroughputExceededException) OrigErr() error { return nil } -func (s ResourceProvisionedThroughputExceededException) Error() string { +func (s *ResourceProvisionedThroughputExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceProvisionedThroughputExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceProvisionedThroughputExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceProvisionedThroughputExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceProvisionedThroughputExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the starting parameters for an Amazon Kinesis Data Analytics application. @@ -10405,8 +10405,8 @@ func (s *S3ReferenceDataSourceUpdate) SetFileKeyUpdate(v string) *S3ReferenceDat // The service cannot complete the request. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -10423,17 +10423,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10441,22 +10441,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Provides details about a snapshot of application state. @@ -11146,8 +11146,8 @@ func (s TagResourceOutput) GoString() string { // Note that the maximum number of application tags includes system tags. The // maximum number of user-defined application tags is 50. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11164,17 +11164,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11182,29 +11182,29 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } // The data format is not valid. Amazon Kinesis Data Analytics cannot detect // the schema for the given streaming source. type UnableToDetectSchemaException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -11228,17 +11228,17 @@ func (s UnableToDetectSchemaException) GoString() string { func newErrorUnableToDetectSchemaException(v protocol.ResponseMetadata) error { return &UnableToDetectSchemaException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnableToDetectSchemaException) Code() string { +func (s *UnableToDetectSchemaException) Code() string { return "UnableToDetectSchemaException" } // Message returns the exception's message. -func (s UnableToDetectSchemaException) Message() string { +func (s *UnableToDetectSchemaException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11246,29 +11246,29 @@ func (s UnableToDetectSchemaException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnableToDetectSchemaException) OrigErr() error { +func (s *UnableToDetectSchemaException) OrigErr() error { return nil } -func (s UnableToDetectSchemaException) Error() string { +func (s *UnableToDetectSchemaException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnableToDetectSchemaException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnableToDetectSchemaException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnableToDetectSchemaException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnableToDetectSchemaException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because a specified parameter is not supported or // a specified resource is not valid for this operation. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -11285,17 +11285,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11303,22 +11303,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/api.go index 8266d661e4f..85c26e01502 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/api.go @@ -81,7 +81,7 @@ func (c *KinesisVideo) CreateSignalingChannelRequest(input *CreateSignalingChann // AWS account in this region. // // * ResourceInUseException -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. // // * AccessDeniedException // You do not have required permissions to perform this operation. @@ -183,7 +183,7 @@ func (c *KinesisVideo) CreateStreamRequest(input *CreateStreamInput) (req *reque // Not implemented. // // * ResourceInUseException -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. // // * InvalidDeviceException // Not implemented. @@ -296,6 +296,9 @@ func (c *KinesisVideo) DeleteSignalingChannelRequest(input *DeleteSignalingChann // latest version, use the DescribeStream (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_DescribeStream.html) // API. // +// * ResourceInUseException +// The signaling channel is currently not available for this operation. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/DeleteSignalingChannel func (c *KinesisVideo) DeleteSignalingChannel(input *DeleteSignalingChannelInput) (*DeleteSignalingChannelOutput, error) { req, out := c.DeleteSignalingChannelRequest(input) @@ -402,6 +405,9 @@ func (c *KinesisVideo) DeleteStreamRequest(input *DeleteStreamInput) (req *reque // latest version, use the DescribeStream (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_DescribeStream.html) // API. // +// * ResourceInUseException +// The signaling channel is currently not available for this operation. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/DeleteStream func (c *KinesisVideo) DeleteStream(input *DeleteStreamInput) (*DeleteStreamOutput, error) { req, out := c.DeleteStreamRequest(input) @@ -469,7 +475,8 @@ func (c *KinesisVideo) DescribeSignalingChannelRequest(input *DescribeSignalingC // DescribeSignalingChannel API operation for Amazon Kinesis Video Streams. // // Returns the most current information about the signaling channel. You must -// specify either the name or the ARN of the channel that you want to describe. +// specify either the name or the Amazon Resource Name (ARN) of the channel +// that you want to describe. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -750,9 +757,9 @@ func (c *KinesisVideo) GetSignalingChannelEndpointRequest(input *GetSignalingCha // parameter, which consists of the Protocols and Role properties. // // Protocols is used to determine the communication mechanism. For example, -// specifying WSS as the protocol, results in this API producing a secure websocket -// endpoint, and specifying HTTPS as the protocol, results in this API generating -// an HTTPS endpoint. +// if you specify WSS as the protocol, this API produces a secure websocket +// endpoint. If you specify HTTPS as the protocol, this API generates an HTTPS +// endpoint. // // Role determines the messaging permissions. A MASTER role results in this // API generating an endpoint that a client can use to communicate with any @@ -778,7 +785,7 @@ func (c *KinesisVideo) GetSignalingChannelEndpointRequest(input *GetSignalingCha // Amazon Kinesis Video Streams can't find the stream that you specified. // // * ResourceInUseException -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. // // * AccessDeniedException // You do not have required permissions to perform this operation. @@ -1759,7 +1766,7 @@ func (c *KinesisVideo) UpdateDataRetentionRequest(input *UpdateDataRetentionInpu // Amazon Kinesis Video Streams can't find the stream that you specified. // // * ResourceInUseException -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. // // * NotAuthorizedException // The caller is not authorized to perform this operation. @@ -1840,8 +1847,8 @@ func (c *KinesisVideo) UpdateSignalingChannelRequest(input *UpdateSignalingChann // and takes time to complete. // // If the MessageTtlSeconds value is updated (either increased or reduced), -// then it only applies to new messages sent via this channel after it's been -// updated. Existing messages are still expire as per the previous MessageTtlSeconds +// it only applies to new messages sent via this channel after it's been updated. +// Existing messages are still expired as per the previous MessageTtlSeconds // value. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1863,7 +1870,7 @@ func (c *KinesisVideo) UpdateSignalingChannelRequest(input *UpdateSignalingChann // Amazon Kinesis Video Streams can't find the stream that you specified. // // * ResourceInUseException -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. // // * AccessDeniedException // You do not have required permissions to perform this operation. @@ -1972,7 +1979,7 @@ func (c *KinesisVideo) UpdateStreamRequest(input *UpdateStreamInput) (req *reque // Amazon Kinesis Video Streams can't find the stream that you specified. // // * ResourceInUseException -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. // // * NotAuthorizedException // The caller is not authorized to perform this operation. @@ -2006,8 +2013,8 @@ func (c *KinesisVideo) UpdateStreamWithContext(ctx aws.Context, input *UpdateStr // You do not have required permissions to perform this operation. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2024,17 +2031,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2042,29 +2049,29 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // You have reached the maximum limit of active signaling channels for this // AWS account in this region. type AccountChannelLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2081,17 +2088,17 @@ func (s AccountChannelLimitExceededException) GoString() string { func newErrorAccountChannelLimitExceededException(v protocol.ResponseMetadata) error { return &AccountChannelLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccountChannelLimitExceededException) Code() string { +func (s *AccountChannelLimitExceededException) Code() string { return "AccountChannelLimitExceededException" } // Message returns the exception's message. -func (s AccountChannelLimitExceededException) Message() string { +func (s *AccountChannelLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2099,28 +2106,28 @@ func (s AccountChannelLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccountChannelLimitExceededException) OrigErr() error { +func (s *AccountChannelLimitExceededException) OrigErr() error { return nil } -func (s AccountChannelLimitExceededException) Error() string { +func (s *AccountChannelLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccountChannelLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccountChannelLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccountChannelLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccountChannelLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The number of streams created for the account is too high. type AccountStreamLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2137,17 +2144,17 @@ func (s AccountStreamLimitExceededException) GoString() string { func newErrorAccountStreamLimitExceededException(v protocol.ResponseMetadata) error { return &AccountStreamLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccountStreamLimitExceededException) Code() string { +func (s *AccountStreamLimitExceededException) Code() string { return "AccountStreamLimitExceededException" } // Message returns the exception's message. -func (s AccountStreamLimitExceededException) Message() string { +func (s *AccountStreamLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2155,29 +2162,29 @@ func (s AccountStreamLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccountStreamLimitExceededException) OrigErr() error { +func (s *AccountStreamLimitExceededException) OrigErr() error { return nil } -func (s AccountStreamLimitExceededException) Error() string { +func (s *AccountStreamLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccountStreamLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccountStreamLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccountStreamLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccountStreamLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A structure that encapsulates a signaling channel's metadata and properties. type ChannelInfo struct { _ struct{} `type:"structure"` - // The ARN of the signaling channel. + // The Amazon Resource Name (ARN) of the signaling channel. ChannelARN *string `min:"1" type:"string"` // The name of the signaling channel. @@ -2304,8 +2311,8 @@ func (s *ChannelNameCondition) SetComparisonValue(v string) *ChannelNameConditio // Kinesis Video Streams has throttled the request because you have exceeded // the limit of allowed client calls. Try making the call later. type ClientLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2322,17 +2329,17 @@ func (s ClientLimitExceededException) GoString() string { func newErrorClientLimitExceededException(v protocol.ResponseMetadata) error { return &ClientLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ClientLimitExceededException) Code() string { +func (s *ClientLimitExceededException) Code() string { return "ClientLimitExceededException" } // Message returns the exception's message. -func (s ClientLimitExceededException) Message() string { +func (s *ClientLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2340,29 +2347,29 @@ func (s ClientLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ClientLimitExceededException) OrigErr() error { +func (s *ClientLimitExceededException) OrigErr() error { return nil } -func (s ClientLimitExceededException) Error() string { +func (s *ClientLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ClientLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ClientLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ClientLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ClientLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type CreateSignalingChannelInput struct { _ struct{} `type:"structure"` // A name for the signaling channel that you are creating. It must be unique - // for each account and region. + // for each AWS account and AWS Region. // // ChannelName is a required field ChannelName *string `min:"1" type:"string" required:"true"` @@ -2374,7 +2381,7 @@ type CreateSignalingChannelInput struct { // A structure containing the configuration for the SINGLE_MASTER channel type. SingleMasterConfiguration *SingleMasterConfiguration `type:"structure"` - // A set of tags (key/value pairs) that you want to associate with this channel. + // A set of tags (key-value pairs) that you want to associate with this channel. Tags []*Tag `type:"list"` } @@ -2446,7 +2453,7 @@ func (s *CreateSignalingChannelInput) SetTags(v []*Tag) *CreateSignalingChannelI type CreateSignalingChannelOutput struct { _ struct{} `type:"structure"` - // The ARN of the created channel. + // The Amazon Resource Name (ARN) of the created channel. ChannelARN *string `min:"1" type:"string"` } @@ -2619,14 +2626,15 @@ func (s *CreateStreamOutput) SetStreamARN(v string) *CreateStreamOutput { type DeleteSignalingChannelInput struct { _ struct{} `type:"structure"` - // The ARN of the signaling channel that you want to delete. + // The Amazon Resource Name (ARN) of the signaling channel that you want to + // delete. // // ChannelARN is a required field ChannelARN *string `min:"1" type:"string" required:"true"` // The current version of the signaling channel that you want to delete. You // can obtain the current version by invoking the DescribeSignalingChannel or - // ListSignalingChannels APIs. + // ListSignalingChannels API operations. CurrentVersion *string `min:"1" type:"string"` } @@ -2902,8 +2910,8 @@ func (s *DescribeStreamOutput) SetStreamInfo(v *StreamInfo) *DescribeStreamOutpu // Not implemented. type DeviceStreamLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2920,17 +2928,17 @@ func (s DeviceStreamLimitExceededException) GoString() string { func newErrorDeviceStreamLimitExceededException(v protocol.ResponseMetadata) error { return &DeviceStreamLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DeviceStreamLimitExceededException) Code() string { +func (s *DeviceStreamLimitExceededException) Code() string { return "DeviceStreamLimitExceededException" } // Message returns the exception's message. -func (s DeviceStreamLimitExceededException) Message() string { +func (s *DeviceStreamLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2938,22 +2946,22 @@ func (s DeviceStreamLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DeviceStreamLimitExceededException) OrigErr() error { +func (s *DeviceStreamLimitExceededException) OrigErr() error { return nil } -func (s DeviceStreamLimitExceededException) Error() string { +func (s *DeviceStreamLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DeviceStreamLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DeviceStreamLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DeviceStreamLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *DeviceStreamLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type GetDataEndpointInput struct { @@ -3047,7 +3055,8 @@ func (s *GetDataEndpointOutput) SetDataEndpoint(v string) *GetDataEndpointOutput type GetSignalingChannelEndpointInput struct { _ struct{} `type:"structure"` - // The ARN of the signalling channel for which you want to get an endpoint. + // The Amazon Resource Name (ARN) of the signalling channel for which you want + // to get an endpoint. // // ChannelARN is a required field ChannelARN *string `min:"1" type:"string" required:"true"` @@ -3125,8 +3134,8 @@ func (s *GetSignalingChannelEndpointOutput) SetResourceEndpointList(v []*Resourc // The value for this input parameter is invalid. type InvalidArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3143,17 +3152,17 @@ func (s InvalidArgumentException) GoString() string { func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { return &InvalidArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArgumentException) Code() string { +func (s *InvalidArgumentException) Code() string { return "InvalidArgumentException" } // Message returns the exception's message. -func (s InvalidArgumentException) Message() string { +func (s *InvalidArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3161,28 +3170,28 @@ func (s InvalidArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArgumentException) OrigErr() error { +func (s *InvalidArgumentException) OrigErr() error { return nil } -func (s InvalidArgumentException) Error() string { +func (s *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // Not implemented. type InvalidDeviceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3199,17 +3208,17 @@ func (s InvalidDeviceException) GoString() string { func newErrorInvalidDeviceException(v protocol.ResponseMetadata) error { return &InvalidDeviceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeviceException) Code() string { +func (s *InvalidDeviceException) Code() string { return "InvalidDeviceException" } // Message returns the exception's message. -func (s InvalidDeviceException) Message() string { +func (s *InvalidDeviceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3217,28 +3226,28 @@ func (s InvalidDeviceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeviceException) OrigErr() error { +func (s *InvalidDeviceException) OrigErr() error { return nil } -func (s InvalidDeviceException) Error() string { +func (s *InvalidDeviceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeviceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeviceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeviceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeviceException) RequestID() string { + return s.RespMetadata.RequestID } // The format of the StreamARN is invalid. type InvalidResourceFormatException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3255,17 +3264,17 @@ func (s InvalidResourceFormatException) GoString() string { func newErrorInvalidResourceFormatException(v protocol.ResponseMetadata) error { return &InvalidResourceFormatException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceFormatException) Code() string { +func (s *InvalidResourceFormatException) Code() string { return "InvalidResourceFormatException" } // Message returns the exception's message. -func (s InvalidResourceFormatException) Message() string { +func (s *InvalidResourceFormatException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3273,22 +3282,22 @@ func (s InvalidResourceFormatException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceFormatException) OrigErr() error { +func (s *InvalidResourceFormatException) OrigErr() error { return nil } -func (s InvalidResourceFormatException) Error() string { +func (s *InvalidResourceFormatException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceFormatException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceFormatException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceFormatException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceFormatException) RequestID() string { + return s.RespMetadata.RequestID } type ListSignalingChannelsInput struct { @@ -3489,7 +3498,8 @@ type ListTagsForResourceInput struct { // request to fetch the next batch of tags. NextToken *string `type:"string"` - // The ARN of the signaling channel for which you want to list tags. + // The Amazon Resource Name (ARN) of the signaling channel for which you want + // to list tags. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -3662,8 +3672,8 @@ func (s *ListTagsForStreamOutput) SetTags(v map[string]*string) *ListTagsForStre // The caller is not authorized to perform this operation. type NotAuthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3680,17 +3690,17 @@ func (s NotAuthorizedException) GoString() string { func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { return &NotAuthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotAuthorizedException) Code() string { +func (s *NotAuthorizedException) Code() string { return "NotAuthorizedException" } // Message returns the exception's message. -func (s NotAuthorizedException) Message() string { +func (s *NotAuthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3698,22 +3708,22 @@ func (s NotAuthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotAuthorizedException) OrigErr() error { +func (s *NotAuthorizedException) OrigErr() error { return nil } -func (s NotAuthorizedException) Error() string { +func (s *NotAuthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotAuthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotAuthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotAuthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotAuthorizedException) RequestID() string { + return s.RespMetadata.RequestID } // An object that describes the endpoint of the signaling channel returned by @@ -3752,10 +3762,10 @@ func (s *ResourceEndpointListItem) SetResourceEndpoint(v string) *ResourceEndpoi return s } -// The stream is currently not available for this operation. +// The signaling channel is currently not available for this operation. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3772,17 +3782,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3790,28 +3800,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Amazon Kinesis Video Streams can't find the stream that you specified. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3828,17 +3838,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3846,22 +3856,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An object that contains the endpoint configuration for the SINGLE_MASTER @@ -4163,7 +4173,8 @@ func (s *Tag) SetValue(v string) *Tag { type TagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the signaling channel to which you want to add tags. + // The Amazon Resource Name (ARN) of the signaling channel to which you want + // to add tags. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -4327,8 +4338,8 @@ func (s TagStreamOutput) GoString() string { // You have exceeded the limit of tags that you can associate with the resource. // Kinesis video streams support up to 50 tags. type TagsPerResourceExceededLimitException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4345,17 +4356,17 @@ func (s TagsPerResourceExceededLimitException) GoString() string { func newErrorTagsPerResourceExceededLimitException(v protocol.ResponseMetadata) error { return &TagsPerResourceExceededLimitException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagsPerResourceExceededLimitException) Code() string { +func (s *TagsPerResourceExceededLimitException) Code() string { return "TagsPerResourceExceededLimitException" } // Message returns the exception's message. -func (s TagsPerResourceExceededLimitException) Message() string { +func (s *TagsPerResourceExceededLimitException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4363,28 +4374,29 @@ func (s TagsPerResourceExceededLimitException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagsPerResourceExceededLimitException) OrigErr() error { +func (s *TagsPerResourceExceededLimitException) OrigErr() error { return nil } -func (s TagsPerResourceExceededLimitException) Error() string { +func (s *TagsPerResourceExceededLimitException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagsPerResourceExceededLimitException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagsPerResourceExceededLimitException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagsPerResourceExceededLimitException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagsPerResourceExceededLimitException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the signaling channel from which you want to remove tags. + // The Amazon Resource Name (ARN) of the signaling channel from which you want + // to remove tags. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -4649,7 +4661,8 @@ func (s UpdateDataRetentionOutput) GoString() string { type UpdateSignalingChannelInput struct { _ struct{} `type:"structure"` - // The ARN of the signaling channel that you want to update. + // The Amazon Resource Name (ARN) of the signaling channel that you want to + // update. // // ChannelARN is a required field ChannelARN *string `min:"1" type:"string" required:"true"` @@ -4851,8 +4864,8 @@ func (s UpdateStreamOutput) GoString() string { // latest version, use the DescribeStream (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_DescribeStream.html) // API. type VersionMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4869,17 +4882,17 @@ func (s VersionMismatchException) GoString() string { func newErrorVersionMismatchException(v protocol.ResponseMetadata) error { return &VersionMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s VersionMismatchException) Code() string { +func (s *VersionMismatchException) Code() string { return "VersionMismatchException" } // Message returns the exception's message. -func (s VersionMismatchException) Message() string { +func (s *VersionMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4887,22 +4900,22 @@ func (s VersionMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s VersionMismatchException) OrigErr() error { +func (s *VersionMismatchException) OrigErr() error { return nil } -func (s VersionMismatchException) Error() string { +func (s *VersionMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s VersionMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *VersionMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s VersionMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *VersionMismatchException) RequestID() string { + return s.RespMetadata.RequestID } const ( @@ -4923,6 +4936,9 @@ const ( // APINameGetDashStreamingSessionUrl is a APIName enum value APINameGetDashStreamingSessionUrl = "GET_DASH_STREAMING_SESSION_URL" + + // APINameGetClip is a APIName enum value + APINameGetClip = "GET_CLIP" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/errors.go index 57993f66a76..c1b48db3fc5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisvideo/errors.go @@ -67,7 +67,7 @@ const ( // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // - // The stream is currently not available for this operation. + // The signaling channel is currently not available for this operation. ErrCodeResourceInUseException = "ResourceInUseException" // ErrCodeResourceNotFoundException for service response error code 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 725da920645..efbc44ebcbf 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 @@ -6533,8 +6533,8 @@ func (s *AliasListEntry) SetTargetKeyId(v string) *AliasListEntry { // The request was rejected because it attempted to create a resource that already // exists. type AlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6551,17 +6551,17 @@ func (s AlreadyExistsException) GoString() string { func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { return &AlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlreadyExistsException) Code() string { +func (s *AlreadyExistsException) Code() string { return "AlreadyExistsException" } // Message returns the exception's message. -func (s AlreadyExistsException) Message() string { +func (s *AlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6569,22 +6569,22 @@ func (s AlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlreadyExistsException) OrigErr() error { +func (s *AlreadyExistsException) OrigErr() error { return nil } -func (s AlreadyExistsException) Error() string { +func (s *AlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } type CancelKeyDeletionInput struct { @@ -6671,8 +6671,8 @@ func (s *CancelKeyDeletionOutput) SetKeyId(v string) *CancelKeyDeletionOutput { // view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) // operation. type CloudHsmClusterInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6689,17 +6689,17 @@ func (s CloudHsmClusterInUseException) GoString() string { func newErrorCloudHsmClusterInUseException(v protocol.ResponseMetadata) error { return &CloudHsmClusterInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmClusterInUseException) Code() string { +func (s *CloudHsmClusterInUseException) Code() string { return "CloudHsmClusterInUseException" } // Message returns the exception's message. -func (s CloudHsmClusterInUseException) Message() string { +func (s *CloudHsmClusterInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6707,22 +6707,22 @@ func (s CloudHsmClusterInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmClusterInUseException) OrigErr() error { +func (s *CloudHsmClusterInUseException) OrigErr() error { return nil } -func (s CloudHsmClusterInUseException) Error() string { +func (s *CloudHsmClusterInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmClusterInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmClusterInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmClusterInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmClusterInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the associated AWS CloudHSM cluster did @@ -6756,8 +6756,8 @@ func (s CloudHsmClusterInUseException) RequestID() string { // see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html) // in the AWS CloudHSM User Guide . type CloudHsmClusterInvalidConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6774,17 +6774,17 @@ func (s CloudHsmClusterInvalidConfigurationException) GoString() string { func newErrorCloudHsmClusterInvalidConfigurationException(v protocol.ResponseMetadata) error { return &CloudHsmClusterInvalidConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmClusterInvalidConfigurationException) Code() string { +func (s *CloudHsmClusterInvalidConfigurationException) Code() string { return "CloudHsmClusterInvalidConfigurationException" } // Message returns the exception's message. -func (s CloudHsmClusterInvalidConfigurationException) Message() string { +func (s *CloudHsmClusterInvalidConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6792,22 +6792,22 @@ func (s CloudHsmClusterInvalidConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmClusterInvalidConfigurationException) OrigErr() error { +func (s *CloudHsmClusterInvalidConfigurationException) OrigErr() error { return nil } -func (s CloudHsmClusterInvalidConfigurationException) Error() string { +func (s *CloudHsmClusterInvalidConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmClusterInvalidConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmClusterInvalidConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmClusterInvalidConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmClusterInvalidConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the AWS CloudHSM cluster that is associated @@ -6816,8 +6816,8 @@ func (s CloudHsmClusterInvalidConfigurationException) RequestID() string { // (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) // in the AWS CloudHSM User Guide. type CloudHsmClusterNotActiveException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6834,17 +6834,17 @@ func (s CloudHsmClusterNotActiveException) GoString() string { func newErrorCloudHsmClusterNotActiveException(v protocol.ResponseMetadata) error { return &CloudHsmClusterNotActiveException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmClusterNotActiveException) Code() string { +func (s *CloudHsmClusterNotActiveException) Code() string { return "CloudHsmClusterNotActiveException" } // Message returns the exception's message. -func (s CloudHsmClusterNotActiveException) Message() string { +func (s *CloudHsmClusterNotActiveException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6852,30 +6852,30 @@ func (s CloudHsmClusterNotActiveException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmClusterNotActiveException) OrigErr() error { +func (s *CloudHsmClusterNotActiveException) OrigErr() error { return nil } -func (s CloudHsmClusterNotActiveException) Error() string { +func (s *CloudHsmClusterNotActiveException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmClusterNotActiveException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmClusterNotActiveException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmClusterNotActiveException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmClusterNotActiveException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster // with the specified cluster ID. Retry the request with a different cluster // ID. type CloudHsmClusterNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6892,17 +6892,17 @@ func (s CloudHsmClusterNotFoundException) GoString() string { func newErrorCloudHsmClusterNotFoundException(v protocol.ResponseMetadata) error { return &CloudHsmClusterNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmClusterNotFoundException) Code() string { +func (s *CloudHsmClusterNotFoundException) Code() string { return "CloudHsmClusterNotFoundException" } // Message returns the exception's message. -func (s CloudHsmClusterNotFoundException) Message() string { +func (s *CloudHsmClusterNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6910,22 +6910,22 @@ func (s CloudHsmClusterNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmClusterNotFoundException) OrigErr() error { +func (s *CloudHsmClusterNotFoundException) OrigErr() error { return nil } -func (s CloudHsmClusterNotFoundException) Error() string { +func (s *CloudHsmClusterNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmClusterNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmClusterNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmClusterNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmClusterNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified AWS CloudHSM cluster has a @@ -6941,8 +6941,8 @@ func (s CloudHsmClusterNotFoundException) RequestID() string { // view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) // operation. type CloudHsmClusterNotRelatedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6959,17 +6959,17 @@ func (s CloudHsmClusterNotRelatedException) GoString() string { func newErrorCloudHsmClusterNotRelatedException(v protocol.ResponseMetadata) error { return &CloudHsmClusterNotRelatedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CloudHsmClusterNotRelatedException) Code() string { +func (s *CloudHsmClusterNotRelatedException) Code() string { return "CloudHsmClusterNotRelatedException" } // Message returns the exception's message. -func (s CloudHsmClusterNotRelatedException) Message() string { +func (s *CloudHsmClusterNotRelatedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6977,22 +6977,22 @@ func (s CloudHsmClusterNotRelatedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CloudHsmClusterNotRelatedException) OrigErr() error { +func (s *CloudHsmClusterNotRelatedException) OrigErr() error { return nil } -func (s CloudHsmClusterNotRelatedException) Error() string { +func (s *CloudHsmClusterNotRelatedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CloudHsmClusterNotRelatedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CloudHsmClusterNotRelatedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CloudHsmClusterNotRelatedException) RequestID() string { - return s.respMetadata.RequestID +func (s *CloudHsmClusterNotRelatedException) RequestID() string { + return s.RespMetadata.RequestID } type ConnectCustomKeyStoreInput struct { @@ -7714,8 +7714,8 @@ func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput { // use the ScheduleKeyDeletion operation to delete the CMKs. After they are // deleted, you can delete the custom key store. type CustomKeyStoreHasCMKsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7732,17 +7732,17 @@ func (s CustomKeyStoreHasCMKsException) GoString() string { func newErrorCustomKeyStoreHasCMKsException(v protocol.ResponseMetadata) error { return &CustomKeyStoreHasCMKsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CustomKeyStoreHasCMKsException) Code() string { +func (s *CustomKeyStoreHasCMKsException) Code() string { return "CustomKeyStoreHasCMKsException" } // Message returns the exception's message. -func (s CustomKeyStoreHasCMKsException) Message() string { +func (s *CustomKeyStoreHasCMKsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7750,22 +7750,22 @@ func (s CustomKeyStoreHasCMKsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CustomKeyStoreHasCMKsException) OrigErr() error { +func (s *CustomKeyStoreHasCMKsException) OrigErr() error { return nil } -func (s CustomKeyStoreHasCMKsException) Error() string { +func (s *CustomKeyStoreHasCMKsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CustomKeyStoreHasCMKsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CustomKeyStoreHasCMKsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CustomKeyStoreHasCMKsException) RequestID() string { - return s.respMetadata.RequestID +func (s *CustomKeyStoreHasCMKsException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because of the ConnectionState of the custom key @@ -7786,8 +7786,8 @@ func (s CustomKeyStoreHasCMKsException) RequestID() string { // with a ConnectionState of DISCONNECTING or FAILED. This operation is valid // for all other ConnectionState values. type CustomKeyStoreInvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7804,17 +7804,17 @@ func (s CustomKeyStoreInvalidStateException) GoString() string { func newErrorCustomKeyStoreInvalidStateException(v protocol.ResponseMetadata) error { return &CustomKeyStoreInvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CustomKeyStoreInvalidStateException) Code() string { +func (s *CustomKeyStoreInvalidStateException) Code() string { return "CustomKeyStoreInvalidStateException" } // Message returns the exception's message. -func (s CustomKeyStoreInvalidStateException) Message() string { +func (s *CustomKeyStoreInvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7822,30 +7822,30 @@ func (s CustomKeyStoreInvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CustomKeyStoreInvalidStateException) OrigErr() error { +func (s *CustomKeyStoreInvalidStateException) OrigErr() error { return nil } -func (s CustomKeyStoreInvalidStateException) Error() string { +func (s *CustomKeyStoreInvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CustomKeyStoreInvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CustomKeyStoreInvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CustomKeyStoreInvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *CustomKeyStoreInvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified custom key store name is already // assigned to another custom key store in the account. Try again with a custom // key store name that is unique in the account. type CustomKeyStoreNameInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7862,17 +7862,17 @@ func (s CustomKeyStoreNameInUseException) GoString() string { func newErrorCustomKeyStoreNameInUseException(v protocol.ResponseMetadata) error { return &CustomKeyStoreNameInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CustomKeyStoreNameInUseException) Code() string { +func (s *CustomKeyStoreNameInUseException) Code() string { return "CustomKeyStoreNameInUseException" } // Message returns the exception's message. -func (s CustomKeyStoreNameInUseException) Message() string { +func (s *CustomKeyStoreNameInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7880,29 +7880,29 @@ func (s CustomKeyStoreNameInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CustomKeyStoreNameInUseException) OrigErr() error { +func (s *CustomKeyStoreNameInUseException) OrigErr() error { return nil } -func (s CustomKeyStoreNameInUseException) Error() string { +func (s *CustomKeyStoreNameInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CustomKeyStoreNameInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CustomKeyStoreNameInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CustomKeyStoreNameInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *CustomKeyStoreNameInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because AWS KMS cannot find a custom key store with // the specified key store name or ID. type CustomKeyStoreNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7919,17 +7919,17 @@ func (s CustomKeyStoreNotFoundException) GoString() string { func newErrorCustomKeyStoreNotFoundException(v protocol.ResponseMetadata) error { return &CustomKeyStoreNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CustomKeyStoreNotFoundException) Code() string { +func (s *CustomKeyStoreNotFoundException) Code() string { return "CustomKeyStoreNotFoundException" } // Message returns the exception's message. -func (s CustomKeyStoreNotFoundException) Message() string { +func (s *CustomKeyStoreNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7937,22 +7937,22 @@ func (s CustomKeyStoreNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CustomKeyStoreNotFoundException) OrigErr() error { +func (s *CustomKeyStoreNotFoundException) OrigErr() error { return nil } -func (s CustomKeyStoreNotFoundException) Error() string { +func (s *CustomKeyStoreNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CustomKeyStoreNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CustomKeyStoreNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CustomKeyStoreNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *CustomKeyStoreNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about each custom key store in the custom key store @@ -8460,8 +8460,8 @@ func (s DeleteImportedKeyMaterialOutput) GoString() string { // The system timed out while trying to fulfill the request. The request can // be retried. type DependencyTimeoutException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8478,17 +8478,17 @@ func (s DependencyTimeoutException) GoString() string { func newErrorDependencyTimeoutException(v protocol.ResponseMetadata) error { return &DependencyTimeoutException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DependencyTimeoutException) Code() string { +func (s *DependencyTimeoutException) Code() string { return "DependencyTimeoutException" } // Message returns the exception's message. -func (s DependencyTimeoutException) Message() string { +func (s *DependencyTimeoutException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8496,22 +8496,22 @@ func (s DependencyTimeoutException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DependencyTimeoutException) OrigErr() error { +func (s *DependencyTimeoutException) OrigErr() error { return nil } -func (s DependencyTimeoutException) Error() string { +func (s *DependencyTimeoutException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DependencyTimeoutException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DependencyTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DependencyTimeoutException) RequestID() string { - return s.respMetadata.RequestID +func (s *DependencyTimeoutException) RequestID() string { + return s.RespMetadata.RequestID } type DescribeCustomKeyStoresInput struct { @@ -8879,8 +8879,8 @@ func (s DisableKeyRotationOutput) GoString() string { // The request was rejected because the specified CMK is not enabled. type DisabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8897,17 +8897,17 @@ func (s DisabledException) GoString() string { func newErrorDisabledException(v protocol.ResponseMetadata) error { return &DisabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DisabledException) Code() string { +func (s *DisabledException) Code() string { return "DisabledException" } // Message returns the exception's message. -func (s DisabledException) Message() string { +func (s *DisabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8915,22 +8915,22 @@ func (s DisabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DisabledException) OrigErr() error { +func (s *DisabledException) OrigErr() error { return nil } -func (s DisabledException) Error() string { +func (s *DisabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DisabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DisabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DisabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *DisabledException) RequestID() string { + return s.RespMetadata.RequestID } type DisconnectCustomKeyStoreInput struct { @@ -9293,8 +9293,8 @@ func (s *EncryptOutput) SetKeyId(v string) *EncryptOutput { // GetParametersForImport to get a new import token and public key, use the // new public key to encrypt the key material, and then try the request again. type ExpiredImportTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9311,17 +9311,17 @@ func (s ExpiredImportTokenException) GoString() string { func newErrorExpiredImportTokenException(v protocol.ResponseMetadata) error { return &ExpiredImportTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExpiredImportTokenException) Code() string { +func (s *ExpiredImportTokenException) Code() string { return "ExpiredImportTokenException" } // Message returns the exception's message. -func (s ExpiredImportTokenException) Message() string { +func (s *ExpiredImportTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9329,22 +9329,22 @@ func (s ExpiredImportTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExpiredImportTokenException) OrigErr() error { +func (s *ExpiredImportTokenException) OrigErr() error { return nil } -func (s ExpiredImportTokenException) Error() string { +func (s *ExpiredImportTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExpiredImportTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExpiredImportTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExpiredImportTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExpiredImportTokenException) RequestID() string { + return s.RespMetadata.RequestID } type GenerateDataKeyInput struct { @@ -10873,8 +10873,8 @@ func (s ImportKeyMaterialOutput) GoString() string { // The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request // must identify the same CMK that was used to encrypt the ciphertext. type IncorrectKeyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10891,17 +10891,17 @@ func (s IncorrectKeyException) GoString() string { func newErrorIncorrectKeyException(v protocol.ResponseMetadata) error { return &IncorrectKeyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncorrectKeyException) Code() string { +func (s *IncorrectKeyException) Code() string { return "IncorrectKeyException" } // Message returns the exception's message. -func (s IncorrectKeyException) Message() string { +func (s *IncorrectKeyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10909,30 +10909,30 @@ func (s IncorrectKeyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncorrectKeyException) OrigErr() error { +func (s *IncorrectKeyException) OrigErr() error { return nil } -func (s IncorrectKeyException) Error() string { +func (s *IncorrectKeyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncorrectKeyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncorrectKeyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncorrectKeyException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncorrectKeyException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the key material in the request is, expired, // invalid, or is not the same key material that was previously imported into // this customer master key (CMK). type IncorrectKeyMaterialException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10949,17 +10949,17 @@ func (s IncorrectKeyMaterialException) GoString() string { func newErrorIncorrectKeyMaterialException(v protocol.ResponseMetadata) error { return &IncorrectKeyMaterialException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncorrectKeyMaterialException) Code() string { +func (s *IncorrectKeyMaterialException) Code() string { return "IncorrectKeyMaterialException" } // Message returns the exception's message. -func (s IncorrectKeyMaterialException) Message() string { +func (s *IncorrectKeyMaterialException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10967,22 +10967,22 @@ func (s IncorrectKeyMaterialException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncorrectKeyMaterialException) OrigErr() error { +func (s *IncorrectKeyMaterialException) OrigErr() error { return nil } -func (s IncorrectKeyMaterialException) Error() string { +func (s *IncorrectKeyMaterialException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncorrectKeyMaterialException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncorrectKeyMaterialException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncorrectKeyMaterialException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncorrectKeyMaterialException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the trust anchor certificate in the request @@ -10992,8 +10992,8 @@ func (s IncorrectKeyMaterialException) RequestID() string { // you create the trust anchor certificate and save it in the customerCA.crt // file. type IncorrectTrustAnchorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11010,17 +11010,17 @@ func (s IncorrectTrustAnchorException) GoString() string { func newErrorIncorrectTrustAnchorException(v protocol.ResponseMetadata) error { return &IncorrectTrustAnchorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncorrectTrustAnchorException) Code() string { +func (s *IncorrectTrustAnchorException) Code() string { return "IncorrectTrustAnchorException" } // Message returns the exception's message. -func (s IncorrectTrustAnchorException) Message() string { +func (s *IncorrectTrustAnchorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11028,29 +11028,29 @@ func (s IncorrectTrustAnchorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncorrectTrustAnchorException) OrigErr() error { +func (s *IncorrectTrustAnchorException) OrigErr() error { return nil } -func (s IncorrectTrustAnchorException) Error() string { +func (s *IncorrectTrustAnchorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncorrectTrustAnchorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncorrectTrustAnchorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncorrectTrustAnchorException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncorrectTrustAnchorException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because an internal exception occurred. The request // can be retried. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11067,17 +11067,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "KMSInternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11085,28 +11085,28 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified alias name is not valid. type InvalidAliasNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11123,17 +11123,17 @@ func (s InvalidAliasNameException) GoString() string { func newErrorInvalidAliasNameException(v protocol.ResponseMetadata) error { return &InvalidAliasNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAliasNameException) Code() string { +func (s *InvalidAliasNameException) Code() string { return "InvalidAliasNameException" } // Message returns the exception's message. -func (s InvalidAliasNameException) Message() string { +func (s *InvalidAliasNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11141,29 +11141,29 @@ func (s InvalidAliasNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAliasNameException) OrigErr() error { +func (s *InvalidAliasNameException) OrigErr() error { return nil } -func (s InvalidAliasNameException) Error() string { +func (s *InvalidAliasNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAliasNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAliasNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAliasNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAliasNameException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because a specified ARN, or an ARN in a key policy, // is not valid. type InvalidArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11180,17 +11180,17 @@ func (s InvalidArnException) GoString() string { func newErrorInvalidArnException(v protocol.ResponseMetadata) error { return &InvalidArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArnException) Code() string { +func (s *InvalidArnException) Code() string { return "InvalidArnException" } // Message returns the exception's message. -func (s InvalidArnException) Message() string { +func (s *InvalidArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11198,22 +11198,22 @@ func (s InvalidArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArnException) OrigErr() error { +func (s *InvalidArnException) OrigErr() error { return nil } -func (s InvalidArnException) Error() string { +func (s *InvalidArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArnException) RequestID() string { + return s.RespMetadata.RequestID } // From the Decrypt or ReEncrypt operation, the request was rejected because @@ -11224,8 +11224,8 @@ func (s InvalidArnException) RequestID() string { // From the ImportKeyMaterial operation, the request was rejected because AWS // KMS could not decrypt the encrypted (wrapped) key material. type InvalidCiphertextException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11242,17 +11242,17 @@ func (s InvalidCiphertextException) GoString() string { func newErrorInvalidCiphertextException(v protocol.ResponseMetadata) error { return &InvalidCiphertextException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCiphertextException) Code() string { +func (s *InvalidCiphertextException) Code() string { return "InvalidCiphertextException" } // Message returns the exception's message. -func (s InvalidCiphertextException) Message() string { +func (s *InvalidCiphertextException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11260,28 +11260,28 @@ func (s InvalidCiphertextException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCiphertextException) OrigErr() error { +func (s *InvalidCiphertextException) OrigErr() error { return nil } -func (s InvalidCiphertextException) Error() string { +func (s *InvalidCiphertextException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCiphertextException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCiphertextException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCiphertextException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCiphertextException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified GrantId is not valid. type InvalidGrantIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11298,17 +11298,17 @@ func (s InvalidGrantIdException) GoString() string { func newErrorInvalidGrantIdException(v protocol.ResponseMetadata) error { return &InvalidGrantIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidGrantIdException) Code() string { +func (s *InvalidGrantIdException) Code() string { return "InvalidGrantIdException" } // Message returns the exception's message. -func (s InvalidGrantIdException) Message() string { +func (s *InvalidGrantIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11316,28 +11316,28 @@ func (s InvalidGrantIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidGrantIdException) OrigErr() error { +func (s *InvalidGrantIdException) OrigErr() error { return nil } -func (s InvalidGrantIdException) Error() string { +func (s *InvalidGrantIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidGrantIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidGrantIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidGrantIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidGrantIdException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified grant token is not valid. type InvalidGrantTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11354,17 +11354,17 @@ func (s InvalidGrantTokenException) GoString() string { func newErrorInvalidGrantTokenException(v protocol.ResponseMetadata) error { return &InvalidGrantTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidGrantTokenException) Code() string { +func (s *InvalidGrantTokenException) Code() string { return "InvalidGrantTokenException" } // Message returns the exception's message. -func (s InvalidGrantTokenException) Message() string { +func (s *InvalidGrantTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11372,29 +11372,29 @@ func (s InvalidGrantTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidGrantTokenException) OrigErr() error { +func (s *InvalidGrantTokenException) OrigErr() error { return nil } -func (s InvalidGrantTokenException) Error() string { +func (s *InvalidGrantTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidGrantTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidGrantTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidGrantTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidGrantTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the provided import token is invalid or // is associated with a different customer master key (CMK). type InvalidImportTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11411,17 +11411,17 @@ func (s InvalidImportTokenException) GoString() string { func newErrorInvalidImportTokenException(v protocol.ResponseMetadata) error { return &InvalidImportTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidImportTokenException) Code() string { +func (s *InvalidImportTokenException) Code() string { return "InvalidImportTokenException" } // Message returns the exception's message. -func (s InvalidImportTokenException) Message() string { +func (s *InvalidImportTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11429,22 +11429,22 @@ func (s InvalidImportTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidImportTokenException) OrigErr() error { +func (s *InvalidImportTokenException) OrigErr() error { return nil } -func (s InvalidImportTokenException) Error() string { +func (s *InvalidImportTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidImportTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidImportTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidImportTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidImportTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected for one of the following reasons: @@ -11461,8 +11461,8 @@ func (s InvalidImportTokenException) RequestID() string { // To find the encryption or signing algorithms supported for a particular CMK, // use the DescribeKey operation. type InvalidKeyUsageException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11479,17 +11479,17 @@ func (s InvalidKeyUsageException) GoString() string { func newErrorInvalidKeyUsageException(v protocol.ResponseMetadata) error { return &InvalidKeyUsageException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidKeyUsageException) Code() string { +func (s *InvalidKeyUsageException) Code() string { return "InvalidKeyUsageException" } // Message returns the exception's message. -func (s InvalidKeyUsageException) Message() string { +func (s *InvalidKeyUsageException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11497,29 +11497,29 @@ func (s InvalidKeyUsageException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidKeyUsageException) OrigErr() error { +func (s *InvalidKeyUsageException) OrigErr() error { return nil } -func (s InvalidKeyUsageException) Error() string { +func (s *InvalidKeyUsageException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidKeyUsageException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidKeyUsageException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidKeyUsageException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidKeyUsageException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the marker that specifies where pagination // should next begin is not valid. type InvalidMarkerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11536,17 +11536,17 @@ func (s InvalidMarkerException) GoString() string { func newErrorInvalidMarkerException(v protocol.ResponseMetadata) error { return &InvalidMarkerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMarkerException) Code() string { +func (s *InvalidMarkerException) Code() string { return "InvalidMarkerException" } // Message returns the exception's message. -func (s InvalidMarkerException) Message() string { +func (s *InvalidMarkerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11554,22 +11554,22 @@ func (s InvalidMarkerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMarkerException) OrigErr() error { +func (s *InvalidMarkerException) OrigErr() error { return nil } -func (s InvalidMarkerException) Error() string { +func (s *InvalidMarkerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMarkerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMarkerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMarkerException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMarkerException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the state of the specified resource is not @@ -11579,8 +11579,8 @@ func (s InvalidMarkerException) RequestID() string { // Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide . type InvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11597,17 +11597,17 @@ func (s InvalidStateException) GoString() string { func newErrorInvalidStateException(v protocol.ResponseMetadata) error { return &InvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateException) Code() string { +func (s *InvalidStateException) Code() string { return "KMSInvalidStateException" } // Message returns the exception's message. -func (s InvalidStateException) Message() string { +func (s *InvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11615,30 +11615,30 @@ func (s InvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateException) OrigErr() error { +func (s *InvalidStateException) OrigErr() error { return nil } -func (s InvalidStateException) Error() string { +func (s *InvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the signature verification failed. Signature // verification fails when it cannot confirm that signature was produced by // signing the specified message with the specified CMK and signing algorithm. type KMSInvalidSignatureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11655,17 +11655,17 @@ func (s KMSInvalidSignatureException) GoString() string { func newErrorKMSInvalidSignatureException(v protocol.ResponseMetadata) error { return &KMSInvalidSignatureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSInvalidSignatureException) Code() string { +func (s *KMSInvalidSignatureException) Code() string { return "KMSInvalidSignatureException" } // Message returns the exception's message. -func (s KMSInvalidSignatureException) Message() string { +func (s *KMSInvalidSignatureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11673,22 +11673,22 @@ func (s KMSInvalidSignatureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSInvalidSignatureException) OrigErr() error { +func (s *KMSInvalidSignatureException) OrigErr() error { return nil } -func (s KMSInvalidSignatureException) Error() string { +func (s *KMSInvalidSignatureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSInvalidSignatureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSInvalidSignatureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSInvalidSignatureException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSInvalidSignatureException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about each entry in the key list. @@ -11940,8 +11940,8 @@ func (s *KeyMetadata) SetValidTo(v time.Time) *KeyMetadata { // The request was rejected because the specified CMK was not available. You // can retry the request. type KeyUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11958,17 +11958,17 @@ func (s KeyUnavailableException) GoString() string { func newErrorKeyUnavailableException(v protocol.ResponseMetadata) error { return &KeyUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KeyUnavailableException) Code() string { +func (s *KeyUnavailableException) Code() string { return "KeyUnavailableException" } // Message returns the exception's message. -func (s KeyUnavailableException) Message() string { +func (s *KeyUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11976,30 +11976,30 @@ func (s KeyUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KeyUnavailableException) OrigErr() error { +func (s *KeyUnavailableException) OrigErr() error { return nil } -func (s KeyUnavailableException) Error() string { +func (s *KeyUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s KeyUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KeyUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KeyUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *KeyUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because a quota was exceeded. For more information, // see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html) // in the AWS Key Management Service Developer Guide. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12016,17 +12016,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12034,22 +12034,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAliasesInput struct { @@ -12740,8 +12740,8 @@ func (s *ListRetirableGrantsInput) SetRetiringPrincipal(v string) *ListRetirable // The request was rejected because the specified policy is not syntactically // or semantically correct. type MalformedPolicyDocumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12758,17 +12758,17 @@ func (s MalformedPolicyDocumentException) GoString() string { func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error { return &MalformedPolicyDocumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedPolicyDocumentException) Code() string { +func (s *MalformedPolicyDocumentException) Code() string { return "MalformedPolicyDocumentException" } // Message returns the exception's message. -func (s MalformedPolicyDocumentException) Message() string { +func (s *MalformedPolicyDocumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12776,29 +12776,29 @@ func (s MalformedPolicyDocumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedPolicyDocumentException) OrigErr() error { +func (s *MalformedPolicyDocumentException) OrigErr() error { return nil } -func (s MalformedPolicyDocumentException) Error() string { +func (s *MalformedPolicyDocumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedPolicyDocumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedPolicyDocumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedPolicyDocumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedPolicyDocumentException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because the specified entity or resource could not // be found. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12815,17 +12815,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12833,22 +12833,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type PutKeyPolicyInput struct { @@ -13760,8 +13760,8 @@ func (s *Tag) SetTagValue(v string) *Tag { // The request was rejected because one or more tags are not valid. type TagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13778,17 +13778,17 @@ func (s TagException) GoString() string { func newErrorTagException(v protocol.ResponseMetadata) error { return &TagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagException) Code() string { +func (s *TagException) Code() string { return "TagException" } // Message returns the exception's message. -func (s TagException) Message() string { +func (s *TagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13796,22 +13796,22 @@ func (s TagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagException) OrigErr() error { +func (s *TagException) OrigErr() error { return nil } -func (s TagException) Error() string { +func (s *TagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -13906,8 +13906,8 @@ func (s TagResourceOutput) GoString() string { // The request was rejected because a specified parameter is not supported or // a specified resource is not valid for this operation. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13924,17 +13924,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13942,22 +13942,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/lakeformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/lakeformation/api.go index 34a54bd9441..fe19b68cbf5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lakeformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lakeformation/api.go @@ -1333,8 +1333,8 @@ func (c *LakeFormation) UpdateResourceWithContext(ctx aws.Context, input *Update // A resource to be created or added already exists. type AlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -1352,17 +1352,17 @@ func (s AlreadyExistsException) GoString() string { func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { return &AlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlreadyExistsException) Code() string { +func (s *AlreadyExistsException) Code() string { return "AlreadyExistsException" } // Message returns the exception's message. -func (s AlreadyExistsException) Message() string { +func (s *AlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1370,22 +1370,22 @@ func (s AlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlreadyExistsException) OrigErr() error { +func (s *AlreadyExistsException) OrigErr() error { return nil } -func (s AlreadyExistsException) Error() string { +func (s *AlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } type BatchGrantPermissionsInput struct { @@ -1725,8 +1725,8 @@ func (s *ColumnWildcard) SetExcludedColumnNames(v []*string) *ColumnWildcard { // Two processes are trying to modify a resource simultaneously. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -1744,17 +1744,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1762,22 +1762,22 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } // The AWS Lake Formation principal. @@ -2098,8 +2098,8 @@ func (s *DescribeResourceOutput) SetResourceInfo(v *ResourceInfo) *DescribeResou // A specified entity does not exist type EntityNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -2117,17 +2117,17 @@ func (s EntityNotFoundException) GoString() string { func newErrorEntityNotFoundException(v protocol.ResponseMetadata) error { return &EntityNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityNotFoundException) Code() string { +func (s *EntityNotFoundException) Code() string { return "EntityNotFoundException" } // Message returns the exception's message. -func (s EntityNotFoundException) Message() string { +func (s *EntityNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2135,22 +2135,22 @@ func (s EntityNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityNotFoundException) OrigErr() error { +func (s *EntityNotFoundException) OrigErr() error { return nil } -func (s EntityNotFoundException) Error() string { +func (s *EntityNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an error. @@ -2528,8 +2528,8 @@ func (s GrantPermissionsOutput) GoString() string { // An internal service error occurred. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -2547,17 +2547,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2565,28 +2565,28 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } // The input provided was not valid. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -2604,17 +2604,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2622,22 +2622,22 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } type ListPermissionsInput struct { @@ -2866,8 +2866,8 @@ func (s *ListResourcesOutput) SetResourceInfoList(v []*ResourceInfo) *ListResour // The operation timed out. type OperationTimeoutException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A message describing the problem. Message_ *string `locationName:"Message" type:"string"` @@ -2885,17 +2885,17 @@ func (s OperationTimeoutException) GoString() string { func newErrorOperationTimeoutException(v protocol.ResponseMetadata) error { return &OperationTimeoutException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationTimeoutException) Code() string { +func (s *OperationTimeoutException) Code() string { return "OperationTimeoutException" } // Message returns the exception's message. -func (s OperationTimeoutException) Message() string { +func (s *OperationTimeoutException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2903,22 +2903,22 @@ func (s OperationTimeoutException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationTimeoutException) OrigErr() error { +func (s *OperationTimeoutException) OrigErr() error { return nil } -func (s OperationTimeoutException) Error() string { +func (s *OperationTimeoutException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationTimeoutException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationTimeoutException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationTimeoutException) RequestID() string { + return s.RespMetadata.RequestID } // Permissions granted to a principal. 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 13531de9260..e1495de85c5 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 @@ -173,10 +173,10 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // To grant permission to another account, specify the account ID as the Principal. // For AWS services, the principal is a domain-style identifier defined by the // service, like s3.amazonaws.com or sns.amazonaws.com. For AWS services, you -// can also specify the ARN or owning account of the associated resource as -// the SourceArn or SourceAccount. If you grant permission to a service principal -// without specifying the source, other accounts could potentially configure -// resources in their account to invoke your Lambda function. +// can also specify the ARN of the associated resource as the SourceArn. If +// you grant permission to a service principal without specifying the source, +// other accounts could potentially configure resources in their account to +// invoke your Lambda function. // // This action adds a statement to a resource-based permissions policy for the // function. For more information about function policies, see Lambda Function @@ -2374,7 +2374,8 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // client, SDK, firewall, proxy, or operating system to allow for long connections // with timeout or keep-alive settings. // -// This operation requires permission for the lambda:InvokeFunction action. +// This operation requires permission for the lambda:InvokeFunction (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html) +// action. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5545,11 +5546,9 @@ type AddPermissionInput struct { // read it. RevisionId *string `type:"string"` - // For AWS services, the ID of the account that owns the resource. Use this - // instead of SourceArn to grant permission to resources that are owned by another - // account (for example, all of an account's Amazon S3 buckets). Or use it together + // For Amazon S3, the ID of the account that owns the resource. Use this together // with SourceArn to ensure that the resource is owned by the specified account. - // For example, an Amazon S3 bucket could be deleted by its owner and recreated + // It is possible for an Amazon S3 bucket to be deleted by its owner and recreated // by another account. SourceAccount *string `type:"string"` @@ -5780,8 +5779,8 @@ func (s *AliasRoutingConfiguration) SetAdditionalVersionWeights(v map[string]*fl // You have exceeded your maximum total code size per account. Learn more (https://docs.aws.amazon.com/lambda/latest/dg/limits.html) type CodeStorageExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -5801,17 +5800,17 @@ func (s CodeStorageExceededException) GoString() string { func newErrorCodeStorageExceededException(v protocol.ResponseMetadata) error { return &CodeStorageExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CodeStorageExceededException) Code() string { +func (s *CodeStorageExceededException) Code() string { return "CodeStorageExceededException" } // Message returns the exception's message. -func (s CodeStorageExceededException) Message() string { +func (s *CodeStorageExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5819,22 +5818,22 @@ func (s CodeStorageExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CodeStorageExceededException) OrigErr() error { +func (s *CodeStorageExceededException) OrigErr() error { return nil } -func (s CodeStorageExceededException) Error() string { +func (s *CodeStorageExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s CodeStorageExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CodeStorageExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CodeStorageExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CodeStorageExceededException) RequestID() string { + return s.RespMetadata.RequestID } type CreateAliasInput struct { @@ -5993,8 +5992,8 @@ type CreateEventSourceMappingInput struct { // FunctionName is a required field FunctionName *string `min:"1" type:"string" required:"true"` - // The maximum amount of time to gather records before invoking the function, - // in seconds. + // (Streams) The maximum amount of time to gather records before invoking the + // function, in seconds. MaximumBatchingWindowInSeconds *int64 `type:"integer"` // (Streams) The maximum age of a record that Lambda sends to a function for @@ -6924,8 +6923,8 @@ func (s *DestinationConfig) SetOnSuccess(v *OnSuccess) *DestinationConfig { // Need additional permissions to configure VPC settings. type EC2AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -6944,17 +6943,17 @@ func (s EC2AccessDeniedException) GoString() string { func newErrorEC2AccessDeniedException(v protocol.ResponseMetadata) error { return &EC2AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EC2AccessDeniedException) Code() string { +func (s *EC2AccessDeniedException) Code() string { return "EC2AccessDeniedException" } // Message returns the exception's message. -func (s EC2AccessDeniedException) Message() string { +func (s *EC2AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6962,29 +6961,29 @@ func (s EC2AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EC2AccessDeniedException) OrigErr() error { +func (s *EC2AccessDeniedException) OrigErr() error { return nil } -func (s EC2AccessDeniedException) Error() string { +func (s *EC2AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s EC2AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EC2AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EC2AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *EC2AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Lambda was throttled by Amazon EC2 during Lambda function initialization // using the execution role provided for the Lambda function. type EC2ThrottledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -7003,17 +7002,17 @@ func (s EC2ThrottledException) GoString() string { func newErrorEC2ThrottledException(v protocol.ResponseMetadata) error { return &EC2ThrottledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EC2ThrottledException) Code() string { +func (s *EC2ThrottledException) Code() string { return "EC2ThrottledException" } // Message returns the exception's message. -func (s EC2ThrottledException) Message() string { +func (s *EC2ThrottledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7021,29 +7020,29 @@ func (s EC2ThrottledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EC2ThrottledException) OrigErr() error { +func (s *EC2ThrottledException) OrigErr() error { return nil } -func (s EC2ThrottledException) Error() string { +func (s *EC2ThrottledException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s EC2ThrottledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EC2ThrottledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EC2ThrottledException) RequestID() string { - return s.respMetadata.RequestID +func (s *EC2ThrottledException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Lambda received an unexpected EC2 client exception while setting up for // the Lambda function. type EC2UnexpectedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` EC2ErrorCode *string `type:"string"` @@ -7064,17 +7063,17 @@ func (s EC2UnexpectedException) GoString() string { func newErrorEC2UnexpectedException(v protocol.ResponseMetadata) error { return &EC2UnexpectedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EC2UnexpectedException) Code() string { +func (s *EC2UnexpectedException) Code() string { return "EC2UnexpectedException" } // Message returns the exception's message. -func (s EC2UnexpectedException) Message() string { +func (s *EC2UnexpectedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7082,30 +7081,30 @@ func (s EC2UnexpectedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EC2UnexpectedException) OrigErr() error { +func (s *EC2UnexpectedException) OrigErr() error { return nil } -func (s EC2UnexpectedException) Error() string { +func (s *EC2UnexpectedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s EC2UnexpectedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EC2UnexpectedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EC2UnexpectedException) RequestID() string { - return s.respMetadata.RequestID +func (s *EC2UnexpectedException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Lambda was not able to create an elastic network interface in the VPC, // specified as part of Lambda function configuration, because the limit for // network interfaces has been reached. type ENILimitReachedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -7124,17 +7123,17 @@ func (s ENILimitReachedException) GoString() string { func newErrorENILimitReachedException(v protocol.ResponseMetadata) error { return &ENILimitReachedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ENILimitReachedException) Code() string { +func (s *ENILimitReachedException) Code() string { return "ENILimitReachedException" } // Message returns the exception's message. -func (s ENILimitReachedException) Message() string { +func (s *ENILimitReachedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7142,22 +7141,22 @@ func (s ENILimitReachedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ENILimitReachedException) OrigErr() error { +func (s *ENILimitReachedException) OrigErr() error { return nil } -func (s ENILimitReachedException) Error() string { +func (s *ENILimitReachedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ENILimitReachedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ENILimitReachedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ENILimitReachedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ENILimitReachedException) RequestID() string { + return s.RespMetadata.RequestID } // A function's environment variable settings. @@ -7279,8 +7278,8 @@ type EventSourceMappingConfiguration struct { // The result of the last AWS Lambda invocation of your Lambda function. LastProcessingResult *string `type:"string"` - // The maximum amount of time to gather records before invoking the function, - // in seconds. + // (Streams) The maximum amount of time to gather records before invoking the + // function, in seconds. MaximumBatchingWindowInSeconds *int64 `type:"integer"` // (Streams) The maximum age of a record that Lambda sends to a function for @@ -7583,7 +7582,8 @@ type FunctionConfiguration struct { // you can't invoke or modify the function. StateReasonCode *string `type:"string" enum:"StateReasonCode"` - // The amount of time that Lambda allows a function to run before stopping it. + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. Timeout *int64 `min:"1" type:"integer"` // The function's AWS X-Ray tracing configuration. @@ -8973,8 +8973,8 @@ func (s *GetProvisionedConcurrencyConfigOutput) SetStatusReason(v string) *GetPr // One of the parameters in the request is invalid. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -8995,17 +8995,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9013,28 +9013,28 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // The request body could not be parsed as JSON. type InvalidRequestContentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -9055,17 +9055,17 @@ func (s InvalidRequestContentException) GoString() string { func newErrorInvalidRequestContentException(v protocol.ResponseMetadata) error { return &InvalidRequestContentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestContentException) Code() string { +func (s *InvalidRequestContentException) Code() string { return "InvalidRequestContentException" } // Message returns the exception's message. -func (s InvalidRequestContentException) Message() string { +func (s *InvalidRequestContentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9073,28 +9073,28 @@ func (s InvalidRequestContentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestContentException) OrigErr() error { +func (s *InvalidRequestContentException) OrigErr() error { return nil } -func (s InvalidRequestContentException) Error() string { +func (s *InvalidRequestContentException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestContentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestContentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestContentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestContentException) RequestID() string { + return s.RespMetadata.RequestID } // The runtime or runtime version specified is not supported. type InvalidRuntimeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9113,17 +9113,17 @@ func (s InvalidRuntimeException) GoString() string { func newErrorInvalidRuntimeException(v protocol.ResponseMetadata) error { return &InvalidRuntimeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRuntimeException) Code() string { +func (s *InvalidRuntimeException) Code() string { return "InvalidRuntimeException" } // Message returns the exception's message. -func (s InvalidRuntimeException) Message() string { +func (s *InvalidRuntimeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9131,29 +9131,29 @@ func (s InvalidRuntimeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRuntimeException) OrigErr() error { +func (s *InvalidRuntimeException) OrigErr() error { return nil } -func (s InvalidRuntimeException) Error() string { +func (s *InvalidRuntimeException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRuntimeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRuntimeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRuntimeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRuntimeException) RequestID() string { + return s.RespMetadata.RequestID } // The Security Group ID provided in the Lambda function VPC configuration is // invalid. type InvalidSecurityGroupIDException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9172,17 +9172,17 @@ func (s InvalidSecurityGroupIDException) GoString() string { func newErrorInvalidSecurityGroupIDException(v protocol.ResponseMetadata) error { return &InvalidSecurityGroupIDException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSecurityGroupIDException) Code() string { +func (s *InvalidSecurityGroupIDException) Code() string { return "InvalidSecurityGroupIDException" } // Message returns the exception's message. -func (s InvalidSecurityGroupIDException) Message() string { +func (s *InvalidSecurityGroupIDException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9190,28 +9190,28 @@ func (s InvalidSecurityGroupIDException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSecurityGroupIDException) OrigErr() error { +func (s *InvalidSecurityGroupIDException) OrigErr() error { return nil } -func (s InvalidSecurityGroupIDException) Error() string { +func (s *InvalidSecurityGroupIDException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSecurityGroupIDException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSecurityGroupIDException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSecurityGroupIDException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSecurityGroupIDException) RequestID() string { + return s.RespMetadata.RequestID } // The Subnet ID provided in the Lambda function VPC configuration is invalid. type InvalidSubnetIDException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9230,17 +9230,17 @@ func (s InvalidSubnetIDException) GoString() string { func newErrorInvalidSubnetIDException(v protocol.ResponseMetadata) error { return &InvalidSubnetIDException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSubnetIDException) Code() string { +func (s *InvalidSubnetIDException) Code() string { return "InvalidSubnetIDException" } // Message returns the exception's message. -func (s InvalidSubnetIDException) Message() string { +func (s *InvalidSubnetIDException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9248,28 +9248,28 @@ func (s InvalidSubnetIDException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSubnetIDException) OrigErr() error { +func (s *InvalidSubnetIDException) OrigErr() error { return nil } -func (s InvalidSubnetIDException) Error() string { +func (s *InvalidSubnetIDException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSubnetIDException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSubnetIDException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSubnetIDException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSubnetIDException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Lambda could not unzip the deployment package. type InvalidZipFileException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9288,17 +9288,17 @@ func (s InvalidZipFileException) GoString() string { func newErrorInvalidZipFileException(v protocol.ResponseMetadata) error { return &InvalidZipFileException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidZipFileException) Code() string { +func (s *InvalidZipFileException) Code() string { return "InvalidZipFileException" } // Message returns the exception's message. -func (s InvalidZipFileException) Message() string { +func (s *InvalidZipFileException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9306,22 +9306,22 @@ func (s InvalidZipFileException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidZipFileException) OrigErr() error { +func (s *InvalidZipFileException) OrigErr() error { return nil } -func (s InvalidZipFileException) Error() string { +func (s *InvalidZipFileException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidZipFileException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidZipFileException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidZipFileException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidZipFileException) RequestID() string { + return s.RespMetadata.RequestID } // Deprecated: InvokeAsyncInput has been deprecated @@ -9598,8 +9598,8 @@ func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { // Lambda was unable to decrypt the environment variables because KMS access // was denied. Check the Lambda function's KMS permissions. type KMSAccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9618,17 +9618,17 @@ func (s KMSAccessDeniedException) GoString() string { func newErrorKMSAccessDeniedException(v protocol.ResponseMetadata) error { return &KMSAccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSAccessDeniedException) Code() string { +func (s *KMSAccessDeniedException) Code() string { return "KMSAccessDeniedException" } // Message returns the exception's message. -func (s KMSAccessDeniedException) Message() string { +func (s *KMSAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9636,29 +9636,29 @@ func (s KMSAccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSAccessDeniedException) OrigErr() error { +func (s *KMSAccessDeniedException) OrigErr() error { return nil } -func (s KMSAccessDeniedException) Error() string { +func (s *KMSAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSAccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSAccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSAccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSAccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Lambda was unable to decrypt the environment variables because the KMS key // used is disabled. Check the Lambda function's KMS key settings. type KMSDisabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9677,17 +9677,17 @@ func (s KMSDisabledException) GoString() string { func newErrorKMSDisabledException(v protocol.ResponseMetadata) error { return &KMSDisabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSDisabledException) Code() string { +func (s *KMSDisabledException) Code() string { return "KMSDisabledException" } // Message returns the exception's message. -func (s KMSDisabledException) Message() string { +func (s *KMSDisabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9695,29 +9695,29 @@ func (s KMSDisabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSDisabledException) OrigErr() error { +func (s *KMSDisabledException) OrigErr() error { return nil } -func (s KMSDisabledException) Error() string { +func (s *KMSDisabledException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSDisabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSDisabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSDisabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSDisabledException) RequestID() string { + return s.RespMetadata.RequestID } // Lambda was unable to decrypt the environment variables because the KMS key // used is in an invalid state for Decrypt. Check the function's KMS key settings. type KMSInvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9736,17 +9736,17 @@ func (s KMSInvalidStateException) GoString() string { func newErrorKMSInvalidStateException(v protocol.ResponseMetadata) error { return &KMSInvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSInvalidStateException) Code() string { +func (s *KMSInvalidStateException) Code() string { return "KMSInvalidStateException" } // Message returns the exception's message. -func (s KMSInvalidStateException) Message() string { +func (s *KMSInvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9754,29 +9754,29 @@ func (s KMSInvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSInvalidStateException) OrigErr() error { +func (s *KMSInvalidStateException) OrigErr() error { return nil } -func (s KMSInvalidStateException) Error() string { +func (s *KMSInvalidStateException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSInvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSInvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSInvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSInvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // Lambda was unable to decrypt the environment variables because the KMS key // was not found. Check the function's KMS key settings. type KMSNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -9795,17 +9795,17 @@ func (s KMSNotFoundException) GoString() string { func newErrorKMSNotFoundException(v protocol.ResponseMetadata) error { return &KMSNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s KMSNotFoundException) Code() string { +func (s *KMSNotFoundException) Code() string { return "KMSNotFoundException" } // Message returns the exception's message. -func (s KMSNotFoundException) Message() string { +func (s *KMSNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9813,22 +9813,22 @@ func (s KMSNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s KMSNotFoundException) OrigErr() error { +func (s *KMSNotFoundException) OrigErr() error { return nil } -func (s KMSNotFoundException) Error() string { +func (s *KMSNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s KMSNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *KMSNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s KMSNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *KMSNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An AWS Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). @@ -11048,8 +11048,8 @@ func (s *OnSuccess) SetDestination(v string) *OnSuccess { // The permissions policy for the resource is too large. Learn more (https://docs.aws.amazon.com/lambda/latest/dg/limits.html) type PolicyLengthExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -11068,17 +11068,17 @@ func (s PolicyLengthExceededException) GoString() string { func newErrorPolicyLengthExceededException(v protocol.ResponseMetadata) error { return &PolicyLengthExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyLengthExceededException) Code() string { +func (s *PolicyLengthExceededException) Code() string { return "PolicyLengthExceededException" } // Message returns the exception's message. -func (s PolicyLengthExceededException) Message() string { +func (s *PolicyLengthExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11086,30 +11086,30 @@ func (s PolicyLengthExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyLengthExceededException) OrigErr() error { +func (s *PolicyLengthExceededException) OrigErr() error { return nil } -func (s PolicyLengthExceededException) Error() string { +func (s *PolicyLengthExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyLengthExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyLengthExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyLengthExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyLengthExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The RevisionId provided does not match the latest RevisionId for the Lambda // function or alias. Call the GetFunction or the GetAlias API to retrieve the // latest RevisionId for your resource. type PreconditionFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -11130,17 +11130,17 @@ func (s PreconditionFailedException) GoString() string { func newErrorPreconditionFailedException(v protocol.ResponseMetadata) error { return &PreconditionFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PreconditionFailedException) Code() string { +func (s *PreconditionFailedException) Code() string { return "PreconditionFailedException" } // Message returns the exception's message. -func (s PreconditionFailedException) Message() string { +func (s *PreconditionFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11148,22 +11148,22 @@ func (s PreconditionFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PreconditionFailedException) OrigErr() error { +func (s *PreconditionFailedException) OrigErr() error { return nil } -func (s PreconditionFailedException) Error() string { +func (s *PreconditionFailedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s PreconditionFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PreconditionFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PreconditionFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PreconditionFailedException) RequestID() string { + return s.RespMetadata.RequestID } // Details about the provisioned concurrency configuration for a function alias @@ -11249,8 +11249,8 @@ func (s *ProvisionedConcurrencyConfigListItem) SetStatusReason(v string) *Provis // The specified configuration does not exist. type ProvisionedConcurrencyConfigNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -11269,17 +11269,17 @@ func (s ProvisionedConcurrencyConfigNotFoundException) GoString() string { func newErrorProvisionedConcurrencyConfigNotFoundException(v protocol.ResponseMetadata) error { return &ProvisionedConcurrencyConfigNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ProvisionedConcurrencyConfigNotFoundException) Code() string { +func (s *ProvisionedConcurrencyConfigNotFoundException) Code() string { return "ProvisionedConcurrencyConfigNotFoundException" } // Message returns the exception's message. -func (s ProvisionedConcurrencyConfigNotFoundException) Message() string { +func (s *ProvisionedConcurrencyConfigNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11287,22 +11287,22 @@ func (s ProvisionedConcurrencyConfigNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ProvisionedConcurrencyConfigNotFoundException) OrigErr() error { +func (s *ProvisionedConcurrencyConfigNotFoundException) OrigErr() error { return nil } -func (s ProvisionedConcurrencyConfigNotFoundException) Error() string { +func (s *ProvisionedConcurrencyConfigNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ProvisionedConcurrencyConfigNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ProvisionedConcurrencyConfigNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ProvisionedConcurrencyConfigNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ProvisionedConcurrencyConfigNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type PublishLayerVersionInput struct { @@ -12199,8 +12199,8 @@ func (s RemovePermissionOutput) GoString() string { // The request payload exceeded the Invoke request body JSON input limit. For // more information, see Limits (https://docs.aws.amazon.com/lambda/latest/dg/limits.html). type RequestTooLargeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -12219,17 +12219,17 @@ func (s RequestTooLargeException) GoString() string { func newErrorRequestTooLargeException(v protocol.ResponseMetadata) error { return &RequestTooLargeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestTooLargeException) Code() string { +func (s *RequestTooLargeException) Code() string { return "RequestTooLargeException" } // Message returns the exception's message. -func (s RequestTooLargeException) Message() string { +func (s *RequestTooLargeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12237,28 +12237,28 @@ func (s RequestTooLargeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestTooLargeException) OrigErr() error { +func (s *RequestTooLargeException) OrigErr() error { return nil } -func (s RequestTooLargeException) Error() string { +func (s *RequestTooLargeException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestTooLargeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestTooLargeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestTooLargeException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestTooLargeException) RequestID() string { + return s.RespMetadata.RequestID } // The resource already exists, or another operation is in progress. type ResourceConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -12279,17 +12279,17 @@ func (s ResourceConflictException) GoString() string { func newErrorResourceConflictException(v protocol.ResponseMetadata) error { return &ResourceConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceConflictException) Code() string { +func (s *ResourceConflictException) Code() string { return "ResourceConflictException" } // Message returns the exception's message. -func (s ResourceConflictException) Message() string { +func (s *ResourceConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12297,30 +12297,30 @@ func (s ResourceConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceConflictException) OrigErr() error { +func (s *ResourceConflictException) OrigErr() error { return nil } -func (s ResourceConflictException) Error() string { +func (s *ResourceConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceConflictException) RequestID() string { + return s.RespMetadata.RequestID } // The operation conflicts with the resource's availability. For example, you // attempted to update an EventSource Mapping in CREATING, or tried to delete // a EventSource mapping currently in the UPDATING state. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -12339,17 +12339,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12357,28 +12357,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The resource specified in the request does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -12397,17 +12397,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12415,29 +12415,29 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The function is inactive and its VPC connection is no longer available. Wait // for the VPC connection to reestablish and try again. type ResourceNotReadyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -12458,17 +12458,17 @@ func (s ResourceNotReadyException) GoString() string { func newErrorResourceNotReadyException(v protocol.ResponseMetadata) error { return &ResourceNotReadyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotReadyException) Code() string { +func (s *ResourceNotReadyException) Code() string { return "ResourceNotReadyException" } // Message returns the exception's message. -func (s ResourceNotReadyException) Message() string { +func (s *ResourceNotReadyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12476,28 +12476,28 @@ func (s ResourceNotReadyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotReadyException) OrigErr() error { +func (s *ResourceNotReadyException) OrigErr() error { return nil } -func (s ResourceNotReadyException) Error() string { +func (s *ResourceNotReadyException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotReadyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotReadyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotReadyException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotReadyException) RequestID() string { + return s.RespMetadata.RequestID } // The AWS Lambda service encountered an internal error. type ServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -12516,17 +12516,17 @@ func (s ServiceException) GoString() string { func newErrorServiceException(v protocol.ResponseMetadata) error { return &ServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceException) Code() string { +func (s *ServiceException) Code() string { return "ServiceException" } // Message returns the exception's message. -func (s ServiceException) Message() string { +func (s *ServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12534,29 +12534,29 @@ func (s ServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceException) OrigErr() error { +func (s *ServiceException) OrigErr() error { return nil } -func (s ServiceException) Error() string { +func (s *ServiceException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Lambda was not able to set up VPC access for the Lambda function because // one or more configured subnets has no available IP addresses. type SubnetIPAddressLimitReachedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -12575,17 +12575,17 @@ func (s SubnetIPAddressLimitReachedException) GoString() string { func newErrorSubnetIPAddressLimitReachedException(v protocol.ResponseMetadata) error { return &SubnetIPAddressLimitReachedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubnetIPAddressLimitReachedException) Code() string { +func (s *SubnetIPAddressLimitReachedException) Code() string { return "SubnetIPAddressLimitReachedException" } // Message returns the exception's message. -func (s SubnetIPAddressLimitReachedException) Message() string { +func (s *SubnetIPAddressLimitReachedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12593,22 +12593,22 @@ func (s SubnetIPAddressLimitReachedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubnetIPAddressLimitReachedException) OrigErr() error { +func (s *SubnetIPAddressLimitReachedException) OrigErr() error { return nil } -func (s SubnetIPAddressLimitReachedException) Error() string { +func (s *SubnetIPAddressLimitReachedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s SubnetIPAddressLimitReachedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubnetIPAddressLimitReachedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubnetIPAddressLimitReachedException) RequestID() string { - return s.respMetadata.RequestID +func (s *SubnetIPAddressLimitReachedException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -12682,8 +12682,8 @@ func (s TagResourceOutput) GoString() string { // The request throughput limit was exceeded. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -12707,17 +12707,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12725,22 +12725,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // The function's AWS X-Ray tracing configuration. To sample and record incoming @@ -12794,8 +12794,8 @@ func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse { // The content type of the Invoke request body is not JSON. type UnsupportedMediaTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -12814,17 +12814,17 @@ func (s UnsupportedMediaTypeException) GoString() string { func newErrorUnsupportedMediaTypeException(v protocol.ResponseMetadata) error { return &UnsupportedMediaTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedMediaTypeException) Code() string { +func (s *UnsupportedMediaTypeException) Code() string { return "UnsupportedMediaTypeException" } // Message returns the exception's message. -func (s UnsupportedMediaTypeException) Message() string { +func (s *UnsupportedMediaTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12832,22 +12832,22 @@ func (s UnsupportedMediaTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedMediaTypeException) OrigErr() error { +func (s *UnsupportedMediaTypeException) OrigErr() error { return nil } -func (s UnsupportedMediaTypeException) Error() string { +func (s *UnsupportedMediaTypeException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedMediaTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedMediaTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedMediaTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedMediaTypeException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -13068,8 +13068,8 @@ type UpdateEventSourceMappingInput struct { // function name, it's limited to 64 characters in length. FunctionName *string `min:"1" type:"string"` - // The maximum amount of time to gather records before invoking the function, - // in seconds. + // (Streams) The maximum amount of time to gather records before invoking the + // function, in seconds. MaximumBatchingWindowInSeconds *int64 `type:"integer"` // (Streams) The maximum age of a record that Lambda sends to a function for @@ -13888,6 +13888,9 @@ const ( // RuntimeDotnetcore21 is a Runtime enum value RuntimeDotnetcore21 = "dotnetcore2.1" + // RuntimeDotnetcore31 is a Runtime enum value + RuntimeDotnetcore31 = "dotnetcore3.1" + // RuntimeNodejs43Edge is a Runtime enum value RuntimeNodejs43Edge = "nodejs4.3-edge" 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 091401bbee8..5f334ee6141 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 @@ -3726,6 +3726,97 @@ func (c *LexModelBuildingService) GetUtterancesViewWithContext(ctx aws.Context, return out, req.Send() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the 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/lex-models-2017-04-19/ListTagsForResource +func (c *LexModelBuildingService) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon Lex Model Building Service. +// +// Gets a list of tags associated with the specified resource. Only bots, bot +// aliases, and bot channels can have tags associated with 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 Amazon Lex Model Building Service's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * BadRequestException +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * InternalFailureException +// An internal Amazon Lex error occurred. Try your request again. +// +// * LimitExceededException +// The request exceeded a limit. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/ListTagsForResource +func (c *LexModelBuildingService) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LexModelBuildingService) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutBot = "PutBot" // PutBotRequest generates a "aws/request.Request" representing the @@ -4262,11 +4353,200 @@ func (c *LexModelBuildingService) StartImportWithContext(ctx aws.Context, input 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 +// successfully. +// +// Use "Send" method on the 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/lex-models-2017-04-19/TagResource +func (c *LexModelBuildingService) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon Lex Model Building Service. +// +// Adds the specified tags to the specified resource. If a tag key already exists, +// the existing value is replaced with the new 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 Amazon Lex Model Building Service's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * BadRequestException +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ConflictException +// There was a conflict processing the request. Try your request again. +// +// * InternalFailureException +// An internal Amazon Lex error occurred. Try your request again. +// +// * LimitExceededException +// The request exceeded a limit. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/TagResource +func (c *LexModelBuildingService) 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 *LexModelBuildingService) 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 +// successfully. +// +// Use "Send" method on the 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/lex-models-2017-04-19/UntagResource +func (c *LexModelBuildingService) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon Lex Model Building Service. +// +// Removes tags from a bot, bot alias or bot channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lex Model Building Service's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource specified in the request was not found. Check the resource and +// try again. +// +// * BadRequestException +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and try again. +// +// * ConflictException +// There was a conflict processing the request. Try your request again. +// +// * InternalFailureException +// An internal Amazon Lex error occurred. Try your request again. +// +// * LimitExceededException +// The request exceeded a limit. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/UntagResource +func (c *LexModelBuildingService) 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 *LexModelBuildingService) 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() +} + // The request is not well formed. For example, a value is invalid or a required // field is missing. Check the field values, and try again. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4283,17 +4563,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4301,22 +4581,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Provides information about a bot alias. @@ -4745,8 +5025,8 @@ func (s *CodeHook) SetUri(v string) *CodeHook { // There was a conflict processing the request. Try your request again. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4763,17 +5043,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4781,22 +5061,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Provides the settings needed for conversation logs. @@ -8962,8 +9242,8 @@ func (s *IntentMetadata) SetVersion(v string) *IntentMetadata { // An internal Amazon Lex error occurred. Try your request again. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8980,17 +9260,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8998,28 +9278,28 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The request exceeded a limit. Try your request again. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -9038,17 +9318,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9056,22 +9336,86 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource to get a list of tags for. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The tags associated with a resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s } // Settings used to configure delivery mode and destination for conversation @@ -9299,8 +9643,8 @@ func (s *Message) SetGroupNumber(v int64) *Message { // The resource specified in the request was not found. Check the resource and // try again. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9317,17 +9661,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9335,29 +9679,29 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The checksum of the resource that you are trying to change does not match // the checksum in the request. Check the resource's checksum and try again. type PreconditionFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9374,17 +9718,17 @@ func (s PreconditionFailedException) GoString() string { func newErrorPreconditionFailedException(v protocol.ResponseMetadata) error { return &PreconditionFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PreconditionFailedException) Code() string { +func (s *PreconditionFailedException) Code() string { return "PreconditionFailedException" } // Message returns the exception's message. -func (s PreconditionFailedException) Message() string { +func (s *PreconditionFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9392,22 +9736,22 @@ func (s PreconditionFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PreconditionFailedException) OrigErr() error { +func (s *PreconditionFailedException) OrigErr() error { return nil } -func (s PreconditionFailedException) Error() string { +func (s *PreconditionFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PreconditionFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PreconditionFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PreconditionFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PreconditionFailedException) RequestID() string { + return s.RespMetadata.RequestID } // Obtains information from the user. To define a prompt, provide one or more @@ -9532,6 +9876,11 @@ type PutBotAliasInput struct { // // Name is a required field Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // A list of tags to add to the bot alias. You can only add tags when you create + // an alias, you can't use the PutBotAlias operation to update the tags on a + // bot alias. To update tags, use the TagResource operation. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -9570,6 +9919,16 @@ func (s *PutBotAliasInput) Validate() error { invalidParams.AddNested("ConversationLogs", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9613,6 +9972,12 @@ func (s *PutBotAliasInput) SetName(v string) *PutBotAliasInput { return s } +// SetTags sets the Tags field's value. +func (s *PutBotAliasInput) SetTags(v []*Tag) *PutBotAliasInput { + s.Tags = v + return s +} + type PutBotAliasOutput struct { _ struct{} `type:"structure"` @@ -9641,6 +10006,9 @@ type PutBotAliasOutput struct { // The name of the alias. Name *string `locationName:"name" min:"1" type:"string"` + + // A list of tags associated with a bot. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -9701,6 +10069,12 @@ func (s *PutBotAliasOutput) SetName(v string) *PutBotAliasOutput { return s } +// SetTags sets the Tags field's value. +func (s *PutBotAliasOutput) SetTags(v []*Tag) *PutBotAliasOutput { + s.Tags = v + return s +} + type PutBotInput struct { _ struct{} `type:"structure"` @@ -9850,6 +10224,11 @@ type PutBotInput struct { // If you don't specify this value, the default value is BUILD. ProcessBehavior *string `locationName:"processBehavior" type:"string" enum:"ProcessBehavior"` + // A list of tags to add to the bot. You can only add tags when you create a + // bot, you can't use the PutBot operation to update the tags on a bot. To update + // tags, use the TagResource operation. + Tags []*Tag `locationName:"tags" type:"list"` + // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions // with the user. The locale configured for the voice must match the locale // of the bot. For more information, see Voices in Amazon Polly (https://docs.aws.amazon.com/polly/latest/dg/voicelist.html) @@ -9905,6 +10284,16 @@ func (s *PutBotInput) Validate() error { } } } + 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 @@ -9984,6 +10373,12 @@ func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput { return s } +// SetTags sets the Tags field's value. +func (s *PutBotInput) SetTags(v []*Tag) *PutBotInput { + s.Tags = v + return s +} + // SetVoiceId sets the VoiceId field's value. func (s *PutBotInput) SetVoiceId(v string) *PutBotInput { s.VoiceId = &v @@ -10082,6 +10477,9 @@ type PutBotOutput struct { // When the bot is in the READY state you can test and publish the bot. Status *string `locationName:"status" type:"string" enum:"Status"` + // A list of tags associated with the bot. + Tags []*Tag `locationName:"tags" type:"list"` + // The version of the bot. For a new bot, the version is always $LATEST. Version *string `locationName:"version" min:"1" type:"string"` @@ -10190,6 +10588,12 @@ func (s *PutBotOutput) SetStatus(v string) *PutBotOutput { return s } +// SetTags sets the Tags field's value. +func (s *PutBotOutput) SetTags(v []*Tag) *PutBotOutput { + s.Tags = v + return s +} + // SetVersion sets the Version field's value. func (s *PutBotOutput) SetVersion(v string) *PutBotOutput { s.Version = &v @@ -10938,8 +11342,8 @@ func (s *PutSlotTypeOutput) SetVersion(v string) *PutSlotTypeOutput { // // "name": string, "version": string } } type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Describes the resource that refers to the resource that you are attempting // to delete. This object is returned as part of the ResourceInUseException @@ -10963,17 +11367,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10981,22 +11385,22 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the resource that refers to the resource that you are attempting @@ -11387,6 +11791,10 @@ type StartImportInput struct { // // ResourceType is a required field ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` + + // A list of tags to add to the imported bot. You can only add tags when you + // import a bot, you can't add tags to an intent or slot type. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -11411,6 +11819,16 @@ func (s *StartImportInput) Validate() error { if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } + 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 @@ -11436,6 +11854,12 @@ func (s *StartImportInput) SetResourceType(v string) *StartImportInput { return s } +// SetTags sets the Tags field's value. +func (s *StartImportInput) SetTags(v []*Tag) *StartImportInput { + s.Tags = v + return s +} + type StartImportOutput struct { _ struct{} `type:"structure"` @@ -11457,6 +11881,9 @@ type StartImportOutput struct { // The type of resource to import. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // A list of tags added to the imported bot. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -11505,6 +11932,12 @@ func (s *StartImportOutput) SetResourceType(v string) *StartImportOutput { return s } +// SetTags sets the Tags field's value. +func (s *StartImportOutput) SetTags(v []*Tag) *StartImportOutput { + s.Tags = v + return s +} + // A collection of messages that convey information to the user. At runtime, // Amazon Lex selects the message to convey. type Statement struct { @@ -11573,6 +12006,215 @@ func (s *Statement) SetResponseCard(v string) *Statement { return s } +// A list of key/value pairs that identify a bot, bot alias, or bot channel. +// Tag keys and values can consist of Unicode letters, digits, white space, +// and any of the following symbols: _ . : / = + - @. +type Tag struct { + _ struct{} `type:"structure"` + + // The key for the tag. Keys are not case-sensitive and must be unique. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // The value associated with a key. The value may be an empty string but it + // can't be null. + // + // Value is a required field + Value *string `locationName:"value" 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 Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // A list of tag keys to add to the resource. If a tag key already exists, the + // existing value is replaced with the new value. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 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 +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &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 Amazon Resource Name (ARN) of the resource to remove the tags from. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // A list of tag keys to remove from the resource. If a tag key does not exist + // on the resource, it is ignored. + // + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &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() +} + // Provides information about a single utterance that was made to your bot. type UtteranceData struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go index 6fab0ad67e7..1207a082be2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go @@ -1545,8 +1545,8 @@ func (c *LicenseManager) UpdateServiceSettingsWithContext(ctx aws.Context, input // Access to resource denied. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1563,17 +1563,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1581,29 +1581,29 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The AWS user account does not have permission to perform the action. Check // the IAM policy associated with this account. type AuthorizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1620,17 +1620,17 @@ func (s AuthorizationException) GoString() string { func newErrorAuthorizationException(v protocol.ResponseMetadata) error { return &AuthorizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AuthorizationException) Code() string { +func (s *AuthorizationException) Code() string { return "AuthorizationException" } // Message returns the exception's message. -func (s AuthorizationException) Message() string { +func (s *AuthorizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1638,22 +1638,22 @@ func (s AuthorizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AuthorizationException) OrigErr() error { +func (s *AuthorizationException) OrigErr() error { return nil } -func (s AuthorizationException) Error() string { +func (s *AuthorizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AuthorizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AuthorizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AuthorizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *AuthorizationException) RequestID() string { + return s.RespMetadata.RequestID } // Describes automated discovery. @@ -1918,8 +1918,8 @@ func (s DeleteLicenseConfigurationOutput) GoString() string { // A dependency required to run the API is missing. type FailedDependencyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1936,17 +1936,17 @@ func (s FailedDependencyException) GoString() string { func newErrorFailedDependencyException(v protocol.ResponseMetadata) error { return &FailedDependencyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FailedDependencyException) Code() string { +func (s *FailedDependencyException) Code() string { return "FailedDependencyException" } // Message returns the exception's message. -func (s FailedDependencyException) Message() string { +func (s *FailedDependencyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1954,22 +1954,22 @@ func (s FailedDependencyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FailedDependencyException) OrigErr() error { +func (s *FailedDependencyException) OrigErr() error { return nil } -func (s FailedDependencyException) Error() string { +func (s *FailedDependencyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FailedDependencyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FailedDependencyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FailedDependencyException) RequestID() string { - return s.respMetadata.RequestID +func (s *FailedDependencyException) RequestID() string { + return s.RespMetadata.RequestID } // A filter name and value pair that is used to return more specific results @@ -2009,8 +2009,8 @@ func (s *Filter) SetValues(v []*string) *Filter { // The request uses too many filters or too many filter values. type FilterLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2027,17 +2027,17 @@ func (s FilterLimitExceededException) GoString() string { func newErrorFilterLimitExceededException(v protocol.ResponseMetadata) error { return &FilterLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FilterLimitExceededException) Code() string { +func (s *FilterLimitExceededException) Code() string { return "FilterLimitExceededException" } // Message returns the exception's message. -func (s FilterLimitExceededException) Message() string { +func (s *FilterLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2045,22 +2045,22 @@ func (s FilterLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FilterLimitExceededException) OrigErr() error { +func (s *FilterLimitExceededException) OrigErr() error { return nil } -func (s FilterLimitExceededException) Error() string { +func (s *FilterLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FilterLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FilterLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FilterLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *FilterLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type GetLicenseConfigurationInput struct { @@ -2337,8 +2337,8 @@ func (s *GetServiceSettingsOutput) SetSnsTopicArn(v string) *GetServiceSettingsO // One or more parameter values are not valid. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2355,17 +2355,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2373,22 +2373,22 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // License Manager cannot allocate a license to a resource because of its state. @@ -2396,8 +2396,8 @@ func (s InvalidParameterValueException) RequestID() string { // For example, you cannot allocate a license to an instance in the process // of shutting down. type InvalidResourceStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2414,17 +2414,17 @@ func (s InvalidResourceStateException) GoString() string { func newErrorInvalidResourceStateException(v protocol.ResponseMetadata) error { return &InvalidResourceStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceStateException) Code() string { +func (s *InvalidResourceStateException) Code() string { return "InvalidResourceStateException" } // Message returns the exception's message. -func (s InvalidResourceStateException) Message() string { +func (s *InvalidResourceStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2432,22 +2432,22 @@ func (s InvalidResourceStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceStateException) OrigErr() error { +func (s *InvalidResourceStateException) OrigErr() error { return nil } -func (s InvalidResourceStateException) Error() string { +func (s *InvalidResourceStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceStateException) RequestID() string { + return s.RespMetadata.RequestID } // An inventory filter. @@ -2915,8 +2915,8 @@ func (s *LicenseSpecification) SetLicenseConfigurationArn(v string) *LicenseSpec // You do not have enough licenses available to support a new resource launch. type LicenseUsageException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2933,17 +2933,17 @@ func (s LicenseUsageException) GoString() string { func newErrorLicenseUsageException(v protocol.ResponseMetadata) error { return &LicenseUsageException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LicenseUsageException) Code() string { +func (s *LicenseUsageException) Code() string { return "LicenseUsageException" } // Message returns the exception's message. -func (s LicenseUsageException) Message() string { +func (s *LicenseUsageException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2951,22 +2951,22 @@ func (s LicenseUsageException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LicenseUsageException) OrigErr() error { +func (s *LicenseUsageException) OrigErr() error { return nil } -func (s LicenseUsageException) Error() string { +func (s *LicenseUsageException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LicenseUsageException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LicenseUsageException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LicenseUsageException) RequestID() string { - return s.respMetadata.RequestID +func (s *LicenseUsageException) RequestID() string { + return s.RespMetadata.RequestID } type ListAssociationsForLicenseConfigurationInput struct { @@ -3858,8 +3858,8 @@ func (s *ProductInformationFilter) SetProductInformationFilterValue(v []*string) // Too many requests have been submitted. Try again after a brief wait. type RateLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3876,17 +3876,17 @@ func (s RateLimitExceededException) GoString() string { func newErrorRateLimitExceededException(v protocol.ResponseMetadata) error { return &RateLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RateLimitExceededException) Code() string { +func (s *RateLimitExceededException) Code() string { return "RateLimitExceededException" } // Message returns the exception's message. -func (s RateLimitExceededException) Message() string { +func (s *RateLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3894,22 +3894,22 @@ func (s RateLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RateLimitExceededException) OrigErr() error { +func (s *RateLimitExceededException) OrigErr() error { return nil } -func (s RateLimitExceededException) Error() string { +func (s *RateLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RateLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RateLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RateLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *RateLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Details about a resource. @@ -3983,8 +3983,8 @@ func (s *ResourceInventory) SetResourceType(v string) *ResourceInventory { // Your resource limits have been exceeded. type ResourceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4001,17 +4001,17 @@ func (s ResourceLimitExceededException) GoString() string { func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceededException) Code() string { +func (s *ResourceLimitExceededException) Code() string { return "ResourceLimitExceededException" } // Message returns the exception's message. -func (s ResourceLimitExceededException) Message() string { +func (s *ResourceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4019,28 +4019,28 @@ func (s ResourceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceededException) OrigErr() error { +func (s *ResourceLimitExceededException) OrigErr() error { return nil } -func (s ResourceLimitExceededException) Error() string { +func (s *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The server experienced an internal error. Try again. type ServerInternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4057,17 +4057,17 @@ func (s ServerInternalException) GoString() string { func newErrorServerInternalException(v protocol.ResponseMetadata) error { return &ServerInternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerInternalException) Code() string { +func (s *ServerInternalException) Code() string { return "ServerInternalException" } // Message returns the exception's message. -func (s ServerInternalException) Message() string { +func (s *ServerInternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4075,22 +4075,22 @@ func (s ServerInternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerInternalException) OrigErr() error { +func (s *ServerInternalException) OrigErr() error { return nil } -func (s ServerInternalException) Error() string { +func (s *ServerInternalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerInternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerInternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerInternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerInternalException) RequestID() string { + return s.RespMetadata.RequestID } // Details about a tag for a license configuration. 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 6d61ff5085d..320025d3071 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 @@ -599,11 +599,11 @@ func (c *Lightsail) CloseInstancePublicPortsRequest(input *CloseInstancePublicPo // CloseInstancePublicPorts API operation for Amazon Lightsail. // -// Closes the public ports on a specific Amazon Lightsail instance. +// Closes ports for a specific Amazon Lightsail instance. // -// The close instance public ports operation supports tag-based access control -// via resource tags applied to the resource identified by instance name. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// The CloseInstancePublicPorts action supports tag-based access control via +// resource tags applied to the resource identified by instanceName. For more +// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-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 @@ -6762,7 +6762,9 @@ func (c *Lightsail) GetInstancePortStatesRequest(input *GetInstancePortStatesInp // GetInstancePortStates API operation for Amazon Lightsail. // -// Returns the port states for a specific virtual private server, or instance. +// Returns the firewall port states for a specific Amazon Lightsail instance, +// the IP addresses allowed to connect to the instance through the ports, and +// the protocol. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -10020,11 +10022,12 @@ func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPort // OpenInstancePublicPorts API operation for Amazon Lightsail. // -// Adds public ports to an Amazon Lightsail instance. +// Opens ports for a specific Amazon Lightsail instance, and specifies the IP +// addresses allowed to connect to the instance through the ports, and the protocol. // -// The open instance public ports operation supports tag-based access control -// via resource tags applied to the resource identified by instance name. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// The OpenInstancePublicPorts action supports tag-based access control via +// resource tags applied to the resource identified by instanceName. For more +// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-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 @@ -10345,12 +10348,16 @@ func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsI // PutInstancePublicPorts API operation for Amazon Lightsail. // -// Sets the specified open ports for an Amazon Lightsail instance, and closes -// all ports for every protocol not included in the current request. +// Opens ports for a specific Amazon Lightsail instance, and specifies the IP +// addresses allowed to connect to the instance through the ports, and the protocol. +// This action also closes all currently open ports that are not included in +// the request. Include all of the ports and the protocols you want to open +// in your PutInstancePublicPortsrequest. Or use the OpenInstancePublicPorts +// action to open ports without closing currently open ports. // -// The put instance public ports operation supports tag-based access control -// via resource tags applied to the resource identified by instance name. For -// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// The PutInstancePublicPorts action supports tag-based access control via resource +// tags applied to the resource identified by instanceName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-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 @@ -10774,8 +10781,8 @@ func (c *Lightsail) SendContactMethodVerificationRequest(input *SendContactMetho // SendContactMethodVerification API operation for Amazon Lightsail. // -// Sends a verification request to an email contact method to ensure it’s -// owned by the requester. SMS contact methods don’t need to be verified. +// Sends a verification request to an email contact method to ensure it's owned +// by the requester. SMS contact methods don't need to be verified. // // A contact method is used to send you notifications about your Amazon Lightsail // resources. You can add one email address and one mobile phone number contact @@ -12166,8 +12173,8 @@ func (c *Lightsail) UpdateRelationalDatabaseParametersWithContext(ctx aws.Contex // Lightsail throws this exception when the user cannot be authenticated or // uses invalid credentials to access a resource. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -12190,17 +12197,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12208,29 +12215,29 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Lightsail throws this exception when an account is still in the setup in // progress state. type AccountSetupInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -12253,17 +12260,17 @@ func (s AccountSetupInProgressException) GoString() string { func newErrorAccountSetupInProgressException(v protocol.ResponseMetadata) error { return &AccountSetupInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccountSetupInProgressException) Code() string { +func (s *AccountSetupInProgressException) Code() string { return "AccountSetupInProgressException" } // Message returns the exception's message. -func (s AccountSetupInProgressException) Message() string { +func (s *AccountSetupInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12271,22 +12278,22 @@ func (s AccountSetupInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccountSetupInProgressException) OrigErr() error { +func (s *AccountSetupInProgressException) OrigErr() error { return nil } -func (s AccountSetupInProgressException) Error() string { +func (s *AccountSetupInProgressException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccountSetupInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccountSetupInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccountSetupInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccountSetupInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an add-on that is enabled for an Amazon Lightsail resource. @@ -12459,35 +12466,35 @@ type Alarm struct { // // An alarm has the following possible states: // - // * ALARM — The metric is outside of the defined threshold. + // * ALARM - The metric is outside of the defined threshold. // - // * INSUFFICIENT_DATA — The alarm has just started, the metric is not - // available, or not enough data is available for the metric to determine - // the alarm state. + // * INSUFFICIENT_DATA - The alarm has just started, the metric is not available, + // or not enough data is available for the metric to determine the alarm + // state. // - // * OK — The metric is within the defined threshold. + // * OK - The metric is within the defined threshold. State *string `locationName:"state" type:"string" enum:"AlarmState"` // The statistic for the metric associated with the alarm. // // The following statistics are available: // - // * Minimum — The lowest value observed during the specified period. Use + // * Minimum - The lowest value observed during the specified period. Use // this value to determine low volumes of activity for your application. // - // * Maximum — The highest value observed during the specified period. - // Use this value to determine high volumes of activity for your application. + // * Maximum - The highest value observed during the specified period. Use + // this value to determine high volumes of activity for your application. // - // * Sum — All values submitted for the matching metric added together. - // You can use this statistic to determine the total volume of a metric. + // * Sum - All values submitted for the matching metric added together. You + // can use this statistic to determine the total volume of a metric. // - // * Average — The value of Sum / SampleCount during the specified period. + // * Average - The value of Sum / SampleCount during the specified period. // By comparing this statistic with the Minimum and Maximum values, you can // determine the full scope of a metric and how close the average use is // to the Minimum and Maximum values. This comparison helps you to know when // to increase or decrease your resources. // - // * SampleCount — The count, or number, of data points used for the statistical + // * SampleCount - The count, or number, of data points used for the statistical // calculation. Statistic *string `locationName:"statistic" type:"string" enum:"MetricStatistic"` @@ -12503,16 +12510,16 @@ type Alarm struct { // // An alarm can treat missing data in the following ways: // - // * breaching — Assume the missing data is not within the threshold. Missing + // * breaching - Assume the missing data is not within the threshold. Missing // data counts towards the number of times the metric is not within the threshold. // - // * notBreaching — Assume the missing data is within the threshold. Missing + // * notBreaching - Assume the missing data is within the threshold. Missing // data does not count towards the number of times the metric is not within // the threshold. // - // * ignore — Ignore the missing data. Maintains the current alarm state. + // * ignore - Ignore the missing data. Maintains the current alarm state. // - // * missing — Missing data is treated as missing. + // * missing - Missing data is treated as missing. TreatMissingData *string `locationName:"treatMissingData" type:"string" enum:"TreatMissingData"` // The unit of the metric associated with the alarm. @@ -12691,7 +12698,7 @@ type AllocateStaticIpOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -12783,7 +12790,7 @@ type AttachDiskOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -12867,7 +12874,7 @@ type AttachInstancesToLoadBalancerOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -12945,7 +12952,7 @@ type AttachLoadBalancerTlsCertificateOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. // // These SSL/TLS certificates are only usable by Lightsail load balancers. You @@ -13025,7 +13032,7 @@ type AttachStaticIpOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -13484,12 +13491,12 @@ func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { type CloseInstancePublicPortsInput struct { _ struct{} `type:"structure"` - // The name of the instance on which you're attempting to close the public ports. + // The name of the instance for which to close ports. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - // Information about the public port you are trying to close. + // An object to describe the ports to close for the specified instance. // // PortInfo is a required field PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` @@ -13514,6 +13521,11 @@ func (s *CloseInstancePublicPortsInput) Validate() error { if s.PortInfo == nil { invalidParams.Add(request.NewErrParamRequired("PortInfo")) } + if s.PortInfo != nil { + if err := s.PortInfo.Validate(); err != nil { + invalidParams.AddNested("PortInfo", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -13536,9 +13548,9 @@ func (s *CloseInstancePublicPortsInput) SetPortInfo(v *PortInfo) *CloseInstanceP type CloseInstancePublicPortsOutput struct { _ struct{} `type:"structure"` - // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected - // by the request. + // An object that describes the result of the action, such as the status of + // the request, the timestamp of the request, and the resources affected by + // the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -13729,12 +13741,12 @@ type ContactMethod struct { // // A contact method has the following possible status: // - // * PendingVerification — The contact method has not yet been verified, + // * PendingVerification - The contact method has not yet been verified, // and the verification has not yet expired. // - // * Valid — The contact method has been verified. + // * Valid - The contact method has been verified. // - // * InValid — An attempt was made to verify the contact method, but the + // * InValid - An attempt was made to verify the contact method, but the // verification has expired. Status *string `locationName:"status" type:"string" enum:"ContactMethodStatus"` @@ -13933,7 +13945,7 @@ type CopySnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -14009,7 +14021,7 @@ type CreateCloudFormationStackOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -14041,7 +14053,7 @@ type CreateContactMethodInput struct { // Phone numbers that follow this format can have a maximum of 15 digits, and // they are prefixed with the plus character (+) and the country code. For example, // a U.S. phone number in E.164 format would be specified as +1XXX5550100. For - // more information, see E.164 (https://en.wikipedia.org/wiki/E.164) in Wikipedia. + // more information, see E.164 (https://en.wikipedia.org/wiki/E.164) on Wikipedia. // // ContactEndpoint is a required field ContactEndpoint *string `locationName:"contactEndpoint" min:"1" type:"string" required:"true"` @@ -14119,7 +14131,7 @@ type CreateContactMethodOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -14320,7 +14332,7 @@ type CreateDiskFromSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -14446,7 +14458,7 @@ type CreateDiskOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -14546,7 +14558,7 @@ type CreateDiskSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -14625,7 +14637,7 @@ type CreateDomainEntryOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -14704,7 +14716,7 @@ type CreateDomainOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -14792,7 +14804,7 @@ type CreateInstanceSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -15028,7 +15040,7 @@ type CreateInstancesFromSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -15214,7 +15226,7 @@ type CreateInstancesOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -15292,7 +15304,7 @@ type CreateKeyPairOutput struct { KeyPair *KeyPair `locationName:"keyPair" type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` @@ -15397,6 +15409,9 @@ func (s *CreateLoadBalancerInput) Validate() error { if s.InstancePort == nil { invalidParams.Add(request.NewErrParamRequired("InstancePort")) } + if s.InstancePort != nil && *s.InstancePort < -1 { + invalidParams.Add(request.NewErrParamMinValue("InstancePort", -1)) + } if s.LoadBalancerName == nil { invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) } @@ -15453,7 +15468,7 @@ type CreateLoadBalancerOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -15572,7 +15587,7 @@ type CreateLoadBalancerTlsCertificateOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -15747,7 +15762,7 @@ type CreateRelationalDatabaseFromSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -15999,7 +16014,7 @@ type CreateRelationalDatabaseOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16093,7 +16108,7 @@ type CreateRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16156,7 +16171,7 @@ type DeleteAlarmOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16236,7 +16251,7 @@ type DeleteAutoSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16302,7 +16317,7 @@ type DeleteContactMethodOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16375,7 +16390,7 @@ type DeleteDiskOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16438,7 +16453,7 @@ type DeleteDiskSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16515,7 +16530,7 @@ type DeleteDomainEntryOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -16578,7 +16593,7 @@ type DeleteDomainOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -16651,7 +16666,7 @@ type DeleteInstanceOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16714,7 +16729,7 @@ type DeleteInstanceSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16777,7 +16792,7 @@ type DeleteKeyPairOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -16840,7 +16855,7 @@ type DeleteKnownHostKeysOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16903,7 +16918,7 @@ type DeleteLoadBalancerOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -16993,7 +17008,7 @@ type DeleteLoadBalancerTlsCertificateOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -17091,7 +17106,7 @@ type DeleteRelationalDatabaseOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -17154,7 +17169,7 @@ type DeleteRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -17251,7 +17266,7 @@ type DetachDiskOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -17329,7 +17344,7 @@ type DetachInstancesFromLoadBalancerOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -17392,7 +17407,7 @@ type DetachStaticIpOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -17469,7 +17484,7 @@ type DisableAddOnOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -18235,7 +18250,7 @@ type EnableAddOnOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -18298,7 +18313,7 @@ type ExportSnapshotOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -19556,44 +19571,43 @@ type GetInstanceMetricDataInput struct { // Valid instance metric names are listed below, along with the most useful // statistics to include in your request, and the published unit value. // - // * CPUUtilization — The percentage of allocated compute units that are + // * CPUUtilization - The percentage of allocated compute units that are // currently in use on the instance. This metric identifies the processing // power to run the applications on the instance. Tools in your operating // system can show a lower percentage than Lightsail when the instance is // not allocated a full processor core. Statistics: The most useful statistics // are Maximum and Average. Unit: The published unit is Percent. // - // * NetworkIn — The number of bytes received on all network interfaces - // by the instance. This metric identifies the volume of incoming network - // traffic to the instance. The number reported is the number of bytes received - // during the period. Because this metric is reported in 5-minute intervals, - // divide the reported number by 300 to find Bytes/second. Statistics: The - // most useful statistic is Sum. Unit: The published unit is Bytes. + // * NetworkIn - The number of bytes received on all network interfaces by + // the instance. This metric identifies the volume of incoming network traffic + // to the instance. The number reported is the number of bytes received during + // the period. Because this metric is reported in 5-minute intervals, divide + // the reported number by 300 to find Bytes/second. Statistics: The most + // useful statistic is Sum. Unit: The published unit is Bytes. // - // * NetworkOut — The number of bytes sent out on all network interfaces + // * NetworkOut - The number of bytes sent out on all network interfaces // by the instance. This metric identifies the volume of outgoing network // traffic from the instance. The number reported is the number of bytes // sent during the period. Because this metric is reported in 5-minute intervals, // divide the reported number by 300 to find Bytes/second. Statistics: The // most useful statistic is Sum. Unit: The published unit is Bytes. // - // * StatusCheckFailed — Reports whether the instance passed or failed - // both the instance status check and the system status check. This metric - // can be either 0 (passed) or 1 (failed). This metric data is available - // in 1-minute (60 seconds) granularity. Statistics: The most useful statistic - // is Sum. Unit: The published unit is Count. + // * StatusCheckFailed - Reports whether the instance passed or failed both + // the instance status check and the system status check. This metric can + // be either 0 (passed) or 1 (failed). This metric data is available in 1-minute + // (60 seconds) granularity. Statistics: The most useful statistic is Sum. + // Unit: The published unit is Count. // - // * StatusCheckFailed_Instance — Reports whether the instance passed or + // * StatusCheckFailed_Instance - Reports whether the instance passed or // failed the instance status check. This metric can be either 0 (passed) // or 1 (failed). This metric data is available in 1-minute (60 seconds) // granularity. Statistics: The most useful statistic is Sum. Unit: The published // unit is Count. // - // * StatusCheckFailed_System — Reports whether the instance passed or - // failed the system status check. This metric can be either 0 (passed) or - // 1 (failed). This metric data is available in 1-minute (60 seconds) granularity. - // Statistics: The most useful statistic is Sum. Unit: The published unit - // is Count. + // * StatusCheckFailed_System - Reports whether the instance passed or failed + // the system status check. This metric can be either 0 (passed) or 1 (failed). + // This metric data is available in 1-minute (60 seconds) granularity. Statistics: + // The most useful statistic is Sum. Unit: The published unit is Count. // // MetricName is a required field MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` @@ -19616,30 +19630,30 @@ type GetInstanceMetricDataInput struct { // // The following statistics are available: // - // * Minimum — The lowest value observed during the specified period. Use + // * Minimum - The lowest value observed during the specified period. Use // this value to determine low volumes of activity for your application. // - // * Maximum — The highest value observed during the specified period. - // Use this value to determine high volumes of activity for your application. + // * Maximum - The highest value observed during the specified period. Use + // this value to determine high volumes of activity for your application. // - // * Sum — All values submitted for the matching metric added together. - // You can use this statistic to determine the total volume of a metric. + // * Sum - All values submitted for the matching metric added together. You + // can use this statistic to determine the total volume of a metric. // - // * Average — The value of Sum / SampleCount during the specified period. + // * Average - The value of Sum / SampleCount during the specified period. // By comparing this statistic with the Minimum and Maximum values, you can // determine the full scope of a metric and how close the average use is // to the Minimum and Maximum values. This comparison helps you to know when // to increase or decrease your resources. // - // * SampleCount — The count, or number, of data points used for the statistical + // * SampleCount - The count, or number, of data points used for the statistical // calculation. // // Statistics is a required field Statistics []*string `locationName:"statistics" type:"list" required:"true"` // The unit for the metric data request. Valid units depend on the metric data - // being required. For the valid units with each available metric, see the metricName - // parameter. + // being requested. For the valid units to specify with each available metric, + // see the metricName parameter. // // Unit is a required field Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` @@ -19790,7 +19804,7 @@ func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { type GetInstancePortStatesInput struct { _ struct{} `type:"structure"` - // The name of the instance. + // The name of the instance for which to return firewall port states. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` @@ -19828,7 +19842,8 @@ func (s *GetInstancePortStatesInput) SetInstanceName(v string) *GetInstancePortS type GetInstancePortStatesOutput struct { _ struct{} `type:"structure"` - // Information about the port states resulting from your request. + // An array of objects that describe the firewall port states for the specified + // instance. PortStates []*InstancePortState `locationName:"portStates" type:"list"` } @@ -20281,73 +20296,73 @@ type GetLoadBalancerMetricDataInput struct { // Valid load balancer metric names are listed below, along with the most useful // statistics to include in your request, and the published unit value. // - // * ClientTLSNegotiationErrorCount — The number of TLS connections initiated + // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated // by the client that did not establish a session with the load balancer // due to a TLS error generated by the load balancer. Possible causes include // a mismatch of ciphers or protocols. Statistics: The most useful statistic // is Sum. Unit: The published unit is Count. // - // * HealthyHostCount — The number of target instances that are considered + // * HealthyHostCount - The number of target instances that are considered // healthy. Statistics: The most useful statistic are Average, Minimum, and // Maximum. Unit: The published unit is Count. // - // * HTTPCode_Instance_2XX_Count — The number of HTTP 2XX response codes + // * HTTPCode_Instance_2XX_Count - The number of HTTP 2XX response codes // generated by the target instances. This does not include any response // codes generated by the load balancer. Statistics: The most useful statistic // is Sum. Note that Minimum, Maximum, and Average all return 1. Unit: The // published unit is Count. // - // * HTTPCode_Instance_3XX_Count — The number of HTTP 3XX response codes + // * HTTPCode_Instance_3XX_Count - The number of HTTP 3XX response codes // generated by the target instances. This does not include any response // codes generated by the load balancer. Statistics: The most useful statistic // is Sum. Note that Minimum, Maximum, and Average all return 1. Unit: The // published unit is Count. // - // * HTTPCode_Instance_4XX_Count — The number of HTTP 4XX response codes + // * HTTPCode_Instance_4XX_Count - The number of HTTP 4XX response codes // generated by the target instances. This does not include any response // codes generated by the load balancer. Statistics: The most useful statistic // is Sum. Note that Minimum, Maximum, and Average all return 1. Unit: The // published unit is Count. // - // * HTTPCode_Instance_5XX_Count — The number of HTTP 5XX response codes + // * HTTPCode_Instance_5XX_Count - The number of HTTP 5XX response codes // generated by the target instances. This does not include any response // codes generated by the load balancer. Statistics: The most useful statistic // is Sum. Note that Minimum, Maximum, and Average all return 1. Unit: The // published unit is Count. // - // * HTTPCode_LB_4XX_Count — The number of HTTP 4XX client error codes - // that originated from the load balancer. Client errors are generated when - // requests are malformed or incomplete. These requests were not received - // by the target instance. This count does not include response codes generated - // by the target instances. Statistics: The most useful statistic is Sum. - // Note that Minimum, Maximum, and Average all return 1. Unit: The published - // unit is Count. + // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that + // originated from the load balancer. Client errors are generated when requests + // are malformed or incomplete. These requests were not received by the target + // instance. This count does not include response codes generated by the + // target instances. Statistics: The most useful statistic is Sum. Note that + // Minimum, Maximum, and Average all return 1. Unit: The published unit is + // Count. // - // * HTTPCode_LB_5XX_Count — The number of HTTP 5XX server error codes - // that originated from the load balancer. This does not include any response + // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that + // originated from the load balancer. This does not include any response // codes generated by the target instance. This metric is reported if there // are no healthy instances attached to the load balancer, or if the request // rate exceeds the capacity of the instances (spillover) or the load balancer. // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, // and Average all return 1. Unit: The published unit is Count. // - // * InstanceResponseTime — The time elapsed, in seconds, after the request + // * InstanceResponseTime - The time elapsed, in seconds, after the request // leaves the load balancer until a response from the target instance is // received. Statistics: The most useful statistic is Average. Unit: The // published unit is Seconds. // - // * RejectedConnectionCount — The number of connections that were rejected + // * RejectedConnectionCount - The number of connections that were rejected // because the load balancer had reached its maximum number of connections. // Statistics: The most useful statistic is Sum. Unit: The published unit // is Count. // - // * RequestCount — The number of requests processed over IPv4. This count + // * RequestCount - The number of requests processed over IPv4. This count // includes only the requests with a response generated by a target instance // of the load balancer. Statistics: The most useful statistic is Sum. Note // that Minimum, Maximum, and Average all return 1. Unit: The published unit // is Count. // - // * UnhealthyHostCount — The number of target instances that are considered + // * UnhealthyHostCount - The number of target instances that are considered // unhealthy. Statistics: The most useful statistic are Average, Minimum, // and Maximum. Unit: The published unit is Count. // @@ -20368,22 +20383,22 @@ type GetLoadBalancerMetricDataInput struct { // // The following statistics are available: // - // * Minimum — The lowest value observed during the specified period. Use + // * Minimum - The lowest value observed during the specified period. Use // this value to determine low volumes of activity for your application. // - // * Maximum — The highest value observed during the specified period. - // Use this value to determine high volumes of activity for your application. + // * Maximum - The highest value observed during the specified period. Use + // this value to determine high volumes of activity for your application. // - // * Sum — All values submitted for the matching metric added together. - // You can use this statistic to determine the total volume of a metric. + // * Sum - All values submitted for the matching metric added together. You + // can use this statistic to determine the total volume of a metric. // - // * Average — The value of Sum / SampleCount during the specified period. + // * Average - The value of Sum / SampleCount during the specified period. // By comparing this statistic with the Minimum and Maximum values, you can // determine the full scope of a metric and how close the average use is // to the Minimum and Maximum values. This comparison helps you to know when // to increase or decrease your resources. // - // * SampleCount — The count, or number, of data points used for the statistical + // * SampleCount - The count, or number, of data points used for the statistical // calculation. // // Statistics is a required field @@ -20765,7 +20780,7 @@ type GetOperationOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -20857,7 +20872,7 @@ type GetOperationsForResourceOutput struct { NextPageToken *string `locationName:"nextPageToken" type:"string"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -20929,7 +20944,7 @@ type GetOperationsOutput struct { NextPageToken *string `locationName:"nextPageToken" type:"string"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -21617,27 +21632,27 @@ type GetRelationalDatabaseMetricDataInput struct { // All relational database metric data is available in 1-minute (60 seconds) // granularity. // - // * CPUUtilization — The percentage of CPU utilization currently in use + // * CPUUtilization - The percentage of CPU utilization currently in use // on the database. Statistics: The most useful statistics are Maximum and // Average. Unit: The published unit is Percent. // - // * DatabaseConnections — The number of database connections in use. Statistics: + // * DatabaseConnections - The number of database connections in use. Statistics: // The most useful statistics are Maximum and Sum. Unit: The published unit // is Count. // - // * DiskQueueDepth — The number of outstanding IOs (read/write requests) + // * DiskQueueDepth - The number of outstanding IOs (read/write requests) // that are waiting to access the disk. Statistics: The most useful statistic // is Sum. Unit: The published unit is Count. // - // * FreeStorageSpace — The amount of available storage space. Statistics: + // * FreeStorageSpace - The amount of available storage space. Statistics: // The most useful statistic is Sum. Unit: The published unit is Bytes. // - // * NetworkReceiveThroughput — The incoming (Receive) network traffic - // on the database, including both customer database traffic and AWS traffic + // * NetworkReceiveThroughput - The incoming (Receive) network traffic on + // the database, including both customer database traffic and AWS traffic // used for monitoring and replication. Statistics: The most useful statistic // is Average. Unit: The published unit is Bytes/Second. // - // * NetworkTransmitThroughput — The outgoing (Transmit) network traffic + // * NetworkTransmitThroughput - The outgoing (Transmit) network traffic // on the database, including both customer database traffic and AWS traffic // used for monitoring and replication. Statistics: The most useful statistic // is Average. Unit: The published unit is Bytes/Second. @@ -21675,22 +21690,22 @@ type GetRelationalDatabaseMetricDataInput struct { // // The following statistics are available: // - // * Minimum — The lowest value observed during the specified period. Use + // * Minimum - The lowest value observed during the specified period. Use // this value to determine low volumes of activity for your application. // - // * Maximum — The highest value observed during the specified period. - // Use this value to determine high volumes of activity for your application. + // * Maximum - The highest value observed during the specified period. Use + // this value to determine high volumes of activity for your application. // - // * Sum — All values submitted for the matching metric added together. - // You can use this statistic to determine the total volume of a metric. + // * Sum - All values submitted for the matching metric added together. You + // can use this statistic to determine the total volume of a metric. // - // * Average — The value of Sum / SampleCount during the specified period. + // * Average - The value of Sum / SampleCount during the specified period. // By comparing this statistic with the Minimum and Maximum values, you can // determine the full scope of a metric and how close the average use is // to the Minimum and Maximum values. This comparison helps you to know when // to increase or decrease your resources. // - // * SampleCount — The count, or number, of data points used for the statistical + // * SampleCount - The count, or number, of data points used for the statistical // calculation. // // Statistics is a required field @@ -22401,7 +22416,7 @@ type ImportKeyPairOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -22763,13 +22778,20 @@ type InstanceEntry struct { // // The following configuration options are available: // - // * DEFAULT — Use the default firewall settings from the image. + // * DEFAULT - Use the default firewall settings from the Lightsail instance + // blueprint. + // + // * INSTANCE - Use the configured firewall settings from the source Lightsail + // instance. // - // * INSTANCE — Use the firewall settings from the source Lightsail instance. + // * NONE - Use the default Amazon EC2 security group. // - // * NONE — Default to Amazon EC2. + // * CLOSED - All ports closed. // - // * CLOSED — All ports closed. + // If you configured lightsail-connect as a cidrListAliases on your instance, + // or if you chose to allow the Lightsail browser-based SSH or RDP clients to + // connect to your instance, that configuration is not carried over to your + // new Amazon EC2 instance. // // PortInfoSource is a required field PortInfoSource *string `locationName:"portInfoSource" type:"string" required:"true" enum:"PortInfoSourceType"` @@ -23019,26 +23041,55 @@ func (s *InstanceNetworking) SetPorts(v []*InstancePortInfo) *InstanceNetworking return s } -// Describes information about the instance ports. +// Describes information about ports for an Amazon Lightsail instance. type InstancePortInfo struct { _ struct{} `type:"structure"` // The access direction (inbound or outbound). + // + // Lightsail currently supports only inbound access direction. AccessDirection *string `locationName:"accessDirection" type:"string" enum:"AccessDirection"` - // The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)). + // The location from which access is allowed. For example, Anywhere (0.0.0.0/0), + // or Custom if a specific IP address or range of IP addresses is allowed. AccessFrom *string `locationName:"accessFrom" type:"string"` // The type of access (Public or Private). AccessType *string `locationName:"accessType" type:"string" enum:"PortAccessType"` - // The common name. + // An alias that defines access for a preconfigured range of IP addresses. + // + // The only alias currently supported is lightsail-connect, which allows IP + // addresses of the browser-based RDP/SSH client in the Lightsail console to + // connect to your instance. + CidrListAliases []*string `locationName:"cidrListAliases" type:"list"` + + // The IP address, or range of IP addresses in CIDR notation, that are allowed + // to connect to an instance through the ports, and the protocol. Lightsail + // supports IPv4 addresses. + // + // For more information about CIDR block notation, see Classless Inter-Domain + // Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) + // on Wikipedia. + Cidrs []*string `locationName:"cidrs" type:"list"` + + // The common name of the port information. CommonName *string `locationName:"commonName" type:"string"` - // The first port in the range. + // The first port in a range of open ports on an instance. + // + // Allowed ports: + // + // * TCP and UDP - 0 to 65535 + // + // * ICMP - 8 (to configure Ping) Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. FromPort *int64 `locationName:"fromPort" type:"integer"` - // The protocol being used. Can be one of the following. + // The IP protocol name. + // + // The name can be one of the following: // // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, // and error-checked delivery of streamed data between applications running @@ -23056,9 +23107,24 @@ type InstancePortInfo struct { // can use UDP, which provides a connectionless datagram service that emphasizes // reduced latency over reliability. If you do require reliable data stream // service, use TCP instead. + // + // * icmp - Internet Control Message Protocol (ICMP) is used to send error + // messages and operational information indicating success or failure when + // communicating with an instance. For example, an error is indicated when + // an instance could not be reached. Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - // The last port in the range. + // The last port in a range of open ports on an instance. + // + // Allowed ports: + // + // * TCP and UDP - 0 to 65535 + // + // * ICMP - -1 (to configure Ping) Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. ToPort *int64 `locationName:"toPort" type:"integer"` } @@ -23090,6 +23156,18 @@ func (s *InstancePortInfo) SetAccessType(v string) *InstancePortInfo { return s } +// SetCidrListAliases sets the CidrListAliases field's value. +func (s *InstancePortInfo) SetCidrListAliases(v []*string) *InstancePortInfo { + s.CidrListAliases = v + return s +} + +// SetCidrs sets the Cidrs field's value. +func (s *InstancePortInfo) SetCidrs(v []*string) *InstancePortInfo { + s.Cidrs = v + return s +} + // SetCommonName sets the CommonName field's value. func (s *InstancePortInfo) SetCommonName(v string) *InstancePortInfo { s.CommonName = &v @@ -23114,14 +23192,41 @@ func (s *InstancePortInfo) SetToPort(v int64) *InstancePortInfo { return s } -// Describes the port state. +// Describes open ports on an instance, the IP addresses allowed to connect +// to the instance through the ports, and the protocol. type InstancePortState struct { _ struct{} `type:"structure"` - // The first port in the range. + // An alias that defines access for a preconfigured range of IP addresses. + // + // The only alias currently supported is lightsail-connect, which allows IP + // addresses of the browser-based RDP/SSH client in the Lightsail console to + // connect to your instance. + CidrListAliases []*string `locationName:"cidrListAliases" type:"list"` + + // The IP address, or range of IP addresses in CIDR notation, that are allowed + // to connect to an instance through the ports, and the protocol. Lightsail + // supports IPv4 addresses. + // + // For more information about CIDR block notation, see Classless Inter-Domain + // Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) + // on Wikipedia. + Cidrs []*string `locationName:"cidrs" type:"list"` + + // The first port in a range of open ports on an instance. + // + // Allowed ports: + // + // * TCP and UDP - 0 to 65535 + // + // * ICMP - 8 (to configure Ping) Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. FromPort *int64 `locationName:"fromPort" type:"integer"` - // The protocol being used. Can be one of the following. + // The IP protocol name. + // + // The name can be one of the following: // // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, // and error-checked delivery of streamed data between applications running @@ -23139,12 +23244,29 @@ type InstancePortState struct { // can use UDP, which provides a connectionless datagram service that emphasizes // reduced latency over reliability. If you do require reliable data stream // service, use TCP instead. + // + // * icmp - Internet Control Message Protocol (ICMP) is used to send error + // messages and operational information indicating success or failure when + // communicating with an instance. For example, an error is indicated when + // an instance could not be reached. Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` // Specifies whether the instance port is open or closed. + // + // The port state for Lightsail instances is always open. State *string `locationName:"state" type:"string" enum:"PortState"` - // The last port in the range. + // The last port in a range of open ports on an instance. + // + // Allowed ports: + // + // * TCP and UDP - 0 to 65535 + // + // * ICMP - -1 (to configure Ping) Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. ToPort *int64 `locationName:"toPort" type:"integer"` } @@ -23158,6 +23280,18 @@ func (s InstancePortState) GoString() string { return s.String() } +// SetCidrListAliases sets the CidrListAliases field's value. +func (s *InstancePortState) SetCidrListAliases(v []*string) *InstancePortState { + s.CidrListAliases = v + return s +} + +// SetCidrs sets the Cidrs field's value. +func (s *InstancePortState) SetCidrs(v []*string) *InstancePortState { + s.Cidrs = v + return s +} + // SetFromPort sets the FromPort field's value. func (s *InstancePortState) SetFromPort(v int64) *InstancePortState { s.FromPort = &v @@ -23430,8 +23564,8 @@ func (s *InstanceState) SetName(v string) *InstanceState { // Please set your AWS Region configuration to us-east-1 to create, view, or // edit these resources. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -23454,17 +23588,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23472,22 +23606,22 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } type IsVpcPeeredInput struct { @@ -24414,8 +24548,8 @@ func (s *MonthlyTransfer) SetGbPerMonthAllocated(v int64) *MonthlyTransfer { // Lightsail throws this exception when it cannot find a resource. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -24438,17 +24572,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24456,33 +24590,33 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type OpenInstancePublicPortsInput struct { _ struct{} `type:"structure"` - // The name of the instance for which you want to open the public ports. + // The name of the instance for which to open ports. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - // An array of key-value pairs containing information about the port mappings. + // An object to describe the ports to open for the specified instance. // // PortInfo is a required field PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` @@ -24507,6 +24641,11 @@ func (s *OpenInstancePublicPortsInput) Validate() error { if s.PortInfo == nil { invalidParams.Add(request.NewErrParamRequired("PortInfo")) } + if s.PortInfo != nil { + if err := s.PortInfo.Validate(); err != nil { + invalidParams.AddNested("PortInfo", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -24530,7 +24669,7 @@ type OpenInstancePublicPortsOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -24676,8 +24815,8 @@ func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { // Lightsail throws this exception when an operation fails to execute. type OperationFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -24700,17 +24839,17 @@ func (s OperationFailureException) GoString() string { func newErrorOperationFailureException(v protocol.ResponseMetadata) error { return &OperationFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationFailureException) Code() string { +func (s *OperationFailureException) Code() string { return "OperationFailureException" } // Message returns the exception's message. -func (s OperationFailureException) Message() string { +func (s *OperationFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24718,22 +24857,22 @@ func (s OperationFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationFailureException) OrigErr() error { +func (s *OperationFailureException) OrigErr() error { return nil } -func (s OperationFailureException) Error() string { +func (s *OperationFailureException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The password data for the Windows Server-based instance, including the ciphertext @@ -24806,7 +24945,7 @@ type PeerVpcOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -24911,18 +25050,82 @@ func (s *PendingModifiedRelationalDatabaseValues) SetMasterUserPassword(v string return s } -// Describes information about the ports on your virtual private server (or -// instance). +// Describes ports to open on an instance, the IP addresses allowed to connect +// to the instance through the ports, and the protocol. type PortInfo struct { _ struct{} `type:"structure"` - // The first port in the range. + // An alias that defines access for a preconfigured range of IP addresses. + // + // The only alias currently supported is lightsail-connect, which allows IP + // addresses of the browser-based RDP/SSH client in the Lightsail console to + // connect to your instance. + CidrListAliases []*string `locationName:"cidrListAliases" type:"list"` + + // The IP address, or range of IP addresses in CIDR notation, that are allowed + // to connect to an instance through the ports, and the protocol. Lightsail + // supports IPv4 addresses. + // + // Examples: + // + // * To allow the IP address 192.0.2.44, specify 192.0.2.44 or 192.0.2.44/32. + // + // * To allow the IP addresses 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24. + // + // For more information about CIDR block notation, see Classless Inter-Domain + // Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) + // on Wikipedia. + Cidrs []*string `locationName:"cidrs" type:"list"` + + // The first port in a range of open ports on an instance. + // + // Allowed ports: + // + // * TCP and UDP - 0 to 65535 + // + // * ICMP - 8 (to configure Ping) Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. FromPort *int64 `locationName:"fromPort" type:"integer"` - // The protocol. + // The IP protocol name. + // + // The name can be one of the following: + // + // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, + // and error-checked delivery of streamed data between applications running + // on hosts communicating by an IP network. If you have an application that + // doesn't require reliable data stream service, use UDP instead. + // + // * all - All transport layer protocol types. For more general information, + // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on + // Wikipedia. + // + // * udp - With User Datagram Protocol (UDP), computer applications can send + // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. + // Prior communications are not required to set up transmission channels + // or data paths. Applications that don't require reliable data stream service + // can use UDP, which provides a connectionless datagram service that emphasizes + // reduced latency over reliability. If you do require reliable data stream + // service, use TCP instead. + // + // * icmp - Internet Control Message Protocol (ICMP) is used to send error + // messages and operational information indicating success or failure when + // communicating with an instance. For example, an error is indicated when + // an instance could not be reached. Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - // The last port in the range. + // The last port in a range of open ports on an instance. + // + // Allowed ports: + // + // * TCP and UDP - 0 to 65535 + // + // * ICMP - -1 (to configure Ping) Ping is the only communication supported + // through the ICMP protocol in Lightsail. To configure ping, specify the + // fromPort parameter as 8, and the toPort parameter as -1. ToPort *int64 `locationName:"toPort" type:"integer"` } @@ -24936,6 +25139,34 @@ func (s PortInfo) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PortInfo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PortInfo"} + if s.FromPort != nil && *s.FromPort < -1 { + invalidParams.Add(request.NewErrParamMinValue("FromPort", -1)) + } + if s.ToPort != nil && *s.ToPort < -1 { + invalidParams.Add(request.NewErrParamMinValue("ToPort", -1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidrListAliases sets the CidrListAliases field's value. +func (s *PortInfo) SetCidrListAliases(v []*string) *PortInfo { + s.CidrListAliases = v + return s +} + +// SetCidrs sets the Cidrs field's value. +func (s *PortInfo) SetCidrs(v []*string) *PortInfo { + s.Cidrs = v + return s +} + // SetFromPort sets the FromPort field's value. func (s *PortInfo) SetFromPort(v int64) *PortInfo { s.FromPort = &v @@ -25042,13 +25273,13 @@ type PutAlarmInput struct { // // An alarm has the following possible states: // - // * ALARM — The metric is outside of the defined threshold. + // * ALARM - The metric is outside of the defined threshold. // - // * INSUFFICIENT_DATA — The alarm has just started, the metric is not - // available, or not enough data is available for the metric to determine - // the alarm state. + // * INSUFFICIENT_DATA - The alarm has just started, the metric is not available, + // or not enough data is available for the metric to determine the alarm + // state. // - // * OK — The metric is within the defined threshold. + // * OK - The metric is within the defined threshold. // // When you specify a notification trigger, the ALARM state must be specified. // The INSUFFICIENT_DATA and OK states can be specified in addition to the ALARM @@ -25074,16 +25305,16 @@ type PutAlarmInput struct { // // An alarm can treat missing data in the following ways: // - // * breaching — Assume the missing data is not within the threshold. Missing + // * breaching - Assume the missing data is not within the threshold. Missing // data counts towards the number of times the metric is not within the threshold. // - // * notBreaching — Assume the missing data is within the threshold. Missing + // * notBreaching - Assume the missing data is within the threshold. Missing // data does not count towards the number of times the metric is not within // the threshold. // - // * ignore — Ignore the missing data. Maintains the current alarm state. + // * ignore - Ignore the missing data. Maintains the current alarm state. // - // * missing — Missing data is treated as missing. + // * missing - Missing data is treated as missing. // // If treatMissingData is not specified, the default behavior of missing is // used. @@ -25198,7 +25429,7 @@ type PutAlarmOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -25222,12 +25453,12 @@ func (s *PutAlarmOutput) SetOperations(v []*Operation) *PutAlarmOutput { type PutInstancePublicPortsInput struct { _ struct{} `type:"structure"` - // The Lightsail instance name of the public port(s) you are setting. + // The name of the instance for which to open ports. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - // Specifies information about the public port(s). + // An array of objects to describe the ports to open for the specified instance. // // PortInfos is a required field PortInfos []*PortInfo `locationName:"portInfos" type:"list" required:"true"` @@ -25252,6 +25483,16 @@ func (s *PutInstancePublicPortsInput) Validate() error { if s.PortInfos == nil { invalidParams.Add(request.NewErrParamRequired("PortInfos")) } + if s.PortInfos != nil { + for i, v := range s.PortInfos { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortInfos", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -25275,7 +25516,7 @@ type PutInstancePublicPortsOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -25338,7 +25579,7 @@ type RebootInstanceOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -25401,7 +25642,7 @@ type RebootRelationalDatabaseOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26336,7 +26577,7 @@ type ReleaseStaticIpOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26432,7 +26673,7 @@ type SendContactMethodVerificationOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26455,8 +26696,8 @@ func (s *SendContactMethodVerificationOutput) SetOperations(v []*Operation) *Sen // A general service exception. type ServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -26479,17 +26720,17 @@ func (s ServiceException) GoString() string { func newErrorServiceException(v protocol.ResponseMetadata) error { return &ServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceException) Code() string { +func (s *ServiceException) Code() string { return "ServiceException" } // Message returns the exception's message. -func (s ServiceException) Message() string { +func (s *ServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26497,22 +26738,22 @@ func (s ServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceException) OrigErr() error { +func (s *ServiceException) OrigErr() error { return nil } -func (s ServiceException) Error() string { +func (s *ServiceException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceException) RequestID() string { + return s.RespMetadata.RequestID } type StartInstanceInput struct { @@ -26557,7 +26798,7 @@ type StartInstanceOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26620,7 +26861,7 @@ type StartRelationalDatabaseOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26795,7 +27036,7 @@ type StopInstanceOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26868,7 +27109,7 @@ type StopRelationalDatabaseOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -26997,7 +27238,7 @@ type TagResourceOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -27030,13 +27271,13 @@ type TestAlarmInput struct { // // An alarm has the following possible states that can be tested: // - // * ALARM — The metric is outside of the defined threshold. + // * ALARM - The metric is outside of the defined threshold. // - // * INSUFFICIENT_DATA — The alarm has just started, the metric is not - // available, or not enough data is available for the metric to determine - // the alarm state. + // * INSUFFICIENT_DATA - The alarm has just started, the metric is not available, + // or not enough data is available for the metric to determine the alarm + // state. // - // * OK — The metric is within the defined threshold. + // * OK - The metric is within the defined threshold. // // State is a required field State *string `locationName:"state" type:"string" required:"true" enum:"AlarmState"` @@ -27084,7 +27325,7 @@ type TestAlarmOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -27107,8 +27348,8 @@ func (s *TestAlarmOutput) SetOperations(v []*Operation) *TestAlarmOutput { // Lightsail throws this exception when the user has not been authenticated. type UnauthenticatedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"code" type:"string"` @@ -27131,17 +27372,17 @@ func (s UnauthenticatedException) GoString() string { func newErrorUnauthenticatedException(v protocol.ResponseMetadata) error { return &UnauthenticatedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthenticatedException) Code() string { +func (s *UnauthenticatedException) Code() string { return "UnauthenticatedException" } // Message returns the exception's message. -func (s UnauthenticatedException) Message() string { +func (s *UnauthenticatedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27149,22 +27390,22 @@ func (s UnauthenticatedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthenticatedException) OrigErr() error { +func (s *UnauthenticatedException) OrigErr() error { return nil } -func (s UnauthenticatedException) Error() string { +func (s *UnauthenticatedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthenticatedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthenticatedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthenticatedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthenticatedException) RequestID() string { + return s.RespMetadata.RequestID } type UnpeerVpcInput struct { @@ -27185,7 +27426,7 @@ type UnpeerVpcOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operation *Operation `locationName:"operation" type:"structure"` } @@ -27272,7 +27513,7 @@ type UntagResourceOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -27349,7 +27590,7 @@ type UpdateDomainEntryOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -27443,7 +27684,7 @@ type UpdateLoadBalancerAttributeOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -27636,7 +27877,7 @@ type UpdateRelationalDatabaseOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -27713,7 +27954,7 @@ type UpdateRelationalDatabaseParametersOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the result of the action, such as the status - // of the request, the time stamp of the request, and the resources affected + // of the request, the timestamp of the request, and the resources affected // by the request. Operations []*Operation `locationName:"operations" type:"list"` } @@ -28318,6 +28559,9 @@ const ( // NetworkProtocolUdp is a NetworkProtocol enum value NetworkProtocolUdp = "udp" + + // NetworkProtocolIcmp is a NetworkProtocol enum value + NetworkProtocolIcmp = "icmp" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go index 615361d048f..d6728b8d182 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go @@ -749,8 +749,8 @@ func (c *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3Res // You do not have required permissions to access the requested resource. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -770,17 +770,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -788,22 +788,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type AssociateMemberAccountInput struct { @@ -1216,8 +1216,8 @@ func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource { // Internal server error. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Error code for the exception ErrorCode *string `locationName:"errorCode" type:"string"` @@ -1237,17 +1237,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1255,29 +1255,29 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because an invalid or out-of-range value was supplied // for an input parameter. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Error code for the exception ErrorCode *string `locationName:"errorCode" type:"string"` @@ -1300,17 +1300,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1318,29 +1318,29 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because it attempted to create resources beyond // the current AWS account limits. The error code describes the limit exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Error code for the exception ErrorCode *string `locationName:"errorCode" type:"string"` @@ -1363,17 +1363,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1381,22 +1381,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListMemberAccountsInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/managedblockchain/api.go b/vendor/github.com/aws/aws-sdk-go/service/managedblockchain/api.go index d2537bef0f0..01e13126274 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/managedblockchain/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/managedblockchain/api.go @@ -2057,6 +2057,202 @@ func (c *ManagedBlockchain) RejectInvitationWithContext(ctx aws.Context, input * return out, req.Send() } +const opUpdateMember = "UpdateMember" + +// UpdateMemberRequest generates a "aws/request.Request" representing the +// client's request for the UpdateMember operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateMember for more information on using the UpdateMember +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateMemberRequest method. +// req, resp := client.UpdateMemberRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateMember +func (c *ManagedBlockchain) UpdateMemberRequest(input *UpdateMemberInput) (req *request.Request, output *UpdateMemberOutput) { + op := &request.Operation{ + Name: opUpdateMember, + HTTPMethod: "PATCH", + HTTPPath: "/networks/{networkId}/members/{memberId}", + } + + if input == nil { + input = &UpdateMemberInput{} + } + + output = &UpdateMemberOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateMember API operation for Amazon Managed Blockchain. +// +// Updates a member configuration with new parameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Managed Blockchain's +// API operation UpdateMember for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// The action or operation requested is invalid. Verify that the action is typed +// correctly. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// A requested resource does not exist on the network. It may have been deleted +// or referenced inaccurately. +// +// * ThrottlingException +// The request or operation could not be performed because a service is throttling +// requests. The most common source of throttling errors is launching EC2 instances +// such that your service limit for EC2 instances is exceeded. Request a limit +// increase or delete unused resources if possible. +// +// * InternalServiceErrorException +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateMember +func (c *ManagedBlockchain) UpdateMember(input *UpdateMemberInput) (*UpdateMemberOutput, error) { + req, out := c.UpdateMemberRequest(input) + return out, req.Send() +} + +// UpdateMemberWithContext is the same as UpdateMember with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateMember for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ManagedBlockchain) UpdateMemberWithContext(ctx aws.Context, input *UpdateMemberInput, opts ...request.Option) (*UpdateMemberOutput, error) { + req, out := c.UpdateMemberRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateNode = "UpdateNode" + +// UpdateNodeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateNode for more information on using the UpdateNode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateNodeRequest method. +// req, resp := client.UpdateNodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateNode +func (c *ManagedBlockchain) UpdateNodeRequest(input *UpdateNodeInput) (req *request.Request, output *UpdateNodeOutput) { + op := &request.Operation{ + Name: opUpdateNode, + HTTPMethod: "PATCH", + HTTPPath: "/networks/{networkId}/members/{memberId}/nodes/{nodeId}", + } + + if input == nil { + input = &UpdateNodeInput{} + } + + output = &UpdateNodeOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateNode API operation for Amazon Managed Blockchain. +// +// Updates a node configuration with new parameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Managed Blockchain's +// API operation UpdateNode for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// The action or operation requested is invalid. Verify that the action is typed +// correctly. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// A requested resource does not exist on the network. It may have been deleted +// or referenced inaccurately. +// +// * ThrottlingException +// The request or operation could not be performed because a service is throttling +// requests. The most common source of throttling errors is launching EC2 instances +// such that your service limit for EC2 instances is exceeded. Request a limit +// increase or delete unused resources if possible. +// +// * InternalServiceErrorException +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateNode +func (c *ManagedBlockchain) UpdateNode(input *UpdateNodeInput) (*UpdateNodeOutput, error) { + req, out := c.UpdateNodeRequest(input) + return out, req.Send() +} + +// UpdateNodeWithContext is the same as UpdateNode with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ManagedBlockchain) UpdateNodeWithContext(ctx aws.Context, input *UpdateNodeInput, opts ...request.Option) (*UpdateNodeOutput, error) { + req, out := c.UpdateNodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVoteOnProposal = "VoteOnProposal" // VoteOnProposalRequest generates a "aws/request.Request" representing the @@ -2161,8 +2357,8 @@ func (c *ManagedBlockchain) VoteOnProposalWithContext(ctx aws.Context, input *Vo // You do not have sufficient access to perform this action. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2179,17 +2375,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2197,22 +2393,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // A policy type that defines the voting rules for the network. The rules decide @@ -3313,8 +3509,8 @@ func (s *GetProposalOutput) SetProposal(v *Proposal) *GetProposalOutput { } type IllegalActionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3331,17 +3527,17 @@ func (s IllegalActionException) GoString() string { func newErrorIllegalActionException(v protocol.ResponseMetadata) error { return &IllegalActionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IllegalActionException) Code() string { +func (s *IllegalActionException) Code() string { return "IllegalActionException" } // Message returns the exception's message. -func (s IllegalActionException) Message() string { +func (s *IllegalActionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3349,29 +3545,29 @@ func (s IllegalActionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IllegalActionException) OrigErr() error { +func (s *IllegalActionException) OrigErr() error { return nil } -func (s IllegalActionException) Error() string { +func (s *IllegalActionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IllegalActionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IllegalActionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IllegalActionException) RequestID() string { - return s.respMetadata.RequestID +func (s *IllegalActionException) RequestID() string { + return s.RespMetadata.RequestID } // The request processing has failed because of an unknown error, exception // or failure. type InternalServiceErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3388,17 +3584,17 @@ func (s InternalServiceErrorException) GoString() string { func newErrorInternalServiceErrorException(v protocol.ResponseMetadata) error { return &InternalServiceErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceErrorException) Code() string { +func (s *InternalServiceErrorException) Code() string { return "InternalServiceErrorException" } // Message returns the exception's message. -func (s InternalServiceErrorException) Message() string { +func (s *InternalServiceErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3406,29 +3602,29 @@ func (s InternalServiceErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceErrorException) OrigErr() error { +func (s *InternalServiceErrorException) OrigErr() error { return nil } -func (s InternalServiceErrorException) Error() string { +func (s *InternalServiceErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The action or operation requested is invalid. Verify that the action is typed // correctly. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3445,17 +3641,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3463,22 +3659,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // An invitation to an AWS account to create a member and join the network. @@ -4234,6 +4430,54 @@ func (s *ListProposalsOutput) SetProposals(v []*ProposalSummary) *ListProposalsO return s } +// A configuration for logging events. +type LogConfiguration struct { + _ struct{} `type:"structure"` + + // Indicates whether logging is enabled. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s LogConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogConfiguration) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *LogConfiguration) SetEnabled(v bool) *LogConfiguration { + s.Enabled = &v + return s +} + +// A collection of log configurations. +type LogConfigurations struct { + _ struct{} `type:"structure"` + + // Parameters for publishing logs to Amazon CloudWatch Logs. + Cloudwatch *LogConfiguration `type:"structure"` +} + +// String returns the string representation +func (s LogConfigurations) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogConfigurations) GoString() string { + return s.String() +} + +// SetCloudwatch sets the Cloudwatch field's value. +func (s *LogConfigurations) SetCloudwatch(v *LogConfiguration) *LogConfigurations { + s.Cloudwatch = v + return s +} + // Member configuration properties. type Member struct { _ struct{} `type:"structure"` @@ -4251,6 +4495,9 @@ type Member struct { // The unique identifier of the member. Id *string `min:"1" type:"string"` + // Configuration properties for logging events associated with a member. + LogPublishingConfiguration *MemberLogPublishingConfiguration `type:"structure"` + // The name of the member. Name *string `min:"1" type:"string"` @@ -4312,6 +4559,12 @@ func (s *Member) SetId(v string) *Member { return s } +// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. +func (s *Member) SetLogPublishingConfiguration(v *MemberLogPublishingConfiguration) *Member { + s.LogPublishingConfiguration = v + return s +} + // SetName sets the Name field's value. func (s *Member) SetName(v string) *Member { s.Name = &v @@ -4342,6 +4595,10 @@ type MemberConfiguration struct { // FrameworkConfiguration is a required field FrameworkConfiguration *MemberFrameworkConfiguration `type:"structure" required:"true"` + // Configuration properties for logging events associated with a member of a + // Managed Blockchain network. + LogPublishingConfiguration *MemberLogPublishingConfiguration `type:"structure"` + // The name of the member. // // Name is a required field @@ -4394,6 +4651,12 @@ func (s *MemberConfiguration) SetFrameworkConfiguration(v *MemberFrameworkConfig return s } +// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. +func (s *MemberConfiguration) SetLogPublishingConfiguration(v *MemberLogPublishingConfiguration) *MemberConfiguration { + s.LogPublishingConfiguration = v + return s +} + // SetName sets the Name field's value. func (s *MemberConfiguration) SetName(v string) *MemberConfiguration { s.Name = &v @@ -4498,6 +4761,33 @@ func (s *MemberFabricConfiguration) SetAdminUsername(v string) *MemberFabricConf return s } +// Configuration properties for logging events associated with a member of a +// Managed Blockchain network using the Hyperledger Fabric framework. +type MemberFabricLogPublishingConfiguration struct { + _ struct{} `type:"structure"` + + // Configuration properties for logging events associated with a member's Certificate + // Authority (CA). CA logs help you determine when a member in your account + // joins the network, or when new peers register with a member CA. + CaLogs *LogConfigurations `type:"structure"` +} + +// String returns the string representation +func (s MemberFabricLogPublishingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MemberFabricLogPublishingConfiguration) GoString() string { + return s.String() +} + +// SetCaLogs sets the CaLogs field's value. +func (s *MemberFabricLogPublishingConfiguration) SetCaLogs(v *LogConfigurations) *MemberFabricLogPublishingConfiguration { + s.CaLogs = v + return s +} + // Attributes relevant to a member for the blockchain framework that the Managed // Blockchain network uses. type MemberFrameworkAttributes struct { @@ -4565,6 +4855,32 @@ func (s *MemberFrameworkConfiguration) SetFabric(v *MemberFabricConfiguration) * return s } +// Configuration properties for logging events associated with a member of a +// Managed Blockchain network. +type MemberLogPublishingConfiguration struct { + _ struct{} `type:"structure"` + + // Configuration properties for logging events associated with a member of a + // Managed Blockchain network using the Hyperledger Fabric framework. + Fabric *MemberFabricLogPublishingConfiguration `type:"structure"` +} + +// String returns the string representation +func (s MemberLogPublishingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MemberLogPublishingConfiguration) GoString() string { + return s.String() +} + +// SetFabric sets the Fabric field's value. +func (s *MemberLogPublishingConfiguration) SetFabric(v *MemberFabricLogPublishingConfiguration) *MemberLogPublishingConfiguration { + s.Fabric = v + return s +} + // A summary of configuration properties for a member. type MemberSummary struct { _ struct{} `type:"structure"` @@ -4764,7 +5080,7 @@ type NetworkFabricAttributes struct { _ struct{} `type:"structure"` // The edition of Amazon Managed Blockchain that Hyperledger Fabric uses. For - // more information, see Amazon Managed Blockchain Pricing (https://aws.amazon.com/managed-blockchain/pricing/). + // more information, see Amazon Managed Blockchain Pricing (http://aws.amazon.com/managed-blockchain/pricing/). Edition *string `type:"string" enum:"Edition"` // The endpoint of the ordering service for the network. @@ -4798,7 +5114,7 @@ type NetworkFabricConfiguration struct { _ struct{} `type:"structure"` // The edition of Amazon Managed Blockchain that the network uses. For more - // information, see Amazon Managed Blockchain Pricing (https://aws.amazon.com/managed-blockchain/pricing/). + // information, see Amazon Managed Blockchain Pricing (http://aws.amazon.com/managed-blockchain/pricing/). // // Edition is a required field Edition *string `type:"string" required:"true" enum:"Edition"` @@ -4997,6 +5313,10 @@ type Node struct { // The instance type of the node. InstanceType *string `type:"string"` + // Configuration properties for logging events associated with a peer node owned + // by a member in a Managed Blockchain network. + LogPublishingConfiguration *NodeLogPublishingConfiguration `type:"structure"` + // The unique identifier of the member to which the node belongs. MemberId *string `min:"1" type:"string"` @@ -5047,6 +5367,12 @@ func (s *Node) SetInstanceType(v string) *Node { return s } +// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. +func (s *Node) SetLogPublishingConfiguration(v *NodeLogPublishingConfiguration) *Node { + s.LogPublishingConfiguration = v + return s +} + // SetMemberId sets the MemberId field's value. func (s *Node) SetMemberId(v string) *Node { s.MemberId = &v @@ -5078,6 +5404,10 @@ type NodeConfiguration struct { // // InstanceType is a required field InstanceType *string `type:"string" required:"true"` + + // Configuration properties for logging events associated with a peer node owned + // by a member in a Managed Blockchain network. + LogPublishingConfiguration *NodeLogPublishingConfiguration `type:"structure"` } // String returns the string representation @@ -5118,6 +5448,12 @@ func (s *NodeConfiguration) SetInstanceType(v string) *NodeConfiguration { return s } +// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. +func (s *NodeConfiguration) SetLogPublishingConfiguration(v *NodeLogPublishingConfiguration) *NodeConfiguration { + s.LogPublishingConfiguration = v + return s +} + // Attributes of Hyperledger Fabric for a peer node on a Managed Blockchain // network that uses Hyperledger Fabric. type NodeFabricAttributes struct { @@ -5153,6 +5489,47 @@ func (s *NodeFabricAttributes) SetPeerEventEndpoint(v string) *NodeFabricAttribu return s } +// Configuration properties for logging events associated with a peer node owned +// by a member in a Managed Blockchain network. +type NodeFabricLogPublishingConfiguration struct { + _ struct{} `type:"structure"` + + // Configuration properties for logging events associated with chaincode execution + // on a peer node. Chaincode logs contain the results of instantiating, invoking, + // and querying the chaincode. A peer can run multiple instances of chaincode. + // When enabled, a log stream is created for all chaincodes, with an individual + // log stream for each chaincode. + ChaincodeLogs *LogConfigurations `type:"structure"` + + // Configuration properties for a peer node log. Peer node logs contain messages + // generated when your client submits transaction proposals to peer nodes, requests + // to join channels, enrolls an admin peer, and lists the chaincode instances + // on a peer node. + PeerLogs *LogConfigurations `type:"structure"` +} + +// String returns the string representation +func (s NodeFabricLogPublishingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeFabricLogPublishingConfiguration) GoString() string { + return s.String() +} + +// SetChaincodeLogs sets the ChaincodeLogs field's value. +func (s *NodeFabricLogPublishingConfiguration) SetChaincodeLogs(v *LogConfigurations) *NodeFabricLogPublishingConfiguration { + s.ChaincodeLogs = v + return s +} + +// SetPeerLogs sets the PeerLogs field's value. +func (s *NodeFabricLogPublishingConfiguration) SetPeerLogs(v *LogConfigurations) *NodeFabricLogPublishingConfiguration { + s.PeerLogs = v + return s +} + // Attributes relevant to a peer node on a Managed Blockchain network for the // blockchain framework that the network uses. type NodeFrameworkAttributes struct { @@ -5179,6 +5556,33 @@ func (s *NodeFrameworkAttributes) SetFabric(v *NodeFabricAttributes) *NodeFramew return s } +// Configuration properties for logging events associated with a peer node owned +// by a member in a Managed Blockchain network. +type NodeLogPublishingConfiguration struct { + _ struct{} `type:"structure"` + + // Configuration properties for logging events associated with a node that is + // owned by a member of a Managed Blockchain network using the Hyperledger Fabric + // framework. + Fabric *NodeFabricLogPublishingConfiguration `type:"structure"` +} + +// String returns the string representation +func (s NodeLogPublishingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeLogPublishingConfiguration) GoString() string { + return s.String() +} + +// SetFabric sets the Fabric field's value. +func (s *NodeLogPublishingConfiguration) SetFabric(v *NodeFabricLogPublishingConfiguration) *NodeLogPublishingConfiguration { + s.Fabric = v + return s +} + // A summary of configuration properties for a peer node. type NodeSummary struct { _ struct{} `type:"structure"` @@ -5295,7 +5699,9 @@ type Proposal struct { // are not carried out. // // * ACTION_FAILED - One or more of the specified ProposalActions in a proposal - // that was approved could not be completed because of an error. + // that was approved could not be completed because of an error. The ACTION_FAILED + // status occurs even if only one ProposalAction fails and other actions + // are successful. Status *string `type:"string" enum:"ProposalStatus"` // The current total of YES votes cast on the proposal by members. @@ -5650,8 +6056,8 @@ func (s *RemoveAction) SetMemberId(v string) *RemoveAction { // A resource request is issued for a resource that already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5668,17 +6074,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5686,30 +6092,30 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of resources of that type already exist. Ensure the resources // requested are within the boundaries of the service edition and your account // limits. type ResourceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5726,17 +6132,17 @@ func (s ResourceLimitExceededException) GoString() string { func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceededException) Code() string { +func (s *ResourceLimitExceededException) Code() string { return "ResourceLimitExceededException" } // Message returns the exception's message. -func (s ResourceLimitExceededException) Message() string { +func (s *ResourceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5744,29 +6150,29 @@ func (s ResourceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceededException) OrigErr() error { +func (s *ResourceLimitExceededException) OrigErr() error { return nil } -func (s ResourceLimitExceededException) Error() string { +func (s *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A requested resource does not exist on the network. It may have been deleted // or referenced inaccurately. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5783,17 +6189,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5801,29 +6207,29 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource exists but is not in a status that can complete the // operation. type ResourceNotReadyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5840,17 +6246,17 @@ func (s ResourceNotReadyException) GoString() string { func newErrorResourceNotReadyException(v protocol.ResponseMetadata) error { return &ResourceNotReadyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotReadyException) Code() string { +func (s *ResourceNotReadyException) Code() string { return "ResourceNotReadyException" } // Message returns the exception's message. -func (s ResourceNotReadyException) Message() string { +func (s *ResourceNotReadyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5858,22 +6264,22 @@ func (s ResourceNotReadyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotReadyException) OrigErr() error { +func (s *ResourceNotReadyException) OrigErr() error { return nil } -func (s ResourceNotReadyException) Error() string { +func (s *ResourceNotReadyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotReadyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotReadyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotReadyException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotReadyException) RequestID() string { + return s.RespMetadata.RequestID } // The request or operation could not be performed because a service is throttling @@ -5881,8 +6287,8 @@ func (s ResourceNotReadyException) RequestID() string { // such that your service limit for EC2 instances is exceeded. Request a limit // increase or delete unused resources if possible. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5899,17 +6305,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5917,22 +6323,201 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +type UpdateMemberInput struct { + _ struct{} `type:"structure"` + + // Configuration properties for publishing to Amazon CloudWatch Logs. + LogPublishingConfiguration *MemberLogPublishingConfiguration `type:"structure"` + + // The unique ID of the member. + // + // MemberId is a required field + MemberId *string `location:"uri" locationName:"memberId" min:"1" type:"string" required:"true"` + + // The unique ID of the Managed Blockchain network to which the member belongs. + // + // NetworkId is a required field + NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateMemberInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateMemberInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateMemberInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateMemberInput"} + if s.MemberId == nil { + invalidParams.Add(request.NewErrParamRequired("MemberId")) + } + if s.MemberId != nil && len(*s.MemberId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) + } + if s.NetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkId")) + } + if s.NetworkId != nil && len(*s.NetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. +func (s *UpdateMemberInput) SetLogPublishingConfiguration(v *MemberLogPublishingConfiguration) *UpdateMemberInput { + s.LogPublishingConfiguration = v + return s +} + +// SetMemberId sets the MemberId field's value. +func (s *UpdateMemberInput) SetMemberId(v string) *UpdateMemberInput { + s.MemberId = &v + return s +} + +// SetNetworkId sets the NetworkId field's value. +func (s *UpdateMemberInput) SetNetworkId(v string) *UpdateMemberInput { + s.NetworkId = &v + return s +} + +type UpdateMemberOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateMemberOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateMemberOutput) GoString() string { + return s.String() +} + +type UpdateNodeInput struct { + _ struct{} `type:"structure"` + + // Configuration properties for publishing to Amazon CloudWatch Logs. + LogPublishingConfiguration *NodeLogPublishingConfiguration `type:"structure"` + + // The unique ID of the member that owns the node. + // + // MemberId is a required field + MemberId *string `location:"uri" locationName:"memberId" min:"1" type:"string" required:"true"` + + // The unique ID of the Managed Blockchain network to which the node belongs. + // + // NetworkId is a required field + NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` + + // The unique ID of the node. + // + // NodeId is a required field + NodeId *string `location:"uri" locationName:"nodeId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateNodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateNodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateNodeInput"} + if s.MemberId == nil { + invalidParams.Add(request.NewErrParamRequired("MemberId")) + } + if s.MemberId != nil && len(*s.MemberId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) + } + if s.NetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkId")) + } + if s.NetworkId != nil && len(*s.NetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) + } + if s.NodeId == nil { + invalidParams.Add(request.NewErrParamRequired("NodeId")) + } + if s.NodeId != nil && len(*s.NodeId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. +func (s *UpdateNodeInput) SetLogPublishingConfiguration(v *NodeLogPublishingConfiguration) *UpdateNodeInput { + s.LogPublishingConfiguration = v + return s +} + +// SetMemberId sets the MemberId field's value. +func (s *UpdateNodeInput) SetMemberId(v string) *UpdateNodeInput { + s.MemberId = &v + return s +} + +// SetNetworkId sets the NetworkId field's value. +func (s *UpdateNodeInput) SetNetworkId(v string) *UpdateNodeInput { + s.NetworkId = &v + return s +} + +// SetNodeId sets the NodeId field's value. +func (s *UpdateNodeInput) SetNodeId(v string) *UpdateNodeInput { + s.NodeId = &v + return s +} + +type UpdateNodeOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateNodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNodeOutput) GoString() string { + return s.String() } type VoteOnProposalInput struct { @@ -6162,6 +6747,9 @@ const ( // MemberStatusCreateFailed is a MemberStatus enum value MemberStatusCreateFailed = "CREATE_FAILED" + // MemberStatusUpdating is a MemberStatus enum value + MemberStatusUpdating = "UPDATING" + // MemberStatusDeleting is a MemberStatus enum value MemberStatusDeleting = "DELETING" @@ -6196,6 +6784,9 @@ const ( // NodeStatusCreateFailed is a NodeStatus enum value NodeStatusCreateFailed = "CREATE_FAILED" + // NodeStatusUpdating is a NodeStatus enum value + NodeStatusUpdating = "UPDATING" + // NodeStatusDeleting is a NodeStatus enum value NodeStatusDeleting = "DELETING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/marketplacecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/marketplacecatalog/api.go index 41c04b48ec8..5eeb3bc7b0c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/marketplacecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/marketplacecatalog/api.go @@ -693,8 +693,8 @@ func (c *MarketplaceCatalog) StartChangeSetWithContext(ctx aws.Context, input *S // Access is denied. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -711,17 +711,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -729,22 +729,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type CancelChangeSetInput struct { @@ -1554,8 +1554,8 @@ func (s *Filter) SetValueList(v []*string) *Filter { // There was an internal service exception. type InternalServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1572,17 +1572,17 @@ func (s InternalServiceException) GoString() string { func newErrorInternalServiceException(v protocol.ResponseMetadata) error { return &InternalServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceException) Code() string { +func (s *InternalServiceException) Code() string { return "InternalServiceException" } // Message returns the exception's message. -func (s InternalServiceException) Message() string { +func (s *InternalServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1590,22 +1590,22 @@ func (s InternalServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceException) OrigErr() error { +func (s *InternalServiceException) OrigErr() error { return nil } -func (s InternalServiceException) Error() string { +func (s *InternalServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceException) RequestID() string { + return s.RespMetadata.RequestID } type ListChangeSetsInput struct { @@ -1898,8 +1898,8 @@ func (s *ListEntitiesOutput) SetNextToken(v string) *ListEntitiesOutput { // The resource is currently in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1916,17 +1916,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1934,28 +1934,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource wasn't found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1972,17 +1972,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1990,28 +1990,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Currently, the specified resource is not supported. type ResourceNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2028,17 +2028,17 @@ func (s ResourceNotSupportedException) GoString() string { func newErrorResourceNotSupportedException(v protocol.ResponseMetadata) error { return &ResourceNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotSupportedException) Code() string { +func (s *ResourceNotSupportedException) Code() string { return "ResourceNotSupportedException" } // Message returns the exception's message. -func (s ResourceNotSupportedException) Message() string { +func (s *ResourceNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2046,28 +2046,28 @@ func (s ResourceNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotSupportedException) OrigErr() error { +func (s *ResourceNotSupportedException) OrigErr() error { return nil } -func (s ResourceNotSupportedException) Error() string { +func (s *ResourceNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of open requests per account has been exceeded. type ServiceQuotaExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2084,17 +2084,17 @@ func (s ServiceQuotaExceededException) GoString() string { func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { return &ServiceQuotaExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceQuotaExceededException) Code() string { +func (s *ServiceQuotaExceededException) Code() string { return "ServiceQuotaExceededException" } // Message returns the exception's message. -func (s ServiceQuotaExceededException) Message() string { +func (s *ServiceQuotaExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2102,22 +2102,22 @@ func (s ServiceQuotaExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceQuotaExceededException) OrigErr() error { +func (s *ServiceQuotaExceededException) OrigErr() error { return nil } -func (s ServiceQuotaExceededException) Error() string { +func (s *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceQuotaExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceQuotaExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID } // An object that contains two attributes, sortBy and sortOrder. @@ -2296,8 +2296,8 @@ func (s *StartChangeSetOutput) SetChangeSetId(v string) *StartChangeSetOutput { // Too many requests. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2314,17 +2314,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2332,28 +2332,28 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // An error occurred during validation. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2370,17 +2370,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2388,22 +2388,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go index b34602a9046..789b705c351 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go @@ -56,7 +56,7 @@ func (c *MediaConnect) AddFlowOutputsRequest(input *AddFlowOutputsInput) (req *r // AddFlowOutputs API operation for AWS MediaConnect. // -// Adds outputs to an existing flow. You can create up to 20 outputs per flow. +// Adds outputs to an existing flow. You can create up to 50 outputs per flow. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -123,6 +123,218 @@ func (c *MediaConnect) AddFlowOutputsWithContext(ctx aws.Context, input *AddFlow return out, req.Send() } +const opAddFlowSources = "AddFlowSources" + +// AddFlowSourcesRequest generates a "aws/request.Request" representing the +// client's request for the AddFlowSources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddFlowSources for more information on using the AddFlowSources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddFlowSourcesRequest method. +// req, resp := client.AddFlowSourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowSources +func (c *MediaConnect) AddFlowSourcesRequest(input *AddFlowSourcesInput) (req *request.Request, output *AddFlowSourcesOutput) { + op := &request.Operation{ + Name: opAddFlowSources, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/{flowArn}/source", + } + + if input == nil { + input = &AddFlowSourcesInput{} + } + + output = &AddFlowSourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddFlowSources API operation for AWS MediaConnect. +// +// Adds Sources to flow +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation AddFlowSources for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * InternalServerErrorException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ForbiddenException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * NotFoundException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ServiceUnavailableException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * TooManyRequestsException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowSources +func (c *MediaConnect) AddFlowSources(input *AddFlowSourcesInput) (*AddFlowSourcesOutput, error) { + req, out := c.AddFlowSourcesRequest(input) + return out, req.Send() +} + +// AddFlowSourcesWithContext is the same as AddFlowSources with the addition of +// the ability to pass a context and additional request options. +// +// See AddFlowSources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) AddFlowSourcesWithContext(ctx aws.Context, input *AddFlowSourcesInput, opts ...request.Option) (*AddFlowSourcesOutput, error) { + req, out := c.AddFlowSourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddFlowVpcInterfaces = "AddFlowVpcInterfaces" + +// AddFlowVpcInterfacesRequest generates a "aws/request.Request" representing the +// client's request for the AddFlowVpcInterfaces operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddFlowVpcInterfaces for more information on using the AddFlowVpcInterfaces +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddFlowVpcInterfacesRequest method. +// req, resp := client.AddFlowVpcInterfacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowVpcInterfaces +func (c *MediaConnect) AddFlowVpcInterfacesRequest(input *AddFlowVpcInterfacesInput) (req *request.Request, output *AddFlowVpcInterfacesOutput) { + op := &request.Operation{ + Name: opAddFlowVpcInterfaces, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/{flowArn}/vpcInterfaces", + } + + if input == nil { + input = &AddFlowVpcInterfacesInput{} + } + + output = &AddFlowVpcInterfacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddFlowVpcInterfaces API operation for AWS MediaConnect. +// +// Adds VPC interfaces to flow +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation AddFlowVpcInterfaces for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * InternalServerErrorException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ForbiddenException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * NotFoundException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ServiceUnavailableException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * TooManyRequestsException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowVpcInterfaces +func (c *MediaConnect) AddFlowVpcInterfaces(input *AddFlowVpcInterfacesInput) (*AddFlowVpcInterfacesOutput, error) { + req, out := c.AddFlowVpcInterfacesRequest(input) + return out, req.Send() +} + +// AddFlowVpcInterfacesWithContext is the same as AddFlowVpcInterfaces with the addition of +// the ability to pass a context and additional request options. +// +// See AddFlowVpcInterfaces for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) AddFlowVpcInterfacesWithContext(ctx aws.Context, input *AddFlowVpcInterfacesInput, opts ...request.Option) (*AddFlowVpcInterfacesOutput, error) { + req, out := c.AddFlowVpcInterfacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateFlow = "CreateFlow" // CreateFlowRequest generates a "aws/request.Request" representing the @@ -168,7 +380,7 @@ func (c *MediaConnect) CreateFlowRequest(input *CreateFlowInput) (req *request.R // CreateFlow API operation for AWS MediaConnect. // // Creates a new flow. The request must include one source. The request optionally -// can include outputs (up to 20) and entitlements (up to 50). +// can include outputs (up to 50) and entitlements (up to 50). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1066,59 +1278,59 @@ func (c *MediaConnect) RemoveFlowOutputWithContext(ctx aws.Context, input *Remov return out, req.Send() } -const opRevokeFlowEntitlement = "RevokeFlowEntitlement" +const opRemoveFlowSource = "RemoveFlowSource" -// RevokeFlowEntitlementRequest generates a "aws/request.Request" representing the -// client's request for the RevokeFlowEntitlement operation. The "output" return +// RemoveFlowSourceRequest generates a "aws/request.Request" representing the +// client's request for the RemoveFlowSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RevokeFlowEntitlement for more information on using the RevokeFlowEntitlement +// See RemoveFlowSource for more information on using the RemoveFlowSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RevokeFlowEntitlementRequest method. -// req, resp := client.RevokeFlowEntitlementRequest(params) +// // Example sending a request using the RemoveFlowSourceRequest method. +// req, resp := client.RemoveFlowSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement -func (c *MediaConnect) RevokeFlowEntitlementRequest(input *RevokeFlowEntitlementInput) (req *request.Request, output *RevokeFlowEntitlementOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowSource +func (c *MediaConnect) RemoveFlowSourceRequest(input *RemoveFlowSourceInput) (req *request.Request, output *RemoveFlowSourceOutput) { op := &request.Operation{ - Name: opRevokeFlowEntitlement, + Name: opRemoveFlowSource, HTTPMethod: "DELETE", - HTTPPath: "/v1/flows/{flowArn}/entitlements/{entitlementArn}", + HTTPPath: "/v1/flows/{flowArn}/source/{sourceArn}", } if input == nil { - input = &RevokeFlowEntitlementInput{} + input = &RemoveFlowSourceInput{} } - output = &RevokeFlowEntitlementOutput{} + output = &RemoveFlowSourceOutput{} req = c.newRequest(op, input, output) return } -// RevokeFlowEntitlement API operation for AWS MediaConnect. +// RemoveFlowSource API operation for AWS MediaConnect. // -// Revokes an entitlement from a flow. Once an entitlement is revoked, the content -// becomes unavailable to the subscriber and the associated output is removed. +// Removes a source from an existing flow. This request can be made only if +// there is more than one source on the flow. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS MediaConnect's -// API operation RevokeFlowEntitlement for usage and error information. +// API operation RemoveFlowSource for usage and error information. // // Returned Error Types: // * BadRequestException @@ -1151,80 +1363,83 @@ func (c *MediaConnect) RevokeFlowEntitlementRequest(input *RevokeFlowEntitlement // documentation for the operation for more information on the cause of this // exception. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement -func (c *MediaConnect) RevokeFlowEntitlement(input *RevokeFlowEntitlementInput) (*RevokeFlowEntitlementOutput, error) { - req, out := c.RevokeFlowEntitlementRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowSource +func (c *MediaConnect) RemoveFlowSource(input *RemoveFlowSourceInput) (*RemoveFlowSourceOutput, error) { + req, out := c.RemoveFlowSourceRequest(input) return out, req.Send() } -// RevokeFlowEntitlementWithContext is the same as RevokeFlowEntitlement with the addition of +// RemoveFlowSourceWithContext is the same as RemoveFlowSource with the addition of // the ability to pass a context and additional request options. // -// See RevokeFlowEntitlement for details on how to use this API operation. +// See RemoveFlowSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *MediaConnect) RevokeFlowEntitlementWithContext(ctx aws.Context, input *RevokeFlowEntitlementInput, opts ...request.Option) (*RevokeFlowEntitlementOutput, error) { - req, out := c.RevokeFlowEntitlementRequest(input) +func (c *MediaConnect) RemoveFlowSourceWithContext(ctx aws.Context, input *RemoveFlowSourceInput, opts ...request.Option) (*RemoveFlowSourceOutput, error) { + req, out := c.RemoveFlowSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartFlow = "StartFlow" +const opRemoveFlowVpcInterface = "RemoveFlowVpcInterface" -// StartFlowRequest generates a "aws/request.Request" representing the -// client's request for the StartFlow operation. The "output" return +// RemoveFlowVpcInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the RemoveFlowVpcInterface operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartFlow for more information on using the StartFlow +// See RemoveFlowVpcInterface for more information on using the RemoveFlowVpcInterface // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartFlowRequest method. -// req, resp := client.StartFlowRequest(params) +// // Example sending a request using the RemoveFlowVpcInterfaceRequest method. +// req, resp := client.RemoveFlowVpcInterfaceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow -func (c *MediaConnect) StartFlowRequest(input *StartFlowInput) (req *request.Request, output *StartFlowOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowVpcInterface +func (c *MediaConnect) RemoveFlowVpcInterfaceRequest(input *RemoveFlowVpcInterfaceInput) (req *request.Request, output *RemoveFlowVpcInterfaceOutput) { op := &request.Operation{ - Name: opStartFlow, - HTTPMethod: "POST", - HTTPPath: "/v1/flows/start/{flowArn}", + Name: opRemoveFlowVpcInterface, + HTTPMethod: "DELETE", + HTTPPath: "/v1/flows/{flowArn}/vpcInterfaces/{vpcInterfaceName}", } if input == nil { - input = &StartFlowInput{} + input = &RemoveFlowVpcInterfaceInput{} } - output = &StartFlowOutput{} + output = &RemoveFlowVpcInterfaceOutput{} req = c.newRequest(op, input, output) return } -// StartFlow API operation for AWS MediaConnect. +// RemoveFlowVpcInterface API operation for AWS MediaConnect. // -// Starts a flow. +// Removes a VPC Interface from an existing flow. This request can be made only +// on a VPC interface that does not have a Source or Output associated with +// it. If the VPC interface is referenced by a Source or Output, you must first +// delete or update the Source or Output to no longer reference the VPC interface. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS MediaConnect's -// API operation StartFlow for usage and error information. +// API operation RemoveFlowVpcInterface for usage and error information. // // Returned Error Types: // * BadRequestException @@ -1257,80 +1472,81 @@ func (c *MediaConnect) StartFlowRequest(input *StartFlowInput) (req *request.Req // documentation for the operation for more information on the cause of this // exception. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow -func (c *MediaConnect) StartFlow(input *StartFlowInput) (*StartFlowOutput, error) { - req, out := c.StartFlowRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowVpcInterface +func (c *MediaConnect) RemoveFlowVpcInterface(input *RemoveFlowVpcInterfaceInput) (*RemoveFlowVpcInterfaceOutput, error) { + req, out := c.RemoveFlowVpcInterfaceRequest(input) return out, req.Send() } -// StartFlowWithContext is the same as StartFlow with the addition of +// RemoveFlowVpcInterfaceWithContext is the same as RemoveFlowVpcInterface with the addition of // the ability to pass a context and additional request options. // -// See StartFlow for details on how to use this API operation. +// See RemoveFlowVpcInterface for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *MediaConnect) StartFlowWithContext(ctx aws.Context, input *StartFlowInput, opts ...request.Option) (*StartFlowOutput, error) { - req, out := c.StartFlowRequest(input) +func (c *MediaConnect) RemoveFlowVpcInterfaceWithContext(ctx aws.Context, input *RemoveFlowVpcInterfaceInput, opts ...request.Option) (*RemoveFlowVpcInterfaceOutput, error) { + req, out := c.RemoveFlowVpcInterfaceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopFlow = "StopFlow" +const opRevokeFlowEntitlement = "RevokeFlowEntitlement" -// StopFlowRequest generates a "aws/request.Request" representing the -// client's request for the StopFlow operation. The "output" return +// RevokeFlowEntitlementRequest generates a "aws/request.Request" representing the +// client's request for the RevokeFlowEntitlement operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopFlow for more information on using the StopFlow +// See RevokeFlowEntitlement for more information on using the RevokeFlowEntitlement // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopFlowRequest method. -// req, resp := client.StopFlowRequest(params) +// // Example sending a request using the RevokeFlowEntitlementRequest method. +// req, resp := client.RevokeFlowEntitlementRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow -func (c *MediaConnect) StopFlowRequest(input *StopFlowInput) (req *request.Request, output *StopFlowOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement +func (c *MediaConnect) RevokeFlowEntitlementRequest(input *RevokeFlowEntitlementInput) (req *request.Request, output *RevokeFlowEntitlementOutput) { op := &request.Operation{ - Name: opStopFlow, - HTTPMethod: "POST", - HTTPPath: "/v1/flows/stop/{flowArn}", + Name: opRevokeFlowEntitlement, + HTTPMethod: "DELETE", + HTTPPath: "/v1/flows/{flowArn}/entitlements/{entitlementArn}", } if input == nil { - input = &StopFlowInput{} + input = &RevokeFlowEntitlementInput{} } - output = &StopFlowOutput{} + output = &RevokeFlowEntitlementOutput{} req = c.newRequest(op, input, output) return } -// StopFlow API operation for AWS MediaConnect. +// RevokeFlowEntitlement API operation for AWS MediaConnect. // -// Stops a flow. +// Revokes an entitlement from a flow. Once an entitlement is revoked, the content +// becomes unavailable to the subscriber and the associated output is removed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS MediaConnect's -// API operation StopFlow for usage and error information. +// API operation RevokeFlowEntitlement for usage and error information. // // Returned Error Types: // * BadRequestException @@ -1363,13 +1579,225 @@ func (c *MediaConnect) StopFlowRequest(input *StopFlowInput) (req *request.Reque // documentation for the operation for more information on the cause of this // exception. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow -func (c *MediaConnect) StopFlow(input *StopFlowInput) (*StopFlowOutput, error) { - req, out := c.StopFlowRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement +func (c *MediaConnect) RevokeFlowEntitlement(input *RevokeFlowEntitlementInput) (*RevokeFlowEntitlementOutput, error) { + req, out := c.RevokeFlowEntitlementRequest(input) return out, req.Send() } -// StopFlowWithContext is the same as StopFlow with the addition of +// RevokeFlowEntitlementWithContext is the same as RevokeFlowEntitlement with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeFlowEntitlement for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) RevokeFlowEntitlementWithContext(ctx aws.Context, input *RevokeFlowEntitlementInput, opts ...request.Option) (*RevokeFlowEntitlementOutput, error) { + req, out := c.RevokeFlowEntitlementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartFlow = "StartFlow" + +// StartFlowRequest generates a "aws/request.Request" representing the +// client's request for the StartFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartFlow for more information on using the StartFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartFlowRequest method. +// req, resp := client.StartFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow +func (c *MediaConnect) StartFlowRequest(input *StartFlowInput) (req *request.Request, output *StartFlowOutput) { + op := &request.Operation{ + Name: opStartFlow, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/start/{flowArn}", + } + + if input == nil { + input = &StartFlowInput{} + } + + output = &StartFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartFlow API operation for AWS MediaConnect. +// +// Starts a flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation StartFlow for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * InternalServerErrorException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ForbiddenException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * NotFoundException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ServiceUnavailableException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * TooManyRequestsException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow +func (c *MediaConnect) StartFlow(input *StartFlowInput) (*StartFlowOutput, error) { + req, out := c.StartFlowRequest(input) + return out, req.Send() +} + +// StartFlowWithContext is the same as StartFlow with the addition of +// the ability to pass a context and additional request options. +// +// See StartFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) StartFlowWithContext(ctx aws.Context, input *StartFlowInput, opts ...request.Option) (*StartFlowOutput, error) { + req, out := c.StartFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopFlow = "StopFlow" + +// StopFlowRequest generates a "aws/request.Request" representing the +// client's request for the StopFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopFlow for more information on using the StopFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopFlowRequest method. +// req, resp := client.StopFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow +func (c *MediaConnect) StopFlowRequest(input *StopFlowInput) (req *request.Request, output *StopFlowOutput) { + op := &request.Operation{ + Name: opStopFlow, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/stop/{flowArn}", + } + + if input == nil { + input = &StopFlowInput{} + } + + output = &StopFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopFlow API operation for AWS MediaConnect. +// +// Stops a flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation StopFlow for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * InternalServerErrorException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ForbiddenException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * NotFoundException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ServiceUnavailableException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * TooManyRequestsException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow +func (c *MediaConnect) StopFlow(input *StopFlowInput) (*StopFlowOutput, error) { + req, out := c.StopFlowRequest(input) + return out, req.Send() +} + +// StopFlowWithContext is the same as StopFlow with the addition of // the ability to pass a context and additional request options. // // See StopFlow for details on how to use this API operation. @@ -1572,6 +2000,112 @@ func (c *MediaConnect) UntagResourceWithContext(ctx aws.Context, input *UntagRes return out, req.Send() } +const opUpdateFlow = "UpdateFlow" + +// UpdateFlowRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFlow for more information on using the UpdateFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFlowRequest method. +// req, resp := client.UpdateFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlow +func (c *MediaConnect) UpdateFlowRequest(input *UpdateFlowInput) (req *request.Request, output *UpdateFlowOutput) { + op := &request.Operation{ + Name: opUpdateFlow, + HTTPMethod: "PUT", + HTTPPath: "/v1/flows/{flowArn}", + } + + if input == nil { + input = &UpdateFlowInput{} + } + + output = &UpdateFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFlow API operation for AWS MediaConnect. +// +// Updates flow +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation UpdateFlow for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * InternalServerErrorException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ForbiddenException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * NotFoundException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ServiceUnavailableException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * TooManyRequestsException +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlow +func (c *MediaConnect) UpdateFlow(input *UpdateFlowInput) (*UpdateFlowOutput, error) { + req, out := c.UpdateFlowRequest(input) + return out, req.Send() +} + +// UpdateFlowWithContext is the same as UpdateFlow with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) UpdateFlowWithContext(ctx aws.Context, input *UpdateFlowInput, opts ...request.Option) (*UpdateFlowOutput, error) { + req, out := c.UpdateFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateFlowEntitlement = "UpdateFlowEntitlement" // UpdateFlowEntitlementRequest generates a "aws/request.Request" representing the @@ -1896,8 +2430,8 @@ func (c *MediaConnect) UpdateFlowSourceWithContext(ctx aws.Context, input *Updat // documentation for the operation for more information on the cause of this // exception. type AddFlowOutputs420Exception struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1914,17 +2448,17 @@ func (s AddFlowOutputs420Exception) GoString() string { func newErrorAddFlowOutputs420Exception(v protocol.ResponseMetadata) error { return &AddFlowOutputs420Exception{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AddFlowOutputs420Exception) Code() string { +func (s *AddFlowOutputs420Exception) Code() string { return "AddFlowOutputs420Exception" } // Message returns the exception's message. -func (s AddFlowOutputs420Exception) Message() string { +func (s *AddFlowOutputs420Exception) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1932,66 +2466,262 @@ func (s AddFlowOutputs420Exception) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AddFlowOutputs420Exception) OrigErr() error { +func (s *AddFlowOutputs420Exception) OrigErr() error { return nil } -func (s AddFlowOutputs420Exception) Error() string { +func (s *AddFlowOutputs420Exception) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AddFlowOutputs420Exception) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AddFlowOutputs420Exception) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AddFlowOutputs420Exception) RequestID() string { + return s.RespMetadata.RequestID +} + +// Adds outputs to an existing flow. You can create up to 50 outputs per flow. +type AddFlowOutputsInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // A list of outputs that you want to add. + // + // Outputs is a required field + Outputs []*AddOutputRequest `locationName:"outputs" type:"list" required:"true"` +} + +// String returns the string representation +func (s AddFlowOutputsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddFlowOutputsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddFlowOutputsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddFlowOutputsInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.Outputs == nil { + invalidParams.Add(request.NewErrParamRequired("Outputs")) + } + if s.Outputs != nil { + for i, v := range s.Outputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *AddFlowOutputsInput) SetFlowArn(v string) *AddFlowOutputsInput { + s.FlowArn = &v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *AddFlowOutputsInput) SetOutputs(v []*AddOutputRequest) *AddFlowOutputsInput { + s.Outputs = v + return s +} + +// The result of a successful AddOutput request. The response includes the details +// of the newly added outputs. +type AddFlowOutputsOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that these outputs were added to. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The details of the newly added outputs. + Outputs []*Output `locationName:"outputs" type:"list"` +} + +// String returns the string representation +func (s AddFlowOutputsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddFlowOutputsOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *AddFlowOutputsOutput) SetFlowArn(v string) *AddFlowOutputsOutput { + s.FlowArn = &v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *AddFlowOutputsOutput) SetOutputs(v []*Output) *AddFlowOutputsOutput { + s.Outputs = v + return s +} + +// Adds sources to an existing flow. +type AddFlowSourcesInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // A list of sources that you want to add. + // + // Sources is a required field + Sources []*SetSourceRequest `locationName:"sources" type:"list" required:"true"` +} + +// String returns the string representation +func (s AddFlowSourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddFlowSourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddFlowSourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddFlowSourcesInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.Sources == nil { + invalidParams.Add(request.NewErrParamRequired("Sources")) + } + if s.Sources != nil { + for i, v := range s.Sources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *AddFlowSourcesInput) SetFlowArn(v string) *AddFlowSourcesInput { + s.FlowArn = &v + return s +} + +// SetSources sets the Sources field's value. +func (s *AddFlowSourcesInput) SetSources(v []*SetSourceRequest) *AddFlowSourcesInput { + s.Sources = v + return s +} + +// The result of a successful AddFlowSources request. The response includes +// the details of the newly added sources. +type AddFlowSourcesOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that these sources were added to. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The details of the newly added sources. + Sources []*Source `locationName:"sources" type:"list"` +} + +// String returns the string representation +func (s AddFlowSourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddFlowSourcesOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *AddFlowSourcesOutput) SetFlowArn(v string) *AddFlowSourcesOutput { + s.FlowArn = &v + return s } -// RequestID returns the service's response RequestID for request. -func (s AddFlowOutputs420Exception) RequestID() string { - return s.respMetadata.RequestID +// SetSources sets the Sources field's value. +func (s *AddFlowSourcesOutput) SetSources(v []*Source) *AddFlowSourcesOutput { + s.Sources = v + return s } -// Adds outputs to an existing flow. You can create up to 20 outputs per flow. -type AddFlowOutputsInput struct { +// Adds VPC interfaces to an existing flow. +type AddFlowVpcInterfacesInput struct { _ struct{} `type:"structure"` // FlowArn is a required field FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - // A list of outputs that you want to add. + // A list of VPC interfaces that you want to add. // - // Outputs is a required field - Outputs []*AddOutputRequest `locationName:"outputs" type:"list" required:"true"` + // VpcInterfaces is a required field + VpcInterfaces []*VpcInterfaceRequest `locationName:"vpcInterfaces" type:"list" required:"true"` } // String returns the string representation -func (s AddFlowOutputsInput) String() string { +func (s AddFlowVpcInterfacesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AddFlowOutputsInput) GoString() string { +func (s AddFlowVpcInterfacesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AddFlowOutputsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddFlowOutputsInput"} +func (s *AddFlowVpcInterfacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddFlowVpcInterfacesInput"} if s.FlowArn == nil { invalidParams.Add(request.NewErrParamRequired("FlowArn")) } if s.FlowArn != nil && len(*s.FlowArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) } - if s.Outputs == nil { - invalidParams.Add(request.NewErrParamRequired("Outputs")) + if s.VpcInterfaces == nil { + invalidParams.Add(request.NewErrParamRequired("VpcInterfaces")) } - if s.Outputs != nil { - for i, v := range s.Outputs { + if s.VpcInterfaces != nil { + for i, v := range s.VpcInterfaces { if v == nil { continue } if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VpcInterfaces", i), err.(request.ErrInvalidParams)) } } } @@ -2003,48 +2733,48 @@ func (s *AddFlowOutputsInput) Validate() error { } // SetFlowArn sets the FlowArn field's value. -func (s *AddFlowOutputsInput) SetFlowArn(v string) *AddFlowOutputsInput { +func (s *AddFlowVpcInterfacesInput) SetFlowArn(v string) *AddFlowVpcInterfacesInput { s.FlowArn = &v return s } -// SetOutputs sets the Outputs field's value. -func (s *AddFlowOutputsInput) SetOutputs(v []*AddOutputRequest) *AddFlowOutputsInput { - s.Outputs = v +// SetVpcInterfaces sets the VpcInterfaces field's value. +func (s *AddFlowVpcInterfacesInput) SetVpcInterfaces(v []*VpcInterfaceRequest) *AddFlowVpcInterfacesInput { + s.VpcInterfaces = v return s } -// The result of a successful AddOutput request. The response includes the details -// of the newly added outputs. -type AddFlowOutputsOutput struct { +// The result of a successful AddFlowVpcInterfaces request. The response includes +// the details of the newly added VPC interfaces. +type AddFlowVpcInterfacesOutput struct { _ struct{} `type:"structure"` - // The ARN of the flow that these outputs were added to. + // The ARN of the flow that these VPC interfaces were added to. FlowArn *string `locationName:"flowArn" type:"string"` - // The details of the newly added outputs. - Outputs []*Output `locationName:"outputs" type:"list"` + // The details of the newly added VPC interfaces. + VpcInterfaces []*VpcInterface `locationName:"vpcInterfaces" type:"list"` } // String returns the string representation -func (s AddFlowOutputsOutput) String() string { +func (s AddFlowVpcInterfacesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AddFlowOutputsOutput) GoString() string { +func (s AddFlowVpcInterfacesOutput) GoString() string { return s.String() } // SetFlowArn sets the FlowArn field's value. -func (s *AddFlowOutputsOutput) SetFlowArn(v string) *AddFlowOutputsOutput { +func (s *AddFlowVpcInterfacesOutput) SetFlowArn(v string) *AddFlowVpcInterfacesOutput { s.FlowArn = &v return s } -// SetOutputs sets the Outputs field's value. -func (s *AddFlowOutputsOutput) SetOutputs(v []*Output) *AddFlowOutputsOutput { - s.Outputs = v +// SetVpcInterfaces sets the VpcInterfaces field's value. +func (s *AddFlowVpcInterfacesOutput) SetVpcInterfaces(v []*VpcInterface) *AddFlowVpcInterfacesOutput { + s.VpcInterfaces = v return s } @@ -2091,6 +2821,9 @@ type AddOutputRequest struct { // The stream ID that you want to use for this transport. This parameter applies // only to Zixi-based streams. StreamId *string `locationName:"streamId" type:"string"` + + // The name of the VPC interface attachment to use for this output. + VpcInterfaceAttachment *VpcInterfaceAttachment `locationName:"vpcInterfaceAttachment" type:"structure"` } // String returns the string representation @@ -2187,12 +2920,18 @@ func (s *AddOutputRequest) SetStreamId(v string) *AddOutputRequest { return s } +// SetVpcInterfaceAttachment sets the VpcInterfaceAttachment field's value. +func (s *AddOutputRequest) SetVpcInterfaceAttachment(v *VpcInterfaceAttachment) *AddOutputRequest { + s.VpcInterfaceAttachment = v + return s +} + // Exception raised by AWS Elemental MediaConnect. See the error message and // documentation for the operation for more information on the cause of this // exception. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2209,17 +2948,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2227,30 +2966,30 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Exception raised by AWS Elemental MediaConnect. See the error message and // documentation for the operation for more information on the cause of this // exception. type CreateFlow420Exception struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2267,17 +3006,17 @@ func (s CreateFlow420Exception) GoString() string { func newErrorCreateFlow420Exception(v protocol.ResponseMetadata) error { return &CreateFlow420Exception{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CreateFlow420Exception) Code() string { +func (s *CreateFlow420Exception) Code() string { return "CreateFlow420Exception" } // Message returns the exception's message. -func (s CreateFlow420Exception) Message() string { +func (s *CreateFlow420Exception) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2285,26 +3024,26 @@ func (s CreateFlow420Exception) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CreateFlow420Exception) OrigErr() error { +func (s *CreateFlow420Exception) OrigErr() error { return nil } -func (s CreateFlow420Exception) Error() string { +func (s *CreateFlow420Exception) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CreateFlow420Exception) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CreateFlow420Exception) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CreateFlow420Exception) RequestID() string { - return s.respMetadata.RequestID +func (s *CreateFlow420Exception) RequestID() string { + return s.RespMetadata.RequestID } // Creates a new flow. The request must include one source. The request optionally -// can include outputs (up to 20) and one entitlement. +// can include outputs (up to 50) and one entitlement. type CreateFlowInput struct { _ struct{} `type:"structure"` @@ -2324,9 +3063,15 @@ type CreateFlowInput struct { Outputs []*AddOutputRequest `locationName:"outputs" type:"list"` // The settings for the source of the flow. - // - // Source is a required field - Source *SetSourceRequest `locationName:"source" type:"structure" required:"true"` + Source *SetSourceRequest `locationName:"source" type:"structure"` + + // The settings for source failover + SourceFailoverConfig *FailoverConfig `locationName:"sourceFailoverConfig" type:"structure"` + + Sources []*SetSourceRequest `locationName:"sources" type:"list"` + + // The VPC interfaces you want on the flow. + VpcInterfaces []*VpcInterfaceRequest `locationName:"vpcInterfaces" type:"list"` } // String returns the string representation @@ -2345,9 +3090,6 @@ func (s *CreateFlowInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.Source == nil { - invalidParams.Add(request.NewErrParamRequired("Source")) - } if s.Entitlements != nil { for i, v := range s.Entitlements { if v == nil { @@ -2373,6 +3115,26 @@ func (s *CreateFlowInput) Validate() error { invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) } } + if s.Sources != nil { + for i, v := range s.Sources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Sources", i), err.(request.ErrInvalidParams)) + } + } + } + if s.VpcInterfaces != nil { + for i, v := range s.VpcInterfaces { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VpcInterfaces", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2410,6 +3172,24 @@ func (s *CreateFlowInput) SetSource(v *SetSourceRequest) *CreateFlowInput { return s } +// SetSourceFailoverConfig sets the SourceFailoverConfig field's value. +func (s *CreateFlowInput) SetSourceFailoverConfig(v *FailoverConfig) *CreateFlowInput { + s.SourceFailoverConfig = v + return s +} + +// SetSources sets the Sources field's value. +func (s *CreateFlowInput) SetSources(v []*SetSourceRequest) *CreateFlowInput { + s.Sources = v + return s +} + +// SetVpcInterfaces sets the VpcInterfaces field's value. +func (s *CreateFlowInput) SetVpcInterfaces(v []*VpcInterfaceRequest) *CreateFlowInput { + s.VpcInterfaces = v + return s +} + // The result of a successful CreateFlow request. type CreateFlowOutput struct { _ struct{} `type:"structure"` @@ -2787,6 +3567,38 @@ func (s *Entitlement) SetSubscribers(v []*string) *Entitlement { return s } +// The settings for source failover +type FailoverConfig struct { + _ struct{} `type:"structure"` + + // Search window time to look for dash-7 packets + RecoveryWindow *int64 `locationName:"recoveryWindow" type:"integer"` + + State *string `locationName:"state" type:"string" enum:"State"` +} + +// String returns the string representation +func (s FailoverConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailoverConfig) GoString() string { + return s.String() +} + +// SetRecoveryWindow sets the RecoveryWindow field's value. +func (s *FailoverConfig) SetRecoveryWindow(v int64) *FailoverConfig { + s.RecoveryWindow = &v + return s +} + +// SetState sets the State field's value. +func (s *FailoverConfig) SetState(v string) *FailoverConfig { + s.State = &v + return s +} + // The settings for a flow, including its source, outputs, and entitlements. type Flow struct { _ struct{} `type:"structure"` @@ -2830,10 +3642,18 @@ type Flow struct { // Source is a required field Source *Source `locationName:"source" type:"structure" required:"true"` + // The settings for source failover + SourceFailoverConfig *FailoverConfig `locationName:"sourceFailoverConfig" type:"structure"` + + Sources []*Source `locationName:"sources" type:"list"` + // The current status of the flow. // // Status is a required field Status *string `locationName:"status" type:"string" required:"true" enum:"Status"` + + // The VPC Interfaces for this flow. + VpcInterfaces []*VpcInterface `locationName:"vpcInterfaces" type:"list"` } // String returns the string representation @@ -2894,18 +3714,36 @@ func (s *Flow) SetSource(v *Source) *Flow { return s } +// SetSourceFailoverConfig sets the SourceFailoverConfig field's value. +func (s *Flow) SetSourceFailoverConfig(v *FailoverConfig) *Flow { + s.SourceFailoverConfig = v + return s +} + +// SetSources sets the Sources field's value. +func (s *Flow) SetSources(v []*Source) *Flow { + s.Sources = v + return s +} + // SetStatus sets the Status field's value. func (s *Flow) SetStatus(v string) *Flow { s.Status = &v return s } +// SetVpcInterfaces sets the VpcInterfaces field's value. +func (s *Flow) SetVpcInterfaces(v []*VpcInterface) *Flow { + s.VpcInterfaces = v + return s +} + // Exception raised by AWS Elemental MediaConnect. See the error message and // documentation for the operation for more information on the cause of this // exception. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2922,17 +3760,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2940,22 +3778,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // The entitlements that you want to grant on a flow. @@ -3048,8 +3886,8 @@ func (s *GrantEntitlementRequest) SetSubscribers(v []*string) *GrantEntitlementR // documentation for the operation for more information on the cause of this // exception. type GrantFlowEntitlements420Exception struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3066,17 +3904,17 @@ func (s GrantFlowEntitlements420Exception) GoString() string { func newErrorGrantFlowEntitlements420Exception(v protocol.ResponseMetadata) error { return &GrantFlowEntitlements420Exception{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GrantFlowEntitlements420Exception) Code() string { +func (s *GrantFlowEntitlements420Exception) Code() string { return "GrantFlowEntitlements420Exception" } // Message returns the exception's message. -func (s GrantFlowEntitlements420Exception) Message() string { +func (s *GrantFlowEntitlements420Exception) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3084,22 +3922,22 @@ func (s GrantFlowEntitlements420Exception) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GrantFlowEntitlements420Exception) OrigErr() error { +func (s *GrantFlowEntitlements420Exception) OrigErr() error { return nil } -func (s GrantFlowEntitlements420Exception) Error() string { +func (s *GrantFlowEntitlements420Exception) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GrantFlowEntitlements420Exception) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GrantFlowEntitlements420Exception) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GrantFlowEntitlements420Exception) RequestID() string { - return s.respMetadata.RequestID +func (s *GrantFlowEntitlements420Exception) RequestID() string { + return s.RespMetadata.RequestID } // Grants an entitlement on a flow. @@ -3203,8 +4041,8 @@ func (s *GrantFlowEntitlementsOutput) SetFlowArn(v string) *GrantFlowEntitlement // documentation for the operation for more information on the cause of this // exception. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3221,17 +4059,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3239,22 +4077,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ListEntitlementsInput struct { @@ -3645,8 +4483,8 @@ func (s *Messages) SetErrors(v []*string) *Messages { // documentation for the operation for more information on the cause of this // exception. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3663,17 +4501,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3681,22 +4519,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The settings for an output. @@ -3739,6 +4577,9 @@ type Output struct { // Attributes related to the transport stream that are used in the output. Transport *Transport `locationName:"transport" type:"structure"` + + // The name of the VPC interface attachment to use for this output. + VpcInterfaceAttachment *VpcInterfaceAttachment `locationName:"vpcInterfaceAttachment" type:"structure"` } // String returns the string representation @@ -3799,52 +4640,234 @@ func (s *Output) SetOutputArn(v string) *Output { return s } -// SetPort sets the Port field's value. -func (s *Output) SetPort(v int64) *Output { - s.Port = &v +// SetPort sets the Port field's value. +func (s *Output) SetPort(v int64) *Output { + s.Port = &v + return s +} + +// SetTransport sets the Transport field's value. +func (s *Output) SetTransport(v *Transport) *Output { + s.Transport = v + return s +} + +// SetVpcInterfaceAttachment sets the VpcInterfaceAttachment field's value. +func (s *Output) SetVpcInterfaceAttachment(v *VpcInterfaceAttachment) *Output { + s.VpcInterfaceAttachment = v + return s +} + +type RemoveFlowOutputInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // OutputArn is a required field + OutputArn *string `location:"uri" locationName:"outputArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveFlowOutputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFlowOutputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveFlowOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveFlowOutputInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.OutputArn == nil { + invalidParams.Add(request.NewErrParamRequired("OutputArn")) + } + if s.OutputArn != nil && len(*s.OutputArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OutputArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RemoveFlowOutputInput) SetFlowArn(v string) *RemoveFlowOutputInput { + s.FlowArn = &v + return s +} + +// SetOutputArn sets the OutputArn field's value. +func (s *RemoveFlowOutputInput) SetOutputArn(v string) *RemoveFlowOutputInput { + s.OutputArn = &v + return s +} + +// The result of a successful RemoveFlowOutput request including the flow ARN +// and the output ARN that was removed. +type RemoveFlowOutputOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that is associated with the output you removed. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The ARN of the output that was removed. + OutputArn *string `locationName:"outputArn" type:"string"` +} + +// String returns the string representation +func (s RemoveFlowOutputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFlowOutputOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RemoveFlowOutputOutput) SetFlowArn(v string) *RemoveFlowOutputOutput { + s.FlowArn = &v + return s +} + +// SetOutputArn sets the OutputArn field's value. +func (s *RemoveFlowOutputOutput) SetOutputArn(v string) *RemoveFlowOutputOutput { + s.OutputArn = &v + return s +} + +type RemoveFlowSourceInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // SourceArn is a required field + SourceArn *string `location:"uri" locationName:"sourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveFlowSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFlowSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveFlowSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveFlowSourceInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.SourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("SourceArn")) + } + if s.SourceArn != nil && len(*s.SourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RemoveFlowSourceInput) SetFlowArn(v string) *RemoveFlowSourceInput { + s.FlowArn = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *RemoveFlowSourceInput) SetSourceArn(v string) *RemoveFlowSourceInput { + s.SourceArn = &v + return s +} + +// The result of a successful RemoveFlowSource request including the flow ARN +// and the source ARN that was removed. +type RemoveFlowSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that is associated with the source you removed. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The ARN of the source that was removed. + SourceArn *string `locationName:"sourceArn" type:"string"` +} + +// String returns the string representation +func (s RemoveFlowSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFlowSourceOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RemoveFlowSourceOutput) SetFlowArn(v string) *RemoveFlowSourceOutput { + s.FlowArn = &v return s } -// SetTransport sets the Transport field's value. -func (s *Output) SetTransport(v *Transport) *Output { - s.Transport = v +// SetSourceArn sets the SourceArn field's value. +func (s *RemoveFlowSourceOutput) SetSourceArn(v string) *RemoveFlowSourceOutput { + s.SourceArn = &v return s } -type RemoveFlowOutputInput struct { +type RemoveFlowVpcInterfaceInput struct { _ struct{} `type:"structure"` // FlowArn is a required field FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` - // OutputArn is a required field - OutputArn *string `location:"uri" locationName:"outputArn" type:"string" required:"true"` + // VpcInterfaceName is a required field + VpcInterfaceName *string `location:"uri" locationName:"vpcInterfaceName" type:"string" required:"true"` } // String returns the string representation -func (s RemoveFlowOutputInput) String() string { +func (s RemoveFlowVpcInterfaceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RemoveFlowOutputInput) GoString() string { +func (s RemoveFlowVpcInterfaceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveFlowOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveFlowOutputInput"} +func (s *RemoveFlowVpcInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveFlowVpcInterfaceInput"} if s.FlowArn == nil { invalidParams.Add(request.NewErrParamRequired("FlowArn")) } if s.FlowArn != nil && len(*s.FlowArn) < 1 { invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) } - if s.OutputArn == nil { - invalidParams.Add(request.NewErrParamRequired("OutputArn")) + if s.VpcInterfaceName == nil { + invalidParams.Add(request.NewErrParamRequired("VpcInterfaceName")) } - if s.OutputArn != nil && len(*s.OutputArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OutputArn", 1)) + if s.VpcInterfaceName != nil && len(*s.VpcInterfaceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcInterfaceName", 1)) } if invalidParams.Len() > 0 { @@ -3854,48 +4877,58 @@ func (s *RemoveFlowOutputInput) Validate() error { } // SetFlowArn sets the FlowArn field's value. -func (s *RemoveFlowOutputInput) SetFlowArn(v string) *RemoveFlowOutputInput { +func (s *RemoveFlowVpcInterfaceInput) SetFlowArn(v string) *RemoveFlowVpcInterfaceInput { s.FlowArn = &v return s } -// SetOutputArn sets the OutputArn field's value. -func (s *RemoveFlowOutputInput) SetOutputArn(v string) *RemoveFlowOutputInput { - s.OutputArn = &v +// SetVpcInterfaceName sets the VpcInterfaceName field's value. +func (s *RemoveFlowVpcInterfaceInput) SetVpcInterfaceName(v string) *RemoveFlowVpcInterfaceInput { + s.VpcInterfaceName = &v return s } -// The result of a successful RemoveFlowOutput request including the flow ARN -// and the output ARN that was removed. -type RemoveFlowOutputOutput struct { +// The result of a successful RemoveFlowVpcInterface request including the flow +// ARN and the VPC interface name that was removed. +type RemoveFlowVpcInterfaceOutput struct { _ struct{} `type:"structure"` - // The ARN of the flow that is associated with the output you removed. + // The ARN of the flow that is associated with the VPC interface you removed. FlowArn *string `locationName:"flowArn" type:"string"` - // The ARN of the output that was removed. - OutputArn *string `locationName:"outputArn" type:"string"` + // IDs of network interfaces associated with the removed VPC interface that + // Media Connect was unable to remove. + NonDeletedNetworkInterfaceIds []*string `locationName:"nonDeletedNetworkInterfaceIds" type:"list"` + + // The name of the VPC interface that was removed. + VpcInterfaceName *string `locationName:"vpcInterfaceName" type:"string"` } // String returns the string representation -func (s RemoveFlowOutputOutput) String() string { +func (s RemoveFlowVpcInterfaceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RemoveFlowOutputOutput) GoString() string { +func (s RemoveFlowVpcInterfaceOutput) GoString() string { return s.String() } // SetFlowArn sets the FlowArn field's value. -func (s *RemoveFlowOutputOutput) SetFlowArn(v string) *RemoveFlowOutputOutput { +func (s *RemoveFlowVpcInterfaceOutput) SetFlowArn(v string) *RemoveFlowVpcInterfaceOutput { s.FlowArn = &v return s } -// SetOutputArn sets the OutputArn field's value. -func (s *RemoveFlowOutputOutput) SetOutputArn(v string) *RemoveFlowOutputOutput { - s.OutputArn = &v +// SetNonDeletedNetworkInterfaceIds sets the NonDeletedNetworkInterfaceIds field's value. +func (s *RemoveFlowVpcInterfaceOutput) SetNonDeletedNetworkInterfaceIds(v []*string) *RemoveFlowVpcInterfaceOutput { + s.NonDeletedNetworkInterfaceIds = v + return s +} + +// SetVpcInterfaceName sets the VpcInterfaceName field's value. +func (s *RemoveFlowVpcInterfaceOutput) SetVpcInterfaceName(v string) *RemoveFlowVpcInterfaceOutput { + s.VpcInterfaceName = &v return s } @@ -3992,8 +5025,8 @@ func (s *RevokeFlowEntitlementOutput) SetFlowArn(v string) *RevokeFlowEntitlemen // documentation for the operation for more information on the cause of this // exception. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4010,17 +5043,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4028,22 +5061,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // The settings for the source of the flow. @@ -4082,6 +5115,9 @@ type SetSourceRequest struct { // only to Zixi-based streams. StreamId *string `locationName:"streamId" type:"string"` + // The name of the VPC interface to use for this source. + VpcInterfaceName *string `locationName:"vpcInterfaceName" type:"string"` + // The range of IP addresses that should be allowed to contribute content to // your source. These IP addresses should be in the form of a Classless Inter-Domain // Routing (CIDR) block; for example, 10.0.0.0/16. @@ -4167,6 +5203,12 @@ func (s *SetSourceRequest) SetStreamId(v string) *SetSourceRequest { return s } +// SetVpcInterfaceName sets the VpcInterfaceName field's value. +func (s *SetSourceRequest) SetVpcInterfaceName(v string) *SetSourceRequest { + s.VpcInterfaceName = &v + return s +} + // SetWhitelistCidr sets the WhitelistCidr field's value. func (s *SetSourceRequest) SetWhitelistCidr(v string) *SetSourceRequest { s.WhitelistCidr = &v @@ -4211,6 +5253,9 @@ type Source struct { // Attributes related to the transport stream that are used in the source. Transport *Transport `locationName:"transport" type:"structure"` + // The name of the VPC Interface this Source is configured with. + VpcInterfaceName *string `locationName:"vpcInterfaceName" type:"string"` + // The range of IP addresses that should be allowed to contribute content to // your source. These IP addresses should be in the form of a Classless Inter-Domain // Routing (CIDR) block; for example, 10.0.0.0/16. @@ -4281,6 +5326,12 @@ func (s *Source) SetTransport(v *Transport) *Source { return s } +// SetVpcInterfaceName sets the VpcInterfaceName field's value. +func (s *Source) SetVpcInterfaceName(v string) *Source { + s.VpcInterfaceName = &v + return s +} + // SetWhitelistCidr sets the WhitelistCidr field's value. func (s *Source) SetWhitelistCidr(v string) *Source { s.WhitelistCidr = &v @@ -4505,8 +5556,8 @@ func (s TagResourceOutput) GoString() string { // documentation for the operation for more information on the cause of this // exception. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4523,17 +5574,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4541,22 +5592,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Attributes related to the transport stream that are used in a source or output. @@ -4819,6 +5870,38 @@ func (s *UpdateEncryption) SetUrl(v string) *UpdateEncryption { return s } +// The settings for source failover +type UpdateFailoverConfig struct { + _ struct{} `type:"structure"` + + // Recovery window time to look for dash-7 packets + RecoveryWindow *int64 `locationName:"recoveryWindow" type:"integer"` + + State *string `locationName:"state" type:"string" enum:"State"` +} + +// String returns the string representation +func (s UpdateFailoverConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFailoverConfig) GoString() string { + return s.String() +} + +// SetRecoveryWindow sets the RecoveryWindow field's value. +func (s *UpdateFailoverConfig) SetRecoveryWindow(v int64) *UpdateFailoverConfig { + s.RecoveryWindow = &v + return s +} + +// SetState sets the State field's value. +func (s *UpdateFailoverConfig) SetState(v string) *UpdateFailoverConfig { + s.State = &v + return s +} + // The updates that you want to make to a specific entitlement. type UpdateFlowEntitlementInput struct { _ struct{} `type:"structure"` @@ -4940,6 +6023,79 @@ func (s *UpdateFlowEntitlementOutput) SetFlowArn(v string) *UpdateFlowEntitlemen return s } +// Updates an existing flow. +type UpdateFlowInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // The settings for source failover + SourceFailoverConfig *UpdateFailoverConfig `locationName:"sourceFailoverConfig" type:"structure"` +} + +// String returns the string representation +func (s UpdateFlowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFlowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFlowInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowInput) SetFlowArn(v string) *UpdateFlowInput { + s.FlowArn = &v + return s +} + +// SetSourceFailoverConfig sets the SourceFailoverConfig field's value. +func (s *UpdateFlowInput) SetSourceFailoverConfig(v *UpdateFailoverConfig) *UpdateFlowInput { + s.SourceFailoverConfig = v + return s +} + +// Updates an existing flow. +type UpdateFlowOutput struct { + _ struct{} `type:"structure"` + + // The settings for a flow, including its source, outputs, and entitlements. + Flow *Flow `locationName:"flow" type:"structure"` +} + +// String returns the string representation +func (s UpdateFlowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowOutput) GoString() string { + return s.String() +} + +// SetFlow sets the Flow field's value. +func (s *UpdateFlowOutput) SetFlow(v *Flow) *UpdateFlowOutput { + s.Flow = v + return s +} + // The updates that you want to make to an existing output of an existing flow. type UpdateFlowOutputInput struct { _ struct{} `type:"structure"` @@ -4984,6 +6140,9 @@ type UpdateFlowOutputInput struct { // The stream ID that you want to use for this transport. This parameter applies // only to Zixi-based streams. StreamId *string `locationName:"streamId" type:"string"` + + // The name of the VPC interface attachment to use for this output. + VpcInterfaceAttachment *VpcInterfaceAttachment `locationName:"vpcInterfaceAttachment" type:"structure"` } // String returns the string representation @@ -5090,6 +6249,12 @@ func (s *UpdateFlowOutputInput) SetStreamId(v string) *UpdateFlowOutputInput { return s } +// SetVpcInterfaceAttachment sets the VpcInterfaceAttachment field's value. +func (s *UpdateFlowOutputInput) SetVpcInterfaceAttachment(v *VpcInterfaceAttachment) *UpdateFlowOutputInput { + s.VpcInterfaceAttachment = v + return s +} + // The result of a successful UpdateFlowOutput request including the flow ARN // and the updated output. type UpdateFlowOutputOutput struct { @@ -5163,6 +6328,9 @@ type UpdateFlowSourceInput struct { // only to Zixi-based streams. StreamId *string `locationName:"streamId" type:"string"` + // The name of the VPC Interface to configure this Source with. + VpcInterfaceName *string `locationName:"vpcInterfaceName" type:"string"` + // The range of IP addresses that should be allowed to contribute content to // your source. These IP addresses should be in the form of a Classless Inter-Domain // Routing (CIDR) block; for example, 10.0.0.0/16. @@ -5261,6 +6429,12 @@ func (s *UpdateFlowSourceInput) SetStreamId(v string) *UpdateFlowSourceInput { return s } +// SetVpcInterfaceName sets the VpcInterfaceName field's value. +func (s *UpdateFlowSourceInput) SetVpcInterfaceName(v string) *UpdateFlowSourceInput { + s.VpcInterfaceName = &v + return s +} + // SetWhitelistCidr sets the WhitelistCidr field's value. func (s *UpdateFlowSourceInput) SetWhitelistCidr(v string) *UpdateFlowSourceInput { s.WhitelistCidr = &v @@ -5301,6 +6475,182 @@ func (s *UpdateFlowSourceOutput) SetSource(v *Source) *UpdateFlowSourceOutput { return s } +// The settings for a VPC Source. +type VpcInterface struct { + _ struct{} `type:"structure"` + + // Immutable and has to be a unique against other VpcInterfaces in this Flow + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // IDs of the network interfaces created in customer's account by MediaConnect. + // + // NetworkInterfaceIds is a required field + NetworkInterfaceIds []*string `locationName:"networkInterfaceIds" type:"list" required:"true"` + + // Role Arn MediaConnect can assumes to create ENIs in customer's account + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // Security Group IDs to be used on ENI. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list" required:"true"` + + // Subnet must be in the AZ of the Flow + // + // SubnetId is a required field + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` +} + +// String returns the string representation +func (s VpcInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcInterface) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *VpcInterface) SetName(v string) *VpcInterface { + s.Name = &v + return s +} + +// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. +func (s *VpcInterface) SetNetworkInterfaceIds(v []*string) *VpcInterface { + s.NetworkInterfaceIds = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *VpcInterface) SetRoleArn(v string) *VpcInterface { + s.RoleArn = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcInterface) SetSecurityGroupIds(v []*string) *VpcInterface { + s.SecurityGroupIds = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *VpcInterface) SetSubnetId(v string) *VpcInterface { + s.SubnetId = &v + return s +} + +// The settings for attaching a VPC interface to an output. +type VpcInterfaceAttachment struct { + _ struct{} `type:"structure"` + + // The name of the VPC interface to use for this output. + VpcInterfaceName *string `locationName:"vpcInterfaceName" type:"string"` +} + +// String returns the string representation +func (s VpcInterfaceAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcInterfaceAttachment) GoString() string { + return s.String() +} + +// SetVpcInterfaceName sets the VpcInterfaceName field's value. +func (s *VpcInterfaceAttachment) SetVpcInterfaceName(v string) *VpcInterfaceAttachment { + s.VpcInterfaceName = &v + return s +} + +// Desired VPC Interface for a Flow +type VpcInterfaceRequest struct { + _ struct{} `type:"structure"` + + // The name of the VPC Interface. This value must be unique within the current + // flow. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Role Arn MediaConnect can assumes to create ENIs in customer's account + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // Security Group IDs to be used on ENI. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list" required:"true"` + + // Subnet must be in the AZ of the Flow + // + // SubnetId is a required field + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` +} + +// String returns the string representation +func (s VpcInterfaceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcInterfaceRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VpcInterfaceRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VpcInterfaceRequest"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *VpcInterfaceRequest) SetName(v string) *VpcInterfaceRequest { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *VpcInterfaceRequest) SetRoleArn(v string) *VpcInterfaceRequest { + s.RoleArn = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcInterfaceRequest) SetSecurityGroupIds(v []*string) *VpcInterfaceRequest { + s.SecurityGroupIds = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *VpcInterfaceRequest) SetSubnetId(v string) *VpcInterfaceRequest { + s.SubnetId = &v + return s +} + const ( // AlgorithmAes128 is a Algorithm enum value AlgorithmAes128 = "aes128" @@ -5345,6 +6695,14 @@ const ( SourceTypeEntitled = "ENTITLED" ) +const ( + // StateEnabled is a State enum value + StateEnabled = "ENABLED" + + // StateDisabled is a State enum value + StateDisabled = "DISABLED" +) + const ( // StatusStandby is a Status enum value StatusStandby = "STANDBY" 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 a4f1ea3060d..3e7bff6c792 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 @@ -2785,9 +2785,7 @@ func (s *Ac3Settings) SetSampleRate(v int64) *Ac3Settings { } // Accelerated transcoding can significantly speed up jobs with long, visually -// complex content. Outputs that use this feature incur pro-tier pricing. For -// information about feature limitations, see the AWS Elemental MediaConvert -// User Guide. +// complex content. type AccelerationSettings struct { _ struct{} `type:"structure"` @@ -3619,6 +3617,255 @@ func (s *AudioSelectorGroup) SetAudioSelectorNames(v []*string) *AudioSelectorGr return s } +// Settings for quality-defined variable bitrate encoding with the AV1 codec. +// Required when you set Rate control mode to QVBR. Not valid when you set Rate +// control mode to a value other than QVBR, or when you don't define Rate control +// mode. +type Av1QvbrSettings struct { + _ struct{} `type:"structure"` + + // Required when you use QVBR rate control mode. That is, when you specify qvbrSettings + // within av1Settings. Specify the general target quality level for this output, + // from 1 to 10. Use higher numbers for greater quality. Level 10 results in + // nearly lossless compression. The quality level for most broadcast-quality + // transcodes is between 6 and 9. Optionally, to specify a value between whole + // numbers, also provide a value for the setting qvbrQualityLevelFineTune. For + // example, if you want your QVBR quality level to be 7.33, set qvbrQualityLevel + // to 7 and set qvbrQualityLevelFineTune to .33. + QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` + + // Optional. Specify a value here to set the QVBR quality to a level that is + // between whole numbers. For example, if you want your QVBR quality level to + // be 7.33, set qvbrQualityLevel to 7 and set qvbrQualityLevelFineTune to .33. + // MediaConvert rounds your QVBR quality level to the nearest third of a whole + // number. For example, if you set qvbrQualityLevel to 7 and you set qvbrQualityLevelFineTune + // to .25, your actual QVBR quality level is 7.33. + QvbrQualityLevelFineTune *float64 `locationName:"qvbrQualityLevelFineTune" type:"double"` +} + +// String returns the string representation +func (s Av1QvbrSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Av1QvbrSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Av1QvbrSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Av1QvbrSettings"} + if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { + invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. +func (s *Av1QvbrSettings) SetQvbrQualityLevel(v int64) *Av1QvbrSettings { + s.QvbrQualityLevel = &v + return s +} + +// SetQvbrQualityLevelFineTune sets the QvbrQualityLevelFineTune field's value. +func (s *Av1QvbrSettings) SetQvbrQualityLevelFineTune(v float64) *Av1QvbrSettings { + s.QvbrQualityLevelFineTune = &v + return s +} + +// Required when you set Codec, under VideoDescription>CodecSettings to the +// value AV1. +type Av1Settings struct { + _ struct{} `type:"structure"` + + // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual + // quality. + AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"Av1AdaptiveQuantization"` + + // If you are using the console, use the Framerate setting to specify the frame + // rate for this output. If you want to keep the same frame rate as the input + // video, choose Follow source. If you want to do frame rate conversion, choose + // a frame rate from the dropdown list or choose Custom. The framerates shown + // in the dropdown list are decimal approximations of fractions. If you choose + // Custom, specify your frame rate as a fraction. If you are creating your transcoding + // job specification as a JSON file without the console, use FramerateControl + // to specify which value the service uses for the frame rate for this output. + // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate + // from the input. Choose SPECIFIED if you want the service to use the frame + // rate you specify in the settings FramerateNumerator and FramerateDenominator. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"Av1FramerateControl"` + + // When set to INTERPOLATE, produces smoother motion during frame rate conversion. + FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"Av1FramerateConversionAlgorithm"` + + // When you use the API for transcode jobs that use frame rate conversion, specify + // the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use + // FramerateDenominator to specify the denominator of this fraction. In this + // example, use 1001 for the value of FramerateDenominator. When you use the + // console for transcode jobs that use frame rate conversion, provide the value + // as a decimal number for Framerate. In this example, specify 23.976. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // When you use the API for transcode jobs that use frame rate conversion, specify + // the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use + // FramerateNumerator to specify the numerator of this fraction. In this example, + // use 24000 for the value of FramerateNumerator. When you use the console for + // transcode jobs that use frame rate conversion, provide the value as a decimal + // number for Framerate. In this example, specify 23.976. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` + + // Specify the GOP length (keyframe interval) in frames. With AV1, MediaConvert + // doesn't support GOP length in seconds. This value must be greater than zero + // and preferably equal to 1 + ((numberBFrames + 1) * x), where x is an integer + // value. + GopSize *float64 `locationName:"gopSize" type:"double"` + + // Maximum bitrate in bits/second. For example, enter five megabits per second + // as 5000000. Required when Rate control mode is QVBR. + MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` + + // Specify the number of B-frames. With AV1, MediaConvert supports only 7 or + // 15. + NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" min:"7" type:"integer"` + + // Settings for quality-defined variable bitrate encoding with the AV1 codec. + // Required when you set Rate control mode to QVBR. Not valid when you set Rate + // control mode to a value other than QVBR, or when you don't define Rate control + // mode. + QvbrSettings *Av1QvbrSettings `locationName:"qvbrSettings" type:"structure"` + + // 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined + // variable bitrate (QVBR). You can''t use CBR or VBR.' + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"Av1RateControlMode"` + + // Specify the number of slices per picture. This value must be 1, 2, 4, 8, + // 16, or 32. For progressive pictures, this value must be less than or equal + // to the number of macroblock rows. For interlaced pictures, this value must + // be less than or equal to half the number of macroblock rows. + Slices *int64 `locationName:"slices" min:"1" type:"integer"` + + // Adjust quantization within each frame based on spatial variation of content + // complexity. + SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"Av1SpatialAdaptiveQuantization"` +} + +// String returns the string representation +func (s Av1Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Av1Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Av1Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Av1Settings"} + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) + } + if s.NumberBFramesBetweenReferenceFrames != nil && *s.NumberBFramesBetweenReferenceFrames < 7 { + invalidParams.Add(request.NewErrParamMinValue("NumberBFramesBetweenReferenceFrames", 7)) + } + if s.Slices != nil && *s.Slices < 1 { + invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) + } + if s.QvbrSettings != nil { + if err := s.QvbrSettings.Validate(); err != nil { + invalidParams.AddNested("QvbrSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. +func (s *Av1Settings) SetAdaptiveQuantization(v string) *Av1Settings { + s.AdaptiveQuantization = &v + return s +} + +// SetFramerateControl sets the FramerateControl field's value. +func (s *Av1Settings) SetFramerateControl(v string) *Av1Settings { + s.FramerateControl = &v + return s +} + +// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. +func (s *Av1Settings) SetFramerateConversionAlgorithm(v string) *Av1Settings { + s.FramerateConversionAlgorithm = &v + return s +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *Av1Settings) SetFramerateDenominator(v int64) *Av1Settings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *Av1Settings) SetFramerateNumerator(v int64) *Av1Settings { + s.FramerateNumerator = &v + return s +} + +// SetGopSize sets the GopSize field's value. +func (s *Av1Settings) SetGopSize(v float64) *Av1Settings { + s.GopSize = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *Av1Settings) SetMaxBitrate(v int64) *Av1Settings { + s.MaxBitrate = &v + return s +} + +// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. +func (s *Av1Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *Av1Settings { + s.NumberBFramesBetweenReferenceFrames = &v + return s +} + +// SetQvbrSettings sets the QvbrSettings field's value. +func (s *Av1Settings) SetQvbrSettings(v *Av1QvbrSettings) *Av1Settings { + s.QvbrSettings = v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *Av1Settings) SetRateControlMode(v string) *Av1Settings { + s.RateControlMode = &v + return s +} + +// SetSlices sets the Slices field's value. +func (s *Av1Settings) SetSlices(v int64) *Av1Settings { + s.Slices = &v + return s +} + +// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. +func (s *Av1Settings) SetSpatialAdaptiveQuantization(v string) *Av1Settings { + s.SpatialAdaptiveQuantization = &v + return s +} + // Settings for Avail Blanking type AvailBlanking struct { _ struct{} `type:"structure"` @@ -3658,8 +3905,8 @@ func (s *AvailBlanking) SetAvailBlankingImage(v string) *AvailBlanking { } type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3676,17 +3923,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3694,22 +3941,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Burn-In Destination Settings. @@ -4384,6 +4631,65 @@ func (s *CaptionSelector) SetSourceSettings(v *CaptionSourceSettings) *CaptionSe return s } +// Ignore this setting unless your input captions format is SCC. To have the +// service compensate for differing framerates between your input captions and +// input video, specify the framerate of the captions file. Specify this value +// as a fraction, using the settings Framerate numerator (framerateNumerator) +// and Framerate denominator (framerateDenominator). For example, you might +// specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, +// or 30000 / 1001 for 29.97 fps. +type CaptionSourceFramerate struct { + _ struct{} `type:"structure"` + + // Specify the denominator of the fraction that represents the framerate for + // the setting Caption source framerate (CaptionSourceFramerate). Use this setting + // along with the setting Framerate numerator (framerateNumerator). + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // Specify the numerator of the fraction that represents the framerate for the + // setting Caption source framerate (CaptionSourceFramerate). Use this setting + // along with the setting Framerate denominator (framerateDenominator). + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` +} + +// String returns the string representation +func (s CaptionSourceFramerate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionSourceFramerate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionSourceFramerate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionSourceFramerate"} + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *CaptionSourceFramerate) SetFramerateDenominator(v int64) *CaptionSourceFramerate { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *CaptionSourceFramerate) SetFramerateNumerator(v int64) *CaptionSourceFramerate { + s.FramerateNumerator = &v + return s +} + // If your input captions are SCC, TTML, STL, SMI, SRT, or IMSC in an xml file, // specify the URI of the input captions source file. If your input captions // are IMSC in an IMF package, use TrackSourceSettings instead of FileSoureSettings. @@ -4998,10 +5304,11 @@ type ColorCorrector struct { Brightness *int64 `locationName:"brightness" min:"1" type:"integer"` // Specify the color space you want for this output. The service supports conversion - // between HDR formats, between SDR formats, and from SDR to HDR. The service - // doesn't support conversion from HDR to SDR. SDR to HDR conversion doesn't - // upgrade the dynamic range. The converted video has an HDR format, but visually - // appears the same as an unconverted output. + // between HDR formats, between SDR formats, from SDR to HDR, and from HDR to + // SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted + // video has an HDR format, but visually appears the same as an unconverted + // output. HDR to SDR conversion uses Elemental tone mapping technology to approximate + // the outcome of manually regrading from HDR to SDR. ColorSpaceConversion *string `locationName:"colorSpaceConversion" type:"string" enum:"ColorSpaceConversion"` // Contrast level. @@ -5097,8 +5404,8 @@ func (s *ColorCorrector) SetSaturation(v int64) *ColorCorrector { } type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5115,17 +5422,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5133,22 +5440,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Container specific settings. @@ -5189,6 +5496,9 @@ type ContainerSettings struct { // Settings for MP4 segments in DASH MpdSettings *MpdSettings `locationName:"mpdSettings" type:"structure"` + + // MXF settings + MxfSettings *MxfSettings `locationName:"mxfSettings" type:"structure"` } // String returns the string representation @@ -5269,14 +5579,20 @@ func (s *ContainerSettings) SetMpdSettings(v *MpdSettings) *ContainerSettings { return s } +// SetMxfSettings sets the MxfSettings field's value. +func (s *ContainerSettings) SetMxfSettings(v *MxfSettings) *ContainerSettings { + s.MxfSettings = v + return s +} + // Send your create job request with your job settings and IAM role. Optionally, // include user metadata and the ARN for the queue. type CreateJobInput struct { _ struct{} `type:"structure"` - // Accelerated transcoding can significantly speed up jobs with long, visually - // complex content. Outputs that use this feature incur pro-tier pricing. For - // information about feature limitations, see the AWS Elemental MediaConvert + // Optional. Accelerated transcoding can significantly speed up jobs with long, + // visually complex content. Outputs that use this feature incur pro-tier pricing. + // For information about feature limitations, see the AWS Elemental MediaConvert // User Guide. AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` @@ -5287,18 +5603,25 @@ type CreateJobInput struct { // for this field, your job outputs will appear on the billing report unsorted. BillingTagsSource *string `locationName:"billingTagsSource" type:"string" enum:"BillingTagsSource"` - // Idempotency token for CreateJob operation. + // Optional. Idempotency token for CreateJob operation. ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` - // When you create a job, you can either specify a job template or specify the - // transcoding settings individually + // Optional. Use queue hopping to avoid overly long waits in the backlog of + // the queue that you submit your job to. Specify an alternate queue and the + // maximum time that your job will wait in the initial queue before hopping. + // For more information about this feature, see the AWS Elemental MediaConvert + // User Guide. + HopDestinations []*HopDestination `locationName:"hopDestinations" type:"list"` + + // Optional. When you create a job, you can either specify a job template or + // specify the transcoding settings individually. JobTemplate *string `locationName:"jobTemplate" type:"string"` - // Specify the relative priority for this job. In any given queue, the service - // begins processing the job with the highest value first. When more than one - // job has the same priority, the service begins processing the job that you - // submitted first. If you don't specify a priority, the service uses the default - // value 0. + // Optional. Specify the relative priority for this job. In any given queue, + // the service begins processing the job with the highest value first. When + // more than one job has the same priority, the service begins processing the + // job that you submitted first. If you don't specify a priority, the service + // uses the default value 0. Priority *int64 `locationName:"priority" type:"integer"` // Optional. When you create a job, you can specify a queue to send it to. If @@ -5317,24 +5640,25 @@ type CreateJobInput struct { // Settings is a required field Settings *JobSettings `locationName:"settings" type:"structure" required:"true"` - // Enable this setting when you run a test job to estimate how many reserved - // transcoding slots (RTS) you need. When this is enabled, MediaConvert runs - // your job from an on-demand queue with similar performance to what you will - // see with one RTS in a reserved queue. This setting is disabled by default. + // Optional. Enable this setting when you run a test job to estimate how many + // reserved transcoding slots (RTS) you need. When this is enabled, MediaConvert + // runs your job from an on-demand queue with similar performance to what you + // will see with one RTS in a reserved queue. This setting is disabled by default. SimulateReservedQueue *string `locationName:"simulateReservedQueue" type:"string" enum:"SimulateReservedQueue"` - // Specify how often MediaConvert sends STATUS_UPDATE events to Amazon CloudWatch - // Events. Set the interval, in seconds, between status updates. MediaConvert - // sends an update at this interval from the time the service begins processing - // your job to the time it completes the transcode or encounters an error. + // Optional. Specify how often MediaConvert sends STATUS_UPDATE events to Amazon + // CloudWatch Events. Set the interval, in seconds, between status updates. + // MediaConvert sends an update at this interval from the time the service begins + // processing your job to the time it completes the transcode or encounters + // an error. StatusUpdateInterval *string `locationName:"statusUpdateInterval" type:"string" enum:"StatusUpdateInterval"` - // The tags that you want to add to the resource. You can tag resources with - // a key-value pair or with only a key. + // Optional. The tags that you want to add to the resource. You can tag resources + // with a key-value pair or with only a key. Tags map[string]*string `locationName:"tags" type:"map"` - // User-defined metadata that you want to associate with an MediaConvert job. - // You specify metadata in key/value pairs. + // Optional. User-defined metadata that you want to associate with an MediaConvert + // job. You specify metadata in key/value pairs. UserMetadata map[string]*string `locationName:"userMetadata" type:"map"` } @@ -5365,6 +5689,16 @@ func (s *CreateJobInput) Validate() error { invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) } } + if s.HopDestinations != nil { + for i, v := range s.HopDestinations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HopDestinations", i), err.(request.ErrInvalidParams)) + } + } + } if s.Settings != nil { if err := s.Settings.Validate(); err != nil { invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) @@ -5395,6 +5729,12 @@ func (s *CreateJobInput) SetClientRequestToken(v string) *CreateJobInput { return s } +// SetHopDestinations sets the HopDestinations field's value. +func (s *CreateJobInput) SetHopDestinations(v []*HopDestination) *CreateJobInput { + s.HopDestinations = v + return s +} + // SetJobTemplate sets the JobTemplate field's value. func (s *CreateJobInput) SetJobTemplate(v string) *CreateJobInput { s.JobTemplate = &v @@ -5492,6 +5832,13 @@ type CreateJobTemplateInput struct { // Optional. A description of the job template you are creating. Description *string `locationName:"description" type:"string"` + // Optional. Use queue hopping to avoid overly long waits in the backlog of + // the queue that you submit your job to. Specify an alternate queue and the + // maximum time that your job will wait in the initial queue before hopping. + // For more information about this feature, see the AWS Elemental MediaConvert + // User Guide. + HopDestinations []*HopDestination `locationName:"hopDestinations" type:"list"` + // The name of the job template you are creating. // // Name is a required field @@ -5552,6 +5899,16 @@ func (s *CreateJobTemplateInput) Validate() error { invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) } } + if s.HopDestinations != nil { + for i, v := range s.HopDestinations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HopDestinations", i), err.(request.ErrInvalidParams)) + } + } + } if s.Settings != nil { if err := s.Settings.Validate(); err != nil { invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) @@ -5582,6 +5939,12 @@ func (s *CreateJobTemplateInput) SetDescription(v string) *CreateJobTemplateInpu return s } +// SetHopDestinations sets the HopDestinations field's value. +func (s *CreateJobTemplateInput) SetHopDestinations(v []*HopDestination) *CreateJobTemplateInput { + s.HopDestinations = v + return s +} + // SetName sets the Name field's value. func (s *CreateJobTemplateInput) SetName(v string) *CreateJobTemplateInput { s.Name = &v @@ -7911,6 +8274,15 @@ type FileSourceSettings struct { // 608 data into 708. Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"FileSourceConvert608To708"` + // Ignore this setting unless your input captions format is SCC. To have the + // service compensate for differing framerates between your input captions and + // input video, specify the framerate of the captions file. Specify this value + // as a fraction, using the settings Framerate numerator (framerateNumerator) + // and Framerate denominator (framerateDenominator). For example, you might + // specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, + // or 30000 / 1001 for 29.97 fps. + Framerate *CaptionSourceFramerate `locationName:"framerate" type:"structure"` + // External caption file used for loading captions. Accepted file extensions // are 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', and 'smi'. SourceFile *string `locationName:"sourceFile" min:"14" type:"string"` @@ -7939,6 +8311,11 @@ func (s *FileSourceSettings) Validate() error { if s.TimeDelta != nil && *s.TimeDelta < -2.147483648e+09 { invalidParams.Add(request.NewErrParamMinValue("TimeDelta", -2.147483648e+09)) } + if s.Framerate != nil { + if err := s.Framerate.Validate(); err != nil { + invalidParams.AddNested("Framerate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7952,6 +8329,12 @@ func (s *FileSourceSettings) SetConvert608To708(v string) *FileSourceSettings { return s } +// SetFramerate sets the Framerate field's value. +func (s *FileSourceSettings) SetFramerate(v *CaptionSourceFramerate) *FileSourceSettings { + s.Framerate = v + return s +} + // SetSourceFile sets the SourceFile field's value. func (s *FileSourceSettings) SetSourceFile(v string) *FileSourceSettings { s.SourceFile = &v @@ -7965,8 +8348,8 @@ func (s *FileSourceSettings) SetTimeDelta(v int64) *FileSourceSettings { } type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7983,17 +8366,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8001,22 +8384,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to @@ -10295,6 +10678,70 @@ func (s *HlsSettings) SetSegmentModifier(v string) *HlsSettings { return s } +// Optional. Configuration for a destination queue to which the job can hop +// once a customer-defined minimum wait time has passed. +type HopDestination struct { + _ struct{} `type:"structure"` + + // Optional. When you set up a job to use queue hopping, you can specify a different + // relative priority for the job in the destination queue. If you don't specify, + // the relative priority will remain the same as in the previous queue. + Priority *int64 `locationName:"priority" type:"integer"` + + // Optional unless the job is submitted on the default queue. When you set up + // a job to use queue hopping, you can specify a destination queue. This queue + // cannot be the original queue to which the job is submitted. If the original + // queue isn't the default queue and you don't specify the destination queue, + // the job will move to the default queue. + Queue *string `locationName:"queue" type:"string"` + + // Required for setting up a job to use queue hopping. Minimum wait time in + // minutes until the job can hop to the destination queue. Valid range is 1 + // to 1440 minutes, inclusive. + WaitMinutes *int64 `locationName:"waitMinutes" type:"integer"` +} + +// String returns the string representation +func (s HopDestination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HopDestination) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HopDestination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HopDestination"} + if s.Priority != nil && *s.Priority < -50 { + invalidParams.Add(request.NewErrParamMinValue("Priority", -50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPriority sets the Priority field's value. +func (s *HopDestination) SetPriority(v int64) *HopDestination { + s.Priority = &v + return s +} + +// SetQueue sets the Queue field's value. +func (s *HopDestination) SetQueue(v string) *HopDestination { + s.Queue = &v + return s +} + +// SetWaitMinutes sets the WaitMinutes field's value. +func (s *HopDestination) SetWaitMinutes(v int64) *HopDestination { + s.WaitMinutes = &v + return s +} + // To insert ID3 tags in your output, specify two values. Use ID3 tag (Id3) // to specify the base 64 encoded string and use Timecode (TimeCode) to specify // the time when the tag should be inserted. To insert multiple ID3 tags in @@ -10384,8 +10831,8 @@ type ImscDestinationSettings struct { // Keep this setting enabled to have MediaConvert use the font style and position // information from the captions source in the output. This option is available - // only when your input captions are CFF-TT, IMSC, SMPTE-TT, or TTML. Disable - // this setting for simplified output captions. + // only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting + // for simplified output captions. StylePassthrough *string `locationName:"stylePassthrough" type:"string" enum:"ImscStylePassthrough"` } @@ -11272,8 +11719,8 @@ func (s *InsertableImage) SetWidth(v int64) *InsertableImage { } type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11290,17 +11737,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11308,22 +11755,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // Each job converts an input file into an output file or files. For more information, @@ -11351,11 +11798,8 @@ type Job struct { // An identifier for this resource that is unique within all of AWS. Arn *string `locationName:"arn" type:"string"` - // Optional. Choose a tag type that AWS Billing and Cost Management will use - // to sort your AWS Elemental MediaConvert costs on any billing report that - // you set up. Any transcoding outputs that don't have an associated tag will - // appear in your billing report unsorted. If you don't choose a valid value - // for this field, your job outputs will appear on the billing report unsorted. + // The tag type that AWS Billing and Cost Management will use to sort your AWS + // Elemental MediaConvert costs on any billing report that you set up. BillingTagsSource *string `locationName:"billingTagsSource" type:"string" enum:"BillingTagsSource"` // The time, in Unix epoch format in seconds, when the job got created. @@ -11370,6 +11814,9 @@ type Job struct { // Error message of Job ErrorMessage *string `locationName:"errorMessage" type:"string"` + // Optional list of hop destinations. + HopDestinations []*HopDestination `locationName:"hopDestinations" type:"list"` + // A portion of the job's ARN, unique within your AWS Elemental MediaConvert // resources Id *string `locationName:"id" type:"string"` @@ -11398,11 +11845,14 @@ type Job struct { // Relative priority on the job. Priority *int64 `locationName:"priority" type:"integer"` - // Optional. When you create a job, you can specify a queue to send it to. If - // you don't specify, the job will go to the default queue. For more about queues, - // see the User Guide topic at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html + // When you create a job, you can specify a queue to send it to. If you don't + // specify, the job will go to the default queue. For more about queues, see + // the User Guide topic at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html Queue *string `locationName:"queue" type:"string"` + // The job's queue hopping history. + QueueTransitions []*QueueTransition `locationName:"queueTransitions" type:"list"` + // The number of times that the service automatically attempted to process your // job after encountering an error. RetryCount *int64 `locationName:"retryCount" type:"integer"` @@ -11500,6 +11950,12 @@ func (s *Job) SetErrorMessage(v string) *Job { return s } +// SetHopDestinations sets the HopDestinations field's value. +func (s *Job) SetHopDestinations(v []*HopDestination) *Job { + s.HopDestinations = v + return s +} + // SetId sets the Id field's value. func (s *Job) SetId(v string) *Job { s.Id = &v @@ -11542,6 +11998,12 @@ func (s *Job) SetQueue(v string) *Job { return s } +// SetQueueTransitions sets the QueueTransitions field's value. +func (s *Job) SetQueueTransitions(v []*QueueTransition) *Job { + s.QueueTransitions = v + return s +} + // SetRetryCount sets the RetryCount field's value. func (s *Job) SetRetryCount(v int64) *Job { s.RetryCount = &v @@ -11808,6 +12270,9 @@ type JobTemplate struct { // An optional description you create for each job template. Description *string `locationName:"description" type:"string"` + // Optional list of hop destinations. + HopDestinations []*HopDestination `locationName:"hopDestinations" type:"list"` + // The timestamp in epoch seconds when the Job template was last updated. LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` @@ -11881,6 +12346,12 @@ func (s *JobTemplate) SetDescription(v string) *JobTemplate { return s } +// SetHopDestinations sets the HopDestinations field's value. +func (s *JobTemplate) SetHopDestinations(v []*HopDestination) *JobTemplate { + s.HopDestinations = v + return s +} + // SetLastUpdated sets the LastUpdated field's value. func (s *JobTemplate) SetLastUpdated(v time.Time) *JobTemplate { s.LastUpdated = &v @@ -12109,7 +12580,7 @@ type ListJobTemplatesInput struct { // the next batch of job templates. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - // When you request lists of resources, you can optionally specify whether they + // Optional. When you request lists of resources, you can specify whether they // are sorted in ASCENDING or DESCENDING order. Default varies by resource. Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` } @@ -12212,18 +12683,19 @@ type ListJobsInput struct { // Optional. Number of jobs, up to twenty, that will be returned at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // Use this string, provided with the response to a previous request, to request - // the next batch of jobs. + // Optional. Use this string, provided with the response to a previous request, + // to request the next batch of jobs. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - // When you request lists of resources, you can optionally specify whether they + // Optional. When you request lists of resources, you can specify whether they // are sorted in ASCENDING or DESCENDING order. Default varies by resource. Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` - // Provide a queue name to get back only jobs from that queue. + // Optional. Provide a queue name to get back only jobs from that queue. Queue *string `location:"querystring" locationName:"queue" type:"string"` - // A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. + // Optional. A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, + // or ERROR. Status *string `location:"querystring" locationName:"status" type:"string" enum:"JobStatus"` } @@ -12337,7 +12809,7 @@ type ListPresetsInput struct { // the next batch of presets. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - // When you request lists of resources, you can optionally specify whether they + // Optional. When you request lists of resources, you can specify whether they // are sorted in ASCENDING or DESCENDING order. Default varies by resource. Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` } @@ -12446,7 +12918,7 @@ type ListQueuesInput struct { // the next batch of queues. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` - // When you request lists of resources, you can optionally specify whether they + // Optional. When you request lists of resources, you can specify whether they // are sorted in ASCENDING or DESCENDING order. Default varies by resource. Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` } @@ -14440,6 +14912,38 @@ func (s *MsSmoothGroupSettings) SetManifestEncoding(v string) *MsSmoothGroupSett return s } +// MXF settings +type MxfSettings struct { + _ struct{} `type:"structure"` + + // Optional. When you have AFD signaling set up in your output video stream, + // use this setting to choose whether to also include it in the MXF wrapper. + // Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. + // Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from + // the video stream for this output to the MXF wrapper. Regardless of which + // option you choose, the AFD values remain in the video stream. Related settings: + // To set up your output to include or exclude AFD values, see AfdSignaling, + // under VideoDescription. On the console, find AFD signaling under the output's + // video encoding settings. + AfdSignaling *string `locationName:"afdSignaling" type:"string" enum:"MxfAfdSignaling"` +} + +// String returns the string representation +func (s MxfSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MxfSettings) GoString() string { + return s.String() +} + +// SetAfdSignaling sets the AfdSignaling field's value. +func (s *MxfSettings) SetAfdSignaling(v string) *MxfSettings { + s.AfdSignaling = &v + return s +} + // Settings for your Nielsen configuration. If you don't do Nielsen measurement // and analytics, ignore these settings. When you enable Nielsen configuration // (nielsenConfiguration), MediaConvert enables PCM to ID3 tagging for all outputs @@ -14709,8 +15213,8 @@ func (s *NoiseReducerTemporalFilterSettings) SetStrength(v int64) *NoiseReducerT } type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14727,17 +15231,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14745,22 +15249,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An output object describes the settings for a single output file or stream @@ -15692,6 +16196,50 @@ func (s *Queue) SetType(v string) *Queue { return s } +// Description of the source and destination queues between which the job has +// moved, along with the timestamp of the move +type QueueTransition struct { + _ struct{} `type:"structure"` + + // The queue that the job was on after the transition. + DestinationQueue *string `locationName:"destinationQueue" type:"string"` + + // The queue that the job was on before the transition. + SourceQueue *string `locationName:"sourceQueue" type:"string"` + + // The time, in Unix epoch format, that the job moved from the source queue + // to the destination queue. + Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"unixTimestamp"` +} + +// String returns the string representation +func (s QueueTransition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueueTransition) GoString() string { + return s.String() +} + +// SetDestinationQueue sets the DestinationQueue field's value. +func (s *QueueTransition) SetDestinationQueue(v string) *QueueTransition { + s.DestinationQueue = &v + return s +} + +// SetSourceQueue sets the SourceQueue field's value. +func (s *QueueTransition) SetSourceQueue(v string) *QueueTransition { + s.SourceQueue = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *QueueTransition) SetTimestamp(v time.Time) *QueueTransition { + s.Timestamp = &v + return s +} + // Use Rectangle to identify a specific area of the video frame. type Rectangle struct { _ struct{} `type:"structure"` @@ -16719,8 +17267,8 @@ func (s *Timing) SetSubmitTime(v time.Time) *Timing { } type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16737,17 +17285,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16755,22 +17303,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Settings specific to caption sources that are specified by track number. @@ -16824,7 +17372,7 @@ type TtmlDestinationSettings struct { _ struct{} `type:"structure"` // Pass through style and position information from a TTML-like input source - // (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or TTML output. + // (TTML, SMPTE-TT) to the TTML output. StylePassthrough *string `locationName:"stylePassthrough" type:"string" enum:"TtmlStylePassthrough"` } @@ -16930,6 +17478,9 @@ type UpdateJobTemplateInput struct { // The new description for the job template, if you are changing it. Description *string `locationName:"description" type:"string"` + // Optional list of hop destinations. + HopDestinations []*HopDestination `locationName:"hopDestinations" type:"list"` + // The name of the job template you are modifying // // Name is a required field @@ -16983,6 +17534,16 @@ func (s *UpdateJobTemplateInput) Validate() error { invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) } } + if s.HopDestinations != nil { + for i, v := range s.HopDestinations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HopDestinations", i), err.(request.ErrInvalidParams)) + } + } + } if s.Settings != nil { if err := s.Settings.Validate(); err != nil { invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) @@ -17013,6 +17574,12 @@ func (s *UpdateJobTemplateInput) SetDescription(v string) *UpdateJobTemplateInpu return s } +// SetHopDestinations sets the HopDestinations field's value. +func (s *UpdateJobTemplateInput) SetHopDestinations(v []*HopDestination) *UpdateJobTemplateInput { + s.HopDestinations = v + return s +} + // SetName sets the Name field's value. func (s *UpdateJobTemplateInput) SetName(v string) *UpdateJobTemplateInput { s.Name = &v @@ -17285,11 +17852,15 @@ func (s *UpdateQueueOutput) SetQueue(v *Queue) *UpdateQueueOutput { // vary depending on the value that you choose for Video codec (Codec). For // each codec enum that you choose, define the corresponding settings object. // The following lists the codec enum, settings object pairs. * FRAME_CAPTURE, -// FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, -// Mpeg2Settings * PRORES, ProresSettings +// FrameCaptureSettings * AV1, Av1Settings * H_264, H264Settings * H_265, H265Settings +// * MPEG2, Mpeg2Settings * PRORES, ProresSettings type VideoCodecSettings struct { _ struct{} `type:"structure"` + // Required when you set Codec, under VideoDescription>CodecSettings to the + // value AV1. + Av1Settings *Av1Settings `locationName:"av1Settings" type:"structure"` + // Specifies the video codec. This must be equal to one of the enum values defined // by the object VideoCodec. Codec *string `locationName:"codec" type:"string" enum:"VideoCodec"` @@ -17327,6 +17898,11 @@ func (s VideoCodecSettings) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *VideoCodecSettings) Validate() error { invalidParams := request.ErrInvalidParams{Context: "VideoCodecSettings"} + if s.Av1Settings != nil { + if err := s.Av1Settings.Validate(); err != nil { + invalidParams.AddNested("Av1Settings", err.(request.ErrInvalidParams)) + } + } if s.FrameCaptureSettings != nil { if err := s.FrameCaptureSettings.Validate(); err != nil { invalidParams.AddNested("FrameCaptureSettings", err.(request.ErrInvalidParams)) @@ -17359,6 +17935,12 @@ func (s *VideoCodecSettings) Validate() error { return nil } +// SetAv1Settings sets the Av1Settings field's value. +func (s *VideoCodecSettings) SetAv1Settings(v *Av1Settings) *VideoCodecSettings { + s.Av1Settings = v + return s +} + // SetCodec sets the Codec field's value. func (s *VideoCodecSettings) SetCodec(v string) *VideoCodecSettings { s.Codec = &v @@ -17417,8 +17999,8 @@ type VideoDescription struct { // vary depending on the value that you choose for Video codec (Codec). For // each codec enum that you choose, define the corresponding settings object. // The following lists the codec enum, settings object pairs. * FRAME_CAPTURE, - // FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings * MPEG2, - // Mpeg2Settings * PRORES, ProresSettings + // FrameCaptureSettings * AV1, Av1Settings * H_264, H264Settings * H_265, H265Settings + // * MPEG2, Mpeg2Settings * PRORES, ProresSettings CodecSettings *VideoCodecSettings `locationName:"codecSettings" type:"structure"` // Choose Insert (INSERT) for this setting to include color metadata in this @@ -18402,11 +18984,75 @@ const ( AudioTypeControlUseConfigured = "USE_CONFIGURED" ) -// Optional. Choose a tag type that AWS Billing and Cost Management will use -// to sort your AWS Elemental MediaConvert costs on any billing report that -// you set up. Any transcoding outputs that don't have an associated tag will -// appear in your billing report unsorted. If you don't choose a valid value -// for this field, your job outputs will appear on the billing report unsorted. +// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual +// quality. +const ( + // Av1AdaptiveQuantizationOff is a Av1AdaptiveQuantization enum value + Av1AdaptiveQuantizationOff = "OFF" + + // Av1AdaptiveQuantizationLow is a Av1AdaptiveQuantization enum value + Av1AdaptiveQuantizationLow = "LOW" + + // Av1AdaptiveQuantizationMedium is a Av1AdaptiveQuantization enum value + Av1AdaptiveQuantizationMedium = "MEDIUM" + + // Av1AdaptiveQuantizationHigh is a Av1AdaptiveQuantization enum value + Av1AdaptiveQuantizationHigh = "HIGH" + + // Av1AdaptiveQuantizationHigher is a Av1AdaptiveQuantization enum value + Av1AdaptiveQuantizationHigher = "HIGHER" + + // Av1AdaptiveQuantizationMax is a Av1AdaptiveQuantization enum value + Av1AdaptiveQuantizationMax = "MAX" +) + +// If you are using the console, use the Framerate setting to specify the frame +// rate for this output. If you want to keep the same frame rate as the input +// video, choose Follow source. If you want to do frame rate conversion, choose +// a frame rate from the dropdown list or choose Custom. The framerates shown +// in the dropdown list are decimal approximations of fractions. If you choose +// Custom, specify your frame rate as a fraction. If you are creating your transcoding +// job specification as a JSON file without the console, use FramerateControl +// to specify which value the service uses for the frame rate for this output. +// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate +// from the input. Choose SPECIFIED if you want the service to use the frame +// rate you specify in the settings FramerateNumerator and FramerateDenominator. +const ( + // Av1FramerateControlInitializeFromSource is a Av1FramerateControl enum value + Av1FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // Av1FramerateControlSpecified is a Av1FramerateControl enum value + Av1FramerateControlSpecified = "SPECIFIED" +) + +// When set to INTERPOLATE, produces smoother motion during frame rate conversion. +const ( + // Av1FramerateConversionAlgorithmDuplicateDrop is a Av1FramerateConversionAlgorithm enum value + Av1FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" + + // Av1FramerateConversionAlgorithmInterpolate is a Av1FramerateConversionAlgorithm enum value + Av1FramerateConversionAlgorithmInterpolate = "INTERPOLATE" +) + +// 'With AV1 outputs, for rate control mode, MediaConvert supports only quality-defined +// variable bitrate (QVBR). You can''t use CBR or VBR.' +const ( + // Av1RateControlModeQvbr is a Av1RateControlMode enum value + Av1RateControlModeQvbr = "QVBR" +) + +// Adjust quantization within each frame based on spatial variation of content +// complexity. +const ( + // Av1SpatialAdaptiveQuantizationDisabled is a Av1SpatialAdaptiveQuantization enum value + Av1SpatialAdaptiveQuantizationDisabled = "DISABLED" + + // Av1SpatialAdaptiveQuantizationEnabled is a Av1SpatialAdaptiveQuantization enum value + Av1SpatialAdaptiveQuantizationEnabled = "ENABLED" +) + +// The tag type that AWS Billing and Cost Management will use to sort your AWS +// Elemental MediaConvert costs on any billing report that you set up. const ( // BillingTagsSourceQueue is a BillingTagsSource enum value BillingTagsSourceQueue = "QUEUE" @@ -18806,10 +19452,11 @@ const ( ) // Specify the color space you want for this output. The service supports conversion -// between HDR formats, between SDR formats, and from SDR to HDR. The service -// doesn't support conversion from HDR to SDR. SDR to HDR conversion doesn't -// upgrade the dynamic range. The converted video has an HDR format, but visually -// appears the same as an unconverted output. +// between HDR formats, between SDR formats, from SDR to HDR, and from HDR to +// SDR. SDR to HDR conversion doesn't upgrade the dynamic range. The converted +// video has an HDR format, but visually appears the same as an unconverted +// output. HDR to SDR conversion uses Elemental tone mapping technology to approximate +// the outcome of manually regrading from HDR to SDR. const ( // ColorSpaceConversionNone is a ColorSpaceConversion enum value ColorSpaceConversionNone = "NONE" @@ -20469,8 +21116,8 @@ const ( // Keep this setting enabled to have MediaConvert use the font style and position // information from the captions source in the output. This option is available -// only when your input captions are CFF-TT, IMSC, SMPTE-TT, or TTML. Disable -// this setting for simplified output captions. +// only when your input captions are IMSC, SMPTE-TT, or TTML. Disable this setting +// for simplified output captions. const ( // ImscStylePassthroughEnabled is a ImscStylePassthrough enum value ImscStylePassthroughEnabled = "ENABLED" @@ -21802,6 +22449,23 @@ const ( MsSmoothManifestEncodingUtf16 = "UTF16" ) +// Optional. When you have AFD signaling set up in your output video stream, +// use this setting to choose whether to also include it in the MXF wrapper. +// Choose Don't copy (NO_COPY) to exclude AFD signaling from the MXF wrapper. +// Choose Copy from video stream (COPY_FROM_VIDEO) to copy the AFD values from +// the video stream for this output to the MXF wrapper. Regardless of which +// option you choose, the AFD values remain in the video stream. Related settings: +// To set up your output to include or exclude AFD values, see AfdSignaling, +// under VideoDescription. On the console, find AFD signaling under the output's +// video encoding settings. +const ( + // MxfAfdSignalingNoCopy is a MxfAfdSignaling enum value + MxfAfdSignalingNoCopy = "NO_COPY" + + // MxfAfdSignalingCopyFromVideo is a MxfAfdSignaling enum value + MxfAfdSignalingCopyFromVideo = "COPY_FROM_VIDEO" +) + // Use Noise reducer filter (NoiseReducerFilter) to select one of the following // spatial image filtering functions. To use this setting, you must also enable // Noise reducer (NoiseReducer). * Bilateral preserves edges while reducing @@ -21835,7 +22499,7 @@ const ( NoiseReducerFilterTemporal = "TEMPORAL" ) -// When you request lists of resources, you can optionally specify whether they +// Optional. When you request lists of resources, you can specify whether they // are sorted in ASCENDING or DESCENDING order. Default varies by resource. const ( // OrderAscending is a Order enum value @@ -22294,7 +22958,7 @@ const ( ) // Pass through style and position information from a TTML-like input source -// (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or TTML output. +// (TTML, SMPTE-TT) to the TTML output. const ( // TtmlStylePassthroughEnabled is a TtmlStylePassthrough enum value TtmlStylePassthroughEnabled = "ENABLED" @@ -22316,6 +22980,9 @@ const ( // VideoCodecFrameCapture is a VideoCodec enum value VideoCodecFrameCapture = "FRAME_CAPTURE" + // VideoCodecAv1 is a VideoCodec enum value + VideoCodecAv1 = "AV1" + // VideoCodecH264 is a VideoCodec enum value VideoCodecH264 = "H_264" 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 2fa18e29d9b..bfe4e981d0a 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 @@ -1549,6 +1549,96 @@ func (c *MediaLive) DescribeInputWithContext(ctx aws.Context, input *DescribeInp return out, req.Send() } +const opDescribeInputDevice = "DescribeInputDevice" + +// DescribeInputDeviceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInputDevice operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInputDevice for more information on using the DescribeInputDevice +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInputDeviceRequest method. +// req, resp := client.DescribeInputDeviceRequest(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/DescribeInputDevice +func (c *MediaLive) DescribeInputDeviceRequest(input *DescribeInputDeviceInput) (req *request.Request, output *DescribeInputDeviceOutput) { + op := &request.Operation{ + Name: opDescribeInputDevice, + HTTPMethod: "GET", + HTTPPath: "/prod/inputDevices/{inputDeviceId}", + } + + if input == nil { + input = &DescribeInputDeviceInput{} + } + + output = &DescribeInputDeviceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInputDevice API operation for AWS Elemental MediaLive. +// +// Gets the details for the input device +// +// Returns awserr.Error for service API and SDK errors. Use runtime type 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 DescribeInputDevice for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// +// * InternalServerErrorException +// +// * ForbiddenException +// +// * BadGatewayException +// +// * NotFoundException +// +// * GatewayTimeoutException +// +// * TooManyRequestsException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputDevice +func (c *MediaLive) DescribeInputDevice(input *DescribeInputDeviceInput) (*DescribeInputDeviceOutput, error) { + req, out := c.DescribeInputDeviceRequest(input) + return out, req.Send() +} + +// DescribeInputDeviceWithContext is the same as DescribeInputDevice with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInputDevice for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the 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) DescribeInputDeviceWithContext(ctx aws.Context, input *DescribeInputDeviceInput, opts ...request.Option) (*DescribeInputDeviceOutput, error) { + req, out := c.DescribeInputDeviceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeInputSecurityGroup = "DescribeInputSecurityGroup" // DescribeInputSecurityGroupRequest generates a "aws/request.Request" representing the @@ -2293,6 +2383,152 @@ func (c *MediaLive) ListChannelsPagesWithContext(ctx aws.Context, input *ListCha return p.Err() } +const opListInputDevices = "ListInputDevices" + +// ListInputDevicesRequest generates a "aws/request.Request" representing the +// client's request for the ListInputDevices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInputDevices for more information on using the ListInputDevices +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInputDevicesRequest method. +// req, resp := client.ListInputDevicesRequest(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/ListInputDevices +func (c *MediaLive) ListInputDevicesRequest(input *ListInputDevicesInput) (req *request.Request, output *ListInputDevicesOutput) { + op := &request.Operation{ + Name: opListInputDevices, + HTTPMethod: "GET", + HTTPPath: "/prod/inputDevices", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListInputDevicesInput{} + } + + output = &ListInputDevicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInputDevices API operation for AWS Elemental MediaLive. +// +// List input devices +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListInputDevices for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// +// * InternalServerErrorException +// +// * ForbiddenException +// +// * BadGatewayException +// +// * GatewayTimeoutException +// +// * TooManyRequestsException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputDevices +func (c *MediaLive) ListInputDevices(input *ListInputDevicesInput) (*ListInputDevicesOutput, error) { + req, out := c.ListInputDevicesRequest(input) + return out, req.Send() +} + +// ListInputDevicesWithContext is the same as ListInputDevices with the addition of +// the ability to pass a context and additional request options. +// +// See ListInputDevices for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the 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) ListInputDevicesWithContext(ctx aws.Context, input *ListInputDevicesInput, opts ...request.Option) (*ListInputDevicesOutput, error) { + req, out := c.ListInputDevicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListInputDevicesPages iterates over the pages of a ListInputDevices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListInputDevices 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 ListInputDevices operation. +// pageNum := 0 +// err := client.ListInputDevicesPages(params, +// func(page *medialive.ListInputDevicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListInputDevicesPages(input *ListInputDevicesInput, fn func(*ListInputDevicesOutput, bool) bool) error { + return c.ListInputDevicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListInputDevicesPagesWithContext same as ListInputDevicesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListInputDevicesPagesWithContext(ctx aws.Context, input *ListInputDevicesInput, fn func(*ListInputDevicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListInputDevicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListInputDevicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListInputDevicesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListInputSecurityGroups = "ListInputSecurityGroups" // ListInputSecurityGroupsRequest generates a "aws/request.Request" representing the @@ -3991,6 +4227,98 @@ func (c *MediaLive) UpdateInputWithContext(ctx aws.Context, input *UpdateInputIn return out, req.Send() } +const opUpdateInputDevice = "UpdateInputDevice" + +// UpdateInputDeviceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInputDevice operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInputDevice for more information on using the UpdateInputDevice +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInputDeviceRequest method. +// req, resp := client.UpdateInputDeviceRequest(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/UpdateInputDevice +func (c *MediaLive) UpdateInputDeviceRequest(input *UpdateInputDeviceInput) (req *request.Request, output *UpdateInputDeviceOutput) { + op := &request.Operation{ + Name: opUpdateInputDevice, + HTTPMethod: "PUT", + HTTPPath: "/prod/inputDevices/{inputDeviceId}", + } + + if input == nil { + input = &UpdateInputDeviceInput{} + } + + output = &UpdateInputDeviceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateInputDevice API operation for AWS Elemental MediaLive. +// +// Updates the parameters for the input device. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type 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 UpdateInputDevice for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// +// * UnprocessableEntityException +// +// * InternalServerErrorException +// +// * ForbiddenException +// +// * BadGatewayException +// +// * NotFoundException +// +// * GatewayTimeoutException +// +// * TooManyRequestsException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputDevice +func (c *MediaLive) UpdateInputDevice(input *UpdateInputDeviceInput) (*UpdateInputDeviceOutput, error) { + req, out := c.UpdateInputDeviceRequest(input) + return out, req.Send() +} + +// UpdateInputDeviceWithContext is the same as UpdateInputDevice with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInputDevice for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the 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) UpdateInputDeviceWithContext(ctx aws.Context, input *UpdateInputDeviceInput, opts ...request.Option) (*UpdateInputDeviceOutput, error) { + req, out := c.UpdateInputDeviceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateInputSecurityGroup = "UpdateInputSecurityGroup" // UpdateInputSecurityGroupRequest generates a "aws/request.Request" representing the @@ -5328,6 +5656,9 @@ type AudioSelectorSettings struct { // Audio Pid Selection AudioPidSelection *AudioPidSelection `locationName:"audioPidSelection" type:"structure"` + + // Audio Track Selection + AudioTrackSelection *AudioTrackSelection `locationName:"audioTrackSelection" type:"structure"` } // String returns the string representation @@ -5353,6 +5684,11 @@ func (s *AudioSelectorSettings) Validate() error { invalidParams.AddNested("AudioPidSelection", err.(request.ErrInvalidParams)) } } + if s.AudioTrackSelection != nil { + if err := s.AudioTrackSelection.Validate(); err != nil { + invalidParams.AddNested("AudioTrackSelection", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -5372,9 +5708,155 @@ func (s *AudioSelectorSettings) SetAudioPidSelection(v *AudioPidSelection) *Audi return s } -// Avail Blanking -type AvailBlanking struct { - _ struct{} `type:"structure"` +// SetAudioTrackSelection sets the AudioTrackSelection field's value. +func (s *AudioSelectorSettings) SetAudioTrackSelection(v *AudioTrackSelection) *AudioSelectorSettings { + s.AudioTrackSelection = v + return s +} + +// Audio Track +type AudioTrack struct { + _ struct{} `type:"structure"` + + // 1-based integer value that maps to a specific audio track + // + // Track is a required field + Track *int64 `locationName:"track" min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s AudioTrack) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioTrack) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioTrack) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioTrack"} + if s.Track == nil { + invalidParams.Add(request.NewErrParamRequired("Track")) + } + if s.Track != nil && *s.Track < 1 { + invalidParams.Add(request.NewErrParamMinValue("Track", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTrack sets the Track field's value. +func (s *AudioTrack) SetTrack(v int64) *AudioTrack { + s.Track = &v + return s +} + +// Audio Track Selection +type AudioTrackSelection struct { + _ struct{} `type:"structure"` + + // Selects one or more unique audio tracks from within an mp4 source. + // + // Tracks is a required field + Tracks []*AudioTrack `locationName:"tracks" type:"list" required:"true"` +} + +// String returns the string representation +func (s AudioTrackSelection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioTrackSelection) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioTrackSelection) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioTrackSelection"} + if s.Tracks == nil { + invalidParams.Add(request.NewErrParamRequired("Tracks")) + } + if s.Tracks != nil { + for i, v := range s.Tracks { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tracks", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTracks sets the Tracks field's value. +func (s *AudioTrackSelection) SetTracks(v []*AudioTrack) *AudioTrackSelection { + s.Tracks = v + return s +} + +// The settings for Automatic Input Failover. +type AutomaticInputFailoverSettings struct { + _ struct{} `type:"structure"` + + // Input preference when deciding which input to make active when a previously + // failed input has recovered. + InputPreference *string `locationName:"inputPreference" type:"string" enum:"InputPreference"` + + // The input ID of the secondary input in the automatic input failover pair. + // + // SecondaryInputId is a required field + SecondaryInputId *string `locationName:"secondaryInputId" type:"string" required:"true"` +} + +// String returns the string representation +func (s AutomaticInputFailoverSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutomaticInputFailoverSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AutomaticInputFailoverSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AutomaticInputFailoverSettings"} + if s.SecondaryInputId == nil { + invalidParams.Add(request.NewErrParamRequired("SecondaryInputId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputPreference sets the InputPreference field's value. +func (s *AutomaticInputFailoverSettings) SetInputPreference(v string) *AutomaticInputFailoverSettings { + s.InputPreference = &v + return s +} + +// SetSecondaryInputId sets the SecondaryInputId field's value. +func (s *AutomaticInputFailoverSettings) SetSecondaryInputId(v string) *AutomaticInputFailoverSettings { + s.SecondaryInputId = &v + return s +} + +// Avail Blanking +type AvailBlanking struct { + _ struct{} `type:"structure"` // Blanking image to be used. Leave empty for solid black. Only bmp and png // images are supported. @@ -5515,8 +5997,8 @@ func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailS } type BadGatewayException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5533,17 +6015,17 @@ func (s BadGatewayException) GoString() string { func newErrorBadGatewayException(v protocol.ResponseMetadata) error { return &BadGatewayException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadGatewayException) Code() string { +func (s *BadGatewayException) Code() string { return "BadGatewayException" } // Message returns the exception's message. -func (s BadGatewayException) Message() string { +func (s *BadGatewayException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5551,27 +6033,27 @@ func (s BadGatewayException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadGatewayException) OrigErr() error { +func (s *BadGatewayException) OrigErr() error { return nil } -func (s BadGatewayException) Error() string { +func (s *BadGatewayException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadGatewayException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadGatewayException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadGatewayException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadGatewayException) RequestID() string { + return s.RespMetadata.RequestID } type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5588,17 +6070,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5606,22 +6088,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // A list of schedule actions to create (in a request) or that have been created @@ -6984,8 +7466,8 @@ func (s ColorSpacePassthroughSettings) GoString() string { } type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7002,17 +7484,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7020,22 +7502,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } type CreateChannelInput struct { @@ -7206,6 +7688,8 @@ type CreateInputInput struct { Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` + InputDevices []*InputDeviceSettings `locationName:"inputDevices" type:"list"` + InputSecurityGroups []*string `locationName:"inputSecurityGroups" type:"list"` MediaConnectFlows []*MediaConnectFlowRequest `locationName:"mediaConnectFlows" type:"list"` @@ -7260,6 +7744,12 @@ func (s *CreateInputInput) SetDestinations(v []*InputDestinationRequest) *Create return s } +// SetInputDevices sets the InputDevices field's value. +func (s *CreateInputInput) SetInputDevices(v []*InputDeviceSettings) *CreateInputInput { + s.InputDevices = v + return s +} + // SetInputSecurityGroups sets the InputSecurityGroups field's value. func (s *CreateInputInput) SetInputSecurityGroups(v []*string) *CreateInputInput { s.InputSecurityGroups = v @@ -8673,6 +9163,150 @@ func (s *DescribeChannelOutput) SetTags(v map[string]*string) *DescribeChannelOu return s } +type DescribeInputDeviceInput struct { + _ struct{} `type:"structure"` + + // InputDeviceId is a required field + InputDeviceId *string `location:"uri" locationName:"inputDeviceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeInputDeviceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInputDeviceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInputDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInputDeviceInput"} + if s.InputDeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("InputDeviceId")) + } + if s.InputDeviceId != nil && len(*s.InputDeviceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputDeviceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputDeviceId sets the InputDeviceId field's value. +func (s *DescribeInputDeviceInput) SetInputDeviceId(v string) *DescribeInputDeviceInput { + s.InputDeviceId = &v + return s +} + +type DescribeInputDeviceOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + // The state of the connection between the input device and AWS. + ConnectionState *string `locationName:"connectionState" type:"string" enum:"InputDeviceConnectionState"` + + // The status of the action to synchronize the device configuration. If you + // change the configuration of the input device (for example, the maximum bitrate), + // MediaLive sends the new data to the device. The device might not update itself + // immediately. SYNCED means the device has updated its configuration. SYNCING + // means that it has not updated its configuration. + DeviceSettingsSyncState *string `locationName:"deviceSettingsSyncState" type:"string" enum:"DeviceSettingsSyncState"` + + // Settings that describe the active source from the input device, and the video + // characteristics of that source. + HdDeviceSettings *InputDeviceHdSettings `locationName:"hdDeviceSettings" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + MacAddress *string `locationName:"macAddress" type:"string"` + + Name *string `locationName:"name" type:"string"` + + // The network settings for the input device. + NetworkSettings *InputDeviceNetworkSettings `locationName:"networkSettings" type:"structure"` + + SerialNumber *string `locationName:"serialNumber" type:"string"` + + // The type of the input device. For an AWS Elemental Link device that outputs + // resolutions up to 1080, choose "HD". + Type *string `locationName:"type" type:"string" enum:"InputDeviceType"` +} + +// String returns the string representation +func (s DescribeInputDeviceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInputDeviceOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeInputDeviceOutput) SetArn(v string) *DescribeInputDeviceOutput { + s.Arn = &v + return s +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *DescribeInputDeviceOutput) SetConnectionState(v string) *DescribeInputDeviceOutput { + s.ConnectionState = &v + return s +} + +// SetDeviceSettingsSyncState sets the DeviceSettingsSyncState field's value. +func (s *DescribeInputDeviceOutput) SetDeviceSettingsSyncState(v string) *DescribeInputDeviceOutput { + s.DeviceSettingsSyncState = &v + return s +} + +// SetHdDeviceSettings sets the HdDeviceSettings field's value. +func (s *DescribeInputDeviceOutput) SetHdDeviceSettings(v *InputDeviceHdSettings) *DescribeInputDeviceOutput { + s.HdDeviceSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeInputDeviceOutput) SetId(v string) *DescribeInputDeviceOutput { + s.Id = &v + return s +} + +// SetMacAddress sets the MacAddress field's value. +func (s *DescribeInputDeviceOutput) SetMacAddress(v string) *DescribeInputDeviceOutput { + s.MacAddress = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeInputDeviceOutput) SetName(v string) *DescribeInputDeviceOutput { + s.Name = &v + return s +} + +// SetNetworkSettings sets the NetworkSettings field's value. +func (s *DescribeInputDeviceOutput) SetNetworkSettings(v *InputDeviceNetworkSettings) *DescribeInputDeviceOutput { + s.NetworkSettings = v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *DescribeInputDeviceOutput) SetSerialNumber(v string) *DescribeInputDeviceOutput { + s.SerialNumber = &v + return s +} + +// SetType sets the Type field's value. +func (s *DescribeInputDeviceOutput) SetType(v string) *DescribeInputDeviceOutput { + s.Type = &v + return s +} + type DescribeInputInput struct { _ struct{} `type:"structure"` @@ -8726,6 +9360,8 @@ type DescribeInputOutput struct { // A standard input has two sources and a single pipeline input only has one. InputClass *string `locationName:"inputClass" type:"string" enum:"InputClass"` + InputDevices []*InputDeviceSettings `locationName:"inputDevices" type:"list"` + // There are two types of input sources, static and dynamic. If an input source // is dynamic you canchange the source url of the input dynamically using an // input switch action. However, the only input typeto support a dynamic url @@ -8789,6 +9425,12 @@ func (s *DescribeInputOutput) SetInputClass(v string) *DescribeInputOutput { return s } +// SetInputDevices sets the InputDevices field's value. +func (s *DescribeInputOutput) SetInputDevices(v []*InputDeviceSettings) *DescribeInputOutput { + s.InputDevices = v + return s +} + // SetInputSourceType sets the InputSourceType field's value. func (s *DescribeInputOutput) SetInputSourceType(v string) *DescribeInputOutput { s.InputSourceType = &v @@ -10704,6 +11346,14 @@ type Fmp4HlsSettings struct { // List all the audio groups that are used with the video output stream. Input // all the audio GROUP-IDs that are associated to the video, separate by ','. AudioRenditionSets *string `locationName:"audioRenditionSets" type:"string"` + + // If set to passthrough, Nielsen inaudible tones for media tracking will be + // detected in the input audio and an equivalent ID3 tag will be inserted in + // the output. + NielsenId3Behavior *string `locationName:"nielsenId3Behavior" type:"string" enum:"Fmp4NielsenId3Behavior"` + + // When set to passthrough, timed metadata is passed through from input to output. + TimedMetadataBehavior *string `locationName:"timedMetadataBehavior" type:"string" enum:"Fmp4TimedMetadataBehavior"` } // String returns the string representation @@ -10722,6 +11372,18 @@ func (s *Fmp4HlsSettings) SetAudioRenditionSets(v string) *Fmp4HlsSettings { return s } +// SetNielsenId3Behavior sets the NielsenId3Behavior field's value. +func (s *Fmp4HlsSettings) SetNielsenId3Behavior(v string) *Fmp4HlsSettings { + s.NielsenId3Behavior = &v + return s +} + +// SetTimedMetadataBehavior sets the TimedMetadataBehavior field's value. +func (s *Fmp4HlsSettings) SetTimedMetadataBehavior(v string) *Fmp4HlsSettings { + s.TimedMetadataBehavior = &v + return s +} + // Settings to specify if an action follows another. type FollowModeScheduleActionStartSettings struct { _ struct{} `type:"structure"` @@ -10777,8 +11439,8 @@ func (s *FollowModeScheduleActionStartSettings) SetReferenceActionName(v string) } type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10795,17 +11457,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10813,22 +11475,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // Frame Capture Group Settings @@ -10954,8 +11616,8 @@ func (s *FrameCaptureSettings) SetCaptureIntervalUnits(v string) *FrameCaptureSe } type GatewayTimeoutException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10972,17 +11634,17 @@ func (s GatewayTimeoutException) GoString() string { func newErrorGatewayTimeoutException(v protocol.ResponseMetadata) error { return &GatewayTimeoutException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s GatewayTimeoutException) Code() string { +func (s *GatewayTimeoutException) Code() string { return "GatewayTimeoutException" } // Message returns the exception's message. -func (s GatewayTimeoutException) Message() string { +func (s *GatewayTimeoutException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10990,22 +11652,22 @@ func (s GatewayTimeoutException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s GatewayTimeoutException) OrigErr() error { +func (s *GatewayTimeoutException) OrigErr() error { return nil } -func (s GatewayTimeoutException) Error() string { +func (s *GatewayTimeoutException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s GatewayTimeoutException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *GatewayTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s GatewayTimeoutException) RequestID() string { - return s.respMetadata.RequestID +func (s *GatewayTimeoutException) RequestID() string { + return s.RespMetadata.RequestID } // Global Configuration @@ -11026,8 +11688,8 @@ type GlobalConfiguration struct { // Settings for system actions when input is lost. InputLossBehavior *InputLossBehavior `locationName:"inputLossBehavior" type:"structure"` - // Indicates how MediaLive pipelines are synchronized.PIPELINELOCKING - MediaLive - // will attempt to synchronize the output of each pipeline to the other.EPOCHLOCKING + // Indicates how MediaLive pipelines are synchronized.PIPELINE_LOCKING - MediaLive + // will attempt to synchronize the output of each pipeline to the other.EPOCH_LOCKING // - MediaLive will attempt to synchronize the output of each pipeline to the // Unix epoch. OutputLockingMode *string `locationName:"outputLockingMode" type:"string" enum:"GlobalConfigurationOutputLockingMode"` @@ -11150,6 +11812,30 @@ func (s *H264ColorSpaceSettings) SetRec709Settings(v *Rec709Settings) *H264Color return s } +// H264 Filter Settings +type H264FilterSettings struct { + _ struct{} `type:"structure"` + + // Temporal Filter Settings + TemporalFilterSettings *TemporalFilterSettings `locationName:"temporalFilterSettings" type:"structure"` +} + +// String returns the string representation +func (s H264FilterSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s H264FilterSettings) GoString() string { + return s.String() +} + +// SetTemporalFilterSettings sets the TemporalFilterSettings field's value. +func (s *H264FilterSettings) SetTemporalFilterSettings(v *TemporalFilterSettings) *H264FilterSettings { + s.TemporalFilterSettings = v + return s +} + // H264 Settings type H264Settings struct { _ struct{} `type:"structure"` @@ -11185,6 +11871,9 @@ type H264Settings struct { // Entropy encoding mode. Use cabac (must be in Main or High profile) or cavlc. EntropyEncoding *string `locationName:"entropyEncoding" type:"string" enum:"H264EntropyEncoding"` + // Optional filters that you can apply to an encode. + FilterSettings *H264FilterSettings `locationName:"filterSettings" type:"structure"` + // Four bit AFD value to write on all frames of video in the output stream. // Only valid when afdSignaling is set to 'Fixed'. FixedAfd *string `locationName:"fixedAfd" type:"string" enum:"FixedAfd"` @@ -11193,6 +11882,15 @@ type H264Settings struct { // or 'pop' on I-frames. FlickerAq *string `locationName:"flickerAq" type:"string" enum:"H264FlickerAq"` + // This setting applies only when scan type is "interlaced." It controls whether + // coding is performed on a field basis or on a frame basis. (When the video + // is progressive, the coding is always performed on a frame basis.)enabled: + // Force MediaLive to code on a field basis, so that odd and even sets of fields + // are coded separately.disabled: Code the two sets of fields separately (on + // a field basis) or together (on a frame basis using PAFF), depending on what + // is most appropriate for the content. + ForceFieldPictures *string `locationName:"forceFieldPictures" type:"string" enum:"H264ForceFieldPictures"` + // This field indicates how the output video frame rate is specified. If "specified" // is selected then the output video frame rate is determined by framerateNumerator // and framerateDenominator, else if "initializeFromSource" is selected then @@ -11269,6 +11967,14 @@ type H264Settings struct { // H.264 Profile. Profile *string `locationName:"profile" type:"string" enum:"H264Profile"` + // Leave as STANDARD_QUALITY or choose a different value (which might result + // in additional costs to run the channel).- ENHANCED_QUALITY: Produces a slightly + // better video quality without an increase in the bitrate. Has an effect only + // when the Rate control mode is QVBR or CBR. If this channel is in a MediaLive + // multiplex, the value must be ENHANCED_QUALITY.- STANDARD_QUALITY: Valid for + // any Rate control mode. + QualityLevel *string `locationName:"qualityLevel" type:"string" enum:"H264QualityLevel"` + // Controls the target quality for the video encode. Applies only when the rate // control mode is QVBR. Set values for the QVBR quality level field and Max // bitrate field that suit your most important viewing devices. Recommended @@ -11420,6 +12126,12 @@ func (s *H264Settings) SetEntropyEncoding(v string) *H264Settings { return s } +// SetFilterSettings sets the FilterSettings field's value. +func (s *H264Settings) SetFilterSettings(v *H264FilterSettings) *H264Settings { + s.FilterSettings = v + return s +} + // SetFixedAfd sets the FixedAfd field's value. func (s *H264Settings) SetFixedAfd(v string) *H264Settings { s.FixedAfd = &v @@ -11432,6 +12144,12 @@ func (s *H264Settings) SetFlickerAq(v string) *H264Settings { return s } +// SetForceFieldPictures sets the ForceFieldPictures field's value. +func (s *H264Settings) SetForceFieldPictures(v string) *H264Settings { + s.ForceFieldPictures = &v + return s +} + // SetFramerateControl sets the FramerateControl field's value. func (s *H264Settings) SetFramerateControl(v string) *H264Settings { s.FramerateControl = &v @@ -11534,6 +12252,12 @@ func (s *H264Settings) SetProfile(v string) *H264Settings { return s } +// SetQualityLevel sets the QualityLevel field's value. +func (s *H264Settings) SetQualityLevel(v string) *H264Settings { + s.QualityLevel = &v + return s +} + // SetQvbrQualityLevel sets the QvbrQualityLevel field's value. func (s *H264Settings) SetQvbrQualityLevel(v int64) *H264Settings { s.QvbrQualityLevel = &v @@ -12371,9 +13095,10 @@ type HlsGroupSettings struct { // converting it to a "VOD" type manifest on completion of the stream. Mode *string `locationName:"mode" type:"string" enum:"HlsMode"` - // MANIFESTSANDSEGMENTS: Generates manifests (master manifest, if applicable, - // and media manifests) for this output group.SEGMENTSONLY: Does not generate - // any manifests for this output group. + // MANIFESTS_AND_SEGMENTS: Generates manifests (master manifest, if applicable, + // and media manifests) for this output group.VARIANT_MANIFESTS_AND_SEGMENTS: + // Generates media manifests for this output group, but not a master manifest.SEGMENTS_ONLY: + // Does not generate any manifests for this output group. OutputSelection *string `locationName:"outputSelection" type:"string" enum:"HlsOutputSelection"` // Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. @@ -12425,7 +13150,7 @@ type HlsGroupSettings struct { // Provides an extra millisecond delta offset to fine tune the timestamps. TimestampDeltaMilliseconds *int64 `locationName:"timestampDeltaMilliseconds" type:"integer"` - // SEGMENTEDFILES: Emit the program as segments - multiple .ts media files.SINGLEFILE: + // SEGMENTED_FILES: Emit the program as segments - multiple .ts media files.SINGLE_FILE: // Applies only if Mode field is VOD. Emit the program as a single .ts media // file. The media manifest includes #EXT-X-BYTERANGE tags to index segments // for playback. A typical use for this value is when sending the output to @@ -13131,8 +13856,7 @@ func (s *HlsWebdavSettings) SetRestartDelay(v int64) *HlsWebdavSettings { return s } -// Settings to configure an action so that it occurs immediately. This is only -// supported for input switch actions currently. +// Settings to configure an action so that it occurs as soon as possible. type ImmediateModeScheduleActionStartSettings struct { _ struct{} `type:"structure"` } @@ -13172,6 +13896,9 @@ type Input struct { // value is not valid because the channel requires two sources in the input. InputClass *string `locationName:"inputClass" type:"string" enum:"InputClass"` + // Settings for the input devices. + InputDevices []*InputDeviceSettings `locationName:"inputDevices" type:"list"` + // Certain pull input sources can be dynamic, meaning that they can have their // URL's dynamically changesduring input switch actions. Presently, this functionality // only works with MP4_FILE inputs. @@ -13241,6 +13968,12 @@ func (s *Input) SetInputClass(v string) *Input { return s } +// SetInputDevices sets the InputDevices field's value. +func (s *Input) SetInputDevices(v []*InputDeviceSettings) *Input { + s.InputDevices = v + return s +} + // SetInputSourceType sets the InputSourceType field's value. func (s *Input) SetInputSourceType(v string) *Input { s.InputSourceType = &v @@ -13298,6 +14031,10 @@ func (s *Input) SetType(v string) *Input { type InputAttachment struct { _ struct{} `type:"structure"` + // User-specified settings for defining what the conditions are for declaring + // the input unhealthy and failing over to a different input. + AutomaticInputFailoverSettings *AutomaticInputFailoverSettings `locationName:"automaticInputFailoverSettings" type:"structure"` + // User-specified name for the attachment. This is required if the user wants // to use this input in an input switch action. InputAttachmentName *string `locationName:"inputAttachmentName" type:"string"` @@ -13322,6 +14059,11 @@ func (s InputAttachment) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *InputAttachment) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InputAttachment"} + if s.AutomaticInputFailoverSettings != nil { + if err := s.AutomaticInputFailoverSettings.Validate(); err != nil { + invalidParams.AddNested("AutomaticInputFailoverSettings", err.(request.ErrInvalidParams)) + } + } if s.InputSettings != nil { if err := s.InputSettings.Validate(); err != nil { invalidParams.AddNested("InputSettings", err.(request.ErrInvalidParams)) @@ -13334,6 +14076,12 @@ func (s *InputAttachment) Validate() error { return nil } +// SetAutomaticInputFailoverSettings sets the AutomaticInputFailoverSettings field's value. +func (s *InputAttachment) SetAutomaticInputFailoverSettings(v *AutomaticInputFailoverSettings) *InputAttachment { + s.AutomaticInputFailoverSettings = v + return s +} + // SetInputAttachmentName sets the InputAttachmentName field's value. func (s *InputAttachment) SetInputAttachmentName(v string) *InputAttachment { s.InputAttachmentName = &v @@ -13576,24 +14324,370 @@ func (s *InputDestinationVpc) SetNetworkInterfaceId(v string) *InputDestinationV return s } -// Input Location -type InputLocation struct { +// Configurable settings for the input device. +type InputDeviceConfigurableSettings struct { _ struct{} `type:"structure"` - // key used to extract the password from EC2 Parameter store - PasswordParam *string `locationName:"passwordParam" type:"string"` + // The input source that you want to use. If the device has a source connected + // to only one of its input ports, or if you don't care which source the device + // sends, specify Auto. If the device has sources connected to both its input + // ports, and you want to use a specific source, specify the source. + ConfiguredInput *string `locationName:"configuredInput" type:"string" enum:"InputDeviceConfiguredInput"` - // Uniform Resource Identifier - This should be a path to a file accessible - // to the Live system (eg. a http:// URI) depending on the output type. For - // example, a RTMP destination should have a uri simliar to: "rtmp://fmsserver/live". - // - // Uri is a required field - Uri *string `locationName:"uri" type:"string" required:"true"` + // The maximum bitrate in bits per second. Set a value here to throttle the + // bitrate of the source video. + MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` +} - // Username if credentials are required to access a file or publishing point. - // This can be either a plaintext username, or a reference to an AWS parameter - // store name from which the username can be retrieved. AWS Parameter store - // format: "ssm://" +// String returns the string representation +func (s InputDeviceConfigurableSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDeviceConfigurableSettings) GoString() string { + return s.String() +} + +// SetConfiguredInput sets the ConfiguredInput field's value. +func (s *InputDeviceConfigurableSettings) SetConfiguredInput(v string) *InputDeviceConfigurableSettings { + s.ConfiguredInput = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *InputDeviceConfigurableSettings) SetMaxBitrate(v int64) *InputDeviceConfigurableSettings { + s.MaxBitrate = &v + return s +} + +// Settings that describe the active source from the input device, and the video +// characteristics of that source. +type InputDeviceHdSettings struct { + _ struct{} `type:"structure"` + + // If you specified Auto as the configured input, specifies which of the sources + // is currently active (SDI or HDMI). + ActiveInput *string `locationName:"activeInput" type:"string" enum:"InputDeviceActiveInput"` + + // The source at the input device that is currently active. You can specify + // this source. + ConfiguredInput *string `locationName:"configuredInput" type:"string" enum:"InputDeviceConfiguredInput"` + + // The state of the input device. + DeviceState *string `locationName:"deviceState" type:"string" enum:"InputDeviceState"` + + // The frame rate of the video source. + Framerate *float64 `locationName:"framerate" type:"double"` + + // The height of the video source, in pixels. + Height *int64 `locationName:"height" type:"integer"` + + // The current maximum bitrate for ingesting this source, in bits per second. + // You can specify this maximum. + MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` + + // The scan type of the video source. + ScanType *string `locationName:"scanType" type:"string" enum:"InputDeviceScanType"` + + // The width of the video source, in pixels. + Width *int64 `locationName:"width" type:"integer"` +} + +// String returns the string representation +func (s InputDeviceHdSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDeviceHdSettings) GoString() string { + return s.String() +} + +// SetActiveInput sets the ActiveInput field's value. +func (s *InputDeviceHdSettings) SetActiveInput(v string) *InputDeviceHdSettings { + s.ActiveInput = &v + return s +} + +// SetConfiguredInput sets the ConfiguredInput field's value. +func (s *InputDeviceHdSettings) SetConfiguredInput(v string) *InputDeviceHdSettings { + s.ConfiguredInput = &v + return s +} + +// SetDeviceState sets the DeviceState field's value. +func (s *InputDeviceHdSettings) SetDeviceState(v string) *InputDeviceHdSettings { + s.DeviceState = &v + return s +} + +// SetFramerate sets the Framerate field's value. +func (s *InputDeviceHdSettings) SetFramerate(v float64) *InputDeviceHdSettings { + s.Framerate = &v + return s +} + +// SetHeight sets the Height field's value. +func (s *InputDeviceHdSettings) SetHeight(v int64) *InputDeviceHdSettings { + s.Height = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *InputDeviceHdSettings) SetMaxBitrate(v int64) *InputDeviceHdSettings { + s.MaxBitrate = &v + return s +} + +// SetScanType sets the ScanType field's value. +func (s *InputDeviceHdSettings) SetScanType(v string) *InputDeviceHdSettings { + s.ScanType = &v + return s +} + +// SetWidth sets the Width field's value. +func (s *InputDeviceHdSettings) SetWidth(v int64) *InputDeviceHdSettings { + s.Width = &v + return s +} + +// The network settings for the input device. +type InputDeviceNetworkSettings struct { + _ struct{} `type:"structure"` + + // The DNS addresses of the input device. + DnsAddresses []*string `locationName:"dnsAddresses" type:"list"` + + // The network gateway IP address. + Gateway *string `locationName:"gateway" type:"string"` + + // The IP address of the input device. + IpAddress *string `locationName:"ipAddress" type:"string"` + + // Specifies whether the input device has been configured (outside of MediaLive) + // to use a dynamic IP address assignment (DHCP) or a static IP address. + IpScheme *string `locationName:"ipScheme" type:"string" enum:"InputDeviceIpScheme"` + + // The subnet mask of the input device. + SubnetMask *string `locationName:"subnetMask" type:"string"` +} + +// String returns the string representation +func (s InputDeviceNetworkSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDeviceNetworkSettings) GoString() string { + return s.String() +} + +// SetDnsAddresses sets the DnsAddresses field's value. +func (s *InputDeviceNetworkSettings) SetDnsAddresses(v []*string) *InputDeviceNetworkSettings { + s.DnsAddresses = v + return s +} + +// SetGateway sets the Gateway field's value. +func (s *InputDeviceNetworkSettings) SetGateway(v string) *InputDeviceNetworkSettings { + s.Gateway = &v + return s +} + +// SetIpAddress sets the IpAddress field's value. +func (s *InputDeviceNetworkSettings) SetIpAddress(v string) *InputDeviceNetworkSettings { + s.IpAddress = &v + return s +} + +// SetIpScheme sets the IpScheme field's value. +func (s *InputDeviceNetworkSettings) SetIpScheme(v string) *InputDeviceNetworkSettings { + s.IpScheme = &v + return s +} + +// SetSubnetMask sets the SubnetMask field's value. +func (s *InputDeviceNetworkSettings) SetSubnetMask(v string) *InputDeviceNetworkSettings { + s.SubnetMask = &v + return s +} + +// Settings for an input device. +type InputDeviceRequest struct { + _ struct{} `type:"structure"` + + // The unique ID for the device. + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s InputDeviceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDeviceRequest) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *InputDeviceRequest) SetId(v string) *InputDeviceRequest { + s.Id = &v + return s +} + +// Settings for an input device. +type InputDeviceSettings struct { + _ struct{} `type:"structure"` + + // The unique ID for the device. + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s InputDeviceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDeviceSettings) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *InputDeviceSettings) SetId(v string) *InputDeviceSettings { + s.Id = &v + return s +} + +// Details of the input device. +type InputDeviceSummary struct { + _ struct{} `type:"structure"` + + // The unique ARN of the input device. + Arn *string `locationName:"arn" type:"string"` + + // The state of the connection between the input device and AWS. + ConnectionState *string `locationName:"connectionState" type:"string" enum:"InputDeviceConnectionState"` + + // The status of the action to synchronize the device configuration. If you + // change the configuration of the input device (for example, the maximum bitrate), + // MediaLive sends the new data to the device. The device might not update itself + // immediately. SYNCED means the device has updated its configuration. SYNCING + // means that it has not updated its configuration. + DeviceSettingsSyncState *string `locationName:"deviceSettingsSyncState" type:"string" enum:"DeviceSettingsSyncState"` + + // Settings that describe an input device that is type HD. + HdDeviceSettings *InputDeviceHdSettings `locationName:"hdDeviceSettings" type:"structure"` + + // The unique ID of the input device. + Id *string `locationName:"id" type:"string"` + + // The network MAC address of the input device. + MacAddress *string `locationName:"macAddress" type:"string"` + + // A name that you specify for the input device. + Name *string `locationName:"name" type:"string"` + + // Network settings for the input device. + NetworkSettings *InputDeviceNetworkSettings `locationName:"networkSettings" type:"structure"` + + // The unique serial number of the input device. + SerialNumber *string `locationName:"serialNumber" type:"string"` + + // The type of the input device. + Type *string `locationName:"type" type:"string" enum:"InputDeviceType"` +} + +// String returns the string representation +func (s InputDeviceSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDeviceSummary) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *InputDeviceSummary) SetArn(v string) *InputDeviceSummary { + s.Arn = &v + return s +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *InputDeviceSummary) SetConnectionState(v string) *InputDeviceSummary { + s.ConnectionState = &v + return s +} + +// SetDeviceSettingsSyncState sets the DeviceSettingsSyncState field's value. +func (s *InputDeviceSummary) SetDeviceSettingsSyncState(v string) *InputDeviceSummary { + s.DeviceSettingsSyncState = &v + return s +} + +// SetHdDeviceSettings sets the HdDeviceSettings field's value. +func (s *InputDeviceSummary) SetHdDeviceSettings(v *InputDeviceHdSettings) *InputDeviceSummary { + s.HdDeviceSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *InputDeviceSummary) SetId(v string) *InputDeviceSummary { + s.Id = &v + return s +} + +// SetMacAddress sets the MacAddress field's value. +func (s *InputDeviceSummary) SetMacAddress(v string) *InputDeviceSummary { + s.MacAddress = &v + return s +} + +// SetName sets the Name field's value. +func (s *InputDeviceSummary) SetName(v string) *InputDeviceSummary { + s.Name = &v + return s +} + +// SetNetworkSettings sets the NetworkSettings field's value. +func (s *InputDeviceSummary) SetNetworkSettings(v *InputDeviceNetworkSettings) *InputDeviceSummary { + s.NetworkSettings = v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *InputDeviceSummary) SetSerialNumber(v string) *InputDeviceSummary { + s.SerialNumber = &v + return s +} + +// SetType sets the Type field's value. +func (s *InputDeviceSummary) SetType(v string) *InputDeviceSummary { + s.Type = &v + return s +} + +// Input Location +type InputLocation struct { + _ struct{} `type:"structure"` + + // key used to extract the password from EC2 Parameter store + PasswordParam *string `locationName:"passwordParam" type:"string"` + + // Uniform Resource Identifier - This should be a path to a file accessible + // to the Live system (eg. a http:// URI) depending on the output type. For + // example, a RTMP destination should have a uri simliar to: "rtmp://fmsserver/live". + // + // Uri is a required field + Uri *string `locationName:"uri" type:"string" required:"true"` + + // Username if credentials are required to access a file or publishing point. + // This can be either a plaintext username, or a reference to an AWS parameter + // store name from which the username can be retrieved. AWS Parameter store + // format: "ssm://" Username *string `locationName:"username" type:"string"` } @@ -13822,6 +14916,13 @@ type InputSettings struct { // Input settings. NetworkInputSettings *NetworkInputSettings `locationName:"networkInputSettings" type:"structure"` + // Specifies whether to extract applicable ancillary data from a SMPTE-2038 + // source in this input. Applicable data types are captions, timecode, AFD, + // and SCTE-104 messages.- PREFER: Extract from SMPTE-2038 if present in this + // input, otherwise extract from another source (if any).- IGNORE: Never extract + // any ancillary data from SMPTE-2038. + Smpte2038DataPreference *string `locationName:"smpte2038DataPreference" type:"string" enum:"Smpte2038DataPreference"` + // Loop input if it is a file. This allows a file input to be streamed indefinitely. SourceEndBehavior *string `locationName:"sourceEndBehavior" type:"string" enum:"InputSourceEndBehavior"` @@ -13915,6 +15016,12 @@ func (s *InputSettings) SetNetworkInputSettings(v *NetworkInputSettings) *InputS return s } +// SetSmpte2038DataPreference sets the Smpte2038DataPreference field's value. +func (s *InputSettings) SetSmpte2038DataPreference(v string) *InputSettings { + s.Smpte2038DataPreference = &v + return s +} + // SetSourceEndBehavior sets the SourceEndBehavior field's value. func (s *InputSettings) SetSourceEndBehavior(v string) *InputSettings { s.SourceEndBehavior = &v @@ -14223,8 +15330,8 @@ func (s *InputWhitelistRuleCidr) SetCidr(v string) *InputWhitelistRuleCidr { } type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14241,17 +15348,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14259,64 +15366,137 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Key Provider Settings +type KeyProviderSettings struct { + _ struct{} `type:"structure"` + + // Static Key Settings + StaticKeySettings *StaticKeySettings `locationName:"staticKeySettings" type:"structure"` +} + +// String returns the string representation +func (s KeyProviderSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KeyProviderSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KeyProviderSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KeyProviderSettings"} + if s.StaticKeySettings != nil { + if err := s.StaticKeySettings.Validate(); err != nil { + invalidParams.AddNested("StaticKeySettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStaticKeySettings sets the StaticKeySettings field's value. +func (s *KeyProviderSettings) SetStaticKeySettings(v *StaticKeySettings) *KeyProviderSettings { + s.StaticKeySettings = v + return s +} + +type ListChannelsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListChannelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListChannelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListChannelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { + s.NextToken = &v + return s } -// Key Provider Settings -type KeyProviderSettings struct { +type ListChannelsOutput struct { _ struct{} `type:"structure"` - // Static Key Settings - StaticKeySettings *StaticKeySettings `locationName:"staticKeySettings" type:"structure"` + Channels []*ChannelSummary `locationName:"channels" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s KeyProviderSettings) String() string { +func (s ListChannelsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s KeyProviderSettings) GoString() string { +func (s ListChannelsOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *KeyProviderSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KeyProviderSettings"} - if s.StaticKeySettings != nil { - if err := s.StaticKeySettings.Validate(); err != nil { - invalidParams.AddNested("StaticKeySettings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetChannels sets the Channels field's value. +func (s *ListChannelsOutput) SetChannels(v []*ChannelSummary) *ListChannelsOutput { + s.Channels = v + return s } -// SetStaticKeySettings sets the StaticKeySettings field's value. -func (s *KeyProviderSettings) SetStaticKeySettings(v *StaticKeySettings) *KeyProviderSettings { - s.StaticKeySettings = v +// SetNextToken sets the NextToken field's value. +func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { + s.NextToken = &v return s } -type ListChannelsInput struct { +type ListInputDevicesInput struct { _ struct{} `type:"structure"` MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` @@ -14325,18 +15505,18 @@ type ListChannelsInput struct { } // String returns the string representation -func (s ListChannelsInput) String() string { +func (s ListInputDevicesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListChannelsInput) GoString() string { +func (s ListInputDevicesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListChannelsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"} +func (s *ListInputDevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInputDevicesInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -14348,43 +15528,43 @@ func (s *ListChannelsInput) Validate() error { } // SetMaxResults sets the MaxResults field's value. -func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput { +func (s *ListInputDevicesInput) SetMaxResults(v int64) *ListInputDevicesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { +func (s *ListInputDevicesInput) SetNextToken(v string) *ListInputDevicesInput { s.NextToken = &v return s } -type ListChannelsOutput struct { +type ListInputDevicesOutput struct { _ struct{} `type:"structure"` - Channels []*ChannelSummary `locationName:"channels" type:"list"` + InputDevices []*InputDeviceSummary `locationName:"inputDevices" type:"list"` NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s ListChannelsOutput) String() string { +func (s ListInputDevicesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListChannelsOutput) GoString() string { +func (s ListInputDevicesOutput) GoString() string { return s.String() } -// SetChannels sets the Channels field's value. -func (s *ListChannelsOutput) SetChannels(v []*ChannelSummary) *ListChannelsOutput { - s.Channels = v +// SetInputDevices sets the InputDevices field's value. +func (s *ListInputDevicesOutput) SetInputDevices(v []*InputDeviceSummary) *ListInputDevicesOutput { + s.InputDevices = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { +func (s *ListInputDevicesOutput) SetNextToken(v string) *ListInputDevicesOutput { s.NextToken = &v return s } @@ -15257,7 +16437,7 @@ type M2tsSettings struct { SegmentationStyle *string `locationName:"segmentationStyle" type:"string" enum:"M2tsSegmentationStyle"` // The length in seconds of each segment. Required unless markers is set to - // None_. + // _none_. SegmentationTime *float64 `locationName:"segmentationTime" type:"double"` // When set to passthrough, timed metadata will be passed through from input @@ -15970,8 +17150,8 @@ func (s *Mp2Settings) SetSampleRate(v float64) *Mp2Settings { type MsSmoothGroupSettings struct { _ struct{} `type:"structure"` - // The value of the "Acquisition Point Identity" element used in each message - // placed in the sparse track. Only enabled if sparseTrackType is not "none". + // The ID to include in each message in the sparse track. Ignored if sparseTrackType + // is NONE. AcquisitionPointId *string `locationName:"acquisitionPointId" type:"string"` // If set to passthrough for an audio-only MS Smooth output, the fragment absolute @@ -16034,8 +17214,12 @@ type MsSmoothGroupSettings struct { // Number of milliseconds to delay the output from the second pipeline. SendDelayMs *int64 `locationName:"sendDelayMs" type:"integer"` - // If set to scte35, use incoming SCTE-35 messages to generate a sparse track - // in this group of MS-Smooth outputs. + // Identifies the type of data to place in the sparse track:- SCTE35: Insert + // SCTE-35 messages from the source content. With each message, insert an IDR + // frame to start a new segment.- SCTE35_WITHOUT_SEGMENTATION: Insert SCTE-35 + // messages from the source content. With each message, insert an IDR frame + // but don't start a new segment.- NONE: Don't generate a sparse track for any + // outputs in this output group. SparseTrackType *string `locationName:"sparseTrackType" type:"string" enum:"SmoothGroupSparseTrackType"` // When set to send, send stream manifest so publishing point doesn't start @@ -17190,8 +18374,8 @@ func (s *NielsenConfiguration) SetNielsenPcmToId3Tagging(v string) *NielsenConfi } type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17208,17 +18392,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17226,22 +18410,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Reserved resources available for purchase @@ -20754,6 +21938,43 @@ func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings return s } +// Temporal Filter Settings +type TemporalFilterSettings struct { + _ struct{} `type:"structure"` + + // If you enable this filter, the results are the following:- If the source + // content is noisy (it contains excessive digital artifacts), the filter cleans + // up the source.- If the source content is already clean, the filter tends + // to decrease the bitrate, especially when the rate control mode is QVBR. + PostFilterSharpening *string `locationName:"postFilterSharpening" type:"string" enum:"TemporalFilterPostFilterSharpening"` + + // Choose a filter strength. We recommend a strength of 1 or 2. A higher strength + // might take out good information, resulting in an image that is overly soft. + Strength *string `locationName:"strength" type:"string" enum:"TemporalFilterStrength"` +} + +// String returns the string representation +func (s TemporalFilterSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TemporalFilterSettings) GoString() string { + return s.String() +} + +// SetPostFilterSharpening sets the PostFilterSharpening field's value. +func (s *TemporalFilterSettings) SetPostFilterSharpening(v string) *TemporalFilterSettings { + s.PostFilterSharpening = &v + return s +} + +// SetStrength sets the Strength field's value. +func (s *TemporalFilterSettings) SetStrength(v string) *TemporalFilterSettings { + s.Strength = &v + return s +} + // Timecode Config type TimecodeConfig struct { _ struct{} `type:"structure"` @@ -20814,8 +22035,8 @@ func (s *TimecodeConfig) SetSyncThreshold(v int64) *TimecodeConfig { } type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -20832,17 +22053,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20850,22 +22071,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Ttml Destination Settings @@ -21067,8 +22288,8 @@ func (s *UdpOutputSettings) SetFecOutputSettings(v *FecOutputSettings) *UdpOutpu } type UnprocessableEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -21087,17 +22308,17 @@ func (s UnprocessableEntityException) GoString() string { func newErrorUnprocessableEntityException(v protocol.ResponseMetadata) error { return &UnprocessableEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnprocessableEntityException) Code() string { +func (s *UnprocessableEntityException) Code() string { return "UnprocessableEntityException" } // Message returns the exception's message. -func (s UnprocessableEntityException) Message() string { +func (s *UnprocessableEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -21105,22 +22326,22 @@ func (s UnprocessableEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnprocessableEntityException) OrigErr() error { +func (s *UnprocessableEntityException) OrigErr() error { return nil } -func (s UnprocessableEntityException) Error() string { +func (s *UnprocessableEntityException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnprocessableEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnprocessableEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnprocessableEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnprocessableEntityException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateChannelClassInput struct { @@ -21361,11 +22582,174 @@ func (s *UpdateChannelOutput) SetChannel(v *Channel) *UpdateChannelOutput { return s } +type UpdateInputDeviceInput struct { + _ struct{} `type:"structure"` + + // Configurable settings for the input device. + HdDeviceSettings *InputDeviceConfigurableSettings `locationName:"hdDeviceSettings" type:"structure"` + + // InputDeviceId is a required field + InputDeviceId *string `location:"uri" locationName:"inputDeviceId" type:"string" required:"true"` + + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s UpdateInputDeviceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputDeviceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInputDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInputDeviceInput"} + if s.InputDeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("InputDeviceId")) + } + if s.InputDeviceId != nil && len(*s.InputDeviceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputDeviceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHdDeviceSettings sets the HdDeviceSettings field's value. +func (s *UpdateInputDeviceInput) SetHdDeviceSettings(v *InputDeviceConfigurableSettings) *UpdateInputDeviceInput { + s.HdDeviceSettings = v + return s +} + +// SetInputDeviceId sets the InputDeviceId field's value. +func (s *UpdateInputDeviceInput) SetInputDeviceId(v string) *UpdateInputDeviceInput { + s.InputDeviceId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInputDeviceInput) SetName(v string) *UpdateInputDeviceInput { + s.Name = &v + return s +} + +type UpdateInputDeviceOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + // The state of the connection between the input device and AWS. + ConnectionState *string `locationName:"connectionState" type:"string" enum:"InputDeviceConnectionState"` + + // The status of the action to synchronize the device configuration. If you + // change the configuration of the input device (for example, the maximum bitrate), + // MediaLive sends the new data to the device. The device might not update itself + // immediately. SYNCED means the device has updated its configuration. SYNCING + // means that it has not updated its configuration. + DeviceSettingsSyncState *string `locationName:"deviceSettingsSyncState" type:"string" enum:"DeviceSettingsSyncState"` + + // Settings that describe the active source from the input device, and the video + // characteristics of that source. + HdDeviceSettings *InputDeviceHdSettings `locationName:"hdDeviceSettings" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + MacAddress *string `locationName:"macAddress" type:"string"` + + Name *string `locationName:"name" type:"string"` + + // The network settings for the input device. + NetworkSettings *InputDeviceNetworkSettings `locationName:"networkSettings" type:"structure"` + + SerialNumber *string `locationName:"serialNumber" type:"string"` + + // The type of the input device. For an AWS Elemental Link device that outputs + // resolutions up to 1080, choose "HD". + Type *string `locationName:"type" type:"string" enum:"InputDeviceType"` +} + +// String returns the string representation +func (s UpdateInputDeviceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputDeviceOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *UpdateInputDeviceOutput) SetArn(v string) *UpdateInputDeviceOutput { + s.Arn = &v + return s +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *UpdateInputDeviceOutput) SetConnectionState(v string) *UpdateInputDeviceOutput { + s.ConnectionState = &v + return s +} + +// SetDeviceSettingsSyncState sets the DeviceSettingsSyncState field's value. +func (s *UpdateInputDeviceOutput) SetDeviceSettingsSyncState(v string) *UpdateInputDeviceOutput { + s.DeviceSettingsSyncState = &v + return s +} + +// SetHdDeviceSettings sets the HdDeviceSettings field's value. +func (s *UpdateInputDeviceOutput) SetHdDeviceSettings(v *InputDeviceHdSettings) *UpdateInputDeviceOutput { + s.HdDeviceSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateInputDeviceOutput) SetId(v string) *UpdateInputDeviceOutput { + s.Id = &v + return s +} + +// SetMacAddress sets the MacAddress field's value. +func (s *UpdateInputDeviceOutput) SetMacAddress(v string) *UpdateInputDeviceOutput { + s.MacAddress = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInputDeviceOutput) SetName(v string) *UpdateInputDeviceOutput { + s.Name = &v + return s +} + +// SetNetworkSettings sets the NetworkSettings field's value. +func (s *UpdateInputDeviceOutput) SetNetworkSettings(v *InputDeviceNetworkSettings) *UpdateInputDeviceOutput { + s.NetworkSettings = v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *UpdateInputDeviceOutput) SetSerialNumber(v string) *UpdateInputDeviceOutput { + s.SerialNumber = &v + return s +} + +// SetType sets the Type field's value. +func (s *UpdateInputDeviceOutput) SetType(v string) *UpdateInputDeviceOutput { + s.Type = &v + return s +} + type UpdateInputInput struct { _ struct{} `type:"structure"` Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` + InputDevices []*InputDeviceRequest `locationName:"inputDevices" type:"list"` + // InputId is a required field InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` @@ -21412,6 +22796,12 @@ func (s *UpdateInputInput) SetDestinations(v []*InputDestinationRequest) *Update return s } +// SetInputDevices sets the InputDevices field's value. +func (s *UpdateInputInput) SetInputDevices(v []*InputDeviceRequest) *UpdateInputInput { + s.InputDevices = v + return s +} + // SetInputId sets the InputId field's value. func (s *UpdateInputInput) SetInputId(v string) *UpdateInputInput { s.InputId = &v @@ -21796,8 +23186,10 @@ func (s *UpdateReservationOutput) SetReservation(v *Reservation) *UpdateReservat type ValidationError struct { _ struct{} `type:"structure"` + // Path to the source of the error. ElementPath *string `locationName:"elementPath" type:"string"` + // The error message. ErrorMessage *string `locationName:"errorMessage" type:"string"` } @@ -21912,15 +23304,15 @@ type VideoDescription struct { // Indicates how to respond to the AFD values in the input stream. RESPOND causes // input video to be clipped, depending on the AFD value, input display aspect - // ratio, and output display aspect ratio, and (except for FRAMECAPTURE codec) - // includes the values in the output. PASSTHROUGH (does not apply to FRAMECAPTURE + // ratio, and output display aspect ratio, and (except for FRAME_CAPTURE codec) + // includes the values in the output. PASSTHROUGH (does not apply to FRAME_CAPTURE // codec) ignores the AFD values and includes the values in the output, so input // video is not clipped. NONE ignores the AFD values and does not include the // values through to the output, so input video is not clipped. RespondToAfd *string `locationName:"respondToAfd" type:"string" enum:"VideoDescriptionRespondToAfd"` - // STRETCHTOOUTPUT configures the output position to stretch the video to the - // specified output resolution (height and width). This option will override + // STRETCH_TO_OUTPUT configures the output position to stretch the video to + // the specified output resolution (height and width). This option will override // any position value. DEFAULT may insert black boxes (pillar boxes or letter // boxes) around the video to provide the specified output resolution. ScalingBehavior *string `locationName:"scalingBehavior" type:"string" enum:"VideoDescriptionScalingBehavior"` @@ -22568,6 +23960,19 @@ const ( ChannelStateUpdateFailed = "UPDATE_FAILED" ) +// The status of the action to synchronize the device configuration. If you +// change the configuration of the input device (for example, the maximum bitrate), +// MediaLive sends the new data to the device. The device might not update itself +// immediately. SYNCED means the device has updated its configuration. SYNCING +// means that it has not updated its configuration. +const ( + // DeviceSettingsSyncStateSynced is a DeviceSettingsSyncState enum value + DeviceSettingsSyncStateSynced = "SYNCED" + + // DeviceSettingsSyncStateSyncing is a DeviceSettingsSyncState enum value + DeviceSettingsSyncStateSyncing = "SYNCING" +) + // Dvb Sdt Output Sdt const ( // DvbSdtOutputSdtSdtFollow is a DvbSdtOutputSdt enum value @@ -22907,6 +24312,24 @@ const ( FixedAfdAfd1111 = "AFD_1111" ) +// Fmp4 Nielsen Id3 Behavior +const ( + // Fmp4NielsenId3BehaviorNoPassthrough is a Fmp4NielsenId3Behavior enum value + Fmp4NielsenId3BehaviorNoPassthrough = "NO_PASSTHROUGH" + + // Fmp4NielsenId3BehaviorPassthrough is a Fmp4NielsenId3Behavior enum value + Fmp4NielsenId3BehaviorPassthrough = "PASSTHROUGH" +) + +// Fmp4 Timed Metadata Behavior +const ( + // Fmp4TimedMetadataBehaviorNoPassthrough is a Fmp4TimedMetadataBehavior enum value + Fmp4TimedMetadataBehaviorNoPassthrough = "NO_PASSTHROUGH" + + // Fmp4TimedMetadataBehaviorPassthrough is a Fmp4TimedMetadataBehavior enum value + Fmp4TimedMetadataBehaviorPassthrough = "PASSTHROUGH" +) + // Follow reference point. const ( // FollowPointEnd is a FollowPoint enum value @@ -23009,6 +24432,15 @@ const ( H264FlickerAqEnabled = "ENABLED" ) +// H264 Force Field Pictures +const ( + // H264ForceFieldPicturesDisabled is a H264ForceFieldPictures enum value + H264ForceFieldPicturesDisabled = "DISABLED" + + // H264ForceFieldPicturesEnabled is a H264ForceFieldPictures enum value + H264ForceFieldPicturesEnabled = "ENABLED" +) + // H264 Framerate Control const ( // H264FramerateControlInitializeFromSource is a H264FramerateControl enum value @@ -23132,6 +24564,15 @@ const ( H264ProfileMain = "MAIN" ) +// H264 Quality Level +const ( + // H264QualityLevelEnhancedQuality is a H264QualityLevel enum value + H264QualityLevelEnhancedQuality = "ENHANCED_QUALITY" + + // H264QualityLevelStandardQuality is a H264QualityLevel enum value + H264QualityLevelStandardQuality = "STANDARD_QUALITY" +) + // H264 Rate Control Mode const ( // H264RateControlModeCbr is a H264RateControlMode enum value @@ -23641,6 +25082,71 @@ const ( InputDenoiseFilterEnabled = "ENABLED" ) +// The source at the input device that is currently active. +const ( + // InputDeviceActiveInputHdmi is a InputDeviceActiveInput enum value + InputDeviceActiveInputHdmi = "HDMI" + + // InputDeviceActiveInputSdi is a InputDeviceActiveInput enum value + InputDeviceActiveInputSdi = "SDI" +) + +// The source to activate (use) from the input device. +const ( + // InputDeviceConfiguredInputAuto is a InputDeviceConfiguredInput enum value + InputDeviceConfiguredInputAuto = "AUTO" + + // InputDeviceConfiguredInputHdmi is a InputDeviceConfiguredInput enum value + InputDeviceConfiguredInputHdmi = "HDMI" + + // InputDeviceConfiguredInputSdi is a InputDeviceConfiguredInput enum value + InputDeviceConfiguredInputSdi = "SDI" +) + +// The state of the connection between the input device and AWS. +const ( + // InputDeviceConnectionStateDisconnected is a InputDeviceConnectionState enum value + InputDeviceConnectionStateDisconnected = "DISCONNECTED" + + // InputDeviceConnectionStateConnected is a InputDeviceConnectionState enum value + InputDeviceConnectionStateConnected = "CONNECTED" +) + +// Specifies whether the input device has been configured (outside of MediaLive) +// to use a dynamic IP address assignment (DHCP) or a static IP address. +const ( + // InputDeviceIpSchemeStatic is a InputDeviceIpScheme enum value + InputDeviceIpSchemeStatic = "STATIC" + + // InputDeviceIpSchemeDhcp is a InputDeviceIpScheme enum value + InputDeviceIpSchemeDhcp = "DHCP" +) + +// The scan type of the video source. +const ( + // InputDeviceScanTypeInterlaced is a InputDeviceScanType enum value + InputDeviceScanTypeInterlaced = "INTERLACED" + + // InputDeviceScanTypeProgressive is a InputDeviceScanType enum value + InputDeviceScanTypeProgressive = "PROGRESSIVE" +) + +// The state of the input device. +const ( + // InputDeviceStateIdle is a InputDeviceState enum value + InputDeviceStateIdle = "IDLE" + + // InputDeviceStateStreaming is a InputDeviceState enum value + InputDeviceStateStreaming = "STREAMING" +) + +// The type of the input device. For an AWS Elemental Link device that outputs +// resolutions up to 1080, choose "HD". +const ( + // InputDeviceTypeHd is a InputDeviceType enum value + InputDeviceTypeHd = "HD" +) + // Input Filter const ( // InputFilterAuto is a InputFilter enum value @@ -23714,6 +25220,18 @@ const ( InputMaximumBitrateMax50Mbps = "MAX_50_MBPS" ) +// Input preference when deciding which input to make active when a previously +// failed input has recovered.If \"EQUAL_INPUT_PREFERENCE\", then the active +// input will stay active as long as it is healthy.If \"PRIMARY_INPUT_PREFERRED\", +// then always switch back to the primary input when it is healthy. +const ( + // InputPreferenceEqualInputPreference is a InputPreference enum value + InputPreferenceEqualInputPreference = "EQUAL_INPUT_PREFERENCE" + + // InputPreferencePrimaryInputPreferred is a InputPreference enum value + InputPreferencePrimaryInputPreferred = "PRIMARY_INPUT_PREFERRED" +) + // Input resolution based on lines of vertical resolution in the input; SD is // less than 720 lines, HD is 720 to 1080 lines, UHD is greater than 1080 lines const ( @@ -23815,6 +25333,9 @@ const ( // InputTypeMediaconnect is a InputType enum value InputTypeMediaconnect = "MEDIACONNECT" + + // InputTypeInputDevice is a InputType enum value + InputTypeInputDevice = "INPUT_DEVICE" ) // If you specify a StopTimecode in an input (in order to clip the file), you @@ -24465,6 +25986,9 @@ const ( // SmoothGroupSparseTrackTypeScte35 is a SmoothGroupSparseTrackType enum value SmoothGroupSparseTrackTypeScte35 = "SCTE_35" + + // SmoothGroupSparseTrackTypeScte35WithoutSegmentation is a SmoothGroupSparseTrackType enum value + SmoothGroupSparseTrackTypeScte35WithoutSegmentation = "SCTE_35_WITHOUT_SEGMENTATION" ) // Smooth Group Stream Manifest Behavior @@ -24485,6 +26009,81 @@ const ( SmoothGroupTimestampOffsetModeUseEventStartDate = "USE_EVENT_START_DATE" ) +// Smpte2038 Data Preference +const ( + // Smpte2038DataPreferenceIgnore is a Smpte2038DataPreference enum value + Smpte2038DataPreferenceIgnore = "IGNORE" + + // Smpte2038DataPreferencePrefer is a Smpte2038DataPreference enum value + Smpte2038DataPreferencePrefer = "PREFER" +) + +// Temporal Filter Post Filter Sharpening +const ( + // TemporalFilterPostFilterSharpeningAuto is a TemporalFilterPostFilterSharpening enum value + TemporalFilterPostFilterSharpeningAuto = "AUTO" + + // TemporalFilterPostFilterSharpeningDisabled is a TemporalFilterPostFilterSharpening enum value + TemporalFilterPostFilterSharpeningDisabled = "DISABLED" + + // TemporalFilterPostFilterSharpeningEnabled is a TemporalFilterPostFilterSharpening enum value + TemporalFilterPostFilterSharpeningEnabled = "ENABLED" +) + +// Temporal Filter Strength +const ( + // TemporalFilterStrengthAuto is a TemporalFilterStrength enum value + TemporalFilterStrengthAuto = "AUTO" + + // TemporalFilterStrengthStrength1 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength1 = "STRENGTH_1" + + // TemporalFilterStrengthStrength2 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength2 = "STRENGTH_2" + + // TemporalFilterStrengthStrength3 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength3 = "STRENGTH_3" + + // TemporalFilterStrengthStrength4 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength4 = "STRENGTH_4" + + // TemporalFilterStrengthStrength5 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength5 = "STRENGTH_5" + + // TemporalFilterStrengthStrength6 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength6 = "STRENGTH_6" + + // TemporalFilterStrengthStrength7 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength7 = "STRENGTH_7" + + // TemporalFilterStrengthStrength8 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength8 = "STRENGTH_8" + + // TemporalFilterStrengthStrength9 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength9 = "STRENGTH_9" + + // TemporalFilterStrengthStrength10 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength10 = "STRENGTH_10" + + // TemporalFilterStrengthStrength11 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength11 = "STRENGTH_11" + + // TemporalFilterStrengthStrength12 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength12 = "STRENGTH_12" + + // TemporalFilterStrengthStrength13 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength13 = "STRENGTH_13" + + // TemporalFilterStrengthStrength14 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength14 = "STRENGTH_14" + + // TemporalFilterStrengthStrength15 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength15 = "STRENGTH_15" + + // TemporalFilterStrengthStrength16 is a TemporalFilterStrength enum value + TemporalFilterStrengthStrength16 = "STRENGTH_16" +) + // Timecode Config Source const ( // TimecodeConfigSourceEmbedded is a TimecodeConfigSource enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/waiters.go index 36fb19d08c9..88b51e2ab9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/waiters.go @@ -89,7 +89,7 @@ func (c *MediaLive) WaitUntilChannelDeleted(input *DescribeChannelInput) error { func (c *MediaLive) WaitUntilChannelDeletedWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilChannelDeleted", - MaxAttempts: 20, + MaxAttempts: 84, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { @@ -201,7 +201,7 @@ func (c *MediaLive) WaitUntilChannelStopped(input *DescribeChannelInput) error { func (c *MediaLive) WaitUntilChannelStoppedWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilChannelStopped", - MaxAttempts: 28, + MaxAttempts: 60, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { @@ -238,6 +238,179 @@ func (c *MediaLive) WaitUntilChannelStoppedWithContext(ctx aws.Context, input *D return w.WaitWithContext(ctx) } +// WaitUntilInputAttached uses the MediaLive API operation +// DescribeInput to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *MediaLive) WaitUntilInputAttached(input *DescribeInputInput) error { + return c.WaitUntilInputAttachedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilInputAttachedWithContext is an extended version of WaitUntilInputAttached. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) WaitUntilInputAttachedWithContext(ctx aws.Context, input *DescribeInputInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilInputAttached", + MaxAttempts: 20, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "ATTACHED", + }, + { + State: request.RetryWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "DETACHED", + }, + { + State: request.RetryWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 500, + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeInputInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeInputRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilInputDeleted uses the MediaLive API operation +// DescribeInput to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *MediaLive) WaitUntilInputDeleted(input *DescribeInputInput) error { + return c.WaitUntilInputDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilInputDeletedWithContext is an extended version of WaitUntilInputDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) WaitUntilInputDeletedWithContext(ctx aws.Context, input *DescribeInputInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilInputDeleted", + MaxAttempts: 20, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "DELETED", + }, + { + State: request.RetryWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "DELETING", + }, + { + State: request.RetryWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 500, + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeInputInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeInputRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilInputDetached uses the MediaLive API operation +// DescribeInput to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *MediaLive) WaitUntilInputDetached(input *DescribeInputInput) error { + return c.WaitUntilInputDetachedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilInputDetachedWithContext is an extended version of WaitUntilInputDetached. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) WaitUntilInputDetachedWithContext(ctx aws.Context, input *DescribeInputInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilInputDetached", + MaxAttempts: 84, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "DETACHED", + }, + { + State: request.RetryWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "CREATING", + }, + { + State: request.RetryWaiterState, + Matcher: request.PathWaiterMatch, Argument: "State", + Expected: "ATTACHED", + }, + { + State: request.RetryWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 500, + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeInputInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeInputRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + // WaitUntilMultiplexCreated uses the MediaLive API operation // DescribeMultiplex to wait for a condition to be met before returning. // If the condition is not met within the max attempt window, an error will 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 2f468581307..23f6d0237c8 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 @@ -3412,8 +3412,8 @@ func (s *DescribeOriginEndpointOutput) SetWhitelist(v []*string) *DescribeOrigin } type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3430,17 +3430,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3448,22 +3448,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // A HarvestJob resource configuration @@ -4120,8 +4120,8 @@ func (s *IngestEndpoint) SetUsername(v string) *IngestEndpoint { } type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4138,17 +4138,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4156,22 +4156,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ListChannelsInput struct { @@ -4590,8 +4590,8 @@ func (s *MssPackage) SetStreamSelection(v *StreamSelection) *MssPackage { } type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4608,17 +4608,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4626,22 +4626,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An OriginEndpoint resource configuration. @@ -5086,8 +5086,8 @@ func (s *S3Destination) SetRoleArn(v string) *S3Destination { } type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5104,17 +5104,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5122,22 +5122,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // A configuration for accessing an external Secure Packager and Encoder Key @@ -5342,8 +5342,8 @@ func (s TagResourceOutput) GoString() string { } type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5360,17 +5360,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5378,27 +5378,27 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } type UnprocessableEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5415,17 +5415,17 @@ func (s UnprocessableEntityException) GoString() string { func newErrorUnprocessableEntityException(v protocol.ResponseMetadata) error { return &UnprocessableEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnprocessableEntityException) Code() string { +func (s *UnprocessableEntityException) Code() string { return "UnprocessableEntityException" } // Message returns the exception's message. -func (s UnprocessableEntityException) Message() string { +func (s *UnprocessableEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5433,22 +5433,22 @@ func (s UnprocessableEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnprocessableEntityException) OrigErr() error { +func (s *UnprocessableEntityException) OrigErr() error { return nil } -func (s UnprocessableEntityException) Error() string { +func (s *UnprocessableEntityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnprocessableEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnprocessableEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnprocessableEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnprocessableEntityException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 daa0851e7dc..1eac3f1834d 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 @@ -465,6 +465,98 @@ func (c *MediaStore) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDeleteMetricPolicy = "DeleteMetricPolicy" + +// DeleteMetricPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteMetricPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteMetricPolicy for more information on using the DeleteMetricPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteMetricPolicyRequest method. +// req, resp := client.DeleteMetricPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteMetricPolicy +func (c *MediaStore) DeleteMetricPolicyRequest(input *DeleteMetricPolicyInput) (req *request.Request, output *DeleteMetricPolicyOutput) { + op := &request.Operation{ + Name: opDeleteMetricPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteMetricPolicyInput{} + } + + output = &DeleteMetricPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteMetricPolicy API operation for AWS Elemental MediaStore. +// +// Deletes the metric policy that is associated with the specified container. +// If there is no metric policy associated with the container, MediaStore doesn't +// send metrics to CloudWatch. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type 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 MediaStore's +// API operation DeleteMetricPolicy for usage and error information. +// +// Returned Error Types: +// * ContainerInUseException +// The container that you specified in the request already exists or is being +// updated. +// +// * ContainerNotFoundException +// The container that you specified in the request does not exist. +// +// * PolicyNotFoundException +// The policy that you specified in the request does not exist. +// +// * InternalServerError +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteMetricPolicy +func (c *MediaStore) DeleteMetricPolicy(input *DeleteMetricPolicyInput) (*DeleteMetricPolicyOutput, error) { + req, out := c.DeleteMetricPolicyRequest(input) + return out, req.Send() +} + +// DeleteMetricPolicyWithContext is the same as DeleteMetricPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteMetricPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStore) DeleteMetricPolicyWithContext(ctx aws.Context, input *DeleteMetricPolicyInput, opts ...request.Option) (*DeleteMetricPolicyOutput, error) { + req, out := c.DeleteMetricPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeContainer = "DescribeContainer" // DescribeContainerRequest generates a "aws/request.Request" representing the @@ -826,6 +918,95 @@ func (c *MediaStore) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLi return out, req.Send() } +const opGetMetricPolicy = "GetMetricPolicy" + +// GetMetricPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetMetricPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetMetricPolicy for more information on using the GetMetricPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetMetricPolicyRequest method. +// req, resp := client.GetMetricPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetMetricPolicy +func (c *MediaStore) GetMetricPolicyRequest(input *GetMetricPolicyInput) (req *request.Request, output *GetMetricPolicyOutput) { + op := &request.Operation{ + Name: opGetMetricPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetMetricPolicyInput{} + } + + output = &GetMetricPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMetricPolicy API operation for AWS Elemental MediaStore. +// +// Returns the metric policy for the specified container. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type 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 MediaStore's +// API operation GetMetricPolicy for usage and error information. +// +// Returned Error Types: +// * ContainerNotFoundException +// The container that you specified in the request does not exist. +// +// * PolicyNotFoundException +// The policy that you specified in the request does not exist. +// +// * ContainerInUseException +// The container that you specified in the request already exists or is being +// updated. +// +// * InternalServerError +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetMetricPolicy +func (c *MediaStore) GetMetricPolicy(input *GetMetricPolicyInput) (*GetMetricPolicyOutput, error) { + req, out := c.GetMetricPolicyRequest(input) + return out, req.Send() +} + +// GetMetricPolicyWithContext is the same as GetMetricPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetMetricPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStore) GetMetricPolicyWithContext(ctx aws.Context, input *GetMetricPolicyInput, opts ...request.Option) (*GetMetricPolicyOutput, error) { + req, out := c.GetMetricPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListContainers = "ListContainers" // ListContainersRequest generates a "aws/request.Request" representing the @@ -1344,6 +1525,95 @@ func (c *MediaStore) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLi return out, req.Send() } +const opPutMetricPolicy = "PutMetricPolicy" + +// PutMetricPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutMetricPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutMetricPolicy for more information on using the PutMetricPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutMetricPolicyRequest method. +// req, resp := client.PutMetricPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutMetricPolicy +func (c *MediaStore) PutMetricPolicyRequest(input *PutMetricPolicyInput) (req *request.Request, output *PutMetricPolicyOutput) { + op := &request.Operation{ + Name: opPutMetricPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutMetricPolicyInput{} + } + + output = &PutMetricPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutMetricPolicy API operation for AWS Elemental MediaStore. +// +// The metric policy that you want to add to the container. A metric policy +// allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. It +// takes up to 20 minutes for the new policy to take effect. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type 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 MediaStore's +// API operation PutMetricPolicy for usage and error information. +// +// Returned Error Types: +// * ContainerInUseException +// The container that you specified in the request already exists or is being +// updated. +// +// * ContainerNotFoundException +// The container that you specified in the request does not exist. +// +// * InternalServerError +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutMetricPolicy +func (c *MediaStore) PutMetricPolicy(input *PutMetricPolicyInput) (*PutMetricPolicyOutput, error) { + req, out := c.PutMetricPolicyRequest(input) + return out, req.Send() +} + +// PutMetricPolicyWithContext is the same as PutMetricPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutMetricPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStore) PutMetricPolicyWithContext(ctx aws.Context, input *PutMetricPolicyInput, opts ...request.Option) (*PutMetricPolicyOutput, error) { + req, out := c.PutMetricPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartAccessLogging = "StartAccessLogging" // StartAccessLoggingRequest generates a "aws/request.Request" representing the @@ -1790,8 +2060,8 @@ func (s *Container) SetStatus(v string) *Container { // The container that you specified in the request already exists or is being // updated. type ContainerInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1808,17 +2078,17 @@ func (s ContainerInUseException) GoString() string { func newErrorContainerInUseException(v protocol.ResponseMetadata) error { return &ContainerInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ContainerInUseException) Code() string { +func (s *ContainerInUseException) Code() string { return "ContainerInUseException" } // Message returns the exception's message. -func (s ContainerInUseException) Message() string { +func (s *ContainerInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1826,28 +2096,28 @@ func (s ContainerInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ContainerInUseException) OrigErr() error { +func (s *ContainerInUseException) OrigErr() error { return nil } -func (s ContainerInUseException) Error() string { +func (s *ContainerInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ContainerInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ContainerInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ContainerInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ContainerInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The container that you specified in the request does not exist. type ContainerNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1864,17 +2134,17 @@ func (s ContainerNotFoundException) GoString() string { func newErrorContainerNotFoundException(v protocol.ResponseMetadata) error { return &ContainerNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ContainerNotFoundException) Code() string { +func (s *ContainerNotFoundException) Code() string { return "ContainerNotFoundException" } // Message returns the exception's message. -func (s ContainerNotFoundException) Message() string { +func (s *ContainerNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1882,28 +2152,28 @@ func (s ContainerNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ContainerNotFoundException) OrigErr() error { +func (s *ContainerNotFoundException) OrigErr() error { return nil } -func (s ContainerNotFoundException) Error() string { +func (s *ContainerNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ContainerNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ContainerNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ContainerNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ContainerNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The CORS policy that you specified in the request does not exist. type CorsPolicyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1920,17 +2190,17 @@ func (s CorsPolicyNotFoundException) GoString() string { func newErrorCorsPolicyNotFoundException(v protocol.ResponseMetadata) error { return &CorsPolicyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CorsPolicyNotFoundException) Code() string { +func (s *CorsPolicyNotFoundException) Code() string { return "CorsPolicyNotFoundException" } // Message returns the exception's message. -func (s CorsPolicyNotFoundException) Message() string { +func (s *CorsPolicyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1938,22 +2208,22 @@ func (s CorsPolicyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CorsPolicyNotFoundException) OrigErr() error { +func (s *CorsPolicyNotFoundException) OrigErr() error { return nil } -func (s CorsPolicyNotFoundException) Error() string { +func (s *CorsPolicyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CorsPolicyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CorsPolicyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CorsPolicyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *CorsPolicyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If @@ -2081,7 +2351,7 @@ type CreateContainerInput struct { // as "test," "development," or "production"). You can add up to 50 tags to // each container. For more information about tagging, including naming and // usage conventions, see Tagging Resources in MediaStore (https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html). - Tags []*Tag `type:"list"` + Tags []*Tag `min:"1" type:"list"` } // String returns the string representation @@ -2103,6 +2373,9 @@ func (s *CreateContainerInput) Validate() error { if s.ContainerName != nil && len(*s.ContainerName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) } + 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 { @@ -2391,6 +2664,62 @@ func (s DeleteLifecyclePolicyOutput) GoString() string { return s.String() } +type DeleteMetricPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the container that is associated with the metric policy that + // you want to delete. + // + // ContainerName is a required field + ContainerName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteMetricPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMetricPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteMetricPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMetricPolicyInput"} + if s.ContainerName == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerName")) + } + if s.ContainerName != nil && len(*s.ContainerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerName sets the ContainerName field's value. +func (s *DeleteMetricPolicyInput) SetContainerName(v string) *DeleteMetricPolicyInput { + s.ContainerName = &v + return s +} + +type DeleteMetricPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteMetricPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMetricPolicyOutput) GoString() string { + return s.String() +} + type DescribeContainerInput struct { _ struct{} `type:"structure"` @@ -2648,10 +2977,76 @@ func (s *GetLifecyclePolicyOutput) SetLifecyclePolicy(v string) *GetLifecyclePol return s } +type GetMetricPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the container that is associated with the metric policy. + // + // ContainerName is a required field + ContainerName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetMetricPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMetricPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMetricPolicyInput"} + if s.ContainerName == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerName")) + } + if s.ContainerName != nil && len(*s.ContainerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerName sets the ContainerName field's value. +func (s *GetMetricPolicyInput) SetContainerName(v string) *GetMetricPolicyInput { + s.ContainerName = &v + return s +} + +type GetMetricPolicyOutput struct { + _ struct{} `type:"structure"` + + // The metric policy that is associated with the specific container. + // + // MetricPolicy is a required field + MetricPolicy *MetricPolicy `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetMetricPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricPolicyOutput) GoString() string { + return s.String() +} + +// SetMetricPolicy sets the MetricPolicy field's value. +func (s *GetMetricPolicyOutput) SetMetricPolicy(v *MetricPolicy) *GetMetricPolicyOutput { + s.MetricPolicy = v + return s +} + // The service is temporarily unavailable. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2668,17 +3063,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2686,28 +3081,28 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // A service limit has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2724,17 +3119,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2742,22 +3137,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListContainersInput struct { @@ -2893,7 +3288,7 @@ type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` // An array of key:value pairs that are assigned to the container. - Tags []*Tag `type:"list"` + Tags []*Tag `min:"1" type:"list"` } // String returns the string representation @@ -2912,10 +3307,146 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput return s } +// The metric policy that is associated with the container. A metric policy +// allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In +// the policy, you must indicate whether you want MediaStore to send container-level +// metrics. You can also include rules to define groups of objects that you +// want MediaStore to send object-level metrics for. +// +// To view examples of how to construct a metric policy for your use case, see +// Example Metric Policies (https://docs.aws.amazon.com/mediastore/latest/ug/policies-metric-examples.html). +type MetricPolicy struct { + _ struct{} `type:"structure"` + + // A setting to enable or disable metrics at the container level. + // + // ContainerLevelMetrics is a required field + ContainerLevelMetrics *string `type:"string" required:"true" enum:"ContainerLevelMetrics"` + + // A parameter that holds an array of rules that enable metrics at the object + // level. This parameter is optional, but if you choose to include it, you must + // also include at least one rule. By default, you can include up to five rules. + // You can also request a quota increase (https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediastore/quotas) + // to allow up to 300 rules per policy. + MetricPolicyRules []*MetricPolicyRule `min:"1" type:"list"` +} + +// String returns the string representation +func (s MetricPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricPolicy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricPolicy"} + if s.ContainerLevelMetrics == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerLevelMetrics")) + } + if s.MetricPolicyRules != nil && len(s.MetricPolicyRules) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricPolicyRules", 1)) + } + if s.MetricPolicyRules != nil { + for i, v := range s.MetricPolicyRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricPolicyRules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerLevelMetrics sets the ContainerLevelMetrics field's value. +func (s *MetricPolicy) SetContainerLevelMetrics(v string) *MetricPolicy { + s.ContainerLevelMetrics = &v + return s +} + +// SetMetricPolicyRules sets the MetricPolicyRules field's value. +func (s *MetricPolicy) SetMetricPolicyRules(v []*MetricPolicyRule) *MetricPolicy { + s.MetricPolicyRules = v + return s +} + +// A setting that enables metrics at the object level. Each rule contains an +// object group and an object group name. If the policy includes the MetricPolicyRules +// parameter, you must include at least one rule. Each metric policy can include +// up to five rules by default. You can also request a quota increase (https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediastore/quotas) +// to allow up to 300 rules per policy. +type MetricPolicyRule struct { + _ struct{} `type:"structure"` + + // A path or file name that defines which objects to include in the group. Wildcards + // (*) are acceptable. + // + // ObjectGroup is a required field + ObjectGroup *string `min:"1" type:"string" required:"true"` + + // A name that allows you to refer to the object group. + // + // ObjectGroupName is a required field + ObjectGroupName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s MetricPolicyRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricPolicyRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricPolicyRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricPolicyRule"} + if s.ObjectGroup == nil { + invalidParams.Add(request.NewErrParamRequired("ObjectGroup")) + } + if s.ObjectGroup != nil && len(*s.ObjectGroup) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ObjectGroup", 1)) + } + if s.ObjectGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ObjectGroupName")) + } + if s.ObjectGroupName != nil && len(*s.ObjectGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ObjectGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetObjectGroup sets the ObjectGroup field's value. +func (s *MetricPolicyRule) SetObjectGroup(v string) *MetricPolicyRule { + s.ObjectGroup = &v + return s +} + +// SetObjectGroupName sets the ObjectGroupName field's value. +func (s *MetricPolicyRule) SetObjectGroupName(v string) *MetricPolicyRule { + s.ObjectGroupName = &v + return s +} + // The policy that you specified in the request does not exist. type PolicyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2932,17 +3463,17 @@ func (s PolicyNotFoundException) GoString() string { func newErrorPolicyNotFoundException(v protocol.ResponseMetadata) error { return &PolicyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyNotFoundException) Code() string { +func (s *PolicyNotFoundException) Code() string { return "PolicyNotFoundException" } // Message returns the exception's message. -func (s PolicyNotFoundException) Message() string { +func (s *PolicyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2950,22 +3481,22 @@ func (s PolicyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyNotFoundException) OrigErr() error { +func (s *PolicyNotFoundException) OrigErr() error { return nil } -func (s PolicyNotFoundException) Error() string { +func (s *PolicyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type PutContainerPolicyInput struct { @@ -3196,6 +3727,94 @@ func (s PutLifecyclePolicyOutput) GoString() string { return s.String() } +type PutMetricPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the container that you want to add the metric policy to. + // + // ContainerName is a required field + ContainerName *string `min:"1" type:"string" required:"true"` + + // The metric policy that you want to associate with the container. In the policy, + // you must indicate whether you want MediaStore to send container-level metrics. + // You can also include up to five rules to define groups of objects that you + // want MediaStore to send object-level metrics for. If you include rules in + // the policy, construct each rule with both of the following: + // + // * An object group that defines which objects to include in the group. + // The definition can be a path or a file name, but it can't have more than + // 900 characters. Valid characters are: a-z, A-Z, 0-9, _ (underscore), = + // (equal), : (colon), . (period), - (hyphen), ~ (tilde), / (forward slash), + // and * (asterisk). Wildcards (*) are acceptable. + // + // * An object group name that allows you to refer to the object group. The + // name can't have more than 30 characters. Valid characters are: a-z, A-Z, + // 0-9, and _ (underscore). + // + // MetricPolicy is a required field + MetricPolicy *MetricPolicy `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutMetricPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutMetricPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutMetricPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutMetricPolicyInput"} + if s.ContainerName == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerName")) + } + if s.ContainerName != nil && len(*s.ContainerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) + } + if s.MetricPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("MetricPolicy")) + } + if s.MetricPolicy != nil { + if err := s.MetricPolicy.Validate(); err != nil { + invalidParams.AddNested("MetricPolicy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerName sets the ContainerName field's value. +func (s *PutMetricPolicyInput) SetContainerName(v string) *PutMetricPolicyInput { + s.ContainerName = &v + return s +} + +// SetMetricPolicy sets the MetricPolicy field's value. +func (s *PutMetricPolicyInput) SetMetricPolicy(v *MetricPolicy) *PutMetricPolicyInput { + s.MetricPolicy = v + return s +} + +type PutMetricPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutMetricPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutMetricPolicyOutput) GoString() string { + return s.String() +} + type StartAccessLoggingInput struct { _ struct{} `type:"structure"` @@ -3383,7 +4002,7 @@ type TagResourceInput struct { // and type:Contract. // // Tags is a required field - Tags []*Tag `type:"list" required:"true"` + Tags []*Tag `min:"1" type:"list" required:"true"` } // String returns the string representation @@ -3408,6 +4027,9 @@ func (s *TagResourceInput) Validate() error { 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 { @@ -3523,6 +4145,14 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +const ( + // ContainerLevelMetricsEnabled is a ContainerLevelMetrics enum value + ContainerLevelMetricsEnabled = "ENABLED" + + // ContainerLevelMetricsDisabled is a ContainerLevelMetrics enum value + ContainerLevelMetricsDisabled = "DISABLED" +) + const ( // ContainerStatusActive is a ContainerStatus enum value ContainerStatusActive = "ACTIVE" 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 6fd56c6dc09..6c8cc748d64 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 @@ -505,8 +505,8 @@ func (c *MediaStoreData) PutObjectWithContext(ctx aws.Context, input *PutObjectI // The specified container was not found for the specified account. type ContainerNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -523,17 +523,17 @@ func (s ContainerNotFoundException) GoString() string { func newErrorContainerNotFoundException(v protocol.ResponseMetadata) error { return &ContainerNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ContainerNotFoundException) Code() string { +func (s *ContainerNotFoundException) Code() string { return "ContainerNotFoundException" } // Message returns the exception's message. -func (s ContainerNotFoundException) Message() string { +func (s *ContainerNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -541,22 +541,22 @@ func (s ContainerNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ContainerNotFoundException) OrigErr() error { +func (s *ContainerNotFoundException) OrigErr() error { return nil } -func (s ContainerNotFoundException) Error() string { +func (s *ContainerNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ContainerNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ContainerNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ContainerNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ContainerNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type DeleteObjectInput struct { @@ -892,8 +892,8 @@ func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput { // The service is temporarily unavailable. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -910,17 +910,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -928,22 +928,22 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // A metadata entry for a folder or object. @@ -1122,8 +1122,8 @@ func (s *ListItemsOutput) SetNextToken(v string) *ListItemsOutput { // Could not perform an operation on an object that does not exist. type ObjectNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1140,17 +1140,17 @@ func (s ObjectNotFoundException) GoString() string { func newErrorObjectNotFoundException(v protocol.ResponseMetadata) error { return &ObjectNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ObjectNotFoundException) Code() string { +func (s *ObjectNotFoundException) Code() string { return "ObjectNotFoundException" } // Message returns the exception's message. -func (s ObjectNotFoundException) Message() string { +func (s *ObjectNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1158,22 +1158,22 @@ func (s ObjectNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ObjectNotFoundException) OrigErr() error { +func (s *ObjectNotFoundException) OrigErr() error { return nil } -func (s ObjectNotFoundException) Error() string { +func (s *ObjectNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ObjectNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ObjectNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ObjectNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ObjectNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type PutObjectInput struct { @@ -1356,8 +1356,8 @@ func (s *PutObjectOutput) SetStorageClass(v string) *PutObjectOutput { // The requested content range is not valid. type RequestedRangeNotSatisfiableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1374,17 +1374,17 @@ func (s RequestedRangeNotSatisfiableException) GoString() string { func newErrorRequestedRangeNotSatisfiableException(v protocol.ResponseMetadata) error { return &RequestedRangeNotSatisfiableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RequestedRangeNotSatisfiableException) Code() string { +func (s *RequestedRangeNotSatisfiableException) Code() string { return "RequestedRangeNotSatisfiableException" } // Message returns the exception's message. -func (s RequestedRangeNotSatisfiableException) Message() string { +func (s *RequestedRangeNotSatisfiableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1392,22 +1392,22 @@ func (s RequestedRangeNotSatisfiableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RequestedRangeNotSatisfiableException) OrigErr() error { +func (s *RequestedRangeNotSatisfiableException) OrigErr() error { return nil } -func (s RequestedRangeNotSatisfiableException) Error() string { +func (s *RequestedRangeNotSatisfiableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RequestedRangeNotSatisfiableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RequestedRangeNotSatisfiableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RequestedRangeNotSatisfiableException) RequestID() string { - return s.respMetadata.RequestID +func (s *RequestedRangeNotSatisfiableException) RequestID() string { + return s.RespMetadata.RequestID } const ( 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 9aabceea076..21df17b378d 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 @@ -1985,8 +1985,8 @@ func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { // Returns information about an error. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorAttribute *string `locationName:"errorAttribute" type:"string"` @@ -2005,17 +2005,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2023,22 +2023,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Types of broker engines. @@ -2485,8 +2485,8 @@ func (s *Configurations) SetPending(v *ConfigurationId) *Configurations { // Returns information about an error. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorAttribute *string `locationName:"errorAttribute" type:"string"` @@ -2505,17 +2505,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2523,22 +2523,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } type CreateBrokerRequest struct { @@ -4055,8 +4055,8 @@ func (s *EngineVersion) SetName(v string) *EngineVersion { // Returns information about an error. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorAttribute *string `locationName:"errorAttribute" type:"string"` @@ -4075,17 +4075,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4093,28 +4093,28 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // Returns information about an error. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorAttribute *string `locationName:"errorAttribute" type:"string"` @@ -4133,17 +4133,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4151,22 +4151,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ListBrokersInput struct { @@ -4691,8 +4691,8 @@ func (s *LogsSummary) SetPending(v *PendingLogs) *LogsSummary { // Returns information about an error. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorAttribute *string `locationName:"errorAttribute" type:"string"` @@ -4711,17 +4711,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4729,22 +4729,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The list of information about logs to be enabled for the specified broker. @@ -4879,8 +4879,8 @@ func (s *SanitizationWarning) SetReason(v string) *SanitizationWarning { // Returns information about an error. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` ErrorAttribute *string `locationName:"errorAttribute" type:"string"` @@ -4899,17 +4899,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4917,22 +4917,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateBrokerRequest struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/networkmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/api.go new file mode 100644 index 00000000000..dfc92232d59 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/api.go @@ -0,0 +1,7093 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package networkmanager + +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/restjson" +) + +const opAssociateCustomerGateway = "AssociateCustomerGateway" + +// AssociateCustomerGatewayRequest generates a "aws/request.Request" representing the +// client's request for the AssociateCustomerGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateCustomerGateway for more information on using the AssociateCustomerGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateCustomerGatewayRequest method. +// req, resp := client.AssociateCustomerGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/AssociateCustomerGateway +func (c *NetworkManager) AssociateCustomerGatewayRequest(input *AssociateCustomerGatewayInput) (req *request.Request, output *AssociateCustomerGatewayOutput) { + op := &request.Operation{ + Name: opAssociateCustomerGateway, + HTTPMethod: "POST", + HTTPPath: "/global-networks/{globalNetworkId}/customer-gateway-associations", + } + + if input == nil { + input = &AssociateCustomerGatewayInput{} + } + + output = &AssociateCustomerGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateCustomerGateway API operation for AWS Network Manager. +// +// Associates a customer gateway with a device and optionally, with a link. +// If you specify a link, it must be associated with the specified device. +// +// You can only associate customer gateways that are connected to a VPN attachment +// on a transit gateway. The transit gateway must be registered in your global +// network. When you register a transit gateway, customer gateways that are +// connected to the transit gateway are automatically included in the global +// network. To list customer gateways that are connected to a transit gateway, +// use the DescribeVpnConnections (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnConnections.html) +// EC2 API and filter by transit-gateway-id. +// +// You cannot associate a customer gateway with more than one device and link. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation AssociateCustomerGateway for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/AssociateCustomerGateway +func (c *NetworkManager) AssociateCustomerGateway(input *AssociateCustomerGatewayInput) (*AssociateCustomerGatewayOutput, error) { + req, out := c.AssociateCustomerGatewayRequest(input) + return out, req.Send() +} + +// AssociateCustomerGatewayWithContext is the same as AssociateCustomerGateway with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateCustomerGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) AssociateCustomerGatewayWithContext(ctx aws.Context, input *AssociateCustomerGatewayInput, opts ...request.Option) (*AssociateCustomerGatewayOutput, error) { + req, out := c.AssociateCustomerGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateLink = "AssociateLink" + +// AssociateLinkRequest generates a "aws/request.Request" representing the +// client's request for the AssociateLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateLink for more information on using the AssociateLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateLinkRequest method. +// req, resp := client.AssociateLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/AssociateLink +func (c *NetworkManager) AssociateLinkRequest(input *AssociateLinkInput) (req *request.Request, output *AssociateLinkOutput) { + op := &request.Operation{ + Name: opAssociateLink, + HTTPMethod: "POST", + HTTPPath: "/global-networks/{globalNetworkId}/link-associations", + } + + if input == nil { + input = &AssociateLinkInput{} + } + + output = &AssociateLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateLink API operation for AWS Network Manager. +// +// Associates a link to a device. A device can be associated to multiple links +// and a link can be associated to multiple devices. The device and link must +// be in the same global network and the same site. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation AssociateLink for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/AssociateLink +func (c *NetworkManager) AssociateLink(input *AssociateLinkInput) (*AssociateLinkOutput, error) { + req, out := c.AssociateLinkRequest(input) + return out, req.Send() +} + +// AssociateLinkWithContext is the same as AssociateLink with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) AssociateLinkWithContext(ctx aws.Context, input *AssociateLinkInput, opts ...request.Option) (*AssociateLinkOutput, error) { + req, out := c.AssociateLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDevice = "CreateDevice" + +// CreateDeviceRequest generates a "aws/request.Request" representing the +// client's request for the CreateDevice operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDevice for more information on using the CreateDevice +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDeviceRequest method. +// req, resp := client.CreateDeviceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateDevice +func (c *NetworkManager) CreateDeviceRequest(input *CreateDeviceInput) (req *request.Request, output *CreateDeviceOutput) { + op := &request.Operation{ + Name: opCreateDevice, + HTTPMethod: "POST", + HTTPPath: "/global-networks/{globalNetworkId}/devices", + } + + if input == nil { + input = &CreateDeviceInput{} + } + + output = &CreateDeviceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDevice API operation for AWS Network Manager. +// +// Creates a new device in a global network. If you specify both a site ID and +// a location, the location of the site is used for visualization in the Network +// Manager console. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation CreateDevice for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateDevice +func (c *NetworkManager) CreateDevice(input *CreateDeviceInput) (*CreateDeviceOutput, error) { + req, out := c.CreateDeviceRequest(input) + return out, req.Send() +} + +// CreateDeviceWithContext is the same as CreateDevice with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDevice for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) CreateDeviceWithContext(ctx aws.Context, input *CreateDeviceInput, opts ...request.Option) (*CreateDeviceOutput, error) { + req, out := c.CreateDeviceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateGlobalNetwork = "CreateGlobalNetwork" + +// CreateGlobalNetworkRequest generates a "aws/request.Request" representing the +// client's request for the CreateGlobalNetwork operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGlobalNetwork for more information on using the CreateGlobalNetwork +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGlobalNetworkRequest method. +// req, resp := client.CreateGlobalNetworkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateGlobalNetwork +func (c *NetworkManager) CreateGlobalNetworkRequest(input *CreateGlobalNetworkInput) (req *request.Request, output *CreateGlobalNetworkOutput) { + op := &request.Operation{ + Name: opCreateGlobalNetwork, + HTTPMethod: "POST", + HTTPPath: "/global-networks", + } + + if input == nil { + input = &CreateGlobalNetworkInput{} + } + + output = &CreateGlobalNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGlobalNetwork API operation for AWS Network Manager. +// +// Creates a new, empty global network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation CreateGlobalNetwork for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateGlobalNetwork +func (c *NetworkManager) CreateGlobalNetwork(input *CreateGlobalNetworkInput) (*CreateGlobalNetworkOutput, error) { + req, out := c.CreateGlobalNetworkRequest(input) + return out, req.Send() +} + +// CreateGlobalNetworkWithContext is the same as CreateGlobalNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGlobalNetwork for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) CreateGlobalNetworkWithContext(ctx aws.Context, input *CreateGlobalNetworkInput, opts ...request.Option) (*CreateGlobalNetworkOutput, error) { + req, out := c.CreateGlobalNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLink = "CreateLink" + +// CreateLinkRequest generates a "aws/request.Request" representing the +// client's request for the CreateLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLink for more information on using the CreateLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLinkRequest method. +// req, resp := client.CreateLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateLink +func (c *NetworkManager) CreateLinkRequest(input *CreateLinkInput) (req *request.Request, output *CreateLinkOutput) { + op := &request.Operation{ + Name: opCreateLink, + HTTPMethod: "POST", + HTTPPath: "/global-networks/{globalNetworkId}/links", + } + + if input == nil { + input = &CreateLinkInput{} + } + + output = &CreateLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLink API operation for AWS Network Manager. +// +// Creates a new link for a specified site. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation CreateLink for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateLink +func (c *NetworkManager) CreateLink(input *CreateLinkInput) (*CreateLinkOutput, error) { + req, out := c.CreateLinkRequest(input) + return out, req.Send() +} + +// CreateLinkWithContext is the same as CreateLink with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) CreateLinkWithContext(ctx aws.Context, input *CreateLinkInput, opts ...request.Option) (*CreateLinkOutput, error) { + req, out := c.CreateLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSite = "CreateSite" + +// CreateSiteRequest generates a "aws/request.Request" representing the +// client's request for the CreateSite operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSite for more information on using the CreateSite +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSiteRequest method. +// req, resp := client.CreateSiteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateSite +func (c *NetworkManager) CreateSiteRequest(input *CreateSiteInput) (req *request.Request, output *CreateSiteOutput) { + op := &request.Operation{ + Name: opCreateSite, + HTTPMethod: "POST", + HTTPPath: "/global-networks/{globalNetworkId}/sites", + } + + if input == nil { + input = &CreateSiteInput{} + } + + output = &CreateSiteOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSite API operation for AWS Network Manager. +// +// Creates a new site in a global network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation CreateSite for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateSite +func (c *NetworkManager) CreateSite(input *CreateSiteInput) (*CreateSiteOutput, error) { + req, out := c.CreateSiteRequest(input) + return out, req.Send() +} + +// CreateSiteWithContext is the same as CreateSite with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSite for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) CreateSiteWithContext(ctx aws.Context, input *CreateSiteInput, opts ...request.Option) (*CreateSiteOutput, error) { + req, out := c.CreateSiteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDevice = "DeleteDevice" + +// DeleteDeviceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDevice operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDevice for more information on using the DeleteDevice +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDeviceRequest method. +// req, resp := client.DeleteDeviceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteDevice +func (c *NetworkManager) DeleteDeviceRequest(input *DeleteDeviceInput) (req *request.Request, output *DeleteDeviceOutput) { + op := &request.Operation{ + Name: opDeleteDevice, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}/devices/{deviceId}", + } + + if input == nil { + input = &DeleteDeviceInput{} + } + + output = &DeleteDeviceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDevice API operation for AWS Network Manager. +// +// Deletes an existing device. You must first disassociate the device from any +// links and customer gateways. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DeleteDevice for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteDevice +func (c *NetworkManager) DeleteDevice(input *DeleteDeviceInput) (*DeleteDeviceOutput, error) { + req, out := c.DeleteDeviceRequest(input) + return out, req.Send() +} + +// DeleteDeviceWithContext is the same as DeleteDevice with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDevice for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DeleteDeviceWithContext(ctx aws.Context, input *DeleteDeviceInput, opts ...request.Option) (*DeleteDeviceOutput, error) { + req, out := c.DeleteDeviceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGlobalNetwork = "DeleteGlobalNetwork" + +// DeleteGlobalNetworkRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGlobalNetwork operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGlobalNetwork for more information on using the DeleteGlobalNetwork +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGlobalNetworkRequest method. +// req, resp := client.DeleteGlobalNetworkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteGlobalNetwork +func (c *NetworkManager) DeleteGlobalNetworkRequest(input *DeleteGlobalNetworkInput) (req *request.Request, output *DeleteGlobalNetworkOutput) { + op := &request.Operation{ + Name: opDeleteGlobalNetwork, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}", + } + + if input == nil { + input = &DeleteGlobalNetworkInput{} + } + + output = &DeleteGlobalNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGlobalNetwork API operation for AWS Network Manager. +// +// Deletes an existing global network. You must first delete all global network +// objects (devices, links, and sites) and deregister all transit gateways. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DeleteGlobalNetwork for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteGlobalNetwork +func (c *NetworkManager) DeleteGlobalNetwork(input *DeleteGlobalNetworkInput) (*DeleteGlobalNetworkOutput, error) { + req, out := c.DeleteGlobalNetworkRequest(input) + return out, req.Send() +} + +// DeleteGlobalNetworkWithContext is the same as DeleteGlobalNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGlobalNetwork for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DeleteGlobalNetworkWithContext(ctx aws.Context, input *DeleteGlobalNetworkInput, opts ...request.Option) (*DeleteGlobalNetworkOutput, error) { + req, out := c.DeleteGlobalNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteLink = "DeleteLink" + +// DeleteLinkRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLink for more information on using the DeleteLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLinkRequest method. +// req, resp := client.DeleteLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteLink +func (c *NetworkManager) DeleteLinkRequest(input *DeleteLinkInput) (req *request.Request, output *DeleteLinkOutput) { + op := &request.Operation{ + Name: opDeleteLink, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}/links/{linkId}", + } + + if input == nil { + input = &DeleteLinkInput{} + } + + output = &DeleteLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLink API operation for AWS Network Manager. +// +// Deletes an existing link. You must first disassociate the link from any devices +// and customer gateways. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DeleteLink for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteLink +func (c *NetworkManager) DeleteLink(input *DeleteLinkInput) (*DeleteLinkOutput, error) { + req, out := c.DeleteLinkRequest(input) + return out, req.Send() +} + +// DeleteLinkWithContext is the same as DeleteLink with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DeleteLinkWithContext(ctx aws.Context, input *DeleteLinkInput, opts ...request.Option) (*DeleteLinkOutput, error) { + req, out := c.DeleteLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSite = "DeleteSite" + +// DeleteSiteRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSite operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSite for more information on using the DeleteSite +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSiteRequest method. +// req, resp := client.DeleteSiteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteSite +func (c *NetworkManager) DeleteSiteRequest(input *DeleteSiteInput) (req *request.Request, output *DeleteSiteOutput) { + op := &request.Operation{ + Name: opDeleteSite, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}/sites/{siteId}", + } + + if input == nil { + input = &DeleteSiteInput{} + } + + output = &DeleteSiteOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSite API operation for AWS Network Manager. +// +// Deletes an existing site. The site cannot be associated with any device or +// link. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DeleteSite for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeleteSite +func (c *NetworkManager) DeleteSite(input *DeleteSiteInput) (*DeleteSiteOutput, error) { + req, out := c.DeleteSiteRequest(input) + return out, req.Send() +} + +// DeleteSiteWithContext is the same as DeleteSite with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSite for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DeleteSiteWithContext(ctx aws.Context, input *DeleteSiteInput, opts ...request.Option) (*DeleteSiteOutput, error) { + req, out := c.DeleteSiteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeregisterTransitGateway = "DeregisterTransitGateway" + +// DeregisterTransitGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterTransitGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterTransitGateway for more information on using the DeregisterTransitGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterTransitGatewayRequest method. +// req, resp := client.DeregisterTransitGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeregisterTransitGateway +func (c *NetworkManager) DeregisterTransitGatewayRequest(input *DeregisterTransitGatewayInput) (req *request.Request, output *DeregisterTransitGatewayOutput) { + op := &request.Operation{ + Name: opDeregisterTransitGateway, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}/transit-gateway-registrations/{transitGatewayArn}", + } + + if input == nil { + input = &DeregisterTransitGatewayInput{} + } + + output = &DeregisterTransitGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeregisterTransitGateway API operation for AWS Network Manager. +// +// Deregisters a transit gateway from your global network. This action does +// not delete your transit gateway, or modify any of its attachments. This action +// removes any customer gateway associations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DeregisterTransitGateway for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DeregisterTransitGateway +func (c *NetworkManager) DeregisterTransitGateway(input *DeregisterTransitGatewayInput) (*DeregisterTransitGatewayOutput, error) { + req, out := c.DeregisterTransitGatewayRequest(input) + return out, req.Send() +} + +// DeregisterTransitGatewayWithContext is the same as DeregisterTransitGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterTransitGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DeregisterTransitGatewayWithContext(ctx aws.Context, input *DeregisterTransitGatewayInput, opts ...request.Option) (*DeregisterTransitGatewayOutput, error) { + req, out := c.DeregisterTransitGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeGlobalNetworks = "DescribeGlobalNetworks" + +// DescribeGlobalNetworksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGlobalNetworks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeGlobalNetworks for more information on using the DescribeGlobalNetworks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeGlobalNetworksRequest method. +// req, resp := client.DescribeGlobalNetworksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DescribeGlobalNetworks +func (c *NetworkManager) DescribeGlobalNetworksRequest(input *DescribeGlobalNetworksInput) (req *request.Request, output *DescribeGlobalNetworksOutput) { + op := &request.Operation{ + Name: opDescribeGlobalNetworks, + HTTPMethod: "GET", + HTTPPath: "/global-networks", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeGlobalNetworksInput{} + } + + output = &DescribeGlobalNetworksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGlobalNetworks API operation for AWS Network Manager. +// +// Describes one or more global networks. By default, all global networks are +// described. To describe the objects in your global network, you must use the +// appropriate Get* action. For example, to list the transit gateways in your +// global network, use GetTransitGatewayRegistrations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DescribeGlobalNetworks for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DescribeGlobalNetworks +func (c *NetworkManager) DescribeGlobalNetworks(input *DescribeGlobalNetworksInput) (*DescribeGlobalNetworksOutput, error) { + req, out := c.DescribeGlobalNetworksRequest(input) + return out, req.Send() +} + +// DescribeGlobalNetworksWithContext is the same as DescribeGlobalNetworks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGlobalNetworks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DescribeGlobalNetworksWithContext(ctx aws.Context, input *DescribeGlobalNetworksInput, opts ...request.Option) (*DescribeGlobalNetworksOutput, error) { + req, out := c.DescribeGlobalNetworksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeGlobalNetworksPages iterates over the pages of a DescribeGlobalNetworks operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeGlobalNetworks 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 DescribeGlobalNetworks operation. +// pageNum := 0 +// err := client.DescribeGlobalNetworksPages(params, +// func(page *networkmanager.DescribeGlobalNetworksOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) DescribeGlobalNetworksPages(input *DescribeGlobalNetworksInput, fn func(*DescribeGlobalNetworksOutput, bool) bool) error { + return c.DescribeGlobalNetworksPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeGlobalNetworksPagesWithContext same as DescribeGlobalNetworksPages 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 *NetworkManager) DescribeGlobalNetworksPagesWithContext(ctx aws.Context, input *DescribeGlobalNetworksInput, fn func(*DescribeGlobalNetworksOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeGlobalNetworksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeGlobalNetworksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeGlobalNetworksOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDisassociateCustomerGateway = "DisassociateCustomerGateway" + +// DisassociateCustomerGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateCustomerGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateCustomerGateway for more information on using the DisassociateCustomerGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateCustomerGatewayRequest method. +// req, resp := client.DisassociateCustomerGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DisassociateCustomerGateway +func (c *NetworkManager) DisassociateCustomerGatewayRequest(input *DisassociateCustomerGatewayInput) (req *request.Request, output *DisassociateCustomerGatewayOutput) { + op := &request.Operation{ + Name: opDisassociateCustomerGateway, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}/customer-gateway-associations/{customerGatewayArn}", + } + + if input == nil { + input = &DisassociateCustomerGatewayInput{} + } + + output = &DisassociateCustomerGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateCustomerGateway API operation for AWS Network Manager. +// +// Disassociates a customer gateway from a device and a link. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DisassociateCustomerGateway for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DisassociateCustomerGateway +func (c *NetworkManager) DisassociateCustomerGateway(input *DisassociateCustomerGatewayInput) (*DisassociateCustomerGatewayOutput, error) { + req, out := c.DisassociateCustomerGatewayRequest(input) + return out, req.Send() +} + +// DisassociateCustomerGatewayWithContext is the same as DisassociateCustomerGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateCustomerGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DisassociateCustomerGatewayWithContext(ctx aws.Context, input *DisassociateCustomerGatewayInput, opts ...request.Option) (*DisassociateCustomerGatewayOutput, error) { + req, out := c.DisassociateCustomerGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateLink = "DisassociateLink" + +// DisassociateLinkRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateLink for more information on using the DisassociateLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateLinkRequest method. +// req, resp := client.DisassociateLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DisassociateLink +func (c *NetworkManager) DisassociateLinkRequest(input *DisassociateLinkInput) (req *request.Request, output *DisassociateLinkOutput) { + op := &request.Operation{ + Name: opDisassociateLink, + HTTPMethod: "DELETE", + HTTPPath: "/global-networks/{globalNetworkId}/link-associations", + } + + if input == nil { + input = &DisassociateLinkInput{} + } + + output = &DisassociateLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateLink API operation for AWS Network Manager. +// +// Disassociates an existing device from a link. You must first disassociate +// any customer gateways that are associated with the link. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation DisassociateLink for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/DisassociateLink +func (c *NetworkManager) DisassociateLink(input *DisassociateLinkInput) (*DisassociateLinkOutput, error) { + req, out := c.DisassociateLinkRequest(input) + return out, req.Send() +} + +// DisassociateLinkWithContext is the same as DisassociateLink with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) DisassociateLinkWithContext(ctx aws.Context, input *DisassociateLinkInput, opts ...request.Option) (*DisassociateLinkOutput, error) { + req, out := c.DisassociateLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCustomerGatewayAssociations = "GetCustomerGatewayAssociations" + +// GetCustomerGatewayAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the GetCustomerGatewayAssociations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCustomerGatewayAssociations for more information on using the GetCustomerGatewayAssociations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCustomerGatewayAssociationsRequest method. +// req, resp := client.GetCustomerGatewayAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetCustomerGatewayAssociations +func (c *NetworkManager) GetCustomerGatewayAssociationsRequest(input *GetCustomerGatewayAssociationsInput) (req *request.Request, output *GetCustomerGatewayAssociationsOutput) { + op := &request.Operation{ + Name: opGetCustomerGatewayAssociations, + HTTPMethod: "GET", + HTTPPath: "/global-networks/{globalNetworkId}/customer-gateway-associations", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetCustomerGatewayAssociationsInput{} + } + + output = &GetCustomerGatewayAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCustomerGatewayAssociations API operation for AWS Network Manager. +// +// Gets the association information for customer gateways that are associated +// with devices and links in your global network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation GetCustomerGatewayAssociations for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetCustomerGatewayAssociations +func (c *NetworkManager) GetCustomerGatewayAssociations(input *GetCustomerGatewayAssociationsInput) (*GetCustomerGatewayAssociationsOutput, error) { + req, out := c.GetCustomerGatewayAssociationsRequest(input) + return out, req.Send() +} + +// GetCustomerGatewayAssociationsWithContext is the same as GetCustomerGatewayAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See GetCustomerGatewayAssociations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) GetCustomerGatewayAssociationsWithContext(ctx aws.Context, input *GetCustomerGatewayAssociationsInput, opts ...request.Option) (*GetCustomerGatewayAssociationsOutput, error) { + req, out := c.GetCustomerGatewayAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetCustomerGatewayAssociationsPages iterates over the pages of a GetCustomerGatewayAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetCustomerGatewayAssociations 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 GetCustomerGatewayAssociations operation. +// pageNum := 0 +// err := client.GetCustomerGatewayAssociationsPages(params, +// func(page *networkmanager.GetCustomerGatewayAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) GetCustomerGatewayAssociationsPages(input *GetCustomerGatewayAssociationsInput, fn func(*GetCustomerGatewayAssociationsOutput, bool) bool) error { + return c.GetCustomerGatewayAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetCustomerGatewayAssociationsPagesWithContext same as GetCustomerGatewayAssociationsPages 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 *NetworkManager) GetCustomerGatewayAssociationsPagesWithContext(ctx aws.Context, input *GetCustomerGatewayAssociationsInput, fn func(*GetCustomerGatewayAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetCustomerGatewayAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetCustomerGatewayAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetCustomerGatewayAssociationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetDevices = "GetDevices" + +// GetDevicesRequest generates a "aws/request.Request" representing the +// client's request for the GetDevices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDevices for more information on using the GetDevices +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDevicesRequest method. +// req, resp := client.GetDevicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetDevices +func (c *NetworkManager) GetDevicesRequest(input *GetDevicesInput) (req *request.Request, output *GetDevicesOutput) { + op := &request.Operation{ + Name: opGetDevices, + HTTPMethod: "GET", + HTTPPath: "/global-networks/{globalNetworkId}/devices", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetDevicesInput{} + } + + output = &GetDevicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDevices API operation for AWS Network Manager. +// +// Gets information about one or more of your devices in a global network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation GetDevices for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetDevices +func (c *NetworkManager) GetDevices(input *GetDevicesInput) (*GetDevicesOutput, error) { + req, out := c.GetDevicesRequest(input) + return out, req.Send() +} + +// GetDevicesWithContext is the same as GetDevices with the addition of +// the ability to pass a context and additional request options. +// +// See GetDevices for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) GetDevicesWithContext(ctx aws.Context, input *GetDevicesInput, opts ...request.Option) (*GetDevicesOutput, error) { + req, out := c.GetDevicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetDevicesPages iterates over the pages of a GetDevices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetDevices 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 GetDevices operation. +// pageNum := 0 +// err := client.GetDevicesPages(params, +// func(page *networkmanager.GetDevicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) GetDevicesPages(input *GetDevicesInput, fn func(*GetDevicesOutput, bool) bool) error { + return c.GetDevicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetDevicesPagesWithContext same as GetDevicesPages 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 *NetworkManager) GetDevicesPagesWithContext(ctx aws.Context, input *GetDevicesInput, fn func(*GetDevicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetDevicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetDevicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetDevicesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetLinkAssociations = "GetLinkAssociations" + +// GetLinkAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the GetLinkAssociations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLinkAssociations for more information on using the GetLinkAssociations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLinkAssociationsRequest method. +// req, resp := client.GetLinkAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetLinkAssociations +func (c *NetworkManager) GetLinkAssociationsRequest(input *GetLinkAssociationsInput) (req *request.Request, output *GetLinkAssociationsOutput) { + op := &request.Operation{ + Name: opGetLinkAssociations, + HTTPMethod: "GET", + HTTPPath: "/global-networks/{globalNetworkId}/link-associations", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetLinkAssociationsInput{} + } + + output = &GetLinkAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLinkAssociations API operation for AWS Network Manager. +// +// Gets the link associations for a device or a link. Either the device ID or +// the link ID must be specified. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation GetLinkAssociations for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetLinkAssociations +func (c *NetworkManager) GetLinkAssociations(input *GetLinkAssociationsInput) (*GetLinkAssociationsOutput, error) { + req, out := c.GetLinkAssociationsRequest(input) + return out, req.Send() +} + +// GetLinkAssociationsWithContext is the same as GetLinkAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See GetLinkAssociations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) GetLinkAssociationsWithContext(ctx aws.Context, input *GetLinkAssociationsInput, opts ...request.Option) (*GetLinkAssociationsOutput, error) { + req, out := c.GetLinkAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetLinkAssociationsPages iterates over the pages of a GetLinkAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetLinkAssociations 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 GetLinkAssociations operation. +// pageNum := 0 +// err := client.GetLinkAssociationsPages(params, +// func(page *networkmanager.GetLinkAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) GetLinkAssociationsPages(input *GetLinkAssociationsInput, fn func(*GetLinkAssociationsOutput, bool) bool) error { + return c.GetLinkAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetLinkAssociationsPagesWithContext same as GetLinkAssociationsPages 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 *NetworkManager) GetLinkAssociationsPagesWithContext(ctx aws.Context, input *GetLinkAssociationsInput, fn func(*GetLinkAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetLinkAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetLinkAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetLinkAssociationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetLinks = "GetLinks" + +// GetLinksRequest generates a "aws/request.Request" representing the +// client's request for the GetLinks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLinks for more information on using the GetLinks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLinksRequest method. +// req, resp := client.GetLinksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetLinks +func (c *NetworkManager) GetLinksRequest(input *GetLinksInput) (req *request.Request, output *GetLinksOutput) { + op := &request.Operation{ + Name: opGetLinks, + HTTPMethod: "GET", + HTTPPath: "/global-networks/{globalNetworkId}/links", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetLinksInput{} + } + + output = &GetLinksOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLinks API operation for AWS Network Manager. +// +// Gets information about one or more links in a specified global network. +// +// If you specify the site ID, you cannot specify the type or provider in the +// same request. You can specify the type and provider in the same request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation GetLinks for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetLinks +func (c *NetworkManager) GetLinks(input *GetLinksInput) (*GetLinksOutput, error) { + req, out := c.GetLinksRequest(input) + return out, req.Send() +} + +// GetLinksWithContext is the same as GetLinks with the addition of +// the ability to pass a context and additional request options. +// +// See GetLinks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) GetLinksWithContext(ctx aws.Context, input *GetLinksInput, opts ...request.Option) (*GetLinksOutput, error) { + req, out := c.GetLinksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetLinksPages iterates over the pages of a GetLinks operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetLinks 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 GetLinks operation. +// pageNum := 0 +// err := client.GetLinksPages(params, +// func(page *networkmanager.GetLinksOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) GetLinksPages(input *GetLinksInput, fn func(*GetLinksOutput, bool) bool) error { + return c.GetLinksPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetLinksPagesWithContext same as GetLinksPages 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 *NetworkManager) GetLinksPagesWithContext(ctx aws.Context, input *GetLinksInput, fn func(*GetLinksOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetLinksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetLinksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetLinksOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetSites = "GetSites" + +// GetSitesRequest generates a "aws/request.Request" representing the +// client's request for the GetSites operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSites for more information on using the GetSites +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSitesRequest method. +// req, resp := client.GetSitesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetSites +func (c *NetworkManager) GetSitesRequest(input *GetSitesInput) (req *request.Request, output *GetSitesOutput) { + op := &request.Operation{ + Name: opGetSites, + HTTPMethod: "GET", + HTTPPath: "/global-networks/{globalNetworkId}/sites", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetSitesInput{} + } + + output = &GetSitesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSites API operation for AWS Network Manager. +// +// Gets information about one or more of your sites in a global network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation GetSites for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetSites +func (c *NetworkManager) GetSites(input *GetSitesInput) (*GetSitesOutput, error) { + req, out := c.GetSitesRequest(input) + return out, req.Send() +} + +// GetSitesWithContext is the same as GetSites with the addition of +// the ability to pass a context and additional request options. +// +// See GetSites for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) GetSitesWithContext(ctx aws.Context, input *GetSitesInput, opts ...request.Option) (*GetSitesOutput, error) { + req, out := c.GetSitesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetSitesPages iterates over the pages of a GetSites operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetSites 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 GetSites operation. +// pageNum := 0 +// err := client.GetSitesPages(params, +// func(page *networkmanager.GetSitesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) GetSitesPages(input *GetSitesInput, fn func(*GetSitesOutput, bool) bool) error { + return c.GetSitesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetSitesPagesWithContext same as GetSitesPages 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 *NetworkManager) GetSitesPagesWithContext(ctx aws.Context, input *GetSitesInput, fn func(*GetSitesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetSitesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetSitesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetSitesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetTransitGatewayRegistrations = "GetTransitGatewayRegistrations" + +// GetTransitGatewayRegistrationsRequest generates a "aws/request.Request" representing the +// client's request for the GetTransitGatewayRegistrations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetTransitGatewayRegistrations for more information on using the GetTransitGatewayRegistrations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetTransitGatewayRegistrationsRequest method. +// req, resp := client.GetTransitGatewayRegistrationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetTransitGatewayRegistrations +func (c *NetworkManager) GetTransitGatewayRegistrationsRequest(input *GetTransitGatewayRegistrationsInput) (req *request.Request, output *GetTransitGatewayRegistrationsOutput) { + op := &request.Operation{ + Name: opGetTransitGatewayRegistrations, + HTTPMethod: "GET", + HTTPPath: "/global-networks/{globalNetworkId}/transit-gateway-registrations", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetTransitGatewayRegistrationsInput{} + } + + output = &GetTransitGatewayRegistrationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetTransitGatewayRegistrations API operation for AWS Network Manager. +// +// Gets information about the transit gateway registrations in a specified global +// network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation GetTransitGatewayRegistrations for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/GetTransitGatewayRegistrations +func (c *NetworkManager) GetTransitGatewayRegistrations(input *GetTransitGatewayRegistrationsInput) (*GetTransitGatewayRegistrationsOutput, error) { + req, out := c.GetTransitGatewayRegistrationsRequest(input) + return out, req.Send() +} + +// GetTransitGatewayRegistrationsWithContext is the same as GetTransitGatewayRegistrations with the addition of +// the ability to pass a context and additional request options. +// +// See GetTransitGatewayRegistrations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) GetTransitGatewayRegistrationsWithContext(ctx aws.Context, input *GetTransitGatewayRegistrationsInput, opts ...request.Option) (*GetTransitGatewayRegistrationsOutput, error) { + req, out := c.GetTransitGatewayRegistrationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetTransitGatewayRegistrationsPages iterates over the pages of a GetTransitGatewayRegistrations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetTransitGatewayRegistrations 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 GetTransitGatewayRegistrations operation. +// pageNum := 0 +// err := client.GetTransitGatewayRegistrationsPages(params, +// func(page *networkmanager.GetTransitGatewayRegistrationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *NetworkManager) GetTransitGatewayRegistrationsPages(input *GetTransitGatewayRegistrationsInput, fn func(*GetTransitGatewayRegistrationsOutput, bool) bool) error { + return c.GetTransitGatewayRegistrationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetTransitGatewayRegistrationsPagesWithContext same as GetTransitGatewayRegistrationsPages 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 *NetworkManager) GetTransitGatewayRegistrationsPagesWithContext(ctx aws.Context, input *GetTransitGatewayRegistrationsInput, fn func(*GetTransitGatewayRegistrationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetTransitGatewayRegistrationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetTransitGatewayRegistrationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetTransitGatewayRegistrationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the 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/networkmanager-2019-07-05/ListTagsForResource +func (c *NetworkManager) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Network Manager. +// +// Lists the tags for a specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/ListTagsForResource +func (c *NetworkManager) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterTransitGateway = "RegisterTransitGateway" + +// RegisterTransitGatewayRequest generates a "aws/request.Request" representing the +// client's request for the RegisterTransitGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterTransitGateway for more information on using the RegisterTransitGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterTransitGatewayRequest method. +// req, resp := client.RegisterTransitGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/RegisterTransitGateway +func (c *NetworkManager) RegisterTransitGatewayRequest(input *RegisterTransitGatewayInput) (req *request.Request, output *RegisterTransitGatewayOutput) { + op := &request.Operation{ + Name: opRegisterTransitGateway, + HTTPMethod: "POST", + HTTPPath: "/global-networks/{globalNetworkId}/transit-gateway-registrations", + } + + if input == nil { + input = &RegisterTransitGatewayInput{} + } + + output = &RegisterTransitGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterTransitGateway API operation for AWS Network Manager. +// +// Registers a transit gateway in your global network. The transit gateway can +// be in any AWS Region, but it must be owned by the same AWS account that owns +// the global network. You cannot register a transit gateway in more than one +// global network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation RegisterTransitGateway for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/RegisterTransitGateway +func (c *NetworkManager) RegisterTransitGateway(input *RegisterTransitGatewayInput) (*RegisterTransitGatewayOutput, error) { + req, out := c.RegisterTransitGatewayRequest(input) + return out, req.Send() +} + +// RegisterTransitGatewayWithContext is the same as RegisterTransitGateway with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterTransitGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) RegisterTransitGatewayWithContext(ctx aws.Context, input *RegisterTransitGatewayInput, opts ...request.Option) (*RegisterTransitGatewayOutput, error) { + req, out := c.RegisterTransitGatewayRequest(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 +// successfully. +// +// Use "Send" method on the 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/networkmanager-2019-07-05/TagResource +func (c *NetworkManager) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Network Manager. +// +// Tags a specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/TagResource +func (c *NetworkManager) 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 *NetworkManager) 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 +// successfully. +// +// Use "Send" method on the 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/networkmanager-2019-07-05/UntagResource +func (c *NetworkManager) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Network Manager. +// +// Removes tags from a specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Network Manager's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UntagResource +func (c *NetworkManager) 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 *NetworkManager) 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 opUpdateDevice = "UpdateDevice" + +// UpdateDeviceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDevice operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDevice for more information on using the UpdateDevice +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDeviceRequest method. +// req, resp := client.UpdateDeviceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateDevice +func (c *NetworkManager) UpdateDeviceRequest(input *UpdateDeviceInput) (req *request.Request, output *UpdateDeviceOutput) { + op := &request.Operation{ + Name: opUpdateDevice, + HTTPMethod: "PATCH", + HTTPPath: "/global-networks/{globalNetworkId}/devices/{deviceId}", + } + + if input == nil { + input = &UpdateDeviceInput{} + } + + output = &UpdateDeviceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDevice API operation for AWS Network Manager. +// +// Updates the details for an existing device. To remove information for any +// of the parameters, specify an empty 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 Network Manager's +// API operation UpdateDevice for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateDevice +func (c *NetworkManager) UpdateDevice(input *UpdateDeviceInput) (*UpdateDeviceOutput, error) { + req, out := c.UpdateDeviceRequest(input) + return out, req.Send() +} + +// UpdateDeviceWithContext is the same as UpdateDevice with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDevice for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) UpdateDeviceWithContext(ctx aws.Context, input *UpdateDeviceInput, opts ...request.Option) (*UpdateDeviceOutput, error) { + req, out := c.UpdateDeviceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGlobalNetwork = "UpdateGlobalNetwork" + +// UpdateGlobalNetworkRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGlobalNetwork operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGlobalNetwork for more information on using the UpdateGlobalNetwork +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGlobalNetworkRequest method. +// req, resp := client.UpdateGlobalNetworkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateGlobalNetwork +func (c *NetworkManager) UpdateGlobalNetworkRequest(input *UpdateGlobalNetworkInput) (req *request.Request, output *UpdateGlobalNetworkOutput) { + op := &request.Operation{ + Name: opUpdateGlobalNetwork, + HTTPMethod: "PATCH", + HTTPPath: "/global-networks/{globalNetworkId}", + } + + if input == nil { + input = &UpdateGlobalNetworkInput{} + } + + output = &UpdateGlobalNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGlobalNetwork API operation for AWS Network Manager. +// +// Updates an existing global network. To remove information for any of the +// parameters, specify an empty 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 Network Manager's +// API operation UpdateGlobalNetwork for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateGlobalNetwork +func (c *NetworkManager) UpdateGlobalNetwork(input *UpdateGlobalNetworkInput) (*UpdateGlobalNetworkOutput, error) { + req, out := c.UpdateGlobalNetworkRequest(input) + return out, req.Send() +} + +// UpdateGlobalNetworkWithContext is the same as UpdateGlobalNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGlobalNetwork for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) UpdateGlobalNetworkWithContext(ctx aws.Context, input *UpdateGlobalNetworkInput, opts ...request.Option) (*UpdateGlobalNetworkOutput, error) { + req, out := c.UpdateGlobalNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLink = "UpdateLink" + +// UpdateLinkRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLink operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateLink for more information on using the UpdateLink +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateLinkRequest method. +// req, resp := client.UpdateLinkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateLink +func (c *NetworkManager) UpdateLinkRequest(input *UpdateLinkInput) (req *request.Request, output *UpdateLinkOutput) { + op := &request.Operation{ + Name: opUpdateLink, + HTTPMethod: "PATCH", + HTTPPath: "/global-networks/{globalNetworkId}/links/{linkId}", + } + + if input == nil { + input = &UpdateLinkInput{} + } + + output = &UpdateLinkOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateLink API operation for AWS Network Manager. +// +// Updates the details for an existing link. To remove information for any of +// the parameters, specify an empty 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 Network Manager's +// API operation UpdateLink for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * ServiceQuotaExceededException +// A service limit was exceeded. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateLink +func (c *NetworkManager) UpdateLink(input *UpdateLinkInput) (*UpdateLinkOutput, error) { + req, out := c.UpdateLinkRequest(input) + return out, req.Send() +} + +// UpdateLinkWithContext is the same as UpdateLink with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLink for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) UpdateLinkWithContext(ctx aws.Context, input *UpdateLinkInput, opts ...request.Option) (*UpdateLinkOutput, error) { + req, out := c.UpdateLinkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSite = "UpdateSite" + +// UpdateSiteRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSite operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSite for more information on using the UpdateSite +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSiteRequest method. +// req, resp := client.UpdateSiteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateSite +func (c *NetworkManager) UpdateSiteRequest(input *UpdateSiteInput) (req *request.Request, output *UpdateSiteOutput) { + op := &request.Operation{ + Name: opUpdateSite, + HTTPMethod: "PATCH", + HTTPPath: "/global-networks/{globalNetworkId}/sites/{siteId}", + } + + if input == nil { + input = &UpdateSiteInput{} + } + + output = &UpdateSiteOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSite API operation for AWS Network Manager. +// +// Updates the information for an existing site. To remove information for any +// of the parameters, specify an empty 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 Network Manager's +// API operation UpdateSite for usage and error information. +// +// Returned Error Types: +// * ValidationException +// The input fails to satisfy the constraints. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ResourceNotFoundException +// The specified resource could not be found. +// +// * ConflictException +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * InternalServerException +// The request has failed due to an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/UpdateSite +func (c *NetworkManager) UpdateSite(input *UpdateSiteInput) (*UpdateSiteOutput, error) { + req, out := c.UpdateSiteRequest(input) + return out, req.Send() +} + +// UpdateSiteWithContext is the same as UpdateSite with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSite for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *NetworkManager) UpdateSiteWithContext(ctx aws.Context, input *UpdateSiteInput, opts ...request.Option) (*UpdateSiteOutput, error) { + req, out := c.UpdateSiteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// You do not have sufficient access to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +type AssociateCustomerGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the customer gateway. For more information, + // see Resources Defined by Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html#amazonec2-resources-for-iam-policies). + // + // CustomerGatewayArn is a required field + CustomerGatewayArn *string `type:"string" required:"true"` + + // The ID of the device. + // + // DeviceId is a required field + DeviceId *string `type:"string" required:"true"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the link. + LinkId *string `type:"string"` +} + +// String returns the string representation +func (s AssociateCustomerGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateCustomerGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateCustomerGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateCustomerGatewayInput"} + if s.CustomerGatewayArn == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerGatewayArn")) + } + if s.DeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceId")) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomerGatewayArn sets the CustomerGatewayArn field's value. +func (s *AssociateCustomerGatewayInput) SetCustomerGatewayArn(v string) *AssociateCustomerGatewayInput { + s.CustomerGatewayArn = &v + return s +} + +// SetDeviceId sets the DeviceId field's value. +func (s *AssociateCustomerGatewayInput) SetDeviceId(v string) *AssociateCustomerGatewayInput { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *AssociateCustomerGatewayInput) SetGlobalNetworkId(v string) *AssociateCustomerGatewayInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *AssociateCustomerGatewayInput) SetLinkId(v string) *AssociateCustomerGatewayInput { + s.LinkId = &v + return s +} + +type AssociateCustomerGatewayOutput struct { + _ struct{} `type:"structure"` + + // The customer gateway association. + CustomerGatewayAssociation *CustomerGatewayAssociation `type:"structure"` +} + +// String returns the string representation +func (s AssociateCustomerGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateCustomerGatewayOutput) GoString() string { + return s.String() +} + +// SetCustomerGatewayAssociation sets the CustomerGatewayAssociation field's value. +func (s *AssociateCustomerGatewayOutput) SetCustomerGatewayAssociation(v *CustomerGatewayAssociation) *AssociateCustomerGatewayOutput { + s.CustomerGatewayAssociation = v + return s +} + +type AssociateLinkInput struct { + _ struct{} `type:"structure"` + + // The ID of the device. + // + // DeviceId is a required field + DeviceId *string `type:"string" required:"true"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the link. + // + // LinkId is a required field + LinkId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateLinkInput"} + if s.DeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceId")) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.LinkId == nil { + invalidParams.Add(request.NewErrParamRequired("LinkId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceId sets the DeviceId field's value. +func (s *AssociateLinkInput) SetDeviceId(v string) *AssociateLinkInput { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *AssociateLinkInput) SetGlobalNetworkId(v string) *AssociateLinkInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *AssociateLinkInput) SetLinkId(v string) *AssociateLinkInput { + s.LinkId = &v + return s +} + +type AssociateLinkOutput struct { + _ struct{} `type:"structure"` + + // The link association. + LinkAssociation *LinkAssociation `type:"structure"` +} + +// String returns the string representation +func (s AssociateLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateLinkOutput) GoString() string { + return s.String() +} + +// SetLinkAssociation sets the LinkAssociation field's value. +func (s *AssociateLinkOutput) SetLinkAssociation(v *LinkAssociation) *AssociateLinkOutput { + s.LinkAssociation = v + return s +} + +// Describes bandwidth information. +type Bandwidth struct { + _ struct{} `type:"structure"` + + // Download speed in Mbps. + DownloadSpeed *int64 `type:"integer"` + + // Upload speed in Mbps. + UploadSpeed *int64 `type:"integer"` +} + +// String returns the string representation +func (s Bandwidth) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Bandwidth) GoString() string { + return s.String() +} + +// SetDownloadSpeed sets the DownloadSpeed field's value. +func (s *Bandwidth) SetDownloadSpeed(v int64) *Bandwidth { + s.DownloadSpeed = &v + return s +} + +// SetUploadSpeed sets the UploadSpeed field's value. +func (s *Bandwidth) SetUploadSpeed(v int64) *Bandwidth { + s.UploadSpeed = &v + return s +} + +// There was a conflict processing the request. Updating or deleting the resource +// can cause an inconsistent state. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` + + // The ID of the resource. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // The resource type. + // + // ResourceType is a required field + ResourceType *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConflictException) GoString() string { + return s.String() +} + +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CreateDeviceInput struct { + _ struct{} `type:"structure"` + + // A description of the device. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The location of the device. + Location *Location `type:"structure"` + + // The model of the device. + // + // Length Constraints: Maximum length of 128 characters. + Model *string `type:"string"` + + // The serial number of the device. + // + // Length Constraints: Maximum length of 128 characters. + SerialNumber *string `type:"string"` + + // The ID of the site. + SiteId *string `type:"string"` + + // The tags to apply to the resource during creation. + Tags []*Tag `type:"list"` + + // The type of the device. + Type *string `type:"string"` + + // The vendor of the device. + // + // Length Constraints: Maximum length of 128 characters. + Vendor *string `type:"string"` +} + +// String returns the string representation +func (s CreateDeviceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeviceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeviceInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateDeviceInput) SetDescription(v string) *CreateDeviceInput { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *CreateDeviceInput) SetGlobalNetworkId(v string) *CreateDeviceInput { + s.GlobalNetworkId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateDeviceInput) SetLocation(v *Location) *CreateDeviceInput { + s.Location = v + return s +} + +// SetModel sets the Model field's value. +func (s *CreateDeviceInput) SetModel(v string) *CreateDeviceInput { + s.Model = &v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *CreateDeviceInput) SetSerialNumber(v string) *CreateDeviceInput { + s.SerialNumber = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *CreateDeviceInput) SetSiteId(v string) *CreateDeviceInput { + s.SiteId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDeviceInput) SetTags(v []*Tag) *CreateDeviceInput { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *CreateDeviceInput) SetType(v string) *CreateDeviceInput { + s.Type = &v + return s +} + +// SetVendor sets the Vendor field's value. +func (s *CreateDeviceInput) SetVendor(v string) *CreateDeviceInput { + s.Vendor = &v + return s +} + +type CreateDeviceOutput struct { + _ struct{} `type:"structure"` + + // Information about the device. + Device *Device `type:"structure"` +} + +// String returns the string representation +func (s CreateDeviceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeviceOutput) GoString() string { + return s.String() +} + +// SetDevice sets the Device field's value. +func (s *CreateDeviceOutput) SetDevice(v *Device) *CreateDeviceOutput { + s.Device = v + return s +} + +type CreateGlobalNetworkInput struct { + _ struct{} `type:"structure"` + + // A description of the global network. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The tags to apply to the resource during creation. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateGlobalNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGlobalNetworkInput) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *CreateGlobalNetworkInput) SetDescription(v string) *CreateGlobalNetworkInput { + s.Description = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateGlobalNetworkInput) SetTags(v []*Tag) *CreateGlobalNetworkInput { + s.Tags = v + return s +} + +type CreateGlobalNetworkOutput struct { + _ struct{} `type:"structure"` + + // Information about the global network object. + GlobalNetwork *GlobalNetwork `type:"structure"` +} + +// String returns the string representation +func (s CreateGlobalNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGlobalNetworkOutput) GoString() string { + return s.String() +} + +// SetGlobalNetwork sets the GlobalNetwork field's value. +func (s *CreateGlobalNetworkOutput) SetGlobalNetwork(v *GlobalNetwork) *CreateGlobalNetworkOutput { + s.GlobalNetwork = v + return s +} + +type CreateLinkInput struct { + _ struct{} `type:"structure"` + + // The upload speed and download speed in Mbps. + // + // Bandwidth is a required field + Bandwidth *Bandwidth `type:"structure" required:"true"` + + // A description of the link. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The provider of the link. + // + // Constraints: Cannot include the following characters: | \ ^ + // + // Length Constraints: Maximum length of 128 characters. + Provider *string `type:"string"` + + // The ID of the site. + // + // SiteId is a required field + SiteId *string `type:"string" required:"true"` + + // The tags to apply to the resource during creation. + Tags []*Tag `type:"list"` + + // The type of the link. + // + // Constraints: Cannot include the following characters: | \ ^ + // + // Length Constraints: Maximum length of 128 characters. + Type *string `type:"string"` +} + +// String returns the string representation +func (s CreateLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLinkInput"} + if s.Bandwidth == nil { + invalidParams.Add(request.NewErrParamRequired("Bandwidth")) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.SiteId == nil { + invalidParams.Add(request.NewErrParamRequired("SiteId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *CreateLinkInput) SetBandwidth(v *Bandwidth) *CreateLinkInput { + s.Bandwidth = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateLinkInput) SetDescription(v string) *CreateLinkInput { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *CreateLinkInput) SetGlobalNetworkId(v string) *CreateLinkInput { + s.GlobalNetworkId = &v + return s +} + +// SetProvider sets the Provider field's value. +func (s *CreateLinkInput) SetProvider(v string) *CreateLinkInput { + s.Provider = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *CreateLinkInput) SetSiteId(v string) *CreateLinkInput { + s.SiteId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLinkInput) SetTags(v []*Tag) *CreateLinkInput { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *CreateLinkInput) SetType(v string) *CreateLinkInput { + s.Type = &v + return s +} + +type CreateLinkOutput struct { + _ struct{} `type:"structure"` + + // Information about the link. + Link *Link `type:"structure"` +} + +// String returns the string representation +func (s CreateLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLinkOutput) GoString() string { + return s.String() +} + +// SetLink sets the Link field's value. +func (s *CreateLinkOutput) SetLink(v *Link) *CreateLinkOutput { + s.Link = v + return s +} + +type CreateSiteInput struct { + _ struct{} `type:"structure"` + + // A description of your site. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The site location. This information is used for visualization in the Network + // Manager console. If you specify the address, the latitude and longitude are + // automatically calculated. + // + // * Address: The physical address of the site. + // + // * Latitude: The latitude of the site. + // + // * Longitude: The longitude of the site. + Location *Location `type:"structure"` + + // The tags to apply to the resource during creation. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateSiteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSiteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSiteInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateSiteInput) SetDescription(v string) *CreateSiteInput { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *CreateSiteInput) SetGlobalNetworkId(v string) *CreateSiteInput { + s.GlobalNetworkId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateSiteInput) SetLocation(v *Location) *CreateSiteInput { + s.Location = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateSiteInput) SetTags(v []*Tag) *CreateSiteInput { + s.Tags = v + return s +} + +type CreateSiteOutput struct { + _ struct{} `type:"structure"` + + // Information about the site. + Site *Site `type:"structure"` +} + +// String returns the string representation +func (s CreateSiteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSiteOutput) GoString() string { + return s.String() +} + +// SetSite sets the Site field's value. +func (s *CreateSiteOutput) SetSite(v *Site) *CreateSiteOutput { + s.Site = v + return s +} + +// Describes the association between a customer gateway, a device, and a link. +type CustomerGatewayAssociation struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the customer gateway. + CustomerGatewayArn *string `type:"string"` + + // The ID of the device. + DeviceId *string `type:"string"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The ID of the link. + LinkId *string `type:"string"` + + // The association state. + State *string `type:"string" enum:"CustomerGatewayAssociationState"` +} + +// String returns the string representation +func (s CustomerGatewayAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomerGatewayAssociation) GoString() string { + return s.String() +} + +// SetCustomerGatewayArn sets the CustomerGatewayArn field's value. +func (s *CustomerGatewayAssociation) SetCustomerGatewayArn(v string) *CustomerGatewayAssociation { + s.CustomerGatewayArn = &v + return s +} + +// SetDeviceId sets the DeviceId field's value. +func (s *CustomerGatewayAssociation) SetDeviceId(v string) *CustomerGatewayAssociation { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *CustomerGatewayAssociation) SetGlobalNetworkId(v string) *CustomerGatewayAssociation { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *CustomerGatewayAssociation) SetLinkId(v string) *CustomerGatewayAssociation { + s.LinkId = &v + return s +} + +// SetState sets the State field's value. +func (s *CustomerGatewayAssociation) SetState(v string) *CustomerGatewayAssociation { + s.State = &v + return s +} + +type DeleteDeviceInput struct { + _ struct{} `type:"structure"` + + // The ID of the device. + // + // DeviceId is a required field + DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDeviceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDeviceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeviceInput"} + if s.DeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceId")) + } + if s.DeviceId != nil && len(*s.DeviceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceId sets the DeviceId field's value. +func (s *DeleteDeviceInput) SetDeviceId(v string) *DeleteDeviceInput { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DeleteDeviceInput) SetGlobalNetworkId(v string) *DeleteDeviceInput { + s.GlobalNetworkId = &v + return s +} + +type DeleteDeviceOutput struct { + _ struct{} `type:"structure"` + + // Information about the device. + Device *Device `type:"structure"` +} + +// String returns the string representation +func (s DeleteDeviceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDeviceOutput) GoString() string { + return s.String() +} + +// SetDevice sets the Device field's value. +func (s *DeleteDeviceOutput) SetDevice(v *Device) *DeleteDeviceOutput { + s.Device = v + return s +} + +type DeleteGlobalNetworkInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGlobalNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGlobalNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGlobalNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalNetworkInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DeleteGlobalNetworkInput) SetGlobalNetworkId(v string) *DeleteGlobalNetworkInput { + s.GlobalNetworkId = &v + return s +} + +type DeleteGlobalNetworkOutput struct { + _ struct{} `type:"structure"` + + // Information about the global network. + GlobalNetwork *GlobalNetwork `type:"structure"` +} + +// String returns the string representation +func (s DeleteGlobalNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGlobalNetworkOutput) GoString() string { + return s.String() +} + +// SetGlobalNetwork sets the GlobalNetwork field's value. +func (s *DeleteGlobalNetworkOutput) SetGlobalNetwork(v *GlobalNetwork) *DeleteGlobalNetworkOutput { + s.GlobalNetwork = v + return s +} + +type DeleteLinkInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the link. + // + // LinkId is a required field + LinkId *string `location:"uri" locationName:"linkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLinkInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.LinkId == nil { + invalidParams.Add(request.NewErrParamRequired("LinkId")) + } + if s.LinkId != nil && len(*s.LinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LinkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DeleteLinkInput) SetGlobalNetworkId(v string) *DeleteLinkInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *DeleteLinkInput) SetLinkId(v string) *DeleteLinkInput { + s.LinkId = &v + return s +} + +type DeleteLinkOutput struct { + _ struct{} `type:"structure"` + + // Information about the link. + Link *Link `type:"structure"` +} + +// String returns the string representation +func (s DeleteLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLinkOutput) GoString() string { + return s.String() +} + +// SetLink sets the Link field's value. +func (s *DeleteLinkOutput) SetLink(v *Link) *DeleteLinkOutput { + s.Link = v + return s +} + +type DeleteSiteInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the site. + // + // SiteId is a required field + SiteId *string `location:"uri" locationName:"siteId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSiteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSiteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSiteInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.SiteId == nil { + invalidParams.Add(request.NewErrParamRequired("SiteId")) + } + if s.SiteId != nil && len(*s.SiteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SiteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DeleteSiteInput) SetGlobalNetworkId(v string) *DeleteSiteInput { + s.GlobalNetworkId = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *DeleteSiteInput) SetSiteId(v string) *DeleteSiteInput { + s.SiteId = &v + return s +} + +type DeleteSiteOutput struct { + _ struct{} `type:"structure"` + + // Information about the site. + Site *Site `type:"structure"` +} + +// String returns the string representation +func (s DeleteSiteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSiteOutput) GoString() string { + return s.String() +} + +// SetSite sets the Site field's value. +func (s *DeleteSiteOutput) SetSite(v *Site) *DeleteSiteOutput { + s.Site = v + return s +} + +type DeregisterTransitGatewayInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the transit gateway. + // + // TransitGatewayArn is a required field + TransitGatewayArn *string `location:"uri" locationName:"transitGatewayArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeregisterTransitGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterTransitGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterTransitGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterTransitGatewayInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.TransitGatewayArn == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayArn")) + } + if s.TransitGatewayArn != nil && len(*s.TransitGatewayArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TransitGatewayArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DeregisterTransitGatewayInput) SetGlobalNetworkId(v string) *DeregisterTransitGatewayInput { + s.GlobalNetworkId = &v + return s +} + +// SetTransitGatewayArn sets the TransitGatewayArn field's value. +func (s *DeregisterTransitGatewayInput) SetTransitGatewayArn(v string) *DeregisterTransitGatewayInput { + s.TransitGatewayArn = &v + return s +} + +type DeregisterTransitGatewayOutput struct { + _ struct{} `type:"structure"` + + // The transit gateway registration information. + TransitGatewayRegistration *TransitGatewayRegistration `type:"structure"` +} + +// String returns the string representation +func (s DeregisterTransitGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterTransitGatewayOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayRegistration sets the TransitGatewayRegistration field's value. +func (s *DeregisterTransitGatewayOutput) SetTransitGatewayRegistration(v *TransitGatewayRegistration) *DeregisterTransitGatewayOutput { + s.TransitGatewayRegistration = v + return s +} + +type DescribeGlobalNetworksInput struct { + _ struct{} `type:"structure"` + + // The IDs of one or more global networks. The maximum is 10. + GlobalNetworkIds []*string `location:"querystring" locationName:"globalNetworkIds" type:"list"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeGlobalNetworksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalNetworksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGlobalNetworksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalNetworksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkIds sets the GlobalNetworkIds field's value. +func (s *DescribeGlobalNetworksInput) SetGlobalNetworkIds(v []*string) *DescribeGlobalNetworksInput { + s.GlobalNetworkIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeGlobalNetworksInput) SetMaxResults(v int64) *DescribeGlobalNetworksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeGlobalNetworksInput) SetNextToken(v string) *DescribeGlobalNetworksInput { + s.NextToken = &v + return s +} + +type DescribeGlobalNetworksOutput struct { + _ struct{} `type:"structure"` + + // Information about the global networks. + GlobalNetworks []*GlobalNetwork `type:"list"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeGlobalNetworksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalNetworksOutput) GoString() string { + return s.String() +} + +// SetGlobalNetworks sets the GlobalNetworks field's value. +func (s *DescribeGlobalNetworksOutput) SetGlobalNetworks(v []*GlobalNetwork) *DescribeGlobalNetworksOutput { + s.GlobalNetworks = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeGlobalNetworksOutput) SetNextToken(v string) *DescribeGlobalNetworksOutput { + s.NextToken = &v + return s +} + +// Describes a device. +type Device struct { + _ struct{} `type:"structure"` + + // The date and time that the site was created. + CreatedAt *time.Time `type:"timestamp"` + + // The description of the device. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) of the device. + DeviceArn *string `type:"string"` + + // The ID of the device. + DeviceId *string `type:"string"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The site location. + Location *Location `type:"structure"` + + // The device model. + Model *string `type:"string"` + + // The device serial number. + SerialNumber *string `type:"string"` + + // The site ID. + SiteId *string `type:"string"` + + // The device state. + State *string `type:"string" enum:"DeviceState"` + + // The tags for the device. + Tags []*Tag `type:"list"` + + // The device type. + Type *string `type:"string"` + + // The device vendor. + Vendor *string `type:"string"` +} + +// String returns the string representation +func (s Device) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Device) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Device) SetCreatedAt(v time.Time) *Device { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Device) SetDescription(v string) *Device { + s.Description = &v + return s +} + +// SetDeviceArn sets the DeviceArn field's value. +func (s *Device) SetDeviceArn(v string) *Device { + s.DeviceArn = &v + return s +} + +// SetDeviceId sets the DeviceId field's value. +func (s *Device) SetDeviceId(v string) *Device { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *Device) SetGlobalNetworkId(v string) *Device { + s.GlobalNetworkId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Device) SetLocation(v *Location) *Device { + s.Location = v + return s +} + +// SetModel sets the Model field's value. +func (s *Device) SetModel(v string) *Device { + s.Model = &v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *Device) SetSerialNumber(v string) *Device { + s.SerialNumber = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *Device) SetSiteId(v string) *Device { + s.SiteId = &v + return s +} + +// SetState sets the State field's value. +func (s *Device) SetState(v string) *Device { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Device) SetTags(v []*Tag) *Device { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *Device) SetType(v string) *Device { + s.Type = &v + return s +} + +// SetVendor sets the Vendor field's value. +func (s *Device) SetVendor(v string) *Device { + s.Vendor = &v + return s +} + +type DisassociateCustomerGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the customer gateway. For more information, + // see Resources Defined by Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html#amazonec2-resources-for-iam-policies). + // + // CustomerGatewayArn is a required field + CustomerGatewayArn *string `location:"uri" locationName:"customerGatewayArn" type:"string" required:"true"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateCustomerGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateCustomerGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateCustomerGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateCustomerGatewayInput"} + if s.CustomerGatewayArn == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerGatewayArn")) + } + if s.CustomerGatewayArn != nil && len(*s.CustomerGatewayArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomerGatewayArn", 1)) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomerGatewayArn sets the CustomerGatewayArn field's value. +func (s *DisassociateCustomerGatewayInput) SetCustomerGatewayArn(v string) *DisassociateCustomerGatewayInput { + s.CustomerGatewayArn = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DisassociateCustomerGatewayInput) SetGlobalNetworkId(v string) *DisassociateCustomerGatewayInput { + s.GlobalNetworkId = &v + return s +} + +type DisassociateCustomerGatewayOutput struct { + _ struct{} `type:"structure"` + + // Information about the customer gateway association. + CustomerGatewayAssociation *CustomerGatewayAssociation `type:"structure"` +} + +// String returns the string representation +func (s DisassociateCustomerGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateCustomerGatewayOutput) GoString() string { + return s.String() +} + +// SetCustomerGatewayAssociation sets the CustomerGatewayAssociation field's value. +func (s *DisassociateCustomerGatewayOutput) SetCustomerGatewayAssociation(v *CustomerGatewayAssociation) *DisassociateCustomerGatewayOutput { + s.CustomerGatewayAssociation = v + return s +} + +type DisassociateLinkInput struct { + _ struct{} `type:"structure"` + + // The ID of the device. + // + // DeviceId is a required field + DeviceId *string `location:"querystring" locationName:"deviceId" type:"string" required:"true"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the link. + // + // LinkId is a required field + LinkId *string `location:"querystring" locationName:"linkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateLinkInput"} + if s.DeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceId")) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.LinkId == nil { + invalidParams.Add(request.NewErrParamRequired("LinkId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceId sets the DeviceId field's value. +func (s *DisassociateLinkInput) SetDeviceId(v string) *DisassociateLinkInput { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *DisassociateLinkInput) SetGlobalNetworkId(v string) *DisassociateLinkInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *DisassociateLinkInput) SetLinkId(v string) *DisassociateLinkInput { + s.LinkId = &v + return s +} + +type DisassociateLinkOutput struct { + _ struct{} `type:"structure"` + + // Information about the link association. + LinkAssociation *LinkAssociation `type:"structure"` +} + +// String returns the string representation +func (s DisassociateLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateLinkOutput) GoString() string { + return s.String() +} + +// SetLinkAssociation sets the LinkAssociation field's value. +func (s *DisassociateLinkOutput) SetLinkAssociation(v *LinkAssociation) *DisassociateLinkOutput { + s.LinkAssociation = v + return s +} + +type GetCustomerGatewayAssociationsInput struct { + _ struct{} `type:"structure"` + + // One or more customer gateway Amazon Resource Names (ARNs). For more information, + // see Resources Defined by Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html#amazonec2-resources-for-iam-policies). + // The maximum is 10. + CustomerGatewayArns []*string `location:"querystring" locationName:"customerGatewayArns" type:"list"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetCustomerGatewayAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCustomerGatewayAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCustomerGatewayAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCustomerGatewayAssociationsInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomerGatewayArns sets the CustomerGatewayArns field's value. +func (s *GetCustomerGatewayAssociationsInput) SetCustomerGatewayArns(v []*string) *GetCustomerGatewayAssociationsInput { + s.CustomerGatewayArns = v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GetCustomerGatewayAssociationsInput) SetGlobalNetworkId(v string) *GetCustomerGatewayAssociationsInput { + s.GlobalNetworkId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetCustomerGatewayAssociationsInput) SetMaxResults(v int64) *GetCustomerGatewayAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCustomerGatewayAssociationsInput) SetNextToken(v string) *GetCustomerGatewayAssociationsInput { + s.NextToken = &v + return s +} + +type GetCustomerGatewayAssociationsOutput struct { + _ struct{} `type:"structure"` + + // The customer gateway associations. + CustomerGatewayAssociations []*CustomerGatewayAssociation `type:"list"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetCustomerGatewayAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCustomerGatewayAssociationsOutput) GoString() string { + return s.String() +} + +// SetCustomerGatewayAssociations sets the CustomerGatewayAssociations field's value. +func (s *GetCustomerGatewayAssociationsOutput) SetCustomerGatewayAssociations(v []*CustomerGatewayAssociation) *GetCustomerGatewayAssociationsOutput { + s.CustomerGatewayAssociations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCustomerGatewayAssociationsOutput) SetNextToken(v string) *GetCustomerGatewayAssociationsOutput { + s.NextToken = &v + return s +} + +type GetDevicesInput struct { + _ struct{} `type:"structure"` + + // One or more device IDs. The maximum is 10. + DeviceIds []*string `location:"querystring" locationName:"deviceIds" type:"list"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The ID of the site. + SiteId *string `location:"querystring" locationName:"siteId" type:"string"` +} + +// String returns the string representation +func (s GetDevicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDevicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDevicesInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceIds sets the DeviceIds field's value. +func (s *GetDevicesInput) SetDeviceIds(v []*string) *GetDevicesInput { + s.DeviceIds = v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GetDevicesInput) SetGlobalNetworkId(v string) *GetDevicesInput { + s.GlobalNetworkId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetDevicesInput) SetMaxResults(v int64) *GetDevicesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDevicesInput) SetNextToken(v string) *GetDevicesInput { + s.NextToken = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *GetDevicesInput) SetSiteId(v string) *GetDevicesInput { + s.SiteId = &v + return s +} + +type GetDevicesOutput struct { + _ struct{} `type:"structure"` + + // The devices. + Devices []*Device `type:"list"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetDevicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDevicesOutput) GoString() string { + return s.String() +} + +// SetDevices sets the Devices field's value. +func (s *GetDevicesOutput) SetDevices(v []*Device) *GetDevicesOutput { + s.Devices = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDevicesOutput) SetNextToken(v string) *GetDevicesOutput { + s.NextToken = &v + return s +} + +type GetLinkAssociationsInput struct { + _ struct{} `type:"structure"` + + // The ID of the device. + DeviceId *string `location:"querystring" locationName:"deviceId" type:"string"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the link. + LinkId *string `location:"querystring" locationName:"linkId" type:"string"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetLinkAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLinkAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLinkAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLinkAssociationsInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceId sets the DeviceId field's value. +func (s *GetLinkAssociationsInput) SetDeviceId(v string) *GetLinkAssociationsInput { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GetLinkAssociationsInput) SetGlobalNetworkId(v string) *GetLinkAssociationsInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *GetLinkAssociationsInput) SetLinkId(v string) *GetLinkAssociationsInput { + s.LinkId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetLinkAssociationsInput) SetMaxResults(v int64) *GetLinkAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLinkAssociationsInput) SetNextToken(v string) *GetLinkAssociationsInput { + s.NextToken = &v + return s +} + +type GetLinkAssociationsOutput struct { + _ struct{} `type:"structure"` + + // The link associations. + LinkAssociations []*LinkAssociation `type:"list"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetLinkAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLinkAssociationsOutput) GoString() string { + return s.String() +} + +// SetLinkAssociations sets the LinkAssociations field's value. +func (s *GetLinkAssociationsOutput) SetLinkAssociations(v []*LinkAssociation) *GetLinkAssociationsOutput { + s.LinkAssociations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLinkAssociationsOutput) SetNextToken(v string) *GetLinkAssociationsOutput { + s.NextToken = &v + return s +} + +type GetLinksInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // One or more link IDs. The maximum is 10. + LinkIds []*string `location:"querystring" locationName:"linkIds" type:"list"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The link provider. + Provider *string `location:"querystring" locationName:"provider" type:"string"` + + // The ID of the site. + SiteId *string `location:"querystring" locationName:"siteId" type:"string"` + + // The link type. + Type *string `location:"querystring" locationName:"type" type:"string"` +} + +// String returns the string representation +func (s GetLinksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLinksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLinksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLinksInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GetLinksInput) SetGlobalNetworkId(v string) *GetLinksInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkIds sets the LinkIds field's value. +func (s *GetLinksInput) SetLinkIds(v []*string) *GetLinksInput { + s.LinkIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetLinksInput) SetMaxResults(v int64) *GetLinksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLinksInput) SetNextToken(v string) *GetLinksInput { + s.NextToken = &v + return s +} + +// SetProvider sets the Provider field's value. +func (s *GetLinksInput) SetProvider(v string) *GetLinksInput { + s.Provider = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *GetLinksInput) SetSiteId(v string) *GetLinksInput { + s.SiteId = &v + return s +} + +// SetType sets the Type field's value. +func (s *GetLinksInput) SetType(v string) *GetLinksInput { + s.Type = &v + return s +} + +type GetLinksOutput struct { + _ struct{} `type:"structure"` + + // The links. + Links []*Link `type:"list"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetLinksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLinksOutput) GoString() string { + return s.String() +} + +// SetLinks sets the Links field's value. +func (s *GetLinksOutput) SetLinks(v []*Link) *GetLinksOutput { + s.Links = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetLinksOutput) SetNextToken(v string) *GetLinksOutput { + s.NextToken = &v + return s +} + +type GetSitesInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // One or more site IDs. The maximum is 10. + SiteIds []*string `location:"querystring" locationName:"siteIds" type:"list"` +} + +// String returns the string representation +func (s GetSitesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSitesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSitesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSitesInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GetSitesInput) SetGlobalNetworkId(v string) *GetSitesInput { + s.GlobalNetworkId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetSitesInput) SetMaxResults(v int64) *GetSitesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetSitesInput) SetNextToken(v string) *GetSitesInput { + s.NextToken = &v + return s +} + +// SetSiteIds sets the SiteIds field's value. +func (s *GetSitesInput) SetSiteIds(v []*string) *GetSitesInput { + s.SiteIds = v + return s +} + +type GetSitesOutput struct { + _ struct{} `type:"structure"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The sites. + Sites []*Site `type:"list"` +} + +// String returns the string representation +func (s GetSitesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSitesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetSitesOutput) SetNextToken(v string) *GetSitesOutput { + s.NextToken = &v + return s +} + +// SetSites sets the Sites field's value. +func (s *GetSitesOutput) SetSites(v []*Site) *GetSitesOutput { + s.Sites = v + return s +} + +type GetTransitGatewayRegistrationsInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The maximum number of results to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum + // is 10. + TransitGatewayArns []*string `location:"querystring" locationName:"transitGatewayArns" type:"list"` +} + +// String returns the string representation +func (s GetTransitGatewayRegistrationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayRegistrationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTransitGatewayRegistrationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayRegistrationsInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GetTransitGatewayRegistrationsInput) SetGlobalNetworkId(v string) *GetTransitGatewayRegistrationsInput { + s.GlobalNetworkId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayRegistrationsInput) SetMaxResults(v int64) *GetTransitGatewayRegistrationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRegistrationsInput) SetNextToken(v string) *GetTransitGatewayRegistrationsInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayArns sets the TransitGatewayArns field's value. +func (s *GetTransitGatewayRegistrationsInput) SetTransitGatewayArns(v []*string) *GetTransitGatewayRegistrationsInput { + s.TransitGatewayArns = v + return s +} + +type GetTransitGatewayRegistrationsOutput struct { + _ struct{} `type:"structure"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The transit gateway registrations. + TransitGatewayRegistrations []*TransitGatewayRegistration `type:"list"` +} + +// String returns the string representation +func (s GetTransitGatewayRegistrationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTransitGatewayRegistrationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRegistrationsOutput) SetNextToken(v string) *GetTransitGatewayRegistrationsOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayRegistrations sets the TransitGatewayRegistrations field's value. +func (s *GetTransitGatewayRegistrationsOutput) SetTransitGatewayRegistrations(v []*TransitGatewayRegistration) *GetTransitGatewayRegistrationsOutput { + s.TransitGatewayRegistrations = v + return s +} + +// Describes a global network. +type GlobalNetwork struct { + _ struct{} `type:"structure"` + + // The date and time that the global network was created. + CreatedAt *time.Time `type:"timestamp"` + + // The description of the global network. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) of the global network. + GlobalNetworkArn *string `type:"string"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The state of the global network. + State *string `type:"string" enum:"GlobalNetworkState"` + + // The tags for the global network. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s GlobalNetwork) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GlobalNetwork) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *GlobalNetwork) SetCreatedAt(v time.Time) *GlobalNetwork { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GlobalNetwork) SetDescription(v string) *GlobalNetwork { + s.Description = &v + return s +} + +// SetGlobalNetworkArn sets the GlobalNetworkArn field's value. +func (s *GlobalNetwork) SetGlobalNetworkArn(v string) *GlobalNetwork { + s.GlobalNetworkArn = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *GlobalNetwork) SetGlobalNetworkId(v string) *GlobalNetwork { + s.GlobalNetworkId = &v + return s +} + +// SetState sets the State field's value. +func (s *GlobalNetwork) SetState(v string) *GlobalNetwork { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GlobalNetwork) SetTags(v []*Tag) *GlobalNetwork { + s.Tags = v + return s +} + +// The request has failed due to an internal error. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` + + // Indicates when to retry the request. + RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` +} + +// String returns the string representation +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Describes a link. +type Link struct { + _ struct{} `type:"structure"` + + // The bandwidth for the link. + Bandwidth *Bandwidth `type:"structure"` + + // The date and time that the link was created. + CreatedAt *time.Time `type:"timestamp"` + + // The description of the link. + Description *string `type:"string"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the link. + LinkArn *string `type:"string"` + + // The ID of the link. + LinkId *string `type:"string"` + + // The provider of the link. + Provider *string `type:"string"` + + // The ID of the site. + SiteId *string `type:"string"` + + // The state of the link. + State *string `type:"string" enum:"LinkState"` + + // The tags for the link. + Tags []*Tag `type:"list"` + + // The type of the link. + Type *string `type:"string"` +} + +// String returns the string representation +func (s Link) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Link) GoString() string { + return s.String() +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *Link) SetBandwidth(v *Bandwidth) *Link { + s.Bandwidth = v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Link) SetCreatedAt(v time.Time) *Link { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Link) SetDescription(v string) *Link { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *Link) SetGlobalNetworkId(v string) *Link { + s.GlobalNetworkId = &v + return s +} + +// SetLinkArn sets the LinkArn field's value. +func (s *Link) SetLinkArn(v string) *Link { + s.LinkArn = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *Link) SetLinkId(v string) *Link { + s.LinkId = &v + return s +} + +// SetProvider sets the Provider field's value. +func (s *Link) SetProvider(v string) *Link { + s.Provider = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *Link) SetSiteId(v string) *Link { + s.SiteId = &v + return s +} + +// SetState sets the State field's value. +func (s *Link) SetState(v string) *Link { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Link) SetTags(v []*Tag) *Link { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *Link) SetType(v string) *Link { + s.Type = &v + return s +} + +// Describes the association between a device and a link. +type LinkAssociation struct { + _ struct{} `type:"structure"` + + // The device ID for the link association. + DeviceId *string `type:"string"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The state of the association. + LinkAssociationState *string `type:"string" enum:"LinkAssociationState"` + + // The ID of the link. + LinkId *string `type:"string"` +} + +// String returns the string representation +func (s LinkAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LinkAssociation) GoString() string { + return s.String() +} + +// SetDeviceId sets the DeviceId field's value. +func (s *LinkAssociation) SetDeviceId(v string) *LinkAssociation { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *LinkAssociation) SetGlobalNetworkId(v string) *LinkAssociation { + s.GlobalNetworkId = &v + return s +} + +// SetLinkAssociationState sets the LinkAssociationState field's value. +func (s *LinkAssociation) SetLinkAssociationState(v string) *LinkAssociation { + s.LinkAssociationState = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *LinkAssociation) SetLinkId(v string) *LinkAssociation { + s.LinkId = &v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The list of tags. + TagList []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTagList sets the TagList field's value. +func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { + s.TagList = v + return s +} + +// Describes a location. +type Location struct { + _ struct{} `type:"structure"` + + // The physical address. + Address *string `type:"string"` + + // The latitude. + Latitude *string `type:"string"` + + // The longitude. + Longitude *string `type:"string"` +} + +// String returns the string representation +func (s Location) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Location) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Location) SetAddress(v string) *Location { + s.Address = &v + return s +} + +// SetLatitude sets the Latitude field's value. +func (s *Location) SetLatitude(v string) *Location { + s.Latitude = &v + return s +} + +// SetLongitude sets the Longitude field's value. +func (s *Location) SetLongitude(v string) *Location { + s.Longitude = &v + return s +} + +type RegisterTransitGatewayInput struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the transit gateway. For more information, + // see Resources Defined by Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html#amazonec2-resources-for-iam-policies). + // + // TransitGatewayArn is a required field + TransitGatewayArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterTransitGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterTransitGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterTransitGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterTransitGatewayInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.TransitGatewayArn == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *RegisterTransitGatewayInput) SetGlobalNetworkId(v string) *RegisterTransitGatewayInput { + s.GlobalNetworkId = &v + return s +} + +// SetTransitGatewayArn sets the TransitGatewayArn field's value. +func (s *RegisterTransitGatewayInput) SetTransitGatewayArn(v string) *RegisterTransitGatewayInput { + s.TransitGatewayArn = &v + return s +} + +type RegisterTransitGatewayOutput struct { + _ struct{} `type:"structure"` + + // Information about the transit gateway registration. + TransitGatewayRegistration *TransitGatewayRegistration `type:"structure"` +} + +// String returns the string representation +func (s RegisterTransitGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterTransitGatewayOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayRegistration sets the TransitGatewayRegistration field's value. +func (s *RegisterTransitGatewayOutput) SetTransitGatewayRegistration(v *TransitGatewayRegistration) *RegisterTransitGatewayOutput { + s.TransitGatewayRegistration = v + return s +} + +// The specified resource could not be found. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` + + // The ID of the resource. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // The resource type. + // + // ResourceType is a required field + ResourceType *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// A service limit was exceeded. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The limit code. + // + // LimitCode is a required field + LimitCode *string `type:"string" required:"true"` + + // The error message. + Message_ *string `locationName:"Message" type:"string"` + + // The ID of the resource. + ResourceId *string `type:"string"` + + // The resource type. + ResourceType *string `type:"string"` + + // The service code. + // + // ServiceCode is a required field + ServiceCode *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ServiceQuotaExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceQuotaExceededException) GoString() string { + return s.String() +} + +func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { + return &ServiceQuotaExceededException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ServiceQuotaExceededException) Code() string { + return "ServiceQuotaExceededException" +} + +// Message returns the exception's message. +func (s *ServiceQuotaExceededException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceQuotaExceededException) OrigErr() error { + return nil +} + +func (s *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Describes a site. +type Site struct { + _ struct{} `type:"structure"` + + // The date and time that the site was created. + CreatedAt *time.Time `type:"timestamp"` + + // The description of the site. + Description *string `type:"string"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The location of the site. + Location *Location `type:"structure"` + + // The Amazon Resource Name (ARN) of the site. + SiteArn *string `type:"string"` + + // The ID of the site. + SiteId *string `type:"string"` + + // The state of the site. + State *string `type:"string" enum:"SiteState"` + + // The tags for the site. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s Site) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Site) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Site) SetCreatedAt(v time.Time) *Site { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Site) SetDescription(v string) *Site { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *Site) SetGlobalNetworkId(v string) *Site { + s.GlobalNetworkId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Site) SetLocation(v *Location) *Site { + s.Location = v + return s +} + +// SetSiteArn sets the SiteArn field's value. +func (s *Site) SetSiteArn(v string) *Site { + s.SiteArn = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *Site) SetSiteId(v string) *Site { + s.SiteId = &v + return s +} + +// SetState sets the State field's value. +func (s *Site) SetState(v string) *Site { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Site) SetTags(v []*Tag) *Site { + s.Tags = v + return s +} + +// Describes a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The tag key. + // + // Length Constraints: Maximum length of 128 characters. + Key *string `type:"string"` + + // The tag value. + // + // Length Constraints: Maximum length of 256 characters. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // The tags to apply to the specified resource. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &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() +} + +// The request was denied due to request throttling. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` + + // Indicates when to retry the request. + RetryAfterSeconds *int64 `location:"header" locationName:"Retry-After" type:"integer"` +} + +// String returns the string representation +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThrottlingException) GoString() string { + return s.String() +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Describes the registration of a transit gateway to a global network. +type TransitGatewayRegistration struct { + _ struct{} `type:"structure"` + + // The ID of the global network. + GlobalNetworkId *string `type:"string"` + + // The state of the transit gateway registration. + State *TransitGatewayRegistrationStateReason `type:"structure"` + + // The Amazon Resource Name (ARN) of the transit gateway. + TransitGatewayArn *string `type:"string"` +} + +// String returns the string representation +func (s TransitGatewayRegistration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRegistration) GoString() string { + return s.String() +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *TransitGatewayRegistration) SetGlobalNetworkId(v string) *TransitGatewayRegistration { + s.GlobalNetworkId = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayRegistration) SetState(v *TransitGatewayRegistrationStateReason) *TransitGatewayRegistration { + s.State = v + return s +} + +// SetTransitGatewayArn sets the TransitGatewayArn field's value. +func (s *TransitGatewayRegistration) SetTransitGatewayArn(v string) *TransitGatewayRegistration { + s.TransitGatewayArn = &v + return s +} + +// Describes the status of a transit gateway registration. +type TransitGatewayRegistrationStateReason struct { + _ struct{} `type:"structure"` + + // The code for the state reason. + Code *string `type:"string" enum:"TransitGatewayRegistrationState"` + + // The message for the state reason. + Message *string `type:"string"` +} + +// String returns the string representation +func (s TransitGatewayRegistrationStateReason) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayRegistrationStateReason) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *TransitGatewayRegistrationStateReason) SetCode(v string) *TransitGatewayRegistrationStateReason { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *TransitGatewayRegistrationStateReason) SetMessage(v string) *TransitGatewayRegistrationStateReason { + s.Message = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // The tag keys to remove from the specified resource. + // + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &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 UpdateDeviceInput struct { + _ struct{} `type:"structure"` + + // A description of the device. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of the device. + // + // DeviceId is a required field + DeviceId *string `location:"uri" locationName:"deviceId" type:"string" required:"true"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // Describes a location. + Location *Location `type:"structure"` + + // The model of the device. + // + // Length Constraints: Maximum length of 128 characters. + Model *string `type:"string"` + + // The serial number of the device. + // + // Length Constraints: Maximum length of 128 characters. + SerialNumber *string `type:"string"` + + // The ID of the site. + SiteId *string `type:"string"` + + // The type of the device. + Type *string `type:"string"` + + // The vendor of the device. + // + // Length Constraints: Maximum length of 128 characters. + Vendor *string `type:"string"` +} + +// String returns the string representation +func (s UpdateDeviceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeviceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceInput"} + if s.DeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceId")) + } + if s.DeviceId != nil && len(*s.DeviceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) + } + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateDeviceInput) SetDescription(v string) *UpdateDeviceInput { + s.Description = &v + return s +} + +// SetDeviceId sets the DeviceId field's value. +func (s *UpdateDeviceInput) SetDeviceId(v string) *UpdateDeviceInput { + s.DeviceId = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *UpdateDeviceInput) SetGlobalNetworkId(v string) *UpdateDeviceInput { + s.GlobalNetworkId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *UpdateDeviceInput) SetLocation(v *Location) *UpdateDeviceInput { + s.Location = v + return s +} + +// SetModel sets the Model field's value. +func (s *UpdateDeviceInput) SetModel(v string) *UpdateDeviceInput { + s.Model = &v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *UpdateDeviceInput) SetSerialNumber(v string) *UpdateDeviceInput { + s.SerialNumber = &v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *UpdateDeviceInput) SetSiteId(v string) *UpdateDeviceInput { + s.SiteId = &v + return s +} + +// SetType sets the Type field's value. +func (s *UpdateDeviceInput) SetType(v string) *UpdateDeviceInput { + s.Type = &v + return s +} + +// SetVendor sets the Vendor field's value. +func (s *UpdateDeviceInput) SetVendor(v string) *UpdateDeviceInput { + s.Vendor = &v + return s +} + +type UpdateDeviceOutput struct { + _ struct{} `type:"structure"` + + // Information about the device. + Device *Device `type:"structure"` +} + +// String returns the string representation +func (s UpdateDeviceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeviceOutput) GoString() string { + return s.String() +} + +// SetDevice sets the Device field's value. +func (s *UpdateDeviceOutput) SetDevice(v *Device) *UpdateDeviceOutput { + s.Device = v + return s +} + +type UpdateGlobalNetworkInput struct { + _ struct{} `type:"structure"` + + // A description of the global network. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of your global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateGlobalNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGlobalNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGlobalNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalNetworkInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateGlobalNetworkInput) SetDescription(v string) *UpdateGlobalNetworkInput { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *UpdateGlobalNetworkInput) SetGlobalNetworkId(v string) *UpdateGlobalNetworkInput { + s.GlobalNetworkId = &v + return s +} + +type UpdateGlobalNetworkOutput struct { + _ struct{} `type:"structure"` + + // Information about the global network object. + GlobalNetwork *GlobalNetwork `type:"structure"` +} + +// String returns the string representation +func (s UpdateGlobalNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGlobalNetworkOutput) GoString() string { + return s.String() +} + +// SetGlobalNetwork sets the GlobalNetwork field's value. +func (s *UpdateGlobalNetworkOutput) SetGlobalNetwork(v *GlobalNetwork) *UpdateGlobalNetworkOutput { + s.GlobalNetwork = v + return s +} + +type UpdateLinkInput struct { + _ struct{} `type:"structure"` + + // The upload and download speed in Mbps. + Bandwidth *Bandwidth `type:"structure"` + + // A description of the link. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The ID of the link. + // + // LinkId is a required field + LinkId *string `location:"uri" locationName:"linkId" type:"string" required:"true"` + + // The provider of the link. + // + // Length Constraints: Maximum length of 128 characters. + Provider *string `type:"string"` + + // The type of the link. + // + // Length Constraints: Maximum length of 128 characters. + Type *string `type:"string"` +} + +// String returns the string representation +func (s UpdateLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLinkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLinkInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.LinkId == nil { + invalidParams.Add(request.NewErrParamRequired("LinkId")) + } + if s.LinkId != nil && len(*s.LinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LinkId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *UpdateLinkInput) SetBandwidth(v *Bandwidth) *UpdateLinkInput { + s.Bandwidth = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateLinkInput) SetDescription(v string) *UpdateLinkInput { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *UpdateLinkInput) SetGlobalNetworkId(v string) *UpdateLinkInput { + s.GlobalNetworkId = &v + return s +} + +// SetLinkId sets the LinkId field's value. +func (s *UpdateLinkInput) SetLinkId(v string) *UpdateLinkInput { + s.LinkId = &v + return s +} + +// SetProvider sets the Provider field's value. +func (s *UpdateLinkInput) SetProvider(v string) *UpdateLinkInput { + s.Provider = &v + return s +} + +// SetType sets the Type field's value. +func (s *UpdateLinkInput) SetType(v string) *UpdateLinkInput { + s.Type = &v + return s +} + +type UpdateLinkOutput struct { + _ struct{} `type:"structure"` + + // Information about the link. + Link *Link `type:"structure"` +} + +// String returns the string representation +func (s UpdateLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLinkOutput) GoString() string { + return s.String() +} + +// SetLink sets the Link field's value. +func (s *UpdateLinkOutput) SetLink(v *Link) *UpdateLinkOutput { + s.Link = v + return s +} + +type UpdateSiteInput struct { + _ struct{} `type:"structure"` + + // A description of your site. + // + // Length Constraints: Maximum length of 256 characters. + Description *string `type:"string"` + + // The ID of the global network. + // + // GlobalNetworkId is a required field + GlobalNetworkId *string `location:"uri" locationName:"globalNetworkId" type:"string" required:"true"` + + // The site location: + // + // * Address: The physical address of the site. + // + // * Latitude: The latitude of the site. + // + // * Longitude: The longitude of the site. + Location *Location `type:"structure"` + + // The ID of your site. + // + // SiteId is a required field + SiteId *string `location:"uri" locationName:"siteId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSiteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSiteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSiteInput"} + if s.GlobalNetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalNetworkId")) + } + if s.GlobalNetworkId != nil && len(*s.GlobalNetworkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalNetworkId", 1)) + } + if s.SiteId == nil { + invalidParams.Add(request.NewErrParamRequired("SiteId")) + } + if s.SiteId != nil && len(*s.SiteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SiteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateSiteInput) SetDescription(v string) *UpdateSiteInput { + s.Description = &v + return s +} + +// SetGlobalNetworkId sets the GlobalNetworkId field's value. +func (s *UpdateSiteInput) SetGlobalNetworkId(v string) *UpdateSiteInput { + s.GlobalNetworkId = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *UpdateSiteInput) SetLocation(v *Location) *UpdateSiteInput { + s.Location = v + return s +} + +// SetSiteId sets the SiteId field's value. +func (s *UpdateSiteInput) SetSiteId(v string) *UpdateSiteInput { + s.SiteId = &v + return s +} + +type UpdateSiteOutput struct { + _ struct{} `type:"structure"` + + // Information about the site. + Site *Site `type:"structure"` +} + +// String returns the string representation +func (s UpdateSiteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSiteOutput) GoString() string { + return s.String() +} + +// SetSite sets the Site field's value. +func (s *UpdateSiteOutput) SetSite(v *Site) *UpdateSiteOutput { + s.Site = v + return s +} + +// The input fails to satisfy the constraints. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The fields that caused the error, if applicable. + Fields []*ValidationExceptionField `type:"list"` + + Message_ *string `locationName:"Message" type:"string"` + + // The reason for the error. + Reason *string `type:"string" enum:"ValidationExceptionReason"` +} + +// String returns the string representation +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Describes a validation exception for a field. +type ValidationExceptionField struct { + _ struct{} `type:"structure"` + + // The message for the field. + // + // Message is a required field + Message *string `type:"string" required:"true"` + + // The name of the field. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ValidationExceptionField) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationExceptionField) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *ValidationExceptionField) SetMessage(v string) *ValidationExceptionField { + s.Message = &v + return s +} + +// SetName sets the Name field's value. +func (s *ValidationExceptionField) SetName(v string) *ValidationExceptionField { + s.Name = &v + return s +} + +const ( + // CustomerGatewayAssociationStatePending is a CustomerGatewayAssociationState enum value + CustomerGatewayAssociationStatePending = "PENDING" + + // CustomerGatewayAssociationStateAvailable is a CustomerGatewayAssociationState enum value + CustomerGatewayAssociationStateAvailable = "AVAILABLE" + + // CustomerGatewayAssociationStateDeleting is a CustomerGatewayAssociationState enum value + CustomerGatewayAssociationStateDeleting = "DELETING" + + // CustomerGatewayAssociationStateDeleted is a CustomerGatewayAssociationState enum value + CustomerGatewayAssociationStateDeleted = "DELETED" +) + +const ( + // DeviceStatePending is a DeviceState enum value + DeviceStatePending = "PENDING" + + // DeviceStateAvailable is a DeviceState enum value + DeviceStateAvailable = "AVAILABLE" + + // DeviceStateDeleting is a DeviceState enum value + DeviceStateDeleting = "DELETING" + + // DeviceStateUpdating is a DeviceState enum value + DeviceStateUpdating = "UPDATING" +) + +const ( + // GlobalNetworkStatePending is a GlobalNetworkState enum value + GlobalNetworkStatePending = "PENDING" + + // GlobalNetworkStateAvailable is a GlobalNetworkState enum value + GlobalNetworkStateAvailable = "AVAILABLE" + + // GlobalNetworkStateDeleting is a GlobalNetworkState enum value + GlobalNetworkStateDeleting = "DELETING" + + // GlobalNetworkStateUpdating is a GlobalNetworkState enum value + GlobalNetworkStateUpdating = "UPDATING" +) + +const ( + // LinkAssociationStatePending is a LinkAssociationState enum value + LinkAssociationStatePending = "PENDING" + + // LinkAssociationStateAvailable is a LinkAssociationState enum value + LinkAssociationStateAvailable = "AVAILABLE" + + // LinkAssociationStateDeleting is a LinkAssociationState enum value + LinkAssociationStateDeleting = "DELETING" + + // LinkAssociationStateDeleted is a LinkAssociationState enum value + LinkAssociationStateDeleted = "DELETED" +) + +const ( + // LinkStatePending is a LinkState enum value + LinkStatePending = "PENDING" + + // LinkStateAvailable is a LinkState enum value + LinkStateAvailable = "AVAILABLE" + + // LinkStateDeleting is a LinkState enum value + LinkStateDeleting = "DELETING" + + // LinkStateUpdating is a LinkState enum value + LinkStateUpdating = "UPDATING" +) + +const ( + // SiteStatePending is a SiteState enum value + SiteStatePending = "PENDING" + + // SiteStateAvailable is a SiteState enum value + SiteStateAvailable = "AVAILABLE" + + // SiteStateDeleting is a SiteState enum value + SiteStateDeleting = "DELETING" + + // SiteStateUpdating is a SiteState enum value + SiteStateUpdating = "UPDATING" +) + +const ( + // TransitGatewayRegistrationStatePending is a TransitGatewayRegistrationState enum value + TransitGatewayRegistrationStatePending = "PENDING" + + // TransitGatewayRegistrationStateAvailable is a TransitGatewayRegistrationState enum value + TransitGatewayRegistrationStateAvailable = "AVAILABLE" + + // TransitGatewayRegistrationStateDeleting is a TransitGatewayRegistrationState enum value + TransitGatewayRegistrationStateDeleting = "DELETING" + + // TransitGatewayRegistrationStateDeleted is a TransitGatewayRegistrationState enum value + TransitGatewayRegistrationStateDeleted = "DELETED" + + // TransitGatewayRegistrationStateFailed is a TransitGatewayRegistrationState enum value + TransitGatewayRegistrationStateFailed = "FAILED" +) + +const ( + // ValidationExceptionReasonUnknownOperation is a ValidationExceptionReason enum value + ValidationExceptionReasonUnknownOperation = "UnknownOperation" + + // ValidationExceptionReasonCannotParse is a ValidationExceptionReason enum value + ValidationExceptionReasonCannotParse = "CannotParse" + + // ValidationExceptionReasonFieldValidationFailed is a ValidationExceptionReason enum value + ValidationExceptionReasonFieldValidationFailed = "FieldValidationFailed" + + // ValidationExceptionReasonOther is a ValidationExceptionReason enum value + ValidationExceptionReasonOther = "Other" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/networkmanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/doc.go new file mode 100644 index 00000000000..65cd8cb7a9e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/doc.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package networkmanager provides the client and types for making API +// requests to AWS Network Manager. +// +// Transit Gateway Network Manager (Network Manager) enables you to create a +// global network, in which you can monitor your AWS and on-premises networks +// that are built around transit gateways. +// +// See https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05 for more information on this service. +// +// See networkmanager package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/networkmanager/ +// +// Using the Client +// +// To contact AWS Network 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 Network Manager client NetworkManager for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/networkmanager/#New +package networkmanager diff --git a/vendor/github.com/aws/aws-sdk-go/service/networkmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/errors.go new file mode 100644 index 00000000000..9e9c2bf05e6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/errors.go @@ -0,0 +1,63 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package networkmanager + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have sufficient access to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // There was a conflict processing the request. Updating or deleting the resource + // can cause an inconsistent state. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // The request has failed due to an internal error. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource could not be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // A service limit was exceeded. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The request was denied due to request throttling. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // The input fails to satisfy the constraints. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "ConflictException": newErrorConflictException, + "InternalServerException": newErrorInternalServerException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, + "ThrottlingException": newErrorThrottlingException, + "ValidationException": newErrorValidationException, +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/networkmanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/service.go new file mode 100644 index 00000000000..56ce4f413be --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/networkmanager/service.go @@ -0,0 +1,104 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package networkmanager + +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" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// NetworkManager provides the API operation methods for making requests to +// AWS Network Manager. See this package's package overview docs +// for details on the service. +// +// NetworkManager methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type NetworkManager 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 = "NetworkManager" // Name of service. + EndpointsID = "networkmanager" // ID to lookup a service endpoint with. + ServiceID = "NetworkManager" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the NetworkManager 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: +// mySession := session.Must(session.NewSession()) +// +// // Create a NetworkManager client from just a session. +// svc := networkmanager.New(mySession) +// +// // Create a NetworkManager client with additional configuration +// svc := networkmanager.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *NetworkManager { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "networkmanager" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *NetworkManager { + svc := &NetworkManager{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2019-07-05", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a NetworkManager operation and runs any +// custom request initialization. +func (c *NetworkManager) 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/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index 0acf64add1d..27ef9e81218 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 @@ -14324,8 +14324,8 @@ func (s *ReportedOs) SetVersion(v string) *ReportedOs { // Indicates that a resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -14343,17 +14343,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14361,22 +14361,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a user's SSH information. @@ -17172,8 +17172,8 @@ func (s *UserProfile) SetSshUsername(v string) *UserProfile { // Indicates that a request was not valid. type ValidationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception message. Message_ *string `locationName:"message" type:"string"` @@ -17191,17 +17191,17 @@ func (s ValidationException) GoString() string { func newErrorValidationException(v protocol.ResponseMetadata) error { return &ValidationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ValidationException) Code() string { +func (s *ValidationException) Code() string { return "ValidationException" } // Message returns the exception's message. -func (s ValidationException) Message() string { +func (s *ValidationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17209,22 +17209,22 @@ func (s ValidationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ValidationException) OrigErr() error { +func (s *ValidationException) OrigErr() error { return nil } -func (s ValidationException) Error() string { +func (s *ValidationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ValidationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ValidationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an instance's Amazon EBS volume. 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 9c061bfea10..627e054c1f2 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 @@ -169,8 +169,6 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -309,15 +307,34 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // AttachPolicy API operation for AWS Organizations. // // Attaches a policy to a root, an organizational unit (OU), or an individual -// account. -// -// How the policy affects accounts depends on the type of policy: -// -// * For more information about attaching SCPs, see How SCPs Work (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html) -// in the AWS Organizations User Guide. -// -// * For information about attaching tag policies, see How Policy Inheritance -// Works (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies-inheritance.html) +// account. How the policy affects accounts depends on the type of policy: +// +// * Service control policy (SCP) - An SCP specifies what permissions can +// be delegated to users in affected member accounts. The scope of influence +// for a policy depends on what you attach the policy to: If you attach an +// SCP to a root, it affects all accounts in the organization. If you attach +// an SCP to an OU, it affects all accounts in that OU and in any child OUs. +// If you attach the policy directly to an account, it affects only that +// account. SCPs are JSON policies that specify the maximum permissions for +// an organization or organizational unit (OU). You can attach one SCP to +// a higher level root or OU, and a different SCP to a child OU or to an +// account. The child policy can further restrict only the permissions that +// pass through the parent filter and are available to the child. An SCP +// that is attached to a child can't grant a permission that the parent hasn't +// already granted. For example, imagine that the parent SCP allows permissions +// A, B, C, D, and E. The child SCP allows C, D, E, F, and G. The result +// is that the accounts affected by the child SCP are allowed to use only +// C, D, and E. They can't use A or B because the child OU filtered them +// out. They also can't use F and G because the parent OU filtered them out. +// They can't be granted back by the child SCP; child SCPs can only filter +// the permissions they receive from the parent SCP. AWS Organizations attaches +// a default SCP named "FullAWSAccess to every root, OU, and account. This +// default SCP allows all services and actions, enabling any new child OU +// or account to inherit the permissions of the parent root or OU. If you +// detach the default policy, you must replace it with a policy that specifies +// the permissions that you want to allow in that OU or account. For more +// information about how AWS Organizations policies permissions work, see +// Using Service Control Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) // in the AWS Organizations User Guide. // // This operation can be called only from the organization's master account. @@ -346,11 +363,12 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -384,6 +402,15 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -410,6 +437,10 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -425,8 +456,8 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -439,14 +470,9 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * DuplicatePolicyAttachmentException // The selected policy is already attached to the specified target. // @@ -465,8 +491,6 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -670,8 +694,6 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -834,13 +856,13 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) // in the AWS Organizations User Guide. // -// * When you create an account in an organization, the information required -// for the account to operate as a standalone account is not automatically -// collected. For example, information about the payment method and signing -// the end user license agreement (EULA) is not collected. If you must remove -// an account from your organization later, you can do so only after you -// provide the missing information. Follow the steps at To leave an organization -// as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// * When you create an account in an organization using the AWS Organizations +// console, API, or CLI commands, the information required for the account +// to operate as a standalone account, such as a payment method and signing +// the end user license agreement (EULA) is not automatically collected. +// If you must remove an account from your organization later, you can do +// so only after you provide the missing information. Follow the steps at +// To leave an organization as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * If you get an exception that indicates that you exceeded your account @@ -888,11 +910,12 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -926,6 +949,15 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -952,6 +984,10 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -967,8 +1003,8 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -981,14 +1017,9 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -1004,8 +1035,6 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -1202,8 +1231,8 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // the master account in the organization in the commercial Region to assume // it. An AWS GovCloud (US) account is then created and associated with the // commercial account that you just created. A role is created in the new AWS -// GovCloud (US) account. This role can be assumed by the AWS GovCloud (US) -// account that is associated with the master account of the commercial organization. +// GovCloud (US) account that can be assumed by the AWS GovCloud (US) account +// that is associated with the master account of the commercial organization. // For more information and to view a diagram that explains how account access // works, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) // in the AWS GovCloud User Guide. @@ -1212,12 +1241,13 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) // in the AWS Organizations User Guide. // -// * You can create an account in an organization using the AWS Organizations -// console, API, or CLI commands. When you do, the information required for -// the account to operate as a standalone account, such as a payment method, -// is not automatically collected. If you must remove an account from your -// organization later, you can do so only after you provide the missing information. -// Follow the steps at To leave an organization as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// * When you create an account in an organization using the AWS Organizations +// console, API, or CLI commands, the information required for the account +// to operate as a standalone account, such as a payment method and signing +// the end user license agreement (EULA) is not automatically collected. +// If you must remove an account from your organization later, you can do +// so only after you provide the missing information. Follow the steps at +// To leave an organization as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * If you get an exception that indicates that you exceeded your account @@ -1266,11 +1296,12 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -1304,6 +1335,15 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -1330,6 +1370,10 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -1345,8 +1389,8 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -1359,14 +1403,9 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -1382,8 +1421,6 @@ func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccoun // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -1529,10 +1566,11 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // have the relevant IAM permissions. // // By default (or if you set the FeatureSet parameter to ALL), the new organization -// is created with all features enabled. In addition, service control policies -// are automatically enabled in the root. If you instead create the organization -// supporting only the consolidated billing features, no policy types are enabled -// by default, and you can't use organization policies. +// is created with all features enabled and service control policies automatically +// enabled in the root. If you instead choose to create the organization supporting +// only the consolidated billing features by setting the FeatureSet parameter +// to CONSOLIDATED_BILLING", no policy types are enabled by default, and you +// can't use organization policies // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1558,11 +1596,12 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -1596,6 +1635,15 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -1622,6 +1670,10 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -1637,8 +1689,8 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -1651,14 +1703,9 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -1674,8 +1721,6 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -1843,11 +1888,12 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -1881,6 +1927,15 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -1907,6 +1962,10 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -1922,8 +1981,8 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -1936,14 +1995,9 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * DuplicateOrganizationalUnitException // An OU with the same name already exists. // @@ -1962,8 +2016,6 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -2126,11 +2178,12 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -2164,6 +2217,15 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -2190,6 +2252,10 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -2205,8 +2271,8 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -2219,14 +2285,9 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * DuplicatePolicyException // A policy with the same name already exists. // @@ -2245,8 +2306,6 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -2399,7 +2458,7 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // a new handshake request. // // After you decline a handshake, it continues to appear in the results of relevant -// API operations for only 30 days. After that, it's deleted. +// APIs for only 30 days. After that, it's deleted. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2447,8 +2506,6 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -2618,8 +2675,6 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -2795,8 +2850,6 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -2976,8 +3029,6 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -3071,51 +3122,59 @@ func (c *Organizations) DeletePolicyWithContext(ctx aws.Context, input *DeletePo return out, req.Send() } -const opDescribeAccount = "DescribeAccount" +const opDeregisterDelegatedAdministrator = "DeregisterDelegatedAdministrator" -// DescribeAccountRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccount operation. The "output" return +// DeregisterDelegatedAdministratorRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterDelegatedAdministrator operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeAccount for more information on using the DescribeAccount +// See DeregisterDelegatedAdministrator for more information on using the DeregisterDelegatedAdministrator // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeAccountRequest method. -// req, resp := client.DescribeAccountRequest(params) +// // Example sending a request using the DeregisterDelegatedAdministratorRequest method. +// req, resp := client.DeregisterDelegatedAdministratorRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount -func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeregisterDelegatedAdministrator +func (c *Organizations) DeregisterDelegatedAdministratorRequest(input *DeregisterDelegatedAdministratorInput) (req *request.Request, output *DeregisterDelegatedAdministratorOutput) { op := &request.Operation{ - Name: opDescribeAccount, + Name: opDeregisterDelegatedAdministrator, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeAccountInput{} + input = &DeregisterDelegatedAdministratorInput{} } - output = &DescribeAccountOutput{} + output = &DeregisterDelegatedAdministratorOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DescribeAccount API operation for AWS Organizations. +// DeregisterDelegatedAdministrator API operation for AWS Organizations. // -// Retrieves AWS Organizations related information about the specified account. +// Removes the specified member AWS account as a delegated administrator for +// the specified AWS service. +// +// You can run this action only for AWS services that support this feature. +// For a current list of services that support it, see the column Supports Delegated +// Administrator in the table at AWS Services that you can use with AWS Organizations +// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrated-services-list.html) +// in the AWS Organizations User Guide. // // This operation can be called only from the organization's master account. // @@ -3124,7 +3183,7 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // the error. // // See the AWS API reference guide for AWS Organizations's -// API operation DescribeAccount for usage and error information. +// API operation DeregisterDelegatedAdministrator for usage and error information. // // Returned Error Types: // * AccessDeniedException @@ -3135,14 +3194,132 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // in the IAM User Guide. // // * AccountNotFoundException -// We can't find an AWS account with the AccountId that you specified. Or the +// We can't find an AWS account with the AccountId that you specified, or the // account whose credentials you used to make this request isn't a member of // an organization. // +// * AccountNotRegisteredException +// The specified account is not a delegated administrator for this AWS service. +// // * AWSOrganizationsNotInUseException // Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // +// * ConcurrentModificationException +// The target of the operation is currently being modified by a different request. +// Try again later. +// +// * ConstraintViolationException +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number +// of accounts that you can create in one day. +// +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contact AWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. Or the number of invitations that you +// tried to send would cause you to exceed the limit of accounts in your +// organization. Send fewer invitations or contact AWS Support to request +// an increase in the number of accounts. Deleted and closed accounts still +// count toward your limit. If you get receive this exception when running +// a command immediately after creating the organization, wait one hour and +// try again. If after an hour it continues to fail with this error, contact +// AWS Support (https://console.aws.amazon.com/support/home#/). +// +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// +// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of +// handshakes that you can send in one day. +// +// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account +// in this organization, you first must migrate the organization's master +// account to the marketplace that corresponds to the master account's address. +// For example, accounts with India addresses must be associated with the +// AISPL marketplace. All accounts in an organization must be associated +// with the same marketplace. +// +// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you +// must first provide contact a valid address and phone number for the master +// account. Then try the operation again. +// +// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the +// master account must have an associated account in the AWS GovCloud (US-West) +// Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) +// in the AWS GovCloud User Guide. +// +// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization +// with this master account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// +// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the +// number of policies of a certain type that can be attached to an entity +// at one time. +// +// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed +// on this resource. +// +// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation +// with this member account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. +// +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. +// +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports only consolidated billing features can't +// perform this operation. +// +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. +// +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of +// policies that you can have in an organization. +// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -3158,8 +3335,6 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -3209,10 +3384,6 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only // between entities in the same root. // -// * ServiceException -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. -// // * TooManyRequestsException // You have sent too many requests in too short a period of time. The limit // helps protect against denial-of-service attacks. Try again later. @@ -3221,82 +3392,90 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) // in the AWS Organizations User Guide. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount -func (c *Organizations) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) { - req, out := c.DescribeAccountRequest(input) +// * ServiceException +// AWS Organizations can't complete your request because of an internal service +// error. Try again later. +// +// * UnsupportedAPIEndpointException +// This action isn't available in the current Region. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeregisterDelegatedAdministrator +func (c *Organizations) DeregisterDelegatedAdministrator(input *DeregisterDelegatedAdministratorInput) (*DeregisterDelegatedAdministratorOutput, error) { + req, out := c.DeregisterDelegatedAdministratorRequest(input) return out, req.Send() } -// DescribeAccountWithContext is the same as DescribeAccount with the addition of +// DeregisterDelegatedAdministratorWithContext is the same as DeregisterDelegatedAdministrator with the addition of // the ability to pass a context and additional request options. // -// See DescribeAccount for details on how to use this API operation. +// See DeregisterDelegatedAdministrator for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Organizations) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) { - req, out := c.DescribeAccountRequest(input) +func (c *Organizations) DeregisterDelegatedAdministratorWithContext(ctx aws.Context, input *DeregisterDelegatedAdministratorInput, opts ...request.Option) (*DeregisterDelegatedAdministratorOutput, error) { + req, out := c.DeregisterDelegatedAdministratorRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus" +const opDescribeAccount = "DescribeAccount" -// DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeCreateAccountStatus operation. The "output" return +// DescribeAccountRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccount operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeCreateAccountStatus for more information on using the DescribeCreateAccountStatus +// See DescribeAccount for more information on using the DescribeAccount // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeCreateAccountStatusRequest method. -// req, resp := client.DescribeCreateAccountStatusRequest(params) +// // Example sending a request using the DescribeAccountRequest method. +// req, resp := client.DescribeAccountRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus -func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreateAccountStatusInput) (req *request.Request, output *DescribeCreateAccountStatusOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount +func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) { op := &request.Operation{ - Name: opDescribeCreateAccountStatus, + Name: opDescribeAccount, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeCreateAccountStatusInput{} + input = &DescribeAccountInput{} } - output = &DescribeCreateAccountStatusOutput{} + output = &DescribeAccountOutput{} req = c.newRequest(op, input, output) return } -// DescribeCreateAccountStatus API operation for AWS Organizations. +// DescribeAccount API operation for AWS Organizations. // -// Retrieves the current status of an asynchronous request to create an account. +// Retrieves AWS Organizations-related information about the specified account. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Organizations's -// API operation DescribeCreateAccountStatus for usage and error information. +// API operation DescribeAccount for usage and error information. // // Returned Error Types: // * AccessDeniedException @@ -3306,14 +3485,15 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) // in the IAM User Guide. // +// * AccountNotFoundException +// We can't find an AWS account with the AccountId that you specified, or the +// account whose credentials you used to make this request isn't a member of +// an organization. +// // * AWSOrganizationsNotInUseException // Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // -// * CreateAccountStatusNotFoundException -// We can't find a create account request with the CreateAccountRequestId that -// you specified. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -3329,8 +3509,6 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -3392,58 +3570,228 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) // in the AWS Organizations User Guide. // -// * UnsupportedAPIEndpointException -// This action isn't available in the current Region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus -func (c *Organizations) DescribeCreateAccountStatus(input *DescribeCreateAccountStatusInput) (*DescribeCreateAccountStatusOutput, error) { - req, out := c.DescribeCreateAccountStatusRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount +func (c *Organizations) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) { + req, out := c.DescribeAccountRequest(input) return out, req.Send() } -// DescribeCreateAccountStatusWithContext is the same as DescribeCreateAccountStatus with the addition of +// DescribeAccountWithContext is the same as DescribeAccount with the addition of // the ability to pass a context and additional request options. // -// See DescribeCreateAccountStatus for details on how to use this API operation. +// See DescribeAccount for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Organizations) DescribeCreateAccountStatusWithContext(ctx aws.Context, input *DescribeCreateAccountStatusInput, opts ...request.Option) (*DescribeCreateAccountStatusOutput, error) { - req, out := c.DescribeCreateAccountStatusRequest(input) +func (c *Organizations) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) { + req, out := c.DescribeAccountRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeEffectivePolicy = "DescribeEffectivePolicy" +const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus" -// DescribeEffectivePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEffectivePolicy operation. The "output" return +// DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCreateAccountStatus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeEffectivePolicy for more information on using the DescribeEffectivePolicy +// See DescribeCreateAccountStatus for more information on using the DescribeCreateAccountStatus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeEffectivePolicyRequest method. -// req, resp := client.DescribeEffectivePolicyRequest(params) +// // Example sending a request using the DescribeCreateAccountStatusRequest method. +// req, resp := client.DescribeCreateAccountStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeEffectivePolicy -func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectivePolicyInput) (req *request.Request, output *DescribeEffectivePolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus +func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreateAccountStatusInput) (req *request.Request, output *DescribeCreateAccountStatusOutput) { + op := &request.Operation{ + Name: opDescribeCreateAccountStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCreateAccountStatusInput{} + } + + output = &DescribeCreateAccountStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCreateAccountStatus API operation for AWS Organizations. +// +// Retrieves the current status of an asynchronous request to create an account. +// +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Organizations's +// API operation DescribeCreateAccountStatus for usage and error information. +// +// Returned Error Types: +// * AccessDeniedException +// You don't have permissions to perform the requested operation. The user or +// role that is making the request must have at least one IAM permissions policy +// attached that grants the required permissions. For more information, see +// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// in the IAM User Guide. +// +// * AWSOrganizationsNotInUseException +// Your account isn't a member of an organization. To make this request, you +// must use the credentials of an account that belongs to an organization. +// +// * CreateAccountStatusNotFoundException +// We can't find an create account request with the CreateAccountRequestId that +// you specified. +// +// * InvalidInputException +// The requested operation failed because you provided invalid values for one +// or more of the request parameters. This exception includes a reason that +// contains additional information about the violated limit: +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and +// can't be modified. +// +// * INPUT_REQUIRED: You must include a value for all required parameters. +// +// * INVALID_ENUM: You specified an invalid value. +// +// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid +// characters. +// +// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains +// at least one invalid value. +// +// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter +// from the response to a previous call of the operation. +// +// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, +// organization, or email) as a party. +// +// * INVALID_PATTERN: You provided a value that doesn't match the required +// pattern. +// +// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't +// match the required pattern. +// +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. +// +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. +// +// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. +// +// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system +// tag. You can’t add, edit, or delete system tag keys because they're +// reserved for AWS use. System tags don’t count against your tags per +// resource limit. +// +// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter +// for the operation. +// +// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer +// than allowed. +// +// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger +// value than allowed. +// +// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter +// than allowed. +// +// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller +// value than allowed. +// +// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only +// between entities in the same root. +// +// * ServiceException +// AWS Organizations can't complete your request because of an internal service +// error. Try again later. +// +// * TooManyRequestsException +// You have sent too many requests in too short a period of time. The limit +// helps protect against denial-of-service attacks. Try again later. +// +// For information on limits that affect AWS Organizations, see Limits of AWS +// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) +// in the AWS Organizations User Guide. +// +// * UnsupportedAPIEndpointException +// This action isn't available in the current Region. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus +func (c *Organizations) DescribeCreateAccountStatus(input *DescribeCreateAccountStatusInput) (*DescribeCreateAccountStatusOutput, error) { + req, out := c.DescribeCreateAccountStatusRequest(input) + return out, req.Send() +} + +// DescribeCreateAccountStatusWithContext is the same as DescribeCreateAccountStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCreateAccountStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Organizations) DescribeCreateAccountStatusWithContext(ctx aws.Context, input *DescribeCreateAccountStatusInput, opts ...request.Option) (*DescribeCreateAccountStatusOutput, error) { + req, out := c.DescribeCreateAccountStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEffectivePolicy = "DescribeEffectivePolicy" + +// DescribeEffectivePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEffectivePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEffectivePolicy for more information on using the DescribeEffectivePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEffectivePolicyRequest method. +// req, resp := client.DescribeEffectivePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeEffectivePolicy +func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectivePolicyInput) (req *request.Request, output *DescribeEffectivePolicyOutput) { op := &request.Operation{ Name: opDescribeEffectivePolicy, HTTPMethod: "POST", @@ -3471,7 +3819,8 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies-inheritance.html) // in the AWS Organizations User Guide. // -// This operation can be called from any account in the organization. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3493,11 +3842,12 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // must use the credentials of an account that belongs to an organization. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -3531,6 +3881,15 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -3557,6 +3916,10 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -3572,8 +3935,8 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -3586,14 +3949,9 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * ServiceException // AWS Organizations can't complete your request because of an internal service // error. Try again later. @@ -3630,8 +3988,6 @@ func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectiveP // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -3797,8 +4153,6 @@ func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -4038,7 +4392,8 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // // Retrieves information about an organizational unit (OU). // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4074,8 +4429,6 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -4208,7 +4561,8 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // // Retrieves information about a policy. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4244,8 +4598,6 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -4384,16 +4736,15 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // If the policy being detached is a service control policy (SCP), the changes // to permissions for IAM users and roles in affected accounts are immediate. // -// Note: Every root, OU, and account must have at least one SCP attached. You -// can replace the default FullAWSAccess policy with one that limits the permissions -// that can be delegated. To do that, you must attach the replacement policy +// Note: Every root, OU, and account must have at least one SCP attached. If +// you want to replace the default FullAWSAccess policy with one that limits +// the permissions that can be delegated, you must attach the replacement policy // before you can remove the default one. This is the authorization strategy -// of using an allow list (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_whitelist). -// You could instead attach a second SCP and leave the FullAWSAccess SCP still -// attached. You could then specify "Effect": "Deny" in the second SCP to override -// the "Effect": "Allow" in the FullAWSAccess policy (or any other attached -// SCP). If you take these steps, you're using the authorization strategy of -// a deny list (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_blacklist). +// of an "allow list (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_whitelist)". +// If you instead attach a second SCP and leave the FullAWSAccess SCP still +// attached, and specify "Effect": "Deny" in the second SCP to override the +// "Effect": "Allow" in the FullAWSAccess policy (or any other attached SCP), +// you're using the authorization strategy of a "deny list (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_blacklist)". // // This operation can be called only from the organization's master account. // @@ -4421,11 +4772,12 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -4459,6 +4811,15 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -4485,6 +4846,10 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -4500,8 +4865,8 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -4514,14 +4879,9 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -4537,8 +4897,6 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -4700,9 +5058,9 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // AWS service. // // After you perform the DisableAWSServiceAccess operation, the specified service -// can no longer perform operations in your organization's accounts. The only -// exception is when the operations are explicitly permitted by IAM policies -// that are attached to your roles. +// can no longer perform operations in your organization's accounts unless the +// operations are explicitly permitted by the IAM policies that are attached +// to your roles. // // For more information about integrating other services with AWS Organizations, // including the list of services that work with Organizations, see Integrating @@ -4735,11 +5093,12 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -4773,6 +5132,15 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -4799,6 +5167,10 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -4814,8 +5186,8 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -4828,14 +5200,9 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -4851,8 +5218,6 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -4980,13 +5345,11 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // DisablePolicyType API operation for AWS Organizations. // -// Disables an organizational control policy type in a root and detaches all -// policies of that type from the organization root, OUs, and accounts. A policy -// of a certain type can be attached to entities in a root only if that type -// is enabled in the root. After you perform this operation, you no longer can -// attach policies of the specified type to that root or to any organizational -// unit (OU) or account in that root. You can undo this by using the EnablePolicyType -// operation. +// Disables an organizational control policy type in a root. A policy of a certain +// type can be attached to entities in a root only if that type is enabled in +// the root. After you perform this operation, you no longer can attach policies +// of the specified type to that root or to any organizational unit (OU) or +// account in that root. You can undo this by using the EnablePolicyType operation. // // This is an asynchronous request that AWS performs in the background. If you // disable a policy for a root, it still appears enabled for the organization @@ -5023,11 +5386,12 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -5061,6 +5425,15 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -5087,6 +5460,10 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -5102,8 +5479,8 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -5116,14 +5493,9 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -5139,8 +5511,6 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -5331,11 +5701,12 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -5369,6 +5740,15 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -5395,6 +5775,10 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -5410,8 +5794,8 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -5424,14 +5808,9 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -5447,8 +5826,6 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -5579,7 +5956,7 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // Enables all features in an organization. This enables the use of organization // policies that can restrict the services and actions that can be called in // each account. Until you enable all features, you have access only to consolidated -// billing. You can't use any of the advanced account administration features +// billing, and you can't use any of the advanced account administration features // that AWS Organizations supports. For more information, see Enabling All Features // in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) // in the AWS Organizations User Guide. @@ -5588,8 +5965,8 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // with only the consolidated billing features enabled. Calling this operation // sends a handshake to every invited account in the organization. The feature // set change can be finalized and the additional features enabled only after -// all administrators in the invited accounts approve the change. Accepting -// the handshake approves the change. +// all administrators in the invited accounts approve the change by accepting +// the handshake. // // After you enable all features, you can separately enable or disable individual // policy types in a root using EnablePolicyType and DisablePolicyType. To see @@ -5685,8 +6062,6 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -5853,11 +6228,12 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -5891,6 +6267,15 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -5917,6 +6302,10 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -5932,8 +6321,8 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -5946,14 +6335,9 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -5969,8 +6353,6 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -6124,16 +6506,16 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // as a Handshake whose details are in the response. // // * You can invite AWS accounts only from the same seller as the master -// account. For example, assume that your organization's master account was -// created by Amazon Internet Services Pvt. Ltd (AISPL), an AWS seller in -// India. You can invite only other AISPL accounts to your organization. -// You can't combine accounts from AISPL and AWS or from any other AWS seller. -// For more information, see Consolidated Billing in India (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html). +// account. For example, if your organization's master account was created +// by Amazon Internet Services Pvt. Ltd (AISPL), an AWS seller in India, +// you can invite only other AISPL accounts to your organization. You can't +// combine accounts from AISPL and AWS or from any other AWS seller. For +// more information, see Consolidated Billing in India (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html). // -// * You might receive an exception that indicates that you exceeded your -// account limits for the organization or that the operation failed because -// your organization is still initializing. If so, wait one hour and then -// try again. If the error persists after an hour, contact AWS Support (https://console.aws.amazon.com/support/home#/). +// * If you receive an exception that indicates that you exceeded your account +// limits for the organization or that the operation failed because your +// organization is still initializing, wait one hour and then try again. +// If the error persists after an hour, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // This operation can be called only from the organization's master account. // @@ -6228,8 +6610,6 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -6373,21 +6753,21 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // * The master account in an organization with all features enabled can // set service control policies (SCPs) that can restrict what administrators -// of member accounts can do. These restrictions can include preventing member -// accounts from successfully calling LeaveOrganization. +// of member accounts can do. This includes preventing them from successfully +// calling LeaveOrganization and leaving the organization. // // * You can leave an organization as a member account only if the account // is configured with the information required to operate as a standalone // account. When you create an account in an organization using the AWS Organizations -// console, API, or CLI, the information required of standalone accounts -// is not automatically collected. For each account that you want to make -// standalone, you must accept the end user license agreement (EULA). You -// must also choose a support plan, provide and verify the required contact -// information, and provide a current payment method. AWS uses the payment -// method to charge for any billable (not free tier) AWS activity that occurs -// while the account isn't attached to an organization. Follow the steps -// at To leave an organization when all required account information has -// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// console, API, or CLI commands, the information required of standalone +// accounts is not automatically collected. For each account that you want +// to make standalone, you must do the following steps: Accept the end user +// license agreement (EULA) Choose a support plan Provide and verify the +// required contact information Provide a current payment method AWS uses +// the payment method to charge for any billable (not free tier) AWS activity +// that occurs while the account isn't attached to an organization. Follow +// the steps at To leave an organization when all required account information +// has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * You can leave an organization only after you enable IAM user access @@ -6411,7 +6791,7 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // in the IAM User Guide. // // * AccountNotFoundException -// We can't find an AWS account with the AccountId that you specified. Or the +// We can't find an AWS account with the AccountId that you specified, or the // account whose credentials you used to make this request isn't a member of // an organization. // @@ -6424,11 +6804,12 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -6462,6 +6843,15 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -6488,6 +6878,10 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -6503,8 +6897,8 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -6517,14 +6911,9 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -6540,8 +6929,6 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -6690,7 +7077,8 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // Integrating AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) // in the AWS Organizations User Guide. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6712,11 +7100,12 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // must use the credentials of an account that belongs to an organization. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -6750,6 +7139,15 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -6776,6 +7174,10 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -6791,8 +7193,8 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -6805,14 +7207,9 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -6828,8 +7225,6 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -7024,7 +7419,8 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7060,8 +7456,6 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -7258,7 +7652,8 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7294,8 +7689,6 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -7493,7 +7886,8 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7529,8 +7923,6 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -7727,7 +8119,8 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7763,8 +8156,6 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -7903,10 +8294,695 @@ func (c *Organizations) ListCreateAccountStatusPagesWithContext(ctx aws.Context, return p.Err() } -const opListHandshakesForAccount = "ListHandshakesForAccount" +const opListDelegatedAdministrators = "ListDelegatedAdministrators" -// ListHandshakesForAccountRequest generates a "aws/request.Request" representing the -// client's request for the ListHandshakesForAccount operation. The "output" return +// ListDelegatedAdministratorsRequest generates a "aws/request.Request" representing the +// client's request for the ListDelegatedAdministrators operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDelegatedAdministrators for more information on using the ListDelegatedAdministrators +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDelegatedAdministratorsRequest method. +// req, resp := client.ListDelegatedAdministratorsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedAdministrators +func (c *Organizations) ListDelegatedAdministratorsRequest(input *ListDelegatedAdministratorsInput) (req *request.Request, output *ListDelegatedAdministratorsOutput) { + op := &request.Operation{ + Name: opListDelegatedAdministrators, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDelegatedAdministratorsInput{} + } + + output = &ListDelegatedAdministratorsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDelegatedAdministrators API operation for AWS Organizations. +// +// Lists the AWS accounts that are designated as delegated administrators in +// this organization. +// +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Organizations's +// API operation ListDelegatedAdministrators for usage and error information. +// +// Returned Error Types: +// * AccessDeniedException +// You don't have permissions to perform the requested operation. The user or +// role that is making the request must have at least one IAM permissions policy +// attached that grants the required permissions. For more information, see +// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// in the IAM User Guide. +// +// * AWSOrganizationsNotInUseException +// Your account isn't a member of an organization. To make this request, you +// must use the credentials of an account that belongs to an organization. +// +// * ConstraintViolationException +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number +// of accounts that you can create in one day. +// +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contact AWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. Or the number of invitations that you +// tried to send would cause you to exceed the limit of accounts in your +// organization. Send fewer invitations or contact AWS Support to request +// an increase in the number of accounts. Deleted and closed accounts still +// count toward your limit. If you get receive this exception when running +// a command immediately after creating the organization, wait one hour and +// try again. If after an hour it continues to fail with this error, contact +// AWS Support (https://console.aws.amazon.com/support/home#/). +// +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// +// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of +// handshakes that you can send in one day. +// +// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account +// in this organization, you first must migrate the organization's master +// account to the marketplace that corresponds to the master account's address. +// For example, accounts with India addresses must be associated with the +// AISPL marketplace. All accounts in an organization must be associated +// with the same marketplace. +// +// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you +// must first provide contact a valid address and phone number for the master +// account. Then try the operation again. +// +// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the +// master account must have an associated account in the AWS GovCloud (US-West) +// Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) +// in the AWS GovCloud User Guide. +// +// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization +// with this master account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// +// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the +// number of policies of a certain type that can be attached to an entity +// at one time. +// +// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed +// on this resource. +// +// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation +// with this member account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. +// +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. +// +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports only consolidated billing features can't +// perform this operation. +// +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. +// +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of +// policies that you can have in an organization. +// +// * InvalidInputException +// The requested operation failed because you provided invalid values for one +// or more of the request parameters. This exception includes a reason that +// contains additional information about the violated limit: +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and +// can't be modified. +// +// * INPUT_REQUIRED: You must include a value for all required parameters. +// +// * INVALID_ENUM: You specified an invalid value. +// +// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid +// characters. +// +// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains +// at least one invalid value. +// +// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter +// from the response to a previous call of the operation. +// +// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, +// organization, or email) as a party. +// +// * INVALID_PATTERN: You provided a value that doesn't match the required +// pattern. +// +// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't +// match the required pattern. +// +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. +// +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. +// +// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. +// +// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system +// tag. You can’t add, edit, or delete system tag keys because they're +// reserved for AWS use. System tags don’t count against your tags per +// resource limit. +// +// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter +// for the operation. +// +// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer +// than allowed. +// +// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger +// value than allowed. +// +// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter +// than allowed. +// +// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller +// value than allowed. +// +// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only +// between entities in the same root. +// +// * TooManyRequestsException +// You have sent too many requests in too short a period of time. The limit +// helps protect against denial-of-service attacks. Try again later. +// +// For information on limits that affect AWS Organizations, see Limits of AWS +// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) +// in the AWS Organizations User Guide. +// +// * ServiceException +// AWS Organizations can't complete your request because of an internal service +// error. Try again later. +// +// * UnsupportedAPIEndpointException +// This action isn't available in the current Region. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedAdministrators +func (c *Organizations) ListDelegatedAdministrators(input *ListDelegatedAdministratorsInput) (*ListDelegatedAdministratorsOutput, error) { + req, out := c.ListDelegatedAdministratorsRequest(input) + return out, req.Send() +} + +// ListDelegatedAdministratorsWithContext is the same as ListDelegatedAdministrators with the addition of +// the ability to pass a context and additional request options. +// +// See ListDelegatedAdministrators for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Organizations) ListDelegatedAdministratorsWithContext(ctx aws.Context, input *ListDelegatedAdministratorsInput, opts ...request.Option) (*ListDelegatedAdministratorsOutput, error) { + req, out := c.ListDelegatedAdministratorsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDelegatedAdministratorsPages iterates over the pages of a ListDelegatedAdministrators operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDelegatedAdministrators 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 ListDelegatedAdministrators operation. +// pageNum := 0 +// err := client.ListDelegatedAdministratorsPages(params, +// func(page *organizations.ListDelegatedAdministratorsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Organizations) ListDelegatedAdministratorsPages(input *ListDelegatedAdministratorsInput, fn func(*ListDelegatedAdministratorsOutput, bool) bool) error { + return c.ListDelegatedAdministratorsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDelegatedAdministratorsPagesWithContext same as ListDelegatedAdministratorsPages 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 *Organizations) ListDelegatedAdministratorsPagesWithContext(ctx aws.Context, input *ListDelegatedAdministratorsInput, fn func(*ListDelegatedAdministratorsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDelegatedAdministratorsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDelegatedAdministratorsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListDelegatedAdministratorsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListDelegatedServicesForAccount = "ListDelegatedServicesForAccount" + +// ListDelegatedServicesForAccountRequest generates a "aws/request.Request" representing the +// client's request for the ListDelegatedServicesForAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDelegatedServicesForAccount for more information on using the ListDelegatedServicesForAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDelegatedServicesForAccountRequest method. +// req, resp := client.ListDelegatedServicesForAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedServicesForAccount +func (c *Organizations) ListDelegatedServicesForAccountRequest(input *ListDelegatedServicesForAccountInput) (req *request.Request, output *ListDelegatedServicesForAccountOutput) { + op := &request.Operation{ + Name: opListDelegatedServicesForAccount, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDelegatedServicesForAccountInput{} + } + + output = &ListDelegatedServicesForAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDelegatedServicesForAccount API operation for AWS Organizations. +// +// List the AWS services for which the specified account is a delegated administrator. +// +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Organizations's +// API operation ListDelegatedServicesForAccount for usage and error information. +// +// Returned Error Types: +// * AccessDeniedException +// You don't have permissions to perform the requested operation. The user or +// role that is making the request must have at least one IAM permissions policy +// attached that grants the required permissions. For more information, see +// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// in the IAM User Guide. +// +// * AccountNotFoundException +// We can't find an AWS account with the AccountId that you specified, or the +// account whose credentials you used to make this request isn't a member of +// an organization. +// +// * AccountNotRegisteredException +// The specified account is not a delegated administrator for this AWS service. +// +// * AWSOrganizationsNotInUseException +// Your account isn't a member of an organization. To make this request, you +// must use the credentials of an account that belongs to an organization. +// +// * ConstraintViolationException +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number +// of accounts that you can create in one day. +// +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contact AWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. Or the number of invitations that you +// tried to send would cause you to exceed the limit of accounts in your +// organization. Send fewer invitations or contact AWS Support to request +// an increase in the number of accounts. Deleted and closed accounts still +// count toward your limit. If you get receive this exception when running +// a command immediately after creating the organization, wait one hour and +// try again. If after an hour it continues to fail with this error, contact +// AWS Support (https://console.aws.amazon.com/support/home#/). +// +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// +// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of +// handshakes that you can send in one day. +// +// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account +// in this organization, you first must migrate the organization's master +// account to the marketplace that corresponds to the master account's address. +// For example, accounts with India addresses must be associated with the +// AISPL marketplace. All accounts in an organization must be associated +// with the same marketplace. +// +// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you +// must first provide contact a valid address and phone number for the master +// account. Then try the operation again. +// +// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the +// master account must have an associated account in the AWS GovCloud (US-West) +// Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) +// in the AWS GovCloud User Guide. +// +// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization +// with this master account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// +// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the +// number of policies of a certain type that can be attached to an entity +// at one time. +// +// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed +// on this resource. +// +// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation +// with this member account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. +// +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. +// +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports only consolidated billing features can't +// perform this operation. +// +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. +// +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of +// policies that you can have in an organization. +// +// * InvalidInputException +// The requested operation failed because you provided invalid values for one +// or more of the request parameters. This exception includes a reason that +// contains additional information about the violated limit: +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and +// can't be modified. +// +// * INPUT_REQUIRED: You must include a value for all required parameters. +// +// * INVALID_ENUM: You specified an invalid value. +// +// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid +// characters. +// +// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains +// at least one invalid value. +// +// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter +// from the response to a previous call of the operation. +// +// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, +// organization, or email) as a party. +// +// * INVALID_PATTERN: You provided a value that doesn't match the required +// pattern. +// +// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't +// match the required pattern. +// +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. +// +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. +// +// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. +// +// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system +// tag. You can’t add, edit, or delete system tag keys because they're +// reserved for AWS use. System tags don’t count against your tags per +// resource limit. +// +// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter +// for the operation. +// +// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer +// than allowed. +// +// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger +// value than allowed. +// +// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter +// than allowed. +// +// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller +// value than allowed. +// +// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only +// between entities in the same root. +// +// * TooManyRequestsException +// You have sent too many requests in too short a period of time. The limit +// helps protect against denial-of-service attacks. Try again later. +// +// For information on limits that affect AWS Organizations, see Limits of AWS +// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) +// in the AWS Organizations User Guide. +// +// * ServiceException +// AWS Organizations can't complete your request because of an internal service +// error. Try again later. +// +// * UnsupportedAPIEndpointException +// This action isn't available in the current Region. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedServicesForAccount +func (c *Organizations) ListDelegatedServicesForAccount(input *ListDelegatedServicesForAccountInput) (*ListDelegatedServicesForAccountOutput, error) { + req, out := c.ListDelegatedServicesForAccountRequest(input) + return out, req.Send() +} + +// ListDelegatedServicesForAccountWithContext is the same as ListDelegatedServicesForAccount with the addition of +// the ability to pass a context and additional request options. +// +// See ListDelegatedServicesForAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Organizations) ListDelegatedServicesForAccountWithContext(ctx aws.Context, input *ListDelegatedServicesForAccountInput, opts ...request.Option) (*ListDelegatedServicesForAccountOutput, error) { + req, out := c.ListDelegatedServicesForAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDelegatedServicesForAccountPages iterates over the pages of a ListDelegatedServicesForAccount operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDelegatedServicesForAccount 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 ListDelegatedServicesForAccount operation. +// pageNum := 0 +// err := client.ListDelegatedServicesForAccountPages(params, +// func(page *organizations.ListDelegatedServicesForAccountOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Organizations) ListDelegatedServicesForAccountPages(input *ListDelegatedServicesForAccountInput, fn func(*ListDelegatedServicesForAccountOutput, bool) bool) error { + return c.ListDelegatedServicesForAccountPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDelegatedServicesForAccountPagesWithContext same as ListDelegatedServicesForAccountPages 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 *Organizations) ListDelegatedServicesForAccountPagesWithContext(ctx aws.Context, input *ListDelegatedServicesForAccountInput, fn func(*ListDelegatedServicesForAccountOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDelegatedServicesForAccountInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDelegatedServicesForAccountRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListDelegatedServicesForAccountOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListHandshakesForAccount = "ListHandshakesForAccount" + +// ListHandshakesForAccountRequest generates a "aws/request.Request" representing the +// client's request for the ListHandshakesForAccount operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // @@ -7965,7 +9041,8 @@ func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesFor // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called from any account in the organization. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8001,8 +9078,6 @@ func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesFor // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -8202,7 +9277,8 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8242,8 +9318,6 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -8436,7 +9510,8 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8472,8 +9547,6 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -8671,7 +9744,8 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // In the current release, a child can have only a single parent. // @@ -8713,8 +9787,6 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -8907,7 +9979,8 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8943,8 +10016,6 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -9142,7 +10213,8 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9178,8 +10250,6 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -9378,7 +10448,8 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Policy types can be enabled and disabled in roots. This is distinct from // whether they're available in the organization. When you enable all features, @@ -9420,8 +10491,6 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -9611,7 +10680,8 @@ func (c *Organizations) ListTagsForResourceRequest(input *ListTagsForResourceInp // // Currently, you can list tags on an account in AWS Organizations. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9650,8 +10720,6 @@ func (c *Organizations) ListTagsForResourceRequest(input *ListTagsForResourceInp // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -9845,7 +10913,8 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // of results even when there are more results available. The NextToken response // parameter value is null only when there are no more results to display. // -// This operation can be called only from the organization's master account. +// This operation can be called only from the organization's master account +// or by a member account that is a delegated administrator for an AWS service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9881,7 +10950,226 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. +// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid +// characters. +// +// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains +// at least one invalid value. +// +// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter +// from the response to a previous call of the operation. +// +// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, +// organization, or email) as a party. +// +// * INVALID_PATTERN: You provided a value that doesn't match the required +// pattern. +// +// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't +// match the required pattern. +// +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. +// +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. +// +// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. +// +// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system +// tag. You can’t add, edit, or delete system tag keys because they're +// reserved for AWS use. System tags don’t count against your tags per +// resource limit. +// +// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter +// for the operation. +// +// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer +// than allowed. +// +// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger +// value than allowed. +// +// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter +// than allowed. +// +// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller +// value than allowed. +// +// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only +// between entities in the same root. +// +// * PolicyNotFoundException +// We can't find a policy with the PolicyId that you specified. +// +// * ServiceException +// AWS Organizations can't complete your request because of an internal service +// error. Try again later. +// +// * TooManyRequestsException +// You have sent too many requests in too short a period of time. The limit +// helps protect against denial-of-service attacks. Try again later. +// +// For information on limits that affect AWS Organizations, see Limits of AWS +// Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) +// in the AWS Organizations User Guide. +// +// * UnsupportedAPIEndpointException +// This action isn't available in the current Region. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy +func (c *Organizations) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) { + req, out := c.ListTargetsForPolicyRequest(input) + return out, req.Send() +} + +// ListTargetsForPolicyWithContext is the same as ListTargetsForPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See ListTargetsForPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Organizations) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, opts ...request.Option) (*ListTargetsForPolicyOutput, error) { + req, out := c.ListTargetsForPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTargetsForPolicyPages iterates over the pages of a ListTargetsForPolicy operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTargetsForPolicy 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 ListTargetsForPolicy operation. +// pageNum := 0 +// err := client.ListTargetsForPolicyPages(params, +// func(page *organizations.ListTargetsForPolicyOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Organizations) ListTargetsForPolicyPages(input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool) error { + return c.ListTargetsForPolicyPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTargetsForPolicyPagesWithContext same as ListTargetsForPolicyPages 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 *Organizations) ListTargetsForPolicyPagesWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTargetsForPolicyInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTargetsForPolicyRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opMoveAccount = "MoveAccount" + +// MoveAccountRequest generates a "aws/request.Request" representing the +// client's request for the MoveAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See MoveAccount for more information on using the MoveAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the MoveAccountRequest method. +// req, resp := client.MoveAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount +func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *request.Request, output *MoveAccountOutput) { + op := &request.Operation{ + Name: opMoveAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &MoveAccountInput{} + } + + output = &MoveAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// MoveAccount API operation for AWS Organizations. +// +// Moves an account from its current source parent root or organizational unit +// (OU) to the specified destination parent root or OU. +// +// This operation can be called only from the organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Organizations's +// API operation MoveAccount for usage and error information. +// +// Returned Error Types: +// * AccessDeniedException +// You don't have permissions to perform the requested operation. The user or +// role that is making the request must have at least one IAM permissions policy +// attached that grants the required permissions. For more information, see +// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// in the IAM User Guide. +// +// * InvalidInputException +// The requested operation failed because you provided invalid values for one +// or more of the request parameters. This exception includes a reason that +// contains additional information about the violated limit: +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and +// can't be modified. +// +// * INPUT_REQUIRED: You must include a value for all required parameters. +// +// * INVALID_ENUM: You specified an invalid value. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -9932,12 +11220,20 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only // between entities in the same root. // -// * PolicyNotFoundException -// We can't find a policy with the PolicyId that you specified. +// * SourceParentNotFoundException +// We can't find a source root or OU with the ParentId that you specified. +// +// * DestinationParentNotFoundException +// We can't find the destination container (a root or OU) with the ParentId +// that you specified. // -// * ServiceException -// AWS Organizations can't complete your request because of an internal service -// error. Try again later. +// * DuplicateAccountException +// That account is already present in the specified destination. +// +// * AccountNotFoundException +// We can't find an AWS account with the AccountId that you specified, or the +// account whose credentials you used to make this request isn't a member of +// an organization. // // * TooManyRequestsException // You have sent too many requests in too short a period of time. The limit @@ -9947,130 +11243,95 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) // in the AWS Organizations User Guide. // -// * UnsupportedAPIEndpointException -// This action isn't available in the current Region. +// * ConcurrentModificationException +// The target of the operation is currently being modified by a different request. +// Try again later. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy -func (c *Organizations) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) { - req, out := c.ListTargetsForPolicyRequest(input) +// * AWSOrganizationsNotInUseException +// Your account isn't a member of an organization. To make this request, you +// must use the credentials of an account that belongs to an organization. +// +// * ServiceException +// AWS Organizations can't complete your request because of an internal service +// error. Try again later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount +func (c *Organizations) MoveAccount(input *MoveAccountInput) (*MoveAccountOutput, error) { + req, out := c.MoveAccountRequest(input) return out, req.Send() } -// ListTargetsForPolicyWithContext is the same as ListTargetsForPolicy with the addition of +// MoveAccountWithContext is the same as MoveAccount with the addition of // the ability to pass a context and additional request options. // -// See ListTargetsForPolicy for details on how to use this API operation. +// See MoveAccount for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Organizations) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, opts ...request.Option) (*ListTargetsForPolicyOutput, error) { - req, out := c.ListTargetsForPolicyRequest(input) +func (c *Organizations) MoveAccountWithContext(ctx aws.Context, input *MoveAccountInput, opts ...request.Option) (*MoveAccountOutput, error) { + req, out := c.MoveAccountRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListTargetsForPolicyPages iterates over the pages of a ListTargetsForPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTargetsForPolicy 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 ListTargetsForPolicy operation. -// pageNum := 0 -// err := client.ListTargetsForPolicyPages(params, -// func(page *organizations.ListTargetsForPolicyOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *Organizations) ListTargetsForPolicyPages(input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool) error { - return c.ListTargetsForPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTargetsForPolicyPagesWithContext same as ListTargetsForPolicyPages 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 *Organizations) ListTargetsForPolicyPagesWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTargetsForPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTargetsForPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opMoveAccount = "MoveAccount" +const opRegisterDelegatedAdministrator = "RegisterDelegatedAdministrator" -// MoveAccountRequest generates a "aws/request.Request" representing the -// client's request for the MoveAccount operation. The "output" return +// RegisterDelegatedAdministratorRequest generates a "aws/request.Request" representing the +// client's request for the RegisterDelegatedAdministrator operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See MoveAccount for more information on using the MoveAccount +// See RegisterDelegatedAdministrator for more information on using the RegisterDelegatedAdministrator // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the MoveAccountRequest method. -// req, resp := client.MoveAccountRequest(params) +// // Example sending a request using the RegisterDelegatedAdministratorRequest method. +// req, resp := client.RegisterDelegatedAdministratorRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount -func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *request.Request, output *MoveAccountOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RegisterDelegatedAdministrator +func (c *Organizations) RegisterDelegatedAdministratorRequest(input *RegisterDelegatedAdministratorInput) (req *request.Request, output *RegisterDelegatedAdministratorOutput) { op := &request.Operation{ - Name: opMoveAccount, + Name: opRegisterDelegatedAdministrator, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &MoveAccountInput{} + input = &RegisterDelegatedAdministratorInput{} } - output = &MoveAccountOutput{} + output = &RegisterDelegatedAdministratorOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// MoveAccount API operation for AWS Organizations. +// RegisterDelegatedAdministrator API operation for AWS Organizations. // -// Moves an account from its current source parent root or organizational unit -// (OU) to the specified destination parent root or OU. +// Enables the specified member account to administer the Organizations features +// of the specified AWS service. It grants read-only access to AWS Organizations +// service data. The account still requires IAM permissions to access and administer +// the AWS service. +// +// You can run this action only for AWS services that support this feature. +// For a current list of services that support it, see the column Supports Delegated +// Administrator in the table at AWS Services that you can use with AWS Organizations +// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrated-services-list.html) +// in the AWS Organizations User Guide. // // This operation can be called only from the organization's master account. // @@ -10079,7 +11340,7 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // the error. // // See the AWS API reference guide for AWS Organizations's -// API operation MoveAccount for usage and error information. +// API operation RegisterDelegatedAdministrator for usage and error information. // // Returned Error Types: // * AccessDeniedException @@ -10089,6 +11350,133 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) // in the IAM User Guide. // +// * AccountAlreadyRegisteredException +// The specified account is already a delegated administrator for this AWS service. +// +// * AccountNotFoundException +// We can't find an AWS account with the AccountId that you specified, or the +// account whose credentials you used to make this request isn't a member of +// an organization. +// +// * AWSOrganizationsNotInUseException +// Your account isn't a member of an organization. To make this request, you +// must use the credentials of an account that belongs to an organization. +// +// * ConcurrentModificationException +// The target of the operation is currently being modified by a different request. +// Try again later. +// +// * ConstraintViolationException +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. +// +// Some of the reasons in the following list might not be applicable to this +// specific API or operation: +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number +// of accounts that you can create in one day. +// +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contact AWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. Or the number of invitations that you +// tried to send would cause you to exceed the limit of accounts in your +// organization. Send fewer invitations or contact AWS Support to request +// an increase in the number of accounts. Deleted and closed accounts still +// count toward your limit. If you get receive this exception when running +// a command immediately after creating the organization, wait one hour and +// try again. If after an hour it continues to fail with this error, contact +// AWS Support (https://console.aws.amazon.com/support/home#/). +// +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// +// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of +// handshakes that you can send in one day. +// +// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account +// in this organization, you first must migrate the organization's master +// account to the marketplace that corresponds to the master account's address. +// For example, accounts with India addresses must be associated with the +// AISPL marketplace. All accounts in an organization must be associated +// with the same marketplace. +// +// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you +// must first provide contact a valid address and phone number for the master +// account. Then try the operation again. +// +// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the +// master account must have an associated account in the AWS GovCloud (US-West) +// Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html) +// in the AWS GovCloud User Guide. +// +// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization +// with this master account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// +// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the +// number of policies of a certain type that can be attached to an entity +// at one time. +// +// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed +// on this resource. +// +// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation +// with this member account, you first must associate a valid payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// in the AWS Organizations User Guide. +// +// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. +// +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. +// +// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation +// that requires the organization to be configured to support all features. +// An organization that supports only consolidated billing features can't +// perform this operation. +// +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. +// +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of +// policies that you can have in an organization. +// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -10104,8 +11492,6 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -10155,21 +11541,6 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only // between entities in the same root. // -// * SourceParentNotFoundException -// We can't find a source root or OU with the ParentId that you specified. -// -// * DestinationParentNotFoundException -// We can't find the destination container (a root or OU) with the ParentId -// that you specified. -// -// * DuplicateAccountException -// That account is already present in the specified destination. -// -// * AccountNotFoundException -// We can't find an AWS account with the AccountId that you specified. Or the -// account whose credentials you used to make this request isn't a member of -// an organization. -// // * TooManyRequestsException // You have sent too many requests in too short a period of time. The limit // helps protect against denial-of-service attacks. Try again later. @@ -10178,35 +11549,30 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) // in the AWS Organizations User Guide. // -// * ConcurrentModificationException -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// * AWSOrganizationsNotInUseException -// Your account isn't a member of an organization. To make this request, you -// must use the credentials of an account that belongs to an organization. -// // * ServiceException // AWS Organizations can't complete your request because of an internal service // error. Try again later. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount -func (c *Organizations) MoveAccount(input *MoveAccountInput) (*MoveAccountOutput, error) { - req, out := c.MoveAccountRequest(input) +// * UnsupportedAPIEndpointException +// This action isn't available in the current Region. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RegisterDelegatedAdministrator +func (c *Organizations) RegisterDelegatedAdministrator(input *RegisterDelegatedAdministratorInput) (*RegisterDelegatedAdministratorOutput, error) { + req, out := c.RegisterDelegatedAdministratorRequest(input) return out, req.Send() } -// MoveAccountWithContext is the same as MoveAccount with the addition of +// RegisterDelegatedAdministratorWithContext is the same as RegisterDelegatedAdministrator with the addition of // the ability to pass a context and additional request options. // -// See MoveAccount for details on how to use this API operation. +// See RegisterDelegatedAdministrator for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Organizations) MoveAccountWithContext(ctx aws.Context, input *MoveAccountInput, opts ...request.Option) (*MoveAccountOutput, error) { - req, out := c.MoveAccountRequest(input) +func (c *Organizations) RegisterDelegatedAdministratorWithContext(ctx aws.Context, input *RegisterDelegatedAdministratorInput, opts ...request.Option) (*RegisterDelegatedAdministratorOutput, error) { + req, out := c.RegisterDelegatedAdministratorRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -10271,15 +11637,15 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // You can remove an account from your organization only if the account is configured // with the information required to operate as a standalone account. When you // create an account in an organization using the AWS Organizations console, -// API, or CLI, the information required of standalone accounts is not automatically -// collected. For an account that you want to make standalone, you must accept -// the end user license agreement (EULA). You must also choose a support plan, +// API, or CLI commands, the information required of standalone accounts is +// not automatically collected. For an account that you want to make standalone, +// you must accept the end user license agreement (EULA), choose a support plan, // provide and verify the required contact information, and provide a current // payment method. AWS uses the payment method to charge for any billable (not // free tier) AWS activity that occurs while the account isn't attached to an // organization. To remove an account that doesn't yet have this information, -// you must sign in as the member account. Then follow the steps at To leave -// an organization when all required account information has not yet been provided +// you must sign in as the member account and follow the steps at To leave an +// organization when all required account information has not yet been provided // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // @@ -10299,7 +11665,7 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // in the IAM User Guide. // // * AccountNotFoundException -// We can't find an AWS account with the AccountId that you specified. Or the +// We can't find an AWS account with the AccountId that you specified, or the // account whose credentials you used to make this request isn't a member of // an organization. // @@ -10312,11 +11678,12 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -10350,6 +11717,15 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -10376,6 +11752,10 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -10391,8 +11771,8 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -10405,13 +11785,8 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of -// policies that you can have in an organization. -// -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of +// policies that you can have in an organization. // // * InvalidInputException // The requested operation failed because you provided invalid values for one @@ -10428,8 +11803,6 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -10596,11 +11969,12 @@ func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *reques // We can't find a root, OU, or account with the TargetId that you specified. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -10634,6 +12008,15 @@ func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *reques // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -10660,6 +12043,10 @@ func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *reques // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -10675,8 +12062,8 @@ func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *reques // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -10689,14 +12076,9 @@ func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *reques // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -10712,8 +12094,6 @@ func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *reques // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -10875,11 +12255,12 @@ func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *re // We can't find a root, OU, or account with the TargetId that you specified. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -10913,6 +12294,15 @@ func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *re // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -10939,6 +12329,10 @@ func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *re // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -10954,8 +12348,8 @@ func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *re // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -10968,14 +12362,9 @@ func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *re // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * InvalidInputException // The requested operation failed because you provided invalid values for one // or more of the request parameters. This exception includes a reason that @@ -10991,8 +12380,6 @@ func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *re // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -11167,8 +12554,6 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -11329,11 +12714,12 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // Try again later. // // * ConstraintViolationException -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -11367,6 +12753,15 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -11393,6 +12788,10 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -11408,8 +12807,8 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -11422,14 +12821,9 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. // -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. -// // * DuplicatePolicyException // A policy with the same name already exists. // @@ -11448,8 +12842,6 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -11552,8 +12944,8 @@ func (c *Organizations) UpdatePolicyWithContext(ctx aws.Context, input *UpdatePo // Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. type AWSOrganizationsNotInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -11570,17 +12962,17 @@ func (s AWSOrganizationsNotInUseException) GoString() string { func newErrorAWSOrganizationsNotInUseException(v protocol.ResponseMetadata) error { return &AWSOrganizationsNotInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AWSOrganizationsNotInUseException) Code() string { +func (s *AWSOrganizationsNotInUseException) Code() string { return "AWSOrganizationsNotInUseException" } // Message returns the exception's message. -func (s AWSOrganizationsNotInUseException) Message() string { +func (s *AWSOrganizationsNotInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11588,22 +12980,22 @@ func (s AWSOrganizationsNotInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AWSOrganizationsNotInUseException) OrigErr() error { +func (s *AWSOrganizationsNotInUseException) OrigErr() error { return nil } -func (s AWSOrganizationsNotInUseException) Error() string { +func (s *AWSOrganizationsNotInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AWSOrganizationsNotInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AWSOrganizationsNotInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AWSOrganizationsNotInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *AWSOrganizationsNotInUseException) RequestID() string { + return s.RespMetadata.RequestID } type AcceptHandshakeInput struct { @@ -11676,8 +13068,8 @@ func (s *AcceptHandshakeOutput) SetHandshake(v *Handshake) *AcceptHandshakeOutpu // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) // in the IAM User Guide. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -11694,17 +13086,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11712,30 +13104,30 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole // for organizations.amazonaws.com permission so that AWS Organizations can // create the required service-linked role. You don't have that permission. type AccessDeniedForDependencyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -11754,17 +13146,17 @@ func (s AccessDeniedForDependencyException) GoString() string { func newErrorAccessDeniedForDependencyException(v protocol.ResponseMetadata) error { return &AccessDeniedForDependencyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedForDependencyException) Code() string { +func (s *AccessDeniedForDependencyException) Code() string { return "AccessDeniedForDependencyException" } // Message returns the exception's message. -func (s AccessDeniedForDependencyException) Message() string { +func (s *AccessDeniedForDependencyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11772,22 +13164,22 @@ func (s AccessDeniedForDependencyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedForDependencyException) OrigErr() error { +func (s *AccessDeniedForDependencyException) OrigErr() error { return nil } -func (s AccessDeniedForDependencyException) Error() string { +func (s *AccessDeniedForDependencyException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedForDependencyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedForDependencyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedForDependencyException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedForDependencyException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about an AWS account that is a member of an organization. @@ -11882,12 +13274,68 @@ func (s *Account) SetStatus(v string) *Account { return s } -// We can't find an AWS account with the AccountId that you specified. Or the +// The specified account is already a delegated administrator for this AWS service. +type AccountAlreadyRegisteredException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s AccountAlreadyRegisteredException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountAlreadyRegisteredException) GoString() string { + return s.String() +} + +func newErrorAccountAlreadyRegisteredException(v protocol.ResponseMetadata) error { + return &AccountAlreadyRegisteredException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccountAlreadyRegisteredException) Code() string { + return "AccountAlreadyRegisteredException" +} + +// Message returns the exception's message. +func (s *AccountAlreadyRegisteredException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccountAlreadyRegisteredException) OrigErr() error { + return nil +} + +func (s *AccountAlreadyRegisteredException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccountAlreadyRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccountAlreadyRegisteredException) RequestID() string { + return s.RespMetadata.RequestID +} + +// We can't find an AWS account with the AccountId that you specified, or the // account whose credentials you used to make this request isn't a member of // an organization. type AccountNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -11904,17 +13352,73 @@ func (s AccountNotFoundException) GoString() string { func newErrorAccountNotFoundException(v protocol.ResponseMetadata) error { return &AccountNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccountNotFoundException) Code() string { +func (s *AccountNotFoundException) Code() string { return "AccountNotFoundException" } // Message returns the exception's message. -func (s AccountNotFoundException) Message() string { +func (s *AccountNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccountNotFoundException) OrigErr() error { + return nil +} + +func (s *AccountNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccountNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccountNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The specified account is not a delegated administrator for this AWS service. +type AccountNotRegisteredException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s AccountNotRegisteredException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountNotRegisteredException) GoString() string { + return s.String() +} + +func newErrorAccountNotRegisteredException(v protocol.ResponseMetadata) error { + return &AccountNotRegisteredException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccountNotRegisteredException) Code() string { + return "AccountNotRegisteredException" +} + +// Message returns the exception's message. +func (s *AccountNotRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11922,22 +13426,22 @@ func (s AccountNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccountNotFoundException) OrigErr() error { +func (s *AccountNotRegisteredException) OrigErr() error { return nil } -func (s AccountNotFoundException) Error() string { +func (s *AccountNotRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccountNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccountNotRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccountNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccountNotRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // You can't invite an existing account to your organization until you verify @@ -11945,8 +13449,8 @@ func (s AccountNotFoundException) RequestID() string { // information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) // in the AWS Organizations User Guide. type AccountOwnerNotVerifiedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -11963,17 +13467,17 @@ func (s AccountOwnerNotVerifiedException) GoString() string { func newErrorAccountOwnerNotVerifiedException(v protocol.ResponseMetadata) error { return &AccountOwnerNotVerifiedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccountOwnerNotVerifiedException) Code() string { +func (s *AccountOwnerNotVerifiedException) Code() string { return "AccountOwnerNotVerifiedException" } // Message returns the exception's message. -func (s AccountOwnerNotVerifiedException) Message() string { +func (s *AccountOwnerNotVerifiedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11981,29 +13485,29 @@ func (s AccountOwnerNotVerifiedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccountOwnerNotVerifiedException) OrigErr() error { +func (s *AccountOwnerNotVerifiedException) OrigErr() error { return nil } -func (s AccountOwnerNotVerifiedException) Error() string { +func (s *AccountOwnerNotVerifiedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccountOwnerNotVerifiedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccountOwnerNotVerifiedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccountOwnerNotVerifiedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccountOwnerNotVerifiedException) RequestID() string { + return s.RespMetadata.RequestID } // This account is already a member of an organization. An account can belong // to only one organization at a time. type AlreadyInOrganizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12020,17 +13524,17 @@ func (s AlreadyInOrganizationException) GoString() string { func newErrorAlreadyInOrganizationException(v protocol.ResponseMetadata) error { return &AlreadyInOrganizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlreadyInOrganizationException) Code() string { +func (s *AlreadyInOrganizationException) Code() string { return "AlreadyInOrganizationException" } // Message returns the exception's message. -func (s AlreadyInOrganizationException) Message() string { +func (s *AlreadyInOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12038,22 +13542,22 @@ func (s AlreadyInOrganizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlreadyInOrganizationException) OrigErr() error { +func (s *AlreadyInOrganizationException) OrigErr() error { return nil } -func (s AlreadyInOrganizationException) Error() string { +func (s *AlreadyInOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AlreadyInOrganizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlreadyInOrganizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlreadyInOrganizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlreadyInOrganizationException) RequestID() string { + return s.RespMetadata.RequestID } type AttachPolicyInput struct { @@ -12253,8 +13757,8 @@ func (s *Child) SetType(v string) *Child { // We can't find an organizational unit (OU) or AWS account with the ChildId // that you specified. type ChildNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12271,17 +13775,17 @@ func (s ChildNotFoundException) GoString() string { func newErrorChildNotFoundException(v protocol.ResponseMetadata) error { return &ChildNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ChildNotFoundException) Code() string { +func (s *ChildNotFoundException) Code() string { return "ChildNotFoundException" } // Message returns the exception's message. -func (s ChildNotFoundException) Message() string { +func (s *ChildNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12289,29 +13793,29 @@ func (s ChildNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ChildNotFoundException) OrigErr() error { +func (s *ChildNotFoundException) OrigErr() error { return nil } -func (s ChildNotFoundException) Error() string { +func (s *ChildNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ChildNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ChildNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ChildNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ChildNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The target of the operation is currently being modified by a different request. // Try again later. type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12328,17 +13832,17 @@ func (s ConcurrentModificationException) GoString() string { func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { return &ConcurrentModificationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentModificationException) Code() string { +func (s *ConcurrentModificationException) Code() string { return "ConcurrentModificationException" } // Message returns the exception's message. -func (s ConcurrentModificationException) Message() string { +func (s *ConcurrentModificationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12346,29 +13850,30 @@ func (s ConcurrentModificationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentModificationException) OrigErr() error { +func (s *ConcurrentModificationException) OrigErr() error { return nil } -func (s ConcurrentModificationException) Error() string { +func (s *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentModificationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentModificationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentModificationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentModificationException) RequestID() string { + return s.RespMetadata.RequestID } -// Performing this operation violates a minimum or maximum value limit. Examples -// include attempting to remove the last service control policy (SCP) from an -// OU or root, or attaching too many policies to an account, OU, or root. This -// exception includes a reason that contains additional information about the -// violated limit. +// Performing this operation violates a minimum or maximum value limit. For +// example, attempting to remove the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -12402,6 +13907,15 @@ func (s ConcurrentModificationException) RequestID() string { // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // +// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate +// only a member account as a delegated administrator. +// +// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, +// you must first deregister this account as a delegated administrator. +// +// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, +// you must first deregister all delegated administrators for this service. +// // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -12428,6 +13942,10 @@ func (s ConcurrentModificationException) RequestID() string { // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // +// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted +// to register more delegated administrators than allowed for the service +// principal. +// // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -12443,8 +13961,8 @@ func (s ConcurrentModificationException) RequestID() string { // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a -// policy from an entity, which would cause the entity to have fewer than -// the minimum number of policies of the required type. +// policy from an entity that would cause the entity to have fewer than the +// minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -12457,16 +13975,11 @@ func (s ConcurrentModificationException) RequestID() string { // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // -// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of +// * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. -// -// * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant -// with the tag policy that’s in effect for the account. For more information, -// see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the AWS Organizations User Guide. type ConstraintViolationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -12485,17 +13998,17 @@ func (s ConstraintViolationException) GoString() string { func newErrorConstraintViolationException(v protocol.ResponseMetadata) error { return &ConstraintViolationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConstraintViolationException) Code() string { +func (s *ConstraintViolationException) Code() string { return "ConstraintViolationException" } // Message returns the exception's message. -func (s ConstraintViolationException) Message() string { +func (s *ConstraintViolationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12503,22 +14016,22 @@ func (s ConstraintViolationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConstraintViolationException) OrigErr() error { +func (s *ConstraintViolationException) OrigErr() error { return nil } -func (s ConstraintViolationException) Error() string { +func (s *ConstraintViolationException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConstraintViolationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConstraintViolationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConstraintViolationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConstraintViolationException) RequestID() string { + return s.RespMetadata.RequestID } type CreateAccountInput struct { @@ -12545,9 +14058,9 @@ type CreateAccountInput struct { // Console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) // in the AWS Billing and Cost Management User Guide. // - // If you don't specify this parameter, the value defaults to ALLOW. This value - // allows IAM users and roles with the required permissions to access billing - // information for the new account. + // If you don't specify this parameter, the value defaults to ALLOW, and IAM + // users and roles with the required permissions can access billing information + // for the new account. IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"` // (Optional) @@ -12561,11 +14074,15 @@ type CreateAccountInput struct { // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole. // // For more information about how to use this role to access the member account, - // see Accessing and Administering the Member Accounts in Your Organization - // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) - // in the AWS Organizations User Guide. Also see steps 2 and 3 in Tutorial: - // Delegate Access Across AWS Accounts Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) - // in the IAM User Guide. + // see the following links: + // + // * Accessing and Administering the Member Accounts in Your Organization + // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) + // in the AWS Organizations User Guide + // + // * Steps 2 and 3 in Tutorial: Delegate Access Across AWS Accounts Using + // IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) + // in the IAM User Guide // // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate // this parameter. The pattern can include uppercase letters, lowercase letters, @@ -12696,7 +14213,7 @@ type CreateAccountStatus struct { // you provided is not valid. // // * INTERNAL_FAILURE: The account could not be created because of an internal - // failure. Try again later. If the problem persists, contact AWS Support. + // failure. Try again later. If the problem persists, contact Customer Support. FailureReason *string `type:"string" enum:"CreateAccountFailureReason"` // If the account was created successfully, the unique identifier (ID) of the @@ -12776,11 +14293,11 @@ func (s *CreateAccountStatus) SetState(v string) *CreateAccountStatus { return s } -// We can't find a create account request with the CreateAccountRequestId that +// We can't find an create account request with the CreateAccountRequestId that // you specified. type CreateAccountStatusNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12797,17 +14314,17 @@ func (s CreateAccountStatusNotFoundException) GoString() string { func newErrorCreateAccountStatusNotFoundException(v protocol.ResponseMetadata) error { return &CreateAccountStatusNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CreateAccountStatusNotFoundException) Code() string { +func (s *CreateAccountStatusNotFoundException) Code() string { return "CreateAccountStatusNotFoundException" } // Message returns the exception's message. -func (s CreateAccountStatusNotFoundException) Message() string { +func (s *CreateAccountStatusNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12815,22 +14332,22 @@ func (s CreateAccountStatusNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CreateAccountStatusNotFoundException) OrigErr() error { +func (s *CreateAccountStatusNotFoundException) OrigErr() error { return nil } -func (s CreateAccountStatusNotFoundException) Error() string { +func (s *CreateAccountStatusNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CreateAccountStatusNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CreateAccountStatusNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CreateAccountStatusNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *CreateAccountStatusNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type CreateGovCloudAccountInput struct { @@ -12847,8 +14364,8 @@ type CreateGovCloudAccountInput struct { // creation. You can't access the root user of the account or remove an account // that was created with an invalid email address. Like all request parameters // for CreateGovCloudAccount, the request for the email address for the AWS - // GovCloud (US) account originates from the commercial Region. It does not - // come from the AWS GovCloud (US) Region. + // GovCloud (US) account originates from the commercial Region, not from the + // AWS GovCloud (US) Region. // // Email is a required field Email *string `min:"6" type:"string" required:"true" sensitive:"true"` @@ -12878,8 +14395,8 @@ type CreateGovCloudAccountInput struct { // For more information about how to use this role to access the member account, // see Accessing and Administering the Member Accounts in Your Organization // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role) - // in the AWS Organizations User Guide. See also steps 2 and 3 in Tutorial: - // Delegate Access Across AWS Accounts Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) + // in the AWS Organizations User Guide and steps 2 and 3 in Tutorial: Delegate + // Access Across AWS Accounts Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html) // in the IAM User Guide. // // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate @@ -12980,8 +14497,8 @@ type CreateOrganizationInput struct { // in the AWS Organizations User Guide. The consolidated billing feature // subset isn't available for organizations in the AWS GovCloud (US) Region. // - // * ALL: In addition to all the features that consolidated billing feature - // set supports, the master account can also apply any policy type to any + // * ALL: In addition to all the features supported by the consolidated billing + // feature set, the master account can also apply any policy type to any // member account in the organization. For more information, see All features // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all) // in the AWS Organizations User Guide. @@ -13120,12 +14637,12 @@ func (s *CreateOrganizationalUnitOutput) SetOrganizationalUnit(v *Organizational type CreatePolicyInput struct { _ struct{} `type:"structure"` - // The policy content to add to the new policy. For example, you could create - // a service control policy (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) - // (SCP) that specifies the permissions that administrators in attached accounts - // can delegate to their users, groups, and roles. The string for this SCP must - // be JSON text. For more information about the SCP syntax, see Service Control - // Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) + // The policy content to add to the new policy. For example, if you create a + // service control policy (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) + // (SCP), 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 Service Control Policy Syntax + // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. // // Content is a required field @@ -13147,6 +14664,9 @@ type CreatePolicyInput struct { // The type of policy to create. // + // In the current release, the only type of policy that you can create is a + // service control policy (SCP). + // // Type is a required field Type *string `type:"string" required:"true" enum:"PolicyType"` } @@ -13302,6 +14822,130 @@ func (s *DeclineHandshakeOutput) SetHandshake(v *Handshake) *DeclineHandshakeOut return s } +// Contains information about the delegated administrator. +type DelegatedAdministrator struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the delegated administrator's account. + Arn *string `type:"string"` + + // The date when the account was made a delegated administrator. + DelegationEnabledDate *time.Time `type:"timestamp"` + + // The email address that is associated with the delegated administrator's AWS + // account. + Email *string `min:"6" type:"string" sensitive:"true"` + + // The unique identifier (ID) of the delegated administrator's account. + Id *string `type:"string"` + + // The method by which the delegated administrator's account joined the organization. + JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"` + + // The date when the delegated administrator's account became a part of the + // organization. + JoinedTimestamp *time.Time `type:"timestamp"` + + // The friendly name of the delegated administrator's account. + Name *string `min:"1" type:"string" sensitive:"true"` + + // The status of the delegated administrator's account in the organization. + Status *string `type:"string" enum:"AccountStatus"` +} + +// String returns the string representation +func (s DelegatedAdministrator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DelegatedAdministrator) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DelegatedAdministrator) SetArn(v string) *DelegatedAdministrator { + s.Arn = &v + return s +} + +// SetDelegationEnabledDate sets the DelegationEnabledDate field's value. +func (s *DelegatedAdministrator) SetDelegationEnabledDate(v time.Time) *DelegatedAdministrator { + s.DelegationEnabledDate = &v + return s +} + +// SetEmail sets the Email field's value. +func (s *DelegatedAdministrator) SetEmail(v string) *DelegatedAdministrator { + s.Email = &v + return s +} + +// SetId sets the Id field's value. +func (s *DelegatedAdministrator) SetId(v string) *DelegatedAdministrator { + s.Id = &v + return s +} + +// SetJoinedMethod sets the JoinedMethod field's value. +func (s *DelegatedAdministrator) SetJoinedMethod(v string) *DelegatedAdministrator { + s.JoinedMethod = &v + return s +} + +// SetJoinedTimestamp sets the JoinedTimestamp field's value. +func (s *DelegatedAdministrator) SetJoinedTimestamp(v time.Time) *DelegatedAdministrator { + s.JoinedTimestamp = &v + return s +} + +// SetName sets the Name field's value. +func (s *DelegatedAdministrator) SetName(v string) *DelegatedAdministrator { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DelegatedAdministrator) SetStatus(v string) *DelegatedAdministrator { + s.Status = &v + return s +} + +// Contains information about the AWS service for which the account is a delegated +// administrator. +type DelegatedService struct { + _ struct{} `type:"structure"` + + // The date that the account became a delegated administrator for this service. + DelegationEnabledDate *time.Time `type:"timestamp"` + + // The name of a service that can request an operation for the specified service. + // This is typically in the form of a URL, such as: servicename.amazonaws.com. + ServicePrincipal *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DelegatedService) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DelegatedService) GoString() string { + return s.String() +} + +// SetDelegationEnabledDate sets the DelegationEnabledDate field's value. +func (s *DelegatedService) SetDelegationEnabledDate(v time.Time) *DelegatedService { + s.DelegationEnabledDate = &v + return s +} + +// SetServicePrincipal sets the ServicePrincipal field's value. +func (s *DelegatedService) SetServicePrincipal(v string) *DelegatedService { + s.ServicePrincipal = &v + return s +} + type DeleteOrganizationInput struct { _ struct{} `type:"structure"` } @@ -13368,55 +15012,125 @@ func (s *DeleteOrganizationalUnitInput) Validate() error { return nil } -// SetOrganizationalUnitId sets the OrganizationalUnitId field's value. -func (s *DeleteOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DeleteOrganizationalUnitInput { - s.OrganizationalUnitId = &v +// SetOrganizationalUnitId sets the OrganizationalUnitId field's value. +func (s *DeleteOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DeleteOrganizationalUnitInput { + s.OrganizationalUnitId = &v + return s +} + +type DeleteOrganizationalUnitOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteOrganizationalUnitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteOrganizationalUnitOutput) GoString() string { + return s.String() +} + +type DeletePolicyInput struct { + _ struct{} `type:"structure"` + + // The unique identifier (ID) of the policy that you want to delete. You can + // get the ID from the ListPolicies or ListPoliciesForTarget operations. + // + // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string + // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, + // or the underscore character (_). + // + // PolicyId is a required field + PolicyId *string `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 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 DeleteOrganizationalUnitOutput struct { +type DeletePolicyOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteOrganizationalUnitOutput) String() string { +func (s DeletePolicyOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteOrganizationalUnitOutput) GoString() string { +func (s DeletePolicyOutput) GoString() string { return s.String() } -type DeletePolicyInput struct { +type DeregisterDelegatedAdministratorInput struct { _ struct{} `type:"structure"` - // The unique identifier (ID) of the policy that you want to delete. You can - // get the ID from the ListPolicies or ListPoliciesForTarget operations. + // The account ID number of the member account in the organization that you + // want to deregister as a delegated administrator. // - // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string - // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, - // or the underscore character (_). + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The service principal name of an AWS service for which the account is a delegated + // administrator. // - // PolicyId is a required field - PolicyId *string `type:"string" required:"true"` + // Delegated administrator privileges are revoked for only the specified AWS + // service from the member account. If the specified service is the only service + // for which the member account is a delegated administrator, the operation + // also revokes Organizations read action permissions. + // + // ServicePrincipal is a required field + ServicePrincipal *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s DeletePolicyInput) String() string { +func (s DeregisterDelegatedAdministratorInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeletePolicyInput) GoString() string { +func (s DeregisterDelegatedAdministratorInput) 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")) +func (s *DeregisterDelegatedAdministratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterDelegatedAdministratorInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.ServicePrincipal == nil { + invalidParams.Add(request.NewErrParamRequired("ServicePrincipal")) + } + if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1)) } if invalidParams.Len() > 0 { @@ -13425,23 +15139,29 @@ func (s *DeletePolicyInput) Validate() error { return nil } -// SetPolicyId sets the PolicyId field's value. -func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput { - s.PolicyId = &v +// SetAccountId sets the AccountId field's value. +func (s *DeregisterDelegatedAdministratorInput) SetAccountId(v string) *DeregisterDelegatedAdministratorInput { + s.AccountId = &v return s } -type DeletePolicyOutput struct { +// SetServicePrincipal sets the ServicePrincipal field's value. +func (s *DeregisterDelegatedAdministratorInput) SetServicePrincipal(v string) *DeregisterDelegatedAdministratorInput { + s.ServicePrincipal = &v + return s +} + +type DeregisterDelegatedAdministratorOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeletePolicyOutput) String() string { +func (s DeregisterDelegatedAdministratorOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeletePolicyOutput) GoString() string { +func (s DeregisterDelegatedAdministratorOutput) GoString() string { return s.String() } @@ -13888,8 +15608,8 @@ func (s *DescribePolicyOutput) SetPolicy(v *Policy) *DescribePolicyOutput { // We can't find the destination container (a root or OU) with the ParentId // that you specified. type DestinationParentNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -13906,17 +15626,17 @@ func (s DestinationParentNotFoundException) GoString() string { func newErrorDestinationParentNotFoundException(v protocol.ResponseMetadata) error { return &DestinationParentNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DestinationParentNotFoundException) Code() string { +func (s *DestinationParentNotFoundException) Code() string { return "DestinationParentNotFoundException" } // Message returns the exception's message. -func (s DestinationParentNotFoundException) Message() string { +func (s *DestinationParentNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13924,22 +15644,22 @@ func (s DestinationParentNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DestinationParentNotFoundException) OrigErr() error { +func (s *DestinationParentNotFoundException) OrigErr() error { return nil } -func (s DestinationParentNotFoundException) Error() string { +func (s *DestinationParentNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DestinationParentNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DestinationParentNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DestinationParentNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *DestinationParentNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type DetachPolicyInput struct { @@ -14166,8 +15886,8 @@ func (s *DisablePolicyTypeOutput) SetRoot(v *Root) *DisablePolicyTypeOutput { // That account is already present in the specified destination. type DuplicateAccountException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14184,17 +15904,17 @@ func (s DuplicateAccountException) GoString() string { func newErrorDuplicateAccountException(v protocol.ResponseMetadata) error { return &DuplicateAccountException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateAccountException) Code() string { +func (s *DuplicateAccountException) Code() string { return "DuplicateAccountException" } // Message returns the exception's message. -func (s DuplicateAccountException) Message() string { +func (s *DuplicateAccountException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14202,22 +15922,22 @@ func (s DuplicateAccountException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateAccountException) OrigErr() error { +func (s *DuplicateAccountException) OrigErr() error { return nil } -func (s DuplicateAccountException) Error() string { +func (s *DuplicateAccountException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateAccountException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateAccountException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateAccountException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateAccountException) RequestID() string { + return s.RespMetadata.RequestID } // A handshake with the same action and target already exists. For example, @@ -14226,8 +15946,8 @@ func (s DuplicateAccountException) RequestID() string { // to resend an invitation to an account, ensure that existing handshakes that // might be considered duplicates are canceled or declined. type DuplicateHandshakeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14244,17 +15964,17 @@ func (s DuplicateHandshakeException) GoString() string { func newErrorDuplicateHandshakeException(v protocol.ResponseMetadata) error { return &DuplicateHandshakeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateHandshakeException) Code() string { +func (s *DuplicateHandshakeException) Code() string { return "DuplicateHandshakeException" } // Message returns the exception's message. -func (s DuplicateHandshakeException) Message() string { +func (s *DuplicateHandshakeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14262,28 +15982,28 @@ func (s DuplicateHandshakeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateHandshakeException) OrigErr() error { +func (s *DuplicateHandshakeException) OrigErr() error { return nil } -func (s DuplicateHandshakeException) Error() string { +func (s *DuplicateHandshakeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateHandshakeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateHandshakeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateHandshakeException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateHandshakeException) RequestID() string { + return s.RespMetadata.RequestID } // An OU with the same name already exists. type DuplicateOrganizationalUnitException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14300,17 +16020,17 @@ func (s DuplicateOrganizationalUnitException) GoString() string { func newErrorDuplicateOrganizationalUnitException(v protocol.ResponseMetadata) error { return &DuplicateOrganizationalUnitException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateOrganizationalUnitException) Code() string { +func (s *DuplicateOrganizationalUnitException) Code() string { return "DuplicateOrganizationalUnitException" } // Message returns the exception's message. -func (s DuplicateOrganizationalUnitException) Message() string { +func (s *DuplicateOrganizationalUnitException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14318,28 +16038,28 @@ func (s DuplicateOrganizationalUnitException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateOrganizationalUnitException) OrigErr() error { +func (s *DuplicateOrganizationalUnitException) OrigErr() error { return nil } -func (s DuplicateOrganizationalUnitException) Error() string { +func (s *DuplicateOrganizationalUnitException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateOrganizationalUnitException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateOrganizationalUnitException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateOrganizationalUnitException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateOrganizationalUnitException) RequestID() string { + return s.RespMetadata.RequestID } // The selected policy is already attached to the specified target. type DuplicatePolicyAttachmentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14356,17 +16076,17 @@ func (s DuplicatePolicyAttachmentException) GoString() string { func newErrorDuplicatePolicyAttachmentException(v protocol.ResponseMetadata) error { return &DuplicatePolicyAttachmentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicatePolicyAttachmentException) Code() string { +func (s *DuplicatePolicyAttachmentException) Code() string { return "DuplicatePolicyAttachmentException" } // Message returns the exception's message. -func (s DuplicatePolicyAttachmentException) Message() string { +func (s *DuplicatePolicyAttachmentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14374,28 +16094,28 @@ func (s DuplicatePolicyAttachmentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicatePolicyAttachmentException) OrigErr() error { +func (s *DuplicatePolicyAttachmentException) OrigErr() error { return nil } -func (s DuplicatePolicyAttachmentException) Error() string { +func (s *DuplicatePolicyAttachmentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicatePolicyAttachmentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicatePolicyAttachmentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicatePolicyAttachmentException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicatePolicyAttachmentException) RequestID() string { + return s.RespMetadata.RequestID } // A policy with the same name already exists. type DuplicatePolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14412,17 +16132,17 @@ func (s DuplicatePolicyException) GoString() string { func newErrorDuplicatePolicyException(v protocol.ResponseMetadata) error { return &DuplicatePolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicatePolicyException) Code() string { +func (s *DuplicatePolicyException) Code() string { return "DuplicatePolicyException" } // Message returns the exception's message. -func (s DuplicatePolicyException) Message() string { +func (s *DuplicatePolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14430,22 +16150,22 @@ func (s DuplicatePolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicatePolicyException) OrigErr() error { +func (s *DuplicatePolicyException) OrigErr() error { return nil } -func (s DuplicatePolicyException) Error() string { +func (s *DuplicatePolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicatePolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicatePolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicatePolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicatePolicyException) RequestID() string { + return s.RespMetadata.RequestID } // Contains rules to be applied to the affected accounts. The effective policy @@ -14506,8 +16226,8 @@ func (s *EffectivePolicy) SetTargetId(v string) *EffectivePolicy { // policy of this type. Contact the administrator of your organization about // attaching a policy of this type to the account. type EffectivePolicyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14524,17 +16244,17 @@ func (s EffectivePolicyNotFoundException) GoString() string { func newErrorEffectivePolicyNotFoundException(v protocol.ResponseMetadata) error { return &EffectivePolicyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EffectivePolicyNotFoundException) Code() string { +func (s *EffectivePolicyNotFoundException) Code() string { return "EffectivePolicyNotFoundException" } // Message returns the exception's message. -func (s EffectivePolicyNotFoundException) Message() string { +func (s *EffectivePolicyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14542,22 +16262,22 @@ func (s EffectivePolicyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EffectivePolicyNotFoundException) OrigErr() error { +func (s *EffectivePolicyNotFoundException) OrigErr() error { return nil } -func (s EffectivePolicyNotFoundException) Error() string { +func (s *EffectivePolicyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EffectivePolicyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EffectivePolicyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EffectivePolicyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *EffectivePolicyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type EnableAWSServiceAccessInput struct { @@ -14734,8 +16454,8 @@ func (s *EnablePolicyTypeOutput) SetRoot(v *Root) *EnablePolicyTypeOutput { return s } -// A structure that contains details of a service principal that is enabled -// to integrate with AWS Organizations. +// A structure that contains details of a service principal that represents +// an AWS service that is enabled to integrate with AWS Organizations. type EnabledServicePrincipal struct { _ struct{} `type:"structure"` @@ -14775,8 +16495,8 @@ func (s *EnabledServicePrincipal) SetServicePrincipal(v string) *EnabledServiceP // If after one hour you continue to receive this error, contact AWS Support // (https://console.aws.amazon.com/support/home#/). type FinalizingOrganizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14793,17 +16513,17 @@ func (s FinalizingOrganizationException) GoString() string { func newErrorFinalizingOrganizationException(v protocol.ResponseMetadata) error { return &FinalizingOrganizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FinalizingOrganizationException) Code() string { +func (s *FinalizingOrganizationException) Code() string { return "FinalizingOrganizationException" } // Message returns the exception's message. -func (s FinalizingOrganizationException) Message() string { +func (s *FinalizingOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14811,32 +16531,32 @@ func (s FinalizingOrganizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FinalizingOrganizationException) OrigErr() error { +func (s *FinalizingOrganizationException) OrigErr() error { return nil } -func (s FinalizingOrganizationException) Error() string { +func (s *FinalizingOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FinalizingOrganizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FinalizingOrganizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FinalizingOrganizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *FinalizingOrganizationException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information that must be exchanged to securely establish a relationship -// between two accounts (an originator and a recipient). For example, assume -// that a master account (the originator) invites another account (the recipient) -// to join its organization. In that case, the two accounts exchange information -// as a series of handshake requests and responses. +// between two accounts (an originator and a recipient). For example, when a +// master account (the originator) invites another account (the recipient) to +// join its organization, the two accounts exchange information as a series +// of handshake requests and responses. // // Note: Handshakes that are CANCELED, ACCEPTED, or DECLINED show up in lists -// for only 30 days after entering that state. After that, they are deleted. +// for only 30 days after entering that state After that they are deleted. type Handshake struct { _ struct{} `type:"structure"` @@ -14974,8 +16694,8 @@ func (s *Handshake) SetState(v string) *Handshake { // The specified handshake is already in the requested state. For example, you // can't accept a handshake that was already accepted. type HandshakeAlreadyInStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14992,17 +16712,17 @@ func (s HandshakeAlreadyInStateException) GoString() string { func newErrorHandshakeAlreadyInStateException(v protocol.ResponseMetadata) error { return &HandshakeAlreadyInStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s HandshakeAlreadyInStateException) Code() string { +func (s *HandshakeAlreadyInStateException) Code() string { return "HandshakeAlreadyInStateException" } // Message returns the exception's message. -func (s HandshakeAlreadyInStateException) Message() string { +func (s *HandshakeAlreadyInStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15010,22 +16730,22 @@ func (s HandshakeAlreadyInStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s HandshakeAlreadyInStateException) OrigErr() error { +func (s *HandshakeAlreadyInStateException) OrigErr() error { return nil } -func (s HandshakeAlreadyInStateException) Error() string { +func (s *HandshakeAlreadyInStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s HandshakeAlreadyInStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *HandshakeAlreadyInStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s HandshakeAlreadyInStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *HandshakeAlreadyInStateException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation would violate the constraint identified in the reason @@ -15067,8 +16787,8 @@ func (s HandshakeAlreadyInStateException) RequestID() string { // account that doesn't have a payment instrument, such as a credit card, // associated with it. type HandshakeConstraintViolationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -15087,17 +16807,17 @@ func (s HandshakeConstraintViolationException) GoString() string { func newErrorHandshakeConstraintViolationException(v protocol.ResponseMetadata) error { return &HandshakeConstraintViolationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s HandshakeConstraintViolationException) Code() string { +func (s *HandshakeConstraintViolationException) Code() string { return "HandshakeConstraintViolationException" } // Message returns the exception's message. -func (s HandshakeConstraintViolationException) Message() string { +func (s *HandshakeConstraintViolationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15105,22 +16825,22 @@ func (s HandshakeConstraintViolationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s HandshakeConstraintViolationException) OrigErr() error { +func (s *HandshakeConstraintViolationException) OrigErr() error { return nil } -func (s HandshakeConstraintViolationException) Error() string { +func (s *HandshakeConstraintViolationException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s HandshakeConstraintViolationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *HandshakeConstraintViolationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s HandshakeConstraintViolationException) RequestID() string { - return s.respMetadata.RequestID +func (s *HandshakeConstraintViolationException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the criteria that are used to select the handshakes for the operation. @@ -15166,8 +16886,8 @@ func (s *HandshakeFilter) SetParentHandshakeId(v string) *HandshakeFilter { // We can't find a handshake with the HandshakeId that you specified. type HandshakeNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -15184,17 +16904,17 @@ func (s HandshakeNotFoundException) GoString() string { func newErrorHandshakeNotFoundException(v protocol.ResponseMetadata) error { return &HandshakeNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s HandshakeNotFoundException) Code() string { +func (s *HandshakeNotFoundException) Code() string { return "HandshakeNotFoundException" } // Message returns the exception's message. -func (s HandshakeNotFoundException) Message() string { +func (s *HandshakeNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15202,22 +16922,22 @@ func (s HandshakeNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s HandshakeNotFoundException) OrigErr() error { +func (s *HandshakeNotFoundException) OrigErr() error { return nil } -func (s HandshakeNotFoundException) Error() string { +func (s *HandshakeNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s HandshakeNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *HandshakeNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s HandshakeNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *HandshakeNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Identifies a participant in a handshake. @@ -15343,8 +17063,8 @@ func (s *HandshakeResource) SetValue(v string) *HandshakeResource { // example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. type InvalidHandshakeTransitionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -15361,17 +17081,17 @@ func (s InvalidHandshakeTransitionException) GoString() string { func newErrorInvalidHandshakeTransitionException(v protocol.ResponseMetadata) error { return &InvalidHandshakeTransitionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidHandshakeTransitionException) Code() string { +func (s *InvalidHandshakeTransitionException) Code() string { return "InvalidHandshakeTransitionException" } // Message returns the exception's message. -func (s InvalidHandshakeTransitionException) Message() string { +func (s *InvalidHandshakeTransitionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15379,22 +17099,22 @@ func (s InvalidHandshakeTransitionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidHandshakeTransitionException) OrigErr() error { +func (s *InvalidHandshakeTransitionException) OrigErr() error { return nil } -func (s InvalidHandshakeTransitionException) Error() string { +func (s *InvalidHandshakeTransitionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidHandshakeTransitionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidHandshakeTransitionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidHandshakeTransitionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidHandshakeTransitionException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation failed because you provided invalid values for one @@ -15411,8 +17131,6 @@ func (s InvalidHandshakeTransitionException) RequestID() string { // // * INVALID_ENUM: You specified an invalid value. // -// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. -// // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -15462,8 +17180,8 @@ func (s InvalidHandshakeTransitionException) RequestID() string { // * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only // between entities in the same root. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -15482,17 +17200,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15500,22 +17218,22 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } type InviteAccountToOrganizationInput struct { @@ -15640,21 +17358,21 @@ func (s LeaveOrganizationOutput) GoString() string { type ListAWSServiceAccessForOrganizationInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -15701,11 +17419,10 @@ type ListAWSServiceAccessForOrganizationOutput struct { // and the date that it was enabled for integration with AWS Organizations. EnabledServicePrincipals []*EnabledServicePrincipal `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -15734,21 +17451,21 @@ func (s *ListAWSServiceAccessForOrganizationOutput) SetNextToken(v string) *List type ListAccountsForParentInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // The unique identifier (ID) for the parent root or organization unit (OU) @@ -15808,11 +17525,10 @@ type ListAccountsForParentOutput struct { // A list of the accounts in the specified root or OU. Accounts []*Account `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -15841,21 +17557,21 @@ func (s *ListAccountsForParentOutput) SetNextToken(v string) *ListAccountsForPar type ListAccountsInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -15900,11 +17616,10 @@ type ListAccountsOutput struct { // A list of objects in the organization. Accounts []*Account `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -15938,21 +17653,21 @@ type ListChildrenInput struct { // ChildType is a required field ChildType *string `type:"string" required:"true" enum:"ChildType"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // The unique identifier (ID) for the parent root or OU whose children you want @@ -16032,11 +17747,10 @@ type ListChildrenOutput struct { // The list of children of the specified parent container. Children []*Child `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -16065,21 +17779,21 @@ func (s *ListChildrenOutput) SetNextToken(v string) *ListChildrenOutput { type ListCreateAccountStatusInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // A list of one or more states that you want included in the response. If this @@ -16136,11 +17850,10 @@ type ListCreateAccountStatusOutput struct { // has been successfully created. CreateAccountStatuses []*CreateAccountStatus `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -16166,32 +17879,244 @@ func (s *ListCreateAccountStatusOutput) SetNextToken(v string) *ListCreateAccoun return s } +type ListDelegatedAdministratorsInput struct { + _ struct{} `type:"structure"` + + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` + + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. + NextToken *string `type:"string"` + + // Specifies a service principal name. If specified, then the operation lists + // the delegated administrators only for the specified service. + // + // If you don't specify a service principal, the operation lists all delegated + // administrators for all services in your organization. + ServicePrincipal *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListDelegatedAdministratorsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDelegatedAdministratorsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDelegatedAdministratorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDelegatedAdministratorsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDelegatedAdministratorsInput) SetMaxResults(v int64) *ListDelegatedAdministratorsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDelegatedAdministratorsInput) SetNextToken(v string) *ListDelegatedAdministratorsInput { + s.NextToken = &v + return s +} + +// SetServicePrincipal sets the ServicePrincipal field's value. +func (s *ListDelegatedAdministratorsInput) SetServicePrincipal(v string) *ListDelegatedAdministratorsInput { + s.ServicePrincipal = &v + return s +} + +type ListDelegatedAdministratorsOutput struct { + _ struct{} `type:"structure"` + + // The list of delegated administrators in your organization. + DelegatedAdministrators []*DelegatedAdministrator `type:"list"` + + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDelegatedAdministratorsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDelegatedAdministratorsOutput) GoString() string { + return s.String() +} + +// SetDelegatedAdministrators sets the DelegatedAdministrators field's value. +func (s *ListDelegatedAdministratorsOutput) SetDelegatedAdministrators(v []*DelegatedAdministrator) *ListDelegatedAdministratorsOutput { + s.DelegatedAdministrators = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDelegatedAdministratorsOutput) SetNextToken(v string) *ListDelegatedAdministratorsOutput { + s.NextToken = &v + return s +} + +type ListDelegatedServicesForAccountInput struct { + _ struct{} `type:"structure"` + + // The account ID number of a delegated administrator account in the organization. + // + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` + + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDelegatedServicesForAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDelegatedServicesForAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDelegatedServicesForAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDelegatedServicesForAccountInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *ListDelegatedServicesForAccountInput) SetAccountId(v string) *ListDelegatedServicesForAccountInput { + s.AccountId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDelegatedServicesForAccountInput) SetMaxResults(v int64) *ListDelegatedServicesForAccountInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDelegatedServicesForAccountInput) SetNextToken(v string) *ListDelegatedServicesForAccountInput { + s.NextToken = &v + return s +} + +type ListDelegatedServicesForAccountOutput struct { + _ struct{} `type:"structure"` + + // The services for which the account is a delegated administrator. + DelegatedServices []*DelegatedService `type:"list"` + + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDelegatedServicesForAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDelegatedServicesForAccountOutput) GoString() string { + return s.String() +} + +// SetDelegatedServices sets the DelegatedServices field's value. +func (s *ListDelegatedServicesForAccountOutput) SetDelegatedServices(v []*DelegatedService) *ListDelegatedServicesForAccountOutput { + s.DelegatedServices = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDelegatedServicesForAccountOutput) SetNextToken(v string) *ListDelegatedServicesForAccountOutput { + s.NextToken = &v + return s +} + type ListHandshakesForAccountInput struct { _ struct{} `type:"structure"` // Filters the handshakes that you want included in the response. The default // is all types. Use the ActionType element to limit the output to only a specified // type, such as INVITE, ENABLE_ALL_FEATURES, or APPROVE_ALL_FEATURES. Alternatively, - // you can specify the ENABLE_ALL_FEATURES handshake, which generates a separate - // child handshake for each member account. When you do specify ParentHandshakeId - // to see only the handshakes that were generated by that parent request. + // for the ENABLE_ALL_FEATURES handshake that generates a separate child handshake + // for each member account, you can specify ParentHandshakeId to see only the + // handshakes that were generated by that parent request. Filter *HandshakeFilter `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -16243,11 +18168,10 @@ type ListHandshakesForAccountOutput struct { // is associated with the specified account. Handshakes []*Handshake `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -16279,26 +18203,26 @@ type ListHandshakesForOrganizationInput struct { // A filter of the handshakes that you want included in the response. The default // is all types. Use the ActionType element to limit the output to only a specified // type, such as INVITE, ENABLE-ALL-FEATURES, or APPROVE-ALL-FEATURES. Alternatively, - // you can specify the ENABLE-ALL-FEATURES handshake, which generates a separate - // child handshake for each member account. When you do, specify the ParentHandshakeId - // to see only the handshakes that were generated by that parent request. + // for the ENABLE-ALL-FEATURES handshake that generates a separate child handshake + // for each member account, you can specify the ParentHandshakeId to see only + // the handshakes that were generated by that parent request. Filter *HandshakeFilter `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -16350,11 +18274,10 @@ type ListHandshakesForOrganizationOutput struct { // are associated with an organization. Handshakes []*Handshake `type:"list"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` } @@ -16383,21 +18306,21 @@ func (s *ListHandshakesForOrganizationOutput) SetNextToken(v string) *ListHandsh type ListOrganizationalUnitsForParentInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // The unique identifier (ID) of the root or OU whose child OUs you want to @@ -16465,11 +18388,10 @@ func (s *ListOrganizationalUnitsForParentInput) SetParentId(v string) *ListOrgan type ListOrganizationalUnitsForParentOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // A list of the OUs in the specified root or parent OU. @@ -16517,21 +18439,21 @@ type ListParentsInput struct { // ChildId is a required field ChildId *string `type:"string" required:"true"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -16582,11 +18504,10 @@ func (s *ListParentsInput) SetNextToken(v string) *ListParentsInput { type ListParentsOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // A list of parents for the specified child account or OU. @@ -16623,21 +18544,21 @@ type ListPoliciesForTargetInput struct { // Filter is a required field Filter *string `type:"string" required:"true" enum:"PolicyType"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // The unique identifier (ID) of the root, organizational unit, or account whose @@ -16716,11 +18637,10 @@ func (s *ListPoliciesForTargetInput) SetTargetId(v string) *ListPoliciesForTarge type ListPoliciesForTargetOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // The list of policies that match the criteria in the request. @@ -16757,21 +18677,21 @@ type ListPoliciesInput struct { // Filter is a required field Filter *string `type:"string" required:"true" enum:"PolicyType"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -16822,11 +18742,10 @@ func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput { type ListPoliciesOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // A list of policies that match the filter criteria in the request. The output @@ -16860,21 +18779,21 @@ func (s *ListPoliciesOutput) SetPolicies(v []*PolicySummary) *ListPoliciesOutput type ListRootsInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` } @@ -16916,11 +18835,10 @@ func (s *ListRootsInput) SetNextToken(v string) *ListRootsInput { type ListRootsOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // A list of roots that are defined in an organization. @@ -16952,10 +18870,10 @@ func (s *ListRootsOutput) SetRoots(v []*Root) *ListRootsOutput { type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // The ID of the resource that you want to retrieve tags for. @@ -17002,11 +18920,10 @@ func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceI type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // The tags that are assigned to the resource. @@ -17038,21 +18955,21 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput type ListTargetsForPolicyInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included per - // page in the response. If you do not include this parameter, it defaults to - // a value that is specific to the operation. If additional items exist beyond - // the maximum you specify, the NextToken response element is present and has - // a value (is not 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 Organizations 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. + // The total number of results that you want included on each page of the response. + // If you do not include this parameter, it defaults to a value that is specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (is not 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 Organizations + // 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"` - // Use this parameter if you receive a NextToken response in a previous request - // that indicates that there is more output available. Set it to the value of - // the previous call's NextToken response to indicate where the output should - // continue from. + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more + // output is available. Set this parameter to the value of the previous call's + // NextToken response to indicate where the output should continue from. NextToken *string `type:"string"` // The unique identifier (ID) of the policy whose attachments you want to know. @@ -17112,11 +19029,10 @@ func (s *ListTargetsForPolicyInput) SetPolicyId(v string) *ListTargetsForPolicyI type ListTargetsForPolicyOutput struct { _ struct{} `type:"structure"` - // If present, this value indicates that there is more output available than - // is included in the current response. Use this value in the NextToken request - // parameter in a subsequent call to the operation to get the next part of the - // output. You should repeat this until the NextToken response element comes - // back as null. + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You + // should repeat this until the NextToken response element comes back as null. NextToken *string `type:"string"` // A list of structures, each of which contains details about one of the entities @@ -17151,8 +19067,8 @@ func (s *ListTargetsForPolicyOutput) SetTargets(v []*PolicyTargetSummary) *ListT // service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. type MalformedPolicyDocumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17169,17 +19085,17 @@ func (s MalformedPolicyDocumentException) GoString() string { func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error { return &MalformedPolicyDocumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedPolicyDocumentException) Code() string { +func (s *MalformedPolicyDocumentException) Code() string { return "MalformedPolicyDocumentException" } // Message returns the exception's message. -func (s MalformedPolicyDocumentException) Message() string { +func (s *MalformedPolicyDocumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17187,30 +19103,30 @@ func (s MalformedPolicyDocumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedPolicyDocumentException) OrigErr() error { +func (s *MalformedPolicyDocumentException) OrigErr() error { return nil } -func (s MalformedPolicyDocumentException) Error() string { +func (s *MalformedPolicyDocumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedPolicyDocumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedPolicyDocumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedPolicyDocumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedPolicyDocumentException) RequestID() string { + return s.RespMetadata.RequestID } // You can't remove a master account from an organization. If you want the master // account to become a member account in another organization, you must first // delete the current organization of the master account. type MasterCannotLeaveOrganizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17227,17 +19143,17 @@ func (s MasterCannotLeaveOrganizationException) GoString() string { func newErrorMasterCannotLeaveOrganizationException(v protocol.ResponseMetadata) error { return &MasterCannotLeaveOrganizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MasterCannotLeaveOrganizationException) Code() string { +func (s *MasterCannotLeaveOrganizationException) Code() string { return "MasterCannotLeaveOrganizationException" } // Message returns the exception's message. -func (s MasterCannotLeaveOrganizationException) Message() string { +func (s *MasterCannotLeaveOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17245,22 +19161,22 @@ func (s MasterCannotLeaveOrganizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MasterCannotLeaveOrganizationException) OrigErr() error { +func (s *MasterCannotLeaveOrganizationException) OrigErr() error { return nil } -func (s MasterCannotLeaveOrganizationException) Error() string { +func (s *MasterCannotLeaveOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MasterCannotLeaveOrganizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MasterCannotLeaveOrganizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MasterCannotLeaveOrganizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *MasterCannotLeaveOrganizationException) RequestID() string { + return s.RespMetadata.RequestID } type MoveAccountInput struct { @@ -17373,7 +19289,7 @@ func (s MoveAccountOutput) GoString() string { // Contains details about an organization. An organization is a collection of // accounts that are centrally managed together using consolidated billing, // organized hierarchically with organizational units (OUs), and controlled -// with policies. +// with policies . type Organization struct { _ struct{} `type:"structure"` @@ -17482,8 +19398,8 @@ func (s *Organization) SetMasterAccountId(v string) *Organization { // The organization isn't empty. To delete an organization, you must first remove // all accounts except the master account, delete all OUs, and delete all policies. type OrganizationNotEmptyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17500,17 +19416,17 @@ func (s OrganizationNotEmptyException) GoString() string { func newErrorOrganizationNotEmptyException(v protocol.ResponseMetadata) error { return &OrganizationNotEmptyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationNotEmptyException) Code() string { +func (s *OrganizationNotEmptyException) Code() string { return "OrganizationNotEmptyException" } // Message returns the exception's message. -func (s OrganizationNotEmptyException) Message() string { +func (s *OrganizationNotEmptyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17518,22 +19434,22 @@ func (s OrganizationNotEmptyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationNotEmptyException) OrigErr() error { +func (s *OrganizationNotEmptyException) OrigErr() error { return nil } -func (s OrganizationNotEmptyException) Error() string { +func (s *OrganizationNotEmptyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationNotEmptyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationNotEmptyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationNotEmptyException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationNotEmptyException) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an organizational unit (OU). An OU is a container @@ -17596,8 +19512,8 @@ func (s *OrganizationalUnit) SetName(v string) *OrganizationalUnit { // The specified OU is not empty. Move all accounts to another root or to other // OUs, remove all child OUs, and try the operation again. type OrganizationalUnitNotEmptyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17614,17 +19530,17 @@ func (s OrganizationalUnitNotEmptyException) GoString() string { func newErrorOrganizationalUnitNotEmptyException(v protocol.ResponseMetadata) error { return &OrganizationalUnitNotEmptyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationalUnitNotEmptyException) Code() string { +func (s *OrganizationalUnitNotEmptyException) Code() string { return "OrganizationalUnitNotEmptyException" } // Message returns the exception's message. -func (s OrganizationalUnitNotEmptyException) Message() string { +func (s *OrganizationalUnitNotEmptyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17632,28 +19548,28 @@ func (s OrganizationalUnitNotEmptyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationalUnitNotEmptyException) OrigErr() error { +func (s *OrganizationalUnitNotEmptyException) OrigErr() error { return nil } -func (s OrganizationalUnitNotEmptyException) Error() string { +func (s *OrganizationalUnitNotEmptyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationalUnitNotEmptyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationalUnitNotEmptyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationalUnitNotEmptyException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationalUnitNotEmptyException) RequestID() string { + return s.RespMetadata.RequestID } // We can't find an OU with the OrganizationalUnitId that you specified. type OrganizationalUnitNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17670,17 +19586,17 @@ func (s OrganizationalUnitNotFoundException) GoString() string { func newErrorOrganizationalUnitNotFoundException(v protocol.ResponseMetadata) error { return &OrganizationalUnitNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationalUnitNotFoundException) Code() string { +func (s *OrganizationalUnitNotFoundException) Code() string { return "OrganizationalUnitNotFoundException" } // Message returns the exception's message. -func (s OrganizationalUnitNotFoundException) Message() string { +func (s *OrganizationalUnitNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17688,22 +19604,22 @@ func (s OrganizationalUnitNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationalUnitNotFoundException) OrigErr() error { +func (s *OrganizationalUnitNotFoundException) OrigErr() error { return nil } -func (s OrganizationalUnitNotFoundException) Error() string { +func (s *OrganizationalUnitNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationalUnitNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationalUnitNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationalUnitNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationalUnitNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about either a root or an organizational unit (OU) that @@ -17753,8 +19669,8 @@ func (s *Parent) SetType(v string) *Parent { // We can't find a root or OU with the ParentId that you specified. type ParentNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17771,17 +19687,17 @@ func (s ParentNotFoundException) GoString() string { func newErrorParentNotFoundException(v protocol.ResponseMetadata) error { return &ParentNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParentNotFoundException) Code() string { +func (s *ParentNotFoundException) Code() string { return "ParentNotFoundException" } // Message returns the exception's message. -func (s ParentNotFoundException) Message() string { +func (s *ParentNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17789,22 +19705,22 @@ func (s ParentNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParentNotFoundException) OrigErr() error { +func (s *ParentNotFoundException) OrigErr() error { return nil } -func (s ParentNotFoundException) Error() string { +func (s *ParentNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParentNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParentNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParentNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ParentNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains rules to be applied to the affected accounts. Policies can be attached @@ -17845,8 +19761,8 @@ func (s *Policy) SetPolicySummary(v *PolicySummary) *Policy { // Changes to the effective policy are in progress, and its contents can't be // returned. Try the operation again later. type PolicyChangesInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17863,17 +19779,17 @@ func (s PolicyChangesInProgressException) GoString() string { func newErrorPolicyChangesInProgressException(v protocol.ResponseMetadata) error { return &PolicyChangesInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyChangesInProgressException) Code() string { +func (s *PolicyChangesInProgressException) Code() string { return "PolicyChangesInProgressException" } // Message returns the exception's message. -func (s PolicyChangesInProgressException) Message() string { +func (s *PolicyChangesInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17881,29 +19797,29 @@ func (s PolicyChangesInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyChangesInProgressException) OrigErr() error { +func (s *PolicyChangesInProgressException) OrigErr() error { return nil } -func (s PolicyChangesInProgressException) Error() string { +func (s *PolicyChangesInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyChangesInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyChangesInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyChangesInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyChangesInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // The policy is attached to one or more entities. You must detach it from all // roots, OUs, and accounts before performing this operation. type PolicyInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17920,17 +19836,17 @@ func (s PolicyInUseException) GoString() string { func newErrorPolicyInUseException(v protocol.ResponseMetadata) error { return &PolicyInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyInUseException) Code() string { +func (s *PolicyInUseException) Code() string { return "PolicyInUseException" } // Message returns the exception's message. -func (s PolicyInUseException) Message() string { +func (s *PolicyInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17938,28 +19854,28 @@ func (s PolicyInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyInUseException) OrigErr() error { +func (s *PolicyInUseException) OrigErr() error { return nil } -func (s PolicyInUseException) Error() string { +func (s *PolicyInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The policy isn't attached to the specified target in the specified root. type PolicyNotAttachedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17976,17 +19892,17 @@ func (s PolicyNotAttachedException) GoString() string { func newErrorPolicyNotAttachedException(v protocol.ResponseMetadata) error { return &PolicyNotAttachedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyNotAttachedException) Code() string { +func (s *PolicyNotAttachedException) Code() string { return "PolicyNotAttachedException" } // Message returns the exception's message. -func (s PolicyNotAttachedException) Message() string { +func (s *PolicyNotAttachedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17994,28 +19910,28 @@ func (s PolicyNotAttachedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyNotAttachedException) OrigErr() error { +func (s *PolicyNotAttachedException) OrigErr() error { return nil } -func (s PolicyNotAttachedException) Error() string { +func (s *PolicyNotAttachedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyNotAttachedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyNotAttachedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyNotAttachedException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyNotAttachedException) RequestID() string { + return s.RespMetadata.RequestID } // We can't find a policy with the PolicyId that you specified. type PolicyNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18032,17 +19948,17 @@ func (s PolicyNotFoundException) GoString() string { func newErrorPolicyNotFoundException(v protocol.ResponseMetadata) error { return &PolicyNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyNotFoundException) Code() string { +func (s *PolicyNotFoundException) Code() string { return "PolicyNotFoundException" } // Message returns the exception's message. -func (s PolicyNotFoundException) Message() string { +func (s *PolicyNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18050,22 +19966,22 @@ func (s PolicyNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyNotFoundException) OrigErr() error { +func (s *PolicyNotFoundException) OrigErr() error { return nil } -func (s PolicyNotFoundException) Error() string { +func (s *PolicyNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a policy, but does not include the content. To @@ -18080,7 +19996,7 @@ type PolicySummary struct { // in the AWS Organizations User Guide. Arn *string `type:"string"` - // A Boolean value that indicates whether the specified policy is an AWS managed + // A boolean value that indicates whether the specified policy is an AWS managed // policy. If true, then you can attach the policy to roots, OUs, or accounts, // but you cannot edit it. AwsManaged *bool `type:"boolean"` @@ -18226,8 +20142,8 @@ func (s *PolicyTargetSummary) SetType(v string) *PolicyTargetSummary { // The specified policy type is already enabled in the specified root. type PolicyTypeAlreadyEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18244,17 +20160,17 @@ func (s PolicyTypeAlreadyEnabledException) GoString() string { func newErrorPolicyTypeAlreadyEnabledException(v protocol.ResponseMetadata) error { return &PolicyTypeAlreadyEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyTypeAlreadyEnabledException) Code() string { +func (s *PolicyTypeAlreadyEnabledException) Code() string { return "PolicyTypeAlreadyEnabledException" } // Message returns the exception's message. -func (s PolicyTypeAlreadyEnabledException) Message() string { +func (s *PolicyTypeAlreadyEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18262,22 +20178,22 @@ func (s PolicyTypeAlreadyEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyTypeAlreadyEnabledException) OrigErr() error { +func (s *PolicyTypeAlreadyEnabledException) OrigErr() error { return nil } -func (s PolicyTypeAlreadyEnabledException) Error() string { +func (s *PolicyTypeAlreadyEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyTypeAlreadyEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyTypeAlreadyEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyTypeAlreadyEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyTypeAlreadyEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // You can't use the specified policy type with the feature set currently enabled @@ -18286,8 +20202,8 @@ func (s PolicyTypeAlreadyEnabledException) RequestID() string { // Disabling a Policy Type on a Root (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. type PolicyTypeNotAvailableForOrganizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18304,17 +20220,17 @@ func (s PolicyTypeNotAvailableForOrganizationException) GoString() string { func newErrorPolicyTypeNotAvailableForOrganizationException(v protocol.ResponseMetadata) error { return &PolicyTypeNotAvailableForOrganizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyTypeNotAvailableForOrganizationException) Code() string { +func (s *PolicyTypeNotAvailableForOrganizationException) Code() string { return "PolicyTypeNotAvailableForOrganizationException" } // Message returns the exception's message. -func (s PolicyTypeNotAvailableForOrganizationException) Message() string { +func (s *PolicyTypeNotAvailableForOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18322,22 +20238,22 @@ func (s PolicyTypeNotAvailableForOrganizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyTypeNotAvailableForOrganizationException) OrigErr() error { +func (s *PolicyTypeNotAvailableForOrganizationException) OrigErr() error { return nil } -func (s PolicyTypeNotAvailableForOrganizationException) Error() string { +func (s *PolicyTypeNotAvailableForOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyTypeNotAvailableForOrganizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyTypeNotAvailableForOrganizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyTypeNotAvailableForOrganizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyTypeNotAvailableForOrganizationException) RequestID() string { + return s.RespMetadata.RequestID } // The specified policy type isn't currently enabled in this root. You can't @@ -18346,8 +20262,8 @@ func (s PolicyTypeNotAvailableForOrganizationException) RequestID() string { // Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) // in the AWS Organizations User Guide. type PolicyTypeNotEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18364,17 +20280,17 @@ func (s PolicyTypeNotEnabledException) GoString() string { func newErrorPolicyTypeNotEnabledException(v protocol.ResponseMetadata) error { return &PolicyTypeNotEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PolicyTypeNotEnabledException) Code() string { +func (s *PolicyTypeNotEnabledException) Code() string { return "PolicyTypeNotEnabledException" } // Message returns the exception's message. -func (s PolicyTypeNotEnabledException) Message() string { +func (s *PolicyTypeNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18382,22 +20298,22 @@ func (s PolicyTypeNotEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PolicyTypeNotEnabledException) OrigErr() error { +func (s *PolicyTypeNotEnabledException) OrigErr() error { return nil } -func (s PolicyTypeNotEnabledException) Error() string { +func (s *PolicyTypeNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PolicyTypeNotEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PolicyTypeNotEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PolicyTypeNotEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *PolicyTypeNotEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // Contains information about a policy type and its status in the associated @@ -18405,10 +20321,9 @@ func (s PolicyTypeNotEnabledException) RequestID() string { type PolicyTypeSummary struct { _ struct{} `type:"structure"` - // The status of the policy type as it relates to the associated root. You can - // attach a policy of the specified type to a root or to an OU or account in - // that root. To do so, the policy must be available in the organization and - // enabled for that root. + // The status of the policy type as it relates to the associated root. To attach + // a policy of the specified type to a root or to an OU or account in that root, + // it must be available in the organization and enabled for that root. Status *string `type:"string" enum:"PolicyTypeStatus"` // The name of the policy type. @@ -18437,6 +20352,77 @@ func (s *PolicyTypeSummary) SetType(v string) *PolicyTypeSummary { return s } +type RegisterDelegatedAdministratorInput struct { + _ struct{} `type:"structure"` + + // The account ID number of the member account in the organization to register + // as a delegated administrator. + // + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The service principal of the AWS service for which you want to make the member + // account a delegated administrator. + // + // ServicePrincipal is a required field + ServicePrincipal *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterDelegatedAdministratorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterDelegatedAdministratorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterDelegatedAdministratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterDelegatedAdministratorInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.ServicePrincipal == nil { + invalidParams.Add(request.NewErrParamRequired("ServicePrincipal")) + } + if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *RegisterDelegatedAdministratorInput) SetAccountId(v string) *RegisterDelegatedAdministratorInput { + s.AccountId = &v + return s +} + +// SetServicePrincipal sets the ServicePrincipal field's value. +func (s *RegisterDelegatedAdministratorInput) SetServicePrincipal(v string) *RegisterDelegatedAdministratorInput { + s.ServicePrincipal = &v + return s +} + +type RegisterDelegatedAdministratorOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RegisterDelegatedAdministratorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterDelegatedAdministratorOutput) GoString() string { + return s.String() +} + type RemoveAccountFromOrganizationInput struct { _ struct{} `type:"structure"` @@ -18567,8 +20553,8 @@ func (s *Root) SetPolicyTypes(v []*PolicyTypeSummary) *Root { // We can't find a root with the RootId that you specified. type RootNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18585,17 +20571,17 @@ func (s RootNotFoundException) GoString() string { func newErrorRootNotFoundException(v protocol.ResponseMetadata) error { return &RootNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RootNotFoundException) Code() string { +func (s *RootNotFoundException) Code() string { return "RootNotFoundException" } // Message returns the exception's message. -func (s RootNotFoundException) Message() string { +func (s *RootNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18603,29 +20589,29 @@ func (s RootNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RootNotFoundException) OrigErr() error { +func (s *RootNotFoundException) OrigErr() error { return nil } -func (s RootNotFoundException) Error() string { +func (s *RootNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RootNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RootNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RootNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *RootNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Organizations can't complete your request because of an internal service // error. Try again later. type ServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18642,17 +20628,17 @@ func (s ServiceException) GoString() string { func newErrorServiceException(v protocol.ResponseMetadata) error { return &ServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceException) Code() string { +func (s *ServiceException) Code() string { return "ServiceException" } // Message returns the exception's message. -func (s ServiceException) Message() string { +func (s *ServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18660,28 +20646,28 @@ func (s ServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceException) OrigErr() error { +func (s *ServiceException) OrigErr() error { return nil } -func (s ServiceException) Error() string { +func (s *ServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceException) RequestID() string { + return s.RespMetadata.RequestID } // We can't find a source root or OU with the ParentId that you specified. type SourceParentNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18698,17 +20684,17 @@ func (s SourceParentNotFoundException) GoString() string { func newErrorSourceParentNotFoundException(v protocol.ResponseMetadata) error { return &SourceParentNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SourceParentNotFoundException) Code() string { +func (s *SourceParentNotFoundException) Code() string { return "SourceParentNotFoundException" } // Message returns the exception's message. -func (s SourceParentNotFoundException) Message() string { +func (s *SourceParentNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18716,22 +20702,22 @@ func (s SourceParentNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SourceParentNotFoundException) OrigErr() error { +func (s *SourceParentNotFoundException) OrigErr() error { return nil } -func (s SourceParentNotFoundException) Error() string { +func (s *SourceParentNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SourceParentNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SourceParentNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SourceParentNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *SourceParentNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A custom key-value pair associated with a resource such as an account within @@ -18873,8 +20859,8 @@ func (s TagResourceOutput) GoString() string { // We can't find a root, OU, or account with the TargetId that you specified. type TargetNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -18891,17 +20877,17 @@ func (s TargetNotFoundException) GoString() string { func newErrorTargetNotFoundException(v protocol.ResponseMetadata) error { return &TargetNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TargetNotFoundException) Code() string { +func (s *TargetNotFoundException) Code() string { return "TargetNotFoundException" } // Message returns the exception's message. -func (s TargetNotFoundException) Message() string { +func (s *TargetNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18909,22 +20895,22 @@ func (s TargetNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TargetNotFoundException) OrigErr() error { +func (s *TargetNotFoundException) OrigErr() error { return nil } -func (s TargetNotFoundException) Error() string { +func (s *TargetNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TargetNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TargetNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TargetNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *TargetNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // You have sent too many requests in too short a period of time. The limit @@ -18934,8 +20920,8 @@ func (s TargetNotFoundException) RequestID() string { // Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) // in the AWS Organizations User Guide. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -18954,17 +20940,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18972,28 +20958,28 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // This action isn't available in the current Region. type UnsupportedAPIEndpointException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -19010,17 +20996,17 @@ func (s UnsupportedAPIEndpointException) GoString() string { func newErrorUnsupportedAPIEndpointException(v protocol.ResponseMetadata) error { return &UnsupportedAPIEndpointException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedAPIEndpointException) Code() string { +func (s *UnsupportedAPIEndpointException) Code() string { return "UnsupportedAPIEndpointException" } // Message returns the exception's message. -func (s UnsupportedAPIEndpointException) Message() string { +func (s *UnsupportedAPIEndpointException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19028,22 +21014,22 @@ func (s UnsupportedAPIEndpointException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedAPIEndpointException) OrigErr() error { +func (s *UnsupportedAPIEndpointException) OrigErr() error { return nil } -func (s UnsupportedAPIEndpointException) Error() string { +func (s *UnsupportedAPIEndpointException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedAPIEndpointException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedAPIEndpointException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedAPIEndpointException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedAPIEndpointException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -19414,6 +21400,18 @@ const ( // ConstraintViolationExceptionReasonTagPolicyViolation is a ConstraintViolationExceptionReason enum value ConstraintViolationExceptionReasonTagPolicyViolation = "TAG_POLICY_VIOLATION" + + // ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded = "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED" + + // ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR" + + // ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG" + + // ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go index af309e1f14f..8ad7420f57b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go @@ -33,14 +33,26 @@ const ( // create the required service-linked role. You don't have that permission. ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException" + // ErrCodeAccountAlreadyRegisteredException for service response error code + // "AccountAlreadyRegisteredException". + // + // The specified account is already a delegated administrator for this AWS service. + ErrCodeAccountAlreadyRegisteredException = "AccountAlreadyRegisteredException" + // ErrCodeAccountNotFoundException for service response error code // "AccountNotFoundException". // - // We can't find an AWS account with the AccountId that you specified. Or the + // We can't find an AWS account with the AccountId that you specified, or the // account whose credentials you used to make this request isn't a member of // an organization. ErrCodeAccountNotFoundException = "AccountNotFoundException" + // ErrCodeAccountNotRegisteredException for service response error code + // "AccountNotRegisteredException". + // + // The specified account is not a delegated administrator for this AWS service. + ErrCodeAccountNotRegisteredException = "AccountNotRegisteredException" + // ErrCodeAccountOwnerNotVerifiedException for service response error code // "AccountOwnerNotVerifiedException". // @@ -74,11 +86,12 @@ const ( // ErrCodeConstraintViolationException for service response error code // "ConstraintViolationException". // - // Performing this operation violates a minimum or maximum value limit. Examples - // include attempting to remove the last service control policy (SCP) from an - // OU or root, or attaching too many policies to an account, OU, or root. This - // exception includes a reason that contains additional information about the - // violated limit. + // Performing this operation violates a minimum or maximum value limit. For + // example, attempting to remove the last service control policy (SCP) from + // an OU or root, inviting or creating too many accounts to the organization, + // or attaching too many policies to an account, OU, or root. This exception + // includes a reason that contains additional information about the violated + // limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: @@ -112,6 +125,15 @@ const ( // try again. If after an hour it continues to fail with this error, contact // AWS Support (https://console.aws.amazon.com/support/home#/). // + // * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You can designate + // only a member account as a delegated administrator. + // + // * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: To complete this operation, + // you must first deregister this account as a delegated administrator. + // + // * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: To complete this operation, + // you must first deregister all delegated administrators for this service. + // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of // handshakes that you can send in one day. // @@ -138,6 +160,10 @@ const ( // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // + // * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted + // to register more delegated administrators than allowed for the service + // principal. + // // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the // number of policies of a certain type that can be attached to an entity // at one time. @@ -153,8 +179,8 @@ const ( // in the AWS Organizations User Guide. // // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a - // policy from an entity, which would cause the entity to have fewer than - // the minimum number of policies of the required type. + // policy from an entity that would cause the entity to have fewer than the + // minimum number of policies of a certain type required. // // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is // too many levels deep. @@ -167,19 +193,14 @@ const ( // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs // that you can have in an organization. // - // * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of + // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of // policies that you can have in an organization. - // - // * TAG_POLICY_VIOLATION: Tags associated with the resource must be compliant - // with the tag policy that’s in effect for the account. For more information, - // see Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) - // in the AWS Organizations User Guide. ErrCodeConstraintViolationException = "ConstraintViolationException" // ErrCodeCreateAccountStatusNotFoundException for service response error code // "CreateAccountStatusNotFoundException". // - // We can't find a create account request with the CreateAccountRequestId that + // We can't find an create account request with the CreateAccountRequestId that // you specified. ErrCodeCreateAccountStatusNotFoundException = "CreateAccountStatusNotFoundException" @@ -323,8 +344,6 @@ const ( // // * INVALID_ENUM: You specified an invalid value. // - // * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type. - // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. // @@ -517,7 +536,9 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "AWSOrganizationsNotInUseException": newErrorAWSOrganizationsNotInUseException, "AccessDeniedException": newErrorAccessDeniedException, "AccessDeniedForDependencyException": newErrorAccessDeniedForDependencyException, + "AccountAlreadyRegisteredException": newErrorAccountAlreadyRegisteredException, "AccountNotFoundException": newErrorAccountNotFoundException, + "AccountNotRegisteredException": newErrorAccountNotRegisteredException, "AccountOwnerNotVerifiedException": newErrorAccountOwnerNotVerifiedException, "AlreadyInOrganizationException": newErrorAlreadyInOrganizationException, "ChildNotFoundException": newErrorChildNotFoundException, diff --git a/vendor/github.com/aws/aws-sdk-go/service/personalize/api.go b/vendor/github.com/aws/aws-sdk-go/service/personalize/api.go index 9a01bcc84d4..77af5917c09 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/personalize/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/personalize/api.go @@ -4662,6 +4662,9 @@ type BatchInferenceJobSummary struct { // The time at which the batch inference job was last updated. LastUpdatedDateTime *time.Time `locationName:"lastUpdatedDateTime" type:"timestamp"` + // The ARN of the solution version used by the batch inference job. + SolutionVersionArn *string `locationName:"solutionVersionArn" type:"string"` + // The status of the batch inference job. The status is one of the following // values: // @@ -4715,6 +4718,12 @@ func (s *BatchInferenceJobSummary) SetLastUpdatedDateTime(v time.Time) *BatchInf return s } +// SetSolutionVersionArn sets the SolutionVersionArn field's value. +func (s *BatchInferenceJobSummary) SetSolutionVersionArn(v string) *BatchInferenceJobSummary { + s.SolutionVersionArn = &v + return s +} + // SetStatus sets the Status field's value. func (s *BatchInferenceJobSummary) SetStatus(v string) *BatchInferenceJobSummary { s.Status = &v @@ -8310,7 +8319,7 @@ type HPOObjective struct { // A regular expression for finding the metric in the training job logs. MetricRegex *string `locationName:"metricRegex" type:"string"` - // The data type of the metric. + // The type of the metric. Valid values are Maximize and Minimize. Type *string `locationName:"type" type:"string"` } @@ -8507,8 +8516,8 @@ func (s *IntegerHyperParameterRange) SetName(v string) *IntegerHyperParameterRan // Provide a valid value for the field or parameter. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8525,17 +8534,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8543,28 +8552,28 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // The token is not valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8581,17 +8590,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8599,28 +8608,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The limit on the number of requests per second has been exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8637,17 +8646,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8655,22 +8664,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListBatchInferenceJobsInput struct { @@ -9699,8 +9708,8 @@ func (s *RecipeSummary) SetStatus(v string) *RecipeSummary { // The specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9717,17 +9726,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9735,28 +9744,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource is in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9773,17 +9782,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9791,28 +9800,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Could not find the specified resource. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9829,17 +9838,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9847,22 +9856,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The configuration details of an Amazon S3 input or output bucket. @@ -10275,6 +10284,10 @@ type SolutionVersion struct { // The UPDATE option can only be used after you've created a solution version // with the FULL option and the training solution uses the native-recipe-hrnn-coldstart. TrainingMode *string `locationName:"trainingMode" type:"string" enum:"TrainingMode"` + + // If hyperparameter optimization was performed, contains the hyperparameter + // values of the best performing model. + TunedHPOParams *TunedHPOParams `locationName:"tunedHPOParams" type:"structure"` } // String returns the string representation @@ -10371,6 +10384,12 @@ func (s *SolutionVersion) SetTrainingMode(v string) *SolutionVersion { return s } +// SetTunedHPOParams sets the TunedHPOParams field's value. +func (s *SolutionVersion) SetTunedHPOParams(v *TunedHPOParams) *SolutionVersion { + s.TunedHPOParams = v + return s +} + // Provides a summary of the properties of a solution version. For a complete // listing, call the DescribeSolutionVersion API. type SolutionVersionSummary struct { @@ -10436,6 +10455,31 @@ func (s *SolutionVersionSummary) SetStatus(v string) *SolutionVersionSummary { return s } +// If hyperparameter optimization (HPO) was performed, contains the hyperparameter +// values of the best performing model. +type TunedHPOParams struct { + _ struct{} `type:"structure"` + + // A list of the hyperparameter values of the best performing model. + AlgorithmHyperParameters map[string]*string `locationName:"algorithmHyperParameters" type:"map"` +} + +// String returns the string representation +func (s TunedHPOParams) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TunedHPOParams) GoString() string { + return s.String() +} + +// SetAlgorithmHyperParameters sets the AlgorithmHyperParameters field's value. +func (s *TunedHPOParams) SetAlgorithmHyperParameters(v map[string]*string) *TunedHPOParams { + s.AlgorithmHyperParameters = v + return s +} + type UpdateCampaignInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go index 76144551b08..d0798a85c60 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -9637,8 +9637,9 @@ func (c *Pinpoint) UpdateEndpointRequest(input *UpdateEndpointInput) (req *reque // // Creates a new endpoint for an application or updates the settings and attributes // of an existing endpoint for an application. You can also use this operation -// to define custom attributes (Attributes, Metrics, and UserAttributes properties) -// for an endpoint. +// to define custom attributes for an endpoint. If an update includes one or +// more values for a custom attribute, Amazon Pinpoint replaces (overwrites) +// any existing values with the new values. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9737,8 +9738,9 @@ func (c *Pinpoint) UpdateEndpointsBatchRequest(input *UpdateEndpointsBatchInput) // // Creates a new batch of endpoints for an application or updates the settings // and attributes of a batch of existing endpoints for an application. You can -// also use this operation to define custom attributes (Attributes, Metrics, -// and UserAttributes properties) for a batch of endpoints. +// also use this operation to define custom attributes for a batch of endpoints. +// If an update includes one or more values for a custom attribute, Amazon Pinpoint +// replaces (overwrites) any existing values with the new values. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -13039,7 +13041,7 @@ type ApplicationDateRangeKpiResponse struct { // that the data was retrieved for. This value describes the associated metric // and consists of two or more terms, which are comprised of lowercase alphanumeric // characters, separated by a hyphen. For a list of possible values, see the - // Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html). + // Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html). // // KpiName is a required field KpiName *string `type:"string" required:"true"` @@ -13177,15 +13179,16 @@ type ApplicationSettingsResource struct { // ApplicationId is a required field ApplicationId *string `type:"string" required:"true"` - // The settings for the AWS Lambda function to use by default as a code hook - // for campaigns in the application. + // The settings for the AWS Lambda function to invoke by default as a code hook + // for campaigns in the application. You can use this hook to customize segments + // that are used by campaigns in the application. CampaignHook *CampaignHook `type:"structure"` // The date and time, in ISO 8601 format, when the application's settings were // last modified. LastModifiedDate *string `type:"string"` - // The default sending limits for campaigns in the application. + // The default sending limits for campaigns and journeys in the application. Limits *CampaignLimits `type:"structure"` // The default quiet time for campaigns and journeys in the application. Quiet @@ -13393,8 +13396,8 @@ func (s *AttributesResource) SetAttributes(v []*string) *AttributesResource { // Provides information about an API request or response. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -13413,17 +13416,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13431,22 +13434,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the status and settings of the Baidu (Baidu Cloud Push) channel @@ -13833,6 +13836,32 @@ func (s *BaseKpiResult) SetRows(v []*ResultRow) *BaseKpiResult { return s } +// Specifies the contents of a message that's sent through a custom channel +// to recipients of a campaign. +type CampaignCustomMessage struct { + _ struct{} `type:"structure"` + + // The raw, JSON-formatted string to use as the payload for the message. The + // maximum size is 5 KB. + Data *string `type:"string"` +} + +// String returns the string representation +func (s CampaignCustomMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignCustomMessage) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *CampaignCustomMessage) SetData(v string) *CampaignCustomMessage { + s.Data = &v + return s +} + // Provides the results of a query that retrieved the data for a standard metric // that applies to a campaign, and provides information about that query. type CampaignDateRangeKpiResponse struct { @@ -13855,7 +13884,7 @@ type CampaignDateRangeKpiResponse struct { // that the data was retrieved for. This value describes the associated metric // and consists of two or more terms, which are comprised of lowercase alphanumeric // characters, separated by a hyphen. For a list of possible values, see the - // Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html). + // Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html). // // KpiName is a required field KpiName *string `type:"string" required:"true"` @@ -14042,15 +14071,25 @@ func (s *CampaignEventFilter) SetFilterType(v string) *CampaignEventFilter { return s } -// Specifies the AWS Lambda function to use as a code hook for a campaign. +// Specifies settings for invoking an AWS Lambda function that customizes a +// segment for a campaign. type CampaignHook struct { _ struct{} `type:"structure"` // The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon - // Pinpoint invokes to send messages for a campaign. + // Pinpoint invokes to customize a segment for a campaign. LambdaFunctionName *string `type:"string"` - // Specifies which Lambda mode to use when invoking the AWS Lambda function. + // The mode that Amazon Pinpoint uses to invoke the AWS Lambda function. Possible + // values are: + // + // * FILTER - Invoke the function to customize the segment that's used by + // a campaign. + // + // * DELIVERY - (Deprecated) Previously, invoked the function to send a campaign + // through a custom channel. This functionality is not supported anymore. + // To send a campaign through a custom channel, use the CustomDeliveryConfiguration + // and CampaignCustomMessage objects of the campaign. Mode *string `type:"string" enum:"Mode"` // The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function @@ -14086,12 +14125,16 @@ func (s *CampaignHook) SetWebUrl(v string) *CampaignHook { return s } -// Specifies limits on the messages that a campaign can send. +// For a campaign, specifies limits on the messages that the campaign can send. +// For an application, specifies the default limits for messages that campaigns +// and journeys in the application can send. type CampaignLimits struct { _ struct{} `type:"structure"` // The maximum number of messages that a campaign can send to a single endpoint - // during a 24-hour period. The maximum value is 100. + // during a 24-hour period. For an application, this value specifies the default + // limit for the number of messages that campaigns and journeys can send to + // a single endpoint during a 24-hour period. The maximum value is 100. Daily *int64 `type:"integer"` // The maximum amount of time, in seconds, that a campaign can attempt to deliver @@ -14099,12 +14142,15 @@ type CampaignLimits struct { // is 60 seconds. MaximumDuration *int64 `type:"integer"` - // The maximum number of messages that a campaign can send each second. The - // minimum value is 50. The maximum value is 20,000. + // The maximum number of messages that a campaign can send each second. For + // an application, this value specifies the default limit for the number of + // messages that campaigns and journeys can send each second. The minimum value + // is 50. The maximum value is 20,000. MessagesPerSecond *int64 `type:"integer"` // The maximum number of messages that a campaign can send to a single endpoint - // during the course of the campaign. The maximum value is 100. + // during the course of the campaign. If a campaign recurs, this setting applies + // to all runs of the campaign. The maximum value is 100. Total *int64 `type:"integer"` } @@ -14166,8 +14212,12 @@ type CampaignResponse struct { // CreationDate is a required field CreationDate *string `type:"string" required:"true"` + // The delivery configuration settings for sending the campaign through a custom + // channel. + CustomDeliveryConfiguration *CustomDeliveryConfiguration `type:"structure"` + // The current status of the campaign's default treatment. This value exists - // only for campaigns that have more than one treatment, to support A/B testing. + // only for campaigns that have more than one treatment. DefaultState *CampaignState `type:"structure"` // The custom description of the campaign. @@ -14178,6 +14228,7 @@ type CampaignResponse struct { HoldoutPercent *int64 `type:"integer"` // The settings for the AWS Lambda function to use as a code hook for the campaign. + // You can use this hook to customize the segment that's used by the campaign. Hook *CampaignHook `type:"structure"` // The unique identifier for the campaign. @@ -14227,11 +14278,12 @@ type CampaignResponse struct { // The message template that’s used for the campaign. TemplateConfiguration *TemplateConfiguration `type:"structure"` - // The custom description of a variation of the campaign that's used for A/B - // testing. + // The custom description of the default treatment for the campaign. TreatmentDescription *string `type:"string"` - // The custom name of a variation of the campaign that's used for A/B testing. + // The custom name of the default treatment for the campaign, if the campaign + // has multiple treatments. A treatment is a variation of a campaign that's + // used for A/B testing. TreatmentName *string `type:"string"` // The version number of the campaign. @@ -14272,6 +14324,12 @@ func (s *CampaignResponse) SetCreationDate(v string) *CampaignResponse { return s } +// SetCustomDeliveryConfiguration sets the CustomDeliveryConfiguration field's value. +func (s *CampaignResponse) SetCustomDeliveryConfiguration(v *CustomDeliveryConfiguration) *CampaignResponse { + s.CustomDeliveryConfiguration = v + return s +} + // SetDefaultState sets the DefaultState field's value. func (s *CampaignResponse) SetDefaultState(v *CampaignState) *CampaignResponse { s.DefaultState = v @@ -14438,9 +14496,12 @@ type CampaignState struct { _ struct{} `type:"structure"` // The current status of the campaign, or the current status of a treatment - // that belongs to an A/B test campaign. If a campaign uses A/B testing, the - // campaign has a status of COMPLETED only if all campaign treatments have a - // status of COMPLETED. + // that belongs to an A/B test campaign. + // + // If a campaign uses A/B testing, the campaign has a status of COMPLETED only + // if all campaign treatments have a status of COMPLETED. If you delete the + // segment that's associated with a campaign, the campaign fails and has a status + // of DELETED. CampaignStatus *string `type:"string" enum:"CampaignStatus"` } @@ -15378,14 +15439,15 @@ type CreateRecommenderConfiguration struct { _ struct{} `type:"structure"` // A map of key-value pairs that defines 1-10 custom endpoint or user attributes, - // depending on the value for the RecommenderUserIdType property. Each of these - // attributes temporarily stores a recommended item that's retrieved from the - // recommender model and sent to an AWS Lambda function for additional processing. - // Each attribute can be used as a message variable in a message template. + // depending on the value for the RecommendationProviderIdType property. Each + // of these attributes temporarily stores a recommended item that's retrieved + // from the recommender model and sent to an AWS Lambda function for additional + // processing. Each attribute can be used as a message variable in a message + // template. // // In the map, the key is the name of a custom attribute and the value is a // custom display name for that attribute. The display name appears in the Attribute - // finder pane of the template editor on the Amazon Pinpoint console. The following + // finder of the template editor on the Amazon Pinpoint console. The following // restrictions apply to these names: // // * An attribute name must start with a letter or number and it can contain @@ -15397,12 +15459,13 @@ type CreateRecommenderConfiguration struct { // spaces, underscores (_), or hyphens (-). // // This object is required if the configuration invokes an AWS Lambda function - // (LambdaFunctionArn) to process recommendation data. Otherwise, don't include - // this object in your request. + // (RecommendationTransformerUri) to process recommendation data. Otherwise, + // don't include this object in your request. Attributes map[string]*string `type:"map"` // A custom description of the configuration for the recommender model. The - // description can contain up to 128 characters. + // description can contain up to 128 characters. The characters can be letters, + // numbers, spaces, or the following symbols: _ ; () , ‐. Description *string `type:"string"` // A custom name of the configuration for the recommender model. The name must @@ -15422,7 +15485,7 @@ type CreateRecommenderConfiguration struct { // * PINPOINT_USER_ID - Associate each user in the model with a particular // user and endpoint in Amazon Pinpoint. The data is correlated based on // user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition - // in Amazon Pinpoint has to specify a both a user ID (UserId) and an endpoint + // in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint // ID. Otherwise, messages won’t be sent to the user's endpoint. RecommendationProviderIdType *string `type:"string"` @@ -15445,26 +15508,26 @@ type CreateRecommenderConfiguration struct { RecommendationTransformerUri *string `type:"string"` // A custom display name for the standard endpoint or user attribute (RecommendationItems) - // that temporarily stores a recommended item for each endpoint or user, depending - // on the value for the RecommenderUserIdType property. This value is required - // if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) + // that temporarily stores recommended items for each endpoint or user, depending + // on the value for the RecommendationProviderIdType property. This value is + // required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) // to perform additional processing of recommendation data. // - // This name appears in the Attribute finder pane of the template editor on - // the Amazon Pinpoint console. The name can contain up to 25 characters. The - // characters can be letters, numbers, spaces, underscores (_), or hyphens (-). - // These restrictions don't apply to attribute values. + // This name appears in the Attribute finder of the template editor on the Amazon + // Pinpoint console. The name can contain up to 25 characters. The characters + // can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions + // don't apply to attribute values. RecommendationsDisplayName *string `type:"string"` // The number of recommended items to retrieve from the model for each endpoint - // or user, depending on the value for the RecommenderUserIdType property. This - // number determines how many recommended attributes are available for use as - // message variables in message templates. The minimum value is 1. The maximum - // value is 5. The default value is 5. + // or user, depending on the value for the RecommendationProviderIdType property. + // This number determines how many recommended items are available for use in + // message variables. The minimum value is 1. The maximum value is 5. The default + // value is 5. // // To use multiple recommended items and custom attributes with message variables, - // you have to use an AWS Lambda function (LambdaFunctionArn) to perform additional - // processing of recommendation data. + // you have to use an AWS Lambda function (RecommendationTransformerUri) to + // perform additional processing of recommendation data. RecommendationsPerMessage *int64 `type:"integer"` } @@ -15905,6 +15968,67 @@ func (s *CreateVoiceTemplateOutput) SetCreateTemplateMessageBody(v *CreateTempla return s } +// Specifies the delivery configuration settings for sending a campaign or campaign +// treatment through a custom channel. This object is required if you use the +// CampaignCustomMessage object to define the message to send for the campaign +// or campaign treatment. +type CustomDeliveryConfiguration struct { + _ struct{} `type:"structure"` + + // The destination to send the campaign or treatment to. This value can be one + // of the following: + // + // * The name or Amazon Resource Name (ARN) of an AWS Lambda function to + // invoke to handle delivery of the campaign or treatment. + // + // * The URL for a web application or service that supports HTTPS and can + // receive the message. The URL has to be a full URL, including the HTTPS + // protocol. + // + // DeliveryUri is a required field + DeliveryUri *string `type:"string" required:"true"` + + // The types of endpoints to send the campaign or treatment to. Each valid value + // maps to a type of channel that you can associate with an endpoint by using + // the ChannelType property of an endpoint. + EndpointTypes []*string `type:"list"` +} + +// String returns the string representation +func (s CustomDeliveryConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomDeliveryConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomDeliveryConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomDeliveryConfiguration"} + if s.DeliveryUri == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryUri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryUri sets the DeliveryUri field's value. +func (s *CustomDeliveryConfiguration) SetDeliveryUri(v string) *CustomDeliveryConfiguration { + s.DeliveryUri = &v + return s +} + +// SetEndpointTypes sets the EndpointTypes field's value. +func (s *CustomDeliveryConfiguration) SetEndpointTypes(v []*string) *CustomDeliveryConfiguration { + s.EndpointTypes = v + return s +} + // Specifies the default message for all channels. type DefaultMessage struct { _ struct{} `type:"structure"` @@ -17765,8 +17889,8 @@ func (s *DirectMessageConfiguration) SetVoiceMessage(v *VoiceMessage) *DirectMes type EmailChannelRequest struct { _ struct{} `type:"structure"` - // The configuration set that you want to apply to email that you send through - // the channel by using the Amazon Pinpoint Email API (emailAPIreference.html). + // The Amazon SES configuration set (https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html) + // that you want to apply to messages that you send through the channel. ConfigurationSet *string `type:"string"` // Specifies whether to enable the email channel for the application. @@ -17855,8 +17979,8 @@ type EmailChannelResponse struct { // to. ApplicationId *string `type:"string"` - // The configuration set that's applied to email that's sent through the channel - // by using the Amazon Pinpoint Email API (emailAPIreference.html). + // The Amazon SES configuration set (https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html) + // that's applied to messages that are sent through the channel. ConfigurationSet *string `type:"string"` // The date and time, in ISO 8601 format, when the email channel was enabled. @@ -17865,7 +17989,7 @@ type EmailChannelResponse struct { // Specifies whether the email channel is enabled for the application. Enabled *bool `type:"boolean"` - // The verified email address that you send email from when you send email through + // The verified email address that email is sent from when you send email through // the channel. FromAddress *string `type:"string"` @@ -17877,8 +18001,7 @@ type EmailChannelResponse struct { Id *string `type:"string"` // The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple - // Email Service (Amazon SES), that you use when you send email through the - // channel. + // Email Service (Amazon SES), that's used when you send email through the channel. Identity *string `type:"string"` // Specifies whether the email channel is archived. @@ -17890,7 +18013,7 @@ type EmailChannelResponse struct { // The date and time, in ISO 8601 format, when the email channel was last modified. LastModifiedDate *string `type:"string"` - // The maximum number of emails that you can send through the channel each second. + // The maximum number of emails that can be sent through the channel each second. MessagesPerSecond *int64 `type:"integer"` // The type of messaging or notification platform for the channel. For the email @@ -18466,8 +18589,8 @@ type EndpointBatchItem struct { // The unique identifier for the request to create or update the endpoint. RequestId *string `type:"string"` - // One or more custom user attributes that describe the user who's associated - // with the endpoint. + // One or more custom attributes that describe the user who's associated with + // the endpoint. User *EndpointUser `type:"structure"` } @@ -18954,8 +19077,8 @@ type EndpointRequest struct { // The unique identifier for the most recent request to update the endpoint. RequestId *string `type:"string"` - // One or more custom user attributes that describe the user who's associated - // with the endpoint. + // One or more custom attributes that describe the user who's associated with + // the endpoint. User *EndpointUser `type:"structure"` } @@ -20234,8 +20357,8 @@ func (s *ExportJobsResponse) SetNextToken(v string) *ExportJobsResponse { // Provides information about an API request or response. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -20254,17 +20377,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20272,22 +20395,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the status and settings of the GCM channel for an application. @@ -24810,8 +24933,8 @@ func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { // Provides information about an API request or response. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -24830,17 +24953,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -24848,22 +24971,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // Provides information about the results of a request to create or update an @@ -24924,7 +25047,7 @@ type JourneyDateRangeKpiResponse struct { // that the data was retrieved for. This value describes the associated metric // and consists of two or more terms, which are comprised of lowercase alphanumeric // characters, separated by a hyphen. For a list of possible values, see the - // Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html). + // Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html). // // KpiName is a required field KpiName *string `type:"string" required:"true"` @@ -26092,31 +26215,38 @@ type MessageConfiguration struct { _ struct{} `type:"structure"` // The message that the campaign sends through the ADM (Amazon Device Messaging) - // channel. This message overrides the default message. + // channel. If specified, this message overrides the default message. ADMMessage *Message `type:"structure"` // The message that the campaign sends through the APNs (Apple Push Notification - // service) channel. This message overrides the default message. + // service) channel. If specified, this message overrides the default message. APNSMessage *Message `type:"structure"` // The message that the campaign sends through the Baidu (Baidu Cloud Push) - // channel. This message overrides the default message. + // channel. If specified, this message overrides the default message. BaiduMessage *Message `type:"structure"` + // The message that the campaign sends through a custom channel, as specified + // by the delivery configuration (CustomDeliveryConfiguration) settings for + // the campaign. If specified, this message overrides the default message. + CustomMessage *CampaignCustomMessage `type:"structure"` + // The default message that the campaign sends through all the channels that // are configured for the campaign. DefaultMessage *Message `type:"structure"` - // The message that the campaign sends through the email channel. + // The message that the campaign sends through the email channel. If specified, + // this message overrides the default message. EmailMessage *CampaignEmailMessage `type:"structure"` // The message that the campaign sends through the GCM channel, which enables // Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging - // (FCM), formerly Google Cloud Messaging (GCM), service. This message overrides - // the default message. + // (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this + // message overrides the default message. GCMMessage *Message `type:"structure"` - // The message that the campaign sends through the SMS channel. + // The message that the campaign sends through the SMS channel. If specified, + // this message overrides the default message. SMSMessage *CampaignSmsMessage `type:"structure"` } @@ -26148,6 +26278,12 @@ func (s *MessageConfiguration) SetBaiduMessage(v *Message) *MessageConfiguration return s } +// SetCustomMessage sets the CustomMessage field's value. +func (s *MessageConfiguration) SetCustomMessage(v *CampaignCustomMessage) *MessageConfiguration { + s.CustomMessage = v + return s +} + // SetDefaultMessage sets the DefaultMessage field's value. func (s *MessageConfiguration) SetDefaultMessage(v *Message) *MessageConfiguration { s.DefaultMessage = v @@ -26418,8 +26554,8 @@ func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { // Provides information about an API request or response. type MethodNotAllowedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -26438,17 +26574,17 @@ func (s MethodNotAllowedException) GoString() string { func newErrorMethodNotAllowedException(v protocol.ResponseMetadata) error { return &MethodNotAllowedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MethodNotAllowedException) Code() string { +func (s *MethodNotAllowedException) Code() string { return "MethodNotAllowedException" } // Message returns the exception's message. -func (s MethodNotAllowedException) Message() string { +func (s *MethodNotAllowedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26456,22 +26592,22 @@ func (s MethodNotAllowedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MethodNotAllowedException) OrigErr() error { +func (s *MethodNotAllowedException) OrigErr() error { return nil } -func (s MethodNotAllowedException) Error() string { +func (s *MethodNotAllowedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s MethodNotAllowedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MethodNotAllowedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MethodNotAllowedException) RequestID() string { - return s.respMetadata.RequestID +func (s *MethodNotAllowedException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies metric-based criteria for including or excluding endpoints from @@ -26648,8 +26784,8 @@ func (s *MultiConditionalSplitActivity) SetEvaluationWaitTime(v *WaitTime) *Mult // Provides information about an API request or response. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -26668,17 +26804,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26686,22 +26822,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies a phone number to validate and retrieve information about. @@ -26893,8 +27029,8 @@ func (s *NumberValidateResponse) SetZipCode(v string) *NumberValidateResponse { // Provides information about an API request or response. type PayloadTooLargeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -26913,17 +27049,17 @@ func (s PayloadTooLargeException) GoString() string { func newErrorPayloadTooLargeException(v protocol.ResponseMetadata) error { return &PayloadTooLargeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PayloadTooLargeException) Code() string { +func (s *PayloadTooLargeException) Code() string { return "PayloadTooLargeException" } // Message returns the exception's message. -func (s PayloadTooLargeException) Message() string { +func (s *PayloadTooLargeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26931,22 +27067,22 @@ func (s PayloadTooLargeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PayloadTooLargeException) OrigErr() error { +func (s *PayloadTooLargeException) OrigErr() error { return nil } -func (s PayloadTooLargeException) Error() string { +func (s *PayloadTooLargeException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s PayloadTooLargeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PayloadTooLargeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PayloadTooLargeException) RequestID() string { - return s.respMetadata.RequestID +func (s *PayloadTooLargeException) RequestID() string { + return s.RespMetadata.RequestID } type PhoneNumberValidateInput struct { @@ -27800,13 +27936,14 @@ type RecommenderConfigurationResponse struct { _ struct{} `type:"structure"` // A map that defines 1-10 custom endpoint or user attributes, depending on - // the value for the RecommenderUserIdType property. Each of these attributes + // the value for the RecommendationProviderIdType property. Each of these attributes // temporarily stores a recommended item that's retrieved from the recommender // model and sent to an AWS Lambda function for additional processing. Each // attribute can be used as a message variable in a message template. // // This value is null if the configuration doesn't invoke an AWS Lambda function - // (LambdaFunctionArn) to perform additional processing of recommendation data. + // (RecommendationTransformerUri) to perform additional processing of recommendation + // data. Attributes map[string]*string `type:"map"` // The date, in extended ISO 8601 format, when the configuration was created @@ -27868,18 +28005,19 @@ type RecommenderConfigurationResponse struct { RecommendationTransformerUri *string `type:"string"` // The custom display name for the standard endpoint or user attribute (RecommendationItems) - // that temporarily stores a recommended item for each endpoint or user, depending - // on the value for the RecommenderUserIdType property. This name appears in - // the Attribute finder pane of the template editor on the Amazon Pinpoint console. + // that temporarily stores recommended items for each endpoint or user, depending + // on the value for the RecommendationProviderIdType property. This name appears + // in the Attribute finder of the template editor on the Amazon Pinpoint console. // // This value is null if the configuration doesn't invoke an AWS Lambda function - // (LambdaFunctionArn) to perform additional processing of recommendation data. + // (RecommendationTransformerUri) to perform additional processing of recommendation + // data. RecommendationsDisplayName *string `type:"string"` // The number of recommended items that are retrieved from the model for each - // endpoint or user, depending on the value for the RecommenderUserIdType property. - // This number determines how many recommended attributes are available for - // use as message variables in message templates. + // endpoint or user, depending on the value for the RecommendationProviderIdType + // property. This number determines how many recommended items are available + // for use in message variables. RecommendationsPerMessage *int64 `type:"integer"` } @@ -28358,6 +28496,9 @@ type SMSMessage struct { // your dedicated number. Keyword *string `type:"string"` + // The URL of an image or video to display in the SMS message. + MediaUrl *string `type:"string"` + // The SMS message type. Valid values are: TRANSACTIONAL, the message is critical // or time-sensitive, such as a one-time password that supports a customer transaction; // and, PROMOTIONAL, the message is not critical or time-sensitive, such as @@ -28401,6 +28542,12 @@ func (s *SMSMessage) SetKeyword(v string) *SMSMessage { return s } +// SetMediaUrl sets the MediaUrl field's value. +func (s *SMSMessage) SetMediaUrl(v string) *SMSMessage { + s.MediaUrl = &v + return s +} + // SetMessageType sets the MessageType field's value. func (s *SMSMessage) SetMessageType(v string) *SMSMessage { s.MessageType = &v @@ -30775,8 +30922,8 @@ func (s *TemplatesResponse) SetNextToken(v string) *TemplatesResponse { // Provides information about an API request or response. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -30795,17 +30942,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30813,22 +30960,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the settings for a campaign treatment. A treatment is a variation @@ -30836,6 +30983,11 @@ func (s TooManyRequestsException) RequestID() string { type TreatmentResource struct { _ struct{} `type:"structure"` + // The delivery configuration settings for sending the treatment through a custom + // channel. This object is required if the MessageConfiguration object for the + // treatment specifies a CustomMessage object. + CustomDeliveryConfiguration *CustomDeliveryConfiguration `type:"structure"` + // The unique identifier for the treatment. // // Id is a required field @@ -30862,8 +31014,7 @@ type TreatmentResource struct { // The custom description of the treatment. TreatmentDescription *string `type:"string"` - // The custom name of the treatment. A treatment is a variation of a campaign - // that's used for A/B testing of a campaign. + // The custom name of the treatment. TreatmentName *string `type:"string"` } @@ -30877,6 +31028,12 @@ func (s TreatmentResource) GoString() string { return s.String() } +// SetCustomDeliveryConfiguration sets the CustomDeliveryConfiguration field's value. +func (s *TreatmentResource) SetCustomDeliveryConfiguration(v *CustomDeliveryConfiguration) *TreatmentResource { + s.CustomDeliveryConfiguration = v + return s +} + // SetId sets the Id field's value. func (s *TreatmentResource) SetId(v string) *TreatmentResource { s.Id = &v @@ -32424,14 +32581,15 @@ type UpdateRecommenderConfiguration struct { _ struct{} `type:"structure"` // A map of key-value pairs that defines 1-10 custom endpoint or user attributes, - // depending on the value for the RecommenderUserIdType property. Each of these - // attributes temporarily stores a recommended item that's retrieved from the - // recommender model and sent to an AWS Lambda function for additional processing. - // Each attribute can be used as a message variable in a message template. + // depending on the value for the RecommendationProviderIdType property. Each + // of these attributes temporarily stores a recommended item that's retrieved + // from the recommender model and sent to an AWS Lambda function for additional + // processing. Each attribute can be used as a message variable in a message + // template. // // In the map, the key is the name of a custom attribute and the value is a // custom display name for that attribute. The display name appears in the Attribute - // finder pane of the template editor on the Amazon Pinpoint console. The following + // finder of the template editor on the Amazon Pinpoint console. The following // restrictions apply to these names: // // * An attribute name must start with a letter or number and it can contain @@ -32443,12 +32601,13 @@ type UpdateRecommenderConfiguration struct { // spaces, underscores (_), or hyphens (-). // // This object is required if the configuration invokes an AWS Lambda function - // (LambdaFunctionArn) to process recommendation data. Otherwise, don't include - // this object in your request. + // (RecommendationTransformerUri) to process recommendation data. Otherwise, + // don't include this object in your request. Attributes map[string]*string `type:"map"` // A custom description of the configuration for the recommender model. The - // description can contain up to 128 characters. + // description can contain up to 128 characters. The characters can be letters, + // numbers, spaces, or the following symbols: _ ; () , ‐. Description *string `type:"string"` // A custom name of the configuration for the recommender model. The name must @@ -32468,7 +32627,7 @@ type UpdateRecommenderConfiguration struct { // * PINPOINT_USER_ID - Associate each user in the model with a particular // user and endpoint in Amazon Pinpoint. The data is correlated based on // user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition - // in Amazon Pinpoint has to specify a both a user ID (UserId) and an endpoint + // in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint // ID. Otherwise, messages won’t be sent to the user's endpoint. RecommendationProviderIdType *string `type:"string"` @@ -32491,26 +32650,26 @@ type UpdateRecommenderConfiguration struct { RecommendationTransformerUri *string `type:"string"` // A custom display name for the standard endpoint or user attribute (RecommendationItems) - // that temporarily stores a recommended item for each endpoint or user, depending - // on the value for the RecommenderUserIdType property. This value is required - // if the configuration doesn't invoke an AWS Lambda function (LambdaFunctionArn) + // that temporarily stores recommended items for each endpoint or user, depending + // on the value for the RecommendationProviderIdType property. This value is + // required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) // to perform additional processing of recommendation data. // - // This name appears in the Attribute finder pane of the template editor on - // the Amazon Pinpoint console. The name can contain up to 25 characters. The - // characters can be letters, numbers, spaces, underscores (_), or hyphens (-). - // These restrictions don't apply to attribute values. + // This name appears in the Attribute finder of the template editor on the Amazon + // Pinpoint console. The name can contain up to 25 characters. The characters + // can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions + // don't apply to attribute values. RecommendationsDisplayName *string `type:"string"` // The number of recommended items to retrieve from the model for each endpoint - // or user, depending on the value for the RecommenderUserIdType property. This - // number determines how many recommended attributes are available for use as - // message variables in message templates. The minimum value is 1. The maximum - // value is 5. The default value is 5. + // or user, depending on the value for the RecommendationProviderIdType property. + // This number determines how many recommended items are available for use in + // message variables. The minimum value is 1. The maximum value is 5. The default + // value is 5. // // To use multiple recommended items and custom attributes with message variables, - // you have to use an AWS Lambda function (LambdaFunctionArn) to perform additional - // processing of recommendation data. + // you have to use an AWS Lambda function (RecommendationTransformerUri) to + // perform additional processing of recommendation data. RecommendationsPerMessage *int64 `type:"integer"` } @@ -33734,18 +33893,20 @@ func (s *WaitTime) SetWaitUntil(v string) *WaitTime { type WriteApplicationSettingsRequest struct { _ struct{} `type:"structure"` - // The settings for the AWS Lambda function to use by default as a code hook - // for campaigns in the application. To override these settings for a specific - // campaign, use the Campaign resource to define custom Lambda function settings - // for the campaign. + // The settings for the AWS Lambda function to invoke by default as a code hook + // for campaigns in the application. You can use this hook to customize segments + // that are used by campaigns in the application. + // + // To override these settings and define custom settings for a specific campaign, + // use the CampaignHook object of the Campaign resource. CampaignHook *CampaignHook `type:"structure"` // Specifies whether to enable application-related alarms in Amazon CloudWatch. CloudWatchMetricsEnabled *bool `type:"boolean"` - // The default sending limits for campaigns in the application. To override - // these limits for a specific campaign, use the Campaign resource to define - // custom limits for the campaign. + // The default sending limits for campaigns and journeys in the application. + // To override these limits and define custom limits for a specific campaign + // or journey, use the Campaign resource or the Journey resource, respectively. Limits *CampaignLimits `type:"structure"` // The default quiet time for campaigns and journeys in the application. Quiet @@ -33814,6 +33975,11 @@ type WriteCampaignRequest struct { // in addition to the default treatment for the campaign. AdditionalTreatments []*WriteTreatmentResource `type:"list"` + // The delivery configuration settings for sending the campaign through a custom + // channel. This object is required if the MessageConfiguration object for the + // campaign specifies a CustomMessage object. + CustomDeliveryConfiguration *CustomDeliveryConfiguration `type:"structure"` + // A custom description of the campaign. Description *string `type:"string"` @@ -33821,11 +33987,13 @@ type WriteCampaignRequest struct { // messages from the campaign. HoldoutPercent *int64 `type:"integer"` - // The settings for the AWS Lambda function to use as a code hook for the campaign. + // The settings for the AWS Lambda function to invoke as a code hook for the + // campaign. You can use this hook to customize the segment that's used by the + // campaign. Hook *CampaignHook `type:"structure"` // Specifies whether to pause the campaign. A paused campaign doesn't run unless - // you resume it by setting this value to false. + // you resume it by changing this value to false. IsPaused *bool `type:"boolean"` // The messaging limits for the campaign. @@ -33854,10 +34022,12 @@ type WriteCampaignRequest struct { // The message template to use for the campaign. TemplateConfiguration *TemplateConfiguration `type:"structure"` - // A custom description of a variation of the campaign to use for A/B testing. + // A custom description of the default treatment for the campaign. TreatmentDescription *string `type:"string"` - // A custom name for a variation of the campaign to use for A/B testing. + // A custom name of the default treatment for the campaign, if the campaign + // has multiple treatments. A treatment is a variation of a campaign that's + // used for A/B testing. TreatmentName *string `type:"string"` } @@ -33884,6 +34054,11 @@ func (s *WriteCampaignRequest) Validate() error { } } } + if s.CustomDeliveryConfiguration != nil { + if err := s.CustomDeliveryConfiguration.Validate(); err != nil { + invalidParams.AddNested("CustomDeliveryConfiguration", err.(request.ErrInvalidParams)) + } + } if s.Schedule != nil { if err := s.Schedule.Validate(); err != nil { invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) @@ -33902,6 +34077,12 @@ func (s *WriteCampaignRequest) SetAdditionalTreatments(v []*WriteTreatmentResour return s } +// SetCustomDeliveryConfiguration sets the CustomDeliveryConfiguration field's value. +func (s *WriteCampaignRequest) SetCustomDeliveryConfiguration(v *CustomDeliveryConfiguration) *WriteCampaignRequest { + s.CustomDeliveryConfiguration = v + return s +} + // SetDescription sets the Description field's value. func (s *WriteCampaignRequest) SetDescription(v string) *WriteCampaignRequest { s.Description = &v @@ -34319,6 +34500,11 @@ func (s *WriteSegmentRequest) SetTags(v map[string]*string) *WriteSegmentRequest type WriteTreatmentResource struct { _ struct{} `type:"structure"` + // The delivery configuration settings for sending the treatment through a custom + // channel. This object is required if the MessageConfiguration object for the + // treatment specifies a CustomMessage object. + CustomDeliveryConfiguration *CustomDeliveryConfiguration `type:"structure"` + // The message configuration settings for the treatment. MessageConfiguration *MessageConfiguration `type:"structure"` @@ -34337,8 +34523,7 @@ type WriteTreatmentResource struct { // A custom description of the treatment. TreatmentDescription *string `type:"string"` - // A custom name for the treatment. A treatment is a variation of a campaign - // that's used for A/B testing of a campaign. + // A custom name for the treatment. TreatmentName *string `type:"string"` } @@ -34358,6 +34543,11 @@ func (s *WriteTreatmentResource) Validate() error { if s.SizePercent == nil { invalidParams.Add(request.NewErrParamRequired("SizePercent")) } + if s.CustomDeliveryConfiguration != nil { + if err := s.CustomDeliveryConfiguration.Validate(); err != nil { + invalidParams.AddNested("CustomDeliveryConfiguration", err.(request.ErrInvalidParams)) + } + } if s.Schedule != nil { if err := s.Schedule.Validate(); err != nil { invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) @@ -34370,6 +34560,12 @@ func (s *WriteTreatmentResource) Validate() error { return nil } +// SetCustomDeliveryConfiguration sets the CustomDeliveryConfiguration field's value. +func (s *WriteTreatmentResource) SetCustomDeliveryConfiguration(v *CustomDeliveryConfiguration) *WriteTreatmentResource { + s.CustomDeliveryConfiguration = v + return s +} + // SetMessageConfiguration sets the MessageConfiguration field's value. func (s *WriteTreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *WriteTreatmentResource { s.MessageConfiguration = v @@ -34525,6 +34721,41 @@ const ( DurationDay30 = "DAY_30" ) +const ( + // EndpointTypesElementGcm is a EndpointTypesElement enum value + EndpointTypesElementGcm = "GCM" + + // EndpointTypesElementApns is a EndpointTypesElement enum value + EndpointTypesElementApns = "APNS" + + // EndpointTypesElementApnsSandbox is a EndpointTypesElement enum value + EndpointTypesElementApnsSandbox = "APNS_SANDBOX" + + // EndpointTypesElementApnsVoip is a EndpointTypesElement enum value + EndpointTypesElementApnsVoip = "APNS_VOIP" + + // EndpointTypesElementApnsVoipSandbox is a EndpointTypesElement enum value + EndpointTypesElementApnsVoipSandbox = "APNS_VOIP_SANDBOX" + + // EndpointTypesElementAdm is a EndpointTypesElement enum value + EndpointTypesElementAdm = "ADM" + + // EndpointTypesElementSms is a EndpointTypesElement enum value + EndpointTypesElementSms = "SMS" + + // EndpointTypesElementVoice is a EndpointTypesElement enum value + EndpointTypesElementVoice = "VOICE" + + // EndpointTypesElementEmail is a EndpointTypesElement enum value + EndpointTypesElementEmail = "EMAIL" + + // EndpointTypesElementBaidu is a EndpointTypesElement enum value + EndpointTypesElementBaidu = "BAIDU" + + // EndpointTypesElementCustom is a EndpointTypesElement enum value + EndpointTypesElementCustom = "CUSTOM" +) + const ( // FilterTypeSystem is a FilterType enum value FilterTypeSystem = "SYSTEM" diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go index eddb51929b1..a1e8aa0a79a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go @@ -605,8 +605,8 @@ func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutp // The pagination token expired. Try again without a pagination token. type ExpiredNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -623,17 +623,17 @@ func (s ExpiredNextTokenException) GoString() string { func newErrorExpiredNextTokenException(v protocol.ResponseMetadata) error { return &ExpiredNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExpiredNextTokenException) Code() string { +func (s *ExpiredNextTokenException) Code() string { return "ExpiredNextTokenException" } // Message returns the exception's message. -func (s ExpiredNextTokenException) Message() string { +func (s *ExpiredNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -641,22 +641,22 @@ func (s ExpiredNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExpiredNextTokenException) OrigErr() error { +func (s *ExpiredNextTokenException) OrigErr() error { return nil } -func (s ExpiredNextTokenException) Error() string { +func (s *ExpiredNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExpiredNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExpiredNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExpiredNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ExpiredNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The constraints that you want all returned products to match. @@ -981,8 +981,8 @@ func (s *GetProductsOutput) SetPriceList(v []aws.JSONValue) *GetProductsOutput { // An error on the server occurred during the processing of your request. Try // again later. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -999,17 +999,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1017,28 +1017,28 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The pagination token is invalid. Try again without a pagination token. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1055,17 +1055,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1073,28 +1073,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // One or more parameters had an invalid value. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1111,17 +1111,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1129,28 +1129,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource can't be found. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1167,17 +1167,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1185,22 +1185,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The metadata for a service, such as the service code and available attribute diff --git a/vendor/github.com/aws/aws-sdk-go/service/qldb/api.go b/vendor/github.com/aws/aws-sdk-go/service/qldb/api.go index 0fcb1f12705..7f80514590a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/qldb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/qldb/api.go @@ -13,6 +13,96 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/restjson" ) +const opCancelJournalKinesisStream = "CancelJournalKinesisStream" + +// CancelJournalKinesisStreamRequest generates a "aws/request.Request" representing the +// client's request for the CancelJournalKinesisStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelJournalKinesisStream for more information on using the CancelJournalKinesisStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelJournalKinesisStreamRequest method. +// req, resp := client.CancelJournalKinesisStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/CancelJournalKinesisStream +func (c *QLDB) CancelJournalKinesisStreamRequest(input *CancelJournalKinesisStreamInput) (req *request.Request, output *CancelJournalKinesisStreamOutput) { + op := &request.Operation{ + Name: opCancelJournalKinesisStream, + HTTPMethod: "DELETE", + HTTPPath: "/ledgers/{name}/journal-kinesis-streams/{streamId}", + } + + if input == nil { + input = &CancelJournalKinesisStreamInput{} + } + + output = &CancelJournalKinesisStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelJournalKinesisStream API operation for Amazon QLDB. +// +// Ends a given Amazon QLDB journal stream. Before a stream can be canceled, +// its current status must be ACTIVE. +// +// You can't restart a stream after you cancel it. Canceled QLDB stream resources +// are subject to a 7-day retention period, so they are automatically deleted +// after this limit expires. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon QLDB's +// API operation CancelJournalKinesisStream for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// One or more parameters in the request aren't valid. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// * ResourcePreconditionNotMetException +// The operation failed because a condition wasn't satisfied in advance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/CancelJournalKinesisStream +func (c *QLDB) CancelJournalKinesisStream(input *CancelJournalKinesisStreamInput) (*CancelJournalKinesisStreamOutput, error) { + req, out := c.CancelJournalKinesisStreamRequest(input) + return out, req.Send() +} + +// CancelJournalKinesisStreamWithContext is the same as CancelJournalKinesisStream with the addition of +// the ability to pass a context and additional request options. +// +// See CancelJournalKinesisStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *QLDB) CancelJournalKinesisStreamWithContext(ctx aws.Context, input *CancelJournalKinesisStreamInput, opts ...request.Option) (*CancelJournalKinesisStreamOutput, error) { + req, out := c.CancelJournalKinesisStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateLedger = "CreateLedger" // CreateLedgerRequest generates a "aws/request.Request" representing the @@ -196,6 +286,93 @@ func (c *QLDB) DeleteLedgerWithContext(ctx aws.Context, input *DeleteLedgerInput return out, req.Send() } +const opDescribeJournalKinesisStream = "DescribeJournalKinesisStream" + +// DescribeJournalKinesisStreamRequest generates a "aws/request.Request" representing the +// client's request for the DescribeJournalKinesisStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeJournalKinesisStream for more information on using the DescribeJournalKinesisStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeJournalKinesisStreamRequest method. +// req, resp := client.DescribeJournalKinesisStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeJournalKinesisStream +func (c *QLDB) DescribeJournalKinesisStreamRequest(input *DescribeJournalKinesisStreamInput) (req *request.Request, output *DescribeJournalKinesisStreamOutput) { + op := &request.Operation{ + Name: opDescribeJournalKinesisStream, + HTTPMethod: "GET", + HTTPPath: "/ledgers/{name}/journal-kinesis-streams/{streamId}", + } + + if input == nil { + input = &DescribeJournalKinesisStreamInput{} + } + + output = &DescribeJournalKinesisStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeJournalKinesisStream API operation for Amazon QLDB. +// +// Returns detailed information about a given Amazon QLDB journal stream. The +// output includes the Amazon Resource Name (ARN), stream name, current status, +// creation time, and the parameters of your original stream creation request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon QLDB's +// API operation DescribeJournalKinesisStream for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// One or more parameters in the request aren't valid. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// * ResourcePreconditionNotMetException +// The operation failed because a condition wasn't satisfied in advance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeJournalKinesisStream +func (c *QLDB) DescribeJournalKinesisStream(input *DescribeJournalKinesisStreamInput) (*DescribeJournalKinesisStreamOutput, error) { + req, out := c.DescribeJournalKinesisStreamRequest(input) + return out, req.Send() +} + +// DescribeJournalKinesisStreamWithContext is the same as DescribeJournalKinesisStream with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeJournalKinesisStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *QLDB) DescribeJournalKinesisStreamWithContext(ctx aws.Context, input *DescribeJournalKinesisStreamInput, opts ...request.Option) (*DescribeJournalKinesisStreamOutput, error) { + req, out := c.DescribeJournalKinesisStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeJournalS3Export = "DescribeJournalS3Export" // DescribeJournalS3ExportRequest generates a "aws/request.Request" representing the @@ -244,6 +421,10 @@ func (c *QLDB) DescribeJournalS3ExportRequest(input *DescribeJournalS3ExportInpu // export ID, when it was created, current status, and its start and end time // export parameters. // +// This action does not return any expired export jobs. For more information, +// see Export Job Expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration) +// in the Amazon QLDB Developer Guide. +// // If the export job with the given ExportId doesn't exist, then throws ResourceNotFoundException. // // If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException. @@ -720,6 +901,155 @@ func (c *QLDB) GetRevisionWithContext(ctx aws.Context, input *GetRevisionInput, return out, req.Send() } +const opListJournalKinesisStreamsForLedger = "ListJournalKinesisStreamsForLedger" + +// ListJournalKinesisStreamsForLedgerRequest generates a "aws/request.Request" representing the +// client's request for the ListJournalKinesisStreamsForLedger operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListJournalKinesisStreamsForLedger for more information on using the ListJournalKinesisStreamsForLedger +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListJournalKinesisStreamsForLedgerRequest method. +// req, resp := client.ListJournalKinesisStreamsForLedgerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/ListJournalKinesisStreamsForLedger +func (c *QLDB) ListJournalKinesisStreamsForLedgerRequest(input *ListJournalKinesisStreamsForLedgerInput) (req *request.Request, output *ListJournalKinesisStreamsForLedgerOutput) { + op := &request.Operation{ + Name: opListJournalKinesisStreamsForLedger, + HTTPMethod: "GET", + HTTPPath: "/ledgers/{name}/journal-kinesis-streams", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListJournalKinesisStreamsForLedgerInput{} + } + + output = &ListJournalKinesisStreamsForLedgerOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListJournalKinesisStreamsForLedger API operation for Amazon QLDB. +// +// Returns an array of all Amazon QLDB journal stream descriptors for a given +// ledger. The output of each stream descriptor includes the same details that +// are returned by DescribeJournalKinesisStream. +// +// This action returns a maximum of MaxResults items. It is paginated so that +// you can retrieve all the items by calling ListJournalKinesisStreamsForLedger +// multiple times. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon QLDB's +// API operation ListJournalKinesisStreamsForLedger for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// One or more parameters in the request aren't valid. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// * ResourcePreconditionNotMetException +// The operation failed because a condition wasn't satisfied in advance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/ListJournalKinesisStreamsForLedger +func (c *QLDB) ListJournalKinesisStreamsForLedger(input *ListJournalKinesisStreamsForLedgerInput) (*ListJournalKinesisStreamsForLedgerOutput, error) { + req, out := c.ListJournalKinesisStreamsForLedgerRequest(input) + return out, req.Send() +} + +// ListJournalKinesisStreamsForLedgerWithContext is the same as ListJournalKinesisStreamsForLedger with the addition of +// the ability to pass a context and additional request options. +// +// See ListJournalKinesisStreamsForLedger for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *QLDB) ListJournalKinesisStreamsForLedgerWithContext(ctx aws.Context, input *ListJournalKinesisStreamsForLedgerInput, opts ...request.Option) (*ListJournalKinesisStreamsForLedgerOutput, error) { + req, out := c.ListJournalKinesisStreamsForLedgerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListJournalKinesisStreamsForLedgerPages iterates over the pages of a ListJournalKinesisStreamsForLedger operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListJournalKinesisStreamsForLedger 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 ListJournalKinesisStreamsForLedger operation. +// pageNum := 0 +// err := client.ListJournalKinesisStreamsForLedgerPages(params, +// func(page *qldb.ListJournalKinesisStreamsForLedgerOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *QLDB) ListJournalKinesisStreamsForLedgerPages(input *ListJournalKinesisStreamsForLedgerInput, fn func(*ListJournalKinesisStreamsForLedgerOutput, bool) bool) error { + return c.ListJournalKinesisStreamsForLedgerPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListJournalKinesisStreamsForLedgerPagesWithContext same as ListJournalKinesisStreamsForLedgerPages 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 *QLDB) ListJournalKinesisStreamsForLedgerPagesWithContext(ctx aws.Context, input *ListJournalKinesisStreamsForLedgerInput, fn func(*ListJournalKinesisStreamsForLedgerOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListJournalKinesisStreamsForLedgerInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListJournalKinesisStreamsForLedgerRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListJournalKinesisStreamsForLedgerOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListJournalS3Exports = "ListJournalS3Exports" // ListJournalS3ExportsRequest generates a "aws/request.Request" representing the @@ -776,6 +1106,10 @@ func (c *QLDB) ListJournalS3ExportsRequest(input *ListJournalS3ExportsInput) (re // This action returns a maximum of MaxResults items, and is paginated so that // you can retrieve all the items by calling ListJournalS3Exports multiple times. // +// This action does not return any expired export jobs. For more information, +// see Export Job Expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration) +// in the Amazon QLDB 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. @@ -912,6 +1246,10 @@ func (c *QLDB) ListJournalS3ExportsForLedgerRequest(input *ListJournalS3ExportsF // you can retrieve all the items by calling ListJournalS3ExportsForLedger multiple // times. // +// This action does not return any expired export jobs. For more information, +// see Export Job Expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration) +// in the Amazon QLDB 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. @@ -1210,6 +1548,94 @@ func (c *QLDB) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsFo return out, req.Send() } +const opStreamJournalToKinesis = "StreamJournalToKinesis" + +// StreamJournalToKinesisRequest generates a "aws/request.Request" representing the +// client's request for the StreamJournalToKinesis operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StreamJournalToKinesis for more information on using the StreamJournalToKinesis +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StreamJournalToKinesisRequest method. +// req, resp := client.StreamJournalToKinesisRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/StreamJournalToKinesis +func (c *QLDB) StreamJournalToKinesisRequest(input *StreamJournalToKinesisInput) (req *request.Request, output *StreamJournalToKinesisOutput) { + op := &request.Operation{ + Name: opStreamJournalToKinesis, + HTTPMethod: "POST", + HTTPPath: "/ledgers/{name}/journal-kinesis-streams", + } + + if input == nil { + input = &StreamJournalToKinesisInput{} + } + + output = &StreamJournalToKinesisOutput{} + req = c.newRequest(op, input, output) + return +} + +// StreamJournalToKinesis API operation for Amazon QLDB. +// +// Creates a stream for a given Amazon QLDB ledger that delivers the journal +// data to a specified Amazon Kinesis Data Streams resource. The stream captures +// every document revision that is committed to your journal and sends it to +// the Kinesis data stream. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon QLDB's +// API operation StreamJournalToKinesis for usage and error information. +// +// Returned Error Types: +// * InvalidParameterException +// One or more parameters in the request aren't valid. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// * ResourcePreconditionNotMetException +// The operation failed because a condition wasn't satisfied in advance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/StreamJournalToKinesis +func (c *QLDB) StreamJournalToKinesis(input *StreamJournalToKinesisInput) (*StreamJournalToKinesisOutput, error) { + req, out := c.StreamJournalToKinesisRequest(input) + return out, req.Send() +} + +// StreamJournalToKinesisWithContext is the same as StreamJournalToKinesis with the addition of +// the ability to pass a context and additional request options. +// +// See StreamJournalToKinesis for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *QLDB) StreamJournalToKinesisWithContext(ctx aws.Context, input *StreamJournalToKinesisInput, opts ...request.Option) (*StreamJournalToKinesisOutput, error) { + req, out := c.StreamJournalToKinesisRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the @@ -1462,6 +1888,87 @@ func (c *QLDB) UpdateLedgerWithContext(ctx aws.Context, input *UpdateLedgerInput return out, req.Send() } +type CancelJournalKinesisStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the ledger. + // + // LedgerName is a required field + LedgerName *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // The unique ID that QLDB assigns to each QLDB journal stream. + // + // StreamId is a required field + StreamId *string `location:"uri" locationName:"streamId" min:"22" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelJournalKinesisStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJournalKinesisStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelJournalKinesisStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelJournalKinesisStreamInput"} + if s.LedgerName == nil { + invalidParams.Add(request.NewErrParamRequired("LedgerName")) + } + if s.LedgerName != nil && len(*s.LedgerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LedgerName", 1)) + } + if s.StreamId == nil { + invalidParams.Add(request.NewErrParamRequired("StreamId")) + } + if s.StreamId != nil && len(*s.StreamId) < 22 { + invalidParams.Add(request.NewErrParamMinLen("StreamId", 22)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLedgerName sets the LedgerName field's value. +func (s *CancelJournalKinesisStreamInput) SetLedgerName(v string) *CancelJournalKinesisStreamInput { + s.LedgerName = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *CancelJournalKinesisStreamInput) SetStreamId(v string) *CancelJournalKinesisStreamInput { + s.StreamId = &v + return s +} + +type CancelJournalKinesisStreamOutput struct { + _ struct{} `type:"structure"` + + // The unique ID that QLDB assigns to each QLDB journal stream. + StreamId *string `min:"22" type:"string"` +} + +// String returns the string representation +func (s CancelJournalKinesisStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJournalKinesisStreamOutput) GoString() string { + return s.String() +} + +// SetStreamId sets the StreamId field's value. +func (s *CancelJournalKinesisStreamOutput) SetStreamId(v string) *CancelJournalKinesisStreamOutput { + s.StreamId = &v + return s +} + type CreateLedgerInput struct { _ struct{} `type:"structure"` @@ -1667,6 +2174,88 @@ func (s DeleteLedgerOutput) GoString() string { return s.String() } +type DescribeJournalKinesisStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the ledger. + // + // LedgerName is a required field + LedgerName *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // The unique ID that QLDB assigns to each QLDB journal stream. + // + // StreamId is a required field + StreamId *string `location:"uri" locationName:"streamId" min:"22" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeJournalKinesisStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJournalKinesisStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeJournalKinesisStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeJournalKinesisStreamInput"} + if s.LedgerName == nil { + invalidParams.Add(request.NewErrParamRequired("LedgerName")) + } + if s.LedgerName != nil && len(*s.LedgerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LedgerName", 1)) + } + if s.StreamId == nil { + invalidParams.Add(request.NewErrParamRequired("StreamId")) + } + if s.StreamId != nil && len(*s.StreamId) < 22 { + invalidParams.Add(request.NewErrParamMinLen("StreamId", 22)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLedgerName sets the LedgerName field's value. +func (s *DescribeJournalKinesisStreamInput) SetLedgerName(v string) *DescribeJournalKinesisStreamInput { + s.LedgerName = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *DescribeJournalKinesisStreamInput) SetStreamId(v string) *DescribeJournalKinesisStreamInput { + s.StreamId = &v + return s +} + +type DescribeJournalKinesisStreamOutput struct { + _ struct{} `type:"structure"` + + // Information about the QLDB journal stream returned by a DescribeJournalS3Export + // request. + Stream *JournalKinesisStreamDescription `type:"structure"` +} + +// String returns the string representation +func (s DescribeJournalKinesisStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeJournalKinesisStreamOutput) GoString() string { + return s.String() +} + +// SetStream sets the Stream field's value. +func (s *DescribeJournalKinesisStreamOutput) SetStream(v *JournalKinesisStreamDescription) *DescribeJournalKinesisStreamOutput { + s.Stream = v + return s +} + type DescribeJournalS3ExportInput struct { _ struct{} `type:"structure"` @@ -2348,8 +2937,8 @@ func (s *GetRevisionOutput) SetRevision(v *ValueHolder) *GetRevisionOutput { // One or more parameters in the request aren't valid. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -2369,40 +2958,175 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidParameterException) Code() string { + return "InvalidParameterException" +} + +// Message returns the exception's message. +func (s *InvalidParameterException) Message() string { + if s.Message_ != nil { + return *s.Message_ } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidParameterException) OrigErr() error { + return nil +} + +func (s *InvalidParameterException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The information about an Amazon QLDB journal stream, including the Amazon +// Resource Name (ARN), stream name, creation time, current status, and the +// parameters of your original stream creation request. +type JournalKinesisStreamDescription struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the QLDB journal stream. + Arn *string `min:"20" type:"string"` + + // The date and time, in epoch time format, when the QLDB journal stream was + // created. (Epoch time format is the number of seconds elapsed since 12:00:00 + // AM January 1, 1970 UTC.) + CreationTime *time.Time `type:"timestamp"` + + // The error message that describes the reason that a stream has a status of + // IMPAIRED or FAILED. This is not applicable to streams that have other status + // values. + ErrorCause *string `type:"string" enum:"ErrorCause"` + + // The exclusive date and time that specifies when the stream ends. If this + // parameter is blank, the stream runs indefinitely until you cancel it. + ExclusiveEndTime *time.Time `type:"timestamp"` + + // The inclusive start date and time from which to start streaming journal data. + InclusiveStartTime *time.Time `type:"timestamp"` + + // The configuration settings of the Amazon Kinesis Data Streams destination + // for your QLDB journal stream. + // + // KinesisConfiguration is a required field + KinesisConfiguration *KinesisConfiguration `type:"structure" required:"true"` + + // The name of the ledger. + // + // LedgerName is a required field + LedgerName *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions + // for a journal stream to write data records to a Kinesis Data Streams resource. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // The current state of the QLDB journal stream. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"StreamStatus"` + + // The unique ID that QLDB assigns to each QLDB journal stream. + // + // StreamId is a required field + StreamId *string `min:"22" type:"string" required:"true"` + + // The user-defined name of the QLDB journal stream. + // + // StreamName is a required field + StreamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s JournalKinesisStreamDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JournalKinesisStreamDescription) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *JournalKinesisStreamDescription) SetArn(v string) *JournalKinesisStreamDescription { + s.Arn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *JournalKinesisStreamDescription) SetCreationTime(v time.Time) *JournalKinesisStreamDescription { + s.CreationTime = &v + return s +} + +// SetErrorCause sets the ErrorCause field's value. +func (s *JournalKinesisStreamDescription) SetErrorCause(v string) *JournalKinesisStreamDescription { + s.ErrorCause = &v + return s +} + +// SetExclusiveEndTime sets the ExclusiveEndTime field's value. +func (s *JournalKinesisStreamDescription) SetExclusiveEndTime(v time.Time) *JournalKinesisStreamDescription { + s.ExclusiveEndTime = &v + return s +} + +// SetInclusiveStartTime sets the InclusiveStartTime field's value. +func (s *JournalKinesisStreamDescription) SetInclusiveStartTime(v time.Time) *JournalKinesisStreamDescription { + s.InclusiveStartTime = &v + return s } -// Code returns the exception type name. -func (s InvalidParameterException) Code() string { - return "InvalidParameterException" +// SetKinesisConfiguration sets the KinesisConfiguration field's value. +func (s *JournalKinesisStreamDescription) SetKinesisConfiguration(v *KinesisConfiguration) *JournalKinesisStreamDescription { + s.KinesisConfiguration = v + return s } -// Message returns the exception's message. -func (s InvalidParameterException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" +// SetLedgerName sets the LedgerName field's value. +func (s *JournalKinesisStreamDescription) SetLedgerName(v string) *JournalKinesisStreamDescription { + s.LedgerName = &v + return s } -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { - return nil +// SetRoleArn sets the RoleArn field's value. +func (s *JournalKinesisStreamDescription) SetRoleArn(v string) *JournalKinesisStreamDescription { + s.RoleArn = &v + return s } -func (s InvalidParameterException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +// SetStatus sets the Status field's value. +func (s *JournalKinesisStreamDescription) SetStatus(v string) *JournalKinesisStreamDescription { + s.Status = &v + return s } -// Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +// SetStreamId sets the StreamId field's value. +func (s *JournalKinesisStreamDescription) SetStreamId(v string) *JournalKinesisStreamDescription { + s.StreamId = &v + return s } -// RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +// SetStreamName sets the StreamName field's value. +func (s *JournalKinesisStreamDescription) SetStreamName(v string) *JournalKinesisStreamDescription { + s.StreamName = &v + return s } // The information about a journal export job, including the ledger name, export @@ -2521,6 +3245,60 @@ func (s *JournalS3ExportDescription) SetStatus(v string) *JournalS3ExportDescrip return s } +// The configuration settings of the Amazon Kinesis Data Streams destination +// for your Amazon QLDB journal stream. +type KinesisConfiguration struct { + _ struct{} `type:"structure"` + + // Enables QLDB to publish multiple stream records in a single Kinesis Data + // Streams record. To learn more, see KPL Key Concepts (https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html) + // in the Amazon Kinesis Data Streams Developer Guide. + AggregationEnabled *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the Kinesis data stream resource. + // + // StreamArn is a required field + StreamArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s KinesisConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisConfiguration"} + if s.StreamArn == nil { + invalidParams.Add(request.NewErrParamRequired("StreamArn")) + } + if s.StreamArn != nil && len(*s.StreamArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("StreamArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAggregationEnabled sets the AggregationEnabled field's value. +func (s *KinesisConfiguration) SetAggregationEnabled(v bool) *KinesisConfiguration { + s.AggregationEnabled = &v + return s +} + +// SetStreamArn sets the StreamArn field's value. +func (s *KinesisConfiguration) SetStreamArn(v string) *KinesisConfiguration { + s.StreamArn = &v + return s +} + // Information about a ledger, including its name, state, and when it was created. type LedgerSummary struct { _ struct{} `type:"structure"` @@ -2567,8 +3345,8 @@ func (s *LedgerSummary) SetState(v string) *LedgerSummary { // You have reached the limit on the maximum number of resources allowed. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -2588,17 +3366,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2606,22 +3384,129 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListJournalKinesisStreamsForLedgerInput struct { + _ struct{} `type:"structure"` + + // The name of the ledger. + // + // LedgerName is a required field + LedgerName *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // The maximum number of results to return in a single ListJournalKinesisStreamsForLedger + // request. (The actual number of results returned might be fewer.) + MaxResults *int64 `location:"querystring" locationName:"max_results" min:"1" type:"integer"` + + // A pagination token, indicating that you want to retrieve the next page of + // results. If you received a value for NextToken in the response from a previous + // ListJournalKinesisStreamsForLedger call, you should use that value as input + // here. + NextToken *string `location:"querystring" locationName:"next_token" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListJournalKinesisStreamsForLedgerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJournalKinesisStreamsForLedgerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListJournalKinesisStreamsForLedgerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJournalKinesisStreamsForLedgerInput"} + if s.LedgerName == nil { + invalidParams.Add(request.NewErrParamRequired("LedgerName")) + } + if s.LedgerName != nil && len(*s.LedgerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LedgerName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLedgerName sets the LedgerName field's value. +func (s *ListJournalKinesisStreamsForLedgerInput) SetLedgerName(v string) *ListJournalKinesisStreamsForLedgerInput { + s.LedgerName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListJournalKinesisStreamsForLedgerInput) SetMaxResults(v int64) *ListJournalKinesisStreamsForLedgerInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJournalKinesisStreamsForLedgerInput) SetNextToken(v string) *ListJournalKinesisStreamsForLedgerInput { + s.NextToken = &v + return s +} + +type ListJournalKinesisStreamsForLedgerOutput struct { + _ struct{} `type:"structure"` + + // * If NextToken is empty, the last page of results has been processed and + // there are no more results to be retrieved. + // + // * If NextToken is not empty, more results are available. To retrieve the + // next page of results, use the value of NextToken in a subsequent ListJournalKinesisStreamsForLedger + // call. + NextToken *string `min:"4" type:"string"` + + // The array of QLDB journal stream descriptors that are associated with the + // given ledger. + Streams []*JournalKinesisStreamDescription `type:"list"` +} + +// String returns the string representation +func (s ListJournalKinesisStreamsForLedgerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJournalKinesisStreamsForLedgerOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJournalKinesisStreamsForLedgerOutput) SetNextToken(v string) *ListJournalKinesisStreamsForLedgerOutput { + s.NextToken = &v + return s +} + +// SetStreams sets the Streams field's value. +func (s *ListJournalKinesisStreamsForLedgerOutput) SetStreams(v []*JournalKinesisStreamDescription) *ListJournalKinesisStreamsForLedgerOutput { + s.Streams = v + return s } type ListJournalS3ExportsForLedgerInput struct { @@ -2979,8 +3864,8 @@ func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForRe // The specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -3003,17 +3888,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3021,28 +3906,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource can't be modified at this time. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -3065,17 +3950,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3083,28 +3968,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource doesn't exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -3127,17 +4012,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3145,28 +4030,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because a condition wasn't satisfied in advance. type ResourcePreconditionNotMetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -3189,17 +4074,17 @@ func (s ResourcePreconditionNotMetException) GoString() string { func newErrorResourcePreconditionNotMetException(v protocol.ResponseMetadata) error { return &ResourcePreconditionNotMetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourcePreconditionNotMetException) Code() string { +func (s *ResourcePreconditionNotMetException) Code() string { return "ResourcePreconditionNotMetException" } // Message returns the exception's message. -func (s ResourcePreconditionNotMetException) Message() string { +func (s *ResourcePreconditionNotMetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3207,22 +4092,22 @@ func (s ResourcePreconditionNotMetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourcePreconditionNotMetException) OrigErr() error { +func (s *ResourcePreconditionNotMetException) OrigErr() error { return nil } -func (s ResourcePreconditionNotMetException) Error() string { +func (s *ResourcePreconditionNotMetException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourcePreconditionNotMetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourcePreconditionNotMetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourcePreconditionNotMetException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourcePreconditionNotMetException) RequestID() string { + return s.RespMetadata.RequestID } // The encryption settings that are used by a journal export job to write data @@ -3230,8 +4115,9 @@ func (s ResourcePreconditionNotMetException) RequestID() string { type S3EncryptionConfiguration struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) for a customer master key (CMK) in AWS Key - // Management Service (AWS KMS). + // The Amazon Resource Name (ARN) for a symmetric customer master key (CMK) + // in AWS Key Management Service (AWS KMS). Amazon QLDB does not support asymmetric + // CMKs. // // You must provide a KmsKeyArn if you specify SSE_KMS as the ObjectEncryptionType. // @@ -3381,6 +4267,177 @@ func (s *S3ExportConfiguration) SetPrefix(v string) *S3ExportConfiguration { return s } +type StreamJournalToKinesisInput struct { + _ struct{} `type:"structure"` + + // The exclusive date and time that specifies when the stream ends. If you keep + // this parameter blank, the stream runs indefinitely until you cancel it. + // + // The ExclusiveEndTime must be in ISO 8601 date and time format and in Universal + // Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z + ExclusiveEndTime *time.Time `type:"timestamp"` + + // The inclusive start date and time from which to start streaming journal data. + // This parameter must be in ISO 8601 date and time format and in Universal + // Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z + // + // The InclusiveStartTime cannot be in the future and must be before ExclusiveEndTime. + // + // If you provide an InclusiveStartTime that is before the ledger's CreationDateTime, + // QLDB effectively defaults it to the ledger's CreationDateTime. + // + // InclusiveStartTime is a required field + InclusiveStartTime *time.Time `type:"timestamp" required:"true"` + + // The configuration settings of the Kinesis Data Streams destination for your + // stream request. + // + // KinesisConfiguration is a required field + KinesisConfiguration *KinesisConfiguration `type:"structure" required:"true"` + + // The name of the ledger. + // + // LedgerName is a required field + LedgerName *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions + // for a journal stream to write data records to a Kinesis Data Streams resource. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // The name that you want to assign to the QLDB journal stream. User-defined + // names can help identify and indicate the purpose of a stream. + // + // Your stream name must be unique among other active streams for a given ledger. + // If you try to create a stream with the same name and configuration of an + // active, existing stream for the same ledger, QLDB simply returns the existing + // stream. Stream names have the same naming constraints as ledger names, as + // defined in Quotas in Amazon QLDB (https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming) + // in the Amazon QLDB Developer Guide. + // + // StreamName is a required field + StreamName *string `min:"1" type:"string" required:"true"` + + // The key-value pairs to add as tags to the stream that you want to create. + // Tag keys are case sensitive. Tag values are case sensitive and can be null. + Tags map[string]*string `type:"map"` +} + +// String returns the string representation +func (s StreamJournalToKinesisInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StreamJournalToKinesisInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StreamJournalToKinesisInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StreamJournalToKinesisInput"} + if s.InclusiveStartTime == nil { + invalidParams.Add(request.NewErrParamRequired("InclusiveStartTime")) + } + if s.KinesisConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("KinesisConfiguration")) + } + if s.LedgerName == nil { + invalidParams.Add(request.NewErrParamRequired("LedgerName")) + } + if s.LedgerName != nil && len(*s.LedgerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LedgerName", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.StreamName == nil { + invalidParams.Add(request.NewErrParamRequired("StreamName")) + } + if s.StreamName != nil && len(*s.StreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) + } + if s.KinesisConfiguration != nil { + if err := s.KinesisConfiguration.Validate(); err != nil { + invalidParams.AddNested("KinesisConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExclusiveEndTime sets the ExclusiveEndTime field's value. +func (s *StreamJournalToKinesisInput) SetExclusiveEndTime(v time.Time) *StreamJournalToKinesisInput { + s.ExclusiveEndTime = &v + return s +} + +// SetInclusiveStartTime sets the InclusiveStartTime field's value. +func (s *StreamJournalToKinesisInput) SetInclusiveStartTime(v time.Time) *StreamJournalToKinesisInput { + s.InclusiveStartTime = &v + return s +} + +// SetKinesisConfiguration sets the KinesisConfiguration field's value. +func (s *StreamJournalToKinesisInput) SetKinesisConfiguration(v *KinesisConfiguration) *StreamJournalToKinesisInput { + s.KinesisConfiguration = v + return s +} + +// SetLedgerName sets the LedgerName field's value. +func (s *StreamJournalToKinesisInput) SetLedgerName(v string) *StreamJournalToKinesisInput { + s.LedgerName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *StreamJournalToKinesisInput) SetRoleArn(v string) *StreamJournalToKinesisInput { + s.RoleArn = &v + return s +} + +// SetStreamName sets the StreamName field's value. +func (s *StreamJournalToKinesisInput) SetStreamName(v string) *StreamJournalToKinesisInput { + s.StreamName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *StreamJournalToKinesisInput) SetTags(v map[string]*string) *StreamJournalToKinesisInput { + s.Tags = v + return s +} + +type StreamJournalToKinesisOutput struct { + _ struct{} `type:"structure"` + + // The unique ID that QLDB assigns to each QLDB journal stream. + StreamId *string `min:"22" type:"string"` +} + +// String returns the string representation +func (s StreamJournalToKinesisOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StreamJournalToKinesisOutput) GoString() string { + return s.String() +} + +// SetStreamId sets the StreamId field's value. +func (s *StreamJournalToKinesisOutput) SetStreamId(v string) *StreamJournalToKinesisOutput { + s.StreamId = &v + return s +} + type TagResourceInput struct { _ struct{} `type:"structure"` @@ -3689,6 +4746,14 @@ func (s *ValueHolder) SetIonText(v string) *ValueHolder { return s } +const ( + // ErrorCauseKinesisStreamNotFound is a ErrorCause enum value + ErrorCauseKinesisStreamNotFound = "KINESIS_STREAM_NOT_FOUND" + + // ErrorCauseIamPermissionRevoked is a ErrorCause enum value + ErrorCauseIamPermissionRevoked = "IAM_PERMISSION_REVOKED" +) + const ( // ExportStatusInProgress is a ExportStatus enum value ExportStatusInProgress = "IN_PROGRESS" @@ -3729,3 +4794,20 @@ const ( // S3ObjectEncryptionTypeNoEncryption is a S3ObjectEncryptionType enum value S3ObjectEncryptionTypeNoEncryption = "NO_ENCRYPTION" ) + +const ( + // StreamStatusActive is a StreamStatus enum value + StreamStatusActive = "ACTIVE" + + // StreamStatusCompleted is a StreamStatus enum value + StreamStatusCompleted = "COMPLETED" + + // StreamStatusCanceled is a StreamStatus enum value + StreamStatusCanceled = "CANCELED" + + // StreamStatusFailed is a StreamStatus enum value + StreamStatusFailed = "FAILED" + + // StreamStatusImpaired is a StreamStatus enum value + StreamStatusImpaired = "IMPAIRED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go b/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go index e4cfc186fcd..9fe23e9cd6f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/quicksight/api.go @@ -7168,8 +7168,8 @@ func (c *QuickSight) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInp // your policies have the correct permissions, and that you are using the correct // access keys. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -7189,17 +7189,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7207,22 +7207,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The active AWS Identity and Access Management (IAM) policy assignment. @@ -7993,8 +7993,8 @@ func (s *ColumnTag) SetColumnGeographicRole(v string) *ColumnTag { // A resource is already in a state that indicates an action is happening that // must complete before a new update can be applied. type ConcurrentUpdatingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -8013,17 +8013,17 @@ func (s ConcurrentUpdatingException) GoString() string { func newErrorConcurrentUpdatingException(v protocol.ResponseMetadata) error { return &ConcurrentUpdatingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConcurrentUpdatingException) Code() string { +func (s *ConcurrentUpdatingException) Code() string { return "ConcurrentUpdatingException" } // Message returns the exception's message. -func (s ConcurrentUpdatingException) Message() string { +func (s *ConcurrentUpdatingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8031,28 +8031,28 @@ func (s ConcurrentUpdatingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConcurrentUpdatingException) OrigErr() error { +func (s *ConcurrentUpdatingException) OrigErr() error { return nil } -func (s ConcurrentUpdatingException) Error() string { +func (s *ConcurrentUpdatingException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConcurrentUpdatingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConcurrentUpdatingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConcurrentUpdatingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConcurrentUpdatingException) RequestID() string { + return s.RespMetadata.RequestID } // Updating or deleting a resource can cause an inconsistent state. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -8072,17 +8072,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8090,22 +8090,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // A transform operation that creates calculated columns. Columns created in @@ -14208,8 +14208,8 @@ func (s *DescribeUserOutput) SetUser(v *User) *DescribeUserOutput { // The domain specified isn't on the allow list. All domains for embedded dashboards // must be added to the approved list by an Amazon QuickSight admin. type DomainNotWhitelistedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -14229,17 +14229,17 @@ func (s DomainNotWhitelistedException) GoString() string { func newErrorDomainNotWhitelistedException(v protocol.ResponseMetadata) error { return &DomainNotWhitelistedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DomainNotWhitelistedException) Code() string { +func (s *DomainNotWhitelistedException) Code() string { return "DomainNotWhitelistedException" } // Message returns the exception's message. -func (s DomainNotWhitelistedException) Message() string { +func (s *DomainNotWhitelistedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14247,22 +14247,22 @@ func (s DomainNotWhitelistedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DomainNotWhitelistedException) OrigErr() error { +func (s *DomainNotWhitelistedException) OrigErr() error { return nil } -func (s DomainNotWhitelistedException) Error() string { +func (s *DomainNotWhitelistedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DomainNotWhitelistedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DomainNotWhitelistedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DomainNotWhitelistedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DomainNotWhitelistedException) RequestID() string { + return s.RespMetadata.RequestID } // Error information for the SPICE ingestion of a dataset. @@ -14797,8 +14797,8 @@ func (s *IAMPolicyAssignmentSummary) SetAssignmentStatus(v string) *IAMPolicyAss // The identity type specified isn't supported. Supported identity types include // IAM and QUICKSIGHT. type IdentityTypeNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -14818,17 +14818,17 @@ func (s IdentityTypeNotSupportedException) GoString() string { func newErrorIdentityTypeNotSupportedException(v protocol.ResponseMetadata) error { return &IdentityTypeNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdentityTypeNotSupportedException) Code() string { +func (s *IdentityTypeNotSupportedException) Code() string { return "IdentityTypeNotSupportedException" } // Message returns the exception's message. -func (s IdentityTypeNotSupportedException) Message() string { +func (s *IdentityTypeNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14836,22 +14836,22 @@ func (s IdentityTypeNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdentityTypeNotSupportedException) OrigErr() error { +func (s *IdentityTypeNotSupportedException) OrigErr() error { return nil } -func (s IdentityTypeNotSupportedException) Error() string { +func (s *IdentityTypeNotSupportedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s IdentityTypeNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdentityTypeNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdentityTypeNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdentityTypeNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the SPICE ingestion for a dataset. @@ -15085,8 +15085,8 @@ func (s *IntegerParameter) SetValues(v []*int64) *IntegerParameter { // An internal failure occurred. type InternalFailureException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -15106,17 +15106,17 @@ func (s InternalFailureException) GoString() string { func newErrorInternalFailureException(v protocol.ResponseMetadata) error { return &InternalFailureException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalFailureException) Code() string { +func (s *InternalFailureException) Code() string { return "InternalFailureException" } // Message returns the exception's message. -func (s InternalFailureException) Message() string { +func (s *InternalFailureException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15124,28 +15124,28 @@ func (s InternalFailureException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalFailureException) OrigErr() error { +func (s *InternalFailureException) OrigErr() error { return nil } -func (s InternalFailureException) Error() string { +func (s *InternalFailureException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalFailureException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalFailureException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID } // The NextToken value isn't valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -15165,17 +15165,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15183,28 +15183,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // One or more parameters has a value that isn't valid. type InvalidParameterValueException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -15224,17 +15224,17 @@ func (s InvalidParameterValueException) GoString() string { func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { return &InvalidParameterValueException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValueException) Code() string { +func (s *InvalidParameterValueException) Code() string { return "InvalidParameterValueException" } // Message returns the exception's message. -func (s InvalidParameterValueException) Message() string { +func (s *InvalidParameterValueException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15242,22 +15242,22 @@ func (s InvalidParameterValueException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValueException) OrigErr() error { +func (s *InvalidParameterValueException) OrigErr() error { return nil } -func (s InvalidParameterValueException) Error() string { +func (s *InvalidParameterValueException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValueException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValueException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValueException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValueException) RequestID() string { + return s.RespMetadata.RequestID } // Jira parameters. @@ -15394,8 +15394,8 @@ func (s *JoinInstruction) SetType(v string) *JoinInstruction { // A limit is exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -15418,17 +15418,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15436,22 +15436,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListDashboardVersionsInput struct { @@ -17973,8 +17973,8 @@ func (s *PostgreSqlParameters) SetPort(v int64) *PostgreSqlParameters { // One or more preconditions aren't met. type PreconditionNotMetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -17994,17 +17994,17 @@ func (s PreconditionNotMetException) GoString() string { func newErrorPreconditionNotMetException(v protocol.ResponseMetadata) error { return &PreconditionNotMetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PreconditionNotMetException) Code() string { +func (s *PreconditionNotMetException) Code() string { return "PreconditionNotMetException" } // Message returns the exception's message. -func (s PreconditionNotMetException) Message() string { +func (s *PreconditionNotMetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18012,22 +18012,22 @@ func (s PreconditionNotMetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PreconditionNotMetException) OrigErr() error { +func (s *PreconditionNotMetException) OrigErr() error { return nil } -func (s PreconditionNotMetException) Error() string { +func (s *PreconditionNotMetException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s PreconditionNotMetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PreconditionNotMetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PreconditionNotMetException) RequestID() string { - return s.respMetadata.RequestID +func (s *PreconditionNotMetException) RequestID() string { + return s.RespMetadata.RequestID } // Presto parameters. @@ -18684,8 +18684,8 @@ func (s *RenameColumnOperation) SetNewColumnName(v string) *RenameColumnOperatio // The resource specified already exists. type ResourceExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -18708,17 +18708,17 @@ func (s ResourceExistsException) GoString() string { func newErrorResourceExistsException(v protocol.ResponseMetadata) error { return &ResourceExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceExistsException) Code() string { +func (s *ResourceExistsException) Code() string { return "ResourceExistsException" } // Message returns the exception's message. -func (s ResourceExistsException) Message() string { +func (s *ResourceExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18726,28 +18726,28 @@ func (s ResourceExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceExistsException) OrigErr() error { +func (s *ResourceExistsException) OrigErr() error { return nil } -func (s ResourceExistsException) Error() string { +func (s *ResourceExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceExistsException) RequestID() string { + return s.RespMetadata.RequestID } // One or more resources can't be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -18770,17 +18770,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18788,22 +18788,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Permission for the resource. @@ -18870,8 +18870,8 @@ func (s *ResourcePermission) SetPrincipal(v string) *ResourcePermission { // This resource is currently unavailable. type ResourceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -18894,17 +18894,17 @@ func (s ResourceUnavailableException) GoString() string { func newErrorResourceUnavailableException(v protocol.ResponseMetadata) error { return &ResourceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceUnavailableException) Code() string { +func (s *ResourceUnavailableException) Code() string { return "ResourceUnavailableException" } // Message returns the exception's message. -func (s ResourceUnavailableException) Message() string { +func (s *ResourceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18912,22 +18912,22 @@ func (s ResourceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceUnavailableException) OrigErr() error { +func (s *ResourceUnavailableException) OrigErr() error { return nil } -func (s ResourceUnavailableException) Error() string { +func (s *ResourceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Information about rows for a data set SPICE ingestion. @@ -19326,8 +19326,8 @@ func (s *ServiceNowParameters) SetSiteBaseUrl(v string) *ServiceNowParameters { // The number of minutes specified for the lifetime of a session isn't valid. // The session lifetime must be 15-600 minutes. type SessionLifetimeInMinutesInvalidException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -19347,17 +19347,17 @@ func (s SessionLifetimeInMinutesInvalidException) GoString() string { func newErrorSessionLifetimeInMinutesInvalidException(v protocol.ResponseMetadata) error { return &SessionLifetimeInMinutesInvalidException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SessionLifetimeInMinutesInvalidException) Code() string { +func (s *SessionLifetimeInMinutesInvalidException) Code() string { return "SessionLifetimeInMinutesInvalidException" } // Message returns the exception's message. -func (s SessionLifetimeInMinutesInvalidException) Message() string { +func (s *SessionLifetimeInMinutesInvalidException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19365,22 +19365,22 @@ func (s SessionLifetimeInMinutesInvalidException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SessionLifetimeInMinutesInvalidException) OrigErr() error { +func (s *SessionLifetimeInMinutesInvalidException) OrigErr() error { return nil } -func (s SessionLifetimeInMinutesInvalidException) Error() string { +func (s *SessionLifetimeInMinutesInvalidException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s SessionLifetimeInMinutesInvalidException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SessionLifetimeInMinutesInvalidException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SessionLifetimeInMinutesInvalidException) RequestID() string { - return s.respMetadata.RequestID +func (s *SessionLifetimeInMinutesInvalidException) RequestID() string { + return s.RespMetadata.RequestID } // Sheet controls option. @@ -20514,8 +20514,8 @@ func (s *TeradataParameters) SetPort(v int64) *TeradataParameters { // Access is throttled. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -20535,17 +20535,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20553,22 +20553,22 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // A data transformation on a logical table. This is a variant type structure. @@ -20747,8 +20747,8 @@ func (s *TwitterParameters) SetQuery(v string) *TwitterParameters { // Amazon QuickSight currently has Standard Edition and Enterprise Edition. // Not every operation and capability is available in every edition. type UnsupportedUserEditionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -20768,17 +20768,17 @@ func (s UnsupportedUserEditionException) GoString() string { func newErrorUnsupportedUserEditionException(v protocol.ResponseMetadata) error { return &UnsupportedUserEditionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedUserEditionException) Code() string { +func (s *UnsupportedUserEditionException) Code() string { return "UnsupportedUserEditionException" } // Message returns the exception's message. -func (s UnsupportedUserEditionException) Message() string { +func (s *UnsupportedUserEditionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -20786,22 +20786,22 @@ func (s UnsupportedUserEditionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedUserEditionException) OrigErr() error { +func (s *UnsupportedUserEditionException) OrigErr() error { return nil } -func (s UnsupportedUserEditionException) Error() string { +func (s *UnsupportedUserEditionException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedUserEditionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedUserEditionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedUserEditionException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedUserEditionException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -23267,8 +23267,8 @@ func (s *User) SetUserName(v string) *User { // operation that requires finding a user based on a provided user name, such // as DeleteUser, DescribeUser, and so on. type UserNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -23288,17 +23288,17 @@ func (s UserNotFoundException) GoString() string { func newErrorUserNotFoundException(v protocol.ResponseMetadata) error { return &UserNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UserNotFoundException) Code() string { +func (s *UserNotFoundException) Code() string { return "QuickSightUserNotFoundException" } // Message returns the exception's message. -func (s UserNotFoundException) Message() string { +func (s *UserNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23306,22 +23306,22 @@ func (s UserNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UserNotFoundException) OrigErr() error { +func (s *UserNotFoundException) OrigErr() error { return nil } -func (s UserNotFoundException) Error() string { +func (s *UserNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UserNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UserNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UserNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *UserNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // VPC connection properties. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/api.go b/vendor/github.com/aws/aws-sdk-go/service/ram/api.go index af4ed72da80..88d61c3784a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ram/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ram/api.go @@ -1005,6 +1005,9 @@ func (c *RAM) GetResourcePoliciesRequest(input *GetResourcePoliciesInput) (req * // * InvalidParameterException // A parameter is not valid. // +// * ResourceArnNotFoundException +// An Amazon Resource Name (ARN) was not found. +// // * ServerInternalException // The service could not respond to the request due to an internal problem. // @@ -1309,6 +1312,9 @@ func (c *RAM) GetResourceShareInvitationsRequest(input *GetResourceShareInvitati // * MalformedArnException // The format of an Amazon Resource Name (ARN) is not valid. // +// * UnknownResourceException +// A specified resource was not found. +// // * InvalidNextTokenException // The specified value for NextToken is not valid. // @@ -2051,6 +2057,94 @@ func (c *RAM) ListResourceSharePermissionsWithContext(ctx aws.Context, input *Li return out, req.Send() } +const opListResourceTypes = "ListResourceTypes" + +// ListResourceTypesRequest generates a "aws/request.Request" representing the +// client's request for the ListResourceTypes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResourceTypes for more information on using the ListResourceTypes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResourceTypesRequest method. +// req, resp := client.ListResourceTypesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResourceTypes +func (c *RAM) ListResourceTypesRequest(input *ListResourceTypesInput) (req *request.Request, output *ListResourceTypesOutput) { + op := &request.Operation{ + Name: opListResourceTypes, + HTTPMethod: "POST", + HTTPPath: "/listresourcetypes", + } + + if input == nil { + input = &ListResourceTypesInput{} + } + + output = &ListResourceTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResourceTypes API operation for AWS Resource Access Manager. +// +// Lists the shareable resource types supported by AWS RAM. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation ListResourceTypes for usage and error information. +// +// Returned Error Types: +// * InvalidNextTokenException +// The specified value for NextToken is not valid. +// +// * InvalidParameterException +// A parameter is not valid. +// +// * ServerInternalException +// The service could not respond to the request due to an internal problem. +// +// * ServiceUnavailableException +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResourceTypes +func (c *RAM) ListResourceTypes(input *ListResourceTypesInput) (*ListResourceTypesOutput, error) { + req, out := c.ListResourceTypesRequest(input) + return out, req.Send() +} + +// ListResourceTypesWithContext is the same as ListResourceTypes with the addition of +// the ability to pass a context and additional request options. +// +// See ListResourceTypes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) ListResourceTypesWithContext(ctx aws.Context, input *ListResourceTypesInput, opts ...request.Option) (*ListResourceTypesOutput, error) { + req, out := c.ListResourceTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListResources = "ListResources" // ListResourcesRequest generates a "aws/request.Request" representing the @@ -2288,6 +2382,9 @@ func (c *RAM) PromoteResourceShareCreatedFromPolicyRequest(input *PromoteResourc // * ServiceUnavailableException // The service is not available. // +// * UnknownResourceException +// A specified resource was not found. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy func (c *RAM) PromoteResourceShareCreatedFromPolicy(input *PromoteResourceShareCreatedFromPolicyInput) (*PromoteResourceShareCreatedFromPolicyOutput, error) { req, out := c.PromoteResourceShareCreatedFromPolicyRequest(input) @@ -3971,8 +4068,8 @@ func (s *GetResourceSharesOutput) SetResourceShares(v []*ResourceShare) *GetReso // one of the other input parameters is different from the previous call to // the operation. type IdempotentParameterMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3989,17 +4086,17 @@ func (s IdempotentParameterMismatchException) GoString() string { func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotentParameterMismatchException) Code() string { +func (s *IdempotentParameterMismatchException) Code() string { return "IdempotentParameterMismatchException" } // Message returns the exception's message. -func (s IdempotentParameterMismatchException) Message() string { +func (s *IdempotentParameterMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4007,28 +4104,28 @@ func (s IdempotentParameterMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotentParameterMismatchException) OrigErr() error { +func (s *IdempotentParameterMismatchException) OrigErr() error { return nil } -func (s IdempotentParameterMismatchException) Error() string { +func (s *IdempotentParameterMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotentParameterMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotentParameterMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotentParameterMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotentParameterMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // A client token is not valid. type InvalidClientTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4045,17 +4142,17 @@ func (s InvalidClientTokenException) GoString() string { func newErrorInvalidClientTokenException(v protocol.ResponseMetadata) error { return &InvalidClientTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidClientTokenException) Code() string { +func (s *InvalidClientTokenException) Code() string { return "InvalidClientTokenException" } // Message returns the exception's message. -func (s InvalidClientTokenException) Message() string { +func (s *InvalidClientTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4063,28 +4160,28 @@ func (s InvalidClientTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidClientTokenException) OrigErr() error { +func (s *InvalidClientTokenException) OrigErr() error { return nil } -func (s InvalidClientTokenException) Error() string { +func (s *InvalidClientTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidClientTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidClientTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidClientTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidClientTokenException) RequestID() string { + return s.RespMetadata.RequestID } // The specified value for MaxResults is not valid. type InvalidMaxResultsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4101,17 +4198,17 @@ func (s InvalidMaxResultsException) GoString() string { func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error { return &InvalidMaxResultsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidMaxResultsException) Code() string { +func (s *InvalidMaxResultsException) Code() string { return "InvalidMaxResultsException" } // Message returns the exception's message. -func (s InvalidMaxResultsException) Message() string { +func (s *InvalidMaxResultsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4119,28 +4216,28 @@ func (s InvalidMaxResultsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidMaxResultsException) OrigErr() error { +func (s *InvalidMaxResultsException) OrigErr() error { return nil } -func (s InvalidMaxResultsException) Error() string { +func (s *InvalidMaxResultsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidMaxResultsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidMaxResultsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidMaxResultsException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidMaxResultsException) RequestID() string { + return s.RespMetadata.RequestID } // The specified value for NextToken is not valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4157,17 +4254,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4175,28 +4272,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // A parameter is not valid. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4213,17 +4310,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4231,28 +4328,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource type is not valid. type InvalidResourceTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4269,17 +4366,17 @@ func (s InvalidResourceTypeException) GoString() string { func newErrorInvalidResourceTypeException(v protocol.ResponseMetadata) error { return &InvalidResourceTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceTypeException) Code() string { +func (s *InvalidResourceTypeException) Code() string { return "InvalidResourceTypeException" } // Message returns the exception's message. -func (s InvalidResourceTypeException) Message() string { +func (s *InvalidResourceTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4287,28 +4384,28 @@ func (s InvalidResourceTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceTypeException) OrigErr() error { +func (s *InvalidResourceTypeException) OrigErr() error { return nil } -func (s InvalidResourceTypeException) Error() string { +func (s *InvalidResourceTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The requested state transition is not valid. type InvalidStateTransitionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4325,17 +4422,17 @@ func (s InvalidStateTransitionException) GoString() string { func newErrorInvalidStateTransitionException(v protocol.ResponseMetadata) error { return &InvalidStateTransitionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateTransitionException) Code() string { +func (s *InvalidStateTransitionException) Code() string { return "InvalidStateTransitionException" } // Message returns the exception's message. -func (s InvalidStateTransitionException) Message() string { +func (s *InvalidStateTransitionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4343,22 +4440,22 @@ func (s InvalidStateTransitionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateTransitionException) OrigErr() error { +func (s *InvalidStateTransitionException) OrigErr() error { return nil } -func (s InvalidStateTransitionException) Error() string { +func (s *InvalidStateTransitionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateTransitionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateTransitionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateTransitionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateTransitionException) RequestID() string { + return s.RespMetadata.RequestID } type ListPendingInvitationResourcesInput struct { @@ -4569,9 +4666,11 @@ type ListPrincipalsInput struct { // The resource type. // - // Valid values: ec2:CapacityReservation | ec2:Subnet | ec2:TrafficMirrorTarget - // | ec2:TransitGateway | license-manager:LicenseConfiguration | rds:Cluster - // | route53resolver:ResolverRule I resource-groups:Group + // Valid values: codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation + // | ec2:DedicatedHost | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway + // | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe + // | license-manager:LicenseConfiguration I resource-groups:Group | rds:Cluster + // | route53resolver:ResolverRule ResourceType *string `locationName:"resourceType" type:"string"` } @@ -4769,6 +4868,85 @@ func (s *ListResourceSharePermissionsOutput) SetPermissions(v []*ResourceSharePe return s } +type ListResourceTypesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListResourceTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceTypesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourceTypesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourceTypesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResourceTypesInput) SetMaxResults(v int64) *ListResourceTypesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceTypesInput) SetNextToken(v string) *ListResourceTypesInput { + s.NextToken = &v + return s +} + +type ListResourceTypesOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The shareable resource types supported by AWS RAM. + ResourceTypes []*ServiceNameAndResourceType `locationName:"resourceTypes" type:"list"` +} + +// String returns the string representation +func (s ListResourceTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceTypesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceTypesOutput) SetNextToken(v string) *ListResourceTypesOutput { + s.NextToken = &v + return s +} + +// SetResourceTypes sets the ResourceTypes field's value. +func (s *ListResourceTypesOutput) SetResourceTypes(v []*ServiceNameAndResourceType) *ListResourceTypesOutput { + s.ResourceTypes = v + return s +} + type ListResourcesInput struct { _ struct{} `type:"structure"` @@ -4795,9 +4973,11 @@ type ListResourcesInput struct { // The resource type. // - // Valid values: ec2:CapacityReservation | ec2:Subnet | ec2:TrafficMirrorTarget - // | ec2:TransitGateway | license-manager:LicenseConfiguration | rds:Cluster - // | route53resolver:ResolverRule | resource-groups:Group + // Valid values: codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation + // | ec2:DedicatedHost | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway + // | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe + // | license-manager:LicenseConfiguration I resource-groups:Group | rds:Cluster + // | route53resolver:ResolverRule ResourceType *string `locationName:"resourceType" type:"string"` } @@ -4904,8 +5084,8 @@ func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput { // The format of an Amazon Resource Name (ARN) is not valid. type MalformedArnException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4922,17 +5102,17 @@ func (s MalformedArnException) GoString() string { func newErrorMalformedArnException(v protocol.ResponseMetadata) error { return &MalformedArnException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedArnException) Code() string { +func (s *MalformedArnException) Code() string { return "MalformedArnException" } // Message returns the exception's message. -func (s MalformedArnException) Message() string { +func (s *MalformedArnException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4940,28 +5120,28 @@ func (s MalformedArnException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedArnException) OrigErr() error { +func (s *MalformedArnException) OrigErr() error { return nil } -func (s MalformedArnException) Error() string { +func (s *MalformedArnException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedArnException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedArnException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedArnException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedArnException) RequestID() string { + return s.RespMetadata.RequestID } // A required input parameter is missing. type MissingRequiredParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4978,17 +5158,17 @@ func (s MissingRequiredParameterException) GoString() string { func newErrorMissingRequiredParameterException(v protocol.ResponseMetadata) error { return &MissingRequiredParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MissingRequiredParameterException) Code() string { +func (s *MissingRequiredParameterException) Code() string { return "MissingRequiredParameterException" } // Message returns the exception's message. -func (s MissingRequiredParameterException) Message() string { +func (s *MissingRequiredParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4996,28 +5176,28 @@ func (s MissingRequiredParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MissingRequiredParameterException) OrigErr() error { +func (s *MissingRequiredParameterException) OrigErr() error { return nil } -func (s MissingRequiredParameterException) Error() string { +func (s *MissingRequiredParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MissingRequiredParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MissingRequiredParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MissingRequiredParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *MissingRequiredParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The requested operation is not permitted. type OperationNotPermittedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5034,17 +5214,17 @@ func (s OperationNotPermittedException) GoString() string { func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error { return &OperationNotPermittedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotPermittedException) Code() string { +func (s *OperationNotPermittedException) Code() string { return "OperationNotPermittedException" } // Message returns the exception's message. -func (s OperationNotPermittedException) Message() string { +func (s *OperationNotPermittedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5052,22 +5232,22 @@ func (s OperationNotPermittedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotPermittedException) OrigErr() error { +func (s *OperationNotPermittedException) OrigErr() error { return nil } -func (s OperationNotPermittedException) Error() string { +func (s *OperationNotPermittedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotPermittedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotPermittedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotPermittedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotPermittedException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a principal for use with AWS Resource Access Manager. @@ -5363,8 +5543,8 @@ func (s *Resource) SetType(v string) *Resource { // An Amazon Resource Name (ARN) was not found. type ResourceArnNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5381,17 +5561,17 @@ func (s ResourceArnNotFoundException) GoString() string { func newErrorResourceArnNotFoundException(v protocol.ResponseMetadata) error { return &ResourceArnNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceArnNotFoundException) Code() string { +func (s *ResourceArnNotFoundException) Code() string { return "ResourceArnNotFoundException" } // Message returns the exception's message. -func (s ResourceArnNotFoundException) Message() string { +func (s *ResourceArnNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5399,22 +5579,22 @@ func (s ResourceArnNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceArnNotFoundException) OrigErr() error { +func (s *ResourceArnNotFoundException) OrigErr() error { return nil } -func (s ResourceArnNotFoundException) Error() string { +func (s *ResourceArnNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceArnNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceArnNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceArnNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceArnNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a resource share. @@ -5726,8 +5906,8 @@ func (s *ResourceShareInvitation) SetStatus(v string) *ResourceShareInvitation { // The invitation was already accepted. type ResourceShareInvitationAlreadyAcceptedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5744,17 +5924,17 @@ func (s ResourceShareInvitationAlreadyAcceptedException) GoString() string { func newErrorResourceShareInvitationAlreadyAcceptedException(v protocol.ResponseMetadata) error { return &ResourceShareInvitationAlreadyAcceptedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceShareInvitationAlreadyAcceptedException) Code() string { +func (s *ResourceShareInvitationAlreadyAcceptedException) Code() string { return "ResourceShareInvitationAlreadyAcceptedException" } // Message returns the exception's message. -func (s ResourceShareInvitationAlreadyAcceptedException) Message() string { +func (s *ResourceShareInvitationAlreadyAcceptedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5762,28 +5942,28 @@ func (s ResourceShareInvitationAlreadyAcceptedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceShareInvitationAlreadyAcceptedException) OrigErr() error { +func (s *ResourceShareInvitationAlreadyAcceptedException) OrigErr() error { return nil } -func (s ResourceShareInvitationAlreadyAcceptedException) Error() string { +func (s *ResourceShareInvitationAlreadyAcceptedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceShareInvitationAlreadyAcceptedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceShareInvitationAlreadyAcceptedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceShareInvitationAlreadyAcceptedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceShareInvitationAlreadyAcceptedException) RequestID() string { + return s.RespMetadata.RequestID } // The invitation was already rejected. type ResourceShareInvitationAlreadyRejectedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5800,17 +5980,17 @@ func (s ResourceShareInvitationAlreadyRejectedException) GoString() string { func newErrorResourceShareInvitationAlreadyRejectedException(v protocol.ResponseMetadata) error { return &ResourceShareInvitationAlreadyRejectedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceShareInvitationAlreadyRejectedException) Code() string { +func (s *ResourceShareInvitationAlreadyRejectedException) Code() string { return "ResourceShareInvitationAlreadyRejectedException" } // Message returns the exception's message. -func (s ResourceShareInvitationAlreadyRejectedException) Message() string { +func (s *ResourceShareInvitationAlreadyRejectedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5818,28 +5998,28 @@ func (s ResourceShareInvitationAlreadyRejectedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceShareInvitationAlreadyRejectedException) OrigErr() error { +func (s *ResourceShareInvitationAlreadyRejectedException) OrigErr() error { return nil } -func (s ResourceShareInvitationAlreadyRejectedException) Error() string { +func (s *ResourceShareInvitationAlreadyRejectedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceShareInvitationAlreadyRejectedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceShareInvitationAlreadyRejectedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceShareInvitationAlreadyRejectedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceShareInvitationAlreadyRejectedException) RequestID() string { + return s.RespMetadata.RequestID } // The Amazon Resource Name (ARN) for an invitation was not found. type ResourceShareInvitationArnNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5856,17 +6036,17 @@ func (s ResourceShareInvitationArnNotFoundException) GoString() string { func newErrorResourceShareInvitationArnNotFoundException(v protocol.ResponseMetadata) error { return &ResourceShareInvitationArnNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceShareInvitationArnNotFoundException) Code() string { +func (s *ResourceShareInvitationArnNotFoundException) Code() string { return "ResourceShareInvitationArnNotFoundException" } // Message returns the exception's message. -func (s ResourceShareInvitationArnNotFoundException) Message() string { +func (s *ResourceShareInvitationArnNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5874,28 +6054,28 @@ func (s ResourceShareInvitationArnNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceShareInvitationArnNotFoundException) OrigErr() error { +func (s *ResourceShareInvitationArnNotFoundException) OrigErr() error { return nil } -func (s ResourceShareInvitationArnNotFoundException) Error() string { +func (s *ResourceShareInvitationArnNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceShareInvitationArnNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceShareInvitationArnNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceShareInvitationArnNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceShareInvitationArnNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The invitation is expired. type ResourceShareInvitationExpiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5912,17 +6092,17 @@ func (s ResourceShareInvitationExpiredException) GoString() string { func newErrorResourceShareInvitationExpiredException(v protocol.ResponseMetadata) error { return &ResourceShareInvitationExpiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceShareInvitationExpiredException) Code() string { +func (s *ResourceShareInvitationExpiredException) Code() string { return "ResourceShareInvitationExpiredException" } // Message returns the exception's message. -func (s ResourceShareInvitationExpiredException) Message() string { +func (s *ResourceShareInvitationExpiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5930,28 +6110,28 @@ func (s ResourceShareInvitationExpiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceShareInvitationExpiredException) OrigErr() error { +func (s *ResourceShareInvitationExpiredException) OrigErr() error { return nil } -func (s ResourceShareInvitationExpiredException) Error() string { +func (s *ResourceShareInvitationExpiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceShareInvitationExpiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceShareInvitationExpiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceShareInvitationExpiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceShareInvitationExpiredException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource share exceeds the limit for your account. type ResourceShareLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5968,17 +6148,17 @@ func (s ResourceShareLimitExceededException) GoString() string { func newErrorResourceShareLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceShareLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceShareLimitExceededException) Code() string { +func (s *ResourceShareLimitExceededException) Code() string { return "ResourceShareLimitExceededException" } // Message returns the exception's message. -func (s ResourceShareLimitExceededException) Message() string { +func (s *ResourceShareLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5986,22 +6166,22 @@ func (s ResourceShareLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceShareLimitExceededException) OrigErr() error { +func (s *ResourceShareLimitExceededException) OrigErr() error { return nil } -func (s ResourceShareLimitExceededException) Error() string { +func (s *ResourceShareLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceShareLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceShareLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceShareLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceShareLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Information about an AWS RAM permission. @@ -6184,8 +6364,8 @@ func (s *ResourceSharePermissionSummary) SetVersion(v string) *ResourceSharePerm // The service could not respond to the request due to an internal problem. type ServerInternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6202,17 +6382,17 @@ func (s ServerInternalException) GoString() string { func newErrorServerInternalException(v protocol.ResponseMetadata) error { return &ServerInternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServerInternalException) Code() string { +func (s *ServerInternalException) Code() string { return "ServerInternalException" } // Message returns the exception's message. -func (s ServerInternalException) Message() string { +func (s *ServerInternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6220,28 +6400,62 @@ func (s ServerInternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServerInternalException) OrigErr() error { +func (s *ServerInternalException) OrigErr() error { return nil } -func (s ServerInternalException) Error() string { +func (s *ServerInternalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServerInternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServerInternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServerInternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServerInternalException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Information about the shareable resource types and the AWS services to which +// they belong. +type ServiceNameAndResourceType struct { + _ struct{} `type:"structure"` + + // The shareable resource types. + ResourceType *string `locationName:"resourceType" type:"string"` + + // The name of the AWS services to which the resources belong. + ServiceName *string `locationName:"serviceName" type:"string"` +} + +// String returns the string representation +func (s ServiceNameAndResourceType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceNameAndResourceType) GoString() string { + return s.String() +} + +// SetResourceType sets the ResourceType field's value. +func (s *ServiceNameAndResourceType) SetResourceType(v string) *ServiceNameAndResourceType { + s.ResourceType = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *ServiceNameAndResourceType) SetServiceName(v string) *ServiceNameAndResourceType { + s.ServiceName = &v + return s } // The service is not available. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6258,17 +6472,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6276,22 +6490,22 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a tag. @@ -6362,8 +6576,8 @@ func (s *TagFilter) SetTagValues(v []*string) *TagFilter { // The requested tags exceed the limit for your account. type TagLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6380,17 +6594,17 @@ func (s TagLimitExceededException) GoString() string { func newErrorTagLimitExceededException(v protocol.ResponseMetadata) error { return &TagLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagLimitExceededException) Code() string { +func (s *TagLimitExceededException) Code() string { return "TagLimitExceededException" } // Message returns the exception's message. -func (s TagLimitExceededException) Message() string { +func (s *TagLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6398,28 +6612,28 @@ func (s TagLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagLimitExceededException) OrigErr() error { +func (s *TagLimitExceededException) OrigErr() error { return nil } -func (s TagLimitExceededException) Error() string { +func (s *TagLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified tag is a reserved word and cannot be used. type TagPolicyViolationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6436,17 +6650,17 @@ func (s TagPolicyViolationException) GoString() string { func newErrorTagPolicyViolationException(v protocol.ResponseMetadata) error { return &TagPolicyViolationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagPolicyViolationException) Code() string { +func (s *TagPolicyViolationException) Code() string { return "TagPolicyViolationException" } // Message returns the exception's message. -func (s TagPolicyViolationException) Message() string { +func (s *TagPolicyViolationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6454,22 +6668,22 @@ func (s TagPolicyViolationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagPolicyViolationException) OrigErr() error { +func (s *TagPolicyViolationException) OrigErr() error { return nil } -func (s TagPolicyViolationException) Error() string { +func (s *TagPolicyViolationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagPolicyViolationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagPolicyViolationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagPolicyViolationException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagPolicyViolationException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -6540,8 +6754,8 @@ func (s TagResourceOutput) GoString() string { // A specified resource was not found. type UnknownResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6558,17 +6772,17 @@ func (s UnknownResourceException) GoString() string { func newErrorUnknownResourceException(v protocol.ResponseMetadata) error { return &UnknownResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnknownResourceException) Code() string { +func (s *UnknownResourceException) Code() string { return "UnknownResourceException" } // Message returns the exception's message. -func (s UnknownResourceException) Message() string { +func (s *UnknownResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6576,22 +6790,22 @@ func (s UnknownResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnknownResourceException) OrigErr() error { +func (s *UnknownResourceException) OrigErr() error { return nil } -func (s UnknownResourceException) Error() string { +func (s *UnknownResourceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnknownResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnknownResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnknownResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnknownResourceException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 b9c5f9c6beb..2866909945c 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 @@ -347,11 +347,19 @@ func (c *RDS) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. // +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" // DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // -// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier doesn't refer to an existing DB cluster. +// * ErrCodeDBProxyNotFoundFault "DBProxyNotFoundFault" +// The specified proxy name doesn't correspond to a proxy owned by your AWS +// accoutn in the specified AWS Region. +// +// * ErrCodeDBProxyTargetGroupNotFoundFault "DBProxyTargetGroupNotFoundFault" +// The specified target group isn't available for a proxy owned by your AWS +// account in the specified AWS Region. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource func (c *RDS) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { @@ -1384,7 +1392,7 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // Creates a new Amazon Aurora DB cluster. // // You can use the ReplicationSourceIdentifier parameter to create the DB cluster -// as a Read Replica of another DB cluster or Amazon RDS MySQL DB instance. +// as a read replica of another DB cluster or Amazon RDS MySQL DB instance. // For cross-region replication where the DB cluster identified by ReplicationSourceIdentifier // is encrypted, you must also specify the PreSignedUrl parameter. // @@ -1972,18 +1980,18 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // CreateDBInstanceReadReplica API operation for Amazon Relational Database Service. // -// Creates a new DB instance that acts as a Read Replica for an existing source -// DB instance. You can create a Read Replica for a DB instance running MySQL, -// MariaDB, Oracle, or PostgreSQL. For more information, see Working with Read -// Replicas (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) +// Creates a new DB instance that acts as a read replica for an existing source +// DB instance. You can create a read replica for a DB instance running MySQL, +// MariaDB, Oracle, PostgreSQL, or SQL Server. For more information, see Working +// with Read Replicas (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) // in the Amazon RDS User Guide. // -// Amazon Aurora doesn't support this action. You must call the CreateDBInstance -// action to create a DB instance for an Aurora DB cluster. +// Amazon Aurora doesn't support this action. Call the CreateDBInstance action +// to create a DB instance for an Aurora DB cluster. // -// All Read Replica DB instances are created with backups disabled. All other +// All read replica DB instances are created with backups disabled. All other // DB instance attributes (including DB security groups and DB parameter groups) -// are inherited from the source DB instance, except as specified following. +// are inherited from the source DB instance, except as specified. // // Your source DB instance must have backup retention enabled. // @@ -3365,12 +3373,12 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // If the specified DB instance is part of an Amazon Aurora DB cluster, you // can't delete the DB instance if both of the following conditions are true: // -// * The DB cluster is a Read Replica of another Amazon Aurora DB cluster. +// * The DB cluster is a read replica of another Amazon Aurora DB cluster. // // * The DB instance is the only instance in the DB cluster. // // To delete a DB instance in this case, first call the PromoteReadReplicaDBCluster -// API action to promote the DB cluster so it's no longer a Read Replica. After +// API action to promote the DB cluster so it's no longer a read replica. After // the promotion completes, then call the DeleteDBInstance API action to delete // the final instance in the DB cluster. // @@ -8890,7 +8898,7 @@ func (c *RDS) DescribeSourceRegionsRequest(input *DescribeSourceRegionsInput) (r // DescribeSourceRegions API operation for Amazon Relational Database Service. // // Returns a list of the source AWS Regions where the current AWS Region can -// create a Read Replica or copy a DB snapshot from. This API action supports +// create a read replica or copy a DB snapshot from. This API action supports // pagination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -9396,6 +9404,14 @@ func (c *RDS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req * // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" // DBClusterIdentifier doesn't refer to an existing DB cluster. // +// * ErrCodeDBProxyNotFoundFault "DBProxyNotFoundFault" +// The specified proxy name doesn't correspond to a proxy owned by your AWS +// accoutn in the specified AWS Region. +// +// * ErrCodeDBProxyTargetGroupNotFoundFault "DBProxyTargetGroupNotFoundFault" +// The specified target group isn't available for a proxy owned by your AWS +// account in the specified AWS Region. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ListTagsForResource func (c *RDS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) @@ -10525,8 +10541,8 @@ func (c *RDS) ModifyDBSnapshotRequest(input *ModifyDBSnapshotInput) (req *reques // ModifyDBSnapshot API operation for Amazon Relational Database Service. // -// Updates a manual DB snapshot, which can be encrypted or not encrypted, with -// a new engine version. +// Updates a manual DB snapshot with a new engine version. The snapshot can +// be encrypted or unencrypted, but not shared or public. // // Amazon RDS supports upgrading DB snapshots for MySQL, Oracle, and PostgreSQL. // @@ -11074,15 +11090,15 @@ func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *re // PromoteReadReplica API operation for Amazon Relational Database Service. // -// Promotes a Read Replica DB instance to a standalone DB instance. +// Promotes a read replica DB instance to a standalone DB instance. // // * Backup duration is a function of the amount of changes to the database -// since the previous backup. If you plan to promote a Read Replica to a +// since the previous backup. If you plan to promote a read replica to a // standalone instance, we recommend that you enable backups and complete -// at least one backup prior to promotion. In addition, a Read Replica cannot +// at least one backup prior to promotion. In addition, a read replica cannot // be promoted to a standalone instance when it is in the backing-up status. -// If you have enabled backups on your Read Replica, configure the automated -// backup window so that daily backups do not interfere with Read Replica +// If you have enabled backups on your read replica, configure the automated +// backup window so that daily backups do not interfere with read replica // promotion. // // * This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. @@ -11167,7 +11183,7 @@ func (c *RDS) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClus // PromoteReadReplicaDBCluster API operation for Amazon Relational Database Service. // -// Promotes a Read Replica DB cluster to a standalone DB cluster. +// Promotes a read replica DB cluster to a standalone DB cluster. // // This action only applies to Aurora DB clusters. // @@ -11909,6 +11925,14 @@ func (c *RDS) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" // DBClusterIdentifier doesn't refer to an existing DB cluster. // +// * ErrCodeDBProxyNotFoundFault "DBProxyNotFoundFault" +// The specified proxy name doesn't correspond to a proxy owned by your AWS +// accoutn in the specified AWS Region. +// +// * ErrCodeDBProxyTargetGroupNotFoundFault "DBProxyTargetGroupNotFoundFault" +// The specified target group isn't available for a proxy owned by your AWS +// account in the specified AWS Region. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource func (c *RDS) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { req, out := c.RemoveTagsFromResourceRequest(input) @@ -12169,6 +12193,15 @@ func (c *RDS) RestoreDBClusterFromS3Request(input *RestoreDBClusterFromS3Input) // Data to an Amazon Aurora MySQL DB Cluster (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Migrating.html) // in the Amazon Aurora User Guide. // +// This action only restores the DB cluster, not the DB instances for that DB +// cluster. You must invoke the CreateDBInstance action to create DB instances +// for the restored DB cluster, specifying the identifier of the restored DB +// cluster in DBClusterIdentifier. You can create DB instances only after the +// RestoreDBClusterFromS3 action has completed and the DB cluster is available. +// +// For more information on Amazon Aurora, see What Is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. +// // This action only applies to Aurora DB clusters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -12296,16 +12329,19 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // RestoreDBClusterFromSnapshot API operation for Amazon Relational Database Service. // -// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. +// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. This +// action only applies to Aurora DB clusters. // -// If a DB snapshot is specified, the target DB cluster is created from the -// source DB snapshot with a default configuration and default security group. -// -// If a DB cluster snapshot is specified, the target DB cluster is created from -// the source DB cluster restore point with the same configuration as the original -// source DB cluster. If you don't specify a security group, the new DB cluster +// The target DB cluster is created from the source snapshot with a default +// configuration. If you don't specify a security group, the new DB cluster // is associated with the default security group. // +// This action only restores the DB cluster, not the DB instances for that DB +// cluster. You must invoke the CreateDBInstance action to create DB instances +// for the restored DB cluster, specifying the identifier of the restored DB +// cluster in DBClusterIdentifier. You can create DB instances only after the +// RestoreDBClusterFromSnapshot action has completed and the DB cluster is available. +// // For more information on Amazon Aurora, see What Is Amazon Aurora? (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. // @@ -13892,10 +13928,10 @@ func (c *RDS) StopDBInstanceWithContext(ctx aws.Context, input *StopDBInstanceIn // default option groups. The used value is the count of nondefault DB option // groups in the account. // -// * ReadReplicasPerMaster - The number of Read Replicas per DB instance. -// The used value is the highest number of Read Replicas for a DB instance +// * ReadReplicasPerMaster - The number of read replicas per DB instance. +// The used value is the highest number of read replicas for a DB instance // in the account. Other DB instances in the account might have a lower number -// of Read Replicas. +// of read replicas. // // * ReservedDBInstances - The number of reserved DB instances per account. // The used value is the count of the active reserved DB instances in the @@ -14782,16 +14818,16 @@ type CancelExportTaskOutput struct { // The data exported from the snapshot. Valid values are the following: // - // * database - Export all the data of the snapshot. + // * database - Export all the data from a specified database. // - // * database.table [table-name] - Export a table of the snapshot. + // * database.table table-name - Export a table of the snapshot. This format + // is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL. // - // * database.schema [schema-name] - Export a database schema of the snapshot. - // This value isn't valid for RDS for MySQL, RDS for MariaDB, or Aurora MySQL. + // * database.schema schema-name - Export a database schema of the snapshot. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. // - // * database.schema.table [table-name] - Export a table of the database - // schema. This value isn't valid for RDS for MySQL, RDS for MariaDB, or - // Aurora MySQL. + // * database.schema.table table-name - Export a table of the database schema. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. ExportOnly []*string `type:"list"` // A unique identifier for the snapshot export task. This ID isn't an identifier @@ -15129,6 +15165,8 @@ type ConnectionPoolConfiguration struct { // statements, use semicolons as the separator. You can also include multiple // variables in a single SET statement, such as SET x=1, y=2. // + // InitQuery is not currently supported for PostgreSQL. + // // Default: no initialization query InitQuery *string `type:"string"` @@ -15222,6 +15260,8 @@ type ConnectionPoolConfigurationInfo struct { // is empty by default. For multiple statements, use semicolons as the separator. // You can also include multiple variables in a single SET statement, such as // SET x=1, y=2. + // + // InitQuery is not currently supported for PostgreSQL. InitQuery *string `type:"string"` // The maximum size of the connection pool for each target in a target group. @@ -15451,7 +15491,7 @@ type CopyDBClusterSnapshotInput struct { // DB cluster snapshot from another AWS Region. Don't specify PreSignedUrl when // you are copying an encrypted DB cluster snapshot in the same AWS Region. // - // The pre-signed URL must be a valid request for the CopyDBSClusterSnapshot + // The pre-signed URL must be a valid request for the CopyDBClusterSnapshot // API action that can be executed in the source AWS Region that contains the // encrypted DB cluster snapshot to be copied. The pre-signed URL request must // contain the following parameter values: @@ -16525,7 +16565,7 @@ type CreateDBClusterInput struct { // // For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication // to authenticate users that connect to the DB cluster. For more information, - // see Using Kerberos Authentication for Aurora MySQL (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurmysql-kerberos.html) + // see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) // in the Amazon Aurora User Guide. Domain *string `type:"string"` @@ -16568,6 +16608,10 @@ type CreateDBClusterInput struct { // The DB engine mode of the DB cluster, either provisioned, serverless, parallelquery, // global, or multimaster. // + // global engine mode only applies for global database clusters created with + // Aurora MySQL version 5.6.10a. For higher Aurora MySQL versions, the clusters + // in a global database use provisioned engine mode. + // // Limitations and requirements apply to some DB engine modes. For more information, // see the following sections in the Amazon Aurora User Guide: // @@ -16629,9 +16673,9 @@ type CreateDBClusterInput struct { // AWS KMS creates the default encryption key for your AWS account. Your AWS // account has a different default encryption key for each AWS Region. // - // If you create a Read Replica of an encrypted DB cluster in another AWS Region, + // If you create a read replica of an encrypted DB cluster in another AWS Region, // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS - // Region. This key is used to encrypt the Read Replica in that AWS Region. + // Region. This key is used to encrypt the read replica in that AWS Region. KmsKeyId *string `type:"string"` // The password for the master database user. This password can contain any @@ -16680,7 +16724,7 @@ type CreateDBClusterInput struct { // called in the destination AWS Region, and the action contained in the // pre-signed URL. // - // * DestinationRegion - The name of the AWS Region that Aurora Read Replica + // * DestinationRegion - The name of the AWS Region that Aurora read replica // will be created in. // // * ReplicationSourceIdentifier - The DB cluster identifier for the encrypted @@ -16735,7 +16779,7 @@ type CreateDBClusterInput struct { PreferredMaintenanceWindow *string `type:"string"` // The Amazon Resource Name (ARN) of the source DB instance or DB cluster if - // this DB cluster is created as a Read Replica. + // this DB cluster is created as a read replica. ReplicationSourceIdentifier *string `type:"string"` // For DB clusters in serverless DB engine mode, the scaling properties of the @@ -17347,7 +17391,7 @@ type CreateDBInstanceInput struct { // // * Must be a value from 0 to 35 // - // * Can't be set to 0 if the DB instance is a source to Read Replicas + // * Can't be set to 0 if the DB instance is a source to read replicas BackupRetentionPeriod *int64 `type:"integer"` // For supported engines, indicates that the DB instance should be associated @@ -17510,7 +17554,7 @@ type CreateDBInstanceInput struct { // SQL Server (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_SQLServerWinAuth.html) // in the Amazon RDS User Guide. // - // For Oracle DB instance, Amazon RDS can use Kerberos Authentication to authenticate + // For Oracle DB instances, Amazon RDS can use Kerberos Authentication to authenticate // users that connect to the DB instance. For more information, see Using Kerberos // Authentication with Amazon RDS for Oracle (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-kerberos.html) // in the Amazon RDS User Guide. @@ -17824,7 +17868,7 @@ type CreateDBInstanceInput struct { // // Default: 3306 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // Type: Integer // @@ -17832,7 +17876,7 @@ type CreateDBInstanceInput struct { // // Default: 3306 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // Type: Integer // @@ -17840,7 +17884,7 @@ type CreateDBInstanceInput struct { // // Default: 5432 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // Type: Integer // @@ -17848,20 +17892,20 @@ type CreateDBInstanceInput struct { // // Default: 1521 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // SQL Server // // Default: 1433 // - // Valid Values: 1150-65535 except for 1434, 3389, 47001, 49152, and 49152 through - // 49156. + // Valid values: 1150-65535 except 1234, 1434, 3260, 3343, 3389, 47001, and + // 49152-49156. // // Amazon Aurora // // Default: 3306 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // Type: Integer Port *int64 `type:"integer"` @@ -18324,12 +18368,12 @@ type CreateDBInstanceReadReplicaInput struct { _ struct{} `type:"structure"` // A value that indicates whether minor engine upgrades are applied automatically - // to the Read Replica during the maintenance window. + // to the read replica during the maintenance window. // // Default: Inherits from the source DB instance AutoMinorVersionUpgrade *bool `type:"boolean"` - // The Availability Zone (AZ) where the Read Replica will be created. + // The Availability Zone (AZ) where the read replica will be created. // // Default: A random, system-chosen Availability Zone in the endpoint's AWS // Region. @@ -18337,11 +18381,11 @@ type CreateDBInstanceReadReplicaInput struct { // Example: us-east-1d AvailabilityZone *string `type:"string"` - // A value that indicates whether to copy all tags from the Read Replica to - // snapshots of the Read Replica. By default, tags are not copied. + // A value that indicates whether to copy all tags from the read replica to + // snapshots of the read replica. By default, tags are not copied. CopyTagsToSnapshot *bool `type:"boolean"` - // The compute and memory capacity of the Read Replica, for example, db.m4.large. + // The compute and memory capacity of the read replica, for example, db.m4.large. // Not all DB instance classes are available in all AWS Regions, or for all // database engines. For the full list of DB instance classes, and availability // for your engine, see DB Instance Class (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) @@ -18350,7 +18394,7 @@ type CreateDBInstanceReadReplicaInput struct { // Default: Inherits from the source DB instance. DBInstanceClass *string `type:"string"` - // The DB instance identifier of the Read Replica. This identifier is the unique + // The DB instance identifier of the read replica. This identifier is the unique // key that identifies a DB instance. This parameter is stored as a lowercase // string. // @@ -18360,9 +18404,9 @@ type CreateDBInstanceReadReplicaInput struct { // The name of the DB parameter group to associate with this DB instance. // // If you do not specify a value for DBParameterGroupName, then Amazon RDS uses - // the DBParameterGroup of source DB instance for a same region Read Replica, + // the DBParameterGroup of source DB instance for a same region read replica, // or the default DBParameterGroup for the specified DB engine for a cross region - // Read Replica. + // read replica. // // Currently, specifying a parameter group for this operation is only supported // for Oracle DB instances. @@ -18390,10 +18434,10 @@ type CreateDBInstanceReadReplicaInput struct { // * The specified DB subnet group must be in the same AWS Region in which // the operation is running. // - // * All Read Replicas in one AWS Region that are created from the same source + // * All read replicas in one AWS Region that are created from the same source // DB instance must either:> Specify DB subnet groups from the same VPC. - // All these Read Replicas are created in the same VPC. Not specify a DB - // subnet group. All these Read Replicas are created outside of any VPC. + // All these read replicas are created in the same VPC. Not specify a DB + // subnet group. All these read replicas are created outside of any VPC. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -18413,6 +18457,12 @@ type CreateDBInstanceReadReplicaInput struct { // users that connect to the DB instance. For more information, see Using Kerberos // Authentication with Amazon RDS for Oracle (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-kerberos.html) // in the Amazon RDS User Guide. + // + // For Microsoft SQL Server DB instances, Amazon RDS can use Windows Authentication + // to authenticate users that connect to the DB instance. For more information, + // see Using Windows Authentication with an Amazon RDS DB Instance Running Microsoft + // SQL Server (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_SQLServerWinAuth.html) + // in the Amazon RDS User Guide. Domain *string `type:"string"` // Specify the name of the IAM role to be used when making API calls to the @@ -18434,8 +18484,8 @@ type CreateDBInstanceReadReplicaInput struct { // in the Amazon RDS User Guide. EnableIAMDatabaseAuthentication *bool `type:"boolean"` - // A value that indicates whether to enable Performance Insights for the Read - // Replica. + // A value that indicates whether to enable Performance Insights for the read + // replica. // // For more information, see Using Amazon Performance Insights (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) // in the Amazon RDS User Guide. @@ -18445,24 +18495,24 @@ type CreateDBInstanceReadReplicaInput struct { // initially allocated for the DB instance. Iops *int64 `type:"integer"` - // The AWS KMS key ID for an encrypted Read Replica. The KMS key ID is the Amazon + // The AWS KMS key ID for an encrypted read replica. The KMS key ID is the Amazon // Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS // encryption key. // - // If you create an encrypted Read Replica in the same AWS Region as the source + // If you create an encrypted read replica in the same AWS Region as the source // DB instance, then you do not have to specify a value for this parameter. - // The Read Replica is encrypted with the same KMS key as the source DB instance. + // The read replica is encrypted with the same KMS key as the source DB instance. // - // If you create an encrypted Read Replica in a different AWS Region, then you + // If you create an encrypted read replica in a different AWS Region, then you // must specify a KMS key for the destination AWS Region. KMS encryption keys // are specific to the AWS Region that they are created in, and you can't use // encryption keys from one AWS Region in another AWS Region. // - // You can't create an encrypted Read Replica from an unencrypted DB instance. + // You can't create an encrypted read replica from an unencrypted DB instance. KmsKeyId *string `type:"string"` // The interval, in seconds, between points when Enhanced Monitoring metrics - // are collected for the Read Replica. To disable collecting Enhanced Monitoring + // are collected for the read replica. To disable collecting Enhanced Monitoring // metrics, specify 0. The default is 0. // // If MonitoringRoleArn is specified, then you must also set MonitoringInterval @@ -18481,16 +18531,19 @@ type CreateDBInstanceReadReplicaInput struct { // a MonitoringRoleArn value. MonitoringRoleArn *string `type:"string"` - // A value that indicates whether the Read Replica is in a Multi-AZ deployment. + // A value that indicates whether the read replica is in a Multi-AZ deployment. // - // You can create a Read Replica as a Multi-AZ DB instance. RDS creates a standby + // You can create a read replica as a Multi-AZ DB instance. RDS creates a standby // of your replica in another Availability Zone for failover support for the - // replica. Creating your Read Replica as a Multi-AZ DB instance is independent + // replica. Creating your read replica as a Multi-AZ DB instance is independent // of whether the source database is a Multi-AZ DB instance. MultiAZ *bool `type:"boolean"` // The option group the DB instance is associated with. If omitted, the option // group associated with the source instance is used. + // + // For SQL Server, you must use the option group associated with the source + // instance. OptionGroupName *string `type:"string"` // The AWS KMS key identifier for encryption of Performance Insights data. The @@ -18517,16 +18570,16 @@ type CreateDBInstanceReadReplicaInput struct { // The URL that contains a Signature Version 4 signed request for the CreateDBInstanceReadReplica // API action in the source AWS Region that contains the source DB instance. // - // You must specify this parameter when you create an encrypted Read Replica + // You must specify this parameter when you create an encrypted read replica // from another AWS Region by using the Amazon RDS API. Don't specify PreSignedUrl - // when you are creating an encrypted Read Replica in the same AWS Region. + // when you are creating an encrypted read replica in the same AWS Region. // // The presigned URL must be a valid request for the CreateDBInstanceReadReplica // API action that can be executed in the source AWS Region that contains the // encrypted source DB instance. The presigned URL request must contain the // following parameter values: // - // * DestinationRegion - The AWS Region that the encrypted Read Replica is + // * DestinationRegion - The AWS Region that the encrypted read replica is // created in. This AWS Region is the same one where the CreateDBInstanceReadReplica // action is called that contains this presigned URL. For example, if you // create an encrypted DB instance in the us-west-1 AWS Region, from a source @@ -18537,14 +18590,14 @@ type CreateDBInstanceReadReplicaInput struct { // be set to the us-east-1 AWS Region. // // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt - // the Read Replica in the destination AWS Region. This is the same identifier + // the read replica in the destination AWS Region. This is the same identifier // for both the CreateDBInstanceReadReplica action that is called in the // destination AWS Region, and the action contained in the presigned URL. // // * SourceDBInstanceIdentifier - The DB instance identifier for the encrypted // DB instance to be replicated. This identifier must be in the Amazon Resource // Name (ARN) format for the source AWS Region. For example, if you are creating - // an encrypted Read Replica from a DB instance in the us-west-2 AWS Region, + // an encrypted read replica from a DB instance in the us-west-2 AWS Region, // then your SourceDBInstanceIdentifier looks like the following example: // arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115. // @@ -18554,8 +18607,11 @@ type CreateDBInstanceReadReplicaInput struct { // // If you are using an AWS SDK tool or the AWS CLI, you can specify SourceRegion // (or --source-region for the AWS CLI) instead of specifying PreSignedUrl manually. - // Specifying SourceRegion autogenerates a pre-signed URL that is a valid request + // Specifying SourceRegion autogenerates a presigned URL that is a valid request // for the operation that can be executed in the source AWS Region. + // + // SourceRegion isn't supported for SQL Server, because SQL Server on Amazon + // RDS doesn't support cross-region read replicas. PreSignedUrl *string `type:"string"` // The number of CPU cores and the number of threads per core for the DB instance @@ -18570,35 +18626,39 @@ type CreateDBInstanceReadReplicaInput struct { // see CreateDBInstance. PubliclyAccessible *bool `type:"boolean"` - // The identifier of the DB instance that will act as the source for the Read - // Replica. Each DB instance can have up to five Read Replicas. + // The identifier of the DB instance that will act as the source for the read + // replica. Each DB instance can have up to five read replicas. // // Constraints: // - // * Must be the identifier of an existing MySQL, MariaDB, Oracle, or PostgreSQL - // DB instance. + // * Must be the identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, + // or SQL Server DB instance. // - // * Can specify a DB instance that is a MySQL Read Replica only if the source + // * Can specify a DB instance that is a MySQL read replica only if the source // is running MySQL 5.6 or later. // - // * For the limitations of Oracle Read Replicas, see Read Replica Limitations + // * For the limitations of Oracle read replicas, see Read Replica Limitations // with Oracle (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html) // in the Amazon RDS User Guide. // - // * Can specify a DB instance that is a PostgreSQL DB instance only if the - // source is running PostgreSQL 9.3.5 or later (9.4.7 and higher for cross-region - // replication). + // * For the limitations of SQL Server read replicas, see Read Replica Limitations + // with Microsoft SQL Server (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.Limitations.html) + // in the Amazon RDS User Guide. + // + // * Can specify a PostgreSQL DB instance only if the source is running PostgreSQL + // 9.3.5 or later (9.4.7 and higher for cross-region replication). // - // * The specified DB instance must have automatic backups enabled, its backup - // retention period must be greater than 0. + // * The specified DB instance must have automatic backups enabled, that + // is, its backup retention period must be greater than 0. // - // * If the source DB instance is in the same AWS Region as the Read Replica, + // * If the source DB instance is in the same AWS Region as the read replica, // specify a valid DB instance identifier. // - // * If the source DB instance is in a different AWS Region than the Read - // Replica, specify a valid DB instance ARN. For more information, go to - // Constructing an ARN for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) - // in the Amazon RDS User Guide. + // * If the source DB instance is in a different AWS Region from the read + // replica, specify a valid DB instance ARN. For more information, see Constructing + // an ARN for Amazon RDS (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) + // in the Amazon RDS User Guide. This doesn't apply to SQL Server, which + // doesn't support cross-region replicas. // // SourceDBInstanceIdentifier is a required field SourceDBInstanceIdentifier *string `type:"string" required:"true"` @@ -18608,7 +18668,7 @@ type CreateDBInstanceReadReplicaInput struct { // have the same region as the source ARN. SourceRegion *string `type:"string" ignore:"true"` - // Specifies the storage type to be associated with the Read Replica. + // Specifies the storage type to be associated with the read replica. // // Valid values: standard | gp2 | io1 // @@ -18625,7 +18685,7 @@ type CreateDBInstanceReadReplicaInput struct { // its default processor features. UseDefaultProcessorFeatures *bool `type:"boolean"` - // A list of EC2 VPC security groups to associate with the Read Replica. + // A list of EC2 VPC security groups to associate with the read replica. // // Default: The default EC2 VPC security group for the DB subnet group's VPC. VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` @@ -19022,8 +19082,8 @@ type CreateDBProxyInput struct { // The kinds of databases that the proxy can connect to. This value determines // which database network protocol the proxy recognizes when it interprets network - // traffic to and from the database. Currently, this value is always MYSQL. - // The engine family applies to both RDS MySQL and Aurora MySQL. + // traffic to and from the database. The engine family applies to MySQL and + // PostgreSQL for both RDS and Aurora. // // EngineFamily is a required field EngineFamily *string `type:"string" required:"true" enum:"EngineFamily"` @@ -20063,6 +20123,12 @@ type DBCluster struct { // The DB engine mode of the DB cluster, either provisioned, serverless, parallelquery, // global, or multimaster. + // + // global engine mode only applies for global database clusters created with + // Aurora MySQL version 5.6.10a. For higher Aurora MySQL versions, the clusters + // in a global database use provisioned engine mode. To check if a DB cluster + // is part of a global database, use DescribeGlobalClusters instead of checking + // the EngineMode return value from DescribeDBClusters. EngineMode *string `type:"string"` // Indicates the database engine version. @@ -20114,7 +20180,7 @@ type DBCluster struct { // in Universal Coordinated Time (UTC). PreferredMaintenanceWindow *string `type:"string"` - // Contains one or more identifiers of the Read Replicas associated with this + // Contains one or more identifiers of the read replicas associated with this // DB cluster. ReadReplicaIdentifiers []*string `locationNameList:"ReadReplicaIdentifier" type:"list"` @@ -20132,7 +20198,7 @@ type DBCluster struct { ReaderEndpoint *string `type:"string"` // Contains the identifier of the source DB cluster if this DB cluster is a - // Read Replica. + // read replica. ReplicationSourceIdentifier *string `type:"string"` // Shows the scaling configuration for an Aurora DB cluster in serverless DB @@ -21159,6 +21225,10 @@ type DBEngineVersion struct { SupportedCharacterSets []*CharacterSet `locationNameList:"CharacterSet" type:"list"` // A list of the supported DB engine modes. + // + // global engine mode only applies for global database clusters created with + // Aurora MySQL version 5.6.10a. For higher Aurora MySQL versions, the clusters + // in a global database use provisioned engine mode. SupportedEngineModes []*string `type:"list"` // A list of features supported by the DB engine. Supported feature names include @@ -21175,7 +21245,7 @@ type DBEngineVersion struct { // log types specified by ExportableLogTypes to CloudWatch Logs. SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"` - // Indicates whether the database engine version supports Read Replicas. + // Indicates whether the database engine version supports read replicas. SupportsReadReplica *bool `type:"boolean"` // A list of engine versions that this database engine version can be upgraded @@ -21337,6 +21407,9 @@ type DBInstance struct { DBInstanceIdentifier *string `type:"string"` // Specifies the current state of this database. + // + // For information about DB instance statuses, see DB Instance Status (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Status.html) + // in the Amazon RDS User Guide. DBInstanceStatus *string `type:"string"` // The meaning of this parameter differs according to the database engine you @@ -21501,27 +21574,27 @@ type DBInstance struct { PubliclyAccessible *bool `type:"boolean"` // Contains one or more identifiers of Aurora DB clusters to which the RDS DB - // instance is replicated as a Read Replica. For example, when you create an - // Aurora Read Replica of an RDS MySQL DB instance, the Aurora MySQL DB cluster - // for the Aurora Read Replica is shown. This output does not contain information - // about cross region Aurora Read Replicas. + // instance is replicated as a read replica. For example, when you create an + // Aurora read replica of an RDS MySQL DB instance, the Aurora MySQL DB cluster + // for the Aurora read replica is shown. This output does not contain information + // about cross region Aurora read replicas. // - // Currently, each RDS DB instance can have only one Aurora Read Replica. + // Currently, each RDS DB instance can have only one Aurora read replica. ReadReplicaDBClusterIdentifiers []*string `locationNameList:"ReadReplicaDBClusterIdentifier" type:"list"` - // Contains one or more identifiers of the Read Replicas associated with this + // Contains one or more identifiers of the read replicas associated with this // DB instance. ReadReplicaDBInstanceIdentifiers []*string `locationNameList:"ReadReplicaDBInstanceIdentifier" type:"list"` // Contains the identifier of the source DB instance if this DB instance is - // a Read Replica. + // a read replica. ReadReplicaSourceDBInstanceIdentifier *string `type:"string"` // If present, specifies the name of the secondary Availability Zone for a DB // instance with multi-AZ support. SecondaryAvailabilityZone *string `type:"string"` - // The status of a Read Replica. If the instance isn't a Read Replica, this + // The status of a read replica. If the instance isn't a read replica, this // is blank. StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` @@ -22216,7 +22289,7 @@ type DBInstanceStatusInfo struct { // if the instance is in an error state. Normal *bool `type:"boolean"` - // Status of the DB instance. For a StatusType of Read Replica, the values can + // Status of the DB instance. For a StatusType of read replica, the values can // be replicating, replication stop point set, replication stop point reached, // error, stopped, or terminated. Status *string `type:"string"` @@ -22423,8 +22496,7 @@ type DBProxy struct { // value in the connection string for a database client application. Endpoint *string `type:"string"` - // Currently, this value is always MYSQL. The engine family applies to both - // RDS MySQL and Aurora MySQL. + // The engine family applies to MySQL and PostgreSQL for both RDS and Aurora. EngineFamily *string `type:"string"` // The number of seconds a connection to the proxy can have no activity before @@ -22581,6 +22653,9 @@ type DBProxyTarget struct { // The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB cluster. TargetArn *string `type:"string"` + // Information about the connection health of the RDS Proxy target. + TargetHealth *TargetHealth `type:"structure"` + // The DB cluster identifier when the target represents an Aurora DB cluster. // This field is blank when the target represents an RDS DB instance. TrackedClusterId *string `type:"string"` @@ -22624,6 +22699,12 @@ func (s *DBProxyTarget) SetTargetArn(v string) *DBProxyTarget { return s } +// SetTargetHealth sets the TargetHealth field's value. +func (s *DBProxyTarget) SetTargetHealth(v *TargetHealth) *DBProxyTarget { + s.TargetHealth = v + return s +} + // SetTrackedClusterId sets the TrackedClusterId field's value. func (s *DBProxyTarget) SetTrackedClusterId(v string) *DBProxyTarget { s.TrackedClusterId = &v @@ -23856,7 +23937,7 @@ type DeleteDBInstanceInput struct { // // * Can't end with a hyphen or contain two consecutive hyphens. // - // * Can't be specified when deleting a Read Replica. + // * Can't be specified when deleting a read replica. FinalDBSnapshotIdentifier *string `type:"string"` // A value that indicates whether to skip the creation of a final DB snapshot @@ -23868,7 +23949,7 @@ type DeleteDBInstanceInput struct { // When a DB instance is in a failure state and has a status of 'failed', 'incompatible-restore', // or 'incompatible-network', it can only be deleted when skip is specified. // - // Specify skip when deleting a Read Replica. + // Specify skip when deleting a read replica. // // The FinalDBSnapshotIdentifier parameter must be specified if skip isn't specified. SkipFinalSnapshot *bool `type:"boolean"` @@ -28287,7 +28368,7 @@ type DescribeExportTasksInput struct { // Default: 100 // // Constraints: Minimum 20, maximum 100. - MaxRecords *string `type:"string"` + MaxRecords *int64 `min:"20" type:"integer"` // The Amazon Resource Name (ARN) of the snapshot exported to Amazon S3. SourceArn *string `type:"string"` @@ -28306,6 +28387,9 @@ func (s DescribeExportTasksInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeExportTasksInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} + if s.MaxRecords != nil && *s.MaxRecords < 20 { + invalidParams.Add(request.NewErrParamMinValue("MaxRecords", 20)) + } if s.Filters != nil { for i, v := range s.Filters { if v == nil { @@ -28342,7 +28426,7 @@ func (s *DescribeExportTasksInput) SetMarker(v string) *DescribeExportTasksInput } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeExportTasksInput) SetMaxRecords(v string) *DescribeExportTasksInput { +func (s *DescribeExportTasksInput) SetMaxRecords(v int64) *DescribeExportTasksInput { s.MaxRecords = &v return s } @@ -28893,6 +28977,13 @@ func (s *DescribeOptionGroupsOutput) SetOptionGroupsList(v []*OptionGroup) *Desc type DescribeOrderableDBInstanceOptionsInput struct { _ struct{} `type:"structure"` + // The Availability Zone group associated with a Local Zone. Specify this parameter + // to retrieve available offerings for the Local Zones in the group. + // + // Omit this parameter to show the available offerings in the specified AWS + // Region. + AvailabilityZoneGroup *string `type:"string"` + // The DB instance class filter value. Specify this parameter to show only the // available offerings matching the specified DB instance class. DBInstanceClass *string `type:"string"` @@ -28964,6 +29055,12 @@ func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { return nil } +// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetAvailabilityZoneGroup(v string) *DescribeOrderableDBInstanceOptionsInput { + s.AvailabilityZoneGroup = &v + return s +} + // SetDBInstanceClass sets the DBInstanceClass field's value. func (s *DescribeOrderableDBInstanceOptionsInput) SetDBInstanceClass(v string) *DescribeOrderableDBInstanceOptionsInput { s.DBInstanceClass = &v @@ -29631,7 +29728,7 @@ type DescribeSourceRegionsOutput struct { Marker *string `type:"string"` // A list of SourceRegion instances that contains each source AWS Region that - // the current AWS Region can get a Read Replica or a DB snapshot from. + // the current AWS Region can get a read replica or a DB snapshot from. SourceRegions []*SourceRegion `locationNameList:"SourceRegion" type:"list"` } @@ -30332,16 +30429,16 @@ type ExportTask struct { // The data exported from the snapshot. Valid values are the following: // - // * database - Export all the data of the snapshot. + // * database - Export all the data from a specified database. // - // * database.table [table-name] - Export a table of the snapshot. + // * database.table table-name - Export a table of the snapshot. This format + // is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL. // - // * database.schema [schema-name] - Export a database schema of the snapshot. - // This value isn't valid for RDS for MySQL, RDS for MariaDB, or Aurora MySQL. + // * database.schema schema-name - Export a database schema of the snapshot. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. // - // * database.schema.table [table-name] - Export a table of the database - // schema. This value isn't valid for RDS for MySQL, RDS for MariaDB, or - // Aurora MySQL. + // * database.schema.table table-name - Export a table of the database schema. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. ExportOnly []*string `type:"list"` // A unique identifier for the snapshot export task. This ID isn't an identifier @@ -32321,13 +32418,13 @@ type ModifyDBInstanceInput struct { // // * Must be a value from 0 to 35 // - // * Can be specified for a MySQL Read Replica only if the source is running + // * Can be specified for a MySQL read replica only if the source is running // MySQL 5.6 or later // - // * Can be specified for a PostgreSQL Read Replica only if the source is + // * Can be specified for a PostgreSQL read replica only if the source is // running PostgreSQL 9.3.5 // - // * Can't be set to 0 if the DB instance is a source to Read Replicas + // * Can't be set to 0 if the DB instance is a source to read replicas BackupRetentionPeriod *int64 `type:"integer"` // Indicates the certificate that needs to be associated with the instance. @@ -32419,19 +32516,19 @@ type ModifyDBInstanceInput struct { // // Default: 3306 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // MariaDB // // Default: 3306 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // PostgreSQL // // Default: 5432 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // Type: Integer // @@ -32439,20 +32536,20 @@ type ModifyDBInstanceInput struct { // // Default: 1521 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 // // SQL Server // // Default: 1433 // - // Valid Values: 1150-65535 except for 1434, 3389, 47001, 49152, and 49152 through - // 49156. + // Valid values: 1150-65535 except 1234, 1434, 3260, 3343, 3389, 47001, and + // 49152-49156. // // Amazon Aurora // // Default: 3306 // - // Valid Values: 1150-65535 + // Valid values: 1150-65535 DBPortNumber *int64 `type:"integer"` // A list of DB security groups to authorize on this DB instance. Changing this @@ -32552,7 +32649,7 @@ type ModifyDBInstanceInput struct { // While the migration takes place, nightly backups for the instance are suspended. // No other Amazon RDS operations can take place for the instance, including // modifying the instance, rebooting the instance, deleting the instance, creating - // a Read Replica for the instance, and creating a DB snapshot of the instance. + // a read replica for the instance, and creating a DB snapshot of the instance. // // Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL, the value supplied // must be at least 10% greater than the current value. Values that are not @@ -32764,7 +32861,7 @@ type ModifyDBInstanceInput struct { // While the migration takes place, nightly backups for the instance are suspended. // No other Amazon RDS operations can take place for the instance, including // modifying the instance, rebooting the instance, deleting the instance, creating - // a Read Replica for the instance, and creating a DB snapshot of the instance. + // a read replica for the instance, and creating a DB snapshot of the instance. // // Valid values: standard | gp2 | io1 // @@ -34712,6 +34809,9 @@ func (s *OptionVersion) SetVersion(v string) *OptionVersion { type OrderableDBInstanceOption struct { _ struct{} `type:"structure"` + // The Availability Zone group for a DB instance. + AvailabilityZoneGroup *string `type:"string"` + // A list of Availability Zones for a DB instance. AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` @@ -34752,13 +34852,17 @@ type OrderableDBInstanceOption struct { // Indicates whether a DB instance is Multi-AZ capable. MultiAZCapable *bool `type:"boolean"` - // Indicates whether a DB instance can have a Read Replica. + // Indicates whether a DB instance can have a read replica. ReadReplicaCapable *bool `type:"boolean"` // Indicates the storage type for a DB instance. StorageType *string `type:"string"` // A list of the supported DB engine modes. + // + // global engine mode only applies for global database clusters created with + // Aurora MySQL version 5.6.10a. For higher Aurora MySQL versions, the clusters + // in a global database use provisioned engine mode. SupportedEngineModes []*string `type:"list"` // Indicates whether a DB instance supports Enhanced Monitoring at intervals @@ -34777,8 +34881,8 @@ type OrderableDBInstanceOption struct { // True if a DB instance supports Performance Insights, otherwise false. SupportsPerformanceInsights *bool `type:"boolean"` - // Whether or not Amazon RDS can automatically scale storage for DB instances - // that use the specified instance class. + // Whether Amazon RDS can automatically scale storage for DB instances that + // use the specified DB instance class. SupportsStorageAutoscaling *bool `type:"boolean"` // Indicates whether a DB instance supports encrypted storage. @@ -34798,6 +34902,12 @@ func (s OrderableDBInstanceOption) GoString() string { return s.String() } +// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. +func (s *OrderableDBInstanceOption) SetAvailabilityZoneGroup(v string) *OrderableDBInstanceOption { + s.AvailabilityZoneGroup = &v + return s +} + // SetAvailabilityZones sets the AvailabilityZones field's value. func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableDBInstanceOption { s.AvailabilityZones = v @@ -35405,12 +35515,12 @@ func (s *ProcessorFeature) SetValue(v string) *ProcessorFeature { type PromoteReadReplicaDBClusterInput struct { _ struct{} `type:"structure"` - // The identifier of the DB cluster Read Replica to promote. This parameter + // The identifier of the DB cluster read replica to promote. This parameter // isn't case-sensitive. // // Constraints: // - // * Must match the identifier of an existing DBCluster Read Replica. + // * Must match the identifier of an existing DB cluster read replica. // // Example: my-cluster-replica1 // @@ -35486,14 +35596,14 @@ type PromoteReadReplicaInput struct { // // * Must be a value from 0 to 35. // - // * Can't be set to 0 if the DB instance is a source to Read Replicas. + // * Can't be set to 0 if the DB instance is a source to read replicas. BackupRetentionPeriod *int64 `type:"integer"` // The DB instance identifier. This value is stored as a lowercase string. // // Constraints: // - // * Must match the identifier of an existing Read Replica DB instance. + // * Must match the identifier of an existing read replica DB instance. // // Example: mydbinstance // @@ -36820,7 +36930,7 @@ type RestoreDBClusterFromS3Input struct { // // For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication // to authenticate users that connect to the DB cluster. For more information, - // see Using Kerberos Authentication for Aurora MySQL (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurmysql-kerberos.html) + // see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) // in the Amazon Aurora User Guide. Domain *string `type:"string"` @@ -37695,7 +37805,7 @@ type RestoreDBClusterToPointInTimeInput struct { // // For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication // to authenticate users that connect to the DB cluster. For more information, - // see Using Kerberos Authentication for Aurora MySQL (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurmysql-kerberos.html) + // see Kerberos Authentication (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) // in the Amazon Aurora User Guide. Domain *string `type:"string"` @@ -40195,16 +40305,16 @@ type StartExportTaskInput struct { // The data to be exported from the snapshot. If this parameter is not provided, // all the snapshot data is exported. Valid values are the following: // - // * database - Export all the data of the snapshot. + // * database - Export all the data from a specified database. // - // * database.table [table-name] - Export a table of the snapshot. + // * database.table table-name - Export a table of the snapshot. This format + // is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL. // - // * database.schema [schema-name] - Export a database schema of the snapshot. - // This value isn't valid for RDS for MySQL, RDS for MariaDB, or Aurora MySQL. + // * database.schema schema-name - Export a database schema of the snapshot. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. // - // * database.schema.table [table-name] - Export a table of the database - // schema. This value isn't valid for RDS for MySQL, RDS for MariaDB, or - // Aurora MySQL. + // * database.schema.table table-name - Export a table of the database schema. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. ExportOnly []*string `type:"list"` // A unique identifier for the snapshot export task. This ID isn't an identifier @@ -40328,16 +40438,16 @@ type StartExportTaskOutput struct { // The data exported from the snapshot. Valid values are the following: // - // * database - Export all the data of the snapshot. + // * database - Export all the data from a specified database. // - // * database.table [table-name] - Export a table of the snapshot. + // * database.table table-name - Export a table of the snapshot. This format + // is valid only for RDS for MySQL, RDS for MariaDB, and Aurora MySQL. // - // * database.schema [schema-name] - Export a database schema of the snapshot. - // This value isn't valid for RDS for MySQL, RDS for MariaDB, or Aurora MySQL. + // * database.schema schema-name - Export a database schema of the snapshot. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. // - // * database.schema.table [table-name] - Export a table of the database - // schema. This value isn't valid for RDS for MySQL, RDS for MariaDB, or - // Aurora MySQL. + // * database.schema.table table-name - Export a table of the database schema. + // This format is valid only for RDS for PostgreSQL and Aurora PostgreSQL. ExportOnly []*string `type:"list"` // A unique identifier for the snapshot export task. This ID isn't an identifier @@ -40805,6 +40915,57 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// +// This is prerelease documentation for the RDS Database Proxy feature in preview +// release. It is subject to change. +// +// Information about the connection health of an RDS Proxy target. +type TargetHealth struct { + _ struct{} `type:"structure"` + + // A description of the health of the RDS Proxy target. If the State is AVAILABLE, + // a description is not included. + Description *string `type:"string"` + + // The reason for the current health State of the RDS Proxy target. + Reason *string `type:"string" enum:"TargetHealthReason"` + + // The current state of the connection health lifecycle for the RDS Proxy target. + // The following is a typical lifecycle example for the states of an RDS Proxy + // target: + // + // registering > unavailable > available > unavailable > available + State *string `type:"string" enum:"TargetState"` +} + +// String returns the string representation +func (s TargetHealth) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetHealth) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *TargetHealth) SetDescription(v string) *TargetHealth { + s.Description = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *TargetHealth) SetReason(v string) *TargetHealth { + s.Reason = &v + return s +} + +// SetState sets the State field's value. +func (s *TargetHealth) SetState(v string) *TargetHealth { + s.State = &v + return s +} + // A time zone associated with a DBInstance or a DBSnapshot. This data type // is an element in the response to the DescribeDBInstances, the DescribeDBSnapshots, // and the DescribeDBEngineVersions actions. @@ -41293,11 +41454,23 @@ const ( // DBProxyStatusDeleting is a DBProxyStatus enum value DBProxyStatusDeleting = "deleting" + + // DBProxyStatusSuspended is a DBProxyStatus enum value + DBProxyStatusSuspended = "suspended" + + // DBProxyStatusSuspending is a DBProxyStatus enum value + DBProxyStatusSuspending = "suspending" + + // DBProxyStatusReactivating is a DBProxyStatus enum value + DBProxyStatusReactivating = "reactivating" ) const ( // EngineFamilyMysql is a EngineFamily enum value EngineFamilyMysql = "MYSQL" + + // EngineFamilyPostgresql is a EngineFamily enum value + EngineFamilyPostgresql = "POSTGRESQL" ) const ( @@ -41328,6 +41501,31 @@ const ( SourceTypeDbClusterSnapshot = "db-cluster-snapshot" ) +const ( + // TargetHealthReasonUnreachable is a TargetHealthReason enum value + TargetHealthReasonUnreachable = "UNREACHABLE" + + // TargetHealthReasonConnectionFailed is a TargetHealthReason enum value + TargetHealthReasonConnectionFailed = "CONNECTION_FAILED" + + // TargetHealthReasonAuthFailure is a TargetHealthReason enum value + TargetHealthReasonAuthFailure = "AUTH_FAILURE" + + // TargetHealthReasonPendingProxyCapacity is a TargetHealthReason enum value + TargetHealthReasonPendingProxyCapacity = "PENDING_PROXY_CAPACITY" +) + +const ( + // TargetStateRegistering is a TargetState enum value + TargetStateRegistering = "REGISTERING" + + // TargetStateAvailable is a TargetState enum value + TargetStateAvailable = "AVAILABLE" + + // TargetStateUnavailable is a TargetState enum value + TargetStateUnavailable = "UNAVAILABLE" +) + const ( // TargetTypeRdsInstance is a TargetType enum value TargetTypeRdsInstance = "RDS_INSTANCE" 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 8f2bbe0ee6e..a2985aeb536 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 @@ -1843,7 +1843,8 @@ func (c *Redshift) CreateSnapshotScheduleRequest(input *CreateSnapshotScheduleIn // CreateSnapshotSchedule API operation for Amazon Redshift. // -// Creates a snapshot schedule with the rate of every 12 hours. +// Create a snapshot schedule that can be associated to a cluster and which +// overrides the default system backup schedule. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1982,6 +1983,104 @@ func (c *Redshift) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput return out, req.Send() } +const opCreateUsageLimit = "CreateUsageLimit" + +// CreateUsageLimitRequest generates a "aws/request.Request" representing the +// client's request for the CreateUsageLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateUsageLimit for more information on using the CreateUsageLimit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateUsageLimitRequest method. +// req, resp := client.CreateUsageLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateUsageLimit +func (c *Redshift) CreateUsageLimitRequest(input *CreateUsageLimitInput) (req *request.Request, output *CreateUsageLimitOutput) { + op := &request.Operation{ + Name: opCreateUsageLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateUsageLimitInput{} + } + + output = &CreateUsageLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateUsageLimit API operation for Amazon Redshift. +// +// Creates a usage limit for a specified Amazon Redshift feature on a cluster. +// The usage limit is identified by the returned usage limit identifier. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation CreateUsageLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// * ErrCodeLimitExceededFault "LimitExceededFault" +// The encryption key has exceeded its grant limit in AWS KMS. +// +// * ErrCodeUsageLimitAlreadyExistsFault "UsageLimitAlreadyExists" +// The usage limit already exists. +// +// * ErrCodeInvalidUsageLimitFault "InvalidUsageLimit" +// The usage limit is not valid. +// +// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" +// You have exceeded the number of tags allowed. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateUsageLimit +func (c *Redshift) CreateUsageLimit(input *CreateUsageLimitInput) (*CreateUsageLimitOutput, error) { + req, out := c.CreateUsageLimitRequest(input) + return out, req.Send() +} + +// CreateUsageLimitWithContext is the same as CreateUsageLimit with the addition of +// the ability to pass a context and additional request options. +// +// See CreateUsageLimit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) CreateUsageLimitWithContext(ctx aws.Context, input *CreateUsageLimitInput, opts ...request.Option) (*CreateUsageLimitOutput, error) { + req, out := c.CreateUsageLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the @@ -3037,6 +3136,89 @@ func (c *Redshift) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput return out, req.Send() } +const opDeleteUsageLimit = "DeleteUsageLimit" + +// DeleteUsageLimitRequest generates a "aws/request.Request" representing the +// client's request for the DeleteUsageLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteUsageLimit for more information on using the DeleteUsageLimit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteUsageLimitRequest method. +// req, resp := client.DeleteUsageLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteUsageLimit +func (c *Redshift) DeleteUsageLimitRequest(input *DeleteUsageLimitInput) (req *request.Request, output *DeleteUsageLimitOutput) { + op := &request.Operation{ + Name: opDeleteUsageLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteUsageLimitInput{} + } + + output = &DeleteUsageLimitOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteUsageLimit API operation for Amazon Redshift. +// +// Deletes a usage limit from a cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation DeleteUsageLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUsageLimitNotFoundFault "UsageLimitNotFound" +// The usage limit identifier can't be found. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteUsageLimit +func (c *Redshift) DeleteUsageLimit(input *DeleteUsageLimitInput) (*DeleteUsageLimitOutput, error) { + req, out := c.DeleteUsageLimitRequest(input) + return out, req.Send() +} + +// DeleteUsageLimitWithContext is the same as DeleteUsageLimit with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteUsageLimit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) DeleteUsageLimitWithContext(ctx aws.Context, input *DeleteUsageLimitInput, opts ...request.Option) (*DeleteUsageLimitOutput, error) { + req, out := c.DeleteUsageLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the @@ -6458,6 +6640,160 @@ func (c *Redshift) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsI return out, req.Send() } +const opDescribeUsageLimits = "DescribeUsageLimits" + +// DescribeUsageLimitsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeUsageLimits operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeUsageLimits for more information on using the DescribeUsageLimits +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeUsageLimitsRequest method. +// req, resp := client.DescribeUsageLimitsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeUsageLimits +func (c *Redshift) DescribeUsageLimitsRequest(input *DescribeUsageLimitsInput) (req *request.Request, output *DescribeUsageLimitsOutput) { + op := &request.Operation{ + Name: opDescribeUsageLimits, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeUsageLimitsInput{} + } + + output = &DescribeUsageLimitsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeUsageLimits API operation for Amazon Redshift. +// +// Shows usage limits on a cluster. Results are filtered based on the combination +// of input usage limit identifier, cluster identifier, and feature type parameters: +// +// * If usage limit identifier, cluster identifier, and feature type are +// not provided, then all usage limit objects for the current account in +// the current region are returned. +// +// * If usage limit identifier is provided, then the corresponding usage +// limit object is returned. +// +// * If cluster identifier is provided, then all usage limit objects for +// the specified cluster are returned. +// +// * If cluster identifier and feature type are provided, then all usage +// limit objects for the combination of cluster and feature are returned. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation DescribeUsageLimits for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeUsageLimits +func (c *Redshift) DescribeUsageLimits(input *DescribeUsageLimitsInput) (*DescribeUsageLimitsOutput, error) { + req, out := c.DescribeUsageLimitsRequest(input) + return out, req.Send() +} + +// DescribeUsageLimitsWithContext is the same as DescribeUsageLimits with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeUsageLimits for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) DescribeUsageLimitsWithContext(ctx aws.Context, input *DescribeUsageLimitsInput, opts ...request.Option) (*DescribeUsageLimitsOutput, error) { + req, out := c.DescribeUsageLimitsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeUsageLimitsPages iterates over the pages of a DescribeUsageLimits operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeUsageLimits 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 DescribeUsageLimits operation. +// pageNum := 0 +// err := client.DescribeUsageLimitsPages(params, +// func(page *redshift.DescribeUsageLimitsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Redshift) DescribeUsageLimitsPages(input *DescribeUsageLimitsInput, fn func(*DescribeUsageLimitsOutput, bool) bool) error { + return c.DescribeUsageLimitsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeUsageLimitsPagesWithContext same as DescribeUsageLimitsPages 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 *Redshift) DescribeUsageLimitsPagesWithContext(ctx aws.Context, input *DescribeUsageLimitsInput, fn func(*DescribeUsageLimitsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeUsageLimitsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeUsageLimitsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeUsageLimitsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDisableLogging = "DisableLogging" // DisableLoggingRequest generates a "aws/request.Request" representing the @@ -6705,6 +7041,9 @@ func (c *Redshift) EnableLoggingRequest(input *EnableLoggingInput) (req *request // to Bucket Restrictions and Limitations (https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html) // in the Amazon Simple Storage Service (S3) Developer Guide. // +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EnableLogging func (c *Redshift) EnableLogging(input *EnableLoggingInput) (*LoggingStatus, error) { req, out := c.EnableLoggingRequest(input) @@ -7422,6 +7761,9 @@ func (c *Redshift) ModifyClusterMaintenanceRequest(input *ModifyClusterMaintenan // * ErrCodeClusterNotFoundFault "ClusterNotFound" // The ClusterIdentifier parameter does not refer to an existing cluster. // +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterMaintenance func (c *Redshift) ModifyClusterMaintenance(input *ModifyClusterMaintenanceInput) (*ModifyClusterMaintenanceOutput, error) { req, out := c.ModifyClusterMaintenanceRequest(input) @@ -8198,32 +8540,200 @@ func (c *Redshift) ModifySnapshotScheduleWithContext(ctx aws.Context, input *Mod return out, req.Send() } -const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" +const opModifyUsageLimit = "ModifyUsageLimit" -// PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedNodeOffering operation. The "output" return +// ModifyUsageLimitRequest generates a "aws/request.Request" representing the +// client's request for the ModifyUsageLimit operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PurchaseReservedNodeOffering for more information on using the PurchaseReservedNodeOffering +// See ModifyUsageLimit for more information on using the ModifyUsageLimit // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PurchaseReservedNodeOfferingRequest method. -// req, resp := client.PurchaseReservedNodeOfferingRequest(params) +// // Example sending a request using the ModifyUsageLimitRequest method. +// req, resp := client.ModifyUsageLimitRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyUsageLimit +func (c *Redshift) ModifyUsageLimitRequest(input *ModifyUsageLimitInput) (req *request.Request, output *ModifyUsageLimitOutput) { + op := &request.Operation{ + Name: opModifyUsageLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyUsageLimitInput{} + } + + output = &ModifyUsageLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyUsageLimit API operation for Amazon Redshift. +// +// Modifies a usage limit in a cluster. You can't modify the feature type or +// period of a usage limit. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation ModifyUsageLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidUsageLimitFault "InvalidUsageLimit" +// The usage limit is not valid. +// +// * ErrCodeUsageLimitNotFoundFault "UsageLimitNotFound" +// The usage limit identifier can't be found. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyUsageLimit +func (c *Redshift) ModifyUsageLimit(input *ModifyUsageLimitInput) (*ModifyUsageLimitOutput, error) { + req, out := c.ModifyUsageLimitRequest(input) + return out, req.Send() +} + +// ModifyUsageLimitWithContext is the same as ModifyUsageLimit with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyUsageLimit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) ModifyUsageLimitWithContext(ctx aws.Context, input *ModifyUsageLimitInput, opts ...request.Option) (*ModifyUsageLimitOutput, error) { + req, out := c.ModifyUsageLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPauseCluster = "PauseCluster" + +// PauseClusterRequest generates a "aws/request.Request" representing the +// client's request for the PauseCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PauseCluster for more information on using the PauseCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PauseClusterRequest method. +// req, resp := client.PauseClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PauseCluster +func (c *Redshift) PauseClusterRequest(input *PauseClusterInput) (req *request.Request, output *PauseClusterOutput) { + op := &request.Operation{ + Name: opPauseCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PauseClusterInput{} + } + + output = &PauseClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// PauseCluster API operation for Amazon Redshift. +// +// Pauses a cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation PauseCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PauseCluster +func (c *Redshift) PauseCluster(input *PauseClusterInput) (*PauseClusterOutput, error) { + req, out := c.PauseClusterRequest(input) + return out, req.Send() +} + +// PauseClusterWithContext is the same as PauseCluster with the addition of +// the ability to pass a context and additional request options. +// +// See PauseCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) PauseClusterWithContext(ctx aws.Context, input *PauseClusterInput, opts ...request.Option) (*PauseClusterOutput, error) { + req, out := c.PauseClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" + +// PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseReservedNodeOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PurchaseReservedNodeOffering for more information on using the PurchaseReservedNodeOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PurchaseReservedNodeOfferingRequest method. +// req, resp := client.PurchaseReservedNodeOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering func (c *Redshift) PurchaseReservedNodeOfferingRequest(input *PurchaseReservedNodeOfferingInput) (req *request.Request, output *PurchaseReservedNodeOfferingOutput) { op := &request.Operation{ Name: opPurchaseReservedNodeOffering, @@ -8523,7 +9033,7 @@ func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request // Elastic resize operations have the following restrictions: // // * You can only resize clusters of the following types: dc2.large dc2.8xlarge -// ds2.xlarge ds2.8xlarge ra3.16xlarge +// ds2.xlarge ds2.8xlarge ra3.4xlarge ra3.16xlarge // // * The type of nodes that you add must match the node type for the cluster. // @@ -8876,6 +9386,88 @@ func (c *Redshift) RestoreTableFromClusterSnapshotWithContext(ctx aws.Context, i return out, req.Send() } +const opResumeCluster = "ResumeCluster" + +// ResumeClusterRequest generates a "aws/request.Request" representing the +// client's request for the ResumeCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResumeCluster for more information on using the ResumeCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResumeClusterRequest method. +// req, resp := client.ResumeClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResumeCluster +func (c *Redshift) ResumeClusterRequest(input *ResumeClusterInput) (req *request.Request, output *ResumeClusterOutput) { + op := &request.Operation{ + Name: opResumeCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResumeClusterInput{} + } + + output = &ResumeClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResumeCluster API operation for Amazon Redshift. +// +// Resumes a paused cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation ResumeCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ResumeCluster +func (c *Redshift) ResumeCluster(input *ResumeClusterInput) (*ResumeClusterOutput, error) { + req, out := c.ResumeClusterRequest(input) + return out, req.Send() +} + +// ResumeClusterWithContext is the same as ResumeCluster with the addition of +// the ability to pass a context and additional request options. +// +// See ResumeCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) ResumeClusterWithContext(ctx aws.Context, input *ResumeClusterInput, opts ...request.Option) (*ResumeClusterOutput, error) { + req, out := c.ResumeClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRevokeClusterSecurityGroupIngress = "RevokeClusterSecurityGroupIngress" // RevokeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the @@ -10020,6 +10612,8 @@ type Cluster struct { // // * modifying // + // * paused + // // * rebooting // // * renaming @@ -11436,7 +12030,7 @@ type CreateClusterInput struct { // in the Amazon Redshift Cluster Management Guide. // // Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large - // | dc2.8xlarge | ra3.16xlarge + // | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge // // NodeType is a required field NodeType *string `type:"string" required:"true"` @@ -13112,82 +13706,292 @@ func (s CreateTagsOutput) GoString() string { return s.String() } -// Describes the status of a cluster while it is in the process of resizing -// with an incremental resize. -type DataTransferProgress struct { +type CreateUsageLimitInput struct { _ struct{} `type:"structure"` - // Describes the data transfer rate in MB's per second. - CurrentRateInMegaBytesPerSecond *float64 `type:"double"` + // The limit amount. If time-based, this amount is in minutes. If data-based, + // this amount is in terabytes (TB). The value must be a positive number. + // + // Amount is a required field + Amount *int64 `type:"long" required:"true"` - // Describes the total amount of data that has been transfered in MB's. - DataTransferredInMegaBytes *int64 `type:"long"` + // The action that Amazon Redshift takes when the limit is reached. The default + // is log. For more information about this parameter, see UsageLimit. + BreachAction *string `type:"string" enum:"UsageLimitBreachAction"` - // Describes the number of seconds that have elapsed during the data transfer. - ElapsedTimeInSeconds *int64 `type:"long"` + // The identifier of the cluster that you want to limit usage. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` - // Describes the estimated number of seconds remaining to complete the transfer. - EstimatedTimeToCompletionInSeconds *int64 `type:"long"` + // The Amazon Redshift feature that you want to limit. + // + // FeatureType is a required field + FeatureType *string `type:"string" required:"true" enum:"UsageLimitFeatureType"` - // Describes the status of the cluster. While the transfer is in progress the - // status is transferringdata. - Status *string `type:"string"` + // The type of limit. Depending on the feature type, this can be based on a + // time duration or data size. If FeatureType is spectrum, then LimitType must + // be data-scanned. If FeatureType is concurrency-scaling, then LimitType must + // be time. + // + // LimitType is a required field + LimitType *string `type:"string" required:"true" enum:"UsageLimitLimitType"` - // Describes the total amount of data to be transfered in megabytes. - TotalDataInMegaBytes *int64 `type:"long"` + // The time period that the amount applies to. A weekly period begins on Sunday. + // The default is monthly. + Period *string `type:"string" enum:"UsageLimitPeriod"` + + // A list of tag instances. + Tags []*Tag `locationNameList:"Tag" type:"list"` } // String returns the string representation -func (s DataTransferProgress) String() string { +func (s CreateUsageLimitInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DataTransferProgress) GoString() string { +func (s CreateUsageLimitInput) GoString() string { return s.String() } -// SetCurrentRateInMegaBytesPerSecond sets the CurrentRateInMegaBytesPerSecond field's value. -func (s *DataTransferProgress) SetCurrentRateInMegaBytesPerSecond(v float64) *DataTransferProgress { - s.CurrentRateInMegaBytesPerSecond = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateUsageLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateUsageLimitInput"} + if s.Amount == nil { + invalidParams.Add(request.NewErrParamRequired("Amount")) + } + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.FeatureType == nil { + invalidParams.Add(request.NewErrParamRequired("FeatureType")) + } + if s.LimitType == nil { + invalidParams.Add(request.NewErrParamRequired("LimitType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDataTransferredInMegaBytes sets the DataTransferredInMegaBytes field's value. -func (s *DataTransferProgress) SetDataTransferredInMegaBytes(v int64) *DataTransferProgress { - s.DataTransferredInMegaBytes = &v +// SetAmount sets the Amount field's value. +func (s *CreateUsageLimitInput) SetAmount(v int64) *CreateUsageLimitInput { + s.Amount = &v return s } -// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. -func (s *DataTransferProgress) SetElapsedTimeInSeconds(v int64) *DataTransferProgress { - s.ElapsedTimeInSeconds = &v +// SetBreachAction sets the BreachAction field's value. +func (s *CreateUsageLimitInput) SetBreachAction(v string) *CreateUsageLimitInput { + s.BreachAction = &v return s } -// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. -func (s *DataTransferProgress) SetEstimatedTimeToCompletionInSeconds(v int64) *DataTransferProgress { - s.EstimatedTimeToCompletionInSeconds = &v +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *CreateUsageLimitInput) SetClusterIdentifier(v string) *CreateUsageLimitInput { + s.ClusterIdentifier = &v return s } -// SetStatus sets the Status field's value. -func (s *DataTransferProgress) SetStatus(v string) *DataTransferProgress { - s.Status = &v +// SetFeatureType sets the FeatureType field's value. +func (s *CreateUsageLimitInput) SetFeatureType(v string) *CreateUsageLimitInput { + s.FeatureType = &v return s } -// SetTotalDataInMegaBytes sets the TotalDataInMegaBytes field's value. -func (s *DataTransferProgress) SetTotalDataInMegaBytes(v int64) *DataTransferProgress { - s.TotalDataInMegaBytes = &v +// SetLimitType sets the LimitType field's value. +func (s *CreateUsageLimitInput) SetLimitType(v string) *CreateUsageLimitInput { + s.LimitType = &v return s } -// Describes the default cluster parameters for a parameter group family. -type DefaultClusterParameters struct { - _ struct{} `type:"structure"` +// SetPeriod sets the Period field's value. +func (s *CreateUsageLimitInput) SetPeriod(v string) *CreateUsageLimitInput { + s.Period = &v + return s +} - // A value that indicates the starting point for the next set of response records +// SetTags sets the Tags field's value. +func (s *CreateUsageLimitInput) SetTags(v []*Tag) *CreateUsageLimitInput { + s.Tags = v + return s +} + +// Describes a usage limit object for a cluster. +type CreateUsageLimitOutput struct { + _ struct{} `type:"structure"` + + // The limit amount. If time-based, this amount is in minutes. If data-based, + // this amount is in terabytes (TB). + Amount *int64 `type:"long"` + + // The action that Amazon Redshift takes when the limit is reached. Possible + // values are: + // + // * log - To log an event in a system table. The default is log. + // + // * emit-metric - To emit CloudWatch metrics. + // + // * disable - To disable the feature until the next usage period begins. + BreachAction *string `type:"string" enum:"UsageLimitBreachAction"` + + // The identifier of the cluster with a usage limit. + ClusterIdentifier *string `type:"string"` + + // The Amazon Redshift feature to which the limit applies. + FeatureType *string `type:"string" enum:"UsageLimitFeatureType"` + + // The type of limit. Depending on the feature type, this can be based on a + // time duration or data size. + LimitType *string `type:"string" enum:"UsageLimitLimitType"` + + // The time period that the amount applies to. A weekly period begins on Sunday. + // The default is monthly. + Period *string `type:"string" enum:"UsageLimitPeriod"` + + // A list of tag instances. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // The identifier of the usage limit. + UsageLimitId *string `type:"string"` +} + +// String returns the string representation +func (s CreateUsageLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateUsageLimitOutput) GoString() string { + return s.String() +} + +// SetAmount sets the Amount field's value. +func (s *CreateUsageLimitOutput) SetAmount(v int64) *CreateUsageLimitOutput { + s.Amount = &v + return s +} + +// SetBreachAction sets the BreachAction field's value. +func (s *CreateUsageLimitOutput) SetBreachAction(v string) *CreateUsageLimitOutput { + s.BreachAction = &v + return s +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *CreateUsageLimitOutput) SetClusterIdentifier(v string) *CreateUsageLimitOutput { + s.ClusterIdentifier = &v + return s +} + +// SetFeatureType sets the FeatureType field's value. +func (s *CreateUsageLimitOutput) SetFeatureType(v string) *CreateUsageLimitOutput { + s.FeatureType = &v + return s +} + +// SetLimitType sets the LimitType field's value. +func (s *CreateUsageLimitOutput) SetLimitType(v string) *CreateUsageLimitOutput { + s.LimitType = &v + return s +} + +// SetPeriod sets the Period field's value. +func (s *CreateUsageLimitOutput) SetPeriod(v string) *CreateUsageLimitOutput { + s.Period = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateUsageLimitOutput) SetTags(v []*Tag) *CreateUsageLimitOutput { + s.Tags = v + return s +} + +// SetUsageLimitId sets the UsageLimitId field's value. +func (s *CreateUsageLimitOutput) SetUsageLimitId(v string) *CreateUsageLimitOutput { + s.UsageLimitId = &v + return s +} + +// Describes the status of a cluster while it is in the process of resizing +// with an incremental resize. +type DataTransferProgress struct { + _ struct{} `type:"structure"` + + // Describes the data transfer rate in MB's per second. + CurrentRateInMegaBytesPerSecond *float64 `type:"double"` + + // Describes the total amount of data that has been transfered in MB's. + DataTransferredInMegaBytes *int64 `type:"long"` + + // Describes the number of seconds that have elapsed during the data transfer. + ElapsedTimeInSeconds *int64 `type:"long"` + + // Describes the estimated number of seconds remaining to complete the transfer. + EstimatedTimeToCompletionInSeconds *int64 `type:"long"` + + // Describes the status of the cluster. While the transfer is in progress the + // status is transferringdata. + Status *string `type:"string"` + + // Describes the total amount of data to be transfered in megabytes. + TotalDataInMegaBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s DataTransferProgress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataTransferProgress) GoString() string { + return s.String() +} + +// SetCurrentRateInMegaBytesPerSecond sets the CurrentRateInMegaBytesPerSecond field's value. +func (s *DataTransferProgress) SetCurrentRateInMegaBytesPerSecond(v float64) *DataTransferProgress { + s.CurrentRateInMegaBytesPerSecond = &v + return s +} + +// SetDataTransferredInMegaBytes sets the DataTransferredInMegaBytes field's value. +func (s *DataTransferProgress) SetDataTransferredInMegaBytes(v int64) *DataTransferProgress { + s.DataTransferredInMegaBytes = &v + return s +} + +// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. +func (s *DataTransferProgress) SetElapsedTimeInSeconds(v int64) *DataTransferProgress { + s.ElapsedTimeInSeconds = &v + return s +} + +// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. +func (s *DataTransferProgress) SetEstimatedTimeToCompletionInSeconds(v int64) *DataTransferProgress { + s.EstimatedTimeToCompletionInSeconds = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DataTransferProgress) SetStatus(v string) *DataTransferProgress { + s.Status = &v + return s +} + +// SetTotalDataInMegaBytes sets the TotalDataInMegaBytes field's value. +func (s *DataTransferProgress) SetTotalDataInMegaBytes(v int64) *DataTransferProgress { + s.TotalDataInMegaBytes = &v + return s +} + +// Describes the default cluster parameters for a parameter group family. +type DefaultClusterParameters struct { + _ struct{} `type:"structure"` + + // A value that indicates the starting point for the next set of response records // in a subsequent request. If a value is returned in a response, you can retrieve // the next set of records by providing this returned marker value in the Marker // parameter and retrying the command. If the Marker field is empty, all response @@ -14066,6 +14870,58 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DeleteUsageLimitInput struct { + _ struct{} `type:"structure"` + + // The identifier of the usage limit to delete. + // + // UsageLimitId is a required field + UsageLimitId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUsageLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUsageLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUsageLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUsageLimitInput"} + if s.UsageLimitId == nil { + invalidParams.Add(request.NewErrParamRequired("UsageLimitId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetUsageLimitId sets the UsageLimitId field's value. +func (s *DeleteUsageLimitInput) SetUsageLimitId(v string) *DeleteUsageLimitInput { + s.UsageLimitId = &v + return s +} + +type DeleteUsageLimitOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteUsageLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUsageLimitOutput) GoString() string { + return s.String() +} + type DescribeAccountAttributesInput struct { _ struct{} `type:"structure"` @@ -17266,75 +18122,209 @@ func (s *DescribeTagsOutput) SetTaggedResources(v []*TaggedResource) *DescribeTa return s } -type DisableLoggingInput struct { +type DescribeUsageLimitsInput struct { _ struct{} `type:"structure"` - // The identifier of the cluster on which logging is to be stopped. + // The identifier of the cluster for which you want to describe usage limits. + ClusterIdentifier *string `type:"string"` + + // The feature type for which you want to describe usage limits. + FeatureType *string `type:"string" enum:"UsageLimitFeatureType"` + + // An optional parameter that specifies the starting point to return a set of + // response records. When the results of a DescribeUsageLimits request exceed + // the value specified in MaxRecords, AWS returns a value in the Marker field + // of the response. You can retrieve the next set of response records by providing + // the returned marker value in the Marker parameter and retrying the request. + Marker *string `type:"string"` + + // The maximum number of response records to return in each call. If the number + // of remaining response records exceeds the specified MaxRecords value, a value + // is returned in a marker field of the response. You can retrieve the next + // set of records by retrying the command with the returned marker value. // - // Example: examplecluster + // Default: 100 // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` + // Constraints: minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // A tag key or keys for which you want to return all matching usage limit objects + // that are associated with the specified key or keys. For example, suppose + // that you have parameter groups that are tagged with keys called owner and + // environment. If you specify both of these tag keys in the request, Amazon + // Redshift returns a response with the usage limit objects have either or both + // of these tag keys associated with them. + TagKeys []*string `locationNameList:"TagKey" type:"list"` + + // A tag value or values for which you want to return all matching usage limit + // objects that are associated with the specified tag value or values. For example, + // suppose that you have parameter groups that are tagged with values called + // admin and test. If you specify both of these tag values in the request, Amazon + // Redshift returns a response with the usage limit objects that have either + // or both of these tag values associated with them. + TagValues []*string `locationNameList:"TagValue" type:"list"` + + // The identifier of the usage limit to describe. + UsageLimitId *string `type:"string"` } // String returns the string representation -func (s DisableLoggingInput) String() string { +func (s DescribeUsageLimitsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableLoggingInput) GoString() string { +func (s DescribeUsageLimitsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableLoggingInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetClusterIdentifier sets the ClusterIdentifier field's value. -func (s *DisableLoggingInput) SetClusterIdentifier(v string) *DisableLoggingInput { +func (s *DescribeUsageLimitsInput) SetClusterIdentifier(v string) *DescribeUsageLimitsInput { s.ClusterIdentifier = &v return s } -type DisableSnapshotCopyInput struct { - _ struct{} `type:"structure"` +// SetFeatureType sets the FeatureType field's value. +func (s *DescribeUsageLimitsInput) SetFeatureType(v string) *DescribeUsageLimitsInput { + s.FeatureType = &v + return s +} - // The unique identifier of the source cluster that you want to disable copying - // of snapshots to a destination region. - // - // Constraints: Must be the valid name of an existing cluster that has cross-region - // snapshot copy enabled. - // - // ClusterIdentifier is a required field - ClusterIdentifier *string `type:"string" required:"true"` +// SetMarker sets the Marker field's value. +func (s *DescribeUsageLimitsInput) SetMarker(v string) *DescribeUsageLimitsInput { + s.Marker = &v + return s } -// String returns the string representation -func (s DisableSnapshotCopyInput) String() string { - return awsutil.Prettify(s) +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeUsageLimitsInput) SetMaxRecords(v int64) *DescribeUsageLimitsInput { + s.MaxRecords = &v + return s } -// GoString returns the string representation -func (s DisableSnapshotCopyInput) GoString() string { - return s.String() +// SetTagKeys sets the TagKeys field's value. +func (s *DescribeUsageLimitsInput) SetTagKeys(v []*string) *DescribeUsageLimitsInput { + s.TagKeys = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableSnapshotCopyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableSnapshotCopyInput"} - if s.ClusterIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) - } +// SetTagValues sets the TagValues field's value. +func (s *DescribeUsageLimitsInput) SetTagValues(v []*string) *DescribeUsageLimitsInput { + s.TagValues = v + return s +} + +// SetUsageLimitId sets the UsageLimitId field's value. +func (s *DescribeUsageLimitsInput) SetUsageLimitId(v string) *DescribeUsageLimitsInput { + s.UsageLimitId = &v + return s +} + +type DescribeUsageLimitsOutput struct { + _ struct{} `type:"structure"` + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned marker value in the Marker + // parameter and retrying the command. If the Marker field is empty, all response + // records have been retrieved for the request. + Marker *string `type:"string"` + + // Contains the output from the DescribeUsageLimits action. + UsageLimits []*UsageLimit `type:"list"` +} + +// String returns the string representation +func (s DescribeUsageLimitsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUsageLimitsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeUsageLimitsOutput) SetMarker(v string) *DescribeUsageLimitsOutput { + s.Marker = &v + return s +} + +// SetUsageLimits sets the UsageLimits field's value. +func (s *DescribeUsageLimitsOutput) SetUsageLimits(v []*UsageLimit) *DescribeUsageLimitsOutput { + s.UsageLimits = v + return s +} + +type DisableLoggingInput struct { + _ struct{} `type:"structure"` + + // The identifier of the cluster on which logging is to be stopped. + // + // Example: examplecluster + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableLoggingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableLoggingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableLoggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableLoggingInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *DisableLoggingInput) SetClusterIdentifier(v string) *DisableLoggingInput { + s.ClusterIdentifier = &v + return s +} + +type DisableSnapshotCopyInput struct { + _ struct{} `type:"structure"` + + // The unique identifier of the source cluster that you want to disable copying + // of snapshots to a destination region. + // + // Constraints: Must be the valid name of an existing cluster that has cross-region + // snapshot copy enabled. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableSnapshotCopyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableSnapshotCopyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableSnapshotCopyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableSnapshotCopyInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } if invalidParams.Len() > 0 { return invalidParams @@ -18940,7 +19930,7 @@ type ModifyClusterInput struct { // in the Amazon Redshift Cluster Management Guide. // // Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large - // | dc2.8xlarge | ra3.16xlarge + // | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge NodeType *string `type:"string"` // The new number of nodes of the cluster. If you specify a new number of nodes, @@ -20176,6 +21166,160 @@ func (s *ModifySnapshotScheduleOutput) SetTags(v []*Tag) *ModifySnapshotSchedule return s } +type ModifyUsageLimitInput struct { + _ struct{} `type:"structure"` + + // The new limit amount. For more information about this parameter, see UsageLimit. + Amount *int64 `type:"long"` + + // The new action that Amazon Redshift takes when the limit is reached. For + // more information about this parameter, see UsageLimit. + BreachAction *string `type:"string" enum:"UsageLimitBreachAction"` + + // The identifier of the usage limit to modify. + // + // UsageLimitId is a required field + UsageLimitId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyUsageLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyUsageLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyUsageLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyUsageLimitInput"} + if s.UsageLimitId == nil { + invalidParams.Add(request.NewErrParamRequired("UsageLimitId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAmount sets the Amount field's value. +func (s *ModifyUsageLimitInput) SetAmount(v int64) *ModifyUsageLimitInput { + s.Amount = &v + return s +} + +// SetBreachAction sets the BreachAction field's value. +func (s *ModifyUsageLimitInput) SetBreachAction(v string) *ModifyUsageLimitInput { + s.BreachAction = &v + return s +} + +// SetUsageLimitId sets the UsageLimitId field's value. +func (s *ModifyUsageLimitInput) SetUsageLimitId(v string) *ModifyUsageLimitInput { + s.UsageLimitId = &v + return s +} + +// Describes a usage limit object for a cluster. +type ModifyUsageLimitOutput struct { + _ struct{} `type:"structure"` + + // The limit amount. If time-based, this amount is in minutes. If data-based, + // this amount is in terabytes (TB). + Amount *int64 `type:"long"` + + // The action that Amazon Redshift takes when the limit is reached. Possible + // values are: + // + // * log - To log an event in a system table. The default is log. + // + // * emit-metric - To emit CloudWatch metrics. + // + // * disable - To disable the feature until the next usage period begins. + BreachAction *string `type:"string" enum:"UsageLimitBreachAction"` + + // The identifier of the cluster with a usage limit. + ClusterIdentifier *string `type:"string"` + + // The Amazon Redshift feature to which the limit applies. + FeatureType *string `type:"string" enum:"UsageLimitFeatureType"` + + // The type of limit. Depending on the feature type, this can be based on a + // time duration or data size. + LimitType *string `type:"string" enum:"UsageLimitLimitType"` + + // The time period that the amount applies to. A weekly period begins on Sunday. + // The default is monthly. + Period *string `type:"string" enum:"UsageLimitPeriod"` + + // A list of tag instances. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // The identifier of the usage limit. + UsageLimitId *string `type:"string"` +} + +// String returns the string representation +func (s ModifyUsageLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyUsageLimitOutput) GoString() string { + return s.String() +} + +// SetAmount sets the Amount field's value. +func (s *ModifyUsageLimitOutput) SetAmount(v int64) *ModifyUsageLimitOutput { + s.Amount = &v + return s +} + +// SetBreachAction sets the BreachAction field's value. +func (s *ModifyUsageLimitOutput) SetBreachAction(v string) *ModifyUsageLimitOutput { + s.BreachAction = &v + return s +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ModifyUsageLimitOutput) SetClusterIdentifier(v string) *ModifyUsageLimitOutput { + s.ClusterIdentifier = &v + return s +} + +// SetFeatureType sets the FeatureType field's value. +func (s *ModifyUsageLimitOutput) SetFeatureType(v string) *ModifyUsageLimitOutput { + s.FeatureType = &v + return s +} + +// SetLimitType sets the LimitType field's value. +func (s *ModifyUsageLimitOutput) SetLimitType(v string) *ModifyUsageLimitOutput { + s.LimitType = &v + return s +} + +// SetPeriod sets the Period field's value. +func (s *ModifyUsageLimitOutput) SetPeriod(v string) *ModifyUsageLimitOutput { + s.Period = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ModifyUsageLimitOutput) SetTags(v []*Tag) *ModifyUsageLimitOutput { + s.Tags = v + return s +} + +// SetUsageLimitId sets the UsageLimitId field's value. +func (s *ModifyUsageLimitOutput) SetUsageLimitId(v string) *ModifyUsageLimitOutput { + s.UsageLimitId = &v + return s +} + // A list of node configurations. type NodeConfigurationOption struct { _ struct{} `type:"structure"` @@ -20428,6 +21572,105 @@ func (s *Parameter) SetSource(v string) *Parameter { return s } +type PauseClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier of the cluster to be paused. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PauseClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PauseClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PauseClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PauseClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *PauseClusterInput) SetClusterIdentifier(v string) *PauseClusterInput { + s.ClusterIdentifier = &v + return s +} + +type PauseClusterMessage struct { + _ struct{} `type:"structure"` + + // The identifier of the cluster to be paused. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PauseClusterMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PauseClusterMessage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PauseClusterMessage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PauseClusterMessage"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *PauseClusterMessage) SetClusterIdentifier(v string) *PauseClusterMessage { + s.ClusterIdentifier = &v + return s +} + +type PauseClusterOutput struct { + _ struct{} `type:"structure"` + + // Describes a cluster. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s PauseClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PauseClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *PauseClusterOutput) SetCluster(v *Cluster) *PauseClusterOutput { + s.Cluster = v + return s +} + // Describes cluster attributes that are in a pending state. A change to one // or more the attributes was requested and is in progress or will be applied. type PendingModifiedValues struct { @@ -21376,7 +22619,7 @@ type RestoreFromClusterSnapshotInput struct { // If you have a DC instance type, you must restore into that same instance // type and size. In other words, you can only restore a dc1.large instance // type into another dc1.large instance type or dc2.large instance type. You - // can't restore dc1.8xlarge to dc2.8xlarge. First restore to a dc1.8xlareg + // can't restore dc1.8xlarge to dc2.8xlarge. First restore to a dc1.8xlarge // cluster, then resize to a dc2.8large cluster. For more information about // node types, see About Clusters and Nodes (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-about-clusters-and-nodes) // in the Amazon Redshift Cluster Management Guide. @@ -21870,6 +23113,105 @@ func (s *RestoreTableFromClusterSnapshotOutput) SetTableRestoreStatus(v *TableRe return s } +type ResumeClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier of the cluster to be resumed. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ResumeClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResumeClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResumeClusterInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ResumeClusterInput) SetClusterIdentifier(v string) *ResumeClusterInput { + s.ClusterIdentifier = &v + return s +} + +type ResumeClusterMessage struct { + _ struct{} `type:"structure"` + + // The identifier of the cluster to be resumed. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ResumeClusterMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeClusterMessage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResumeClusterMessage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResumeClusterMessage"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ResumeClusterMessage) SetClusterIdentifier(v string) *ResumeClusterMessage { + s.ClusterIdentifier = &v + return s +} + +type ResumeClusterOutput struct { + _ struct{} `type:"structure"` + + // Describes a cluster. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s ResumeClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *ResumeClusterOutput) SetCluster(v *Cluster) *ResumeClusterOutput { + s.Cluster = v + return s +} + // Describes a RevisionTarget. type RevisionTarget struct { _ struct{} `type:"structure"` @@ -22337,8 +23679,14 @@ func (s *ScheduledActionFilter) SetValues(v []*string) *ScheduledActionFilter { type ScheduledActionType struct { _ struct{} `type:"structure"` + // An action that runs a PauseCluster API operation. + PauseCluster *PauseClusterMessage `type:"structure"` + // An action that runs a ResizeCluster API operation. ResizeCluster *ResizeClusterMessage `type:"structure"` + + // An action that runs a ResumeCluster API operation. + ResumeCluster *ResumeClusterMessage `type:"structure"` } // String returns the string representation @@ -22354,11 +23702,21 @@ func (s ScheduledActionType) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ScheduledActionType) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ScheduledActionType"} + if s.PauseCluster != nil { + if err := s.PauseCluster.Validate(); err != nil { + invalidParams.AddNested("PauseCluster", err.(request.ErrInvalidParams)) + } + } if s.ResizeCluster != nil { if err := s.ResizeCluster.Validate(); err != nil { invalidParams.AddNested("ResizeCluster", err.(request.ErrInvalidParams)) } } + if s.ResumeCluster != nil { + if err := s.ResumeCluster.Validate(); err != nil { + invalidParams.AddNested("ResumeCluster", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -22366,12 +23724,24 @@ func (s *ScheduledActionType) Validate() error { return nil } +// SetPauseCluster sets the PauseCluster field's value. +func (s *ScheduledActionType) SetPauseCluster(v *PauseClusterMessage) *ScheduledActionType { + s.PauseCluster = v + return s +} + // SetResizeCluster sets the ResizeCluster field's value. func (s *ScheduledActionType) SetResizeCluster(v *ResizeClusterMessage) *ScheduledActionType { s.ResizeCluster = v return s } +// SetResumeCluster sets the ResumeCluster field's value. +func (s *ScheduledActionType) SetResumeCluster(v *ResumeClusterMessage) *ScheduledActionType { + s.ResumeCluster = v + return s +} + // Describes a snapshot. type Snapshot struct { _ struct{} `type:"structure"` @@ -23319,6 +24689,103 @@ func (s *UpdateTarget) SetSupportedOperations(v []*SupportedOperation) *UpdateTa return s } +// Describes a usage limit object for a cluster. +type UsageLimit struct { + _ struct{} `type:"structure"` + + // The limit amount. If time-based, this amount is in minutes. If data-based, + // this amount is in terabytes (TB). + Amount *int64 `type:"long"` + + // The action that Amazon Redshift takes when the limit is reached. Possible + // values are: + // + // * log - To log an event in a system table. The default is log. + // + // * emit-metric - To emit CloudWatch metrics. + // + // * disable - To disable the feature until the next usage period begins. + BreachAction *string `type:"string" enum:"UsageLimitBreachAction"` + + // The identifier of the cluster with a usage limit. + ClusterIdentifier *string `type:"string"` + + // The Amazon Redshift feature to which the limit applies. + FeatureType *string `type:"string" enum:"UsageLimitFeatureType"` + + // The type of limit. Depending on the feature type, this can be based on a + // time duration or data size. + LimitType *string `type:"string" enum:"UsageLimitLimitType"` + + // The time period that the amount applies to. A weekly period begins on Sunday. + // The default is monthly. + Period *string `type:"string" enum:"UsageLimitPeriod"` + + // A list of tag instances. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // The identifier of the usage limit. + UsageLimitId *string `type:"string"` +} + +// String returns the string representation +func (s UsageLimit) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UsageLimit) GoString() string { + return s.String() +} + +// SetAmount sets the Amount field's value. +func (s *UsageLimit) SetAmount(v int64) *UsageLimit { + s.Amount = &v + return s +} + +// SetBreachAction sets the BreachAction field's value. +func (s *UsageLimit) SetBreachAction(v string) *UsageLimit { + s.BreachAction = &v + return s +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *UsageLimit) SetClusterIdentifier(v string) *UsageLimit { + s.ClusterIdentifier = &v + return s +} + +// SetFeatureType sets the FeatureType field's value. +func (s *UsageLimit) SetFeatureType(v string) *UsageLimit { + s.FeatureType = &v + return s +} + +// SetLimitType sets the LimitType field's value. +func (s *UsageLimit) SetLimitType(v string) *UsageLimit { + s.LimitType = &v + return s +} + +// SetPeriod sets the Period field's value. +func (s *UsageLimit) SetPeriod(v string) *UsageLimit { + s.Period = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *UsageLimit) SetTags(v []*Tag) *UsageLimit { + s.Tags = v + return s +} + +// SetUsageLimitId sets the UsageLimitId field's value. +func (s *UsageLimit) SetUsageLimitId(v string) *UsageLimit { + s.UsageLimitId = &v + return s +} + // Describes the members of a VPC security group. type VpcSecurityGroupMembership struct { _ struct{} `type:"structure"` @@ -23454,6 +24921,12 @@ const ( const ( // ScheduledActionTypeValuesResizeCluster is a ScheduledActionTypeValues enum value ScheduledActionTypeValuesResizeCluster = "ResizeCluster" + + // ScheduledActionTypeValuesPauseCluster is a ScheduledActionTypeValues enum value + ScheduledActionTypeValuesPauseCluster = "PauseCluster" + + // ScheduledActionTypeValuesResumeCluster is a ScheduledActionTypeValues enum value + ScheduledActionTypeValuesResumeCluster = "ResumeCluster" ) const ( @@ -23508,3 +24981,41 @@ const ( // TableRestoreStatusTypeCanceled is a TableRestoreStatusType enum value TableRestoreStatusTypeCanceled = "CANCELED" ) + +const ( + // UsageLimitBreachActionLog is a UsageLimitBreachAction enum value + UsageLimitBreachActionLog = "log" + + // UsageLimitBreachActionEmitMetric is a UsageLimitBreachAction enum value + UsageLimitBreachActionEmitMetric = "emit-metric" + + // UsageLimitBreachActionDisable is a UsageLimitBreachAction enum value + UsageLimitBreachActionDisable = "disable" +) + +const ( + // UsageLimitFeatureTypeSpectrum is a UsageLimitFeatureType enum value + UsageLimitFeatureTypeSpectrum = "spectrum" + + // UsageLimitFeatureTypeConcurrencyScaling is a UsageLimitFeatureType enum value + UsageLimitFeatureTypeConcurrencyScaling = "concurrency-scaling" +) + +const ( + // UsageLimitLimitTypeTime is a UsageLimitLimitType enum value + UsageLimitLimitTypeTime = "time" + + // UsageLimitLimitTypeDataScanned is a UsageLimitLimitType enum value + UsageLimitLimitTypeDataScanned = "data-scanned" +) + +const ( + // UsageLimitPeriodDaily is a UsageLimitPeriod enum value + UsageLimitPeriodDaily = "daily" + + // UsageLimitPeriodWeekly is a UsageLimitPeriod enum value + UsageLimitPeriodWeekly = "weekly" + + // UsageLimitPeriodMonthly is a UsageLimitPeriod enum value + UsageLimitPeriodMonthly = "monthly" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go index f710284ae43..ada8b21cb9f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go @@ -421,6 +421,12 @@ const ( // The tag is invalid. ErrCodeInvalidTagFault = "InvalidTagFault" + // ErrCodeInvalidUsageLimitFault for service response error code + // "InvalidUsageLimit". + // + // The usage limit is not valid. + ErrCodeInvalidUsageLimitFault = "InvalidUsageLimit" + // ErrCodeInvalidVPCNetworkStateFault for service response error code // "InvalidVPCNetworkStateFault". // @@ -695,4 +701,16 @@ const ( // // A request option was specified that is not supported. ErrCodeUnsupportedOptionFault = "UnsupportedOptionFault" + + // ErrCodeUsageLimitAlreadyExistsFault for service response error code + // "UsageLimitAlreadyExists". + // + // The usage limit already exists. + ErrCodeUsageLimitAlreadyExistsFault = "UsageLimitAlreadyExists" + + // ErrCodeUsageLimitNotFoundFault for service response error code + // "UsageLimitNotFound". + // + // The usage limit identifier can't be found. + ErrCodeUsageLimitNotFoundFault = "UsageLimitNotFound" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go index 4fa97b4d5e4..c339a2c8eec 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go @@ -1334,8 +1334,8 @@ func (c *ResourceGroups) UpdateGroupQueryWithContext(ctx aws.Context, input *Upd // The request does not comply with validation rules that are defined for the // request parameters. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1352,17 +1352,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1370,22 +1370,22 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } type CreateGroupInput struct { @@ -1582,8 +1582,8 @@ func (s *DeleteGroupOutput) SetGroup(v *Group) *DeleteGroupOutput { // The caller is not authorized to make the request. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -1600,17 +1600,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1618,22 +1618,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } type GetGroupInput struct { @@ -2017,8 +2017,8 @@ func (s *GroupQuery) SetResourceQuery(v *ResourceQuery) *GroupQuery { // An internal error occurred while processing the request. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2035,17 +2035,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2053,22 +2053,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ListGroupResourcesInput struct { @@ -2324,8 +2324,8 @@ func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { // The request uses an HTTP method which is not allowed for the specified resource. type MethodNotAllowedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2342,17 +2342,17 @@ func (s MethodNotAllowedException) GoString() string { func newErrorMethodNotAllowedException(v protocol.ResponseMetadata) error { return &MethodNotAllowedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MethodNotAllowedException) Code() string { +func (s *MethodNotAllowedException) Code() string { return "MethodNotAllowedException" } // Message returns the exception's message. -func (s MethodNotAllowedException) Message() string { +func (s *MethodNotAllowedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2360,28 +2360,28 @@ func (s MethodNotAllowedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MethodNotAllowedException) OrigErr() error { +func (s *MethodNotAllowedException) OrigErr() error { return nil } -func (s MethodNotAllowedException) Error() string { +func (s *MethodNotAllowedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MethodNotAllowedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MethodNotAllowedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MethodNotAllowedException) RequestID() string { - return s.respMetadata.RequestID +func (s *MethodNotAllowedException) RequestID() string { + return s.RespMetadata.RequestID } // One or more resources specified in the request do not exist. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2398,17 +2398,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2416,22 +2416,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A two-part error structure that can occur in ListGroupResources or SearchResources @@ -2859,8 +2859,8 @@ func (s *TagOutput) SetTags(v map[string]*string) *TagOutput { // The caller has exceeded throttling limits. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2877,17 +2877,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2895,29 +2895,29 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // The request has not been applied because it lacks valid authentication credentials // for the target resource. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" min:"1" type:"string"` } @@ -2934,17 +2934,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2952,22 +2952,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } type UntagInput struct { 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 c17f25d357d..6a1693133e0 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 @@ -60,13 +60,22 @@ func (c *Route53) AssociateVPCWithHostedZoneRequest(input *AssociateVPCWithHoste // Associates an Amazon VPC with a private hosted zone. // // To perform the association, the VPC and the private hosted zone must already -// exist. You can't convert a public hosted zone into a private hosted zone. +// exist. Also, you can't convert a public hosted zone into a private hosted +// zone. +// +// If you want to associate a VPC that was created by one AWS account with a +// private hosted zone that was created by a different account, do one of the +// following: +// +// * Use the AWS account that created the private hosted zone to submit a +// CreateVPCAssociationAuthorization (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateVPCAssociationAuthorization.html) +// request. Then use the account that created the VPC to submit an AssociateVPCWithHostedZone +// request. // -// If you want to associate a VPC that was created by using one AWS account -// with a private hosted zone that was created by using a different account, -// the AWS account that created the private hosted zone must first submit a -// CreateVPCAssociationAuthorization request. Then the account that created -// the VPC must submit an AssociateVPCWithHostedZone request. +// * If a subnet in the VPC was shared with another account, you can use +// the account that the subnet was shared with to submit an AssociateVPCWithHostedZone +// request. For more information about sharing subnets, see Working with +// Shared VPCs (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.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 @@ -95,22 +104,22 @@ func (c *Route53) AssociateVPCWithHostedZoneRequest(input *AssociateVPCWithHoste // 53 doesn't support associating a VPC with a public hosted zone. // // * ErrCodeConflictingDomainExists "ConflictingDomainExists" -// The cause of this error depends on whether you're trying to create a public -// or a private hosted zone: -// -// * Public hosted zone: Two hosted zones that have the same name or that -// have a parent/child relationship (example.com and test.example.com) can't -// have any common name servers. You tried to create a hosted zone that has -// the same name as an existing hosted zone or that's the parent or child -// of an existing hosted zone, and you specified a delegation set that shares -// one or more name servers with the existing hosted zone. For more information, -// see CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html). -// -// * Private hosted zone: You specified an Amazon VPC that you're already -// using for another hosted zone, and the domain that you specified for one -// of the hosted zones is a subdomain of the domain that you specified for -// the other hosted zone. For example, you can't use the same Amazon VPC -// for the hosted zones for example.com and test.example.com. +// The cause of this error depends on the operation that you're performing: +// +// * Create a public hosted zone: Two hosted zones that have the same name +// or that have a parent/child relationship (example.com and test.example.com) +// can't have any common name servers. You tried to create a hosted zone +// that has the same name as an existing hosted zone or that's the parent +// or child of an existing hosted zone, and you specified a delegation set +// that shares one or more name servers with the existing hosted zone. For +// more information, see CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html). +// +// * Create a private hosted zone: A hosted zone with the specified name +// already exists and is already associated with the Amazon VPC that you +// specified. +// +// * Associate VPCs with a private hosted zone: The VPC that you specified +// is already associated with another hosted zone that has the same name. // // * ErrCodeLimitsExceeded "LimitsExceeded" // This operation can't be completed either because the current account has @@ -195,27 +204,30 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // routes traffic for test.example.com to a web server that has an IP address // of 192.0.2.44. // +// Deleting Resource Record Sets +// +// To delete a resource record set, you must specify all the same values that +// you specified when you created it. +// // Change Batches and Transactional Changes // // The request body must include a document with a ChangeResourceRecordSetsRequest // element. The request body contains a list of change items, known as a change -// batch. Change batches are considered transactional changes. When using the -// Amazon Route 53 API to change resource record sets, Route 53 either makes -// all or none of the changes in a change batch request. This ensures that Route -// 53 never partially implements the intended changes to the resource record -// sets in a hosted zone. -// -// For example, a change batch request that deletes the CNAME record for www.example.com -// and creates an alias resource record set for www.example.com. Route 53 deletes -// the first resource record set and creates the second resource record set -// in a single operation. If either the DELETE or the CREATE action fails, then -// both changes (plus any other changes in the batch) fail, and the original -// CNAME record continues to exist. -// -// Due to the nature of transactional changes, you can't delete the same resource -// record set more than once in a single change batch. If you attempt to delete -// the same change batch more than once, Route 53 returns an InvalidChangeBatch -// error. +// batch. Change batches are considered transactional changes. Route 53 validates +// the changes in the request and then either makes all or none of the changes +// in the change batch request. This ensures that DNS routing isn't adversely +// affected by partial changes to the resource record sets in a hosted zone. +// +// For example, suppose a change batch request contains two changes: it deletes +// the CNAME resource record set for www.example.com and creates an alias resource +// record set for www.example.com. If validation for both records succeeds, +// Route 53 deletes the first resource record set and creates the second resource +// record set in a single operation. If validation for either the DELETE or +// the CREATE action fails, then the request is canceled, and the original CNAME +// record continues to exist. +// +// If you try to delete the same resource record set more than once in a single +// change batch, Route 53 returns an InvalidChangeBatch error. // // Traffic Flow // @@ -226,7 +238,7 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // names (such as example.com) or subdomain names (such as www.example.com), // in the same hosted zone or in multiple hosted zones. You can roll back the // updates if the new configuration isn't performing as expected. For more information, -// see Using Traffic Flow to Route DNS Traffic (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html) +// see Using Traffic Flow to Route DNS Traffic (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html) // in the Amazon Route 53 Developer Guide. // // Create, Delete, and Upsert @@ -495,7 +507,7 @@ func (c *Route53) CreateHealthCheckRequest(input *CreateHealthCheckInput) (req * // of the Amazon EC2 StatusCheckFailed metric, add an alarm to the metric, // and then create a health check that is based on the state of the alarm. // For information about creating CloudWatch metrics and alarms by using -// the CloudWatch console, see the Amazon CloudWatch User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html). +// the CloudWatch console, see the Amazon CloudWatch User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.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 @@ -620,10 +632,10 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // * You can't create a hosted zone for a top-level domain (TLD) such as // .com. // -// * For public hosted zones, Amazon Route 53 automatically creates a default -// SOA record and four NS records for the zone. For more information about -// SOA and NS records, see NS and SOA Records that Route 53 Creates for a -// Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) +// * For public hosted zones, Route 53 automatically creates a default SOA +// record and four NS records for the zone. For more information about SOA +// and NS records, see NS and SOA Records that Route 53 Creates for a Hosted +// Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) // in the Amazon Route 53 Developer Guide. If you want to use the same name // servers for multiple public hosted zones, you can optionally associate // a reusable delegation set with the hosted zone. See the DelegationSetId @@ -632,7 +644,7 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // * If your domain is registered with a registrar other than Route 53, you // must update the name servers with your registrar to make Route 53 the // DNS service for the domain. For more information, see Migrating DNS Service -// for an Existing Domain to Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) +// for an Existing Domain to Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) // in the Amazon Route 53 Developer Guide. // // When you submit a CreateHostedZone request, the initial status of the hosted @@ -689,22 +701,22 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // error, contact Customer Support. // // * ErrCodeConflictingDomainExists "ConflictingDomainExists" -// The cause of this error depends on whether you're trying to create a public -// or a private hosted zone: -// -// * Public hosted zone: Two hosted zones that have the same name or that -// have a parent/child relationship (example.com and test.example.com) can't -// have any common name servers. You tried to create a hosted zone that has -// the same name as an existing hosted zone or that's the parent or child -// of an existing hosted zone, and you specified a delegation set that shares -// one or more name servers with the existing hosted zone. For more information, -// see CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html). -// -// * Private hosted zone: You specified an Amazon VPC that you're already -// using for another hosted zone, and the domain that you specified for one -// of the hosted zones is a subdomain of the domain that you specified for -// the other hosted zone. For example, you can't use the same Amazon VPC -// for the hosted zones for example.com and test.example.com. +// The cause of this error depends on the operation that you're performing: +// +// * Create a public hosted zone: Two hosted zones that have the same name +// or that have a parent/child relationship (example.com and test.example.com) +// can't have any common name servers. You tried to create a hosted zone +// that has the same name as an existing hosted zone or that's the parent +// or child of an existing hosted zone, and you specified a delegation set +// that shares one or more name servers with the existing hosted zone. For +// more information, see CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html). +// +// * Create a private hosted zone: A hosted zone with the specified name +// already exists and is already associated with the Amazon VPC that you +// specified. +// +// * Associate VPCs with a private hosted zone: The VPC that you specified +// is already associated with another hosted zone that has the same name. // // * ErrCodeNoSuchDelegationSet "NoSuchDelegationSet" // A reusable delegation set with the specified ID does not exist. @@ -987,13 +999,16 @@ func (c *Route53) CreateReusableDelegationSetRequest(input *CreateReusableDelega // CreateReusableDelegationSet API operation for Amazon Route 53. // // Creates a delegation set (a group of four name servers) that can be reused -// by multiple hosted zones. If a hosted zoned ID is specified, CreateReusableDelegationSet -// marks the delegation set associated with that zone as reusable. +// by multiple hosted zones that were created by the same AWS account. +// +// You can also create a reusable delegation set that uses the four name servers +// that are associated with an existing hosted zone. Specify the hosted zone +// ID in the CreateReusableDelegationSet request. // // You can't associate a reusable delegation set with a private hosted zone. // // For information about using a reusable delegation set to configure white -// label name servers, see Configuring White Label Name Servers (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html). +// label name servers, see Configuring White Label Name Servers (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html). // // The process for migrating existing hosted zones to use a reusable delegation // set is comparable to the process for configuring white label name servers. @@ -1566,9 +1581,15 @@ func (c *Route53) DeleteHealthCheckRequest(input *DeleteHealthCheckInput) (req * // you delete a health check and you don't update the associated resource record // sets, the future status of the health check can't be predicted and may change. // This will affect the routing of DNS queries for your DNS failover configuration. -// For more information, see Replacing and Deleting Health Checks (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html#health-checks-deleting.html) +// For more information, see Replacing and Deleting Health Checks (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html#health-checks-deleting.html) // in the Amazon Route 53 Developer Guide. // +// If you're using AWS Cloud Map and you configured Cloud Map to create a Route +// 53 health check when you register an instance, you can't use the Route 53 +// DeleteHealthCheck command to delete the health check. The health check is +// deleted automatically when you deregister the instance; there can be a delay +// of several hours before the health check is deleted from Route 53. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2554,7 +2575,7 @@ func (c *Route53) GetCheckerIpRangesRequest(input *GetCheckerIpRangesInput) (req // // GetCheckerIpRanges still works, but we recommend that you download ip-ranges.json, // which includes IP address ranges for all AWS services. For more information, -// see IP Address Ranges of Amazon Route 53 Servers (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-ip-addresses.html) +// see IP Address Ranges of Amazon Route 53 Servers (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-ip-addresses.html) // in the Amazon Route 53 Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2657,7 +2678,9 @@ func (c *Route53) GetGeoLocationRequest(input *GetGeoLocationInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchGeoLocation "NoSuchGeoLocation" -// Amazon Route 53 doesn't support the specified geographic location. +// Amazon Route 53 doesn't support the specified geographic location. For a +// list of supported geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html) +// data type. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -3817,6 +3840,9 @@ func (c *Route53) ListGeoLocationsRequest(input *ListGeoLocationsInput) (req *re // the subdivisions for that country are listed in alphabetical order immediately // after the corresponding country. // +// For a list of supported geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html) +// data type. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4206,7 +4232,7 @@ func (c *Route53) ListHostedZonesByNameRequest(input *ListHostedZonesByNameInput // // The labels are reversed and alphabetized using the escaped value. For more // information about valid domain name formats, including internationalized -// domain names, see DNS Domain Name Format (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) +// domain names, see DNS Domain Name Format (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) // in the Amazon Route 53 Developer Guide. // // Route 53 returns up to 100 items in each response. If you have a lot of hosted @@ -4302,6 +4328,12 @@ func (c *Route53) ListQueryLoggingConfigsRequest(input *ListQueryLoggingConfigsI Name: opListQueryLoggingConfigs, HTTPMethod: "GET", HTTPPath: "/2013-04-01/queryloggingconfig", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -4364,6 +4396,58 @@ func (c *Route53) ListQueryLoggingConfigsWithContext(ctx aws.Context, input *Lis return out, req.Send() } +// ListQueryLoggingConfigsPages iterates over the pages of a ListQueryLoggingConfigs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListQueryLoggingConfigs 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 ListQueryLoggingConfigs operation. +// pageNum := 0 +// err := client.ListQueryLoggingConfigsPages(params, +// func(page *route53.ListQueryLoggingConfigsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53) ListQueryLoggingConfigsPages(input *ListQueryLoggingConfigsInput, fn func(*ListQueryLoggingConfigsOutput, bool) bool) error { + return c.ListQueryLoggingConfigsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListQueryLoggingConfigsPagesWithContext same as ListQueryLoggingConfigsPages 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 *Route53) ListQueryLoggingConfigsPagesWithContext(ctx aws.Context, input *ListQueryLoggingConfigsInput, fn func(*ListQueryLoggingConfigsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListQueryLoggingConfigsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListQueryLoggingConfigsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListQueryLoggingConfigsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListResourceRecordSets = "ListResourceRecordSets" // ListResourceRecordSetsRequest generates a "aws/request.Request" representing the @@ -5515,7 +5599,7 @@ func (c *Route53) UpdateHealthCheckRequest(input *UpdateHealthCheckInput) (req * // Updates an existing health check. Note that some values can't be updated. // // For more information about updating health checks, see Creating, Updating, -// and Deleting Health Checks (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html) +// and Deleting Health Checks (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html) // in the Amazon Route 53 Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5908,7 +5992,7 @@ type AlarmIdentifier struct { // Route 53 supports CloudWatch alarms with the following features: // // * Standard-resolution metrics. High-resolution metrics aren't supported. - // For more information, see High-Resolution Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) + // For more information, see High-Resolution Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) // in the Amazon CloudWatch User Guide. // // * Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended @@ -5921,9 +6005,8 @@ type AlarmIdentifier struct { // determine whether this health check is healthy, the region that the alarm // was created in. // - // For the current list of CloudWatch regions, see Amazon CloudWatch (http://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region) - // in the AWS Regions and Endpoints chapter of the Amazon Web Services General - // Reference. + // For the current list of CloudWatch regions, see Amazon CloudWatch (https://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region) + // in the AWS Service Endpoints chapter of the Amazon Web Services General Reference. // // Region is a required field Region *string `min:"1" type:"string" required:"true" enum:"CloudWatchRegion"` @@ -5983,7 +6066,7 @@ func (s *AlarmIdentifier) SetRegion(v string) *AlarmIdentifier { // record sets in a private hosted zone is unsupported. // // * For information about creating failover resource record sets in a private -// hosted zone, see Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html). +// hosted zone, see Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html). type AliasTarget struct { _ struct{} `type:"structure"` @@ -6018,7 +6101,7 @@ type AliasTarget struct { // the name of the resource record set. For example, if the name of the resource // record set is acme.example.com, your CloudFront distribution must include // acme.example.com as one of the alternate domain names. For more information, - // see Using Alternate Domain Names (CNAMEs) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html) + // see Using Alternate Domain Names (CNAMEs) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html) // in the Amazon CloudFront Developer Guide. // // You can't create a resource record set in a private hosted zone to route @@ -6051,17 +6134,17 @@ type AliasTarget struct { // // * AWS Management Console: For information about how to get the value by // using the console, see Using Custom Domains with AWS Elastic Beanstalk - // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) + // (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) // in the AWS Elastic Beanstalk Developer Guide. // // * Elastic Beanstalk API: Use the DescribeEnvironments action to get the // value of the CNAME attribute. For more information, see DescribeEnvironments - // (http://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html) + // (https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html) // in the AWS Elastic Beanstalk API Reference. // // * AWS CLI: Use the describe-environments command to get the value of the - // CNAME attribute. For more information, see describe-environments (http://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/describe-environments.html) - // in the AWS Command Line Interface Reference. + // CNAME attribute. For more information, see describe-environments (https://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/describe-environments.html) + // in the AWS CLI Command Reference. // // ELB load balancer // @@ -6077,22 +6160,31 @@ type AliasTarget struct { // // * Elastic Load Balancing API: Use DescribeLoadBalancers to get the value // of DNSName. For more information, see the applicable guide: Classic Load - // Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) - // Application and Network Load Balancers: DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // Balancers: DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) + // Application and Network Load Balancers: DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) // // * AWS CLI: Use describe-load-balancers to get the value of DNSName. For // more information, see the applicable guide: Classic Load Balancers: describe-load-balancers // (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html) // Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) // + // AWS Global Accelerator accelerator + // + // Specify the DNS name for your accelerator: + // + // * Global Accelerator API: To get the DNS name, use DescribeAccelerator + // (https://docs.aws.amazon.com/global-accelerator/latest/api/API_DescribeAccelerator.html). + // + // * AWS CLI: To get the DNS name, use describe-accelerator (https://docs.aws.amazon.com/cli/latest/reference/globalaccelerator/describe-accelerator.html). + // // Amazon S3 bucket that is configured as a static website // // Specify the domain name of the Amazon S3 website endpoint that you created // the bucket in, for example, s3-website.us-east-2.amazonaws.com. For more - // information about valid values, see the table Amazon Simple Storage Service - // (S3) Website Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) + // information about valid values, see the table Amazon S3 Website Endpoints + // (https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints) // in the Amazon Web Services General Reference. For more information about - // using S3 buckets for websites, see Getting Started with Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) + // using S3 buckets for websites, see Getting Started with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) // in the Amazon Route 53 Developer Guide. // // Another Route 53 resource record set @@ -6173,11 +6265,11 @@ type AliasTarget struct { // records (for example, a group of weighted records) but is not another alias // record, we recommend that you associate a health check with all of the records // in the alias target. For more information, see What Happens When You Omit - // Health Checks? (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) + // Health Checks? (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) // in the Amazon Route 53 Developer Guide. // // For more information and examples, see Amazon Route 53 Health Checks and - // DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // DNS Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) // in the Amazon Route 53 Developer Guide. // // EvaluateTargetHealth is a required field @@ -6210,8 +6302,8 @@ type AliasTarget struct { // // Specify the hosted zone ID for the region that you created the environment // in. The environment must have a regionalized subdomain. For a list of regions - // and the corresponding hosted zone IDs, see AWS Elastic Beanstalk (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) - // in the "AWS Regions and Endpoints" chapter of the Amazon Web Services General + // and the corresponding hosted zone IDs, see AWS Elastic Beanstalk (https://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) + // in the "AWS Service Endpoints" chapter of the Amazon Web Services General // Reference. // // ELB load balancer @@ -6219,11 +6311,12 @@ type AliasTarget struct { // Specify the value of the hosted zone ID for the load balancer. Use the following // methods to get the hosted zone ID: // - // * Elastic Load Balancing (https://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) - // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services - // General Reference: Use the value that corresponds with the region that - // you created your load balancer in. Note that there are separate columns - // for Application and Classic Load Balancers and for Network Load Balancers. + // * Service Endpoints (https://docs.aws.amazon.com/general/latest/gr/elb.html) + // table in the "Elastic Load Balancing Endpoints and Quotas" topic in the + // Amazon Web Services General Reference: Use the value that corresponds + // with the region that you created your load balancer in. Note that there + // are separate columns for Application and Classic Load Balancers and for + // Network Load Balancers. // // * AWS Management Console: Go to the Amazon EC2 page, choose Load Balancers // in the navigation pane, select the load balancer, and get the value of @@ -6231,9 +6324,9 @@ type AliasTarget struct { // // * Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable // value. For more information, see the applicable guide: Classic Load Balancers: - // Use DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) + // Use DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html) // to get the value of CanonicalHostedZoneNameId. Application and Network - // Load Balancers: Use DescribeLoadBalancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // Load Balancers: Use DescribeLoadBalancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) // to get the value of CanonicalHostedZoneId. // // * AWS CLI: Use describe-load-balancers to get the applicable value. For @@ -6243,13 +6336,16 @@ type AliasTarget struct { // Load Balancers: Use describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) // to get the value of CanonicalHostedZoneId. // + // AWS Global Accelerator accelerator + // + // Specify Z2BJ6XQ5FK7U4H. + // // An Amazon S3 bucket configured as a static website // // Specify the hosted zone ID for the region that you created the bucket in. - // For more information about valid values, see the Amazon Simple Storage Service - // Website Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services - // General Reference. + // For more information about valid values, see the table Amazon S3 Website + // Endpoints (https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints) + // in the Amazon Web Services General Reference. // // Another Route 53 resource record set in your hosted zone // @@ -6822,7 +6918,7 @@ type CloudWatchAlarmConfiguration struct { // For the metric that the CloudWatch alarm is associated with, a complex type // that contains information about the dimensions for the metric. For information, - // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) + // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) // in the Amazon CloudWatch User Guide. Dimensions []*Dimension `locationNameList:"Dimension" type:"list"` @@ -6838,7 +6934,7 @@ type CloudWatchAlarmConfiguration struct { MetricName *string `min:"1" type:"string" required:"true"` // The namespace of the metric that the alarm is associated with. For more information, - // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) + // see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html) // in the Amazon CloudWatch User Guide. // // Namespace is a required field @@ -8521,17 +8617,39 @@ type GeoLocation struct { // The two-letter code for the continent. // - // Valid values: AF | AN | AS | EU | OC | NA | SA + // Amazon Route 53 supports the following continent codes: + // + // * AF: Africa + // + // * AN: Antarctica + // + // * AS: Asia + // + // * EU: Europe + // + // * OC: Oceania + // + // * NA: North America + // + // * SA: South America // // Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode // returns an InvalidInput error. ContinentCode *string `min:"2" type:"string"` - // The two-letter code for the country. + // For geolocation resource record sets, the two-letter code for a country. + // + // Amazon Route 53 uses the two-letter country codes that are specified in ISO + // standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). CountryCode *string `min:"1" type:"string"` - // The code for the subdivision. Route 53 currently supports only states in - // the United States. + // For geolocation resource record sets, the two-letter code for a state of + // the United States. Route 53 doesn't support any other values for SubdivisionCode. + // For a list of state abbreviations, see Appendix B: Two–Letter State and + // Possession Abbreviations (https://pe.usps.com/text/pub28/28apb.htm) on the + // United States Postal Service website. + // + // If you specify subdivisioncode, you must also specify US for CountryCode. SubdivisionCode *string `min:"1" type:"string"` } @@ -8874,7 +8992,8 @@ func (s *GetCheckerIpRangesOutput) SetCheckerIpRanges(v []*string) *GetCheckerIp type GetGeoLocationInput struct { _ struct{} `locationName:"GetGeoLocationRequest" type:"structure"` - // Amazon Route 53 supports the following continent codes: + // For geolocation resource record sets, a two-letter abbreviation that identifies + // a continent. Amazon Route 53 supports the following continent codes: // // * AF: Africa // @@ -8895,10 +9014,12 @@ type GetGeoLocationInput struct { // standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). CountryCode *string `location:"querystring" locationName:"countrycode" min:"1" type:"string"` - // Amazon Route 53 uses the one- to three-letter subdivision codes that are - // specified in ISO standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - // Route 53 doesn't support subdivision codes for all countries. If you specify - // subdivisioncode, you must also specify countrycode. + // For SubdivisionCode, Amazon Route 53 supports only states of the United States. + // For a list of state abbreviations, see Appendix B: Two–Letter State and + // Possession Abbreviations (https://pe.usps.com/text/pub28/28apb.htm) on the + // United States Postal Service website. + // + // If you specify subdivisioncode, you must also specify US for CountryCode. SubdivisionCode *string `location:"querystring" locationName:"subdivisioncode" min:"1" type:"string"` } @@ -10068,7 +10189,7 @@ type HealthCheckConfig struct { // The number of consecutive health checks that an endpoint must pass or fail // for Amazon Route 53 to change the current status of the endpoint from unhealthy // to healthy or vice versa. For more information, see How Amazon Route 53 Determines - // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Amazon Route 53 Developer Guide. // // If you don't specify a value for FailureThreshold, the default value is three @@ -10212,8 +10333,11 @@ type HealthCheckConfig struct { // You can't change the value of MeasureLatency after you create a health check. MeasureLatency *bool `type:"boolean"` - // The port on the endpoint on which you want Amazon Route 53 to perform health - // checks. Specify a value for Port only when you specify a value for IPAddress. + // The port on the endpoint that you want Amazon Route 53 to perform health + // checks on. + // + // Don't specify a value for Port when you specify a value for Type of CLOUDWATCH_METRIC + // or CALCULATED. Port *int64 `min:"1" type:"integer"` // A complex type that contains one Region element for each region from which @@ -10245,7 +10369,7 @@ type HealthCheckConfig struct { // parameters, for example, /welcome.html?language=jp&login=y. ResourcePath *string `type:"string"` - // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that + // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH, the string that // you want Amazon Route 53 to search for in the response body from the specified // resource. If the string appears in the response body, Route 53 considers // the resource healthy. @@ -10719,18 +10843,15 @@ type ListGeoLocationsInput struct { // a page or more of results, if IsTruncated is true, and if NextCountryCode // from the previous response has a value, enter that value in startcountrycode // to return the next page of results. - // - // Route 53 uses the two-letter country codes that are specified in ISO standard - // 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). StartCountryCode *string `location:"querystring" locationName:"startcountrycode" min:"1" type:"string"` - // The code for the subdivision (for example, state or province) with which - // you want to start listing locations that Amazon Route 53 supports for geolocation. - // If Route 53 has already returned a page or more of results, if IsTruncated - // is true, and if NextSubdivisionCode from the previous response has a value, - // enter that value in startsubdivisioncode to return the next page of results. + // The code for the state of the United States with which you want to start + // listing locations that Amazon Route 53 supports for geolocation. If Route + // 53 has already returned a page or more of results, if IsTruncated is true, + // and if NextSubdivisionCode from the previous response has a value, enter + // that value in startsubdivisioncode to return the next page of results. // - // To list subdivisions of a country, you must include both startcountrycode + // To list subdivisions (U.S. states), you must include both startcountrycode // and startsubdivisioncode. StartSubdivisionCode *string `location:"querystring" locationName:"startsubdivisioncode" min:"1" type:"string"` } @@ -11417,7 +11538,9 @@ type ListResourceRecordSetsInput struct { StartRecordIdentifier *string `location:"querystring" locationName:"identifier" min:"1" type:"string"` // The first name in the lexicographic ordering of resource record sets that - // you want to list. + // you want to list. If the specified record name doesn't exist, the results + // begin with the first resource record set that has a name greater than the + // value of name. StartRecordName *string `location:"querystring" locationName:"name" type:"string"` // The type of resource record set to begin the record listing from. @@ -11438,9 +11561,9 @@ type ListResourceRecordSetsInput struct { // // * Elastic Load Balancing load balancer: A | AAAA // - // * Amazon S3 bucket: A + // * S3 bucket: A // - // * Amazon VPC interface VPC endpoint: A + // * VPC interface VPC endpoint: A // // * Another resource record set in this hosted zone: The type of the resource // record set that the alias references. @@ -12950,7 +13073,7 @@ type ResourceRecordSet struct { // record sets in a private hosted zone is unsupported. // // * For information about creating failover resource record sets in a private - // hosted zone, see Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // hosted zone, see Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) // in the Amazon Route 53 Developer Guide. AliasTarget *AliasTarget `type:"structure"` @@ -12990,9 +13113,9 @@ type ResourceRecordSet struct { // For more information about configuring failover for Route 53, see the following // topics in the Amazon Route 53 Developer Guide: // - // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // * Route 53 Health Checks and DNS Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) // - // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // * Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) Failover *string `type:"string" enum:"ResourceRecordSetFailover"` // Geolocation resource record sets only: A complex type that lets you control @@ -13001,8 +13124,8 @@ type ResourceRecordSet struct { // to a web server with an IP address of 192.0.2.111, create a resource record // set with a Type of A and a ContinentCode of AF. // - // Creating geolocation and geolocation alias resource record sets in private - // hosted zones is not supported. + // Although creating geolocation and geolocation alias resource record sets + // in a private hosted zone is allowed, it's not supported. // // If you create separate resource record sets for overlapping geographic regions // (for example, one resource record set for a continent and one for a country @@ -13021,11 +13144,12 @@ type ResourceRecordSet struct { // addresses aren't mapped to geographic locations, so even if you create geolocation // resource record sets that cover all seven continents, Route 53 will receive // some DNS queries from locations that it can't identify. We recommend that - // you create a resource record set for which the value of CountryCode is *, - // which handles both queries that come from locations for which you haven't - // created geolocation resource record sets and queries from IP addresses that - // aren't mapped to a location. If you don't create a * resource record set, - // Route 53 returns a "no answer" response for queries from those locations. + // you create a resource record set for which the value of CountryCode is *. + // Two groups of queries are routed to the resource that you specify in this + // record: queries that come from locations for which you haven't created geolocation + // resource record sets and queries from IP addresses that aren't mapped to + // a location. If you don't create a * resource record set, Route 53 returns + // a "no answer" response for queries from those locations. // // You can't create non-geolocation resource record sets that have the same // values for the Name and Type elements as geolocation resource record sets. @@ -13058,9 +13182,9 @@ type ResourceRecordSet struct { // // * How Amazon Route 53 Determines Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // - // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // * Route 53 Health Checks and DNS Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) // - // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // * Configuring Failover in a Private Hosted Zone (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) // // When to Specify HealthCheckId // @@ -13173,7 +13297,7 @@ type ResourceRecordSet struct { // // For information about how to specify characters other than a-z, 0-9, and // - (hyphen) and how to specify internationalized domain names, see DNS Domain - // Name Format (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) + // Name Format (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) // in the Amazon Route 53 Developer Guide. // // You can use the asterisk (*) wildcard to replace the leftmost label in a @@ -13203,8 +13327,8 @@ type ResourceRecordSet struct { // and is referred to by an IP address or a DNS domain name, depending on the // record type. // - // Creating latency and latency alias resource record sets in private hosted - // zones is not supported. + // Although creating latency and latency alias resource record sets in a private + // hosted zone is allowed, it's not supported. // // When Amazon Route 53 receives a DNS query for a domain name and type for // which you have created latency resource record sets, Route 53 selects the @@ -13278,7 +13402,7 @@ type ResourceRecordSet struct { TrafficPolicyInstanceId *string `min:"1" type:"string"` // The DNS record type. For information about different record types and how - // data is encoded for them, see Supported DNS Resource Record Types (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html) + // data is encoded for them, see Supported DNS Resource Record Types (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html) // in the Amazon Route 53 Developer Guide. // // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX @@ -13309,8 +13433,7 @@ type ResourceRecordSet struct { // create two resource record sets to route traffic to your distribution, // one with a value of A and one with a value of AAAA. // - // * AWS Elastic Beanstalk environment that has a regionalized subdomain: - // A + // * Amazon API Gateway environment that has a regionalized subdomain: A // // * ELB load balancers: A | AAAA // @@ -13358,7 +13481,7 @@ type ResourceRecordSet struct { // of DNS name and type, traffic is routed to all resources with equal probability. // The effect of setting Weight to 0 is different when you associate health // checks with weighted resource record sets. For more information, see Options - // for Configuring Route 53 Active-Active and Active-Passive Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) + // for Configuring Route 53 Active-Active and Active-Passive Failover (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) // in the Amazon Route 53 Developer Guide. Weight *int64 `type:"long"` } @@ -14231,7 +14354,7 @@ type UpdateHealthCheckInput struct { // The number of consecutive health checks that an endpoint must pass or fail // for Amazon Route 53 to change the current status of the endpoint from unhealthy // to healthy or vice versa. For more information, see How Amazon Route 53 Determines - // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Amazon Route 53 Developer Guide. // // If you don't specify a value for FailureThreshold, the default value is three @@ -14402,8 +14525,11 @@ type UpdateHealthCheckInput struct { // would be considered healthy. Inverted *bool `type:"boolean"` - // The port on the endpoint on which you want Amazon Route 53 to perform health - // checks. + // The port on the endpoint that you want Amazon Route 53 to perform health + // checks on. + // + // Don't specify a value for Port when you specify a value for Type of CLOUDWATCH_METRIC + // or CALCULATED. Port *int64 `min:"1" type:"integer"` // A complex type that contains one Region element for each region that you @@ -14436,7 +14562,7 @@ type UpdateHealthCheckInput struct { // Specify this value only if you want to change it. ResourcePath *string `type:"string"` - // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that + // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH, the string that // you want Amazon Route 53 to search for in the response body from the specified // resource. If the string appears in the response body, Route 53 considers // the resource healthy. (You can't change the value of Type when you update @@ -15064,6 +15190,24 @@ const ( // CloudWatchRegionCnNorth1 is a CloudWatchRegion enum value CloudWatchRegionCnNorth1 = "cn-north-1" + + // CloudWatchRegionAfSouth1 is a CloudWatchRegion enum value + CloudWatchRegionAfSouth1 = "af-south-1" + + // CloudWatchRegionEuSouth1 is a CloudWatchRegion enum value + CloudWatchRegionEuSouth1 = "eu-south-1" + + // CloudWatchRegionUsGovWest1 is a CloudWatchRegion enum value + CloudWatchRegionUsGovWest1 = "us-gov-west-1" + + // CloudWatchRegionUsGovEast1 is a CloudWatchRegion enum value + CloudWatchRegionUsGovEast1 = "us-gov-east-1" + + // CloudWatchRegionUsIsoEast1 is a CloudWatchRegion enum value + CloudWatchRegionUsIsoEast1 = "us-iso-east-1" + + // CloudWatchRegionUsIsobEast1 is a CloudWatchRegion enum value + CloudWatchRegionUsIsobEast1 = "us-isob-east-1" ) const ( @@ -15271,6 +15415,12 @@ const ( // ResourceRecordSetRegionApSouth1 is a ResourceRecordSetRegion enum value ResourceRecordSetRegionApSouth1 = "ap-south-1" + + // ResourceRecordSetRegionAfSouth1 is a ResourceRecordSetRegion enum value + ResourceRecordSetRegionAfSouth1 = "af-south-1" + + // ResourceRecordSetRegionEuSouth1 is a ResourceRecordSetRegion enum value + ResourceRecordSetRegionEuSouth1 = "eu-south-1" ) const ( @@ -15334,6 +15484,18 @@ const ( // VPCRegionMeSouth1 is a VPCRegion enum value VPCRegionMeSouth1 = "me-south-1" + // VPCRegionUsGovWest1 is a VPCRegion enum value + VPCRegionUsGovWest1 = "us-gov-west-1" + + // VPCRegionUsGovEast1 is a VPCRegion enum value + VPCRegionUsGovEast1 = "us-gov-east-1" + + // VPCRegionUsIsoEast1 is a VPCRegion enum value + VPCRegionUsIsoEast1 = "us-iso-east-1" + + // VPCRegionUsIsobEast1 is a VPCRegion enum value + VPCRegionUsIsobEast1 = "us-isob-east-1" + // VPCRegionApSoutheast1 is a VPCRegion enum value VPCRegionApSoutheast1 = "ap-southeast-1" @@ -15363,4 +15525,10 @@ const ( // VPCRegionCnNorth1 is a VPCRegion enum value VPCRegionCnNorth1 = "cn-north-1" + + // VPCRegionAfSouth1 is a VPCRegion enum value + VPCRegionAfSouth1 = "af-south-1" + + // VPCRegionEuSouth1 is a VPCRegion enum value + VPCRegionEuSouth1 = "eu-south-1" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go index ce86bd613a4..23b4270b949 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go @@ -14,22 +14,22 @@ const ( // ErrCodeConflictingDomainExists for service response error code // "ConflictingDomainExists". // - // The cause of this error depends on whether you're trying to create a public - // or a private hosted zone: - // - // * Public hosted zone: Two hosted zones that have the same name or that - // have a parent/child relationship (example.com and test.example.com) can't - // have any common name servers. You tried to create a hosted zone that has - // the same name as an existing hosted zone or that's the parent or child - // of an existing hosted zone, and you specified a delegation set that shares - // one or more name servers with the existing hosted zone. For more information, - // see CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html). - // - // * Private hosted zone: You specified an Amazon VPC that you're already - // using for another hosted zone, and the domain that you specified for one - // of the hosted zones is a subdomain of the domain that you specified for - // the other hosted zone. For example, you can't use the same Amazon VPC - // for the hosted zones for example.com and test.example.com. + // The cause of this error depends on the operation that you're performing: + // + // * Create a public hosted zone: Two hosted zones that have the same name + // or that have a parent/child relationship (example.com and test.example.com) + // can't have any common name servers. You tried to create a hosted zone + // that has the same name as an existing hosted zone or that's the parent + // or child of an existing hosted zone, and you specified a delegation set + // that shares one or more name servers with the existing hosted zone. For + // more information, see CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html). + // + // * Create a private hosted zone: A hosted zone with the specified name + // already exists and is already associated with the Amazon VPC that you + // specified. + // + // * Associate VPCs with a private hosted zone: The VPC that you specified + // is already associated with another hosted zone that has the same name. ErrCodeConflictingDomainExists = "ConflictingDomainExists" // ErrCodeConflictingTypes for service response error code @@ -240,7 +240,9 @@ const ( // ErrCodeNoSuchGeoLocation for service response error code // "NoSuchGeoLocation". // - // Amazon Route 53 doesn't support the specified geographic location. + // Amazon Route 53 doesn't support the specified geographic location. For a + // list of supported geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html) + // data type. ErrCodeNoSuchGeoLocation = "NoSuchGeoLocation" // ErrCodeNoSuchHealthCheck for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53domains/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53domains/api.go new file mode 100644 index 00000000000..e3e02e0b0ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53domains/api.go @@ -0,0 +1,7731 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package route53domains + +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 opAcceptDomainTransferFromAnotherAwsAccount = "AcceptDomainTransferFromAnotherAwsAccount" + +// AcceptDomainTransferFromAnotherAwsAccountRequest generates a "aws/request.Request" representing the +// client's request for the AcceptDomainTransferFromAnotherAwsAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AcceptDomainTransferFromAnotherAwsAccount for more information on using the AcceptDomainTransferFromAnotherAwsAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AcceptDomainTransferFromAnotherAwsAccountRequest method. +// req, resp := client.AcceptDomainTransferFromAnotherAwsAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/AcceptDomainTransferFromAnotherAwsAccount +func (c *Route53Domains) AcceptDomainTransferFromAnotherAwsAccountRequest(input *AcceptDomainTransferFromAnotherAwsAccountInput) (req *request.Request, output *AcceptDomainTransferFromAnotherAwsAccountOutput) { + op := &request.Operation{ + Name: opAcceptDomainTransferFromAnotherAwsAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptDomainTransferFromAnotherAwsAccountInput{} + } + + output = &AcceptDomainTransferFromAnotherAwsAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptDomainTransferFromAnotherAwsAccount API operation for Amazon Route 53 Domains. +// +// Accepts the transfer of a domain from another AWS account to the current +// AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount +// (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html). +// +// Use either ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html) +// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// provides additional information, for example, Domain Transfer from Aws Account +// 111122223333 has been cancelled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation AcceptDomainTransferFromAnotherAwsAccount for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * DomainLimitExceeded +// The number of domains has exceeded the allowed threshold for the account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/AcceptDomainTransferFromAnotherAwsAccount +func (c *Route53Domains) AcceptDomainTransferFromAnotherAwsAccount(input *AcceptDomainTransferFromAnotherAwsAccountInput) (*AcceptDomainTransferFromAnotherAwsAccountOutput, error) { + req, out := c.AcceptDomainTransferFromAnotherAwsAccountRequest(input) + return out, req.Send() +} + +// AcceptDomainTransferFromAnotherAwsAccountWithContext is the same as AcceptDomainTransferFromAnotherAwsAccount with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptDomainTransferFromAnotherAwsAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) AcceptDomainTransferFromAnotherAwsAccountWithContext(ctx aws.Context, input *AcceptDomainTransferFromAnotherAwsAccountInput, opts ...request.Option) (*AcceptDomainTransferFromAnotherAwsAccountOutput, error) { + req, out := c.AcceptDomainTransferFromAnotherAwsAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelDomainTransferToAnotherAwsAccount = "CancelDomainTransferToAnotherAwsAccount" + +// CancelDomainTransferToAnotherAwsAccountRequest generates a "aws/request.Request" representing the +// client's request for the CancelDomainTransferToAnotherAwsAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelDomainTransferToAnotherAwsAccount for more information on using the CancelDomainTransferToAnotherAwsAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelDomainTransferToAnotherAwsAccountRequest method. +// req, resp := client.CancelDomainTransferToAnotherAwsAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/CancelDomainTransferToAnotherAwsAccount +func (c *Route53Domains) CancelDomainTransferToAnotherAwsAccountRequest(input *CancelDomainTransferToAnotherAwsAccountInput) (req *request.Request, output *CancelDomainTransferToAnotherAwsAccountOutput) { + op := &request.Operation{ + Name: opCancelDomainTransferToAnotherAwsAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelDomainTransferToAnotherAwsAccountInput{} + } + + output = &CancelDomainTransferToAnotherAwsAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelDomainTransferToAnotherAwsAccount API operation for Amazon Route 53 Domains. +// +// Cancels the transfer of a domain from the current AWS account to another +// AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount +// (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html). +// +// You must cancel the transfer before the other AWS account accepts the transfer +// using AcceptDomainTransferFromAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html). +// +// Use either ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html) +// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// provides additional information, for example, Domain Transfer from Aws Account +// 111122223333 has been cancelled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation CancelDomainTransferToAnotherAwsAccount for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/CancelDomainTransferToAnotherAwsAccount +func (c *Route53Domains) CancelDomainTransferToAnotherAwsAccount(input *CancelDomainTransferToAnotherAwsAccountInput) (*CancelDomainTransferToAnotherAwsAccountOutput, error) { + req, out := c.CancelDomainTransferToAnotherAwsAccountRequest(input) + return out, req.Send() +} + +// CancelDomainTransferToAnotherAwsAccountWithContext is the same as CancelDomainTransferToAnotherAwsAccount with the addition of +// the ability to pass a context and additional request options. +// +// See CancelDomainTransferToAnotherAwsAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) CancelDomainTransferToAnotherAwsAccountWithContext(ctx aws.Context, input *CancelDomainTransferToAnotherAwsAccountInput, opts ...request.Option) (*CancelDomainTransferToAnotherAwsAccountOutput, error) { + req, out := c.CancelDomainTransferToAnotherAwsAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCheckDomainAvailability = "CheckDomainAvailability" + +// CheckDomainAvailabilityRequest generates a "aws/request.Request" representing the +// client's request for the CheckDomainAvailability operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CheckDomainAvailability for more information on using the CheckDomainAvailability +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CheckDomainAvailabilityRequest method. +// req, resp := client.CheckDomainAvailabilityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/CheckDomainAvailability +func (c *Route53Domains) CheckDomainAvailabilityRequest(input *CheckDomainAvailabilityInput) (req *request.Request, output *CheckDomainAvailabilityOutput) { + op := &request.Operation{ + Name: opCheckDomainAvailability, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CheckDomainAvailabilityInput{} + } + + output = &CheckDomainAvailabilityOutput{} + req = c.newRequest(op, input, output) + return +} + +// CheckDomainAvailability API operation for Amazon Route 53 Domains. +// +// This operation checks the availability of one domain name. Note that if the +// availability status of a domain is pending, you must submit another request +// to determine the availability of the domain name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation CheckDomainAvailability for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/CheckDomainAvailability +func (c *Route53Domains) CheckDomainAvailability(input *CheckDomainAvailabilityInput) (*CheckDomainAvailabilityOutput, error) { + req, out := c.CheckDomainAvailabilityRequest(input) + return out, req.Send() +} + +// CheckDomainAvailabilityWithContext is the same as CheckDomainAvailability with the addition of +// the ability to pass a context and additional request options. +// +// See CheckDomainAvailability for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) CheckDomainAvailabilityWithContext(ctx aws.Context, input *CheckDomainAvailabilityInput, opts ...request.Option) (*CheckDomainAvailabilityOutput, error) { + req, out := c.CheckDomainAvailabilityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCheckDomainTransferability = "CheckDomainTransferability" + +// CheckDomainTransferabilityRequest generates a "aws/request.Request" representing the +// client's request for the CheckDomainTransferability operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CheckDomainTransferability for more information on using the CheckDomainTransferability +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CheckDomainTransferabilityRequest method. +// req, resp := client.CheckDomainTransferabilityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/CheckDomainTransferability +func (c *Route53Domains) CheckDomainTransferabilityRequest(input *CheckDomainTransferabilityInput) (req *request.Request, output *CheckDomainTransferabilityOutput) { + op := &request.Operation{ + Name: opCheckDomainTransferability, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CheckDomainTransferabilityInput{} + } + + output = &CheckDomainTransferabilityOutput{} + req = c.newRequest(op, input, output) + return +} + +// CheckDomainTransferability API operation for Amazon Route 53 Domains. +// +// Checks whether a domain name can be transferred to Amazon Route 53. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation CheckDomainTransferability for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/CheckDomainTransferability +func (c *Route53Domains) CheckDomainTransferability(input *CheckDomainTransferabilityInput) (*CheckDomainTransferabilityOutput, error) { + req, out := c.CheckDomainTransferabilityRequest(input) + return out, req.Send() +} + +// CheckDomainTransferabilityWithContext is the same as CheckDomainTransferability with the addition of +// the ability to pass a context and additional request options. +// +// See CheckDomainTransferability for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) CheckDomainTransferabilityWithContext(ctx aws.Context, input *CheckDomainTransferabilityInput, opts ...request.Option) (*CheckDomainTransferabilityOutput, error) { + req, out := c.CheckDomainTransferabilityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTagsForDomain = "DeleteTagsForDomain" + +// DeleteTagsForDomainRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTagsForDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTagsForDomain for more information on using the DeleteTagsForDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTagsForDomainRequest method. +// req, resp := client.DeleteTagsForDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/DeleteTagsForDomain +func (c *Route53Domains) DeleteTagsForDomainRequest(input *DeleteTagsForDomainInput) (req *request.Request, output *DeleteTagsForDomainOutput) { + op := &request.Operation{ + Name: opDeleteTagsForDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTagsForDomainInput{} + } + + output = &DeleteTagsForDomainOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteTagsForDomain API operation for Amazon Route 53 Domains. +// +// This operation deletes the specified tags for a domain. +// +// All tag operations are eventually consistent; subsequent operations might +// not immediately represent all issued operations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation DeleteTagsForDomain for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/DeleteTagsForDomain +func (c *Route53Domains) DeleteTagsForDomain(input *DeleteTagsForDomainInput) (*DeleteTagsForDomainOutput, error) { + req, out := c.DeleteTagsForDomainRequest(input) + return out, req.Send() +} + +// DeleteTagsForDomainWithContext is the same as DeleteTagsForDomain with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTagsForDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) DeleteTagsForDomainWithContext(ctx aws.Context, input *DeleteTagsForDomainInput, opts ...request.Option) (*DeleteTagsForDomainOutput, error) { + req, out := c.DeleteTagsForDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableDomainAutoRenew = "DisableDomainAutoRenew" + +// DisableDomainAutoRenewRequest generates a "aws/request.Request" representing the +// client's request for the DisableDomainAutoRenew operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableDomainAutoRenew for more information on using the DisableDomainAutoRenew +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableDomainAutoRenewRequest method. +// req, resp := client.DisableDomainAutoRenewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/DisableDomainAutoRenew +func (c *Route53Domains) DisableDomainAutoRenewRequest(input *DisableDomainAutoRenewInput) (req *request.Request, output *DisableDomainAutoRenewOutput) { + op := &request.Operation{ + Name: opDisableDomainAutoRenew, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableDomainAutoRenewInput{} + } + + output = &DisableDomainAutoRenewOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableDomainAutoRenew API operation for Amazon Route 53 Domains. +// +// This operation disables automatic renewal of domain registration for the +// specified domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation DisableDomainAutoRenew for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/DisableDomainAutoRenew +func (c *Route53Domains) DisableDomainAutoRenew(input *DisableDomainAutoRenewInput) (*DisableDomainAutoRenewOutput, error) { + req, out := c.DisableDomainAutoRenewRequest(input) + return out, req.Send() +} + +// DisableDomainAutoRenewWithContext is the same as DisableDomainAutoRenew with the addition of +// the ability to pass a context and additional request options. +// +// See DisableDomainAutoRenew for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) DisableDomainAutoRenewWithContext(ctx aws.Context, input *DisableDomainAutoRenewInput, opts ...request.Option) (*DisableDomainAutoRenewOutput, error) { + req, out := c.DisableDomainAutoRenewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableDomainTransferLock = "DisableDomainTransferLock" + +// DisableDomainTransferLockRequest generates a "aws/request.Request" representing the +// client's request for the DisableDomainTransferLock operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableDomainTransferLock for more information on using the DisableDomainTransferLock +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableDomainTransferLockRequest method. +// req, resp := client.DisableDomainTransferLockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/DisableDomainTransferLock +func (c *Route53Domains) DisableDomainTransferLockRequest(input *DisableDomainTransferLockInput) (req *request.Request, output *DisableDomainTransferLockOutput) { + op := &request.Operation{ + Name: opDisableDomainTransferLock, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableDomainTransferLockInput{} + } + + output = &DisableDomainTransferLockOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisableDomainTransferLock API operation for Amazon Route 53 Domains. +// +// This operation removes the transfer lock on the domain (specifically the +// clientTransferProhibited status) to allow domain transfers. We recommend +// you refrain from performing this action unless you intend to transfer the +// domain to a different registrar. Successful submission returns an operation +// ID that you can use to track the progress and completion of the action. If +// the request is not completed successfully, the domain registrant will be +// notified by email. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation DisableDomainTransferLock for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/DisableDomainTransferLock +func (c *Route53Domains) DisableDomainTransferLock(input *DisableDomainTransferLockInput) (*DisableDomainTransferLockOutput, error) { + req, out := c.DisableDomainTransferLockRequest(input) + return out, req.Send() +} + +// DisableDomainTransferLockWithContext is the same as DisableDomainTransferLock with the addition of +// the ability to pass a context and additional request options. +// +// See DisableDomainTransferLock for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) DisableDomainTransferLockWithContext(ctx aws.Context, input *DisableDomainTransferLockInput, opts ...request.Option) (*DisableDomainTransferLockOutput, error) { + req, out := c.DisableDomainTransferLockRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableDomainAutoRenew = "EnableDomainAutoRenew" + +// EnableDomainAutoRenewRequest generates a "aws/request.Request" representing the +// client's request for the EnableDomainAutoRenew operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableDomainAutoRenew for more information on using the EnableDomainAutoRenew +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableDomainAutoRenewRequest method. +// req, resp := client.EnableDomainAutoRenewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/EnableDomainAutoRenew +func (c *Route53Domains) EnableDomainAutoRenewRequest(input *EnableDomainAutoRenewInput) (req *request.Request, output *EnableDomainAutoRenewOutput) { + op := &request.Operation{ + Name: opEnableDomainAutoRenew, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableDomainAutoRenewInput{} + } + + output = &EnableDomainAutoRenewOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableDomainAutoRenew API operation for Amazon Route 53 Domains. +// +// This operation configures Amazon Route 53 to automatically renew the specified +// domain before the domain registration expires. The cost of renewing your +// domain registration is billed to your AWS account. +// +// The period during which you can renew a domain name varies by TLD. For a +// list of TLDs and their renewal policies, see Domains That You Can Register +// with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) +// in the Amazon Route 53 Developer Guide. Route 53 requires that you renew +// before the end of the renewal period so we can complete processing before +// the deadline. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation EnableDomainAutoRenew for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/EnableDomainAutoRenew +func (c *Route53Domains) EnableDomainAutoRenew(input *EnableDomainAutoRenewInput) (*EnableDomainAutoRenewOutput, error) { + req, out := c.EnableDomainAutoRenewRequest(input) + return out, req.Send() +} + +// EnableDomainAutoRenewWithContext is the same as EnableDomainAutoRenew with the addition of +// the ability to pass a context and additional request options. +// +// See EnableDomainAutoRenew for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) EnableDomainAutoRenewWithContext(ctx aws.Context, input *EnableDomainAutoRenewInput, opts ...request.Option) (*EnableDomainAutoRenewOutput, error) { + req, out := c.EnableDomainAutoRenewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableDomainTransferLock = "EnableDomainTransferLock" + +// EnableDomainTransferLockRequest generates a "aws/request.Request" representing the +// client's request for the EnableDomainTransferLock operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableDomainTransferLock for more information on using the EnableDomainTransferLock +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableDomainTransferLockRequest method. +// req, resp := client.EnableDomainTransferLockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/EnableDomainTransferLock +func (c *Route53Domains) EnableDomainTransferLockRequest(input *EnableDomainTransferLockInput) (req *request.Request, output *EnableDomainTransferLockOutput) { + op := &request.Operation{ + Name: opEnableDomainTransferLock, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableDomainTransferLockInput{} + } + + output = &EnableDomainTransferLockOutput{} + req = c.newRequest(op, input, output) + return +} + +// EnableDomainTransferLock API operation for Amazon Route 53 Domains. +// +// This operation sets the transfer lock on the domain (specifically the clientTransferProhibited +// status) to prevent domain transfers. Successful submission returns an operation +// ID that you can use to track the progress and completion of the action. If +// the request is not completed successfully, the domain registrant will be +// notified by email. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation EnableDomainTransferLock for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/EnableDomainTransferLock +func (c *Route53Domains) EnableDomainTransferLock(input *EnableDomainTransferLockInput) (*EnableDomainTransferLockOutput, error) { + req, out := c.EnableDomainTransferLockRequest(input) + return out, req.Send() +} + +// EnableDomainTransferLockWithContext is the same as EnableDomainTransferLock with the addition of +// the ability to pass a context and additional request options. +// +// See EnableDomainTransferLock for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) EnableDomainTransferLockWithContext(ctx aws.Context, input *EnableDomainTransferLockInput, opts ...request.Option) (*EnableDomainTransferLockOutput, error) { + req, out := c.EnableDomainTransferLockRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetContactReachabilityStatus = "GetContactReachabilityStatus" + +// GetContactReachabilityStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetContactReachabilityStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetContactReachabilityStatus for more information on using the GetContactReachabilityStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetContactReachabilityStatusRequest method. +// req, resp := client.GetContactReachabilityStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetContactReachabilityStatus +func (c *Route53Domains) GetContactReachabilityStatusRequest(input *GetContactReachabilityStatusInput) (req *request.Request, output *GetContactReachabilityStatusOutput) { + op := &request.Operation{ + Name: opGetContactReachabilityStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetContactReachabilityStatusInput{} + } + + output = &GetContactReachabilityStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetContactReachabilityStatus API operation for Amazon Route 53 Domains. +// +// For operations that require confirmation that the email address for the registrant +// contact is valid, such as registering a new domain, this operation returns +// information about whether the registrant contact has responded. +// +// If you want us to resend the email, use the ResendContactReachabilityEmail +// operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation GetContactReachabilityStatus for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetContactReachabilityStatus +func (c *Route53Domains) GetContactReachabilityStatus(input *GetContactReachabilityStatusInput) (*GetContactReachabilityStatusOutput, error) { + req, out := c.GetContactReachabilityStatusRequest(input) + return out, req.Send() +} + +// GetContactReachabilityStatusWithContext is the same as GetContactReachabilityStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetContactReachabilityStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) GetContactReachabilityStatusWithContext(ctx aws.Context, input *GetContactReachabilityStatusInput, opts ...request.Option) (*GetContactReachabilityStatusOutput, error) { + req, out := c.GetContactReachabilityStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDomainDetail = "GetDomainDetail" + +// GetDomainDetailRequest generates a "aws/request.Request" representing the +// client's request for the GetDomainDetail operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDomainDetail for more information on using the GetDomainDetail +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDomainDetailRequest method. +// req, resp := client.GetDomainDetailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetDomainDetail +func (c *Route53Domains) GetDomainDetailRequest(input *GetDomainDetailInput) (req *request.Request, output *GetDomainDetailOutput) { + op := &request.Operation{ + Name: opGetDomainDetail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDomainDetailInput{} + } + + output = &GetDomainDetailOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDomainDetail API operation for Amazon Route 53 Domains. +// +// This operation returns detailed information about a specified domain that +// is associated with the current AWS account. Contact information for the domain +// is also returned as part of the output. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation GetDomainDetail for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetDomainDetail +func (c *Route53Domains) GetDomainDetail(input *GetDomainDetailInput) (*GetDomainDetailOutput, error) { + req, out := c.GetDomainDetailRequest(input) + return out, req.Send() +} + +// GetDomainDetailWithContext is the same as GetDomainDetail with the addition of +// the ability to pass a context and additional request options. +// +// See GetDomainDetail for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) GetDomainDetailWithContext(ctx aws.Context, input *GetDomainDetailInput, opts ...request.Option) (*GetDomainDetailOutput, error) { + req, out := c.GetDomainDetailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDomainSuggestions = "GetDomainSuggestions" + +// GetDomainSuggestionsRequest generates a "aws/request.Request" representing the +// client's request for the GetDomainSuggestions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDomainSuggestions for more information on using the GetDomainSuggestions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDomainSuggestionsRequest method. +// req, resp := client.GetDomainSuggestionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetDomainSuggestions +func (c *Route53Domains) GetDomainSuggestionsRequest(input *GetDomainSuggestionsInput) (req *request.Request, output *GetDomainSuggestionsOutput) { + op := &request.Operation{ + Name: opGetDomainSuggestions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDomainSuggestionsInput{} + } + + output = &GetDomainSuggestionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDomainSuggestions API operation for Amazon Route 53 Domains. +// +// The GetDomainSuggestions operation returns a list of suggested domain names. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation GetDomainSuggestions for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetDomainSuggestions +func (c *Route53Domains) GetDomainSuggestions(input *GetDomainSuggestionsInput) (*GetDomainSuggestionsOutput, error) { + req, out := c.GetDomainSuggestionsRequest(input) + return out, req.Send() +} + +// GetDomainSuggestionsWithContext is the same as GetDomainSuggestions with the addition of +// the ability to pass a context and additional request options. +// +// See GetDomainSuggestions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) GetDomainSuggestionsWithContext(ctx aws.Context, input *GetDomainSuggestionsInput, opts ...request.Option) (*GetDomainSuggestionsOutput, error) { + req, out := c.GetDomainSuggestionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetOperationDetail = "GetOperationDetail" + +// GetOperationDetailRequest generates a "aws/request.Request" representing the +// client's request for the GetOperationDetail operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetOperationDetail for more information on using the GetOperationDetail +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetOperationDetailRequest method. +// req, resp := client.GetOperationDetailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetOperationDetail +func (c *Route53Domains) GetOperationDetailRequest(input *GetOperationDetailInput) (req *request.Request, output *GetOperationDetailOutput) { + op := &request.Operation{ + Name: opGetOperationDetail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetOperationDetailInput{} + } + + output = &GetOperationDetailOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetOperationDetail API operation for Amazon Route 53 Domains. +// +// This operation returns the current status of an operation that is not 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 Amazon Route 53 Domains's +// API operation GetOperationDetail for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/GetOperationDetail +func (c *Route53Domains) GetOperationDetail(input *GetOperationDetailInput) (*GetOperationDetailOutput, error) { + req, out := c.GetOperationDetailRequest(input) + return out, req.Send() +} + +// GetOperationDetailWithContext is the same as GetOperationDetail with the addition of +// the ability to pass a context and additional request options. +// +// See GetOperationDetail for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) GetOperationDetailWithContext(ctx aws.Context, input *GetOperationDetailInput, opts ...request.Option) (*GetOperationDetailOutput, error) { + req, out := c.GetOperationDetailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDomains = "ListDomains" + +// ListDomainsRequest generates a "aws/request.Request" representing the +// client's request for the ListDomains operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDomains for more information on using the ListDomains +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDomainsRequest method. +// req, resp := client.ListDomainsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListDomains +func (c *Route53Domains) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) { + op := &request.Operation{ + Name: opListDomains, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"NextPageMarker"}, + LimitToken: "MaxItems", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDomainsInput{} + } + + output = &ListDomainsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDomains API operation for Amazon Route 53 Domains. +// +// This operation returns all the domain names registered with Amazon Route +// 53 for the current 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 Route 53 Domains's +// API operation ListDomains for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListDomains +func (c *Route53Domains) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) { + req, out := c.ListDomainsRequest(input) + return out, req.Send() +} + +// ListDomainsWithContext is the same as ListDomains with the addition of +// the ability to pass a context and additional request options. +// +// See ListDomains for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) ListDomainsWithContext(ctx aws.Context, input *ListDomainsInput, opts ...request.Option) (*ListDomainsOutput, error) { + req, out := c.ListDomainsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDomainsPages iterates over the pages of a ListDomains operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDomains 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 ListDomains operation. +// pageNum := 0 +// err := client.ListDomainsPages(params, +// func(page *route53domains.ListDomainsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53Domains) ListDomainsPages(input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool) error { + return c.ListDomainsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDomainsPagesWithContext same as ListDomainsPages 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 *Route53Domains) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDomainsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDomainsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListOperations = "ListOperations" + +// ListOperationsRequest generates a "aws/request.Request" representing the +// client's request for the ListOperations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListOperations for more information on using the ListOperations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListOperationsRequest method. +// req, resp := client.ListOperationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListOperations +func (c *Route53Domains) ListOperationsRequest(input *ListOperationsInput) (req *request.Request, output *ListOperationsOutput) { + op := &request.Operation{ + Name: opListOperations, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"NextPageMarker"}, + LimitToken: "MaxItems", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListOperationsInput{} + } + + output = &ListOperationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListOperations API operation for Amazon Route 53 Domains. +// +// Returns information about all of the operations that return an operation +// ID and that have ever been performed on domains that were registered by the +// current 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 Route 53 Domains's +// API operation ListOperations for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListOperations +func (c *Route53Domains) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) { + req, out := c.ListOperationsRequest(input) + return out, req.Send() +} + +// ListOperationsWithContext is the same as ListOperations with the addition of +// the ability to pass a context and additional request options. +// +// See ListOperations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) ListOperationsWithContext(ctx aws.Context, input *ListOperationsInput, opts ...request.Option) (*ListOperationsOutput, error) { + req, out := c.ListOperationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListOperationsPages iterates over the pages of a ListOperations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListOperations 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 ListOperations operation. +// pageNum := 0 +// err := client.ListOperationsPages(params, +// func(page *route53domains.ListOperationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53Domains) ListOperationsPages(input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool) error { + return c.ListOperationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListOperationsPagesWithContext same as ListOperationsPages 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 *Route53Domains) ListOperationsPagesWithContext(ctx aws.Context, input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListOperationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListOperationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListOperationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTagsForDomain = "ListTagsForDomain" + +// ListTagsForDomainRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForDomain for more information on using the ListTagsForDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForDomainRequest method. +// req, resp := client.ListTagsForDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListTagsForDomain +func (c *Route53Domains) ListTagsForDomainRequest(input *ListTagsForDomainInput) (req *request.Request, output *ListTagsForDomainOutput) { + op := &request.Operation{ + Name: opListTagsForDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForDomainInput{} + } + + output = &ListTagsForDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForDomain API operation for Amazon Route 53 Domains. +// +// This operation returns all of the tags that are associated with the specified +// domain. +// +// All tag operations are eventually consistent; subsequent operations might +// not immediately represent all issued operations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation ListTagsForDomain for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ListTagsForDomain +func (c *Route53Domains) ListTagsForDomain(input *ListTagsForDomainInput) (*ListTagsForDomainOutput, error) { + req, out := c.ListTagsForDomainRequest(input) + return out, req.Send() +} + +// ListTagsForDomainWithContext is the same as ListTagsForDomain with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) ListTagsForDomainWithContext(ctx aws.Context, input *ListTagsForDomainInput, opts ...request.Option) (*ListTagsForDomainOutput, error) { + req, out := c.ListTagsForDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterDomain = "RegisterDomain" + +// RegisterDomainRequest generates a "aws/request.Request" representing the +// client's request for the RegisterDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterDomain for more information on using the RegisterDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterDomainRequest method. +// req, resp := client.RegisterDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RegisterDomain +func (c *Route53Domains) RegisterDomainRequest(input *RegisterDomainInput) (req *request.Request, output *RegisterDomainOutput) { + op := &request.Operation{ + Name: opRegisterDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RegisterDomainInput{} + } + + output = &RegisterDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterDomain API operation for Amazon Route 53 Domains. +// +// This operation registers a domain. Domains are registered either by Amazon +// Registrar (for .com, .net, and .org domains) or by our registrar associate, +// Gandi (for all other domains). For some top-level domains (TLDs), this operation +// requires extra parameters. +// +// When you register a domain, Amazon Route 53 does the following: +// +// * Creates a Route 53 hosted zone that has the same name as the domain. +// Route 53 assigns four name servers to your hosted zone and automatically +// updates your domain registration with the names of these name servers. +// +// * Enables autorenew, so your domain registration will renew automatically +// each year. We'll notify you in advance of the renewal date so you can +// choose whether to renew the registration. +// +// * Optionally enables privacy protection, so WHOIS queries return contact +// information either for Amazon Registrar (for .com, .net, and .org domains) +// or for our registrar associate, Gandi (for all other TLDs). If you don't +// enable privacy protection, WHOIS queries return the information that you +// entered for the registrant, admin, and tech contacts. +// +// * If registration is successful, returns an operation ID that you can +// use to track the progress and completion of the action. If the request +// is not completed successfully, the domain registrant is notified by email. +// +// * Charges your AWS account an amount based on the top-level domain. For +// more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/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 Route 53 Domains's +// API operation RegisterDomain for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * DomainLimitExceeded +// The number of domains has exceeded the allowed threshold for the account. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RegisterDomain +func (c *Route53Domains) RegisterDomain(input *RegisterDomainInput) (*RegisterDomainOutput, error) { + req, out := c.RegisterDomainRequest(input) + return out, req.Send() +} + +// RegisterDomainWithContext is the same as RegisterDomain with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) RegisterDomainWithContext(ctx aws.Context, input *RegisterDomainInput, opts ...request.Option) (*RegisterDomainOutput, error) { + req, out := c.RegisterDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRejectDomainTransferFromAnotherAwsAccount = "RejectDomainTransferFromAnotherAwsAccount" + +// RejectDomainTransferFromAnotherAwsAccountRequest generates a "aws/request.Request" representing the +// client's request for the RejectDomainTransferFromAnotherAwsAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RejectDomainTransferFromAnotherAwsAccount for more information on using the RejectDomainTransferFromAnotherAwsAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RejectDomainTransferFromAnotherAwsAccountRequest method. +// req, resp := client.RejectDomainTransferFromAnotherAwsAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RejectDomainTransferFromAnotherAwsAccount +func (c *Route53Domains) RejectDomainTransferFromAnotherAwsAccountRequest(input *RejectDomainTransferFromAnotherAwsAccountInput) (req *request.Request, output *RejectDomainTransferFromAnotherAwsAccountOutput) { + op := &request.Operation{ + Name: opRejectDomainTransferFromAnotherAwsAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectDomainTransferFromAnotherAwsAccountInput{} + } + + output = &RejectDomainTransferFromAnotherAwsAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectDomainTransferFromAnotherAwsAccount API operation for Amazon Route 53 Domains. +// +// Rejects the transfer of a domain from another AWS account to the current +// AWS account. You initiate a transfer between AWS accounts using TransferDomainToAnotherAwsAccount +// (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html). +// +// Use either ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html) +// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// provides additional information, for example, Domain Transfer from Aws Account +// 111122223333 has been cancelled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation RejectDomainTransferFromAnotherAwsAccount for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RejectDomainTransferFromAnotherAwsAccount +func (c *Route53Domains) RejectDomainTransferFromAnotherAwsAccount(input *RejectDomainTransferFromAnotherAwsAccountInput) (*RejectDomainTransferFromAnotherAwsAccountOutput, error) { + req, out := c.RejectDomainTransferFromAnotherAwsAccountRequest(input) + return out, req.Send() +} + +// RejectDomainTransferFromAnotherAwsAccountWithContext is the same as RejectDomainTransferFromAnotherAwsAccount with the addition of +// the ability to pass a context and additional request options. +// +// See RejectDomainTransferFromAnotherAwsAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) RejectDomainTransferFromAnotherAwsAccountWithContext(ctx aws.Context, input *RejectDomainTransferFromAnotherAwsAccountInput, opts ...request.Option) (*RejectDomainTransferFromAnotherAwsAccountOutput, error) { + req, out := c.RejectDomainTransferFromAnotherAwsAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRenewDomain = "RenewDomain" + +// RenewDomainRequest generates a "aws/request.Request" representing the +// client's request for the RenewDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RenewDomain for more information on using the RenewDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RenewDomainRequest method. +// req, resp := client.RenewDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RenewDomain +func (c *Route53Domains) RenewDomainRequest(input *RenewDomainInput) (req *request.Request, output *RenewDomainOutput) { + op := &request.Operation{ + Name: opRenewDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RenewDomainInput{} + } + + output = &RenewDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// RenewDomain API operation for Amazon Route 53 Domains. +// +// This operation renews a domain for the specified number of years. The cost +// of renewing your domain is billed to your AWS account. +// +// We recommend that you renew your domain several weeks before the expiration +// date. Some TLD registries delete domains before the expiration date if you +// haven't renewed far enough in advance. For more information about renewing +// domain registration, see Renewing Registration for a Domain (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-renew.html) +// in the Amazon Route 53 Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation RenewDomain for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RenewDomain +func (c *Route53Domains) RenewDomain(input *RenewDomainInput) (*RenewDomainOutput, error) { + req, out := c.RenewDomainRequest(input) + return out, req.Send() +} + +// RenewDomainWithContext is the same as RenewDomain with the addition of +// the ability to pass a context and additional request options. +// +// See RenewDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) RenewDomainWithContext(ctx aws.Context, input *RenewDomainInput, opts ...request.Option) (*RenewDomainOutput, error) { + req, out := c.RenewDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opResendContactReachabilityEmail = "ResendContactReachabilityEmail" + +// ResendContactReachabilityEmailRequest generates a "aws/request.Request" representing the +// client's request for the ResendContactReachabilityEmail operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResendContactReachabilityEmail for more information on using the ResendContactReachabilityEmail +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResendContactReachabilityEmailRequest method. +// req, resp := client.ResendContactReachabilityEmailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ResendContactReachabilityEmail +func (c *Route53Domains) ResendContactReachabilityEmailRequest(input *ResendContactReachabilityEmailInput) (req *request.Request, output *ResendContactReachabilityEmailOutput) { + op := &request.Operation{ + Name: opResendContactReachabilityEmail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResendContactReachabilityEmailInput{} + } + + output = &ResendContactReachabilityEmailOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResendContactReachabilityEmail API operation for Amazon Route 53 Domains. +// +// For operations that require confirmation that the email address for the registrant +// contact is valid, such as registering a new domain, this operation resends +// the confirmation email to the current email address for the registrant contact. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation ResendContactReachabilityEmail for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ResendContactReachabilityEmail +func (c *Route53Domains) ResendContactReachabilityEmail(input *ResendContactReachabilityEmailInput) (*ResendContactReachabilityEmailOutput, error) { + req, out := c.ResendContactReachabilityEmailRequest(input) + return out, req.Send() +} + +// ResendContactReachabilityEmailWithContext is the same as ResendContactReachabilityEmail with the addition of +// the ability to pass a context and additional request options. +// +// See ResendContactReachabilityEmail for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) ResendContactReachabilityEmailWithContext(ctx aws.Context, input *ResendContactReachabilityEmailInput, opts ...request.Option) (*ResendContactReachabilityEmailOutput, error) { + req, out := c.ResendContactReachabilityEmailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRetrieveDomainAuthCode = "RetrieveDomainAuthCode" + +// RetrieveDomainAuthCodeRequest generates a "aws/request.Request" representing the +// client's request for the RetrieveDomainAuthCode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RetrieveDomainAuthCode for more information on using the RetrieveDomainAuthCode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RetrieveDomainAuthCodeRequest method. +// req, resp := client.RetrieveDomainAuthCodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RetrieveDomainAuthCode +func (c *Route53Domains) RetrieveDomainAuthCodeRequest(input *RetrieveDomainAuthCodeInput) (req *request.Request, output *RetrieveDomainAuthCodeOutput) { + op := &request.Operation{ + Name: opRetrieveDomainAuthCode, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RetrieveDomainAuthCodeInput{} + } + + output = &RetrieveDomainAuthCodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// RetrieveDomainAuthCode API operation for Amazon Route 53 Domains. +// +// This operation returns the AuthCode for the domain. To transfer a domain +// to another registrar, you provide this value to the new registrar. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation RetrieveDomainAuthCode for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/RetrieveDomainAuthCode +func (c *Route53Domains) RetrieveDomainAuthCode(input *RetrieveDomainAuthCodeInput) (*RetrieveDomainAuthCodeOutput, error) { + req, out := c.RetrieveDomainAuthCodeRequest(input) + return out, req.Send() +} + +// RetrieveDomainAuthCodeWithContext is the same as RetrieveDomainAuthCode with the addition of +// the ability to pass a context and additional request options. +// +// See RetrieveDomainAuthCode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) RetrieveDomainAuthCodeWithContext(ctx aws.Context, input *RetrieveDomainAuthCodeInput, opts ...request.Option) (*RetrieveDomainAuthCodeOutput, error) { + req, out := c.RetrieveDomainAuthCodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTransferDomain = "TransferDomain" + +// TransferDomainRequest generates a "aws/request.Request" representing the +// client's request for the TransferDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TransferDomain for more information on using the TransferDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TransferDomainRequest method. +// req, resp := client.TransferDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/TransferDomain +func (c *Route53Domains) TransferDomainRequest(input *TransferDomainInput) (req *request.Request, output *TransferDomainOutput) { + op := &request.Operation{ + Name: opTransferDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TransferDomainInput{} + } + + output = &TransferDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// TransferDomain API operation for Amazon Route 53 Domains. +// +// Transfers a domain from another registrar to Amazon Route 53. When the transfer +// is complete, the domain is registered either with Amazon Registrar (for .com, +// .net, and .org domains) or with our registrar associate, Gandi (for all other +// TLDs). +// +// For more information about transferring domains, see the following topics: +// +// * For transfer requirements, a detailed procedure, and information about +// viewing the status of a domain that you're transferring to Route 53, see +// Transferring Registration for a Domain to Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-to-route-53.html) +// in the Amazon Route 53 Developer Guide. +// +// * For information about how to transfer a domain from one AWS account +// to another, see TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html). +// +// * For information about how to transfer a domain to another domain registrar, +// see Transferring a Domain from Amazon Route 53 to Another Registrar (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-from-route-53.html) +// in the Amazon Route 53 Developer Guide. +// +// If the registrar for your domain is also the DNS service provider for the +// domain, we highly recommend that you transfer your DNS service to Route 53 +// or to another DNS service provider before you transfer your registration. +// Some registrars provide free DNS service when you purchase a domain registration. +// When you transfer the registration, the previous registrar will not renew +// your domain registration and could end your DNS service at any time. +// +// If the registrar for your domain is also the DNS service provider for the +// domain and you don't transfer DNS service to another provider, your website, +// email, and the web applications associated with the domain might become unavailable. +// +// If the transfer is successful, this method returns an operation ID that you +// can use to track the progress and completion of the action. If the transfer +// doesn't complete successfully, the domain registrant will be notified by +// email. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation TransferDomain for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * DomainLimitExceeded +// The number of domains has exceeded the allowed threshold for the account. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/TransferDomain +func (c *Route53Domains) TransferDomain(input *TransferDomainInput) (*TransferDomainOutput, error) { + req, out := c.TransferDomainRequest(input) + return out, req.Send() +} + +// TransferDomainWithContext is the same as TransferDomain with the addition of +// the ability to pass a context and additional request options. +// +// See TransferDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) TransferDomainWithContext(ctx aws.Context, input *TransferDomainInput, opts ...request.Option) (*TransferDomainOutput, error) { + req, out := c.TransferDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTransferDomainToAnotherAwsAccount = "TransferDomainToAnotherAwsAccount" + +// TransferDomainToAnotherAwsAccountRequest generates a "aws/request.Request" representing the +// client's request for the TransferDomainToAnotherAwsAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TransferDomainToAnotherAwsAccount for more information on using the TransferDomainToAnotherAwsAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TransferDomainToAnotherAwsAccountRequest method. +// req, resp := client.TransferDomainToAnotherAwsAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/TransferDomainToAnotherAwsAccount +func (c *Route53Domains) TransferDomainToAnotherAwsAccountRequest(input *TransferDomainToAnotherAwsAccountInput) (req *request.Request, output *TransferDomainToAnotherAwsAccountOutput) { + op := &request.Operation{ + Name: opTransferDomainToAnotherAwsAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TransferDomainToAnotherAwsAccountInput{} + } + + output = &TransferDomainToAnotherAwsAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// TransferDomainToAnotherAwsAccount API operation for Amazon Route 53 Domains. +// +// Transfers a domain from the current AWS account to another AWS account. Note +// the following: +// +// * The AWS account that you're transferring the domain to must accept the +// transfer. If the other account doesn't accept the transfer within 3 days, +// we cancel the transfer. See AcceptDomainTransferFromAnotherAwsAccount +// (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html). +// +// * You can cancel the transfer before the other account accepts it. See +// CancelDomainTransferToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_CancelDomainTransferToAnotherAwsAccount.html). +// +// * The other account can reject the transfer. See RejectDomainTransferFromAnotherAwsAccount +// (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_RejectDomainTransferFromAnotherAwsAccount.html). +// +// When you transfer a domain from one AWS account to another, Route 53 doesn't +// transfer the hosted zone that is associated with the domain. DNS resolution +// isn't affected if the domain and the hosted zone are owned by separate accounts, +// so transferring the hosted zone is optional. For information about transferring +// the hosted zone to another AWS account, see Migrating a Hosted Zone to a +// Different AWS Account (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html) +// in the Amazon Route 53 Developer Guide. +// +// Use either ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html) +// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// provides additional information, for example, Domain Transfer from Aws Account +// 111122223333 has been cancelled. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation TransferDomainToAnotherAwsAccount for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/TransferDomainToAnotherAwsAccount +func (c *Route53Domains) TransferDomainToAnotherAwsAccount(input *TransferDomainToAnotherAwsAccountInput) (*TransferDomainToAnotherAwsAccountOutput, error) { + req, out := c.TransferDomainToAnotherAwsAccountRequest(input) + return out, req.Send() +} + +// TransferDomainToAnotherAwsAccountWithContext is the same as TransferDomainToAnotherAwsAccount with the addition of +// the ability to pass a context and additional request options. +// +// See TransferDomainToAnotherAwsAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) TransferDomainToAnotherAwsAccountWithContext(ctx aws.Context, input *TransferDomainToAnotherAwsAccountInput, opts ...request.Option) (*TransferDomainToAnotherAwsAccountOutput, error) { + req, out := c.TransferDomainToAnotherAwsAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDomainContact = "UpdateDomainContact" + +// UpdateDomainContactRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDomainContact operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDomainContact for more information on using the UpdateDomainContact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDomainContactRequest method. +// req, resp := client.UpdateDomainContactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateDomainContact +func (c *Route53Domains) UpdateDomainContactRequest(input *UpdateDomainContactInput) (req *request.Request, output *UpdateDomainContactOutput) { + op := &request.Operation{ + Name: opUpdateDomainContact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDomainContactInput{} + } + + output = &UpdateDomainContactOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDomainContact API operation for Amazon Route 53 Domains. +// +// This operation updates the contact information for a particular domain. You +// must specify information for at least one contact: registrant, administrator, +// or technical. +// +// If the update is successful, this method returns an operation ID that you +// can use to track the progress and completion of the action. If the request +// is not completed successfully, the domain registrant will be notified by +// email. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation UpdateDomainContact for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateDomainContact +func (c *Route53Domains) UpdateDomainContact(input *UpdateDomainContactInput) (*UpdateDomainContactOutput, error) { + req, out := c.UpdateDomainContactRequest(input) + return out, req.Send() +} + +// UpdateDomainContactWithContext is the same as UpdateDomainContact with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDomainContact for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) UpdateDomainContactWithContext(ctx aws.Context, input *UpdateDomainContactInput, opts ...request.Option) (*UpdateDomainContactOutput, error) { + req, out := c.UpdateDomainContactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDomainContactPrivacy = "UpdateDomainContactPrivacy" + +// UpdateDomainContactPrivacyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDomainContactPrivacy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDomainContactPrivacy for more information on using the UpdateDomainContactPrivacy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDomainContactPrivacyRequest method. +// req, resp := client.UpdateDomainContactPrivacyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateDomainContactPrivacy +func (c *Route53Domains) UpdateDomainContactPrivacyRequest(input *UpdateDomainContactPrivacyInput) (req *request.Request, output *UpdateDomainContactPrivacyOutput) { + op := &request.Operation{ + Name: opUpdateDomainContactPrivacy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDomainContactPrivacyInput{} + } + + output = &UpdateDomainContactPrivacyOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDomainContactPrivacy API operation for Amazon Route 53 Domains. +// +// This operation updates the specified domain contact's privacy setting. When +// privacy protection is enabled, contact information such as email address +// is replaced either with contact information for Amazon Registrar (for .com, +// .net, and .org domains) or with contact information for our registrar associate, +// Gandi. +// +// This operation affects only the contact information for the specified contact +// type (registrant, administrator, or tech). If the request succeeds, Amazon +// Route 53 returns an operation ID that you can use with GetOperationDetail +// (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// to track the progress and completion of the action. If the request doesn't +// complete successfully, the domain registrant will be notified by email. +// +// By disabling the privacy service via API, you consent to the publication +// of the contact information provided for this domain via the public WHOIS +// database. You certify that you are the registrant of this domain name and +// have the authority to make this decision. You may withdraw your consent at +// any time by enabling privacy protection using either UpdateDomainContactPrivacy +// or the Route 53 console. Enabling privacy protection removes the contact +// information provided for this domain from the WHOIS database. For more information +// on our privacy practices, see https://aws.amazon.com/privacy/ (https://aws.amazon.com/privacy/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation UpdateDomainContactPrivacy for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateDomainContactPrivacy +func (c *Route53Domains) UpdateDomainContactPrivacy(input *UpdateDomainContactPrivacyInput) (*UpdateDomainContactPrivacyOutput, error) { + req, out := c.UpdateDomainContactPrivacyRequest(input) + return out, req.Send() +} + +// UpdateDomainContactPrivacyWithContext is the same as UpdateDomainContactPrivacy with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDomainContactPrivacy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) UpdateDomainContactPrivacyWithContext(ctx aws.Context, input *UpdateDomainContactPrivacyInput, opts ...request.Option) (*UpdateDomainContactPrivacyOutput, error) { + req, out := c.UpdateDomainContactPrivacyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDomainNameservers = "UpdateDomainNameservers" + +// UpdateDomainNameserversRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDomainNameservers operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDomainNameservers for more information on using the UpdateDomainNameservers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDomainNameserversRequest method. +// req, resp := client.UpdateDomainNameserversRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateDomainNameservers +func (c *Route53Domains) UpdateDomainNameserversRequest(input *UpdateDomainNameserversInput) (req *request.Request, output *UpdateDomainNameserversOutput) { + op := &request.Operation{ + Name: opUpdateDomainNameservers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDomainNameserversInput{} + } + + output = &UpdateDomainNameserversOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDomainNameservers API operation for Amazon Route 53 Domains. +// +// This operation replaces the current set of name servers for the domain with +// the specified set of name servers. If you use Amazon Route 53 as your DNS +// service, specify the four name servers in the delegation set for the hosted +// zone for the domain. +// +// If successful, this operation returns an operation ID that you can use to +// track the progress and completion of the action. If the request is not completed +// successfully, the domain registrant will be notified by email. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation UpdateDomainNameservers for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * DuplicateRequest +// The request is already in progress for the domain. +// +// * TLDRulesViolation +// The top-level domain does not support this operation. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateDomainNameservers +func (c *Route53Domains) UpdateDomainNameservers(input *UpdateDomainNameserversInput) (*UpdateDomainNameserversOutput, error) { + req, out := c.UpdateDomainNameserversRequest(input) + return out, req.Send() +} + +// UpdateDomainNameserversWithContext is the same as UpdateDomainNameservers with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDomainNameservers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) UpdateDomainNameserversWithContext(ctx aws.Context, input *UpdateDomainNameserversInput, opts ...request.Option) (*UpdateDomainNameserversOutput, error) { + req, out := c.UpdateDomainNameserversRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTagsForDomain = "UpdateTagsForDomain" + +// UpdateTagsForDomainRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTagsForDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTagsForDomain for more information on using the UpdateTagsForDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTagsForDomainRequest method. +// req, resp := client.UpdateTagsForDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateTagsForDomain +func (c *Route53Domains) UpdateTagsForDomainRequest(input *UpdateTagsForDomainInput) (req *request.Request, output *UpdateTagsForDomainOutput) { + op := &request.Operation{ + Name: opUpdateTagsForDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTagsForDomainInput{} + } + + output = &UpdateTagsForDomainOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateTagsForDomain API operation for Amazon Route 53 Domains. +// +// This operation adds or updates tags for a specified domain. +// +// All tag operations are eventually consistent; subsequent operations might +// not immediately represent all issued operations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation UpdateTagsForDomain for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// * OperationLimitExceeded +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +// +// * UnsupportedTLD +// Amazon Route 53 does not support this top-level domain (TLD). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/UpdateTagsForDomain +func (c *Route53Domains) UpdateTagsForDomain(input *UpdateTagsForDomainInput) (*UpdateTagsForDomainOutput, error) { + req, out := c.UpdateTagsForDomainRequest(input) + return out, req.Send() +} + +// UpdateTagsForDomainWithContext is the same as UpdateTagsForDomain with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTagsForDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) UpdateTagsForDomainWithContext(ctx aws.Context, input *UpdateTagsForDomainInput, opts ...request.Option) (*UpdateTagsForDomainOutput, error) { + req, out := c.UpdateTagsForDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opViewBilling = "ViewBilling" + +// ViewBillingRequest generates a "aws/request.Request" representing the +// client's request for the ViewBilling operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ViewBilling for more information on using the ViewBilling +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ViewBillingRequest method. +// req, resp := client.ViewBillingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ViewBilling +func (c *Route53Domains) ViewBillingRequest(input *ViewBillingInput) (req *request.Request, output *ViewBillingOutput) { + op := &request.Operation{ + Name: opViewBilling, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ViewBillingInput{} + } + + output = &ViewBillingOutput{} + req = c.newRequest(op, input, output) + return +} + +// ViewBilling API operation for Amazon Route 53 Domains. +// +// Returns all the domain-related billing records for the current AWS account +// for a specified period +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Domains's +// API operation ViewBilling for usage and error information. +// +// Returned Error Types: +// * InvalidInput +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15/ViewBilling +func (c *Route53Domains) ViewBilling(input *ViewBillingInput) (*ViewBillingOutput, error) { + req, out := c.ViewBillingRequest(input) + return out, req.Send() +} + +// ViewBillingWithContext is the same as ViewBilling with the addition of +// the ability to pass a context and additional request options. +// +// See ViewBilling for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Domains) ViewBillingWithContext(ctx aws.Context, input *ViewBillingInput, opts ...request.Option) (*ViewBillingOutput, error) { + req, out := c.ViewBillingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// The AcceptDomainTransferFromAnotherAwsAccount request includes the following +// elements. +type AcceptDomainTransferFromAnotherAwsAccountInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that was specified when another AWS account submitted + // a TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html) + // request. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The password that was returned by the TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html) + // request. + // + // Password is a required field + Password *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptDomainTransferFromAnotherAwsAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptDomainTransferFromAnotherAwsAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptDomainTransferFromAnotherAwsAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptDomainTransferFromAnotherAwsAccountInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *AcceptDomainTransferFromAnotherAwsAccountInput) SetDomainName(v string) *AcceptDomainTransferFromAnotherAwsAccountInput { + s.DomainName = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *AcceptDomainTransferFromAnotherAwsAccountInput) SetPassword(v string) *AcceptDomainTransferFromAnotherAwsAccountInput { + s.Password = &v + return s +} + +// The AcceptDomainTransferFromAnotherAwsAccount response includes the following +// element. +type AcceptDomainTransferFromAnotherAwsAccountOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + OperationId *string `type:"string"` +} + +// String returns the string representation +func (s AcceptDomainTransferFromAnotherAwsAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptDomainTransferFromAnotherAwsAccountOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *AcceptDomainTransferFromAnotherAwsAccountOutput) SetOperationId(v string) *AcceptDomainTransferFromAnotherAwsAccountOutput { + s.OperationId = &v + return s +} + +// Information for one billing record. +type BillingRecord struct { + _ struct{} `type:"structure"` + + // The date that the operation was billed, in Unix format. + BillDate *time.Time `type:"timestamp"` + + // The name of the domain that the billing record applies to. If the domain + // name contains characters other than a-z, 0-9, and - (hyphen), such as an + // internationalized domain name, then this value is in Punycode. For more information, + // see DNS Domain Name Format (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) + // in the Amazon Route 53 Developer Guide. + DomainName *string `type:"string"` + + // The ID of the invoice that is associated with the billing record. + InvoiceId *string `type:"string"` + + // The operation that you were charged for. + Operation *string `type:"string" enum:"OperationType"` + + // The price that you were charged for the operation, in US dollars. + // + // Example value: 12.0 + Price *float64 `type:"double"` +} + +// String returns the string representation +func (s BillingRecord) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BillingRecord) GoString() string { + return s.String() +} + +// SetBillDate sets the BillDate field's value. +func (s *BillingRecord) SetBillDate(v time.Time) *BillingRecord { + s.BillDate = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *BillingRecord) SetDomainName(v string) *BillingRecord { + s.DomainName = &v + return s +} + +// SetInvoiceId sets the InvoiceId field's value. +func (s *BillingRecord) SetInvoiceId(v string) *BillingRecord { + s.InvoiceId = &v + return s +} + +// SetOperation sets the Operation field's value. +func (s *BillingRecord) SetOperation(v string) *BillingRecord { + s.Operation = &v + return s +} + +// SetPrice sets the Price field's value. +func (s *BillingRecord) SetPrice(v float64) *BillingRecord { + s.Price = &v + return s +} + +// The CancelDomainTransferToAnotherAwsAccount request includes the following +// element. +type CancelDomainTransferToAnotherAwsAccountInput struct { + _ struct{} `type:"structure"` + + // The name of the domain for which you want to cancel the transfer to another + // AWS account. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelDomainTransferToAnotherAwsAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelDomainTransferToAnotherAwsAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelDomainTransferToAnotherAwsAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelDomainTransferToAnotherAwsAccountInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CancelDomainTransferToAnotherAwsAccountInput) SetDomainName(v string) *CancelDomainTransferToAnotherAwsAccountInput { + s.DomainName = &v + return s +} + +// The CancelDomainTransferToAnotherAwsAccount response includes the following +// element. +type CancelDomainTransferToAnotherAwsAccountOutput struct { + _ struct{} `type:"structure"` + + // The identifier that TransferDomainToAnotherAwsAccount returned to track the + // progress of the request. Because the transfer request was canceled, the value + // is no longer valid, and you can't use GetOperationDetail to query the operation + // status. + OperationId *string `type:"string"` +} + +// String returns the string representation +func (s CancelDomainTransferToAnotherAwsAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelDomainTransferToAnotherAwsAccountOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *CancelDomainTransferToAnotherAwsAccountOutput) SetOperationId(v string) *CancelDomainTransferToAnotherAwsAccountOutput { + s.OperationId = &v + return s +} + +// The CheckDomainAvailability request contains the following elements. +type CheckDomainAvailabilityInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to get availability for. The top-level + // domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list + // of supported TLDs, see Domains that You Can Register with Amazon Route 53 + // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // The domain name can contain only the following characters: + // + // * Letters a through z. Domain names are not case sensitive. + // + // * Numbers 0 through 9. + // + // * Hyphen (-). You can't specify a hyphen at the beginning or end of a + // label. + // + // * Period (.) to separate the labels in the name, such as the . in example.com. + // + // Internationalized domain names are not supported for some top-level domains. + // To determine whether the TLD that you want to use supports internationalized + // domain names, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html). + // For more information, see Formatting Internationalized Domain Names (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns). + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // Reserved for future use. + IdnLangCode *string `type:"string"` +} + +// String returns the string representation +func (s CheckDomainAvailabilityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CheckDomainAvailabilityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CheckDomainAvailabilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CheckDomainAvailabilityInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CheckDomainAvailabilityInput) SetDomainName(v string) *CheckDomainAvailabilityInput { + s.DomainName = &v + return s +} + +// SetIdnLangCode sets the IdnLangCode field's value. +func (s *CheckDomainAvailabilityInput) SetIdnLangCode(v string) *CheckDomainAvailabilityInput { + s.IdnLangCode = &v + return s +} + +// The CheckDomainAvailability response includes the following elements. +type CheckDomainAvailabilityOutput struct { + _ struct{} `type:"structure"` + + // Whether the domain name is available for registering. + // + // You can register only domains designated as AVAILABLE. + // + // Valid values: + // + // AVAILABLE + // + // The domain name is available. + // + // AVAILABLE_RESERVED + // + // The domain name is reserved under specific conditions. + // + // AVAILABLE_PREORDER + // + // The domain name is available and can be preordered. + // + // DONT_KNOW + // + // The TLD registry didn't reply with a definitive answer about whether the + // domain name is available. Route 53 can return this response for a variety + // of reasons, for example, the registry is performing maintenance. Try again + // later. + // + // PENDING + // + // The TLD registry didn't return a response in the expected amount of time. + // When the response is delayed, it usually takes just a few extra seconds. + // You can resubmit the request immediately. + // + // RESERVED + // + // The domain name has been reserved for another person or organization. + // + // UNAVAILABLE + // + // The domain name is not available. + // + // UNAVAILABLE_PREMIUM + // + // The domain name is not available. + // + // UNAVAILABLE_RESTRICTED + // + // The domain name is forbidden. + // + // Availability is a required field + Availability *string `type:"string" required:"true" enum:"DomainAvailability"` +} + +// String returns the string representation +func (s CheckDomainAvailabilityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CheckDomainAvailabilityOutput) GoString() string { + return s.String() +} + +// SetAvailability sets the Availability field's value. +func (s *CheckDomainAvailabilityOutput) SetAvailability(v string) *CheckDomainAvailabilityOutput { + s.Availability = &v + return s +} + +// The CheckDomainTransferability request contains the following elements. +type CheckDomainTransferabilityInput struct { + _ struct{} `type:"structure"` + + // If the registrar for the top-level domain (TLD) requires an authorization + // code to transfer the domain, the code that you got from the current registrar + // for the domain. + AuthCode *string `type:"string" sensitive:"true"` + + // The name of the domain that you want to transfer to Route 53. The top-level + // domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list + // of supported TLDs, see Domains that You Can Register with Amazon Route 53 + // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // The domain name can contain only the following characters: + // + // * Letters a through z. Domain names are not case sensitive. + // + // * Numbers 0 through 9. + // + // * Hyphen (-). You can't specify a hyphen at the beginning or end of a + // label. + // + // * Period (.) to separate the labels in the name, such as the . in example.com. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CheckDomainTransferabilityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CheckDomainTransferabilityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CheckDomainTransferabilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CheckDomainTransferabilityInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthCode sets the AuthCode field's value. +func (s *CheckDomainTransferabilityInput) SetAuthCode(v string) *CheckDomainTransferabilityInput { + s.AuthCode = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *CheckDomainTransferabilityInput) SetDomainName(v string) *CheckDomainTransferabilityInput { + s.DomainName = &v + return s +} + +// The CheckDomainTransferability response includes the following elements. +type CheckDomainTransferabilityOutput struct { + _ struct{} `type:"structure"` + + // A complex type that contains information about whether the specified domain + // can be transferred to Route 53. + // + // Transferability is a required field + Transferability *DomainTransferability `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CheckDomainTransferabilityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CheckDomainTransferabilityOutput) GoString() string { + return s.String() +} + +// SetTransferability sets the Transferability field's value. +func (s *CheckDomainTransferabilityOutput) SetTransferability(v *DomainTransferability) *CheckDomainTransferabilityOutput { + s.Transferability = v + return s +} + +// ContactDetail includes the following elements. +type ContactDetail struct { + _ struct{} `type:"structure" sensitive:"true"` + + // First line of the contact's address. + AddressLine1 *string `type:"string"` + + // Second line of contact's address, if any. + AddressLine2 *string `type:"string"` + + // The city of the contact's address. + City *string `type:"string"` + + // Indicates whether the contact is a person, company, association, or public + // organization. Note the following: + // + // * If you specify a value other than PERSON, you must also specify a value + // for OrganizationName. + // + // * For some TLDs, the privacy protection available depends on the value + // that you specify for Contact Type. For the privacy protection settings + // for your TLD, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide + // + // * For .es domains, if you specify PERSON, you must specify INDIVIDUAL + // for the value of ES_LEGAL_FORM. + ContactType *string `type:"string" enum:"ContactType"` + + // Code for the country of the contact's address. + CountryCode *string `type:"string" enum:"CountryCode"` + + // Email address of the contact. + Email *string `type:"string"` + + // A list of name-value pairs for parameters required by certain top-level domains. + ExtraParams []*ExtraParam `type:"list"` + + // Fax number of the contact. + // + // Constraints: Phone number must be specified in the format "+[country dialing + // code].[number including any area code]". For example, a US phone number might + // appear as "+1.1234567890". + Fax *string `type:"string"` + + // First name of contact. + FirstName *string `type:"string"` + + // Last name of contact. + LastName *string `type:"string"` + + // Name of the organization for contact types other than PERSON. + OrganizationName *string `type:"string"` + + // The phone number of the contact. + // + // Constraints: Phone number must be specified in the format "+[country dialing + // code].[number including any area code>]". For example, a US phone number + // might appear as "+1.1234567890". + PhoneNumber *string `type:"string"` + + // The state or province of the contact's city. + State *string `type:"string"` + + // The zip or postal code of the contact's address. + ZipCode *string `type:"string"` +} + +// String returns the string representation +func (s ContactDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContactDetail) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContactDetail) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContactDetail"} + if s.ExtraParams != nil { + for i, v := range s.ExtraParams { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExtraParams", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddressLine1 sets the AddressLine1 field's value. +func (s *ContactDetail) SetAddressLine1(v string) *ContactDetail { + s.AddressLine1 = &v + return s +} + +// SetAddressLine2 sets the AddressLine2 field's value. +func (s *ContactDetail) SetAddressLine2(v string) *ContactDetail { + s.AddressLine2 = &v + return s +} + +// SetCity sets the City field's value. +func (s *ContactDetail) SetCity(v string) *ContactDetail { + s.City = &v + return s +} + +// SetContactType sets the ContactType field's value. +func (s *ContactDetail) SetContactType(v string) *ContactDetail { + s.ContactType = &v + return s +} + +// SetCountryCode sets the CountryCode field's value. +func (s *ContactDetail) SetCountryCode(v string) *ContactDetail { + s.CountryCode = &v + return s +} + +// SetEmail sets the Email field's value. +func (s *ContactDetail) SetEmail(v string) *ContactDetail { + s.Email = &v + return s +} + +// SetExtraParams sets the ExtraParams field's value. +func (s *ContactDetail) SetExtraParams(v []*ExtraParam) *ContactDetail { + s.ExtraParams = v + return s +} + +// SetFax sets the Fax field's value. +func (s *ContactDetail) SetFax(v string) *ContactDetail { + s.Fax = &v + return s +} + +// SetFirstName sets the FirstName field's value. +func (s *ContactDetail) SetFirstName(v string) *ContactDetail { + s.FirstName = &v + return s +} + +// SetLastName sets the LastName field's value. +func (s *ContactDetail) SetLastName(v string) *ContactDetail { + s.LastName = &v + return s +} + +// SetOrganizationName sets the OrganizationName field's value. +func (s *ContactDetail) SetOrganizationName(v string) *ContactDetail { + s.OrganizationName = &v + return s +} + +// SetPhoneNumber sets the PhoneNumber field's value. +func (s *ContactDetail) SetPhoneNumber(v string) *ContactDetail { + s.PhoneNumber = &v + return s +} + +// SetState sets the State field's value. +func (s *ContactDetail) SetState(v string) *ContactDetail { + s.State = &v + return s +} + +// SetZipCode sets the ZipCode field's value. +func (s *ContactDetail) SetZipCode(v string) *ContactDetail { + s.ZipCode = &v + return s +} + +// The DeleteTagsForDomainRequest includes the following elements. +type DeleteTagsForDomainInput struct { + _ struct{} `type:"structure"` + + // The domain for which you want to delete one or more tags. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // A list of tag keys to delete. + // + // TagsToDelete is a required field + TagsToDelete []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DeleteTagsForDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsForDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsForDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsForDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.TagsToDelete == nil { + invalidParams.Add(request.NewErrParamRequired("TagsToDelete")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteTagsForDomainInput) SetDomainName(v string) *DeleteTagsForDomainInput { + s.DomainName = &v + return s +} + +// SetTagsToDelete sets the TagsToDelete field's value. +func (s *DeleteTagsForDomainInput) SetTagsToDelete(v []*string) *DeleteTagsForDomainInput { + s.TagsToDelete = v + return s +} + +type DeleteTagsForDomainOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTagsForDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsForDomainOutput) GoString() string { + return s.String() +} + +type DisableDomainAutoRenewInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to disable automatic renewal for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableDomainAutoRenewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableDomainAutoRenewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableDomainAutoRenewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableDomainAutoRenewInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DisableDomainAutoRenewInput) SetDomainName(v string) *DisableDomainAutoRenewInput { + s.DomainName = &v + return s +} + +type DisableDomainAutoRenewOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableDomainAutoRenewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableDomainAutoRenewOutput) GoString() string { + return s.String() +} + +// The DisableDomainTransferLock request includes the following element. +type DisableDomainTransferLockInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to remove the transfer lock for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableDomainTransferLockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableDomainTransferLockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableDomainTransferLockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableDomainTransferLockInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DisableDomainTransferLockInput) SetDomainName(v string) *DisableDomainTransferLockInput { + s.DomainName = &v + return s +} + +// The DisableDomainTransferLock response includes the following element. +type DisableDomainTransferLockOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableDomainTransferLockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableDomainTransferLockOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *DisableDomainTransferLockOutput) SetOperationId(v string) *DisableDomainTransferLockOutput { + s.OperationId = &v + return s +} + +// The number of domains has exceeded the allowed threshold for the account. +type DomainLimitExceeded struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The number of domains has exceeded the allowed threshold for the account. + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s DomainLimitExceeded) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainLimitExceeded) GoString() string { + return s.String() +} + +func newErrorDomainLimitExceeded(v protocol.ResponseMetadata) error { + return &DomainLimitExceeded{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *DomainLimitExceeded) Code() string { + return "DomainLimitExceeded" +} + +// Message returns the exception's message. +func (s *DomainLimitExceeded) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *DomainLimitExceeded) OrigErr() error { + return nil +} + +func (s *DomainLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *DomainLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *DomainLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID +} + +// Information about one suggested domain name. +type DomainSuggestion struct { + _ struct{} `type:"structure"` + + // Whether the domain name is available for registering. + // + // You can register only the domains that are designated as AVAILABLE. + // + // Valid values: + // + // AVAILABLE + // + // The domain name is available. + // + // AVAILABLE_RESERVED + // + // The domain name is reserved under specific conditions. + // + // AVAILABLE_PREORDER + // + // The domain name is available and can be preordered. + // + // DONT_KNOW + // + // The TLD registry didn't reply with a definitive answer about whether the + // domain name is available. Route 53 can return this response for a variety + // of reasons, for example, the registry is performing maintenance. Try again + // later. + // + // PENDING + // + // The TLD registry didn't return a response in the expected amount of time. + // When the response is delayed, it usually takes just a few extra seconds. + // You can resubmit the request immediately. + // + // RESERVED + // + // The domain name has been reserved for another person or organization. + // + // UNAVAILABLE + // + // The domain name is not available. + // + // UNAVAILABLE_PREMIUM + // + // The domain name is not available. + // + // UNAVAILABLE_RESTRICTED + // + // The domain name is forbidden. + Availability *string `type:"string"` + + // A suggested domain name. + DomainName *string `type:"string"` +} + +// String returns the string representation +func (s DomainSuggestion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainSuggestion) GoString() string { + return s.String() +} + +// SetAvailability sets the Availability field's value. +func (s *DomainSuggestion) SetAvailability(v string) *DomainSuggestion { + s.Availability = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DomainSuggestion) SetDomainName(v string) *DomainSuggestion { + s.DomainName = &v + return s +} + +// Summary information about one domain. +type DomainSummary struct { + _ struct{} `type:"structure"` + + // Indicates whether the domain is automatically renewed upon expiration. + AutoRenew *bool `type:"boolean"` + + // The name of the domain that the summary information applies to. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // Expiration date of the domain in Unix time format and Coordinated Universal + // Time (UTC). + Expiry *time.Time `type:"timestamp"` + + // Indicates whether a domain is locked from unauthorized transfer to another + // party. + TransferLock *bool `type:"boolean"` +} + +// String returns the string representation +func (s DomainSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainSummary) GoString() string { + return s.String() +} + +// SetAutoRenew sets the AutoRenew field's value. +func (s *DomainSummary) SetAutoRenew(v bool) *DomainSummary { + s.AutoRenew = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DomainSummary) SetDomainName(v string) *DomainSummary { + s.DomainName = &v + return s +} + +// SetExpiry sets the Expiry field's value. +func (s *DomainSummary) SetExpiry(v time.Time) *DomainSummary { + s.Expiry = &v + return s +} + +// SetTransferLock sets the TransferLock field's value. +func (s *DomainSummary) SetTransferLock(v bool) *DomainSummary { + s.TransferLock = &v + return s +} + +// A complex type that contains information about whether the specified domain +// can be transferred to Route 53. +type DomainTransferability struct { + _ struct{} `type:"structure"` + + // Whether the domain name can be transferred to Route 53. + // + // You can transfer only domains that have a value of TRANSFERABLE for Transferable. + // + // Valid values: + // + // TRANSFERABLE + // + // The domain name can be transferred to Route 53. + // + // UNTRANSFERRABLE + // + // The domain name can't be transferred to Route 53. + // + // DONT_KNOW + // + // Reserved for future use. + Transferable *string `type:"string" enum:"Transferable"` +} + +// String returns the string representation +func (s DomainTransferability) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainTransferability) GoString() string { + return s.String() +} + +// SetTransferable sets the Transferable field's value. +func (s *DomainTransferability) SetTransferable(v string) *DomainTransferability { + s.Transferable = &v + return s +} + +// The request is already in progress for the domain. +type DuplicateRequest struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The request is already in progress for the domain. + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s DuplicateRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DuplicateRequest) GoString() string { + return s.String() +} + +func newErrorDuplicateRequest(v protocol.ResponseMetadata) error { + return &DuplicateRequest{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *DuplicateRequest) Code() string { + return "DuplicateRequest" +} + +// Message returns the exception's message. +func (s *DuplicateRequest) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *DuplicateRequest) OrigErr() error { + return nil +} + +func (s *DuplicateRequest) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *DuplicateRequest) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *DuplicateRequest) RequestID() string { + return s.RespMetadata.RequestID +} + +type EnableDomainAutoRenewInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to enable automatic renewal for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableDomainAutoRenewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableDomainAutoRenewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableDomainAutoRenewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableDomainAutoRenewInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *EnableDomainAutoRenewInput) SetDomainName(v string) *EnableDomainAutoRenewInput { + s.DomainName = &v + return s +} + +type EnableDomainAutoRenewOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableDomainAutoRenewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableDomainAutoRenewOutput) GoString() string { + return s.String() +} + +// A request to set the transfer lock for the specified domain. +type EnableDomainTransferLockInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to set the transfer lock for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableDomainTransferLockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableDomainTransferLockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableDomainTransferLockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableDomainTransferLockInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *EnableDomainTransferLockInput) SetDomainName(v string) *EnableDomainTransferLockInput { + s.DomainName = &v + return s +} + +// The EnableDomainTransferLock response includes the following elements. +type EnableDomainTransferLockOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To use this ID to query + // the operation status, use GetOperationDetail. + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableDomainTransferLockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableDomainTransferLockOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *EnableDomainTransferLockOutput) SetOperationId(v string) *EnableDomainTransferLockOutput { + s.OperationId = &v + return s +} + +// ExtraParam includes the following elements. +type ExtraParam struct { + _ struct{} `type:"structure"` + + // The name of an additional parameter that is required by a top-level domain. + // Here are the top-level domains that require additional parameters and the + // names of the parameters that they require: + // + // .com.au and .net.au + // + // * AU_ID_NUMBER + // + // * AU_ID_TYPE Valid values include the following: ABN (Australian business + // number) ACN (Australian company number) TM (Trademark number) + // + // .ca + // + // * BRAND_NUMBER + // + // * CA_BUSINESS_ENTITY_TYPE Valid values include the following: BANK (Bank) + // COMMERCIAL_COMPANY (Commercial company) COMPANY (Company) COOPERATION + // (Cooperation) COOPERATIVE (Cooperative) COOPRIX (Cooprix) CORP (Corporation) + // CREDIT_UNION (Credit union) FOMIA (Federation of mutual insurance associations) + // INC (Incorporated) LTD (Limited) LTEE (Limitée) LLC (Limited liability + // corporation) LLP (Limited liability partnership) LTE (Lte.) MBA (Mutual + // benefit association) MIC (Mutual insurance company) NFP (Not-for-profit + // corporation) SA (S.A.) SAVINGS_COMPANY (Savings company) SAVINGS_UNION + // (Savings union) SARL (Société à responsabilité limitée) TRUST (Trust) + // ULC (Unlimited liability corporation) + // + // * CA_LEGAL_TYPE When ContactType is PERSON, valid values include the following: + // ABO (Aboriginal Peoples indigenous to Canada) CCT (Canadian citizen) LGR + // (Legal Representative of a Canadian Citizen or Permanent Resident) RES + // (Permanent resident of Canada) When ContactType is a value other than + // PERSON, valid values include the following: ASS (Canadian unincorporated + // association) CCO (Canadian corporation) EDU (Canadian educational institution) + // GOV (Government or government entity in Canada) HOP (Canadian Hospital) + // INB (Indian Band recognized by the Indian Act of Canada) LAM (Canadian + // Library, Archive, or Museum) MAJ (Her/His Majesty the Queen/King) OMK + // (Official mark registered in Canada) PLT (Canadian Political Party) PRT + // (Partnership Registered in Canada) TDM (Trademark registered in Canada) + // TRD (Canadian Trade Union) TRS (Trust established in Canada) + // + // .es + // + // * ES_IDENTIFICATION Specify the applicable value: For contacts inside + // Spain: Enter your passport ID. For contacts outside of Spain: Enter the + // VAT identification number for the company. For .es domains, the value + // of ContactType must be PERSON. + // + // * ES_IDENTIFICATION_TYPE Valid values include the following: DNI_AND_NIF + // (For Spanish contacts) NIE (For foreigners with legal residence) OTHER + // (For contacts outside of Spain) + // + // * ES_LEGAL_FORM Valid values include the following: ASSOCIATION CENTRAL_GOVERNMENT_BODY + // CIVIL_SOCIETY COMMUNITY_OF_OWNERS COMMUNITY_PROPERTY CONSULATE COOPERATIVE + // DESIGNATION_OF_ORIGIN_SUPERVISORY_COUNCIL ECONOMIC_INTEREST_GROUP EMBASSY + // ENTITY_MANAGING_NATURAL_AREAS FARM_PARTNERSHIP FOUNDATION GENERAL_AND_LIMITED_PARTNERSHIP + // GENERAL_PARTNERSHIP INDIVIDUAL LIMITED_COMPANY LOCAL_AUTHORITY LOCAL_PUBLIC_ENTITY + // MUTUAL_INSURANCE_COMPANY NATIONAL_PUBLIC_ENTITY ORDER_OR_RELIGIOUS_INSTITUTION + // OTHERS (Only for contacts outside of Spain) POLITICAL_PARTY PROFESSIONAL_ASSOCIATION + // PUBLIC_LAW_ASSOCIATION PUBLIC_LIMITED_COMPANY REGIONAL_GOVERNMENT_BODY + // REGIONAL_PUBLIC_ENTITY SAVINGS_BANK SPANISH_OFFICE SPORTS_ASSOCIATION + // SPORTS_FEDERATION SPORTS_LIMITED_COMPANY TEMPORARY_ALLIANCE_OF_ENTERPRISES + // TRADE_UNION WORKER_OWNED_COMPANY WORKER_OWNED_LIMITED_COMPANY + // + // .fi + // + // * BIRTH_DATE_IN_YYYY_MM_DD + // + // * FI_BUSINESS_NUMBER + // + // * FI_ID_NUMBER + // + // * FI_NATIONALITY Valid values include the following: FINNISH NOT_FINNISH + // + // * FI_ORGANIZATION_TYPE Valid values include the following: COMPANY CORPORATION + // GOVERNMENT INSTITUTION POLITICAL_PARTY PUBLIC_COMMUNITY TOWNSHIP + // + // .fr + // + // * BIRTH_CITY + // + // * BIRTH_COUNTRY + // + // * BIRTH_DATE_IN_YYYY_MM_DD + // + // * BIRTH_DEPARTMENT: Specify the INSEE code that corresponds with the department + // where the contact was born. If the contact was born somewhere other than + // France or its overseas departments, specify 99. For more information, + // including a list of departments and the corresponding INSEE numbers, see + // the Wikipedia entry Departments of France (https://en.wikipedia.org/wiki/Departments_of_France). + // + // * BRAND_NUMBER + // + // .it + // + // * IT_NATIONALITY + // + // * IT_PIN + // + // * IT_REGISTRANT_ENTITY_TYPE Valid values include the following: FOREIGNERS + // FREELANCE_WORKERS (Freelance workers and professionals) ITALIAN_COMPANIES + // (Italian companies and one-person companies) NON_PROFIT_ORGANIZATIONS + // OTHER_SUBJECTS PUBLIC_ORGANIZATIONS + // + // .ru + // + // * BIRTH_DATE_IN_YYYY_MM_DD + // + // * RU_PASSPORT_DATA + // + // .se + // + // * BIRTH_COUNTRY + // + // * SE_ID_NUMBER + // + // .sg + // + // * SG_ID_NUMBER + // + // .co.uk, .me.uk, and .org.uk + // + // * UK_CONTACT_TYPE Valid values include the following: CRC (UK Corporation + // by Royal Charter) FCORP (Non-UK Corporation) FIND (Non-UK Individual, + // representing self) FOTHER (Non-UK Entity that does not fit into any other + // category) GOV (UK Government Body) IND (UK Individual (representing self)) + // IP (UK Industrial/Provident Registered Company) LLP (UK Limited Liability + // Partnership) LTD (UK Limited Company) OTHER (UK Entity that does not fit + // into any other category) PLC (UK Public Limited Company) PTNR (UK Partnership) + // RCHAR (UK Registered Charity) SCH (UK School) STAT (UK Statutory Body) + // STRA (UK Sole Trader) + // + // * UK_COMPANY_NUMBER + // + // In addition, many TLDs require a VAT_NUMBER. + // + // Name is a required field + Name *string `type:"string" required:"true" enum:"ExtraParamName"` + + // The value that corresponds with the name of an extra parameter. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ExtraParam) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExtraParam) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExtraParam) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExtraParam"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ExtraParam) SetName(v string) *ExtraParam { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ExtraParam) SetValue(v string) *ExtraParam { + s.Value = &v + return s +} + +type GetContactReachabilityStatusInput struct { + _ struct{} `type:"structure"` + + // The name of the domain for which you want to know whether the registrant + // contact has confirmed that the email address is valid. + DomainName *string `locationName:"domainName" type:"string"` +} + +// String returns the string representation +func (s GetContactReachabilityStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetContactReachabilityStatusInput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *GetContactReachabilityStatusInput) SetDomainName(v string) *GetContactReachabilityStatusInput { + s.DomainName = &v + return s +} + +type GetContactReachabilityStatusOutput struct { + _ struct{} `type:"structure"` + + // The domain name for which you requested the reachability status. + DomainName *string `locationName:"domainName" type:"string"` + + // Whether the registrant contact has responded. Values include the following: + // + // PENDING + // + // We sent the confirmation email and haven't received a response yet. + // + // DONE + // + // We sent the email and got confirmation from the registrant contact. + // + // EXPIRED + // + // The time limit expired before the registrant contact responded. + Status *string `locationName:"status" type:"string" enum:"ReachabilityStatus"` +} + +// String returns the string representation +func (s GetContactReachabilityStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetContactReachabilityStatusOutput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *GetContactReachabilityStatusOutput) SetDomainName(v string) *GetContactReachabilityStatusOutput { + s.DomainName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetContactReachabilityStatusOutput) SetStatus(v string) *GetContactReachabilityStatusOutput { + s.Status = &v + return s +} + +// The GetDomainDetail request includes the following element. +type GetDomainDetailInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to get detailed information about. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDomainDetailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainDetailInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDomainDetailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDomainDetailInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetDomainDetailInput) SetDomainName(v string) *GetDomainDetailInput { + s.DomainName = &v + return s +} + +// The GetDomainDetail response includes the following elements. +type GetDomainDetailOutput struct { + _ struct{} `type:"structure"` + + // Email address to contact to report incorrect contact information for a domain, + // to report that the domain is being used to send spam, to report that someone + // is cybersquatting on a domain name, or report some other type of abuse. + AbuseContactEmail *string `type:"string"` + + // Phone number for reporting abuse. + AbuseContactPhone *string `type:"string"` + + // Provides details about the domain administrative contact. + // + // AdminContact is a required field + AdminContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // Specifies whether contact information is concealed from WHOIS queries. If + // the value is true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If the value is false, WHOIS queries + // return the information that you entered for the admin contact. + AdminPrivacy *bool `type:"boolean"` + + // Specifies whether the domain registration is set to renew automatically. + AutoRenew *bool `type:"boolean"` + + // The date when the domain was created as found in the response to a WHOIS + // query. The date and time is in Unix time format and Coordinated Universal + // time (UTC). + CreationDate *time.Time `type:"timestamp"` + + // Reserved for future use. + DnsSec *string `type:"string"` + + // The name of a domain. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The date when the registration for the domain is set to expire. The date + // and time is in Unix time format and Coordinated Universal time (UTC). + ExpirationDate *time.Time `type:"timestamp"` + + // The name of the domain. + // + // Nameservers is a required field + Nameservers []*Nameserver `type:"list" required:"true"` + + // Provides details about the domain registrant. + // + // RegistrantContact is a required field + RegistrantContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // Specifies whether contact information is concealed from WHOIS queries. If + // the value is true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If the value is false, WHOIS queries + // return the information that you entered for the registrant contact (domain + // owner). + RegistrantPrivacy *bool `type:"boolean"` + + // Name of the registrar of the domain as identified in the registry. Domains + // with a .com, .net, or .org TLD are registered by Amazon Registrar. All other + // domains are registered by our registrar associate, Gandi. The value for domains + // that are registered by Gandi is "GANDI SAS". + RegistrarName *string `type:"string"` + + // Web address of the registrar. + RegistrarUrl *string `type:"string"` + + // Reserved for future use. + RegistryDomainId *string `type:"string"` + + // Reseller of the domain. Domains registered or transferred using Route 53 + // domains will have "Amazon" as the reseller. + Reseller *string `type:"string"` + + // An array of domain name status codes, also known as Extensible Provisioning + // Protocol (EPP) status codes. + // + // ICANN, the organization that maintains a central database of domain names, + // has developed a set of domain name status codes that tell you the status + // of a variety of operations on a domain name, for example, registering a domain + // name, transferring a domain name to another registrar, renewing the registration + // for a domain name, and so on. All registrars use this same set of status + // codes. + // + // For a current list of domain name status codes and an explanation of what + // each code means, go to the ICANN website (https://www.icann.org/) and search + // for epp status codes. (Search on the ICANN website; web searches sometimes + // return an old version of the document.) + StatusList []*string `type:"list"` + + // Provides details about the domain technical contact. + // + // TechContact is a required field + TechContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // Specifies whether contact information is concealed from WHOIS queries. If + // the value is true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If the value is false, WHOIS queries + // return the information that you entered for the technical contact. + TechPrivacy *bool `type:"boolean"` + + // The last updated date of the domain as found in the response to a WHOIS query. + // The date and time is in Unix time format and Coordinated Universal time (UTC). + UpdatedDate *time.Time `type:"timestamp"` + + // The fully qualified name of the WHOIS server that can answer the WHOIS query + // for the domain. + WhoIsServer *string `type:"string"` +} + +// String returns the string representation +func (s GetDomainDetailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainDetailOutput) GoString() string { + return s.String() +} + +// SetAbuseContactEmail sets the AbuseContactEmail field's value. +func (s *GetDomainDetailOutput) SetAbuseContactEmail(v string) *GetDomainDetailOutput { + s.AbuseContactEmail = &v + return s +} + +// SetAbuseContactPhone sets the AbuseContactPhone field's value. +func (s *GetDomainDetailOutput) SetAbuseContactPhone(v string) *GetDomainDetailOutput { + s.AbuseContactPhone = &v + return s +} + +// SetAdminContact sets the AdminContact field's value. +func (s *GetDomainDetailOutput) SetAdminContact(v *ContactDetail) *GetDomainDetailOutput { + s.AdminContact = v + return s +} + +// SetAdminPrivacy sets the AdminPrivacy field's value. +func (s *GetDomainDetailOutput) SetAdminPrivacy(v bool) *GetDomainDetailOutput { + s.AdminPrivacy = &v + return s +} + +// SetAutoRenew sets the AutoRenew field's value. +func (s *GetDomainDetailOutput) SetAutoRenew(v bool) *GetDomainDetailOutput { + s.AutoRenew = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *GetDomainDetailOutput) SetCreationDate(v time.Time) *GetDomainDetailOutput { + s.CreationDate = &v + return s +} + +// SetDnsSec sets the DnsSec field's value. +func (s *GetDomainDetailOutput) SetDnsSec(v string) *GetDomainDetailOutput { + s.DnsSec = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *GetDomainDetailOutput) SetDomainName(v string) *GetDomainDetailOutput { + s.DomainName = &v + return s +} + +// SetExpirationDate sets the ExpirationDate field's value. +func (s *GetDomainDetailOutput) SetExpirationDate(v time.Time) *GetDomainDetailOutput { + s.ExpirationDate = &v + return s +} + +// SetNameservers sets the Nameservers field's value. +func (s *GetDomainDetailOutput) SetNameservers(v []*Nameserver) *GetDomainDetailOutput { + s.Nameservers = v + return s +} + +// SetRegistrantContact sets the RegistrantContact field's value. +func (s *GetDomainDetailOutput) SetRegistrantContact(v *ContactDetail) *GetDomainDetailOutput { + s.RegistrantContact = v + return s +} + +// SetRegistrantPrivacy sets the RegistrantPrivacy field's value. +func (s *GetDomainDetailOutput) SetRegistrantPrivacy(v bool) *GetDomainDetailOutput { + s.RegistrantPrivacy = &v + return s +} + +// SetRegistrarName sets the RegistrarName field's value. +func (s *GetDomainDetailOutput) SetRegistrarName(v string) *GetDomainDetailOutput { + s.RegistrarName = &v + return s +} + +// SetRegistrarUrl sets the RegistrarUrl field's value. +func (s *GetDomainDetailOutput) SetRegistrarUrl(v string) *GetDomainDetailOutput { + s.RegistrarUrl = &v + return s +} + +// SetRegistryDomainId sets the RegistryDomainId field's value. +func (s *GetDomainDetailOutput) SetRegistryDomainId(v string) *GetDomainDetailOutput { + s.RegistryDomainId = &v + return s +} + +// SetReseller sets the Reseller field's value. +func (s *GetDomainDetailOutput) SetReseller(v string) *GetDomainDetailOutput { + s.Reseller = &v + return s +} + +// SetStatusList sets the StatusList field's value. +func (s *GetDomainDetailOutput) SetStatusList(v []*string) *GetDomainDetailOutput { + s.StatusList = v + return s +} + +// SetTechContact sets the TechContact field's value. +func (s *GetDomainDetailOutput) SetTechContact(v *ContactDetail) *GetDomainDetailOutput { + s.TechContact = v + return s +} + +// SetTechPrivacy sets the TechPrivacy field's value. +func (s *GetDomainDetailOutput) SetTechPrivacy(v bool) *GetDomainDetailOutput { + s.TechPrivacy = &v + return s +} + +// SetUpdatedDate sets the UpdatedDate field's value. +func (s *GetDomainDetailOutput) SetUpdatedDate(v time.Time) *GetDomainDetailOutput { + s.UpdatedDate = &v + return s +} + +// SetWhoIsServer sets the WhoIsServer field's value. +func (s *GetDomainDetailOutput) SetWhoIsServer(v string) *GetDomainDetailOutput { + s.WhoIsServer = &v + return s +} + +type GetDomainSuggestionsInput struct { + _ struct{} `type:"structure"` + + // A domain name that you want to use as the basis for a list of possible domain + // names. The top-level domain (TLD), such as .com, must be a TLD that Route + // 53 supports. For a list of supported TLDs, see Domains that You Can Register + // with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // The domain name can contain only the following characters: + // + // * Letters a through z. Domain names are not case sensitive. + // + // * Numbers 0 through 9. + // + // * Hyphen (-). You can't specify a hyphen at the beginning or end of a + // label. + // + // * Period (.) to separate the labels in the name, such as the . in example.com. + // + // Internationalized domain names are not supported for some top-level domains. + // To determine whether the TLD that you want to use supports internationalized + // domain names, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html). + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // If OnlyAvailable is true, Route 53 returns only domain names that are available. + // If OnlyAvailable is false, Route 53 returns domain names without checking + // whether they're available to be registered. To determine whether the domain + // is available, you can call checkDomainAvailability for each suggestion. + // + // OnlyAvailable is a required field + OnlyAvailable *bool `type:"boolean" required:"true"` + + // The number of suggested domain names that you want Route 53 to return. Specify + // a value between 1 and 50. + // + // SuggestionCount is a required field + SuggestionCount *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s GetDomainSuggestionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainSuggestionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDomainSuggestionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDomainSuggestionsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.OnlyAvailable == nil { + invalidParams.Add(request.NewErrParamRequired("OnlyAvailable")) + } + if s.SuggestionCount == nil { + invalidParams.Add(request.NewErrParamRequired("SuggestionCount")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetDomainSuggestionsInput) SetDomainName(v string) *GetDomainSuggestionsInput { + s.DomainName = &v + return s +} + +// SetOnlyAvailable sets the OnlyAvailable field's value. +func (s *GetDomainSuggestionsInput) SetOnlyAvailable(v bool) *GetDomainSuggestionsInput { + s.OnlyAvailable = &v + return s +} + +// SetSuggestionCount sets the SuggestionCount field's value. +func (s *GetDomainSuggestionsInput) SetSuggestionCount(v int64) *GetDomainSuggestionsInput { + s.SuggestionCount = &v + return s +} + +type GetDomainSuggestionsOutput struct { + _ struct{} `type:"structure"` + + // A list of possible domain names. If you specified true for OnlyAvailable + // in the request, the list contains only domains that are available for registration. + SuggestionsList []*DomainSuggestion `type:"list"` +} + +// String returns the string representation +func (s GetDomainSuggestionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainSuggestionsOutput) GoString() string { + return s.String() +} + +// SetSuggestionsList sets the SuggestionsList field's value. +func (s *GetDomainSuggestionsOutput) SetSuggestionsList(v []*DomainSuggestion) *GetDomainSuggestionsOutput { + s.SuggestionsList = v + return s +} + +// The GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html) +// request includes the following element. +type GetOperationDetailInput struct { + _ struct{} `type:"structure"` + + // The identifier for the operation for which you want to get the status. Route + // 53 returned the identifier in the response to the original request. + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetOperationDetailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetOperationDetailInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOperationDetailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOperationDetailInput"} + if s.OperationId == nil { + invalidParams.Add(request.NewErrParamRequired("OperationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOperationId sets the OperationId field's value. +func (s *GetOperationDetailInput) SetOperationId(v string) *GetOperationDetailInput { + s.OperationId = &v + return s +} + +// The GetOperationDetail response includes the following elements. +type GetOperationDetailOutput struct { + _ struct{} `type:"structure"` + + // The name of a domain. + DomainName *string `type:"string"` + + // Detailed information on the status including possible errors. + Message *string `type:"string"` + + // The identifier for the operation. + OperationId *string `type:"string"` + + // The current status of the requested operation in the system. + Status *string `type:"string" enum:"OperationStatus"` + + // The date when the request was submitted. + SubmittedDate *time.Time `type:"timestamp"` + + // The type of operation that was requested. + Type *string `type:"string" enum:"OperationType"` +} + +// String returns the string representation +func (s GetOperationDetailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetOperationDetailOutput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *GetOperationDetailOutput) SetDomainName(v string) *GetOperationDetailOutput { + s.DomainName = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *GetOperationDetailOutput) SetMessage(v string) *GetOperationDetailOutput { + s.Message = &v + return s +} + +// SetOperationId sets the OperationId field's value. +func (s *GetOperationDetailOutput) SetOperationId(v string) *GetOperationDetailOutput { + s.OperationId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetOperationDetailOutput) SetStatus(v string) *GetOperationDetailOutput { + s.Status = &v + return s +} + +// SetSubmittedDate sets the SubmittedDate field's value. +func (s *GetOperationDetailOutput) SetSubmittedDate(v time.Time) *GetOperationDetailOutput { + s.SubmittedDate = &v + return s +} + +// SetType sets the Type field's value. +func (s *GetOperationDetailOutput) SetType(v string) *GetOperationDetailOutput { + s.Type = &v + return s +} + +// The requested item is not acceptable. For example, for APIs that accept a +// domain name, the request might specify a domain name that doesn't belong +// to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, +// the password might be invalid. +type InvalidInput struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The requested item is not acceptable. For example, for an OperationId it + // might refer to the ID of an operation that is already completed. For a domain + // name, it might not be a valid domain name or belong to the requester account. + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s InvalidInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InvalidInput) GoString() string { + return s.String() +} + +func newErrorInvalidInput(v protocol.ResponseMetadata) error { + return &InvalidInput{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidInput) Code() string { + return "InvalidInput" +} + +// Message returns the exception's message. +func (s *InvalidInput) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidInput) OrigErr() error { + return nil +} + +func (s *InvalidInput) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidInput) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidInput) RequestID() string { + return s.RespMetadata.RequestID +} + +// The ListDomains request includes the following elements. +type ListDomainsInput struct { + _ struct{} `type:"structure"` + + // For an initial request for a list of domains, omit this element. If the number + // of domains that are associated with the current AWS account is greater than + // the value that you specified for MaxItems, you can use Marker to return additional + // domains. Get the value of NextPageMarker from the previous response, and + // submit another request that includes the value of NextPageMarker in the Marker + // element. + // + // Constraints: The marker must match the value specified in the previous request. + Marker *string `type:"string"` + + // Number of domains to be returned. + // + // Default: 20 + MaxItems *int64 `type:"integer"` +} + +// String returns the string representation +func (s ListDomainsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainsInput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *ListDomainsInput) SetMarker(v string) *ListDomainsInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListDomainsInput) SetMaxItems(v int64) *ListDomainsInput { + s.MaxItems = &v + return s +} + +// The ListDomains response includes the following elements. +type ListDomainsOutput struct { + _ struct{} `type:"structure"` + + // A summary of domains. + // + // Domains is a required field + Domains []*DomainSummary `type:"list" required:"true"` + + // If there are more domains than you specified for MaxItems in the request, + // submit another request and include the value of NextPageMarker in the value + // of Marker. + NextPageMarker *string `type:"string"` +} + +// String returns the string representation +func (s ListDomainsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainsOutput) GoString() string { + return s.String() +} + +// SetDomains sets the Domains field's value. +func (s *ListDomainsOutput) SetDomains(v []*DomainSummary) *ListDomainsOutput { + s.Domains = v + return s +} + +// SetNextPageMarker sets the NextPageMarker field's value. +func (s *ListDomainsOutput) SetNextPageMarker(v string) *ListDomainsOutput { + s.NextPageMarker = &v + return s +} + +// The ListOperations request includes the following elements. +type ListOperationsInput struct { + _ struct{} `type:"structure"` + + // For an initial request for a list of operations, omit this element. If the + // number of operations that are not yet complete is greater than the value + // that you specified for MaxItems, you can use Marker to return additional + // operations. Get the value of NextPageMarker from the previous response, and + // submit another request that includes the value of NextPageMarker in the Marker + // element. + Marker *string `type:"string"` + + // Number of domains to be returned. + // + // Default: 20 + MaxItems *int64 `type:"integer"` + + // An optional parameter that lets you get information about all the operations + // that you submitted after a specified date and time. Specify the date and + // time in Unix time format and Coordinated Universal time (UTC). + SubmittedSince *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s ListOperationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOperationsInput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *ListOperationsInput) SetMarker(v string) *ListOperationsInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListOperationsInput) SetMaxItems(v int64) *ListOperationsInput { + s.MaxItems = &v + return s +} + +// SetSubmittedSince sets the SubmittedSince field's value. +func (s *ListOperationsInput) SetSubmittedSince(v time.Time) *ListOperationsInput { + s.SubmittedSince = &v + return s +} + +// The ListOperations response includes the following elements. +type ListOperationsOutput struct { + _ struct{} `type:"structure"` + + // If there are more operations than you specified for MaxItems in the request, + // submit another request and include the value of NextPageMarker in the value + // of Marker. + NextPageMarker *string `type:"string"` + + // Lists summaries of the operations. + // + // Operations is a required field + Operations []*OperationSummary `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListOperationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOperationsOutput) GoString() string { + return s.String() +} + +// SetNextPageMarker sets the NextPageMarker field's value. +func (s *ListOperationsOutput) SetNextPageMarker(v string) *ListOperationsOutput { + s.NextPageMarker = &v + return s +} + +// SetOperations sets the Operations field's value. +func (s *ListOperationsOutput) SetOperations(v []*OperationSummary) *ListOperationsOutput { + s.Operations = v + return s +} + +// The ListTagsForDomainRequest includes the following elements. +type ListTagsForDomainInput struct { + _ struct{} `type:"structure"` + + // The domain for which you want to get a list of tags. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *ListTagsForDomainInput) SetDomainName(v string) *ListTagsForDomainInput { + s.DomainName = &v + return s +} + +// The ListTagsForDomain response includes the following elements. +type ListTagsForDomainOutput struct { + _ struct{} `type:"structure"` + + // A list of the tags that are associated with the specified domain. + // + // TagList is a required field + TagList []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTagsForDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForDomainOutput) GoString() string { + return s.String() +} + +// SetTagList sets the TagList field's value. +func (s *ListTagsForDomainOutput) SetTagList(v []*Tag) *ListTagsForDomainOutput { + s.TagList = v + return s +} + +// Nameserver includes the following elements. +type Nameserver struct { + _ struct{} `type:"structure"` + + // Glue IP address of a name server entry. Glue IP addresses are required only + // when the name of the name server is a subdomain of the domain. For example, + // if your domain is example.com and the name server for the domain is ns.example.com, + // you need to specify the IP address for ns.example.com. + // + // Constraints: The list can contain only one IPv4 and one IPv6 address. + GlueIps []*string `type:"list"` + + // The fully qualified host name of the name server. + // + // Constraint: Maximum 255 characters + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Nameserver) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Nameserver) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Nameserver) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Nameserver"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlueIps sets the GlueIps field's value. +func (s *Nameserver) SetGlueIps(v []*string) *Nameserver { + s.GlueIps = v + return s +} + +// SetName sets the Name field's value. +func (s *Nameserver) SetName(v string) *Nameserver { + s.Name = &v + return s +} + +// The number of operations or jobs running exceeded the allowed threshold for +// the account. +type OperationLimitExceeded struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The number of operations or jobs running exceeded the allowed threshold for + // the account. + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s OperationLimitExceeded) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OperationLimitExceeded) GoString() string { + return s.String() +} + +func newErrorOperationLimitExceeded(v protocol.ResponseMetadata) error { + return &OperationLimitExceeded{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *OperationLimitExceeded) Code() string { + return "OperationLimitExceeded" +} + +// Message returns the exception's message. +func (s *OperationLimitExceeded) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *OperationLimitExceeded) OrigErr() error { + return nil +} + +func (s *OperationLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *OperationLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *OperationLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID +} + +// OperationSummary includes the following elements. +type OperationSummary struct { + _ struct{} `type:"structure"` + + // Identifier returned to track the requested action. + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` + + // The current status of the requested operation in the system. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"OperationStatus"` + + // The date when the request was submitted. + // + // SubmittedDate is a required field + SubmittedDate *time.Time `type:"timestamp" required:"true"` + + // Type of the action requested. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"OperationType"` +} + +// String returns the string representation +func (s OperationSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OperationSummary) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *OperationSummary) SetOperationId(v string) *OperationSummary { + s.OperationId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *OperationSummary) SetStatus(v string) *OperationSummary { + s.Status = &v + return s +} + +// SetSubmittedDate sets the SubmittedDate field's value. +func (s *OperationSummary) SetSubmittedDate(v time.Time) *OperationSummary { + s.SubmittedDate = &v + return s +} + +// SetType sets the Type field's value. +func (s *OperationSummary) SetType(v string) *OperationSummary { + s.Type = &v + return s +} + +// The RegisterDomain request includes the following elements. +type RegisterDomainInput struct { + _ struct{} `type:"structure"` + + // Provides detailed contact information. For information about the values that + // you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html). + // + // AdminContact is a required field + AdminContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // Indicates whether the domain will be automatically renewed (true) or not + // (false). Autorenewal only takes effect after the account is charged. + // + // Default: true + AutoRenew *bool `type:"boolean"` + + // The domain name that you want to register. The top-level domain (TLD), such + // as .com, must be a TLD that Route 53 supports. For a list of supported TLDs, + // see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // The domain name can contain only the following characters: + // + // * Letters a through z. Domain names are not case sensitive. + // + // * Numbers 0 through 9. + // + // * Hyphen (-). You can't specify a hyphen at the beginning or end of a + // label. + // + // * Period (.) to separate the labels in the name, such as the . in example.com. + // + // Internationalized domain names are not supported for some top-level domains. + // To determine whether the TLD that you want to use supports internationalized + // domain names, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html). + // For more information, see Formatting Internationalized Domain Names (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns). + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The number of years that you want to register the domain for. Domains are + // registered for a minimum of one year. The maximum period depends on the top-level + // domain. For the range of valid values for your domain, see Domains that You + // Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // Default: 1 + // + // DurationInYears is a required field + DurationInYears *int64 `min:"1" type:"integer" required:"true"` + + // Reserved for future use. + IdnLangCode *string `type:"string"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the admin contact. + // + // Default: true + PrivacyProtectAdminContact *bool `type:"boolean"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the registrant contact (the domain + // owner). + // + // Default: true + PrivacyProtectRegistrantContact *bool `type:"boolean"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the technical contact. + // + // Default: true + PrivacyProtectTechContact *bool `type:"boolean"` + + // Provides detailed contact information. For information about the values that + // you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html). + // + // RegistrantContact is a required field + RegistrantContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // Provides detailed contact information. For information about the values that + // you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html). + // + // TechContact is a required field + TechContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s RegisterDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterDomainInput"} + if s.AdminContact == nil { + invalidParams.Add(request.NewErrParamRequired("AdminContact")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DurationInYears == nil { + invalidParams.Add(request.NewErrParamRequired("DurationInYears")) + } + if s.DurationInYears != nil && *s.DurationInYears < 1 { + invalidParams.Add(request.NewErrParamMinValue("DurationInYears", 1)) + } + if s.RegistrantContact == nil { + invalidParams.Add(request.NewErrParamRequired("RegistrantContact")) + } + if s.TechContact == nil { + invalidParams.Add(request.NewErrParamRequired("TechContact")) + } + if s.AdminContact != nil { + if err := s.AdminContact.Validate(); err != nil { + invalidParams.AddNested("AdminContact", err.(request.ErrInvalidParams)) + } + } + if s.RegistrantContact != nil { + if err := s.RegistrantContact.Validate(); err != nil { + invalidParams.AddNested("RegistrantContact", err.(request.ErrInvalidParams)) + } + } + if s.TechContact != nil { + if err := s.TechContact.Validate(); err != nil { + invalidParams.AddNested("TechContact", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminContact sets the AdminContact field's value. +func (s *RegisterDomainInput) SetAdminContact(v *ContactDetail) *RegisterDomainInput { + s.AdminContact = v + return s +} + +// SetAutoRenew sets the AutoRenew field's value. +func (s *RegisterDomainInput) SetAutoRenew(v bool) *RegisterDomainInput { + s.AutoRenew = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *RegisterDomainInput) SetDomainName(v string) *RegisterDomainInput { + s.DomainName = &v + return s +} + +// SetDurationInYears sets the DurationInYears field's value. +func (s *RegisterDomainInput) SetDurationInYears(v int64) *RegisterDomainInput { + s.DurationInYears = &v + return s +} + +// SetIdnLangCode sets the IdnLangCode field's value. +func (s *RegisterDomainInput) SetIdnLangCode(v string) *RegisterDomainInput { + s.IdnLangCode = &v + return s +} + +// SetPrivacyProtectAdminContact sets the PrivacyProtectAdminContact field's value. +func (s *RegisterDomainInput) SetPrivacyProtectAdminContact(v bool) *RegisterDomainInput { + s.PrivacyProtectAdminContact = &v + return s +} + +// SetPrivacyProtectRegistrantContact sets the PrivacyProtectRegistrantContact field's value. +func (s *RegisterDomainInput) SetPrivacyProtectRegistrantContact(v bool) *RegisterDomainInput { + s.PrivacyProtectRegistrantContact = &v + return s +} + +// SetPrivacyProtectTechContact sets the PrivacyProtectTechContact field's value. +func (s *RegisterDomainInput) SetPrivacyProtectTechContact(v bool) *RegisterDomainInput { + s.PrivacyProtectTechContact = &v + return s +} + +// SetRegistrantContact sets the RegistrantContact field's value. +func (s *RegisterDomainInput) SetRegistrantContact(v *ContactDetail) *RegisterDomainInput { + s.RegistrantContact = v + return s +} + +// SetTechContact sets the TechContact field's value. +func (s *RegisterDomainInput) SetTechContact(v *ContactDetail) *RegisterDomainInput { + s.TechContact = v + return s +} + +// The RegisterDomain response includes the following element. +type RegisterDomainOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RegisterDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterDomainOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *RegisterDomainOutput) SetOperationId(v string) *RegisterDomainOutput { + s.OperationId = &v + return s +} + +// The RejectDomainTransferFromAnotherAwsAccount request includes the following +// element. +type RejectDomainTransferFromAnotherAwsAccountInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that was specified when another AWS account submitted + // a TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html) + // request. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RejectDomainTransferFromAnotherAwsAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectDomainTransferFromAnotherAwsAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectDomainTransferFromAnotherAwsAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectDomainTransferFromAnotherAwsAccountInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *RejectDomainTransferFromAnotherAwsAccountInput) SetDomainName(v string) *RejectDomainTransferFromAnotherAwsAccountInput { + s.DomainName = &v + return s +} + +// The RejectDomainTransferFromAnotherAwsAccount response includes the following +// element. +type RejectDomainTransferFromAnotherAwsAccountOutput struct { + _ struct{} `type:"structure"` + + // The identifier that TransferDomainToAnotherAwsAccount returned to track the + // progress of the request. Because the transfer request was rejected, the value + // is no longer valid, and you can't use GetOperationDetail to query the operation + // status. + OperationId *string `type:"string"` +} + +// String returns the string representation +func (s RejectDomainTransferFromAnotherAwsAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectDomainTransferFromAnotherAwsAccountOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *RejectDomainTransferFromAnotherAwsAccountOutput) SetOperationId(v string) *RejectDomainTransferFromAnotherAwsAccountOutput { + s.OperationId = &v + return s +} + +// A RenewDomain request includes the number of years that you want to renew +// for and the current expiration year. +type RenewDomainInput struct { + _ struct{} `type:"structure"` + + // The year when the registration for the domain is set to expire. This value + // must match the current expiration date for the domain. + // + // CurrentExpiryYear is a required field + CurrentExpiryYear *int64 `type:"integer" required:"true"` + + // The name of the domain that you want to renew. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The number of years that you want to renew the domain for. The maximum number + // of years depends on the top-level domain. For the range of valid values for + // your domain, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // Default: 1 + DurationInYears *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s RenewDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RenewDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RenewDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RenewDomainInput"} + if s.CurrentExpiryYear == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentExpiryYear")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DurationInYears != nil && *s.DurationInYears < 1 { + invalidParams.Add(request.NewErrParamMinValue("DurationInYears", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCurrentExpiryYear sets the CurrentExpiryYear field's value. +func (s *RenewDomainInput) SetCurrentExpiryYear(v int64) *RenewDomainInput { + s.CurrentExpiryYear = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *RenewDomainInput) SetDomainName(v string) *RenewDomainInput { + s.DomainName = &v + return s +} + +// SetDurationInYears sets the DurationInYears field's value. +func (s *RenewDomainInput) SetDurationInYears(v int64) *RenewDomainInput { + s.DurationInYears = &v + return s +} + +type RenewDomainOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RenewDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RenewDomainOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *RenewDomainOutput) SetOperationId(v string) *RenewDomainOutput { + s.OperationId = &v + return s +} + +type ResendContactReachabilityEmailInput struct { + _ struct{} `type:"structure"` + + // The name of the domain for which you want Route 53 to resend a confirmation + // email to the registrant contact. + DomainName *string `locationName:"domainName" type:"string"` +} + +// String returns the string representation +func (s ResendContactReachabilityEmailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResendContactReachabilityEmailInput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *ResendContactReachabilityEmailInput) SetDomainName(v string) *ResendContactReachabilityEmailInput { + s.DomainName = &v + return s +} + +type ResendContactReachabilityEmailOutput struct { + _ struct{} `type:"structure"` + + // The domain name for which you requested a confirmation email. + DomainName *string `locationName:"domainName" type:"string"` + + // The email address for the registrant contact at the time that we sent the + // verification email. + EmailAddress *string `locationName:"emailAddress" type:"string"` + + // True if the email address for the registrant contact has already been verified, + // and false otherwise. If the email address has already been verified, we don't + // send another confirmation email. + IsAlreadyVerified *bool `locationName:"isAlreadyVerified" type:"boolean"` +} + +// String returns the string representation +func (s ResendContactReachabilityEmailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResendContactReachabilityEmailOutput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *ResendContactReachabilityEmailOutput) SetDomainName(v string) *ResendContactReachabilityEmailOutput { + s.DomainName = &v + return s +} + +// SetEmailAddress sets the EmailAddress field's value. +func (s *ResendContactReachabilityEmailOutput) SetEmailAddress(v string) *ResendContactReachabilityEmailOutput { + s.EmailAddress = &v + return s +} + +// SetIsAlreadyVerified sets the IsAlreadyVerified field's value. +func (s *ResendContactReachabilityEmailOutput) SetIsAlreadyVerified(v bool) *ResendContactReachabilityEmailOutput { + s.IsAlreadyVerified = &v + return s +} + +// A request for the authorization code for the specified domain. To transfer +// a domain to another registrar, you provide this value to the new registrar. +type RetrieveDomainAuthCodeInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to get an authorization code for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RetrieveDomainAuthCodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveDomainAuthCodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetrieveDomainAuthCodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetrieveDomainAuthCodeInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *RetrieveDomainAuthCodeInput) SetDomainName(v string) *RetrieveDomainAuthCodeInput { + s.DomainName = &v + return s +} + +// The RetrieveDomainAuthCode response includes the following element. +type RetrieveDomainAuthCodeOutput struct { + _ struct{} `type:"structure"` + + // The authorization code for the domain. + // + // AuthCode is a required field + AuthCode *string `type:"string" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s RetrieveDomainAuthCodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveDomainAuthCodeOutput) GoString() string { + return s.String() +} + +// SetAuthCode sets the AuthCode field's value. +func (s *RetrieveDomainAuthCodeOutput) SetAuthCode(v string) *RetrieveDomainAuthCodeOutput { + s.AuthCode = &v + return s +} + +// The top-level domain does not support this operation. +type TLDRulesViolation struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // The top-level domain does not support this operation. + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s TLDRulesViolation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TLDRulesViolation) GoString() string { + return s.String() +} + +func newErrorTLDRulesViolation(v protocol.ResponseMetadata) error { + return &TLDRulesViolation{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *TLDRulesViolation) Code() string { + return "TLDRulesViolation" +} + +// Message returns the exception's message. +func (s *TLDRulesViolation) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *TLDRulesViolation) OrigErr() error { + return nil +} + +func (s *TLDRulesViolation) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *TLDRulesViolation) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *TLDRulesViolation) RequestID() string { + return s.RespMetadata.RequestID +} + +// Each tag includes the following elements. +type Tag struct { + _ struct{} `type:"structure"` + + // The key (name) of a tag. + // + // Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@" + // + // Constraints: Each key can be 1-128 characters long. + Key *string `type:"string"` + + // The value of a tag. + // + // Valid values: A-Z, a-z, 0-9, space, ".:/=+\-@" + // + // Constraints: Each value can be 0-256 characters long. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// The TransferDomain request includes the following elements. +type TransferDomainInput struct { + _ struct{} `type:"structure"` + + // Provides detailed contact information. + // + // AdminContact is a required field + AdminContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // The authorization code for the domain. You get this value from the current + // registrar. + AuthCode *string `type:"string" sensitive:"true"` + + // Indicates whether the domain will be automatically renewed (true) or not + // (false). Autorenewal only takes effect after the account is charged. + // + // Default: true + AutoRenew *bool `type:"boolean"` + + // The name of the domain that you want to transfer to Route 53. The top-level + // domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list + // of supported TLDs, see Domains that You Can Register with Amazon Route 53 + // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) + // in the Amazon Route 53 Developer Guide. + // + // The domain name can contain only the following characters: + // + // * Letters a through z. Domain names are not case sensitive. + // + // * Numbers 0 through 9. + // + // * Hyphen (-). You can't specify a hyphen at the beginning or end of a + // label. + // + // * Period (.) to separate the labels in the name, such as the . in example.com. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The number of years that you want to register the domain for. Domains are + // registered for a minimum of one year. The maximum period depends on the top-level + // domain. + // + // Default: 1 + // + // DurationInYears is a required field + DurationInYears *int64 `min:"1" type:"integer" required:"true"` + + // Reserved for future use. + IdnLangCode *string `type:"string"` + + // Contains details for the host and glue IP addresses. + Nameservers []*Nameserver `type:"list"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the admin contact. + // + // Default: true + PrivacyProtectAdminContact *bool `type:"boolean"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the registrant contact (domain + // owner). + // + // Default: true + PrivacyProtectRegistrantContact *bool `type:"boolean"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the technical contact. + // + // Default: true + PrivacyProtectTechContact *bool `type:"boolean"` + + // Provides detailed contact information. + // + // RegistrantContact is a required field + RegistrantContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` + + // Provides detailed contact information. + // + // TechContact is a required field + TechContact *ContactDetail `type:"structure" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s TransferDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransferDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransferDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransferDomainInput"} + if s.AdminContact == nil { + invalidParams.Add(request.NewErrParamRequired("AdminContact")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DurationInYears == nil { + invalidParams.Add(request.NewErrParamRequired("DurationInYears")) + } + if s.DurationInYears != nil && *s.DurationInYears < 1 { + invalidParams.Add(request.NewErrParamMinValue("DurationInYears", 1)) + } + if s.RegistrantContact == nil { + invalidParams.Add(request.NewErrParamRequired("RegistrantContact")) + } + if s.TechContact == nil { + invalidParams.Add(request.NewErrParamRequired("TechContact")) + } + if s.AdminContact != nil { + if err := s.AdminContact.Validate(); err != nil { + invalidParams.AddNested("AdminContact", err.(request.ErrInvalidParams)) + } + } + if s.Nameservers != nil { + for i, v := range s.Nameservers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Nameservers", i), err.(request.ErrInvalidParams)) + } + } + } + if s.RegistrantContact != nil { + if err := s.RegistrantContact.Validate(); err != nil { + invalidParams.AddNested("RegistrantContact", err.(request.ErrInvalidParams)) + } + } + if s.TechContact != nil { + if err := s.TechContact.Validate(); err != nil { + invalidParams.AddNested("TechContact", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminContact sets the AdminContact field's value. +func (s *TransferDomainInput) SetAdminContact(v *ContactDetail) *TransferDomainInput { + s.AdminContact = v + return s +} + +// SetAuthCode sets the AuthCode field's value. +func (s *TransferDomainInput) SetAuthCode(v string) *TransferDomainInput { + s.AuthCode = &v + return s +} + +// SetAutoRenew sets the AutoRenew field's value. +func (s *TransferDomainInput) SetAutoRenew(v bool) *TransferDomainInput { + s.AutoRenew = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *TransferDomainInput) SetDomainName(v string) *TransferDomainInput { + s.DomainName = &v + return s +} + +// SetDurationInYears sets the DurationInYears field's value. +func (s *TransferDomainInput) SetDurationInYears(v int64) *TransferDomainInput { + s.DurationInYears = &v + return s +} + +// SetIdnLangCode sets the IdnLangCode field's value. +func (s *TransferDomainInput) SetIdnLangCode(v string) *TransferDomainInput { + s.IdnLangCode = &v + return s +} + +// SetNameservers sets the Nameservers field's value. +func (s *TransferDomainInput) SetNameservers(v []*Nameserver) *TransferDomainInput { + s.Nameservers = v + return s +} + +// SetPrivacyProtectAdminContact sets the PrivacyProtectAdminContact field's value. +func (s *TransferDomainInput) SetPrivacyProtectAdminContact(v bool) *TransferDomainInput { + s.PrivacyProtectAdminContact = &v + return s +} + +// SetPrivacyProtectRegistrantContact sets the PrivacyProtectRegistrantContact field's value. +func (s *TransferDomainInput) SetPrivacyProtectRegistrantContact(v bool) *TransferDomainInput { + s.PrivacyProtectRegistrantContact = &v + return s +} + +// SetPrivacyProtectTechContact sets the PrivacyProtectTechContact field's value. +func (s *TransferDomainInput) SetPrivacyProtectTechContact(v bool) *TransferDomainInput { + s.PrivacyProtectTechContact = &v + return s +} + +// SetRegistrantContact sets the RegistrantContact field's value. +func (s *TransferDomainInput) SetRegistrantContact(v *ContactDetail) *TransferDomainInput { + s.RegistrantContact = v + return s +} + +// SetTechContact sets the TechContact field's value. +func (s *TransferDomainInput) SetTechContact(v *ContactDetail) *TransferDomainInput { + s.TechContact = v + return s +} + +// The TransferDomain response includes the following element. +type TransferDomainOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TransferDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransferDomainOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *TransferDomainOutput) SetOperationId(v string) *TransferDomainOutput { + s.OperationId = &v + return s +} + +// The TransferDomainToAnotherAwsAccount request includes the following elements. +type TransferDomainToAnotherAwsAccountInput struct { + _ struct{} `type:"structure"` + + // The account ID of the AWS account that you want to transfer the domain to, + // for example, 111122223333. + // + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The name of the domain that you want to transfer from the current AWS account + // to another account. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TransferDomainToAnotherAwsAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransferDomainToAnotherAwsAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransferDomainToAnotherAwsAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransferDomainToAnotherAwsAccountInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *TransferDomainToAnotherAwsAccountInput) SetAccountId(v string) *TransferDomainToAnotherAwsAccountInput { + s.AccountId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *TransferDomainToAnotherAwsAccountInput) SetDomainName(v string) *TransferDomainToAnotherAwsAccountInput { + s.DomainName = &v + return s +} + +// The TransferDomainToAnotherAwsAccount response includes the following elements. +type TransferDomainToAnotherAwsAccountOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + OperationId *string `type:"string"` + + // To finish transferring a domain to another AWS account, the account that + // the domain is being transferred to must submit an AcceptDomainTransferFromAnotherAwsAccount + // (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html) + // request. The request must include the value of the Password element that + // was returned in the TransferDomainToAnotherAwsAccount response. + Password *string `type:"string"` +} + +// String returns the string representation +func (s TransferDomainToAnotherAwsAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransferDomainToAnotherAwsAccountOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *TransferDomainToAnotherAwsAccountOutput) SetOperationId(v string) *TransferDomainToAnotherAwsAccountOutput { + s.OperationId = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *TransferDomainToAnotherAwsAccountOutput) SetPassword(v string) *TransferDomainToAnotherAwsAccountOutput { + s.Password = &v + return s +} + +// Amazon Route 53 does not support this top-level domain (TLD). +type UnsupportedTLD struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + // Amazon Route 53 does not support this top-level domain (TLD). + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s UnsupportedTLD) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnsupportedTLD) GoString() string { + return s.String() +} + +func newErrorUnsupportedTLD(v protocol.ResponseMetadata) error { + return &UnsupportedTLD{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *UnsupportedTLD) Code() string { + return "UnsupportedTLD" +} + +// Message returns the exception's message. +func (s *UnsupportedTLD) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *UnsupportedTLD) OrigErr() error { + return nil +} + +func (s *UnsupportedTLD) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *UnsupportedTLD) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *UnsupportedTLD) RequestID() string { + return s.RespMetadata.RequestID +} + +// The UpdateDomainContact request includes the following elements. +type UpdateDomainContactInput struct { + _ struct{} `type:"structure"` + + // Provides detailed contact information. + AdminContact *ContactDetail `type:"structure" sensitive:"true"` + + // The name of the domain that you want to update contact information for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // Provides detailed contact information. + RegistrantContact *ContactDetail `type:"structure" sensitive:"true"` + + // Provides detailed contact information. + TechContact *ContactDetail `type:"structure" sensitive:"true"` +} + +// String returns the string representation +func (s UpdateDomainContactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainContactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDomainContactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDomainContactInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.AdminContact != nil { + if err := s.AdminContact.Validate(); err != nil { + invalidParams.AddNested("AdminContact", err.(request.ErrInvalidParams)) + } + } + if s.RegistrantContact != nil { + if err := s.RegistrantContact.Validate(); err != nil { + invalidParams.AddNested("RegistrantContact", err.(request.ErrInvalidParams)) + } + } + if s.TechContact != nil { + if err := s.TechContact.Validate(); err != nil { + invalidParams.AddNested("TechContact", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminContact sets the AdminContact field's value. +func (s *UpdateDomainContactInput) SetAdminContact(v *ContactDetail) *UpdateDomainContactInput { + s.AdminContact = v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateDomainContactInput) SetDomainName(v string) *UpdateDomainContactInput { + s.DomainName = &v + return s +} + +// SetRegistrantContact sets the RegistrantContact field's value. +func (s *UpdateDomainContactInput) SetRegistrantContact(v *ContactDetail) *UpdateDomainContactInput { + s.RegistrantContact = v + return s +} + +// SetTechContact sets the TechContact field's value. +func (s *UpdateDomainContactInput) SetTechContact(v *ContactDetail) *UpdateDomainContactInput { + s.TechContact = v + return s +} + +// The UpdateDomainContact response includes the following element. +type UpdateDomainContactOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateDomainContactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainContactOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *UpdateDomainContactOutput) SetOperationId(v string) *UpdateDomainContactOutput { + s.OperationId = &v + return s +} + +// The UpdateDomainContactPrivacy request includes the following elements. +type UpdateDomainContactPrivacyInput struct { + _ struct{} `type:"structure"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the admin contact. + AdminPrivacy *bool `type:"boolean"` + + // The name of the domain that you want to update the privacy setting for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the registrant contact (domain + // owner). + RegistrantPrivacy *bool `type:"boolean"` + + // Whether you want to conceal contact information from WHOIS queries. If you + // specify true, WHOIS ("who is") queries return contact information either + // for Amazon Registrar (for .com, .net, and .org domains) or for our registrar + // associate, Gandi (for all other TLDs). If you specify false, WHOIS queries + // return the information that you entered for the technical contact. + TechPrivacy *bool `type:"boolean"` +} + +// String returns the string representation +func (s UpdateDomainContactPrivacyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainContactPrivacyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDomainContactPrivacyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDomainContactPrivacyInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminPrivacy sets the AdminPrivacy field's value. +func (s *UpdateDomainContactPrivacyInput) SetAdminPrivacy(v bool) *UpdateDomainContactPrivacyInput { + s.AdminPrivacy = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateDomainContactPrivacyInput) SetDomainName(v string) *UpdateDomainContactPrivacyInput { + s.DomainName = &v + return s +} + +// SetRegistrantPrivacy sets the RegistrantPrivacy field's value. +func (s *UpdateDomainContactPrivacyInput) SetRegistrantPrivacy(v bool) *UpdateDomainContactPrivacyInput { + s.RegistrantPrivacy = &v + return s +} + +// SetTechPrivacy sets the TechPrivacy field's value. +func (s *UpdateDomainContactPrivacyInput) SetTechPrivacy(v bool) *UpdateDomainContactPrivacyInput { + s.TechPrivacy = &v + return s +} + +// The UpdateDomainContactPrivacy response includes the following element. +type UpdateDomainContactPrivacyOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To use this ID to query + // the operation status, use GetOperationDetail. + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateDomainContactPrivacyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainContactPrivacyOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *UpdateDomainContactPrivacyOutput) SetOperationId(v string) *UpdateDomainContactPrivacyOutput { + s.OperationId = &v + return s +} + +// Replaces the current set of name servers for the domain with the specified +// set of name servers. If you use Amazon Route 53 as your DNS service, specify +// the four name servers in the delegation set for the hosted zone for the domain. +// +// If successful, this operation returns an operation ID that you can use to +// track the progress and completion of the action. If the request is not completed +// successfully, the domain registrant will be notified by email. +type UpdateDomainNameserversInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to change name servers for. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The authorization key for .fi domains + // + // Deprecated: FIAuthKey has been deprecated + FIAuthKey *string `deprecated:"true" type:"string"` + + // A list of new name servers for the domain. + // + // Nameservers is a required field + Nameservers []*Nameserver `type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateDomainNameserversInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainNameserversInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDomainNameserversInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameserversInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.Nameservers == nil { + invalidParams.Add(request.NewErrParamRequired("Nameservers")) + } + if s.Nameservers != nil { + for i, v := range s.Nameservers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Nameservers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateDomainNameserversInput) SetDomainName(v string) *UpdateDomainNameserversInput { + s.DomainName = &v + return s +} + +// SetFIAuthKey sets the FIAuthKey field's value. +func (s *UpdateDomainNameserversInput) SetFIAuthKey(v string) *UpdateDomainNameserversInput { + s.FIAuthKey = &v + return s +} + +// SetNameservers sets the Nameservers field's value. +func (s *UpdateDomainNameserversInput) SetNameservers(v []*Nameserver) *UpdateDomainNameserversInput { + s.Nameservers = v + return s +} + +// The UpdateDomainNameservers response includes the following element. +type UpdateDomainNameserversOutput struct { + _ struct{} `type:"structure"` + + // Identifier for tracking the progress of the request. To query the operation + // status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html). + // + // OperationId is a required field + OperationId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateDomainNameserversOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainNameserversOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *UpdateDomainNameserversOutput) SetOperationId(v string) *UpdateDomainNameserversOutput { + s.OperationId = &v + return s +} + +// The UpdateTagsForDomainRequest includes the following elements. +type UpdateTagsForDomainInput struct { + _ struct{} `type:"structure"` + + // The domain for which you want to add or update tags. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // A list of the tag keys and values that you want to add or update. If you + // specify a key that already exists, the corresponding value will be replaced. + TagsToUpdate []*Tag `type:"list"` +} + +// String returns the string representation +func (s UpdateTagsForDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTagsForDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTagsForDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTagsForDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateTagsForDomainInput) SetDomainName(v string) *UpdateTagsForDomainInput { + s.DomainName = &v + return s +} + +// SetTagsToUpdate sets the TagsToUpdate field's value. +func (s *UpdateTagsForDomainInput) SetTagsToUpdate(v []*Tag) *UpdateTagsForDomainInput { + s.TagsToUpdate = v + return s +} + +type UpdateTagsForDomainOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateTagsForDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTagsForDomainOutput) GoString() string { + return s.String() +} + +// The ViewBilling request includes the following elements. +type ViewBillingInput struct { + _ struct{} `type:"structure"` + + // The end date and time for the time period for which you want a list of billing + // records. Specify the date and time in Unix time format and Coordinated Universal + // time (UTC). + End *time.Time `type:"timestamp"` + + // For an initial request for a list of billing records, omit this element. + // If the number of billing records that are associated with the current AWS + // account during the specified period is greater than the value that you specified + // for MaxItems, you can use Marker to return additional billing records. Get + // the value of NextPageMarker from the previous response, and submit another + // request that includes the value of NextPageMarker in the Marker element. + // + // Constraints: The marker must match the value of NextPageMarker that was returned + // in the previous response. + Marker *string `type:"string"` + + // The number of billing records to be returned. + // + // Default: 20 + MaxItems *int64 `type:"integer"` + + // The beginning date and time for the time period for which you want a list + // of billing records. Specify the date and time in Unix time format and Coordinated + // Universal time (UTC). + Start *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s ViewBillingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ViewBillingInput) GoString() string { + return s.String() +} + +// SetEnd sets the End field's value. +func (s *ViewBillingInput) SetEnd(v time.Time) *ViewBillingInput { + s.End = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ViewBillingInput) SetMarker(v string) *ViewBillingInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ViewBillingInput) SetMaxItems(v int64) *ViewBillingInput { + s.MaxItems = &v + return s +} + +// SetStart sets the Start field's value. +func (s *ViewBillingInput) SetStart(v time.Time) *ViewBillingInput { + s.Start = &v + return s +} + +// The ViewBilling response includes the following elements. +type ViewBillingOutput struct { + _ struct{} `type:"structure"` + + // A summary of billing records. + BillingRecords []*BillingRecord `type:"list"` + + // If there are more billing records than you specified for MaxItems in the + // request, submit another request and include the value of NextPageMarker in + // the value of Marker. + NextPageMarker *string `type:"string"` +} + +// String returns the string representation +func (s ViewBillingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ViewBillingOutput) GoString() string { + return s.String() +} + +// SetBillingRecords sets the BillingRecords field's value. +func (s *ViewBillingOutput) SetBillingRecords(v []*BillingRecord) *ViewBillingOutput { + s.BillingRecords = v + return s +} + +// SetNextPageMarker sets the NextPageMarker field's value. +func (s *ViewBillingOutput) SetNextPageMarker(v string) *ViewBillingOutput { + s.NextPageMarker = &v + return s +} + +const ( + // ContactTypePerson is a ContactType enum value + ContactTypePerson = "PERSON" + + // ContactTypeCompany is a ContactType enum value + ContactTypeCompany = "COMPANY" + + // ContactTypeAssociation is a ContactType enum value + ContactTypeAssociation = "ASSOCIATION" + + // ContactTypePublicBody is a ContactType enum value + ContactTypePublicBody = "PUBLIC_BODY" + + // ContactTypeReseller is a ContactType enum value + ContactTypeReseller = "RESELLER" +) + +const ( + // CountryCodeAd is a CountryCode enum value + CountryCodeAd = "AD" + + // CountryCodeAe is a CountryCode enum value + CountryCodeAe = "AE" + + // CountryCodeAf is a CountryCode enum value + CountryCodeAf = "AF" + + // CountryCodeAg is a CountryCode enum value + CountryCodeAg = "AG" + + // CountryCodeAi is a CountryCode enum value + CountryCodeAi = "AI" + + // CountryCodeAl is a CountryCode enum value + CountryCodeAl = "AL" + + // CountryCodeAm is a CountryCode enum value + CountryCodeAm = "AM" + + // CountryCodeAn is a CountryCode enum value + CountryCodeAn = "AN" + + // CountryCodeAo is a CountryCode enum value + CountryCodeAo = "AO" + + // CountryCodeAq is a CountryCode enum value + CountryCodeAq = "AQ" + + // CountryCodeAr is a CountryCode enum value + CountryCodeAr = "AR" + + // CountryCodeAs is a CountryCode enum value + CountryCodeAs = "AS" + + // CountryCodeAt is a CountryCode enum value + CountryCodeAt = "AT" + + // CountryCodeAu is a CountryCode enum value + CountryCodeAu = "AU" + + // CountryCodeAw is a CountryCode enum value + CountryCodeAw = "AW" + + // CountryCodeAz is a CountryCode enum value + CountryCodeAz = "AZ" + + // CountryCodeBa is a CountryCode enum value + CountryCodeBa = "BA" + + // CountryCodeBb is a CountryCode enum value + CountryCodeBb = "BB" + + // CountryCodeBd is a CountryCode enum value + CountryCodeBd = "BD" + + // CountryCodeBe is a CountryCode enum value + CountryCodeBe = "BE" + + // CountryCodeBf is a CountryCode enum value + CountryCodeBf = "BF" + + // CountryCodeBg is a CountryCode enum value + CountryCodeBg = "BG" + + // CountryCodeBh is a CountryCode enum value + CountryCodeBh = "BH" + + // CountryCodeBi is a CountryCode enum value + CountryCodeBi = "BI" + + // CountryCodeBj is a CountryCode enum value + CountryCodeBj = "BJ" + + // CountryCodeBl is a CountryCode enum value + CountryCodeBl = "BL" + + // CountryCodeBm is a CountryCode enum value + CountryCodeBm = "BM" + + // CountryCodeBn is a CountryCode enum value + CountryCodeBn = "BN" + + // CountryCodeBo is a CountryCode enum value + CountryCodeBo = "BO" + + // CountryCodeBr is a CountryCode enum value + CountryCodeBr = "BR" + + // CountryCodeBs is a CountryCode enum value + CountryCodeBs = "BS" + + // CountryCodeBt is a CountryCode enum value + CountryCodeBt = "BT" + + // CountryCodeBw is a CountryCode enum value + CountryCodeBw = "BW" + + // CountryCodeBy is a CountryCode enum value + CountryCodeBy = "BY" + + // CountryCodeBz is a CountryCode enum value + CountryCodeBz = "BZ" + + // CountryCodeCa is a CountryCode enum value + CountryCodeCa = "CA" + + // CountryCodeCc is a CountryCode enum value + CountryCodeCc = "CC" + + // CountryCodeCd is a CountryCode enum value + CountryCodeCd = "CD" + + // CountryCodeCf is a CountryCode enum value + CountryCodeCf = "CF" + + // CountryCodeCg is a CountryCode enum value + CountryCodeCg = "CG" + + // CountryCodeCh is a CountryCode enum value + CountryCodeCh = "CH" + + // CountryCodeCi is a CountryCode enum value + CountryCodeCi = "CI" + + // CountryCodeCk is a CountryCode enum value + CountryCodeCk = "CK" + + // CountryCodeCl is a CountryCode enum value + CountryCodeCl = "CL" + + // CountryCodeCm is a CountryCode enum value + CountryCodeCm = "CM" + + // CountryCodeCn is a CountryCode enum value + CountryCodeCn = "CN" + + // CountryCodeCo is a CountryCode enum value + CountryCodeCo = "CO" + + // CountryCodeCr is a CountryCode enum value + CountryCodeCr = "CR" + + // CountryCodeCu is a CountryCode enum value + CountryCodeCu = "CU" + + // CountryCodeCv is a CountryCode enum value + CountryCodeCv = "CV" + + // CountryCodeCx is a CountryCode enum value + CountryCodeCx = "CX" + + // CountryCodeCy is a CountryCode enum value + CountryCodeCy = "CY" + + // CountryCodeCz is a CountryCode enum value + CountryCodeCz = "CZ" + + // CountryCodeDe is a CountryCode enum value + CountryCodeDe = "DE" + + // CountryCodeDj is a CountryCode enum value + CountryCodeDj = "DJ" + + // CountryCodeDk is a CountryCode enum value + CountryCodeDk = "DK" + + // CountryCodeDm is a CountryCode enum value + CountryCodeDm = "DM" + + // CountryCodeDo is a CountryCode enum value + CountryCodeDo = "DO" + + // CountryCodeDz is a CountryCode enum value + CountryCodeDz = "DZ" + + // CountryCodeEc is a CountryCode enum value + CountryCodeEc = "EC" + + // CountryCodeEe is a CountryCode enum value + CountryCodeEe = "EE" + + // CountryCodeEg is a CountryCode enum value + CountryCodeEg = "EG" + + // CountryCodeEr is a CountryCode enum value + CountryCodeEr = "ER" + + // CountryCodeEs is a CountryCode enum value + CountryCodeEs = "ES" + + // CountryCodeEt is a CountryCode enum value + CountryCodeEt = "ET" + + // CountryCodeFi is a CountryCode enum value + CountryCodeFi = "FI" + + // CountryCodeFj is a CountryCode enum value + CountryCodeFj = "FJ" + + // CountryCodeFk is a CountryCode enum value + CountryCodeFk = "FK" + + // CountryCodeFm is a CountryCode enum value + CountryCodeFm = "FM" + + // CountryCodeFo is a CountryCode enum value + CountryCodeFo = "FO" + + // CountryCodeFr is a CountryCode enum value + CountryCodeFr = "FR" + + // CountryCodeGa is a CountryCode enum value + CountryCodeGa = "GA" + + // CountryCodeGb is a CountryCode enum value + CountryCodeGb = "GB" + + // CountryCodeGd is a CountryCode enum value + CountryCodeGd = "GD" + + // CountryCodeGe is a CountryCode enum value + CountryCodeGe = "GE" + + // CountryCodeGh is a CountryCode enum value + CountryCodeGh = "GH" + + // CountryCodeGi is a CountryCode enum value + CountryCodeGi = "GI" + + // CountryCodeGl is a CountryCode enum value + CountryCodeGl = "GL" + + // CountryCodeGm is a CountryCode enum value + CountryCodeGm = "GM" + + // CountryCodeGn is a CountryCode enum value + CountryCodeGn = "GN" + + // CountryCodeGq is a CountryCode enum value + CountryCodeGq = "GQ" + + // CountryCodeGr is a CountryCode enum value + CountryCodeGr = "GR" + + // CountryCodeGt is a CountryCode enum value + CountryCodeGt = "GT" + + // CountryCodeGu is a CountryCode enum value + CountryCodeGu = "GU" + + // CountryCodeGw is a CountryCode enum value + CountryCodeGw = "GW" + + // CountryCodeGy is a CountryCode enum value + CountryCodeGy = "GY" + + // CountryCodeHk is a CountryCode enum value + CountryCodeHk = "HK" + + // CountryCodeHn is a CountryCode enum value + CountryCodeHn = "HN" + + // CountryCodeHr is a CountryCode enum value + CountryCodeHr = "HR" + + // CountryCodeHt is a CountryCode enum value + CountryCodeHt = "HT" + + // CountryCodeHu is a CountryCode enum value + CountryCodeHu = "HU" + + // CountryCodeId is a CountryCode enum value + CountryCodeId = "ID" + + // CountryCodeIe is a CountryCode enum value + CountryCodeIe = "IE" + + // CountryCodeIl is a CountryCode enum value + CountryCodeIl = "IL" + + // CountryCodeIm is a CountryCode enum value + CountryCodeIm = "IM" + + // CountryCodeIn is a CountryCode enum value + CountryCodeIn = "IN" + + // CountryCodeIq is a CountryCode enum value + CountryCodeIq = "IQ" + + // CountryCodeIr is a CountryCode enum value + CountryCodeIr = "IR" + + // CountryCodeIs is a CountryCode enum value + CountryCodeIs = "IS" + + // CountryCodeIt is a CountryCode enum value + CountryCodeIt = "IT" + + // CountryCodeJm is a CountryCode enum value + CountryCodeJm = "JM" + + // CountryCodeJo is a CountryCode enum value + CountryCodeJo = "JO" + + // CountryCodeJp is a CountryCode enum value + CountryCodeJp = "JP" + + // CountryCodeKe is a CountryCode enum value + CountryCodeKe = "KE" + + // CountryCodeKg is a CountryCode enum value + CountryCodeKg = "KG" + + // CountryCodeKh is a CountryCode enum value + CountryCodeKh = "KH" + + // CountryCodeKi is a CountryCode enum value + CountryCodeKi = "KI" + + // CountryCodeKm is a CountryCode enum value + CountryCodeKm = "KM" + + // CountryCodeKn is a CountryCode enum value + CountryCodeKn = "KN" + + // CountryCodeKp is a CountryCode enum value + CountryCodeKp = "KP" + + // CountryCodeKr is a CountryCode enum value + CountryCodeKr = "KR" + + // CountryCodeKw is a CountryCode enum value + CountryCodeKw = "KW" + + // CountryCodeKy is a CountryCode enum value + CountryCodeKy = "KY" + + // CountryCodeKz is a CountryCode enum value + CountryCodeKz = "KZ" + + // CountryCodeLa is a CountryCode enum value + CountryCodeLa = "LA" + + // CountryCodeLb is a CountryCode enum value + CountryCodeLb = "LB" + + // CountryCodeLc is a CountryCode enum value + CountryCodeLc = "LC" + + // CountryCodeLi is a CountryCode enum value + CountryCodeLi = "LI" + + // CountryCodeLk is a CountryCode enum value + CountryCodeLk = "LK" + + // CountryCodeLr is a CountryCode enum value + CountryCodeLr = "LR" + + // CountryCodeLs is a CountryCode enum value + CountryCodeLs = "LS" + + // CountryCodeLt is a CountryCode enum value + CountryCodeLt = "LT" + + // CountryCodeLu is a CountryCode enum value + CountryCodeLu = "LU" + + // CountryCodeLv is a CountryCode enum value + CountryCodeLv = "LV" + + // CountryCodeLy is a CountryCode enum value + CountryCodeLy = "LY" + + // CountryCodeMa is a CountryCode enum value + CountryCodeMa = "MA" + + // CountryCodeMc is a CountryCode enum value + CountryCodeMc = "MC" + + // CountryCodeMd is a CountryCode enum value + CountryCodeMd = "MD" + + // CountryCodeMe is a CountryCode enum value + CountryCodeMe = "ME" + + // CountryCodeMf is a CountryCode enum value + CountryCodeMf = "MF" + + // CountryCodeMg is a CountryCode enum value + CountryCodeMg = "MG" + + // CountryCodeMh is a CountryCode enum value + CountryCodeMh = "MH" + + // CountryCodeMk is a CountryCode enum value + CountryCodeMk = "MK" + + // CountryCodeMl is a CountryCode enum value + CountryCodeMl = "ML" + + // CountryCodeMm is a CountryCode enum value + CountryCodeMm = "MM" + + // CountryCodeMn is a CountryCode enum value + CountryCodeMn = "MN" + + // CountryCodeMo is a CountryCode enum value + CountryCodeMo = "MO" + + // CountryCodeMp is a CountryCode enum value + CountryCodeMp = "MP" + + // CountryCodeMr is a CountryCode enum value + CountryCodeMr = "MR" + + // CountryCodeMs is a CountryCode enum value + CountryCodeMs = "MS" + + // CountryCodeMt is a CountryCode enum value + CountryCodeMt = "MT" + + // CountryCodeMu is a CountryCode enum value + CountryCodeMu = "MU" + + // CountryCodeMv is a CountryCode enum value + CountryCodeMv = "MV" + + // CountryCodeMw is a CountryCode enum value + CountryCodeMw = "MW" + + // CountryCodeMx is a CountryCode enum value + CountryCodeMx = "MX" + + // CountryCodeMy is a CountryCode enum value + CountryCodeMy = "MY" + + // CountryCodeMz is a CountryCode enum value + CountryCodeMz = "MZ" + + // CountryCodeNa is a CountryCode enum value + CountryCodeNa = "NA" + + // CountryCodeNc is a CountryCode enum value + CountryCodeNc = "NC" + + // CountryCodeNe is a CountryCode enum value + CountryCodeNe = "NE" + + // CountryCodeNg is a CountryCode enum value + CountryCodeNg = "NG" + + // CountryCodeNi is a CountryCode enum value + CountryCodeNi = "NI" + + // CountryCodeNl is a CountryCode enum value + CountryCodeNl = "NL" + + // CountryCodeNo is a CountryCode enum value + CountryCodeNo = "NO" + + // CountryCodeNp is a CountryCode enum value + CountryCodeNp = "NP" + + // CountryCodeNr is a CountryCode enum value + CountryCodeNr = "NR" + + // CountryCodeNu is a CountryCode enum value + CountryCodeNu = "NU" + + // CountryCodeNz is a CountryCode enum value + CountryCodeNz = "NZ" + + // CountryCodeOm is a CountryCode enum value + CountryCodeOm = "OM" + + // CountryCodePa is a CountryCode enum value + CountryCodePa = "PA" + + // CountryCodePe is a CountryCode enum value + CountryCodePe = "PE" + + // CountryCodePf is a CountryCode enum value + CountryCodePf = "PF" + + // CountryCodePg is a CountryCode enum value + CountryCodePg = "PG" + + // CountryCodePh is a CountryCode enum value + CountryCodePh = "PH" + + // CountryCodePk is a CountryCode enum value + CountryCodePk = "PK" + + // CountryCodePl is a CountryCode enum value + CountryCodePl = "PL" + + // CountryCodePm is a CountryCode enum value + CountryCodePm = "PM" + + // CountryCodePn is a CountryCode enum value + CountryCodePn = "PN" + + // CountryCodePr is a CountryCode enum value + CountryCodePr = "PR" + + // CountryCodePt is a CountryCode enum value + CountryCodePt = "PT" + + // CountryCodePw is a CountryCode enum value + CountryCodePw = "PW" + + // CountryCodePy is a CountryCode enum value + CountryCodePy = "PY" + + // CountryCodeQa is a CountryCode enum value + CountryCodeQa = "QA" + + // CountryCodeRo is a CountryCode enum value + CountryCodeRo = "RO" + + // CountryCodeRs is a CountryCode enum value + CountryCodeRs = "RS" + + // CountryCodeRu is a CountryCode enum value + CountryCodeRu = "RU" + + // CountryCodeRw is a CountryCode enum value + CountryCodeRw = "RW" + + // CountryCodeSa is a CountryCode enum value + CountryCodeSa = "SA" + + // CountryCodeSb is a CountryCode enum value + CountryCodeSb = "SB" + + // CountryCodeSc is a CountryCode enum value + CountryCodeSc = "SC" + + // CountryCodeSd is a CountryCode enum value + CountryCodeSd = "SD" + + // CountryCodeSe is a CountryCode enum value + CountryCodeSe = "SE" + + // CountryCodeSg is a CountryCode enum value + CountryCodeSg = "SG" + + // CountryCodeSh is a CountryCode enum value + CountryCodeSh = "SH" + + // CountryCodeSi is a CountryCode enum value + CountryCodeSi = "SI" + + // CountryCodeSk is a CountryCode enum value + CountryCodeSk = "SK" + + // CountryCodeSl is a CountryCode enum value + CountryCodeSl = "SL" + + // CountryCodeSm is a CountryCode enum value + CountryCodeSm = "SM" + + // CountryCodeSn is a CountryCode enum value + CountryCodeSn = "SN" + + // CountryCodeSo is a CountryCode enum value + CountryCodeSo = "SO" + + // CountryCodeSr is a CountryCode enum value + CountryCodeSr = "SR" + + // CountryCodeSt is a CountryCode enum value + CountryCodeSt = "ST" + + // CountryCodeSv is a CountryCode enum value + CountryCodeSv = "SV" + + // CountryCodeSy is a CountryCode enum value + CountryCodeSy = "SY" + + // CountryCodeSz is a CountryCode enum value + CountryCodeSz = "SZ" + + // CountryCodeTc is a CountryCode enum value + CountryCodeTc = "TC" + + // CountryCodeTd is a CountryCode enum value + CountryCodeTd = "TD" + + // CountryCodeTg is a CountryCode enum value + CountryCodeTg = "TG" + + // CountryCodeTh is a CountryCode enum value + CountryCodeTh = "TH" + + // CountryCodeTj is a CountryCode enum value + CountryCodeTj = "TJ" + + // CountryCodeTk is a CountryCode enum value + CountryCodeTk = "TK" + + // CountryCodeTl is a CountryCode enum value + CountryCodeTl = "TL" + + // CountryCodeTm is a CountryCode enum value + CountryCodeTm = "TM" + + // CountryCodeTn is a CountryCode enum value + CountryCodeTn = "TN" + + // CountryCodeTo is a CountryCode enum value + CountryCodeTo = "TO" + + // CountryCodeTr is a CountryCode enum value + CountryCodeTr = "TR" + + // CountryCodeTt is a CountryCode enum value + CountryCodeTt = "TT" + + // CountryCodeTv is a CountryCode enum value + CountryCodeTv = "TV" + + // CountryCodeTw is a CountryCode enum value + CountryCodeTw = "TW" + + // CountryCodeTz is a CountryCode enum value + CountryCodeTz = "TZ" + + // CountryCodeUa is a CountryCode enum value + CountryCodeUa = "UA" + + // CountryCodeUg is a CountryCode enum value + CountryCodeUg = "UG" + + // CountryCodeUs is a CountryCode enum value + CountryCodeUs = "US" + + // CountryCodeUy is a CountryCode enum value + CountryCodeUy = "UY" + + // CountryCodeUz is a CountryCode enum value + CountryCodeUz = "UZ" + + // CountryCodeVa is a CountryCode enum value + CountryCodeVa = "VA" + + // CountryCodeVc is a CountryCode enum value + CountryCodeVc = "VC" + + // CountryCodeVe is a CountryCode enum value + CountryCodeVe = "VE" + + // CountryCodeVg is a CountryCode enum value + CountryCodeVg = "VG" + + // CountryCodeVi is a CountryCode enum value + CountryCodeVi = "VI" + + // CountryCodeVn is a CountryCode enum value + CountryCodeVn = "VN" + + // CountryCodeVu is a CountryCode enum value + CountryCodeVu = "VU" + + // CountryCodeWf is a CountryCode enum value + CountryCodeWf = "WF" + + // CountryCodeWs is a CountryCode enum value + CountryCodeWs = "WS" + + // CountryCodeYe is a CountryCode enum value + CountryCodeYe = "YE" + + // CountryCodeYt is a CountryCode enum value + CountryCodeYt = "YT" + + // CountryCodeZa is a CountryCode enum value + CountryCodeZa = "ZA" + + // CountryCodeZm is a CountryCode enum value + CountryCodeZm = "ZM" + + // CountryCodeZw is a CountryCode enum value + CountryCodeZw = "ZW" +) + +const ( + // DomainAvailabilityAvailable is a DomainAvailability enum value + DomainAvailabilityAvailable = "AVAILABLE" + + // DomainAvailabilityAvailableReserved is a DomainAvailability enum value + DomainAvailabilityAvailableReserved = "AVAILABLE_RESERVED" + + // DomainAvailabilityAvailablePreorder is a DomainAvailability enum value + DomainAvailabilityAvailablePreorder = "AVAILABLE_PREORDER" + + // DomainAvailabilityUnavailable is a DomainAvailability enum value + DomainAvailabilityUnavailable = "UNAVAILABLE" + + // DomainAvailabilityUnavailablePremium is a DomainAvailability enum value + DomainAvailabilityUnavailablePremium = "UNAVAILABLE_PREMIUM" + + // DomainAvailabilityUnavailableRestricted is a DomainAvailability enum value + DomainAvailabilityUnavailableRestricted = "UNAVAILABLE_RESTRICTED" + + // DomainAvailabilityReserved is a DomainAvailability enum value + DomainAvailabilityReserved = "RESERVED" + + // DomainAvailabilityDontKnow is a DomainAvailability enum value + DomainAvailabilityDontKnow = "DONT_KNOW" +) + +const ( + // ExtraParamNameDunsNumber is a ExtraParamName enum value + ExtraParamNameDunsNumber = "DUNS_NUMBER" + + // ExtraParamNameBrandNumber is a ExtraParamName enum value + ExtraParamNameBrandNumber = "BRAND_NUMBER" + + // ExtraParamNameBirthDepartment is a ExtraParamName enum value + ExtraParamNameBirthDepartment = "BIRTH_DEPARTMENT" + + // ExtraParamNameBirthDateInYyyyMmDd is a ExtraParamName enum value + ExtraParamNameBirthDateInYyyyMmDd = "BIRTH_DATE_IN_YYYY_MM_DD" + + // ExtraParamNameBirthCountry is a ExtraParamName enum value + ExtraParamNameBirthCountry = "BIRTH_COUNTRY" + + // ExtraParamNameBirthCity is a ExtraParamName enum value + ExtraParamNameBirthCity = "BIRTH_CITY" + + // ExtraParamNameDocumentNumber is a ExtraParamName enum value + ExtraParamNameDocumentNumber = "DOCUMENT_NUMBER" + + // ExtraParamNameAuIdNumber is a ExtraParamName enum value + ExtraParamNameAuIdNumber = "AU_ID_NUMBER" + + // ExtraParamNameAuIdType is a ExtraParamName enum value + ExtraParamNameAuIdType = "AU_ID_TYPE" + + // ExtraParamNameCaLegalType is a ExtraParamName enum value + ExtraParamNameCaLegalType = "CA_LEGAL_TYPE" + + // ExtraParamNameCaBusinessEntityType is a ExtraParamName enum value + ExtraParamNameCaBusinessEntityType = "CA_BUSINESS_ENTITY_TYPE" + + // ExtraParamNameCaLegalRepresentative is a ExtraParamName enum value + ExtraParamNameCaLegalRepresentative = "CA_LEGAL_REPRESENTATIVE" + + // ExtraParamNameCaLegalRepresentativeCapacity is a ExtraParamName enum value + ExtraParamNameCaLegalRepresentativeCapacity = "CA_LEGAL_REPRESENTATIVE_CAPACITY" + + // ExtraParamNameEsIdentification is a ExtraParamName enum value + ExtraParamNameEsIdentification = "ES_IDENTIFICATION" + + // ExtraParamNameEsIdentificationType is a ExtraParamName enum value + ExtraParamNameEsIdentificationType = "ES_IDENTIFICATION_TYPE" + + // ExtraParamNameEsLegalForm is a ExtraParamName enum value + ExtraParamNameEsLegalForm = "ES_LEGAL_FORM" + + // ExtraParamNameFiBusinessNumber is a ExtraParamName enum value + ExtraParamNameFiBusinessNumber = "FI_BUSINESS_NUMBER" + + // ExtraParamNameFiIdNumber is a ExtraParamName enum value + ExtraParamNameFiIdNumber = "FI_ID_NUMBER" + + // ExtraParamNameFiNationality is a ExtraParamName enum value + ExtraParamNameFiNationality = "FI_NATIONALITY" + + // ExtraParamNameFiOrganizationType is a ExtraParamName enum value + ExtraParamNameFiOrganizationType = "FI_ORGANIZATION_TYPE" + + // ExtraParamNameItNationality is a ExtraParamName enum value + ExtraParamNameItNationality = "IT_NATIONALITY" + + // ExtraParamNameItPin is a ExtraParamName enum value + ExtraParamNameItPin = "IT_PIN" + + // ExtraParamNameItRegistrantEntityType is a ExtraParamName enum value + ExtraParamNameItRegistrantEntityType = "IT_REGISTRANT_ENTITY_TYPE" + + // ExtraParamNameRuPassportData is a ExtraParamName enum value + ExtraParamNameRuPassportData = "RU_PASSPORT_DATA" + + // ExtraParamNameSeIdNumber is a ExtraParamName enum value + ExtraParamNameSeIdNumber = "SE_ID_NUMBER" + + // ExtraParamNameSgIdNumber is a ExtraParamName enum value + ExtraParamNameSgIdNumber = "SG_ID_NUMBER" + + // ExtraParamNameVatNumber is a ExtraParamName enum value + ExtraParamNameVatNumber = "VAT_NUMBER" + + // ExtraParamNameUkContactType is a ExtraParamName enum value + ExtraParamNameUkContactType = "UK_CONTACT_TYPE" + + // ExtraParamNameUkCompanyNumber is a ExtraParamName enum value + ExtraParamNameUkCompanyNumber = "UK_COMPANY_NUMBER" +) + +const ( + // OperationStatusSubmitted is a OperationStatus enum value + OperationStatusSubmitted = "SUBMITTED" + + // OperationStatusInProgress is a OperationStatus enum value + OperationStatusInProgress = "IN_PROGRESS" + + // OperationStatusError is a OperationStatus enum value + OperationStatusError = "ERROR" + + // OperationStatusSuccessful is a OperationStatus enum value + OperationStatusSuccessful = "SUCCESSFUL" + + // OperationStatusFailed is a OperationStatus enum value + OperationStatusFailed = "FAILED" +) + +const ( + // OperationTypeRegisterDomain is a OperationType enum value + OperationTypeRegisterDomain = "REGISTER_DOMAIN" + + // OperationTypeDeleteDomain is a OperationType enum value + OperationTypeDeleteDomain = "DELETE_DOMAIN" + + // OperationTypeTransferInDomain is a OperationType enum value + OperationTypeTransferInDomain = "TRANSFER_IN_DOMAIN" + + // OperationTypeUpdateDomainContact is a OperationType enum value + OperationTypeUpdateDomainContact = "UPDATE_DOMAIN_CONTACT" + + // OperationTypeUpdateNameserver is a OperationType enum value + OperationTypeUpdateNameserver = "UPDATE_NAMESERVER" + + // OperationTypeChangePrivacyProtection is a OperationType enum value + OperationTypeChangePrivacyProtection = "CHANGE_PRIVACY_PROTECTION" + + // OperationTypeDomainLock is a OperationType enum value + OperationTypeDomainLock = "DOMAIN_LOCK" + + // OperationTypeEnableAutorenew is a OperationType enum value + OperationTypeEnableAutorenew = "ENABLE_AUTORENEW" + + // OperationTypeDisableAutorenew is a OperationType enum value + OperationTypeDisableAutorenew = "DISABLE_AUTORENEW" + + // OperationTypeAddDnssec is a OperationType enum value + OperationTypeAddDnssec = "ADD_DNSSEC" + + // OperationTypeRemoveDnssec is a OperationType enum value + OperationTypeRemoveDnssec = "REMOVE_DNSSEC" + + // OperationTypeExpireDomain is a OperationType enum value + OperationTypeExpireDomain = "EXPIRE_DOMAIN" + + // OperationTypeTransferOutDomain is a OperationType enum value + OperationTypeTransferOutDomain = "TRANSFER_OUT_DOMAIN" + + // OperationTypeChangeDomainOwner is a OperationType enum value + OperationTypeChangeDomainOwner = "CHANGE_DOMAIN_OWNER" + + // OperationTypeRenewDomain is a OperationType enum value + OperationTypeRenewDomain = "RENEW_DOMAIN" + + // OperationTypePushDomain is a OperationType enum value + OperationTypePushDomain = "PUSH_DOMAIN" + + // OperationTypeInternalTransferOutDomain is a OperationType enum value + OperationTypeInternalTransferOutDomain = "INTERNAL_TRANSFER_OUT_DOMAIN" + + // OperationTypeInternalTransferInDomain is a OperationType enum value + OperationTypeInternalTransferInDomain = "INTERNAL_TRANSFER_IN_DOMAIN" +) + +const ( + // ReachabilityStatusPending is a ReachabilityStatus enum value + ReachabilityStatusPending = "PENDING" + + // ReachabilityStatusDone is a ReachabilityStatus enum value + ReachabilityStatusDone = "DONE" + + // ReachabilityStatusExpired is a ReachabilityStatus enum value + ReachabilityStatusExpired = "EXPIRED" +) + +// Whether the domain name can be transferred to Route 53. +// +// You can transfer only domains that have a value of TRANSFERABLE for Transferable. +// +// Valid values: +// +// TRANSFERABLE +// +// The domain name can be transferred to Route 53. +// +// UNTRANSFERRABLE +// +// The domain name can't be transferred to Route 53. +// +// DONT_KNOW +// +// Reserved for future use. +const ( + // TransferableTransferable is a Transferable enum value + TransferableTransferable = "TRANSFERABLE" + + // TransferableUntransferable is a Transferable enum value + TransferableUntransferable = "UNTRANSFERABLE" + + // TransferableDontKnow is a Transferable enum value + TransferableDontKnow = "DONT_KNOW" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53domains/doc.go b/vendor/github.com/aws/aws-sdk-go/service/route53domains/doc.go new file mode 100644 index 00000000000..b6b057326ad --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53domains/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package route53domains provides the client and types for making API +// requests to Amazon Route 53 Domains. +// +// Amazon Route 53 API actions let you register domain names and perform related +// operations. +// +// See https://docs.aws.amazon.com/goto/WebAPI/route53domains-2014-05-15 for more information on this service. +// +// See route53domains package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/route53domains/ +// +// Using the Client +// +// To contact Amazon Route 53 Domains with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Route 53 Domains client Route53Domains for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/route53domains/#New +package route53domains diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53domains/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53domains/errors.go new file mode 100644 index 00000000000..e41328ae06b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53domains/errors.go @@ -0,0 +1,59 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package route53domains + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeDomainLimitExceeded for service response error code + // "DomainLimitExceeded". + // + // The number of domains has exceeded the allowed threshold for the account. + ErrCodeDomainLimitExceeded = "DomainLimitExceeded" + + // ErrCodeDuplicateRequest for service response error code + // "DuplicateRequest". + // + // The request is already in progress for the domain. + ErrCodeDuplicateRequest = "DuplicateRequest" + + // ErrCodeInvalidInput for service response error code + // "InvalidInput". + // + // The requested item is not acceptable. For example, for APIs that accept a + // domain name, the request might specify a domain name that doesn't belong + // to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, + // the password might be invalid. + ErrCodeInvalidInput = "InvalidInput" + + // ErrCodeOperationLimitExceeded for service response error code + // "OperationLimitExceeded". + // + // The number of operations or jobs running exceeded the allowed threshold for + // the account. + ErrCodeOperationLimitExceeded = "OperationLimitExceeded" + + // ErrCodeTLDRulesViolation for service response error code + // "TLDRulesViolation". + // + // The top-level domain does not support this operation. + ErrCodeTLDRulesViolation = "TLDRulesViolation" + + // ErrCodeUnsupportedTLD for service response error code + // "UnsupportedTLD". + // + // Amazon Route 53 does not support this top-level domain (TLD). + ErrCodeUnsupportedTLD = "UnsupportedTLD" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "DomainLimitExceeded": newErrorDomainLimitExceeded, + "DuplicateRequest": newErrorDuplicateRequest, + "InvalidInput": newErrorInvalidInput, + "OperationLimitExceeded": newErrorOperationLimitExceeded, + "TLDRulesViolation": newErrorTLDRulesViolation, + "UnsupportedTLD": newErrorUnsupportedTLD, +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53domains/service.go b/vendor/github.com/aws/aws-sdk-go/service/route53domains/service.go new file mode 100644 index 00000000000..9081130fa97 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53domains/service.go @@ -0,0 +1,103 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package route53domains + +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" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// Route53Domains provides the API operation methods for making requests to +// Amazon Route 53 Domains. See this package's package overview docs +// for details on the service. +// +// Route53Domains methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Route53Domains 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 = "route53domains" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Route 53 Domains" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the Route53Domains 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: +// mySession := session.Must(session.NewSession()) +// +// // Create a Route53Domains client from just a session. +// svc := route53domains.New(mySession) +// +// // Create a Route53Domains client with additional configuration +// svc := route53domains.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Route53Domains { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *Route53Domains { + svc := &Route53Domains{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2014-05-15", + JSONVersion: "1.1", + TargetPrefix: "Route53Domains_v20140515", + }, + 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( + protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Route53Domains operation and runs any +// custom request initialization. +func (c *Route53Domains) 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/route53resolver/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go index 721af4756d7..d2c81e00493 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go @@ -3412,8 +3412,8 @@ func (s *GetResolverRulePolicyOutput) SetResolverRulePolicy(v string) *GetResolv // We encountered an unknown error. Try again in a few minutes. type InternalServiceErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3430,17 +3430,17 @@ func (s InternalServiceErrorException) GoString() string { func newErrorInternalServiceErrorException(v protocol.ResponseMetadata) error { return &InternalServiceErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceErrorException) Code() string { +func (s *InternalServiceErrorException) Code() string { return "InternalServiceErrorException" } // Message returns the exception's message. -func (s InternalServiceErrorException) Message() string { +func (s *InternalServiceErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3448,28 +3448,28 @@ func (s InternalServiceErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceErrorException) OrigErr() error { +func (s *InternalServiceErrorException) OrigErr() error { return nil } -func (s InternalServiceErrorException) Error() string { +func (s *InternalServiceErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The value that you specified for NextToken in a List request isn't valid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3486,17 +3486,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3504,28 +3504,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // One or more parameters in this request are not valid. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // For an InvalidParameterException error, the name of the parameter that's // invalid. @@ -3546,17 +3546,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3564,28 +3564,28 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resolver rule policy is invalid. type InvalidPolicyDocument struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3602,17 +3602,17 @@ func (s InvalidPolicyDocument) GoString() string { func newErrorInvalidPolicyDocument(v protocol.ResponseMetadata) error { return &InvalidPolicyDocument{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPolicyDocument) Code() string { +func (s *InvalidPolicyDocument) Code() string { return "InvalidPolicyDocument" } // Message returns the exception's message. -func (s InvalidPolicyDocument) Message() string { +func (s *InvalidPolicyDocument) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3620,28 +3620,28 @@ func (s InvalidPolicyDocument) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPolicyDocument) OrigErr() error { +func (s *InvalidPolicyDocument) OrigErr() error { return nil } -func (s InvalidPolicyDocument) Error() string { +func (s *InvalidPolicyDocument) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPolicyDocument) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPolicyDocument) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPolicyDocument) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPolicyDocument) RequestID() string { + return s.RespMetadata.RequestID } // The request is invalid. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3658,17 +3658,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3676,28 +3676,28 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The specified tag is invalid. type InvalidTagException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3714,17 +3714,17 @@ func (s InvalidTagException) GoString() string { func newErrorInvalidTagException(v protocol.ResponseMetadata) error { return &InvalidTagException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTagException) Code() string { +func (s *InvalidTagException) Code() string { return "InvalidTagException" } // Message returns the exception's message. -func (s InvalidTagException) Message() string { +func (s *InvalidTagException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3732,22 +3732,22 @@ func (s InvalidTagException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTagException) OrigErr() error { +func (s *InvalidTagException) OrigErr() error { return nil } -func (s InvalidTagException) Error() string { +func (s *InvalidTagException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTagException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTagException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTagException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTagException) RequestID() string { + return s.RespMetadata.RequestID } // In an CreateResolverEndpoint request, a subnet and IP address that you want @@ -3952,8 +3952,8 @@ func (s *IpAddressUpdate) SetSubnetId(v string) *IpAddressUpdate { // The request caused one or more limits to be exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -3974,17 +3974,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3992,22 +3992,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListResolverEndpointIpAddressesInput struct { @@ -5088,8 +5088,8 @@ func (s *ResolverRuleConfig) SetTargetIps(v []*TargetAddress) *ResolverRuleConfi // The resource that you tried to create already exists. type ResourceExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -5110,17 +5110,17 @@ func (s ResourceExistsException) GoString() string { func newErrorResourceExistsException(v protocol.ResponseMetadata) error { return &ResourceExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceExistsException) Code() string { +func (s *ResourceExistsException) Code() string { return "ResourceExistsException" } // Message returns the exception's message. -func (s ResourceExistsException) Message() string { +func (s *ResourceExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5128,28 +5128,28 @@ func (s ResourceExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceExistsException) OrigErr() error { +func (s *ResourceExistsException) OrigErr() error { return nil } -func (s ResourceExistsException) Error() string { +func (s *ResourceExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The resource that you tried to update or delete is currently in use. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -5170,17 +5170,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5188,28 +5188,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource doesn't exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -5230,17 +5230,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5248,28 +5248,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource isn't available. type ResourceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -5290,17 +5290,17 @@ func (s ResourceUnavailableException) GoString() string { func newErrorResourceUnavailableException(v protocol.ResponseMetadata) error { return &ResourceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceUnavailableException) Code() string { +func (s *ResourceUnavailableException) Code() string { return "ResourceUnavailableException" } // Message returns the exception's message. -func (s ResourceUnavailableException) Message() string { +func (s *ResourceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5308,22 +5308,22 @@ func (s ResourceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceUnavailableException) OrigErr() error { +func (s *ResourceUnavailableException) OrigErr() error { return nil } -func (s ResourceUnavailableException) Error() string { +func (s *ResourceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // One tag that you want to add to the specified resource. A tag consists of @@ -5500,8 +5500,8 @@ func (s *TargetAddress) SetPort(v int64) *TargetAddress { // The request was throttled. Try again in a few minutes. type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5518,17 +5518,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5536,28 +5536,28 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource doesn't exist. type UnknownResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5574,17 +5574,17 @@ func (s UnknownResourceException) GoString() string { func newErrorUnknownResourceException(v protocol.ResponseMetadata) error { return &UnknownResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnknownResourceException) Code() string { +func (s *UnknownResourceException) Code() string { return "UnknownResourceException" } // Message returns the exception's message. -func (s UnknownResourceException) Message() string { +func (s *UnknownResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5592,22 +5592,22 @@ func (s UnknownResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnknownResourceException) OrigErr() error { +func (s *UnknownResourceException) OrigErr() error { return nil } -func (s UnknownResourceException) Error() string { +func (s *UnknownResourceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnknownResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnknownResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnknownResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnknownResourceException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go index f6a69aed11b..247770e4c88 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go @@ -2,6 +2,7 @@ package s3 import ( "bytes" + "io" "io/ioutil" "net/http" @@ -24,17 +25,18 @@ func copyMultipartStatusOKUnmarhsalError(r *request.Request) { r.HTTPResponse.Body = ioutil.NopCloser(body) defer body.Seek(0, sdkio.SeekStart) - if body.Len() == 0 { - // If there is no body don't attempt to parse the body. - return - } - unmarshalError(r) if err, ok := r.Error.(awserr.Error); ok && err != nil { - if err.Code() == request.ErrCodeSerialization { + if err.Code() == request.ErrCodeSerialization && + err.OrigErr() != io.EOF { r.Error = nil return } - r.HTTPResponse.StatusCode = http.StatusServiceUnavailable + // if empty payload + if err.OrigErr() == io.EOF { + r.HTTPResponse.StatusCode = http.StatusInternalServerError + } else { + r.HTTPResponse.StatusCode = http.StatusServiceUnavailable + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go index 5b63fac72ff..6eecf669107 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go @@ -1,6 +1,7 @@ package s3 import ( + "bytes" "encoding/xml" "fmt" "io" @@ -45,17 +46,24 @@ func unmarshalError(r *request.Request) { // Attempt to parse error from body if it is known var errResp xmlErrorResponse - err := xmlutil.UnmarshalXMLError(&errResp, r.HTTPResponse.Body) - if err == io.EOF { - // Only capture the error if an unmarshal error occurs that is not EOF, - // because S3 might send an error without a error message which causes - // the XML unmarshal to fail with EOF. - err = nil + var err error + if r.HTTPResponse.StatusCode >= 200 && r.HTTPResponse.StatusCode < 300 { + err = s3unmarshalXMLError(&errResp, r.HTTPResponse.Body) + } else { + err = xmlutil.UnmarshalXMLError(&errResp, r.HTTPResponse.Body) } + if err != nil { + var errorMsg string + if err == io.EOF { + errorMsg = "empty response payload" + } else { + errorMsg = "failed to unmarshal error message" + } + r.Error = awserr.NewRequestFailure( awserr.New(request.ErrCodeSerialization, - "failed to unmarshal error message", err), + errorMsg, err), r.HTTPResponse.StatusCode, r.RequestID, ) @@ -86,3 +94,21 @@ type RequestFailure interface { // Host ID is the S3 Host ID needed for debug, and contacting support HostID() string } + +// s3unmarshalXMLError is s3 specific xml error unmarshaler +// for 200 OK errors and response payloads. +// This function differs from the xmlUtil.UnmarshalXMLError +// func. It does not ignore the EOF error and passes it up. +// Related to bug fix for `s3 200 OK response with empty payload` +func s3unmarshalXMLError(v interface{}, stream io.Reader) error { + var errBuf bytes.Buffer + body := io.TeeReader(stream, &errBuf) + + err := xml.NewDecoder(body).Decode(v) + if err != nil && err != io.EOF { + return awserr.NewUnmarshalError(err, + "failed to unmarshal error message", errBuf.Bytes()) + } + + return err +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go index fa5f473c8e3..88503e0fe50 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go @@ -136,7 +136,21 @@ func (c *S3Control) CreateJobRequest(input *CreateJobInput) (req *request.Reques // CreateJob API operation for AWS S3 Control. // -// Creates an Amazon S3 batch operations job. +// You can use Amazon S3 Batch Operations to perform large-scale Batch Operations +// on Amazon S3 objects. Amazon S3 Batch Operations can execute a single operation +// or action on lists of Amazon S3 objects that you specify. For more information, +// see Amazon S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * DescribeJob +// +// * ListJobs +// +// * UpdateJobPriority +// +// * UpdateJobStatus // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -330,6 +344,102 @@ func (c *S3Control) DeleteAccessPointPolicyWithContext(ctx aws.Context, input *D return out, req.Send() } +const opDeleteJobTagging = "DeleteJobTagging" + +// DeleteJobTaggingRequest generates a "aws/request.Request" representing the +// client's request for the DeleteJobTagging operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteJobTagging for more information on using the DeleteJobTagging +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteJobTaggingRequest method. +// req, resp := client.DeleteJobTaggingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteJobTagging +func (c *S3Control) DeleteJobTaggingRequest(input *DeleteJobTaggingInput) (req *request.Request, output *DeleteJobTaggingOutput) { + op := &request.Operation{ + Name: opDeleteJobTagging, + HTTPMethod: "DELETE", + HTTPPath: "/v20180820/jobs/{id}/tagging", + } + + if input == nil { + input = &DeleteJobTaggingInput{} + } + + output = &DeleteJobTaggingOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// DeleteJobTagging API operation for AWS S3 Control. +// +// Removes the entire tag set from the specified Amazon S3 Batch Operations +// job. To use this operation, you must have permission to perform the s3:DeleteJobTagging +// action. For more information, see Using Job Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-managing-jobs.html#batch-ops-job-tags) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * CreateJob +// +// * GetJobTagging +// +// * PutJobTagging +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS S3 Control's +// API operation DeleteJobTagging for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeleteJobTagging +func (c *S3Control) DeleteJobTagging(input *DeleteJobTaggingInput) (*DeleteJobTaggingOutput, error) { + req, out := c.DeleteJobTaggingRequest(input) + return out, req.Send() +} + +// DeleteJobTaggingWithContext is the same as DeleteJobTagging with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteJobTagging for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3Control) DeleteJobTaggingWithContext(ctx aws.Context, input *DeleteJobTaggingInput, opts ...request.Option) (*DeleteJobTaggingOutput, error) { + req, out := c.DeleteJobTaggingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeletePublicAccessBlock = "DeletePublicAccessBlock" // DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the @@ -453,8 +563,19 @@ func (c *S3Control) DescribeJobRequest(input *DescribeJobInput) (req *request.Re // DescribeJob API operation for AWS S3 Control. // -// Retrieves the configuration parameters and status for a batch operations -// job. +// Retrieves the configuration parameters and status for a Batch Operations +// job. For more information, see Amazon S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * CreateJob +// +// * ListJobs +// +// * UpdateJobPriority +// +// * UpdateJobStatus // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -725,6 +846,101 @@ func (c *S3Control) GetAccessPointPolicyStatusWithContext(ctx aws.Context, input return out, req.Send() } +const opGetJobTagging = "GetJobTagging" + +// GetJobTaggingRequest generates a "aws/request.Request" representing the +// client's request for the GetJobTagging operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetJobTagging for more information on using the GetJobTagging +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetJobTaggingRequest method. +// req, resp := client.GetJobTaggingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetJobTagging +func (c *S3Control) GetJobTaggingRequest(input *GetJobTaggingInput) (req *request.Request, output *GetJobTaggingOutput) { + op := &request.Operation{ + Name: opGetJobTagging, + HTTPMethod: "GET", + HTTPPath: "/v20180820/jobs/{id}/tagging", + } + + if input == nil { + input = &GetJobTaggingInput{} + } + + output = &GetJobTaggingOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// GetJobTagging API operation for AWS S3 Control. +// +// Returns the tags on an Amazon S3 Batch Operations job. To use this operation, +// you must have permission to perform the s3:GetJobTagging action. For more +// information, see Using Job Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-managing-jobs.html#batch-ops-job-tags) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * CreateJob +// +// * PutJobTagging +// +// * DeleteJobTagging +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS S3 Control's +// API operation GetJobTagging for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetJobTagging +func (c *S3Control) GetJobTagging(input *GetJobTaggingInput) (*GetJobTaggingOutput, error) { + req, out := c.GetJobTaggingRequest(input) + return out, req.Send() +} + +// GetJobTaggingWithContext is the same as GetJobTagging with the addition of +// the ability to pass a context and additional request options. +// +// See GetJobTagging for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3Control) GetJobTaggingWithContext(ctx aws.Context, input *GetJobTaggingInput, opts ...request.Option) (*GetJobTaggingOutput, error) { + req, out := c.GetJobTaggingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetPublicAccessBlock = "GetPublicAccessBlock" // GetPublicAccessBlockRequest generates a "aws/request.Request" representing the @@ -862,9 +1078,9 @@ func (c *S3Control) ListAccessPointsRequest(input *ListAccessPointsInput) (req * // // Returns a list of the access points currently associated with the specified // bucket. You can retrieve up to 1000 access points per call. If the specified -// bucket has more than 1000 access points (or the number specified in maxResults, -// whichever is less), then the response will include a continuation token that -// you can use to list the additional access points. +// bucket has more than 1,000 access points (or the number specified in maxResults, +// whichever is less), the response will include a continuation token that you +// can use to list the additional access points. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -998,8 +1214,20 @@ func (c *S3Control) ListJobsRequest(input *ListJobsInput) (req *request.Request, // ListJobs API operation for AWS S3 Control. // -// Lists current jobs and jobs that have ended within the last 30 days for the -// AWS account making the request. +// Lists current Amazon S3 Batch Operations jobs and jobs that have ended within +// the last 30 days for the AWS account making the request. For more information, +// see Amazon S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * CreateJob +// +// * DescribeJob +// +// * UpdateJobPriority +// +// * UpdateJobStatus // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1168,6 +1396,130 @@ func (c *S3Control) PutAccessPointPolicyWithContext(ctx aws.Context, input *PutA return out, req.Send() } +const opPutJobTagging = "PutJobTagging" + +// PutJobTaggingRequest generates a "aws/request.Request" representing the +// client's request for the PutJobTagging operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutJobTagging for more information on using the PutJobTagging +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutJobTaggingRequest method. +// req, resp := client.PutJobTaggingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/PutJobTagging +func (c *S3Control) PutJobTaggingRequest(input *PutJobTaggingInput) (req *request.Request, output *PutJobTaggingOutput) { + op := &request.Operation{ + Name: opPutJobTagging, + HTTPMethod: "PUT", + HTTPPath: "/v20180820/jobs/{id}/tagging", + } + + if input == nil { + input = &PutJobTaggingInput{} + } + + output = &PutJobTaggingOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// PutJobTagging API operation for AWS S3 Control. +// +// Set the supplied tag-set on an Amazon S3 Batch Operations job. +// +// A tag is a key-value pair. You can associate Amazon S3 Batch Operations tags +// with any job by sending a PUT request against the tagging subresource that +// is associated with the job. To modify the existing tag set, you can either +// replace the existing tag set entirely, or make changes within the existing +// tag set by retrieving the existing tag set using GetJobTagging, modify that +// tag set, and use this API action to replace the tag set with the one you +// have modified.. For more information, see Using Job Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-managing-jobs.html#batch-ops-job-tags) +// in the Amazon Simple Storage Service Developer Guide. +// +// * If you send this request with an empty tag set, Amazon S3 deletes the +// existing tag set on the Batch Operations job. If you use this method, +// you will be charged for a Tier 1 Request (PUT). For more information, +// see Amazon S3 pricing (http://aws.amazon.com/s3/pricing/). +// +// * For deleting existing tags for your batch operations job, DeleteJobTagging +// request is preferred because it achieves the same result without incurring +// charges. +// +// * A few things to consider about using tags: Amazon S3 limits the maximum +// number of tags to 50 tags per job. You can associate up to 50 tags with +// a job as long as they have unique tag keys. A tag key can be up to 128 +// Unicode characters in length, and tag values can be up to 256 Unicode +// characters in length. The key and values are case sensitive. For tagging-related +// restrictions related to characters and encodings, see User-Defined Tag +// Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html). +// +// To use this operation, you must have permission to perform the s3:PutJobTagging +// action. +// +// Related actions include: +// +// * CreateJob +// +// * GetJobTagging +// +// * DeleteJobTagging +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS S3 Control's +// API operation PutJobTagging for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/PutJobTagging +func (c *S3Control) PutJobTagging(input *PutJobTaggingInput) (*PutJobTaggingOutput, error) { + req, out := c.PutJobTaggingRequest(input) + return out, req.Send() +} + +// PutJobTaggingWithContext is the same as PutJobTagging with the addition of +// the ability to pass a context and additional request options. +// +// See PutJobTagging for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3Control) PutJobTaggingWithContext(ctx aws.Context, input *PutJobTaggingInput, opts ...request.Option) (*PutJobTaggingOutput, error) { + req, out := c.PutJobTaggingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutPublicAccessBlock = "PutPublicAccessBlock" // PutPublicAccessBlockRequest generates a "aws/request.Request" representing the @@ -1292,7 +1644,19 @@ func (c *S3Control) UpdateJobPriorityRequest(input *UpdateJobPriorityInput) (req // UpdateJobPriority API operation for AWS S3 Control. // -// Updates an existing job's priority. +// Updates an existing Amazon S3 Batch Operations job's priority. For more information, +// see Amazon S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * CreateJob +// +// * ListJobs +// +// * DescribeJob +// +// * UpdateJobStatus // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1379,7 +1743,19 @@ func (c *S3Control) UpdateJobStatusRequest(input *UpdateJobStatusInput) (req *re // UpdateJobStatus API operation for AWS S3 Control. // // Updates the status for the specified job. Use this operation to confirm that -// you want to run a job or to cancel an existing job. +// you want to run a job or to cancel an existing job. For more information, +// see Amazon S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) +// in the Amazon Simple Storage Service Developer Guide. +// +// Related actions include: +// +// * CreateJob +// +// * ListJobs +// +// * DescribeJob +// +// * UpdateJobStatus // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1435,16 +1811,16 @@ type AccessPoint struct { // Name is a required field Name *string `min:"3" type:"string" required:"true"` - // Indicates whether this access point allows access from the public Internet. + // Indicates whether this access point allows access from the public internet. // If VpcConfiguration is specified for this access point, then NetworkOrigin - // is VPC, and the access point doesn't allow access from the public Internet. + // is VPC, and the access point doesn't allow access from the public internet. // Otherwise, NetworkOrigin is Internet, and the access point allows access - // from the public Internet, subject to the access point and bucket access policies. + // from the public internet, subject to the access point and bucket access policies. // // NetworkOrigin is a required field NetworkOrigin *string `type:"string" required:"true" enum:"NetworkOrigin"` - // The Virtual Private Cloud (VPC) configuration for this access point, if one + // The virtual private cloud (VPC) configuration for this access point, if one // exists. VpcConfiguration *VpcConfiguration `type:"structure"` } @@ -1510,7 +1886,7 @@ type CreateAccessPointInput struct { PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"` // If you include this field, Amazon S3 restricts access to this access point - // to requests from the specified Virtual Private Cloud (VPC). + // to requests from the specified virtual private cloud (VPC). VpcConfiguration *VpcConfiguration `type:"structure"` } @@ -1648,12 +2024,16 @@ type CreateJobInput struct { // Report is a required field Report *JobReport `type:"structure" required:"true"` - // The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) - // Role that batch operations will use to execute this job's operation on each - // object in the manifest. + // The Amazon Resource Name (ARN) for the AWS Identity and Access Management + // (IAM) role that Batch Operations will use to execute this job's operation + // on each object in the manifest. // // RoleArn is a required field RoleArn *string `min:"1" type:"string" required:"true"` + + // A set of tags to associate with the Amazon S3 Batch Operations job. This + // is an optional parameter. + Tags []*S3Tag `type:"list"` } // String returns the string representation @@ -1714,6 +2094,16 @@ func (s *CreateJobInput) Validate() error { invalidParams.AddNested("Report", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -1775,6 +2165,12 @@ func (s *CreateJobInput) SetRoleArn(v string) *CreateJobInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateJobInput) SetTags(v []*S3Tag) *CreateJobInput { + s.Tags = v + return s +} + func (s *CreateJobInput) hostLabels() map[string]string { return map[string]string{ "AccountId": aws.StringValue(s.AccountId), @@ -1961,6 +2357,84 @@ func (s DeleteAccessPointPolicyOutput) GoString() string { return s.String() } +type DeleteJobTaggingInput struct { + _ struct{} `locationName:"DeleteJobTaggingRequest" type:"structure"` + + // The AWS account ID associated with the Amazon S3 Batch Operations job. + // + // AccountId is a required field + AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` + + // The ID for the Amazon S3 Batch Operations job whose tags you want to delete. + // + // JobId is a required field + JobId *string `location:"uri" locationName:"id" min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteJobTaggingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobTaggingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteJobTaggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteJobTaggingInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 5 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DeleteJobTaggingInput) SetAccountId(v string) *DeleteJobTaggingInput { + s.AccountId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *DeleteJobTaggingInput) SetJobId(v string) *DeleteJobTaggingInput { + s.JobId = &v + return s +} + +func (s *DeleteJobTaggingInput) hostLabels() map[string]string { + return map[string]string{ + "AccountId": aws.StringValue(s.AccountId), + } +} + +type DeleteJobTaggingOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteJobTaggingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobTaggingOutput) GoString() string { + return s.String() +} + type DeletePublicAccessBlockInput struct { _ struct{} `locationName:"DeletePublicAccessBlockRequest" type:"structure"` @@ -2186,11 +2660,11 @@ type GetAccessPointOutput struct { // The name of the specified access point. Name *string `min:"3" type:"string"` - // Indicates whether this access point allows access from the public Internet. + // Indicates whether this access point allows access from the public internet. // If VpcConfiguration is specified for this access point, then NetworkOrigin - // is VPC, and the access point doesn't allow access from the public Internet. + // is VPC, and the access point doesn't allow access from the public internet. // Otherwise, NetworkOrigin is Internet, and the access point allows access - // from the public Internet, subject to the access point and bucket access policies. + // from the public internet, subject to the access point and bucket access policies. NetworkOrigin *string `type:"string" enum:"NetworkOrigin"` // The PublicAccessBlock configuration that you want to apply to this Amazon @@ -2200,7 +2674,7 @@ type GetAccessPointOutput struct { // in the Amazon Simple Storage Service Developer Guide. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"` - // Contains the Virtual Private Cloud (VPC) configuration for the specified + // Contains the virtual private cloud (VPC) configuration for the specified // access point. VpcConfiguration *VpcConfiguration `type:"structure"` } @@ -2298,84 +2772,171 @@ func (s *GetAccessPointPolicyInput) Validate() error { } // SetAccountId sets the AccountId field's value. -func (s *GetAccessPointPolicyInput) SetAccountId(v string) *GetAccessPointPolicyInput { +func (s *GetAccessPointPolicyInput) SetAccountId(v string) *GetAccessPointPolicyInput { + s.AccountId = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetAccessPointPolicyInput) SetName(v string) *GetAccessPointPolicyInput { + s.Name = &v + return s +} + +func (s *GetAccessPointPolicyInput) hostLabels() map[string]string { + return map[string]string{ + "AccountId": aws.StringValue(s.AccountId), + } +} + +type GetAccessPointPolicyOutput struct { + _ struct{} `type:"structure"` + + // The access point policy associated with the specified access point. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s GetAccessPointPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAccessPointPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetAccessPointPolicyOutput) SetPolicy(v string) *GetAccessPointPolicyOutput { + s.Policy = &v + return s +} + +type GetAccessPointPolicyStatusInput struct { + _ struct{} `locationName:"GetAccessPointPolicyStatusRequest" type:"structure"` + + // The account ID for the account that owns the specified access point. + // + // AccountId is a required field + AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` + + // The name of the access point whose policy status you want to retrieve. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAccessPointPolicyStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAccessPointPolicyStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAccessPointPolicyStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAccessPointPolicyStatusInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 3 { + invalidParams.Add(request.NewErrParamMinLen("Name", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *GetAccessPointPolicyStatusInput) SetAccountId(v string) *GetAccessPointPolicyStatusInput { s.AccountId = &v return s } // SetName sets the Name field's value. -func (s *GetAccessPointPolicyInput) SetName(v string) *GetAccessPointPolicyInput { +func (s *GetAccessPointPolicyStatusInput) SetName(v string) *GetAccessPointPolicyStatusInput { s.Name = &v return s } -func (s *GetAccessPointPolicyInput) hostLabels() map[string]string { +func (s *GetAccessPointPolicyStatusInput) hostLabels() map[string]string { return map[string]string{ "AccountId": aws.StringValue(s.AccountId), } } -type GetAccessPointPolicyOutput struct { +type GetAccessPointPolicyStatusOutput struct { _ struct{} `type:"structure"` - // The access point policy associated with the specified access point. - Policy *string `type:"string"` + // Indicates the current policy status of the specified access point. + PolicyStatus *PolicyStatus `type:"structure"` } // String returns the string representation -func (s GetAccessPointPolicyOutput) String() string { +func (s GetAccessPointPolicyStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetAccessPointPolicyOutput) GoString() string { +func (s GetAccessPointPolicyStatusOutput) GoString() string { return s.String() } -// SetPolicy sets the Policy field's value. -func (s *GetAccessPointPolicyOutput) SetPolicy(v string) *GetAccessPointPolicyOutput { - s.Policy = &v +// SetPolicyStatus sets the PolicyStatus field's value. +func (s *GetAccessPointPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetAccessPointPolicyStatusOutput { + s.PolicyStatus = v return s } -type GetAccessPointPolicyStatusInput struct { - _ struct{} `locationName:"GetAccessPointPolicyStatusRequest" type:"structure"` +type GetJobTaggingInput struct { + _ struct{} `locationName:"GetJobTaggingRequest" type:"structure"` - // The account ID for the account that owns the specified access point. + // The AWS account ID associated with the Amazon S3 Batch Operations job. // // AccountId is a required field AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` - // The name of the access point whose policy status you want to retrieve. + // The ID for the Amazon S3 Batch Operations job whose tags you want to retrieve. // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"3" type:"string" required:"true"` + // JobId is a required field + JobId *string `location:"uri" locationName:"id" min:"5" type:"string" required:"true"` } // String returns the string representation -func (s GetAccessPointPolicyStatusInput) String() string { +func (s GetJobTaggingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetAccessPointPolicyStatusInput) GoString() string { +func (s GetJobTaggingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetAccessPointPolicyStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAccessPointPolicyStatusInput"} +func (s *GetJobTaggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetJobTaggingInput"} if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } if s.AccountId != nil && len(*s.AccountId) < 1 { invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) } - if s.Name != nil && len(*s.Name) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Name", 3)) + if s.JobId != nil && len(*s.JobId) < 5 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 5)) } if invalidParams.Len() > 0 { @@ -2385,43 +2946,43 @@ func (s *GetAccessPointPolicyStatusInput) Validate() error { } // SetAccountId sets the AccountId field's value. -func (s *GetAccessPointPolicyStatusInput) SetAccountId(v string) *GetAccessPointPolicyStatusInput { +func (s *GetJobTaggingInput) SetAccountId(v string) *GetJobTaggingInput { s.AccountId = &v return s } -// SetName sets the Name field's value. -func (s *GetAccessPointPolicyStatusInput) SetName(v string) *GetAccessPointPolicyStatusInput { - s.Name = &v +// SetJobId sets the JobId field's value. +func (s *GetJobTaggingInput) SetJobId(v string) *GetJobTaggingInput { + s.JobId = &v return s } -func (s *GetAccessPointPolicyStatusInput) hostLabels() map[string]string { +func (s *GetJobTaggingInput) hostLabels() map[string]string { return map[string]string{ "AccountId": aws.StringValue(s.AccountId), } } -type GetAccessPointPolicyStatusOutput struct { +type GetJobTaggingOutput struct { _ struct{} `type:"structure"` - // Indicates the current policy status of the specified access point. - PolicyStatus *PolicyStatus `type:"structure"` + // The set of tags associated with the Amazon S3 Batch Operations job. + Tags []*S3Tag `type:"list"` } // String returns the string representation -func (s GetAccessPointPolicyStatusOutput) String() string { +func (s GetJobTaggingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetAccessPointPolicyStatusOutput) GoString() string { +func (s GetJobTaggingOutput) GoString() string { return s.String() } -// SetPolicyStatus sets the PolicyStatus field's value. -func (s *GetAccessPointPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetAccessPointPolicyStatusOutput { - s.PolicyStatus = v +// SetTags sets the Tags field's value. +func (s *GetJobTaggingOutput) SetTags(v []*S3Tag) *GetJobTaggingOutput { + s.Tags = v return s } @@ -2542,8 +3103,8 @@ type JobDescriptor struct { // requested one in the Create Job request. Report *JobReport `type:"structure"` - // The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) - // Role assigned to execute the tasks for this job. + // The Amazon Resource Name (ARN) for the AWS Identity and Access Management + // (IAM) role assigned to execute the tasks for this job. RoleArn *string `min:"1" type:"string"` // The current status of the specified job. @@ -3010,6 +3571,18 @@ type JobOperation struct { // in the manifest. S3PutObjectCopy *S3CopyObjectOperation `type:"structure"` + // Contains the configuration parameters for a Set Object Legal Hold operation. + // Amazon S3 Batch Operations passes each value through to the underlying PUT + // Object Legal Hold API. For more information about the parameters for this + // operation, see PUT Object Legal Hold (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.htmll#object-lock-legal-holds). + S3PutObjectLegalHold *S3SetObjectLegalHoldOperation `type:"structure"` + + // Contains the configuration parameters for a Set Object Retention operation. + // Amazon S3 Batch Operations passes each value through to the underlying PUT + // Object Retention API. For more information about the parameters for this + // operation, see PUT Object Retention (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes). + S3PutObjectRetention *S3SetObjectRetentionOperation `type:"structure"` + // Directs the specified job to execute a PUT Object tagging call on each object // in the manifest. S3PutObjectTagging *S3SetObjectTaggingOperation `type:"structure"` @@ -3043,6 +3616,16 @@ func (s *JobOperation) Validate() error { invalidParams.AddNested("S3PutObjectCopy", err.(request.ErrInvalidParams)) } } + if s.S3PutObjectLegalHold != nil { + if err := s.S3PutObjectLegalHold.Validate(); err != nil { + invalidParams.AddNested("S3PutObjectLegalHold", err.(request.ErrInvalidParams)) + } + } + if s.S3PutObjectRetention != nil { + if err := s.S3PutObjectRetention.Validate(); err != nil { + invalidParams.AddNested("S3PutObjectRetention", err.(request.ErrInvalidParams)) + } + } if s.S3PutObjectTagging != nil { if err := s.S3PutObjectTagging.Validate(); err != nil { invalidParams.AddNested("S3PutObjectTagging", err.(request.ErrInvalidParams)) @@ -3079,6 +3662,18 @@ func (s *JobOperation) SetS3PutObjectCopy(v *S3CopyObjectOperation) *JobOperatio return s } +// SetS3PutObjectLegalHold sets the S3PutObjectLegalHold field's value. +func (s *JobOperation) SetS3PutObjectLegalHold(v *S3SetObjectLegalHoldOperation) *JobOperation { + s.S3PutObjectLegalHold = v + return s +} + +// SetS3PutObjectRetention sets the S3PutObjectRetention field's value. +func (s *JobOperation) SetS3PutObjectRetention(v *S3SetObjectRetentionOperation) *JobOperation { + s.S3PutObjectRetention = v + return s +} + // SetS3PutObjectTagging sets the S3PutObjectTagging field's value. func (s *JobOperation) SetS3PutObjectTagging(v *S3SetObjectTaggingOperation) *JobOperation { s.S3PutObjectTagging = v @@ -3695,6 +4290,108 @@ func (s PutAccessPointPolicyOutput) GoString() string { return s.String() } +type PutJobTaggingInput struct { + _ struct{} `locationName:"PutJobTaggingRequest" type:"structure" xmlURI:"http://awss3control.amazonaws.com/doc/2018-08-20/"` + + // The AWS account ID associated with the Amazon S3 Batch Operations job. + // + // AccountId is a required field + AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` + + // The ID for the Amazon S3 Batch Operations job whose tags you want to replace. + // + // JobId is a required field + JobId *string `location:"uri" locationName:"id" min:"5" type:"string" required:"true"` + + // The set of tags to associate with the Amazon S3 Batch Operations job. + // + // Tags is a required field + Tags []*S3Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s PutJobTaggingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutJobTaggingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutJobTaggingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutJobTaggingInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 5 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 5)) + } + 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 +} + +// SetAccountId sets the AccountId field's value. +func (s *PutJobTaggingInput) SetAccountId(v string) *PutJobTaggingInput { + s.AccountId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *PutJobTaggingInput) SetJobId(v string) *PutJobTaggingInput { + s.JobId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *PutJobTaggingInput) SetTags(v []*S3Tag) *PutJobTaggingInput { + s.Tags = v + return s +} + +func (s *PutJobTaggingInput) hostLabels() map[string]string { + return map[string]string{ + "AccountId": aws.StringValue(s.AccountId), + } +} + +type PutJobTaggingOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutJobTaggingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutJobTaggingOutput) GoString() string { + return s.String() +} + type PutPublicAccessBlockInput struct { _ struct{} `locationName:"PutPublicAccessBlockRequest" type:"structure" payload:"PublicAccessBlockConfiguration"` @@ -3877,7 +4574,7 @@ func (s *S3AccessControlPolicy) SetCannedAccessControlList(v string) *S3AccessCo } // Contains the configuration parameters for a PUT Copy object operation. Amazon -// S3 batch operations passes each value through to the underlying PUT Copy +// S3 Batch Operations passes each value through to the underlying PUT Copy // object API. For more information about the parameters for this operation, // see PUT Object - Copy (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html). type S3CopyObjectOperation struct { @@ -3895,10 +4592,15 @@ type S3CopyObjectOperation struct { NewObjectTagging []*S3Tag `type:"list"` + // The Legal Hold status to be applied to all objects in the Batch Operations + // job. ObjectLockLegalHoldStatus *string `type:"string" enum:"S3ObjectLockLegalHoldStatus"` + // The Retention mode to be applied to all objects in the Batch Operations job. ObjectLockMode *string `type:"string" enum:"S3ObjectLockMode"` + // The date when the applied Object Retention configuration will expire on all + // objects in the Batch Operations job. ObjectLockRetainUntilDate *time.Time `type:"timestamp"` RedirectLocation *string `min:"1" type:"string"` @@ -4169,7 +4871,7 @@ func (s *S3Grantee) SetTypeIdentifier(v string) *S3Grantee { } // Contains the configuration parameters for an Initiate Glacier Restore job. -// Amazon S3 batch operations passes each value through to the underlying POST +// Amazon S3 Batch Operations passes each value through to the underlying POST // Object restore API. For more information about the parameters for this operation, // see Restoring Archives (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html#RESTObjectPOSTrestore-restore-request). type S3InitiateRestoreObjectOperation struct { @@ -4202,6 +4904,45 @@ func (s *S3InitiateRestoreObjectOperation) SetGlacierJobTier(v string) *S3Initia return s } +type S3ObjectLockLegalHold struct { + _ struct{} `type:"structure"` + + // The Legal Hold status to be applied to all objects in the Batch Operations + // job. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"S3ObjectLockLegalHoldStatus"` +} + +// String returns the string representation +func (s S3ObjectLockLegalHold) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ObjectLockLegalHold) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ObjectLockLegalHold) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ObjectLockLegalHold"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStatus sets the Status field's value. +func (s *S3ObjectLockLegalHold) SetStatus(v string) *S3ObjectLockLegalHold { + s.Status = &v + return s +} + type S3ObjectMetadata struct { _ struct{} `type:"structure"` @@ -4378,8 +5119,41 @@ func (s *S3ObjectOwner) SetID(v string) *S3ObjectOwner { return s } +type S3Retention struct { + _ struct{} `type:"structure"` + + // The Retention mode to be applied to all objects in the Batch Operations job. + Mode *string `type:"string" enum:"S3ObjectLockRetentionMode"` + + // The date when the applied Object Retention will expire on all objects in + // the Batch Operations job. + RetainUntilDate *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s S3Retention) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Retention) GoString() string { + return s.String() +} + +// SetMode sets the Mode field's value. +func (s *S3Retention) SetMode(v string) *S3Retention { + s.Mode = &v + return s +} + +// SetRetainUntilDate sets the RetainUntilDate field's value. +func (s *S3Retention) SetRetainUntilDate(v time.Time) *S3Retention { + s.RetainUntilDate = &v + return s +} + // Contains the configuration parameters for a Set Object ACL operation. Amazon -// S3 batch operations passes each value through to the underlying PUT Object +// S3 Batch Operations passes each value through to the underlying PUT Object // acl API. For more information about the parameters for this operation, see // PUT Object acl (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html). type S3SetObjectAclOperation struct { @@ -4419,8 +5193,109 @@ func (s *S3SetObjectAclOperation) SetAccessControlPolicy(v *S3AccessControlPolic return s } +// Contains the configuration parameters for a Set Object Legal Hold operation. +// Amazon S3 Batch Operations passes each value through to the underlying PUT +// Object Legal Hold API. For more information about the parameters for this +// operation, see PUT Object Legal Hold (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.htmll#object-lock-legal-holds). +type S3SetObjectLegalHoldOperation struct { + _ struct{} `type:"structure"` + + // The Legal Hold contains the status to be applied to all objects in the Batch + // Operations job. + // + // LegalHold is a required field + LegalHold *S3ObjectLockLegalHold `type:"structure" required:"true"` +} + +// String returns the string representation +func (s S3SetObjectLegalHoldOperation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3SetObjectLegalHoldOperation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3SetObjectLegalHoldOperation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3SetObjectLegalHoldOperation"} + if s.LegalHold == nil { + invalidParams.Add(request.NewErrParamRequired("LegalHold")) + } + if s.LegalHold != nil { + if err := s.LegalHold.Validate(); err != nil { + invalidParams.AddNested("LegalHold", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLegalHold sets the LegalHold field's value. +func (s *S3SetObjectLegalHoldOperation) SetLegalHold(v *S3ObjectLockLegalHold) *S3SetObjectLegalHoldOperation { + s.LegalHold = v + return s +} + +// Contains the configuration parameters for a Set Object Retention operation. +// Amazon S3 Batch Operations passes each value through to the underlying PUT +// Object Retention API. For more information about the parameters for this +// operation, see PUT Object Retention (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes). +type S3SetObjectRetentionOperation struct { + _ struct{} `type:"structure"` + + // Indicates if the operation should be applied to objects in the Batch Operations + // job even if they have Governance-type Object Lock in place. + BypassGovernanceRetention *bool `type:"boolean"` + + // Amazon S3 object lock Retention contains the retention mode to be applied + // to all objects in the Batch Operations job. + // + // Retention is a required field + Retention *S3Retention `type:"structure" required:"true"` +} + +// String returns the string representation +func (s S3SetObjectRetentionOperation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3SetObjectRetentionOperation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3SetObjectRetentionOperation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3SetObjectRetentionOperation"} + if s.Retention == nil { + invalidParams.Add(request.NewErrParamRequired("Retention")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. +func (s *S3SetObjectRetentionOperation) SetBypassGovernanceRetention(v bool) *S3SetObjectRetentionOperation { + s.BypassGovernanceRetention = &v + return s +} + +// SetRetention sets the Retention field's value. +func (s *S3SetObjectRetentionOperation) SetRetention(v *S3Retention) *S3SetObjectRetentionOperation { + s.Retention = v + return s +} + // Contains the configuration parameters for a Set Object Tagging operation. -// Amazon S3 batch operations passes each value through to the underlying PUT +// Amazon S3 Batch Operations passes each value through to the underlying PUT // Object tagging API. For more information about the parameters for this operation, // see PUT Object tagging (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTtagging.html). type S3SetObjectTaggingOperation struct { @@ -4758,7 +5633,7 @@ func (s *UpdateJobStatusOutput) SetStatusUpdateReason(v string) *UpdateJobStatus return s } -// The Virtual Private Cloud (VPC) configuration for an access point. +// The virtual private cloud (VPC) configuration for an access point. type VpcConfiguration struct { _ struct{} `type:"structure"` @@ -4900,6 +5775,12 @@ const ( // OperationNameS3initiateRestoreObject is a OperationName enum value OperationNameS3initiateRestoreObject = "S3InitiateRestoreObject" + + // OperationNameS3putObjectLegalHold is a OperationName enum value + OperationNameS3putObjectLegalHold = "S3PutObjectLegalHold" + + // OperationNameS3putObjectRetention is a OperationName enum value + OperationNameS3putObjectRetention = "S3PutObjectRetention" ) const ( @@ -4976,6 +5857,14 @@ const ( S3ObjectLockModeGovernance = "GOVERNANCE" ) +const ( + // S3ObjectLockRetentionModeCompliance is a S3ObjectLockRetentionMode enum value + S3ObjectLockRetentionModeCompliance = "COMPLIANCE" + + // S3ObjectLockRetentionModeGovernance is a S3ObjectLockRetentionMode enum value + S3ObjectLockRetentionModeGovernance = "GOVERNANCE" +) + const ( // S3PermissionFullControl is a S3Permission enum value S3PermissionFullControl = "FULL_CONTROL" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go index 8f93d6b7707..cc36c98f478 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go @@ -42,4 +42,8 @@ const ( // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + ErrCodeTooManyTagsException = "TooManyTagsException" ) 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 9106e36ca89..9a7070b9b55 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 @@ -306,10 +306,10 @@ func (c *SageMaker) CreateAppRequest(input *CreateAppInput) (req *request.Reques // CreateApp API operation for Amazon SageMaker Service. // -// Creates a running App for the specified UserProfile. Supported Apps are JupyterServer -// and KernelGateway. This operation is automatically invoked by Amazon SageMaker -// Amazon SageMaker Studio (Studio) upon access to the associated Studio Domain, -// and when new kernel configurations are selected by the user. A user may have +// Creates a running App for the specified UserProfile. Supported Apps are JupyterServer, +// KernelGateway, and TensorBoard. This operation is automatically invoked by +// Amazon SageMaker Studio upon access to the associated Studio Domain, and +// when new kernel configurations are selected by the user. A user may have // multiple Apps active simultaneously. Apps will automatically terminate and // be deleted when stopped from within Studio, or when the DeleteApp API is // manually called. UserProfiles are limited to 5 concurrently running Apps @@ -398,6 +398,13 @@ func (c *SageMaker) CreateAutoMLJobRequest(input *CreateAutoMLJobInput) (req *re // // Creates an AutoPilot job. // +// After you run an AutoPilot job, you can find the best performing model by +// calling , and then deploy that model by following the steps described in +// Step 6.1: Deploy the Model to Amazon SageMaker Hosting Services (https://docs.aws.amazon.com/sagemaker/latest/dg/ex1-deploy-model.html). +// +// For information about how to use AutoPilot, see Use AutoPilot to Automate +// Model Development (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html). +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -671,15 +678,15 @@ func (c *SageMaker) CreateDomainRequest(input *CreateDomainInput) (req *request. // CreateDomain API operation for Amazon SageMaker Service. // -// Creates a Domain for Amazon SageMaker Amazon SageMaker Studio (Studio), which -// can be accessed by end-users in a web browser. A Domain has an associated -// directory, list of authorized users, and a variety of security, application, -// policies, and Amazon Virtual Private Cloud configurations. An AWS account -// is limited to one Domain, per region. Users within a domain can share notebook -// files and other artifacts with each other. When a Domain is created, an Amazon -// Elastic File System (EFS) is also created for use by all of the users within -// the Domain. Each user receives a private home directory within the EFS for -// notebooks, Git repositories, and data files. +// Creates a Domain for Amazon SageMaker Studio, which can be accessed by end-users +// in a web browser. A Domain has an associated directory, list of authorized +// users, and a variety of security, application, policies, and Amazon Virtual +// Private Cloud configurations. An AWS account is limited to one Domain, per +// region. Users within a domain can share notebook files and other artifacts +// with each other. When a Domain is created, an Amazon Elastic File System +// (EFS) is also created for use by all of the users within the Domain. Each +// user receives a private home directory within the EFS for notebooks, Git +// repositories, and data files. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -764,8 +771,7 @@ func (c *SageMaker) CreateEndpointRequest(input *CreateEndpointInput) (req *requ // // Creates an endpoint using the endpoint configuration specified in the request. // Amazon SageMaker uses the endpoint to provision resources and deploy models. -// You create the endpoint configuration with the CreateEndpointConfig (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html) -// API. +// You create the endpoint configuration with the CreateEndpointConfig API. // // Use this API to deploy models using Amazon SageMaker hosting services. // @@ -785,8 +791,7 @@ func (c *SageMaker) CreateEndpointRequest(input *CreateEndpointInput) (req *requ // When Amazon SageMaker receives the request, it sets the endpoint status to // Creating. After it creates the endpoint, it sets the status to InService. // Amazon SageMaker can then process incoming requests for inferences. To check -// the status of an endpoint, use the DescribeEndpoint (https://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) -// API. +// the status of an endpoint, use the DescribeEndpoint API. // // If any of the models hosted at this endpoint get model data from an Amazon // S3 location, Amazon SageMaker uses AWS Security Token Service to download @@ -877,8 +882,7 @@ func (c *SageMaker) CreateEndpointConfigRequest(input *CreateEndpointConfigInput // Creates an endpoint configuration that Amazon SageMaker hosting services // uses to deploy models. In the configuration, you identify one or more models, // created using the CreateModel API, to deploy and the resources that you want -// Amazon SageMaker to provision. Then you call the CreateEndpoint (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html) -// API. +// Amazon SageMaker to provision. Then you call the CreateEndpoint API. // // Use this API if you want to use Amazon SageMaker hosting services to deploy // models into production. @@ -1937,9 +1941,9 @@ func (c *SageMaker) CreatePresignedDomainUrlRequest(input *CreatePresignedDomain // // Creates a URL for a specified UserProfile in a Domain. When accessed in a // web browser, the user will be automatically signed in to Amazon SageMaker -// Amazon SageMaker Studio (Studio), and granted access to all of the Apps and -// files associated with that Amazon Elastic File System (EFS). This operation -// can only be called when AuthMode equals IAM. +// Studio, and granted access to all of the Apps and files associated with that +// Amazon Elastic File System (EFS). This operation can only be called when +// AuthMode equals IAM. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2032,9 +2036,9 @@ func (c *SageMaker) CreatePresignedNotebookInstanceUrlRequest(input *CreatePresi // IP addresses that you want to have access to the notebook instance. For more // information, see Limit Access to a Notebook Instance by IP Address (https://docs.aws.amazon.com/sagemaker/latest/dg/security_iam_id-based-policy-examples.html#nbi-ip-filter). // -// The URL that you get from a call to is valid only for 5 minutes. If you try -// to use the URL after the 5-minute limit expires, you are directed to the -// AWS console sign-in page. +// The URL that you get from a call to CreatePresignedNotebookInstanceUrl is +// valid only for 5 minutes. If you try to use the URL after the 5-minute limit +// expires, you are directed to the AWS console sign-in 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 @@ -2627,13 +2631,15 @@ func (c *SageMaker) CreateUserProfileRequest(input *CreateUserProfileInput) (req // CreateUserProfile API operation for Amazon SageMaker Service. // -// Creates a new user profile. A user profile represents a single user within -// a Domain, and is the main way to reference a "person" for the purposes of -// sharing, reporting and other user-oriented features. This entity is created -// during on-boarding. If an administrator invites a person by email or imports -// them from SSO, a new UserProfile is automatically created. This entity is -// the primary holder of settings for an individual user and has a reference -// to the user's private Amazon Elastic File System (EFS) home directory. +// Creates a user profile. A user profile represents a single user within a +// Domain, and is the main way to reference a "person" for the purposes of sharing, +// reporting and other user-oriented features. This entity is created during +// on-boarding to Amazon SageMaker Studio. If an administrator invites a person +// by email or imports them from SSO, a UserProfile is automatically created. +// +// This entity is the primary holder of settings for an individual user and, +// through the domain, has a reference to the user's private Amazon Elastic +// File System (EFS) home directory. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3037,9 +3043,8 @@ func (c *SageMaker) DeleteDomainRequest(input *DeleteDomainInput) (req *request. // DeleteDomain API operation for Amazon SageMaker Service. // -// Used to delete a domain. If you on-boarded with IAM mode, you will need to -// delete your domain to on-board again using SSO. Use with caution. All of -// the members of the domain will lose access to their EFS volume, including +// Used to delete a domain. Use with caution. If RetentionPolicy is set to Delete, +// all of the members of the domain will lose access to their EFS volume, including // data, notebooks, and other artifacts. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3442,9 +3447,9 @@ func (c *SageMaker) DeleteModelRequest(input *DeleteModelInput) (req *request.Re // DeleteModel API operation for Amazon SageMaker Service. // // Deletes a model. The DeleteModel API deletes only the model entry that was -// created in Amazon SageMaker when you called the CreateModel (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html) -// API. It does not delete model artifacts, inference code, or the IAM role -// that you specified when creating the model. +// created in Amazon SageMaker when you called the CreateModel API. It does +// not delete model artifacts, inference code, or the IAM role that you specified +// when creating the model. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8635,8 +8640,7 @@ func (c *SageMaker) ListModelsRequest(input *ListModelsInput) (req *request.Requ // ListModels API operation for Amazon SageMaker Service. // -// Lists models created with the CreateModel (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html) -// API. +// Lists models created with the CreateModel 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 @@ -10725,9 +10729,9 @@ func (c *SageMaker) SearchRequest(input *SearchInput) (req *request.Request, out // Search API operation for Amazon SageMaker Service. // -// Finds Amazon SageMaker resources that match a search query. Matching resource -// objects are returned as a list of SearchResult objects in the response. You -// can sort the search results by any resource property in a ascending or descending +// Finds Amazon SageMaker resources that match a search query. Matching resources +// are returned as a list of SearchRecord objects in the response. You can sort +// the search results by any resource property in a ascending or descending // order. // // You can query against the following value types: numeric, text, Boolean, @@ -11942,8 +11946,7 @@ func (c *SageMaker) UpdateEndpointRequest(input *UpdateEndpointInput) (req *requ // // When Amazon SageMaker receives the request, it sets the endpoint status to // Updating. After updating the endpoint, it sets the status to InService. To -// check the status of an endpoint, use the DescribeEndpoint (https://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) -// API. +// check the status of an endpoint, use the DescribeEndpoint API. // // You must not delete an EndpointConfig in use by an endpoint that is live // or while the UpdateEndpoint or CreateEndpoint operations are being performed @@ -12031,8 +12034,7 @@ func (c *SageMaker) UpdateEndpointWeightsAndCapacitiesRequest(input *UpdateEndpo // endpoint, or capacity of one variant associated with an existing endpoint. // When it receives the request, Amazon SageMaker sets the endpoint status to // Updating. After updating the endpoint, it sets the status to InService. To -// check the status of an endpoint, use the DescribeEndpoint (https://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) -// API. +// check the status of an endpoint, use the DescribeEndpoint 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 @@ -12904,8 +12906,7 @@ func (s *AddTagsOutput) SetTags(v []*Tag) *AddTagsOutput { return s } -// Specifies the training algorithm to use in a CreateTrainingJob (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html) -// request. +// Specifies the training algorithm to use in a CreateTrainingJob request. // // For more information about algorithms provided by Amazon SageMaker, see Algorithms // (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). For information @@ -13369,6 +13370,21 @@ type AnnotationConsolidationConfig struct { // arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClass // arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClass // + // * Multi-label image classification - Uses a variant of the Expectation + // Maximization approach to estimate the true classes of an image based on + // annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClassMultiLabel + // arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClassMultiLabel + // // * Semantic segmentation - Treats each pixel in an image as a multi-class // classification and treats pixel annotations from workers as "votes" for // the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation @@ -13395,6 +13411,21 @@ type AnnotationConsolidationConfig struct { // arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClass // arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClass // + // * Multi-label text classification - Uses a variant of the Expectation + // Maximization approach to estimate the true classes of text based on annotations + // from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClassMultiLabel + // arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClassMultiLabel + // // * Named entity recognition - Groups similar selections and calculates // aggregate boundaries, resolving to most-assigned label. arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition // arn:aws:lambda:us-east-2:266458841044:function:ACS-NamedEntityRecognition @@ -14017,7 +14048,9 @@ func (s *AutoMLContainerDefinition) SetModelDataUrl(v string) *AutoMLContainerDe type AutoMLDataSource struct { _ struct{} `type:"structure"` - // The Amazon S3 location of the data. + // The Amazon S3 location of the input data. + // + // The input data must be in CSV format and contain at least 1000 rows. // // S3DataSource is a required field S3DataSource *AutoMLS3DataSource `type:"structure" required:"true"` @@ -15280,8 +15313,8 @@ func (s *CompilationJobSummary) SetLastModifiedTime(v time.Time) *CompilationJob // There was a conflict when you attempted to modify an experiment, trial, or // trial component. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -15298,17 +15331,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15316,22 +15349,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the container, as part of model definition. @@ -15788,7 +15821,8 @@ type CreateAppInput struct { // DomainId is a required field DomainId *string `type:"string" required:"true"` - // The instance type and quantity. + // The instance type and the Amazon Resource Name (ARN) of the SageMaker image + // created on the instance. ResourceSpec *ResourceSpec `type:"structure"` // Each tag consists of a key and an optional value. Tag keys must be unique @@ -15924,6 +15958,7 @@ type CreateAutoMLJobInput struct { GenerateCandidateDefinitionsOnly *bool `type:"boolean"` // Similar to InputDataConfig supported by Tuning. Format(s) supported: CSV. + // Minimum of 1000 rows. // // InputDataConfig is a required field InputDataConfig []*AutoMLChannel `min:"1" type:"list" required:"true"` @@ -16371,7 +16406,8 @@ type CreateDomainInput struct { // DomainName is a required field DomainName *string `type:"string" required:"true"` - // The AWS Key Management Service encryption key ID. + // The AWS Key Management Service (KMS) encryption key ID. Encryption with a + // customer master key (CMK) is not supported. HomeEfsFileSystemKmsKeyId *string `type:"string"` // Security setting to limit to a set of subnets. @@ -16523,7 +16559,6 @@ type CreateEndpointConfigInput struct { DataCaptureConfig *DataCaptureConfig `type:"structure"` // The name of the endpoint configuration. You specify this name in a CreateEndpoint - // (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html) // request. // // EndpointConfigName is a required field @@ -16687,8 +16722,7 @@ func (s *CreateEndpointConfigOutput) SetEndpointConfigArn(v string) *CreateEndpo type CreateEndpointInput struct { _ struct{} `type:"structure"` - // The name of an endpoint configuration. For more information, see CreateEndpointConfig - // (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html). + // The name of an endpoint configuration. For more information, see CreateEndpointConfig. // // EndpointConfigName is a required field EndpointConfigName *string `type:"string" required:"true"` @@ -16908,6 +16942,10 @@ type CreateFlowDefinitionInput struct { // HumanLoopConfig is a required field HumanLoopConfig *HumanLoopConfig `type:"structure" required:"true"` + // Container for configuring the source of human task requests. Use to specify + // if Amazon Rekognition or Amazon Textract is used as an integration source. + HumanLoopRequestSource *HumanLoopRequestSource `type:"structure"` + // An object containing information about where the human review results will // be uploaded. // @@ -16967,6 +17005,11 @@ func (s *CreateFlowDefinitionInput) Validate() error { invalidParams.AddNested("HumanLoopConfig", err.(request.ErrInvalidParams)) } } + if s.HumanLoopRequestSource != nil { + if err := s.HumanLoopRequestSource.Validate(); err != nil { + invalidParams.AddNested("HumanLoopRequestSource", err.(request.ErrInvalidParams)) + } + } if s.OutputConfig != nil { if err := s.OutputConfig.Validate(); err != nil { invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) @@ -17007,6 +17050,12 @@ func (s *CreateFlowDefinitionInput) SetHumanLoopConfig(v *HumanLoopConfig) *Crea return s } +// SetHumanLoopRequestSource sets the HumanLoopRequestSource field's value. +func (s *CreateFlowDefinitionInput) SetHumanLoopRequestSource(v *HumanLoopRequestSource) *CreateFlowDefinitionInput { + s.HumanLoopRequestSource = v + return s +} + // SetOutputConfig sets the OutputConfig field's value. func (s *CreateFlowDefinitionInput) SetOutputConfig(v *FlowDefinitionOutputConfig) *CreateFlowDefinitionInput { s.OutputConfig = v @@ -17163,7 +17212,7 @@ type CreateHyperParameterTuningJobInput struct { // The HyperParameterTuningJobConfig object that describes the tuning job, including // the search strategy, the objective metric used to evaluate training jobs, // ranges of parameters to search, and resource limits for the tuning job. For - // more information, see automatic-model-tuning + // more information, see How Hyperparameter Tuning Works (https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-how-it-works.html). // // HyperParameterTuningJobConfig is a required field HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` @@ -17640,10 +17689,9 @@ type CreateModelInput struct { // in the AWS Billing and Cost Management User Guide. Tags []*Tag `type:"list"` - // A VpcConfig (https://docs.aws.amazon.com/sagemaker/latest/dg/API_VpcConfig.html) - // object that specifies the VPC that you want your model to connect to. Control - // access to and from your model container by configuring the VPC. VpcConfig - // is used in hosting services and in batch transform. For more information, + // A VpcConfig object that specifies the VPC that you want your model to connect + // to. Control access to and from your model container by configuring the VPC. + // VpcConfig is used in hosting services and in batch transform. For more information, // see Protect Endpoints by Using an Amazon Virtual Private Cloud (https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) // and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private // Cloud (https://docs.aws.amazon.com/sagemaker/latest/dg/batch-vpc.html). @@ -17930,7 +17978,7 @@ type CreateMonitoringScheduleInput struct { MonitoringScheduleName *string `min:"1" type:"string" required:"true"` // (Optional) An array of key-value pairs. For more information, see Using Cost - // Allocation Tags (https://docs-aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL) + // Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL) // in the AWS Billing and Cost Management User Guide. Tags []*Tag `type:"list"` } @@ -18585,7 +18633,7 @@ type CreateProcessingJobInput struct { StoppingCondition *ProcessingStoppingCondition `type:"structure"` // (Optional) An array of key-value pairs. For more information, see Using Cost - // Allocation Tags (https://docs-aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL) + // Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL) // in the AWS Billing and Cost Management User Guide. Tags []*Tag `type:"list"` } @@ -19179,8 +19227,8 @@ type CreateTransformJobInput struct { // request. A record is a single unit of input data that inference can be made // on. For example, a single line in a CSV file is a record. // - // To enable the batch strategy, you must set the SplitType property of the - // DataProcessing object to Line, RecordIO, or TFRecord. + // To enable the batch strategy, you must set the SplitType property to Line, + // RecordIO, or TFRecord. // // To use only one record when making an HTTP invocation request to a container, // set BatchStrategy to SingleRecord and SplitType to Line. @@ -20743,7 +20791,7 @@ type DeleteDomainInput struct { // DomainId is a required field DomainId *string `type:"string" required:"true"` - // The retention policy for this domain, which specifies which resources will + // The retention policy for this domain, which specifies whether resources will // be retained after the Domain is deleted. By default, all resources are retained // (not automatically deleted). RetentionPolicy *RetentionPolicy `type:"structure"` @@ -21942,7 +21990,8 @@ type DescribeAppOutput struct { // The timestamp of the last user's activity. LastUserActivityTimestamp *time.Time `type:"timestamp"` - // The instance type and quantity. + // The instance type and the Amazon Resource Name (ARN) of the SageMaker image + // created on the instance. ResourceSpec *ResourceSpec `type:"structure"` // The status. @@ -23275,6 +23324,10 @@ type DescribeFlowDefinitionOutput struct { // HumanLoopConfig is a required field HumanLoopConfig *HumanLoopConfig `type:"structure" required:"true"` + // Container for configuring the source of human task requests. Used to specify + // if Amazon Rekognition or Amazon Textract is used as an integration source. + HumanLoopRequestSource *HumanLoopRequestSource `type:"structure"` + // An object containing information about the output file. // // OutputConfig is a required field @@ -23339,6 +23392,12 @@ func (s *DescribeFlowDefinitionOutput) SetHumanLoopConfig(v *HumanLoopConfig) *D return s } +// SetHumanLoopRequestSource sets the HumanLoopRequestSource field's value. +func (s *DescribeFlowDefinitionOutput) SetHumanLoopRequestSource(v *HumanLoopRequestSource) *DescribeFlowDefinitionOutput { + s.HumanLoopRequestSource = v + return s +} + // SetOutputConfig sets the OutputConfig field's value. func (s *DescribeFlowDefinitionOutput) SetOutputConfig(v *FlowDefinitionOutputConfig) *DescribeFlowDefinitionOutput { s.OutputConfig = v @@ -26245,7 +26304,7 @@ type DescribeUserProfileOutput struct { // The failure reason. FailureReason *string `type:"string"` - // The homa Amazon Elastic File System (EFS) Uid. + // The home Amazon Elastic File System (EFS) Uid. HomeEfsFileSystemUid *string `type:"string"` // The last modified time. @@ -26934,7 +26993,7 @@ func (s *EndpointSummary) SetLastModifiedTime(v time.Time) *EndpointSummary { return s } -// A summary of the properties of an experiment as returned by the Search API. +// The properties of an experiment as returned by the Search API. type Experiment struct { _ struct{} `type:"structure"` @@ -27296,15 +27355,11 @@ func (s *FileSystemDataSource) SetFileSystemType(v string) *FileSystemDataSource } // A conditional statement for a search expression that includes a resource -// property, a Boolean operator, and a value. -// -// If you don't specify an Operator and a Value, the filter searches for only -// the specified property. For example, defining a Filter for the FailureReason -// for the TrainingJob Resource searches for training job objects that have -// a value in the FailureReason field. +// property, a Boolean operator, and a value. Resources that match the statement +// are returned in the results from the Search API. // // If you specify a Value, but not an Operator, Amazon SageMaker uses the equals -// operator as the default. +// operator. // // In search, there are several property types: // @@ -27318,7 +27373,7 @@ func (s *FileSystemDataSource) SetFileSystemType(v string) *FileSystemDataSource // // "Name": "Metrics.accuracy", // -// "Operator": "GREATER_THAN", +// "Operator": "GreaterThan", // // "Value": "0.9" // @@ -27337,7 +27392,7 @@ func (s *FileSystemDataSource) SetFileSystemType(v string) *FileSystemDataSource // // "Name": "HyperParameters.learning_rate", // -// "Operator": "LESS_THAN", +// "Operator": "LessThan", // // "Value": "0.5" // @@ -27345,13 +27400,12 @@ func (s *FileSystemDataSource) SetFileSystemType(v string) *FileSystemDataSource // // Tags // -// To define a tag filter, enter a value with the form "Tags.". +// To define a tag filter, enter a value with the form Tags.. type Filter struct { _ struct{} `type:"structure"` - // A property name. For example, TrainingJobName. For the list of valid property - // names returned in a search result for each supported resource, see TrainingJob - // properties. You must specify a valid property name for the resource. + // A resource property name. For example, TrainingJobName. For valid property + // names, see SearchRecord. You must specify a valid property for the resource. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -27361,44 +27415,53 @@ type Filter struct { // // Equals // - // The specified resource in Name equals the specified Value. + // The value of Name equals Value. // // NotEquals // - // The specified resource in Name does not equal the specified Value. + // The value of Name doesn't equal Value. // // GreaterThan // - // The specified resource in Name is greater than the specified Value. Not supported - // for text-based properties. + // The value of Name is greater than Value. Not supported for text properties. // // GreaterThanOrEqualTo // - // The specified resource in Name is greater than or equal to the specified - // Value. Not supported for text-based properties. + // The value of Name is greater than or equal to Value. Not supported for text + // properties. // // LessThan // - // The specified resource in Name is less than the specified Value. Not supported - // for text-based properties. + // The value of Name is less than Value. Not supported for text properties. // // LessThanOrEqualTo // - // The specified resource in Name is less than or equal to the specified Value. - // Not supported for text-based properties. + // The value of Name is less than or equal to Value. Not supported for text + // properties. // // Contains // - // Only supported for text-based properties. The word-list of the property contains - // the specified Value. A SearchExpression can include only one Contains operator. + // The value of Name contains the string Value. A SearchExpression can include + // only one Contains operator. Only supported for text properties. + // + // Exists + // + // The Name property exists. + // + // NotExists // - // If you have specified a filter Value, the default is Equals. + // The Name property does not exist. + // + // In + // + // The value of Name is one of the comma delimited strings in Value. Only supported + // for text properties. Operator *string `type:"string" enum:"Operator"` - // A value used with Resource and Operator to determine if objects satisfy the - // filter's condition. For numerical properties, Value must be an integer or - // floating-point decimal. For timestamp properties, Value must be an ISO 8601 - // date-time string of the following format: YYYY-mm-dd'T'HH:MM:SS. + // A value used with Name and Operator to determine which resources satisfy + // the filter's condition. For numerical properties, Value must be an integer + // or floating-point decimal. For timestamp properties, Value must be an ISO + // 8601 date-time string of the following format: YYYY-mm-dd'T'HH:MM:SS. Value *string `min:"1" type:"string"` } @@ -27665,7 +27728,7 @@ func (s *FlowDefinitionSummary) SetFlowDefinitionStatus(v string) *FlowDefinitio type GetSearchSuggestionsInput struct { _ struct{} `type:"structure"` - // The name of the Amazon SageMaker resource to Search for. + // The name of the Amazon SageMaker resource to search for. // // Resource is a required field Resource *string `type:"string" required:"true" enum:"ResourceType"` @@ -27846,13 +27909,17 @@ func (s *GitConfigForUpdate) SetSecretArn(v string) *GitConfigForUpdate { return s } -// Defines under what conditions SageMaker creates a human loop. Used within . +// Defines under what conditions SageMaker creates a human loop. Used within +// . See for the required format of activation conditions. type HumanLoopActivationConditionsConfig struct { _ struct{} `type:"structure"` // JSON expressing use-case specific conditions declaratively. If any condition // is matched, atomic tasks are created against the configured work team. The - // set of conditions is different for Rekognition and Textract. + // set of conditions is different for Rekognition and Textract. For more information + // about how to structure the JSON, see JSON Schema for Human Loop Activation + // Conditions in Amazon Augmented AI (https://docs.aws.amazon.com/sagemaker/latest/dg/a2i-human-fallback-conditions-json-schema.html) + // in the Amazon SageMaker Developer Guide. // // HumanLoopActivationConditions is a required field HumanLoopActivationConditions aws.JSONValue `type:"jsonvalue" required:"true"` @@ -27898,11 +27965,6 @@ type HumanLoopActivationConfig struct { // // HumanLoopActivationConditionsConfig is a required field HumanLoopActivationConditionsConfig *HumanLoopActivationConditionsConfig `type:"structure" required:"true"` - - // Container for configuring the source of human task requests. - // - // HumanLoopRequestSource is a required field - HumanLoopRequestSource *HumanLoopRequestSource `type:"structure" required:"true"` } // String returns the string representation @@ -27921,19 +27983,11 @@ func (s *HumanLoopActivationConfig) Validate() error { if s.HumanLoopActivationConditionsConfig == nil { invalidParams.Add(request.NewErrParamRequired("HumanLoopActivationConditionsConfig")) } - if s.HumanLoopRequestSource == nil { - invalidParams.Add(request.NewErrParamRequired("HumanLoopRequestSource")) - } if s.HumanLoopActivationConditionsConfig != nil { if err := s.HumanLoopActivationConditionsConfig.Validate(); err != nil { invalidParams.AddNested("HumanLoopActivationConditionsConfig", err.(request.ErrInvalidParams)) } } - if s.HumanLoopRequestSource != nil { - if err := s.HumanLoopRequestSource.Validate(); err != nil { - invalidParams.AddNested("HumanLoopRequestSource", err.(request.ErrInvalidParams)) - } - } if invalidParams.Len() > 0 { return invalidParams @@ -27947,12 +28001,6 @@ func (s *HumanLoopActivationConfig) SetHumanLoopActivationConditionsConfig(v *Hu return s } -// SetHumanLoopRequestSource sets the HumanLoopRequestSource field's value. -func (s *HumanLoopActivationConfig) SetHumanLoopRequestSource(v *HumanLoopRequestSource) *HumanLoopActivationConfig { - s.HumanLoopRequestSource = v - return s -} - // Describes the work to be performed by human workers. type HumanLoopConfig struct { _ struct{} `type:"structure"` @@ -28383,10 +28431,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClass // + // * arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:us-east-1:432418664414:function:PRE-SemanticSegmentation // // * arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClass // + // * arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:us-east-1:432418664414:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:us-east-1:432418664414:function:PRE-VerificationBoundingBox @@ -28403,10 +28455,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClass // + // * arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:us-east-2:266458841044:function:PRE-SemanticSegmentation // // * arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClass // + // * arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:us-east-2:266458841044:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:us-east-2:266458841044:function:PRE-VerificationBoundingBox @@ -28423,10 +28479,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClass // + // * arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:us-west-2:081040173940:function:PRE-SemanticSegmentation // // * arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClass // + // * arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:us-west-2:081040173940:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:us-west-2:081040173940:function:PRE-VerificationBoundingBox @@ -28443,10 +28503,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-ImageMultiClass // + // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-SemanticSegmentation // // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-TextMultiClass // + // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:ca-central-1:918755190332:function:PRE-VerificationBoundingBox @@ -28463,10 +28527,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClass // + // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-SemanticSegmentation // // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClass // + // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-VerificationBoundingBox @@ -28483,10 +28551,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-ImageMultiClass // + // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-SemanticSegmentation // // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-TextMultiClass // + // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:eu-west-2:487402164563:function:PRE-VerificationBoundingBox @@ -28503,10 +28575,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-ImageMultiClass // + // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-SemanticSegmentation // // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-TextMultiClass // + // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:eu-central-1:203001061592:function:PRE-VerificationBoundingBox @@ -28523,10 +28599,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClass // + // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-SemanticSegmentation // // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClass // + // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VerificationBoundingBox @@ -28543,10 +28623,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-ImageMultiClass // + // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-SemanticSegmentation // // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-TextMultiClass // + // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VerificationBoundingBox @@ -28563,10 +28647,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-ImageMultiClass // + // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-SemanticSegmentation // // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-TextMultiClass // + // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:ap-south-1:565803892007:function:PRE-VerificationBoundingBox @@ -28583,10 +28671,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-ImageMultiClass // + // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-SemanticSegmentation // // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-TextMultiClass // + // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VerificationBoundingBox @@ -28603,10 +28695,14 @@ type HumanTaskConfig struct { // // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-ImageMultiClass // + // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-ImageMultiClassMultiLabel + // // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-SemanticSegmentation // // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-TextMultiClass // + // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-TextMultiClassMultiLabel + // // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-NamedEntityRecognition // // * arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VerificationBoundingBox @@ -28626,7 +28722,7 @@ type HumanTaskConfig struct { // The length of time that a task remains available for labeling by human workers. // If you choose the Amazon Mechanical Turk workforce, the maximum is 12 hours - // (43200). The default value is 864000 seconds (1 day). For private and vendor + // (43200). The default value is 864000 seconds (10 days). For private and vendor // workforces, the maximum is as listed. TaskAvailabilityLifetimeInSeconds *int64 `min:"60" type:"integer"` @@ -28725,11 +28821,6 @@ func (s *HumanTaskConfig) Validate() error { invalidParams.AddNested("AnnotationConsolidationConfig", err.(request.ErrInvalidParams)) } } - if s.UiConfig != nil { - if err := s.UiConfig.Validate(); err != nil { - invalidParams.AddNested("UiConfig", err.(request.ErrInvalidParams)) - } - } if invalidParams.Len() > 0 { return invalidParams @@ -30300,7 +30391,8 @@ func (s *IntegerParameterRangeSpecification) SetMinValue(v string) *IntegerParam type JupyterServerAppSettings struct { _ struct{} `type:"structure"` - // The instance type and quantity. + // The default instance type and the Amazon Resource Name (ARN) of the SageMaker + // image created on the instance. DefaultResourceSpec *ResourceSpec `type:"structure"` } @@ -30324,7 +30416,8 @@ func (s *JupyterServerAppSettings) SetDefaultResourceSpec(v *ResourceSpec) *Jupy type KernelGatewayAppSettings struct { _ struct{} `type:"structure"` - // The instance type and quantity. + // The default instance type and the Amazon Resource Name (ARN) of the SageMaker + // image created on the instance. DefaultResourceSpec *ResourceSpec `type:"structure"` } @@ -36954,22 +37047,16 @@ func (s *MonitoringStoppingCondition) SetMaxRuntimeInSeconds(v int64) *Monitorin return s } -// Defines a list of NestedFilters objects. To satisfy the conditions specified -// in the NestedFilters call, a resource must satisfy the conditions of all -// of the filters. +// A list of nested Filter objects. A resource must satisfy the conditions of +// all filters to be included in the results returned from the Search API. // -// For example, you could define a NestedFilters using the training job's InputDataConfig -// property to filter on Channel objects. +// For example, to filter on a training job's InputDataConfig property with +// a specific channel name and S3Uri prefix, define the following filters: // -// A NestedFilters object contains multiple filters. For example, to find all -// training jobs whose name contains train and that have cat/data in their S3Uri -// (specified in InputDataConfig), you need to create a NestedFilters object -// that specifies the InputDataConfig property with the following Filter objects: +// * '{Name:"InputDataConfig.ChannelName", "Operator":"Equals", "Value":"train"}', // -// * '{Name:"InputDataConfig.ChannelName", "Operator":"EQUALS", "Value":"train"}', -// -// * '{Name:"InputDataConfig.DataSource.S3DataSource.S3Uri", "Operator":"CONTAINS", -// "Value":"cat/data"}' +// * '{Name:"InputDataConfig.DataSource.S3DataSource.S3Uri", "Operator":"Contains", +// "Value":"mybucket/catdata"}' type NestedFilters struct { _ struct{} `type:"structure"` @@ -37048,6 +37135,11 @@ func (s *NestedFilters) SetNestedPropertyName(v string) *NestedFilters { type NetworkConfig struct { _ struct{} `type:"structure"` + // Whether to encrypt all communications between distributed processing jobs. + // Choose True to encrypt communications. Encryption provides greater security + // for distributed processing jobs, but the processing might take longer. + EnableInterContainerTrafficEncryption *bool `type:"boolean"` + // Whether to allow inbound and outbound network calls to and from the containers // used for the processing job. EnableNetworkIsolation *bool `type:"boolean"` @@ -37085,6 +37177,12 @@ func (s *NetworkConfig) Validate() error { return nil } +// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. +func (s *NetworkConfig) SetEnableInterContainerTrafficEncryption(v bool) *NetworkConfig { + s.EnableInterContainerTrafficEncryption = &v + return s +} + // SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. func (s *NetworkConfig) SetEnableNetworkIsolation(v bool) *NetworkConfig { s.EnableNetworkIsolation = &v @@ -37918,6 +38016,232 @@ func (s *ProcessingInput) SetS3Input(v *ProcessingS3Input) *ProcessingInput { return s } +// An Amazon SageMaker processing job that is used to analyze data and evaluate +// models. For more information, see Process Data and Evaluate Models (https://docs.aws.amazon.com/sagemaker/latest/dg/processing-job.html). +type ProcessingJob struct { + _ struct{} `type:"structure"` + + // Configuration to run a processing job in a specified container image. + AppSpecification *AppSpecification `type:"structure"` + + // The Amazon Resource Name (ARN) of the AutoML job associated with this processing + // job. + AutoMLJobArn *string `min:"1" type:"string"` + + // The time the processing job was created. + CreationTime *time.Time `type:"timestamp"` + + // Sets the environment variables in the Docker container. + Environment map[string]*string `type:"map"` + + // A string, up to one KB in size, that contains metadata from the processing + // container when the processing job exits. + ExitMessage *string `type:"string"` + + // Configuration for the experiment. + ExperimentConfig *ExperimentConfig `type:"structure"` + + // A string, up to one KB in size, that contains the reason a processing job + // failed, if it failed. + FailureReason *string `type:"string"` + + // The time the processing job was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The ARN of a monitoring schedule for an endpoint associated with this processing + // job. + MonitoringScheduleArn *string `type:"string"` + + // Networking options for a job, such as network traffic encryption between + // containers, whether to allow inbound and outbound network calls to and from + // containers, and the VPC subnets and security groups to use for VPC-enabled + // jobs. + NetworkConfig *NetworkConfig `type:"structure"` + + // The time that the processing job ended. + ProcessingEndTime *time.Time `type:"timestamp"` + + // For each input, data is downloaded from S3 into the processing container + // before the processing job begins running if "S3InputMode" is set to File. + ProcessingInputs []*ProcessingInput `type:"list"` + + // The ARN of the processing job. + ProcessingJobArn *string `type:"string"` + + // The name of the processing job. + ProcessingJobName *string `min:"1" type:"string"` + + // The status of the processing job. + ProcessingJobStatus *string `type:"string" enum:"ProcessingJobStatus"` + + // The output configuration for the processing job. + ProcessingOutputConfig *ProcessingOutputConfig `type:"structure"` + + // Identifies the resources, ML compute instances, and ML storage volumes to + // deploy for a processing job. In distributed training, you specify more than + // one instance. + ProcessingResources *ProcessingResources `type:"structure"` + + // The time that the processing job started. + ProcessingStartTime *time.Time `type:"timestamp"` + + // The ARN of the role used to create the processing job. + RoleArn *string `min:"20" type:"string"` + + // Specifies a time limit for how long the processing job is allowed to run. + StoppingCondition *ProcessingStoppingCondition `type:"structure"` + + // An array of key-value pairs. For more information, see Using Cost Allocation + // Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` + + // The ARN of the training job associated with this processing job. + TrainingJobArn *string `type:"string"` +} + +// String returns the string representation +func (s ProcessingJob) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProcessingJob) GoString() string { + return s.String() +} + +// SetAppSpecification sets the AppSpecification field's value. +func (s *ProcessingJob) SetAppSpecification(v *AppSpecification) *ProcessingJob { + s.AppSpecification = v + return s +} + +// SetAutoMLJobArn sets the AutoMLJobArn field's value. +func (s *ProcessingJob) SetAutoMLJobArn(v string) *ProcessingJob { + s.AutoMLJobArn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ProcessingJob) SetCreationTime(v time.Time) *ProcessingJob { + s.CreationTime = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *ProcessingJob) SetEnvironment(v map[string]*string) *ProcessingJob { + s.Environment = v + return s +} + +// SetExitMessage sets the ExitMessage field's value. +func (s *ProcessingJob) SetExitMessage(v string) *ProcessingJob { + s.ExitMessage = &v + return s +} + +// SetExperimentConfig sets the ExperimentConfig field's value. +func (s *ProcessingJob) SetExperimentConfig(v *ExperimentConfig) *ProcessingJob { + s.ExperimentConfig = v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *ProcessingJob) SetFailureReason(v string) *ProcessingJob { + s.FailureReason = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *ProcessingJob) SetLastModifiedTime(v time.Time) *ProcessingJob { + s.LastModifiedTime = &v + return s +} + +// SetMonitoringScheduleArn sets the MonitoringScheduleArn field's value. +func (s *ProcessingJob) SetMonitoringScheduleArn(v string) *ProcessingJob { + s.MonitoringScheduleArn = &v + return s +} + +// SetNetworkConfig sets the NetworkConfig field's value. +func (s *ProcessingJob) SetNetworkConfig(v *NetworkConfig) *ProcessingJob { + s.NetworkConfig = v + return s +} + +// SetProcessingEndTime sets the ProcessingEndTime field's value. +func (s *ProcessingJob) SetProcessingEndTime(v time.Time) *ProcessingJob { + s.ProcessingEndTime = &v + return s +} + +// SetProcessingInputs sets the ProcessingInputs field's value. +func (s *ProcessingJob) SetProcessingInputs(v []*ProcessingInput) *ProcessingJob { + s.ProcessingInputs = v + return s +} + +// SetProcessingJobArn sets the ProcessingJobArn field's value. +func (s *ProcessingJob) SetProcessingJobArn(v string) *ProcessingJob { + s.ProcessingJobArn = &v + return s +} + +// SetProcessingJobName sets the ProcessingJobName field's value. +func (s *ProcessingJob) SetProcessingJobName(v string) *ProcessingJob { + s.ProcessingJobName = &v + return s +} + +// SetProcessingJobStatus sets the ProcessingJobStatus field's value. +func (s *ProcessingJob) SetProcessingJobStatus(v string) *ProcessingJob { + s.ProcessingJobStatus = &v + return s +} + +// SetProcessingOutputConfig sets the ProcessingOutputConfig field's value. +func (s *ProcessingJob) SetProcessingOutputConfig(v *ProcessingOutputConfig) *ProcessingJob { + s.ProcessingOutputConfig = v + return s +} + +// SetProcessingResources sets the ProcessingResources field's value. +func (s *ProcessingJob) SetProcessingResources(v *ProcessingResources) *ProcessingJob { + s.ProcessingResources = v + return s +} + +// SetProcessingStartTime sets the ProcessingStartTime field's value. +func (s *ProcessingJob) SetProcessingStartTime(v time.Time) *ProcessingJob { + s.ProcessingStartTime = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ProcessingJob) SetRoleArn(v string) *ProcessingJob { + s.RoleArn = &v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *ProcessingJob) SetStoppingCondition(v *ProcessingStoppingCondition) *ProcessingJob { + s.StoppingCondition = v + return s +} + +// SetTags sets the Tags field's value. +func (s *ProcessingJob) SetTags(v []*Tag) *ProcessingJob { + s.Tags = v + return s +} + +// SetTrainingJobArn sets the TrainingJobArn field's value. +func (s *ProcessingJob) SetTrainingJobArn(v string) *ProcessingJob { + s.TrainingJobArn = &v + return s +} + // Summary of information about a processing job. type ProcessingJobSummary struct { _ struct{} `type:"structure"` @@ -38193,7 +38517,7 @@ type ProcessingS3Input struct { // LocalPath is a required field LocalPath *string `type:"string" required:"true"` - // Whether to use Gzip compresion for Amazon S3 storage. + // Whether to use Gzip compression for Amazon S3 storage. S3CompressionType *string `type:"string" enum:"ProcessingS3CompressionType"` // Whether the data stored in Amazon S3 is FullyReplicated or ShardedByS3Key. @@ -38209,7 +38533,7 @@ type ProcessingS3Input struct { // S3DataType is a required field S3DataType *string `type:"string" required:"true" enum:"ProcessingS3DataType"` - // Wether to use File or Pipe input mode. In File mode, Amazon SageMaker copies + // Whether to use File or Pipe input mode. In File mode, Amazon SageMaker copies // the data from the input source onto the local Amazon Elastic Block Store // (Amazon EBS) volumes before starting your training algorithm. This is the // most commonly used input mode. In Pipe mode, Amazon SageMaker streams input @@ -38904,9 +39228,7 @@ type RenderUiTemplateInput struct { Task *RenderableTask `type:"structure" required:"true"` // A Template object containing the worker UI template to render. - // - // UiTemplate is a required field - UiTemplate *UiTemplate `type:"structure" required:"true"` + UiTemplate *UiTemplate `type:"structure"` } // String returns the string representation @@ -38931,9 +39253,6 @@ func (s *RenderUiTemplateInput) Validate() error { if s.Task == nil { invalidParams.Add(request.NewErrParamRequired("Task")) } - if s.UiTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("UiTemplate")) - } if s.Task != nil { if err := s.Task.Validate(); err != nil { invalidParams.AddNested("Task", err.(request.ErrInvalidParams)) @@ -39254,8 +39573,8 @@ func (s *ResourceConfig) SetVolumeSizeInGB(v int64) *ResourceConfig { // Resource being accessed is in use. type ResourceInUse struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -39272,17 +39591,17 @@ func (s ResourceInUse) GoString() string { func newErrorResourceInUse(v protocol.ResponseMetadata) error { return &ResourceInUse{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUse) Code() string { +func (s *ResourceInUse) Code() string { return "ResourceInUse" } // Message returns the exception's message. -func (s ResourceInUse) Message() string { +func (s *ResourceInUse) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39290,29 +39609,29 @@ func (s ResourceInUse) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUse) OrigErr() error { +func (s *ResourceInUse) OrigErr() error { return nil } -func (s ResourceInUse) Error() string { +func (s *ResourceInUse) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUse) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUse) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUse) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUse) RequestID() string { + return s.RespMetadata.RequestID } // You have exceeded an Amazon SageMaker resource limit. For example, you might // have too many training jobs created. type ResourceLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -39329,17 +39648,17 @@ func (s ResourceLimitExceeded) GoString() string { func newErrorResourceLimitExceeded(v protocol.ResponseMetadata) error { return &ResourceLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceeded) Code() string { +func (s *ResourceLimitExceeded) Code() string { return "ResourceLimitExceeded" } // Message returns the exception's message. -func (s ResourceLimitExceeded) Message() string { +func (s *ResourceLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39347,22 +39666,22 @@ func (s ResourceLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceeded) OrigErr() error { +func (s *ResourceLimitExceeded) OrigErr() error { return nil } -func (s ResourceLimitExceeded) Error() string { +func (s *ResourceLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the maximum number of training jobs and parallel training jobs @@ -39429,8 +39748,8 @@ func (s *ResourceLimits) SetMaxParallelTrainingJobs(v int64) *ResourceLimits { // Resource being access is not found. type ResourceNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -39447,17 +39766,17 @@ func (s ResourceNotFound) GoString() string { func newErrorResourceNotFound(v protocol.ResponseMetadata) error { return &ResourceNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFound) Code() string { +func (s *ResourceNotFound) Code() string { return "ResourceNotFound" } // Message returns the exception's message. -func (s ResourceNotFound) Message() string { +func (s *ResourceNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39465,33 +39784,35 @@ func (s ResourceNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFound) OrigErr() error { +func (s *ResourceNotFound) OrigErr() error { return nil } -func (s ResourceNotFound) Error() string { +func (s *ResourceNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFound) RequestID() string { + return s.RespMetadata.RequestID } -// The instance type and quantity. +// The instance type and the Amazon Resource Name (ARN) of the SageMaker image +// created on the instance. The ARN is stored as metadata in Amazon SageMaker +// Studio notebooks. type ResourceSpec struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the environment. - EnvironmentArn *string `type:"string"` - // The instance type. InstanceType *string `type:"string" enum:"AppInstanceType"` + + // The Amazon Resource Name (ARN) of the SageMaker image created on the instance. + SageMakerImageArn *string `type:"string"` } // String returns the string representation @@ -39504,23 +39825,27 @@ func (s ResourceSpec) GoString() string { return s.String() } -// SetEnvironmentArn sets the EnvironmentArn field's value. -func (s *ResourceSpec) SetEnvironmentArn(v string) *ResourceSpec { - s.EnvironmentArn = &v - return s -} - // SetInstanceType sets the InstanceType field's value. func (s *ResourceSpec) SetInstanceType(v string) *ResourceSpec { s.InstanceType = &v return s } -// The retention policy. +// SetSageMakerImageArn sets the SageMakerImageArn field's value. +func (s *ResourceSpec) SetSageMakerImageArn(v string) *ResourceSpec { + s.SageMakerImageArn = &v + return s +} + +// The retention policy for data stored on an Amazon Elastic File System (EFS) +// volume. type RetentionPolicy struct { _ struct{} `type:"structure"` - // The home Amazon Elastic File System (EFS). + // The default is Retain, which specifies to keep the data stored on the EFS + // volume. + // + // Specify Delete to delete the data stored on the EFS volume. HomeEfsFileSystem *string `type:"string" enum:"RetentionType"` } @@ -39850,13 +40175,12 @@ func (s *SearchExpression) SetSubExpressions(v []*SearchExpression) *SearchExpre type SearchInput struct { _ struct{} `type:"structure"` - // The maximum number of results to return in a SearchResponse. + // The maximum number of results to return. MaxResults *int64 `min:"1" type:"integer"` - // If more than MaxResults resource objects match the specified SearchExpression, - // the SearchResponse includes a NextToken. The NextToken can be passed to the - // next SearchRequest to continue retrieving results for the specified SearchExpression - // and Sort parameters. + // If more than MaxResults resources match the specified SearchExpression, the + // response includes a NextToken. The NextToken can be passed to the next SearchRequest + // to continue retrieving results. NextToken *string `type:"string"` // The name of the Amazon SageMaker resource to search for. @@ -39864,8 +40188,8 @@ type SearchInput struct { // Resource is a required field Resource *string `type:"string" required:"true" enum:"ResourceType"` - // A Boolean conditional statement. Resource objects must satisfy this condition - // to be included in search results. You must provide at least one subexpression, + // A Boolean conditional statement. Resources must satisfy this condition to + // be included in search results. You must provide at least one subexpression, // filter, or nested filter. The maximum number of recursive SubExpressions, // NestedFilters, and Filters that can be included in a SearchExpression object // is 50. @@ -39958,7 +40282,7 @@ type SearchOutput struct { // in the next request. NextToken *string `type:"string"` - // A list of SearchResult objects. + // A list of SearchRecord objects. Results []*SearchRecord `type:"list"` } @@ -39984,20 +40308,20 @@ func (s *SearchOutput) SetResults(v []*SearchRecord) *SearchOutput { return s } -// An individual search result record that contains a single resource object. +// A single resource returned as part of the Search API response. type SearchRecord struct { _ struct{} `type:"structure"` - // A summary of the properties of an experiment. + // The properties of an experiment. Experiment *Experiment `type:"structure"` - // A TrainingJob object that is returned as part of a Search request. + // The properties of a training job. TrainingJob *TrainingJob `type:"structure"` - // A summary of the properties of a trial. + // The properties of a trial. Trial *Trial `type:"structure"` - // A summary of the properties of a trial component. + // The properties of a trial component. TrialComponent *TrialComponent `type:"structure"` } @@ -41261,7 +41585,8 @@ func (s *Tag) SetValue(v string) *Tag { type TensorBoardAppSettings struct { _ struct{} `type:"structure"` - // The instance type and quantity. + // The default instance type and the Amazon Resource Name (ARN) of the SageMaker + // image created on the instance. DefaultResourceSpec *ResourceSpec `type:"structure"` } @@ -41368,7 +41693,7 @@ type TrainingJob struct { // When true, enables managed spot training using Amazon EC2 Spot instances // to run training jobs instead of on-demand instances. For more information, - // see model-managed-spot-training. + // see Managed Spot Training (https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.html). EnableManagedSpotTraining *bool `type:"boolean"` // If the TrainingJob was created with network isolation, the value is set to @@ -42834,7 +43159,7 @@ func (s *TransformS3DataSource) SetS3Uri(v string) *TransformS3DataSource { return s } -// A summary of the properties of a trial as returned by the Search API. +// The properties of a trial as returned by the Search API. type Trial struct { _ struct{} `type:"structure"` @@ -42953,8 +43278,7 @@ func (s *Trial) SetTrialName(v string) *Trial { return s } -// A summary of the properties of a trial component as returned by the Search -// API. +// The properties of a trial component as returned by the Search API. type TrialComponent struct { _ struct{} `type:"structure"` @@ -42996,10 +43320,10 @@ type TrialComponent struct { // not have any parents. Parents []*Parent `type:"list"` - // The source of the trial component. + // The Amazon Resource Name (ARN) and job type of the source of the component. Source *TrialComponentSource `type:"structure"` - // The source of the trial component.> + // Details of the source of the component. SourceDetail *TrialComponentSourceDetail `type:"structure"` // When the component started. @@ -43345,7 +43669,7 @@ type TrialComponentSimpleSummary struct { // The name of the trial component. TrialComponentName *string `min:"1" type:"string"` - // The source of the trial component. + // The Amazon Resource Name (ARN) and job type of the source of a trial component. TrialComponentSource *TrialComponentSource `type:"structure"` } @@ -43389,11 +43713,11 @@ func (s *TrialComponentSimpleSummary) SetTrialComponentSource(v *TrialComponentS return s } -// The source of the trial component. +// The Amazon Resource Name (ARN) and job type of the source of a trial component. type TrialComponentSource struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the source. + // The source ARN. // // SourceArn is a required field SourceArn *string `type:"string" required:"true"` @@ -43424,14 +43748,18 @@ func (s *TrialComponentSource) SetSourceType(v string) *TrialComponentSource { return s } -// Detailed information about the source of a trial component. +// Detailed information about the source of a trial component. Either ProcessingJob +// or TrainingJob is returned. type TrialComponentSourceDetail struct { _ struct{} `type:"structure"` + // Information about a processing job that's the source of a trial component. + ProcessingJob *ProcessingJob `type:"structure"` + // The Amazon Resource Name (ARN) of the source. SourceArn *string `type:"string"` - // Contains information about a training job. + // Information about a training job that's the source of a trial component. TrainingJob *TrainingJob `type:"structure"` } @@ -43445,6 +43773,12 @@ func (s TrialComponentSourceDetail) GoString() string { return s.String() } +// SetProcessingJob sets the ProcessingJob field's value. +func (s *TrialComponentSourceDetail) SetProcessingJob(v *ProcessingJob) *TrialComponentSourceDetail { + s.ProcessingJob = v + return s +} + // SetSourceArn sets the SourceArn field's value. func (s *TrialComponentSourceDetail) SetSourceArn(v string) *TrialComponentSourceDetail { s.SourceArn = &v @@ -43532,7 +43866,7 @@ type TrialComponentSummary struct { // The name of the trial component. TrialComponentName *string `min:"1" type:"string"` - // The source of the trial component. + // The Amazon Resource Name (ARN) and job type of the source of a trial component. TrialComponentSource *TrialComponentSource `type:"structure"` } @@ -43806,9 +44140,7 @@ type UiConfig struct { // The Amazon S3 bucket location of the UI template. For more information about // the contents of a UI template, see Creating Your Custom Labeling Task Template // (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html). - // - // UiTemplateS3Uri is a required field - UiTemplateS3Uri *string `type:"string" required:"true"` + UiTemplateS3Uri *string `type:"string"` } // String returns the string representation @@ -43821,19 +44153,6 @@ func (s UiConfig) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *UiConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UiConfig"} - if s.UiTemplateS3Uri == nil { - invalidParams.Add(request.NewErrParamRequired("UiTemplateS3Uri")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetUiTemplateS3Uri sets the UiTemplateS3Uri field's value. func (s *UiConfig) SetUiTemplateS3Uri(v string) *UiConfig { s.UiTemplateS3Uri = &v @@ -43886,7 +44205,7 @@ func (s *UiTemplate) SetContent(v string) *UiTemplate { type UiTemplateInfo struct { _ struct{} `type:"structure"` - // The SHA 256 hash that you used to create the request signature. + // The SHA-256 digest of the contents of the template. ContentSha256 *string `min:"1" type:"string"` // The URL for the user interface template. @@ -44088,12 +44407,11 @@ type UpdateEndpointInput struct { // EndpointName is a required field EndpointName *string `type:"string" required:"true"` - // When you are updating endpoint resources with RetainAllVariantProperties - // (https://docs.aws.amazon.com/sagemaker/latest/dg/API_UpdateEndpoint.html#SageMaker-UpdateEndpoint-request-RetainAllVariantProperties), + // When you are updating endpoint resources with UpdateEndpointInput$RetainAllVariantProperties, // whose value is set to true, ExcludeRetainedVariantProperties specifies the - // list of type VariantProperty (https://docs.aws.amazon.com/sagemaker/latest/dg/API_VariantProperty.html) - // to override with the values provided by EndpointConfig. If you don't specify - // a value for ExcludeAllVariantProperties, no variant properties are overridden. + // list of type VariantProperty to override with the values provided by EndpointConfig. + // If you don't specify a value for ExcludeAllVariantProperties, no variant + // properties are overridden. ExcludeRetainedVariantProperties []*VariantProperty `type:"list"` // When updating endpoint resources, enables or disables the retention of variant @@ -45487,9 +45805,8 @@ func (s *UserSettings) SetTensorBoardAppSettings(v *TensorBoardAppSettings) *Use // Specifies a production variant property type for an Endpoint. // -// If you are updating an endpoint with the RetainAllVariantProperties (https://docs.aws.amazon.com/sagemaker/latest/dg/API_UpdateEndpoint.html#SageMaker-UpdateEndpoint-request-RetainAllVariantProperties) -// option set to true, the VariantProperty objects listed in ExcludeRetainedVariantProperties -// (https://docs.aws.amazon.com/sagemaker/latest/dg/API_UpdateEndpoint.html#SageMaker-UpdateEndpoint-request-ExcludeRetainedVariantProperties) +// If you are updating an endpoint with the UpdateEndpointInput$RetainAllVariantProperties +// option set to true, the VariantProperty objects listed in UpdateEndpointInput$ExcludeRetainedVariantProperties // override the existing variant properties of the endpoint. type VariantProperty struct { _ struct{} `type:"structure"` @@ -45497,12 +45814,10 @@ type VariantProperty struct { // The type of variant property. The supported values are: // // * DesiredInstanceCount: Overrides the existing variant instance counts - // using the InitialInstanceCount (https://docs.aws.amazon.com/sagemaker/latest/dg/API_ProductionVariant.html#SageMaker-Type-ProductionVariant-InitialInstanceCount) - // values in the ProductionVariants (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html#SageMaker-CreateEndpointConfig-request-ProductionVariants). + // using the ProductionVariant$InitialInstanceCount values in the CreateEndpointConfigInput$ProductionVariants. // - // * DesiredWeight: Overrides the existing variant weights using the InitialVariantWeight - // (https://docs.aws.amazon.com/sagemaker/latest/dg/API_ProductionVariant.html#SageMaker-Type-ProductionVariant-InitialVariantWeight) - // values in the ProductionVariants (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html#SageMaker-CreateEndpointConfig-request-ProductionVariants). + // * DesiredWeight: Overrides the existing variant weights using the ProductionVariant$InitialVariantWeight + // values in the CreateEndpointConfigInput$ProductionVariants. // // * DataCaptureConfig: (Not currently supported.) // @@ -46333,9 +46648,6 @@ const ( // FlowDefinitionStatusDeleting is a FlowDefinitionStatus enum value FlowDefinitionStatusDeleting = "Deleting" - - // FlowDefinitionStatusDeleted is a FlowDefinitionStatus enum value - FlowDefinitionStatusDeleted = "Deleted" ) const ( @@ -46356,6 +46668,9 @@ const ( // FrameworkXgboost is a Framework enum value FrameworkXgboost = "XGBOOST" + + // FrameworkTflite is a Framework enum value + FrameworkTflite = "TFLITE" ) const ( @@ -46773,6 +47088,9 @@ const ( // OperatorNotExists is a Operator enum value OperatorNotExists = "NotExists" + + // OperatorIn is a Operator enum value + OperatorIn = "In" ) const ( @@ -47465,6 +47783,9 @@ const ( // TargetDeviceQcs603 is a TargetDevice enum value TargetDeviceQcs603 = "qcs603" + // TargetDeviceSitaraAm57x is a TargetDevice enum value + TargetDeviceSitaraAm57x = "sitara_am57x" + // TargetDeviceAmbaCv22 is a TargetDevice enum value TargetDeviceAmbaCv22 = "amba_cv22" ) @@ -47576,6 +47897,21 @@ const ( // TrainingInstanceTypeMlC518xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlC518xlarge = "ml.c5.18xlarge" + + // TrainingInstanceTypeMlC5nXlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC5nXlarge = "ml.c5n.xlarge" + + // TrainingInstanceTypeMlC5n2xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC5n2xlarge = "ml.c5n.2xlarge" + + // TrainingInstanceTypeMlC5n4xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC5n4xlarge = "ml.c5n.4xlarge" + + // TrainingInstanceTypeMlC5n9xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC5n9xlarge = "ml.c5n.9xlarge" + + // TrainingInstanceTypeMlC5n18xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC5n18xlarge = "ml.c5n.18xlarge" ) const ( @@ -47723,6 +48059,12 @@ const ( // TrialComponentPrimaryStatusFailed is a TrialComponentPrimaryStatus enum value TrialComponentPrimaryStatusFailed = "Failed" + + // TrialComponentPrimaryStatusStopping is a TrialComponentPrimaryStatus enum value + TrialComponentPrimaryStatusStopping = "Stopping" + + // TrialComponentPrimaryStatusStopped is a TrialComponentPrimaryStatus enum value + TrialComponentPrimaryStatusStopped = "Stopped" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go index 38b7a815f6d..0dda1b81f74 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go @@ -5,6 +5,12 @@ // // Provides APIs for creating and managing Amazon SageMaker resources. // +// Other Resources: +// +// * Amazon SageMaker Developer Guide (https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html#first-time-user) +// +// * Amazon Augmented AI Runtime API Reference (https://docs.aws.amazon.com/augmented-ai/2019-11-07/APIReference/Welcome.html) +// // See https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24 for more information on this service. // // See sagemaker package documentation for more information. diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 5362b3503f1..7dfecc65803 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -2874,8 +2874,8 @@ func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { // Secrets Manager can't decrypt the protected secret text using the provided // KMS key. type DecryptionFailure struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2892,17 +2892,17 @@ func (s DecryptionFailure) GoString() string { func newErrorDecryptionFailure(v protocol.ResponseMetadata) error { return &DecryptionFailure{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DecryptionFailure) Code() string { +func (s *DecryptionFailure) Code() string { return "DecryptionFailure" } // Message returns the exception's message. -func (s DecryptionFailure) Message() string { +func (s *DecryptionFailure) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2910,22 +2910,22 @@ func (s DecryptionFailure) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DecryptionFailure) OrigErr() error { +func (s *DecryptionFailure) OrigErr() error { return nil } -func (s DecryptionFailure) Error() string { +func (s *DecryptionFailure) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DecryptionFailure) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DecryptionFailure) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DecryptionFailure) RequestID() string { - return s.respMetadata.RequestID +func (s *DecryptionFailure) RequestID() string { + return s.RespMetadata.RequestID } type DeleteResourcePolicyInput struct { @@ -3371,8 +3371,8 @@ func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *De // 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). type EncryptionFailure struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3389,17 +3389,17 @@ func (s EncryptionFailure) GoString() string { func newErrorEncryptionFailure(v protocol.ResponseMetadata) error { return &EncryptionFailure{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EncryptionFailure) Code() string { +func (s *EncryptionFailure) Code() string { return "EncryptionFailure" } // Message returns the exception's message. -func (s EncryptionFailure) Message() string { +func (s *EncryptionFailure) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3407,22 +3407,22 @@ func (s EncryptionFailure) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EncryptionFailure) OrigErr() error { +func (s *EncryptionFailure) OrigErr() error { return nil } -func (s EncryptionFailure) Error() string { +func (s *EncryptionFailure) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EncryptionFailure) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EncryptionFailure) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EncryptionFailure) RequestID() string { - return s.respMetadata.RequestID +func (s *EncryptionFailure) RequestID() string { + return s.RespMetadata.RequestID } type GetRandomPasswordInput struct { @@ -3865,8 +3865,8 @@ func (s *GetSecretValueOutput) SetVersionStages(v []*string) *GetSecretValueOutp // An error occurred on the server side. type InternalServiceError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3883,17 +3883,17 @@ func (s InternalServiceError) GoString() string { func newErrorInternalServiceError(v protocol.ResponseMetadata) error { return &InternalServiceError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceError) Code() string { +func (s *InternalServiceError) Code() string { return "InternalServiceError" } // Message returns the exception's message. -func (s InternalServiceError) Message() string { +func (s *InternalServiceError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3901,28 +3901,28 @@ func (s InternalServiceError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceError) OrigErr() error { +func (s *InternalServiceError) OrigErr() error { return nil } -func (s InternalServiceError) Error() string { +func (s *InternalServiceError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceError) RequestID() string { + return s.RespMetadata.RequestID } // You provided an invalid NextToken value. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3939,17 +3939,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3957,28 +3957,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // You provided an invalid value for a parameter. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3995,17 +3995,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4013,22 +4013,22 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // You provided a parameter value that is not valid for the current state of @@ -4043,8 +4043,8 @@ func (s InvalidParameterException) RequestID() string { // Lambda function ARN configured and you didn't include such an ARN as a // parameter in this call. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4061,17 +4061,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4079,29 +4079,29 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The request failed because it would exceed one of the Secrets Manager internal // limits. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4118,17 +4118,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4136,22 +4136,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListSecretVersionIdsInput struct { @@ -4417,8 +4417,8 @@ func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutp // The policy document that you provided isn't valid. type MalformedPolicyDocumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4435,17 +4435,17 @@ func (s MalformedPolicyDocumentException) GoString() string { func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error { return &MalformedPolicyDocumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MalformedPolicyDocumentException) Code() string { +func (s *MalformedPolicyDocumentException) Code() string { return "MalformedPolicyDocumentException" } // Message returns the exception's message. -func (s MalformedPolicyDocumentException) Message() string { +func (s *MalformedPolicyDocumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4453,28 +4453,28 @@ func (s MalformedPolicyDocumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MalformedPolicyDocumentException) OrigErr() error { +func (s *MalformedPolicyDocumentException) OrigErr() error { return nil } -func (s MalformedPolicyDocumentException) Error() string { +func (s *MalformedPolicyDocumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MalformedPolicyDocumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MalformedPolicyDocumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MalformedPolicyDocumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *MalformedPolicyDocumentException) RequestID() string { + return s.RespMetadata.RequestID } // The request failed because you did not complete all the prerequisite steps. type PreconditionNotMetException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4491,17 +4491,17 @@ func (s PreconditionNotMetException) GoString() string { func newErrorPreconditionNotMetException(v protocol.ResponseMetadata) error { return &PreconditionNotMetException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PreconditionNotMetException) Code() string { +func (s *PreconditionNotMetException) Code() string { return "PreconditionNotMetException" } // Message returns the exception's message. -func (s PreconditionNotMetException) Message() string { +func (s *PreconditionNotMetException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4509,22 +4509,22 @@ func (s PreconditionNotMetException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PreconditionNotMetException) OrigErr() error { +func (s *PreconditionNotMetException) OrigErr() error { return nil } -func (s PreconditionNotMetException) Error() string { +func (s *PreconditionNotMetException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PreconditionNotMetException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PreconditionNotMetException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PreconditionNotMetException) RequestID() string { - return s.respMetadata.RequestID +func (s *PreconditionNotMetException) RequestID() string { + return s.RespMetadata.RequestID } type PutResourcePolicyInput struct { @@ -4856,8 +4856,8 @@ func (s *PutSecretValueOutput) SetVersionStages(v []*string) *PutSecretValueOutp // A resource with the ID you requested already exists. type ResourceExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4874,17 +4874,17 @@ func (s ResourceExistsException) GoString() string { func newErrorResourceExistsException(v protocol.ResponseMetadata) error { return &ResourceExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceExistsException) Code() string { +func (s *ResourceExistsException) Code() string { return "ResourceExistsException" } // Message returns the exception's message. -func (s ResourceExistsException) Message() string { +func (s *ResourceExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4892,28 +4892,28 @@ func (s ResourceExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceExistsException) OrigErr() error { +func (s *ResourceExistsException) OrigErr() error { return nil } -func (s ResourceExistsException) Error() string { +func (s *ResourceExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceExistsException) RequestID() string { + return s.RespMetadata.RequestID } // We can't find the resource that you asked for. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4930,17 +4930,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4948,22 +4948,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type RestoreSecretInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go b/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go index 7f62ce48eba..b5119d0d2d8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/securityhub/api.go @@ -349,6 +349,28 @@ func (c *SecurityHub) BatchImportFindingsRequest(input *BatchImportFindingsInput // The maximum allowed size for a finding is 240 Kb. An error is returned for // any finding larger than 240 Kb. // +// After a finding is created, BatchImportFindings cannot be used to update +// the following finding fields and objects, which Security Hub customers use +// to manage their investigation workflow. +// +// * Confidence +// +// * Criticality +// +// * Note +// +// * RelatedFindings +// +// * Severity +// +// * Types +// +// * UserDefinedFields +// +// * VerificationState +// +// * Workflow +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -393,6 +415,125 @@ func (c *SecurityHub) BatchImportFindingsWithContext(ctx aws.Context, input *Bat return out, req.Send() } +const opBatchUpdateFindings = "BatchUpdateFindings" + +// BatchUpdateFindingsRequest generates a "aws/request.Request" representing the +// client's request for the BatchUpdateFindings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchUpdateFindings for more information on using the BatchUpdateFindings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchUpdateFindingsRequest method. +// req, resp := client.BatchUpdateFindingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchUpdateFindings +func (c *SecurityHub) BatchUpdateFindingsRequest(input *BatchUpdateFindingsInput) (req *request.Request, output *BatchUpdateFindingsOutput) { + op := &request.Operation{ + Name: opBatchUpdateFindings, + HTTPMethod: "PATCH", + HTTPPath: "/findings/batchupdate", + } + + if input == nil { + input = &BatchUpdateFindingsInput{} + } + + output = &BatchUpdateFindingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchUpdateFindings API operation for AWS SecurityHub. +// +// Used by Security Hub customers to update information about their investigation +// into a finding. Requested by master accounts or member accounts. Master accounts +// can update findings for their account and their member accounts. Member accounts +// can update findings for their account. +// +// Updates from BatchUpdateFindings do not affect the value of UpdatedAt for +// a finding. +// +// Master accounts can use BatchUpdateFindings to update the following finding +// fields and objects. +// +// * Confidence +// +// * Criticality +// +// * Note +// +// * RelatedFindings +// +// * Severity +// +// * Types +// +// * UserDefinedFields +// +// * VerificationState +// +// * Workflow +// +// Member accounts can only use BatchUpdateFindings to update the Note object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS SecurityHub's +// API operation BatchUpdateFindings for usage and error information. +// +// Returned Error Types: +// * InternalException +// Internal server error. +// +// * InvalidInputException +// The request was rejected because you supplied an invalid or out-of-range +// value for an input parameter. +// +// * LimitExceededException +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * InvalidAccessException +// AWS Security Hub isn't enabled for the account used to make this request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/BatchUpdateFindings +func (c *SecurityHub) BatchUpdateFindings(input *BatchUpdateFindingsInput) (*BatchUpdateFindingsOutput, error) { + req, out := c.BatchUpdateFindingsRequest(input) + return out, req.Send() +} + +// BatchUpdateFindingsWithContext is the same as BatchUpdateFindings with the addition of +// the ability to pass a context and additional request options. +// +// See BatchUpdateFindings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecurityHub) BatchUpdateFindingsWithContext(ctx aws.Context, input *BatchUpdateFindingsInput, opts ...request.Option) (*BatchUpdateFindingsOutput, error) { + req, out := c.BatchUpdateFindingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateActionTarget = "CreateActionTarget" // CreateActionTargetRequest generates a "aws/request.Request" representing the @@ -640,10 +781,10 @@ func (c *SecurityHub) CreateMembersRequest(input *CreateMembersInput) (req *requ // Security Hub and become member accounts in Security Hub. // // If the account owner accepts the invitation, the account becomes a member -// account in Security Hub, and a permission policy is added that permits the -// master account to view the findings generated in the member account. When -// Security Hub is enabled in the invited account, findings start to be sent -// to both the member and master accounts. +// account in Security Hub. A permissions policy is added that permits the master +// account to view the findings generated in the member account. When Security +// Hub is enabled in the invited account, findings start to be sent to both +// the member and master accounts. // // To remove the association between the master and member accounts, use the // DisassociateFromMasterAccount or DisassociateMembers operation. @@ -2277,7 +2418,7 @@ func (c *SecurityHub) EnableImportFindingsForProductRequest(input *EnableImportF // Enables the integration of a partner product with Security Hub. Integrated // products send findings to Security Hub. // -// When you enable a product integration, a permission policy that grants permission +// When you enable a product integration, a permissions policy that grants permission // for the product to send findings to Security Hub is applied. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2376,14 +2517,24 @@ func (c *SecurityHub) EnableSecurityHubRequest(input *EnableSecurityHubInput) (r // you specify in the request. // // When you enable Security Hub, you grant to Security Hub the permissions necessary -// to gather findings from AWS Config, Amazon GuardDuty, Amazon Inspector, and -// Amazon Macie. +// to gather findings from other services that are integrated with Security +// Hub. // // When you use the EnableSecurityHub operation to enable Security Hub, you -// also automatically enable the CIS AWS Foundations standard. You do not enable -// the Payment Card Industry Data Security Standard (PCI DSS) standard. To enable -// a standard, use the BatchEnableStandards operation. To disable a standard, -// use the BatchDisableStandards operation. +// also automatically enable the following standards. +// +// * CIS AWS Foundations +// +// * AWS Foundational Security Best Practices +// +// You do not enable the Payment Card Industry Data Security Standard (PCI DSS) +// standard. +// +// To not enable the automatically enabled standards, set EnableDefaultStandards +// to false. +// +// After you enable Security Hub, to enable a standard, use the BatchEnableStandards +// operation. To disable a standard, use the BatchDisableStandards operation. // // To learn more, see Setting Up AWS Security Hub (https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-settingup.html) // in the AWS Security Hub User Guide. @@ -4195,6 +4346,8 @@ func (c *SecurityHub) UpdateFindingsRequest(input *UpdateFindingsInput) (req *re // UpdateFindings API operation for AWS SecurityHub. // +// UpdateFindings is deprecated. Instead of UpdateFindings, use BatchUpdateFindings. +// // Updates the Note and RecordState of the Security Hub-aggregated findings // that the filter attributes specify. Any member account that can view the // finding also sees the update to the finding. @@ -4499,8 +4652,8 @@ func (s AcceptInvitationOutput) GoString() string { // You don't have permission to perform the action specified in the request. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -4519,17 +4672,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4537,22 +4690,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // The details of an AWS account. @@ -4801,8 +4954,8 @@ func (s *AwsCloudFrontDistributionLogging) SetPrefix(v string) *AwsCloudFrontDis } // A complex type that describes the Amazon S3 bucket, HTTP server (for example, -// a web server), Amazon MediaStore, or other server from which CloudFront gets -// your files. +// a web server), Amazon Elemental MediaStore, or other server from which CloudFront +// gets your files. type AwsCloudFrontDistributionOriginItem struct { _ struct{} `type:"structure"` @@ -4973,20 +5126,20 @@ type AwsCodeBuildProjectEnvironment struct { // The type of build environment to use for related builds. // - // The environment type ARM_CONTAINER is available only in regions US East (N. + // The environment type ARM_CONTAINER is available only in Regions US East (N. // Virginia), US East (Ohio), US West (Oregon), Europe (Ireland), Asia Pacific // (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Sydney), and Europe (Frankfurt). // // The environment type LINUX_CONTAINER with compute type build.general1.2xlarge - // is available only in regions US East (N. Virginia), US East (N. Virginia), + // is available only in Regions US East (N. Virginia), US East (N. Virginia), // US West (Oregon), Canada (Central), Europe (Ireland), Europe (London), Europe // (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), // Asia Pacific (Sydney), China (Beijing), and China (Ningxia). // - // The environment type LINUX_GPU_CONTAINER is available only in regions US + // The environment type LINUX_GPU_CONTAINER is available only in Regions US // East (N. Virginia), US East (N. Virginia), US West (Oregon), Canada (Central), // Europe (Ireland), Europe (London), Europe (Frankfurt), Asia Pacific (Tokyo), - // Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney) , China + // Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), China // (Beijing), and China (Ningxia). // // Valid values: WINDOWS_CONTAINER | LINUX_CONTAINER | LINUX_GPU_CONTAINER | @@ -5087,7 +5240,7 @@ type AwsCodeBuildProjectSource struct { // uses the settings in a pipeline's source action instead of this value. // // * For source code in an AWS CodeCommit repository, the HTTPS clone URL - // to the repository that contains the source code and the buildspec file + // to the repository that contains the source code and the build spec file // (for example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name // ). // @@ -5096,10 +5249,10 @@ type AwsCodeBuildProjectSource struct { // The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/). // // * For source code in a GitHub repository, the HTTPS clone URL to the repository - // that contains the source and the buildspec file. + // that contains the source and the build spec file. // // * For source code in a Bitbucket repository, the HTTPS clone URL to the - // repository that contains the source and the buildspec file. + // repository that contains the source and the build spec file. Location *string `type:"string"` // The type of repository that contains the source code to be built. Valid values @@ -5630,9 +5783,9 @@ func (s *AwsEc2SecurityGroupIpPermission) SetUserIdGroupPairs(v []*AwsEc2Securit type AwsEc2SecurityGroupIpRange struct { _ struct{} `type:"structure"` - // The IPv4 CIDR range. You can either specify either a CIDR range or a source - // security group, but not both. To specify a single IPv4 address, use the /32 - // prefix length. + // The IPv4 CIDR range. You can specify either a CIDR range or a source security + // group, but not both. To specify a single IPv4 address, use the /32 prefix + // length. CidrIp *string `type:"string"` } @@ -5656,9 +5809,9 @@ func (s *AwsEc2SecurityGroupIpRange) SetCidrIp(v string) *AwsEc2SecurityGroupIpR type AwsEc2SecurityGroupIpv6Range struct { _ struct{} `type:"structure"` - // The IPv6 CIDR range. You can either specify either a CIDR range or a source - // security group, but not both. To specify a single IPv6 address, use the /128 - // prefix length. + // The IPv6 CIDR range. You can specify either a CIDR range or a source security + // group, but not both. To specify a single IPv6 address, use the /128 prefix + // length. CidrIpv6 *string `type:"string"` } @@ -6814,7 +6967,7 @@ func (s *AwsLambdaFunctionVpcConfig) SetVpcId(v string) *AwsLambdaFunctionVpcCon type AwsLambdaLayerVersionDetails struct { _ struct{} `type:"structure"` - // The layer's compatible runtimes. Maximum number of 5 items. + // The layer's compatible runtimes. Maximum number of five items. // // Valid values: nodejs10.x | nodejs12.x | java8 | java11 | python2.7 | python3.6 // | python3.7 | python3.8 | dotnetcore1.0 | dotnetcore2.1 | go1.x | ruby2.5 @@ -6870,12 +7023,12 @@ type AwsRdsDbInstanceAssociatedRole struct { // Describes the state of the association between the IAM role and the DB instance. // The Status property returns one of the following values: // - // * ACTIVE - the IAM role ARN is associated with the DB instance and can + // * ACTIVE - The IAM role ARN is associated with the DB instance and can // be used to access other AWS services on your behalf. // - // * PENDING - the IAM role ARN is being associated with the DB instance. + // * PENDING - The IAM role ARN is being associated with the DB instance. // - // * INVALID - the IAM role ARN is associated with the DB instance, but the + // * INVALID - The IAM role ARN is associated with the DB instance. But the // DB instance is unable to assume the IAM role in order to access other // AWS services on your behalf. Status *string `type:"string"` @@ -7211,11 +7364,17 @@ func (s *AwsRdsDbInstanceVpcSecurityGroup) SetVpcSecurityGroupId(v string) *AwsR type AwsS3BucketDetails struct { _ struct{} `type:"structure"` + // The date and time when the S3 bucket was created. + CreatedAt *string `type:"string"` + // The canonical user ID of the owner of the S3 bucket. OwnerId *string `type:"string"` // The display name of the owner of the S3 bucket. OwnerName *string `type:"string"` + + // The encryption rules that are applied to the S3 bucket. + ServerSideEncryptionConfiguration *AwsS3BucketServerSideEncryptionConfiguration `type:"structure"` } // String returns the string representation @@ -7228,6 +7387,12 @@ func (s AwsS3BucketDetails) GoString() string { return s.String() } +// SetCreatedAt sets the CreatedAt field's value. +func (s *AwsS3BucketDetails) SetCreatedAt(v string) *AwsS3BucketDetails { + s.CreatedAt = &v + return s +} + // SetOwnerId sets the OwnerId field's value. func (s *AwsS3BucketDetails) SetOwnerId(v string) *AwsS3BucketDetails { s.OwnerId = &v @@ -7240,6 +7405,168 @@ func (s *AwsS3BucketDetails) SetOwnerName(v string) *AwsS3BucketDetails { return s } +// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value. +func (s *AwsS3BucketDetails) SetServerSideEncryptionConfiguration(v *AwsS3BucketServerSideEncryptionConfiguration) *AwsS3BucketDetails { + s.ServerSideEncryptionConfiguration = v + return s +} + +// Specifies the default server-side encryption to apply to new objects in the +// bucket. +type AwsS3BucketServerSideEncryptionByDefault struct { + _ struct{} `type:"structure"` + + // AWS KMS customer master key (CMK) ID to use for the default encryption. + KMSMasterKeyID *string `type:"string"` + + // Server-side encryption algorithm to use for the default encryption. + SSEAlgorithm *string `type:"string"` +} + +// String returns the string representation +func (s AwsS3BucketServerSideEncryptionByDefault) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsS3BucketServerSideEncryptionByDefault) GoString() string { + return s.String() +} + +// SetKMSMasterKeyID sets the KMSMasterKeyID field's value. +func (s *AwsS3BucketServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *AwsS3BucketServerSideEncryptionByDefault { + s.KMSMasterKeyID = &v + return s +} + +// SetSSEAlgorithm sets the SSEAlgorithm field's value. +func (s *AwsS3BucketServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *AwsS3BucketServerSideEncryptionByDefault { + s.SSEAlgorithm = &v + return s +} + +// The encryption configuration for the S3 bucket. +type AwsS3BucketServerSideEncryptionConfiguration struct { + _ struct{} `type:"structure"` + + // The encryption rules that are applied to the S3 bucket. + Rules []*AwsS3BucketServerSideEncryptionRule `type:"list"` +} + +// String returns the string representation +func (s AwsS3BucketServerSideEncryptionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsS3BucketServerSideEncryptionConfiguration) GoString() string { + return s.String() +} + +// SetRules sets the Rules field's value. +func (s *AwsS3BucketServerSideEncryptionConfiguration) SetRules(v []*AwsS3BucketServerSideEncryptionRule) *AwsS3BucketServerSideEncryptionConfiguration { + s.Rules = v + return s +} + +// An encryption rule to apply to the S3 bucket. +type AwsS3BucketServerSideEncryptionRule struct { + _ struct{} `type:"structure"` + + // Specifies the default server-side encryption to apply to new objects in the + // bucket. If a PUT object request doesn't specify any server-side encryption, + // this default encryption is applied. + ApplyServerSideEncryptionByDefault *AwsS3BucketServerSideEncryptionByDefault `type:"structure"` +} + +// String returns the string representation +func (s AwsS3BucketServerSideEncryptionRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsS3BucketServerSideEncryptionRule) GoString() string { + return s.String() +} + +// SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value. +func (s *AwsS3BucketServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *AwsS3BucketServerSideEncryptionByDefault) *AwsS3BucketServerSideEncryptionRule { + s.ApplyServerSideEncryptionByDefault = v + return s +} + +// Details about an Amazon S3 object. +type AwsS3ObjectDetails struct { + _ struct{} `type:"structure"` + + // A standard MIME type describing the format of the object data. + ContentType *string `type:"string"` + + // The opaque identifier assigned by a web server to a specific version of a + // resource found at a URL. + ETag *string `type:"string"` + + // The date and time when the object was last modified. + LastModified *string `type:"string"` + + // The identifier of the AWS Key Management Service (AWS KMS) symmetric customer + // managed customer master key (CMK) that was used for the object. + SSEKMSKeyId *string `type:"string"` + + // If the object is stored using server-side encryption, the value of the server-side + // encryption algorithm used when storing this object in Amazon S3. + ServerSideEncryption *string `type:"string"` + + // The version of the object. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s AwsS3ObjectDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsS3ObjectDetails) GoString() string { + return s.String() +} + +// SetContentType sets the ContentType field's value. +func (s *AwsS3ObjectDetails) SetContentType(v string) *AwsS3ObjectDetails { + s.ContentType = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *AwsS3ObjectDetails) SetETag(v string) *AwsS3ObjectDetails { + s.ETag = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *AwsS3ObjectDetails) SetLastModified(v string) *AwsS3ObjectDetails { + s.LastModified = &v + return s +} + +// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. +func (s *AwsS3ObjectDetails) SetSSEKMSKeyId(v string) *AwsS3ObjectDetails { + s.SSEKMSKeyId = &v + return s +} + +// SetServerSideEncryption sets the ServerSideEncryption field's value. +func (s *AwsS3ObjectDetails) SetServerSideEncryption(v string) *AwsS3ObjectDetails { + s.ServerSideEncryption = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *AwsS3ObjectDetails) SetVersionId(v string) *AwsS3ObjectDetails { + s.VersionId = &v + return s +} + // Provides consistent format for the contents of the Security Hub-aggregated // findings. AwsSecurityFinding format enables you to share findings between // AWS security services and third-party solutions, and security standards checks. @@ -7292,7 +7619,7 @@ type AwsSecurityFinding struct { // The identifier for the solution-specific component (a discrete unit of logic) // that generated a finding. In various security-findings providers' solutions, - // this generator can be called a rule, a check, a detector, a plug-in, etc. + // this generator can be called a rule, a check, a detector, a plugin, etc. // // GeneratorId is a required field GeneratorId *string `type:"string" required:"true"` @@ -7319,9 +7646,9 @@ type AwsSecurityFinding struct { // The details of process-related information about a finding. Process *ProcessDetails `type:"structure"` - // The ARN generated by Security Hub that uniquely identifies a third-party - // company (security-findings provider) after this provider's product (solution - // that generates findings) is registered with Security Hub. + // The ARN generated by Security Hub that uniquely identifies a product that + // generates findings. This can be the ARN for a third-party product that is + // integrated with Security Hub, or the ARN for a custom integration. // // ProductArn is a required field ProductArn *string `type:"string" required:"true"` @@ -7391,8 +7718,11 @@ type AwsSecurityFinding struct { // Indicates the veracity of a finding. VerificationState *string `type:"string" enum:"VerificationState"` + // Provides information about the status of the investigation into a finding. + Workflow *Workflow `type:"structure"` + // The workflow state of a finding. - WorkflowState *string `type:"string" enum:"WorkflowState"` + WorkflowState *string `deprecated:"true" type:"string" enum:"WorkflowState"` } // String returns the string representation @@ -7444,6 +7774,11 @@ func (s *AwsSecurityFinding) Validate() error { if s.UpdatedAt == nil { invalidParams.Add(request.NewErrParamRequired("UpdatedAt")) } + if s.Compliance != nil { + if err := s.Compliance.Validate(); err != nil { + invalidParams.AddNested("Compliance", err.(request.ErrInvalidParams)) + } + } if s.Malware != nil { for i, v := range s.Malware { if v == nil { @@ -7479,11 +7814,6 @@ func (s *AwsSecurityFinding) Validate() error { } } } - if s.Severity != nil { - if err := s.Severity.Validate(); err != nil { - invalidParams.AddNested("Severity", err.(request.ErrInvalidParams)) - } - } if invalidParams.Len() > 0 { return invalidParams @@ -7665,6 +7995,12 @@ func (s *AwsSecurityFinding) SetVerificationState(v string) *AwsSecurityFinding return s } +// SetWorkflow sets the Workflow field's value. +func (s *AwsSecurityFinding) SetWorkflow(v *Workflow) *AwsSecurityFinding { + s.Workflow = v + return s +} + // SetWorkflowState sets the WorkflowState field's value. func (s *AwsSecurityFinding) SetWorkflowState(v string) *AwsSecurityFinding { s.WorkflowState = &v @@ -7715,7 +8051,7 @@ type AwsSecurityFindingFilters struct { // The identifier for the solution-specific component (a discrete unit of logic) // that generated a finding. In various security-findings providers' solutions, - // this generator can be called a rule, a check, a detector, a plug-in, etc. + // this generator can be called a rule, a check, a detector, a plugin, etc. GeneratorId []*StringFilter `type:"list"` // The security findings provider-specific identifier for a finding. @@ -7952,6 +8288,21 @@ type AwsSecurityFindingFilters struct { // The workflow state of a finding. WorkflowState []*StringFilter `type:"list"` + + // The status of the investigation into a finding. Allowed values are the following. + // + // * NEW - The initial state of a finding, before it is reviewed. + // + // * NOTIFIED - Indicates that the resource owner has been notified about + // the security issue. Used when the initial reviewer is not the resource + // owner, and needs intervention from the resource owner. + // + // * SUPPRESSED - The finding will not be reviewed again and will not be + // acted upon. + // + // * RESOLVED - The finding was reviewed and remediated and is now considered + // resolved. + WorkflowStatus []*StringFilter `type:"list"` } // String returns the string representation @@ -8462,43 +8813,104 @@ func (s *AwsSecurityFindingFilters) SetWorkflowState(v []*StringFilter) *AwsSecu return s } -// A wrapper type for the topic's Amazon Resource Name (ARN). -type AwsSnsTopicDetails struct { - _ struct{} `type:"structure"` - - // The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom - // CMK. - KmsMasterKeyId *string `type:"string"` +// SetWorkflowStatus sets the WorkflowStatus field's value. +func (s *AwsSecurityFindingFilters) SetWorkflowStatus(v []*StringFilter) *AwsSecurityFindingFilters { + s.WorkflowStatus = v + return s +} - // The subscription's owner. - Owner *string `type:"string"` +// Identifies a finding to update using BatchUpdateFindings. +type AwsSecurityFindingIdentifier struct { + _ struct{} `type:"structure"` - // Subscription is an embedded property that describes the subscription endpoints - // of an Amazon SNS topic. - Subscription []*AwsSnsTopicSubscription `type:"list"` + // The identifier of the finding that was specified by the finding provider. + // + // Id is a required field + Id *string `type:"string" required:"true"` - // The name of the topic. - TopicName *string `type:"string"` + // The ARN generated by Security Hub that uniquely identifies a product that + // generates findings. This can be the ARN for a third-party product that is + // integrated with Security Hub, or the ARN for a custom integration. + // + // ProductArn is a required field + ProductArn *string `type:"string" required:"true"` } // String returns the string representation -func (s AwsSnsTopicDetails) String() string { +func (s AwsSecurityFindingIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AwsSnsTopicDetails) GoString() string { +func (s AwsSecurityFindingIdentifier) GoString() string { return s.String() } -// SetKmsMasterKeyId sets the KmsMasterKeyId field's value. -func (s *AwsSnsTopicDetails) SetKmsMasterKeyId(v string) *AwsSnsTopicDetails { - s.KmsMasterKeyId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsSecurityFindingIdentifier) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsSecurityFindingIdentifier"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.ProductArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProductArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetOwner sets the Owner field's value. -func (s *AwsSnsTopicDetails) SetOwner(v string) *AwsSnsTopicDetails { +// SetId sets the Id field's value. +func (s *AwsSecurityFindingIdentifier) SetId(v string) *AwsSecurityFindingIdentifier { + s.Id = &v + return s +} + +// SetProductArn sets the ProductArn field's value. +func (s *AwsSecurityFindingIdentifier) SetProductArn(v string) *AwsSecurityFindingIdentifier { + s.ProductArn = &v + return s +} + +// A wrapper type for the topic's Amazon Resource Name (ARN). +type AwsSnsTopicDetails struct { + _ struct{} `type:"structure"` + + // The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom + // CMK. + KmsMasterKeyId *string `type:"string"` + + // The subscription's owner. + Owner *string `type:"string"` + + // Subscription is an embedded property that describes the subscription endpoints + // of an Amazon SNS topic. + Subscription []*AwsSnsTopicSubscription `type:"list"` + + // The name of the topic. + TopicName *string `type:"string"` +} + +// String returns the string representation +func (s AwsSnsTopicDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsSnsTopicDetails) GoString() string { + return s.String() +} + +// SetKmsMasterKeyId sets the KmsMasterKeyId field's value. +func (s *AwsSnsTopicDetails) SetKmsMasterKeyId(v string) *AwsSnsTopicDetails { + s.KmsMasterKeyId = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *AwsSnsTopicDetails) SetOwner(v string) *AwsSnsTopicDetails { s.Owner = &v return s } @@ -8560,7 +8972,7 @@ type AwsSqsQueueDetails struct { // to encrypt or decrypt messages before calling AWS KMS again. KmsDataKeyReusePeriodSeconds *int64 `type:"integer"` - // The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom + // The ID of an AWS managed customer master key (CMK) for Amazon SQS or a custom // CMK. KmsMasterKeyId *string `type:"string"` @@ -8606,7 +9018,7 @@ func (s *AwsSqsQueueDetails) SetQueueName(v string) *AwsSqsQueueDetails { type AwsWafWebAclDetails struct { _ struct{} `type:"structure"` - // The action to perform if none of the Rules contained in the WebACL match. + // The action to perform if none of the rules contained in the WebACL match. DefaultAction *string `type:"string"` // A friendly name or description of the WebACL. You can't change the name of @@ -8660,7 +9072,7 @@ type AwsWafWebAclRule struct { _ struct{} `type:"structure"` // Specifies the action that CloudFront or AWS WAF takes when a web request - // matches the conditions in the Rule. + // matches the conditions in the rule. Action *WafAction `type:"structure"` // Rules to exclude from a rule group. @@ -8682,13 +9094,13 @@ type AwsWafWebAclRule struct { // update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. OverrideAction *WafOverrideAction `type:"structure"` - // Specifies the order in which the Rules in a WebACL are evaluated. Rules with - // a lower value for Priority are evaluated before Rules with a higher value. - // The value must be a unique integer. If you add multiple Rules to a WebACL, + // Specifies the order in which the rules in a WebACL are evaluated. Rules with + // a lower value for Priority are evaluated before rules with a higher value. + // The value must be a unique integer. If you add multiple rules to a WebACL, // the values do not need to be consecutive. Priority *int64 `type:"integer"` - // The identifier for a Rule. + // The identifier for a rule. RuleId *string `type:"string"` // The rule type. @@ -8978,28 +9390,305 @@ func (s *BatchImportFindingsOutput) SetSuccessCount(v int64) *BatchImportFinding return s } -// Exclusive to findings that are generated as the result of a check run against -// a specific rule in a supported security standard, such as CIS AWS Foundations. -// Contains security standard-related finding details. -// -// Values include the following: -// -// * Allowed values are the following: PASSED - Standards check passed for -// all evaluated resources. WARNING - Some information is missing or this -// check is not supported given your configuration. FAILED - Standards check -// failed for at least one evaluated resource. NOT_AVAILABLE - Check could -// not be performed due to a service outage, API error, or because the result -// of the AWS Config evaluation was NOT_APPLICABLE. If the AWS Config evaluation -// result was NOT_APPLICABLE, then after 3 days, Security Hub automatically -// archives the finding. +type BatchUpdateFindingsInput struct { + _ struct{} `type:"structure"` + + // The updated value for the finding confidence. Confidence is defined as the + // likelihood that a finding accurately identifies the behavior or issue that + // it was intended to identify. + // + // Confidence is scored on a 0-100 basis using a ratio scale, where 0 means + // zero percent confidence and 100 means 100 percent confidence. + Confidence *int64 `type:"integer"` + + // The updated value for the level of importance assigned to the resources associated + // with the findings. + // + // A score of 0 means that the underlying resources have no criticality, and + // a score of 100 is reserved for the most critical resources. + Criticality *int64 `type:"integer"` + + // The list of findings to update. BatchUpdateFindings can be used to update + // up to 100 findings at a time. + // + // For each finding, the list provides the finding identifier and the ARN of + // the finding provider. + // + // FindingIdentifiers is a required field + FindingIdentifiers []*AwsSecurityFindingIdentifier `type:"list" required:"true"` + + // The updated note. + Note *NoteUpdate `type:"structure"` + + // A list of findings that are related to the updated findings. + RelatedFindings []*RelatedFinding `type:"list"` + + // Used to update the finding severity. + Severity *SeverityUpdate `type:"structure"` + + // One or more finding types in the format of namespace/category/classifier + // that classify a finding. + // + // Valid namespace values are as follows. + // + // * Software and Configuration Checks + // + // * TTPs + // + // * Effects + // + // * Unusual Behaviors + // + // * Sensitive Data Identifications + Types []*string `type:"list"` + + // A list of name/value string pairs associated with the finding. These are + // custom, user-defined fields added to a finding. + UserDefinedFields map[string]*string `type:"map"` + + // Indicates the veracity of a finding. + // + // The available values for VerificationState are as follows. + // + // * UNKNOWN – The default disposition of a security finding + // + // * TRUE_POSITIVE – The security finding is confirmed + // + // * FALSE_POSITIVE – The security finding was determined to be a false + // alarm + // + // * BENIGN_POSITIVE – A special case of TRUE_POSITIVE where the finding + // doesn't pose any threat, is expected, or both + VerificationState *string `type:"string" enum:"VerificationState"` + + // Used to update the workflow status of a finding. + // + // The workflow status indicates the progress of the investigation into the + // finding. + Workflow *WorkflowUpdate `type:"structure"` +} + +// String returns the string representation +func (s BatchUpdateFindingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchUpdateFindingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchUpdateFindingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchUpdateFindingsInput"} + if s.FindingIdentifiers == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIdentifiers")) + } + if s.FindingIdentifiers != nil { + for i, v := range s.FindingIdentifiers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FindingIdentifiers", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Note != nil { + if err := s.Note.Validate(); err != nil { + invalidParams.AddNested("Note", err.(request.ErrInvalidParams)) + } + } + if s.RelatedFindings != nil { + for i, v := range s.RelatedFindings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RelatedFindings", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfidence sets the Confidence field's value. +func (s *BatchUpdateFindingsInput) SetConfidence(v int64) *BatchUpdateFindingsInput { + s.Confidence = &v + return s +} + +// SetCriticality sets the Criticality field's value. +func (s *BatchUpdateFindingsInput) SetCriticality(v int64) *BatchUpdateFindingsInput { + s.Criticality = &v + return s +} + +// SetFindingIdentifiers sets the FindingIdentifiers field's value. +func (s *BatchUpdateFindingsInput) SetFindingIdentifiers(v []*AwsSecurityFindingIdentifier) *BatchUpdateFindingsInput { + s.FindingIdentifiers = v + return s +} + +// SetNote sets the Note field's value. +func (s *BatchUpdateFindingsInput) SetNote(v *NoteUpdate) *BatchUpdateFindingsInput { + s.Note = v + return s +} + +// SetRelatedFindings sets the RelatedFindings field's value. +func (s *BatchUpdateFindingsInput) SetRelatedFindings(v []*RelatedFinding) *BatchUpdateFindingsInput { + s.RelatedFindings = v + return s +} + +// SetSeverity sets the Severity field's value. +func (s *BatchUpdateFindingsInput) SetSeverity(v *SeverityUpdate) *BatchUpdateFindingsInput { + s.Severity = v + return s +} + +// SetTypes sets the Types field's value. +func (s *BatchUpdateFindingsInput) SetTypes(v []*string) *BatchUpdateFindingsInput { + s.Types = v + return s +} + +// SetUserDefinedFields sets the UserDefinedFields field's value. +func (s *BatchUpdateFindingsInput) SetUserDefinedFields(v map[string]*string) *BatchUpdateFindingsInput { + s.UserDefinedFields = v + return s +} + +// SetVerificationState sets the VerificationState field's value. +func (s *BatchUpdateFindingsInput) SetVerificationState(v string) *BatchUpdateFindingsInput { + s.VerificationState = &v + return s +} + +// SetWorkflow sets the Workflow field's value. +func (s *BatchUpdateFindingsInput) SetWorkflow(v *WorkflowUpdate) *BatchUpdateFindingsInput { + s.Workflow = v + return s +} + +type BatchUpdateFindingsOutput struct { + _ struct{} `type:"structure"` + + // The list of findings that were updated successfully. + // + // ProcessedFindings is a required field + ProcessedFindings []*AwsSecurityFindingIdentifier `type:"list" required:"true"` + + // The list of findings that were not updated. + // + // UnprocessedFindings is a required field + UnprocessedFindings []*BatchUpdateFindingsUnprocessedFinding `type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchUpdateFindingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchUpdateFindingsOutput) GoString() string { + return s.String() +} + +// SetProcessedFindings sets the ProcessedFindings field's value. +func (s *BatchUpdateFindingsOutput) SetProcessedFindings(v []*AwsSecurityFindingIdentifier) *BatchUpdateFindingsOutput { + s.ProcessedFindings = v + return s +} + +// SetUnprocessedFindings sets the UnprocessedFindings field's value. +func (s *BatchUpdateFindingsOutput) SetUnprocessedFindings(v []*BatchUpdateFindingsUnprocessedFinding) *BatchUpdateFindingsOutput { + s.UnprocessedFindings = v + return s +} + +// A finding from a BatchUpdateFindings request that Security Hub was unable +// to update. +type BatchUpdateFindingsUnprocessedFinding struct { + _ struct{} `type:"structure"` + + // The code associated with the error. + // + // ErrorCode is a required field + ErrorCode *string `type:"string" required:"true"` + + // The message associated with the error. + // + // ErrorMessage is a required field + ErrorMessage *string `type:"string" required:"true"` + + // The identifier of the finding that was not updated. + // + // FindingIdentifier is a required field + FindingIdentifier *AwsSecurityFindingIdentifier `type:"structure" required:"true"` +} + +// String returns the string representation +func (s BatchUpdateFindingsUnprocessedFinding) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchUpdateFindingsUnprocessedFinding) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *BatchUpdateFindingsUnprocessedFinding) SetErrorCode(v string) *BatchUpdateFindingsUnprocessedFinding { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *BatchUpdateFindingsUnprocessedFinding) SetErrorMessage(v string) *BatchUpdateFindingsUnprocessedFinding { + s.ErrorMessage = &v + return s +} + +// SetFindingIdentifier sets the FindingIdentifier field's value. +func (s *BatchUpdateFindingsUnprocessedFinding) SetFindingIdentifier(v *AwsSecurityFindingIdentifier) *BatchUpdateFindingsUnprocessedFinding { + s.FindingIdentifier = v + return s +} + +// Contains finding details that are specific to control-based findings. Only +// returned for findings generated from controls. type Compliance struct { _ struct{} `type:"structure"` - // List of requirements that are related to a standards control. + // For a control, the industry or regulatory framework requirements that are + // related to the control. The check for that control is aligned with these + // requirements. RelatedRequirements []*string `type:"list"` // The result of a standards check. + // + // The valid values for Status are as follows. + // + // * PASSED - Standards check passed for all evaluated resources. WARNING + // - Some information is missing or this check is not supported for your + // configuration. FAILED - Standards check failed for at least one evaluated + // resource. NOT_AVAILABLE - Check could not be performed due to a service + // outage, API error, or because the result of the AWS Config evaluation + // was NOT_APPLICABLE. If the AWS Config evaluation result was NOT_APPLICABLE, + // then after 3 days, Security Hub automatically archives the finding. Status *string `type:"string" enum:"ComplianceStatus"` + + // For findings generated from controls, a list of reasons behind the value + // of Status. For the list of status reason codes and their meanings, see Standards-related + // information in the ASFF (https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-results.html#securityhub-standards-results-asff) + // in the AWS Security Hub User Guide. + StatusReasons []*StatusReason `type:"list"` } // String returns the string representation @@ -9012,6 +9701,26 @@ func (s Compliance) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Compliance) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Compliance"} + if s.StatusReasons != nil { + for i, v := range s.StatusReasons { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StatusReasons", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetRelatedRequirements sets the RelatedRequirements field's value. func (s *Compliance) SetRelatedRequirements(v []*string) *Compliance { s.RelatedRequirements = v @@ -9024,6 +9733,12 @@ func (s *Compliance) SetStatus(v string) *Compliance { return s } +// SetStatusReasons sets the StatusReasons field's value. +func (s *Compliance) SetStatusReasons(v []*StatusReason) *Compliance { + s.StatusReasons = v + return s +} + // Container details related to a finding. type ContainerDetails struct { _ struct{} `type:"structure"` @@ -9176,7 +9891,10 @@ type CreateInsightInput struct { // Filters is a required field Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` - // The attribute used as the aggregator to group related findings for the insight. + // The attribute used to group the findings for the insight. The grouping attribute + // identifies the type of item that the insight applies to. For example, if + // an insight is grouped by resource identifier, then the insight produces a + // list of resource identifiers. // // GroupByAttribute is a required field GroupByAttribute *string `type:"string" required:"true"` @@ -10308,7 +11026,13 @@ func (s *EnableImportFindingsForProductOutput) SetProductSubscriptionArn(v strin type EnableSecurityHubInput struct { _ struct{} `type:"structure"` - // The tags to add to the Hub resource when you enable Security Hub. + // Whether to enable the security standards that Security Hub has designated + // as automatically enabled. If you do not provide a value for EnableDefaultStandards, + // it is set to true. To not enable the automatically enabled standards, set + // EnableDefaultStandards to false. + EnableDefaultStandards *bool `type:"boolean"` + + // The tags to add to the hub resource when you enable Security Hub. Tags map[string]*string `min:"1" type:"map"` } @@ -10335,6 +11059,12 @@ func (s *EnableSecurityHubInput) Validate() error { return nil } +// SetEnableDefaultStandards sets the EnableDefaultStandards field's value. +func (s *EnableSecurityHubInput) SetEnableDefaultStandards(v bool) *EnableSecurityHubInput { + s.EnableDefaultStandards = &v + return s +} + // SetTags sets the Tags field's value. func (s *EnableSecurityHubInput) SetTags(v map[string]*string) *EnableSecurityHubInput { s.Tags = v @@ -10620,7 +11350,9 @@ func (s *GetInsightResultsOutput) SetInsightResults(v *InsightResults) *GetInsig type GetInsightsInput struct { _ struct{} `type:"structure"` - // The ARNs of the insights to describe. + // The ARNs of the insights to describe. If you do not provide any insight ARNs, + // then GetInsights returns all of your custom insights. It does not return + // any managed insights. InsightArns []*string `type:"list"` // The maximum number of items to return in the response. @@ -10857,21 +11589,22 @@ func (s *GetMembersOutput) SetUnprocessedAccounts(v []*Result) *GetMembersOutput return s } -// Includes details of the list of the findings that cannot be imported. +// The list of the findings that cannot be imported. For each finding, the list +// provides the error. type ImportFindingsError struct { _ struct{} `type:"structure"` - // The code of the error made during the BatchImportFindings operation. + // The code of the error returned by the BatchImportFindings operation. // // ErrorCode is a required field ErrorCode *string `type:"string" required:"true"` - // The message of the error made during the BatchImportFindings operation. + // The message of the error returned by the BatchImportFindings operation. // // ErrorMessage is a required field ErrorMessage *string `type:"string" required:"true"` - // The ID of the error made during the BatchImportFindings operation. + // The identifier of the finding that could not be updated. // // Id is a required field Id *string `type:"string" required:"true"` @@ -10916,9 +11649,10 @@ type Insight struct { // Filters is a required field Filters *AwsSecurityFindingFilters `type:"structure" required:"true"` - // The attribute that the insight's findings are grouped by. This attribute - // is used as a findings aggregator for the purposes of viewing and managing - // multiple related findings under a single operand. + // The grouping attribute for the insight's findings. Indicates how to group + // the matching findings, and identifies the type of item that the insight applies + // to. For example, if an insight is grouped by resource identifier, then the + // insight produces a list of resource identifiers. // // GroupByAttribute is a required field GroupByAttribute *string `type:"string" required:"true"` @@ -11058,8 +11792,8 @@ func (s *InsightResults) SetResultValues(v []*InsightResultValue) *InsightResult // Internal server error. type InternalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -11078,17 +11812,17 @@ func (s InternalException) GoString() string { func newErrorInternalException(v protocol.ResponseMetadata) error { return &InternalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalException) Code() string { +func (s *InternalException) Code() string { return "InternalException" } // Message returns the exception's message. -func (s InternalException) Message() string { +func (s *InternalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11096,28 +11830,28 @@ func (s InternalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalException) OrigErr() error { +func (s *InternalException) OrigErr() error { return nil } -func (s InternalException) Error() string { +func (s *InternalException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalException) RequestID() string { + return s.RespMetadata.RequestID } // AWS Security Hub isn't enabled for the account used to make this request. type InvalidAccessException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -11136,17 +11870,17 @@ func (s InvalidAccessException) GoString() string { func newErrorInvalidAccessException(v protocol.ResponseMetadata) error { return &InvalidAccessException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAccessException) Code() string { +func (s *InvalidAccessException) Code() string { return "InvalidAccessException" } // Message returns the exception's message. -func (s InvalidAccessException) Message() string { +func (s *InvalidAccessException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11154,29 +11888,29 @@ func (s InvalidAccessException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAccessException) OrigErr() error { +func (s *InvalidAccessException) OrigErr() error { return nil } -func (s InvalidAccessException) Error() string { +func (s *InvalidAccessException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAccessException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAccessException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAccessException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAccessException) RequestID() string { + return s.RespMetadata.RequestID } // The request was rejected because you supplied an invalid or out-of-range // value for an input parameter. type InvalidInputException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -11195,17 +11929,17 @@ func (s InvalidInputException) GoString() string { func newErrorInvalidInputException(v protocol.ResponseMetadata) error { return &InvalidInputException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInputException) Code() string { +func (s *InvalidInputException) Code() string { return "InvalidInputException" } // Message returns the exception's message. -func (s InvalidInputException) Message() string { +func (s *InvalidInputException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11213,22 +11947,22 @@ func (s InvalidInputException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInputException) OrigErr() error { +func (s *InvalidInputException) OrigErr() error { return nil } -func (s InvalidInputException) Error() string { +func (s *InvalidInputException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInputException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInputException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInputException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInputException) RequestID() string { + return s.RespMetadata.RequestID } // Details about an invitation. @@ -11382,8 +12116,8 @@ func (s *KeywordFilter) SetValue(v string) *KeywordFilter { // The request was rejected because it attempted to create resources beyond // the current AWS account limits. The error code describes the limit exceeded. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -11402,17 +12136,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11420,22 +12154,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListEnabledProductsForImportInput struct { @@ -12649,8 +13383,8 @@ func (s *Resource) SetType(v string) *Resource { // The resource specified in the request conflicts with an existing resource. type ResourceConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -12669,17 +13403,17 @@ func (s ResourceConflictException) GoString() string { func newErrorResourceConflictException(v protocol.ResponseMetadata) error { return &ResourceConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceConflictException) Code() string { +func (s *ResourceConflictException) Code() string { return "ResourceConflictException" } // Message returns the exception's message. -func (s ResourceConflictException) Message() string { +func (s *ResourceConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12687,22 +13421,22 @@ func (s ResourceConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceConflictException) OrigErr() error { +func (s *ResourceConflictException) OrigErr() error { return nil } -func (s ResourceConflictException) Error() string { +func (s *ResourceConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceConflictException) RequestID() string { + return s.RespMetadata.RequestID } // Additional details about a resource related to a finding. @@ -12728,7 +13462,7 @@ type ResourceDetails struct { // Details about an Amazon EC2 instance related to a finding. AwsEc2Instance *AwsEc2InstanceDetails `type:"structure"` - // Details for an AWS EC2 network interface. + // Details for an Amazon EC2 network interface. AwsEc2NetworkInterface *AwsEc2NetworkInterfaceDetails `type:"structure"` // Details for an EC2 security group. @@ -12755,12 +13489,15 @@ type ResourceDetails struct { // Details for a Lambda layer version. AwsLambdaLayerVersion *AwsLambdaLayerVersionDetails `type:"structure"` - // Details for an RDS database instance. + // Details for an Amazon RDS database instance. AwsRdsDbInstance *AwsRdsDbInstanceDetails `type:"structure"` - // Details about an Amazon S3 Bucket related to a finding. + // Details about an Amazon S3 bucket related to a finding. AwsS3Bucket *AwsS3BucketDetails `type:"structure"` + // Details about an Amazon S3 object related to a finding. + AwsS3Object *AwsS3ObjectDetails `type:"structure"` + // Details about an SNS topic. AwsSnsTopic *AwsSnsTopicDetails `type:"structure"` @@ -12895,6 +13632,12 @@ func (s *ResourceDetails) SetAwsS3Bucket(v *AwsS3BucketDetails) *ResourceDetails return s } +// SetAwsS3Object sets the AwsS3Object field's value. +func (s *ResourceDetails) SetAwsS3Object(v *AwsS3ObjectDetails) *ResourceDetails { + s.AwsS3Object = v + return s +} + // SetAwsSnsTopic sets the AwsSnsTopic field's value. func (s *ResourceDetails) SetAwsSnsTopic(v *AwsSnsTopicDetails) *ResourceDetails { s.AwsSnsTopic = v @@ -12927,8 +13670,8 @@ func (s *ResourceDetails) SetOther(v map[string]*string) *ResourceDetails { // The request was rejected because we can't find the specified resource. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Code_ *string `locationName:"Code" type:"string"` @@ -12947,17 +13690,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12965,22 +13708,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Details about the account that was not processed. @@ -13020,11 +13763,42 @@ func (s *Result) SetProcessingResult(v string) *Result { type Severity struct { _ struct{} `type:"structure"` - // The normalized severity of a finding. + // The severity value of the finding. The allowed values are the following. + // + // * INFORMATIONAL - No issue was found. + // + // * LOW - The issue does not require action on its own. // - // Normalized is a required field - Normalized *int64 `type:"integer" required:"true"` + // * MEDIUM - The issue must be addressed but not urgently. + // + // * HIGH - The issue must be addressed as a priority. + // + // * CRITICAL - The issue must be remediated immediately to avoid it escalating. + Label *string `type:"string" enum:"SeverityLabel"` + // Deprecated. This attribute is being deprecated. Instead of providing Normalized, + // provide Label. + // + // If you provide Normalized and do not provide Label, Label is set automatically + // as follows. + // + // * 0 - INFORMATIONAL + // + // * 1–39 - LOW + // + // * 40–69 - MEDIUM + // + // * 70–89 - HIGH + // + // * 90–100 - CRITICAL + Normalized *int64 `type:"integer"` + + // The native severity from the finding product that generated the finding. + Original *string `type:"string"` + + // Deprecated. This attribute is being deprecated. Instead of providing Product, + // provide Original. + // // The native severity as defined by the AWS service or integrated partner product // that generated the finding. Product *float64 `type:"double"` @@ -13040,17 +13814,10 @@ func (s Severity) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *Severity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Severity"} - if s.Normalized == nil { - invalidParams.Add(request.NewErrParamRequired("Normalized")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetLabel sets the Label field's value. +func (s *Severity) SetLabel(v string) *Severity { + s.Label = &v + return s } // SetNormalized sets the Normalized field's value. @@ -13059,12 +13826,85 @@ func (s *Severity) SetNormalized(v int64) *Severity { return s } +// SetOriginal sets the Original field's value. +func (s *Severity) SetOriginal(v string) *Severity { + s.Original = &v + return s +} + // SetProduct sets the Product field's value. func (s *Severity) SetProduct(v float64) *Severity { s.Product = &v return s } +// Updates to the severity information for a finding. +type SeverityUpdate struct { + _ struct{} `type:"structure"` + + // The severity value of the finding. The allowed values are the following. + // + // * INFORMATIONAL - No issue was found. + // + // * LOW - The issue does not require action on its own. + // + // * MEDIUM - The issue must be addressed but not urgently. + // + // * HIGH - The issue must be addressed as a priority. + // + // * CRITICAL - The issue must be remediated immediately to avoid it escalating. + Label *string `type:"string" enum:"SeverityLabel"` + + // The normalized severity for the finding. This attribute is to be deprecated + // in favor of Label. + // + // If you provide Normalized and do not provide Label, Label is set automatically + // as follows. + // + // * 0 - INFORMATIONAL + // + // * 1–39 - LOW + // + // * 40–69 - MEDIUM + // + // * 70–89 - HIGH + // + // * 90–100 - CRITICAL + Normalized *int64 `type:"integer"` + + // The native severity as defined by the AWS service or integrated partner product + // that generated the finding. + Product *float64 `type:"double"` +} + +// String returns the string representation +func (s SeverityUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SeverityUpdate) GoString() string { + return s.String() +} + +// SetLabel sets the Label field's value. +func (s *SeverityUpdate) SetLabel(v string) *SeverityUpdate { + s.Label = &v + return s +} + +// SetNormalized sets the Normalized field's value. +func (s *SeverityUpdate) SetNormalized(v int64) *SeverityUpdate { + s.Normalized = &v + return s +} + +// SetProduct sets the Product field's value. +func (s *SeverityUpdate) SetProduct(v float64) *SeverityUpdate { + s.Product = &v + return s +} + // A collection of finding attributes used to sort findings. type SortCriterion struct { _ struct{} `type:"structure"` @@ -13105,6 +13945,14 @@ type Standard struct { // A description of the standard. Description *string `type:"string"` + // Whether the standard is enabled by default. When Security Hub is enabled + // from the console, if a standard is enabled by default, the check box for + // that standard is selected by default. + // + // When Security Hub is enabled using the EnableSecurityHub API operation, the + // standard is enabled by default unless EnableDefaultStandards is set to false. + EnabledByDefault *bool `type:"boolean"` + // The name of the standard. Name *string `type:"string"` @@ -13128,6 +13976,12 @@ func (s *Standard) SetDescription(v string) *Standard { return s } +// SetEnabledByDefault sets the EnabledByDefault field's value. +func (s *Standard) SetEnabledByDefault(v bool) *Standard { + s.EnabledByDefault = &v + return s +} + // SetName sets the Name field's value. func (s *Standard) SetName(v string) *Standard { s.Name = &v @@ -13361,6 +14215,57 @@ func (s *StandardsSubscriptionRequest) SetStandardsInput(v map[string]*string) * return s } +// Provides additional context for the value of Compliance.Status. +type StatusReason struct { + _ struct{} `type:"structure"` + + // The corresponding description for the status reason code. + Description *string `type:"string"` + + // A code that represents a reason for the control status. For the list of status + // reason codes and their meanings, see Standards-related information in the + // ASFF (https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-results.html#securityhub-standards-results-asff) + // in the AWS Security Hub User Guide. + // + // ReasonCode is a required field + ReasonCode *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StatusReason) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StatusReason) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StatusReason) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StatusReason"} + if s.ReasonCode == nil { + invalidParams.Add(request.NewErrParamRequired("ReasonCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *StatusReason) SetDescription(v string) *StatusReason { + s.Description = &v + return s +} + +// SetReasonCode sets the ReasonCode field's value. +func (s *StatusReason) SetReasonCode(v string) *StatusReason { + s.ReasonCode = &v + return s +} + // A string filter for querying findings. type StringFilter struct { _ struct{} `type:"structure"` @@ -13913,12 +14818,12 @@ func (s UpdateStandardsControlOutput) GoString() string { } // Details about the action that CloudFront or AWS WAF takes when a web request -// matches the conditions in the Rule. +// matches the conditions in the rule. type WafAction struct { _ struct{} `type:"structure"` // Specifies how you want AWS WAF to respond to requests that match the settings - // in a Rule. + // in a rule. // // Valid settings include the following: // @@ -13999,6 +14904,80 @@ func (s *WafOverrideAction) SetType(v string) *WafOverrideAction { return s } +// Provides information about the status of the investigation into a finding. +type Workflow struct { + _ struct{} `type:"structure"` + + // The status of the investigation into the finding. The allowed values are + // the following. + // + // * NEW - The initial state of a finding, before it is reviewed. + // + // * NOTIFIED - Indicates that you notified the resource owner about the + // security issue. Used when the initial reviewer is not the resource owner, + // and needs intervention from the resource owner. + // + // * SUPPRESSED - The finding will not be reviewed again and will not be + // acted upon. + // + // * RESOLVED - The finding was reviewed and remediated and is now considered + // resolved. + Status *string `type:"string" enum:"WorkflowStatus"` +} + +// String returns the string representation +func (s Workflow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Workflow) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *Workflow) SetStatus(v string) *Workflow { + s.Status = &v + return s +} + +// Used to update information about the investigation into the finding. +type WorkflowUpdate struct { + _ struct{} `type:"structure"` + + // The status of the investigation into the finding. The allowed values are + // the following. + // + // * NEW - The initial state of a finding, before it is reviewed. + // + // * NOTIFIED - Indicates that you notified the resource owner about the + // security issue. Used when the initial reviewer is not the resource owner, + // and needs intervention from the resource owner. + // + // * RESOLVED - The finding was reviewed and remediated and is now considered + // resolved. + // + // * SUPPRESSED - The finding will not be reviewed again and will not be + // acted upon. + Status *string `type:"string" enum:"WorkflowStatus"` +} + +// String returns the string representation +func (s WorkflowUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkflowUpdate) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *WorkflowUpdate) SetStatus(v string) *WorkflowUpdate { + s.Status = &v + return s +} + const ( // AwsIamAccessKeyStatusActive is a AwsIamAccessKeyStatus enum value AwsIamAccessKeyStatusActive = "Active" @@ -14132,6 +15111,23 @@ const ( RecordStateArchived = "ARCHIVED" ) +const ( + // SeverityLabelInformational is a SeverityLabel enum value + SeverityLabelInformational = "INFORMATIONAL" + + // SeverityLabelLow is a SeverityLabel enum value + SeverityLabelLow = "LOW" + + // SeverityLabelMedium is a SeverityLabel enum value + SeverityLabelMedium = "MEDIUM" + + // SeverityLabelHigh is a SeverityLabel enum value + SeverityLabelHigh = "HIGH" + + // SeverityLabelCritical is a SeverityLabel enum value + SeverityLabelCritical = "CRITICAL" +) + const ( // SeverityRatingLow is a SeverityRating enum value SeverityRatingLow = "LOW" @@ -14264,3 +15260,17 @@ const ( // WorkflowStateResolved is a WorkflowState enum value WorkflowStateResolved = "RESOLVED" ) + +const ( + // WorkflowStatusNew is a WorkflowStatus enum value + WorkflowStatusNew = "NEW" + + // WorkflowStatusNotified is a WorkflowStatus enum value + WorkflowStatusNotified = "NOTIFIED" + + // WorkflowStatusResolved is a WorkflowStatus enum value + WorkflowStatusResolved = "RESOLVED" + + // WorkflowStatusSuppressed is a WorkflowStatus enum value + WorkflowStatusSuppressed = "SUPPRESSED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go index 32f6c86b85e..b87d26a28bc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go @@ -1310,6 +1310,103 @@ func (c *ServerlessApplicationRepository) PutApplicationPolicyWithContext(ctx aw return out, req.Send() } +const opUnshareApplication = "UnshareApplication" + +// UnshareApplicationRequest generates a "aws/request.Request" representing the +// client's request for the UnshareApplication operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UnshareApplication for more information on using the UnshareApplication +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UnshareApplicationRequest method. +// req, resp := client.UnshareApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UnshareApplication +func (c *ServerlessApplicationRepository) UnshareApplicationRequest(input *UnshareApplicationInput) (req *request.Request, output *UnshareApplicationOutput) { + op := &request.Operation{ + Name: opUnshareApplication, + HTTPMethod: "POST", + HTTPPath: "/applications/{applicationId}/unshare", + } + + if input == nil { + input = &UnshareApplicationInput{} + } + + output = &UnshareApplicationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UnshareApplication API operation for AWSServerlessApplicationRepository. +// +// Unshares an application from an AWS Organization. +// +// This operation can be called only from the organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation UnshareApplication for usage and error information. +// +// Returned Error Types: +// * NotFoundException +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * TooManyRequestsException +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * BadRequestException +// One of the parameters in the request is invalid. +// +// * InternalServerErrorException +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ForbiddenException +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UnshareApplication +func (c *ServerlessApplicationRepository) UnshareApplication(input *UnshareApplicationInput) (*UnshareApplicationOutput, error) { + req, out := c.UnshareApplicationRequest(input) + return out, req.Send() +} + +// UnshareApplicationWithContext is the same as UnshareApplication with the addition of +// the ability to pass a context and additional request options. +// +// See UnshareApplication for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) UnshareApplicationWithContext(ctx aws.Context, input *UnshareApplicationInput, opts ...request.Option) (*UnshareApplicationOutput, error) { + req, out := c.UnshareApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the @@ -1454,6 +1551,11 @@ type ApplicationPolicyStatement struct { // Actions is a required field Actions []*string `locationName:"actions" type:"list" required:"true"` + // An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#principal-org-id) + // global condition key. + PrincipalOrgIDs []*string `locationName:"principalOrgIDs" type:"list"` + // An array of AWS account IDs, or * to make the application public. // // Principals is a required field @@ -1495,6 +1597,12 @@ func (s *ApplicationPolicyStatement) SetActions(v []*string) *ApplicationPolicyS return s } +// SetPrincipalOrgIDs sets the PrincipalOrgIDs field's value. +func (s *ApplicationPolicyStatement) SetPrincipalOrgIDs(v []*string) *ApplicationPolicyStatement { + s.PrincipalOrgIDs = v + return s +} + // SetPrincipals sets the Principals field's value. func (s *ApplicationPolicyStatement) SetPrincipals(v []*string) *ApplicationPolicyStatement { s.Principals = v @@ -1619,8 +1727,8 @@ func (s *ApplicationSummary) SetSpdxLicenseId(v string) *ApplicationSummary { // One of the parameters in the request is invalid. type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 400 ErrorCode *string `locationName:"errorCode" type:"string"` @@ -1641,17 +1749,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "BadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1659,28 +1767,28 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The resource already exists. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 409 ErrorCode *string `locationName:"errorCode" type:"string"` @@ -1701,17 +1809,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1719,22 +1827,22 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } type CreateApplicationOutput struct { @@ -2569,8 +2677,8 @@ func (s DeleteApplicationOutput) GoString() string { // The client is not authenticated. type ForbiddenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 403 ErrorCode *string `locationName:"errorCode" type:"string"` @@ -2591,17 +2699,17 @@ func (s ForbiddenException) GoString() string { func newErrorForbiddenException(v protocol.ResponseMetadata) error { return &ForbiddenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ForbiddenException) Code() string { +func (s *ForbiddenException) Code() string { return "ForbiddenException" } // Message returns the exception's message. -func (s ForbiddenException) Message() string { +func (s *ForbiddenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2609,22 +2717,22 @@ func (s ForbiddenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ForbiddenException) OrigErr() error { +func (s *ForbiddenException) OrigErr() error { return nil } -func (s ForbiddenException) Error() string { +func (s *ForbiddenException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ForbiddenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ForbiddenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ForbiddenException) RequestID() string { - return s.respMetadata.RequestID +func (s *ForbiddenException) RequestID() string { + return s.RespMetadata.RequestID } type GetApplicationInput struct { @@ -2981,8 +3089,8 @@ func (s *GetCloudFormationTemplateOutput) SetTemplateUrl(v string) *GetCloudForm // The AWS Serverless Application Repository service encountered an internal // error. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 500 ErrorCode *string `locationName:"errorCode" type:"string"` @@ -3004,17 +3112,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3022,22 +3130,22 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } type ListApplicationDependenciesInput struct { @@ -3300,8 +3408,8 @@ func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput // The resource (for example, an access policy statement) specified in the request // doesn't exist. type NotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 404 ErrorCode *string `locationName:"errorCode" type:"string"` @@ -3323,17 +3431,17 @@ func (s NotFoundException) GoString() string { func newErrorNotFoundException(v protocol.ResponseMetadata) error { return &NotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NotFoundException) Code() string { +func (s *NotFoundException) Code() string { return "NotFoundException" } // Message returns the exception's message. -func (s NotFoundException) Message() string { +func (s *NotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3341,22 +3449,22 @@ func (s NotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NotFoundException) OrigErr() error { +func (s *NotFoundException) OrigErr() error { return nil } -func (s NotFoundException) Error() string { +func (s *NotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Parameters supported by the application. @@ -3858,8 +3966,8 @@ func (s *Tag) SetValue(v string) *Tag { // The client is sending more than the allowed number of requests per unit of // time. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // 429 ErrorCode *string `locationName:"errorCode" type:"string"` @@ -3881,17 +3989,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3899,22 +4007,87 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID +} + +type UnshareApplicationInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + // OrganizationId is a required field + OrganizationId *string `locationName:"organizationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UnshareApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnshareApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnshareApplicationInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.OrganizationId == nil { + invalidParams.Add(request.NewErrParamRequired("OrganizationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UnshareApplicationInput) SetApplicationId(v string) *UnshareApplicationInput { + s.ApplicationId = &v + return s +} + +// SetOrganizationId sets the OrganizationId field's value. +func (s *UnshareApplicationInput) SetOrganizationId(v string) *UnshareApplicationInput { + s.OrganizationId = &v + return s +} + +type UnshareApplicationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UnshareApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareApplicationOutput) GoString() string { + return s.String() } type UpdateApplicationOutput struct { 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 4644fc01373..ef25beaffd9 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 @@ -8904,6 +8904,14 @@ type ConstraintDetail struct { // The owner of the constraint. Owner *string `type:"string"` + // The identifier of the portfolio the product resides in. The constraint applies + // only to the instance of the product that lives within this portfolio. + PortfolioId *string `min:"1" type:"string"` + + // The identifier of the product the constraint applies to. Note that a constraint + // applies to a specific instance of a product within a certain portfolio. + ProductId *string `min:"1" type:"string"` + // The type of constraint. // // * LAUNCH @@ -8944,6 +8952,18 @@ func (s *ConstraintDetail) SetOwner(v string) *ConstraintDetail { return s } +// SetPortfolioId sets the PortfolioId field's value. +func (s *ConstraintDetail) SetPortfolioId(v string) *ConstraintDetail { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ConstraintDetail) SetProductId(v string) *ConstraintDetail { + s.ProductId = &v + return s +} + // SetType sets the Type field's value. func (s *ConstraintDetail) SetType(v string) *ConstraintDetail { s.Type = &v @@ -9150,10 +9170,25 @@ type CreateConstraintInput struct { // // LAUNCH // + // You are required to specify either the RoleArn or the LocalRoleName but can't + // use both. + // // Specify the RoleArn property as follows: // // {"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"} // + // Specify the LocalRoleName property as follows: + // + // {"LocalRoleName": "SCBasicLaunchRole"} + // + // If you specify the LocalRoleName property, when an account uses the launch + // constraint, the IAM role with that name in the account will be used. This + // allows launch-role constraints to be account-agnostic so the administrator + // can create fewer resources per shared account. + // + // The given role name must exist in the account used to create the launch constraint + // and the account of the user who launches a product with this launch constraint. + // // You cannot have both a LAUNCH and a STACKSET constraint. // // You also cannot have more than one LAUNCH constraint on a product and portfolio. @@ -13029,8 +13064,8 @@ func (s DisassociateTagOptionFromResourceOutput) GoString() string { // The specified resource is a duplicate. type DuplicateResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13047,17 +13082,17 @@ func (s DuplicateResourceException) GoString() string { func newErrorDuplicateResourceException(v protocol.ResponseMetadata) error { return &DuplicateResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateResourceException) Code() string { +func (s *DuplicateResourceException) Code() string { return "DuplicateResourceException" } // Message returns the exception's message. -func (s DuplicateResourceException) Message() string { +func (s *DuplicateResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13065,22 +13100,22 @@ func (s DuplicateResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateResourceException) OrigErr() error { +func (s *DuplicateResourceException) OrigErr() error { return nil } -func (s DuplicateResourceException) Error() string { +func (s *DuplicateResourceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateResourceException) RequestID() string { + return s.RespMetadata.RequestID } type EnableAWSOrganizationsAccessInput struct { @@ -13472,8 +13507,8 @@ func (s *GetAWSOrganizationsAccessStatusOutput) SetAccessStatus(v string) *GetAW // One or more parameters provided to the operation are not valid. type InvalidParametersException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13490,17 +13525,17 @@ func (s InvalidParametersException) GoString() string { func newErrorInvalidParametersException(v protocol.ResponseMetadata) error { return &InvalidParametersException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParametersException) Code() string { +func (s *InvalidParametersException) Code() string { return "InvalidParametersException" } // Message returns the exception's message. -func (s InvalidParametersException) Message() string { +func (s *InvalidParametersException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13508,30 +13543,30 @@ func (s InvalidParametersException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParametersException) OrigErr() error { +func (s *InvalidParametersException) OrigErr() error { return nil } -func (s InvalidParametersException) Error() string { +func (s *InvalidParametersException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParametersException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParametersException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParametersException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParametersException) RequestID() string { + return s.RespMetadata.RequestID } // An attempt was made to modify a resource that is in a state that is not valid. // Check your resources to ensure that they are in valid states before retrying // the operation. type InvalidStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13548,17 +13583,17 @@ func (s InvalidStateException) GoString() string { func newErrorInvalidStateException(v protocol.ResponseMetadata) error { return &InvalidStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidStateException) Code() string { +func (s *InvalidStateException) Code() string { return "InvalidStateException" } // Message returns the exception's message. -func (s InvalidStateException) Message() string { +func (s *InvalidStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13566,22 +13601,22 @@ func (s InvalidStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidStateException) OrigErr() error { +func (s *InvalidStateException) OrigErr() error { return nil } -func (s InvalidStateException) Error() string { +func (s *InvalidStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidStateException) RequestID() string { + return s.RespMetadata.RequestID } // Summary information about a product path for a user. @@ -13639,8 +13674,8 @@ func (s *LaunchPathSummary) SetTags(v []*Tag) *LaunchPathSummary { // Decrease your resource use or increase your service limits and retry the // operation. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13657,17 +13692,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13675,22 +13710,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAcceptedPortfolioSharesInput struct { @@ -15693,8 +15728,8 @@ func (s *ListTagOptionsOutput) SetTagOptionDetails(v []*TagOptionDetail) *ListTa // The operation is not supported. type OperationNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -15711,17 +15746,17 @@ func (s OperationNotSupportedException) GoString() string { func newErrorOperationNotSupportedException(v protocol.ResponseMetadata) error { return &OperationNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotSupportedException) Code() string { +func (s *OperationNotSupportedException) Code() string { return "OperationNotSupportedException" } // Message returns the exception's message. -func (s OperationNotSupportedException) Message() string { +func (s *OperationNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15729,22 +15764,22 @@ func (s OperationNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotSupportedException) OrigErr() error { +func (s *OperationNotSupportedException) OrigErr() error { return nil } -func (s OperationNotSupportedException) Error() string { +func (s *OperationNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the organization node. @@ -18043,8 +18078,8 @@ func (s *ResourceDetail) SetName(v string) *ResourceDetail { // A resource that is currently in use. Ensure that the resource is not in use // and retry the operation. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18061,17 +18096,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18079,28 +18114,28 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18117,17 +18152,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18135,22 +18170,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a change to a resource attribute. @@ -19091,8 +19126,8 @@ func (s *TagOptionDetail) SetValue(v string) *TagOptionDetail { // process has not been performed for this account. Please use the AWS console // to perform the migration process before retrying the operation. type TagOptionNotMigratedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19109,17 +19144,17 @@ func (s TagOptionNotMigratedException) GoString() string { func newErrorTagOptionNotMigratedException(v protocol.ResponseMetadata) error { return &TagOptionNotMigratedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagOptionNotMigratedException) Code() string { +func (s *TagOptionNotMigratedException) Code() string { return "TagOptionNotMigratedException" } // Message returns the exception's message. -func (s TagOptionNotMigratedException) Message() string { +func (s *TagOptionNotMigratedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19127,22 +19162,22 @@ func (s TagOptionNotMigratedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagOptionNotMigratedException) OrigErr() error { +func (s *TagOptionNotMigratedException) OrigErr() error { return nil } -func (s TagOptionNotMigratedException) Error() string { +func (s *TagOptionNotMigratedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagOptionNotMigratedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagOptionNotMigratedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagOptionNotMigratedException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagOptionNotMigratedException) RequestID() string { + return s.RespMetadata.RequestID } // Summary information about a TagOption. @@ -19316,10 +19351,25 @@ type UpdateConstraintInput struct { // // LAUNCH // + // You are required to specify either the RoleArn or the LocalRoleName but can't + // use both. + // // Specify the RoleArn property as follows: // // {"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"} // + // Specify the LocalRoleName property as follows: + // + // {"LocalRoleName": "SCBasicLaunchRole"} + // + // If you specify the LocalRoleName property, when an account uses the launch + // constraint, the IAM role with that name in the account will be used. This + // allows launch-role constraints to be account-agnostic so the administrator + // can create fewer resources per shared account. + // + // The given role name must exist in the account used to create the launch constraint + // and the account of the user who launches a product with this launch constraint. + // // You cannot have both a LAUNCH and a STACKSET constraint. // // You also cannot have more than one LAUNCH constraint on a product and portfolio. 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 0fee972596d..b6b6d9f17c8 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 @@ -62,7 +62,7 @@ func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespace // discovered using DNS. // // For the current limit on the number of namespaces that you can create using -// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) // in the AWS Cloud Map Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -159,7 +159,7 @@ func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivate // For example, if you name your namespace example.com and name your service // backend, the resulting DNS name for the service will be backend.example.com. // For the current limit on the number of namespaces that you can create using -// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) // in the AWS Cloud Map Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -256,7 +256,7 @@ func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDn // your namespace example.com and name your service backend, the resulting DNS // name for the service will be backend.example.com. For the current limit on // the number of namespaces that you can create using the same AWS account, -// see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) // in the AWS Cloud Map Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -355,12 +355,12 @@ func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req // // * Optionally, a health check // -// After you create the service, you can submit a RegisterInstance request, -// and AWS Cloud Map uses the values in the configuration to create the specified -// entities. +// After you create the service, you can submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) +// request, and AWS Cloud Map uses the values in the configuration to create +// the specified entities. // // For the current limit on the number of instances that you can register using -// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// the same namespace and using the same service, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) // in the AWS Cloud Map Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -733,7 +733,10 @@ func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInpu // DiscoverInstances API operation for AWS Cloud Map. // -// Discovers registered instances for a specified namespace and service. +// Discovers registered instances for a specified namespace and service. You +// can use DiscoverInstances to discover instances for any type of namespace. +// For public and private DNS namespaces, you can also use DNS queries to discover +// 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 @@ -1145,7 +1148,8 @@ func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *r // Gets information about any operation that returns an operation ID in the // response, such as a CreateService request. // -// To get a list of operations that match specified criteria, see ListOperations. +// To get a list of operations that match specified criteria, see ListOperations +// (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.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 @@ -1892,7 +1896,7 @@ func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) // One RegisterInstance request must complete before you can submit another // request and specify the same service ID and instance ID. // -// For more information, see CreateService. +// For more information, see CreateService (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html). // // When AWS Cloud Map receives a DNS query for the specified DNS name, it returns // the applicable value: @@ -1906,7 +1910,7 @@ func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) // records // // For the current limit on the number of instances that you can register using -// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// the same namespace and using the same service, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) // in the AWS Cloud Map Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2011,7 +2015,7 @@ func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *Update // you create a service. You can't use it to change the status for Route 53 // health checks, which you define using HealthCheckConfig. // -// For more information, see HealthCheckCustomConfig. +// For more information, see HealthCheckCustomConfig (https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.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 @@ -2105,20 +2109,23 @@ func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req // // Submits a request to perform the following operations: // -// * Add or delete DnsRecords configurations -// // * Update the TTL setting for existing DnsRecords configurations // -// * Add, update, or delete HealthCheckConfig for a specified service +// * Add, update, or delete HealthCheckConfig for a specified service You +// can't add, update, or delete a HealthCheckCustomConfig configuration. +// +// For public and private DNS namespaces, note the following: +// +// * If you omit any existing DnsRecords or HealthCheckConfig configurations +// from an UpdateService request, the configurations are deleted from the +// service. // -// For public and private DNS namespaces, you must specify all DnsRecords configurations -// (and, optionally, HealthCheckConfig) that you want to appear in the updated -// service. Any current configurations that don't appear in an UpdateService -// request are deleted. +// * If you omit an existing HealthCheckCustomConfig configuration from an +// UpdateService request, the configuration is not deleted from the service. // -// When you update the TTL setting for a service, AWS Cloud Map also updates -// the corresponding settings in all the records and health checks that were -// created by using the specified service. +// When you update settings for a service, AWS Cloud Map also updates the corresponding +// settings in all the records and health checks that were created by using +// the specified service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2223,7 +2230,7 @@ type CreateHttpNamespaceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. + // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } @@ -2321,7 +2328,7 @@ type CreatePrivateDnsNamespaceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. + // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } @@ -2403,7 +2410,7 @@ type CreatePublicDnsNamespaceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. + // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } @@ -2438,10 +2445,10 @@ type CreateServiceInput struct { // that you want AWS Cloud Map to create when you register an instance. DnsConfig *DnsConfig `type:"structure"` - // Public DNS namespaces only. A complex type that contains settings for an - // optional Route 53 health check. If you specify settings for a health check, - // AWS Cloud Map associates the health check with all the Route 53 DNS records - // that you specify in DnsConfig. + // Public DNS and HTTP namespaces only. A complex type that contains settings + // for an optional Route 53 health check. If you specify settings for a health + // check, AWS Cloud Map associates the health check with all the Route 53 DNS + // records that you specify in DnsConfig. // // If you specify a health check configuration, you can specify either HealthCheckCustomConfig // or HealthCheckConfig but not both. @@ -2455,10 +2462,27 @@ type CreateServiceInput struct { // // If you specify a health check configuration, you can specify either HealthCheckCustomConfig // or HealthCheckConfig but not both. + // + // You can't add, update, or delete a HealthCheckCustomConfig configuration + // from an existing service. HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` // The name that you want to assign to the service. // + // If you want AWS Cloud Map to create an SRV record when you register an instance, + // and if you're using a system that requires a specific SRV format, such as + // HAProxy (http://www.haproxy.org/), specify the following for Name: + // + // * Start the name with an underscore (_), such as _exampleservice + // + // * End the name with ._protocol, such as ._tcp + // + // When you register an instance, AWS Cloud Map creates an SRV record and assigns + // a name to the record by concatenating the service name and the namespace + // name, for example: + // + // _exampleservice._tcp.example.com + // // Name is a required field Name *string `type:"string" required:"true"` @@ -2572,8 +2596,8 @@ func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput { // The health check for the instance that is specified by ServiceId and InstanceId // is not a custom health check. type CustomHealthNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2590,17 +2614,17 @@ func (s CustomHealthNotFound) GoString() string { func newErrorCustomHealthNotFound(v protocol.ResponseMetadata) error { return &CustomHealthNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CustomHealthNotFound) Code() string { +func (s *CustomHealthNotFound) Code() string { return "CustomHealthNotFound" } // Message returns the exception's message. -func (s CustomHealthNotFound) Message() string { +func (s *CustomHealthNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2608,22 +2632,22 @@ func (s CustomHealthNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CustomHealthNotFound) OrigErr() error { +func (s *CustomHealthNotFound) OrigErr() error { return nil } -func (s CustomHealthNotFound) Error() string { +func (s *CustomHealthNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CustomHealthNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CustomHealthNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CustomHealthNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *CustomHealthNotFound) RequestID() string { + return s.RespMetadata.RequestID } type DeleteNamespaceInput struct { @@ -2668,7 +2692,7 @@ type DeleteNamespaceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. + // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } @@ -2743,7 +2767,8 @@ func (s DeleteServiceOutput) GoString() string { type DeregisterInstanceInput struct { _ struct{} `type:"structure"` - // The value that you specified for Id in the RegisterInstance request. + // The value that you specified for Id in the RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) + // request. // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` @@ -2796,7 +2821,7 @@ type DeregisterInstanceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // For more information, see GetOperation. + // For more information, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } @@ -2822,9 +2847,9 @@ type DiscoverInstancesInput struct { // The health status of the instances that you want to discover. HealthStatus *string `type:"string" enum:"HealthStatusFilter"` - // The maximum number of instances that you want Cloud Map to return in the - // response to a DiscoverInstances request. If you don't specify a value for - // MaxResults, Cloud Map returns up to 100 instances. + // The maximum number of instances that you want AWS Cloud Map to return in + // the response to a DiscoverInstances request. If you don't specify a value + // for MaxResults, AWS Cloud Map returns up to 100 instances. MaxResults *int64 `min:"1" type:"integer"` // The name of the namespace that you specified when you registered the instance. @@ -2966,7 +2991,7 @@ type DnsConfig struct { // all instances are healthy and returns the values for up to eight instances. // // For more information about the multivalue routing policy, see Multivalue - // Answer Routing (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) + // Answer Routing (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) // in the Route 53 Developer Guide. // // WEIGHTED @@ -2987,7 +3012,7 @@ type DnsConfig struct { // selected instance. // // For more information about the weighted routing policy, see Weighted Routing - // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) + // (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) // in the Route 53 Developer Guide. RoutingPolicy *string `type:"string" enum:"RoutingPolicy"` } @@ -3130,30 +3155,34 @@ type DnsRecord struct { // // Alias records don't include a TTL because Route 53 uses the TTL for the AWS // resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME - // attribute when you submit a RegisterInstance request, the TTL value is ignored. - // Always specify a TTL for the service; you can use a service to register instances - // that create either alias or non-alias records. + // attribute when you submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) + // request, the TTL value is ignored. Always specify a TTL for the service; + // you can use a service to register instances that create either alias or non-alias + // records. // // TTL is a required field TTL *int64 `type:"long" required:"true"` // The type of the resource, which indicates the type of value that Route 53 - // returns in response to DNS queries. + // returns in response to DNS queries. You can specify values for Type in the + // following combinations: // - // Note the following: + // * A // - // * A, AAAA, and SRV records: You can specify settings for a maximum of - // one A, one AAAA, and one SRV record. You can specify them in any combination. + // * AAAA // - // * CNAME records: If you specify CNAME for Type, you can't define any other - // records. This is a limitation of DNS: you can't create a CNAME record - // and any other type of record that has the same name as a CNAME record. + // * A and AAAA // - // * Alias records: If you want AWS Cloud Map to create a Route 53 alias - // record when you register an instance, specify A or AAAA for Type. + // * SRV // - // * All records: You specify settings other than TTL and Type when you register - // an instance. + // * CNAME + // + // If you want AWS Cloud Map to create a Route 53 alias record when you register + // an instance, specify A or AAAA for Type. + // + // You specify other settings, such as the IP address for A and AAAA records, + // when you register an instance. For more information, see RegisterInstance + // (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html). // // The following values are supported: // @@ -3171,7 +3200,8 @@ type DnsRecord struct { // Note the following: // // * You specify the domain name that you want to route traffic to when you - // register an instance. For more information, see RegisterInstanceRequest$Attributes. + // register an instance. For more information, see Attributes (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#cloudmap-RegisterInstance-request-Attributes) + // in the topic RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html). // // * You must specify WEIGHTED for the value of RoutingPolicy. // @@ -3190,7 +3220,8 @@ type DnsRecord struct { // * The values of priority and weight are both set to 1 and can't be changed. // // * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT - // attribute when you submit a RegisterInstance request. + // attribute when you submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) + // request. // // * The value of service-hostname is a concatenation of the following values: // The value that you specify for InstanceId when you register an instance. @@ -3199,10 +3230,17 @@ type DnsRecord struct { // name of the namespace is example.com, the value of service-hostname is: // test.backend.example.com // - // If you specify settings for an SRV record and if you specify values for AWS_INSTANCE_IPV4, - // AWS_INSTANCE_IPV6, or both in the RegisterInstance request, AWS Cloud Map - // automatically creates A and/or AAAA records that have the same name as the - // value of service-hostname in the SRV record. You can ignore these records. + // If you specify settings for an SRV record, note the following: + // + // * If you specify values for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both + // in the RegisterInstance request, AWS Cloud Map automatically creates A + // and/or AAAA records that have the same name as the value of service-hostname + // in the SRV record. You can ignore these records. + // + // * If you're using a system that requires a specific SRV format, such as + // HAProxy, see the Name (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html#cloudmap-CreateService-request-Name) + // element in the documentation about CreateService for information about + // how to specify the correct name format. // // Type is a required field Type *string `type:"string" required:"true" enum:"RecordType"` @@ -3248,8 +3286,8 @@ func (s *DnsRecord) SetType(v string) *DnsRecord { // The operation is already in progress. type DuplicateRequest struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The ID of the operation that is already in progress. DuplicateOperationId *string `type:"string"` @@ -3269,17 +3307,17 @@ func (s DuplicateRequest) GoString() string { func newErrorDuplicateRequest(v protocol.ResponseMetadata) error { return &DuplicateRequest{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateRequest) Code() string { +func (s *DuplicateRequest) Code() string { return "DuplicateRequest" } // Message returns the exception's message. -func (s DuplicateRequest) Message() string { +func (s *DuplicateRequest) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3287,22 +3325,22 @@ func (s DuplicateRequest) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateRequest) OrigErr() error { +func (s *DuplicateRequest) OrigErr() error { return nil } -func (s DuplicateRequest) Error() string { +func (s *DuplicateRequest) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateRequest) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateRequest) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateRequest) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateRequest) RequestID() string { + return s.RespMetadata.RequestID } type GetInstanceInput struct { @@ -3390,7 +3428,8 @@ type GetInstancesHealthStatusInput struct { // instances that are associated with the specified service. // // To get the IDs for the instances that you've registered by using a specified - // service, submit a ListInstances request. + // service, submit a ListInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html) + // request. Instances []*string `min:"1" type:"list"` // The maximum number of instances that you want AWS Cloud Map to return in @@ -3682,9 +3721,10 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { return s } -// Public DNS namespaces only. A complex type that contains settings for an -// optional health check. If you specify settings for a health check, AWS Cloud -// Map associates the health check with the records that you specify in DnsConfig. +// Public DNS and HTTP namespaces only. A complex type that contains settings +// for an optional health check. If you specify settings for a health check, +// AWS Cloud Map associates the health check with the records that you specify +// in DnsConfig. // // If you specify a health check configuration, you can specify either HealthCheckCustomConfig // or HealthCheckConfig but not both. @@ -3719,7 +3759,7 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { // Health checking regions // // Health checkers perform checks from all Route 53 health-checking regions. -// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). +// For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). // // Alias records // @@ -3729,7 +3769,7 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. // When EvaluateTargetHealth is true, the alias record inherits the health // of the referenced AWS resource. such as an ELB load balancer. For more -// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). +// information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). // // * If you include HealthCheckConfig and then use the service to register // an instance that creates an alias record, Route 53 doesn't create the @@ -3746,7 +3786,7 @@ type HealthCheckConfig struct { // The number of consecutive health checks that an endpoint must pass or fail // for Route 53 to change the current status of the endpoint from unhealthy // to healthy or vice versa. For more information, see How Route 53 Determines - // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Route 53 Developer Guide. FailureThreshold *int64 `min:"1" type:"integer"` @@ -3779,7 +3819,7 @@ type HealthCheckConfig struct { // for Type, don't specify a value for ResourcePath. // // For more information, see How Route 53 Determines Whether an Endpoint Is - // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Route 53 Developer Guide. // // Type is a required field @@ -3848,8 +3888,8 @@ func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { // or HealthCheckConfig but not both. // // To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus -// request. Cloud Map doesn't monitor the status of the resource, it just keeps -// a record of the status specified in the most recent UpdateInstanceCustomHealthStatus +// request. AWS Cloud Map doesn't monitor the status of the resource, it just +// keeps a record of the status specified in the most recent UpdateInstanceCustomHealthStatus // request. // // Here's how custom health checks work: @@ -3858,6 +3898,7 @@ func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { // // The failure threshold indicates the number of 30-second intervals you want // AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus +// (https://docs.aws.amazon.com/cloud-map/latest/api/API_UpdateInstanceCustomHealthStatus.html) // request and the time that AWS Cloud Map stops routing internet traffic to // the corresponding resource. // @@ -3878,22 +3919,20 @@ func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { // If another UpdateInstanceCustomHealthStatus request doesn't arrive during // that time to change the status back to healthy, AWS Cloud Map stops routing // traffic to the resource. -// -// Note the following about configuring custom health checks. type HealthCheckCustomConfig struct { _ struct{} `type:"structure"` - // The number of 30-second intervals that you want Cloud Map to wait after receiving - // an UpdateInstanceCustomHealthStatus request before it changes the health - // status of a service instance. For example, suppose you specify a value of - // 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus - // request. Cloud Map waits for approximately 60 seconds (2 x 30) before changing - // the status of the service instance based on that request. + // The number of 30-second intervals that you want AWS Cloud Map to wait after + // receiving an UpdateInstanceCustomHealthStatus request before it changes the + // health status of a service instance. For example, suppose you specify a value + // of 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus + // request. AWS Cloud Map waits for approximately 60 seconds (2 x 30) before + // changing the status of the service instance based on that request. // // Sending a second or subsequent UpdateInstanceCustomHealthStatus request with // the same value before FailureThreshold x 30 seconds has passed doesn't accelerate - // the change. Cloud Map still waits FailureThreshold x 30 seconds after the - // first request to make the change. + // the change. AWS Cloud Map still waits FailureThreshold x 30 seconds after + // the first request to make the change. FailureThreshold *int64 `min:"1" type:"integer"` } @@ -3926,9 +3965,9 @@ func (s *HealthCheckCustomConfig) SetFailureThreshold(v int64) *HealthCheckCusto return s } -// In a response to a DiscoverInstance request, HttpInstanceSummary contains -// information about one instance that matches the values that you specified -// in the request. +// In a response to a DiscoverInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) +// request, HttpInstanceSummary contains information about one instance that +// matches the values that you specified in the request. type HttpInstanceSummary struct { _ struct{} `type:"structure"` @@ -4033,7 +4072,7 @@ type Instance struct { // If you want AWS Cloud Map to create a Route 53 alias record that routes traffic // to an Elastic Load Balancing load balancer, specify the DNS name that is // associated with the load balancer. For information about how to get the DNS - // name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). + // name, see "DNSName" in the topic AliasTarget (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). // // Note the following: // @@ -4087,8 +4126,8 @@ type Instance struct { // If the service includes HealthCheckConfig, the port on the endpoint that // you want Route 53 to send requests to. // - // This value is required if you specified settings for an SRV record when you - // created the service. + // This value is required if you specified settings for an SRV record or a Route + // 53 health check when you created the service. Attributes map[string]*string `type:"map"` // A unique string that identifies the request and that allows failed RegisterInstance @@ -4103,7 +4142,8 @@ type Instance struct { // // * If the service that is specified by ServiceId includes settings for // an SRV record, the value of InstanceId is automatically included as part - // of the value for the SRV record. For more information, see DnsRecord$Type. + // of the value for the SRV record. For more information, see DnsRecord > + // Type (https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type). // // * You can use this value to update an existing instance. // @@ -4151,8 +4191,8 @@ func (s *Instance) SetId(v string) *Instance { // No instance exists with the specified ID, or the instance was recently registered, // and information about the instance hasn't propagated yet. type InstanceNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4169,17 +4209,17 @@ func (s InstanceNotFound) GoString() string { func newErrorInstanceNotFound(v protocol.ResponseMetadata) error { return &InstanceNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InstanceNotFound) Code() string { +func (s *InstanceNotFound) Code() string { return "InstanceNotFound" } // Message returns the exception's message. -func (s InstanceNotFound) Message() string { +func (s *InstanceNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4187,22 +4227,22 @@ func (s InstanceNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InstanceNotFound) OrigErr() error { +func (s *InstanceNotFound) OrigErr() error { return nil } -func (s InstanceNotFound) Error() string { +func (s *InstanceNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InstanceNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InstanceNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InstanceNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *InstanceNotFound) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that contains information about the instances that you registered @@ -4266,8 +4306,8 @@ func (s *InstanceSummary) SetId(v string) *InstanceSummary { // might be missing, a numeric value might be outside the allowed range, or // a string value might exceed length constraints. type InvalidInput struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4284,17 +4324,17 @@ func (s InvalidInput) GoString() string { func newErrorInvalidInput(v protocol.ResponseMetadata) error { return &InvalidInput{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInput) Code() string { +func (s *InvalidInput) Code() string { return "InvalidInput" } // Message returns the exception's message. -func (s InvalidInput) Message() string { +func (s *InvalidInput) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4302,22 +4342,22 @@ func (s InvalidInput) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInput) OrigErr() error { +func (s *InvalidInput) OrigErr() error { return nil } -func (s InvalidInput) Error() string { +func (s *InvalidInput) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInput) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInput) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInput) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInput) RequestID() string { + return s.RespMetadata.RequestID } type ListInstancesInput struct { @@ -4811,7 +4851,17 @@ type Namespace struct { // The number of services that are associated with the namespace. ServiceCount *int64 `type:"integer"` - // The type of the namespace. Valid values are DNS_PUBLIC and DNS_PRIVATE. + // The type of the namespace. The methods for discovering instances depends + // on the value that you specify: + // + // * HTTP: Instances can be discovered only programmatically, using the AWS + // Cloud Map DiscoverInstances API. + // + // * DNS_PUBLIC: Instances can be discovered using public DNS queries and + // using the DiscoverInstances API. + // + // * DNS_PRIVATE: Instances can be discovered using DNS queries in VPCs and + // using the DiscoverInstances API. Type *string `type:"string" enum:"NamespaceType"` } @@ -4881,8 +4931,8 @@ func (s *Namespace) SetType(v string) *Namespace { // The namespace that you're trying to create already exists. type NamespaceAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The CreatorRequestId that was used to create the namespace. CreatorRequestId *string `type:"string"` @@ -4905,17 +4955,17 @@ func (s NamespaceAlreadyExists) GoString() string { func newErrorNamespaceAlreadyExists(v protocol.ResponseMetadata) error { return &NamespaceAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NamespaceAlreadyExists) Code() string { +func (s *NamespaceAlreadyExists) Code() string { return "NamespaceAlreadyExists" } // Message returns the exception's message. -func (s NamespaceAlreadyExists) Message() string { +func (s *NamespaceAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4923,22 +4973,22 @@ func (s NamespaceAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NamespaceAlreadyExists) OrigErr() error { +func (s *NamespaceAlreadyExists) OrigErr() error { return nil } -func (s NamespaceAlreadyExists) Error() string { +func (s *NamespaceAlreadyExists) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s NamespaceAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NamespaceAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NamespaceAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *NamespaceAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that identifies the namespaces that you want to list. You @@ -5019,8 +5069,8 @@ func (s *NamespaceFilter) SetValues(v []*string) *NamespaceFilter { // No namespace exists with the specified ID. type NamespaceNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5037,17 +5087,17 @@ func (s NamespaceNotFound) GoString() string { func newErrorNamespaceNotFound(v protocol.ResponseMetadata) error { return &NamespaceNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NamespaceNotFound) Code() string { +func (s *NamespaceNotFound) Code() string { return "NamespaceNotFound" } // Message returns the exception's message. -func (s NamespaceNotFound) Message() string { +func (s *NamespaceNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5055,22 +5105,22 @@ func (s NamespaceNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NamespaceNotFound) OrigErr() error { +func (s *NamespaceNotFound) OrigErr() error { return nil } -func (s NamespaceNotFound) Error() string { +func (s *NamespaceNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NamespaceNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NamespaceNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NamespaceNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *NamespaceNotFound) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that contains information that is specific to the namespace @@ -5423,8 +5473,8 @@ func (s *OperationFilter) SetValues(v []*string) *OperationFilter { // No operation exists with the specified ID. type OperationNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5441,17 +5491,17 @@ func (s OperationNotFound) GoString() string { func newErrorOperationNotFound(v protocol.ResponseMetadata) error { return &OperationNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotFound) Code() string { +func (s *OperationNotFound) Code() string { return "OperationNotFound" } // Message returns the exception's message. -func (s OperationNotFound) Message() string { +func (s *OperationNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5459,26 +5509,27 @@ func (s OperationNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotFound) OrigErr() error { +func (s *OperationNotFound) OrigErr() error { return nil } -func (s OperationNotFound) Error() string { +func (s *OperationNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotFound) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that contains information about an operation that matches -// the criteria that you specified in a ListOperations request. +// the criteria that you specified in a ListOperations (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html) +// request. type OperationSummary struct { _ struct{} `type:"structure"` @@ -5537,7 +5588,7 @@ type RegisterInstanceInput struct { // If you want AWS Cloud Map to create an Amazon Route 53 alias record that // routes traffic to an Elastic Load Balancing load balancer, specify the DNS // name that is associated with the load balancer. For information about how - // to get the DNS name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html) + // to get the DNS name, see "DNSName" in the topic AliasTarget (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html) // in the Route 53 API Reference. // // Note the following: @@ -5599,8 +5650,8 @@ type RegisterInstanceInput struct { // If the service includes HealthCheckConfig, the port on the endpoint that // you want Route 53 to send requests to. // - // This value is required if you specified settings for an SRV record when you - // created the service. + // This value is required if you specified settings for an SRV record or a Route + // 53 health check when you created the service. // // Custom attributes // @@ -5623,7 +5674,8 @@ type RegisterInstanceInput struct { // // * If the service that is specified by ServiceId includes settings for // an SRV record, the value of InstanceId is automatically included as part - // of the value for the SRV record. For more information, see DnsRecord$Type. + // of the value for the SRV record. For more information, see DnsRecord > + // Type (https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type). // // * You can use this value to update an existing instance. // @@ -5702,7 +5754,7 @@ type RegisterInstanceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. + // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } @@ -5725,8 +5777,8 @@ func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutpu // The specified resource can't be deleted because it contains other resources. // For example, you can't delete a service that contains any instances. type ResourceInUse struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5743,17 +5795,17 @@ func (s ResourceInUse) GoString() string { func newErrorResourceInUse(v protocol.ResponseMetadata) error { return &ResourceInUse{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUse) Code() string { +func (s *ResourceInUse) Code() string { return "ResourceInUse" } // Message returns the exception's message. -func (s ResourceInUse) Message() string { +func (s *ResourceInUse) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5761,29 +5813,29 @@ func (s ResourceInUse) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUse) OrigErr() error { +func (s *ResourceInUse) OrigErr() error { return nil } -func (s ResourceInUse) Error() string { +func (s *ResourceInUse) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUse) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUse) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUse) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUse) RequestID() string { + return s.RespMetadata.RequestID } // The resource can't be created because you've reached the limit on the number // of resources. type ResourceLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5800,17 +5852,17 @@ func (s ResourceLimitExceeded) GoString() string { func newErrorResourceLimitExceeded(v protocol.ResponseMetadata) error { return &ResourceLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceeded) Code() string { +func (s *ResourceLimitExceeded) Code() string { return "ResourceLimitExceeded" } // Message returns the exception's message. -func (s ResourceLimitExceeded) Message() string { +func (s *ResourceLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5818,22 +5870,22 @@ func (s ResourceLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceeded) OrigErr() error { +func (s *ResourceLimitExceeded) OrigErr() error { return nil } -func (s ResourceLimitExceeded) Error() string { +func (s *ResourceLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that contains information about the specified service. @@ -5862,9 +5914,10 @@ type Service struct { // you want AWS Cloud Map to create when you register an instance. DnsConfig *DnsConfig `type:"structure"` - // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, AWS Cloud - // Map associates the health check with the records that you specify in DnsConfig. + // Public DNS and HTTP namespaces only. A complex type that contains settings + // for an optional health check. If you specify settings for a health check, + // AWS Cloud Map associates the health check with the records that you specify + // in DnsConfig. // // For information about the charges for health checks, see Amazon Route 53 // Pricing (http://aws.amazon.com/route53/pricing/). @@ -5882,7 +5935,8 @@ type Service struct { // The number of instances that are currently associated with the service. Instances // that were previously associated with the service but that have been deleted - // are not included in the count. + // are not included in the count. The count might not reflect pending registrations + // and deregistrations. InstanceCount *int64 `type:"integer"` // The name of the service. @@ -5971,8 +6025,8 @@ func (s *Service) SetNamespaceId(v string) *Service { // The service can't be created because a service with the same name already // exists. type ServiceAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The CreatorRequestId that was used to create the service. CreatorRequestId *string `type:"string"` @@ -5995,17 +6049,17 @@ func (s ServiceAlreadyExists) GoString() string { func newErrorServiceAlreadyExists(v protocol.ResponseMetadata) error { return &ServiceAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceAlreadyExists) Code() string { +func (s *ServiceAlreadyExists) Code() string { return "ServiceAlreadyExists" } // Message returns the exception's message. -func (s ServiceAlreadyExists) Message() string { +func (s *ServiceAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6013,22 +6067,22 @@ func (s ServiceAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceAlreadyExists) OrigErr() error { +func (s *ServiceAlreadyExists) OrigErr() error { return nil } -func (s ServiceAlreadyExists) Error() string { +func (s *ServiceAlreadyExists) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that contains changes to an existing service. @@ -6044,9 +6098,10 @@ type ServiceChange struct { // DnsConfig is a required field DnsConfig *DnsConfigChange `type:"structure" required:"true"` - // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, AWS Cloud - // Map associates the health check with the records that you specify in DnsConfig. + // Public DNS and HTTP namespaces only. A complex type that contains settings + // for an optional health check. If you specify settings for a health check, + // AWS Cloud Map associates the health check with the records that you specify + // in DnsConfig. // // If you specify a health check configuration, you can specify either HealthCheckCustomConfig // or HealthCheckConfig but not both. @@ -6081,7 +6136,7 @@ type ServiceChange struct { // Health checking regions // // Health checkers perform checks from all Route 53 health-checking regions. - // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). + // For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). // // Alias records // @@ -6091,7 +6146,7 @@ type ServiceChange struct { // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. // When EvaluateTargetHealth is true, the alias record inherits the health // of the referenced AWS resource. such as an ELB load balancer. For more - // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). + // information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). // // * If you include HealthCheckConfig and then use the service to register // an instance that creates an alias record, Route 53 doesn't create the @@ -6231,8 +6286,8 @@ func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter { // No service exists with the specified ID. type ServiceNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6249,17 +6304,17 @@ func (s ServiceNotFound) GoString() string { func newErrorServiceNotFound(v protocol.ResponseMetadata) error { return &ServiceNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceNotFound) Code() string { +func (s *ServiceNotFound) Code() string { return "ServiceNotFound" } // Message returns the exception's message. -func (s ServiceNotFound) Message() string { +func (s *ServiceNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6267,22 +6322,22 @@ func (s ServiceNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceNotFound) OrigErr() error { +func (s *ServiceNotFound) OrigErr() error { return nil } -func (s ServiceNotFound) Error() string { +func (s *ServiceNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceNotFound) RequestID() string { + return s.RespMetadata.RequestID } // A complex type that contains information about a specified service. @@ -6303,9 +6358,10 @@ type ServiceSummary struct { // that you want AWS Cloud Map to create when you register an instance. DnsConfig *DnsConfig `type:"structure"` - // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, AWS Cloud - // Map associates the health check with the records that you specify in DnsConfig. + // Public DNS and HTTP namespaces only. A complex type that contains settings + // for an optional health check. If you specify settings for a health check, + // AWS Cloud Map associates the health check with the records that you specify + // in DnsConfig. // // If you specify a health check configuration, you can specify either HealthCheckCustomConfig // or HealthCheckConfig but not both. @@ -6340,7 +6396,7 @@ type ServiceSummary struct { // Health checking regions // // Health checkers perform checks from all Route 53 health-checking regions. - // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). + // For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). // // Alias records // @@ -6350,7 +6406,7 @@ type ServiceSummary struct { // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. // When EvaluateTargetHealth is true, the alias record inherits the health // of the referenced AWS resource. such as an ELB load balancer. For more - // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). + // information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). // // * If you include HealthCheckConfig and then use the service to register // an instance that creates an alias record, Route 53 doesn't create the @@ -6381,8 +6437,8 @@ type ServiceSummary struct { // or HealthCheckConfig but not both. // // To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus - // request. Cloud Map doesn't monitor the status of the resource, it just keeps - // a record of the status specified in the most recent UpdateInstanceCustomHealthStatus + // request. AWS Cloud Map doesn't monitor the status of the resource, it just + // keeps a record of the status specified in the most recent UpdateInstanceCustomHealthStatus // request. // // Here's how custom health checks work: @@ -6391,6 +6447,7 @@ type ServiceSummary struct { // // The failure threshold indicates the number of 30-second intervals you want // AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus + // (https://docs.aws.amazon.com/cloud-map/latest/api/API_UpdateInstanceCustomHealthStatus.html) // request and the time that AWS Cloud Map stops routing internet traffic to // the corresponding resource. // @@ -6411,8 +6468,6 @@ type ServiceSummary struct { // If another UpdateInstanceCustomHealthStatus request doesn't arrive during // that time to change the status back to healthy, AWS Cloud Map stops routing // traffic to the resource. - // - // Note the following about configuring custom health checks. HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` // The ID that AWS Cloud Map assigned to the service when you created it. @@ -6420,7 +6475,8 @@ type ServiceSummary struct { // The number of instances that are currently associated with the service. Instances // that were previously associated with the service but that have been deleted - // are not included in the count. + // are not included in the count. The count might not reflect pending registrations + // and deregistrations. InstanceCount *int64 `type:"integer"` // The name of the service. @@ -6633,7 +6689,7 @@ type UpdateServiceOutput struct { _ struct{} `type:"structure"` // A value that you can use to determine whether the request completed successfully. - // To get the status of the operation, see GetOperation. + // To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html). OperationId *string `type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicequotas/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicequotas/api.go index e1df5bbc1b9..60a0a84ac66 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicequotas/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicequotas/api.go @@ -2008,8 +2008,8 @@ func (c *ServiceQuotas) RequestServiceQuotaIncreaseWithContext(ctx aws.Context, // The action you attempted is not allowed unless Service Access with Service // Quotas is enabled in your organization. To enable, call AssociateServiceQuotaTemplate. type AWSServiceAccessNotEnabledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2026,17 +2026,17 @@ func (s AWSServiceAccessNotEnabledException) GoString() string { func newErrorAWSServiceAccessNotEnabledException(v protocol.ResponseMetadata) error { return &AWSServiceAccessNotEnabledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AWSServiceAccessNotEnabledException) Code() string { +func (s *AWSServiceAccessNotEnabledException) Code() string { return "AWSServiceAccessNotEnabledException" } // Message returns the exception's message. -func (s AWSServiceAccessNotEnabledException) Message() string { +func (s *AWSServiceAccessNotEnabledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2044,28 +2044,28 @@ func (s AWSServiceAccessNotEnabledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AWSServiceAccessNotEnabledException) OrigErr() error { +func (s *AWSServiceAccessNotEnabledException) OrigErr() error { return nil } -func (s AWSServiceAccessNotEnabledException) Error() string { +func (s *AWSServiceAccessNotEnabledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AWSServiceAccessNotEnabledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AWSServiceAccessNotEnabledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AWSServiceAccessNotEnabledException) RequestID() string { - return s.respMetadata.RequestID +func (s *AWSServiceAccessNotEnabledException) RequestID() string { + return s.RespMetadata.RequestID } // You do not have sufficient access to perform this action. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2082,17 +2082,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2100,22 +2100,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type AssociateServiceQuotaTemplateInput struct { @@ -2237,8 +2237,8 @@ func (s DeleteServiceQuotaIncreaseRequestFromTemplateOutput) GoString() string { // You can't perform this action because a dependency does not have access. type DependencyAccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2255,17 +2255,17 @@ func (s DependencyAccessDeniedException) GoString() string { func newErrorDependencyAccessDeniedException(v protocol.ResponseMetadata) error { return &DependencyAccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DependencyAccessDeniedException) Code() string { +func (s *DependencyAccessDeniedException) Code() string { return "DependencyAccessDeniedException" } // Message returns the exception's message. -func (s DependencyAccessDeniedException) Message() string { +func (s *DependencyAccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2273,22 +2273,22 @@ func (s DependencyAccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DependencyAccessDeniedException) OrigErr() error { +func (s *DependencyAccessDeniedException) OrigErr() error { return nil } -func (s DependencyAccessDeniedException) Error() string { +func (s *DependencyAccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DependencyAccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DependencyAccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DependencyAccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DependencyAccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } type DisassociateServiceQuotaTemplateInput struct { @@ -2731,8 +2731,8 @@ func (s *GetServiceQuotaOutput) SetQuota(v *ServiceQuota) *GetServiceQuotaOutput // Invalid input was provided. type IllegalArgumentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2749,17 +2749,17 @@ func (s IllegalArgumentException) GoString() string { func newErrorIllegalArgumentException(v protocol.ResponseMetadata) error { return &IllegalArgumentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IllegalArgumentException) Code() string { +func (s *IllegalArgumentException) Code() string { return "IllegalArgumentException" } // Message returns the exception's message. -func (s IllegalArgumentException) Message() string { +func (s *IllegalArgumentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2767,28 +2767,28 @@ func (s IllegalArgumentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IllegalArgumentException) OrigErr() error { +func (s *IllegalArgumentException) OrigErr() error { return nil } -func (s IllegalArgumentException) Error() string { +func (s *IllegalArgumentException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IllegalArgumentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IllegalArgumentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IllegalArgumentException) RequestID() string { - return s.respMetadata.RequestID +func (s *IllegalArgumentException) RequestID() string { + return s.RespMetadata.RequestID } // Invalid input was provided. type InvalidPaginationTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2805,17 +2805,17 @@ func (s InvalidPaginationTokenException) GoString() string { func newErrorInvalidPaginationTokenException(v protocol.ResponseMetadata) error { return &InvalidPaginationTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPaginationTokenException) Code() string { +func (s *InvalidPaginationTokenException) Code() string { return "InvalidPaginationTokenException" } // Message returns the exception's message. -func (s InvalidPaginationTokenException) Message() string { +func (s *InvalidPaginationTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2823,28 +2823,28 @@ func (s InvalidPaginationTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPaginationTokenException) OrigErr() error { +func (s *InvalidPaginationTokenException) OrigErr() error { return nil } -func (s InvalidPaginationTokenException) Error() string { +func (s *InvalidPaginationTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPaginationTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPaginationTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPaginationTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPaginationTokenException) RequestID() string { + return s.RespMetadata.RequestID } // Invalid input was provided for the . type InvalidResourceStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -2861,17 +2861,17 @@ func (s InvalidResourceStateException) GoString() string { func newErrorInvalidResourceStateException(v protocol.ResponseMetadata) error { return &InvalidResourceStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceStateException) Code() string { +func (s *InvalidResourceStateException) Code() string { return "InvalidResourceStateException" } // Message returns the exception's message. -func (s InvalidResourceStateException) Message() string { +func (s *InvalidResourceStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2879,22 +2879,22 @@ func (s InvalidResourceStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceStateException) OrigErr() error { +func (s *InvalidResourceStateException) OrigErr() error { return nil } -func (s InvalidResourceStateException) Error() string { +func (s *InvalidResourceStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceStateException) RequestID() string { + return s.RespMetadata.RequestID } type ListAWSDefaultServiceQuotasInput struct { @@ -3638,8 +3638,8 @@ func (s *MetricInfo) SetMetricStatisticRecommendation(v string) *MetricInfo { // The account making this call is not a member of an organization. type NoAvailableOrganizationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3656,17 +3656,17 @@ func (s NoAvailableOrganizationException) GoString() string { func newErrorNoAvailableOrganizationException(v protocol.ResponseMetadata) error { return &NoAvailableOrganizationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoAvailableOrganizationException) Code() string { +func (s *NoAvailableOrganizationException) Code() string { return "NoAvailableOrganizationException" } // Message returns the exception's message. -func (s NoAvailableOrganizationException) Message() string { +func (s *NoAvailableOrganizationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3674,28 +3674,28 @@ func (s NoAvailableOrganizationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoAvailableOrganizationException) OrigErr() error { +func (s *NoAvailableOrganizationException) OrigErr() error { return nil } -func (s NoAvailableOrganizationException) Error() string { +func (s *NoAvailableOrganizationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoAvailableOrganizationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoAvailableOrganizationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoAvailableOrganizationException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoAvailableOrganizationException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource does not exist. type NoSuchResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3712,17 +3712,17 @@ func (s NoSuchResourceException) GoString() string { func newErrorNoSuchResourceException(v protocol.ResponseMetadata) error { return &NoSuchResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoSuchResourceException) Code() string { +func (s *NoSuchResourceException) Code() string { return "NoSuchResourceException" } // Message returns the exception's message. -func (s NoSuchResourceException) Message() string { +func (s *NoSuchResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3730,29 +3730,29 @@ func (s NoSuchResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoSuchResourceException) OrigErr() error { +func (s *NoSuchResourceException) OrigErr() error { return nil } -func (s NoSuchResourceException) Error() string { +func (s *NoSuchResourceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoSuchResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoSuchResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoSuchResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoSuchResourceException) RequestID() string { + return s.RespMetadata.RequestID } // The organization that your account belongs to, is not in All Features mode. // To enable all features mode, see EnableAllFeatures (https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAllFeatures.html). type OrganizationNotInAllFeaturesModeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3769,17 +3769,17 @@ func (s OrganizationNotInAllFeaturesModeException) GoString() string { func newErrorOrganizationNotInAllFeaturesModeException(v protocol.ResponseMetadata) error { return &OrganizationNotInAllFeaturesModeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationNotInAllFeaturesModeException) Code() string { +func (s *OrganizationNotInAllFeaturesModeException) Code() string { return "OrganizationNotInAllFeaturesModeException" } // Message returns the exception's message. -func (s OrganizationNotInAllFeaturesModeException) Message() string { +func (s *OrganizationNotInAllFeaturesModeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3787,22 +3787,22 @@ func (s OrganizationNotInAllFeaturesModeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationNotInAllFeaturesModeException) OrigErr() error { +func (s *OrganizationNotInAllFeaturesModeException) OrigErr() error { return nil } -func (s OrganizationNotInAllFeaturesModeException) Error() string { +func (s *OrganizationNotInAllFeaturesModeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationNotInAllFeaturesModeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationNotInAllFeaturesModeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationNotInAllFeaturesModeException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationNotInAllFeaturesModeException) RequestID() string { + return s.RespMetadata.RequestID } type PutServiceQuotaIncreaseRequestIntoTemplateInput struct { @@ -3921,8 +3921,8 @@ func (s *PutServiceQuotaIncreaseRequestIntoTemplateOutput) SetServiceQuotaIncrea // some of the relevant resources, or use Service Quotas to request a service // quota increase. type QuotaExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3939,17 +3939,17 @@ func (s QuotaExceededException) GoString() string { func newErrorQuotaExceededException(v protocol.ResponseMetadata) error { return &QuotaExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s QuotaExceededException) Code() string { +func (s *QuotaExceededException) Code() string { return "QuotaExceededException" } // Message returns the exception's message. -func (s QuotaExceededException) Message() string { +func (s *QuotaExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3957,22 +3957,22 @@ func (s QuotaExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s QuotaExceededException) OrigErr() error { +func (s *QuotaExceededException) OrigErr() error { return nil } -func (s QuotaExceededException) Error() string { +func (s *QuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s QuotaExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *QuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s QuotaExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *QuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A structure that contains information about the quota period. @@ -4248,8 +4248,8 @@ func (s *RequestedServiceQuotaChange) SetUnit(v string) *RequestedServiceQuotaCh // The specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4266,17 +4266,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4284,28 +4284,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Something went wrong. type ServiceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4322,17 +4322,17 @@ func (s ServiceException) GoString() string { func newErrorServiceException(v protocol.ResponseMetadata) error { return &ServiceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceException) Code() string { +func (s *ServiceException) Code() string { return "ServiceException" } // Message returns the exception's message. -func (s ServiceException) Message() string { +func (s *ServiceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4340,22 +4340,22 @@ func (s ServiceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceException) OrigErr() error { +func (s *ServiceException) OrigErr() error { return nil } -func (s ServiceException) Error() string { +func (s *ServiceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceException) RequestID() string { + return s.RespMetadata.RequestID } // A structure that contains the ServiceName and ServiceCode. It does not include @@ -4609,8 +4609,8 @@ func (s *ServiceQuotaIncreaseRequestInTemplate) SetUnit(v string) *ServiceQuotaI // // To use the template, call AssociateServiceQuotaTemplate. type ServiceQuotaTemplateNotInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4627,17 +4627,17 @@ func (s ServiceQuotaTemplateNotInUseException) GoString() string { func newErrorServiceQuotaTemplateNotInUseException(v protocol.ResponseMetadata) error { return &ServiceQuotaTemplateNotInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceQuotaTemplateNotInUseException) Code() string { +func (s *ServiceQuotaTemplateNotInUseException) Code() string { return "ServiceQuotaTemplateNotInUseException" } // Message returns the exception's message. -func (s ServiceQuotaTemplateNotInUseException) Message() string { +func (s *ServiceQuotaTemplateNotInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4645,29 +4645,29 @@ func (s ServiceQuotaTemplateNotInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceQuotaTemplateNotInUseException) OrigErr() error { +func (s *ServiceQuotaTemplateNotInUseException) OrigErr() error { return nil } -func (s ServiceQuotaTemplateNotInUseException) Error() string { +func (s *ServiceQuotaTemplateNotInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceQuotaTemplateNotInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceQuotaTemplateNotInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceQuotaTemplateNotInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceQuotaTemplateNotInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The Service Quotas template is not available in the Region where you are // making the request. Please make the request in us-east-1. type TemplatesNotAvailableInRegionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4684,17 +4684,17 @@ func (s TemplatesNotAvailableInRegionException) GoString() string { func newErrorTemplatesNotAvailableInRegionException(v protocol.ResponseMetadata) error { return &TemplatesNotAvailableInRegionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TemplatesNotAvailableInRegionException) Code() string { +func (s *TemplatesNotAvailableInRegionException) Code() string { return "TemplatesNotAvailableInRegionException" } // Message returns the exception's message. -func (s TemplatesNotAvailableInRegionException) Message() string { +func (s *TemplatesNotAvailableInRegionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4702,29 +4702,29 @@ func (s TemplatesNotAvailableInRegionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TemplatesNotAvailableInRegionException) OrigErr() error { +func (s *TemplatesNotAvailableInRegionException) OrigErr() error { return nil } -func (s TemplatesNotAvailableInRegionException) Error() string { +func (s *TemplatesNotAvailableInRegionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TemplatesNotAvailableInRegionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TemplatesNotAvailableInRegionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TemplatesNotAvailableInRegionException) RequestID() string { - return s.respMetadata.RequestID +func (s *TemplatesNotAvailableInRegionException) RequestID() string { + return s.RespMetadata.RequestID } // Due to throttling, the request was denied. Slow down the rate of request // calls, or request an increase for this quota. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4741,17 +4741,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4759,22 +4759,22 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } const ( 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 062b082f319..c93297216c7 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 @@ -2277,8 +2277,8 @@ func (c *SFN) UpdateStateMachineWithContext(ctx aws.Context, input *UpdateStateM // The specified activity does not exist. type ActivityDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2295,17 +2295,17 @@ func (s ActivityDoesNotExist) GoString() string { func newErrorActivityDoesNotExist(v protocol.ResponseMetadata) error { return &ActivityDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActivityDoesNotExist) Code() string { +func (s *ActivityDoesNotExist) Code() string { return "ActivityDoesNotExist" } // Message returns the exception's message. -func (s ActivityDoesNotExist) Message() string { +func (s *ActivityDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2313,22 +2313,22 @@ func (s ActivityDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActivityDoesNotExist) OrigErr() error { +func (s *ActivityDoesNotExist) OrigErr() error { return nil } -func (s ActivityDoesNotExist) Error() string { +func (s *ActivityDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ActivityDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActivityDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActivityDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *ActivityDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an activity that failed during an execution. @@ -2367,8 +2367,8 @@ func (s *ActivityFailedEventDetails) SetError(v string) *ActivityFailedEventDeta // The maximum number of activities has been reached. Existing activities must // be deleted before a new activity can be created. type ActivityLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2385,17 +2385,17 @@ func (s ActivityLimitExceeded) GoString() string { func newErrorActivityLimitExceeded(v protocol.ResponseMetadata) error { return &ActivityLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActivityLimitExceeded) Code() string { +func (s *ActivityLimitExceeded) Code() string { return "ActivityLimitExceeded" } // Message returns the exception's message. -func (s ActivityLimitExceeded) Message() string { +func (s *ActivityLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2403,22 +2403,22 @@ func (s ActivityLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActivityLimitExceeded) OrigErr() error { +func (s *ActivityLimitExceeded) OrigErr() error { return nil } -func (s ActivityLimitExceeded) Error() string { +func (s *ActivityLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ActivityLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActivityLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActivityLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ActivityLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an activity. @@ -2657,8 +2657,8 @@ func (s *ActivityTimedOutEventDetails) SetError(v string) *ActivityTimedOutEvent // The maximum number of workers concurrently polling for activity tasks has // been reached. type ActivityWorkerLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2675,17 +2675,17 @@ func (s ActivityWorkerLimitExceeded) GoString() string { func newErrorActivityWorkerLimitExceeded(v protocol.ResponseMetadata) error { return &ActivityWorkerLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ActivityWorkerLimitExceeded) Code() string { +func (s *ActivityWorkerLimitExceeded) Code() string { return "ActivityWorkerLimitExceeded" } // Message returns the exception's message. -func (s ActivityWorkerLimitExceeded) Message() string { +func (s *ActivityWorkerLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2693,22 +2693,22 @@ func (s ActivityWorkerLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ActivityWorkerLimitExceeded) OrigErr() error { +func (s *ActivityWorkerLimitExceeded) OrigErr() error { return nil } -func (s ActivityWorkerLimitExceeded) Error() string { +func (s *ActivityWorkerLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ActivityWorkerLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ActivityWorkerLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ActivityWorkerLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ActivityWorkerLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } type CloudWatchLogsLogGroup struct { @@ -3738,8 +3738,8 @@ func (s *ExecutionAbortedEventDetails) SetError(v string) *ExecutionAbortedEvent // // Executions with the same name and input are considered idempotent. type ExecutionAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3756,17 +3756,17 @@ func (s ExecutionAlreadyExists) GoString() string { func newErrorExecutionAlreadyExists(v protocol.ResponseMetadata) error { return &ExecutionAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExecutionAlreadyExists) Code() string { +func (s *ExecutionAlreadyExists) Code() string { return "ExecutionAlreadyExists" } // Message returns the exception's message. -func (s ExecutionAlreadyExists) Message() string { +func (s *ExecutionAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3774,28 +3774,28 @@ func (s ExecutionAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExecutionAlreadyExists) OrigErr() error { +func (s *ExecutionAlreadyExists) OrigErr() error { return nil } -func (s ExecutionAlreadyExists) Error() string { +func (s *ExecutionAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExecutionAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExecutionAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExecutionAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *ExecutionAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // The specified execution does not exist. type ExecutionDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3812,17 +3812,17 @@ func (s ExecutionDoesNotExist) GoString() string { func newErrorExecutionDoesNotExist(v protocol.ResponseMetadata) error { return &ExecutionDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExecutionDoesNotExist) Code() string { +func (s *ExecutionDoesNotExist) Code() string { return "ExecutionDoesNotExist" } // Message returns the exception's message. -func (s ExecutionDoesNotExist) Message() string { +func (s *ExecutionDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3830,22 +3830,22 @@ func (s ExecutionDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExecutionDoesNotExist) OrigErr() error { +func (s *ExecutionDoesNotExist) OrigErr() error { return nil } -func (s ExecutionDoesNotExist) Error() string { +func (s *ExecutionDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExecutionDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExecutionDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExecutionDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *ExecutionDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an execution failure event. @@ -3884,8 +3884,8 @@ func (s *ExecutionFailedEventDetails) SetError(v string) *ExecutionFailedEventDe // The maximum number of running executions has been reached. Running executions // must end or be stopped before a new execution can be started. type ExecutionLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3902,17 +3902,17 @@ func (s ExecutionLimitExceeded) GoString() string { func newErrorExecutionLimitExceeded(v protocol.ResponseMetadata) error { return &ExecutionLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ExecutionLimitExceeded) Code() string { +func (s *ExecutionLimitExceeded) Code() string { return "ExecutionLimitExceeded" } // Message returns the exception's message. -func (s ExecutionLimitExceeded) Message() string { +func (s *ExecutionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3920,22 +3920,22 @@ func (s ExecutionLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ExecutionLimitExceeded) OrigErr() error { +func (s *ExecutionLimitExceeded) OrigErr() error { return nil } -func (s ExecutionLimitExceeded) Error() string { +func (s *ExecutionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ExecutionLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ExecutionLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ExecutionLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ExecutionLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about an execution. @@ -4682,8 +4682,8 @@ func (s *HistoryEvent) SetType(v string) *HistoryEvent { // The provided Amazon Resource Name (ARN) is invalid. type InvalidArn struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4700,17 +4700,17 @@ func (s InvalidArn) GoString() string { func newErrorInvalidArn(v protocol.ResponseMetadata) error { return &InvalidArn{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidArn) Code() string { +func (s *InvalidArn) Code() string { return "InvalidArn" } // Message returns the exception's message. -func (s InvalidArn) Message() string { +func (s *InvalidArn) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4718,28 +4718,28 @@ func (s InvalidArn) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidArn) OrigErr() error { +func (s *InvalidArn) OrigErr() error { return nil } -func (s InvalidArn) Error() string { +func (s *InvalidArn) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidArn) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidArn) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidArn) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidArn) RequestID() string { + return s.RespMetadata.RequestID } // The provided Amazon States Language definition is invalid. type InvalidDefinition struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4756,17 +4756,17 @@ func (s InvalidDefinition) GoString() string { func newErrorInvalidDefinition(v protocol.ResponseMetadata) error { return &InvalidDefinition{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDefinition) Code() string { +func (s *InvalidDefinition) Code() string { return "InvalidDefinition" } // Message returns the exception's message. -func (s InvalidDefinition) Message() string { +func (s *InvalidDefinition) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4774,28 +4774,28 @@ func (s InvalidDefinition) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDefinition) OrigErr() error { +func (s *InvalidDefinition) OrigErr() error { return nil } -func (s InvalidDefinition) Error() string { +func (s *InvalidDefinition) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDefinition) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDefinition) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDefinition) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDefinition) RequestID() string { + return s.RespMetadata.RequestID } // The provided JSON input data is invalid. type InvalidExecutionInput struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4812,17 +4812,17 @@ func (s InvalidExecutionInput) GoString() string { func newErrorInvalidExecutionInput(v protocol.ResponseMetadata) error { return &InvalidExecutionInput{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidExecutionInput) Code() string { +func (s *InvalidExecutionInput) Code() string { return "InvalidExecutionInput" } // Message returns the exception's message. -func (s InvalidExecutionInput) Message() string { +func (s *InvalidExecutionInput) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4830,27 +4830,27 @@ func (s InvalidExecutionInput) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidExecutionInput) OrigErr() error { +func (s *InvalidExecutionInput) OrigErr() error { return nil } -func (s InvalidExecutionInput) Error() string { +func (s *InvalidExecutionInput) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidExecutionInput) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidExecutionInput) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidExecutionInput) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidExecutionInput) RequestID() string { + return s.RespMetadata.RequestID } type InvalidLoggingConfiguration struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4867,17 +4867,17 @@ func (s InvalidLoggingConfiguration) GoString() string { func newErrorInvalidLoggingConfiguration(v protocol.ResponseMetadata) error { return &InvalidLoggingConfiguration{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidLoggingConfiguration) Code() string { +func (s *InvalidLoggingConfiguration) Code() string { return "InvalidLoggingConfiguration" } // Message returns the exception's message. -func (s InvalidLoggingConfiguration) Message() string { +func (s *InvalidLoggingConfiguration) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4885,28 +4885,28 @@ func (s InvalidLoggingConfiguration) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidLoggingConfiguration) OrigErr() error { +func (s *InvalidLoggingConfiguration) OrigErr() error { return nil } -func (s InvalidLoggingConfiguration) Error() string { +func (s *InvalidLoggingConfiguration) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidLoggingConfiguration) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidLoggingConfiguration) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidLoggingConfiguration) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidLoggingConfiguration) RequestID() string { + return s.RespMetadata.RequestID } // The provided name is invalid. type InvalidName struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4923,17 +4923,17 @@ func (s InvalidName) GoString() string { func newErrorInvalidName(v protocol.ResponseMetadata) error { return &InvalidName{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidName) Code() string { +func (s *InvalidName) Code() string { return "InvalidName" } // Message returns the exception's message. -func (s InvalidName) Message() string { +func (s *InvalidName) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4941,28 +4941,28 @@ func (s InvalidName) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidName) OrigErr() error { +func (s *InvalidName) OrigErr() error { return nil } -func (s InvalidName) Error() string { +func (s *InvalidName) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidName) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidName) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidName) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidName) RequestID() string { + return s.RespMetadata.RequestID } // The provided JSON output data is invalid. type InvalidOutput struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4979,17 +4979,17 @@ func (s InvalidOutput) GoString() string { func newErrorInvalidOutput(v protocol.ResponseMetadata) error { return &InvalidOutput{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOutput) Code() string { +func (s *InvalidOutput) Code() string { return "InvalidOutput" } // Message returns the exception's message. -func (s InvalidOutput) Message() string { +func (s *InvalidOutput) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4997,28 +4997,28 @@ func (s InvalidOutput) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOutput) OrigErr() error { +func (s *InvalidOutput) OrigErr() error { return nil } -func (s InvalidOutput) Error() string { +func (s *InvalidOutput) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOutput) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOutput) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOutput) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOutput) RequestID() string { + return s.RespMetadata.RequestID } // The provided token is invalid. type InvalidToken struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5035,17 +5035,17 @@ func (s InvalidToken) GoString() string { func newErrorInvalidToken(v protocol.ResponseMetadata) error { return &InvalidToken{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidToken) Code() string { +func (s *InvalidToken) Code() string { return "InvalidToken" } // Message returns the exception's message. -func (s InvalidToken) Message() string { +func (s *InvalidToken) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5053,22 +5053,22 @@ func (s InvalidToken) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidToken) OrigErr() error { +func (s *InvalidToken) OrigErr() error { return nil } -func (s InvalidToken) Error() string { +func (s *InvalidToken) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidToken) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidToken) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidToken) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidToken) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about a lambda function that failed during an execution. @@ -5803,8 +5803,8 @@ func (s *MapStateStartedEventDetails) SetLength(v int64) *MapStateStartedEventDe // Request is missing a required parameter. This error occurs if both definition // and roleArn are not specified. type MissingRequiredParameter struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -5821,17 +5821,17 @@ func (s MissingRequiredParameter) GoString() string { func newErrorMissingRequiredParameter(v protocol.ResponseMetadata) error { return &MissingRequiredParameter{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MissingRequiredParameter) Code() string { +func (s *MissingRequiredParameter) Code() string { return "MissingRequiredParameter" } // Message returns the exception's message. -func (s MissingRequiredParameter) Message() string { +func (s *MissingRequiredParameter) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5839,29 +5839,29 @@ func (s MissingRequiredParameter) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MissingRequiredParameter) OrigErr() error { +func (s *MissingRequiredParameter) OrigErr() error { return nil } -func (s MissingRequiredParameter) Error() string { +func (s *MissingRequiredParameter) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MissingRequiredParameter) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MissingRequiredParameter) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MissingRequiredParameter) RequestID() string { - return s.respMetadata.RequestID +func (s *MissingRequiredParameter) RequestID() string { + return s.RespMetadata.RequestID } // Could not find the referenced resource. Only state machine and activity ARNs // are supported. type ResourceNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -5880,17 +5880,17 @@ func (s ResourceNotFound) GoString() string { func newErrorResourceNotFound(v protocol.ResponseMetadata) error { return &ResourceNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFound) Code() string { +func (s *ResourceNotFound) Code() string { return "ResourceNotFound" } // Message returns the exception's message. -func (s ResourceNotFound) Message() string { +func (s *ResourceNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5898,22 +5898,22 @@ func (s ResourceNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFound) OrigErr() error { +func (s *ResourceNotFound) OrigErr() error { return nil } -func (s ResourceNotFound) Error() string { +func (s *ResourceNotFound) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFound) RequestID() string { + return s.RespMetadata.RequestID } type SendTaskFailureInput struct { @@ -6328,8 +6328,8 @@ func (s *StateExitedEventDetails) SetOutput(v string) *StateExitedEventDetails { // A state machine with the same name but a different definition or role ARN // already exists. type StateMachineAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6346,17 +6346,17 @@ func (s StateMachineAlreadyExists) GoString() string { func newErrorStateMachineAlreadyExists(v protocol.ResponseMetadata) error { return &StateMachineAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StateMachineAlreadyExists) Code() string { +func (s *StateMachineAlreadyExists) Code() string { return "StateMachineAlreadyExists" } // Message returns the exception's message. -func (s StateMachineAlreadyExists) Message() string { +func (s *StateMachineAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6364,28 +6364,28 @@ func (s StateMachineAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StateMachineAlreadyExists) OrigErr() error { +func (s *StateMachineAlreadyExists) OrigErr() error { return nil } -func (s StateMachineAlreadyExists) Error() string { +func (s *StateMachineAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StateMachineAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StateMachineAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StateMachineAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *StateMachineAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // The specified state machine is being deleted. type StateMachineDeleting struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6402,17 +6402,17 @@ func (s StateMachineDeleting) GoString() string { func newErrorStateMachineDeleting(v protocol.ResponseMetadata) error { return &StateMachineDeleting{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StateMachineDeleting) Code() string { +func (s *StateMachineDeleting) Code() string { return "StateMachineDeleting" } // Message returns the exception's message. -func (s StateMachineDeleting) Message() string { +func (s *StateMachineDeleting) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6420,28 +6420,28 @@ func (s StateMachineDeleting) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StateMachineDeleting) OrigErr() error { +func (s *StateMachineDeleting) OrigErr() error { return nil } -func (s StateMachineDeleting) Error() string { +func (s *StateMachineDeleting) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StateMachineDeleting) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StateMachineDeleting) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StateMachineDeleting) RequestID() string { - return s.respMetadata.RequestID +func (s *StateMachineDeleting) RequestID() string { + return s.RespMetadata.RequestID } // The specified state machine does not exist. type StateMachineDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6458,17 +6458,17 @@ func (s StateMachineDoesNotExist) GoString() string { func newErrorStateMachineDoesNotExist(v protocol.ResponseMetadata) error { return &StateMachineDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StateMachineDoesNotExist) Code() string { +func (s *StateMachineDoesNotExist) Code() string { return "StateMachineDoesNotExist" } // Message returns the exception's message. -func (s StateMachineDoesNotExist) Message() string { +func (s *StateMachineDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6476,29 +6476,29 @@ func (s StateMachineDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StateMachineDoesNotExist) OrigErr() error { +func (s *StateMachineDoesNotExist) OrigErr() error { return nil } -func (s StateMachineDoesNotExist) Error() string { +func (s *StateMachineDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StateMachineDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StateMachineDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StateMachineDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *StateMachineDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // The maximum number of state machines has been reached. Existing state machines // must be deleted before a new state machine can be created. type StateMachineLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6515,17 +6515,17 @@ func (s StateMachineLimitExceeded) GoString() string { func newErrorStateMachineLimitExceeded(v protocol.ResponseMetadata) error { return &StateMachineLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StateMachineLimitExceeded) Code() string { +func (s *StateMachineLimitExceeded) Code() string { return "StateMachineLimitExceeded" } // Message returns the exception's message. -func (s StateMachineLimitExceeded) Message() string { +func (s *StateMachineLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6533,22 +6533,22 @@ func (s StateMachineLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StateMachineLimitExceeded) OrigErr() error { +func (s *StateMachineLimitExceeded) OrigErr() error { return nil } -func (s StateMachineLimitExceeded) Error() string { +func (s *StateMachineLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StateMachineLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StateMachineLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StateMachineLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *StateMachineLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about the state machine. @@ -6624,8 +6624,8 @@ func (s *StateMachineListItem) SetType(v string) *StateMachineListItem { } type StateMachineTypeNotSupported struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6642,17 +6642,17 @@ func (s StateMachineTypeNotSupported) GoString() string { func newErrorStateMachineTypeNotSupported(v protocol.ResponseMetadata) error { return &StateMachineTypeNotSupported{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StateMachineTypeNotSupported) Code() string { +func (s *StateMachineTypeNotSupported) Code() string { return "StateMachineTypeNotSupported" } // Message returns the exception's message. -func (s StateMachineTypeNotSupported) Message() string { +func (s *StateMachineTypeNotSupported) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6660,22 +6660,22 @@ func (s StateMachineTypeNotSupported) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StateMachineTypeNotSupported) OrigErr() error { +func (s *StateMachineTypeNotSupported) OrigErr() error { return nil } -func (s StateMachineTypeNotSupported) Error() string { +func (s *StateMachineTypeNotSupported) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StateMachineTypeNotSupported) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StateMachineTypeNotSupported) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StateMachineTypeNotSupported) RequestID() string { - return s.respMetadata.RequestID +func (s *StateMachineTypeNotSupported) RequestID() string { + return s.RespMetadata.RequestID } type StopExecutionInput struct { @@ -6900,8 +6900,8 @@ func (s TagResourceOutput) GoString() string { } type TaskDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6918,17 +6918,17 @@ func (s TaskDoesNotExist) GoString() string { func newErrorTaskDoesNotExist(v protocol.ResponseMetadata) error { return &TaskDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TaskDoesNotExist) Code() string { +func (s *TaskDoesNotExist) Code() string { return "TaskDoesNotExist" } // Message returns the exception's message. -func (s TaskDoesNotExist) Message() string { +func (s *TaskDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6936,22 +6936,22 @@ func (s TaskDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TaskDoesNotExist) OrigErr() error { +func (s *TaskDoesNotExist) OrigErr() error { return nil } -func (s TaskDoesNotExist) Error() string { +func (s *TaskDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TaskDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TaskDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TaskDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *TaskDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about a task failure event. @@ -7318,8 +7318,8 @@ func (s *TaskSucceededEventDetails) SetResourceType(v string) *TaskSucceededEven } type TaskTimedOut struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7336,17 +7336,17 @@ func (s TaskTimedOut) GoString() string { func newErrorTaskTimedOut(v protocol.ResponseMetadata) error { return &TaskTimedOut{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TaskTimedOut) Code() string { +func (s *TaskTimedOut) Code() string { return "TaskTimedOut" } // Message returns the exception's message. -func (s TaskTimedOut) Message() string { +func (s *TaskTimedOut) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7354,22 +7354,22 @@ func (s TaskTimedOut) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TaskTimedOut) OrigErr() error { +func (s *TaskTimedOut) OrigErr() error { return nil } -func (s TaskTimedOut) Error() string { +func (s *TaskTimedOut) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TaskTimedOut) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TaskTimedOut) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TaskTimedOut) RequestID() string { - return s.respMetadata.RequestID +func (s *TaskTimedOut) RequestID() string { + return s.RespMetadata.RequestID } // Contains details about a resource timeout that occurred during an execution. @@ -7431,8 +7431,8 @@ func (s *TaskTimedOutEventDetails) SetResourceType(v string) *TaskTimedOutEventD // Topic (https://docs.aws.amazon.com/step-functions/latest/dg/limits.html) // in the AWS Step Functions Developer Guide. type TooManyTags struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -7451,17 +7451,17 @@ func (s TooManyTags) GoString() string { func newErrorTooManyTags(v protocol.ResponseMetadata) error { return &TooManyTags{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTags) Code() string { +func (s *TooManyTags) Code() string { return "TooManyTags" } // Message returns the exception's message. -func (s TooManyTags) Message() string { +func (s *TooManyTags) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7469,22 +7469,22 @@ func (s TooManyTags) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTags) OrigErr() error { +func (s *TooManyTags) OrigErr() error { return nil } -func (s TooManyTags) Error() string { +func (s *TooManyTags) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTags) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTags) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTags) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTags) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/shield/api.go b/vendor/github.com/aws/aws-sdk-go/service/shield/api.go index 3155bfa30ac..0d070f3b51b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/shield/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/shield/api.go @@ -1940,8 +1940,8 @@ func (c *Shield) UpdateSubscriptionWithContext(ctx aws.Context, input *UpdateSub // Exception that indicates the specified AttackId does not exist, or the requester // does not have the appropriate permissions to access the AttackId. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -1958,17 +1958,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1976,22 +1976,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // In order to grant the necessary access to the DDoS Response Team, the user @@ -1999,8 +1999,8 @@ func (s AccessDeniedException) RequestID() string { // indicates the user did not have the appropriate permissions. For more information, // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html). type AccessDeniedForDependencyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -2017,17 +2017,17 @@ func (s AccessDeniedForDependencyException) GoString() string { func newErrorAccessDeniedForDependencyException(v protocol.ResponseMetadata) error { return &AccessDeniedForDependencyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedForDependencyException) Code() string { +func (s *AccessDeniedForDependencyException) Code() string { return "AccessDeniedForDependencyException" } // Message returns the exception's message. -func (s AccessDeniedForDependencyException) Message() string { +func (s *AccessDeniedForDependencyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -2035,22 +2035,22 @@ func (s AccessDeniedForDependencyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedForDependencyException) OrigErr() error { +func (s *AccessDeniedForDependencyException) OrigErr() error { return nil } -func (s AccessDeniedForDependencyException) Error() string { +func (s *AccessDeniedForDependencyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedForDependencyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedForDependencyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedForDependencyException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedForDependencyException) RequestID() string { + return s.RespMetadata.RequestID } type AssociateDRTLogBucketInput struct { @@ -3270,8 +3270,8 @@ func (s *GetSubscriptionStateOutput) SetSubscriptionState(v string) *GetSubscrip // Exception that indicates that a problem occurred with the service infrastructure. // You can retry the request. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3288,17 +3288,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "InternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3306,29 +3306,29 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // Exception that indicates that the operation would not cause any change to // occur. type InvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3345,17 +3345,17 @@ func (s InvalidOperationException) GoString() string { func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { return &InvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOperationException) Code() string { +func (s *InvalidOperationException) Code() string { return "InvalidOperationException" } // Message returns the exception's message. -func (s InvalidOperationException) Message() string { +func (s *InvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3363,29 +3363,29 @@ func (s InvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOperationException) OrigErr() error { +func (s *InvalidOperationException) OrigErr() error { return nil } -func (s InvalidOperationException) Error() string { +func (s *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // Exception that indicates that the NextToken specified in the request is invalid. // Submit the request using the NextToken value that was returned in the response. type InvalidPaginationTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3402,17 +3402,17 @@ func (s InvalidPaginationTokenException) GoString() string { func newErrorInvalidPaginationTokenException(v protocol.ResponseMetadata) error { return &InvalidPaginationTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPaginationTokenException) Code() string { +func (s *InvalidPaginationTokenException) Code() string { return "InvalidPaginationTokenException" } // Message returns the exception's message. -func (s InvalidPaginationTokenException) Message() string { +func (s *InvalidPaginationTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3420,28 +3420,28 @@ func (s InvalidPaginationTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPaginationTokenException) OrigErr() error { +func (s *InvalidPaginationTokenException) OrigErr() error { return nil } -func (s InvalidPaginationTokenException) Error() string { +func (s *InvalidPaginationTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPaginationTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPaginationTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPaginationTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPaginationTokenException) RequestID() string { + return s.RespMetadata.RequestID } // Exception that indicates that the parameters passed to the API are invalid. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3458,17 +3458,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3476,29 +3476,29 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // Exception that indicates that the resource is invalid. You might not have // access to the resource, or the resource might not exist. type InvalidResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3515,17 +3515,17 @@ func (s InvalidResourceException) GoString() string { func newErrorInvalidResourceException(v protocol.ResponseMetadata) error { return &InvalidResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceException) Code() string { +func (s *InvalidResourceException) Code() string { return "InvalidResourceException" } // Message returns the exception's message. -func (s InvalidResourceException) Message() string { +func (s *InvalidResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3533,22 +3533,22 @@ func (s InvalidResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceException) OrigErr() error { +func (s *InvalidResourceException) OrigErr() error { return nil } -func (s InvalidResourceException) Error() string { +func (s *InvalidResourceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceException) RequestID() string { + return s.RespMetadata.RequestID } // Specifies how many protections of a given type you can create. @@ -3590,8 +3590,8 @@ func (s *Limit) SetType(v string) *Limit { // // Limit is the threshold that would be exceeded. type LimitsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Limit *int64 `type:"long"` @@ -3612,17 +3612,17 @@ func (s LimitsExceededException) GoString() string { func newErrorLimitsExceededException(v protocol.ResponseMetadata) error { return &LimitsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitsExceededException) Code() string { +func (s *LimitsExceededException) Code() string { return "LimitsExceededException" } // Message returns the exception's message. -func (s LimitsExceededException) Message() string { +func (s *LimitsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3630,22 +3630,22 @@ func (s LimitsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitsExceededException) OrigErr() error { +func (s *LimitsExceededException) OrigErr() error { return nil } -func (s LimitsExceededException) Error() string { +func (s *LimitsExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitsExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAttacksInput struct { @@ -3872,8 +3872,8 @@ func (s *ListProtectionsOutput) SetProtections(v []*Protection) *ListProtections // of your subscription. This exception indicates that you are attempting to // change AutoRenew prior to that period. type LockedSubscriptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3890,17 +3890,17 @@ func (s LockedSubscriptionException) GoString() string { func newErrorLockedSubscriptionException(v protocol.ResponseMetadata) error { return &LockedSubscriptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LockedSubscriptionException) Code() string { +func (s *LockedSubscriptionException) Code() string { return "LockedSubscriptionException" } // Message returns the exception's message. -func (s LockedSubscriptionException) Message() string { +func (s *LockedSubscriptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3908,22 +3908,22 @@ func (s LockedSubscriptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LockedSubscriptionException) OrigErr() error { +func (s *LockedSubscriptionException) OrigErr() error { return nil } -func (s LockedSubscriptionException) Error() string { +func (s *LockedSubscriptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LockedSubscriptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LockedSubscriptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LockedSubscriptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *LockedSubscriptionException) RequestID() string { + return s.RespMetadata.RequestID } // The mitigation applied to a DDoS attack. @@ -3952,8 +3952,8 @@ func (s *Mitigation) SetMitigationName(v string) *Mitigation { // The ARN of the role that you specifed does not exist. type NoAssociatedRoleException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3970,17 +3970,17 @@ func (s NoAssociatedRoleException) GoString() string { func newErrorNoAssociatedRoleException(v protocol.ResponseMetadata) error { return &NoAssociatedRoleException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NoAssociatedRoleException) Code() string { +func (s *NoAssociatedRoleException) Code() string { return "NoAssociatedRoleException" } // Message returns the exception's message. -func (s NoAssociatedRoleException) Message() string { +func (s *NoAssociatedRoleException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3988,29 +3988,29 @@ func (s NoAssociatedRoleException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NoAssociatedRoleException) OrigErr() error { +func (s *NoAssociatedRoleException) OrigErr() error { return nil } -func (s NoAssociatedRoleException) Error() string { +func (s *NoAssociatedRoleException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NoAssociatedRoleException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NoAssociatedRoleException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NoAssociatedRoleException) RequestID() string { - return s.respMetadata.RequestID +func (s *NoAssociatedRoleException) RequestID() string { + return s.RespMetadata.RequestID } // Exception that indicates that the protection state has been modified by another // client. You can retry the request. type OptimisticLockException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4027,17 +4027,17 @@ func (s OptimisticLockException) GoString() string { func newErrorOptimisticLockException(v protocol.ResponseMetadata) error { return &OptimisticLockException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OptimisticLockException) Code() string { +func (s *OptimisticLockException) Code() string { return "OptimisticLockException" } // Message returns the exception's message. -func (s OptimisticLockException) Message() string { +func (s *OptimisticLockException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4045,22 +4045,22 @@ func (s OptimisticLockException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OptimisticLockException) OrigErr() error { +func (s *OptimisticLockException) OrigErr() error { return nil } -func (s OptimisticLockException) Error() string { +func (s *OptimisticLockException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OptimisticLockException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OptimisticLockException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OptimisticLockException) RequestID() string { - return s.respMetadata.RequestID +func (s *OptimisticLockException) RequestID() string { + return s.RespMetadata.RequestID } // An object that represents a resource that is under DDoS protection. @@ -4117,8 +4117,8 @@ func (s *Protection) SetResourceArn(v string) *Protection { // Exception indicating the specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4135,17 +4135,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4153,28 +4153,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Exception indicating the specified resource does not exist. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -4191,17 +4191,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4209,22 +4209,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The attack information for the specified SubResource. 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 989c4580f17..e02de1a4b05 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 @@ -73,10 +73,11 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // We recommend that you devise a set of tag keys that meets your needs for // each resource type. Using a consistent set of tag keys makes it easier for // you to manage your resources. You can search and filter the resources based -// on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and -// are interpreted strictly as a string of characters. +// on the tags you add. Tags don't have any semantic meaning to and are interpreted +// strictly as a string of characters. // -// For more information about tags, see Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) +// For more information about using tags with EC2 instances, see Tagging your +// Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) // in the Amazon EC2 User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -290,7 +291,7 @@ func (c *SSM) CancelMaintenanceWindowExecutionRequest(input *CancelMaintenanceWi // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution @@ -365,12 +366,11 @@ func (c *SSM) CreateActivationRequest(input *CreateActivationInput) (req *reques // Systems Manager capabilities. You use the activation code and ID when installing // SSM Agent on machines in your hybrid environment. For more information about // requirements for managing on-premises instances and VMs using Systems Manager, -// see Setting Up AWS Systems Manager for Hybrid Environments (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html) +// see Setting up AWS Systems Manager for hybrid environments (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html) // in the AWS Systems Manager User Guide. // -// On-premises servers or VMs that are registered with Systems Manager and Amazon -// EC2 instances that you manage with Systems Manager are all called managed -// instances. +// On-premises servers or VMs that are registered with Systems Manager and EC2 +// instances that you manage with Systems Manager are all called managed 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 @@ -508,7 +508,7 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ // // * InvalidTarget // The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. +// Systems Manager or you might not have permission to perform the operation. // // * InvalidSchedule // The schedule is invalid. Verify your cron or rate expression and try again. @@ -638,7 +638,7 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) // // * InvalidTarget // The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. +// Systems Manager or you might not have permission to perform the operation. // // * InvalidSchedule // The schedule is invalid. Verify your cron or rate expression and try again. @@ -709,10 +709,11 @@ func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Re // CreateDocument API operation for Amazon Simple Systems Manager (SSM). // -// Creates a Systems Manager document. -// -// After you create a document, you can use CreateAssociation to associate it -// with one or more running instances. +// Creates a Systems Manager (SSM) document. An SSM document defines the actions +// that Systems Manager performs on your managed instances. For more information +// about SSM documents, including information about supported schemas, features, +// and syntax, see AWS Systems Manager Documents (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html) +// in the AWS Systems Manager User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -832,7 +833,7 @@ func (c *SSM) CreateMaintenanceWindowRequest(input *CreateMaintenanceWindowInput // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -906,13 +907,13 @@ func (c *SSM) CreateOpsItemRequest(input *CreateOpsItemInput) (req *request.Requ // // Creates a new OpsItem. You must have permission in AWS Identity and Access // Management (IAM) to create a new OpsItem. For more information, see Getting -// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) // in the AWS Systems Manager User Guide. // // Operations engineers and IT professionals use OpsCenter to view, investigate, // and remediate operational issues impacting the performance and health of // their AWS resources. For more information, see AWS Systems Manager OpsCenter -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the AWS Systems Manager User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -931,7 +932,7 @@ func (c *SSM) CreateOpsItemRequest(input *CreateOpsItemInput) (req *request.Requ // // * OpsItemLimitExceededException // The request caused OpsItems to exceed one or more quotas. For information -// about OpsItem quotas, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). +// about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). // // * OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments @@ -1025,7 +1026,7 @@ func (c *SSM) CreatePatchBaselineRequest(input *CreatePatchBaselineInput) (req * // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -1104,16 +1105,16 @@ func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput) // // You can configure Systems Manager Inventory to use the SyncToDestination // type to synchronize Inventory data from multiple AWS Regions to a single -// Amazon S3 bucket. For more information, see Configuring Resource Data Sync -// for Inventory (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html) +// S3 bucket. For more information, see Configuring Resource Data Sync for Inventory +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html) // in the AWS Systems Manager User Guide. // // You can configure Systems Manager Explorer to use the SyncFromSource type // to synchronize operational work items (OpsItems) and operational data (OpsData) -// from multiple AWS Regions to a single Amazon S3 bucket. This type can synchronize +// from multiple AWS Regions to a single S3 bucket. This type can synchronize // OpsItems and OpsData from multiple AWS accounts and Regions or EntireOrganization -// by using AWS Organizations. For more information, see Setting Up Explorer -// to Display Data from Multiple Accounts and Regions (http://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html) +// by using AWS Organizations. For more information, see Setting up Systems +// Manager Explorer to display data from multiple accounts and Regions (https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html) // in the AWS Systems Manager User Guide. // // A resource data sync is an asynchronous operation that returns immediately. @@ -2207,7 +2208,7 @@ func (c *SSM) DeregisterTargetFromMaintenanceWindowRequest(input *DeregisterTarg // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -2298,7 +2299,7 @@ func (c *SSM) DeregisterTaskFromMaintenanceWindowRequest(input *DeregisterTaskFr // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -3344,7 +3345,7 @@ func (c *SSM) DescribeEffectivePatchesForPatchBaselineRequest(input *DescribeEff // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * UnsupportedOperatingSystem @@ -3521,16 +3522,18 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat // DescribeInstanceInformation API operation for Amazon Simple Systems Manager (SSM). // -// Describes one or more of your instances. You can use this to get information -// about instances like the operating system platform, the SSM Agent version -// (Linux), status etc. If you specify one or more instance IDs, it returns -// information for those instances. If you do not specify instance IDs, it returns -// information for all your instances. If you specify an instance ID that is -// not valid or an instance that you do not own, you receive an error. +// Describes one or more of your instances, including information about the +// operating system platform, the version of SSM Agent installed on the instance, +// instance status, and so on. +// +// If you specify one or more instance IDs, it returns information for those +// instances. If you do not specify instance IDs, it returns information for +// all your instances. If you specify an instance ID that is not valid or an +// instance that you do not own, you receive an error. // // The IamRole field for this API action is the Amazon Identity and Access Management // (IAM) role assigned to on-premises instances. This call does not return the -// IAM role for Amazon EC2 instances. +// IAM role for EC2 instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4052,7 +4055,7 @@ func (c *SSM) DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input *De // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -4139,7 +4142,7 @@ func (c *SSM) DescribeMaintenanceWindowExecutionTasksRequest(input *DescribeMain // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -4310,7 +4313,7 @@ func (c *SSM) DescribeMaintenanceWindowScheduleRequest(input *DescribeMaintenanc // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule @@ -4394,7 +4397,7 @@ func (c *SSM) DescribeMaintenanceWindowTargetsRequest(input *DescribeMaintenance // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -4481,7 +4484,7 @@ func (c *SSM) DescribeMaintenanceWindowTasksRequest(input *DescribeMaintenanceWi // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -4714,13 +4717,13 @@ func (c *SSM) DescribeOpsItemsRequest(input *DescribeOpsItemsInput) (req *reques // // Query a set of OpsItems. You must have permission in AWS Identity and Access // Management (IAM) to query a list of OpsItems. For more information, see Getting -// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) // in the AWS Systems Manager User Guide. // // Operations engineers and IT professionals use OpsCenter to view, investigate, // and remediate operational issues impacting the performance and health of // their AWS resources. For more information, see AWS Systems Manager OpsCenter -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the AWS Systems Manager User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5680,7 +5683,7 @@ func (c *SSM) GetConnectionStatusRequest(input *GetConnectionStatusInput) (req * // GetConnectionStatus API operation for Amazon Simple Systems Manager (SSM). // // Retrieves the Session Manager connection status for an instance to determine -// whether it is connected and ready to receive Session Manager connections. +// whether it is running and ready to receive Session Manager connections. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5863,10 +5866,10 @@ func (c *SSM) GetDeployablePatchSnapshotForInstanceRequest(input *GetDeployableP // Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu. // // * UnsupportedFeatureRequiredException -// Microsoft application patching is only available on EC2 instances and Advanced -// Instances. To patch Microsoft applications on on-premises servers and VMs, -// you must enable Advanced Instances. For more information, see Using the Advanced-Instances -// Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) +// Microsoft application patching is only available on EC2 instances and advanced +// instances. To patch Microsoft applications on on-premises servers and VMs, +// you must enable advanced instances. For more information, see Using the advanced-instances +// tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) // in the AWS Systems Manager User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetDeployablePatchSnapshotForInstance @@ -6220,7 +6223,7 @@ func (c *SSM) GetMaintenanceWindowRequest(input *GetMaintenanceWindowInput) (req // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -6307,7 +6310,7 @@ func (c *SSM) GetMaintenanceWindowExecutionRequest(input *GetMaintenanceWindowEx // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -6395,7 +6398,7 @@ func (c *SSM) GetMaintenanceWindowExecutionTaskRequest(input *GetMaintenanceWind // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -6482,7 +6485,7 @@ func (c *SSM) GetMaintenanceWindowExecutionTaskInvocationRequest(input *GetMaint // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -6569,7 +6572,7 @@ func (c *SSM) GetMaintenanceWindowTaskRequest(input *GetMaintenanceWindowTaskInp // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -6643,13 +6646,13 @@ func (c *SSM) GetOpsItemRequest(input *GetOpsItemInput) (req *request.Request, o // // Get information about an OpsItem by using the ID. You must have permission // in AWS Identity and Access Management (IAM) to view information about an -// OpsItem. For more information, see Getting Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// OpsItem. For more information, see Getting started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) // in the AWS Systems Manager User Guide. // // Operations engineers and IT professionals use OpsCenter to view, investigate, // and remediate operational issues impacting the performance and health of // their AWS resources. For more information, see AWS Systems Manager OpsCenter -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the AWS Systems Manager User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -7323,7 +7326,7 @@ func (c *SSM) GetPatchBaselineRequest(input *GetPatchBaselineInput) (req *reques // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InvalidResourceId @@ -9424,7 +9427,7 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques // // * HierarchyLevelLimitExceededException // A hierarchy can have a maximum of 15 levels. For more information, see Requirements -// and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) +// and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. // // * HierarchyTypeMismatchException @@ -9550,7 +9553,7 @@ func (c *SSM) RegisterDefaultPatchBaselineRequest(input *RegisterDefaultPatchBas // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -9641,7 +9644,7 @@ func (c *SSM) RegisterPatchBaselineForPatchGroupRequest(input *RegisterPatchBase // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InvalidResourceId @@ -9653,7 +9656,7 @@ func (c *SSM) RegisterPatchBaselineForPatchGroupRequest(input *RegisterPatchBase // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -9744,7 +9747,7 @@ func (c *SSM) RegisterTargetWithMaintenanceWindowRequest(input *RegisterTargetWi // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * ResourceLimitExceededException @@ -9752,7 +9755,7 @@ func (c *SSM) RegisterTargetWithMaintenanceWindowRequest(input *RegisterTargetWi // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -9843,7 +9846,7 @@ func (c *SSM) RegisterTaskWithMaintenanceWindowRequest(input *RegisterTaskWithMa // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * ResourceLimitExceededException @@ -9851,7 +9854,7 @@ func (c *SSM) RegisterTaskWithMaintenanceWindowRequest(input *RegisterTaskWithMa // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * FeatureNotAvailableException @@ -10140,7 +10143,7 @@ func (c *SSM) ResumeSessionRequest(input *ResumeSessionInput) (req *request.Requ // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -10357,7 +10360,7 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, // The role name can't contain invalid characters. Also verify that you specified // an IAM role for notifications that includes the required trust policy. For // information about configuring the IAM role for Run Command notifications, -// see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) +// see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the AWS Systems Manager User Guide. // // * InvalidNotificationConfig @@ -10545,7 +10548,7 @@ func (c *SSM) StartAutomationExecutionRequest(input *StartAutomationExecutionInp // // * InvalidTarget // The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. +// Systems Manager or you might not have permission to perform the operation. // // * InternalServerError // An error occurred on the server side. @@ -10622,7 +10625,7 @@ func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Reques // // AWS CLI usage: start-session is an interactive command that requires the // Session Manager plugin to be installed on the client machine making the call. -// For information, see Install the Session Manager Plugin for the AWS CLI (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) +// For information, see Install the Session Manager plugin for the AWS CLI (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html) // in the AWS Systems Manager User Guide. // // AWS Tools for PowerShell usage: Start-SSMSession is not currently supported @@ -10641,8 +10644,8 @@ func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Reques // // * TargetNotConnected // The specified target instance for the session is not fully configured for -// use with Session Manager. For more information, see Getting Started with -// Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) +// use with Session Manager. For more information, see Getting started with +// Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the AWS Systems Manager User Guide. // // * InternalServerError @@ -10818,7 +10821,7 @@ func (c *SSM) TerminateSessionRequest(input *TerminateSessionInput) (req *reques // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -10943,7 +10946,7 @@ func (c *SSM) UpdateAssociationRequest(input *UpdateAssociationInput) (req *requ // // * InvalidTarget // The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. +// Systems Manager or you might not have permission to perform the operation. // // * InvalidAssociationVersion // The version you specified is not valid. Use ListAssociationVersions to view @@ -11345,7 +11348,7 @@ func (c *SSM) UpdateMaintenanceWindowRequest(input *UpdateMaintenanceWindowInput // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -11449,7 +11452,7 @@ func (c *SSM) UpdateMaintenanceWindowTargetRequest(input *UpdateMaintenanceWindo // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -11555,7 +11558,7 @@ func (c *SSM) UpdateMaintenanceWindowTaskRequest(input *UpdateMaintenanceWindowT // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -11628,8 +11631,10 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI // UpdateManagedInstanceRole API operation for Amazon Simple Systems Manager (SSM). // -// Assigns or changes an Amazon Identity and Access Management (IAM) role for -// the managed instance. +// Changes the Amazon Identity and Access Management (IAM) role that is assigned +// to the on-premises instance or virtual machines (VM). IAM roles are first +// assigned to these hybrid instances during the activation process. For more +// information, see CreateActivation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11723,13 +11728,13 @@ func (c *SSM) UpdateOpsItemRequest(input *UpdateOpsItemInput) (req *request.Requ // // Edit or change an OpsItem. You must have permission in AWS Identity and Access // Management (IAM) to update an OpsItem. For more information, see Getting -// Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) +// started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html) // in the AWS Systems Manager User Guide. // // Operations engineers and IT professionals use OpsCenter to view, investigate, // and remediate operational issues impacting the performance and health of // their AWS resources. For more information, see AWS Systems Manager OpsCenter -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the AWS Systems Manager User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -11751,7 +11756,7 @@ func (c *SSM) UpdateOpsItemRequest(input *UpdateOpsItemInput) (req *request.Requ // // * OpsItemLimitExceededException // The request caused OpsItems to exceed one or more quotas. For information -// about OpsItem quotas, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). +// about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). // // * OpsItemInvalidParameterException // A specified parameter argument isn't valid. Verify the available arguments @@ -11842,7 +11847,7 @@ func (c *SSM) UpdatePatchBaselineRequest(input *UpdatePatchBaselineInput) (req * // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. // // * InternalServerError @@ -11922,6 +11927,9 @@ func (c *SSM) UpdateResourceDataSyncRequest(input *UpdateResourceDataSyncInput) // the Include all accounts from my AWS Organizations configuration option. // Instead, you must delete the first resource data sync, and create a new one. // +// This API action only supports a resource data sync that was created with +// a SyncFromSource SyncType. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -12325,8 +12333,8 @@ func (s AddTagsToResourceOutput) GoString() string { // Error returned if an attempt is made to register a patch group with a patch // baseline that is already registered with a different patch baseline. type AlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12343,17 +12351,17 @@ func (s AlreadyExistsException) GoString() string { func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error { return &AlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AlreadyExistsException) Code() string { +func (s *AlreadyExistsException) Code() string { return "AlreadyExistsException" } // Message returns the exception's message. -func (s AlreadyExistsException) Message() string { +func (s *AlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12361,29 +12369,29 @@ func (s AlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AlreadyExistsException) OrigErr() error { +func (s *AlreadyExistsException) OrigErr() error { return nil } -func (s AlreadyExistsException) Error() string { +func (s *AlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *AlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // You must disassociate a document from all instances before you can delete // it. type AssociatedInstances struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12400,17 +12408,17 @@ func (s AssociatedInstances) GoString() string { func newErrorAssociatedInstances(v protocol.ResponseMetadata) error { return &AssociatedInstances{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociatedInstances) Code() string { +func (s *AssociatedInstances) Code() string { return "AssociatedInstances" } // Message returns the exception's message. -func (s AssociatedInstances) Message() string { +func (s *AssociatedInstances) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12418,22 +12426,22 @@ func (s AssociatedInstances) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociatedInstances) OrigErr() error { +func (s *AssociatedInstances) OrigErr() error { return nil } -func (s AssociatedInstances) Error() string { +func (s *AssociatedInstances) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociatedInstances) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociatedInstances) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociatedInstances) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociatedInstances) RequestID() string { + return s.RespMetadata.RequestID } // Describes an association of a Systems Manager document and an instance. @@ -12544,8 +12552,8 @@ func (s *Association) SetTargets(v []*Target) *Association { // The specified association already exists. type AssociationAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12562,17 +12570,17 @@ func (s AssociationAlreadyExists) GoString() string { func newErrorAssociationAlreadyExists(v protocol.ResponseMetadata) error { return &AssociationAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociationAlreadyExists) Code() string { +func (s *AssociationAlreadyExists) Code() string { return "AssociationAlreadyExists" } // Message returns the exception's message. -func (s AssociationAlreadyExists) Message() string { +func (s *AssociationAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12580,22 +12588,22 @@ func (s AssociationAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociationAlreadyExists) OrigErr() error { +func (s *AssociationAlreadyExists) OrigErr() error { return nil } -func (s AssociationAlreadyExists) Error() string { +func (s *AssociationAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociationAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociationAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociationAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociationAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // Describes the parameters for a document. @@ -12665,7 +12673,7 @@ type AssociationDescription struct { // The name of the Systems Manager document. Name *string `type:"string"` - // An Amazon S3 bucket where you want to store the output details of the request. + // An S3 bucket where you want to store the output details of the request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // Information about the association. @@ -12680,6 +12688,20 @@ type AssociationDescription struct { // The association status. Status *AssociationStatus `type:"structure"` + // The mode for generating association compliance. You can specify AUTO or MANUAL. + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT. If the association execution doesn't run + // successfully, the association is NON-COMPLIANT. + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the + // PutComplianceItems API action. In this case, compliance data is not managed + // by State Manager. It is managed by your direct call to the PutComplianceItems + // API action. + // + // By default, all associations use AUTO mode. + SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` + // The instances targeted by the request. Targets []*Target `type:"list"` } @@ -12808,6 +12830,12 @@ func (s *AssociationDescription) SetStatus(v *AssociationStatus) *AssociationDes return s } +// SetSyncCompliance sets the SyncCompliance field's value. +func (s *AssociationDescription) SetSyncCompliance(v string) *AssociationDescription { + s.SyncCompliance = &v + return s +} + // SetTargets sets the Targets field's value. func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription { s.Targets = v @@ -12816,8 +12844,8 @@ func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription // The specified association does not exist. type AssociationDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12834,17 +12862,17 @@ func (s AssociationDoesNotExist) GoString() string { func newErrorAssociationDoesNotExist(v protocol.ResponseMetadata) error { return &AssociationDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociationDoesNotExist) Code() string { +func (s *AssociationDoesNotExist) Code() string { return "AssociationDoesNotExist" } // Message returns the exception's message. -func (s AssociationDoesNotExist) Message() string { +func (s *AssociationDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12852,22 +12880,22 @@ func (s AssociationDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociationDoesNotExist) OrigErr() error { +func (s *AssociationDoesNotExist) OrigErr() error { return nil } -func (s AssociationDoesNotExist) Error() string { +func (s *AssociationDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociationDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociationDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociationDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociationDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // Includes information about the specified association. @@ -12960,8 +12988,8 @@ func (s *AssociationExecution) SetStatus(v string) *AssociationExecution { // The specified execution ID does not exist. Verify the ID number and try again. type AssociationExecutionDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12978,17 +13006,17 @@ func (s AssociationExecutionDoesNotExist) GoString() string { func newErrorAssociationExecutionDoesNotExist(v protocol.ResponseMetadata) error { return &AssociationExecutionDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociationExecutionDoesNotExist) Code() string { +func (s *AssociationExecutionDoesNotExist) Code() string { return "AssociationExecutionDoesNotExist" } // Message returns the exception's message. -func (s AssociationExecutionDoesNotExist) Message() string { +func (s *AssociationExecutionDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12996,22 +13024,22 @@ func (s AssociationExecutionDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociationExecutionDoesNotExist) OrigErr() error { +func (s *AssociationExecutionDoesNotExist) OrigErr() error { return nil } -func (s AssociationExecutionDoesNotExist) Error() string { +func (s *AssociationExecutionDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociationExecutionDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociationExecutionDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociationExecutionDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociationExecutionDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // Filters used in the request. @@ -13294,8 +13322,8 @@ func (s *AssociationFilter) SetValue(v string) *AssociationFilter { // You can have at most 2,000 active associations. type AssociationLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -13312,17 +13340,17 @@ func (s AssociationLimitExceeded) GoString() string { func newErrorAssociationLimitExceeded(v protocol.ResponseMetadata) error { return &AssociationLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociationLimitExceeded) Code() string { +func (s *AssociationLimitExceeded) Code() string { return "AssociationLimitExceeded" } // Message returns the exception's message. -func (s AssociationLimitExceeded) Message() string { +func (s *AssociationLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13330,22 +13358,22 @@ func (s AssociationLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociationLimitExceeded) OrigErr() error { +func (s *AssociationLimitExceeded) OrigErr() error { return nil } -func (s AssociationLimitExceeded) Error() string { +func (s *AssociationLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociationLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociationLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociationLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociationLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Information about the association. @@ -13535,6 +13563,20 @@ type AssociationVersionInfo struct { // version was created. ScheduleExpression *string `min:"1" type:"string"` + // The mode for generating association compliance. You can specify AUTO or MANUAL. + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT. If the association execution doesn't run + // successfully, the association is NON-COMPLIANT. + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the + // PutComplianceItems API action. In this case, compliance data is not managed + // by State Manager. It is managed by your direct call to the PutComplianceItems + // API action. + // + // By default, all associations use AUTO mode. + SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` + // The targets specified for the association when the association version was // created. Targets []*Target `type:"list"` @@ -13622,6 +13664,12 @@ func (s *AssociationVersionInfo) SetScheduleExpression(v string) *AssociationVer return s } +// SetSyncCompliance sets the SyncCompliance field's value. +func (s *AssociationVersionInfo) SetSyncCompliance(v string) *AssociationVersionInfo { + s.SyncCompliance = &v + return s +} + // SetTargets sets the Targets field's value. func (s *AssociationVersionInfo) SetTargets(v []*Target) *AssociationVersionInfo { s.Targets = v @@ -13631,8 +13679,8 @@ func (s *AssociationVersionInfo) SetTargets(v []*Target) *AssociationVersionInfo // You have reached the maximum number versions allowed for an association. // Each association has a limit of 1,000 versions. type AssociationVersionLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -13649,17 +13697,17 @@ func (s AssociationVersionLimitExceeded) GoString() string { func newErrorAssociationVersionLimitExceeded(v protocol.ResponseMetadata) error { return &AssociationVersionLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AssociationVersionLimitExceeded) Code() string { +func (s *AssociationVersionLimitExceeded) Code() string { return "AssociationVersionLimitExceeded" } // Message returns the exception's message. -func (s AssociationVersionLimitExceeded) Message() string { +func (s *AssociationVersionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13667,22 +13715,22 @@ func (s AssociationVersionLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AssociationVersionLimitExceeded) OrigErr() error { +func (s *AssociationVersionLimitExceeded) OrigErr() error { return nil } -func (s AssociationVersionLimitExceeded) Error() string { +func (s *AssociationVersionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AssociationVersionLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AssociationVersionLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AssociationVersionLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *AssociationVersionLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // A structure that includes attributes that describe a document attachment. @@ -13844,8 +13892,8 @@ func (s *AttachmentsSource) SetValues(v []*string) *AttachmentsSource { // An Automation document with the specified name could not be found. type AutomationDefinitionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -13862,17 +13910,17 @@ func (s AutomationDefinitionNotFoundException) GoString() string { func newErrorAutomationDefinitionNotFoundException(v protocol.ResponseMetadata) error { return &AutomationDefinitionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AutomationDefinitionNotFoundException) Code() string { +func (s *AutomationDefinitionNotFoundException) Code() string { return "AutomationDefinitionNotFoundException" } // Message returns the exception's message. -func (s AutomationDefinitionNotFoundException) Message() string { +func (s *AutomationDefinitionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13880,28 +13928,28 @@ func (s AutomationDefinitionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AutomationDefinitionNotFoundException) OrigErr() error { +func (s *AutomationDefinitionNotFoundException) OrigErr() error { return nil } -func (s AutomationDefinitionNotFoundException) Error() string { +func (s *AutomationDefinitionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AutomationDefinitionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AutomationDefinitionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AutomationDefinitionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AutomationDefinitionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An Automation document with the specified name and version could not be found. type AutomationDefinitionVersionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -13918,17 +13966,17 @@ func (s AutomationDefinitionVersionNotFoundException) GoString() string { func newErrorAutomationDefinitionVersionNotFoundException(v protocol.ResponseMetadata) error { return &AutomationDefinitionVersionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AutomationDefinitionVersionNotFoundException) Code() string { +func (s *AutomationDefinitionVersionNotFoundException) Code() string { return "AutomationDefinitionVersionNotFoundException" } // Message returns the exception's message. -func (s AutomationDefinitionVersionNotFoundException) Message() string { +func (s *AutomationDefinitionVersionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13936,22 +13984,22 @@ func (s AutomationDefinitionVersionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AutomationDefinitionVersionNotFoundException) OrigErr() error { +func (s *AutomationDefinitionVersionNotFoundException) OrigErr() error { return nil } -func (s AutomationDefinitionVersionNotFoundException) Error() string { +func (s *AutomationDefinitionVersionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AutomationDefinitionVersionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AutomationDefinitionVersionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AutomationDefinitionVersionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AutomationDefinitionVersionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Detailed information about the current state of an individual Automation @@ -14265,8 +14313,8 @@ func (s *AutomationExecutionFilter) SetValues(v []*string) *AutomationExecutionF // The number of simultaneously running Automation executions exceeded the allowable // limit. type AutomationExecutionLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14283,17 +14331,17 @@ func (s AutomationExecutionLimitExceededException) GoString() string { func newErrorAutomationExecutionLimitExceededException(v protocol.ResponseMetadata) error { return &AutomationExecutionLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AutomationExecutionLimitExceededException) Code() string { +func (s *AutomationExecutionLimitExceededException) Code() string { return "AutomationExecutionLimitExceededException" } // Message returns the exception's message. -func (s AutomationExecutionLimitExceededException) Message() string { +func (s *AutomationExecutionLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14301,22 +14349,22 @@ func (s AutomationExecutionLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AutomationExecutionLimitExceededException) OrigErr() error { +func (s *AutomationExecutionLimitExceededException) OrigErr() error { return nil } -func (s AutomationExecutionLimitExceededException) Error() string { +func (s *AutomationExecutionLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AutomationExecutionLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AutomationExecutionLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AutomationExecutionLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *AutomationExecutionLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Details about a specific Automation execution. @@ -14331,8 +14379,8 @@ type AutomationExecutionMetadata struct { // Use this filter with DescribeAutomationExecutions. Specify either Local or // CrossAccount. CrossAccount is an Automation that runs in multiple AWS Regions - // and accounts. For more information, see Executing Automations in Multiple - // AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) + // and accounts. For more information, see Running Automation workflows in multiple + // AWS Regions and accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) // in the AWS Systems Manager User Guide. AutomationType *string `type:"string" enum:"AutomationType"` @@ -14361,7 +14409,7 @@ type AutomationExecutionMetadata struct { // The list of execution outputs as defined in the Automation document. FailureMessage *string `type:"string"` - // An Amazon S3 bucket where execution information is stored. + // An S3 bucket where execution information is stored. LogFile *string `type:"string"` // The MaxConcurrency value specified by the user when starting the Automation. @@ -14540,8 +14588,8 @@ func (s *AutomationExecutionMetadata) SetTargets(v []*Target) *AutomationExecuti // There is no automation execution information for the requested automation // execution ID. type AutomationExecutionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14558,17 +14606,17 @@ func (s AutomationExecutionNotFoundException) GoString() string { func newErrorAutomationExecutionNotFoundException(v protocol.ResponseMetadata) error { return &AutomationExecutionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AutomationExecutionNotFoundException) Code() string { +func (s *AutomationExecutionNotFoundException) Code() string { return "AutomationExecutionNotFoundException" } // Message returns the exception's message. -func (s AutomationExecutionNotFoundException) Message() string { +func (s *AutomationExecutionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14576,29 +14624,29 @@ func (s AutomationExecutionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AutomationExecutionNotFoundException) OrigErr() error { +func (s *AutomationExecutionNotFoundException) OrigErr() error { return nil } -func (s AutomationExecutionNotFoundException) Error() string { +func (s *AutomationExecutionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AutomationExecutionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AutomationExecutionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AutomationExecutionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AutomationExecutionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The specified step name and execution ID don't exist. Verify the information // and try again. type AutomationStepNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -14615,17 +14663,17 @@ func (s AutomationStepNotFoundException) GoString() string { func newErrorAutomationStepNotFoundException(v protocol.ResponseMetadata) error { return &AutomationStepNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AutomationStepNotFoundException) Code() string { +func (s *AutomationStepNotFoundException) Code() string { return "AutomationStepNotFoundException" } // Message returns the exception's message. -func (s AutomationStepNotFoundException) Message() string { +func (s *AutomationStepNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14633,22 +14681,22 @@ func (s AutomationStepNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AutomationStepNotFoundException) OrigErr() error { +func (s *AutomationStepNotFoundException) OrigErr() error { return nil } -func (s AutomationStepNotFoundException) Error() string { +func (s *AutomationStepNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AutomationStepNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AutomationStepNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AutomationStepNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *AutomationStepNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type CancelCommandInput struct { @@ -14874,16 +14922,16 @@ type Command struct { // The maximum number of instances that are allowed to run the command at the // same time. You can specify a number of instances, such as 10, or a percentage // of instances, such as 10%. The default value is 50. For more information - // about how to use MaxConcurrency, see Running Commands Using Systems Manager - // Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) + // about how to use MaxConcurrency, see Running commands using Systems Manager + // Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) // in the AWS Systems Manager User Guide. MaxConcurrency *string `min:"1" type:"string"` // The maximum number of errors allowed before the system stops sending the // command to additional targets. You can specify a number of errors, such as // 10, or a percentage or errors, such as 10%. The default value is 0. For more - // information about how to use MaxErrors, see Running Commands Using Systems - // Manager Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) + // information about how to use MaxErrors, see Running commands using Systems + // Manager Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) // in the AWS Systems Manager User Guide. MaxErrors *string `min:"1" type:"string"` @@ -14899,8 +14947,8 @@ type Command struct { OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. + // it. Instead, Systems Manager automatically determines the Region of the S3 + // bucket. OutputS3Region *string `min:"3" type:"string"` // The parameter values to be inserted in the document when running the command. @@ -14919,8 +14967,8 @@ type Command struct { // A detailed status of the command execution. StatusDetails includes more information // than Status because it includes states resulting from error and concurrency // control parameters. StatusDetails can show different results than Status. - // For more information about these statuses, see Understanding Command Statuses - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // For more information about these statuses, see Understanding command statuses + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the AWS Systems Manager User Guide. StatusDetails can be one of the following // values: // @@ -14960,6 +15008,9 @@ type Command struct { // that you specify. Targets is required if you don't provide one or more instance // IDs in the call. Targets []*Target `type:"list"` + + // The TimeoutSeconds value specified for a command. + TimeoutSeconds *int64 `min:"30" type:"integer"` } // String returns the string representation @@ -15110,6 +15161,12 @@ func (s *Command) SetTargets(v []*Target) *Command { return s } +// SetTimeoutSeconds sets the TimeoutSeconds field's value. +func (s *Command) SetTimeoutSeconds(v int64) *Command { + s.TimeoutSeconds = &v + return s +} + // Describes a command filter. type CommandFilter struct { _ struct{} `type:"structure"` @@ -15217,9 +15274,8 @@ type CommandInvocation struct { // The instance ID in which this invocation was requested. InstanceId *string `type:"string"` - // The name of the invocation target. For Amazon EC2 instances this is the value - // for the aws:Name tag. For on-premises instances, this is the name of the - // instance. + // The name of the invocation target. For EC2 instances this is the value for + // the aws:Name tag. For on-premises instances, this is the name of the instance. InstanceName *string `type:"string"` // Configurations for sending notifications about command status changes on @@ -15233,16 +15289,16 @@ type CommandInvocation struct { // notifications about command status changes on a per instance basis. ServiceRole *string `type:"string"` - // The URL to the plugin's StdErr file in Amazon S3, if the Amazon S3 bucket - // was defined for the parent command. For an invocation, StandardErrorUrl is - // populated if there is just one plugin defined for the command, and the Amazon - // S3 bucket was defined for the command. + // The URL to the plugin's StdErr file in Amazon S3, if the S3 bucket was defined + // for the parent command. For an invocation, StandardErrorUrl is populated + // if there is just one plugin defined for the command, and the S3 bucket was + // defined for the command. StandardErrorUrl *string `type:"string"` - // The URL to the plugin's StdOut file in Amazon S3, if the Amazon S3 bucket - // was defined for the parent command. For an invocation, StandardOutputUrl - // is populated if there is just one plugin defined for the command, and the - // Amazon S3 bucket was defined for the command. + // The URL to the plugin's StdOut file in Amazon S3, if the S3 bucket was defined + // for the parent command. For an invocation, StandardOutputUrl is populated + // if there is just one plugin defined for the command, and the S3 bucket was + // defined for the command. StandardOutputUrl *string `type:"string"` // Whether or not the invocation succeeded, failed, or is pending. @@ -15252,7 +15308,7 @@ type CommandInvocation struct { // targeted by the command). StatusDetails includes more information than Status // because it includes states resulting from error and concurrency control parameters. // StatusDetails can show different results than Status. For more information - // about these statuses, see Understanding Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // about these statuses, see Understanding command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the AWS Systems Manager User Guide. StatusDetails can be one of the following // values: // @@ -15421,7 +15477,7 @@ type CommandPlugin struct { // // test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript // - // test_folder is the name of the Amazon S3 bucket; + // test_folder is the name of the S3 bucket; // // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; // @@ -15436,7 +15492,7 @@ type CommandPlugin struct { // // test_folder/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-1234567876543/awsrunShellScript // - // test_folder is the name of the Amazon S3 bucket; + // test_folder is the name of the S3 bucket; // // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; // @@ -15446,8 +15502,7 @@ type CommandPlugin struct { OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. + // it. Instead, Systems Manager automatically determines the S3 bucket region. OutputS3Region *string `min:"3" type:"string"` // A numeric response code generated after running the plugin. @@ -15465,8 +15520,7 @@ type CommandPlugin struct { StandardErrorUrl *string `type:"string"` // The URL for the complete text written by the plugin to stdout in Amazon S3. - // If the Amazon S3 bucket for the command was not specified, then this string - // is empty. + // If the S3 bucket for the command was not specified, then this string is empty. StandardOutputUrl *string `type:"string"` // The status of this plugin. You can run a document with multiple plugins. @@ -15475,8 +15529,8 @@ type CommandPlugin struct { // A detailed status of the plugin execution. StatusDetails includes more information // than Status because it includes states resulting from error and concurrency // control parameters. StatusDetails can show different results than Status. - // For more information about these statuses, see Understanding Command Statuses - // (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // For more information about these statuses, see Understanding command statuses + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the AWS Systems Manager User Guide. StatusDetails can be one of the following // values: // @@ -15663,7 +15717,7 @@ func (s *ComplianceExecutionSummary) SetExecutionType(v string) *ComplianceExecu // Information about the compliance as defined by the resource type. For example, // for a patch resource type, Items includes information about the PatchSeverity, -// Classification, etc. +// Classification, and so on. type ComplianceItem struct { _ struct{} `type:"structure"` @@ -15955,8 +16009,8 @@ func (s *ComplianceSummaryItem) SetNonCompliantSummary(v *NonCompliantSummary) * // You specified too many custom compliance types. You can specify a maximum // of 10 different types. type ComplianceTypeCountLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -15973,17 +16027,17 @@ func (s ComplianceTypeCountLimitExceededException) GoString() string { func newErrorComplianceTypeCountLimitExceededException(v protocol.ResponseMetadata) error { return &ComplianceTypeCountLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ComplianceTypeCountLimitExceededException) Code() string { +func (s *ComplianceTypeCountLimitExceededException) Code() string { return "ComplianceTypeCountLimitExceededException" } // Message returns the exception's message. -func (s ComplianceTypeCountLimitExceededException) Message() string { +func (s *ComplianceTypeCountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15991,22 +16045,22 @@ func (s ComplianceTypeCountLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ComplianceTypeCountLimitExceededException) OrigErr() error { +func (s *ComplianceTypeCountLimitExceededException) OrigErr() error { return nil } -func (s ComplianceTypeCountLimitExceededException) Error() string { +func (s *ComplianceTypeCountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ComplianceTypeCountLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ComplianceTypeCountLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ComplianceTypeCountLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ComplianceTypeCountLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A summary of resources that are compliant. The summary is organized according @@ -16066,7 +16120,7 @@ type CreateActivationInput struct { // The Amazon Identity and Access Management (IAM) role that you want to assign // to the managed instance. This IAM role must provide AssumeRole permissions // for the Systems Manager service principal ssm.amazonaws.com. For more information, - // see Create an IAM Service Role for a Hybrid Environment (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) + // see Create an IAM service role for a hybrid environment (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) // in the AWS Systems Manager User Guide. // // IamRole is a required field @@ -16358,7 +16412,7 @@ type CreateAssociationBatchRequestEntry struct { // Name is a required field Name *string `type:"string" required:"true"` - // An Amazon S3 bucket where you want to store the results of this request. + // An S3 bucket where you want to store the results of this request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // A description of the parameters for a document. @@ -16367,6 +16421,20 @@ type CreateAssociationBatchRequestEntry struct { // A cron expression that specifies a schedule when the association runs. ScheduleExpression *string `min:"1" type:"string"` + // The mode for generating association compliance. You can specify AUTO or MANUAL. + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT. If the association execution doesn't run + // successfully, the association is NON-COMPLIANT. + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the + // PutComplianceItems API action. In this case, compliance data is not managed + // by State Manager. It is managed by your direct call to the PutComplianceItems + // API action. + // + // By default, all associations use AUTO mode. + SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` + // The instances targeted by the request. Targets []*Target `type:"list"` } @@ -16487,6 +16555,12 @@ func (s *CreateAssociationBatchRequestEntry) SetScheduleExpression(v string) *Cr return s } +// SetSyncCompliance sets the SyncCompliance field's value. +func (s *CreateAssociationBatchRequestEntry) SetSyncCompliance(v string) *CreateAssociationBatchRequestEntry { + s.SyncCompliance = &v + return s +} + // SetTargets sets the Targets field's value. func (s *CreateAssociationBatchRequestEntry) SetTargets(v []*Target) *CreateAssociationBatchRequestEntry { s.Targets = v @@ -16568,7 +16642,7 @@ type CreateAssociationInput struct { // Name is a required field Name *string `type:"string" required:"true"` - // An Amazon S3 bucket where you want to store the output details of the request. + // An S3 bucket where you want to store the output details of the request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // The parameters for the runtime configuration of the document. @@ -16577,8 +16651,25 @@ type CreateAssociationInput struct { // A cron expression when the association will be applied to the target(s). ScheduleExpression *string `min:"1" type:"string"` - // The targets (either instances or tags) for the association. You must specify - // a value for Targets if you don't specify a value for InstanceId. + // The mode for generating association compliance. You can specify AUTO or MANUAL. + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT. If the association execution doesn't run + // successfully, the association is NON-COMPLIANT. + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the + // PutComplianceItems API action. In this case, compliance data is not managed + // by State Manager. It is managed by your direct call to the PutComplianceItems + // API action. + // + // By default, all associations use AUTO mode. + SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` + + // The targets for the association. You can target instances by using tags, + // AWS Resource Groups, all instances in an AWS account, or individual instance + // IDs. For more information about choosing targets for an association, see + // Using targets and rate controls with State Manager associations (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html) + // in the AWS Systems Manager User Guide. Targets []*Target `type:"list"` } @@ -16698,6 +16789,12 @@ func (s *CreateAssociationInput) SetScheduleExpression(v string) *CreateAssociat return s } +// SetSyncCompliance sets the SyncCompliance field's value. +func (s *CreateAssociationInput) SetSyncCompliance(v string) *CreateAssociationInput { + s.SyncCompliance = &v + return s +} + // SetTargets sets the Targets field's value. func (s *CreateAssociationInput) SetTargets(v []*Target) *CreateAssociationInput { s.Targets = v @@ -16734,7 +16831,17 @@ type CreateDocumentInput struct { // document. Attachments []*AttachmentsSource `type:"list"` - // A valid JSON or YAML string. + // The content for the new SSM document in JSON or YAML format. We recommend + // storing the contents for your new document in an external JSON or YAML file + // and referencing the file in a command. + // + // For examples, see the following topics in the AWS Systems Manager User Guide. + // + // * Create an SSM document (AWS API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html) + // + // * Create an SSM document (AWS CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-cli.html) + // + // * Create an SSM document (API) (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html) // // Content is a required field Content *string `min:"1" type:"string" required:"true"` @@ -16748,8 +16855,8 @@ type CreateDocumentInput struct { // A name for the Systems Manager document. // - // Do not use the following to begin the names of documents you create. They - // are reserved by AWS for use as document prefixes: + // You can't use the following strings as document name prefixes. These are + // reserved by AWS for use as document name prefixes: // // * aws // @@ -16760,8 +16867,13 @@ type CreateDocumentInput struct { // Name is a required field Name *string `type:"string" required:"true"` - // A list of SSM documents required by a document. For example, an ApplicationConfiguration - // document requires an ApplicationConfigurationSchema document. + // A list of SSM documents required by a document. This parameter is used exclusively + // by AWS AppConfig. When a user creates an AppConfig configuration in an SSM + // document, the user must also specify a required document for validation purposes. + // In this case, an ApplicationConfiguration document requires an ApplicationConfigurationSchema + // document for validation purposes. For more information, see AWS AppConfig + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/appconfig.html) + // in the AWS Systems Manager User Guide. Requires []*DocumentRequires `min:"1" type:"list"` // Optional metadata that you assign to a resource. Tags enable you to categorize @@ -16781,8 +16893,8 @@ type CreateDocumentInput struct { // on. For example, to run a document on EC2 instances, specify the following // value: /AWS::EC2::Instance. If you specify a value of '/' the document can // run on all types of resources. If you don't specify a value, the document - // can't run on any resources. For a list of valid resource types, see AWS Resource - // Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) + // can't run on any resources. For a list of valid resource types, see AWS resource + // and property types reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the AWS CloudFormation User Guide. TargetType *string `type:"string"` @@ -17189,7 +17301,7 @@ type CreateOpsItemInput struct { // Use the /aws/resources key in OperationalData to specify a related resource // in the request. Use the /aws/automations key in OperationalData to associate // an Automation runbook with the OpsItem. To view AWS CLI example commands - // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) + // that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) // in the AWS Systems Manager User Guide. OperationalData map[string]*OpsItemDataValue `type:"map"` @@ -17204,14 +17316,16 @@ type CreateOpsItemInput struct { // Specify a severity to assign to an OpsItem. Severity *string `min:"1" type:"string"` - // The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. + // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. + // + // The source name can't contain the following strings: aws, amazon, and amzn. // // Source is a required field Source *string `min:"1" type:"string" required:"true"` // Optional metadata that you assign to a resource. You can restrict access // to OpsItems by using an inline IAM policy that specifies tags. For more information, - // see Getting Started with OpsCenter (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html#OpsCenter-getting-started-user-permissions) + // see Getting started with OpsCenter (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-getting-started.html#OpsCenter-getting-started-user-permissions) // in the AWS Systems Manager User Guide. // // Tags use a key-value pair. For example: @@ -17387,8 +17501,8 @@ type CreatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // rejected patches, see About package name formats for approved and rejected + // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` @@ -17423,8 +17537,8 @@ type CreatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // rejected patches, see About package name formats for approved and rejected + // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` @@ -17627,7 +17741,8 @@ func (s *CreatePatchBaselineOutput) SetBaselineId(v string) *CreatePatchBaseline type CreateResourceDataSyncInput struct { _ struct{} `type:"structure"` - // Amazon S3 configuration details for the sync. + // Amazon S3 configuration details for the sync. This parameter is required + // if the SyncType value is SyncToDestination. S3Destination *ResourceDataSyncS3Destination `type:"structure"` // A name for the configuration. @@ -17635,13 +17750,17 @@ type CreateResourceDataSyncInput struct { // SyncName is a required field SyncName *string `min:"1" type:"string" required:"true"` - // Specify information about the data sources to synchronize. + // Specify information about the data sources to synchronize. This parameter + // is required if the SyncType value is SyncFromSource. SyncSource *ResourceDataSyncSource `type:"structure"` // Specify SyncToDestination to create a resource data sync that synchronizes - // data from multiple AWS Regions to an Amazon S3 bucket. Specify SyncFromSource - // to synchronize data from multiple AWS accounts and Regions, as listed in - // AWS Organizations. + // data to an S3 bucket for Inventory. If you specify SyncToDestination, you + // must provide a value for S3Destination. Specify SyncFromSource to synchronize + // data from a single account and multiple Regions, or multiple AWS accounts + // and Regions, as listed in AWS Organizations for Explorer. If you specify + // SyncFromSource, you must provide a value for SyncSource. The default value + // is SyncToDestination. SyncType *string `min:"1" type:"string"` } @@ -17725,8 +17844,8 @@ func (s CreateResourceDataSyncOutput) GoString() string { // You have exceeded the limit for custom schemas. Delete one or more custom // schemas and try again. type CustomSchemaCountLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -17743,17 +17862,17 @@ func (s CustomSchemaCountLimitExceededException) GoString() string { func newErrorCustomSchemaCountLimitExceededException(v protocol.ResponseMetadata) error { return &CustomSchemaCountLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s CustomSchemaCountLimitExceededException) Code() string { +func (s *CustomSchemaCountLimitExceededException) Code() string { return "CustomSchemaCountLimitExceededException" } // Message returns the exception's message. -func (s CustomSchemaCountLimitExceededException) Message() string { +func (s *CustomSchemaCountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17761,22 +17880,22 @@ func (s CustomSchemaCountLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s CustomSchemaCountLimitExceededException) OrigErr() error { +func (s *CustomSchemaCountLimitExceededException) OrigErr() error { return nil } -func (s CustomSchemaCountLimitExceededException) Error() string { +func (s *CustomSchemaCountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s CustomSchemaCountLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *CustomSchemaCountLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s CustomSchemaCountLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *CustomSchemaCountLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type DeleteActivationInput struct { @@ -18067,7 +18186,7 @@ type DeleteInventoryOutput struct { DeletionId *string `type:"string"` // A summary of the delete operation. For more information about this summary, - // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary) + // see Deleting custom inventory (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary) // in the AWS Systems Manager User Guide. DeletionSummary *InventoryDeletionSummary `type:"structure"` @@ -19692,7 +19811,7 @@ type DescribeDocumentPermissionOutput struct { // either an AWS account or All. AccountIds []*string `type:"list"` - // A list of of AWS accounts where the current document is shared and the version + // A list of AWS accounts where the current document is shared and the version // shared with each account. AccountSharingInfoList []*AccountSharingInfo `type:"list"` } @@ -20009,17 +20128,16 @@ type DescribeInstanceInformationInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of instances. - // You can filter on Amazon EC2 tag. Specify tags by using a key-value mapping. + // You can filter based on tags applied to EC2 instances. Use this Filters data + // type instead of InstanceInformationFilterList, which is deprecated. Filters []*InstanceInformationStringFilter `type:"list"` // This is a legacy method. We recommend that you don't use this method. Instead, - // use the InstanceInformationFilter action. The InstanceInformationFilter action - // enables you to return instance information by using tags that are specified - // as a key-value mapping. + // use the Filters data type. Filters enables you to return instance information + // by filtering based on tags applied to managed instances. // - // If you do use this method, then you can't use the InstanceInformationFilter - // action. Using this method and the InstanceInformationFilter action causes - // an exception error. + // Attempting to use InstanceInformationFilterList and Filters leads to an exception + // error. InstanceInformationFilterList []*InstanceInformationFilter `type:"list"` // The maximum number of items to return for this call. The call also returns @@ -21559,7 +21677,7 @@ type DescribeOpsItemsInput struct { // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` - // One or more filters to limit the reponse. + // One or more filters to limit the response. // // * Key: CreatedTime Operations: GreaterThan, LessThan // @@ -21765,8 +21883,7 @@ func (s *DescribeParametersInput) SetParameterFilters(v []*ParameterStringFilter type DescribeParametersOutput struct { _ struct{} `type:"structure"` - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. + // The token to use when requesting the next set of items. NextToken *string `type:"string"` // Parameters returned by the request. @@ -22383,8 +22500,8 @@ func (s *DescribeSessionsOutput) SetSessions(v []*Session) *DescribeSessionsOutp // The specified document already exists. type DocumentAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -22401,17 +22518,17 @@ func (s DocumentAlreadyExists) GoString() string { func newErrorDocumentAlreadyExists(v protocol.ResponseMetadata) error { return &DocumentAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DocumentAlreadyExists) Code() string { +func (s *DocumentAlreadyExists) Code() string { return "DocumentAlreadyExists" } // Message returns the exception's message. -func (s DocumentAlreadyExists) Message() string { +func (s *DocumentAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22419,22 +22536,22 @@ func (s DocumentAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DocumentAlreadyExists) OrigErr() error { +func (s *DocumentAlreadyExists) OrigErr() error { return nil } -func (s DocumentAlreadyExists) Error() string { +func (s *DocumentAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DocumentAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DocumentAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DocumentAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *DocumentAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // A default version of a document. @@ -22484,7 +22601,7 @@ type DocumentDescription struct { _ struct{} `type:"structure"` // Details about the document attachments, including names, locations, sizes, - // etc. + // and so on. AttachmentsInformation []*AttachmentInformation `type:"list"` // The date when the document was created. @@ -22554,7 +22671,7 @@ type DocumentDescription struct { // The target type which defines the kinds of resources the document can run // on. For example, /AWS::EC2::Instance. For a list of valid resource types, - // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) + // see AWS resource and property types reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the AWS CloudFormation User Guide. TargetType *string `type:"string"` @@ -22704,7 +22821,7 @@ func (s *DocumentDescription) SetVersionName(v string) *DocumentDescription { return s } -// Describes a filter. +// This data type is deprecated. Instead, use DocumentKeyValuesFilter. type DocumentFilter struct { _ struct{} `type:"structure"` @@ -22794,7 +22911,7 @@ type DocumentIdentifier struct { // The target type which defines the kinds of resources the document can run // on. For example, /AWS::EC2::Instance. For a list of valid resource types, - // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) + // see AWS resource and property types reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the AWS CloudFormation User Guide. TargetType *string `type:"string"` @@ -22884,7 +23001,8 @@ func (s *DocumentIdentifier) SetVersionName(v string) *DocumentIdentifier { // // For keys, you can specify one or more tags that have been applied to a document. // -// Other valid values include Owner, Name, PlatformTypes, and DocumentType. +// Other valid values include Owner, Name, PlatformTypes, DocumentType, and +// TargetType. // // Note that only one Owner can be specified in a request. For example: Key=Owner,Values=Self. // @@ -22899,7 +23017,7 @@ func (s *DocumentIdentifier) SetVersionName(v string) *DocumentIdentifier { // for a key, documents that are identified by any of the values are returned // in the results. // -// To specify a custom key and value pair, use the format Key=tag:[tagName],Values=[valueName]. +// To specify a custom key and value pair, use the format Key=tag:tagName,Values=valueName. // // For example, if you created a Key called region and are using the AWS CLI // to call the list-documents command: @@ -22952,8 +23070,8 @@ func (s *DocumentKeyValuesFilter) SetValues(v []*string) *DocumentKeyValuesFilte // You can have at most 500 active Systems Manager documents. type DocumentLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -22970,17 +23088,17 @@ func (s DocumentLimitExceeded) GoString() string { func newErrorDocumentLimitExceeded(v protocol.ResponseMetadata) error { return &DocumentLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DocumentLimitExceeded) Code() string { +func (s *DocumentLimitExceeded) Code() string { return "DocumentLimitExceeded" } // Message returns the exception's message. -func (s DocumentLimitExceeded) Message() string { +func (s *DocumentLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -22988,22 +23106,22 @@ func (s DocumentLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DocumentLimitExceeded) OrigErr() error { +func (s *DocumentLimitExceeded) OrigErr() error { return nil } -func (s DocumentLimitExceeded) Error() string { +func (s *DocumentLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DocumentLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DocumentLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DocumentLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *DocumentLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Parameters specified in a System Manager document that run on the server @@ -23064,8 +23182,8 @@ func (s *DocumentParameter) SetType(v string) *DocumentParameter { // a document with a maximum of 20 accounts. You can publicly share up to five // documents. If you need to increase this limit, contact AWS Support. type DocumentPermissionLimit struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -23082,17 +23200,17 @@ func (s DocumentPermissionLimit) GoString() string { func newErrorDocumentPermissionLimit(v protocol.ResponseMetadata) error { return &DocumentPermissionLimit{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DocumentPermissionLimit) Code() string { +func (s *DocumentPermissionLimit) Code() string { return "DocumentPermissionLimit" } // Message returns the exception's message. -func (s DocumentPermissionLimit) Message() string { +func (s *DocumentPermissionLimit) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23100,22 +23218,22 @@ func (s DocumentPermissionLimit) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DocumentPermissionLimit) OrigErr() error { +func (s *DocumentPermissionLimit) OrigErr() error { return nil } -func (s DocumentPermissionLimit) Error() string { +func (s *DocumentPermissionLimit) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DocumentPermissionLimit) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DocumentPermissionLimit) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DocumentPermissionLimit) RequestID() string { - return s.respMetadata.RequestID +func (s *DocumentPermissionLimit) RequestID() string { + return s.RespMetadata.RequestID } // An SSM document required by the current document. @@ -23263,8 +23381,8 @@ func (s *DocumentVersionInfo) SetVersionName(v string) *DocumentVersionInfo { // The document has too many versions. Delete one or more document versions // and try again. type DocumentVersionLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -23281,17 +23399,17 @@ func (s DocumentVersionLimitExceeded) GoString() string { func newErrorDocumentVersionLimitExceeded(v protocol.ResponseMetadata) error { return &DocumentVersionLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DocumentVersionLimitExceeded) Code() string { +func (s *DocumentVersionLimitExceeded) Code() string { return "DocumentVersionLimitExceeded" } // Message returns the exception's message. -func (s DocumentVersionLimitExceeded) Message() string { +func (s *DocumentVersionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23299,33 +23417,33 @@ func (s DocumentVersionLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DocumentVersionLimitExceeded) OrigErr() error { +func (s *DocumentVersionLimitExceeded) OrigErr() error { return nil } -func (s DocumentVersionLimitExceeded) Error() string { +func (s *DocumentVersionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DocumentVersionLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DocumentVersionLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DocumentVersionLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *DocumentVersionLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Error returned when the ID specified for a resource, such as a maintenance // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. type DoesNotExistException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -23342,17 +23460,17 @@ func (s DoesNotExistException) GoString() string { func newErrorDoesNotExistException(v protocol.ResponseMetadata) error { return &DoesNotExistException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DoesNotExistException) Code() string { +func (s *DoesNotExistException) Code() string { return "DoesNotExistException" } // Message returns the exception's message. -func (s DoesNotExistException) Message() string { +func (s *DoesNotExistException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23360,29 +23478,29 @@ func (s DoesNotExistException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DoesNotExistException) OrigErr() error { +func (s *DoesNotExistException) OrigErr() error { return nil } -func (s DoesNotExistException) Error() string { +func (s *DoesNotExistException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DoesNotExistException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DoesNotExistException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DoesNotExistException) RequestID() string { - return s.respMetadata.RequestID +func (s *DoesNotExistException) RequestID() string { + return s.RespMetadata.RequestID } // The content of the association document matches another document. Change // the content of the document and try again. type DuplicateDocumentContent struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -23399,17 +23517,17 @@ func (s DuplicateDocumentContent) GoString() string { func newErrorDuplicateDocumentContent(v protocol.ResponseMetadata) error { return &DuplicateDocumentContent{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateDocumentContent) Code() string { +func (s *DuplicateDocumentContent) Code() string { return "DuplicateDocumentContent" } // Message returns the exception's message. -func (s DuplicateDocumentContent) Message() string { +func (s *DuplicateDocumentContent) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23417,29 +23535,29 @@ func (s DuplicateDocumentContent) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateDocumentContent) OrigErr() error { +func (s *DuplicateDocumentContent) OrigErr() error { return nil } -func (s DuplicateDocumentContent) Error() string { +func (s *DuplicateDocumentContent) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateDocumentContent) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateDocumentContent) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateDocumentContent) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateDocumentContent) RequestID() string { + return s.RespMetadata.RequestID } // The version name has already been used in this document. Specify a different // version name, and then try again. type DuplicateDocumentVersionName struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -23456,17 +23574,17 @@ func (s DuplicateDocumentVersionName) GoString() string { func newErrorDuplicateDocumentVersionName(v protocol.ResponseMetadata) error { return &DuplicateDocumentVersionName{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateDocumentVersionName) Code() string { +func (s *DuplicateDocumentVersionName) Code() string { return "DuplicateDocumentVersionName" } // Message returns the exception's message. -func (s DuplicateDocumentVersionName) Message() string { +func (s *DuplicateDocumentVersionName) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23474,28 +23592,28 @@ func (s DuplicateDocumentVersionName) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateDocumentVersionName) OrigErr() error { +func (s *DuplicateDocumentVersionName) OrigErr() error { return nil } -func (s DuplicateDocumentVersionName) Error() string { +func (s *DuplicateDocumentVersionName) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateDocumentVersionName) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateDocumentVersionName) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateDocumentVersionName) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateDocumentVersionName) RequestID() string { + return s.RespMetadata.RequestID } // You cannot specify an instance ID in more than one association. type DuplicateInstanceId struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -23512,17 +23630,17 @@ func (s DuplicateInstanceId) GoString() string { func newErrorDuplicateInstanceId(v protocol.ResponseMetadata) error { return &DuplicateInstanceId{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DuplicateInstanceId) Code() string { +func (s *DuplicateInstanceId) Code() string { return "DuplicateInstanceId" } // Message returns the exception's message. -func (s DuplicateInstanceId) Message() string { +func (s *DuplicateInstanceId) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23530,22 +23648,22 @@ func (s DuplicateInstanceId) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DuplicateInstanceId) OrigErr() error { +func (s *DuplicateInstanceId) OrigErr() error { return nil } -func (s DuplicateInstanceId) Error() string { +func (s *DuplicateInstanceId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DuplicateInstanceId) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DuplicateInstanceId) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DuplicateInstanceId) RequestID() string { - return s.respMetadata.RequestID +func (s *DuplicateInstanceId) RequestID() string { + return s.RespMetadata.RequestID } // The EffectivePatch structure defines metadata about a patch along with the @@ -23678,8 +23796,8 @@ func (s *FailureDetails) SetFailureType(v string) *FailureDetails { // You attempted to register a LAMBDA or STEP_FUNCTIONS task in a region where // the corresponding service is not available. type FeatureNotAvailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -23696,17 +23814,17 @@ func (s FeatureNotAvailableException) GoString() string { func newErrorFeatureNotAvailableException(v protocol.ResponseMetadata) error { return &FeatureNotAvailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s FeatureNotAvailableException) Code() string { +func (s *FeatureNotAvailableException) Code() string { return "FeatureNotAvailableException" } // Message returns the exception's message. -func (s FeatureNotAvailableException) Message() string { +func (s *FeatureNotAvailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -23714,22 +23832,22 @@ func (s FeatureNotAvailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s FeatureNotAvailableException) OrigErr() error { +func (s *FeatureNotAvailableException) OrigErr() error { return nil } -func (s FeatureNotAvailableException) Error() string { +func (s *FeatureNotAvailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s FeatureNotAvailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *FeatureNotAvailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s FeatureNotAvailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *FeatureNotAvailableException) RequestID() string { + return s.RespMetadata.RequestID } type GetAutomationExecutionInput struct { @@ -23905,7 +24023,7 @@ type GetCommandInvocationInput struct { CommandId *string `min:"36" type:"string" required:"true"` // (Required) The ID of the managed instance targeted by the command. A managed - // instance can be an Amazon EC2 instance or an instance in your hybrid environment + // instance can be an EC2 instance or an instance in your hybrid environment // that is configured for Systems Manager. // // InstanceId is a required field @@ -24007,8 +24125,8 @@ type GetCommandInvocationOutput struct { ExecutionStartDateTime *string `type:"string"` // The ID of the managed instance targeted by the command. A managed instance - // can be an Amazon EC2 instance or an instance in your hybrid environment that - // is configured for Systems Manager. + // can be an EC2 instance or an instance in your hybrid environment that is + // configured for Systems Manager. InstanceId *string `type:"string"` // The name of the plugin for which you want detailed results. For example, @@ -24034,7 +24152,7 @@ type GetCommandInvocationOutput struct { StandardOutputContent *string `type:"string"` // The URL for the complete text written by the plugin to stdout in Amazon S3. - // If an Amazon S3 bucket was not specified, then this string is empty. + // If an S3 bucket was not specified, then this string is empty. StandardOutputUrl *string `type:"string"` // The status of this invocation plugin. This status can be different than StatusDetails. @@ -24044,7 +24162,7 @@ type GetCommandInvocationOutput struct { // includes more information than Status because it includes states resulting // from error and concurrency control parameters. StatusDetails can show different // results than Status. For more information about these statuses, see Understanding - // Command Statuses (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) + // command statuses (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the AWS Systems Manager User Guide. StatusDetails can be one of the following // values: // @@ -24055,10 +24173,10 @@ type GetCommandInvocationOutput struct { // // * Delayed: The system attempted to send the command to the target, but // the target was not available. The instance might not be available because - // of network issues, the instance was stopped, etc. The system will try - // to deliver the command again. + // of network issues, because the instance was stopped, or for similar reasons. + // The system will try to send the command again. // - // * Success: The command or plugin was run successfully. This is a terminal + // * Success: The command or plugin ran successfully. This is a terminal // state. // // * Delivery Timed Out: The command was not delivered to the instance before @@ -24456,7 +24574,7 @@ type GetDocumentInput struct { // An optional field specifying the version of the artifact associated with // the document. For example, "Release 12, Update 6". This value is unique across - // all versions of a document, and cannot be changed. + // all versions of a document and can't be changed. VersionName *string `type:"string"` } @@ -24511,7 +24629,7 @@ type GetDocumentOutput struct { _ struct{} `type:"structure"` // A description of the document attachments, including names, locations, sizes, - // etc. + // and so on. AttachmentsContent []*AttachmentContent `type:"list"` // The contents of the Systems Manager document. @@ -26717,7 +26835,8 @@ func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineO type GetServiceSettingInput struct { _ struct{} `type:"structure"` - // The ID of the service setting to get. + // The ID of the service setting to get. The setting ID can be /ssm/parameter-store/default-parameter-tier, + // /ssm/parameter-store/high-throughput-enabled, or /ssm/managed-instance/activation-tier. // // SettingId is a required field SettingId *string `min:"1" type:"string" required:"true"` @@ -26780,14 +26899,14 @@ func (s *GetServiceSettingOutput) SetServiceSetting(v *ServiceSetting) *GetServi } // A hierarchy can have a maximum of 15 levels. For more information, see Requirements -// and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) +// and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. type HierarchyLevelLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A hierarchy can have a maximum of 15 levels. For more information, see Requirements - // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) + // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. Message_ *string `locationName:"message" type:"string"` } @@ -26804,17 +26923,17 @@ func (s HierarchyLevelLimitExceededException) GoString() string { func newErrorHierarchyLevelLimitExceededException(v protocol.ResponseMetadata) error { return &HierarchyLevelLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s HierarchyLevelLimitExceededException) Code() string { +func (s *HierarchyLevelLimitExceededException) Code() string { return "HierarchyLevelLimitExceededException" } // Message returns the exception's message. -func (s HierarchyLevelLimitExceededException) Message() string { +func (s *HierarchyLevelLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26822,30 +26941,30 @@ func (s HierarchyLevelLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s HierarchyLevelLimitExceededException) OrigErr() error { +func (s *HierarchyLevelLimitExceededException) OrigErr() error { return nil } -func (s HierarchyLevelLimitExceededException) Error() string { +func (s *HierarchyLevelLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s HierarchyLevelLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *HierarchyLevelLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s HierarchyLevelLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *HierarchyLevelLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Parameter Store does not support changing a parameter type in a hierarchy. // For example, you can't change a parameter from a String type to a SecureString // type. You must create a new, unique parameter. type HierarchyTypeMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // Parameter Store does not support changing a parameter type in a hierarchy. // For example, you can't change a parameter from a String type to a SecureString @@ -26865,17 +26984,17 @@ func (s HierarchyTypeMismatchException) GoString() string { func newErrorHierarchyTypeMismatchException(v protocol.ResponseMetadata) error { return &HierarchyTypeMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s HierarchyTypeMismatchException) Code() string { +func (s *HierarchyTypeMismatchException) Code() string { return "HierarchyTypeMismatchException" } // Message returns the exception's message. -func (s HierarchyTypeMismatchException) Message() string { +func (s *HierarchyTypeMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26883,29 +27002,29 @@ func (s HierarchyTypeMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s HierarchyTypeMismatchException) OrigErr() error { +func (s *HierarchyTypeMismatchException) OrigErr() error { return nil } -func (s HierarchyTypeMismatchException) Error() string { +func (s *HierarchyTypeMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s HierarchyTypeMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *HierarchyTypeMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s HierarchyTypeMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *HierarchyTypeMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // Error returned when an idempotent operation is retried and the parameters // don't match the original call to the API with the same idempotency token. type IdempotentParameterMismatch struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -26922,17 +27041,17 @@ func (s IdempotentParameterMismatch) GoString() string { func newErrorIdempotentParameterMismatch(v protocol.ResponseMetadata) error { return &IdempotentParameterMismatch{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IdempotentParameterMismatch) Code() string { +func (s *IdempotentParameterMismatch) Code() string { return "IdempotentParameterMismatch" } // Message returns the exception's message. -func (s IdempotentParameterMismatch) Message() string { +func (s *IdempotentParameterMismatch) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26940,30 +27059,30 @@ func (s IdempotentParameterMismatch) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IdempotentParameterMismatch) OrigErr() error { +func (s *IdempotentParameterMismatch) OrigErr() error { return nil } -func (s IdempotentParameterMismatch) Error() string { +func (s *IdempotentParameterMismatch) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IdempotentParameterMismatch) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IdempotentParameterMismatch) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IdempotentParameterMismatch) RequestID() string { - return s.respMetadata.RequestID +func (s *IdempotentParameterMismatch) RequestID() string { + return s.RespMetadata.RequestID } // There is a conflict in the policies specified for this parameter. You can't, // for example, specify two Expiration policies for a parameter. Review your // policies, and try again. type IncompatiblePolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -26980,17 +27099,17 @@ func (s IncompatiblePolicyException) GoString() string { func newErrorIncompatiblePolicyException(v protocol.ResponseMetadata) error { return &IncompatiblePolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s IncompatiblePolicyException) Code() string { +func (s *IncompatiblePolicyException) Code() string { return "IncompatiblePolicyException" } // Message returns the exception's message. -func (s IncompatiblePolicyException) Message() string { +func (s *IncompatiblePolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -26998,22 +27117,22 @@ func (s IncompatiblePolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s IncompatiblePolicyException) OrigErr() error { +func (s *IncompatiblePolicyException) OrigErr() error { return nil } -func (s IncompatiblePolicyException) Error() string { +func (s *IncompatiblePolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s IncompatiblePolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *IncompatiblePolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s IncompatiblePolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *IncompatiblePolicyException) RequestID() string { + return s.RespMetadata.RequestID } // Status information about the aggregated associations. @@ -27100,11 +27219,11 @@ func (s *InstanceAssociation) SetInstanceId(v string) *InstanceAssociation { return s } -// An Amazon S3 bucket where you want to store the results of this request. +// An S3 bucket where you want to store the results of this request. type InstanceAssociationOutputLocation struct { _ struct{} `type:"structure"` - // An Amazon S3 bucket where you want to store the results of this request. + // An S3 bucket where you want to store the results of this request. S3Location *S3OutputLocation `type:"structure"` } @@ -27139,11 +27258,11 @@ func (s *InstanceAssociationOutputLocation) SetS3Location(v *S3OutputLocation) * return s } -// The URL of Amazon S3 bucket where you want to store the results of this request. +// The URL of S3 bucket where you want to store the results of this request. type InstanceAssociationOutputUrl struct { _ struct{} `type:"structure"` - // The URL of Amazon S3 bucket where you want to store the results of this request. + // The URL of S3 bucket where you want to store the results of this request. S3OutputUrl *S3OutputUrl `type:"structure"` } @@ -27197,8 +27316,7 @@ type InstanceAssociationStatusInfo struct { // The name of the association. Name *string `type:"string"` - // A URL for an Amazon S3 bucket where you want to store the results of this - // request. + // A URL for an S3 bucket where you want to store the results of this request. OutputUrl *InstanceAssociationOutputUrl `type:"structure"` // Status information about the instance association. @@ -27311,7 +27429,7 @@ type InstanceInformation struct { // The Amazon Identity and Access Management (IAM) role assigned to the on-premises // Systems Manager managed instances. This call does not return the IAM role - // for Amazon EC2 instances. + // for EC2 instances. IamRole *string `type:"string"` // The instance ID. @@ -27618,12 +27736,12 @@ type InstancePatchState struct { FailedCount *int64 `type:"integer"` // An https URL or an Amazon S3 path-style URL to a list of patches to be installed. - // This patch installation list, which you maintain in an Amazon S3 bucket in - // YAML format and specify in the SSM document AWS-RunPatchBaseline, overrides - // the patches specified by the default patch baseline. + // This patch installation list, which you maintain in an S3 bucket in YAML + // format and specify in the SSM document AWS-RunPatchBaseline, overrides the + // patches specified by the default patch baseline. // // For more information about the InstallOverrideList parameter, see About the - // SSM Document AWS-RunPatchBaseline (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html) + // SSM document AWS-RunPatchBaseline (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html) // in the AWS Systems Manager User Guide. InstallOverrideList *string `min:"1" type:"string"` @@ -27916,8 +28034,8 @@ func (s *InstancePatchStateFilter) SetValues(v []*string) *InstancePatchStateFil // An error occurred on the server side. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -27934,17 +28052,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -27952,29 +28070,29 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // The activation is not valid. The activation might have been deleted, or the // ActivationId and the ActivationCode do not match. type InvalidActivation struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -27991,17 +28109,17 @@ func (s InvalidActivation) GoString() string { func newErrorInvalidActivation(v protocol.ResponseMetadata) error { return &InvalidActivation{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidActivation) Code() string { +func (s *InvalidActivation) Code() string { return "InvalidActivation" } // Message returns the exception's message. -func (s InvalidActivation) Message() string { +func (s *InvalidActivation) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28009,29 +28127,29 @@ func (s InvalidActivation) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidActivation) OrigErr() error { +func (s *InvalidActivation) OrigErr() error { return nil } -func (s InvalidActivation) Error() string { +func (s *InvalidActivation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidActivation) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidActivation) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidActivation) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidActivation) RequestID() string { + return s.RespMetadata.RequestID } // The activation ID is not valid. Verify the you entered the correct ActivationId // or ActivationCode and try again. type InvalidActivationId struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28048,17 +28166,17 @@ func (s InvalidActivationId) GoString() string { func newErrorInvalidActivationId(v protocol.ResponseMetadata) error { return &InvalidActivationId{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidActivationId) Code() string { +func (s *InvalidActivationId) Code() string { return "InvalidActivationId" } // Message returns the exception's message. -func (s InvalidActivationId) Message() string { +func (s *InvalidActivationId) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28066,29 +28184,29 @@ func (s InvalidActivationId) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidActivationId) OrigErr() error { +func (s *InvalidActivationId) OrigErr() error { return nil } -func (s InvalidActivationId) Error() string { +func (s *InvalidActivationId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidActivationId) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidActivationId) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidActivationId) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidActivationId) RequestID() string { + return s.RespMetadata.RequestID } // The specified aggregator is not valid for inventory groups. Verify that the // aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation. type InvalidAggregatorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28105,17 +28223,17 @@ func (s InvalidAggregatorException) GoString() string { func newErrorInvalidAggregatorException(v protocol.ResponseMetadata) error { return &InvalidAggregatorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAggregatorException) Code() string { +func (s *InvalidAggregatorException) Code() string { return "InvalidAggregatorException" } // Message returns the exception's message. -func (s InvalidAggregatorException) Message() string { +func (s *InvalidAggregatorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28123,28 +28241,28 @@ func (s InvalidAggregatorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAggregatorException) OrigErr() error { +func (s *InvalidAggregatorException) OrigErr() error { return nil } -func (s InvalidAggregatorException) Error() string { +func (s *InvalidAggregatorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAggregatorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAggregatorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAggregatorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAggregatorException) RequestID() string { + return s.RespMetadata.RequestID } // The request does not meet the regular expression requirement. type InvalidAllowedPatternException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The request does not meet the regular expression requirement. Message_ *string `locationName:"message" type:"string"` @@ -28162,17 +28280,17 @@ func (s InvalidAllowedPatternException) GoString() string { func newErrorInvalidAllowedPatternException(v protocol.ResponseMetadata) error { return &InvalidAllowedPatternException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAllowedPatternException) Code() string { +func (s *InvalidAllowedPatternException) Code() string { return "InvalidAllowedPatternException" } // Message returns the exception's message. -func (s InvalidAllowedPatternException) Message() string { +func (s *InvalidAllowedPatternException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28180,28 +28298,28 @@ func (s InvalidAllowedPatternException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAllowedPatternException) OrigErr() error { +func (s *InvalidAllowedPatternException) OrigErr() error { return nil } -func (s InvalidAllowedPatternException) Error() string { +func (s *InvalidAllowedPatternException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAllowedPatternException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAllowedPatternException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAllowedPatternException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAllowedPatternException) RequestID() string { + return s.RespMetadata.RequestID } // The association is not valid or does not exist. type InvalidAssociation struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28218,17 +28336,17 @@ func (s InvalidAssociation) GoString() string { func newErrorInvalidAssociation(v protocol.ResponseMetadata) error { return &InvalidAssociation{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAssociation) Code() string { +func (s *InvalidAssociation) Code() string { return "InvalidAssociation" } // Message returns the exception's message. -func (s InvalidAssociation) Message() string { +func (s *InvalidAssociation) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28236,30 +28354,30 @@ func (s InvalidAssociation) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAssociation) OrigErr() error { +func (s *InvalidAssociation) OrigErr() error { return nil } -func (s InvalidAssociation) Error() string { +func (s *InvalidAssociation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAssociation) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAssociation) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAssociation) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAssociation) RequestID() string { + return s.RespMetadata.RequestID } // The version you specified is not valid. Use ListAssociationVersions to view // all versions of an association according to the association ID. Or, use the // $LATEST parameter to view the latest version of the association. type InvalidAssociationVersion struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28276,17 +28394,17 @@ func (s InvalidAssociationVersion) GoString() string { func newErrorInvalidAssociationVersion(v protocol.ResponseMetadata) error { return &InvalidAssociationVersion{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAssociationVersion) Code() string { +func (s *InvalidAssociationVersion) Code() string { return "InvalidAssociationVersion" } // Message returns the exception's message. -func (s InvalidAssociationVersion) Message() string { +func (s *InvalidAssociationVersion) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28294,30 +28412,30 @@ func (s InvalidAssociationVersion) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAssociationVersion) OrigErr() error { +func (s *InvalidAssociationVersion) OrigErr() error { return nil } -func (s InvalidAssociationVersion) Error() string { +func (s *InvalidAssociationVersion) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAssociationVersion) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAssociationVersion) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAssociationVersion) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAssociationVersion) RequestID() string { + return s.RespMetadata.RequestID } // The supplied parameters for invoking the specified Automation document are // incorrect. For example, they may not match the set of parameters permitted // for the specified Automation document. type InvalidAutomationExecutionParametersException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28334,17 +28452,17 @@ func (s InvalidAutomationExecutionParametersException) GoString() string { func newErrorInvalidAutomationExecutionParametersException(v protocol.ResponseMetadata) error { return &InvalidAutomationExecutionParametersException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAutomationExecutionParametersException) Code() string { +func (s *InvalidAutomationExecutionParametersException) Code() string { return "InvalidAutomationExecutionParametersException" } // Message returns the exception's message. -func (s InvalidAutomationExecutionParametersException) Message() string { +func (s *InvalidAutomationExecutionParametersException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28352,28 +28470,28 @@ func (s InvalidAutomationExecutionParametersException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAutomationExecutionParametersException) OrigErr() error { +func (s *InvalidAutomationExecutionParametersException) OrigErr() error { return nil } -func (s InvalidAutomationExecutionParametersException) Error() string { +func (s *InvalidAutomationExecutionParametersException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAutomationExecutionParametersException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAutomationExecutionParametersException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAutomationExecutionParametersException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAutomationExecutionParametersException) RequestID() string { + return s.RespMetadata.RequestID } // The signal is not valid for the current Automation execution. type InvalidAutomationSignalException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28390,17 +28508,17 @@ func (s InvalidAutomationSignalException) GoString() string { func newErrorInvalidAutomationSignalException(v protocol.ResponseMetadata) error { return &InvalidAutomationSignalException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAutomationSignalException) Code() string { +func (s *InvalidAutomationSignalException) Code() string { return "InvalidAutomationSignalException" } // Message returns the exception's message. -func (s InvalidAutomationSignalException) Message() string { +func (s *InvalidAutomationSignalException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28408,28 +28526,28 @@ func (s InvalidAutomationSignalException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAutomationSignalException) OrigErr() error { +func (s *InvalidAutomationSignalException) OrigErr() error { return nil } -func (s InvalidAutomationSignalException) Error() string { +func (s *InvalidAutomationSignalException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAutomationSignalException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAutomationSignalException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAutomationSignalException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAutomationSignalException) RequestID() string { + return s.RespMetadata.RequestID } // The specified update status operation is not valid. type InvalidAutomationStatusUpdateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28446,17 +28564,17 @@ func (s InvalidAutomationStatusUpdateException) GoString() string { func newErrorInvalidAutomationStatusUpdateException(v protocol.ResponseMetadata) error { return &InvalidAutomationStatusUpdateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAutomationStatusUpdateException) Code() string { +func (s *InvalidAutomationStatusUpdateException) Code() string { return "InvalidAutomationStatusUpdateException" } // Message returns the exception's message. -func (s InvalidAutomationStatusUpdateException) Message() string { +func (s *InvalidAutomationStatusUpdateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28464,27 +28582,27 @@ func (s InvalidAutomationStatusUpdateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAutomationStatusUpdateException) OrigErr() error { +func (s *InvalidAutomationStatusUpdateException) OrigErr() error { return nil } -func (s InvalidAutomationStatusUpdateException) Error() string { +func (s *InvalidAutomationStatusUpdateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAutomationStatusUpdateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAutomationStatusUpdateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAutomationStatusUpdateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAutomationStatusUpdateException) RequestID() string { + return s.RespMetadata.RequestID } type InvalidCommandId struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -28501,17 +28619,17 @@ func (s InvalidCommandId) GoString() string { func newErrorInvalidCommandId(v protocol.ResponseMetadata) error { return &InvalidCommandId{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidCommandId) Code() string { +func (s *InvalidCommandId) Code() string { return "InvalidCommandId" } // Message returns the exception's message. -func (s InvalidCommandId) Message() string { +func (s *InvalidCommandId) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28519,29 +28637,29 @@ func (s InvalidCommandId) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidCommandId) OrigErr() error { +func (s *InvalidCommandId) OrigErr() error { return nil } -func (s InvalidCommandId) Error() string { +func (s *InvalidCommandId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidCommandId) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidCommandId) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidCommandId) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidCommandId) RequestID() string { + return s.RespMetadata.RequestID } // One or more of the parameters specified for the delete operation is not valid. // Verify all parameters and try again. type InvalidDeleteInventoryParametersException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28558,17 +28676,17 @@ func (s InvalidDeleteInventoryParametersException) GoString() string { func newErrorInvalidDeleteInventoryParametersException(v protocol.ResponseMetadata) error { return &InvalidDeleteInventoryParametersException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeleteInventoryParametersException) Code() string { +func (s *InvalidDeleteInventoryParametersException) Code() string { return "InvalidDeleteInventoryParametersException" } // Message returns the exception's message. -func (s InvalidDeleteInventoryParametersException) Message() string { +func (s *InvalidDeleteInventoryParametersException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28576,29 +28694,29 @@ func (s InvalidDeleteInventoryParametersException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeleteInventoryParametersException) OrigErr() error { +func (s *InvalidDeleteInventoryParametersException) OrigErr() error { return nil } -func (s InvalidDeleteInventoryParametersException) Error() string { +func (s *InvalidDeleteInventoryParametersException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeleteInventoryParametersException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeleteInventoryParametersException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeleteInventoryParametersException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeleteInventoryParametersException) RequestID() string { + return s.RespMetadata.RequestID } // The ID specified for the delete operation does not exist or is not valid. // Verify the ID and try again. type InvalidDeletionIdException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28615,17 +28733,17 @@ func (s InvalidDeletionIdException) GoString() string { func newErrorInvalidDeletionIdException(v protocol.ResponseMetadata) error { return &InvalidDeletionIdException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDeletionIdException) Code() string { +func (s *InvalidDeletionIdException) Code() string { return "InvalidDeletionIdException" } // Message returns the exception's message. -func (s InvalidDeletionIdException) Message() string { +func (s *InvalidDeletionIdException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28633,28 +28751,28 @@ func (s InvalidDeletionIdException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDeletionIdException) OrigErr() error { +func (s *InvalidDeletionIdException) OrigErr() error { return nil } -func (s InvalidDeletionIdException) Error() string { +func (s *InvalidDeletionIdException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDeletionIdException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDeletionIdException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDeletionIdException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDeletionIdException) RequestID() string { + return s.RespMetadata.RequestID } // The specified document does not exist. type InvalidDocument struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The document does not exist or the document is not available to the user. // This exception can be issued by CreateAssociation, CreateAssociationBatch, @@ -28675,17 +28793,17 @@ func (s InvalidDocument) GoString() string { func newErrorInvalidDocument(v protocol.ResponseMetadata) error { return &InvalidDocument{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDocument) Code() string { +func (s *InvalidDocument) Code() string { return "InvalidDocument" } // Message returns the exception's message. -func (s InvalidDocument) Message() string { +func (s *InvalidDocument) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28693,28 +28811,28 @@ func (s InvalidDocument) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDocument) OrigErr() error { +func (s *InvalidDocument) OrigErr() error { return nil } -func (s InvalidDocument) Error() string { +func (s *InvalidDocument) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDocument) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDocument) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDocument) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDocument) RequestID() string { + return s.RespMetadata.RequestID } // The content for the document is not valid. type InvalidDocumentContent struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description of the validation error. Message_ *string `locationName:"Message" type:"string"` @@ -28732,17 +28850,17 @@ func (s InvalidDocumentContent) GoString() string { func newErrorInvalidDocumentContent(v protocol.ResponseMetadata) error { return &InvalidDocumentContent{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDocumentContent) Code() string { +func (s *InvalidDocumentContent) Code() string { return "InvalidDocumentContent" } // Message returns the exception's message. -func (s InvalidDocumentContent) Message() string { +func (s *InvalidDocumentContent) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28750,29 +28868,29 @@ func (s InvalidDocumentContent) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDocumentContent) OrigErr() error { +func (s *InvalidDocumentContent) OrigErr() error { return nil } -func (s InvalidDocumentContent) Error() string { +func (s *InvalidDocumentContent) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDocumentContent) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDocumentContent) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDocumentContent) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDocumentContent) RequestID() string { + return s.RespMetadata.RequestID } // You attempted to delete a document while it is still shared. You must stop // sharing the document before you can delete it. type InvalidDocumentOperation struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28789,17 +28907,17 @@ func (s InvalidDocumentOperation) GoString() string { func newErrorInvalidDocumentOperation(v protocol.ResponseMetadata) error { return &InvalidDocumentOperation{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDocumentOperation) Code() string { +func (s *InvalidDocumentOperation) Code() string { return "InvalidDocumentOperation" } // Message returns the exception's message. -func (s InvalidDocumentOperation) Message() string { +func (s *InvalidDocumentOperation) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28807,28 +28925,28 @@ func (s InvalidDocumentOperation) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDocumentOperation) OrigErr() error { +func (s *InvalidDocumentOperation) OrigErr() error { return nil } -func (s InvalidDocumentOperation) Error() string { +func (s *InvalidDocumentOperation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDocumentOperation) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDocumentOperation) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDocumentOperation) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDocumentOperation) RequestID() string { + return s.RespMetadata.RequestID } // The version of the document schema is not supported. type InvalidDocumentSchemaVersion struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28845,17 +28963,17 @@ func (s InvalidDocumentSchemaVersion) GoString() string { func newErrorInvalidDocumentSchemaVersion(v protocol.ResponseMetadata) error { return &InvalidDocumentSchemaVersion{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDocumentSchemaVersion) Code() string { +func (s *InvalidDocumentSchemaVersion) Code() string { return "InvalidDocumentSchemaVersion" } // Message returns the exception's message. -func (s InvalidDocumentSchemaVersion) Message() string { +func (s *InvalidDocumentSchemaVersion) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28863,29 +28981,29 @@ func (s InvalidDocumentSchemaVersion) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDocumentSchemaVersion) OrigErr() error { +func (s *InvalidDocumentSchemaVersion) OrigErr() error { return nil } -func (s InvalidDocumentSchemaVersion) Error() string { +func (s *InvalidDocumentSchemaVersion) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDocumentSchemaVersion) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDocumentSchemaVersion) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDocumentSchemaVersion) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDocumentSchemaVersion) RequestID() string { + return s.RespMetadata.RequestID } // The document type is not valid. Valid document types are described in the // DocumentType property. type InvalidDocumentType struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28902,17 +29020,17 @@ func (s InvalidDocumentType) GoString() string { func newErrorInvalidDocumentType(v protocol.ResponseMetadata) error { return &InvalidDocumentType{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDocumentType) Code() string { +func (s *InvalidDocumentType) Code() string { return "InvalidDocumentType" } // Message returns the exception's message. -func (s InvalidDocumentType) Message() string { +func (s *InvalidDocumentType) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28920,28 +29038,28 @@ func (s InvalidDocumentType) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDocumentType) OrigErr() error { +func (s *InvalidDocumentType) OrigErr() error { return nil } -func (s InvalidDocumentType) Error() string { +func (s *InvalidDocumentType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDocumentType) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDocumentType) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDocumentType) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDocumentType) RequestID() string { + return s.RespMetadata.RequestID } // The document version is not valid or does not exist. type InvalidDocumentVersion struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -28958,17 +29076,17 @@ func (s InvalidDocumentVersion) GoString() string { func newErrorInvalidDocumentVersion(v protocol.ResponseMetadata) error { return &InvalidDocumentVersion{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidDocumentVersion) Code() string { +func (s *InvalidDocumentVersion) Code() string { return "InvalidDocumentVersion" } // Message returns the exception's message. -func (s InvalidDocumentVersion) Message() string { +func (s *InvalidDocumentVersion) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -28976,29 +29094,29 @@ func (s InvalidDocumentVersion) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidDocumentVersion) OrigErr() error { +func (s *InvalidDocumentVersion) OrigErr() error { return nil } -func (s InvalidDocumentVersion) Error() string { +func (s *InvalidDocumentVersion) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidDocumentVersion) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidDocumentVersion) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidDocumentVersion) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidDocumentVersion) RequestID() string { + return s.RespMetadata.RequestID } // The filter name is not valid. Verify the you entered the correct name and // try again. type InvalidFilter struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29015,17 +29133,17 @@ func (s InvalidFilter) GoString() string { func newErrorInvalidFilter(v protocol.ResponseMetadata) error { return &InvalidFilter{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFilter) Code() string { +func (s *InvalidFilter) Code() string { return "InvalidFilter" } // Message returns the exception's message. -func (s InvalidFilter) Message() string { +func (s *InvalidFilter) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29033,28 +29151,28 @@ func (s InvalidFilter) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFilter) OrigErr() error { +func (s *InvalidFilter) OrigErr() error { return nil } -func (s InvalidFilter) Error() string { +func (s *InvalidFilter) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFilter) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFilter) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFilter) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFilter) RequestID() string { + return s.RespMetadata.RequestID } // The specified key is not valid. type InvalidFilterKey struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29071,17 +29189,17 @@ func (s InvalidFilterKey) GoString() string { func newErrorInvalidFilterKey(v protocol.ResponseMetadata) error { return &InvalidFilterKey{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFilterKey) Code() string { +func (s *InvalidFilterKey) Code() string { return "InvalidFilterKey" } // Message returns the exception's message. -func (s InvalidFilterKey) Message() string { +func (s *InvalidFilterKey) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29089,29 +29207,29 @@ func (s InvalidFilterKey) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFilterKey) OrigErr() error { +func (s *InvalidFilterKey) OrigErr() error { return nil } -func (s InvalidFilterKey) Error() string { +func (s *InvalidFilterKey) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFilterKey) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFilterKey) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFilterKey) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFilterKey) RequestID() string { + return s.RespMetadata.RequestID } // The specified filter option is not valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. type InvalidFilterOption struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The specified filter option is not valid. Valid options are Equals and BeginsWith. // For Path filter, valid options are Recursive and OneLevel. @@ -29130,17 +29248,17 @@ func (s InvalidFilterOption) GoString() string { func newErrorInvalidFilterOption(v protocol.ResponseMetadata) error { return &InvalidFilterOption{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFilterOption) Code() string { +func (s *InvalidFilterOption) Code() string { return "InvalidFilterOption" } // Message returns the exception's message. -func (s InvalidFilterOption) Message() string { +func (s *InvalidFilterOption) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29148,28 +29266,28 @@ func (s InvalidFilterOption) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFilterOption) OrigErr() error { +func (s *InvalidFilterOption) OrigErr() error { return nil } -func (s InvalidFilterOption) Error() string { +func (s *InvalidFilterOption) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFilterOption) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFilterOption) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFilterOption) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFilterOption) RequestID() string { + return s.RespMetadata.RequestID } // The filter value is not valid. Verify the value and try again. type InvalidFilterValue struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29186,17 +29304,17 @@ func (s InvalidFilterValue) GoString() string { func newErrorInvalidFilterValue(v protocol.ResponseMetadata) error { return &InvalidFilterValue{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidFilterValue) Code() string { +func (s *InvalidFilterValue) Code() string { return "InvalidFilterValue" } // Message returns the exception's message. -func (s InvalidFilterValue) Message() string { +func (s *InvalidFilterValue) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29204,22 +29322,22 @@ func (s InvalidFilterValue) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidFilterValue) OrigErr() error { +func (s *InvalidFilterValue) OrigErr() error { return nil } -func (s InvalidFilterValue) Error() string { +func (s *InvalidFilterValue) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidFilterValue) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidFilterValue) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidFilterValue) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidFilterValue) RequestID() string { + return s.RespMetadata.RequestID } // The following problems can cause this exception: @@ -29233,8 +29351,8 @@ func (s InvalidFilterValue) RequestID() string { // The instance is not in valid state. Valid states are: Running, Pending, Stopped, // Stopping. Invalid states are: Shutting-down and Terminated. type InvalidInstanceId struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29251,17 +29369,17 @@ func (s InvalidInstanceId) GoString() string { func newErrorInvalidInstanceId(v protocol.ResponseMetadata) error { return &InvalidInstanceId{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInstanceId) Code() string { +func (s *InvalidInstanceId) Code() string { return "InvalidInstanceId" } // Message returns the exception's message. -func (s InvalidInstanceId) Message() string { +func (s *InvalidInstanceId) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29269,28 +29387,28 @@ func (s InvalidInstanceId) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInstanceId) OrigErr() error { +func (s *InvalidInstanceId) OrigErr() error { return nil } -func (s InvalidInstanceId) Error() string { +func (s *InvalidInstanceId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInstanceId) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInstanceId) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInstanceId) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInstanceId) RequestID() string { + return s.RespMetadata.RequestID } // The specified filter value is not valid. type InvalidInstanceInformationFilterValue struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29307,17 +29425,17 @@ func (s InvalidInstanceInformationFilterValue) GoString() string { func newErrorInvalidInstanceInformationFilterValue(v protocol.ResponseMetadata) error { return &InvalidInstanceInformationFilterValue{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInstanceInformationFilterValue) Code() string { +func (s *InvalidInstanceInformationFilterValue) Code() string { return "InvalidInstanceInformationFilterValue" } // Message returns the exception's message. -func (s InvalidInstanceInformationFilterValue) Message() string { +func (s *InvalidInstanceInformationFilterValue) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29325,28 +29443,28 @@ func (s InvalidInstanceInformationFilterValue) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInstanceInformationFilterValue) OrigErr() error { +func (s *InvalidInstanceInformationFilterValue) OrigErr() error { return nil } -func (s InvalidInstanceInformationFilterValue) Error() string { +func (s *InvalidInstanceInformationFilterValue) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInstanceInformationFilterValue) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInstanceInformationFilterValue) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInstanceInformationFilterValue) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInstanceInformationFilterValue) RequestID() string { + return s.RespMetadata.RequestID } // The specified inventory group is not valid. type InvalidInventoryGroupException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29363,17 +29481,17 @@ func (s InvalidInventoryGroupException) GoString() string { func newErrorInvalidInventoryGroupException(v protocol.ResponseMetadata) error { return &InvalidInventoryGroupException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInventoryGroupException) Code() string { +func (s *InvalidInventoryGroupException) Code() string { return "InvalidInventoryGroupException" } // Message returns the exception's message. -func (s InvalidInventoryGroupException) Message() string { +func (s *InvalidInventoryGroupException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29381,29 +29499,29 @@ func (s InvalidInventoryGroupException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInventoryGroupException) OrigErr() error { +func (s *InvalidInventoryGroupException) OrigErr() error { return nil } -func (s InvalidInventoryGroupException) Error() string { +func (s *InvalidInventoryGroupException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInventoryGroupException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInventoryGroupException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInventoryGroupException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInventoryGroupException) RequestID() string { + return s.RespMetadata.RequestID } // You specified invalid keys or values in the Context attribute for InventoryItem. // Verify the keys and values, and try again. type InvalidInventoryItemContextException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29420,17 +29538,17 @@ func (s InvalidInventoryItemContextException) GoString() string { func newErrorInvalidInventoryItemContextException(v protocol.ResponseMetadata) error { return &InvalidInventoryItemContextException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInventoryItemContextException) Code() string { +func (s *InvalidInventoryItemContextException) Code() string { return "InvalidInventoryItemContextException" } // Message returns the exception's message. -func (s InvalidInventoryItemContextException) Message() string { +func (s *InvalidInventoryItemContextException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29438,28 +29556,28 @@ func (s InvalidInventoryItemContextException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInventoryItemContextException) OrigErr() error { +func (s *InvalidInventoryItemContextException) OrigErr() error { return nil } -func (s InvalidInventoryItemContextException) Error() string { +func (s *InvalidInventoryItemContextException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInventoryItemContextException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInventoryItemContextException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInventoryItemContextException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInventoryItemContextException) RequestID() string { + return s.RespMetadata.RequestID } // The request is not valid. type InvalidInventoryRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29476,17 +29594,17 @@ func (s InvalidInventoryRequestException) GoString() string { func newErrorInvalidInventoryRequestException(v protocol.ResponseMetadata) error { return &InvalidInventoryRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidInventoryRequestException) Code() string { +func (s *InvalidInventoryRequestException) Code() string { return "InvalidInventoryRequestException" } // Message returns the exception's message. -func (s InvalidInventoryRequestException) Message() string { +func (s *InvalidInventoryRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29494,28 +29612,28 @@ func (s InvalidInventoryRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidInventoryRequestException) OrigErr() error { +func (s *InvalidInventoryRequestException) OrigErr() error { return nil } -func (s InvalidInventoryRequestException) Error() string { +func (s *InvalidInventoryRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidInventoryRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidInventoryRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidInventoryRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidInventoryRequestException) RequestID() string { + return s.RespMetadata.RequestID } // One or more content items is not valid. type InvalidItemContentException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -29534,17 +29652,17 @@ func (s InvalidItemContentException) GoString() string { func newErrorInvalidItemContentException(v protocol.ResponseMetadata) error { return &InvalidItemContentException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidItemContentException) Code() string { +func (s *InvalidItemContentException) Code() string { return "InvalidItemContentException" } // Message returns the exception's message. -func (s InvalidItemContentException) Message() string { +func (s *InvalidItemContentException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29552,28 +29670,28 @@ func (s InvalidItemContentException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidItemContentException) OrigErr() error { +func (s *InvalidItemContentException) OrigErr() error { return nil } -func (s InvalidItemContentException) Error() string { +func (s *InvalidItemContentException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidItemContentException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidItemContentException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidItemContentException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidItemContentException) RequestID() string { + return s.RespMetadata.RequestID } // The query key ID is not valid. type InvalidKeyId struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29590,17 +29708,17 @@ func (s InvalidKeyId) GoString() string { func newErrorInvalidKeyId(v protocol.ResponseMetadata) error { return &InvalidKeyId{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidKeyId) Code() string { +func (s *InvalidKeyId) Code() string { return "InvalidKeyId" } // Message returns the exception's message. -func (s InvalidKeyId) Message() string { +func (s *InvalidKeyId) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29608,28 +29726,28 @@ func (s InvalidKeyId) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidKeyId) OrigErr() error { +func (s *InvalidKeyId) OrigErr() error { return nil } -func (s InvalidKeyId) Error() string { +func (s *InvalidKeyId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidKeyId) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidKeyId) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidKeyId) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidKeyId) RequestID() string { + return s.RespMetadata.RequestID } // The specified token is not valid. type InvalidNextToken struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29646,17 +29764,17 @@ func (s InvalidNextToken) GoString() string { func newErrorInvalidNextToken(v protocol.ResponseMetadata) error { return &InvalidNextToken{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextToken) Code() string { +func (s *InvalidNextToken) Code() string { return "InvalidNextToken" } // Message returns the exception's message. -func (s InvalidNextToken) Message() string { +func (s *InvalidNextToken) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29664,29 +29782,29 @@ func (s InvalidNextToken) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextToken) OrigErr() error { +func (s *InvalidNextToken) OrigErr() error { return nil } -func (s InvalidNextToken) Error() string { +func (s *InvalidNextToken) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextToken) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextToken) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextToken) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextToken) RequestID() string { + return s.RespMetadata.RequestID } // One or more configuration items is not valid. Verify that a valid Amazon // Resource Name (ARN) was provided for an Amazon SNS topic. type InvalidNotificationConfig struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29703,17 +29821,17 @@ func (s InvalidNotificationConfig) GoString() string { func newErrorInvalidNotificationConfig(v protocol.ResponseMetadata) error { return &InvalidNotificationConfig{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNotificationConfig) Code() string { +func (s *InvalidNotificationConfig) Code() string { return "InvalidNotificationConfig" } // Message returns the exception's message. -func (s InvalidNotificationConfig) Message() string { +func (s *InvalidNotificationConfig) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29721,29 +29839,29 @@ func (s InvalidNotificationConfig) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNotificationConfig) OrigErr() error { +func (s *InvalidNotificationConfig) OrigErr() error { return nil } -func (s InvalidNotificationConfig) Error() string { +func (s *InvalidNotificationConfig) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNotificationConfig) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNotificationConfig) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNotificationConfig) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNotificationConfig) RequestID() string { + return s.RespMetadata.RequestID } // The delete inventory option specified is not valid. Verify the option and // try again. type InvalidOptionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29760,17 +29878,17 @@ func (s InvalidOptionException) GoString() string { func newErrorInvalidOptionException(v protocol.ResponseMetadata) error { return &InvalidOptionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOptionException) Code() string { +func (s *InvalidOptionException) Code() string { return "InvalidOptionException" } // Message returns the exception's message. -func (s InvalidOptionException) Message() string { +func (s *InvalidOptionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29778,28 +29896,28 @@ func (s InvalidOptionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOptionException) OrigErr() error { +func (s *InvalidOptionException) OrigErr() error { return nil } -func (s InvalidOptionException) Error() string { +func (s *InvalidOptionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOptionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOptionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOptionException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOptionException) RequestID() string { + return s.RespMetadata.RequestID } // The S3 bucket does not exist. type InvalidOutputFolder struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29816,17 +29934,17 @@ func (s InvalidOutputFolder) GoString() string { func newErrorInvalidOutputFolder(v protocol.ResponseMetadata) error { return &InvalidOutputFolder{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOutputFolder) Code() string { +func (s *InvalidOutputFolder) Code() string { return "InvalidOutputFolder" } // Message returns the exception's message. -func (s InvalidOutputFolder) Message() string { +func (s *InvalidOutputFolder) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29834,28 +29952,28 @@ func (s InvalidOutputFolder) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOutputFolder) OrigErr() error { +func (s *InvalidOutputFolder) OrigErr() error { return nil } -func (s InvalidOutputFolder) Error() string { +func (s *InvalidOutputFolder) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOutputFolder) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOutputFolder) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOutputFolder) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOutputFolder) RequestID() string { + return s.RespMetadata.RequestID } // The output location is not valid or does not exist. type InvalidOutputLocation struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -29872,17 +29990,17 @@ func (s InvalidOutputLocation) GoString() string { func newErrorInvalidOutputLocation(v protocol.ResponseMetadata) error { return &InvalidOutputLocation{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOutputLocation) Code() string { +func (s *InvalidOutputLocation) Code() string { return "InvalidOutputLocation" } // Message returns the exception's message. -func (s InvalidOutputLocation) Message() string { +func (s *InvalidOutputLocation) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29890,30 +30008,30 @@ func (s InvalidOutputLocation) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOutputLocation) OrigErr() error { +func (s *InvalidOutputLocation) OrigErr() error { return nil } -func (s InvalidOutputLocation) Error() string { +func (s *InvalidOutputLocation) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOutputLocation) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOutputLocation) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOutputLocation) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOutputLocation) RequestID() string { + return s.RespMetadata.RequestID } // You must specify values for all required parameters in the Systems Manager // document. You can only supply values to parameters defined in the Systems // Manager document. type InvalidParameters struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29930,17 +30048,17 @@ func (s InvalidParameters) GoString() string { func newErrorInvalidParameters(v protocol.ResponseMetadata) error { return &InvalidParameters{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameters) Code() string { +func (s *InvalidParameters) Code() string { return "InvalidParameters" } // Message returns the exception's message. -func (s InvalidParameters) Message() string { +func (s *InvalidParameters) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -29948,29 +30066,29 @@ func (s InvalidParameters) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameters) OrigErr() error { +func (s *InvalidParameters) OrigErr() error { return nil } -func (s InvalidParameters) Error() string { +func (s *InvalidParameters) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameters) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameters) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameters) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameters) RequestID() string { + return s.RespMetadata.RequestID } // The permission type is not supported. Share is the only supported permission // type. type InvalidPermissionType struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -29987,17 +30105,17 @@ func (s InvalidPermissionType) GoString() string { func newErrorInvalidPermissionType(v protocol.ResponseMetadata) error { return &InvalidPermissionType{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPermissionType) Code() string { +func (s *InvalidPermissionType) Code() string { return "InvalidPermissionType" } // Message returns the exception's message. -func (s InvalidPermissionType) Message() string { +func (s *InvalidPermissionType) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30005,28 +30123,28 @@ func (s InvalidPermissionType) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPermissionType) OrigErr() error { +func (s *InvalidPermissionType) OrigErr() error { return nil } -func (s InvalidPermissionType) Error() string { +func (s *InvalidPermissionType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPermissionType) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPermissionType) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPermissionType) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPermissionType) RequestID() string { + return s.RespMetadata.RequestID } // The plugin name is not valid. type InvalidPluginName struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30043,17 +30161,17 @@ func (s InvalidPluginName) GoString() string { func newErrorInvalidPluginName(v protocol.ResponseMetadata) error { return &InvalidPluginName{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPluginName) Code() string { +func (s *InvalidPluginName) Code() string { return "InvalidPluginName" } // Message returns the exception's message. -func (s InvalidPluginName) Message() string { +func (s *InvalidPluginName) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30061,28 +30179,28 @@ func (s InvalidPluginName) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPluginName) OrigErr() error { +func (s *InvalidPluginName) OrigErr() error { return nil } -func (s InvalidPluginName) Error() string { +func (s *InvalidPluginName) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPluginName) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPluginName) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPluginName) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPluginName) RequestID() string { + return s.RespMetadata.RequestID } // A policy attribute or its value is invalid. type InvalidPolicyAttributeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30099,17 +30217,17 @@ func (s InvalidPolicyAttributeException) GoString() string { func newErrorInvalidPolicyAttributeException(v protocol.ResponseMetadata) error { return &InvalidPolicyAttributeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPolicyAttributeException) Code() string { +func (s *InvalidPolicyAttributeException) Code() string { return "InvalidPolicyAttributeException" } // Message returns the exception's message. -func (s InvalidPolicyAttributeException) Message() string { +func (s *InvalidPolicyAttributeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30117,29 +30235,29 @@ func (s InvalidPolicyAttributeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPolicyAttributeException) OrigErr() error { +func (s *InvalidPolicyAttributeException) OrigErr() error { return nil } -func (s InvalidPolicyAttributeException) Error() string { +func (s *InvalidPolicyAttributeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPolicyAttributeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPolicyAttributeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPolicyAttributeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPolicyAttributeException) RequestID() string { + return s.RespMetadata.RequestID } // The policy type is not supported. Parameter Store supports the following // policy types: Expiration, ExpirationNotification, and NoChangeNotification. type InvalidPolicyTypeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30156,17 +30274,17 @@ func (s InvalidPolicyTypeException) GoString() string { func newErrorInvalidPolicyTypeException(v protocol.ResponseMetadata) error { return &InvalidPolicyTypeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPolicyTypeException) Code() string { +func (s *InvalidPolicyTypeException) Code() string { return "InvalidPolicyTypeException" } // Message returns the exception's message. -func (s InvalidPolicyTypeException) Message() string { +func (s *InvalidPolicyTypeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30174,29 +30292,29 @@ func (s InvalidPolicyTypeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPolicyTypeException) OrigErr() error { +func (s *InvalidPolicyTypeException) OrigErr() error { return nil } -func (s InvalidPolicyTypeException) Error() string { +func (s *InvalidPolicyTypeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPolicyTypeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPolicyTypeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPolicyTypeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPolicyTypeException) RequestID() string { + return s.RespMetadata.RequestID } // The resource ID is not valid. Verify that you entered the correct ID and // try again. type InvalidResourceId struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30213,17 +30331,17 @@ func (s InvalidResourceId) GoString() string { func newErrorInvalidResourceId(v protocol.ResponseMetadata) error { return &InvalidResourceId{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceId) Code() string { +func (s *InvalidResourceId) Code() string { return "InvalidResourceId" } // Message returns the exception's message. -func (s InvalidResourceId) Message() string { +func (s *InvalidResourceId) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30231,29 +30349,29 @@ func (s InvalidResourceId) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceId) OrigErr() error { +func (s *InvalidResourceId) OrigErr() error { return nil } -func (s InvalidResourceId) Error() string { +func (s *InvalidResourceId) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceId) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceId) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceId) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceId) RequestID() string { + return s.RespMetadata.RequestID } // The resource type is not valid. For example, if you are attempting to tag // an instance, the instance must be a registered, managed instance. type InvalidResourceType struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -30270,17 +30388,17 @@ func (s InvalidResourceType) GoString() string { func newErrorInvalidResourceType(v protocol.ResponseMetadata) error { return &InvalidResourceType{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceType) Code() string { +func (s *InvalidResourceType) Code() string { return "InvalidResourceType" } // Message returns the exception's message. -func (s InvalidResourceType) Message() string { +func (s *InvalidResourceType) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30288,28 +30406,28 @@ func (s InvalidResourceType) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceType) OrigErr() error { +func (s *InvalidResourceType) OrigErr() error { return nil } -func (s InvalidResourceType) Error() string { +func (s *InvalidResourceType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceType) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceType) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceType) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceType) RequestID() string { + return s.RespMetadata.RequestID } // The specified inventory item result attribute is not valid. type InvalidResultAttributeException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -30326,17 +30444,17 @@ func (s InvalidResultAttributeException) GoString() string { func newErrorInvalidResultAttributeException(v protocol.ResponseMetadata) error { return &InvalidResultAttributeException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResultAttributeException) Code() string { +func (s *InvalidResultAttributeException) Code() string { return "InvalidResultAttributeException" } // Message returns the exception's message. -func (s InvalidResultAttributeException) Message() string { +func (s *InvalidResultAttributeException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30344,32 +30462,32 @@ func (s InvalidResultAttributeException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResultAttributeException) OrigErr() error { +func (s *InvalidResultAttributeException) OrigErr() error { return nil } -func (s InvalidResultAttributeException) Error() string { +func (s *InvalidResultAttributeException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResultAttributeException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResultAttributeException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResultAttributeException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResultAttributeException) RequestID() string { + return s.RespMetadata.RequestID } // The role name can't contain invalid characters. Also verify that you specified // an IAM role for notifications that includes the required trust policy. For // information about configuring the IAM role for Run Command notifications, -// see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) +// see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the AWS Systems Manager User Guide. type InvalidRole struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -30386,17 +30504,17 @@ func (s InvalidRole) GoString() string { func newErrorInvalidRole(v protocol.ResponseMetadata) error { return &InvalidRole{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRole) Code() string { +func (s *InvalidRole) Code() string { return "InvalidRole" } // Message returns the exception's message. -func (s InvalidRole) Message() string { +func (s *InvalidRole) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30404,28 +30522,28 @@ func (s InvalidRole) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRole) OrigErr() error { +func (s *InvalidRole) OrigErr() error { return nil } -func (s InvalidRole) Error() string { +func (s *InvalidRole) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRole) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRole) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRole) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRole) RequestID() string { + return s.RespMetadata.RequestID } // The schedule is invalid. Verify your cron or rate expression and try again. type InvalidSchedule struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -30442,17 +30560,17 @@ func (s InvalidSchedule) GoString() string { func newErrorInvalidSchedule(v protocol.ResponseMetadata) error { return &InvalidSchedule{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidSchedule) Code() string { +func (s *InvalidSchedule) Code() string { return "InvalidSchedule" } // Message returns the exception's message. -func (s InvalidSchedule) Message() string { +func (s *InvalidSchedule) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30460,29 +30578,29 @@ func (s InvalidSchedule) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidSchedule) OrigErr() error { +func (s *InvalidSchedule) OrigErr() error { return nil } -func (s InvalidSchedule) Error() string { +func (s *InvalidSchedule) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidSchedule) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidSchedule) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidSchedule) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidSchedule) RequestID() string { + return s.RespMetadata.RequestID } // The target is not valid or does not exist. It might not be configured for -// EC2 Systems Manager or you might not have permission to perform the operation. +// Systems Manager or you might not have permission to perform the operation. type InvalidTarget struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -30499,17 +30617,17 @@ func (s InvalidTarget) GoString() string { func newErrorInvalidTarget(v protocol.ResponseMetadata) error { return &InvalidTarget{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTarget) Code() string { +func (s *InvalidTarget) Code() string { return "InvalidTarget" } // Message returns the exception's message. -func (s InvalidTarget) Message() string { +func (s *InvalidTarget) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30517,28 +30635,28 @@ func (s InvalidTarget) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTarget) OrigErr() error { +func (s *InvalidTarget) OrigErr() error { return nil } -func (s InvalidTarget) Error() string { +func (s *InvalidTarget) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTarget) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTarget) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTarget) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTarget) RequestID() string { + return s.RespMetadata.RequestID } // The parameter type name is not valid. type InvalidTypeNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -30555,17 +30673,17 @@ func (s InvalidTypeNameException) GoString() string { func newErrorInvalidTypeNameException(v protocol.ResponseMetadata) error { return &InvalidTypeNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidTypeNameException) Code() string { +func (s *InvalidTypeNameException) Code() string { return "InvalidTypeNameException" } // Message returns the exception's message. -func (s InvalidTypeNameException) Message() string { +func (s *InvalidTypeNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30573,28 +30691,28 @@ func (s InvalidTypeNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidTypeNameException) OrigErr() error { +func (s *InvalidTypeNameException) OrigErr() error { return nil } -func (s InvalidTypeNameException) Error() string { +func (s *InvalidTypeNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidTypeNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidTypeNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidTypeNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidTypeNameException) RequestID() string { + return s.RespMetadata.RequestID } // The update is not valid. type InvalidUpdate struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -30611,17 +30729,17 @@ func (s InvalidUpdate) GoString() string { func newErrorInvalidUpdate(v protocol.ResponseMetadata) error { return &InvalidUpdate{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidUpdate) Code() string { +func (s *InvalidUpdate) Code() string { return "InvalidUpdate" } // Message returns the exception's message. -func (s InvalidUpdate) Message() string { +func (s *InvalidUpdate) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -30629,22 +30747,22 @@ func (s InvalidUpdate) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidUpdate) OrigErr() error { +func (s *InvalidUpdate) OrigErr() error { return nil } -func (s InvalidUpdate) Error() string { +func (s *InvalidUpdate) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidUpdate) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidUpdate) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidUpdate) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidUpdate) RequestID() string { + return s.RespMetadata.RequestID } // Specifies the inventory type and attribute for the aggregation execution. @@ -30741,7 +30859,7 @@ type InventoryDeletionStatusItem struct { DeletionStartTime *time.Time `type:"timestamp"` // Information about the delete operation. For more information about this summary, - // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete) + // see Understanding the delete inventory summary (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete) // in the AWS Systems Manager User Guide. DeletionSummary *InventoryDeletionSummary `type:"structure"` @@ -30906,6 +31024,10 @@ type InventoryFilter struct { Key *string `min:"1" type:"string" required:"true"` // The type of filter. + // + // The Exists filter must be used with aggregators. For more information, see + // Aggregating inventory data (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-aggregate.html) + // in the AWS Systems Manager User Guide. Type *string `type:"string" enum:"InventoryQueryOperatorType"` // Inventory filter values. Example: inventory filter where instance IDs are @@ -31352,8 +31474,8 @@ func (s *InventoryResultItem) SetTypeName(v string) *InventoryResultItem { // The command ID and instance ID you specified did not match any invocations. // Verify the command ID and the instance ID and try again. type InvocationDoesNotExist struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -31370,17 +31492,17 @@ func (s InvocationDoesNotExist) GoString() string { func newErrorInvocationDoesNotExist(v protocol.ResponseMetadata) error { return &InvocationDoesNotExist{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvocationDoesNotExist) Code() string { +func (s *InvocationDoesNotExist) Code() string { return "InvocationDoesNotExist" } // Message returns the exception's message. -func (s InvocationDoesNotExist) Message() string { +func (s *InvocationDoesNotExist) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -31388,28 +31510,28 @@ func (s InvocationDoesNotExist) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvocationDoesNotExist) OrigErr() error { +func (s *InvocationDoesNotExist) OrigErr() error { return nil } -func (s InvocationDoesNotExist) Error() string { +func (s *InvocationDoesNotExist) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvocationDoesNotExist) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvocationDoesNotExist) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvocationDoesNotExist) RequestID() string { - return s.respMetadata.RequestID +func (s *InvocationDoesNotExist) RequestID() string { + return s.RespMetadata.RequestID } // The inventory item has invalid content. type ItemContentMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -31428,17 +31550,17 @@ func (s ItemContentMismatchException) GoString() string { func newErrorItemContentMismatchException(v protocol.ResponseMetadata) error { return &ItemContentMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ItemContentMismatchException) Code() string { +func (s *ItemContentMismatchException) Code() string { return "ItemContentMismatchException" } // Message returns the exception's message. -func (s ItemContentMismatchException) Message() string { +func (s *ItemContentMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -31446,28 +31568,28 @@ func (s ItemContentMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ItemContentMismatchException) OrigErr() error { +func (s *ItemContentMismatchException) OrigErr() error { return nil } -func (s ItemContentMismatchException) Error() string { +func (s *ItemContentMismatchException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ItemContentMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ItemContentMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ItemContentMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *ItemContentMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // The inventory item size has exceeded the size limit. type ItemSizeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -31486,17 +31608,17 @@ func (s ItemSizeLimitExceededException) GoString() string { func newErrorItemSizeLimitExceededException(v protocol.ResponseMetadata) error { return &ItemSizeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ItemSizeLimitExceededException) Code() string { +func (s *ItemSizeLimitExceededException) Code() string { return "ItemSizeLimitExceededException" } // Message returns the exception's message. -func (s ItemSizeLimitExceededException) Message() string { +func (s *ItemSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -31504,22 +31626,22 @@ func (s ItemSizeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ItemSizeLimitExceededException) OrigErr() error { +func (s *ItemSizeLimitExceededException) OrigErr() error { return nil } -func (s ItemSizeLimitExceededException) Error() string { +func (s *ItemSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ItemSizeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ItemSizeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ItemSizeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ItemSizeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type LabelParameterVersionInput struct { @@ -31595,7 +31717,7 @@ type LabelParameterVersionOutput struct { _ struct{} `type:"structure"` // The label does not meet the requirements. For information about parameter - // label requirements, see Labeling Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html) + // label requirements, see Labeling parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html) // in the AWS Systems Manager User Guide. InvalidLabels []*string `min:"1" type:"list"` @@ -31834,7 +31956,7 @@ type ListCommandInvocationsInput struct { Details *bool `type:"boolean"` // (Optional) One or more filters. Use a filter to return a more specific list - // of results. Note that the DocumentName filter is not supported for ListCommandInvocations. + // of results. Filters []*CommandFilter `min:"1" type:"list"` // (Optional) The command execution details for a specific instance ID. @@ -32409,10 +32531,15 @@ func (s *ListDocumentVersionsOutput) SetNextToken(v string) *ListDocumentVersion type ListDocumentsInput struct { _ struct{} `type:"structure"` - // One or more filters. Use a filter to return a more specific list of results. + // This data type is deprecated. Instead, use Filters. DocumentFilterList []*DocumentFilter `min:"1" type:"list"` - // One or more filters. Use a filter to return a more specific list of results. + // One or more DocumentKeyValuesFilter objects. Use a filter to return a more + // specific list of results. For keys, you can specify one or more key-value + // pair tags that have been applied to a document. Other valid keys include + // Owner, Name, PlatformTypes, DocumentType, and TargetType. For example, to + // return documents you own use Key=Owner,Values=Self. To specify a custom key-value + // pair, use the format Key=tag:tagName,Values=valueName. Filters []*DocumentKeyValuesFilter `type:"list"` // The maximum number of items to return for this call. The call also returns @@ -32969,7 +33096,7 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut return s } -// Information about an Amazon S3 bucket to write instance-level logs to. +// Information about an S3 bucket to write instance-level logs to. // // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters @@ -32978,15 +33105,15 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut type LoggingInfo struct { _ struct{} `type:"structure"` - // The name of an Amazon S3 bucket where execution logs are stored . + // The name of an S3 bucket where execution logs are stored . // // S3BucketName is a required field S3BucketName *string `min:"3" type:"string" required:"true"` - // (Optional) The Amazon S3 bucket subfolder. + // (Optional) The S3 bucket subfolder. S3KeyPrefix *string `type:"string"` - // The region where the Amazon S3 bucket is located. + // The Region where the S3 bucket is located. // // S3Region is a required field S3Region *string `min:"3" type:"string" required:"true"` @@ -33720,10 +33847,10 @@ type MaintenanceWindowRunCommandParameters struct { // a per-instance basis. NotificationConfig *NotificationConfig `type:"structure"` - // The name of the Amazon S3 bucket. + // The name of the S3 bucket. OutputS3BucketName *string `min:"3" type:"string"` - // The Amazon S3 bucket subfolder. + // The S3 bucket subfolder. OutputS3KeyPrefix *string `type:"string"` // The parameters for the RUN_COMMAND task execution. @@ -33991,7 +34118,7 @@ type MaintenanceWindowTask struct { // A description of the task. Description *string `min:"1" type:"string" sensitive:"true"` - // Information about an Amazon S3 bucket to write task-level logs to. + // Information about an S3 bucket to write task-level logs to. // // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters @@ -34242,8 +34369,8 @@ func (s *MaintenanceWindowTaskParameterValueExpression) SetValues(v []*string) * // The size limit of a document is 64 KB. type MaxDocumentSizeExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -34260,17 +34387,17 @@ func (s MaxDocumentSizeExceeded) GoString() string { func newErrorMaxDocumentSizeExceeded(v protocol.ResponseMetadata) error { return &MaxDocumentSizeExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MaxDocumentSizeExceeded) Code() string { +func (s *MaxDocumentSizeExceeded) Code() string { return "MaxDocumentSizeExceeded" } // Message returns the exception's message. -func (s MaxDocumentSizeExceeded) Message() string { +func (s *MaxDocumentSizeExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -34278,22 +34405,22 @@ func (s MaxDocumentSizeExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MaxDocumentSizeExceeded) OrigErr() error { +func (s *MaxDocumentSizeExceeded) OrigErr() error { return nil } -func (s MaxDocumentSizeExceeded) Error() string { +func (s *MaxDocumentSizeExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MaxDocumentSizeExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MaxDocumentSizeExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MaxDocumentSizeExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *MaxDocumentSizeExceeded) RequestID() string { + return s.RespMetadata.RequestID } type ModifyDocumentPermissionInput struct { @@ -34439,8 +34566,8 @@ type NotificationConfig struct { // The different events for which you can receive notifications. These events // include the following: All (events), InProgress, Success, TimedOut, Cancelled, - // Failed. To learn more about these events, see Configuring Amazon SNS Notifications - // for AWS Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html) + // Failed. To learn more about these events, see Monitoring Systems Manager + // status changes using Amazon SNS notifications (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitoring-sns-notifications.html) // in the AWS Systems Manager User Guide. NotificationEvents []*string `type:"list"` @@ -34727,7 +34854,7 @@ func (s *OpsFilter) SetValues(v []*string) *OpsFilter { // Operations engineers and IT professionals use OpsCenter to view, investigate, // and remediate operational issues impacting the performance and health of // their AWS resources. For more information, see AWS Systems Manager OpsCenter -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html) // in the AWS Systems Manager User Guide. type OpsItem struct { _ struct{} `type:"structure"` @@ -34774,7 +34901,7 @@ type OpsItem struct { // Use the /aws/resources key in OperationalData to specify a related resource // in the request. Use the /aws/automations key in OperationalData to associate // an Automation runbook with the OpsItem. To view AWS CLI example commands - // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) + // that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) // in the AWS Systems Manager User Guide. OperationalData map[string]*OpsItemDataValue `type:"map"` @@ -34792,12 +34919,12 @@ type OpsItem struct { // The severity of the OpsItem. Severity options range from 1 to 4. Severity *string `min:"1" type:"string"` - // The origin of the OpsItem, such as Amazon EC2 or AWS Systems Manager. The - // impacted resource is a subset of source. + // The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The impacted + // resource is a subset of source. Source *string `min:"1" type:"string"` // The OpsItem status. Status can be Open, In Progress, or Resolved. For more - // information, see Editing OpsItem Details (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) + // information, see Editing OpsItem details (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) // in the AWS Systems Manager User Guide. Status *string `type:"string" enum:"OpsItemStatus"` @@ -34918,8 +35045,8 @@ func (s *OpsItem) SetVersion(v string) *OpsItem { // The OpsItem already exists. type OpsItemAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -34938,17 +35065,17 @@ func (s OpsItemAlreadyExistsException) GoString() string { func newErrorOpsItemAlreadyExistsException(v protocol.ResponseMetadata) error { return &OpsItemAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OpsItemAlreadyExistsException) Code() string { +func (s *OpsItemAlreadyExistsException) Code() string { return "OpsItemAlreadyExistsException" } // Message returns the exception's message. -func (s OpsItemAlreadyExistsException) Message() string { +func (s *OpsItemAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -34956,22 +35083,22 @@ func (s OpsItemAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OpsItemAlreadyExistsException) OrigErr() error { +func (s *OpsItemAlreadyExistsException) OrigErr() error { return nil } -func (s OpsItemAlreadyExistsException) Error() string { +func (s *OpsItemAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s OpsItemAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OpsItemAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OpsItemAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *OpsItemAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // An object that defines the value of the key and its type in the OperationalData @@ -35078,8 +35205,8 @@ func (s *OpsItemFilter) SetValues(v []*string) *OpsItemFilter { // A specified parameter argument isn't valid. Verify the available arguments // and try again. type OpsItemInvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -35098,17 +35225,17 @@ func (s OpsItemInvalidParameterException) GoString() string { func newErrorOpsItemInvalidParameterException(v protocol.ResponseMetadata) error { return &OpsItemInvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OpsItemInvalidParameterException) Code() string { +func (s *OpsItemInvalidParameterException) Code() string { return "OpsItemInvalidParameterException" } // Message returns the exception's message. -func (s OpsItemInvalidParameterException) Message() string { +func (s *OpsItemInvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -35116,29 +35243,29 @@ func (s OpsItemInvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OpsItemInvalidParameterException) OrigErr() error { +func (s *OpsItemInvalidParameterException) OrigErr() error { return nil } -func (s OpsItemInvalidParameterException) Error() string { +func (s *OpsItemInvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s OpsItemInvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OpsItemInvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OpsItemInvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *OpsItemInvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The request caused OpsItems to exceed one or more quotas. For information -// about OpsItem quotas, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). +// about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). type OpsItemLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Limit *int64 `type:"integer"` @@ -35161,17 +35288,17 @@ func (s OpsItemLimitExceededException) GoString() string { func newErrorOpsItemLimitExceededException(v protocol.ResponseMetadata) error { return &OpsItemLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OpsItemLimitExceededException) Code() string { +func (s *OpsItemLimitExceededException) Code() string { return "OpsItemLimitExceededException" } // Message returns the exception's message. -func (s OpsItemLimitExceededException) Message() string { +func (s *OpsItemLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -35179,28 +35306,28 @@ func (s OpsItemLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OpsItemLimitExceededException) OrigErr() error { +func (s *OpsItemLimitExceededException) OrigErr() error { return nil } -func (s OpsItemLimitExceededException) Error() string { +func (s *OpsItemLimitExceededException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s OpsItemLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OpsItemLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OpsItemLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *OpsItemLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The specified OpsItem ID doesn't exist. Verify the ID and try again. type OpsItemNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -35217,17 +35344,17 @@ func (s OpsItemNotFoundException) GoString() string { func newErrorOpsItemNotFoundException(v protocol.ResponseMetadata) error { return &OpsItemNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OpsItemNotFoundException) Code() string { +func (s *OpsItemNotFoundException) Code() string { return "OpsItemNotFoundException" } // Message returns the exception's message. -func (s OpsItemNotFoundException) Message() string { +func (s *OpsItemNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -35235,22 +35362,22 @@ func (s OpsItemNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OpsItemNotFoundException) OrigErr() error { +func (s *OpsItemNotFoundException) OrigErr() error { return nil } -func (s OpsItemNotFoundException) Error() string { +func (s *OpsItemNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OpsItemNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OpsItemNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OpsItemNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *OpsItemNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // A notification about the OpsItem. @@ -35451,7 +35578,7 @@ func (s *OpsResultAttribute) SetTypeName(v string) *OpsResultAttribute { type OutputSource struct { _ struct{} `type:"structure"` - // The ID of the output source, for example the URL of an Amazon S3 bucket. + // The ID of the output source, for example the URL of an S3 bucket. OutputSourceId *string `min:"36" type:"string"` // The type of source where the association execution details are stored, for @@ -35481,13 +35608,17 @@ func (s *OutputSource) SetOutputSourceType(v string) *OutputSource { return s } -// An Amazon EC2 Systems Manager parameter in Parameter Store. +// An Systems Manager parameter in Parameter Store. type Parameter struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the parameter. ARN *string `type:"string"` + // The data type of the parameter, such as text or aws:ec2:image. The default + // is text. + DataType *string `type:"string"` + // Date the parameter was last changed or updated and the parameter version // was created. LastModifiedDate *time.Time `type:"timestamp"` @@ -35507,8 +35638,8 @@ type Parameter struct { // is the raw result or response from the source. SourceResult *string `type:"string"` - // The type of parameter. Valid values include the following: String, String - // list, Secure string. + // The type of parameter. Valid values include the following: String, StringList, + // and SecureString. Type *string `type:"string" enum:"ParameterType"` // The parameter value. @@ -35534,6 +35665,12 @@ func (s *Parameter) SetARN(v string) *Parameter { return s } +// SetDataType sets the DataType field's value. +func (s *Parameter) SetDataType(v string) *Parameter { + s.DataType = &v + return s +} + // SetLastModifiedDate sets the LastModifiedDate field's value. func (s *Parameter) SetLastModifiedDate(v time.Time) *Parameter { s.LastModifiedDate = &v @@ -35578,8 +35715,8 @@ func (s *Parameter) SetVersion(v int64) *Parameter { // The parameter already exists. You can't create duplicate parameters. type ParameterAlreadyExists struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -35596,17 +35733,17 @@ func (s ParameterAlreadyExists) GoString() string { func newErrorParameterAlreadyExists(v protocol.ResponseMetadata) error { return &ParameterAlreadyExists{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterAlreadyExists) Code() string { +func (s *ParameterAlreadyExists) Code() string { return "ParameterAlreadyExists" } // Message returns the exception's message. -func (s ParameterAlreadyExists) Message() string { +func (s *ParameterAlreadyExists) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -35614,22 +35751,22 @@ func (s ParameterAlreadyExists) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterAlreadyExists) OrigErr() error { +func (s *ParameterAlreadyExists) OrigErr() error { return nil } -func (s ParameterAlreadyExists) Error() string { +func (s *ParameterAlreadyExists) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterAlreadyExists) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterAlreadyExists) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterAlreadyExists) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterAlreadyExists) RequestID() string { + return s.RespMetadata.RequestID } // Information about parameter usage. @@ -35641,6 +35778,10 @@ type ParameterHistory struct { // a-zA-Z0-9_.- AllowedPattern *string `type:"string"` + // The data type of the parameter, such as text or aws:ec2:image. The default + // is text. + DataType *string `type:"string"` + // Information about the parameter. Description *string `type:"string"` @@ -35661,7 +35802,7 @@ type ParameterHistory struct { // Information about the policies assigned to a parameter. // - // Working with Parameter Policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) + // Assigning parameter policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) // in the AWS Systems Manager User Guide. Policies []*ParameterInlinePolicy `type:"list"` @@ -35694,6 +35835,12 @@ func (s *ParameterHistory) SetAllowedPattern(v string) *ParameterHistory { return s } +// SetDataType sets the DataType field's value. +func (s *ParameterHistory) SetDataType(v string) *ParameterHistory { + s.DataType = &v + return s +} + // SetDescription sets the Description field's value. func (s *ParameterHistory) SetDescription(v string) *ParameterHistory { s.Description = &v @@ -35809,8 +35956,8 @@ func (s *ParameterInlinePolicy) SetPolicyType(v string) *ParameterInlinePolicy { // You have exceeded the number of parameters for this AWS account. Delete one // or more parameters and try again. type ParameterLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -35827,17 +35974,17 @@ func (s ParameterLimitExceeded) GoString() string { func newErrorParameterLimitExceeded(v protocol.ResponseMetadata) error { return &ParameterLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterLimitExceeded) Code() string { +func (s *ParameterLimitExceeded) Code() string { return "ParameterLimitExceeded" } // Message returns the exception's message. -func (s ParameterLimitExceeded) Message() string { +func (s *ParameterLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -35845,28 +35992,28 @@ func (s ParameterLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterLimitExceeded) OrigErr() error { +func (s *ParameterLimitExceeded) OrigErr() error { return nil } -func (s ParameterLimitExceeded) Error() string { +func (s *ParameterLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // The parameter exceeded the maximum number of allowed versions. type ParameterMaxVersionLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -35883,17 +36030,17 @@ func (s ParameterMaxVersionLimitExceeded) GoString() string { func newErrorParameterMaxVersionLimitExceeded(v protocol.ResponseMetadata) error { return &ParameterMaxVersionLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterMaxVersionLimitExceeded) Code() string { +func (s *ParameterMaxVersionLimitExceeded) Code() string { return "ParameterMaxVersionLimitExceeded" } // Message returns the exception's message. -func (s ParameterMaxVersionLimitExceeded) Message() string { +func (s *ParameterMaxVersionLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -35901,22 +36048,22 @@ func (s ParameterMaxVersionLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterMaxVersionLimitExceeded) OrigErr() error { +func (s *ParameterMaxVersionLimitExceeded) OrigErr() error { return nil } -func (s ParameterMaxVersionLimitExceeded) Error() string { +func (s *ParameterMaxVersionLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterMaxVersionLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterMaxVersionLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterMaxVersionLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterMaxVersionLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // Metadata includes information like the ARN of the last user and the date/time @@ -35929,6 +36076,10 @@ type ParameterMetadata struct { // a-zA-Z0-9_.- AllowedPattern *string `type:"string"` + // The data type of the parameter, such as text or aws:ec2:image. The default + // is text. + DataType *string `type:"string"` + // Description of the parameter actions. Description *string `type:"string"` @@ -35951,7 +36102,7 @@ type ParameterMetadata struct { Tier *string `type:"string" enum:"ParameterTier"` // The type of parameter. Valid parameter types include the following: String, - // String list, Secure string. + // StringList, and SecureString. Type *string `type:"string" enum:"ParameterType"` // The parameter version. @@ -35974,6 +36125,12 @@ func (s *ParameterMetadata) SetAllowedPattern(v string) *ParameterMetadata { return s } +// SetDataType sets the DataType field's value. +func (s *ParameterMetadata) SetDataType(v string) *ParameterMetadata { + s.DataType = &v + return s +} + // SetDescription sets the Description field's value. func (s *ParameterMetadata) SetDescription(v string) *ParameterMetadata { s.Description = &v @@ -36030,8 +36187,8 @@ func (s *ParameterMetadata) SetVersion(v int64) *ParameterMetadata { // The parameter could not be found. Verify the name and try again. type ParameterNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -36048,17 +36205,17 @@ func (s ParameterNotFound) GoString() string { func newErrorParameterNotFound(v protocol.ResponseMetadata) error { return &ParameterNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterNotFound) Code() string { +func (s *ParameterNotFound) Code() string { return "ParameterNotFound" } // Message returns the exception's message. -func (s ParameterNotFound) Message() string { +func (s *ParameterNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -36066,28 +36223,28 @@ func (s ParameterNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterNotFound) OrigErr() error { +func (s *ParameterNotFound) OrigErr() error { return nil } -func (s ParameterNotFound) Error() string { +func (s *ParameterNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterNotFound) RequestID() string { + return s.RespMetadata.RequestID } // The parameter name is not valid. type ParameterPatternMismatchException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The parameter name is not valid. Message_ *string `locationName:"message" type:"string"` @@ -36105,17 +36262,17 @@ func (s ParameterPatternMismatchException) GoString() string { func newErrorParameterPatternMismatchException(v protocol.ResponseMetadata) error { return &ParameterPatternMismatchException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterPatternMismatchException) Code() string { +func (s *ParameterPatternMismatchException) Code() string { return "ParameterPatternMismatchException" } // Message returns the exception's message. -func (s ParameterPatternMismatchException) Message() string { +func (s *ParameterPatternMismatchException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -36123,22 +36280,22 @@ func (s ParameterPatternMismatchException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterPatternMismatchException) OrigErr() error { +func (s *ParameterPatternMismatchException) OrigErr() error { return nil } -func (s ParameterPatternMismatchException) Error() string { +func (s *ParameterPatternMismatchException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterPatternMismatchException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterPatternMismatchException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterPatternMismatchException) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterPatternMismatchException) RequestID() string { + return s.RespMetadata.RequestID } // One or more filters. Use a filter to return a more specific list of results. @@ -36154,7 +36311,7 @@ func (s ParameterPatternMismatchException) RequestID() string { // Name, Path, and Tier. // // For examples of CLI commands demonstrating valid parameter filter constructions, -// see Searching for Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html) +// see Searching for Systems Manager parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-search.html) // in the AWS Systems Manager User Guide. type ParameterStringFilter struct { _ struct{} `type:"structure"` @@ -36230,8 +36387,8 @@ func (s *ParameterStringFilter) SetValues(v []*string) *ParameterStringFilter { // A parameter version can have a maximum of ten labels. type ParameterVersionLabelLimitExceeded struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -36248,17 +36405,17 @@ func (s ParameterVersionLabelLimitExceeded) GoString() string { func newErrorParameterVersionLabelLimitExceeded(v protocol.ResponseMetadata) error { return &ParameterVersionLabelLimitExceeded{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterVersionLabelLimitExceeded) Code() string { +func (s *ParameterVersionLabelLimitExceeded) Code() string { return "ParameterVersionLabelLimitExceeded" } // Message returns the exception's message. -func (s ParameterVersionLabelLimitExceeded) Message() string { +func (s *ParameterVersionLabelLimitExceeded) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -36266,29 +36423,29 @@ func (s ParameterVersionLabelLimitExceeded) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterVersionLabelLimitExceeded) OrigErr() error { +func (s *ParameterVersionLabelLimitExceeded) OrigErr() error { return nil } -func (s ParameterVersionLabelLimitExceeded) Error() string { +func (s *ParameterVersionLabelLimitExceeded) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterVersionLabelLimitExceeded) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterVersionLabelLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterVersionLabelLimitExceeded) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterVersionLabelLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID } // The specified parameter version was not found. Verify the parameter name // and version, and try again. type ParameterVersionNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -36305,17 +36462,17 @@ func (s ParameterVersionNotFound) GoString() string { func newErrorParameterVersionNotFound(v protocol.ResponseMetadata) error { return &ParameterVersionNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ParameterVersionNotFound) Code() string { +func (s *ParameterVersionNotFound) Code() string { return "ParameterVersionNotFound" } // Message returns the exception's message. -func (s ParameterVersionNotFound) Message() string { +func (s *ParameterVersionNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -36323,22 +36480,22 @@ func (s ParameterVersionNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ParameterVersionNotFound) OrigErr() error { +func (s *ParameterVersionNotFound) OrigErr() error { return nil } -func (s ParameterVersionNotFound) Error() string { +func (s *ParameterVersionNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ParameterVersionNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ParameterVersionNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ParameterVersionNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ParameterVersionNotFound) RequestID() string { + return s.RespMetadata.RequestID } // This data type is deprecated. Instead, use ParameterStringFilter. @@ -36621,7 +36778,7 @@ type PatchComplianceData struct { // The state of the patch on the instance, such as INSTALLED or FAILED. // - // For descriptions of each patch state, see About Patch Compliance (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) + // For descriptions of each patch state, see About patch compliance (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) // in the AWS Systems Manager User Guide. // // State is a required field @@ -36891,15 +37048,17 @@ type PatchRule struct { // The number of days after the release date of each patch matched by the rule // that the patch is marked as approved in the patch baseline. For example, // a value of 7 means that patches are approved seven days after they are released. + // Not supported on Ubuntu Server. ApproveAfterDays *int64 `type:"integer"` // The cutoff date for auto approval of released patches. Any patches released - // on or before this date will be installed automatically + // on or before this date are installed automatically. Not supported on Ubuntu + // Server. + // + // Enter dates in the format YYYY-MM-DD. For example, 2020-12-31. ApproveUntilDate *string `min:"1" type:"string"` // A compliance severity level for all approved patches in a patch baseline. - // Valid compliance severity levels include the following: Unspecified, Critical, - // High, Medium, Low, and Informational. ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // For instances identified by the approval rule filters, enables a patch baseline @@ -37153,8 +37312,8 @@ func (s *PatchStatus) SetDeploymentStatus(v string) *PatchStatus { // You specified more than the maximum number of allowed policies for the parameter. // The maximum is 10. type PoliciesLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -37171,17 +37330,17 @@ func (s PoliciesLimitExceededException) GoString() string { func newErrorPoliciesLimitExceededException(v protocol.ResponseMetadata) error { return &PoliciesLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s PoliciesLimitExceededException) Code() string { +func (s *PoliciesLimitExceededException) Code() string { return "PoliciesLimitExceededException" } // Message returns the exception's message. -func (s PoliciesLimitExceededException) Message() string { +func (s *PoliciesLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -37189,22 +37348,22 @@ func (s PoliciesLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s PoliciesLimitExceededException) OrigErr() error { +func (s *PoliciesLimitExceededException) OrigErr() error { return nil } -func (s PoliciesLimitExceededException) Error() string { +func (s *PoliciesLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s PoliciesLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *PoliciesLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s PoliciesLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *PoliciesLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // An aggregate of step execution statuses displayed in the AWS Console for @@ -37296,7 +37455,7 @@ type PutComplianceItemsInput struct { // Information about the compliance as defined by the resource type. For example, // for a patch compliance type, Items includes information about the PatchSeverity, - // Classification, etc. + // Classification, and so on. // // Items is a required field Items []*ComplianceItemEntry `type:"list" required:"true"` @@ -37312,6 +37471,18 @@ type PutComplianceItemsInput struct { // // ResourceType is a required field ResourceType *string `min:"1" type:"string" required:"true"` + + // The mode for uploading compliance items. You can specify COMPLETE or PARTIAL. + // In COMPLETE mode, the system overwrites all existing compliance information + // for the resource. You must provide a full list of compliance items each time + // you send the request. + // + // In PARTIAL mode, the system overwrites compliance information for a specific + // association. The association must be configured with SyncCompliance set to + // MANUAL. By default, all requests use COMPLETE mode. + // + // This attribute is only valid for association compliance. + UploadType *string `type:"string" enum:"ComplianceUploadType"` } // String returns the string representation @@ -37409,6 +37580,12 @@ func (s *PutComplianceItemsInput) SetResourceType(v string) *PutComplianceItemsI return s } +// SetUploadType sets the UploadType field's value. +func (s *PutComplianceItemsInput) SetUploadType(v string) *PutComplianceItemsInput { + s.UploadType = &v + return s +} + type PutComplianceItemsOutput struct { _ struct{} `type:"structure"` } @@ -37519,6 +37696,22 @@ type PutParameterInput struct { // AllowedPattern=^\d+$ AllowedPattern *string `type:"string"` + // The data type for a String parameter. Supported data types include plain + // text and Amazon Machine Image IDs. + // + // The following data type values are supported. + // + // * text + // + // * aws:ec2:image + // + // When you create a String parameter and specify aws:ec2:image, Systems Manager + // validates the parameter value you provide against that data type. The required + // format is ami-12345abcdeEXAMPLE. For more information, see Native parameter + // support for Amazon Machine Image IDs (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html) + // in the AWS Systems Manager User Guide. + DataType *string `type:"string"` + // Information about the parameter that you want to add to the system. Optional // but recommended. // @@ -37562,8 +37755,8 @@ type PutParameterInput struct { // // * Parameter hierarchies are limited to a maximum depth of fifteen levels. // - // For additional information about valid values for parameter names, see Requirements - // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) + // For additional information about valid values for parameter names, see About + // requirements and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. // // The maximum length constraint listed below includes capacity for additional @@ -37600,8 +37793,8 @@ type PutParameterInput struct { // time, but it has not been changed. // // All existing policies are preserved until you send new policies or an empty - // policy. For more information about parameter policies, see Working with Parameter - // Policies (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-policies.html). + // policy. For more information about parameter policies, see Assigning parameter + // policies (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html). Policies *string `min:"1" type:"string"` // Optional metadata that you assign to a resource. Tags enable you to categorize @@ -37632,7 +37825,7 @@ type PutParameterInput struct { // Advanced parameters have a content size limit of 8 KB and can be configured // to use parameter policies. You can create a maximum of 100,000 advanced parameters // for each Region in an AWS account. Advanced parameters incur a charge. For - // more information, see About Advanced Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html) + // more information, see Standard and advanced parameter tiers (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html) // in the AWS Systems Manager User Guide. // // You can change a standard parameter to an advanced parameter any time. But @@ -37680,7 +37873,7 @@ type PutParameterInput struct { // current Region. // // For more information about configuring the default tier option, see Specifying - // a Default Parameter Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html) + // a default parameter tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html) // in the AWS Systems Manager User Guide. Tier *string `type:"string" enum:"ParameterTier"` @@ -37692,9 +37885,7 @@ type PutParameterInput struct { // // SecureString is not currently supported for AWS CloudFormation templates // or in the China Regions. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ParameterType"` + Type *string `type:"string" enum:"ParameterType"` // The parameter value that you want to add to the system. Standard parameters // have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB. @@ -37728,9 +37919,6 @@ func (s *PutParameterInput) Validate() error { if s.Policies != nil && len(*s.Policies) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policies", 1)) } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } @@ -37757,6 +37945,12 @@ func (s *PutParameterInput) SetAllowedPattern(v string) *PutParameterInput { return s } +// SetDataType sets the DataType field's value. +func (s *PutParameterInput) SetDataType(v string) *PutParameterInput { + s.DataType = &v + return s +} + // SetDescription sets the Description field's value. func (s *PutParameterInput) SetDescription(v string) *PutParameterInput { s.Description = &v @@ -38055,7 +38249,7 @@ type RegisterTargetWithMaintenanceWindowInput struct { // Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC // // For more information about these examples formats, including the best use - // case for each one, see Examples: Register Targets with a Maintenance Window + // case for each one, see Examples: Register targets with a maintenance window // (https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html) // in the AWS Systems Manager User Guide. // @@ -38196,7 +38390,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { // An optional description for the task. Description *string `min:"1" type:"string" sensitive:"true"` - // A structure containing information about an Amazon S3 bucket to write instance-level + // A structure containing information about an S3 bucket to write instance-level // logs to. // // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, @@ -38231,10 +38425,10 @@ type RegisterTaskWithMaintenanceWindowInput struct { // For more information, see the following topics in the in the AWS Systems // Manager User Guide: // - // * Service-Linked Role Permissions for Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) + // * Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) // - // * Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance - // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) + // * Should I use a service-linked role or a custom service role to run maintenance + // window tasks? (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) ServiceRoleArn *string `type:"string"` // The targets (either instances or maintenance window targets). @@ -38605,7 +38799,9 @@ func (s RemoveTagsFromResourceOutput) GoString() string { type ResetServiceSettingInput struct { _ struct{} `type:"structure"` - // The ID of the service setting to reset. + // The Amazon Resource Name (ARN) of the service setting to reset. The setting + // ID can be /ssm/parameter-store/default-parameter-tier, /ssm/parameter-store/high-throughput-enabled, + // or /ssm/managed-instance/activation-tier. For example, arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled. // // SettingId is a required field SettingId *string `min:"1" type:"string" required:"true"` @@ -38792,8 +38988,8 @@ func (s *ResourceComplianceSummaryItem) SetStatus(v string) *ResourceComplianceS // A sync configuration with the same name already exists. type ResourceDataSyncAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -38812,17 +39008,17 @@ func (s ResourceDataSyncAlreadyExistsException) GoString() string { func newErrorResourceDataSyncAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceDataSyncAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDataSyncAlreadyExistsException) Code() string { +func (s *ResourceDataSyncAlreadyExistsException) Code() string { return "ResourceDataSyncAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceDataSyncAlreadyExistsException) Message() string { +func (s *ResourceDataSyncAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -38830,22 +39026,22 @@ func (s ResourceDataSyncAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDataSyncAlreadyExistsException) OrigErr() error { +func (s *ResourceDataSyncAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceDataSyncAlreadyExistsException) Error() string { +func (s *ResourceDataSyncAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDataSyncAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDataSyncAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDataSyncAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDataSyncAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // Information about the AwsOrganizationsSource resource data sync source. A @@ -38920,8 +39116,8 @@ func (s *ResourceDataSyncAwsOrganizationsSource) SetOrganizationalUnits(v []*Res // Another UpdateResourceDataSync request is being processed. Wait a few minutes // and try again. type ResourceDataSyncConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -38938,17 +39134,17 @@ func (s ResourceDataSyncConflictException) GoString() string { func newErrorResourceDataSyncConflictException(v protocol.ResponseMetadata) error { return &ResourceDataSyncConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDataSyncConflictException) Code() string { +func (s *ResourceDataSyncConflictException) Code() string { return "ResourceDataSyncConflictException" } // Message returns the exception's message. -func (s ResourceDataSyncConflictException) Message() string { +func (s *ResourceDataSyncConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -38956,28 +39152,28 @@ func (s ResourceDataSyncConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDataSyncConflictException) OrigErr() error { +func (s *ResourceDataSyncConflictException) OrigErr() error { return nil } -func (s ResourceDataSyncConflictException) Error() string { +func (s *ResourceDataSyncConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDataSyncConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDataSyncConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDataSyncConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDataSyncConflictException) RequestID() string { + return s.RespMetadata.RequestID } // You have exceeded the allowed maximum sync configurations. type ResourceDataSyncCountExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -38994,17 +39190,17 @@ func (s ResourceDataSyncCountExceededException) GoString() string { func newErrorResourceDataSyncCountExceededException(v protocol.ResponseMetadata) error { return &ResourceDataSyncCountExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDataSyncCountExceededException) Code() string { +func (s *ResourceDataSyncCountExceededException) Code() string { return "ResourceDataSyncCountExceededException" } // Message returns the exception's message. -func (s ResourceDataSyncCountExceededException) Message() string { +func (s *ResourceDataSyncCountExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39012,28 +39208,68 @@ func (s ResourceDataSyncCountExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDataSyncCountExceededException) OrigErr() error { +func (s *ResourceDataSyncCountExceededException) OrigErr() error { return nil } -func (s ResourceDataSyncCountExceededException) Error() string { +func (s *ResourceDataSyncCountExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDataSyncCountExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDataSyncCountExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDataSyncCountExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDataSyncCountExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Synchronize Systems Manager Inventory data from multiple AWS accounts defined +// in AWS Organizations to a centralized S3 bucket. Data is synchronized to +// individual key prefixes in the central bucket. Each key prefix represents +// a different AWS account ID. +type ResourceDataSyncDestinationDataSharing struct { + _ struct{} `type:"structure"` + + // The sharing data type. Only Organization is supported. + DestinationDataSharingType *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ResourceDataSyncDestinationDataSharing) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceDataSyncDestinationDataSharing) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceDataSyncDestinationDataSharing) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceDataSyncDestinationDataSharing"} + if s.DestinationDataSharingType != nil && len(*s.DestinationDataSharingType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationDataSharingType", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinationDataSharingType sets the DestinationDataSharingType field's value. +func (s *ResourceDataSyncDestinationDataSharing) SetDestinationDataSharingType(v string) *ResourceDataSyncDestinationDataSharing { + s.DestinationDataSharingType = &v + return s } // The specified sync configuration is invalid. type ResourceDataSyncInvalidConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -39050,17 +39286,17 @@ func (s ResourceDataSyncInvalidConfigurationException) GoString() string { func newErrorResourceDataSyncInvalidConfigurationException(v protocol.ResponseMetadata) error { return &ResourceDataSyncInvalidConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDataSyncInvalidConfigurationException) Code() string { +func (s *ResourceDataSyncInvalidConfigurationException) Code() string { return "ResourceDataSyncInvalidConfigurationException" } // Message returns the exception's message. -func (s ResourceDataSyncInvalidConfigurationException) Message() string { +func (s *ResourceDataSyncInvalidConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39068,22 +39304,22 @@ func (s ResourceDataSyncInvalidConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDataSyncInvalidConfigurationException) OrigErr() error { +func (s *ResourceDataSyncInvalidConfigurationException) OrigErr() error { return nil } -func (s ResourceDataSyncInvalidConfigurationException) Error() string { +func (s *ResourceDataSyncInvalidConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDataSyncInvalidConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDataSyncInvalidConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDataSyncInvalidConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDataSyncInvalidConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // Information about a Resource Data Sync configuration, including its current @@ -39103,7 +39339,7 @@ type ResourceDataSyncItem struct { // The last time the configuration attempted to sync (UTC). LastSyncTime *time.Time `type:"timestamp"` - // Configuration information for the target Amazon S3 bucket. + // Configuration information for the target S3 bucket. S3Destination *ResourceDataSyncS3Destination `type:"structure"` // The date and time the configuration was created (UTC). @@ -39119,9 +39355,9 @@ type ResourceDataSyncItem struct { SyncSource *ResourceDataSyncSourceWithState `type:"structure"` // The type of resource data sync. If SyncType is SyncToDestination, then the - // resource data sync synchronizes data to an Amazon S3 bucket. If the SyncType - // is SyncFromSource then the resource data sync synchronizes data from AWS - // Organizations or from multiple AWS Regions. + // resource data sync synchronizes data to an S3 bucket. If the SyncType is + // SyncFromSource then the resource data sync synchronizes data from AWS Organizations + // or from multiple AWS Regions. SyncType *string `min:"1" type:"string"` } @@ -39197,8 +39433,8 @@ func (s *ResourceDataSyncItem) SetSyncType(v string) *ResourceDataSyncItem { // The specified sync name was not found. type ResourceDataSyncNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -39219,17 +39455,17 @@ func (s ResourceDataSyncNotFoundException) GoString() string { func newErrorResourceDataSyncNotFoundException(v protocol.ResponseMetadata) error { return &ResourceDataSyncNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceDataSyncNotFoundException) Code() string { +func (s *ResourceDataSyncNotFoundException) Code() string { return "ResourceDataSyncNotFoundException" } // Message returns the exception's message. -func (s ResourceDataSyncNotFoundException) Message() string { +func (s *ResourceDataSyncNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39237,22 +39473,22 @@ func (s ResourceDataSyncNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceDataSyncNotFoundException) OrigErr() error { +func (s *ResourceDataSyncNotFoundException) OrigErr() error { return nil } -func (s ResourceDataSyncNotFoundException) Error() string { +func (s *ResourceDataSyncNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceDataSyncNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceDataSyncNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceDataSyncNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceDataSyncNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The AWS Organizations organizational unit data source for the sync. @@ -39292,23 +39528,26 @@ func (s *ResourceDataSyncOrganizationalUnit) SetOrganizationalUnitId(v string) * return s } -// Information about the target Amazon S3 bucket for the Resource Data Sync. +// Information about the target S3 bucket for the Resource Data Sync. type ResourceDataSyncS3Destination struct { _ struct{} `type:"structure"` // The ARN of an encryption key for a destination in Amazon S3. Must belong - // to the same Region as the destination Amazon S3 bucket. + // to the same Region as the destination S3 bucket. AWSKMSKeyARN *string `min:"1" type:"string"` - // The name of the Amazon S3 bucket where the aggregated data is stored. + // The name of the S3 bucket where the aggregated data is stored. // // BucketName is a required field BucketName *string `min:"1" type:"string" required:"true"` + // Enables destination data sharing. By default, this field is null. + DestinationDataSharing *ResourceDataSyncDestinationDataSharing `type:"structure"` + // An Amazon S3 prefix for the bucket. Prefix *string `min:"1" type:"string"` - // The AWS Region with the Amazon S3 bucket targeted by the Resource Data Sync. + // The AWS Region with the S3 bucket targeted by the Resource Data Sync. // // Region is a required field Region *string `min:"1" type:"string" required:"true"` @@ -39353,6 +39592,11 @@ func (s *ResourceDataSyncS3Destination) Validate() error { if s.SyncFormat == nil { invalidParams.Add(request.NewErrParamRequired("SyncFormat")) } + if s.DestinationDataSharing != nil { + if err := s.DestinationDataSharing.Validate(); err != nil { + invalidParams.AddNested("DestinationDataSharing", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -39372,6 +39616,12 @@ func (s *ResourceDataSyncS3Destination) SetBucketName(v string) *ResourceDataSyn return s } +// SetDestinationDataSharing sets the DestinationDataSharing field's value. +func (s *ResourceDataSyncS3Destination) SetDestinationDataSharing(v *ResourceDataSyncDestinationDataSharing) *ResourceDataSyncS3Destination { + s.DestinationDataSharing = v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ResourceDataSyncS3Destination) SetPrefix(v string) *ResourceDataSyncS3Destination { s.Prefix = &v @@ -39564,8 +39814,8 @@ func (s *ResourceDataSyncSourceWithState) SetState(v string) *ResourceDataSyncSo // Error returned if an attempt is made to delete a patch baseline that is registered // for a patch group. type ResourceInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -39582,17 +39832,17 @@ func (s ResourceInUseException) GoString() string { func newErrorResourceInUseException(v protocol.ResponseMetadata) error { return &ResourceInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceInUseException) Code() string { +func (s *ResourceInUseException) Code() string { return "ResourceInUseException" } // Message returns the exception's message. -func (s ResourceInUseException) Message() string { +func (s *ResourceInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39600,33 +39850,33 @@ func (s ResourceInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceInUseException) OrigErr() error { +func (s *ResourceInUseException) OrigErr() error { return nil } -func (s ResourceInUseException) Error() string { +func (s *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceInUseException) RequestID() string { + return s.RespMetadata.RequestID } // Error returned when the caller has exceeded the default resource quotas. // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager -// Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) +// service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. type ResourceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -39643,17 +39893,17 @@ func (s ResourceLimitExceededException) GoString() string { func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceededException) Code() string { +func (s *ResourceLimitExceededException) Code() string { return "ResourceLimitExceededException" } // Message returns the exception's message. -func (s ResourceLimitExceededException) Message() string { +func (s *ResourceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -39661,22 +39911,22 @@ func (s ResourceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceededException) OrigErr() error { +func (s *ResourceLimitExceededException) OrigErr() error { return nil } -func (s ResourceLimitExceededException) Error() string { +func (s *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The inventory item result attribute. @@ -39774,8 +40024,8 @@ type ResumeSessionOutput struct { // // region represents the Region identifier for an AWS Region supported by AWS // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list - // of supported region values, see the Region column in Systems Manager Service - // Endpoints (http://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) + // of supported region values, see the Region column in Systems Manager service + // endpoints (http://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) // in the AWS General Reference. // // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. @@ -39814,19 +40064,19 @@ func (s *ResumeSessionOutput) SetTokenValue(v string) *ResumeSessionOutput { return s } -// An Amazon S3 bucket where you want to store the results of this request. +// An S3 bucket where you want to store the results of this request. type S3OutputLocation struct { _ struct{} `type:"structure"` - // The name of the Amazon S3 bucket. + // The name of the S3 bucket. OutputS3BucketName *string `min:"3" type:"string"` - // The Amazon S3 bucket subfolder. + // The S3 bucket subfolder. OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. + // it. Instead, Systems Manager automatically determines the Region of the S3 + // bucket. OutputS3Region *string `min:"3" type:"string"` } @@ -39874,13 +40124,11 @@ func (s *S3OutputLocation) SetOutputS3Region(v string) *S3OutputLocation { return s } -// A URL for the Amazon S3 bucket where you want to store the results of this -// request. +// A URL for the S3 bucket where you want to store the results of this request. type S3OutputUrl struct { _ struct{} `type:"structure"` - // A URL for an Amazon S3 bucket where you want to store the results of this - // request. + // A URL for an S3 bucket where you want to store the results of this request. OutputUrl *string `type:"string"` } @@ -40083,15 +40331,15 @@ type SendCommandInput struct { // The instance IDs where the command should run. You can specify a maximum // of 50 IDs. If you prefer not to list individual instance IDs, you can instead // send commands to a fleet of instances using the Targets parameter, which - // accepts EC2 tags. For more information about how to use targets, see Sending - // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) + // accepts EC2 tags. For more information about how to use targets, see Using + // targets and rate controls to send commands to a fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the AWS Systems Manager User Guide. InstanceIds []*string `type:"list"` // (Optional) The maximum number of instances that are allowed to run the command // at the same time. You can specify a number such as 10 or a percentage such // as 10%. The default value is 50. For more information about how to use MaxConcurrency, - // see Using Concurrency Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity) + // see Using concurrency controls (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity) // in the AWS Systems Manager User Guide. MaxConcurrency *string `min:"1" type:"string"` @@ -40099,7 +40347,7 @@ type SendCommandInput struct { // command fails one more time beyond the value of MaxErrors, the systems stops // sending the command to additional targets. You can specify a number like // 10 or a percentage like 10%. The default value is 0. For more information - // about how to use MaxErrors, see Using Error Controls (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors) + // about how to use MaxErrors, see Using error controls (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors) // in the AWS Systems Manager User Guide. MaxErrors *string `min:"1" type:"string"` @@ -40114,8 +40362,8 @@ type SendCommandInput struct { OutputS3KeyPrefix *string `type:"string"` // (Deprecated) You can no longer specify this parameter. The system ignores - // it. Instead, Systems Manager automatically determines the Amazon S3 bucket - // region. + // it. Instead, Systems Manager automatically determines the Region of the S3 + // bucket. OutputS3Region *string `min:"3" type:"string"` // The required and optional parameters specified in the document being run. @@ -40128,7 +40376,7 @@ type SendCommandInput struct { // (Optional) An array of search criteria that targets instances using a Key,Value // combination that you specify. Targets is required if you don't provide one // or more instance IDs in the call. For more information about how to use targets, - // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) + // see Sending commands to a fleet (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the AWS Systems Manager User Guide. Targets []*Target `type:"list"` @@ -40413,8 +40661,8 @@ func (s *ServiceSetting) SetStatus(v string) *ServiceSetting { // The specified service setting was not found. Either the service name or the // setting has not been provisioned by the AWS service team. type ServiceSettingNotFound struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -40431,17 +40679,17 @@ func (s ServiceSettingNotFound) GoString() string { func newErrorServiceSettingNotFound(v protocol.ResponseMetadata) error { return &ServiceSettingNotFound{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceSettingNotFound) Code() string { +func (s *ServiceSettingNotFound) Code() string { return "ServiceSettingNotFound" } // Message returns the exception's message. -func (s ServiceSettingNotFound) Message() string { +func (s *ServiceSettingNotFound) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -40449,22 +40697,22 @@ func (s ServiceSettingNotFound) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceSettingNotFound) OrigErr() error { +func (s *ServiceSettingNotFound) OrigErr() error { return nil } -func (s ServiceSettingNotFound) Error() string { +func (s *ServiceSettingNotFound) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceSettingNotFound) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceSettingNotFound) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceSettingNotFound) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceSettingNotFound) RequestID() string { + return s.RespMetadata.RequestID } // Information about a Session Manager connection to an instance. @@ -40866,8 +41114,8 @@ type StartAutomationExecutionInput struct { // A location is a combination of AWS Regions and/or AWS accounts where you // want to run the Automation. Use this action to start an Automation in multiple - // Regions and multiple accounts. For more information, see Executing Automations - // in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) + // Regions and multiple accounts. For more information, see Running Automation + // workflows in multiple AWS Regions and accounts (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) // in the AWS Systems Manager User Guide. TargetLocations []*TargetLocation `min:"1" type:"list"` @@ -41121,8 +41369,8 @@ type StartSessionOutput struct { // // region represents the Region identifier for an AWS Region supported by AWS // Systems Manager, such as us-east-2 for the US East (Ohio) Region. For a list - // of supported region values, see the Region column in Systems Manager Service - // Endpoints (http://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) + // of supported region values, see the Region column in Systems Manager service + // endpoints (http://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region) // in the AWS General Reference. // // session-id represents the ID of a Session Manager session, such as 1a2b3c4dEXAMPLE. @@ -41163,8 +41411,8 @@ func (s *StartSessionOutput) SetTokenValue(v string) *StartSessionOutput { // The updated status is the same as the current status. type StatusUnchanged struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -41181,17 +41429,17 @@ func (s StatusUnchanged) GoString() string { func newErrorStatusUnchanged(v protocol.ResponseMetadata) error { return &StatusUnchanged{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StatusUnchanged) Code() string { +func (s *StatusUnchanged) Code() string { return "StatusUnchanged" } // Message returns the exception's message. -func (s StatusUnchanged) Message() string { +func (s *StatusUnchanged) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -41199,22 +41447,22 @@ func (s StatusUnchanged) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StatusUnchanged) OrigErr() error { +func (s *StatusUnchanged) OrigErr() error { return nil } -func (s StatusUnchanged) Error() string { +func (s *StatusUnchanged) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StatusUnchanged) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StatusUnchanged) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StatusUnchanged) RequestID() string { - return s.respMetadata.RequestID +func (s *StatusUnchanged) RequestID() string { + return s.RespMetadata.RequestID } // Detailed information about an the execution state of an Automation step. @@ -41567,8 +41815,8 @@ func (s StopAutomationExecutionOutput) GoString() string { // The sub-type count exceeded the limit for the inventory type. type SubTypeCountLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -41585,17 +41833,17 @@ func (s SubTypeCountLimitExceededException) GoString() string { func newErrorSubTypeCountLimitExceededException(v protocol.ResponseMetadata) error { return &SubTypeCountLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubTypeCountLimitExceededException) Code() string { +func (s *SubTypeCountLimitExceededException) Code() string { return "SubTypeCountLimitExceededException" } // Message returns the exception's message. -func (s SubTypeCountLimitExceededException) Message() string { +func (s *SubTypeCountLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -41603,22 +41851,22 @@ func (s SubTypeCountLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubTypeCountLimitExceededException) OrigErr() error { +func (s *SubTypeCountLimitExceededException) OrigErr() error { return nil } -func (s SubTypeCountLimitExceededException) Error() string { +func (s *SubTypeCountLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubTypeCountLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubTypeCountLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubTypeCountLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *SubTypeCountLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // Metadata that you assign to your AWS resources. Tags enable you to categorize @@ -41711,16 +41959,15 @@ func (s *Tag) SetValue(v string) *Tag { // group ProductionResourceGroup in your maintenance window. // // * (Maintenance window targets only) Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC -// This example demonstrates how to target only Amazon EC2 instances and -// VPCs in your maintenance window. +// This example demonstrates how to target only EC2 instances and VPCs in +// your maintenance window. // // * (State Manager association targets only) Key=InstanceIds,Values=* This // example demonstrates how to target all managed instances in the AWS Region // where the association was created. // // For information about how to send commands that target instances using Key,Value -// parameters, see Using Targets and Rate Controls to Send Commands to a Fleet -// (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) +// parameters, see Targeting multiple instances (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) // in the AWS Systems Manager User Guide. type Target struct { _ struct{} `type:"structure"` @@ -41731,7 +41978,7 @@ type Target struct { // User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, // you could specify value:WebServer to run a command on instances that include - // Amazon EC2 tags of ServerRole,WebServer. + // EC2 tags of ServerRole,WebServer. Values []*string `type:"list"` } @@ -41773,8 +42020,8 @@ func (s *Target) SetValues(v []*string) *Target { // You specified the Safe option for the DeregisterTargetFromMaintenanceWindow // operation, but the target is still referenced in a task. type TargetInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -41791,17 +42038,17 @@ func (s TargetInUseException) GoString() string { func newErrorTargetInUseException(v protocol.ResponseMetadata) error { return &TargetInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TargetInUseException) Code() string { +func (s *TargetInUseException) Code() string { return "TargetInUseException" } // Message returns the exception's message. -func (s TargetInUseException) Message() string { +func (s *TargetInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -41809,22 +42056,22 @@ func (s TargetInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TargetInUseException) OrigErr() error { +func (s *TargetInUseException) OrigErr() error { return nil } -func (s TargetInUseException) Error() string { +func (s *TargetInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TargetInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TargetInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TargetInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *TargetInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The combination of AWS Regions and accounts targeted by the current Automation @@ -41916,12 +42163,12 @@ func (s *TargetLocation) SetTargetLocationMaxErrors(v string) *TargetLocation { } // The specified target instance for the session is not fully configured for -// use with Session Manager. For more information, see Getting Started with -// Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) +// use with Session Manager. For more information, see Getting started with +// Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the AWS Systems Manager User Guide. type TargetNotConnected struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -41938,17 +42185,17 @@ func (s TargetNotConnected) GoString() string { func newErrorTargetNotConnected(v protocol.ResponseMetadata) error { return &TargetNotConnected{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TargetNotConnected) Code() string { +func (s *TargetNotConnected) Code() string { return "TargetNotConnected" } // Message returns the exception's message. -func (s TargetNotConnected) Message() string { +func (s *TargetNotConnected) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -41956,22 +42203,22 @@ func (s TargetNotConnected) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TargetNotConnected) OrigErr() error { +func (s *TargetNotConnected) OrigErr() error { return nil } -func (s TargetNotConnected) Error() string { +func (s *TargetNotConnected) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TargetNotConnected) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TargetNotConnected) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TargetNotConnected) RequestID() string { - return s.respMetadata.RequestID +func (s *TargetNotConnected) RequestID() string { + return s.RespMetadata.RequestID } type TerminateSessionInput struct { @@ -42041,8 +42288,8 @@ func (s *TerminateSessionOutput) SetSessionId(v string) *TerminateSessionOutput // The Targets parameter includes too many tags. Remove one or more tags and // try the command again. type TooManyTagsError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -42059,17 +42306,17 @@ func (s TooManyTagsError) GoString() string { func newErrorTooManyTagsError(v protocol.ResponseMetadata) error { return &TooManyTagsError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsError) Code() string { +func (s *TooManyTagsError) Code() string { return "TooManyTagsError" } // Message returns the exception's message. -func (s TooManyTagsError) Message() string { +func (s *TooManyTagsError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42077,29 +42324,29 @@ func (s TooManyTagsError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsError) OrigErr() error { +func (s *TooManyTagsError) OrigErr() error { return nil } -func (s TooManyTagsError) Error() string { +func (s *TooManyTagsError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsError) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsError) RequestID() string { + return s.RespMetadata.RequestID } // There are concurrent updates for a resource that supports one update at a // time. type TooManyUpdates struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42116,17 +42363,17 @@ func (s TooManyUpdates) GoString() string { func newErrorTooManyUpdates(v protocol.ResponseMetadata) error { return &TooManyUpdates{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyUpdates) Code() string { +func (s *TooManyUpdates) Code() string { return "TooManyUpdates" } // Message returns the exception's message. -func (s TooManyUpdates) Message() string { +func (s *TooManyUpdates) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42134,28 +42381,28 @@ func (s TooManyUpdates) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyUpdates) OrigErr() error { +func (s *TooManyUpdates) OrigErr() error { return nil } -func (s TooManyUpdates) Error() string { +func (s *TooManyUpdates) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyUpdates) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyUpdates) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyUpdates) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyUpdates) RequestID() string { + return s.RespMetadata.RequestID } // The size of inventory data has exceeded the total size limit for the resource. type TotalSizeLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42172,17 +42419,17 @@ func (s TotalSizeLimitExceededException) GoString() string { func newErrorTotalSizeLimitExceededException(v protocol.ResponseMetadata) error { return &TotalSizeLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TotalSizeLimitExceededException) Code() string { +func (s *TotalSizeLimitExceededException) Code() string { return "TotalSizeLimitExceededException" } // Message returns the exception's message. -func (s TotalSizeLimitExceededException) Message() string { +func (s *TotalSizeLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42190,29 +42437,29 @@ func (s TotalSizeLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TotalSizeLimitExceededException) OrigErr() error { +func (s *TotalSizeLimitExceededException) OrigErr() error { return nil } -func (s TotalSizeLimitExceededException) Error() string { +func (s *TotalSizeLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TotalSizeLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TotalSizeLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TotalSizeLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *TotalSizeLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The calendar entry contained in the specified Systems Manager document is // not supported. type UnsupportedCalendarException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42229,17 +42476,17 @@ func (s UnsupportedCalendarException) GoString() string { func newErrorUnsupportedCalendarException(v protocol.ResponseMetadata) error { return &UnsupportedCalendarException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedCalendarException) Code() string { +func (s *UnsupportedCalendarException) Code() string { return "UnsupportedCalendarException" } // Message returns the exception's message. -func (s UnsupportedCalendarException) Message() string { +func (s *UnsupportedCalendarException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42247,32 +42494,32 @@ func (s UnsupportedCalendarException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedCalendarException) OrigErr() error { +func (s *UnsupportedCalendarException) OrigErr() error { return nil } -func (s UnsupportedCalendarException) Error() string { +func (s *UnsupportedCalendarException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedCalendarException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedCalendarException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedCalendarException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedCalendarException) RequestID() string { + return s.RespMetadata.RequestID } -// Microsoft application patching is only available on EC2 instances and Advanced -// Instances. To patch Microsoft applications on on-premises servers and VMs, -// you must enable Advanced Instances. For more information, see Using the Advanced-Instances -// Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) +// Microsoft application patching is only available on EC2 instances and advanced +// instances. To patch Microsoft applications on on-premises servers and VMs, +// you must enable advanced instances. For more information, see Using the advanced-instances +// tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) // in the AWS Systems Manager User Guide. type UnsupportedFeatureRequiredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42289,17 +42536,17 @@ func (s UnsupportedFeatureRequiredException) GoString() string { func newErrorUnsupportedFeatureRequiredException(v protocol.ResponseMetadata) error { return &UnsupportedFeatureRequiredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedFeatureRequiredException) Code() string { +func (s *UnsupportedFeatureRequiredException) Code() string { return "UnsupportedFeatureRequiredException" } // Message returns the exception's message. -func (s UnsupportedFeatureRequiredException) Message() string { +func (s *UnsupportedFeatureRequiredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42307,30 +42554,30 @@ func (s UnsupportedFeatureRequiredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedFeatureRequiredException) OrigErr() error { +func (s *UnsupportedFeatureRequiredException) OrigErr() error { return nil } -func (s UnsupportedFeatureRequiredException) Error() string { +func (s *UnsupportedFeatureRequiredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedFeatureRequiredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedFeatureRequiredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedFeatureRequiredException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedFeatureRequiredException) RequestID() string { + return s.RespMetadata.RequestID } // The Context attribute that you specified for the InventoryItem is not allowed // for this inventory type. You can only use the Context attribute with inventory // types like AWS:ComplianceItem. type UnsupportedInventoryItemContextException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -42349,17 +42596,17 @@ func (s UnsupportedInventoryItemContextException) GoString() string { func newErrorUnsupportedInventoryItemContextException(v protocol.ResponseMetadata) error { return &UnsupportedInventoryItemContextException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedInventoryItemContextException) Code() string { +func (s *UnsupportedInventoryItemContextException) Code() string { return "UnsupportedInventoryItemContextException" } // Message returns the exception's message. -func (s UnsupportedInventoryItemContextException) Message() string { +func (s *UnsupportedInventoryItemContextException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42367,30 +42614,30 @@ func (s UnsupportedInventoryItemContextException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedInventoryItemContextException) OrigErr() error { +func (s *UnsupportedInventoryItemContextException) OrigErr() error { return nil } -func (s UnsupportedInventoryItemContextException) Error() string { +func (s *UnsupportedInventoryItemContextException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedInventoryItemContextException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedInventoryItemContextException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedInventoryItemContextException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedInventoryItemContextException) RequestID() string { + return s.RespMetadata.RequestID } // Inventory item type schema version has to match supported versions in the // service. Check output of GetInventorySchema to see the available schema version // for each type. type UnsupportedInventorySchemaVersionException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42407,17 +42654,17 @@ func (s UnsupportedInventorySchemaVersionException) GoString() string { func newErrorUnsupportedInventorySchemaVersionException(v protocol.ResponseMetadata) error { return &UnsupportedInventorySchemaVersionException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedInventorySchemaVersionException) Code() string { +func (s *UnsupportedInventorySchemaVersionException) Code() string { return "UnsupportedInventorySchemaVersionException" } // Message returns the exception's message. -func (s UnsupportedInventorySchemaVersionException) Message() string { +func (s *UnsupportedInventorySchemaVersionException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42425,30 +42672,30 @@ func (s UnsupportedInventorySchemaVersionException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedInventorySchemaVersionException) OrigErr() error { +func (s *UnsupportedInventorySchemaVersionException) OrigErr() error { return nil } -func (s UnsupportedInventorySchemaVersionException) Error() string { +func (s *UnsupportedInventorySchemaVersionException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedInventorySchemaVersionException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedInventorySchemaVersionException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedInventorySchemaVersionException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedInventorySchemaVersionException) RequestID() string { + return s.RespMetadata.RequestID } // The operating systems you specified is not supported, or the operation is // not supported for the operating system. Valid operating systems include: // Windows, AmazonLinux, RedhatEnterpriseLinux, and Ubuntu. type UnsupportedOperatingSystem struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42465,17 +42712,17 @@ func (s UnsupportedOperatingSystem) GoString() string { func newErrorUnsupportedOperatingSystem(v protocol.ResponseMetadata) error { return &UnsupportedOperatingSystem{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperatingSystem) Code() string { +func (s *UnsupportedOperatingSystem) Code() string { return "UnsupportedOperatingSystem" } // Message returns the exception's message. -func (s UnsupportedOperatingSystem) Message() string { +func (s *UnsupportedOperatingSystem) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42483,28 +42730,28 @@ func (s UnsupportedOperatingSystem) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperatingSystem) OrigErr() error { +func (s *UnsupportedOperatingSystem) OrigErr() error { return nil } -func (s UnsupportedOperatingSystem) Error() string { +func (s *UnsupportedOperatingSystem) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperatingSystem) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperatingSystem) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperatingSystem) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperatingSystem) RequestID() string { + return s.RespMetadata.RequestID } // The parameter type is not supported. type UnsupportedParameterType struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -42521,17 +42768,17 @@ func (s UnsupportedParameterType) GoString() string { func newErrorUnsupportedParameterType(v protocol.ResponseMetadata) error { return &UnsupportedParameterType{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedParameterType) Code() string { +func (s *UnsupportedParameterType) Code() string { return "UnsupportedParameterType" } // Message returns the exception's message. -func (s UnsupportedParameterType) Message() string { +func (s *UnsupportedParameterType) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42539,29 +42786,29 @@ func (s UnsupportedParameterType) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedParameterType) OrigErr() error { +func (s *UnsupportedParameterType) OrigErr() error { return nil } -func (s UnsupportedParameterType) Error() string { +func (s *UnsupportedParameterType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedParameterType) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedParameterType) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedParameterType) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedParameterType) RequestID() string { + return s.RespMetadata.RequestID } // The document does not support the platform type of the given instance ID(s). // For example, you sent an document for a Windows instance to a Linux instance. type UnsupportedPlatformType struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -42578,17 +42825,17 @@ func (s UnsupportedPlatformType) GoString() string { func newErrorUnsupportedPlatformType(v protocol.ResponseMetadata) error { return &UnsupportedPlatformType{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedPlatformType) Code() string { +func (s *UnsupportedPlatformType) Code() string { return "UnsupportedPlatformType" } // Message returns the exception's message. -func (s UnsupportedPlatformType) Message() string { +func (s *UnsupportedPlatformType) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -42596,22 +42843,22 @@ func (s UnsupportedPlatformType) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedPlatformType) OrigErr() error { +func (s *UnsupportedPlatformType) OrigErr() error { return nil } -func (s UnsupportedPlatformType) Error() string { +func (s *UnsupportedPlatformType) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedPlatformType) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedPlatformType) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedPlatformType) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedPlatformType) RequestID() string { + return s.RespMetadata.RequestID } type UpdateAssociationInput struct { @@ -42686,7 +42933,7 @@ type UpdateAssociationInput struct { // or My-Document. Name *string `type:"string"` - // An Amazon S3 bucket where you want to store the results of this request. + // An S3 bucket where you want to store the results of this request. OutputLocation *InstanceAssociationOutputLocation `type:"structure"` // The parameters you want to update for the association. If you create a parameter @@ -42696,6 +42943,20 @@ type UpdateAssociationInput struct { // The cron expression used to schedule the association that you want to update. ScheduleExpression *string `min:"1" type:"string"` + // The mode for generating association compliance. You can specify AUTO or MANUAL. + // In AUTO mode, the system uses the status of the association execution to + // determine the compliance status. If the association execution runs successfully, + // then the association is COMPLIANT. If the association execution doesn't run + // successfully, the association is NON-COMPLIANT. + // + // In MANUAL mode, you must specify the AssociationId as a parameter for the + // PutComplianceItems API action. In this case, compliance data is not managed + // by State Manager. It is managed by your direct call to the PutComplianceItems + // API action. + // + // By default, all associations use AUTO mode. + SyncCompliance *string `type:"string" enum:"AssociationSyncCompliance"` + // The targets of the association. Targets []*Target `type:"list"` } @@ -42822,6 +43083,12 @@ func (s *UpdateAssociationInput) SetScheduleExpression(v string) *UpdateAssociat return s } +// SetSyncCompliance sets the SyncCompliance field's value. +func (s *UpdateAssociationInput) SetSyncCompliance(v string) *UpdateAssociationInput { + s.SyncCompliance = &v + return s +} + // SetTargets sets the Targets field's value. func (s *UpdateAssociationInput) SetTargets(v []*Target) *UpdateAssociationInput { s.Targets = v @@ -43037,7 +43304,9 @@ type UpdateDocumentInput struct { // supports JSON and YAML documents. JSON is the default format. DocumentFormat *string `type:"string" enum:"DocumentFormat"` - // (Required) The version of the document that you want to update. + // (Required) The latest version of the document that you want to update. The + // latest document version can be specified using the $LATEST variable or by + // the version number. Updating a previous version of a document is not supported. DocumentVersion *string `type:"string"` // The name of the document that you want to update. @@ -43679,10 +43948,10 @@ type UpdateMaintenanceWindowTaskInput struct { // For more information, see the following topics in the in the AWS Systems // Manager User Guide: // - // * Service-Linked Role Permissions for Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) + // * Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) // - // * Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance - // Window Tasks? (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) + // * Should I use a service-linked role or a custom service role to run maintenance + // window tasks? (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) ServiceRoleArn *string `type:"string"` // The targets (either instances or tags) to modify. Instances are specified @@ -44117,7 +44386,7 @@ type UpdateOpsItemInput struct { // Use the /aws/resources key in OperationalData to specify a related resource // in the request. Use the /aws/automations key in OperationalData to associate // an Automation runbook with the OpsItem. To view AWS CLI example commands - // that use these keys, see Creating OpsItems Manually (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) + // that use these keys, see Creating OpsItems manually (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-creating-OpsItems.html#OpsCenter-manually-create-OpsItems) // in the AWS Systems Manager User Guide. OperationalData map[string]*OpsItemDataValue `type:"map"` @@ -44141,7 +44410,7 @@ type UpdateOpsItemInput struct { Severity *string `min:"1" type:"string"` // The OpsItem status. Status can be Open, In Progress, or Resolved. For more - // information, see Editing OpsItem Details (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html) + // information, see Editing OpsItem details (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems.html#OpsCenter-working-with-OpsItems-editing-details) // in the AWS Systems Manager User Guide. Status *string `type:"string" enum:"OpsItemStatus"` @@ -44287,8 +44556,8 @@ type UpdatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // rejected patches, see About package name formats for approved and rejected + // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` @@ -44317,8 +44586,8 @@ type UpdatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see Package Name Formats for Approved and Rejected Patch - // Lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // rejected patches, see About package name formats for approved and rejected + // patch lists (https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` @@ -44630,10 +44899,7 @@ type UpdateResourceDataSyncInput struct { // SyncSource is a required field SyncSource *ResourceDataSyncSource `type:"structure" required:"true"` - // The type of resource data sync. If SyncType is SyncToDestination, then the - // resource data sync synchronizes data to an Amazon S3 bucket. If the SyncType - // is SyncFromSource then the resource data sync synchronizes data from AWS - // Organizations or from multiple AWS Regions. + // The type of resource data sync. The supported SyncType is SyncFromSource. // // SyncType is a required field SyncType *string `min:"1" type:"string" required:"true"` @@ -44715,12 +44981,30 @@ func (s UpdateResourceDataSyncOutput) GoString() string { type UpdateServiceSettingInput struct { _ struct{} `type:"structure"` - // The ID of the service setting to update. + // The Amazon Resource Name (ARN) of the service setting to reset. For example, + // arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled. + // The setting ID can be one of the following. + // + // * /ssm/parameter-store/default-parameter-tier + // + // * /ssm/parameter-store/high-throughput-enabled + // + // * /ssm/managed-instance/activation-tier // // SettingId is a required field SettingId *string `min:"1" type:"string" required:"true"` - // The new value to specify for the service setting. + // The new value to specify for the service setting. For the /ssm/parameter-store/default-parameter-tier + // setting ID, the setting value can be one of the following. + // + // * Standard + // + // * Advanced + // + // * Intelligent-Tiering + // + // For the /ssm/parameter-store/high-throughput-enabled, and /ssm/managed-instance/activation-tier + // setting IDs, the setting value can be true or false. // // SettingValue is a required field SettingValue *string `min:"1" type:"string" required:"true"` @@ -44845,6 +45129,9 @@ const ( // AssociationFilterKeyAssociationName is a AssociationFilterKey enum value AssociationFilterKeyAssociationName = "AssociationName" + + // AssociationFilterKeyResourceGroupName is a AssociationFilterKey enum value + AssociationFilterKeyResourceGroupName = "ResourceGroupName" ) const ( @@ -44869,6 +45156,14 @@ const ( AssociationStatusNameFailed = "Failed" ) +const ( + // AssociationSyncComplianceAuto is a AssociationSyncCompliance enum value + AssociationSyncComplianceAuto = "AUTO" + + // AssociationSyncComplianceManual is a AssociationSyncCompliance enum value + AssociationSyncComplianceManual = "MANUAL" +) + const ( // AttachmentHashTypeSha256 is a AttachmentHashType enum value AttachmentHashTypeSha256 = "Sha256" @@ -45087,6 +45382,14 @@ const ( ComplianceStatusNonCompliant = "NON_COMPLIANT" ) +const ( + // ComplianceUploadTypeComplete is a ComplianceUploadType enum value + ComplianceUploadTypeComplete = "COMPLETE" + + // ComplianceUploadTypePartial is a ComplianceUploadType enum value + ComplianceUploadTypePartial = "PARTIAL" +) + const ( // ConnectionStatusConnected is a ConnectionStatus enum value ConnectionStatusConnected = "Connected" @@ -45410,6 +45713,12 @@ const ( // OperatingSystemCentos is a OperatingSystem enum value OperatingSystemCentos = "CENTOS" + + // OperatingSystemOracleLinux is a OperatingSystem enum value + OperatingSystemOracleLinux = "ORACLE_LINUX" + + // OperatingSystemDebian is a OperatingSystem enum value + OperatingSystemDebian = "DEBIAN" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go index 48d6d3ee3e3..2fe2457ca9b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go @@ -8,19 +8,20 @@ // system (OS) patches, automating the creation of Amazon Machine Images (AMIs), // and configuring operating systems (OSs) and applications at scale. Systems // Manager lets you remotely and securely manage the configuration of your managed -// instances. A managed instance is any Amazon EC2 instance or on-premises machine -// in your hybrid environment that has been configured for Systems Manager. +// instances. A managed instance is any Amazon Elastic Compute Cloud instance +// (EC2 instance), or any on-premises server or virtual machine (VM) in your +// hybrid environment that has been configured for Systems Manager. // // This reference is intended to be used with the AWS Systems Manager User Guide -// (http://docs.aws.amazon.com/systems-manager/latest/userguide/). +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/). // // To get started, verify prerequisites and configure managed instances. For -// more information, see Setting Up AWS Systems Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html) +// more information, see Setting up AWS Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html) // in the AWS Systems Manager User Guide. // -// For information about other API actions you can perform on Amazon EC2 instances, -// see the Amazon EC2 API Reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/). -// For information about how to use a Query API, see Making API Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/making-api-requests.html). +// For information about other API actions you can perform on EC2 instances, +// see the Amazon EC2 API Reference (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/). +// For information about how to use a Query API, see Making API requests (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/making-api-requests.html). // // See https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index 8e3eb9ba34d..884d925542f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -134,7 +134,7 @@ const ( // window or Patch baseline, doesn't exist. // // For information about resource quotas in Systems Manager, see Systems Manager - // Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) + // service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. ErrCodeDoesNotExistException = "DoesNotExistException" @@ -169,7 +169,7 @@ const ( // "HierarchyLevelLimitExceededException". // // A hierarchy can have a maximum of 15 levels. For more information, see Requirements - // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) + // and constraints for parameter names (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException" @@ -489,7 +489,7 @@ const ( // The role name can't contain invalid characters. Also verify that you specified // an IAM role for notifications that includes the required trust policy. For // information about configuring the IAM role for Run Command notifications, - // see Configuring Amazon SNS Notifications for Run Command (http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) + // see Configuring Amazon SNS Notifications for Run Command (https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html) // in the AWS Systems Manager User Guide. ErrCodeInvalidRole = "InvalidRole" @@ -503,7 +503,7 @@ const ( // "InvalidTarget". // // The target is not valid or does not exist. It might not be configured for - // EC2 Systems Manager or you might not have permission to perform the operation. + // Systems Manager or you might not have permission to perform the operation. ErrCodeInvalidTarget = "InvalidTarget" // ErrCodeInvalidTypeNameException for service response error code @@ -560,7 +560,7 @@ const ( // "OpsItemLimitExceededException". // // The request caused OpsItems to exceed one or more quotas. For information - // about OpsItem quotas, see What are the resource limits for OpsCenter? (http://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). + // about OpsItem quotas, see What are the resource limits for OpsCenter? (https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-learn-more.html#OpsCenter-learn-more-limits). ErrCodeOpsItemLimitExceededException = "OpsItemLimitExceededException" // ErrCodeOpsItemNotFoundException for service response error code @@ -665,7 +665,7 @@ const ( // For example, too many maintenance windows or patch baselines have been created. // // For information about resource quotas in Systems Manager, see Systems Manager - // Service Quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) + // service quotas (http://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm) // in the AWS General Reference. ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" @@ -699,8 +699,8 @@ const ( // "TargetNotConnected". // // The specified target instance for the session is not fully configured for - // use with Session Manager. For more information, see Getting Started with - // Session Manager (http://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) + // use with Session Manager. For more information, see Getting started with + // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the AWS Systems Manager User Guide. ErrCodeTargetNotConnected = "TargetNotConnected" @@ -734,10 +734,10 @@ const ( // ErrCodeUnsupportedFeatureRequiredException for service response error code // "UnsupportedFeatureRequiredException". // - // Microsoft application patching is only available on EC2 instances and Advanced - // Instances. To patch Microsoft applications on on-premises servers and VMs, - // you must enable Advanced Instances. For more information, see Using the Advanced-Instances - // Tier (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) + // Microsoft application patching is only available on EC2 instances and advanced + // instances. To patch Microsoft applications on on-premises servers and VMs, + // you must enable advanced instances. For more information, see Using the advanced-instances + // tier (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances-advanced.html) // in the AWS Systems Manager User Guide. ErrCodeUnsupportedFeatureRequiredException = "UnsupportedFeatureRequiredException" diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go index 43fe01b36fe..b05c45073b4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -523,8 +523,8 @@ func (c *StorageGateway) AssignTapePoolRequest(input *AssignTapePoolInput) (req // Assigns a tape to a tape pool for archiving. The tape assigned to a pool // is archived in the S3 storage class that is associated with the pool. When // you use your backup application to eject the tape, the tape is archived directly -// into the S3 storage class (Glacier or Deep Archive) that corresponds to the -// pool. +// into the S3 storage class (S3 Glacier or S3 Glacier Deep Archive) that corresponds +// to the pool. // // Valid values: "GLACIER", "DEEP_ARCHIVE" // @@ -972,11 +972,11 @@ func (c *StorageGateway) CreateNFSFileShareRequest(input *CreateNFSFileShareInpu // // Creates a Network File System (NFS) file share on an existing file gateway. // In Storage Gateway, a file share is a file system mount point backed by Amazon -// S3 cloud storage. Storage Gateway exposes file shares using a NFS interface. +// S3 cloud storage. Storage Gateway exposes file shares using an NFS interface. // This operation is only supported for file gateways. // // File gateway requires AWS Security Token Service (AWS STS) to be activated -// to enable you create a file share. Make sure AWS STS is activated in the +// to enable you to create a file share. Make sure AWS STS is activated in the // AWS Region you are creating your file gateway in. If AWS STS is not activated // in the AWS Region, activate it. For information about how to activate AWS // STS, see Activating and Deactivating AWS STS in an AWS Region in the AWS @@ -1068,7 +1068,7 @@ func (c *StorageGateway) CreateSMBFileShareRequest(input *CreateSMBFileShareInpu // // Creates a Server Message Block (SMB) file share on an existing file gateway. // In Storage Gateway, a file share is a file system mount point backed by Amazon -// S3 cloud storage. Storage Gateway expose file shares using a SMB interface. +// S3 cloud storage. Storage Gateway expose file shares using an SMB interface. // This operation is only supported for file gateways. // // File gateways require AWS Security Token Service (AWS STS) to be activated @@ -1165,11 +1165,12 @@ func (c *StorageGateway) CreateSnapshotRequest(input *CreateSnapshotInput) (req // Initiates a snapshot of a volume. // // AWS Storage Gateway provides the ability to back up point-in-time snapshots -// of your data to Amazon Simple Storage (S3) for durable off-site recovery, -// as well as import the data to an Amazon Elastic Block Store (EBS) volume -// in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your gateway -// volume on a scheduled or ad hoc basis. This API enables you to take ad-hoc -// snapshot. For more information, see Editing a Snapshot Schedule (https://docs.aws.amazon.com/storagegateway/latest/userguide/managing-volumes.html#SchedulingSnapshot). +// of your data to Amazon Simple Storage Service (Amazon S3) for durable off-site +// recovery, as well as import the data to an Amazon Elastic Block Store (EBS) +// volume in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your +// gateway volume on a scheduled or ad hoc basis. This API enables you to take +// an ad hoc snapshot. For more information, see Editing a Snapshot Schedule +// (https://docs.aws.amazon.com/storagegateway/latest/userguide/managing-volumes.html#SchedulingSnapshot). // // In the CreateSnapshot request you identify the volume by providing its Amazon // Resource Name (ARN). You must also provide description for the snapshot. @@ -1474,9 +1475,9 @@ func (c *StorageGateway) CreateTapeWithBarcodeRequest(input *CreateTapeWithBarco // CreateTapeWithBarcode API operation for AWS Storage Gateway. // // Creates a virtual tape by using your own barcode. You write data to the virtual -// tape and then archive the tape. A barcode is unique and can not be reused -// if it has already been used on a tape . This applies to barcodes used on -// deleted tapes. This operation is only supported in the tape gateway type. +// tape and then archive the tape. A barcode is unique and cannot be reused +// if it has already been used on a tape. This applies to barcodes used on deleted +// tapes. This operation is only supported in the tape gateway type. // // Cache storage must be allocated to the gateway before you can create a virtual // tape. Use the AddCache operation to add cache storage to a gateway. @@ -1608,6 +1609,92 @@ func (c *StorageGateway) CreateTapesWithContext(ctx aws.Context, input *CreateTa return out, req.Send() } +const opDeleteAutomaticTapeCreationPolicy = "DeleteAutomaticTapeCreationPolicy" + +// DeleteAutomaticTapeCreationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAutomaticTapeCreationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAutomaticTapeCreationPolicy for more information on using the DeleteAutomaticTapeCreationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAutomaticTapeCreationPolicyRequest method. +// req, resp := client.DeleteAutomaticTapeCreationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteAutomaticTapeCreationPolicy +func (c *StorageGateway) DeleteAutomaticTapeCreationPolicyRequest(input *DeleteAutomaticTapeCreationPolicyInput) (req *request.Request, output *DeleteAutomaticTapeCreationPolicyOutput) { + op := &request.Operation{ + Name: opDeleteAutomaticTapeCreationPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAutomaticTapeCreationPolicyInput{} + } + + output = &DeleteAutomaticTapeCreationPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteAutomaticTapeCreationPolicy API operation for AWS Storage Gateway. +// +// Deletes the automatic tape creation policy of a gateway. If you delete this +// policy, new virtual tapes must be created manually. Use the Amazon Resource +// Name (ARN) of the gateway in your request to remove the policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteAutomaticTapeCreationPolicy for usage and error information. +// +// Returned Error Types: +// * InvalidGatewayRequestException +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * InternalServerError +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteAutomaticTapeCreationPolicy +func (c *StorageGateway) DeleteAutomaticTapeCreationPolicy(input *DeleteAutomaticTapeCreationPolicyInput) (*DeleteAutomaticTapeCreationPolicyOutput, error) { + req, out := c.DeleteAutomaticTapeCreationPolicyRequest(input) + return out, req.Send() +} + +// DeleteAutomaticTapeCreationPolicyWithContext is the same as DeleteAutomaticTapeCreationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAutomaticTapeCreationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteAutomaticTapeCreationPolicyWithContext(ctx aws.Context, input *DeleteAutomaticTapeCreationPolicyInput, opts ...request.Option) (*DeleteAutomaticTapeCreationPolicyOutput, error) { + req, out := c.DeleteAutomaticTapeCreationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteBandwidthRateLimit = "DeleteBandwidthRateLimit" // DeleteBandwidthRateLimitRequest generates a "aws/request.Request" representing the @@ -2020,8 +2107,9 @@ func (c *StorageGateway) DeleteSnapshotScheduleRequest(input *DeleteSnapshotSche // its Amazon Resource Name (ARN). This operation is only supported in stored // and cached volume gateway types. // -// To list or delete a snapshot, you must use the Amazon EC2 API. in Amazon -// Elastic Compute Cloud API Reference. +// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, +// go to DescribeSnapshots (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSnapshots.html) +// in the Amazon Elastic Compute Cloud API Reference. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2551,7 +2639,7 @@ func (c *StorageGateway) DescribeCacheRequest(input *DescribeCacheInput) (req *r // DescribeCache API operation for AWS Storage Gateway. // // Returns information about the cache of a gateway. This operation is only -// supported in the cached volume, tape and file gateway types. +// supported in the cached volume, tape, and file gateway types. // // The response includes disk IDs that are configured as cache, and it includes // the amount of cache allocated and used. @@ -2642,7 +2730,7 @@ func (c *StorageGateway) DescribeCachediSCSIVolumesRequest(input *DescribeCached // operation is only supported in the cached volume gateway types. // // The list of gateway volumes in the request must be from one gateway. In the -// response Amazon Storage Gateway returns volume information sorted by volume +// response, AWS Storage Gateway returns volume information sorted by volume // Amazon Resource Name (ARN). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3329,7 +3417,7 @@ func (c *StorageGateway) DescribeStorediSCSIVolumesRequest(input *DescribeStored // // Returns the description of the gateway volumes specified in the request. // The list of gateway volumes in the request must be from one gateway. In the -// response Amazon Storage Gateway returns volume information sorted by volume +// response AWS Storage Gateway returns volume information sorted by volume // ARNs. This operation is only supported in stored volume gateway type. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4274,7 +4362,7 @@ func (c *StorageGateway) DisableGatewayRequest(input *DisableGatewayInput) (req // Use this operation for a tape gateway that is not reachable or not functioning. // This operation is only supported in the tape gateway type. // -// Once a gateway is disabled it cannot be enabled. +// After a gateway is disabled, it cannot be enabled. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4399,6 +4487,93 @@ func (c *StorageGateway) JoinDomainWithContext(ctx aws.Context, input *JoinDomai return out, req.Send() } +const opListAutomaticTapeCreationPolicies = "ListAutomaticTapeCreationPolicies" + +// ListAutomaticTapeCreationPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the ListAutomaticTapeCreationPolicies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAutomaticTapeCreationPolicies for more information on using the ListAutomaticTapeCreationPolicies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAutomaticTapeCreationPoliciesRequest method. +// req, resp := client.ListAutomaticTapeCreationPoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListAutomaticTapeCreationPolicies +func (c *StorageGateway) ListAutomaticTapeCreationPoliciesRequest(input *ListAutomaticTapeCreationPoliciesInput) (req *request.Request, output *ListAutomaticTapeCreationPoliciesOutput) { + op := &request.Operation{ + Name: opListAutomaticTapeCreationPolicies, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAutomaticTapeCreationPoliciesInput{} + } + + output = &ListAutomaticTapeCreationPoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAutomaticTapeCreationPolicies API operation for AWS Storage Gateway. +// +// Lists the automatic tape creation policies for a gateway. If there are no +// automatic tape creation policies for the gateway, it returns an empty list. +// +// This operation is only supported for tape gateways. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListAutomaticTapeCreationPolicies for usage and error information. +// +// Returned Error Types: +// * InvalidGatewayRequestException +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * InternalServerError +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListAutomaticTapeCreationPolicies +func (c *StorageGateway) ListAutomaticTapeCreationPolicies(input *ListAutomaticTapeCreationPoliciesInput) (*ListAutomaticTapeCreationPoliciesOutput, error) { + req, out := c.ListAutomaticTapeCreationPoliciesRequest(input) + return out, req.Send() +} + +// ListAutomaticTapeCreationPoliciesWithContext is the same as ListAutomaticTapeCreationPolicies with the addition of +// the ability to pass a context and additional request options. +// +// See ListAutomaticTapeCreationPolicies for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListAutomaticTapeCreationPoliciesWithContext(ctx aws.Context, input *ListAutomaticTapeCreationPoliciesInput, opts ...request.Option) (*ListAutomaticTapeCreationPoliciesOutput, error) { + req, out := c.ListAutomaticTapeCreationPoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListFileShares = "ListFileShares" // ListFileSharesRequest generates a "aws/request.Request" representing the @@ -5746,12 +5921,12 @@ func (c *StorageGateway) ResetCacheRequest(input *ResetCacheInput) (req *request // ResetCache API operation for AWS Storage Gateway. // -// Resets all cache disks that have encountered a error and makes the disks +// Resets all cache disks that have encountered an error and makes the disks // available for reconfiguration as cache storage. If your cache disk encounters -// a error, the gateway prevents read and write operations on virtual tapes +// an error, the gateway prevents read and write operations on virtual tapes // in the gateway. For example, an error can occur when a disk is corrupted // or removed from the gateway. When a cache is reset, the gateway loses its -// cache storage. At this point you can reconfigure the disks as cache disks. +// cache storage. At this point, you can reconfigure the disks as cache disks. // This operation is only supported in the cached volume and tape types. // // If the cache disk you are resetting contains data that has not been uploaded @@ -6209,7 +6384,7 @@ func (c *StorageGateway) ShutdownGatewayRequest(input *ShutdownGatewayInput) (re // the gateway component in the VM to avoid unpredictable conditions. // // After the gateway is shutdown, you cannot call any other API except StartGateway, -// DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. +// DescribeGatewayInformation and ListGateways. For more information, see ActivateGateway. // Your applications cannot read from or write to the gateway's storage volumes, // and there are no snapshots taken. // @@ -6444,6 +6619,96 @@ func (c *StorageGateway) StartGatewayWithContext(ctx aws.Context, input *StartGa return out, req.Send() } +const opUpdateAutomaticTapeCreationPolicy = "UpdateAutomaticTapeCreationPolicy" + +// UpdateAutomaticTapeCreationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAutomaticTapeCreationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAutomaticTapeCreationPolicy for more information on using the UpdateAutomaticTapeCreationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAutomaticTapeCreationPolicyRequest method. +// req, resp := client.UpdateAutomaticTapeCreationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateAutomaticTapeCreationPolicy +func (c *StorageGateway) UpdateAutomaticTapeCreationPolicyRequest(input *UpdateAutomaticTapeCreationPolicyInput) (req *request.Request, output *UpdateAutomaticTapeCreationPolicyOutput) { + op := &request.Operation{ + Name: opUpdateAutomaticTapeCreationPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAutomaticTapeCreationPolicyInput{} + } + + output = &UpdateAutomaticTapeCreationPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAutomaticTapeCreationPolicy API operation for AWS Storage Gateway. +// +// Updates the automatic tape creation policy of a gateway. Use this to update +// the policy with a new set of automatic tape creation rules. This is only +// supported for tape gateways. +// +// By default, there is no automatic tape creation policy. +// +// A gateway can have only one automatic tape creation policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateAutomaticTapeCreationPolicy for usage and error information. +// +// Returned Error Types: +// * InvalidGatewayRequestException +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * InternalServerError +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateAutomaticTapeCreationPolicy +func (c *StorageGateway) UpdateAutomaticTapeCreationPolicy(input *UpdateAutomaticTapeCreationPolicyInput) (*UpdateAutomaticTapeCreationPolicyOutput, error) { + req, out := c.UpdateAutomaticTapeCreationPolicyRequest(input) + return out, req.Send() +} + +// UpdateAutomaticTapeCreationPolicyWithContext is the same as UpdateAutomaticTapeCreationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAutomaticTapeCreationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateAutomaticTapeCreationPolicyWithContext(ctx aws.Context, input *UpdateAutomaticTapeCreationPolicyInput, opts ...request.Option) (*UpdateAutomaticTapeCreationPolicyOutput, error) { + req, out := c.UpdateAutomaticTapeCreationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateBandwidthRateLimit = "UpdateBandwidthRateLimit" // UpdateBandwidthRateLimitRequest generates a "aws/request.Request" representing the @@ -7606,7 +7871,7 @@ type AddCacheInput struct { _ struct{} `type:"structure"` // An array of strings that identify disks that are to be configured as working - // storage. Each string have a minimum length of 1 and maximum length of 300. + // storage. Each string has a minimum length of 1 and maximum length of 300. // You can get the disk IDs from the ListLocalDisks API. // // DiskIds is a required field @@ -7784,7 +8049,7 @@ type AddUploadBufferInput struct { _ struct{} `type:"structure"` // An array of strings that identify disks that are to be configured as working - // storage. Each string have a minimum length of 1 and maximum length of 300. + // storage. Each string has a minimum length of 1 and maximum length of 300. // You can get the disk IDs from the ListLocalDisks API. // // DiskIds is a required field @@ -7869,7 +8134,7 @@ type AddWorkingStorageInput struct { _ struct{} `type:"structure"` // An array of strings that identify disks that are to be configured as working - // storage. Each string have a minimum length of 1 and maximum length of 300. + // storage. Each string has a minimum length of 1 and maximum length of 300. // You can get the disk IDs from the ListLocalDisks API. // // DiskIds is a required field @@ -7923,8 +8188,8 @@ func (s *AddWorkingStorageInput) SetGatewayARN(v string) *AddWorkingStorageInput return s } -// A JSON object containing the of the gateway for which working storage was -// configured. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway for +// which working storage was configured. type AddWorkingStorageOutput struct { _ struct{} `type:"structure"` @@ -7955,8 +8220,8 @@ type AssignTapePoolInput struct { // The ID of the pool that you want to add your tape to for archiving. The tape // in this pool is archived in the S3 storage class that is associated with // the pool. When you use your backup application to eject the tape, the tape - // is archived directly into the storage class (Glacier or Deep Archive) that - // corresponds to the pool. + // is archived directly into the storage class (S3 Glacier or S3 Glacier Deep + // Archive) that corresponds to the pool. // // Valid values: "GLACIER", "DEEP_ARCHIVE" // @@ -8182,6 +8447,147 @@ func (s *AttachVolumeOutput) SetVolumeARN(v string) *AttachVolumeOutput { return s } +// Information about the gateway's automatic tape creation policies, including +// the automatic tape creation rules and the gateway that is using the policies. +type AutomaticTapeCreationPolicyInfo struct { + _ struct{} `type:"structure"` + + // An automatic tape creation policy consists of a list of automatic tape creation + // rules. This returns the rules that determine when and how to automatically + // create new tapes. + AutomaticTapeCreationRules []*AutomaticTapeCreationRule `min:"1" type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and AWS Region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AutomaticTapeCreationPolicyInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutomaticTapeCreationPolicyInfo) GoString() string { + return s.String() +} + +// SetAutomaticTapeCreationRules sets the AutomaticTapeCreationRules field's value. +func (s *AutomaticTapeCreationPolicyInfo) SetAutomaticTapeCreationRules(v []*AutomaticTapeCreationRule) *AutomaticTapeCreationPolicyInfo { + s.AutomaticTapeCreationRules = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AutomaticTapeCreationPolicyInfo) SetGatewayARN(v string) *AutomaticTapeCreationPolicyInfo { + s.GatewayARN = &v + return s +} + +// An automatic tape creation policy consists of automatic tape creation rules +// where each rule defines when and how to create new tapes. +type AutomaticTapeCreationRule struct { + _ struct{} `type:"structure"` + + // The minimum number of available virtual tapes that the gateway maintains + // at all times. If the number of tapes on the gateway goes below this value, + // the gateway creates as many new tapes as are needed to have MinimumNumTapes + // on the gateway. + // + // MinimumNumTapes is a required field + MinimumNumTapes *int64 `min:"1" type:"integer" required:"true"` + + // The ID of the pool that you want to add your tape to for archiving. The tape + // in this pool is archived in the Amazon S3 storage class that is associated + // with the pool. When you use your backup application to eject the tape, the + // tape is archived directly into the storage class (S3 Glacier or S3 Glacier + // Deep Archive) that corresponds to the pool. + // + // Valid values: "GLACIER", "DEEP_ARCHIVE" + // + // PoolId is a required field + PoolId *string `min:"1" type:"string" required:"true"` + + // A prefix that you append to the barcode of the virtual tape that you are + // creating. This prefix makes the barcode unique. + // + // The prefix must be 1-4 characters in length and must be one of the uppercase + // letters from A to Z. + // + // TapeBarcodePrefix is a required field + TapeBarcodePrefix *string `min:"1" type:"string" required:"true"` + + // The size, in bytes, of the virtual tape capacity. + // + // TapeSizeInBytes is a required field + TapeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s AutomaticTapeCreationRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutomaticTapeCreationRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AutomaticTapeCreationRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AutomaticTapeCreationRule"} + if s.MinimumNumTapes == nil { + invalidParams.Add(request.NewErrParamRequired("MinimumNumTapes")) + } + if s.MinimumNumTapes != nil && *s.MinimumNumTapes < 1 { + invalidParams.Add(request.NewErrParamMinValue("MinimumNumTapes", 1)) + } + if s.PoolId == nil { + invalidParams.Add(request.NewErrParamRequired("PoolId")) + } + if s.PoolId != nil && len(*s.PoolId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PoolId", 1)) + } + if s.TapeBarcodePrefix == nil { + invalidParams.Add(request.NewErrParamRequired("TapeBarcodePrefix")) + } + if s.TapeBarcodePrefix != nil && len(*s.TapeBarcodePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TapeBarcodePrefix", 1)) + } + if s.TapeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMinimumNumTapes sets the MinimumNumTapes field's value. +func (s *AutomaticTapeCreationRule) SetMinimumNumTapes(v int64) *AutomaticTapeCreationRule { + s.MinimumNumTapes = &v + return s +} + +// SetPoolId sets the PoolId field's value. +func (s *AutomaticTapeCreationRule) SetPoolId(v string) *AutomaticTapeCreationRule { + s.PoolId = &v + return s +} + +// SetTapeBarcodePrefix sets the TapeBarcodePrefix field's value. +func (s *AutomaticTapeCreationRule) SetTapeBarcodePrefix(v string) *AutomaticTapeCreationRule { + s.TapeBarcodePrefix = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *AutomaticTapeCreationRule) SetTapeSizeInBytes(v int64) *AutomaticTapeCreationRule { + s.TapeSizeInBytes = &v + return s +} + // Describes an iSCSI cached volume. type CachediSCSIVolume struct { _ struct{} `type:"structure"` @@ -8190,8 +8596,8 @@ type CachediSCSIVolume struct { // don’t have this time stamp. CreatedDate *time.Time `type:"timestamp"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // If the cached volume was created from a snapshot, this field contains the @@ -8580,12 +8986,12 @@ type CreateCachediSCSIVolumeInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The network interface of the gateway on which to expose the iSCSI target. @@ -8819,11 +9225,11 @@ type CreateNFSFileShareInput struct { // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) AWS KMS key used for Amazon S3 server side + // The Amazon Resource Name (ARN) AWS KMS key used for Amazon S3 server-side // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` @@ -9075,6 +9481,9 @@ type CreateSMBFileShareInput struct { // they like on the file share, regardless of file permissions. AdminUserList []*string `type:"list"` + // The Amazon Resource Name (ARN) of the storage used for the audit logs. + AuditDestinationARN *string `type:"string"` + // The authentication method that users use to access the file share. // // Valid values are ActiveDirectory or GuestAccess. The default is ActiveDirectory. @@ -9091,8 +9500,7 @@ type CreateSMBFileShareInput struct { // If this field is not populated, the default value S3_STANDARD is used. Optional. DefaultStorageClass *string `min:"5" type:"string"` - // The Amazon Resource Name (ARN) of the file gateway on which you want to create - // a file share. + // The ARN of the file gateway on which you want to create a file share. // // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` @@ -9104,15 +9512,15 @@ type CreateSMBFileShareInput struct { // A list of users or groups in the Active Directory that are not allowed to // access the file share. A group must be prefixed with the @ character. For - // example @group1. Can only be set if Authentication is set to ActiveDirectory. + // example, @group1. Can only be set if Authentication is set to ActiveDirectory. InvalidUserList []*string `type:"list"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The ARN of the backed storage used for storing file data. @@ -9236,6 +9644,12 @@ func (s *CreateSMBFileShareInput) SetAdminUserList(v []*string) *CreateSMBFileSh return s } +// SetAuditDestinationARN sets the AuditDestinationARN field's value. +func (s *CreateSMBFileShareInput) SetAuditDestinationARN(v string) *CreateSMBFileShareInput { + s.AuditDestinationARN = &v + return s +} + // SetAuthentication sets the Authentication field's value. func (s *CreateSMBFileShareInput) SetAuthentication(v string) *CreateSMBFileShareInput { s.Authentication = &v @@ -9637,11 +10051,11 @@ type CreateStorediSCSIVolumeInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server-side // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` @@ -9855,19 +10269,19 @@ type CreateTapeWithBarcodeInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS Key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The ID of the pool that you want to add your tape to for archiving. The tape // in this pool is archived in the S3 storage class that is associated with // the pool. When you use your backup application to eject the tape, the tape - // is archived directly into the storage class (Glacier or Deep Archive) that - // corresponds to the pool. + // is archived directly into the storage class (S3 Glacier or S3 Glacier Deep + // Archive) that corresponds to the pool. // // Valid values: "GLACIER", "DEEP_ARCHIVE" PoolId *string `min:"1" type:"string"` @@ -9891,7 +10305,7 @@ type CreateTapeWithBarcodeInput struct { // The size, in bytes, of the virtual tape that you want to create. // - // The size must be aligned by gigabyte (1024*1024*1024 byte). + // The size must be aligned by gigabyte (1024*1024*1024 bytes). // // TapeSizeInBytes is a required field TapeSizeInBytes *int64 `type:"long" required:"true"` @@ -10034,12 +10448,12 @@ type CreateTapesInput struct { // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The number of virtual tapes that you want to create. @@ -10050,8 +10464,8 @@ type CreateTapesInput struct { // The ID of the pool that you want to add your tape to for archiving. The tape // in this pool is archived in the S3 storage class that is associated with // the pool. When you use your backup application to eject the tape, the tape - // is archived directly into the storage class (Glacier or Deep Archive) that - // corresponds to the pool. + // is archived directly into the storage class (S3 Glacier or S3 Glacier Deep + // Archive) that corresponds to the pool. // // Valid values: "GLACIER", "DEEP_ARCHIVE" PoolId *string `min:"1" type:"string"` @@ -10076,7 +10490,7 @@ type CreateTapesInput struct { // The size, in bytes, of the virtual tapes that you want to create. // - // The size must be aligned by gigabyte (1024*1024*1024 byte). + // The size must be aligned by gigabyte (1024*1024*1024 bytes). // // TapeSizeInBytes is a required field TapeSizeInBytes *int64 `type:"long" required:"true"` @@ -10224,6 +10638,72 @@ func (s *CreateTapesOutput) SetTapeARNs(v []*string) *CreateTapesOutput { return s } +type DeleteAutomaticTapeCreationPolicyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and AWS Region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAutomaticTapeCreationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAutomaticTapeCreationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAutomaticTapeCreationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAutomaticTapeCreationPolicyInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteAutomaticTapeCreationPolicyInput) SetGatewayARN(v string) *DeleteAutomaticTapeCreationPolicyInput { + s.GatewayARN = &v + return s +} + +type DeleteAutomaticTapeCreationPolicyOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and AWS Region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteAutomaticTapeCreationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAutomaticTapeCreationPolicyOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteAutomaticTapeCreationPolicyOutput) SetGatewayARN(v string) *DeleteAutomaticTapeCreationPolicyOutput { + s.GatewayARN = &v + return s +} + // A JSON object containing the following fields: // // * DeleteBandwidthRateLimitInput$BandwidthType @@ -10289,8 +10769,8 @@ func (s *DeleteBandwidthRateLimitInput) SetGatewayARN(v string) *DeleteBandwidth return s } -// A JSON object containing the of the gateway whose bandwidth rate information -// was deleted. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway whose +// bandwidth rate information was deleted. type DeleteBandwidthRateLimitOutput struct { _ struct{} `type:"structure"` @@ -10818,7 +11298,8 @@ func (s *DeleteVolumeInput) SetVolumeARN(v string) *DeleteVolumeInput { return s } -// A JSON object containing the of the storage volume that was deleted +// A JSON object containing the Amazon Resource Name (ARN) of the storage volume +// that was deleted type DeleteVolumeOutput struct { _ struct{} `type:"structure"` @@ -10929,7 +11410,7 @@ func (s *DescribeAvailabilityMonitorTestOutput) SetStatus(v string) *DescribeAva return s } -// A JSON object containing the of the gateway. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway. type DescribeBandwidthRateLimitInput struct { _ struct{} `type:"structure"` @@ -11062,7 +11543,7 @@ func (s *DescribeCacheInput) SetGatewayARN(v string) *DescribeCacheInput { type DescribeCacheOutput struct { _ struct{} `type:"structure"` - // The amount of cache in bytes allocated to the a gateway. + // The amount of cache in bytes allocated to a gateway. CacheAllocatedInBytes *int64 `type:"long"` // The file share's contribution to the overall percentage of the gateway's @@ -11084,7 +11565,7 @@ type DescribeCacheOutput struct { CacheUsedPercentage *float64 `type:"double"` // An array of strings that identify disks that are to be configured as working - // storage. Each string have a minimum length of 1 and maximum length of 300. + // storage. Each string has a minimum length of 1 and maximum length of 300. // You can get the disk IDs from the ListLocalDisks API. DiskIds []*string `type:"list"` @@ -11149,8 +11630,8 @@ type DescribeCachediSCSIVolumesInput struct { _ struct{} `type:"structure"` // An array of strings where each string represents the Amazon Resource Name - // (ARN) of a cached volume. All of the specified cached volumes must from the - // same gateway. Use ListVolumes to get volume ARNs for a gateway. + // (ARN) of a cached volume. All of the specified cached volumes must be from + // the same gateway. Use ListVolumes to get volume ARNs for a gateway. // // VolumeARNs is a required field VolumeARNs []*string `type:"list" required:"true"` @@ -11497,7 +11978,7 @@ func (s *DescribeGatewayInformationOutput) SetVPCEndpoint(v string) *DescribeGat return s } -// A JSON object containing the of the gateway. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway. type DescribeMaintenanceStartTimeInput struct { _ struct{} `type:"structure"` @@ -12021,8 +12502,8 @@ type DescribeStorediSCSIVolumesInput struct { _ struct{} `type:"structure"` // An array of strings where each string represents the Amazon Resource Name - // (ARN) of a stored volume. All of the specified stored volumes must from the - // same gateway. Use ListVolumes to get volume ARNs for a gateway. + // (ARN) of a stored volume. All of the specified stored volumes must be from + // the same gateway. Use ListVolumes to get volume ARNs for a gateway. // // VolumeARNs is a required field VolumeARNs []*string `type:"list" required:"true"` @@ -12130,7 +12611,7 @@ func (s *DescribeStorediSCSIVolumesOutput) SetStorediSCSIVolumes(v []*StorediSCS type DescribeTapeArchivesInput struct { _ struct{} `type:"structure"` - // Specifies that the number of virtual tapes descried be limited to the specified + // Specifies that the number of virtual tapes described be limited to the specified // number. Limit *int64 `min:"1" type:"integer"` @@ -12659,7 +13140,7 @@ type DescribeVTLDevicesOutput struct { // to describe, this field does not appear in the response. Marker *string `min:"1" type:"string"` - // An array of VTL device objects composed of the Amazon Resource Name(ARN) + // An array of VTL device objects composed of the Amazon Resource Name (ARN) // of the VTL devices. VTLDevices []*VTLDevice `type:"list"` } @@ -12692,7 +13173,7 @@ func (s *DescribeVTLDevicesOutput) SetVTLDevices(v []*VTLDevice) *DescribeVTLDev return s } -// A JSON object containing the of the gateway. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway. type DescribeWorkingStorageInput struct { _ struct{} `type:"structure"` @@ -13079,9 +13560,9 @@ func (s *Disk) SetDiskStatus(v string) *Disk { return s } -// Provides additional information about an error that was returned by the service -// as an or. See the errorCode and errorDetails members for more information -// about the error. +// Provides additional information about an error that was returned by the service. +// See the errorCode and errorDetails members for more information about the +// error. type Error struct { _ struct{} `type:"structure"` @@ -13262,8 +13743,8 @@ func (s *GatewayInfo) SetGatewayType(v string) *GatewayInfo { // An internal server error has occurred during the request. For more information, // see the error and message fields. type InternalServerError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A StorageGatewayError that provides more information about the cause of the // error. @@ -13285,17 +13766,17 @@ func (s InternalServerError) GoString() string { func newErrorInternalServerError(v protocol.ResponseMetadata) error { return &InternalServerError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerError) Code() string { +func (s *InternalServerError) Code() string { return "InternalServerError" } // Message returns the exception's message. -func (s InternalServerError) Message() string { +func (s *InternalServerError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13303,29 +13784,29 @@ func (s InternalServerError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerError) OrigErr() error { +func (s *InternalServerError) OrigErr() error { return nil } -func (s InternalServerError) Error() string { +func (s *InternalServerError) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerError) RequestID() string { + return s.RespMetadata.RequestID } // An exception occurred because an invalid gateway request was issued to the // service. For more information, see the error and message fields. type InvalidGatewayRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A StorageGatewayError that provides more detail about the cause of the error. Error_ *Error `locationName:"error" type:"structure"` @@ -13346,17 +13827,17 @@ func (s InvalidGatewayRequestException) GoString() string { func newErrorInvalidGatewayRequestException(v protocol.ResponseMetadata) error { return &InvalidGatewayRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidGatewayRequestException) Code() string { +func (s *InvalidGatewayRequestException) Code() string { return "InvalidGatewayRequestException" } // Message returns the exception's message. -func (s InvalidGatewayRequestException) Message() string { +func (s *InvalidGatewayRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13364,22 +13845,22 @@ func (s InvalidGatewayRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidGatewayRequestException) OrigErr() error { +func (s *InvalidGatewayRequestException) OrigErr() error { return nil } -func (s InvalidGatewayRequestException) Error() string { +func (s *InvalidGatewayRequestException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidGatewayRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidGatewayRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidGatewayRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidGatewayRequestException) RequestID() string { + return s.RespMetadata.RequestID } // JoinDomainInput @@ -13566,11 +14047,73 @@ func (s *JoinDomainOutput) SetGatewayARN(v string) *JoinDomainOutput { return s } +type ListAutomaticTapeCreationPoliciesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and AWS Region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ListAutomaticTapeCreationPoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAutomaticTapeCreationPoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAutomaticTapeCreationPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAutomaticTapeCreationPoliciesInput"} + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListAutomaticTapeCreationPoliciesInput) SetGatewayARN(v string) *ListAutomaticTapeCreationPoliciesInput { + s.GatewayARN = &v + return s +} + +type ListAutomaticTapeCreationPoliciesOutput struct { + _ struct{} `type:"structure"` + + // Gets a listing of information about the gateway's automatic tape creation + // policies, including the automatic tape creation rules and the gateway that + // is using the policies. + AutomaticTapeCreationPolicyInfos []*AutomaticTapeCreationPolicyInfo `type:"list"` +} + +// String returns the string representation +func (s ListAutomaticTapeCreationPoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAutomaticTapeCreationPoliciesOutput) GoString() string { + return s.String() +} + +// SetAutomaticTapeCreationPolicyInfos sets the AutomaticTapeCreationPolicyInfos field's value. +func (s *ListAutomaticTapeCreationPoliciesOutput) SetAutomaticTapeCreationPolicyInfos(v []*AutomaticTapeCreationPolicyInfo) *ListAutomaticTapeCreationPoliciesOutput { + s.AutomaticTapeCreationPolicyInfos = v + return s +} + // ListFileShareInput type ListFileSharesInput struct { _ struct{} `type:"structure"` - // The Amazon resource Name (ARN) of the gateway whose file shares you want + // The Amazon Resource Name (ARN) of the gateway whose file shares you want // to list. If this field is not present, all file shares under your account // are listed. GatewayARN *string `min:"50" type:"string"` @@ -13765,7 +14308,7 @@ func (s *ListGatewaysOutput) SetMarker(v string) *ListGatewaysOutput { return s } -// A JSON object containing the of the gateway. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway. type ListLocalDisksInput struct { _ struct{} `type:"structure"` @@ -14037,9 +14580,9 @@ type ListTapesOutput struct { // in the response body. Marker *string `min:"1" type:"string"` - // An array of TapeInfo objects, where each object describes an a single tape. - // If there not tapes in the tape library or VTS, then the TapeInfos is an empty - // array. + // An array of TapeInfo objects, where each object describes a single tape. + // If there are no tapes in the tape library or VTS, then the TapeInfos is an + // empty array. TapeInfos []*TapeInfo `type:"list"` } @@ -14439,12 +14982,12 @@ type NFSFileShareInfo struct { // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The ARN of the backend storage used for storing file data. @@ -14852,7 +15395,7 @@ type RemoveTagsFromResourceInput struct { ResourceARN *string `min:"50" type:"string" required:"true"` // The keys of the tags you want to remove from the specified resource. A tag - // is composed of a key/value pair. + // is composed of a key-value pair. // // TagKeys is a required field TagKeys []*string `type:"list" required:"true"` @@ -15176,6 +15719,9 @@ type SMBFileShareInfo struct { // For example @group1. Can only be set if Authentication is set to ActiveDirectory. AdminUserList []*string `type:"list"` + // The Amazon Resource Name (ARN) of the storage used for the audit logs. + AuditDestinationARN *string `type:"string"` + // The authentication method of the file share. // // Valid values are ActiveDirectory or GuestAccess. The default is ActiveDirectory. @@ -15214,8 +15760,8 @@ type SMBFileShareInfo struct { // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The ARN of the backend storage used for storing file data. @@ -15281,6 +15827,12 @@ func (s *SMBFileShareInfo) SetAdminUserList(v []*string) *SMBFileShareInfo { return s } +// SetAuditDestinationARN sets the AuditDestinationARN field's value. +func (s *SMBFileShareInfo) SetAuditDestinationARN(v string) *SMBFileShareInfo { + s.AuditDestinationARN = &v + return s +} + // SetAuthentication sets the Authentication field's value. func (s *SMBFileShareInfo) SetAuthentication(v string) *SMBFileShareInfo { s.Authentication = &v @@ -15398,8 +15950,8 @@ func (s *SMBFileShareInfo) SetValidUserList(v []*string) *SMBFileShareInfo { // An internal server error has occurred because the service is unavailable. // For more information, see the error and message fields. type ServiceUnavailableError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A StorageGatewayError that provides more information about the cause of the // error. @@ -15421,17 +15973,17 @@ func (s ServiceUnavailableError) GoString() string { func newErrorServiceUnavailableError(v protocol.ResponseMetadata) error { return &ServiceUnavailableError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableError) Code() string { +func (s *ServiceUnavailableError) Code() string { return "ServiceUnavailableError" } // Message returns the exception's message. -func (s ServiceUnavailableError) Message() string { +func (s *ServiceUnavailableError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15439,22 +15991,22 @@ func (s ServiceUnavailableError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableError) OrigErr() error { +func (s *ServiceUnavailableError) OrigErr() error { return nil } -func (s ServiceUnavailableError) Error() string { +func (s *ServiceUnavailableError) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableError) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableError) RequestID() string { + return s.RespMetadata.RequestID } // SetLocalConsolePasswordInput @@ -15625,7 +16177,8 @@ func (s *SetSMBGuestPasswordOutput) SetGatewayARN(v string) *SetSMBGuestPassword return s } -// A JSON object containing the of the gateway to shut down. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway to +// shut down. type ShutdownGatewayInput struct { _ struct{} `type:"structure"` @@ -15668,7 +16221,8 @@ func (s *ShutdownGatewayInput) SetGatewayARN(v string) *ShutdownGatewayInput { return s } -// A JSON object containing the of the gateway that was shut down. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway that +// was shut down. type ShutdownGatewayOutput struct { _ struct{} `type:"structure"` @@ -15759,7 +16313,8 @@ func (s *StartAvailabilityMonitorTestOutput) SetGatewayARN(v string) *StartAvail return s } -// A JSON object containing the of the gateway to start. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway to +// start. type StartGatewayInput struct { _ struct{} `type:"structure"` @@ -15802,7 +16357,8 @@ func (s *StartGatewayInput) SetGatewayARN(v string) *StartGatewayInput { return s } -// A JSON object containing the of the gateway that was restarted. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway that +// was restarted. type StartGatewayOutput struct { _ struct{} `type:"structure"` @@ -15835,8 +16391,8 @@ type StorediSCSIVolume struct { // don’t have this time stamp. CreatedDate *time.Time `type:"timestamp"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // Indicates if when the stored volume was created, existing data on the underlying @@ -16065,15 +16621,15 @@ func (s *Tag) SetValue(v string) *Tag { type Tape struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The ID of the pool that contains tapes that will be archived. The tapes in // this pool are archived in the S3 storage class that is associated with the // pool. When you use your backup application to eject the tape, the tape is - // archived directly into the storage class (Glacier or Deep Archive) that corresponds - // to the pool. + // archived directly into the storage class (S3 Glacier or S# Glacier Deep Archive) + // that corresponds to the pool. // // Valid values: "GLACIER", "DEEP_ARCHIVE" PoolId *string `min:"1" type:"string"` @@ -16189,8 +16745,8 @@ type TapeArchive struct { // format. CompletionTime *time.Time `type:"timestamp"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The ID of the pool that was used to archive the tape. The tapes in this pool @@ -16307,8 +16863,8 @@ type TapeInfo struct { // The ID of the pool that you want to add your tape to for archiving. The tape // in this pool is archived in the S3 storage class that is associated with // the pool. When you use your backup application to eject the tape, the tape - // is archived directly into the storage class (Glacier or Deep Archive) that - // corresponds to the pool. + // is archived directly into the storage class (S3 Glacier or S3 Glacier Deep + // Archive) that corresponds to the pool. // // Valid values: "GLACIER", "DEEP_ARCHIVE" PoolId *string `min:"1" type:"string"` @@ -16427,6 +16983,100 @@ func (s *TapeRecoveryPointInfo) SetTapeStatus(v string) *TapeRecoveryPointInfo { return s } +type UpdateAutomaticTapeCreationPolicyInput struct { + _ struct{} `type:"structure"` + + // An automatic tape creation policy consists of a list of automatic tape creation + // rules. The rules determine when and how to automatically create new tapes. + // + // AutomaticTapeCreationRules is a required field + AutomaticTapeCreationRules []*AutomaticTapeCreationRule `min:"1" type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and AWS Region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateAutomaticTapeCreationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAutomaticTapeCreationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAutomaticTapeCreationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAutomaticTapeCreationPolicyInput"} + if s.AutomaticTapeCreationRules == nil { + invalidParams.Add(request.NewErrParamRequired("AutomaticTapeCreationRules")) + } + if s.AutomaticTapeCreationRules != nil && len(s.AutomaticTapeCreationRules) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutomaticTapeCreationRules", 1)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.AutomaticTapeCreationRules != nil { + for i, v := range s.AutomaticTapeCreationRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AutomaticTapeCreationRules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutomaticTapeCreationRules sets the AutomaticTapeCreationRules field's value. +func (s *UpdateAutomaticTapeCreationPolicyInput) SetAutomaticTapeCreationRules(v []*AutomaticTapeCreationRule) *UpdateAutomaticTapeCreationPolicyInput { + s.AutomaticTapeCreationRules = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateAutomaticTapeCreationPolicyInput) SetGatewayARN(v string) *UpdateAutomaticTapeCreationPolicyInput { + s.GatewayARN = &v + return s +} + +type UpdateAutomaticTapeCreationPolicyOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and AWS Region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateAutomaticTapeCreationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAutomaticTapeCreationPolicyOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateAutomaticTapeCreationPolicyOutput) SetGatewayARN(v string) *UpdateAutomaticTapeCreationPolicyOutput { + s.GatewayARN = &v + return s +} + // A JSON object containing one or more of the following fields: // // * UpdateBandwidthRateLimitInput$AverageDownloadRateLimitInBitsPerSec @@ -16498,8 +17148,8 @@ func (s *UpdateBandwidthRateLimitInput) SetGatewayARN(v string) *UpdateBandwidth return s } -// A JSON object containing the of the gateway whose throttle information was -// updated. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway whose +// throttle information was updated. type UpdateBandwidthRateLimitOutput struct { _ struct{} `type:"structure"` @@ -16776,7 +17426,8 @@ func (s *UpdateGatewayInformationOutput) SetGatewayName(v string) *UpdateGateway return s } -// A JSON object containing the of the gateway to update. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway to +// update. type UpdateGatewaySoftwareNowInput struct { _ struct{} `type:"structure"` @@ -16819,7 +17470,8 @@ func (s *UpdateGatewaySoftwareNowInput) SetGatewayARN(v string) *UpdateGatewaySo return s } -// A JSON object containing the of the gateway that was updated. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway that +// was updated. type UpdateGatewaySoftwareNowOutput struct { _ struct{} `type:"structure"` @@ -16953,8 +17605,8 @@ func (s *UpdateMaintenanceStartTimeInput) SetMinuteOfHour(v int64) *UpdateMainte return s } -// A JSON object containing the of the gateway whose maintenance start time -// is updated. +// A JSON object containing the Amazon Resource Name (ARN) of the gateway whose +// maintenance start time is updated. type UpdateMaintenanceStartTimeOutput struct { _ struct{} `type:"structure"` @@ -17002,12 +17654,12 @@ type UpdateNFSFileShareInput struct { // and otherwise to false. The default value is true. GuessMIMETypeEnabled *bool `type:"boolean"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // The default values for the file share. Optional. @@ -17183,6 +17835,9 @@ type UpdateSMBFileShareInput struct { // @group1. Can only be set if Authentication is set to ActiveDirectory. AdminUserList []*string `type:"list"` + // The Amazon Resource Name (ARN) of the storage used for the audit logs. + AuditDestinationARN *string `type:"string"` + // The default storage class for objects put into an Amazon S3 bucket by the // file gateway. Possible values are S3_STANDARD, S3_STANDARD_IA, or S3_ONEZONE_IA. // If this field is not populated, the default value S3_STANDARD is used. Optional. @@ -17203,12 +17858,12 @@ type UpdateSMBFileShareInput struct { // example @group1. Can only be set if Authentication is set to ActiveDirectory. InvalidUserList []*string `type:"list"` - // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // True to use Amazon S3 server-side encryption with your own AWS KMS key, or // false to use a key managed by Amazon S3. Optional. KMSEncrypted *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server - // side encryption. This value can only be set when KMSEncrypted is true. Optional. + // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server-side + // encryption. This value can only be set when KMSEncrypted is true. Optional. KMSKey *string `min:"7" type:"string"` // A value that sets the access control list permission for objects in the S3 @@ -17281,6 +17936,12 @@ func (s *UpdateSMBFileShareInput) SetAdminUserList(v []*string) *UpdateSMBFileSh return s } +// SetAuditDestinationARN sets the AuditDestinationARN field's value. +func (s *UpdateSMBFileShareInput) SetAuditDestinationARN(v string) *UpdateSMBFileShareInput { + s.AuditDestinationARN = &v + return s +} + // SetDefaultStorageClass sets the DefaultStorageClass field's value. func (s *UpdateSMBFileShareInput) SetDefaultStorageClass(v string) *UpdateSMBFileShareInput { s.DefaultStorageClass = &v @@ -17585,7 +18246,8 @@ func (s *UpdateSnapshotScheduleInput) SetVolumeARN(v string) *UpdateSnapshotSche return s } -// A JSON object containing the of the updated storage volume. +// A JSON object containing the Amazon Resource Name (ARN) of the updated storage +// volume. type UpdateSnapshotScheduleOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go index c3eb54cd5a6..61d492bc29b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go @@ -7,7 +7,7 @@ // appliance with cloud-based storage to provide seamless and secure integration // between an organization's on-premises IT environment and the AWS storage // infrastructure. The service enables you to securely upload data to the AWS -// cloud for cost effective backup and rapid disaster recovery. +// Cloud for cost effective backup and rapid disaster recovery. // // Use the following links to get started using the AWS Storage Gateway Service // API Reference: 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 7f60d4aa185..550b5f687f9 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 @@ -1788,7 +1788,7 @@ type AssumeRoleWithSAMLInput struct { // in the IAM User Guide. // // SAMLAssertion is a required field - SAMLAssertion *string `min:"4" type:"string" required:"true"` + SAMLAssertion *string `min:"4" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -2100,7 +2100,7 @@ type AssumeRoleWithWebIdentityInput struct { // the application makes an AssumeRoleWithWebIdentity call. // // WebIdentityToken is a required field - WebIdentityToken *string `min:"4" type:"string" required:"true"` + WebIdentityToken *string `min:"4" type:"string" required:"true" sensitive:"true"` } // String returns the string representation 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 b2e19132d7f..bd25e12c8fa 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 @@ -7143,8 +7143,8 @@ func (s *DecisionTaskTimedOutEventAttributes) SetTimeoutType(v string) *Decision // If these parameters aren't set and no default parameters were defined in // the workflow type, this error is displayed. type DefaultUndefinedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7161,17 +7161,17 @@ func (s DefaultUndefinedFault) GoString() string { func newErrorDefaultUndefinedFault(v protocol.ResponseMetadata) error { return &DefaultUndefinedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DefaultUndefinedFault) Code() string { +func (s *DefaultUndefinedFault) Code() string { return "DefaultUndefinedFault" } // Message returns the exception's message. -func (s DefaultUndefinedFault) Message() string { +func (s *DefaultUndefinedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7179,22 +7179,22 @@ func (s DefaultUndefinedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DefaultUndefinedFault) OrigErr() error { +func (s *DefaultUndefinedFault) OrigErr() error { return nil } -func (s DefaultUndefinedFault) Error() string { +func (s *DefaultUndefinedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DefaultUndefinedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DefaultUndefinedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DefaultUndefinedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *DefaultUndefinedFault) RequestID() string { + return s.RespMetadata.RequestID } type DeprecateActivityTypeInput struct { @@ -7830,8 +7830,8 @@ func (s *DescribeWorkflowTypeOutput) SetTypeInfo(v *WorkflowTypeInfo) *DescribeW // registering a domain that is either already registered or deprecated, or // if you undeprecate a domain that is currently registered. type DomainAlreadyExistsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -7849,17 +7849,17 @@ func (s DomainAlreadyExistsFault) GoString() string { func newErrorDomainAlreadyExistsFault(v protocol.ResponseMetadata) error { return &DomainAlreadyExistsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DomainAlreadyExistsFault) Code() string { +func (s *DomainAlreadyExistsFault) Code() string { return "DomainAlreadyExistsFault" } // Message returns the exception's message. -func (s DomainAlreadyExistsFault) Message() string { +func (s *DomainAlreadyExistsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7867,22 +7867,22 @@ func (s DomainAlreadyExistsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DomainAlreadyExistsFault) OrigErr() error { +func (s *DomainAlreadyExistsFault) OrigErr() error { return nil } -func (s DomainAlreadyExistsFault) Error() string { +func (s *DomainAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DomainAlreadyExistsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DomainAlreadyExistsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DomainAlreadyExistsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *DomainAlreadyExistsFault) RequestID() string { + return s.RespMetadata.RequestID } // Contains the configuration settings of a domain. @@ -7913,8 +7913,8 @@ func (s *DomainConfiguration) SetWorkflowExecutionRetentionPeriodInDays(v string // Returned when the specified domain has been deprecated. type DomainDeprecatedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -7932,17 +7932,17 @@ func (s DomainDeprecatedFault) GoString() string { func newErrorDomainDeprecatedFault(v protocol.ResponseMetadata) error { return &DomainDeprecatedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DomainDeprecatedFault) Code() string { +func (s *DomainDeprecatedFault) Code() string { return "DomainDeprecatedFault" } // Message returns the exception's message. -func (s DomainDeprecatedFault) Message() string { +func (s *DomainDeprecatedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7950,22 +7950,22 @@ func (s DomainDeprecatedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DomainDeprecatedFault) OrigErr() error { +func (s *DomainDeprecatedFault) OrigErr() error { return nil } -func (s DomainDeprecatedFault) Error() string { +func (s *DomainDeprecatedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DomainDeprecatedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DomainDeprecatedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DomainDeprecatedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *DomainDeprecatedFault) RequestID() string { + return s.RespMetadata.RequestID } // Contains general information about a domain. @@ -9438,8 +9438,8 @@ func (s *LambdaFunctionTimedOutEventAttributes) SetTimeoutType(v string) *Lambda // To address this fault you should either clean up unused resources or increase // the limit by contacting AWS. type LimitExceededFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -9457,17 +9457,17 @@ func (s LimitExceededFault) GoString() string { func newErrorLimitExceededFault(v protocol.ResponseMetadata) error { return &LimitExceededFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededFault) Code() string { +func (s *LimitExceededFault) Code() string { return "LimitExceededFault" } // Message returns the exception's message. -func (s LimitExceededFault) Message() string { +func (s *LimitExceededFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9475,22 +9475,22 @@ func (s LimitExceededFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededFault) OrigErr() error { +func (s *LimitExceededFault) OrigErr() error { return nil } -func (s LimitExceededFault) Error() string { +func (s *LimitExceededFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededFault) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededFault) RequestID() string { + return s.RespMetadata.RequestID } type ListActivityTypesInput struct { @@ -10352,8 +10352,8 @@ func (s *MarkerRecordedEventAttributes) SetMarkerName(v string) *MarkerRecordedE // Returned when the caller doesn't have sufficient permissions to invoke the // action. type OperationNotPermittedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -10371,17 +10371,17 @@ func (s OperationNotPermittedFault) GoString() string { func newErrorOperationNotPermittedFault(v protocol.ResponseMetadata) error { return &OperationNotPermittedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotPermittedFault) Code() string { +func (s *OperationNotPermittedFault) Code() string { return "OperationNotPermittedFault" } // Message returns the exception's message. -func (s OperationNotPermittedFault) Message() string { +func (s *OperationNotPermittedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10389,22 +10389,22 @@ func (s OperationNotPermittedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotPermittedFault) OrigErr() error { +func (s *OperationNotPermittedFault) OrigErr() error { return nil } -func (s OperationNotPermittedFault) Error() string { +func (s *OperationNotPermittedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotPermittedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotPermittedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotPermittedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotPermittedFault) RequestID() string { + return s.RespMetadata.RequestID } // Contains the count of tasks in a task list. @@ -14603,8 +14603,8 @@ func (s *TimerStartedEventAttributes) SetTimerId(v string) *TimerStartedEventAtt // You've exceeded the number of tags allowed for a domain. type TooManyTagsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14621,17 +14621,17 @@ func (s TooManyTagsFault) GoString() string { func newErrorTooManyTagsFault(v protocol.ResponseMetadata) error { return &TooManyTagsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsFault) Code() string { +func (s *TooManyTagsFault) Code() string { return "TooManyTagsFault" } // Message returns the exception's message. -func (s TooManyTagsFault) Message() string { +func (s *TooManyTagsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14639,30 +14639,30 @@ func (s TooManyTagsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsFault) OrigErr() error { +func (s *TooManyTagsFault) OrigErr() error { return nil } -func (s TooManyTagsFault) Error() string { +func (s *TooManyTagsFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsFault) RequestID() string { + return s.RespMetadata.RequestID } // Returned if the type already exists in the specified domain. You may get // this fault if you are registering a type that is either already registered // or deprecated, or if you undeprecate a type that is currently registered. type TypeAlreadyExistsFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -14680,17 +14680,17 @@ func (s TypeAlreadyExistsFault) GoString() string { func newErrorTypeAlreadyExistsFault(v protocol.ResponseMetadata) error { return &TypeAlreadyExistsFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TypeAlreadyExistsFault) Code() string { +func (s *TypeAlreadyExistsFault) Code() string { return "TypeAlreadyExistsFault" } // Message returns the exception's message. -func (s TypeAlreadyExistsFault) Message() string { +func (s *TypeAlreadyExistsFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14698,28 +14698,28 @@ func (s TypeAlreadyExistsFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TypeAlreadyExistsFault) OrigErr() error { +func (s *TypeAlreadyExistsFault) OrigErr() error { return nil } -func (s TypeAlreadyExistsFault) Error() string { +func (s *TypeAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TypeAlreadyExistsFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TypeAlreadyExistsFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TypeAlreadyExistsFault) RequestID() string { - return s.respMetadata.RequestID +func (s *TypeAlreadyExistsFault) RequestID() string { + return s.RespMetadata.RequestID } // Returned when the specified activity or workflow type was already deprecated. type TypeDeprecatedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -14737,17 +14737,17 @@ func (s TypeDeprecatedFault) GoString() string { func newErrorTypeDeprecatedFault(v protocol.ResponseMetadata) error { return &TypeDeprecatedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TypeDeprecatedFault) Code() string { +func (s *TypeDeprecatedFault) Code() string { return "TypeDeprecatedFault" } // Message returns the exception's message. -func (s TypeDeprecatedFault) Message() string { +func (s *TypeDeprecatedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14755,22 +14755,22 @@ func (s TypeDeprecatedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TypeDeprecatedFault) OrigErr() error { +func (s *TypeDeprecatedFault) OrigErr() error { return nil } -func (s TypeDeprecatedFault) Error() string { +func (s *TypeDeprecatedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TypeDeprecatedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TypeDeprecatedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TypeDeprecatedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *TypeDeprecatedFault) RequestID() string { + return s.RespMetadata.RequestID } type UndeprecateActivityTypeInput struct { @@ -14980,8 +14980,8 @@ func (s UndeprecateWorkflowTypeOutput) GoString() string { // operation (region or domain). This could happen if the named resource was // never created or is no longer available for this operation. type UnknownResourceFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -14999,17 +14999,17 @@ func (s UnknownResourceFault) GoString() string { func newErrorUnknownResourceFault(v protocol.ResponseMetadata) error { return &UnknownResourceFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnknownResourceFault) Code() string { +func (s *UnknownResourceFault) Code() string { return "UnknownResourceFault" } // Message returns the exception's message. -func (s UnknownResourceFault) Message() string { +func (s *UnknownResourceFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15017,22 +15017,22 @@ func (s UnknownResourceFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnknownResourceFault) OrigErr() error { +func (s *UnknownResourceFault) OrigErr() error { return nil } -func (s UnknownResourceFault) Error() string { +func (s *UnknownResourceFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnknownResourceFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnknownResourceFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnknownResourceFault) RequestID() string { - return s.respMetadata.RequestID +func (s *UnknownResourceFault) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { @@ -15166,8 +15166,8 @@ func (s *WorkflowExecution) SetWorkflowId(v string) *WorkflowExecution { // Returned by StartWorkflowExecution when an open execution with the same workflowId // is already running in the specified domain. type WorkflowExecutionAlreadyStartedFault struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // A description that may help with diagnosing the cause of the fault. Message_ *string `locationName:"message" type:"string"` @@ -15185,17 +15185,17 @@ func (s WorkflowExecutionAlreadyStartedFault) GoString() string { func newErrorWorkflowExecutionAlreadyStartedFault(v protocol.ResponseMetadata) error { return &WorkflowExecutionAlreadyStartedFault{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WorkflowExecutionAlreadyStartedFault) Code() string { +func (s *WorkflowExecutionAlreadyStartedFault) Code() string { return "WorkflowExecutionAlreadyStartedFault" } // Message returns the exception's message. -func (s WorkflowExecutionAlreadyStartedFault) Message() string { +func (s *WorkflowExecutionAlreadyStartedFault) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -15203,22 +15203,22 @@ func (s WorkflowExecutionAlreadyStartedFault) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WorkflowExecutionAlreadyStartedFault) OrigErr() error { +func (s *WorkflowExecutionAlreadyStartedFault) OrigErr() error { return nil } -func (s WorkflowExecutionAlreadyStartedFault) Error() string { +func (s *WorkflowExecutionAlreadyStartedFault) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WorkflowExecutionAlreadyStartedFault) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WorkflowExecutionAlreadyStartedFault) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WorkflowExecutionAlreadyStartedFault) RequestID() string { - return s.respMetadata.RequestID +func (s *WorkflowExecutionAlreadyStartedFault) RequestID() string { + return s.RespMetadata.RequestID } // Provides the details of the WorkflowExecutionCancelRequested event. diff --git a/vendor/github.com/aws/aws-sdk-go/service/synthetics/api.go b/vendor/github.com/aws/aws-sdk-go/service/synthetics/api.go new file mode 100644 index 00000000000..8b2d759c486 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/synthetics/api.go @@ -0,0 +1,3792 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package synthetics + +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/restjson" +) + +const opCreateCanary = "CreateCanary" + +// CreateCanaryRequest generates a "aws/request.Request" representing the +// client's request for the CreateCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCanary for more information on using the CreateCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCanaryRequest method. +// req, resp := client.CreateCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateCanary +func (c *Synthetics) CreateCanaryRequest(input *CreateCanaryInput) (req *request.Request, output *CreateCanaryOutput) { + op := &request.Operation{ + Name: opCreateCanary, + HTTPMethod: "POST", + HTTPPath: "/canary", + } + + if input == nil { + input = &CreateCanaryInput{} + } + + output = &CreateCanaryOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCanary API operation for Synthetics. +// +// Creates a canary. Canaries are scripts that monitor your endpoints and APIs +// from the outside-in. Canaries help you check the availability and latency +// of your web services and troubleshoot anomalies by investigating load time +// data, screenshots of the UI, logs, and metrics. You can set up a canary to +// run continuously or just once. +// +// Do not use CreateCanary to modify an existing canary. Use UpdateCanary instead. +// +// To create canaries, you must have the CloudWatchSyntheticsFullAccess policy. +// If you are creating a new IAM role for the canary, you also need the the +// iam:CreateRole, iam:CreatePolicy and iam:AttachRolePolicy permissions. For +// more information, see Necessary Roles and Permissions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Roles). +// +// Do not include secrets or proprietary information in your canary names. The +// canary name makes up part of the Amazon Resource Name (ARN) for the canary, +// and the ARN is included in outbound calls over the internet. For more information, +// see Security Considerations for Synthetics Canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation CreateCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateCanary +func (c *Synthetics) CreateCanary(input *CreateCanaryInput) (*CreateCanaryOutput, error) { + req, out := c.CreateCanaryRequest(input) + return out, req.Send() +} + +// CreateCanaryWithContext is the same as CreateCanary with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) CreateCanaryWithContext(ctx aws.Context, input *CreateCanaryInput, opts ...request.Option) (*CreateCanaryOutput, error) { + req, out := c.CreateCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCanary = "DeleteCanary" + +// DeleteCanaryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCanary for more information on using the DeleteCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteCanaryRequest method. +// req, resp := client.DeleteCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteCanary +func (c *Synthetics) DeleteCanaryRequest(input *DeleteCanaryInput) (req *request.Request, output *DeleteCanaryOutput) { + op := &request.Operation{ + Name: opDeleteCanary, + HTTPMethod: "DELETE", + HTTPPath: "/canary/{name}", + } + + if input == nil { + input = &DeleteCanaryInput{} + } + + output = &DeleteCanaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCanary API operation for Synthetics. +// +// Permanently deletes the specified canary. +// +// When you delete a canary, resources used and created by the canary are not +// automatically deleted. After you delete a canary that you do not intend to +// use again, you should also delete the following: +// +// * The Lambda functions and layers used by this canary. These have the +// prefix cwsyn-MyCanaryName . +// +// * The CloudWatch alarms created for this canary. These alarms have a name +// of Synthetics-SharpDrop-Alarm-MyCanaryName . +// +// * Amazon S3 objects and buckets, such as the canary's artifact location. +// +// * IAM roles created for the canary. If they were created in the console, +// these roles have the name role/service-role/CloudWatchSyntheticsRole-MyCanaryName . +// +// * CloudWatch Logs log groups created for the canary. These logs groups +// have the name /aws/lambda/cwsyn-MyCanaryName . +// +// Before you delete a canary, you might want to use GetCanary to display the +// information about this canary. Make note of the information returned by this +// operation so that you can delete these resources after you delete the canary. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation DeleteCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteCanary +func (c *Synthetics) DeleteCanary(input *DeleteCanaryInput) (*DeleteCanaryOutput, error) { + req, out := c.DeleteCanaryRequest(input) + return out, req.Send() +} + +// DeleteCanaryWithContext is the same as DeleteCanary with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) DeleteCanaryWithContext(ctx aws.Context, input *DeleteCanaryInput, opts ...request.Option) (*DeleteCanaryOutput, error) { + req, out := c.DeleteCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCanaries = "DescribeCanaries" + +// DescribeCanariesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCanaries operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCanaries for more information on using the DescribeCanaries +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCanariesRequest method. +// req, resp := client.DescribeCanariesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanaries +func (c *Synthetics) DescribeCanariesRequest(input *DescribeCanariesInput) (req *request.Request, output *DescribeCanariesOutput) { + op := &request.Operation{ + Name: opDescribeCanaries, + HTTPMethod: "POST", + HTTPPath: "/canaries", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeCanariesInput{} + } + + output = &DescribeCanariesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCanaries API operation for Synthetics. +// +// This operation returns a list of the canaries in your account, along with +// full details about each canary. +// +// This operation does not have resource-level authorization, so if a user is +// able to use DescribeCanaries, the user can see all of the canaries in the +// account. A deny policy can only be used to restrict access to all canaries. +// It cannot be used on specific resources. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation DescribeCanaries for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanaries +func (c *Synthetics) DescribeCanaries(input *DescribeCanariesInput) (*DescribeCanariesOutput, error) { + req, out := c.DescribeCanariesRequest(input) + return out, req.Send() +} + +// DescribeCanariesWithContext is the same as DescribeCanaries with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCanaries for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) DescribeCanariesWithContext(ctx aws.Context, input *DescribeCanariesInput, opts ...request.Option) (*DescribeCanariesOutput, error) { + req, out := c.DescribeCanariesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeCanariesPages iterates over the pages of a DescribeCanaries operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeCanaries 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 DescribeCanaries operation. +// pageNum := 0 +// err := client.DescribeCanariesPages(params, +// func(page *synthetics.DescribeCanariesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Synthetics) DescribeCanariesPages(input *DescribeCanariesInput, fn func(*DescribeCanariesOutput, bool) bool) error { + return c.DescribeCanariesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeCanariesPagesWithContext same as DescribeCanariesPages 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 *Synthetics) DescribeCanariesPagesWithContext(ctx aws.Context, input *DescribeCanariesInput, fn func(*DescribeCanariesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeCanariesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCanariesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeCanariesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeCanariesLastRun = "DescribeCanariesLastRun" + +// DescribeCanariesLastRunRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCanariesLastRun operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCanariesLastRun for more information on using the DescribeCanariesLastRun +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCanariesLastRunRequest method. +// req, resp := client.DescribeCanariesLastRunRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanariesLastRun +func (c *Synthetics) DescribeCanariesLastRunRequest(input *DescribeCanariesLastRunInput) (req *request.Request, output *DescribeCanariesLastRunOutput) { + op := &request.Operation{ + Name: opDescribeCanariesLastRun, + HTTPMethod: "POST", + HTTPPath: "/canaries/last-run", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeCanariesLastRunInput{} + } + + output = &DescribeCanariesLastRunOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCanariesLastRun API operation for Synthetics. +// +// Use this operation to see information from the most recent run of each canary +// that you have created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation DescribeCanariesLastRun for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanariesLastRun +func (c *Synthetics) DescribeCanariesLastRun(input *DescribeCanariesLastRunInput) (*DescribeCanariesLastRunOutput, error) { + req, out := c.DescribeCanariesLastRunRequest(input) + return out, req.Send() +} + +// DescribeCanariesLastRunWithContext is the same as DescribeCanariesLastRun with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCanariesLastRun for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) DescribeCanariesLastRunWithContext(ctx aws.Context, input *DescribeCanariesLastRunInput, opts ...request.Option) (*DescribeCanariesLastRunOutput, error) { + req, out := c.DescribeCanariesLastRunRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeCanariesLastRunPages iterates over the pages of a DescribeCanariesLastRun operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeCanariesLastRun 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 DescribeCanariesLastRun operation. +// pageNum := 0 +// err := client.DescribeCanariesLastRunPages(params, +// func(page *synthetics.DescribeCanariesLastRunOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Synthetics) DescribeCanariesLastRunPages(input *DescribeCanariesLastRunInput, fn func(*DescribeCanariesLastRunOutput, bool) bool) error { + return c.DescribeCanariesLastRunPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeCanariesLastRunPagesWithContext same as DescribeCanariesLastRunPages 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 *Synthetics) DescribeCanariesLastRunPagesWithContext(ctx aws.Context, input *DescribeCanariesLastRunInput, fn func(*DescribeCanariesLastRunOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeCanariesLastRunInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCanariesLastRunRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeCanariesLastRunOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeRuntimeVersions = "DescribeRuntimeVersions" + +// DescribeRuntimeVersionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRuntimeVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRuntimeVersions for more information on using the DescribeRuntimeVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRuntimeVersionsRequest method. +// req, resp := client.DescribeRuntimeVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeRuntimeVersions +func (c *Synthetics) DescribeRuntimeVersionsRequest(input *DescribeRuntimeVersionsInput) (req *request.Request, output *DescribeRuntimeVersionsOutput) { + op := &request.Operation{ + Name: opDescribeRuntimeVersions, + HTTPMethod: "POST", + HTTPPath: "/runtime-versions", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeRuntimeVersionsInput{} + } + + output = &DescribeRuntimeVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRuntimeVersions API operation for Synthetics. +// +// Returns a list of Synthetics canary runtime versions. For more information, +// see Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation DescribeRuntimeVersions for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeRuntimeVersions +func (c *Synthetics) DescribeRuntimeVersions(input *DescribeRuntimeVersionsInput) (*DescribeRuntimeVersionsOutput, error) { + req, out := c.DescribeRuntimeVersionsRequest(input) + return out, req.Send() +} + +// DescribeRuntimeVersionsWithContext is the same as DescribeRuntimeVersions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRuntimeVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) DescribeRuntimeVersionsWithContext(ctx aws.Context, input *DescribeRuntimeVersionsInput, opts ...request.Option) (*DescribeRuntimeVersionsOutput, error) { + req, out := c.DescribeRuntimeVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeRuntimeVersionsPages iterates over the pages of a DescribeRuntimeVersions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeRuntimeVersions 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 DescribeRuntimeVersions operation. +// pageNum := 0 +// err := client.DescribeRuntimeVersionsPages(params, +// func(page *synthetics.DescribeRuntimeVersionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Synthetics) DescribeRuntimeVersionsPages(input *DescribeRuntimeVersionsInput, fn func(*DescribeRuntimeVersionsOutput, bool) bool) error { + return c.DescribeRuntimeVersionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeRuntimeVersionsPagesWithContext same as DescribeRuntimeVersionsPages 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 *Synthetics) DescribeRuntimeVersionsPagesWithContext(ctx aws.Context, input *DescribeRuntimeVersionsInput, fn func(*DescribeRuntimeVersionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeRuntimeVersionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeRuntimeVersionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeRuntimeVersionsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetCanary = "GetCanary" + +// GetCanaryRequest generates a "aws/request.Request" representing the +// client's request for the GetCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCanary for more information on using the GetCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCanaryRequest method. +// req, resp := client.GetCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary +func (c *Synthetics) GetCanaryRequest(input *GetCanaryInput) (req *request.Request, output *GetCanaryOutput) { + op := &request.Operation{ + Name: opGetCanary, + HTTPMethod: "GET", + HTTPPath: "/canary/{name}", + } + + if input == nil { + input = &GetCanaryInput{} + } + + output = &GetCanaryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCanary API operation for Synthetics. +// +// Retrieves complete information about one canary. You must specify the name +// of the canary that you want. To get a list of canaries and their names, use +// DescribeCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation GetCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary +func (c *Synthetics) GetCanary(input *GetCanaryInput) (*GetCanaryOutput, error) { + req, out := c.GetCanaryRequest(input) + return out, req.Send() +} + +// GetCanaryWithContext is the same as GetCanary with the addition of +// the ability to pass a context and additional request options. +// +// See GetCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) GetCanaryWithContext(ctx aws.Context, input *GetCanaryInput, opts ...request.Option) (*GetCanaryOutput, error) { + req, out := c.GetCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCanaryRuns = "GetCanaryRuns" + +// GetCanaryRunsRequest generates a "aws/request.Request" representing the +// client's request for the GetCanaryRuns operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCanaryRuns for more information on using the GetCanaryRuns +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCanaryRunsRequest method. +// req, resp := client.GetCanaryRunsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns +func (c *Synthetics) GetCanaryRunsRequest(input *GetCanaryRunsInput) (req *request.Request, output *GetCanaryRunsOutput) { + op := &request.Operation{ + Name: opGetCanaryRuns, + HTTPMethod: "POST", + HTTPPath: "/canary/{name}/runs", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetCanaryRunsInput{} + } + + output = &GetCanaryRunsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCanaryRuns API operation for Synthetics. +// +// Retrieves a list of runs for a specified canary. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation GetCanaryRuns for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns +func (c *Synthetics) GetCanaryRuns(input *GetCanaryRunsInput) (*GetCanaryRunsOutput, error) { + req, out := c.GetCanaryRunsRequest(input) + return out, req.Send() +} + +// GetCanaryRunsWithContext is the same as GetCanaryRuns with the addition of +// the ability to pass a context and additional request options. +// +// See GetCanaryRuns for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) GetCanaryRunsWithContext(ctx aws.Context, input *GetCanaryRunsInput, opts ...request.Option) (*GetCanaryRunsOutput, error) { + req, out := c.GetCanaryRunsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetCanaryRunsPages iterates over the pages of a GetCanaryRuns operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetCanaryRuns 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 GetCanaryRuns operation. +// pageNum := 0 +// err := client.GetCanaryRunsPages(params, +// func(page *synthetics.GetCanaryRunsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Synthetics) GetCanaryRunsPages(input *GetCanaryRunsInput, fn func(*GetCanaryRunsOutput, bool) bool) error { + return c.GetCanaryRunsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetCanaryRunsPagesWithContext same as GetCanaryRunsPages 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 *Synthetics) GetCanaryRunsPagesWithContext(ctx aws.Context, input *GetCanaryRunsInput, fn func(*GetCanaryRunsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetCanaryRunsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetCanaryRunsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetCanaryRunsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the 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/synthetics-2017-10-11/ListTagsForResource +func (c *Synthetics) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Synthetics. +// +// Displays the tags associated with a canary. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource +func (c *Synthetics) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartCanary = "StartCanary" + +// StartCanaryRequest generates a "aws/request.Request" representing the +// client's request for the StartCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartCanary for more information on using the StartCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartCanaryRequest method. +// req, resp := client.StartCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary +func (c *Synthetics) StartCanaryRequest(input *StartCanaryInput) (req *request.Request, output *StartCanaryOutput) { + op := &request.Operation{ + Name: opStartCanary, + HTTPMethod: "POST", + HTTPPath: "/canary/{name}/start", + } + + if input == nil { + input = &StartCanaryInput{} + } + + output = &StartCanaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StartCanary API operation for Synthetics. +// +// Use this operation to run a canary that has already been created. The frequency +// of the canary runs is determined by the value of the canary's Schedule. To +// see a canary's schedule, use GetCanary (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanary.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation StartCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary +func (c *Synthetics) StartCanary(input *StartCanaryInput) (*StartCanaryOutput, error) { + req, out := c.StartCanaryRequest(input) + return out, req.Send() +} + +// StartCanaryWithContext is the same as StartCanary with the addition of +// the ability to pass a context and additional request options. +// +// See StartCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) StartCanaryWithContext(ctx aws.Context, input *StartCanaryInput, opts ...request.Option) (*StartCanaryOutput, error) { + req, out := c.StartCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopCanary = "StopCanary" + +// StopCanaryRequest generates a "aws/request.Request" representing the +// client's request for the StopCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopCanary for more information on using the StopCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopCanaryRequest method. +// req, resp := client.StopCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary +func (c *Synthetics) StopCanaryRequest(input *StopCanaryInput) (req *request.Request, output *StopCanaryOutput) { + op := &request.Operation{ + Name: opStopCanary, + HTTPMethod: "POST", + HTTPPath: "/canary/{name}/stop", + } + + if input == nil { + input = &StopCanaryInput{} + } + + output = &StopCanaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopCanary API operation for Synthetics. +// +// Stops the canary to prevent all future runs. If the canary is currently running, +// Synthetics stops waiting for the current run of the specified canary to complete. +// The run that is in progress completes on its own, publishes metrics, and +// uploads artifacts, but it is not recorded in Synthetics as a completed run. +// +// You can use StartCanary to start it running again with the canary’s current +// schedule at any point in the future. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation StopCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary +func (c *Synthetics) StopCanary(input *StopCanaryInput) (*StopCanaryOutput, error) { + req, out := c.StopCanaryRequest(input) + return out, req.Send() +} + +// StopCanaryWithContext is the same as StopCanary with the addition of +// the ability to pass a context and additional request options. +// +// See StopCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) StopCanaryWithContext(ctx aws.Context, input *StopCanaryInput, opts ...request.Option) (*StopCanaryOutput, error) { + req, out := c.StopCanaryRequest(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 +// successfully. +// +// Use "Send" method on the 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/synthetics-2017-10-11/TagResource +func (c *Synthetics) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Synthetics. +// +// Assigns one or more tags (key-value pairs) to the specified canary. +// +// Tags can help you organize and categorize your resources. You can also use +// them to scope user permissions, by granting a user permission to access or +// change only resources with certain tag values. +// +// Tags don't have any semantic meaning to AWS and are interpreted strictly +// as strings of characters. +// +// You can use the TagResource action with a canary that already has tags. If +// you specify a new tag key for the alarm, this tag is appended to the list +// of tags associated with the alarm. If you specify a tag key that is already +// associated with the alarm, the new tag value that you specify replaces the +// previous value for that tag. +// +// You can associate as many as 50 tags with a canary. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource +func (c *Synthetics) 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 *Synthetics) 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 +// successfully. +// +// Use "Send" method on the 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/synthetics-2017-10-11/UntagResource +func (c *Synthetics) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Synthetics. +// +// Removes one or more tags from the specified canary. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource +func (c *Synthetics) 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 *Synthetics) 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 opUpdateCanary = "UpdateCanary" + +// UpdateCanaryRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCanary for more information on using the UpdateCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCanaryRequest method. +// req, resp := client.UpdateCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary +func (c *Synthetics) UpdateCanaryRequest(input *UpdateCanaryInput) (req *request.Request, output *UpdateCanaryOutput) { + op := &request.Operation{ + Name: opUpdateCanary, + HTTPMethod: "PATCH", + HTTPPath: "/canary/{name}", + } + + if input == nil { + input = &UpdateCanaryInput{} + } + + output = &UpdateCanaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCanary API operation for Synthetics. +// +// Use this operation to change the settings of a canary that has already been +// created. +// +// You can't use this operation to update the tags of an existing canary. To +// change the tags of an existing canary, use TagResource (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_TagResource.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation UpdateCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary +func (c *Synthetics) UpdateCanary(input *UpdateCanaryInput) (*UpdateCanaryOutput, error) { + req, out := c.UpdateCanaryRequest(input) + return out, req.Send() +} + +// UpdateCanaryWithContext is the same as UpdateCanary with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) UpdateCanaryWithContext(ctx aws.Context, input *UpdateCanaryInput, opts ...request.Option) (*UpdateCanaryOutput, error) { + req, out := c.UpdateCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// This structure contains all information about one canary in your account. +type Canary struct { + _ struct{} `type:"structure"` + + // The location in Amazon S3 where Synthetics stores artifacts from the runs + // of this canary. Artifacts include the log file, screenshots, and HAR files. + ArtifactS3Location *string `min:"1" type:"string"` + + // This structure contains information about the canary's Lambda handler and + // where its code is stored by CloudWatch Synthetics. + Code *CanaryCodeOutput `type:"structure"` + + // The ARN of the Lambda function that is used as your canary's engine. For + // more information about Lambda ARN format, see Resources and Conditions for + // Lambda Actions (https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html). + EngineArn *string `type:"string"` + + // The ARN of the IAM role used to run the canary. This role must include lambda.amazonaws.com + // as a principal in the trust policy. + ExecutionRoleArn *string `type:"string"` + + // The number of days to retain data about failed runs of this canary. + FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // The unique ID of this canary. + Id *string `type:"string"` + + // The name of the canary. + Name *string `min:"1" type:"string"` + + // A structure that contains information for a canary run. + RunConfig *CanaryRunConfigOutput `type:"structure"` + + // Specifies the runtime version to use for the canary. Currently, the only + // valid value is syn-1.0. For more information about runtime versions, see + // Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). + RuntimeVersion *string `min:"1" type:"string"` + + // A structure that contains information about how often the canary is to run, + // and when these runs are to stop. + Schedule *CanaryScheduleOutput `type:"structure"` + + // A structure that contains information about the canary's status. + Status *CanaryStatus `type:"structure"` + + // The number of days to retain data about successful runs of this canary. + SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // The list of key-value pairs that are associated with the canary. + Tags map[string]*string `min:"1" type:"map"` + + // A structure that contains information about when the canary was created, + // modified, and most recently run. + Timeline *CanaryTimeline `type:"structure"` + + // If this canary is to test an endpoint in a VPC, this structure contains information + // about the subnets and security groups of the VPC endpoint. For more information, + // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). + VpcConfig *VpcConfigOutput `type:"structure"` +} + +// String returns the string representation +func (s Canary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Canary) GoString() string { + return s.String() +} + +// SetArtifactS3Location sets the ArtifactS3Location field's value. +func (s *Canary) SetArtifactS3Location(v string) *Canary { + s.ArtifactS3Location = &v + return s +} + +// SetCode sets the Code field's value. +func (s *Canary) SetCode(v *CanaryCodeOutput) *Canary { + s.Code = v + return s +} + +// SetEngineArn sets the EngineArn field's value. +func (s *Canary) SetEngineArn(v string) *Canary { + s.EngineArn = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *Canary) SetExecutionRoleArn(v string) *Canary { + s.ExecutionRoleArn = &v + return s +} + +// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. +func (s *Canary) SetFailureRetentionPeriodInDays(v int64) *Canary { + s.FailureRetentionPeriodInDays = &v + return s +} + +// SetId sets the Id field's value. +func (s *Canary) SetId(v string) *Canary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *Canary) SetName(v string) *Canary { + s.Name = &v + return s +} + +// SetRunConfig sets the RunConfig field's value. +func (s *Canary) SetRunConfig(v *CanaryRunConfigOutput) *Canary { + s.RunConfig = v + return s +} + +// SetRuntimeVersion sets the RuntimeVersion field's value. +func (s *Canary) SetRuntimeVersion(v string) *Canary { + s.RuntimeVersion = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *Canary) SetSchedule(v *CanaryScheduleOutput) *Canary { + s.Schedule = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Canary) SetStatus(v *CanaryStatus) *Canary { + s.Status = v + return s +} + +// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. +func (s *Canary) SetSuccessRetentionPeriodInDays(v int64) *Canary { + s.SuccessRetentionPeriodInDays = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Canary) SetTags(v map[string]*string) *Canary { + s.Tags = v + return s +} + +// SetTimeline sets the Timeline field's value. +func (s *Canary) SetTimeline(v *CanaryTimeline) *Canary { + s.Timeline = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *Canary) SetVpcConfig(v *VpcConfigOutput) *Canary { + s.VpcConfig = v + return s +} + +// Use this structure to input your script code for the canary. This structure +// contains the Lambda handler with the location where the canary should start +// running the script. If the script is stored in an S3 bucket, the bucket name, +// key, and version are also included. If the script was passed into the canary +// directly, the script code is contained in the value of Zipfile. +type CanaryCodeInput struct { + _ struct{} `type:"structure"` + + // The entry point to use for the source code when running the canary. This + // value must end with the string .handler. + // + // Handler is a required field + Handler *string `min:"1" type:"string" required:"true"` + + // If your canary script is located in S3, specify the full bucket name here. + // The bucket must already exist. Specify the full bucket name, including s3:// + // as the start of the bucket name. + S3Bucket *string `min:"1" type:"string"` + + // The S3 key of your script. For more information, see Working with Amazon + // S3 Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html). + S3Key *string `min:"1" type:"string"` + + // The S3 version ID of your script. + S3Version *string `min:"1" type:"string"` + + // If you input your canary script directly into the canary instead of referring + // to an S3 location, the value of this parameter is the .zip file that contains + // the script. It can be up to 5 MB. + // + // ZipFile is automatically base64 encoded/decoded by the SDK. + ZipFile []byte `min:"1" type:"blob"` +} + +// String returns the string representation +func (s CanaryCodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryCodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CanaryCodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CanaryCodeInput"} + if s.Handler == nil { + invalidParams.Add(request.NewErrParamRequired("Handler")) + } + if s.Handler != nil && len(*s.Handler) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Handler", 1)) + } + if s.S3Bucket != nil && len(*s.S3Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 1)) + } + if s.S3Key != nil && len(*s.S3Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) + } + if s.S3Version != nil && len(*s.S3Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Version", 1)) + } + if s.ZipFile != nil && len(s.ZipFile) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ZipFile", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHandler sets the Handler field's value. +func (s *CanaryCodeInput) SetHandler(v string) *CanaryCodeInput { + s.Handler = &v + return s +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *CanaryCodeInput) SetS3Bucket(v string) *CanaryCodeInput { + s.S3Bucket = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *CanaryCodeInput) SetS3Key(v string) *CanaryCodeInput { + s.S3Key = &v + return s +} + +// SetS3Version sets the S3Version field's value. +func (s *CanaryCodeInput) SetS3Version(v string) *CanaryCodeInput { + s.S3Version = &v + return s +} + +// SetZipFile sets the ZipFile field's value. +func (s *CanaryCodeInput) SetZipFile(v []byte) *CanaryCodeInput { + s.ZipFile = v + return s +} + +// This structure contains information about the canary's Lambda handler and +// where its code is stored by CloudWatch Synthetics. +type CanaryCodeOutput struct { + _ struct{} `type:"structure"` + + // The entry point to use for the source code when running the canary. + Handler *string `min:"1" type:"string"` + + // The ARN of the Lambda layer where Synthetics stores the canary script code. + SourceLocationArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CanaryCodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryCodeOutput) GoString() string { + return s.String() +} + +// SetHandler sets the Handler field's value. +func (s *CanaryCodeOutput) SetHandler(v string) *CanaryCodeOutput { + s.Handler = &v + return s +} + +// SetSourceLocationArn sets the SourceLocationArn field's value. +func (s *CanaryCodeOutput) SetSourceLocationArn(v string) *CanaryCodeOutput { + s.SourceLocationArn = &v + return s +} + +// This structure contains information about the most recent run of a single +// canary. +type CanaryLastRun struct { + _ struct{} `type:"structure"` + + // The name of the canary. + CanaryName *string `min:"1" type:"string"` + + // The results from this canary's most recent run. + LastRun *CanaryRun `type:"structure"` +} + +// String returns the string representation +func (s CanaryLastRun) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryLastRun) GoString() string { + return s.String() +} + +// SetCanaryName sets the CanaryName field's value. +func (s *CanaryLastRun) SetCanaryName(v string) *CanaryLastRun { + s.CanaryName = &v + return s +} + +// SetLastRun sets the LastRun field's value. +func (s *CanaryLastRun) SetLastRun(v *CanaryRun) *CanaryLastRun { + s.LastRun = v + return s +} + +// This structure contains the details about one run of one canary. +type CanaryRun struct { + _ struct{} `type:"structure"` + + // The location where the canary stored artifacts from the run. Artifacts include + // the log file, screenshots, and HAR files. + ArtifactS3Location *string `min:"1" type:"string"` + + // The name of the canary. + Name *string `min:"1" type:"string"` + + // The status of this run. + Status *CanaryRunStatus `type:"structure"` + + // A structure that contains the start and end times of this run. + Timeline *CanaryRunTimeline `type:"structure"` +} + +// String returns the string representation +func (s CanaryRun) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryRun) GoString() string { + return s.String() +} + +// SetArtifactS3Location sets the ArtifactS3Location field's value. +func (s *CanaryRun) SetArtifactS3Location(v string) *CanaryRun { + s.ArtifactS3Location = &v + return s +} + +// SetName sets the Name field's value. +func (s *CanaryRun) SetName(v string) *CanaryRun { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CanaryRun) SetStatus(v *CanaryRunStatus) *CanaryRun { + s.Status = v + return s +} + +// SetTimeline sets the Timeline field's value. +func (s *CanaryRun) SetTimeline(v *CanaryRunTimeline) *CanaryRun { + s.Timeline = v + return s +} + +// A structure that contains input information for a canary run. +type CanaryRunConfigInput struct { + _ struct{} `type:"structure"` + + // How long the canary is allowed to run before it must stop. If you omit this + // field, the frequency of the canary is used as this value, up to a maximum + // of 14 minutes. + // + // TimeoutInSeconds is a required field + TimeoutInSeconds *int64 `min:"60" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CanaryRunConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryRunConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CanaryRunConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CanaryRunConfigInput"} + if s.TimeoutInSeconds == nil { + invalidParams.Add(request.NewErrParamRequired("TimeoutInSeconds")) + } + if s.TimeoutInSeconds != nil && *s.TimeoutInSeconds < 60 { + invalidParams.Add(request.NewErrParamMinValue("TimeoutInSeconds", 60)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. +func (s *CanaryRunConfigInput) SetTimeoutInSeconds(v int64) *CanaryRunConfigInput { + s.TimeoutInSeconds = &v + return s +} + +// A structure that contains information for a canary run. +type CanaryRunConfigOutput struct { + _ struct{} `type:"structure"` + + // How long the canary is allowed to run before it must stop. + TimeoutInSeconds *int64 `min:"60" type:"integer"` +} + +// String returns the string representation +func (s CanaryRunConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryRunConfigOutput) GoString() string { + return s.String() +} + +// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. +func (s *CanaryRunConfigOutput) SetTimeoutInSeconds(v int64) *CanaryRunConfigOutput { + s.TimeoutInSeconds = &v + return s +} + +// This structure contains the status information about a canary run. +type CanaryRunStatus struct { + _ struct{} `type:"structure"` + + // The current state of the run. + State *string `type:"string" enum:"CanaryRunState"` + + // If run of the canary failed, this field contains the reason for the error. + StateReason *string `min:"1" type:"string"` + + // If this value is CANARY_FAILURE, an exception occurred in the canary code. + // If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics. + StateReasonCode *string `type:"string" enum:"CanaryRunStateReasonCode"` +} + +// String returns the string representation +func (s CanaryRunStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryRunStatus) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *CanaryRunStatus) SetState(v string) *CanaryRunStatus { + s.State = &v + return s +} + +// SetStateReason sets the StateReason field's value. +func (s *CanaryRunStatus) SetStateReason(v string) *CanaryRunStatus { + s.StateReason = &v + return s +} + +// SetStateReasonCode sets the StateReasonCode field's value. +func (s *CanaryRunStatus) SetStateReasonCode(v string) *CanaryRunStatus { + s.StateReasonCode = &v + return s +} + +// This structure contains the start and end times of a single canary run. +type CanaryRunTimeline struct { + _ struct{} `type:"structure"` + + // The end time of the run. + Completed *time.Time `type:"timestamp"` + + // The start time of the run. + Started *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CanaryRunTimeline) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryRunTimeline) GoString() string { + return s.String() +} + +// SetCompleted sets the Completed field's value. +func (s *CanaryRunTimeline) SetCompleted(v time.Time) *CanaryRunTimeline { + s.Completed = &v + return s +} + +// SetStarted sets the Started field's value. +func (s *CanaryRunTimeline) SetStarted(v time.Time) *CanaryRunTimeline { + s.Started = &v + return s +} + +// This structure specifies how often a canary is to make runs and the date +// and time when it should stop making runs. +type CanaryScheduleInput struct { + _ struct{} `type:"structure"` + + // How long, in seconds, for the canary to continue making regular runs according + // to the schedule in the Expression value. If you specify 0, the canary continues + // making runs until you stop it. If you omit this field, the default of 0 is + // used. + DurationInSeconds *int64 `type:"long"` + + // A rate expression that defines how often the canary is to run. The syntax + // is rate(number unit). unit can be minute, minutes, or hour. + // + // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) + // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. + // You can specify a frequency between rate(1 minute) and rate(1 hour). + // + // Specifying rate(0 minute) or rate(0 hour) is a special value that causes + // the canary to run only once when it is started. + // + // Expression is a required field + Expression *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CanaryScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CanaryScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CanaryScheduleInput"} + if s.Expression == nil { + invalidParams.Add(request.NewErrParamRequired("Expression")) + } + if s.Expression != nil && len(*s.Expression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDurationInSeconds sets the DurationInSeconds field's value. +func (s *CanaryScheduleInput) SetDurationInSeconds(v int64) *CanaryScheduleInput { + s.DurationInSeconds = &v + return s +} + +// SetExpression sets the Expression field's value. +func (s *CanaryScheduleInput) SetExpression(v string) *CanaryScheduleInput { + s.Expression = &v + return s +} + +// How long, in seconds, for the canary to continue making regular runs according +// to the schedule in the Expression value. +type CanaryScheduleOutput struct { + _ struct{} `type:"structure"` + + // How long, in seconds, for the canary to continue making regular runs after + // it was created. The runs are performed according to the schedule in the Expression + // value. + DurationInSeconds *int64 `type:"long"` + + // A rate expression that defines how often the canary is to run. The syntax + // is rate(number unit). unit can be minute, minutes, or hour. + // + // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) + // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. + // + // Specifying rate(0 minute) or rate(0 hour) is a special value that causes + // the canary to run only once when it is started. + Expression *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CanaryScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryScheduleOutput) GoString() string { + return s.String() +} + +// SetDurationInSeconds sets the DurationInSeconds field's value. +func (s *CanaryScheduleOutput) SetDurationInSeconds(v int64) *CanaryScheduleOutput { + s.DurationInSeconds = &v + return s +} + +// SetExpression sets the Expression field's value. +func (s *CanaryScheduleOutput) SetExpression(v string) *CanaryScheduleOutput { + s.Expression = &v + return s +} + +// A structure that contains the current state of the canary. +type CanaryStatus struct { + _ struct{} `type:"structure"` + + // The current state of the canary. + State *string `type:"string" enum:"CanaryState"` + + // If the canary has insufficient permissions to run, this field provides more + // details. + StateReason *string `min:"1" type:"string"` + + // If the canary cannot run or has failed, this field displays the reason. + StateReasonCode *string `type:"string" enum:"CanaryStateReasonCode"` +} + +// String returns the string representation +func (s CanaryStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryStatus) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *CanaryStatus) SetState(v string) *CanaryStatus { + s.State = &v + return s +} + +// SetStateReason sets the StateReason field's value. +func (s *CanaryStatus) SetStateReason(v string) *CanaryStatus { + s.StateReason = &v + return s +} + +// SetStateReasonCode sets the StateReasonCode field's value. +func (s *CanaryStatus) SetStateReasonCode(v string) *CanaryStatus { + s.StateReasonCode = &v + return s +} + +// This structure contains information about when the canary was created and +// modified. +type CanaryTimeline struct { + _ struct{} `type:"structure"` + + // The date and time the canary was created. + Created *time.Time `type:"timestamp"` + + // The date and time the canary was most recently modified. + LastModified *time.Time `type:"timestamp"` + + // The date and time that the canary's most recent run started. + LastStarted *time.Time `type:"timestamp"` + + // The date and time that the canary's most recent run ended. + LastStopped *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CanaryTimeline) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CanaryTimeline) GoString() string { + return s.String() +} + +// SetCreated sets the Created field's value. +func (s *CanaryTimeline) SetCreated(v time.Time) *CanaryTimeline { + s.Created = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *CanaryTimeline) SetLastModified(v time.Time) *CanaryTimeline { + s.LastModified = &v + return s +} + +// SetLastStarted sets the LastStarted field's value. +func (s *CanaryTimeline) SetLastStarted(v time.Time) *CanaryTimeline { + s.LastStarted = &v + return s +} + +// SetLastStopped sets the LastStopped field's value. +func (s *CanaryTimeline) SetLastStopped(v time.Time) *CanaryTimeline { + s.LastStopped = &v + return s +} + +// A conflicting operation is already in progress. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConflictException) GoString() string { + return s.String() +} + +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CreateCanaryInput struct { + _ struct{} `type:"structure"` + + // The location in Amazon S3 where Synthetics stores artifacts from the test + // runs of this canary. Artifacts include the log file, screenshots, and HAR + // files. + // + // ArtifactS3Location is a required field + ArtifactS3Location *string `min:"1" type:"string" required:"true"` + + // A structure that includes the entry point from which the canary should start + // running your script. If the script is stored in an S3 bucket, the bucket + // name, key, and version are also included. + // + // Code is a required field + Code *CanaryCodeInput `type:"structure" required:"true"` + + // The ARN of the IAM role to be used to run the canary. This role must already + // exist, and must include lambda.amazonaws.com as a principal in the trust + // policy. The role must also have the following permissions: + // + // * s3:PutObject + // + // * s3:GetBucketLocation + // + // * s3:ListAllMyBuckets + // + // * cloudwatch:PutMetricData + // + // * logs:CreateLogGroup + // + // * logs:CreateLogStream + // + // * logs:CreateLogStream + // + // ExecutionRoleArn is a required field + ExecutionRoleArn *string `type:"string" required:"true"` + + // The number of days to retain data about failed runs of this canary. If you + // omit this field, the default of 31 days is used. The valid range is 1 to + // 455 days. + FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // The name for this canary. Be sure to give it a descriptive name that distinguishes + // it from other canaries in your account. + // + // Do not include secrets or proprietary information in your canary names. The + // canary name makes up part of the canary ARN, and the ARN is included in outbound + // calls over the internet. For more information, see Security Considerations + // for Synthetics Canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // A structure that contains the configuration for individual canary runs, such + // as timeout value. + RunConfig *CanaryRunConfigInput `type:"structure"` + + // Specifies the runtime version to use for the canary. Currently, the only + // valid value is syn-1.0. For more information about runtime versions, see + // Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). + // + // RuntimeVersion is a required field + RuntimeVersion *string `min:"1" type:"string" required:"true"` + + // A structure that contains information about how often the canary is to run + // and when these test runs are to stop. + // + // Schedule is a required field + Schedule *CanaryScheduleInput `type:"structure" required:"true"` + + // The number of days to retain data about successful runs of this canary. If + // you omit this field, the default of 31 days is used. The valid range is 1 + // to 455 days. + SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // A list of key-value pairs to associate with the canary. You can associate + // as many as 50 tags with a canary. + // + // Tags can help you organize and categorize your resources. You can also use + // them to scope user permissions, by granting a user permission to access or + // change only the resources that have certain tag values. + Tags map[string]*string `min:"1" type:"map"` + + // If this canary is to test an endpoint in a VPC, this structure contains information + // about the subnet and security groups of the VPC endpoint. For more information, + // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). + VpcConfig *VpcConfigInput `type:"structure"` +} + +// String returns the string representation +func (s CreateCanaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCanaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCanaryInput"} + if s.ArtifactS3Location == nil { + invalidParams.Add(request.NewErrParamRequired("ArtifactS3Location")) + } + if s.ArtifactS3Location != nil && len(*s.ArtifactS3Location) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ArtifactS3Location", 1)) + } + if s.Code == nil { + invalidParams.Add(request.NewErrParamRequired("Code")) + } + if s.ExecutionRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) + } + if s.FailureRetentionPeriodInDays != nil && *s.FailureRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("FailureRetentionPeriodInDays", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RuntimeVersion == nil { + invalidParams.Add(request.NewErrParamRequired("RuntimeVersion")) + } + if s.RuntimeVersion != nil && len(*s.RuntimeVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuntimeVersion", 1)) + } + if s.Schedule == nil { + invalidParams.Add(request.NewErrParamRequired("Schedule")) + } + if s.SuccessRetentionPeriodInDays != nil && *s.SuccessRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("SuccessRetentionPeriodInDays", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Code != nil { + if err := s.Code.Validate(); err != nil { + invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) + } + } + if s.RunConfig != nil { + if err := s.RunConfig.Validate(); err != nil { + invalidParams.AddNested("RunConfig", err.(request.ErrInvalidParams)) + } + } + if s.Schedule != nil { + if err := s.Schedule.Validate(); err != nil { + invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArtifactS3Location sets the ArtifactS3Location field's value. +func (s *CreateCanaryInput) SetArtifactS3Location(v string) *CreateCanaryInput { + s.ArtifactS3Location = &v + return s +} + +// SetCode sets the Code field's value. +func (s *CreateCanaryInput) SetCode(v *CanaryCodeInput) *CreateCanaryInput { + s.Code = v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *CreateCanaryInput) SetExecutionRoleArn(v string) *CreateCanaryInput { + s.ExecutionRoleArn = &v + return s +} + +// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. +func (s *CreateCanaryInput) SetFailureRetentionPeriodInDays(v int64) *CreateCanaryInput { + s.FailureRetentionPeriodInDays = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateCanaryInput) SetName(v string) *CreateCanaryInput { + s.Name = &v + return s +} + +// SetRunConfig sets the RunConfig field's value. +func (s *CreateCanaryInput) SetRunConfig(v *CanaryRunConfigInput) *CreateCanaryInput { + s.RunConfig = v + return s +} + +// SetRuntimeVersion sets the RuntimeVersion field's value. +func (s *CreateCanaryInput) SetRuntimeVersion(v string) *CreateCanaryInput { + s.RuntimeVersion = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *CreateCanaryInput) SetSchedule(v *CanaryScheduleInput) *CreateCanaryInput { + s.Schedule = v + return s +} + +// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. +func (s *CreateCanaryInput) SetSuccessRetentionPeriodInDays(v int64) *CreateCanaryInput { + s.SuccessRetentionPeriodInDays = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateCanaryInput) SetTags(v map[string]*string) *CreateCanaryInput { + s.Tags = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateCanaryInput) SetVpcConfig(v *VpcConfigInput) *CreateCanaryInput { + s.VpcConfig = v + return s +} + +type CreateCanaryOutput struct { + _ struct{} `type:"structure"` + + // The full details about the canary you have created. + Canary *Canary `type:"structure"` +} + +// String returns the string representation +func (s CreateCanaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCanaryOutput) GoString() string { + return s.String() +} + +// SetCanary sets the Canary field's value. +func (s *CreateCanaryOutput) SetCanary(v *Canary) *CreateCanaryOutput { + s.Canary = v + return s +} + +type DeleteCanaryInput struct { + _ struct{} `type:"structure"` + + // The name of the canary that you want to delete. To find the names of your + // canaries, use DescribeCanaries. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCanaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCanaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCanaryInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteCanaryInput) SetName(v string) *DeleteCanaryInput { + s.Name = &v + return s +} + +type DeleteCanaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCanaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCanaryOutput) GoString() string { + return s.String() +} + +type DescribeCanariesInput struct { + _ struct{} `type:"structure"` + + // Specify this parameter to limit how many canaries are returned each time + // you use the DescribeCanaries operation. If you omit this parameter, the default + // of 100 is used. + MaxResults *int64 `min:"1" type:"integer"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent operation to retrieve the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCanariesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCanariesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCanariesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeCanariesInput) SetMaxResults(v int64) *DescribeCanariesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesInput) SetNextToken(v string) *DescribeCanariesInput { + s.NextToken = &v + return s +} + +type DescribeCanariesLastRunInput struct { + _ struct{} `type:"structure"` + + // Specify this parameter to limit how many runs are returned each time you + // use the DescribeLastRun operation. If you omit this parameter, the default + // of 100 is used. + MaxResults *int64 `min:"1" type:"integer"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent DescribeCanaries operation to retrieve the next set + // of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCanariesLastRunInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCanariesLastRunInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCanariesLastRunInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesLastRunInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeCanariesLastRunInput) SetMaxResults(v int64) *DescribeCanariesLastRunInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesLastRunInput) SetNextToken(v string) *DescribeCanariesLastRunInput { + s.NextToken = &v + return s +} + +type DescribeCanariesLastRunOutput struct { + _ struct{} `type:"structure"` + + // An array that contains the information from the most recent run of each canary. + CanariesLastRun []*CanaryLastRun `type:"list"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent DescribeCanariesLastRun operation to retrieve the next + // set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCanariesLastRunOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCanariesLastRunOutput) GoString() string { + return s.String() +} + +// SetCanariesLastRun sets the CanariesLastRun field's value. +func (s *DescribeCanariesLastRunOutput) SetCanariesLastRun(v []*CanaryLastRun) *DescribeCanariesLastRunOutput { + s.CanariesLastRun = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesLastRunOutput) SetNextToken(v string) *DescribeCanariesLastRunOutput { + s.NextToken = &v + return s +} + +type DescribeCanariesOutput struct { + _ struct{} `type:"structure"` + + // Returns an array. Each item in the array contains the full information about + // one canary. + Canaries []*Canary `type:"list"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent DescribeCanaries operation to retrieve the next set + // of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCanariesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCanariesOutput) GoString() string { + return s.String() +} + +// SetCanaries sets the Canaries field's value. +func (s *DescribeCanariesOutput) SetCanaries(v []*Canary) *DescribeCanariesOutput { + s.Canaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesOutput) SetNextToken(v string) *DescribeCanariesOutput { + s.NextToken = &v + return s +} + +type DescribeRuntimeVersionsInput struct { + _ struct{} `type:"structure"` + + // Specify this parameter to limit how many runs are returned each time you + // use the DescribeRuntimeVersions operation. If you omit this parameter, the + // default of 100 is used. + MaxResults *int64 `min:"1" type:"integer"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent DescribeRuntimeVersions operation to retrieve the next + // set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeRuntimeVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRuntimeVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRuntimeVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRuntimeVersionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeRuntimeVersionsInput) SetMaxResults(v int64) *DescribeRuntimeVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRuntimeVersionsInput) SetNextToken(v string) *DescribeRuntimeVersionsInput { + s.NextToken = &v + return s +} + +type DescribeRuntimeVersionsOutput struct { + _ struct{} `type:"structure"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent DescribeRuntimeVersions operation to retrieve the next + // set of results. + NextToken *string `type:"string"` + + // An array of objects that display the details about each Synthetics canary + // runtime version. + RuntimeVersions []*RuntimeVersion `type:"list"` +} + +// String returns the string representation +func (s DescribeRuntimeVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRuntimeVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRuntimeVersionsOutput) SetNextToken(v string) *DescribeRuntimeVersionsOutput { + s.NextToken = &v + return s +} + +// SetRuntimeVersions sets the RuntimeVersions field's value. +func (s *DescribeRuntimeVersionsOutput) SetRuntimeVersions(v []*RuntimeVersion) *DescribeRuntimeVersionsOutput { + s.RuntimeVersions = v + return s +} + +type GetCanaryInput struct { + _ struct{} `type:"structure"` + + // The name of the canary that you want details for. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCanaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCanaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCanaryInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetCanaryInput) SetName(v string) *GetCanaryInput { + s.Name = &v + return s +} + +type GetCanaryOutput struct { + _ struct{} `type:"structure"` + + // A strucure that contains the full information about the canary. + Canary *Canary `type:"structure"` +} + +// String returns the string representation +func (s GetCanaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCanaryOutput) GoString() string { + return s.String() +} + +// SetCanary sets the Canary field's value. +func (s *GetCanaryOutput) SetCanary(v *Canary) *GetCanaryOutput { + s.Canary = v + return s +} + +type GetCanaryRunsInput struct { + _ struct{} `type:"structure"` + + // Specify this parameter to limit how many runs are returned each time you + // use the GetCanaryRuns operation. If you omit this parameter, the default + // of 100 is used. + MaxResults *int64 `min:"1" type:"integer"` + + // The name of the canary that you want to see runs for. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent GetCanaryRuns operation to retrieve the next set of + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetCanaryRunsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCanaryRunsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCanaryRunsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCanaryRunsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetCanaryRunsInput) SetMaxResults(v int64) *GetCanaryRunsInput { + s.MaxResults = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetCanaryRunsInput) SetName(v string) *GetCanaryRunsInput { + s.Name = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCanaryRunsInput) SetNextToken(v string) *GetCanaryRunsInput { + s.NextToken = &v + return s +} + +type GetCanaryRunsOutput struct { + _ struct{} `type:"structure"` + + // An array of structures. Each structure contains the details of one of the + // retrieved canary runs. + CanaryRuns []*CanaryRun `type:"list"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent GetCanaryRuns operation to retrieve the next set of + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetCanaryRunsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCanaryRunsOutput) GoString() string { + return s.String() +} + +// SetCanaryRuns sets the CanaryRuns field's value. +func (s *GetCanaryRunsOutput) SetCanaryRuns(v []*CanaryRun) *GetCanaryRunsOutput { + s.CanaryRuns = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCanaryRunsOutput) SetNextToken(v string) *GetCanaryRunsOutput { + s.NextToken = &v + return s +} + +// An unknown internal error occurred. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the canary that you want to view tags for. + // + // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The list of tag keys and values associated with the canary that you specified. + Tags map[string]*string `min:"1" type:"map"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// One of the specified resources was not found. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// This structure contains information about one canary runtime version. For +// more information about runtime versions, see Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). +type RuntimeVersion struct { + _ struct{} `type:"structure"` + + // If this runtime version is deprecated, this value is the date of deprecation. + DeprecationDate *time.Time `type:"timestamp"` + + // A description of the runtime version, created by Amazon. + Description *string `min:"1" type:"string"` + + // The date that the runtime version was released. + ReleaseDate *time.Time `type:"timestamp"` + + // The name of the runtime version. Currently, the only valid value is syn-1.0. + // + // Specifies the runtime version to use for the canary. Currently, the only + // valid value is syn-1.0. + VersionName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s RuntimeVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RuntimeVersion) GoString() string { + return s.String() +} + +// SetDeprecationDate sets the DeprecationDate field's value. +func (s *RuntimeVersion) SetDeprecationDate(v time.Time) *RuntimeVersion { + s.DeprecationDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RuntimeVersion) SetDescription(v string) *RuntimeVersion { + s.Description = &v + return s +} + +// SetReleaseDate sets the ReleaseDate field's value. +func (s *RuntimeVersion) SetReleaseDate(v time.Time) *RuntimeVersion { + s.ReleaseDate = &v + return s +} + +// SetVersionName sets the VersionName field's value. +func (s *RuntimeVersion) SetVersionName(v string) *RuntimeVersion { + s.VersionName = &v + return s +} + +type StartCanaryInput struct { + _ struct{} `type:"structure"` + + // The name of the canary that you want to run. To find canary names, use DescribeCanaries. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartCanaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartCanaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartCanaryInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *StartCanaryInput) SetName(v string) *StartCanaryInput { + s.Name = &v + return s +} + +type StartCanaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartCanaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartCanaryOutput) GoString() string { + return s.String() +} + +type StopCanaryInput struct { + _ struct{} `type:"structure"` + + // The name of the canary that you want to stop. To find the names of your canaries, + // use DescribeCanaries. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopCanaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopCanaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopCanaryInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *StopCanaryInput) SetName(v string) *StopCanaryInput { + s.Name = &v + return s +} + +type StopCanaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopCanaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopCanaryOutput) GoString() string { + return s.String() +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the canary that you're adding tags to. + // + // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // The list of key-value pairs to associate with the canary. + // + // Tags is a required field + Tags map[string]*string `min:"1" type:"map" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v map[string]*string) *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 ARN of the canary that you're removing tags from. + // + // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // The list of tag keys to remove from the resource. + // + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &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 UpdateCanaryInput struct { + _ struct{} `type:"structure"` + + // A structure that includes the entry point from which the canary should start + // running your script. If the script is stored in an S3 bucket, the bucket + // name, key, and version are also included. + Code *CanaryCodeInput `type:"structure"` + + // The ARN of the IAM role to be used to run the canary. This role must already + // exist, and must include lambda.amazonaws.com as a principal in the trust + // policy. The role must also have the following permissions: + // + // * s3:PutObject + // + // * s3:GetBucketLocation + // + // * s3:ListAllMyBuckets + // + // * cloudwatch:PutMetricData + // + // * logs:CreateLogGroup + // + // * logs:CreateLogStream + // + // * logs:CreateLogStream + ExecutionRoleArn *string `type:"string"` + + // The number of days to retain data about failed runs of this canary. + FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // The name of the canary that you want to update. To find the names of your + // canaries, use DescribeCanaries. + // + // You cannot change the name of a canary that has already been created. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + + // A structure that contains the timeout value that is used for each individual + // run of the canary. + RunConfig *CanaryRunConfigInput `type:"structure"` + + // Specifies the runtime version to use for the canary. Currently, the only + // valid value is syn-1.0. For more information about runtime versions, see + // Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). + RuntimeVersion *string `min:"1" type:"string"` + + // A structure that contains information about how often the canary is to run, + // and when these runs are to stop. + Schedule *CanaryScheduleInput `type:"structure"` + + // The number of days to retain data about successful runs of this canary. + SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // If this canary is to test an endpoint in a VPC, this structure contains information + // about the subnet and security groups of the VPC endpoint. For more information, + // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). + VpcConfig *VpcConfigInput `type:"structure"` +} + +// String returns the string representation +func (s UpdateCanaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCanaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCanaryInput"} + if s.FailureRetentionPeriodInDays != nil && *s.FailureRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("FailureRetentionPeriodInDays", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RuntimeVersion != nil && len(*s.RuntimeVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuntimeVersion", 1)) + } + if s.SuccessRetentionPeriodInDays != nil && *s.SuccessRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("SuccessRetentionPeriodInDays", 1)) + } + if s.Code != nil { + if err := s.Code.Validate(); err != nil { + invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) + } + } + if s.RunConfig != nil { + if err := s.RunConfig.Validate(); err != nil { + invalidParams.AddNested("RunConfig", err.(request.ErrInvalidParams)) + } + } + if s.Schedule != nil { + if err := s.Schedule.Validate(); err != nil { + invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCode sets the Code field's value. +func (s *UpdateCanaryInput) SetCode(v *CanaryCodeInput) *UpdateCanaryInput { + s.Code = v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *UpdateCanaryInput) SetExecutionRoleArn(v string) *UpdateCanaryInput { + s.ExecutionRoleArn = &v + return s +} + +// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. +func (s *UpdateCanaryInput) SetFailureRetentionPeriodInDays(v int64) *UpdateCanaryInput { + s.FailureRetentionPeriodInDays = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateCanaryInput) SetName(v string) *UpdateCanaryInput { + s.Name = &v + return s +} + +// SetRunConfig sets the RunConfig field's value. +func (s *UpdateCanaryInput) SetRunConfig(v *CanaryRunConfigInput) *UpdateCanaryInput { + s.RunConfig = v + return s +} + +// SetRuntimeVersion sets the RuntimeVersion field's value. +func (s *UpdateCanaryInput) SetRuntimeVersion(v string) *UpdateCanaryInput { + s.RuntimeVersion = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *UpdateCanaryInput) SetSchedule(v *CanaryScheduleInput) *UpdateCanaryInput { + s.Schedule = v + return s +} + +// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. +func (s *UpdateCanaryInput) SetSuccessRetentionPeriodInDays(v int64) *UpdateCanaryInput { + s.SuccessRetentionPeriodInDays = &v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *UpdateCanaryInput) SetVpcConfig(v *VpcConfigInput) *UpdateCanaryInput { + s.VpcConfig = v + return s +} + +type UpdateCanaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateCanaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCanaryOutput) GoString() string { + return s.String() +} + +// A parameter could not be validated. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} + +// If this canary is to test an endpoint in a VPC, this structure contains information +// about the subnets and security groups of the VPC endpoint. For more information, +// see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). +type VpcConfigInput struct { + _ struct{} `type:"structure"` + + // The IDs of the security groups for this canary. + SecurityGroupIds []*string `type:"list"` + + // The IDs of the subnets where this canary is to run. + SubnetIds []*string `type:"list"` +} + +// String returns the string representation +func (s VpcConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfigInput) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfigInput) SetSecurityGroupIds(v []*string) *VpcConfigInput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfigInput) SetSubnetIds(v []*string) *VpcConfigInput { + s.SubnetIds = v + return s +} + +// If this canary is to test an endpoint in a VPC, this structure contains information +// about the subnets and security groups of the VPC endpoint. For more information, +// see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). +type VpcConfigOutput struct { + _ struct{} `type:"structure"` + + // The IDs of the security groups for this canary. + SecurityGroupIds []*string `type:"list"` + + // The IDs of the subnets where this canary is to run. + SubnetIds []*string `type:"list"` + + // The IDs of the VPC where this canary is to run. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s VpcConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfigOutput) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfigOutput) SetSecurityGroupIds(v []*string) *VpcConfigOutput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfigOutput) SetSubnetIds(v []*string) *VpcConfigOutput { + s.SubnetIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *VpcConfigOutput) SetVpcId(v string) *VpcConfigOutput { + s.VpcId = &v + return s +} + +const ( + // CanaryRunStateRunning is a CanaryRunState enum value + CanaryRunStateRunning = "RUNNING" + + // CanaryRunStatePassed is a CanaryRunState enum value + CanaryRunStatePassed = "PASSED" + + // CanaryRunStateFailed is a CanaryRunState enum value + CanaryRunStateFailed = "FAILED" +) + +const ( + // CanaryRunStateReasonCodeCanaryFailure is a CanaryRunStateReasonCode enum value + CanaryRunStateReasonCodeCanaryFailure = "CANARY_FAILURE" + + // CanaryRunStateReasonCodeExecutionFailure is a CanaryRunStateReasonCode enum value + CanaryRunStateReasonCodeExecutionFailure = "EXECUTION_FAILURE" +) + +const ( + // CanaryStateCreating is a CanaryState enum value + CanaryStateCreating = "CREATING" + + // CanaryStateReady is a CanaryState enum value + CanaryStateReady = "READY" + + // CanaryStateStarting is a CanaryState enum value + CanaryStateStarting = "STARTING" + + // CanaryStateRunning is a CanaryState enum value + CanaryStateRunning = "RUNNING" + + // CanaryStateUpdating is a CanaryState enum value + CanaryStateUpdating = "UPDATING" + + // CanaryStateStopping is a CanaryState enum value + CanaryStateStopping = "STOPPING" + + // CanaryStateStopped is a CanaryState enum value + CanaryStateStopped = "STOPPED" + + // CanaryStateError is a CanaryState enum value + CanaryStateError = "ERROR" + + // CanaryStateDeleting is a CanaryState enum value + CanaryStateDeleting = "DELETING" +) + +const ( + // CanaryStateReasonCodeInvalidPermissions is a CanaryStateReasonCode enum value + CanaryStateReasonCodeInvalidPermissions = "INVALID_PERMISSIONS" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/synthetics/doc.go b/vendor/github.com/aws/aws-sdk-go/service/synthetics/doc.go new file mode 100644 index 00000000000..8a25de917d0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/synthetics/doc.go @@ -0,0 +1,42 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package synthetics provides the client and types for making API +// requests to Synthetics. +// +// You can use Amazon CloudWatch Synthetics to continually monitor your services. +// You can create and manage canaries, which are modular, lightweight scripts +// that monitor your endpoints and APIs from the outside-in. You can set up +// your canaries to run 24 hours a day, once per minute. The canaries help you +// check the availability and latency of your web services and troubleshoot +// anomalies by investigating load time data, screenshots of the UI, logs, and +// metrics. The canaries seamlessly integrate with CloudWatch ServiceLens to +// help you trace the causes of impacted nodes in your applications. For more +// information, see Using ServiceLens to Monitor the Health of Your Applications +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ServiceLens.html) +// in the Amazon CloudWatch User Guide. +// +// Before you create and manage canaries, be aware of the security considerations. +// For more information, see Security Considerations for Synthetics Canaries +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11 for more information on this service. +// +// See synthetics package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/synthetics/ +// +// Using the Client +// +// To contact Synthetics 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 Synthetics client Synthetics for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/synthetics/#New +package synthetics diff --git a/vendor/github.com/aws/aws-sdk-go/service/synthetics/errors.go b/vendor/github.com/aws/aws-sdk-go/service/synthetics/errors.go new file mode 100644 index 00000000000..28559807882 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/synthetics/errors.go @@ -0,0 +1,41 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package synthetics + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // A conflicting operation is already in progress. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // An unknown internal error occurred. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // One of the specified resources was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // A parameter could not be validated. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "ConflictException": newErrorConflictException, + "InternalServerException": newErrorInternalServerException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ValidationException": newErrorValidationException, +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/synthetics/service.go b/vendor/github.com/aws/aws-sdk-go/service/synthetics/service.go new file mode 100644 index 00000000000..e957283a593 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/synthetics/service.go @@ -0,0 +1,104 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package synthetics + +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" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// Synthetics provides the API operation methods for making requests to +// Synthetics. See this package's package overview docs +// for details on the service. +// +// Synthetics methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Synthetics 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 = "synthetics" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "synthetics" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the Synthetics 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: +// mySession := session.Must(session.NewSession()) +// +// // Create a Synthetics client from just a session. +// svc := synthetics.New(mySession) +// +// // Create a Synthetics client with additional configuration +// svc := synthetics.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Synthetics { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "synthetics" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *Synthetics { + svc := &Synthetics{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2017-10-11", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Synthetics operation and runs any +// custom request initialization. +func (c *Synthetics) 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/transfer/api.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go index eba6b2235f5..2bb9c8f3628 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/api.go @@ -55,26 +55,29 @@ func (c *Transfer) CreateServerRequest(input *CreateServerInput) (req *request.R return } -// CreateServer API operation for AWS Transfer for SFTP. +// CreateServer API operation for AWS Transfer Family. // -// Instantiates an autoscaling virtual server based on Secure File Transfer -// Protocol (SFTP) in AWS. When you make updates to your server or when you -// work with users, use the service-generated ServerId property that is assigned -// to the newly created server. +// Instantiates an autoscaling virtual server based on the selected file transfer +// protocol in AWS. When you make updates to your file transfer protocol-enabled +// server or when you work with users, use the service-generated ServerId property +// that is assigned to the newly created server. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation CreateServer for usage and error information. // // Returned Error Types: +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -83,6 +86,11 @@ func (c *Transfer) CreateServerRequest(input *CreateServerInput) (req *request.R // * ResourceExistsException // The requested resource does not exist. // +// * ThrottlingException +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer func (c *Transfer) CreateServer(input *CreateServerInput) (*CreateServerOutput, error) { req, out := c.CreateServerRequest(input) @@ -147,29 +155,29 @@ func (c *Transfer) CreateUserRequest(input *CreateUserInput) (req *request.Reque return } -// CreateUser API operation for AWS Transfer for SFTP. +// CreateUser API operation for AWS Transfer Family. // -// Creates a user and associates them with an existing Secure File Transfer -// Protocol (SFTP) server. You can only create and associate users with SFTP -// servers that have the IdentityProviderType set to SERVICE_MANAGED. Using -// parameters for CreateUser, you can specify the user name, set the home directory, -// store the user's public key, and assign the user's AWS Identity and Access -// Management (IAM) role. You can also optionally add a scope-down policy, and -// assign metadata with tags that can be used to group and search for users. +// Creates a user and associates them with an existing file transfer protocol-enabled +// server. You can only create and associate users with servers that have the +// IdentityProviderType set to SERVICE_MANAGED. Using parameters for CreateUser, +// you can specify the user name, set the home directory, store the user's public +// key, and assign the user's AWS Identity and Access Management (IAM) role. +// You can also optionally add a scope-down policy, and assign metadata with +// tags that can be used to group and search for users. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation CreateUser for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -180,7 +188,7 @@ func (c *Transfer) CreateUserRequest(input *CreateUserInput) (req *request.Reque // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser func (c *Transfer) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { @@ -247,9 +255,9 @@ func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.R return } -// DeleteServer API operation for AWS Transfer for SFTP. +// DeleteServer API operation for AWS Transfer Family. // -// Deletes the Secure File Transfer Protocol (SFTP) server that you specify. +// Deletes the file transfer protocol-enabled server that you specify. // // No response returns from this operation. // @@ -257,15 +265,18 @@ func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.R // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation DeleteServer for usage and error information. // // Returned Error Types: +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -273,7 +284,7 @@ func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.R // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer func (c *Transfer) DeleteServer(input *DeleteServerInput) (*DeleteServerOutput, error) { @@ -340,7 +351,7 @@ func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (re return } -// DeleteSshPublicKey API operation for AWS Transfer for SFTP. +// DeleteSshPublicKey API operation for AWS Transfer Family. // // Deletes a user's Secure Shell (SSH) public key. // @@ -350,15 +361,15 @@ func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (re // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation DeleteSshPublicKey for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -366,7 +377,7 @@ func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (re // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // * ThrottlingException // The request was denied due to request throttling. @@ -438,9 +449,10 @@ func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Reque return } -// DeleteUser API operation for AWS Transfer for SFTP. +// DeleteUser API operation for AWS Transfer Family. // -// Deletes the user belonging to the server you specify. +// Deletes the user belonging to a file transfer protocol-enabled server you +// specify. // // No response returns from this operation. // @@ -450,15 +462,15 @@ func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Reque // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation DeleteUser for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -466,7 +478,7 @@ func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Reque // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser func (c *Transfer) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { @@ -532,26 +544,27 @@ func (c *Transfer) DescribeServerRequest(input *DescribeServerInput) (req *reque return } -// DescribeServer API operation for AWS Transfer for SFTP. +// DescribeServer API operation for AWS Transfer Family. // -// Describes the server that you specify by passing the ServerId parameter. +// Describes a file transfer protocol-enabled server that you specify by passing +// the ServerId parameter. // -// The response contains a description of the server's properties. When you -// set EndpointType to VPC, the response will contain the EndpointDetails. +// The response contains a description of a server's properties. When you set +// EndpointType to VPC, the response will contain the EndpointDetails. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation DescribeServer for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -559,7 +572,7 @@ func (c *Transfer) DescribeServerRequest(input *DescribeServerInput) (req *reque // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer func (c *Transfer) DescribeServer(input *DescribeServerInput) (*DescribeServerOutput, error) { @@ -625,10 +638,10 @@ func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.R return } -// DescribeUser API operation for AWS Transfer for SFTP. +// DescribeUser API operation for AWS Transfer Family. // -// Describes the user assigned to a specific server, as identified by its ServerId -// property. +// Describes the user assigned to the specific file transfer protocol-enabled +// server, as identified by its ServerId property. // // The response from this call returns the properties of the user associated // with the ServerId value that was specified. @@ -637,15 +650,15 @@ func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.R // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation DescribeUser for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -653,7 +666,7 @@ func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.R // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser func (c *Transfer) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) { @@ -719,10 +732,11 @@ func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (re return } -// ImportSshPublicKey API operation for AWS Transfer for SFTP. +// ImportSshPublicKey API operation for AWS Transfer Family. // // Adds a Secure Shell (SSH) public key to a user account identified by a UserName -// value assigned to a specific server, identified by ServerId. +// value assigned to the specific file transfer protocol-enabled server, identified +// by ServerId. // // The response returns the UserName value, the ServerId value, and the name // of the SshPublicKeyId. @@ -731,15 +745,15 @@ func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (re // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation ImportSshPublicKey for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -750,7 +764,7 @@ func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (re // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // * ThrottlingException // The request was denied due to request throttling. @@ -827,24 +841,24 @@ func (c *Transfer) ListServersRequest(input *ListServersInput) (req *request.Req return } -// ListServers API operation for AWS Transfer for SFTP. +// ListServers API operation for AWS Transfer Family. // -// Lists the Secure File Transfer Protocol (SFTP) servers that are associated -// with your AWS account. +// Lists the file transfer protocol-enabled servers that are associated with +// 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 Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation ListServers for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidNextTokenException @@ -975,7 +989,7 @@ func (c *Transfer) ListTagsForResourceRequest(input *ListTagsForResourceInput) ( return } -// ListTagsForResource API operation for AWS Transfer for SFTP. +// ListTagsForResource API operation for AWS Transfer Family. // // Lists all of the tags associated with the Amazon Resource Number (ARN) you // specify. The resource can be a user, server, or role. @@ -984,15 +998,15 @@ func (c *Transfer) ListTagsForResourceRequest(input *ListTagsForResourceInput) ( // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation ListTagsForResource for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidNextTokenException @@ -1123,23 +1137,24 @@ func (c *Transfer) ListUsersRequest(input *ListUsersInput) (req *request.Request return } -// ListUsers API operation for AWS Transfer for SFTP. +// ListUsers API operation for AWS Transfer Family. // -// Lists the users for the server that you specify by passing the ServerId parameter. +// Lists the users for a file transfer protocol-enabled server that you specify +// by passing the ServerId parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation ListUsers for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidNextTokenException @@ -1150,7 +1165,7 @@ func (c *Transfer) ListUsersRequest(input *ListUsersInput) (req *request.Request // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers func (c *Transfer) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { @@ -1269,11 +1284,11 @@ func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Req return } -// StartServer API operation for AWS Transfer for SFTP. +// StartServer API operation for AWS Transfer Family. // -// Changes the state of a Secure File Transfer Protocol (SFTP) server from OFFLINE -// to ONLINE. It has no impact on an SFTP server that is already ONLINE. An -// ONLINE server can accept and process file transfer jobs. +// Changes the state of a file transfer protocol-enabled server from OFFLINE +// to ONLINE. It has no impact on a server that is already ONLINE. An ONLINE +// server can accept and process file transfer jobs. // // The state of STARTING indicates that the server is in an intermediate state, // either not fully able to respond, or not fully online. The values of START_FAILED @@ -1285,15 +1300,15 @@ func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Req // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation StartServer for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1301,7 +1316,7 @@ func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Req // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // * ThrottlingException // The request was denied due to request throttling. @@ -1373,13 +1388,13 @@ func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Reque return } -// StopServer API operation for AWS Transfer for SFTP. +// StopServer API operation for AWS Transfer Family. // -// Changes the state of an SFTP server from ONLINE to OFFLINE. An OFFLINE server -// cannot accept and process file transfer jobs. Information tied to your server -// such as server and user properties are not affected by stopping your server. -// Stopping a server will not reduce or impact your Secure File Transfer Protocol -// (SFTP) endpoint billing. +// Changes the state of a file transfer protocol-enabled server from ONLINE +// to OFFLINE. An OFFLINE server cannot accept and process file transfer jobs. +// Information tied to your server, such as server and user properties, are +// not affected by stopping your server. Stopping the server will not reduce +// or impact your file transfer protocol endpoint billing. // // The state of STOPPING indicates that the server is in an intermediate state, // either not fully able to respond, or not fully offline. The values of STOP_FAILED @@ -1391,15 +1406,15 @@ func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Reque // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation StopServer for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1407,7 +1422,7 @@ func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Reque // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // * ThrottlingException // The request was denied due to request throttling. @@ -1479,7 +1494,7 @@ func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Req return } -// TagResource API operation for AWS Transfer for SFTP. +// TagResource API operation for AWS Transfer Family. // // Attaches a key-value pair to a resource, as identified by its Amazon Resource // Name (ARN). Resources are users, servers, roles, and other entities. @@ -1490,15 +1505,15 @@ func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Req // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation TagResource for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1506,7 +1521,7 @@ func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Req // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource func (c *Transfer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { @@ -1572,27 +1587,28 @@ func (c *Transfer) TestIdentityProviderRequest(input *TestIdentityProviderInput) return } -// TestIdentityProvider API operation for AWS Transfer for SFTP. +// TestIdentityProvider API operation for AWS Transfer Family. // -// If the IdentityProviderType of the server is API_Gateway, tests whether your -// API Gateway is set up successfully. We highly recommend that you call this -// operation to test your authentication method as soon as you create your server. -// By doing so, you can troubleshoot issues with the API Gateway integration -// to ensure that your users can successfully use the service. +// If the IdentityProviderType of a file transfer protocol-enabled server is +// API_Gateway, tests whether your API Gateway is set up successfully. We highly +// recommend that you call this operation to test your authentication method +// as soon as you create your server. By doing so, you can troubleshoot issues +// with the API Gateway integration to ensure that your users can successfully +// use the service. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation TestIdentityProvider for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1600,7 +1616,7 @@ func (c *Transfer) TestIdentityProviderRequest(input *TestIdentityProviderInput) // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider func (c *Transfer) TestIdentityProvider(input *TestIdentityProviderInput) (*TestIdentityProviderOutput, error) { @@ -1667,7 +1683,7 @@ func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request return } -// UntagResource API operation for AWS Transfer for SFTP. +// UntagResource API operation for AWS Transfer Family. // // Detaches a key-value pair from a resource, as identified by its Amazon Resource // Name (ARN). Resources are users, servers, roles, and other entities. @@ -1678,15 +1694,15 @@ func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation UntagResource for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1694,7 +1710,7 @@ func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource func (c *Transfer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { @@ -1760,31 +1776,34 @@ func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.R return } -// UpdateServer API operation for AWS Transfer for SFTP. +// UpdateServer API operation for AWS Transfer Family. // -// Updates the server properties after that server has been created. +// Updates the file transfer protocol-enabled server's properties after that +// server has been created. // -// The UpdateServer call returns the ServerId of the Secure File Transfer Protocol -// (SFTP) server you updated. +// The UpdateServer call returns the ServerId of the server you updated. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation UpdateServer for usage and error information. // // Returned Error Types: +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * ConflictException -// This exception is thrown when the UpdatServer is called for a server that -// has VPC as the endpoint type and the server's VpcEndpointID is not in the -// available state. +// This exception is thrown when the UpdatServer is called for a file transfer +// protocol-enabled server that has VPC as the endpoint type and the server's +// VpcEndpointID is not in the available state. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1795,7 +1814,7 @@ func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.R // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // * ThrottlingException // The request was denied due to request throttling. @@ -1866,7 +1885,7 @@ func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Reque return } -// UpdateUser API operation for AWS Transfer for SFTP. +// UpdateUser API operation for AWS Transfer Family. // // Assigns new properties to a user. Parameters you pass modify any or all of // the following: the home directory, role, and policy for the UserName and @@ -1878,15 +1897,15 @@ func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Reque // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for AWS Transfer for SFTP's +// See the AWS API reference guide for AWS Transfer Family's // API operation UpdateUser for usage and error information. // // Returned Error Types: // * ServiceUnavailableException -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. // // * InternalServiceError -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. // // * InvalidRequestException @@ -1894,7 +1913,7 @@ func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Reque // // * ResourceNotFoundException // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. // // * ThrottlingException // The request was denied due to request throttling. @@ -1923,12 +1942,68 @@ func (c *Transfer) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput return out, req.Send() } -// This exception is thrown when the UpdatServer is called for a server that -// has VPC as the endpoint type and the server's VpcEndpointID is not in the -// available state. +// You do not have sufficient access to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// This exception is thrown when the UpdatServer is called for a file transfer +// protocol-enabled server that has VPC as the endpoint type and the server's +// VpcEndpointID is not in the available state. type ConflictException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -1945,17 +2020,17 @@ func (s ConflictException) GoString() string { func newErrorConflictException(v protocol.ResponseMetadata) error { return &ConflictException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ConflictException) Code() string { +func (s *ConflictException) Code() string { return "ConflictException" } // Message returns the exception's message. -func (s ConflictException) Message() string { +func (s *ConflictException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -1963,70 +2038,88 @@ func (s ConflictException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ConflictException) OrigErr() error { +func (s *ConflictException) OrigErr() error { return nil } -func (s ConflictException) Error() string { +func (s *ConflictException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ConflictException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ConflictException) RequestID() string { - return s.respMetadata.RequestID +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID } type CreateServerInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. + // Required when Protocols is set to FTPS. + Certificate *string `type:"string"` + // The virtual private cloud (VPC) endpoint settings that are configured for - // your SFTP server. With a VPC endpoint, you can restrict access to your SFTP - // server to resources only within your VPC. To control incoming internet traffic, - // you will need to invoke the UpdateServer API and attach an Elastic IP to - // your server's endpoint. + // your file transfer protocol-enabled server. When you host your endpoint within + // your VPC, you can make it accessible only to resources within your VPC, or + // you can attach Elastic IPs and make it accessible to clients over the internet. + // Your VPC's default security groups are automatically assigned to your endpoint. EndpointDetails *EndpointDetails `type:"structure"` - // The type of VPC endpoint that you want your SFTP server to connect to. You - // can choose to connect to the public internet or a virtual private cloud (VPC) - // endpoint. With a VPC endpoint, you can restrict access to your SFTP server - // and resources only within your VPC. + // The type of VPC endpoint that you want your file transfer protocol-enabled + // server to connect to. You can choose to connect to the public internet or + // a virtual private cloud (VPC) endpoint. With a VPC endpoint, you can restrict + // access to your server and resources only within your VPC. EndpointType *string `type:"string" enum:"EndpointType"` // The RSA private key as generated by the ssh-keygen -N "" -f my-new-server-key // command. // - // If you aren't planning to migrate existing users from an existing SFTP server - // to a new AWS SFTP server, don't update the host key. Accidentally changing + // If you aren't planning to migrate existing users from an existing SFTP-enabled + // server to a new server, don't update the host key. Accidentally changing // a server's host key can be disruptive. // - // For more information, see "https://alpha-docs-aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" - // in the AWS SFTP User Guide. + // For more information, see Changing the Host Key for Your AWS Transfer Family + // Server (https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key) + // in the AWS Transfer Family User Guide. HostKey *string `type:"string" sensitive:"true"` - // This parameter is required when the IdentityProviderType is set to API_GATEWAY. - // Accepts an array containing all of the information required to call a customer-supplied - // authentication API, including the API Gateway URL. This property is not required - // when the IdentityProviderType is set to SERVICE_MANAGED. + // Required when IdentityProviderType is set to API_GATEWAY. Accepts an array + // containing all of the information required to call a customer-supplied authentication + // API, including the API Gateway URL. Not required when IdentityProviderType + // is set to SERVICE_MANAGED. IdentityProviderDetails *IdentityProviderDetails `type:"structure"` - // Specifies the mode of authentication for the SFTP server. The default value - // is SERVICE_MANAGED, which allows you to store and access SFTP user credentials - // within the AWS Transfer for SFTP service. Use the API_GATEWAY value to integrate - // with an identity provider of your choosing. The API_GATEWAY setting requires - // you to provide an API Gateway endpoint URL to call for authentication using - // the IdentityProviderDetails parameter. + // Specifies the mode of authentication for a file transfer protocol-enabled + // server. The default value is SERVICE_MANAGED, which allows you to store and + // access user credentials within the AWS Transfer Family service. Use the API_GATEWAY + // value to integrate with an identity provider of your choosing. The API_GATEWAY + // setting requires you to provide an API Gateway endpoint URL to call for authentication + // using the IdentityProviderDetails parameter. IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - // A value that allows the service to write your SFTP users' activity to your - // Amazon CloudWatch logs for monitoring and auditing purposes. + // Allows the service to write your users' activity to your Amazon CloudWatch + // logs for monitoring and auditing purposes. LoggingRole *string `min:"20" type:"string"` - // Key-value pairs that can be used to group and search for servers. + // Specifies the file transfer protocol or protocols over which your file transfer + // protocol client can connect to your server's endpoint. The available protocols + // are: + // + // * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over + // SSH + // + // * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption + // + // * File Transfer Protocol (FTP): Unencrypted file transfer + Protocols []*string `min:"1" type:"list"` + + // Key-value pairs that can be used to group and search for file transfer protocol-enabled + // servers. Tags []*Tag `min:"1" type:"list"` } @@ -2046,6 +2139,9 @@ func (s *CreateServerInput) Validate() error { if s.LoggingRole != nil && len(*s.LoggingRole) < 20 { invalidParams.Add(request.NewErrParamMinLen("LoggingRole", 20)) } + if s.Protocols != nil && len(s.Protocols) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Protocols", 1)) + } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } @@ -2076,6 +2172,12 @@ func (s *CreateServerInput) Validate() error { return nil } +// SetCertificate sets the Certificate field's value. +func (s *CreateServerInput) SetCertificate(v string) *CreateServerInput { + s.Certificate = &v + return s +} + // SetEndpointDetails sets the EndpointDetails field's value. func (s *CreateServerInput) SetEndpointDetails(v *EndpointDetails) *CreateServerInput { s.EndpointDetails = v @@ -2112,6 +2214,12 @@ func (s *CreateServerInput) SetLoggingRole(v string) *CreateServerInput { return s } +// SetProtocols sets the Protocols field's value. +func (s *CreateServerInput) SetProtocols(v []*string) *CreateServerInput { + s.Protocols = v + return s +} + // SetTags sets the Tags field's value. func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { s.Tags = v @@ -2121,7 +2229,8 @@ func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { type CreateServerOutput struct { _ struct{} `type:"structure"` - // The service-assigned ID of the SFTP server that is created. + // The service-assigned ID of the file transfer protocol-enabled server that + // is created. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -2146,40 +2255,42 @@ func (s *CreateServerOutput) SetServerId(v string) *CreateServerOutput { type CreateUserInput struct { _ struct{} `type:"structure"` - // The landing directory (folder) for a user when they log in to the server - // using their SFTP client. + // The landing directory (folder) for a user when they log in to the file transfer + // protocol-enabled server using the client. // - // An example is /home/username. + // An example is your-Amazon-S3-bucket-name>/home/username. HomeDirectory *string `type:"string"` - // Logical directory mappings that specify what S3 paths and keys should be - // visible to your user and how you want to make them visible. You will need + // Logical directory mappings that specify what Amazon S3 paths and keys should + // be visible to your user and how you want to make them visible. You will need // to specify the "Entry" and "Target" pair, where Entry shows how the path - // is made visible and Target is the actual S3 path. If you only specify a target, - // it will be displayed as is. You will need to also make sure that your AWS - // IAM Role provides access to paths in Target. The following is an example. + // is made visible and Target is the actual Amazon S3 path. If you only specify + // a target, it will be displayed as is. You will need to also make sure that + // your AWS IAM Role provides access to paths in Target. The following is an + // example. // // '[ "/bucket2/documentation", { "Entry": "your-personal-report.pdf", "Target": // "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]' // - // In most cases, you can use this value instead of the scope down policy to + // In most cases, you can use this value instead of the scope-down policy to // lock your user down to the designated home directory ("chroot"). To do this, // you can set Entry to '/' and set Target to the HomeDirectory parameter value. // - // If the target of a logical directory entry does not exist in S3, the entry - // will be ignored. As a workaround, you can use the S3 api to create 0 byte - // objects as place holders for your directory. If using the CLI, use the s3api - // call instead of s3 so you can use the put-object operation. For example, - // you use the following: aws s3api put-object --bucket bucketname --key path/to/folder/. - // Make sure that the end of the key name ends in a / for it to be considered - // a folder. + // If the target of a logical directory entry does not exist in Amazon S3, the + // entry will be ignored. As a workaround, you can use the Amazon S3 api to + // create 0 byte objects as place holders for your directory. If using the CLI, + // use the s3api call instead of s3 so you can use the put-object operation. + // For example, you use the following: aws s3api put-object --bucket bucketname + // --key path/to/folder/. Make sure that the end of the key name ends in a '/' + // for it to be considered a folder. HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` // The type of landing directory (folder) you want your users' home directory - // to be when they log into the SFTP server. If you set it to PATH, the user - // will see the absolute Amazon S3 bucket paths as is in their SFTP clients. - // If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings - // for how you want to make S3 paths visible to your user. + // to be when they log into the file transfer protocol-enabled server. If you + // set it to PATH, the user will see the absolute Amazon S3 bucket paths as + // is in their file transfer protocol clients. If you set it LOGICAL, you will + // need to provide mappings in the HomeDirectoryMappings for how you want to + // make Amazon S3 paths visible to your users. HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` // A scope-down policy for your user so you can use the same IAM role across @@ -2187,45 +2298,45 @@ type CreateUserInput struct { // Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, // ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}. // - // For scope-down policies, AWS Transfer for SFTP stores the policy as a JSON + // For scope-down policies, AWS Transfer Family stores the policy as a JSON // blob, instead of the Amazon Resource Name (ARN) of the policy. You save the // policy as a JSON blob and pass it in the Policy argument. // - // For an example of a scope-down policy, see "https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down">Creating - // a Scope-Down Policy. + // For an example of a scope-down policy, see Creating a Scope-Down Policy (https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down). // - // For more information, see "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html" + // For more information, see AssumeRole (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) // in the AWS Security Token Service API Reference. Policy *string `type:"string"` - // The IAM role that controls your user's access to your Amazon S3 bucket. The + // The IAM role that controls your users' access to your Amazon S3 bucket. The // policies attached to this role will determine the level of access you want // to provide your users when transferring files into and out of your Amazon // S3 bucket or buckets. The IAM role should also contain a trust relationship - // that allows the SFTP server to access your resources when servicing your - // SFTP user's transfer requests. + // that allows the file transfer protocol-enabled server to access your resources + // when servicing your users' transfer requests. // // Role is a required field Role *string `min:"20" type:"string" required:"true"` - // A system-assigned unique identifier for an SFTP server instance. This is - // the specific SFTP server that you added your user to. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server instance. This is the specific server that you added your user to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` // The public portion of the Secure Shell (SSH) key used to authenticate the - // user to the SFTP server. + // user to the file transfer protocol-enabled server. SshPublicKeyBody *string `type:"string"` // Key-value pairs that can be used to group and search for users. Tags are // metadata attached to users for any purpose. Tags []*Tag `min:"1" type:"list"` - // A unique string that identifies a user and is associated with a server as - // specified by the ServerId. This user name must be a minimum of 3 and a maximum - // of 32 characters long. The following are valid characters: a-z, A-Z, 0-9, - // underscore, and hyphen. The user name can't start with a hyphen. + // A unique string that identifies a user and is associated with a file transfer + // protocol-enabled server as specified by the ServerId. This user name must + // be a minimum of 3 and a maximum of 32 characters long. The following are + // valid characters: a-z, A-Z, 0-9, underscore, and hyphen. The user name can't + // start with a hyphen. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -2352,12 +2463,14 @@ func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { type CreateUserOutput struct { _ struct{} `type:"structure"` - // The ID of the SFTP server that the user is attached to. + // The ID of the file transfer protocol-enabled server that the user is attached + // to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // A unique string that identifies a user account associated with an SFTP server. + // A unique string that identifies a user account associated with a file transfer + // protocol-enabled server. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -2388,7 +2501,8 @@ func (s *CreateUserOutput) SetUserName(v string) *CreateUserOutput { type DeleteServerInput struct { _ struct{} `type:"structure"` - // A unique system-assigned identifier for an SFTP server instance. + // A unique system-assigned identifier for a file transfer protocol-enabled + // server instance. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -2443,7 +2557,7 @@ func (s DeleteServerOutput) GoString() string { type DeleteSshPublicKeyInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) + // A system-assigned unique identifier for a file transfer protocol-enabled // server instance that has the user assigned to it. // // ServerId is a required field @@ -2533,13 +2647,14 @@ func (s DeleteSshPublicKeyOutput) GoString() string { type DeleteUserInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server instance that has - // the user assigned to it. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server instance that has the user assigned to it. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // A unique string that identifies a user that is being deleted from the server. + // A unique string that identifies a user that is being deleted from a file + // transfer protocol-enabled server. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -2606,7 +2721,8 @@ func (s DeleteUserOutput) GoString() string { type DescribeServerInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -2647,7 +2763,8 @@ func (s *DescribeServerInput) SetServerId(v string) *DescribeServerInput { type DescribeServerOutput struct { _ struct{} `type:"structure"` - // An array containing the properties of the server with the ServerID you specified. + // An array containing the properties of a file transfer protocol-enabled server + // with the ServerID you specified. // // Server is a required field Server *DescribedServer `type:"structure" required:"true"` @@ -2672,15 +2789,15 @@ func (s *DescribeServerOutput) SetServer(v *DescribedServer) *DescribeServerOutp type DescribeUserInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server that has this user - // assigned. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server that has this user assigned. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // The name of the user assigned to one or more servers. User names are part - // of the sign-in credentials to use the AWS Transfer for SFTP service and perform - // file transfer tasks. + // The name of the user assigned to one or more file transfer protocol-enabled + // servers. User names are part of the sign-in credentials to use the AWS Transfer + // Family service and perform file transfer tasks. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -2733,8 +2850,8 @@ func (s *DescribeUserInput) SetUserName(v string) *DescribeUserInput { type DescribeUserOutput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server that has this user - // assigned. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server that has this user assigned. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -2768,68 +2885,87 @@ func (s *DescribeUserOutput) SetUser(v *DescribedUser) *DescribeUserOutput { return s } -// Describes the properties of the server that was specified. Information returned -// includes the following: the server Amazon Resource Name (ARN), the authentication -// configuration and type, the logging role, the server ID and state, and assigned -// tags or metadata. +// Describes the properties of a file transfer protocol-enabled server that +// was specified. Information returned includes the following: the server Amazon +// Resource Name (ARN), the authentication configuration and type, the logging +// role, the server ID and state, and assigned tags or metadata. type DescribedServer struct { _ struct{} `type:"structure"` - // Specifies the unique Amazon Resource Name (ARN) for the server to be described. + // Specifies the unique Amazon Resource Name (ARN) for a file transfer protocol-enabled + // server to be described. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. + // Required when Protocols is set to FTPS. + Certificate *string `type:"string"` + // The virtual private cloud (VPC) endpoint settings that you configured for - // your SFTP server. + // your file transfer protocol-enabled server. EndpointDetails *EndpointDetails `type:"structure"` - // The type of endpoint that your SFTP server is connected to. If your SFTP - // server is connected to a VPC endpoint, your server isn't accessible over - // the public internet. + // The type of endpoint that your file transfer protocol-enabled server is connected + // to. If your server is connected to a VPC endpoint, your server isn't accessible + // over the public internet. EndpointType *string `type:"string" enum:"EndpointType"` - // This value contains the message-digest algorithm (MD5) hash of the server's - // host key. This value is equivalent to the output of the ssh-keygen -l -E - // md5 -f my-new-server-key command. + // Contains the message-digest algorithm (MD5) hash of a file transfer protocol-enabled + // server's host key. This value is equivalent to the output of the ssh-keygen + // -l -E md5 -f my-new-server-key command. HostKeyFingerprint *string `type:"string"` // Specifies information to call a customer-supplied authentication API. This - // field is not populated when the IdentityProviderType of the server is SERVICE_MANAGED>. + // field is not populated when the IdentityProviderType of a file transfer protocol-enabled + // server is SERVICE_MANAGED. IdentityProviderDetails *IdentityProviderDetails `type:"structure"` - // This property defines the mode of authentication method enabled for this - // service. A value of SERVICE_MANAGED means that you are using this server - // to store and access SFTP user credentials within the service. A value of + // Defines the mode of authentication method enabled for this service. A value + // of SERVICE_MANAGED means that you are using this file transfer protocol-enabled + // server to store and access user credentials within the service. A value of // API_GATEWAY indicates that you have integrated an API Gateway endpoint that // will be invoked for authenticating your user into the service. IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - // This property is an AWS Identity and Access Management (IAM) entity that - // allows the server to turn on Amazon CloudWatch logging for Amazon S3 events. - // When set, user activity can be viewed in your CloudWatch logs. + // An AWS Identity and Access Management (IAM) entity that allows a file transfer + // protocol-enabled server to turn on Amazon CloudWatch logging for Amazon S3 + // events. When set, user activity can be viewed in your CloudWatch logs. LoggingRole *string `min:"20" type:"string"` - // This property is a unique system-assigned identifier for the SFTP server + // Specifies the file transfer protocol or protocols over which your file transfer + // protocol client can connect to your server's endpoint. The available protocols + // are: + // + // * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over + // SSH + // + // * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption + // + // * File Transfer Protocol (FTP): Unencrypted file transfer + Protocols []*string `min:"1" type:"list"` + + // Unique system-assigned identifier for a file transfer protocol-enabled server // that you instantiate. ServerId *string `min:"19" type:"string"` - // The condition of the SFTP server for the server that was described. A value - // of ONLINE indicates that the server can accept jobs and transfer files. A - // State value of OFFLINE means that the server cannot perform file transfer - // operations. + // The condition of a file transfer protocol-enabled server for the server that + // was described. A value of ONLINE indicates that the server can accept jobs + // and transfer files. A State value of OFFLINE means that the server cannot + // perform file transfer operations. // // The states of STARTING and STOPPING indicate that the server is in an intermediate // state, either not fully able to respond, or not fully offline. The values // of START_FAILED or STOP_FAILED can indicate an error condition. State *string `type:"string" enum:"State"` - // This property contains the key-value pairs that you can use to search for - // and group servers that were assigned to the server that was described. + // Contains the key-value pairs that you can use to search for and group file + // transfer protocol-enabled servers that were assigned to the server that was + // described. Tags []*Tag `min:"1" type:"list"` - // The number of users that are assigned to the SFTP server you specified with - // the ServerId. + // The number of users that are assigned to a file transfer protocol-enabled + // server you specified with the ServerId. UserCount *int64 `type:"integer"` } @@ -2849,6 +2985,12 @@ func (s *DescribedServer) SetArn(v string) *DescribedServer { return s } +// SetCertificate sets the Certificate field's value. +func (s *DescribedServer) SetCertificate(v string) *DescribedServer { + s.Certificate = &v + return s +} + // SetEndpointDetails sets the EndpointDetails field's value. func (s *DescribedServer) SetEndpointDetails(v *EndpointDetails) *DescribedServer { s.EndpointDetails = v @@ -2885,6 +3027,12 @@ func (s *DescribedServer) SetLoggingRole(v string) *DescribedServer { return s } +// SetProtocols sets the Protocols field's value. +func (s *DescribedServer) SetProtocols(v []*string) *DescribedServer { + s.Protocols = v + return s +} + // SetServerId sets the ServerId field's value. func (s *DescribedServer) SetServerId(v string) *DescribedServer { s.ServerId = &v @@ -2913,62 +3061,59 @@ func (s *DescribedServer) SetUserCount(v int64) *DescribedServer { type DescribedUser struct { _ struct{} `type:"structure"` - // This property contains the unique Amazon Resource Name (ARN) for the user - // that was requested to be described. + // Contains the unique Amazon Resource Name (ARN) for the user that was requested + // to be described. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` - // This property specifies the landing directory (or folder), which is the location - // that files are written to or read from in an Amazon S3 bucket for the described - // user. An example is /your s3 bucket name/home/username . + // Specifies the landing directory (or folder), which is the location that files + // are written to or read from in an Amazon S3 bucket for the described user. + // An example is /your s3 bucket name/home/username . HomeDirectory *string `type:"string"` - // Logical directory mappings that you specified for what S3 paths and keys - // should be visible to your user and how you want to make them visible. You - // will need to specify the "Entry" and "Target" pair, where Entry shows how - // the path is made visible and Target is the actual S3 path. If you only specify - // a target, it will be displayed as is. You will need to also make sure that - // your AWS IAM Role provides access to paths in Target. + // Logical directory mappings that you specified for what Amazon S3 paths and + // keys should be visible to your user and how you want to make them visible. + // You will need to specify the "Entry" and "Target" pair, where Entry shows + // how the path is made visible and Target is the actual Amazon S3 path. If + // you only specify a target, it will be displayed as is. You will need to also + // make sure that your AWS IAM Role provides access to paths in Target. // - // In most cases, you can use this value instead of the scope down policy to - // lock your user down to the designated home directory ("chroot"). To do this, - // you can set Entry to '/' and set Target to the HomeDirectory parameter value. - // - // In most cases, you can use this value instead of the scope down policy to + // In most cases, you can use this value instead of the scope-down policy to // lock your user down to the designated home directory ("chroot"). To do this, // you can set Entry to '/' and set Target to the HomeDirectory parameter value. HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` - // The type of landing directory (folder) you mapped for your users' to see - // when they log into the SFTP server. If you set it to PATH, the user will - // see the absolute Amazon S3 bucket paths as is in their SFTP clients. If you - // set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings - // for how you want to make S3 paths visible to your user. + // The type of landing directory (folder) you mapped for your users to see when + // they log into the file transfer protocol-enabled server. If you set it to + // PATH, the user will see the absolute Amazon S3 bucket paths as is in their + // file transfer protocol clients. If you set it LOGICAL, you will need to provide + // mappings in the HomeDirectoryMappings for how you want to make Amazon S3 + // paths visible to your users. HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` // Specifies the name of the policy in use for the described user. Policy *string `type:"string"` - // This property specifies the IAM role that controls your user's access to - // your Amazon S3 bucket. The policies attached to this role will determine - // the level of access you want to provide your users when transferring files - // into and out of your Amazon S3 bucket or buckets. The IAM role should also - // contain a trust relationship that allows the SFTP server to access your resources - // when servicing your SFTP user's transfer requests. + // Specifies the IAM role that controls your users' access to your Amazon S3 + // bucket. The policies attached to this role will determine the level of access + // you want to provide your users when transferring files into and out of your + // Amazon S3 bucket or buckets. The IAM role should also contain a trust relationship + // that allows a file transfer protocol-enabled server to access your resources + // when servicing your users' transfer requests. Role *string `min:"20" type:"string"` - // This property contains the public key portion of the Secure Shell (SSH) keys - // stored for the described user. + // Contains the public key portion of the Secure Shell (SSH) keys stored for + // the described user. SshPublicKeys []*SshPublicKey `type:"list"` - // This property contains the key-value pairs for the user requested. Tag can - // be used to search for and group users for a variety of purposes. + // Contains the key-value pairs for the user requested. Tag can be used to search + // for and group users for a variety of purposes. Tags []*Tag `min:"1" type:"list"` - // This property is the name of the user that was requested to be described. - // User names are used for authentication purposes. This is the string that - // will be used by your user when they log in to your SFTP server. + // The name of the user that was requested to be described. User names are used + // for authentication purposes. This is the string that will be used by your + // user when they log in to your file transfer protocol-enabled server. UserName *string `min:"3" type:"string"` } @@ -3037,28 +3182,29 @@ func (s *DescribedUser) SetUserName(v string) *DescribedUser { } // The virtual private cloud (VPC) endpoint settings that are configured for -// your SFTP server. With a VPC endpoint, you can restrict access to your SFTP -// server and resources only within your VPC. To control incoming internet traffic, -// invoke the UpdateServer API and attach an Elastic IP to your server's endpoint. +// your file transfer protocol-enabled server. With a VPC endpoint, you can +// restrict access to your server and resources only within your VPC. To control +// incoming internet traffic, invoke the UpdateServer API and attach an Elastic +// IP to your server's endpoint. type EndpointDetails struct { _ struct{} `type:"structure"` // A list of address allocation IDs that are required to attach an Elastic IP - // address to your SFTP server's endpoint. This is only valid in the UpdateServer - // API. + // address to your file transfer protocol-enabled server's endpoint. This is + // only valid in the UpdateServer API. // // This property can only be use when EndpointType is set to VPC. AddressAllocationIds []*string `type:"list"` - // A list of subnet IDs that are required to host your SFTP server endpoint - // in your VPC. + // A list of subnet IDs that are required to host your file transfer protocol-enabled + // server endpoint in your VPC. SubnetIds []*string `type:"list"` // The ID of the VPC endpoint. VpcEndpointId *string `min:"22" type:"string"` - // The VPC ID of the virtual private cloud in which the SFTP server's endpoint - // will be hosted. + // The VPC ID of the VPC in which a file transfer protocol-enabled server's + // endpoint will be hosted. VpcId *string `type:"string"` } @@ -3163,16 +3309,15 @@ func (s *HomeDirectoryMapEntry) SetTarget(v string) *HomeDirectoryMapEntry { } // Returns information related to the type of user authentication that is in -// use for a server's users. A server can have only one method of authentication. +// use for a file transfer protocol-enabled server's users. A server can have +// only one method of authentication. type IdentityProviderDetails struct { _ struct{} `type:"structure"` - // The InvocationRole parameter provides the type of InvocationRole used to - // authenticate the user account. + // Provides the type of InvocationRole used to authenticate the user account. InvocationRole *string `min:"20" type:"string"` - // The Url parameter provides contains the location of the service endpoint - // used to authenticate users. + // Contains the location of the service endpoint used to authenticate users. Url *string `type:"string"` } @@ -3214,7 +3359,8 @@ func (s *IdentityProviderDetails) SetUrl(v string) *IdentityProviderDetails { type ImportSshPublicKeyInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -3224,7 +3370,8 @@ type ImportSshPublicKeyInput struct { // SshPublicKeyBody is a required field SshPublicKeyBody *string `type:"string" required:"true"` - // The name of the user account that is assigned to one or more servers. + // The name of the user account that is assigned to one or more file transfer + // protocol-enabled servers. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -3283,19 +3430,19 @@ func (s *ImportSshPublicKeyInput) SetUserName(v string) *ImportSshPublicKeyInput return s } -// This response identifies the user, the server they belong to, and the identifier -// of the SSH public key associated with that user. A user can have more than -// one key on each server that they are associated with. +// Identifies the user, the file transfer protocol-enabled server they belong +// to, and the identifier of the SSH public key associated with that user. A +// user can have more than one key on each server that they are associated with. type ImportSshPublicKeyOutput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // This identifier is the name given to a public key by the system that was - // imported. + // The name given to a public key by the system that was imported. // // SshPublicKeyId is a required field SshPublicKeyId *string `min:"21" type:"string" required:"true"` @@ -3334,11 +3481,11 @@ func (s *ImportSshPublicKeyOutput) SetUserName(v string) *ImportSshPublicKeyOutp return s } -// This exception is thrown when an error occurs in the AWS Transfer for SFTP +// This exception is thrown when an error occurs in the AWS Transfer Family // service. type InternalServiceError struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3355,17 +3502,17 @@ func (s InternalServiceError) GoString() string { func newErrorInternalServiceError(v protocol.ResponseMetadata) error { return &InternalServiceError{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServiceError) Code() string { +func (s *InternalServiceError) Code() string { return "InternalServiceError" } // Message returns the exception's message. -func (s InternalServiceError) Message() string { +func (s *InternalServiceError) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3373,28 +3520,28 @@ func (s InternalServiceError) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServiceError) OrigErr() error { +func (s *InternalServiceError) OrigErr() error { return nil } -func (s InternalServiceError) Error() string { +func (s *InternalServiceError) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServiceError) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServiceError) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServiceError) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServiceError) RequestID() string { + return s.RespMetadata.RequestID } // The NextToken parameter that was passed is invalid. type InvalidNextTokenException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3411,17 +3558,17 @@ func (s InvalidNextTokenException) GoString() string { func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { return &InvalidNextTokenException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidNextTokenException) Code() string { +func (s *InvalidNextTokenException) Code() string { return "InvalidNextTokenException" } // Message returns the exception's message. -func (s InvalidNextTokenException) Message() string { +func (s *InvalidNextTokenException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3429,28 +3576,28 @@ func (s InvalidNextTokenException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidNextTokenException) OrigErr() error { +func (s *InvalidNextTokenException) OrigErr() error { return nil } -func (s InvalidNextTokenException) Error() string { +func (s *InvalidNextTokenException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidNextTokenException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidNextTokenException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidNextTokenException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidNextTokenException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when the client submits a malformed request. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -3467,17 +3614,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3485,34 +3632,35 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } type ListServersInput struct { _ struct{} `type:"structure"` - // Specifies the number of servers to return as a response to the ListServers - // query. + // Specifies the number of file transfer protocol-enabled servers to return + // as a response to the ListServers query. MaxResults *int64 `min:"1" type:"integer"` - // When additional results are obtained from the ListServers command, a NextToken + // When additional results are obtained from theListServers command, a NextToken // parameter is returned in the output. You can then pass the NextToken parameter - // in a subsequent command to continue listing additional servers. + // in a subsequent command to continue listing additional file transfer protocol-enabled + // servers. NextToken *string `min:"1" type:"string"` } @@ -3559,10 +3707,11 @@ type ListServersOutput struct { // When you can get additional results from the ListServers operation, a NextToken // parameter is returned in the output. In a following command, you can pass - // in the NextToken parameter to continue listing additional servers. + // in the NextToken parameter to continue listing additional file transfer protocol-enabled + // servers. NextToken *string `min:"1" type:"string"` - // An array of servers that were listed. + // An array of file transfer protocol-enabled servers that were listed. // // Servers is a required field Servers []*ListedServer `type:"list" required:"true"` @@ -3663,7 +3812,7 @@ func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceIn type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` - // This value is the ARN you specified to list the tags of. + // The ARN you specified to list the tags of. Arn *string `min:"20" type:"string"` // When you can get additional results from the ListTagsForResource call, a @@ -3715,7 +3864,7 @@ type ListUsersInput struct { // to the NextToken parameter to continue listing additional users. NextToken *string `min:"1" type:"string"` - // A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) + // A system-assigned unique identifier for a file transfer protocol-enabled // server that has users assigned to it. // // ServerId is a required field @@ -3780,8 +3929,8 @@ type ListUsersOutput struct { // to the NextToken parameter to continue listing additional users. NextToken *string `min:"1" type:"string"` - // A system-assigned unique identifier for an SFTP server that the users are - // assigned to. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server that the users are assigned to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -3821,46 +3970,47 @@ func (s *ListUsersOutput) SetUsers(v []*ListedUser) *ListUsersOutput { return s } -// Returns properties of the server that was specified. +// Returns properties of a file transfer protocol-enabled server that was specified. type ListedServer struct { _ struct{} `type:"structure"` - // The unique Amazon Resource Name (ARN) for the server to be listed. + // The unique Amazon Resource Name (ARN) for a file transfer protocol-enabled + // server to be listed. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` - // The type of VPC endpoint that your SFTP server is connected to. If your SFTP - // server is connected to a VPC endpoint, your server isn't accessible over - // the public internet. + // The type of VPC endpoint that your file transfer protocol-enabled server + // is connected to. If your server is connected to a VPC endpoint, your server + // isn't accessible over the public internet. EndpointType *string `type:"string" enum:"EndpointType"` - // The authentication method used to validate a user for the server that was - // specified. This can include Secure Shell (SSH), user name and password combinations, - // or your own custom authentication method. Valid values include SERVICE_MANAGED - // or API_GATEWAY. + // The authentication method used to validate a user for a file transfer protocol-enabled + // server that was specified. This can include Secure Shell (SSH), user name + // and password combinations, or your own custom authentication method. Valid + // values include SERVICE_MANAGED or API_GATEWAY. IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` - // The AWS Identity and Access Management entity that allows the server to turn - // on Amazon CloudWatch logging. + // The AWS Identity and Access Management (IAM) entity that allows a file transfer + // protocol-enabled server to turn on Amazon CloudWatch logging. LoggingRole *string `min:"20" type:"string"` - // This value is the unique system assigned identifier for the SFTP servers - // that were listed. + // The unique system assigned identifier for a file transfer protocol-enabled + // servers that were listed. ServerId *string `min:"19" type:"string"` - // This property describes the condition of the SFTP server for the server that - // was described. A value of ONLINE> indicates that the server can accept jobs - // and transfer files. A State value of OFFLINE means that the server cannot - // perform file transfer operations. + // Describes the condition of a file transfer protocol-enabled server for the + // server that was described. A value of ONLINE indicates that the server can + // accept jobs and transfer files. A State value of OFFLINE means that the server + // cannot perform file transfer operations. // // The states of STARTING and STOPPING indicate that the server is in an intermediate // state, either not fully able to respond, or not fully offline. The values // of START_FAILED or STOP_FAILED can indicate an error condition. State *string `type:"string" enum:"State"` - // This property is a numeric value that indicates the number of users that - // are assigned to the SFTP server you specified with the ServerId. + // A numeric value that indicates the number of users that are assigned to a + // file transfer protocol-enabled server you specified with the ServerId. UserCount *int64 `type:"integer"` } @@ -3920,30 +4070,31 @@ func (s *ListedServer) SetUserCount(v int64) *ListedServer { type ListedUser struct { _ struct{} `type:"structure"` - // This property is the unique Amazon Resource Name (ARN) for the user that - // you want to learn about. + // The unique Amazon Resource Name (ARN) for the user that you want to learn + // about. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` - // This value specifies the location that files are written to or read from - // an Amazon S3 bucket for the user you specify by their ARN. + // Specifies the location that files are written to or read from an Amazon S3 + // bucket for the user you specify by their ARN. HomeDirectory *string `type:"string"` // The type of landing directory (folder) you mapped for your users' home directory. // If you set it to PATH, the user will see the absolute Amazon S3 bucket paths - // as is in their SFTP clients. If you set it LOGICAL, you will need to provide - // mappings in the HomeDirectoryMappings for how you want to make S3 paths visible - // to your user. + // as is in their file transfer protocol clients. If you set it LOGICAL, you + // will need to provide mappings in the HomeDirectoryMappings for how you want + // to make Amazon S3 paths visible to your users. HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` // The role in use by this user. A role is an AWS Identity and Access Management - // (IAM) entity that, in this case, allows the SFTP server to act on a user's - // behalf. It allows the server to inherit the trust relationship that enables - // that user to perform file operations to their Amazon S3 bucket. + // (IAM) entity that, in this case, allows a file transfer protocol-enabled + // server to act on a user's behalf. It allows the server to inherit the trust + // relationship that enables that user to perform file operations to their Amazon + // S3 bucket. Role *string `min:"20" type:"string"` - // This value is the number of SSH public keys stored for the user you specified. + // The number of SSH public keys stored for the user you specified. SshPublicKeyCount *int64 `type:"integer"` // The name of the user whose ARN was specified. User names are used for authentication @@ -3999,8 +4150,8 @@ func (s *ListedUser) SetUserName(v string) *ListedUser { // The requested resource does not exist. type ResourceExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -4023,17 +4174,17 @@ func (s ResourceExistsException) GoString() string { func newErrorResourceExistsException(v protocol.ResponseMetadata) error { return &ResourceExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceExistsException) Code() string { +func (s *ResourceExistsException) Code() string { return "ResourceExistsException" } // Message returns the exception's message. -func (s ResourceExistsException) Message() string { +func (s *ResourceExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4041,29 +4192,29 @@ func (s ResourceExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceExistsException) OrigErr() error { +func (s *ResourceExistsException) OrigErr() error { return nil } -func (s ResourceExistsException) Error() string { +func (s *ResourceExistsException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceExistsException) RequestID() string { + return s.RespMetadata.RequestID } // This exception is thrown when a resource is not found by the AWS Transfer -// for SFTP service. +// Family service. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` @@ -4086,17 +4237,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4104,28 +4255,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } -// The request has failed because the AWS Transfer for SFTP service is not available. +// The request has failed because the AWS Transfer Family service is not available. type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4142,17 +4293,17 @@ func (s ServiceUnavailableException) GoString() string { func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { return &ServiceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceUnavailableException) Code() string { +func (s *ServiceUnavailableException) Code() string { return "ServiceUnavailableException" } // Message returns the exception's message. -func (s ServiceUnavailableException) Message() string { +func (s *ServiceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4160,29 +4311,30 @@ func (s ServiceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceUnavailableException) OrigErr() error { +func (s *ServiceUnavailableException) OrigErr() error { return nil } -func (s ServiceUnavailableException) Error() string { +func (s *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } // Provides information about the public Secure Shell (SSH) key that is associated -// with a user account for a specific server (as identified by ServerId). The -// information returned includes the date the key was imported, the public key -// contents, and the public key ID. A user can store more than one SSH public -// key associated with their user name on a specific SFTP server. +// with a user account for the specific file transfer protocol-enabled server +// (as identified by ServerId). The information returned includes the date the +// key was imported, the public key contents, and the public key ID. A user +// can store more than one SSH public key associated with their user name on +// a specific server. type SshPublicKey struct { _ struct{} `type:"structure"` @@ -4233,7 +4385,8 @@ func (s *SshPublicKey) SetSshPublicKeyId(v string) *SshPublicKey { type StartServerInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server that you start. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server that you start. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -4288,7 +4441,8 @@ func (s StartServerOutput) GoString() string { type StopServerInput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server that you stopped. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server that you stopped. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -4354,8 +4508,7 @@ type Tag struct { // Key is a required field Key *string `type:"string" required:"true"` - // This property contains one or more values that you assigned to the key name - // you create. + // Contains one or more values that you assigned to the key name you create. // // Value is a required field Value *string `type:"string" required:"true"` @@ -4487,13 +4640,25 @@ func (s TagResourceOutput) GoString() string { type TestIdentityProviderInput struct { _ struct{} `type:"structure"` - // A system-assigned identifier for a specific server. That server's user authentication - // method is tested with a user name and password. + // A system-assigned identifier for a specific file transfer protocol-enabled + // server. That server's user authentication method is tested with a user name + // and password. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // This request parameter is the name of the user account to be tested. + // The type of file transfer protocol to be tested. + // + // The available protocols are: + // + // * Secure Shell (SSH) File Transfer Protocol (SFTP) + // + // * File Transfer Protocol Secure (FTPS) + // + // * File Transfer Protocol (FTP) + ServerProtocol *string `type:"string" enum:"Protocol"` + + // The name of the user account to be tested. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -4540,6 +4705,12 @@ func (s *TestIdentityProviderInput) SetServerId(v string) *TestIdentityProviderI return s } +// SetServerProtocol sets the ServerProtocol field's value. +func (s *TestIdentityProviderInput) SetServerProtocol(v string) *TestIdentityProviderInput { + s.ServerProtocol = &v + return s +} + // SetUserName sets the UserName field's value. func (s *TestIdentityProviderInput) SetUserName(v string) *TestIdentityProviderInput { s.UserName = &v @@ -4610,8 +4781,8 @@ func (s *TestIdentityProviderOutput) SetUrl(v string) *TestIdentityProviderOutpu // // HTTP Status Code: 400 type ThrottlingException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` @@ -4630,17 +4801,17 @@ func (s ThrottlingException) GoString() string { func newErrorThrottlingException(v protocol.ResponseMetadata) error { return &ThrottlingException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottlingException) Code() string { +func (s *ThrottlingException) Code() string { return "ThrottlingException" } // Message returns the exception's message. -func (s ThrottlingException) Message() string { +func (s *ThrottlingException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4648,30 +4819,30 @@ func (s ThrottlingException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottlingException) OrigErr() error { +func (s *ThrottlingException) OrigErr() error { return nil } -func (s ThrottlingException) Error() string { +func (s *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottlingException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottlingException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { _ struct{} `type:"structure"` - // This is the value of the resource that will have the tag removed. An Amazon - // Resource Name (ARN) is an identifier for a specific AWS resource, such as - // a server, user, or role. + // The value of the resource that will have the tag removed. An Amazon Resource + // Name (ARN) is an identifier for a specific AWS resource, such as a server, + // user, or role. // // Arn is a required field Arn *string `min:"20" type:"string" required:"true"` @@ -4745,40 +4916,56 @@ func (s UntagResourceOutput) GoString() string { type UpdateServerInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. + // Required when Protocols is set to FTPS. + Certificate *string `type:"string"` + // The virtual private cloud (VPC) endpoint settings that are configured for - // your SFTP server. With a VPC endpoint, you can restrict access to your SFTP - // server to resources only within your VPC. To control incoming internet traffic, - // you will need to associate one or more Elastic IP addresses with your server's - // endpoint. + // your file transfer protocol-enabled server. With a VPC endpoint, you can + // restrict access to your server to resources only within your VPC. To control + // incoming internet traffic, you will need to associate one or more Elastic + // IP addresses with your server's endpoint. EndpointDetails *EndpointDetails `type:"structure"` - // The type of endpoint that you want your SFTP server to connect to. You can - // choose to connect to the public internet or a virtual private cloud (VPC) - // endpoint. With a VPC endpoint, your SFTP server isn't accessible over the - // public internet. + // The type of endpoint that you want your file transfer protocol-enabled server + // to connect to. You can choose to connect to the public internet or a VPC + // endpoint. With a VPC endpoint, your server isn't accessible over the public + // internet. EndpointType *string `type:"string" enum:"EndpointType"` // The RSA private key as generated by ssh-keygen -N "" -f my-new-server-key. // - // If you aren't planning to migrate existing users from an existing SFTP server - // to a new AWS SFTP server, don't update the host key. Accidentally changing - // a server's host key can be disruptive. + // If you aren't planning to migrate existing users from an existing file transfer + // protocol-enabled server to a new server, don't update the host key. Accidentally + // changing a server's host key can be disruptive. // - // For more information, see "https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" - // in the AWS SFTP User Guide. + // For more information, see Changing the Host Key for Your AWS Transfer Family + // Server (https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key) + // in the AWS Transfer Family User Guide. HostKey *string `type:"string" sensitive:"true"` - // This response parameter is an array containing all of the information required - // to call a customer's authentication API method. + // An array containing all of the information required to call a customer's + // authentication API method. IdentityProviderDetails *IdentityProviderDetails `type:"structure"` - // A value that changes the AWS Identity and Access Management (IAM) role that - // allows Amazon S3 events to be logged in Amazon CloudWatch, turning logging - // on or off. + // Changes the AWS Identity and Access Management (IAM) role that allows Amazon + // S3 events to be logged in Amazon CloudWatch, turning logging on or off. LoggingRole *string `type:"string"` - // A system-assigned unique identifier for an SFTP server instance that the - // user account is assigned to. + // Specifies the file transfer protocol or protocols over which your file transfer + // protocol client can connect to your server's endpoint. The available protocols + // are: + // + // * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over + // SSH + // + // * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption + // + // * File Transfer Protocol (FTP): Unencrypted file transfer + Protocols []*string `min:"1" type:"list"` + + // A system-assigned unique identifier for a file transfer protocol-enabled + // server instance that the user account is assigned to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -4797,6 +4984,9 @@ func (s UpdateServerInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateServerInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateServerInput"} + if s.Protocols != nil && len(s.Protocols) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Protocols", 1)) + } if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } @@ -4820,6 +5010,12 @@ func (s *UpdateServerInput) Validate() error { return nil } +// SetCertificate sets the Certificate field's value. +func (s *UpdateServerInput) SetCertificate(v string) *UpdateServerInput { + s.Certificate = &v + return s +} + // SetEndpointDetails sets the EndpointDetails field's value. func (s *UpdateServerInput) SetEndpointDetails(v *EndpointDetails) *UpdateServerInput { s.EndpointDetails = v @@ -4850,6 +5046,12 @@ func (s *UpdateServerInput) SetLoggingRole(v string) *UpdateServerInput { return s } +// SetProtocols sets the Protocols field's value. +func (s *UpdateServerInput) SetProtocols(v []*string) *UpdateServerInput { + s.Protocols = v + return s +} + // SetServerId sets the ServerId field's value. func (s *UpdateServerInput) SetServerId(v string) *UpdateServerInput { s.ServerId = &v @@ -4859,8 +5061,8 @@ func (s *UpdateServerInput) SetServerId(v string) *UpdateServerInput { type UpdateServerOutput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server that the user account - // is assigned to. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server that the user account is assigned to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` @@ -4885,40 +5087,43 @@ func (s *UpdateServerOutput) SetServerId(v string) *UpdateServerOutput { type UpdateUserInput struct { _ struct{} `type:"structure"` - // A parameter that specifies the landing directory (folder) for a user when - // they log in to the server using their client. + // Specifies the landing directory (folder) for a user when they log in to the + // file transfer protocol-enabled server using their file transfer protocol + // client. // - // An example is /home/username. + // An example is your-Amazon-S3-bucket-name>/home/username. HomeDirectory *string `type:"string"` - // Logical directory mappings that specify what S3 paths and keys should be - // visible to your user and how you want to make them visible. You will need + // Logical directory mappings that specify what Amazon S3 paths and keys should + // be visible to your user and how you want to make them visible. You will need // to specify the "Entry" and "Target" pair, where Entry shows how the path - // is made visible and Target is the actual S3 path. If you only specify a target, - // it will be displayed as is. You will need to also make sure that your AWS - // IAM Role provides access to paths in Target. The following is an example. + // is made visible and Target is the actual Amazon S3 path. If you only specify + // a target, it will be displayed as is. You will need to also make sure that + // your AWS IAM Role provides access to paths in Target. The following is an + // example. // // '[ "/bucket2/documentation", { "Entry": "your-personal-report.pdf", "Target": // "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]' // - // In most cases, you can use this value instead of the scope down policy to + // In most cases, you can use this value instead of the scope-down policy to // lock your user down to the designated home directory ("chroot"). To do this, // you can set Entry to '/' and set Target to the HomeDirectory parameter value. // - // If the target of a logical directory entry does not exist in S3, the entry - // will be ignored. As a workaround, you can use the S3 api to create 0 byte - // objects as place holders for your directory. If using the CLI, use the s3api - // call instead of s3 so you can use the put-object operation. For example, - // you use the following: aws s3api put-object --bucket bucketname --key path/to/folder/. - // Make sure that the end of the key name ends in a / for it to be considered - // a folder. + // If the target of a logical directory entry does not exist in Amazon S3, the + // entry will be ignored. As a workaround, you can use the Amazon S3 api to + // create 0 byte objects as place holders for your directory. If using the CLI, + // use the s3api call instead of s3 so you can use the put-object operation. + // For example, you use the following: aws s3api put-object --bucket bucketname + // --key path/to/folder/. Make sure that the end of the key name ends in a / + // for it to be considered a folder. HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` // The type of landing directory (folder) you want your users' home directory - // to be when they log into the SFTP serve. If you set it to PATH, the user - // will see the absolute Amazon S3 bucket paths as is in their SFTP clients. - // If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings - // for how you want to make S3 paths visible to your user. + // to be when they log into the file transfer protocol-enabled server. If you + // set it to PATH, the user will see the absolute Amazon S3 bucket paths as + // is in their file transfer protocol clients. If you set it LOGICAL, you will + // need to provide mappings in the HomeDirectoryMappings for how you want to + // make Amazon S3 paths visible to your users. HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` // Allows you to supply a scope-down policy for your user so you can use the @@ -4927,36 +5132,36 @@ type UpdateUserInput struct { // Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, // and ${Transfer:HomeBucket}. // - // For scope-down policies, AWS Transfer for SFTP stores the policy as a JSON + // For scope-down policies, AWS Transfer Family stores the policy as a JSON // blob, instead of the Amazon Resource Name (ARN) of the policy. You save the // policy as a JSON blob and pass it in the Policy argument. // - // For an example of a scope-down policy, see "https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down">Creating - // a Scope-Down Policy. + // For an example of a scope-down policy, see Creating a Scope-Down Policy (https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down). // - // For more information, see "https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html" + // For more information, see AssumeRole (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) // in the AWS Security Token Service API Reference. Policy *string `type:"string"` - // The IAM role that controls your user's access to your Amazon S3 bucket. The + // The IAM role that controls your users' access to your Amazon S3 bucket. The // policies attached to this role will determine the level of access you want // to provide your users when transferring files into and out of your Amazon // S3 bucket or buckets. The IAM role should also contain a trust relationship - // that allows the Secure File Transfer Protocol (SFTP) server to access your - // resources when servicing your SFTP user's transfer requests. + // that allows the file transfer protocol-enabled server to access your resources + // when servicing your users' transfer requests. Role *string `min:"20" type:"string"` - // A system-assigned unique identifier for an SFTP server instance that the - // user account is assigned to. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server instance that the user account is assigned to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // A unique string that identifies a user and is associated with a server as - // specified by the ServerId. This is the string that will be used by your user - // when they log in to your SFTP server. This user name is a minimum of 3 and - // a maximum of 32 characters long. The following are valid characters: a-z, - // A-Z, 0-9, underscore, and hyphen. The user name can't start with a hyphen. + // A unique string that identifies a user and is associated with a file transfer + // protocol-enabled server as specified by the ServerId. This is the string + // that will be used by your user when they log in to your server. This user + // name is a minimum of 3 and a maximum of 32 characters long. The following + // are valid characters: a-z, A-Z, 0-9, underscore, and hyphen. The user name + // can't start with a hyphen. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -5052,19 +5257,19 @@ func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput { return s } -// UpdateUserResponse returns the user name and server identifier for the request -// to update a user's properties. +// UpdateUserResponse returns the user name and file transfer protocol-enabled +// server identifier for the request to update a user's properties. type UpdateUserOutput struct { _ struct{} `type:"structure"` - // A system-assigned unique identifier for an SFTP server instance that the - // user account is assigned to. + // A system-assigned unique identifier for a file transfer protocol-enabled + // server instance that the user account is assigned to. // // ServerId is a required field ServerId *string `min:"19" type:"string" required:"true"` - // The unique identifier for a user that is assigned to the SFTP server instance - // that was specified in the request. + // The unique identifier for a user that is assigned to a file transfer protocol-enabled + // server instance that was specified in the request. // // UserName is a required field UserName *string `min:"3" type:"string" required:"true"` @@ -5112,10 +5317,11 @@ const ( ) // Returns information related to the type of user authentication that is in -// use for a server's users. For SERVICE_MANAGED authentication, the Secure -// Shell (SSH) public keys are stored with a user on an SFTP server instance. -// For API_GATEWAY authentication, your custom authentication method is implemented -// by using an API call. A server can have only one method of authentication. +// use for a file transfer protocol-enabled server's users. For SERVICE_MANAGED +// authentication, the Secure Shell (SSH) public keys are stored with a user +// on the server instance. For API_GATEWAY authentication, your custom authentication +// method is implemented by using an API call. The server can have only one +// method of authentication. const ( // IdentityProviderTypeServiceManaged is a IdentityProviderType enum value IdentityProviderTypeServiceManaged = "SERVICE_MANAGED" @@ -5124,15 +5330,26 @@ const ( IdentityProviderTypeApiGateway = "API_GATEWAY" ) -// Describes the condition of the SFTP server with respect to its ability to -// perform file operations. There are six possible states: OFFLINE, ONLINE, -// STARTING, STOPPING, START_FAILED, and STOP_FAILED. +const ( + // ProtocolSftp is a Protocol enum value + ProtocolSftp = "SFTP" + + // ProtocolFtp is a Protocol enum value + ProtocolFtp = "FTP" + + // ProtocolFtps is a Protocol enum value + ProtocolFtps = "FTPS" +) + +// Describes the condition of a file transfer protocol-enabled server with respect +// to its ability to perform file operations. There are six possible states: +// OFFLINE, ONLINE, STARTING, STOPPING, START_FAILED, and STOP_FAILED. // -// OFFLINE indicates that the SFTP server exists, but that it is not available -// for file operations. ONLINE indicates that the SFTP server is available to -// perform file operations. STARTING indicates that the SFTP server's was instantiated, -// but the server is not yet available to perform file operations. Under normal -// conditions, it can take a couple of minutes for an SFTP server to be completely +// OFFLINE indicates that the server exists, but that it is not available for +// file operations. ONLINE indicates that the server is available to perform +// file operations. STARTING indicates that the server's was instantiated, but +// the server is not yet available to perform file operations. Under normal +// conditions, it can take a couple of minutes for the server to be completely // operational. Both START_FAILED and STOP_FAILED are error conditions. const ( // StateOffline is a State enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go index 51a9c01b3df..407175dd222 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/doc.go @@ -1,18 +1,19 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package transfer provides the client and types for making API -// requests to AWS Transfer for SFTP. -// -// AWS Transfer for SFTP is a fully managed service that enables the transfer -// of files directly into and out of Amazon S3 using the Secure File Transfer -// Protocol (SFTP)—also known as Secure Shell (SSH) File Transfer Protocol. -// AWS helps you seamlessly migrate your file transfer workflows to AWS Transfer -// for SFTP—by integrating with existing authentication systems, and providing -// DNS routing with Amazon Route 53—so nothing changes for your customers -// and partners, or their applications. With your data in S3, you can use it -// with AWS services for processing, analytics, machine learning, and archiving. -// Getting started with AWS Transfer for SFTP (AWS SFTP) is easy; there is no -// infrastructure to buy and set up. +// requests to AWS Transfer Family. +// +// AWS Transfer Family is a fully managed service that enables the transfer +// of files over the the File Transfer Protocol (FTP), File Transfer Protocol +// over SSL (FTPS), or Secure Shell (SSH) File Transfer Protocol (SFTP) directly +// into and out of Amazon Simple Storage Service (Amazon S3). AWS helps you +// seamlessly migrate your file transfer workflows to AWS Transfer Family by +// integrating with existing authentication systems, and providing DNS routing +// with Amazon Route 53 so nothing changes for your customers and partners, +// or their applications. With your data in Amazon S3, you can use it with AWS +// services for processing, analytics, machine learning, and archiving. Getting +// started with AWS Transfer Family is easy since there is no infrastructure +// to buy and set up. // // See https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05 for more information on this service. // @@ -21,7 +22,7 @@ // // Using the Client // -// To contact AWS Transfer for SFTP with the SDK use the New function to create +// To contact AWS Transfer Family 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. // @@ -31,7 +32,7 @@ // 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 Transfer for SFTP client Transfer for more +// See the AWS Transfer Family client Transfer for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/transfer/#New package transfer diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go index 0aef6abd4dc..d4a863ac52f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/errors.go @@ -8,18 +8,24 @@ import ( const ( + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have sufficient access to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + // ErrCodeConflictException for service response error code // "ConflictException". // - // This exception is thrown when the UpdatServer is called for a server that - // has VPC as the endpoint type and the server's VpcEndpointID is not in the - // available state. + // This exception is thrown when the UpdatServer is called for a file transfer + // protocol-enabled server that has VPC as the endpoint type and the server's + // VpcEndpointID is not in the available state. ErrCodeConflictException = "ConflictException" // ErrCodeInternalServiceError for service response error code // "InternalServiceError". // - // This exception is thrown when an error occurs in the AWS Transfer for SFTP + // This exception is thrown when an error occurs in the AWS Transfer Family // service. ErrCodeInternalServiceError = "InternalServiceError" @@ -45,13 +51,13 @@ const ( // "ResourceNotFoundException". // // This exception is thrown when a resource is not found by the AWS Transfer - // for SFTP service. + // Family service. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // - // The request has failed because the AWS Transfer for SFTP service is not available. + // The request has failed because the AWS Transfer Family service is not available. ErrCodeServiceUnavailableException = "ServiceUnavailableException" // ErrCodeThrottlingException for service response error code @@ -64,6 +70,7 @@ const ( ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, "ConflictException": newErrorConflictException, "InternalServiceError": newErrorInternalServiceError, "InvalidNextTokenException": newErrorInvalidNextTokenException, diff --git a/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go b/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go index 639b4da4dc2..3c51a21dd73 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/transfer/service.go @@ -13,7 +13,7 @@ import ( ) // Transfer provides the API operation methods for making requests to -// AWS Transfer for SFTP. See this package's package overview docs +// AWS Transfer Family. See this package's package overview docs // for details on the service. // // Transfer methods are safe to use concurrently. It is not safe to 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 1267ed1a5f3..8abf0df8933 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 @@ -57,6 +57,16 @@ func (c *WAF) CreateByteMatchSetRequest(input *CreateByteMatchSetInput) (req *re // CreateByteMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part // of a web request that you want AWS WAF to inspect, such as the values of // the User-Agent header or the query string. For example, you can create a @@ -204,6 +214,16 @@ func (c *WAF) CreateGeoMatchSetRequest(input *CreateGeoMatchSetInput) (req *requ // CreateGeoMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates an GeoMatchSet, which you use to specify which web requests you want // to allow or block based on the country that the requests originate from. // For example, if you're receiving a lot of requests from one or more countries @@ -350,6 +370,16 @@ func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, // CreateIPSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates an IPSet, which you use to specify which web requests that you want // to allow or block based on the IP addresses that the requests originate from. // For example, if you're receiving a lot of requests from one or more individual @@ -497,6 +527,16 @@ func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req * // CreateRateBasedRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RateBasedRule. The RateBasedRule contains a RateLimit, which specifies // the maximum number of requests that AWS WAF allows from a specified IP address // in a five-minute period. The RateBasedRule also contains the IPSet objects, @@ -504,23 +544,22 @@ func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req * // you want to count or block if these requests exceed the RateLimit. // // If you add more than one predicate to a RateBasedRule, a request not only -// must exceed the RateLimit, but it also must match all the specifications -// to be counted or blocked. For example, suppose you add the following to a -// RateBasedRule: +// must exceed the RateLimit, but it also must match all the conditions to be +// counted or blocked. For example, suppose you add the following to a RateBasedRule: // // * An IPSet that matches the IP address 192.0.2.44/32 // // * A ByteMatchSet that matches BadBot in the User-Agent header // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // You then add the RateBasedRule to a WebACL and specify that you want to block // requests that meet the conditions in the rule. For a request to be blocked, // it must come from the IP address 192.0.2.44 and the User-Agent header in // the request must contain the value BadBot. Further, requests that match these -// two conditions must be received at a rate of more than 15,000 requests every +// two conditions must be received at a rate of more than 1,000 requests every // five minutes. If both conditions are met and the rate is exceeded, AWS WAF -// blocks the requests. If the rate drops below 15,000 for a five-minute period, +// blocks the requests. If the rate drops below 1,000 for a five-minute period, // AWS WAF no longer blocks the requests. // // As a second example, suppose you want to limit requests to a particular page @@ -532,7 +571,7 @@ func (c *WAF) CreateRateBasedRuleRequest(input *CreateRateBasedRuleInput) (req * // // * A TargetString of login // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // By adding this RateBasedRule to a WebACL, you could limit requests to your // login page without affecting the rest of your site. @@ -685,6 +724,16 @@ func (c *WAF) CreateRegexMatchSetRequest(input *CreateRegexMatchSetInput) (req * // CreateRegexMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the // part of a web request that you want AWS WAF to inspect, such as the values // of the User-Agent header or the query string. For example, you can create @@ -800,6 +849,16 @@ func (c *WAF) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (r // CreateRegexPatternSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RegexPatternSet. You then use UpdateRegexPatternSet to specify // the regular expression (regex) pattern that you want AWS WAF to search for, // such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. @@ -911,6 +970,16 @@ func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, o // CreateRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and // other predicates that identify the requests that you want to block. If you // add more than one predicate to a Rule, a request must match all of the specifications @@ -1074,6 +1143,16 @@ func (c *WAF) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *request. // CreateRuleGroup API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RuleGroup. A rule group is a collection of predefined rules that // you add to a web ACL. You use UpdateRuleGroup to add rules to the rule group. // @@ -1186,6 +1265,16 @@ func (c *WAF) CreateSizeConstraintSetRequest(input *CreateSizeConstraintSetInput // CreateSizeConstraintSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify // the part of a web request that you want AWS WAF to check for length, such // as the length of the User-Agent header or the length of the query string. @@ -1334,6 +1423,16 @@ func (c *WAF) CreateSqlInjectionMatchSetRequest(input *CreateSqlInjectionMatchSe // CreateSqlInjectionMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests // that contain snippets of SQL code in a specified part of web requests. AWS // WAF searches for character sequences that are likely to be malicious strings. @@ -1478,6 +1577,16 @@ func (c *WAF) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Reques // CreateWebACL API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a WebACL, which contains the Rules that identify the CloudFront web // requests that you want to allow, block, or count. AWS WAF evaluates Rules // in order based on the value of Priority for each Rule. @@ -1596,6 +1705,169 @@ func (c *WAF) CreateWebACLWithContext(ctx aws.Context, input *CreateWebACLInput, return out, req.Send() } +const opCreateWebACLMigrationStack = "CreateWebACLMigrationStack" + +// CreateWebACLMigrationStackRequest generates a "aws/request.Request" representing the +// client's request for the CreateWebACLMigrationStack operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateWebACLMigrationStack for more information on using the CreateWebACLMigrationStack +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateWebACLMigrationStackRequest method. +// req, resp := client.CreateWebACLMigrationStackRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateWebACLMigrationStack +func (c *WAF) CreateWebACLMigrationStackRequest(input *CreateWebACLMigrationStackInput) (req *request.Request, output *CreateWebACLMigrationStackOutput) { + op := &request.Operation{ + Name: opCreateWebACLMigrationStack, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateWebACLMigrationStackInput{} + } + + output = &CreateWebACLMigrationStackOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateWebACLMigrationStack API operation for AWS WAF. +// +// Creates an AWS CloudFormation WAFV2 template for the specified web ACL in +// the specified Amazon S3 bucket. Then, in CloudFormation, you create a stack +// from the template, to create the web ACL and its resources in AWS WAFV2. +// Use this to migrate your AWS WAF Classic web ACL to the latest version of +// AWS WAF. +// +// This is part of a larger migration procedure for web ACLs from AWS WAF Classic +// to the latest version of AWS WAF. For the full procedure, including caveats +// and manual steps to complete the migration and switch over to the new web +// ACL, see Migrating your AWS WAF Classic resources to AWS WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-migrating-from-classic.html) +// in the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation CreateWebACLMigrationStack for usage and error information. +// +// Returned Error Types: +// * InternalErrorException +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * InvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultAction Type other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafAction Type other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatch Type other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// * InvalidOperationException +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * NonexistentItemException +// The operation failed because the referenced object doesn't exist. +// +// * WAFEntityMigrationException +// The operation failed due to a problem with the migration. The failure cause +// is provided in the exception, in the MigrationErrorType: +// +// * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the +// IgnoreUnsupportedType is not set to true. +// +// * ENTITY_NOT_FOUND - The web ACL doesn't exist. +// +// * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject +// action to the specified Amazon S3 bucket. +// +// * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to +// perform the PutObject action in the bucket. +// +// * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. +// +// * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as +// the web ACL. +// +// * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 +// bucket for another reason. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/CreateWebACLMigrationStack +func (c *WAF) CreateWebACLMigrationStack(input *CreateWebACLMigrationStackInput) (*CreateWebACLMigrationStackOutput, error) { + req, out := c.CreateWebACLMigrationStackRequest(input) + return out, req.Send() +} + +// CreateWebACLMigrationStackWithContext is the same as CreateWebACLMigrationStack with the addition of +// the ability to pass a context and additional request options. +// +// See CreateWebACLMigrationStack for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) CreateWebACLMigrationStackWithContext(ctx aws.Context, input *CreateWebACLMigrationStackInput, opts ...request.Option) (*CreateWebACLMigrationStackOutput, error) { + req, out := c.CreateWebACLMigrationStackRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the @@ -1640,6 +1912,16 @@ func (c *WAF) CreateXssMatchSetRequest(input *CreateXssMatchSetInput) (req *requ // CreateXssMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates an XssMatchSet, which you use to allow, block, or count requests // that contain cross-site scripting attacks in the specified part of web requests. // AWS WAF searches for character sequences that are likely to be malicious @@ -1785,6 +2067,16 @@ func (c *WAF) DeleteByteMatchSetRequest(input *DeleteByteMatchSetInput) (req *re // DeleteByteMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's // still used in any Rules or if it still includes any ByteMatchTuple objects // (any filters). @@ -1912,6 +2204,16 @@ func (c *WAF) DeleteGeoMatchSetRequest(input *DeleteGeoMatchSetInput) (req *requ // DeleteGeoMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's // still used in any Rules or if it still includes any countries. // @@ -2038,6 +2340,16 @@ func (c *WAF) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, // DeleteIPSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes an IPSet. You can't delete an IPSet if it's still used // in any Rules or if it still includes any IP addresses. // @@ -2165,6 +2477,16 @@ func (c *WAF) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfiguratio // DeleteLoggingConfiguration API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes the LoggingConfiguration from the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2253,6 +2575,16 @@ func (c *WAF) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) // DeletePermissionPolicy API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes an IAM policy from the specified RuleGroup. // // The user making the request must be the owner of the RuleGroup. @@ -2342,6 +2674,16 @@ func (c *WAF) DeleteRateBasedRuleRequest(input *DeleteRateBasedRuleInput) (req * // DeleteRateBasedRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RateBasedRule. You can't delete a rule if it's still // used in any WebACL objects or if it still includes any predicates, such as // ByteMatchSet objects. @@ -2474,6 +2816,16 @@ func (c *WAF) DeleteRegexMatchSetRequest(input *DeleteRegexMatchSetInput) (req * // DeleteRegexMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if // it's still used in any Rules or if it still includes any RegexMatchTuples // objects (any filters). @@ -2601,6 +2953,16 @@ func (c *WAF) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (r // DeleteRegexPatternSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet // if it's still used in any RegexMatchSet or if the RegexPatternSet is not // empty. @@ -2716,6 +3078,16 @@ func (c *WAF) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, o // DeleteRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a Rule. You can't delete a Rule if it's still used in // any WebACL objects or if it still includes any predicates, such as ByteMatchSet // objects. @@ -2846,6 +3218,16 @@ func (c *WAF) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request. // DeleteRuleGroup API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RuleGroup. You can't delete a RuleGroup if it's still // used in any WebACL objects or if it still includes any rules. // @@ -2989,6 +3371,16 @@ func (c *WAF) DeleteSizeConstraintSetRequest(input *DeleteSizeConstraintSetInput // DeleteSizeConstraintSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet // if it's still used in any Rules or if it still includes any SizeConstraint // objects (any filters). @@ -3116,6 +3508,16 @@ func (c *WAF) DeleteSqlInjectionMatchSetRequest(input *DeleteSqlInjectionMatchSe // DeleteSqlInjectionMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet // if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple // objects. @@ -3244,6 +3646,16 @@ func (c *WAF) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Reques // DeleteWebACL API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a WebACL. You can't delete a WebACL if it still contains // any Rules. // @@ -3371,6 +3783,16 @@ func (c *WAF) DeleteXssMatchSetRequest(input *DeleteXssMatchSetInput) (req *requ // DeleteXssMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's // still used in any Rules or if it still contains any XssMatchTuple objects. // @@ -3498,6 +3920,16 @@ func (c *WAF) GetByteMatchSetRequest(input *GetByteMatchSetInput) (req *request. // GetByteMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the ByteMatchSet specified by ByteMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3585,6 +4017,16 @@ func (c *WAF) GetChangeTokenRequest(input *GetChangeTokenInput) (req *request.Re // GetChangeToken API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // When you want to create, update, or delete AWS WAF objects, get a change // token and include the change token in the create, update, or delete request. // Change tokens ensure that your application doesn't submit conflicting requests @@ -3679,6 +4121,16 @@ func (c *WAF) GetChangeTokenStatusRequest(input *GetChangeTokenStatusInput) (req // GetChangeTokenStatus API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the status of a ChangeToken that you got by calling GetChangeToken. // ChangeTokenStatus is one of the following values: // @@ -3772,6 +4224,16 @@ func (c *WAF) GetGeoMatchSetRequest(input *GetGeoMatchSetInput) (req *request.Re // GetGeoMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the GeoMatchSet that is specified by GeoMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3859,6 +4321,16 @@ func (c *WAF) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, outpu // GetIPSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the IPSet that is specified by IPSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3946,6 +4418,16 @@ func (c *WAF) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput // GetLoggingConfiguration API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the LoggingConfiguration for the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4029,6 +4511,16 @@ func (c *WAF) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req * // GetPermissionPolicy API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the IAM policy attached to the RuleGroup. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4112,6 +4604,16 @@ func (c *WAF) GetRateBasedRuleRequest(input *GetRateBasedRuleInput) (req *reques // GetRateBasedRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RateBasedRule that is specified by the RuleId that you included // in the GetRateBasedRule request. // @@ -4200,6 +4702,16 @@ func (c *WAF) GetRateBasedRuleManagedKeysRequest(input *GetRateBasedRuleManagedK // GetRateBasedRuleManagedKeys API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of IP addresses currently being blocked by the RateBasedRule // that is specified by the RuleId. The maximum number of managed keys that // will be blocked is 10,000. If more than 10,000 addresses exceed the rate @@ -4319,6 +4831,16 @@ func (c *WAF) GetRegexMatchSetRequest(input *GetRegexMatchSetInput) (req *reques // GetRegexMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RegexMatchSet specified by RegexMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4406,6 +4928,16 @@ func (c *WAF) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *re // GetRegexPatternSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RegexPatternSet specified by RegexPatternSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4493,6 +5025,16 @@ func (c *WAF) GetRuleRequest(input *GetRuleInput) (req *request.Request, output // GetRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the Rule that is specified by the RuleId that you included in the // GetRule request. // @@ -4581,6 +5123,16 @@ func (c *WAF) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Reques // GetRuleGroup API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RuleGroup that is specified by the RuleGroupId that you included // in the GetRuleGroup request. // @@ -4667,6 +5219,16 @@ func (c *WAF) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *re // GetSampledRequests API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Gets detailed information about a specified number of requests--a sample--that // AWS WAF randomly selects from among the first 5,000 requests that your AWS // resource received during a time range that you choose. You can specify a @@ -4760,6 +5322,16 @@ func (c *WAF) GetSizeConstraintSetRequest(input *GetSizeConstraintSetInput) (req // GetSizeConstraintSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the SizeConstraintSet specified by SizeConstraintSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4847,6 +5419,16 @@ func (c *WAF) GetSqlInjectionMatchSetRequest(input *GetSqlInjectionMatchSetInput // GetSqlInjectionMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4934,6 +5516,16 @@ func (c *WAF) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, out // GetWebACL API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the WebACL that is specified by WebACLId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5021,6 +5613,16 @@ func (c *WAF) GetXssMatchSetRequest(input *GetXssMatchSetInput) (req *request.Re // GetXssMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the XssMatchSet that is specified by XssMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5108,6 +5710,16 @@ func (c *WAF) ListActivatedRulesInRuleGroupRequest(input *ListActivatedRulesInRu // ListActivatedRulesInRuleGroup API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of ActivatedRule objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5220,6 +5832,16 @@ func (c *WAF) ListByteMatchSetsRequest(input *ListByteMatchSetsInput) (req *requ // ListByteMatchSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of ByteMatchSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5304,6 +5926,16 @@ func (c *WAF) ListGeoMatchSetsRequest(input *ListGeoMatchSetsInput) (req *reques // ListGeoMatchSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of GeoMatchSetSummary objects in the response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5388,6 +6020,16 @@ func (c *WAF) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, o // ListIPSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of IPSetSummary objects in the response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5472,6 +6114,16 @@ func (c *WAF) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsI // ListLoggingConfigurations API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of LoggingConfiguration objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5584,6 +6236,16 @@ func (c *WAF) ListRateBasedRulesRequest(input *ListRateBasedRulesInput) (req *re // ListRateBasedRules API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5668,6 +6330,16 @@ func (c *WAF) ListRegexMatchSetsRequest(input *ListRegexMatchSetsInput) (req *re // ListRegexMatchSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RegexMatchSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5752,6 +6424,16 @@ func (c *WAF) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req // ListRegexPatternSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RegexPatternSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5836,6 +6518,16 @@ func (c *WAF) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request.Re // ListRuleGroups API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleGroup objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5916,6 +6608,16 @@ func (c *WAF) ListRulesRequest(input *ListRulesInput) (req *request.Request, out // ListRules API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6000,6 +6702,16 @@ func (c *WAF) ListSizeConstraintSetsRequest(input *ListSizeConstraintSetsInput) // ListSizeConstraintSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of SizeConstraintSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6084,6 +6796,16 @@ func (c *WAF) ListSqlInjectionMatchSetsRequest(input *ListSqlInjectionMatchSetsI // ListSqlInjectionMatchSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of SqlInjectionMatchSet objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6168,6 +6890,16 @@ func (c *WAF) ListSubscribedRuleGroupsRequest(input *ListSubscribedRuleGroupsInp // ListSubscribedRuleGroups API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleGroup objects that you are subscribed to. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6251,6 +6983,26 @@ func (c *WAF) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req * // ListTagsForResource API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Retrieves the tags associated with the specified AWS resource. Tags are key:value +// pairs that you can use to categorize and manage your resources, for purposes +// like billing. For example, you might set the tag key to "customer" and the +// value to the customer name or ID. You can specify one or more tags to add +// to each AWS resource, up to 50 tags for a resource. +// +// Tagging is only available through the API, SDKs, and CLI. You can't manage +// or view tags through the AWS WAF Classic console. You can tag the AWS resources +// that you manage through AWS WAF Classic: web ACLs, rule groups, and 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. @@ -6367,6 +7119,16 @@ func (c *WAF) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, // ListWebACLs API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of WebACLSummary objects in the response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6451,6 +7213,16 @@ func (c *WAF) ListXssMatchSetsRequest(input *ListXssMatchSetsInput) (req *reques // ListXssMatchSets API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of XssMatchSet objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6535,6 +7307,16 @@ func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput // PutLoggingConfiguration API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Associates a LoggingConfiguration with a specified web ACL. // // You can access information about all traffic that AWS WAF inspects using @@ -6652,8 +7434,18 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * // PutPermissionPolicy API operation for AWS WAF. // -// Attaches a IAM policy to the specified resource. The only supported use for -// this action is to share a RuleGroup across accounts. +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Attaches an IAM policy to the specified resource. The only supported use +// for this action is to share a RuleGroup across accounts. // // The PutPermissionPolicy is subject to the following restrictions: // @@ -6790,6 +7582,27 @@ func (c *WAF) TagResourceRequest(input *TagResourceInput) (req *request.Request, // TagResource API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Associates tags with the specified AWS resource. Tags are key:value pairs +// that you can use to categorize and manage your resources, for purposes like +// billing. For example, you might set the tag key to "customer" and the value +// to the customer name or ID. You can specify one or more tags to add to each +// AWS resource, up to 50 tags for a resource. +// +// Tagging is only available through the API, SDKs, and CLI. You can't manage +// or view tags through the AWS WAF Classic console. You can use this action +// to tag the AWS resources that you manage through AWS WAF Classic: web ACLs, +// rule groups, and 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. @@ -6913,6 +7726,16 @@ func (c *WAF) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // UntagResource API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -7029,6 +7852,16 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // UpdateByteMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For // each ByteMatchTuple object, you specify the following values: // @@ -7225,6 +8058,16 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // UpdateGeoMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each // GeoMatchConstraint object, you specify the following values: // @@ -7420,6 +8263,16 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // UpdateIPSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor // object, you specify the following values: // @@ -7639,6 +8492,16 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // UpdateRateBasedRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes Predicate objects in a rule and updates the RateLimit // in the rule. // @@ -7655,13 +8518,13 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // // * A ByteMatchSet that matches BadBot in the User-Agent header // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // You then add the RateBasedRule to a WebACL and specify that you want to block // requests that satisfy the rule. For a request to be blocked, it must come // from the IP address 192.0.2.44 and the User-Agent header in the request must // contain the value BadBot. Further, requests that match these two conditions -// much be received at a rate of more than 15,000 every five minutes. If the +// much be received at a rate of more than 1,000 every five minutes. If the // rate drops below this limit, AWS WAF no longer blocks the requests. // // As a second example, suppose you want to limit requests to a particular page @@ -7673,7 +8536,7 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // // * A TargetString of login // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // By adding this RateBasedRule to a WebACL, you could limit requests to your // login page without affecting the rest of your site. @@ -7844,6 +8707,16 @@ func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req * // UpdateRegexMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. // For each RegexMatchSetUpdate object, you specify the following values: // @@ -8011,6 +8884,16 @@ func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (r // UpdateRegexPatternSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each // RegexPatternString object, you specify the following values: // @@ -8175,6 +9058,16 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // UpdateRule API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests // that you want to allow, block, or count. If you add more than one predicate @@ -8376,6 +9269,16 @@ func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request. // UpdateRuleGroup API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes ActivatedRule objects in a RuleGroup. // // You can only insert REGULAR rules into a rule group. @@ -8554,6 +9457,16 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // UpdateSizeConstraintSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. // For each SizeConstraint object, you specify the following values: // @@ -8761,6 +9674,16 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // UpdateSqlInjectionMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. // For each SqlInjectionMatchTuple object, you specify the following values: // @@ -8953,6 +9876,16 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // UpdateWebACL API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies // web requests that you want to allow, block, or count. When you update a WebACL, // you specify the following values: @@ -8995,12 +9928,12 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // with a CloudFront distribution. // // The ActivatedRule can be a rule group. If you specify a rule group as your -// ActivatedRule, you can exclude specific rules from that rule group. +// ActivatedRule , you can exclude specific rules from that rule group. // // If you already have a rule group associated with a web ACL and want to submit // an UpdateWebACL request to exclude certain rules from that rule group, you // must first remove the rule group from the web ACL, the re-insert it again, -// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. +// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules . // // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will @@ -9179,6 +10112,16 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // UpdateXssMatchSet API operation for AWS WAF. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For // each XssMatchTuple object, you specify the following values: // @@ -9327,6 +10270,16 @@ func (c *WAF) UpdateXssMatchSetWithContext(ctx aws.Context, input *UpdateXssMatc return out, req.Send() } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The ActivatedRule object in an UpdateWebACL request specifies a Rule that // you want to insert or delete, the priority of the Rule in the WebACL, and // the action that you want AWS WAF to take when a web request matches the Rule @@ -9517,8 +10470,8 @@ func (s *ActivatedRule) SetType(v string) *ActivatedRule { } type BadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9535,17 +10488,17 @@ func (s BadRequestException) GoString() string { func newErrorBadRequestException(v protocol.ResponseMetadata) error { return &BadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s BadRequestException) Code() string { +func (s *BadRequestException) Code() string { return "WAFBadRequestException" } // Message returns the exception's message. -func (s BadRequestException) Message() string { +func (s *BadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9553,24 +10506,34 @@ func (s BadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s BadRequestException) OrigErr() error { +func (s *BadRequestException) OrigErr() error { return nil } -func (s BadRequestException) Error() string { +func (s *BadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s BadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s BadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // In a GetByteMatchSet request, ByteMatchSet is a complex type that contains // the ByteMatchSetId and Name of a ByteMatchSet, and the values that you specified // when you updated the ByteMatchSet. @@ -9633,6 +10596,16 @@ func (s *ByteMatchSet) SetName(v string) *ByteMatchSet { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returned by ListByteMatchSets. Each ByteMatchSetSummary object includes the // Name and ByteMatchSetId for one ByteMatchSet. type ByteMatchSetSummary struct { @@ -9676,6 +10649,16 @@ func (s *ByteMatchSetSummary) SetName(v string) *ByteMatchSetSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies whether to // insert or delete a ByteMatchTuple and includes the settings for the ByteMatchTuple. type ByteMatchSetUpdate struct { @@ -9738,6 +10721,16 @@ func (s *ByteMatchSetUpdate) SetByteMatchTuple(v *ByteMatchTuple) *ByteMatchSetU return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The bytes (typically a string that corresponds with ASCII characters) 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. @@ -9860,7 +10853,7 @@ type ByteMatchTuple struct { // Text transformations eliminate some of the 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 TargetString before inspecting a request + // AWS WAF performs the transformation on FieldToMatch before inspecting it // for a match. // // You can only specify a single type of TextTransformation. @@ -10293,7 +11286,7 @@ type CreateRateBasedRuleInput struct { // change the name of the metric after you create the RateBasedRule. // // MetricName is a required field - MetricName *string `type:"string" required:"true"` + MetricName *string `min:"1" type:"string" required:"true"` // A friendly name or description of the RateBasedRule. You can't change the // name of a RateBasedRule after you create it. @@ -10343,6 +11336,9 @@ func (s *CreateRateBasedRuleInput) Validate() error { if s.MetricName == nil { invalidParams.Add(request.NewErrParamRequired("MetricName")) } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -10649,7 +11645,7 @@ type CreateRuleGroupInput struct { // of the metric after you create the RuleGroup. // // MetricName is a required field - MetricName *string `type:"string" required:"true"` + MetricName *string `min:"1" type:"string" required:"true"` // A friendly name or description of the RuleGroup. You can't change Name after // you create a RuleGroup. @@ -10682,6 +11678,9 @@ func (s *CreateRuleGroupInput) Validate() error { if s.MetricName == nil { invalidParams.Add(request.NewErrParamRequired("MetricName")) } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -10781,7 +11780,7 @@ type CreateRuleInput struct { // of the metric after you create the Rule. // // MetricName is a required field - MetricName *string `type:"string" required:"true"` + MetricName *string `min:"1" type:"string" required:"true"` // A friendly name or description of the Rule. You can't change the name of // a Rule after you create it. @@ -10814,6 +11813,9 @@ func (s *CreateRuleInput) Validate() error { if s.MetricName == nil { invalidParams.Add(request.NewErrParamRequired("MetricName")) } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -11108,7 +12110,7 @@ type CreateWebACLInput struct { // after you create the WebACL. // // MetricName is a required field - MetricName *string `type:"string" required:"true"` + MetricName *string `min:"1" type:"string" required:"true"` // A friendly name or description of the WebACL. You can't change Name after // you create the WebACL. @@ -11144,6 +12146,9 @@ func (s *CreateWebACLInput) Validate() error { if s.MetricName == nil { invalidParams.Add(request.NewErrParamRequired("MetricName")) } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -11175,33 +12180,143 @@ func (s *CreateWebACLInput) Validate() error { return nil } -// SetChangeToken sets the ChangeToken field's value. -func (s *CreateWebACLInput) SetChangeToken(v string) *CreateWebACLInput { - s.ChangeToken = &v +// SetChangeToken sets the ChangeToken field's value. +func (s *CreateWebACLInput) SetChangeToken(v string) *CreateWebACLInput { + s.ChangeToken = &v + return s +} + +// SetDefaultAction sets the DefaultAction field's value. +func (s *CreateWebACLInput) SetDefaultAction(v *WafAction) *CreateWebACLInput { + s.DefaultAction = v + return s +} + +// SetMetricName sets the MetricName field's value. +func (s *CreateWebACLInput) SetMetricName(v string) *CreateWebACLInput { + s.MetricName = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateWebACLInput) SetName(v string) *CreateWebACLInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateWebACLInput) SetTags(v []*Tag) *CreateWebACLInput { + s.Tags = v + return s +} + +type CreateWebACLMigrationStackInput struct { + _ struct{} `type:"structure"` + + // Indicates whether to exclude entities that can't be migrated or to stop the + // migration. Set this to true to ignore unsupported entities in the web ACL + // during the migration. Otherwise, if AWS WAF encounters unsupported entities, + // it stops the process and throws an exception. + // + // IgnoreUnsupportedType is a required field + IgnoreUnsupportedType *bool `type:"boolean" required:"true"` + + // The name of the Amazon S3 bucket to store the CloudFormation template in. + // The S3 bucket must be configured as follows for the migration: + // + // * The bucket name must start with aws-waf-migration-. For example, aws-waf-migration-my-web-acl. + // + // * The bucket must be in the Region where you are deploying the template. + // For example, for a web ACL in us-west-2, you must use an Amazon S3 bucket + // in us-west-2 and you must deploy the template stack to us-west-2. + // + // * The bucket policies must permit the migration process to write data. + // For listings of the bucket policies, see the Examples section. + // + // S3BucketName is a required field + S3BucketName *string `min:"3" type:"string" required:"true"` + + // The UUID of the WAF Classic web ACL that you want to migrate to WAF v2. + // + // WebACLId is a required field + WebACLId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateWebACLMigrationStackInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWebACLMigrationStackInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateWebACLMigrationStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateWebACLMigrationStackInput"} + if s.IgnoreUnsupportedType == nil { + invalidParams.Add(request.NewErrParamRequired("IgnoreUnsupportedType")) + } + if s.S3BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketName")) + } + if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) + } + if s.WebACLId == nil { + invalidParams.Add(request.NewErrParamRequired("WebACLId")) + } + if s.WebACLId != nil && len(*s.WebACLId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIgnoreUnsupportedType sets the IgnoreUnsupportedType field's value. +func (s *CreateWebACLMigrationStackInput) SetIgnoreUnsupportedType(v bool) *CreateWebACLMigrationStackInput { + s.IgnoreUnsupportedType = &v return s } -// SetDefaultAction sets the DefaultAction field's value. -func (s *CreateWebACLInput) SetDefaultAction(v *WafAction) *CreateWebACLInput { - s.DefaultAction = v +// SetS3BucketName sets the S3BucketName field's value. +func (s *CreateWebACLMigrationStackInput) SetS3BucketName(v string) *CreateWebACLMigrationStackInput { + s.S3BucketName = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *CreateWebACLInput) SetMetricName(v string) *CreateWebACLInput { - s.MetricName = &v +// SetWebACLId sets the WebACLId field's value. +func (s *CreateWebACLMigrationStackInput) SetWebACLId(v string) *CreateWebACLMigrationStackInput { + s.WebACLId = &v return s } -// SetName sets the Name field's value. -func (s *CreateWebACLInput) SetName(v string) *CreateWebACLInput { - s.Name = &v - return s +type CreateWebACLMigrationStackOutput struct { + _ struct{} `type:"structure"` + + // The URL of the template created in Amazon S3. + // + // S3ObjectUrl is a required field + S3ObjectUrl *string `min:"1" type:"string" required:"true"` } -// SetTags sets the Tags field's value. -func (s *CreateWebACLInput) SetTags(v []*Tag) *CreateWebACLInput { - s.Tags = v +// String returns the string representation +func (s CreateWebACLMigrationStackOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWebACLMigrationStackOutput) GoString() string { + return s.String() +} + +// SetS3ObjectUrl sets the S3ObjectUrl field's value. +func (s *CreateWebACLMigrationStackOutput) SetS3ObjectUrl(v string) *CreateWebACLMigrationStackOutput { + s.S3ObjectUrl = &v return s } @@ -12462,8 +13577,8 @@ func (s *DeleteXssMatchSetOutput) SetChangeToken(v string) *DeleteXssMatchSetOut // The name specified is invalid. type DisallowedNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12480,17 +13595,17 @@ func (s DisallowedNameException) GoString() string { func newErrorDisallowedNameException(v protocol.ResponseMetadata) error { return &DisallowedNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DisallowedNameException) Code() string { +func (s *DisallowedNameException) Code() string { return "WAFDisallowedNameException" } // Message returns the exception's message. -func (s DisallowedNameException) Message() string { +func (s *DisallowedNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12498,24 +13613,34 @@ func (s DisallowedNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DisallowedNameException) OrigErr() error { +func (s *DisallowedNameException) OrigErr() error { return nil } -func (s DisallowedNameException) Error() string { +func (s *DisallowedNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DisallowedNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DisallowedNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DisallowedNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *DisallowedNameException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The rule to exclude from a rule group. This is applicable only when the ActivatedRule // refers to a RuleGroup. The rule must belong to the RuleGroup that is specified // by the ActivatedRule. @@ -12560,6 +13685,16 @@ func (s *ExcludedRule) SetRuleId(v string) *ExcludedRule { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies where in a web request to look for TargetString. type FieldToMatch struct { _ struct{} `type:"structure"` @@ -12573,7 +13708,7 @@ type FieldToMatch struct { // parameter name is not case sensitive. // // If the value of Type is any other value, omit Data. - Data *string `type:"string"` + Data *string `min:"1" type:"string"` // The part of the web request that you want AWS WAF to search for a specified // string. Parts of a request that you can search include the following: @@ -12625,6 +13760,9 @@ func (s FieldToMatch) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *FieldToMatch) Validate() error { invalidParams := request.ErrInvalidParams{Context: "FieldToMatch"} + if s.Data != nil && len(*s.Data) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Data", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -12647,6 +13785,16 @@ func (s *FieldToMatch) SetType(v string) *FieldToMatch { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The country from which web requests originate that you want AWS WAF to search // for. type GeoMatchConstraint struct { @@ -12702,6 +13850,16 @@ func (s *GeoMatchConstraint) SetValue(v string) *GeoMatchConstraint { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains one or more countries that AWS WAF will search for. type GeoMatchSet struct { _ struct{} `type:"structure"` @@ -12755,6 +13913,16 @@ func (s *GeoMatchSet) SetName(v string) *GeoMatchSet { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains the identifier and the name of the GeoMatchSet. type GeoMatchSetSummary struct { _ struct{} `type:"structure"` @@ -12794,6 +13962,16 @@ func (s *GeoMatchSetSummary) SetName(v string) *GeoMatchSetSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the type of update to perform to an GeoMatchSet with UpdateGeoMatchSet. type GeoMatchSetUpdate struct { _ struct{} `type:"structure"` @@ -13742,9 +14920,10 @@ type GetSampledRequestsInput struct { RuleId *string `min:"1" type:"string" required:"true"` // The start date and time and the end date and time of the range for which - // you want GetSampledRequests to return a sample of requests. Specify the date - // and time in the following format: "2016-09-27T14:50Z". You can specify any - // time range in the previous three hours. + // you want GetSampledRequests to return a sample of requests. You must specify + // the times in Coordinated Universal Time (UTC) format. UTC format includes + // the special designator, Z. For example, "2016-09-27T14:50Z". You can specify + // any time range in the previous three hours. // // TimeWindow is a required field TimeWindow *TimeWindow `type:"structure" required:"true"` @@ -13841,7 +15020,8 @@ type GetSampledRequestsOutput struct { // Usually, TimeWindow is the time range that you specified in the GetSampledRequests // request. However, if your AWS resource received more than 5,000 requests // during the time range that you specified in the request, GetSampledRequests - // returns the time range for the first 5,000 requests. + // returns the time range for the first 5,000 requests. Times are in Coordinated + // Universal Time (UTC) format. TimeWindow *TimeWindow `type:"structure"` } @@ -14175,6 +15355,16 @@ func (s *GetXssMatchSetOutput) SetXssMatchSet(v *XssMatchSet) *GetXssMatchSetOut return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The response from a GetSampledRequests request includes an HTTPHeader complex // type that appears as Headers in the response syntax. HTTPHeader contains // the names and values of all of the headers that appear in one of the web @@ -14211,6 +15401,16 @@ func (s *HTTPHeader) SetValue(v string) *HTTPHeader { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The response from a GetSampledRequests request includes an HTTPRequest complex // type that appears as Request in the response syntax. HTTPRequest contains // information about one of the web requests that were returned by GetSampledRequests. @@ -14294,6 +15494,16 @@ func (s *HTTPRequest) SetURI(v string) *HTTPRequest { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains one or more IP addresses or blocks of IP addresses specified in // Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports IPv4 address // ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address @@ -14359,6 +15569,16 @@ func (s *IPSet) SetName(v string) *IPSet { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the IP address type (IPV4 or IPV6) and the IP address range (in // CIDR format) that web requests originate from. type IPSetDescriptor struct { @@ -14390,7 +15610,7 @@ type IPSetDescriptor struct { // specify 1111:0000:0000:0000:0000:0000:0000:0000/64. // // Value is a required field - Value *string `type:"string" required:"true"` + Value *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -14412,6 +15632,9 @@ func (s *IPSetDescriptor) Validate() error { if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14431,6 +15654,16 @@ func (s *IPSetDescriptor) SetValue(v string) *IPSetDescriptor { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains the identifier and the name of the IPSet. type IPSetSummary struct { _ struct{} `type:"structure"` @@ -14470,6 +15703,16 @@ func (s *IPSetSummary) SetName(v string) *IPSetSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the type of update to perform to an IPSet with UpdateIPSet. type IPSetUpdate struct { _ struct{} `type:"structure"` @@ -14532,8 +15775,8 @@ func (s *IPSetUpdate) SetIPSetDescriptor(v *IPSetDescriptor) *IPSetUpdate { // The operation failed because of a system problem, even though the request // was valid. Retry your request. type InternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14550,17 +15793,17 @@ func (s InternalErrorException) GoString() string { func newErrorInternalErrorException(v protocol.ResponseMetadata) error { return &InternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalErrorException) Code() string { +func (s *InternalErrorException) Code() string { return "WAFInternalErrorException" } // Message returns the exception's message. -func (s InternalErrorException) Message() string { +func (s *InternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14568,29 +15811,29 @@ func (s InternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalErrorException) OrigErr() error { +func (s *InternalErrorException) OrigErr() error { return nil } -func (s InternalErrorException) Error() string { +func (s *InternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. type InvalidAccountException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14607,17 +15850,17 @@ func (s InvalidAccountException) GoString() string { func newErrorInvalidAccountException(v protocol.ResponseMetadata) error { return &InvalidAccountException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidAccountException) Code() string { +func (s *InvalidAccountException) Code() string { return "WAFInvalidAccountException" } // Message returns the exception's message. -func (s InvalidAccountException) Message() string { +func (s *InvalidAccountException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14625,22 +15868,22 @@ func (s InvalidAccountException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidAccountException) OrigErr() error { +func (s *InvalidAccountException) OrigErr() error { return nil } -func (s InvalidAccountException) Error() string { +func (s *InvalidAccountException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidAccountException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidAccountException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidAccountException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidAccountException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because there was nothing to do. For example: @@ -14660,8 +15903,8 @@ func (s InvalidAccountException) RequestID() string { // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. type InvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14678,17 +15921,17 @@ func (s InvalidOperationException) GoString() string { func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { return &InvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidOperationException) Code() string { +func (s *InvalidOperationException) Code() string { return "WAFInvalidOperationException" } // Message returns the exception's message. -func (s InvalidOperationException) Message() string { +func (s *InvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14696,22 +15939,22 @@ func (s InvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidOperationException) OrigErr() error { +func (s *InvalidOperationException) OrigErr() error { return nil } -func (s InvalidOperationException) Error() string { +func (s *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because AWS WAF didn't recognize a parameter in the @@ -14742,8 +15985,8 @@ func (s InvalidOperationException) RequestID() string { // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Field *string `locationName:"field" type:"string" enum:"ParameterExceptionField"` @@ -14766,17 +16009,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "WAFInvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14784,22 +16027,22 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because the specified policy is not in the proper format. @@ -14825,8 +16068,8 @@ func (s InvalidParameterException) RequestID() string { // // * Your policy must be composed using IAM Policy version 2012-10-17. type InvalidPermissionPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14843,17 +16086,17 @@ func (s InvalidPermissionPolicyException) GoString() string { func newErrorInvalidPermissionPolicyException(v protocol.ResponseMetadata) error { return &InvalidPermissionPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPermissionPolicyException) Code() string { +func (s *InvalidPermissionPolicyException) Code() string { return "WAFInvalidPermissionPolicyException" } // Message returns the exception's message. -func (s InvalidPermissionPolicyException) Message() string { +func (s *InvalidPermissionPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14861,28 +16104,28 @@ func (s InvalidPermissionPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPermissionPolicyException) OrigErr() error { +func (s *InvalidPermissionPolicyException) OrigErr() error { return nil } -func (s InvalidPermissionPolicyException) Error() string { +func (s *InvalidPermissionPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPermissionPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPermissionPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPermissionPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPermissionPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // The regular expression (regex) you specified in RegexPatternString is invalid. type InvalidRegexPatternException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14899,17 +16142,17 @@ func (s InvalidRegexPatternException) GoString() string { func newErrorInvalidRegexPatternException(v protocol.ResponseMetadata) error { return &InvalidRegexPatternException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRegexPatternException) Code() string { +func (s *InvalidRegexPatternException) Code() string { return "WAFInvalidRegexPatternException" } // Message returns the exception's message. -func (s InvalidRegexPatternException) Message() string { +func (s *InvalidRegexPatternException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14917,22 +16160,22 @@ func (s InvalidRegexPatternException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRegexPatternException) OrigErr() error { +func (s *InvalidRegexPatternException) OrigErr() error { return nil } -func (s InvalidRegexPatternException) Error() string { +func (s *InvalidRegexPatternException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRegexPatternException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRegexPatternException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRegexPatternException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRegexPatternException) RequestID() string { + return s.RespMetadata.RequestID } // The operation exceeds a resource limit, for example, the maximum number of @@ -14940,8 +16183,8 @@ func (s InvalidRegexPatternException) RequestID() string { // see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. type LimitsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -14958,17 +16201,17 @@ func (s LimitsExceededException) GoString() string { func newErrorLimitsExceededException(v protocol.ResponseMetadata) error { return &LimitsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitsExceededException) Code() string { +func (s *LimitsExceededException) Code() string { return "WAFLimitsExceededException" } // Message returns the exception's message. -func (s LimitsExceededException) Message() string { +func (s *LimitsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -14976,22 +16219,22 @@ func (s LimitsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitsExceededException) OrigErr() error { +func (s *LimitsExceededException) OrigErr() error { return nil } -func (s LimitsExceededException) Error() string { +func (s *LimitsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitsExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListActivatedRulesInRuleGroupInput struct { @@ -16209,6 +17452,25 @@ type ListTagsForResourceOutput struct { NextMarker *string `min:"1" type:"string"` + // + // This is AWS WAF Classic documentation. For more information, see AWS WAF + // Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) + // in the developer guide. + // + // For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS + // WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). + // With the latest version, AWS WAF has a single set of endpoints for regional + // and global use. + // + // Information for a tag associated with an AWS resource. Tags are key:value + // pairs that you can use to categorize and manage your resources, for purposes + // like billing. For example, you might set the tag key to "customer" and the + // value to the customer name or ID. You can specify one or more tags to add + // to each AWS resource, up to 50 tags for a resource. + // + // Tagging is only available through the API, SDKs, and CLI. You can't manage + // or view tags through the AWS WAF Classic console. You can tag the AWS resources + // that you manage through AWS WAF Classic: web ACLs, rule groups, and rules. TagInfoForResource *TagInfoForResource `type:"structure"` } @@ -16412,6 +17674,16 @@ func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListX return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The Amazon Kinesis Data Firehose, RedactedFields information, and the web // ACL Amazon Resource Name (ARN). type LoggingConfiguration struct { @@ -16507,8 +17779,8 @@ func (s *LoggingConfiguration) SetResourceArn(v string) *LoggingConfiguration { // // * You tried to delete an IPSet that references one or more IP addresses. type NonEmptyEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16525,17 +17797,17 @@ func (s NonEmptyEntityException) GoString() string { func newErrorNonEmptyEntityException(v protocol.ResponseMetadata) error { return &NonEmptyEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NonEmptyEntityException) Code() string { +func (s *NonEmptyEntityException) Code() string { return "WAFNonEmptyEntityException" } // Message returns the exception's message. -func (s NonEmptyEntityException) Message() string { +func (s *NonEmptyEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16543,22 +17815,22 @@ func (s NonEmptyEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NonEmptyEntityException) OrigErr() error { +func (s *NonEmptyEntityException) OrigErr() error { return nil } -func (s NonEmptyEntityException) Error() string { +func (s *NonEmptyEntityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NonEmptyEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NonEmptyEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NonEmptyEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *NonEmptyEntityException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to add an object to or delete an object @@ -16576,8 +17848,8 @@ func (s NonEmptyEntityException) RequestID() string { // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. type NonexistentContainerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16594,17 +17866,17 @@ func (s NonexistentContainerException) GoString() string { func newErrorNonexistentContainerException(v protocol.ResponseMetadata) error { return &NonexistentContainerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NonexistentContainerException) Code() string { +func (s *NonexistentContainerException) Code() string { return "WAFNonexistentContainerException" } // Message returns the exception's message. -func (s NonexistentContainerException) Message() string { +func (s *NonexistentContainerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16612,28 +17884,28 @@ func (s NonexistentContainerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NonexistentContainerException) OrigErr() error { +func (s *NonexistentContainerException) OrigErr() error { return nil } -func (s NonexistentContainerException) Error() string { +func (s *NonexistentContainerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NonexistentContainerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NonexistentContainerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NonexistentContainerException) RequestID() string { - return s.respMetadata.RequestID +func (s *NonexistentContainerException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because the referenced object doesn't exist. type NonexistentItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -16650,17 +17922,17 @@ func (s NonexistentItemException) GoString() string { func newErrorNonexistentItemException(v protocol.ResponseMetadata) error { return &NonexistentItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NonexistentItemException) Code() string { +func (s *NonexistentItemException) Code() string { return "WAFNonexistentItemException" } // Message returns the exception's message. -func (s NonexistentItemException) Message() string { +func (s *NonexistentItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -16668,24 +17940,34 @@ func (s NonexistentItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NonexistentItemException) OrigErr() error { +func (s *NonexistentItemException) OrigErr() error { return nil } -func (s NonexistentItemException) Error() string { +func (s *NonexistentItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NonexistentItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NonexistentItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NonexistentItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *NonexistentItemException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, // GeoMatchSet, and SizeConstraintSet objects that you want to add to a Rule // and, for each object, indicates whether you want to negate the settings, @@ -16914,6 +18196,16 @@ func (s PutPermissionPolicyOutput) GoString() string { return s.String() } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A RateBasedRule is identical to a regular Rule, with one addition: a RateBasedRule // counts the number of requests that arrive from a specified IP address every // five minutes. For example, based on recent requests that you've seen from @@ -16924,9 +18216,9 @@ func (s PutPermissionPolicyOutput) GoString() string { // // * They contain the value BadBot in the User-Agent header. // -// In the rule, you also define the rate limit as 15,000. +// In the rule, you also define the rate limit as 1,000. // -// Requests that meet both of these conditions and exceed 15,000 requests every +// Requests that meet both of these conditions and exceed 1,000 requests every // five minutes trigger the rule's action (block or count), which is defined // in the web ACL. type RateBasedRule struct { @@ -16943,7 +18235,7 @@ type RateBasedRule struct { // 128 and minimum length one. It can't contain whitespace or metric names reserved // for AWS WAF, including "All" and "Default_Action." You can't change the name // of the metric after you create the RateBasedRule. - MetricName *string `type:"string"` + MetricName *string `min:"1" type:"string"` // A friendly name or description for a RateBasedRule. You can't change the // name of a RateBasedRule after you create it. @@ -17029,8 +18321,8 @@ func (s *RateBasedRule) SetRuleId(v string) *RateBasedRule { // // * You tried to delete a Rule that is still referenced by a WebACL. type ReferencedItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -17047,17 +18339,17 @@ func (s ReferencedItemException) GoString() string { func newErrorReferencedItemException(v protocol.ResponseMetadata) error { return &ReferencedItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReferencedItemException) Code() string { +func (s *ReferencedItemException) Code() string { return "WAFReferencedItemException" } // Message returns the exception's message. -func (s ReferencedItemException) Message() string { +func (s *ReferencedItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -17065,24 +18357,34 @@ func (s ReferencedItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReferencedItemException) OrigErr() error { +func (s *ReferencedItemException) OrigErr() error { return nil } -func (s ReferencedItemException) Error() string { +func (s *ReferencedItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReferencedItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReferencedItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReferencedItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReferencedItemException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // In a GetRegexMatchSet request, RegexMatchSet is a complex type that contains // the RegexMatchSetId and Name of a RegexMatchSet, and the values that you // specified when you updated the RegexMatchSet. @@ -17149,6 +18451,16 @@ func (s *RegexMatchSet) SetRegexMatchTuples(v []*RegexMatchTuple) *RegexMatchSet return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returned by ListRegexMatchSets. Each RegexMatchSetSummary object includes // the Name and RegexMatchSetId for one RegexMatchSet. type RegexMatchSetSummary struct { @@ -17192,6 +18504,16 @@ func (s *RegexMatchSetSummary) SetRegexMatchSetId(v string) *RegexMatchSetSummar return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // In an UpdateRegexMatchSet request, RegexMatchSetUpdate specifies whether // to insert or delete a RegexMatchTuple and includes the settings for the RegexMatchTuple. type RegexMatchSetUpdate struct { @@ -17255,6 +18577,16 @@ func (s *RegexMatchSetUpdate) SetRegexMatchTuple(v *RegexMatchTuple) *RegexMatch return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // 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. Each RegexMatchTuple object contains: @@ -17418,6 +18750,16 @@ func (s *RegexMatchTuple) SetTextTransformation(v string) *RegexMatchTuple { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The RegexPatternSet specifies the regular expression (regex) pattern that // you want AWS WAF to search for, such as B[a@]dB[o0]t. You can then configure // AWS WAF to reject those requests. @@ -17472,6 +18814,16 @@ func (s *RegexPatternSet) SetRegexPatternStrings(v []*string) *RegexPatternSet { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returned by ListRegexPatternSets. Each RegexPatternSetSummary object includes // the Name and RegexPatternSetId for one RegexPatternSet. type RegexPatternSetSummary struct { @@ -17516,6 +18868,16 @@ func (s *RegexPatternSetSummary) SetRegexPatternSetId(v string) *RegexPatternSet return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // In an UpdateRegexPatternSet request, RegexPatternSetUpdate specifies whether // to insert or delete a RegexPatternString and includes the settings for the // RegexPatternString. @@ -17575,6 +18937,16 @@ func (s *RegexPatternSetUpdate) SetRegexPatternString(v string) *RegexPatternSet return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects // that identify the web requests that you want to allow, block, or count. For // example, you might create a Rule that includes the following predicates: @@ -17595,7 +18967,7 @@ type Rule struct { // 128 and minimum length one. It can't contain whitespace or metric names reserved // for AWS WAF, including "All" and "Default_Action." You can't change MetricName // after you create the Rule. - MetricName *string `type:"string"` + MetricName *string `min:"1" type:"string"` // The friendly name or description for the Rule. You can't change the name // of a Rule after you create it. @@ -17652,6 +19024,16 @@ func (s *Rule) SetRuleId(v string) *Rule { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A collection of predefined rules that you can add to a web ACL. // // Rule groups are subject to the following limits: @@ -17670,7 +19052,7 @@ type RuleGroup struct { // 128 and minimum length one. It can't contain whitespace or metric names reserved // for AWS WAF, including "All" and "Default_Action." You can't change the name // of the metric after you create the RuleGroup. - MetricName *string `type:"string"` + MetricName *string `min:"1" type:"string"` // The friendly name or description for the RuleGroup. You can't change the // name of a RuleGroup after you create it. @@ -17715,6 +19097,16 @@ func (s *RuleGroup) SetRuleGroupId(v string) *RuleGroup { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains the identifier and the friendly name or description of the RuleGroup. type RuleGroupSummary struct { _ struct{} `type:"structure"` @@ -17758,6 +19150,16 @@ func (s *RuleGroupSummary) SetRuleGroupId(v string) *RuleGroupSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies an ActivatedRule and indicates whether you want to add it to a // RuleGroup or delete it from a RuleGroup. type RuleGroupUpdate struct { @@ -17820,6 +19222,16 @@ func (s *RuleGroupUpdate) SetActivatedRule(v *ActivatedRule) *RuleGroupUpdate { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains the identifier and the friendly name or description of the Rule. type RuleSummary struct { _ struct{} `type:"structure"` @@ -17863,6 +19275,16 @@ func (s *RuleSummary) SetRuleId(v string) *RuleSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies a Predicate (such as an IPSet) and indicates whether you want to // add it to a Rule or delete it from a Rule. type RuleUpdate struct { @@ -17923,6 +19345,16 @@ func (s *RuleUpdate) SetPredicate(v *Predicate) *RuleUpdate { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The response from a GetSampledRequests request includes a SampledHTTPRequests // complex type that appears as SampledRequests in the response syntax. SampledHTTPRequests // contains one SampledHTTPRequest object for each web request that is returned @@ -18006,8 +19438,8 @@ func (s *SampledHTTPRequest) SetWeight(v int64) *SampledHTTPRequest { // exception again, you will have to wait additional time until the role is // unlocked. type ServiceLinkedRoleErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18024,17 +19456,17 @@ func (s ServiceLinkedRoleErrorException) GoString() string { func newErrorServiceLinkedRoleErrorException(v protocol.ResponseMetadata) error { return &ServiceLinkedRoleErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ServiceLinkedRoleErrorException) Code() string { +func (s *ServiceLinkedRoleErrorException) Code() string { return "WAFServiceLinkedRoleErrorException" } // Message returns the exception's message. -func (s ServiceLinkedRoleErrorException) Message() string { +func (s *ServiceLinkedRoleErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18042,24 +19474,34 @@ func (s ServiceLinkedRoleErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ServiceLinkedRoleErrorException) OrigErr() error { +func (s *ServiceLinkedRoleErrorException) OrigErr() error { return nil } -func (s ServiceLinkedRoleErrorException) Error() string { +func (s *ServiceLinkedRoleErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ServiceLinkedRoleErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ServiceLinkedRoleErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ServiceLinkedRoleErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *ServiceLinkedRoleErrorException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies a constraint on the size of a part of the web request. AWS WAF // uses the Size, ComparisonOperator, and FieldToMatch to build an expression // in the form of "Size ComparisonOperator size in bytes of FieldToMatch". If @@ -18109,7 +19551,7 @@ type SizeConstraint struct { // Text transformations eliminate some of the 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 FieldToMatch before inspecting a request + // AWS WAF performs the transformation on FieldToMatch before inspecting it // for a match. // // You can only specify a single type of TextTransformation. @@ -18249,6 +19691,16 @@ func (s *SizeConstraint) SetTextTransformation(v string) *SizeConstraint { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A complex type that contains SizeConstraint objects, which specify the parts // of web requests that you want AWS WAF to inspect the size of. If a SizeConstraintSet // contains more than one SizeConstraint object, a request only needs to match @@ -18304,6 +19756,16 @@ func (s *SizeConstraintSet) SetSizeConstraints(v []*SizeConstraint) *SizeConstra return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The Id and Name of a SizeConstraintSet. type SizeConstraintSetSummary struct { _ struct{} `type:"structure"` @@ -18347,6 +19809,16 @@ func (s *SizeConstraintSetSummary) SetSizeConstraintSetId(v string) *SizeConstra return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the part of a web request that you want to inspect the size of // and indicates whether you want to add the specification to a SizeConstraintSet // or delete it from a SizeConstraintSet. @@ -18411,6 +19883,16 @@ func (s *SizeConstraintSetUpdate) SetSizeConstraint(v *SizeConstraint) *SizeCons return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A complex type that contains SqlInjectionMatchTuple objects, which specify // the parts of web requests that you want AWS WAF to inspect for snippets of // malicious SQL code and, if you want AWS WAF to inspect a header, the name @@ -18469,6 +19951,16 @@ func (s *SqlInjectionMatchSet) SetSqlInjectionMatchTuples(v []*SqlInjectionMatch return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The Id and Name of a SqlInjectionMatchSet. type SqlInjectionMatchSetSummary struct { _ struct{} `type:"structure"` @@ -18512,6 +20004,16 @@ func (s *SqlInjectionMatchSetSummary) SetSqlInjectionMatchSetId(v string) *SqlIn return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the part of a web request that you want to inspect for snippets // of malicious SQL code and indicates whether you want to add the specification // to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet. @@ -18575,6 +20077,16 @@ func (s *SqlInjectionMatchSetUpdate) SetSqlInjectionMatchTuple(v *SqlInjectionMa return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the part of a web request that you want AWS WAF to inspect for // snippets of malicious SQL code and, if you want AWS WAF to inspect a header, // the name of the header. @@ -18588,7 +20100,7 @@ type SqlInjectionMatchTuple struct { // Text transformations eliminate some of the 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 FieldToMatch before inspecting a request + // AWS WAF performs the transformation on FieldToMatch before inspecting it // for a match. // // You can only specify a single type of TextTransformation. @@ -18709,8 +20221,8 @@ func (s *SqlInjectionMatchTuple) SetTextTransformation(v string) *SqlInjectionMa // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. type StaleDataException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18727,17 +20239,17 @@ func (s StaleDataException) GoString() string { func newErrorStaleDataException(v protocol.ResponseMetadata) error { return &StaleDataException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s StaleDataException) Code() string { +func (s *StaleDataException) Code() string { return "WAFStaleDataException" } // Message returns the exception's message. -func (s StaleDataException) Message() string { +func (s *StaleDataException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18745,24 +20257,34 @@ func (s StaleDataException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s StaleDataException) OrigErr() error { +func (s *StaleDataException) OrigErr() error { return nil } -func (s StaleDataException) Error() string { +func (s *StaleDataException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s StaleDataException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *StaleDataException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s StaleDataException) RequestID() string { - return s.respMetadata.RequestID +func (s *StaleDataException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A summary of the rule groups you are subscribed to. type SubscribedRuleGroupSummary struct { _ struct{} `type:"structure"` @@ -18774,7 +20296,7 @@ type SubscribedRuleGroupSummary struct { // of the metric after you create the RuleGroup. // // MetricName is a required field - MetricName *string `type:"string" required:"true"` + MetricName *string `min:"1" type:"string" required:"true"` // A friendly name or description of the RuleGroup. You can't change the name // of a RuleGroup after you create it. @@ -18818,8 +20340,8 @@ func (s *SubscribedRuleGroupSummary) SetRuleGroupId(v string) *SubscribedRuleGro // The specified subscription does not exist. type SubscriptionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18836,17 +20358,17 @@ func (s SubscriptionNotFoundException) GoString() string { func newErrorSubscriptionNotFoundException(v protocol.ResponseMetadata) error { return &SubscriptionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s SubscriptionNotFoundException) Code() string { +func (s *SubscriptionNotFoundException) Code() string { return "WAFSubscriptionNotFoundException" } // Message returns the exception's message. -func (s SubscriptionNotFoundException) Message() string { +func (s *SubscriptionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18854,30 +20376,51 @@ func (s SubscriptionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s SubscriptionNotFoundException) OrigErr() error { +func (s *SubscriptionNotFoundException) OrigErr() error { return nil } -func (s SubscriptionNotFoundException) Error() string { +func (s *SubscriptionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s SubscriptionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *SubscriptionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s SubscriptionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *SubscriptionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// A tag associated with an AWS resource. Tags are key:value pairs that you +// can use to categorize and manage your resources, for purposes like billing. +// For example, you might set the tag key to "customer" and the value to the +// customer name or ID. You can specify one or more tags to add to each AWS +// resource, up to 50 tags for a resource. +// +// Tagging is only available through the API, SDKs, and CLI. You can't manage +// or view tags through the AWS WAF Classic console. You can tag the AWS resources +// that you manage through AWS WAF Classic: web ACLs, rule groups, and rules. type Tag struct { _ struct{} `type:"structure"` - Key *string `min:"1" type:"string"` + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` - Value *string `type:"string"` + // Value is a required field + Value *string `type:"string" required:"true"` } // String returns the string representation @@ -18893,9 +20436,15 @@ func (s Tag) GoString() 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 @@ -18915,6 +20464,25 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Information for a tag associated with an AWS resource. Tags are key:value +// pairs that you can use to categorize and manage your resources, for purposes +// like billing. For example, you might set the tag key to "customer" and the +// value to the customer name or ID. You can specify one or more tags to add +// to each AWS resource, up to 50 tags for a resource. +// +// Tagging is only available through the API, SDKs, and CLI. You can't manage +// or view tags through the AWS WAF Classic console. You can tag the AWS resources +// that you manage through AWS WAF Classic: web ACLs, rule groups, and rules. type TagInfoForResource struct { _ struct{} `type:"structure"` @@ -18946,8 +20514,8 @@ func (s *TagInfoForResource) SetTagList(v []*Tag) *TagInfoForResource { } type TagOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -18964,17 +20532,17 @@ func (s TagOperationException) GoString() string { func newErrorTagOperationException(v protocol.ResponseMetadata) error { return &TagOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagOperationException) Code() string { +func (s *TagOperationException) Code() string { return "WAFTagOperationException" } // Message returns the exception's message. -func (s TagOperationException) Message() string { +func (s *TagOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -18982,27 +20550,27 @@ func (s TagOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagOperationException) OrigErr() error { +func (s *TagOperationException) OrigErr() error { return nil } -func (s TagOperationException) Error() string { +func (s *TagOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagOperationException) RequestID() string { + return s.RespMetadata.RequestID } type TagOperationInternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -19019,17 +20587,17 @@ func (s TagOperationInternalErrorException) GoString() string { func newErrorTagOperationInternalErrorException(v protocol.ResponseMetadata) error { return &TagOperationInternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TagOperationInternalErrorException) Code() string { +func (s *TagOperationInternalErrorException) Code() string { return "WAFTagOperationInternalErrorException" } // Message returns the exception's message. -func (s TagOperationInternalErrorException) Message() string { +func (s *TagOperationInternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -19037,22 +20605,22 @@ func (s TagOperationInternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TagOperationInternalErrorException) OrigErr() error { +func (s *TagOperationInternalErrorException) OrigErr() error { return nil } -func (s TagOperationInternalErrorException) Error() string { +func (s *TagOperationInternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TagOperationInternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TagOperationInternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TagOperationInternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *TagOperationInternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } type TagResourceInput struct { @@ -19133,9 +20701,22 @@ func (s TagResourceOutput) GoString() string { return s.String() } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // In a GetSampledRequests request, the StartTime and EndTime objects specify // the time range for which you want AWS WAF to return a sample of web requests. // +// You must specify the times in Coordinated Universal Time (UTC) format. UTC +// format includes the special designator, Z. For example, "2016-09-27T14:50Z". +// // In a GetSampledRequests response, the StartTime and EndTime objects specify // the time range for which AWS WAF actually returned a sample of web requests. // AWS WAF gets the specified number of requests from among the first 5,000 @@ -19147,17 +20728,19 @@ type TimeWindow struct { _ struct{} `type:"structure"` // The end of the time range from which you want GetSampledRequests to return - // a sample of the requests that your AWS resource received. Specify the date - // and time in the following format: "2016-09-27T14:50Z". You can specify any - // time range in the previous three hours. + // a sample of the requests that your AWS resource received. You must specify + // the date and time in Coordinated Universal Time (UTC) format. UTC format + // includes the special designator, Z. For example, "2016-09-27T14:50Z". You + // can specify any time range in the previous three hours. // // EndTime is a required field EndTime *time.Time `type:"timestamp" required:"true"` // The beginning of the time range from which you want GetSampledRequests to - // return a sample of the requests that your AWS resource received. Specify - // the date and time in the following format: "2016-09-27T14:50Z". You can specify - // any time range in the previous three hours. + // return a sample of the requests that your AWS resource received. You must + // specify the date and time in Coordinated Universal Time (UTC) format. UTC + // format includes the special designator, Z. For example, "2016-09-27T14:50Z". + // You can specify any time range in the previous three hours. // // StartTime is a required field StartTime *time.Time `type:"timestamp" required:"true"` @@ -20704,6 +22287,96 @@ func (s *UpdateXssMatchSetOutput) SetChangeToken(v string) *UpdateXssMatchSetOut return s } +// The operation failed due to a problem with the migration. The failure cause +// is provided in the exception, in the MigrationErrorType: +// +// * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the +// IgnoreUnsupportedType is not set to true. +// +// * ENTITY_NOT_FOUND - The web ACL doesn't exist. +// +// * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject +// action to the specified Amazon S3 bucket. +// +// * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to +// perform the PutObject action in the bucket. +// +// * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. +// +// * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as +// the web ACL. +// +// * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 +// bucket for another reason. +type WAFEntityMigrationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` + + MigrationErrorReason *string `type:"string"` + + MigrationErrorType *string `type:"string" enum:"MigrationErrorType"` +} + +// String returns the string representation +func (s WAFEntityMigrationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WAFEntityMigrationException) GoString() string { + return s.String() +} + +func newErrorWAFEntityMigrationException(v protocol.ResponseMetadata) error { + return &WAFEntityMigrationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *WAFEntityMigrationException) Code() string { + return "WAFEntityMigrationException" +} + +// Message returns the exception's message. +func (s *WAFEntityMigrationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *WAFEntityMigrationException) OrigErr() error { + return nil +} + +func (s *WAFEntityMigrationException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *WAFEntityMigrationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *WAFEntityMigrationException) RequestID() string { + return s.RespMetadata.RequestID +} + +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // For the action that is associated with a rule in a WebACL, specifies the // action that you want AWS WAF to perform when a web request matches all of // the conditions in a rule. For the default action in a WebACL, specifies the @@ -20757,6 +22430,16 @@ func (s *WafAction) SetType(v string) *WafAction { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The action to take if any rule within the RuleGroup matches a request. type WafOverrideAction struct { _ struct{} `type:"structure"` @@ -20797,6 +22480,16 @@ func (s *WafOverrideAction) SetType(v string) *WafOverrideAction { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains the Rules that identify the requests that you want to allow, block, // or count. In a WebACL, you also specify a default action (ALLOW or BLOCK), // and the action for each Rule that you add to a WebACL, for example, block @@ -20819,7 +22512,7 @@ type WebACL struct { // 128 and minimum length one. It can't contain whitespace or metric names reserved // for AWS WAF, including "All" and "Default_Action." You can't change MetricName // after you create the WebACL. - MetricName *string `type:"string"` + MetricName *string `min:"1" type:"string"` // A friendly name or description of the WebACL. You can't change the name of // a WebACL after you create it. @@ -20890,6 +22583,16 @@ func (s *WebACL) SetWebACLId(v string) *WebACL { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Contains the identifier and the name or description of the WebACL. type WebACLSummary struct { _ struct{} `type:"structure"` @@ -20932,6 +22635,16 @@ func (s *WebACLSummary) SetWebACLId(v string) *WebACLSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies whether to insert a Rule into or delete a Rule from a WebACL. type WebACLUpdate struct { _ struct{} `type:"structure"` @@ -20993,6 +22706,16 @@ func (s *WebACLUpdate) SetActivatedRule(v *ActivatedRule) *WebACLUpdate { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // A complex type that contains XssMatchTuple objects, which specify the parts // of web requests that you want AWS WAF to inspect for cross-site scripting // attacks and, if you want AWS WAF to inspect a header, the name of the header. @@ -21050,6 +22773,16 @@ func (s *XssMatchSet) SetXssMatchTuples(v []*XssMatchTuple) *XssMatchSet { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // The Id and Name of an XssMatchSet. type XssMatchSetSummary struct { _ struct{} `type:"structure"` @@ -21092,6 +22825,16 @@ func (s *XssMatchSetSummary) SetXssMatchSetId(v string) *XssMatchSetSummary { return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the part of a web request that you want to inspect for cross-site // scripting attacks and indicates whether you want to add the specification // to an XssMatchSet or delete it from an XssMatchSet. @@ -21155,6 +22898,16 @@ func (s *XssMatchSetUpdate) SetXssMatchTuple(v *XssMatchTuple) *XssMatchSetUpdat return s } +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Specifies the part of a web request that you want AWS WAF to inspect for // cross-site scripting attacks and, if you want AWS WAF to inspect a header, // the name of the header. @@ -21168,7 +22921,7 @@ type XssMatchTuple struct { // Text transformations eliminate some of the 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 FieldToMatch before inspecting a request + // AWS WAF performs the transformation on FieldToMatch before inspecting it // for a match. // // You can only specify a single type of TextTransformation. @@ -22110,6 +23863,29 @@ const ( MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" ) +const ( + // MigrationErrorTypeEntityNotSupported is a MigrationErrorType enum value + MigrationErrorTypeEntityNotSupported = "ENTITY_NOT_SUPPORTED" + + // MigrationErrorTypeEntityNotFound is a MigrationErrorType enum value + MigrationErrorTypeEntityNotFound = "ENTITY_NOT_FOUND" + + // MigrationErrorTypeS3BucketNoPermission is a MigrationErrorType enum value + MigrationErrorTypeS3BucketNoPermission = "S3_BUCKET_NO_PERMISSION" + + // MigrationErrorTypeS3BucketNotAccessible is a MigrationErrorType enum value + MigrationErrorTypeS3BucketNotAccessible = "S3_BUCKET_NOT_ACCESSIBLE" + + // MigrationErrorTypeS3BucketNotFound is a MigrationErrorType enum value + MigrationErrorTypeS3BucketNotFound = "S3_BUCKET_NOT_FOUND" + + // MigrationErrorTypeS3BucketInvalidRegion is a MigrationErrorType enum value + MigrationErrorTypeS3BucketInvalidRegion = "S3_BUCKET_INVALID_REGION" + + // MigrationErrorTypeS3InternalError is a MigrationErrorType enum value + MigrationErrorTypeS3InternalError = "S3_INTERNAL_ERROR" +) + const ( // ParameterExceptionFieldChangeAction is a ParameterExceptionField enum value ParameterExceptionFieldChangeAction = "CHANGE_ACTION" diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go b/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go index a3399aaa724..2ce69f0afb6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/doc.go @@ -3,13 +3,25 @@ // Package waf provides the client and types for making API // requests to AWS WAF. // -// This is the AWS WAF API Reference for using AWS WAF with Amazon CloudFront. -// The AWS WAF actions and data types listed in the reference are available -// for protecting Amazon CloudFront distributions. You can use these actions -// and data types via the endpoint waf.amazonaws.com. This guide is for developers -// who need detailed information about the AWS WAF API actions, data types, -// and errors. For detailed information about AWS WAF features and an overview -// of how to use the AWS WAF API, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/). +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// This is the AWS WAF Classic API Reference for using AWS WAF Classic with +// Amazon CloudFront. The AWS WAF Classic actions and data types listed in the +// reference are available for protecting Amazon CloudFront distributions. You +// can use these actions and data types via the endpoint waf.amazonaws.com. +// This guide is for developers who need detailed information about the AWS +// WAF Classic API actions, data types, and errors. For detailed information +// about AWS WAF Classic features and an overview of how to use the AWS WAF +// Classic API, see the AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. // // See https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 9a71b5b9bd9..083ea5286f5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -213,6 +213,32 @@ const ( // ErrCodeTagOperationInternalErrorException for service response error code // "WAFTagOperationInternalErrorException". ErrCodeTagOperationInternalErrorException = "WAFTagOperationInternalErrorException" + + // ErrCodeWAFEntityMigrationException for service response error code + // "WAFEntityMigrationException". + // + // The operation failed due to a problem with the migration. The failure cause + // is provided in the exception, in the MigrationErrorType: + // + // * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the + // IgnoreUnsupportedType is not set to true. + // + // * ENTITY_NOT_FOUND - The web ACL doesn't exist. + // + // * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject + // action to the specified Amazon S3 bucket. + // + // * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to + // perform the PutObject action in the bucket. + // + // * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. + // + // * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as + // the web ACL. + // + // * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 + // bucket for another reason. + ErrCodeWAFEntityMigrationException = "WAFEntityMigrationException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ @@ -234,4 +260,5 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "WAFSubscriptionNotFoundException": newErrorSubscriptionNotFoundException, "WAFTagOperationException": newErrorTagOperationException, "WAFTagOperationInternalErrorException": newErrorTagOperationInternalErrorException, + "WAFEntityMigrationException": newErrorWAFEntityMigrationException, } 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 ec82a1dc500..81b86a223f5 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 @@ -58,6 +58,16 @@ func (c *WAFRegional) AssociateWebACLRequest(input *AssociateWebACLInput) (req * // AssociateWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic Regional documentation. For more information, see +// AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Associates a web ACL with a resource, either an application load balancer // or Amazon API Gateway stage. // @@ -179,6 +189,16 @@ func (c *WAFRegional) CreateByteMatchSetRequest(input *waf.CreateByteMatchSetInp // CreateByteMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part // of a web request that you want AWS WAF to inspect, such as the values of // the User-Agent header or the query string. For example, you can create a @@ -326,6 +346,16 @@ func (c *WAFRegional) CreateGeoMatchSetRequest(input *waf.CreateGeoMatchSetInput // CreateGeoMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates an GeoMatchSet, which you use to specify which web requests you want // to allow or block based on the country that the requests originate from. // For example, if you're receiving a lot of requests from one or more countries @@ -472,6 +502,16 @@ func (c *WAFRegional) CreateIPSetRequest(input *waf.CreateIPSetInput) (req *requ // CreateIPSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates an IPSet, which you use to specify which web requests that you want // to allow or block based on the IP addresses that the requests originate from. // For example, if you're receiving a lot of requests from one or more individual @@ -619,6 +659,16 @@ func (c *WAFRegional) CreateRateBasedRuleRequest(input *waf.CreateRateBasedRuleI // CreateRateBasedRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RateBasedRule. The RateBasedRule contains a RateLimit, which specifies // the maximum number of requests that AWS WAF allows from a specified IP address // in a five-minute period. The RateBasedRule also contains the IPSet objects, @@ -626,23 +676,22 @@ func (c *WAFRegional) CreateRateBasedRuleRequest(input *waf.CreateRateBasedRuleI // you want to count or block if these requests exceed the RateLimit. // // If you add more than one predicate to a RateBasedRule, a request not only -// must exceed the RateLimit, but it also must match all the specifications -// to be counted or blocked. For example, suppose you add the following to a -// RateBasedRule: +// must exceed the RateLimit, but it also must match all the conditions to be +// counted or blocked. For example, suppose you add the following to a RateBasedRule: // // * An IPSet that matches the IP address 192.0.2.44/32 // // * A ByteMatchSet that matches BadBot in the User-Agent header // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // You then add the RateBasedRule to a WebACL and specify that you want to block // requests that meet the conditions in the rule. For a request to be blocked, // it must come from the IP address 192.0.2.44 and the User-Agent header in // the request must contain the value BadBot. Further, requests that match these -// two conditions must be received at a rate of more than 15,000 requests every +// two conditions must be received at a rate of more than 1,000 requests every // five minutes. If both conditions are met and the rate is exceeded, AWS WAF -// blocks the requests. If the rate drops below 15,000 for a five-minute period, +// blocks the requests. If the rate drops below 1,000 for a five-minute period, // AWS WAF no longer blocks the requests. // // As a second example, suppose you want to limit requests to a particular page @@ -654,7 +703,7 @@ func (c *WAFRegional) CreateRateBasedRuleRequest(input *waf.CreateRateBasedRuleI // // * A TargetString of login // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // By adding this RateBasedRule to a WebACL, you could limit requests to your // login page without affecting the rest of your site. @@ -807,6 +856,16 @@ func (c *WAFRegional) CreateRegexMatchSetRequest(input *waf.CreateRegexMatchSetI // CreateRegexMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the // part of a web request that you want AWS WAF to inspect, such as the values // of the User-Agent header or the query string. For example, you can create @@ -922,6 +981,16 @@ func (c *WAFRegional) CreateRegexPatternSetRequest(input *waf.CreateRegexPattern // CreateRegexPatternSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RegexPatternSet. You then use UpdateRegexPatternSet to specify // the regular expression (regex) pattern that you want AWS WAF to search for, // such as B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. @@ -1033,6 +1102,16 @@ func (c *WAFRegional) CreateRuleRequest(input *waf.CreateRuleInput) (req *reques // CreateRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and // other predicates that identify the requests that you want to block. If you // add more than one predicate to a Rule, a request must match all of the specifications @@ -1196,6 +1275,16 @@ func (c *WAFRegional) CreateRuleGroupRequest(input *waf.CreateRuleGroupInput) (r // CreateRuleGroup API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a RuleGroup. A rule group is a collection of predefined rules that // you add to a web ACL. You use UpdateRuleGroup to add rules to the rule group. // @@ -1308,6 +1397,16 @@ func (c *WAFRegional) CreateSizeConstraintSetRequest(input *waf.CreateSizeConstr // CreateSizeConstraintSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify // the part of a web request that you want AWS WAF to check for length, such // as the length of the User-Agent header or the length of the query string. @@ -1456,6 +1555,16 @@ func (c *WAFRegional) CreateSqlInjectionMatchSetRequest(input *waf.CreateSqlInje // CreateSqlInjectionMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests // that contain snippets of SQL code in a specified part of web requests. AWS // WAF searches for character sequences that are likely to be malicious strings. @@ -1600,6 +1709,16 @@ func (c *WAFRegional) CreateWebACLRequest(input *waf.CreateWebACLInput) (req *re // CreateWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates a WebACL, which contains the Rules that identify the CloudFront web // requests that you want to allow, block, or count. AWS WAF evaluates Rules // in order based on the value of Priority for each Rule. @@ -1718,6 +1837,169 @@ func (c *WAFRegional) CreateWebACLWithContext(ctx aws.Context, input *waf.Create return out, req.Send() } +const opCreateWebACLMigrationStack = "CreateWebACLMigrationStack" + +// CreateWebACLMigrationStackRequest generates a "aws/request.Request" representing the +// client's request for the CreateWebACLMigrationStack operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateWebACLMigrationStack for more information on using the CreateWebACLMigrationStack +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateWebACLMigrationStackRequest method. +// req, resp := client.CreateWebACLMigrationStackRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateWebACLMigrationStack +func (c *WAFRegional) CreateWebACLMigrationStackRequest(input *waf.CreateWebACLMigrationStackInput) (req *request.Request, output *waf.CreateWebACLMigrationStackOutput) { + op := &request.Operation{ + Name: opCreateWebACLMigrationStack, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.CreateWebACLMigrationStackInput{} + } + + output = &waf.CreateWebACLMigrationStackOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateWebACLMigrationStack API operation for AWS WAF Regional. +// +// Creates an AWS CloudFormation WAFV2 template for the specified web ACL in +// the specified Amazon S3 bucket. Then, in CloudFormation, you create a stack +// from the template, to create the web ACL and its resources in AWS WAFV2. +// Use this to migrate your AWS WAF Classic web ACL to the latest version of +// AWS WAF. +// +// This is part of a larger migration procedure for web ACLs from AWS WAF Classic +// to the latest version of AWS WAF. For the full procedure, including caveats +// and manual steps to complete the migration and switch over to the new web +// ACL, see Migrating your AWS WAF Classic resources to AWS WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-migrating-from-classic.html) +// in the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation CreateWebACLMigrationStack for usage and error information. +// +// Returned Error Types: +// * WAFInternalErrorException +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultAction Type other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafAction Type other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatch Type other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// * WAFInvalidOperationException +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// +// * WAFNonexistentItemException +// The operation failed because the referenced object doesn't exist. +// +// * WAFEntityMigrationException +// The operation failed due to a problem with the migration. The failure cause +// is provided in the exception, in the MigrationErrorType: +// +// * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the +// IgnoreUnsupportedType is not set to true. +// +// * ENTITY_NOT_FOUND - The web ACL doesn't exist. +// +// * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject +// action to the specified Amazon S3 bucket. +// +// * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to +// perform the PutObject action in the bucket. +// +// * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. +// +// * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as +// the web ACL. +// +// * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 +// bucket for another reason. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/CreateWebACLMigrationStack +func (c *WAFRegional) CreateWebACLMigrationStack(input *waf.CreateWebACLMigrationStackInput) (*waf.CreateWebACLMigrationStackOutput, error) { + req, out := c.CreateWebACLMigrationStackRequest(input) + return out, req.Send() +} + +// CreateWebACLMigrationStackWithContext is the same as CreateWebACLMigrationStack with the addition of +// the ability to pass a context and additional request options. +// +// See CreateWebACLMigrationStack for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) CreateWebACLMigrationStackWithContext(ctx aws.Context, input *waf.CreateWebACLMigrationStackInput, opts ...request.Option) (*waf.CreateWebACLMigrationStackOutput, error) { + req, out := c.CreateWebACLMigrationStackRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the @@ -1762,6 +2044,16 @@ func (c *WAFRegional) CreateXssMatchSetRequest(input *waf.CreateXssMatchSetInput // CreateXssMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Creates an XssMatchSet, which you use to allow, block, or count requests // that contain cross-site scripting attacks in the specified part of web requests. // AWS WAF searches for character sequences that are likely to be malicious @@ -1907,6 +2199,16 @@ func (c *WAFRegional) DeleteByteMatchSetRequest(input *waf.DeleteByteMatchSetInp // DeleteByteMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's // still used in any Rules or if it still includes any ByteMatchTuple objects // (any filters). @@ -2034,6 +2336,16 @@ func (c *WAFRegional) DeleteGeoMatchSetRequest(input *waf.DeleteGeoMatchSetInput // DeleteGeoMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's // still used in any Rules or if it still includes any countries. // @@ -2160,6 +2472,16 @@ func (c *WAFRegional) DeleteIPSetRequest(input *waf.DeleteIPSetInput) (req *requ // DeleteIPSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes an IPSet. You can't delete an IPSet if it's still used // in any Rules or if it still includes any IP addresses. // @@ -2287,6 +2609,16 @@ func (c *WAFRegional) DeleteLoggingConfigurationRequest(input *waf.DeleteLogging // DeleteLoggingConfiguration API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes the LoggingConfiguration from the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2375,6 +2707,16 @@ func (c *WAFRegional) DeletePermissionPolicyRequest(input *waf.DeletePermissionP // DeletePermissionPolicy API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes an IAM policy from the specified RuleGroup. // // The user making the request must be the owner of the RuleGroup. @@ -2464,6 +2806,16 @@ func (c *WAFRegional) DeleteRateBasedRuleRequest(input *waf.DeleteRateBasedRuleI // DeleteRateBasedRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RateBasedRule. You can't delete a rule if it's still // used in any WebACL objects or if it still includes any predicates, such as // ByteMatchSet objects. @@ -2596,6 +2948,16 @@ func (c *WAFRegional) DeleteRegexMatchSetRequest(input *waf.DeleteRegexMatchSetI // DeleteRegexMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if // it's still used in any Rules or if it still includes any RegexMatchTuples // objects (any filters). @@ -2723,6 +3085,16 @@ func (c *WAFRegional) DeleteRegexPatternSetRequest(input *waf.DeleteRegexPattern // DeleteRegexPatternSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet // if it's still used in any RegexMatchSet or if the RegexPatternSet is not // empty. @@ -2838,6 +3210,16 @@ func (c *WAFRegional) DeleteRuleRequest(input *waf.DeleteRuleInput) (req *reques // DeleteRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a Rule. You can't delete a Rule if it's still used in // any WebACL objects or if it still includes any predicates, such as ByteMatchSet // objects. @@ -2968,6 +3350,16 @@ func (c *WAFRegional) DeleteRuleGroupRequest(input *waf.DeleteRuleGroupInput) (r // DeleteRuleGroup API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a RuleGroup. You can't delete a RuleGroup if it's still // used in any WebACL objects or if it still includes any rules. // @@ -3111,6 +3503,16 @@ func (c *WAFRegional) DeleteSizeConstraintSetRequest(input *waf.DeleteSizeConstr // DeleteSizeConstraintSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet // if it's still used in any Rules or if it still includes any SizeConstraint // objects (any filters). @@ -3238,6 +3640,16 @@ func (c *WAFRegional) DeleteSqlInjectionMatchSetRequest(input *waf.DeleteSqlInje // DeleteSqlInjectionMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet // if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple // objects. @@ -3366,6 +3778,16 @@ func (c *WAFRegional) DeleteWebACLRequest(input *waf.DeleteWebACLInput) (req *re // DeleteWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes a WebACL. You can't delete a WebACL if it still contains // any Rules. // @@ -3493,6 +3915,16 @@ func (c *WAFRegional) DeleteXssMatchSetRequest(input *waf.DeleteXssMatchSetInput // DeleteXssMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's // still used in any Rules or if it still contains any XssMatchTuple objects. // @@ -3621,6 +4053,16 @@ func (c *WAFRegional) DisassociateWebACLRequest(input *DisassociateWebACLInput) // DisassociateWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic Regional documentation. For more information, see +// AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Removes a web ACL from the specified resource, either an application load // balancer or Amazon API Gateway stage. // @@ -3738,6 +4180,16 @@ func (c *WAFRegional) GetByteMatchSetRequest(input *waf.GetByteMatchSetInput) (r // GetByteMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the ByteMatchSet specified by ByteMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3825,6 +4277,16 @@ func (c *WAFRegional) GetChangeTokenRequest(input *waf.GetChangeTokenInput) (req // GetChangeToken API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // When you want to create, update, or delete AWS WAF objects, get a change // token and include the change token in the create, update, or delete request. // Change tokens ensure that your application doesn't submit conflicting requests @@ -3919,6 +4381,16 @@ func (c *WAFRegional) GetChangeTokenStatusRequest(input *waf.GetChangeTokenStatu // GetChangeTokenStatus API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the status of a ChangeToken that you got by calling GetChangeToken. // ChangeTokenStatus is one of the following values: // @@ -4012,6 +4484,16 @@ func (c *WAFRegional) GetGeoMatchSetRequest(input *waf.GetGeoMatchSetInput) (req // GetGeoMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the GeoMatchSet that is specified by GeoMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4099,6 +4581,16 @@ func (c *WAFRegional) GetIPSetRequest(input *waf.GetIPSetInput) (req *request.Re // GetIPSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the IPSet that is specified by IPSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4186,6 +4678,16 @@ func (c *WAFRegional) GetLoggingConfigurationRequest(input *waf.GetLoggingConfig // GetLoggingConfiguration API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the LoggingConfiguration for the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4269,6 +4771,16 @@ func (c *WAFRegional) GetPermissionPolicyRequest(input *waf.GetPermissionPolicyI // GetPermissionPolicy API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the IAM policy attached to the RuleGroup. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4352,6 +4864,16 @@ func (c *WAFRegional) GetRateBasedRuleRequest(input *waf.GetRateBasedRuleInput) // GetRateBasedRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RateBasedRule that is specified by the RuleId that you included // in the GetRateBasedRule request. // @@ -4440,6 +4962,16 @@ func (c *WAFRegional) GetRateBasedRuleManagedKeysRequest(input *waf.GetRateBased // GetRateBasedRuleManagedKeys API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of IP addresses currently being blocked by the RateBasedRule // that is specified by the RuleId. The maximum number of managed keys that // will be blocked is 10,000. If more than 10,000 addresses exceed the rate @@ -4559,6 +5091,16 @@ func (c *WAFRegional) GetRegexMatchSetRequest(input *waf.GetRegexMatchSetInput) // GetRegexMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RegexMatchSet specified by RegexMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4646,6 +5188,16 @@ func (c *WAFRegional) GetRegexPatternSetRequest(input *waf.GetRegexPatternSetInp // GetRegexPatternSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RegexPatternSet specified by RegexPatternSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4733,6 +5285,16 @@ func (c *WAFRegional) GetRuleRequest(input *waf.GetRuleInput) (req *request.Requ // GetRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the Rule that is specified by the RuleId that you included in the // GetRule request. // @@ -4821,6 +5383,16 @@ func (c *WAFRegional) GetRuleGroupRequest(input *waf.GetRuleGroupInput) (req *re // GetRuleGroup API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the RuleGroup that is specified by the RuleGroupId that you included // in the GetRuleGroup request. // @@ -4907,6 +5479,16 @@ func (c *WAFRegional) GetSampledRequestsRequest(input *waf.GetSampledRequestsInp // GetSampledRequests API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Gets detailed information about a specified number of requests--a sample--that // AWS WAF randomly selects from among the first 5,000 requests that your AWS // resource received during a time range that you choose. You can specify a @@ -5000,6 +5582,16 @@ func (c *WAFRegional) GetSizeConstraintSetRequest(input *waf.GetSizeConstraintSe // GetSizeConstraintSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the SizeConstraintSet specified by SizeConstraintSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5087,6 +5679,16 @@ func (c *WAFRegional) GetSqlInjectionMatchSetRequest(input *waf.GetSqlInjectionM // GetSqlInjectionMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5174,6 +5776,16 @@ func (c *WAFRegional) GetWebACLRequest(input *waf.GetWebACLInput) (req *request. // GetWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the WebACL that is specified by WebACLId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5261,6 +5873,16 @@ func (c *WAFRegional) GetWebACLForResourceRequest(input *GetWebACLForResourceInp // GetWebACLForResource API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic Regional documentation. For more information, see +// AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the web ACL for the specified resource, either an application load // balancer or Amazon API Gateway stage. // @@ -5382,6 +6004,16 @@ func (c *WAFRegional) GetXssMatchSetRequest(input *waf.GetXssMatchSetInput) (req // GetXssMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns the XssMatchSet that is specified by XssMatchSetId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5469,6 +6101,16 @@ func (c *WAFRegional) ListActivatedRulesInRuleGroupRequest(input *waf.ListActiva // ListActivatedRulesInRuleGroup API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of ActivatedRule objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5581,6 +6223,16 @@ func (c *WAFRegional) ListByteMatchSetsRequest(input *waf.ListByteMatchSetsInput // ListByteMatchSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of ByteMatchSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5665,6 +6317,16 @@ func (c *WAFRegional) ListGeoMatchSetsRequest(input *waf.ListGeoMatchSetsInput) // ListGeoMatchSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of GeoMatchSetSummary objects in the response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5749,6 +6411,16 @@ func (c *WAFRegional) ListIPSetsRequest(input *waf.ListIPSetsInput) (req *reques // ListIPSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of IPSetSummary objects in the response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5833,6 +6505,16 @@ func (c *WAFRegional) ListLoggingConfigurationsRequest(input *waf.ListLoggingCon // ListLoggingConfigurations API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of LoggingConfiguration objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5945,6 +6627,16 @@ func (c *WAFRegional) ListRateBasedRulesRequest(input *waf.ListRateBasedRulesInp // ListRateBasedRules API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6029,6 +6721,16 @@ func (c *WAFRegional) ListRegexMatchSetsRequest(input *waf.ListRegexMatchSetsInp // ListRegexMatchSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RegexMatchSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6113,6 +6815,16 @@ func (c *WAFRegional) ListRegexPatternSetsRequest(input *waf.ListRegexPatternSet // ListRegexPatternSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RegexPatternSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6197,6 +6909,16 @@ func (c *WAFRegional) ListResourcesForWebACLRequest(input *ListResourcesForWebAC // ListResourcesForWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic Regional documentation. For more information, see +// AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of resources associated with the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6313,6 +7035,16 @@ func (c *WAFRegional) ListRuleGroupsRequest(input *waf.ListRuleGroupsInput) (req // ListRuleGroups API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleGroup objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6393,6 +7125,16 @@ func (c *WAFRegional) ListRulesRequest(input *waf.ListRulesInput) (req *request. // ListRules API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6477,6 +7219,16 @@ func (c *WAFRegional) ListSizeConstraintSetsRequest(input *waf.ListSizeConstrain // ListSizeConstraintSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of SizeConstraintSetSummary objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6561,6 +7313,16 @@ func (c *WAFRegional) ListSqlInjectionMatchSetsRequest(input *waf.ListSqlInjecti // ListSqlInjectionMatchSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of SqlInjectionMatchSet objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6645,6 +7407,16 @@ func (c *WAFRegional) ListSubscribedRuleGroupsRequest(input *waf.ListSubscribedR // ListSubscribedRuleGroups API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of RuleGroup objects that you are subscribed to. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6728,6 +7500,26 @@ func (c *WAFRegional) ListTagsForResourceRequest(input *waf.ListTagsForResourceI // ListTagsForResource API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Retrieves the tags associated with the specified AWS resource. Tags are key:value +// pairs that you can use to categorize and manage your resources, for purposes +// like billing. For example, you might set the tag key to "customer" and the +// value to the customer name or ID. You can specify one or more tags to add +// to each AWS resource, up to 50 tags for a resource. +// +// Tagging is only available through the API, SDKs, and CLI. You can't manage +// or view tags through the AWS WAF Classic console. You can tag the AWS resources +// that you manage through AWS WAF Classic: web ACLs, rule groups, and 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. @@ -6844,6 +7636,16 @@ func (c *WAFRegional) ListWebACLsRequest(input *waf.ListWebACLsInput) (req *requ // ListWebACLs API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of WebACLSummary objects in the response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6928,6 +7730,16 @@ func (c *WAFRegional) ListXssMatchSetsRequest(input *waf.ListXssMatchSetsInput) // ListXssMatchSets API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns an array of XssMatchSet objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -7012,6 +7824,16 @@ func (c *WAFRegional) PutLoggingConfigurationRequest(input *waf.PutLoggingConfig // PutLoggingConfiguration API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Associates a LoggingConfiguration with a specified web ACL. // // You can access information about all traffic that AWS WAF inspects using @@ -7129,8 +7951,18 @@ func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyI // PutPermissionPolicy API operation for AWS WAF Regional. // -// Attaches a IAM policy to the specified resource. The only supported use for -// this action is to share a RuleGroup across accounts. +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Attaches an IAM policy to the specified resource. The only supported use +// for this action is to share a RuleGroup across accounts. // // The PutPermissionPolicy is subject to the following restrictions: // @@ -7267,6 +8099,27 @@ func (c *WAFRegional) TagResourceRequest(input *waf.TagResourceInput) (req *requ // TagResource API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// Associates tags with the specified AWS resource. Tags are key:value pairs +// that you can use to categorize and manage your resources, for purposes like +// billing. For example, you might set the tag key to "customer" and the value +// to the customer name or ID. You can specify one or more tags to add to each +// AWS resource, up to 50 tags for a resource. +// +// Tagging is only available through the API, SDKs, and CLI. You can't manage +// or view tags through the AWS WAF Classic console. You can use this action +// to tag the AWS resources that you manage through AWS WAF Classic: web ACLs, +// rule groups, and 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. @@ -7390,6 +8243,16 @@ func (c *WAFRegional) UntagResourceRequest(input *waf.UntagResourceInput) (req * // UntagResource API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -7506,6 +8369,16 @@ func (c *WAFRegional) UpdateByteMatchSetRequest(input *waf.UpdateByteMatchSetInp // UpdateByteMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For // each ByteMatchTuple object, you specify the following values: // @@ -7702,6 +8575,16 @@ func (c *WAFRegional) UpdateGeoMatchSetRequest(input *waf.UpdateGeoMatchSetInput // UpdateGeoMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each // GeoMatchConstraint object, you specify the following values: // @@ -7897,6 +8780,16 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // UpdateIPSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor // object, you specify the following values: // @@ -8116,6 +9009,16 @@ func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleI // UpdateRateBasedRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes Predicate objects in a rule and updates the RateLimit // in the rule. // @@ -8132,13 +9035,13 @@ func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleI // // * A ByteMatchSet that matches BadBot in the User-Agent header // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // You then add the RateBasedRule to a WebACL and specify that you want to block // requests that satisfy the rule. For a request to be blocked, it must come // from the IP address 192.0.2.44 and the User-Agent header in the request must // contain the value BadBot. Further, requests that match these two conditions -// much be received at a rate of more than 15,000 every five minutes. If the +// much be received at a rate of more than 1,000 every five minutes. If the // rate drops below this limit, AWS WAF no longer blocks the requests. // // As a second example, suppose you want to limit requests to a particular page @@ -8150,7 +9053,7 @@ func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleI // // * A TargetString of login // -// Further, you specify a RateLimit of 15,000. +// Further, you specify a RateLimit of 1,000. // // By adding this RateBasedRule to a WebACL, you could limit requests to your // login page without affecting the rest of your site. @@ -8321,6 +9224,16 @@ func (c *WAFRegional) UpdateRegexMatchSetRequest(input *waf.UpdateRegexMatchSetI // UpdateRegexMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. // For each RegexMatchSetUpdate object, you specify the following values: // @@ -8488,6 +9401,16 @@ func (c *WAFRegional) UpdateRegexPatternSetRequest(input *waf.UpdateRegexPattern // UpdateRegexPatternSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each // RegexPatternString object, you specify the following values: // @@ -8652,6 +9575,16 @@ func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *reques // UpdateRule API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests // that you want to allow, block, or count. If you add more than one predicate @@ -8853,6 +9786,16 @@ func (c *WAFRegional) UpdateRuleGroupRequest(input *waf.UpdateRuleGroupInput) (r // UpdateRuleGroup API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes ActivatedRule objects in a RuleGroup. // // You can only insert REGULAR rules into a rule group. @@ -9031,6 +9974,16 @@ func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstr // UpdateSizeConstraintSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. // For each SizeConstraint object, you specify the following values: // @@ -9238,6 +10191,16 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // UpdateSqlInjectionMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. // For each SqlInjectionMatchTuple object, you specify the following values: // @@ -9430,6 +10393,16 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // UpdateWebACL API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies // web requests that you want to allow, block, or count. When you update a WebACL, // you specify the following values: @@ -9472,12 +10445,12 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // with a CloudFront distribution. // // The ActivatedRule can be a rule group. If you specify a rule group as your -// ActivatedRule, you can exclude specific rules from that rule group. +// ActivatedRule , you can exclude specific rules from that rule group. // // If you already have a rule group associated with a web ACL and want to submit // an UpdateWebACL request to exclude certain rules from that rule group, you // must first remove the rule group from the web ACL, the re-insert it again, -// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. +// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules . // // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will @@ -9656,6 +10629,16 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // UpdateXssMatchSet API operation for AWS WAF Regional. // +// +// This is AWS WAF Classic documentation. For more information, see AWS WAF +// Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// // Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For // each XssMatchTuple object, you specify the following values: // @@ -10096,8 +11079,8 @@ func (s *ListResourcesForWebACLOutput) SetResourceArns(v []*string) *ListResourc } type WAFBadRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10114,17 +11097,17 @@ func (s WAFBadRequestException) GoString() string { func newErrorWAFBadRequestException(v protocol.ResponseMetadata) error { return &WAFBadRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFBadRequestException) Code() string { +func (s *WAFBadRequestException) Code() string { return "WAFBadRequestException" } // Message returns the exception's message. -func (s WAFBadRequestException) Message() string { +func (s *WAFBadRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10132,28 +11115,28 @@ func (s WAFBadRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFBadRequestException) OrigErr() error { +func (s *WAFBadRequestException) OrigErr() error { return nil } -func (s WAFBadRequestException) Error() string { +func (s *WAFBadRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFBadRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFBadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFBadRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFBadRequestException) RequestID() string { + return s.RespMetadata.RequestID } // The name specified is invalid. type WAFDisallowedNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10170,17 +11153,17 @@ func (s WAFDisallowedNameException) GoString() string { func newErrorWAFDisallowedNameException(v protocol.ResponseMetadata) error { return &WAFDisallowedNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFDisallowedNameException) Code() string { +func (s *WAFDisallowedNameException) Code() string { return "WAFDisallowedNameException" } // Message returns the exception's message. -func (s WAFDisallowedNameException) Message() string { +func (s *WAFDisallowedNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10188,29 +11171,109 @@ func (s WAFDisallowedNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFDisallowedNameException) OrigErr() error { +func (s *WAFDisallowedNameException) OrigErr() error { return nil } -func (s WAFDisallowedNameException) Error() string { +func (s *WAFDisallowedNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFDisallowedNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFDisallowedNameException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *WAFDisallowedNameException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The operation failed due to a problem with the migration. The failure cause +// is provided in the exception, in the MigrationErrorType: +// +// * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the +// IgnoreUnsupportedType is not set to true. +// +// * ENTITY_NOT_FOUND - The web ACL doesn't exist. +// +// * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject +// action to the specified Amazon S3 bucket. +// +// * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to +// perform the PutObject action in the bucket. +// +// * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. +// +// * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as +// the web ACL. +// +// * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 +// bucket for another reason. +type WAFEntityMigrationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` + + MigrationErrorReason *string `type:"string"` + + MigrationErrorType *string `type:"string" enum:"MigrationErrorType"` +} + +// String returns the string representation +func (s WAFEntityMigrationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WAFEntityMigrationException) GoString() string { + return s.String() +} + +func newErrorWAFEntityMigrationException(v protocol.ResponseMetadata) error { + return &WAFEntityMigrationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *WAFEntityMigrationException) Code() string { + return "WAFEntityMigrationException" +} + +// Message returns the exception's message. +func (s *WAFEntityMigrationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *WAFEntityMigrationException) OrigErr() error { + return nil +} + +func (s *WAFEntityMigrationException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *WAFEntityMigrationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFDisallowedNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFEntityMigrationException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because of a system problem, even though the request // was valid. Retry your request. type WAFInternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10227,17 +11290,17 @@ func (s WAFInternalErrorException) GoString() string { func newErrorWAFInternalErrorException(v protocol.ResponseMetadata) error { return &WAFInternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInternalErrorException) Code() string { +func (s *WAFInternalErrorException) Code() string { return "WAFInternalErrorException" } // Message returns the exception's message. -func (s WAFInternalErrorException) Message() string { +func (s *WAFInternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10245,29 +11308,29 @@ func (s WAFInternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInternalErrorException) OrigErr() error { +func (s *WAFInternalErrorException) OrigErr() error { return nil } -func (s WAFInternalErrorException) Error() string { +func (s *WAFInternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to create, update, or delete an object // by using an invalid account identifier. type WAFInvalidAccountException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10284,17 +11347,17 @@ func (s WAFInvalidAccountException) GoString() string { func newErrorWAFInvalidAccountException(v protocol.ResponseMetadata) error { return &WAFInvalidAccountException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidAccountException) Code() string { +func (s *WAFInvalidAccountException) Code() string { return "WAFInvalidAccountException" } // Message returns the exception's message. -func (s WAFInvalidAccountException) Message() string { +func (s *WAFInvalidAccountException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10302,22 +11365,22 @@ func (s WAFInvalidAccountException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidAccountException) OrigErr() error { +func (s *WAFInvalidAccountException) OrigErr() error { return nil } -func (s WAFInvalidAccountException) Error() string { +func (s *WAFInvalidAccountException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidAccountException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidAccountException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidAccountException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidAccountException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because there was nothing to do. For example: @@ -10337,8 +11400,8 @@ func (s WAFInvalidAccountException) RequestID() string { // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. type WAFInvalidOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10355,17 +11418,17 @@ func (s WAFInvalidOperationException) GoString() string { func newErrorWAFInvalidOperationException(v protocol.ResponseMetadata) error { return &WAFInvalidOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidOperationException) Code() string { +func (s *WAFInvalidOperationException) Code() string { return "WAFInvalidOperationException" } // Message returns the exception's message. -func (s WAFInvalidOperationException) Message() string { +func (s *WAFInvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10373,22 +11436,22 @@ func (s WAFInvalidOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidOperationException) OrigErr() error { +func (s *WAFInvalidOperationException) OrigErr() error { return nil } -func (s WAFInvalidOperationException) Error() string { +func (s *WAFInvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because AWS WAF didn't recognize a parameter in the @@ -10419,8 +11482,8 @@ func (s WAFInvalidOperationException) RequestID() string { // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL cannot be associated. type WAFInvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Field *string `locationName:"field" type:"string" enum:"ParameterExceptionField"` @@ -10443,17 +11506,17 @@ func (s WAFInvalidParameterException) GoString() string { func newErrorWAFInvalidParameterException(v protocol.ResponseMetadata) error { return &WAFInvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidParameterException) Code() string { +func (s *WAFInvalidParameterException) Code() string { return "WAFInvalidParameterException" } // Message returns the exception's message. -func (s WAFInvalidParameterException) Message() string { +func (s *WAFInvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10461,22 +11524,22 @@ func (s WAFInvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidParameterException) OrigErr() error { +func (s *WAFInvalidParameterException) OrigErr() error { return nil } -func (s WAFInvalidParameterException) Error() string { +func (s *WAFInvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because the specified policy is not in the proper format. @@ -10502,8 +11565,8 @@ func (s WAFInvalidParameterException) RequestID() string { // // * Your policy must be composed using IAM Policy version 2012-10-17. type WAFInvalidPermissionPolicyException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10520,17 +11583,17 @@ func (s WAFInvalidPermissionPolicyException) GoString() string { func newErrorWAFInvalidPermissionPolicyException(v protocol.ResponseMetadata) error { return &WAFInvalidPermissionPolicyException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidPermissionPolicyException) Code() string { +func (s *WAFInvalidPermissionPolicyException) Code() string { return "WAFInvalidPermissionPolicyException" } // Message returns the exception's message. -func (s WAFInvalidPermissionPolicyException) Message() string { +func (s *WAFInvalidPermissionPolicyException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10538,28 +11601,28 @@ func (s WAFInvalidPermissionPolicyException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidPermissionPolicyException) OrigErr() error { +func (s *WAFInvalidPermissionPolicyException) OrigErr() error { return nil } -func (s WAFInvalidPermissionPolicyException) Error() string { +func (s *WAFInvalidPermissionPolicyException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidPermissionPolicyException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidPermissionPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidPermissionPolicyException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidPermissionPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // The regular expression (regex) you specified in RegexPatternString is invalid. type WAFInvalidRegexPatternException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10576,17 +11639,17 @@ func (s WAFInvalidRegexPatternException) GoString() string { func newErrorWAFInvalidRegexPatternException(v protocol.ResponseMetadata) error { return &WAFInvalidRegexPatternException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidRegexPatternException) Code() string { +func (s *WAFInvalidRegexPatternException) Code() string { return "WAFInvalidRegexPatternException" } // Message returns the exception's message. -func (s WAFInvalidRegexPatternException) Message() string { +func (s *WAFInvalidRegexPatternException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10594,22 +11657,22 @@ func (s WAFInvalidRegexPatternException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidRegexPatternException) OrigErr() error { +func (s *WAFInvalidRegexPatternException) OrigErr() error { return nil } -func (s WAFInvalidRegexPatternException) Error() string { +func (s *WAFInvalidRegexPatternException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidRegexPatternException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidRegexPatternException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidRegexPatternException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidRegexPatternException) RequestID() string { + return s.RespMetadata.RequestID } // The operation exceeds a resource limit, for example, the maximum number of @@ -10617,8 +11680,8 @@ func (s WAFInvalidRegexPatternException) RequestID() string { // see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. type WAFLimitsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10635,17 +11698,17 @@ func (s WAFLimitsExceededException) GoString() string { func newErrorWAFLimitsExceededException(v protocol.ResponseMetadata) error { return &WAFLimitsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFLimitsExceededException) Code() string { +func (s *WAFLimitsExceededException) Code() string { return "WAFLimitsExceededException" } // Message returns the exception's message. -func (s WAFLimitsExceededException) Message() string { +func (s *WAFLimitsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10653,22 +11716,22 @@ func (s WAFLimitsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFLimitsExceededException) OrigErr() error { +func (s *WAFLimitsExceededException) OrigErr() error { return nil } -func (s WAFLimitsExceededException) Error() string { +func (s *WAFLimitsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFLimitsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFLimitsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFLimitsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFLimitsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to delete an object that isn't empty. @@ -10684,8 +11747,8 @@ func (s WAFLimitsExceededException) RequestID() string { // // * You tried to delete an IPSet that references one or more IP addresses. type WAFNonEmptyEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10702,17 +11765,17 @@ func (s WAFNonEmptyEntityException) GoString() string { func newErrorWAFNonEmptyEntityException(v protocol.ResponseMetadata) error { return &WAFNonEmptyEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFNonEmptyEntityException) Code() string { +func (s *WAFNonEmptyEntityException) Code() string { return "WAFNonEmptyEntityException" } // Message returns the exception's message. -func (s WAFNonEmptyEntityException) Message() string { +func (s *WAFNonEmptyEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10720,22 +11783,22 @@ func (s WAFNonEmptyEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFNonEmptyEntityException) OrigErr() error { +func (s *WAFNonEmptyEntityException) OrigErr() error { return nil } -func (s WAFNonEmptyEntityException) Error() string { +func (s *WAFNonEmptyEntityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFNonEmptyEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFNonEmptyEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFNonEmptyEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFNonEmptyEntityException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to add an object to or delete an object @@ -10753,8 +11816,8 @@ func (s WAFNonEmptyEntityException) RequestID() string { // * You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from // a ByteMatchSet that doesn't exist. type WAFNonexistentContainerException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10771,17 +11834,17 @@ func (s WAFNonexistentContainerException) GoString() string { func newErrorWAFNonexistentContainerException(v protocol.ResponseMetadata) error { return &WAFNonexistentContainerException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFNonexistentContainerException) Code() string { +func (s *WAFNonexistentContainerException) Code() string { return "WAFNonexistentContainerException" } // Message returns the exception's message. -func (s WAFNonexistentContainerException) Message() string { +func (s *WAFNonexistentContainerException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10789,28 +11852,28 @@ func (s WAFNonexistentContainerException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFNonexistentContainerException) OrigErr() error { +func (s *WAFNonexistentContainerException) OrigErr() error { return nil } -func (s WAFNonexistentContainerException) Error() string { +func (s *WAFNonexistentContainerException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFNonexistentContainerException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFNonexistentContainerException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFNonexistentContainerException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFNonexistentContainerException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because the referenced object doesn't exist. type WAFNonexistentItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10827,17 +11890,17 @@ func (s WAFNonexistentItemException) GoString() string { func newErrorWAFNonexistentItemException(v protocol.ResponseMetadata) error { return &WAFNonexistentItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFNonexistentItemException) Code() string { +func (s *WAFNonexistentItemException) Code() string { return "WAFNonexistentItemException" } // Message returns the exception's message. -func (s WAFNonexistentItemException) Message() string { +func (s *WAFNonexistentItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10845,22 +11908,22 @@ func (s WAFNonexistentItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFNonexistentItemException) OrigErr() error { +func (s *WAFNonexistentItemException) OrigErr() error { return nil } -func (s WAFNonexistentItemException) Error() string { +func (s *WAFNonexistentItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFNonexistentItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFNonexistentItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFNonexistentItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFNonexistentItemException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to delete an object that is still @@ -10870,8 +11933,8 @@ func (s WAFNonexistentItemException) RequestID() string { // // * You tried to delete a Rule that is still referenced by a WebACL. type WAFReferencedItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10888,17 +11951,17 @@ func (s WAFReferencedItemException) GoString() string { func newErrorWAFReferencedItemException(v protocol.ResponseMetadata) error { return &WAFReferencedItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFReferencedItemException) Code() string { +func (s *WAFReferencedItemException) Code() string { return "WAFReferencedItemException" } // Message returns the exception's message. -func (s WAFReferencedItemException) Message() string { +func (s *WAFReferencedItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10906,22 +11969,22 @@ func (s WAFReferencedItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFReferencedItemException) OrigErr() error { +func (s *WAFReferencedItemException) OrigErr() error { return nil } -func (s WAFReferencedItemException) Error() string { +func (s *WAFReferencedItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFReferencedItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFReferencedItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFReferencedItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFReferencedItemException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF is not able to access the service linked role. This can be caused @@ -10933,8 +11996,8 @@ func (s WAFReferencedItemException) RequestID() string { // exception again, you will have to wait additional time until the role is // unlocked. type WAFServiceLinkedRoleErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -10951,17 +12014,17 @@ func (s WAFServiceLinkedRoleErrorException) GoString() string { func newErrorWAFServiceLinkedRoleErrorException(v protocol.ResponseMetadata) error { return &WAFServiceLinkedRoleErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFServiceLinkedRoleErrorException) Code() string { +func (s *WAFServiceLinkedRoleErrorException) Code() string { return "WAFServiceLinkedRoleErrorException" } // Message returns the exception's message. -func (s WAFServiceLinkedRoleErrorException) Message() string { +func (s *WAFServiceLinkedRoleErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10969,29 +12032,29 @@ func (s WAFServiceLinkedRoleErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFServiceLinkedRoleErrorException) OrigErr() error { +func (s *WAFServiceLinkedRoleErrorException) OrigErr() error { return nil } -func (s WAFServiceLinkedRoleErrorException) Error() string { +func (s *WAFServiceLinkedRoleErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFServiceLinkedRoleErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFServiceLinkedRoleErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFServiceLinkedRoleErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFServiceLinkedRoleErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. type WAFStaleDataException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11008,17 +12071,17 @@ func (s WAFStaleDataException) GoString() string { func newErrorWAFStaleDataException(v protocol.ResponseMetadata) error { return &WAFStaleDataException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFStaleDataException) Code() string { +func (s *WAFStaleDataException) Code() string { return "WAFStaleDataException" } // Message returns the exception's message. -func (s WAFStaleDataException) Message() string { +func (s *WAFStaleDataException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11026,28 +12089,28 @@ func (s WAFStaleDataException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFStaleDataException) OrigErr() error { +func (s *WAFStaleDataException) OrigErr() error { return nil } -func (s WAFStaleDataException) Error() string { +func (s *WAFStaleDataException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFStaleDataException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFStaleDataException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFStaleDataException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFStaleDataException) RequestID() string { + return s.RespMetadata.RequestID } // The specified subscription does not exist. type WAFSubscriptionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11064,17 +12127,17 @@ func (s WAFSubscriptionNotFoundException) GoString() string { func newErrorWAFSubscriptionNotFoundException(v protocol.ResponseMetadata) error { return &WAFSubscriptionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFSubscriptionNotFoundException) Code() string { +func (s *WAFSubscriptionNotFoundException) Code() string { return "WAFSubscriptionNotFoundException" } // Message returns the exception's message. -func (s WAFSubscriptionNotFoundException) Message() string { +func (s *WAFSubscriptionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11082,27 +12145,27 @@ func (s WAFSubscriptionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFSubscriptionNotFoundException) OrigErr() error { +func (s *WAFSubscriptionNotFoundException) OrigErr() error { return nil } -func (s WAFSubscriptionNotFoundException) Error() string { +func (s *WAFSubscriptionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFSubscriptionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFSubscriptionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFSubscriptionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFSubscriptionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type WAFTagOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11119,17 +12182,17 @@ func (s WAFTagOperationException) GoString() string { func newErrorWAFTagOperationException(v protocol.ResponseMetadata) error { return &WAFTagOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFTagOperationException) Code() string { +func (s *WAFTagOperationException) Code() string { return "WAFTagOperationException" } // Message returns the exception's message. -func (s WAFTagOperationException) Message() string { +func (s *WAFTagOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11137,27 +12200,27 @@ func (s WAFTagOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFTagOperationException) OrigErr() error { +func (s *WAFTagOperationException) OrigErr() error { return nil } -func (s WAFTagOperationException) Error() string { +func (s *WAFTagOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFTagOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFTagOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFTagOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFTagOperationException) RequestID() string { + return s.RespMetadata.RequestID } type WAFTagOperationInternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11174,17 +12237,17 @@ func (s WAFTagOperationInternalErrorException) GoString() string { func newErrorWAFTagOperationInternalErrorException(v protocol.ResponseMetadata) error { return &WAFTagOperationInternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFTagOperationInternalErrorException) Code() string { +func (s *WAFTagOperationInternalErrorException) Code() string { return "WAFTagOperationInternalErrorException" } // Message returns the exception's message. -func (s WAFTagOperationInternalErrorException) Message() string { +func (s *WAFTagOperationInternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11192,29 +12255,29 @@ func (s WAFTagOperationInternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFTagOperationInternalErrorException) OrigErr() error { +func (s *WAFTagOperationInternalErrorException) OrigErr() error { return nil } -func (s WAFTagOperationInternalErrorException) Error() string { +func (s *WAFTagOperationInternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFTagOperationInternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFTagOperationInternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFTagOperationInternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFTagOperationInternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because the entity referenced is temporarily unavailable. // Retry your request. type WAFUnavailableEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -11231,17 +12294,17 @@ func (s WAFUnavailableEntityException) GoString() string { func newErrorWAFUnavailableEntityException(v protocol.ResponseMetadata) error { return &WAFUnavailableEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFUnavailableEntityException) Code() string { +func (s *WAFUnavailableEntityException) Code() string { return "WAFUnavailableEntityException" } // Message returns the exception's message. -func (s WAFUnavailableEntityException) Message() string { +func (s *WAFUnavailableEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -11249,22 +12312,22 @@ func (s WAFUnavailableEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFUnavailableEntityException) OrigErr() error { +func (s *WAFUnavailableEntityException) OrigErr() error { return nil } -func (s WAFUnavailableEntityException) Error() string { +func (s *WAFUnavailableEntityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFUnavailableEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFUnavailableEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFUnavailableEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFUnavailableEntityException) RequestID() string { + return s.RespMetadata.RequestID } const ( @@ -12091,6 +13154,29 @@ const ( MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" ) +const ( + // MigrationErrorTypeEntityNotSupported is a MigrationErrorType enum value + MigrationErrorTypeEntityNotSupported = "ENTITY_NOT_SUPPORTED" + + // MigrationErrorTypeEntityNotFound is a MigrationErrorType enum value + MigrationErrorTypeEntityNotFound = "ENTITY_NOT_FOUND" + + // MigrationErrorTypeS3BucketNoPermission is a MigrationErrorType enum value + MigrationErrorTypeS3BucketNoPermission = "S3_BUCKET_NO_PERMISSION" + + // MigrationErrorTypeS3BucketNotAccessible is a MigrationErrorType enum value + MigrationErrorTypeS3BucketNotAccessible = "S3_BUCKET_NOT_ACCESSIBLE" + + // MigrationErrorTypeS3BucketNotFound is a MigrationErrorType enum value + MigrationErrorTypeS3BucketNotFound = "S3_BUCKET_NOT_FOUND" + + // MigrationErrorTypeS3BucketInvalidRegion is a MigrationErrorType enum value + MigrationErrorTypeS3BucketInvalidRegion = "S3_BUCKET_INVALID_REGION" + + // MigrationErrorTypeS3InternalError is a MigrationErrorType enum value + MigrationErrorTypeS3InternalError = "S3_INTERNAL_ERROR" +) + const ( // ParameterExceptionFieldChangeAction is a ParameterExceptionField enum value ParameterExceptionFieldChangeAction = "CHANGE_ACTION" diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go index 861b0ae88d5..943ae86e104 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go @@ -3,15 +3,27 @@ // Package wafregional provides the client and types for making API // requests to AWS WAF Regional. // -// This is the AWS WAF Regional API Reference for using AWS WAF with Elastic -// Load Balancing (ELB) Application Load Balancers. The AWS WAF actions and -// data types listed in the reference are available for protecting Application -// Load Balancers. You can use these actions and data types by means of the -// endpoints listed in AWS Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#waf_region). +// +// This is AWS WAF Classic Regional documentation. For more information, see +// AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. +// +// For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS +// WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// With the latest version, AWS WAF has a single set of endpoints for regional +// and global use. +// +// This is the AWS WAF Regional Classic API Reference for using AWS WAF Classic +// with the AWS resources, Elastic Load Balancing (ELB) Application Load Balancers +// and API Gateway APIs. The AWS WAF Classic actions and data types listed in +// the reference are available for protecting Elastic Load Balancing (ELB) Application +// Load Balancers and API Gateway APIs. You can use these actions and data types +// by means of the endpoints listed in AWS Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#waf_region). // This guide is for developers who need detailed information about the AWS -// WAF API actions, data types, and errors. For detailed information about AWS -// WAF features and an overview of how to use the AWS WAF API, see the AWS WAF -// Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/). +// WAF Classic API actions, data types, and errors. For detailed information +// about AWS WAF Classic features and an overview of how to use the AWS WAF +// Classic API, see the AWS WAF Classic (https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) +// in the developer guide. // // See https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go index e0220535780..32d651ca731 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go @@ -18,6 +18,32 @@ const ( // The name specified is invalid. ErrCodeWAFDisallowedNameException = "WAFDisallowedNameException" + // ErrCodeWAFEntityMigrationException for service response error code + // "WAFEntityMigrationException". + // + // The operation failed due to a problem with the migration. The failure cause + // is provided in the exception, in the MigrationErrorType: + // + // * ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the + // IgnoreUnsupportedType is not set to true. + // + // * ENTITY_NOT_FOUND - The web ACL doesn't exist. + // + // * S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject + // action to the specified Amazon S3 bucket. + // + // * S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to + // perform the PutObject action in the bucket. + // + // * S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. + // + // * S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as + // the web ACL. + // + // * S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 + // bucket for another reason. + ErrCodeWAFEntityMigrationException = "WAFEntityMigrationException" + // ErrCodeWAFInternalErrorException for service response error code // "WAFInternalErrorException". // @@ -225,6 +251,7 @@ const ( var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "WAFBadRequestException": newErrorWAFBadRequestException, "WAFDisallowedNameException": newErrorWAFDisallowedNameException, + "WAFEntityMigrationException": newErrorWAFEntityMigrationException, "WAFInternalErrorException": newErrorWAFInternalErrorException, "WAFInvalidAccountException": newErrorWAFInvalidAccountException, "WAFInvalidOperationException": newErrorWAFInvalidOperationException, diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go index 3d2b56c25f5..68de2cffaa7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go @@ -67,9 +67,10 @@ func (c *WAFV2) AssociateWebACLRequest(input *AssociateWebACLInput) (req *reques // resource. A regional application can be an Application Load Balancer (ALB) // or an API Gateway stage. // -// For AWS CloudFront, you can associate the Web ACL by providing the ARN of -// the WebACL to the CloudFront API call UpdateDistribution. For information, -// see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html). +// For AWS CloudFront, don't use this call. Instead, use your CloudFront distribution +// configuration. To associate a Web ACL, in the CloudFront call UpdateDistribution, +// set the web ACL ID to the Amazon Resource Name (ARN) of the Web ACL. For +// information, see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.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 @@ -105,6 +106,9 @@ func (c *WAFV2) AssociateWebACLRequest(input *AssociateWebACLInput) (req *reques // * WAFUnavailableEntityException // AWS WAF couldn’t retrieve the resource that you requested. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL func (c *WAFV2) AssociateWebACL(input *AssociateWebACLInput) (*AssociateWebACLOutput, error) { req, out := c.AssociateWebACLRequest(input) @@ -360,6 +364,9 @@ func (c *WAFV2) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Reques // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet func (c *WAFV2) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) { req, out := c.CreateIPSetRequest(input) @@ -484,6 +491,9 @@ func (c *WAFV2) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet func (c *WAFV2) CreateRegexPatternSet(input *CreateRegexPatternSetInput) (*CreateRegexPatternSetOutput, error) { req, out := c.CreateRegexPatternSetRequest(input) @@ -618,6 +628,13 @@ func (c *WAFV2) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *reques // // * WAFSubscriptionNotFoundException // +// * WAFNonexistentItemException +// AWS WAF couldn’t perform the operation because your resource doesn’t +// exist. +// +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup func (c *WAFV2) CreateRuleGroup(input *CreateRuleGroupInput) (*CreateRuleGroupOutput, error) { req, out := c.CreateRuleGroupRequest(input) @@ -763,6 +780,9 @@ func (c *WAFV2) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Requ // // * WAFSubscriptionNotFoundException // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL func (c *WAFV2) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) { req, out := c.CreateWebACLRequest(input) @@ -785,6 +805,118 @@ func (c *WAFV2) CreateWebACLWithContext(ctx aws.Context, input *CreateWebACLInpu return out, req.Send() } +const opDeleteFirewallManagerRuleGroups = "DeleteFirewallManagerRuleGroups" + +// DeleteFirewallManagerRuleGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFirewallManagerRuleGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFirewallManagerRuleGroups for more information on using the DeleteFirewallManagerRuleGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFirewallManagerRuleGroupsRequest method. +// req, resp := client.DeleteFirewallManagerRuleGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups +func (c *WAFV2) DeleteFirewallManagerRuleGroupsRequest(input *DeleteFirewallManagerRuleGroupsInput) (req *request.Request, output *DeleteFirewallManagerRuleGroupsOutput) { + op := &request.Operation{ + Name: opDeleteFirewallManagerRuleGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFirewallManagerRuleGroupsInput{} + } + + output = &DeleteFirewallManagerRuleGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFirewallManagerRuleGroups API operation for AWS WAFV2. +// +// Deletes all rule groups that are managed by AWS Firewall Manager for the +// specified web ACL. +// +// You can only use this if ManagedByFirewallManager is false in the specified +// WebACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAFV2's +// API operation DeleteFirewallManagerRuleGroups for usage and error information. +// +// Returned Error Types: +// * WAFInternalErrorException +// Your request is valid, but AWS WAF couldn’t perform the operation because +// of a system problem. Retry your request. +// +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name or value. +// +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// * WAFNonexistentItemException +// AWS WAF couldn’t perform the operation because your resource doesn’t +// exist. +// +// * WAFOptimisticLockException +// AWS WAF couldn’t save your changes because you tried to update or delete +// a resource that has changed since you last retrieved it. Get the resource +// again, make any changes you need to make to the new copy, and retry your +// operation. +// +// * WAFInvalidOperationException +// The operation isn't valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups +func (c *WAFV2) DeleteFirewallManagerRuleGroups(input *DeleteFirewallManagerRuleGroupsInput) (*DeleteFirewallManagerRuleGroupsOutput, error) { + req, out := c.DeleteFirewallManagerRuleGroupsRequest(input) + return out, req.Send() +} + +// DeleteFirewallManagerRuleGroupsWithContext is the same as DeleteFirewallManagerRuleGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFirewallManagerRuleGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFV2) DeleteFirewallManagerRuleGroupsWithContext(ctx aws.Context, input *DeleteFirewallManagerRuleGroupsInput, opts ...request.Option) (*DeleteFirewallManagerRuleGroupsOutput, error) { + req, out := c.DeleteFirewallManagerRuleGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the @@ -885,6 +1017,9 @@ func (c *WAFV2) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Reques // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet func (c *WAFV2) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) { req, out := c.DeleteIPSetRequest(input) @@ -981,6 +1116,24 @@ func (c *WAFV2) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurat // again, make any changes you need to make to the new copy, and retry your // operation. // +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name or value. +// +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration func (c *WAFV2) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) { req, out := c.DeleteLoggingConfigurationRequest(input) @@ -1003,6 +1156,108 @@ func (c *WAFV2) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDeletePermissionPolicy = "DeletePermissionPolicy" + +// DeletePermissionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeletePermissionPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePermissionPolicy for more information on using the DeletePermissionPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePermissionPolicyRequest method. +// req, resp := client.DeletePermissionPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy +func (c *WAFV2) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) (req *request.Request, output *DeletePermissionPolicyOutput) { + op := &request.Operation{ + Name: opDeletePermissionPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePermissionPolicyInput{} + } + + output = &DeletePermissionPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePermissionPolicy API operation for AWS WAFV2. +// +// Permanently deletes an IAM policy from the specified rule group. +// +// You must be the owner of the rule group to perform this operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAFV2's +// API operation DeletePermissionPolicy for usage and error information. +// +// Returned Error Types: +// * WAFNonexistentItemException +// AWS WAF couldn’t perform the operation because your resource doesn’t +// exist. +// +// * WAFInternalErrorException +// Your request is valid, but AWS WAF couldn’t perform the operation because +// of a system problem. Retry your request. +// +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name or value. +// +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy +func (c *WAFV2) DeletePermissionPolicy(input *DeletePermissionPolicyInput) (*DeletePermissionPolicyOutput, error) { + req, out := c.DeletePermissionPolicyRequest(input) + return out, req.Send() +} + +// DeletePermissionPolicyWithContext is the same as DeletePermissionPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePermissionPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFV2) DeletePermissionPolicyWithContext(ctx aws.Context, input *DeletePermissionPolicyInput, opts ...request.Option) (*DeletePermissionPolicyOutput, error) { + req, out := c.DeletePermissionPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the @@ -1103,6 +1358,9 @@ func (c *WAFV2) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet func (c *WAFV2) DeleteRegexPatternSet(input *DeleteRegexPatternSetInput) (*DeleteRegexPatternSetOutput, error) { req, out := c.DeleteRegexPatternSetRequest(input) @@ -1225,6 +1483,9 @@ func (c *WAFV2) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *reques // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup func (c *WAFV2) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) @@ -1299,6 +1560,9 @@ func (c *WAFV2) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Requ // // Deletes the specified WebACL. // +// You can only use this if ManagedByFirewallManager is false in the specified +// WebACL. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1347,6 +1611,9 @@ func (c *WAFV2) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Requ // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL func (c *WAFV2) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) { req, out := c.DeleteWebACLRequest(input) @@ -1456,6 +1723,9 @@ func (c *WAFV2) DescribeManagedRuleGroupRequest(input *DescribeManagedRuleGroupI // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup func (c *WAFV2) DescribeManagedRuleGroup(input *DescribeManagedRuleGroupInput) (*DescribeManagedRuleGroupOutput, error) { req, out := c.DescribeManagedRuleGroupRequest(input) @@ -1531,9 +1801,10 @@ func (c *WAFV2) DisassociateWebACLRequest(input *DisassociateWebACLInput) (req * // Disassociates a Web ACL from a regional application resource. A regional // application can be an Application Load Balancer (ALB) or an API Gateway stage. // -// For AWS CloudFront, you can disassociate the Web ACL by providing an empty -// web ACL ARN in the CloudFront API call UpdateDistribution. For information, -// see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html). +// For AWS CloudFront, don't use this call. Instead, use your CloudFront distribution +// configuration. To disassociate a Web ACL, provide an empty web ACL ID in +// the CloudFront call UpdateDistribution. For information, see UpdateDistribution +// (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.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 @@ -1566,6 +1837,9 @@ func (c *WAFV2) DisassociateWebACLRequest(input *DisassociateWebACLInput) (req * // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL func (c *WAFV2) DisassociateWebACL(input *DisassociateWebACLInput) (*DisassociateWebACLOutput, error) { req, out := c.DisassociateWebACLRequest(input) @@ -1670,6 +1944,9 @@ func (c *WAFV2) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, out // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet func (c *WAFV2) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) { req, out := c.GetIPSetRequest(input) @@ -1759,6 +2036,24 @@ func (c *WAFV2) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInp // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name or value. +// +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration func (c *WAFV2) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) { req, out := c.GetLoggingConfigurationRequest(input) @@ -1781,6 +2076,107 @@ func (c *WAFV2) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLo return out, req.Send() } +const opGetPermissionPolicy = "GetPermissionPolicy" + +// GetPermissionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetPermissionPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetPermissionPolicy for more information on using the GetPermissionPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetPermissionPolicyRequest method. +// req, resp := client.GetPermissionPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy +func (c *WAFV2) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req *request.Request, output *GetPermissionPolicyOutput) { + op := &request.Operation{ + Name: opGetPermissionPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetPermissionPolicyInput{} + } + + output = &GetPermissionPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPermissionPolicy API operation for AWS WAFV2. +// +// Returns the IAM policy that is attached to the specified rule group. +// +// You must be the owner of the rule group to perform this operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAFV2's +// API operation GetPermissionPolicy for usage and error information. +// +// Returned Error Types: +// * WAFNonexistentItemException +// AWS WAF couldn’t perform the operation because your resource doesn’t +// exist. +// +// * WAFInternalErrorException +// Your request is valid, but AWS WAF couldn’t perform the operation because +// of a system problem. Retry your request. +// +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name or value. +// +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy +func (c *WAFV2) GetPermissionPolicy(input *GetPermissionPolicyInput) (*GetPermissionPolicyOutput, error) { + req, out := c.GetPermissionPolicyRequest(input) + return out, req.Send() +} + +// GetPermissionPolicyWithContext is the same as GetPermissionPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetPermissionPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFV2) GetPermissionPolicyWithContext(ctx aws.Context, input *GetPermissionPolicyInput, opts ...request.Option) (*GetPermissionPolicyOutput, error) { + req, out := c.GetPermissionPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetRateBasedStatementManagedKeys = "GetRateBasedStatementManagedKeys" // GetRateBasedStatementManagedKeysRequest generates a "aws/request.Request" representing the @@ -1866,6 +2262,9 @@ func (c *WAFV2) GetRateBasedStatementManagedKeysRequest(input *GetRateBasedState // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys func (c *WAFV2) GetRateBasedStatementManagedKeys(input *GetRateBasedStatementManagedKeysInput) (*GetRateBasedStatementManagedKeysOutput, error) { req, out := c.GetRateBasedStatementManagedKeysRequest(input) @@ -1970,6 +2369,9 @@ func (c *WAFV2) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req * // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet func (c *WAFV2) GetRegexPatternSet(input *GetRegexPatternSetInput) (*GetRegexPatternSetOutput, error) { req, out := c.GetRegexPatternSetRequest(input) @@ -2074,6 +2476,9 @@ func (c *WAFV2) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Requ // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup func (c *WAFV2) GetRuleGroup(input *GetRuleGroupInput) (*GetRuleGroupOutput, error) { req, out := c.GetRuleGroupRequest(input) @@ -2292,6 +2697,9 @@ func (c *WAFV2) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, o // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL func (c *WAFV2) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) { req, out := c.GetWebACLRequest(input) @@ -2399,6 +2807,9 @@ func (c *WAFV2) GetWebACLForResourceRequest(input *GetWebACLForResourceInput) (r // * WAFUnavailableEntityException // AWS WAF couldn’t retrieve the resource that you requested. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource func (c *WAFV2) GetWebACLForResource(input *GetWebACLForResourceInput) (*GetWebACLForResourceOutput, error) { req, out := c.GetWebACLForResourceRequest(input) @@ -2501,6 +2912,9 @@ func (c *WAFV2) ListAvailableManagedRuleGroupsRequest(input *ListAvailableManage // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups func (c *WAFV2) ListAvailableManagedRuleGroups(input *ListAvailableManagedRuleGroupsInput) (*ListAvailableManagedRuleGroupsOutput, error) { req, out := c.ListAvailableManagedRuleGroupsRequest(input) @@ -2601,6 +3015,9 @@ func (c *WAFV2) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets func (c *WAFV2) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) { req, out := c.ListIPSetsRequest(input) @@ -2701,6 +3118,9 @@ func (c *WAFV2) ListLoggingConfigurationsRequest(input *ListLoggingConfiguration // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations func (c *WAFV2) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) { req, out := c.ListLoggingConfigurationsRequest(input) @@ -2802,6 +3222,9 @@ func (c *WAFV2) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (r // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets func (c *WAFV2) ListRegexPatternSets(input *ListRegexPatternSetsInput) (*ListRegexPatternSetsOutput, error) { req, out := c.ListRegexPatternSetsRequest(input) @@ -2908,6 +3331,9 @@ func (c *WAFV2) ListResourcesForWebACLRequest(input *ListResourcesForWebACLInput // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL func (c *WAFV2) ListResourcesForWebACL(input *ListResourcesForWebACLInput) (*ListResourcesForWebACLOutput, error) { req, out := c.ListResourcesForWebACLRequest(input) @@ -3009,6 +3435,9 @@ func (c *WAFV2) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request. // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups func (c *WAFV2) ListRuleGroups(input *ListRuleGroupsInput) (*ListRuleGroupsOutput, error) { req, out := c.ListRuleGroupsRequest(input) @@ -3120,6 +3549,9 @@ func (c *WAFV2) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource func (c *WAFV2) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) @@ -3220,6 +3652,9 @@ func (c *WAFV2) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Reques // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs func (c *WAFV2) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) { req, out := c.ListWebACLsRequest(input) @@ -3299,7 +3734,7 @@ func (c *WAFV2) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInp // // Create an Amazon Kinesis Data Firehose. // -// Create the data firehose with a PUT source and in the region that you are +// Create the data firehose with a PUT source and in the Region that you are // operating. If you are capturing logs for Amazon CloudFront, always create // the firehose in US East (N. Virginia). // @@ -3351,32 +3786,166 @@ func (c *WAFV2) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInp // // * You specified an invalid parameter name or value. // -// * Your nested statement isn't valid. You might have tried to nest a statement -// that can’t be nested. +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// * WAFInvalidOperationException +// The operation isn't valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration +func (c *WAFV2) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + return out, req.Send() +} + +// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFV2) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPermissionPolicy = "PutPermissionPolicy" + +// PutPermissionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutPermissionPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPermissionPolicy for more information on using the PutPermissionPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPermissionPolicyRequest method. +// req, resp := client.PutPermissionPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy +func (c *WAFV2) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req *request.Request, output *PutPermissionPolicyOutput) { + op := &request.Operation{ + Name: opPutPermissionPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPermissionPolicyInput{} + } + + output = &PutPermissionPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutPermissionPolicy API operation for AWS WAFV2. +// +// Attaches an IAM policy to the specified resource. Use this to share a rule +// group across accounts. +// +// You must be the owner of the rule group to perform this operation. +// +// This action is subject to the following restrictions: +// +// * You can attach only one policy with each PutPermissionPolicy request. +// +// * The ARN in the request must be a valid WAF RuleGroup ARN and the rule +// group must exist in the same region. +// +// * The user making the request must be the owner of the rule group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAFV2's +// API operation PutPermissionPolicy for usage and error information. +// +// Returned Error Types: +// * WAFNonexistentItemException +// AWS WAF couldn’t perform the operation because your resource doesn’t +// exist. +// +// * WAFInternalErrorException +// Your request is valid, but AWS WAF couldn’t perform the operation because +// of a system problem. Retry your request. +// +// * WAFInvalidParameterException +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name or value. +// +// * Your nested statement isn't valid. You might have tried to nest a statement +// that can’t be nested. +// +// * You tried to update a WebACL with a DefaultAction that isn't among the +// types available at DefaultAction. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a Web ACL cannot be associated. +// +// * WAFInvalidPermissionPolicyException +// The operation failed because the specified policy isn't in the proper format. +// +// The policy specifications must conform to the following: +// +// * The policy must be composed using IAM Policy version 2012-10-17 or version +// 2015-01-01. +// +// * The policy must include specifications for Effect, Action, and Principal. +// +// * Effect must specify Allow. +// +// * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups. +// AWS WAF rejects any extra actions or wildcard actions in the policy. // -// * You tried to update a WebACL with a DefaultAction that isn't among the -// types available at DefaultAction. +// * The policy must not include a Resource parameter. // -// * Your request references an ARN that is malformed, or corresponds to -// a resource with which a Web ACL cannot be associated. +// For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). // -// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration -func (c *WAFV2) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { - req, out := c.PutLoggingConfigurationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy +func (c *WAFV2) PutPermissionPolicy(input *PutPermissionPolicyInput) (*PutPermissionPolicyOutput, error) { + req, out := c.PutPermissionPolicyRequest(input) return out, req.Send() } -// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of +// PutPermissionPolicyWithContext is the same as PutPermissionPolicy with the addition of // the ability to pass a context and additional request options. // -// See PutLoggingConfiguration for details on how to use this API operation. +// See PutPermissionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *WAFV2) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) { - req, out := c.PutLoggingConfigurationRequest(input) +func (c *WAFV2) PutPermissionPolicyWithContext(ctx aws.Context, input *PutPermissionPolicyInput, opts ...request.Option) (*PutPermissionPolicyOutput, error) { + req, out := c.PutPermissionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -3482,6 +4051,9 @@ func (c *WAFV2) TagResourceRequest(input *TagResourceInput) (req *request.Reques // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource func (c *WAFV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) @@ -3597,6 +4169,9 @@ func (c *WAFV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Re // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource func (c *WAFV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) @@ -3717,6 +4292,9 @@ func (c *WAFV2) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Reques // for an AWS account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet func (c *WAFV2) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) { req, out := c.UpdateIPSetRequest(input) @@ -3837,6 +4415,9 @@ func (c *WAFV2) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) // for an AWS account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet func (c *WAFV2) UpdateRegexPatternSet(input *UpdateRegexPatternSetInput) (*UpdateRegexPatternSetOutput, error) { req, out := c.UpdateRegexPatternSetRequest(input) @@ -3968,6 +4549,9 @@ func (c *WAFV2) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *reques // // * WAFSubscriptionNotFoundException // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup func (c *WAFV2) UpdateRuleGroup(input *UpdateRuleGroupInput) (*UpdateRuleGroupOutput, error) { req, out := c.UpdateRuleGroupRequest(input) @@ -4106,6 +4690,9 @@ func (c *WAFV2) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Requ // // * WAFSubscriptionNotFoundException // +// * WAFInvalidOperationException +// The operation isn't valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL func (c *WAFV2) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) { req, out := c.UpdateWebACLRequest(input) @@ -4411,7 +4998,7 @@ type ByteMatchStatement struct { // in the part of web requests that you designate for inspection in FieldToMatch. // The maximum length of the value is 50 bytes. // - // Valid values depend on the areas that you specify for inspection in FieldToMatch: + // Valid values depend on the component that you specify for inspection in FieldToMatch: // // * Method: The HTTP method that you want AWS WAF to search for. This indicates // the type of operation specified in the request. @@ -4445,8 +5032,8 @@ type ByteMatchStatement struct { // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass detection. If you specify one // or more transformations in a rule statement, AWS WAF performs all transformations - // on the content identified by FieldToMatch, starting from the lowest priority - // setting, before inspecting the content for a match. + // on the content of the request component identified by FieldToMatch, starting + // from the lowest priority setting, before inspecting the content for a match. // // TextTransformations is a required field TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"` @@ -4541,7 +5128,7 @@ type CheckCapacityInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -4672,8 +5259,8 @@ type CreateIPSetInput struct { // Addresses is a required field Addresses []*string `type:"list" required:"true"` - // A friendly description of the IP set. You cannot change the description of - // an IP set after you create it. + // A description of the IP set that helps with identification. You cannot change + // the description of an IP set after you create it. Description *string `min:"1" type:"string"` // Specify IPV4 or IPV6. @@ -4681,8 +5268,8 @@ type CreateIPSetInput struct { // IPAddressVersion is a required field IPAddressVersion *string `type:"string" required:"true" enum:"IPAddressVersion"` - // A friendly name of the IP set. You cannot change the name of an IPSet after - // you create it. + // The name of the IP set. You cannot change the name of an IPSet after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -4694,7 +5281,7 @@ type CreateIPSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -4822,12 +5409,11 @@ func (s *CreateIPSetOutput) SetSummary(v *IPSetSummary) *CreateIPSetOutput { type CreateRegexPatternSetInput struct { _ struct{} `type:"structure"` - // A friendly description of the set. You cannot change the description of a - // set after you create it. + // A description of the set that helps with identification. You cannot change + // the description of a set after you create it. Description *string `min:"1" type:"string"` - // A friendly name of the set. You cannot change the name after you create the - // set. + // The name of the set. You cannot change the name after you create the set. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -4835,7 +5421,7 @@ type CreateRegexPatternSetInput struct { // Array of regular expression strings. // // RegularExpressionList is a required field - RegularExpressionList []*Regex `min:"1" type:"list" required:"true"` + RegularExpressionList []*Regex `type:"list" required:"true"` // Specifies whether this is for an AWS CloudFront distribution or for a regional // application. A regional application can be an Application Load Balancer (ALB) @@ -4844,7 +5430,7 @@ type CreateRegexPatternSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -4881,9 +5467,6 @@ func (s *CreateRegexPatternSetInput) Validate() error { if s.RegularExpressionList == nil { invalidParams.Add(request.NewErrParamRequired("RegularExpressionList")) } - if s.RegularExpressionList != nil && len(s.RegularExpressionList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegularExpressionList", 1)) - } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } @@ -4994,12 +5577,12 @@ type CreateRuleGroupInput struct { // Capacity is a required field Capacity *int64 `min:"1" type:"long" required:"true"` - // A friendly description of the rule group. You cannot change the description - // of a rule group after you create it. + // A description of the rule group that helps with identification. You cannot + // change the description of a rule group after you create it. Description *string `min:"1" type:"string"` - // A friendly name of the rule group. You cannot change the name of a rule group - // after you create it. + // The name of the rule group. You cannot change the name of a rule group after + // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -5017,7 +5600,7 @@ type CreateRuleGroupInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -5179,12 +5762,12 @@ type CreateWebACLInput struct { // DefaultAction is a required field DefaultAction *DefaultAction `type:"structure" required:"true"` - // A friendly description of the Web ACL. You cannot change the description - // of a Web ACL after you create it. + // A description of the Web ACL that helps with identification. You cannot change + // the description of a Web ACL after you create it. Description *string `min:"1" type:"string"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -5202,7 +5785,7 @@ type CreateWebACLInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -5392,6 +5975,101 @@ func (s *DefaultAction) SetBlock(v *BlockAction) *DefaultAction { return s } +type DeleteFirewallManagerRuleGroupsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the web ACL. + // + // WebACLArn is a required field + WebACLArn *string `min:"20" type:"string" required:"true"` + + // A token used for optimistic locking. AWS WAF returns a token to your get + // and list requests, to mark the state of the entity at the time of the request. + // To make changes to the entity associated with the token, you provide the + // token to operations like update and delete. AWS WAF uses the token to ensure + // that no changes have been made to the entity since you last retrieved it. + // If a change has been made, the update fails with a WAFOptimisticLockException. + // If this happens, perform another get, and use the new token returned by that + // operation. + // + // WebACLLockToken is a required field + WebACLLockToken *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFirewallManagerRuleGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFirewallManagerRuleGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFirewallManagerRuleGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFirewallManagerRuleGroupsInput"} + if s.WebACLArn == nil { + invalidParams.Add(request.NewErrParamRequired("WebACLArn")) + } + if s.WebACLArn != nil && len(*s.WebACLArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20)) + } + if s.WebACLLockToken == nil { + invalidParams.Add(request.NewErrParamRequired("WebACLLockToken")) + } + if s.WebACLLockToken != nil && len(*s.WebACLLockToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebACLLockToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebACLArn sets the WebACLArn field's value. +func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLArn(v string) *DeleteFirewallManagerRuleGroupsInput { + s.WebACLArn = &v + return s +} + +// SetWebACLLockToken sets the WebACLLockToken field's value. +func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsInput { + s.WebACLLockToken = &v + return s +} + +type DeleteFirewallManagerRuleGroupsOutput struct { + _ struct{} `type:"structure"` + + // A token used for optimistic locking. AWS WAF returns a token to your get + // and list requests, to mark the state of the entity at the time of the request. + // To make changes to the entity associated with the token, you provide the + // token to operations like update and delete. AWS WAF uses the token to ensure + // that no changes have been made to the entity since you last retrieved it. + // If a change has been made, the update fails with a WAFOptimisticLockException. + // If this happens, perform another get, and use the new token returned by that + // operation. + NextWebACLLockToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteFirewallManagerRuleGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFirewallManagerRuleGroupsOutput) GoString() string { + return s.String() +} + +// SetNextWebACLLockToken sets the NextWebACLLockToken field's value. +func (s *DeleteFirewallManagerRuleGroupsOutput) SetNextWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsOutput { + s.NextWebACLLockToken = &v + return s +} + type DeleteIPSetInput struct { _ struct{} `type:"structure"` @@ -5413,8 +6091,8 @@ type DeleteIPSetInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the IP set. You cannot change the name of an IPSet after - // you create it. + // The name of the IP set. You cannot change the name of an IPSet after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -5426,7 +6104,7 @@ type DeleteIPSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -5570,6 +6248,64 @@ func (s DeleteLoggingConfigurationOutput) GoString() string { return s.String() } +type DeletePermissionPolicyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the rule group from which you want to delete + // the policy. + // + // You must be the owner of the rule group to perform this operation. + // + // ResourceArn is a required field + ResourceArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePermissionPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePermissionPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePermissionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePermissionPolicyInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeletePermissionPolicyInput) SetResourceArn(v string) *DeletePermissionPolicyInput { + s.ResourceArn = &v + return s +} + +type DeletePermissionPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePermissionPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePermissionPolicyOutput) GoString() string { + return s.String() +} + type DeleteRegexPatternSetInput struct { _ struct{} `type:"structure"` @@ -5591,8 +6327,7 @@ type DeleteRegexPatternSetInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the set. You cannot change the name after you create the - // set. + // The name of the set. You cannot change the name after you create the set. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -5604,7 +6339,7 @@ type DeleteRegexPatternSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -5714,8 +6449,8 @@ type DeleteRuleGroupInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the rule group. You cannot change the name of a rule group - // after you create it. + // The name of the rule group. You cannot change the name of a rule group after + // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -5727,7 +6462,7 @@ type DeleteRuleGroupInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -5837,8 +6572,8 @@ type DeleteWebACLInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -5850,7 +6585,7 @@ type DeleteWebACLInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -5954,7 +6689,7 @@ type DescribeManagedRuleGroupInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -6174,9 +6909,12 @@ func (s *ExcludedRule) SetName(v string) *ExcludedRule { // 2019. For information, including how to migrate your AWS WAF resources from // the prior release, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). // -// The part of a web request that you want AWS WAF to inspect. Include the FieldToMatch -// types that you want to inspect, with additional specifications as needed, -// according to the type. +// The part of a web request that you want AWS WAF to inspect. Include the single +// FieldToMatch type that you want to inspect, with additional specifications +// as needed, according to the type. You specify a single request component +// in FieldToMatch for each rule statement that requires it. To inspect more +// than one component of a web request, create a separate rule statement for +// each component. type FieldToMatch struct { _ struct{} `type:"structure"` @@ -6283,15 +7021,165 @@ func (s *FieldToMatch) SetSingleHeader(v *SingleHeader) *FieldToMatch { return s } -// SetSingleQueryArgument sets the SingleQueryArgument field's value. -func (s *FieldToMatch) SetSingleQueryArgument(v *SingleQueryArgument) *FieldToMatch { - s.SingleQueryArgument = v +// SetSingleQueryArgument sets the SingleQueryArgument field's value. +func (s *FieldToMatch) SetSingleQueryArgument(v *SingleQueryArgument) *FieldToMatch { + s.SingleQueryArgument = v + return s +} + +// SetUriPath sets the UriPath field's value. +func (s *FieldToMatch) SetUriPath(v *UriPath) *FieldToMatch { + s.UriPath = v + return s +} + +// A rule group that's defined for an AWS Firewall Manager WAF policy. +type FirewallManagerRuleGroup struct { + _ struct{} `type:"structure"` + + // The processing guidance for an AWS Firewall Manager rule. This is like a + // regular rule Statement, but it can only contain a rule group reference. + // + // FirewallManagerStatement is a required field + FirewallManagerStatement *FirewallManagerStatement `type:"structure" required:"true"` + + // The name of the rule group. You cannot change the name of a rule group after + // you create it. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The override action to apply to the rules in a rule group. Used only for + // rule statements that reference a rule group, like RuleGroupReferenceStatement + // and ManagedRuleGroupStatement. + // + // Set the override action to none to leave the rule actions in effect. Set + // it to count to only count matches, regardless of the rule action settings. + // + // In a Rule, you must specify either this OverrideAction setting or the rule + // Action setting, but not both: + // + // * If the rule statement references a rule group, use this override action + // setting and not the action setting. + // + // * If the rule statement does not reference a rule group, use the rule + // action setting and not this rule override action setting. + // + // OverrideAction is a required field + OverrideAction *OverrideAction `type:"structure" required:"true"` + + // If you define more than one rule group in the first or last Firewall Manager + // rule groups, AWS WAF evaluates each request against the rule groups in order, + // starting from the lowest priority setting. The priorities don't need to be + // consecutive, but they must all be different. + // + // Priority is a required field + Priority *int64 `type:"integer" required:"true"` + + // + // This is the latest version of AWS WAF, named AWS WAFV2, released in November, + // 2019. For information, including how to migrate your AWS WAF resources from + // the prior release, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). + // + // Defines and enables Amazon CloudWatch metrics and web request sample collection. + // + // VisibilityConfig is a required field + VisibilityConfig *VisibilityConfig `type:"structure" required:"true"` +} + +// String returns the string representation +func (s FirewallManagerRuleGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FirewallManagerRuleGroup) GoString() string { + return s.String() +} + +// SetFirewallManagerStatement sets the FirewallManagerStatement field's value. +func (s *FirewallManagerRuleGroup) SetFirewallManagerStatement(v *FirewallManagerStatement) *FirewallManagerRuleGroup { + s.FirewallManagerStatement = v + return s +} + +// SetName sets the Name field's value. +func (s *FirewallManagerRuleGroup) SetName(v string) *FirewallManagerRuleGroup { + s.Name = &v + return s +} + +// SetOverrideAction sets the OverrideAction field's value. +func (s *FirewallManagerRuleGroup) SetOverrideAction(v *OverrideAction) *FirewallManagerRuleGroup { + s.OverrideAction = v + return s +} + +// SetPriority sets the Priority field's value. +func (s *FirewallManagerRuleGroup) SetPriority(v int64) *FirewallManagerRuleGroup { + s.Priority = &v + return s +} + +// SetVisibilityConfig sets the VisibilityConfig field's value. +func (s *FirewallManagerRuleGroup) SetVisibilityConfig(v *VisibilityConfig) *FirewallManagerRuleGroup { + s.VisibilityConfig = v + return s +} + +// The processing guidance for an AWS Firewall Manager rule. This is like a +// regular rule Statement, but it can only contain a rule group reference. +type FirewallManagerStatement struct { + _ struct{} `type:"structure"` + + // + // This is the latest version of AWS WAF, named AWS WAFV2, released in November, + // 2019. For information, including how to migrate your AWS WAF resources from + // the prior release, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). + // + // A rule statement used to run the rules that are defined in a managed rule + // group. To use this, provide the vendor name and the name of the rule group + // in this statement. You can retrieve the required names by calling ListAvailableManagedRuleGroups. + // + // You can't nest a ManagedRuleGroupStatement, for example for use inside a + // NotStatement or OrStatement. It can only be referenced as a top-level statement + // within a rule. + ManagedRuleGroupStatement *ManagedRuleGroupStatement `type:"structure"` + + // + // This is the latest version of AWS WAF, named AWS WAFV2, released in November, + // 2019. For information, including how to migrate your AWS WAF resources from + // the prior release, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). + // + // A rule statement used to run the rules that are defined in a RuleGroup. To + // use this, create a rule group with your rules, then provide the ARN of the + // rule group in this statement. + // + // You cannot nest a RuleGroupReferenceStatement, for example for use inside + // a NotStatement or OrStatement. It can only be referenced as a top-level statement + // within a rule. + RuleGroupReferenceStatement *RuleGroupReferenceStatement `type:"structure"` +} + +// String returns the string representation +func (s FirewallManagerStatement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FirewallManagerStatement) GoString() string { + return s.String() +} + +// SetManagedRuleGroupStatement sets the ManagedRuleGroupStatement field's value. +func (s *FirewallManagerStatement) SetManagedRuleGroupStatement(v *ManagedRuleGroupStatement) *FirewallManagerStatement { + s.ManagedRuleGroupStatement = v return s } -// SetUriPath sets the UriPath field's value. -func (s *FieldToMatch) SetUriPath(v *UriPath) *FieldToMatch { - s.UriPath = v +// SetRuleGroupReferenceStatement sets the RuleGroupReferenceStatement field's value. +func (s *FirewallManagerStatement) SetRuleGroupReferenceStatement(v *RuleGroupReferenceStatement) *FirewallManagerStatement { + s.RuleGroupReferenceStatement = v return s } @@ -6347,8 +7235,8 @@ type GetIPSetInput struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the IP set. You cannot change the name of an IPSet after - // you create it. + // The name of the IP set. You cannot change the name of an IPSet after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -6360,7 +7248,7 @@ type GetIPSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -6537,6 +7425,71 @@ func (s *GetLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfig return s } +type GetPermissionPolicyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the rule group for which you want to get + // the policy. + // + // ResourceArn is a required field + ResourceArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPermissionPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPermissionPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPermissionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPermissionPolicyInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *GetPermissionPolicyInput) SetResourceArn(v string) *GetPermissionPolicyInput { + s.ResourceArn = &v + return s +} + +type GetPermissionPolicyOutput struct { + _ struct{} `type:"structure"` + + // The IAM policy that is attached to the specified rule group. + Policy *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetPermissionPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPermissionPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetPermissionPolicyOutput) SetPolicy(v string) *GetPermissionPolicyOutput { + s.Policy = &v + return s +} + type GetRateBasedStatementManagedKeysInput struct { _ struct{} `type:"structure"` @@ -6552,7 +7505,7 @@ type GetRateBasedStatementManagedKeysInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -6567,8 +7520,8 @@ type GetRateBasedStatementManagedKeysInput struct { // WebACLId is a required field WebACLId *string `min:"1" type:"string" required:"true"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. // // WebACLName is a required field WebACLName *string `min:"1" type:"string" required:"true"` @@ -6680,8 +7633,7 @@ type GetRegexPatternSetInput struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the set. You cannot change the name after you create the - // set. + // The name of the set. You cannot change the name after you create the set. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -6693,7 +7645,7 @@ type GetRegexPatternSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -6812,8 +7764,8 @@ type GetRuleGroupInput struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the rule group. You cannot change the name of a rule group - // after you create it. + // The name of the rule group. You cannot change the name of a rule group after + // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -6825,7 +7777,7 @@ type GetRuleGroupInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -6959,7 +7911,7 @@ type GetSampledRequestsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -7183,8 +8135,8 @@ type GetWebACLInput struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -7196,7 +8148,7 @@ type GetWebACLInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -7471,8 +8423,8 @@ type IPSet struct { // Addresses is a required field Addresses []*string `type:"list" required:"true"` - // A friendly description of the IP set. You cannot change the description of - // an IP set after you create it. + // A description of the IP set that helps with identification. You cannot change + // the description of an IP set after you create it. Description *string `min:"1" type:"string"` // Specify IPV4 or IPV6. @@ -7486,8 +8438,8 @@ type IPSet struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the IP set. You cannot change the name of an IPSet after - // you create it. + // The name of the IP set. You cannot change the name of an IPSet after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -7609,8 +8561,8 @@ type IPSetSummary struct { // The Amazon Resource Name (ARN) of the entity. ARN *string `min:"20" type:"string"` - // A friendly description of the IP set. You cannot change the description of - // an IP set after you create it. + // A description of the IP set that helps with identification. You cannot change + // the description of an IP set after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the set. This ID is returned in the responses to @@ -7627,8 +8579,8 @@ type IPSetSummary struct { // operation. LockToken *string `min:"1" type:"string"` - // A friendly name of the IP set. You cannot change the name of an IPSet after - // you create it. + // The name of the IP set. You cannot change the name of an IPSet after you + // create it. Name *string `min:"1" type:"string"` } @@ -7693,7 +8645,7 @@ type ListAvailableManagedRuleGroupsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -7804,7 +8756,7 @@ type ListIPSetsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -7917,7 +8869,7 @@ type ListLoggingConfigurationsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -8023,7 +8975,7 @@ type ListRegexPatternSetsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -8208,7 +9160,7 @@ type ListRuleGroupsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -8424,7 +9376,7 @@ type ListWebACLsInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -8906,14 +9858,21 @@ func (s *OrStatement) SetStatements(v []*Statement) *OrStatement { return s } +// The override action to apply to the rules in a rule group. Used only for +// rule statements that reference a rule group, like RuleGroupReferenceStatement +// and ManagedRuleGroupStatement. // -// This is the latest version of AWS WAF, named AWS WAFV2, released in November, -// 2019. For information, including how to migrate your AWS WAF resources from -// the prior release, see the AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). +// Set the override action to none to leave the rule actions in effect. Set +// it to count to only count matches, regardless of the rule action settings. +// +// In a Rule, you must specify either this OverrideAction setting or the rule +// Action setting, but not both: // -// The action to use to override the rule's Action setting. You can use no override -// action, in which case the rule action is in effect, or count, in which case, -// if the rule matches a web request, it only counts the match. +// * If the rule statement references a rule group, use this override action +// setting and not the action setting. +// +// * If the rule statement does not reference a rule group, use the rule +// action setting and not this rule override action setting. type OverrideAction struct { _ struct{} `type:"structure"` @@ -9026,6 +9985,95 @@ func (s *PutLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfig return s } +type PutPermissionPolicyInput struct { + _ struct{} `type:"structure"` + + // The policy to attach to the specified rule group. + // + // The policy specifications must conform to the following: + // + // * The policy must be composed using IAM Policy version 2012-10-17 or version + // 2015-01-01. + // + // * The policy must include specifications for Effect, Action, and Principal. + // + // * Effect must specify Allow. + // + // * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups. + // AWS WAF rejects any extra actions or wildcard actions in the policy. + // + // * The policy must not include a Resource parameter. + // + // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). + // + // Policy is a required field + Policy *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach + // the policy. + // + // ResourceArn is a required field + ResourceArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutPermissionPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPermissionPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPermissionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPermissionPolicyInput"} + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicy sets the Policy field's value. +func (s *PutPermissionPolicyInput) SetPolicy(v string) *PutPermissionPolicyInput { + s.Policy = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *PutPermissionPolicyInput) SetResourceArn(v string) *PutPermissionPolicyInput { + s.ResourceArn = &v + return s +} + +type PutPermissionPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutPermissionPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPermissionPolicyOutput) GoString() string { + return s.String() +} + // // This is the latest version of AWS WAF, named AWS WAFV2, released in November, // 2019. For information, including how to migrate your AWS WAF resources from @@ -9252,20 +10300,19 @@ type RegexPatternSet struct { // The Amazon Resource Name (ARN) of the entity. ARN *string `min:"20" type:"string"` - // A friendly description of the set. You cannot change the description of a - // set after you create it. + // A description of the set that helps with identification. You cannot change + // the description of a set after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the set. This ID is returned in the responses to // create and list commands. You provide it to operations like update and delete. Id *string `min:"1" type:"string"` - // A friendly name of the set. You cannot change the name after you create the - // set. + // The name of the set. You cannot change the name after you create the set. Name *string `min:"1" type:"string"` // The regular expression patterns in the set. - RegularExpressionList []*Regex `min:"1" type:"list"` + RegularExpressionList []*Regex `type:"list"` } // String returns the string representation @@ -9342,8 +10389,8 @@ type RegexPatternSetReferenceStatement struct { // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass detection. If you specify one // or more transformations in a rule statement, AWS WAF performs all transformations - // on the content identified by FieldToMatch, starting from the lowest priority - // setting, before inspecting the content for a match. + // on the content of the request component identified by FieldToMatch, starting + // from the lowest priority setting, before inspecting the content for a match. // // TextTransformations is a required field TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"` @@ -9432,8 +10479,8 @@ type RegexPatternSetSummary struct { // The Amazon Resource Name (ARN) of the entity. ARN *string `min:"20" type:"string"` - // A friendly description of the set. You cannot change the description of a - // set after you create it. + // A description of the set that helps with identification. You cannot change + // the description of a set after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the set. This ID is returned in the responses to @@ -9450,8 +10497,8 @@ type RegexPatternSetSummary struct { // operation. LockToken *string `min:"1" type:"string"` - // A friendly name of the data type instance. You cannot change the name after - // you create the instance. + // The name of the data type instance. You cannot change the name after you + // create the instance. Name *string `min:"1" type:"string"` } @@ -9508,19 +10555,44 @@ type Rule struct { _ struct{} `type:"structure"` // The action that AWS WAF should take on a web request when it matches the - // rule's statement. Settings at the web ACL level can override the rule action + // rule statement. Settings at the web ACL level can override the rule action // setting. + // + // This is used only for rules whose statements do not reference a rule group. + // Rule statements that reference a rule group include RuleGroupReferenceStatement + // and ManagedRuleGroupStatement. + // + // You must specify either this Action setting or the rule OverrideAction setting, + // but not both: + // + // * If the rule statement does not reference a rule group, use this rule + // action setting and not the rule override action setting. + // + // * If the rule statement references a rule group, use the override action + // setting and not this action setting. Action *RuleAction `type:"structure"` - // A friendly name of the rule. You can't change the name of a Rule after you - // create it. + // The name of the rule. You can't change the name of a Rule after you create + // it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // The action to use to override the rule's Action setting. You can use no override - // action, in which case the rule action is in effect, or count action, in which - // case, if the rule matches a web request, it only counts the match. + // The override action to apply to the rules in a rule group. Used only for + // rule statements that reference a rule group, like RuleGroupReferenceStatement + // and ManagedRuleGroupStatement. + // + // Set the override action to none to leave the rule actions in effect. Set + // it to count to only count matches, regardless of the rule action settings. + // + // In a Rule, you must specify either this OverrideAction setting or the rule + // Action setting, but not both: + // + // * If the rule statement references a rule group, use this override action + // setting and not the action setting. + // + // * If the rule statement does not reference a rule group, use the rule + // action setting and not this rule override action setting. OverrideAction *OverrideAction `type:"structure"` // If you define more than one Rule in a WebACL, AWS WAF evaluates each request @@ -9708,8 +10780,8 @@ type RuleGroup struct { // Capacity is a required field Capacity *int64 `min:"1" type:"long" required:"true"` - // A friendly description of the rule group. You cannot change the description - // of a rule group after you create it. + // A description of the rule group that helps with identification. You cannot + // change the description of a rule group after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the rule group. This ID is returned in the responses @@ -9719,8 +10791,8 @@ type RuleGroup struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the rule group. You cannot change the name of a rule group - // after you create it. + // The name of the rule group. You cannot change the name of a rule group after + // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -9877,8 +10949,8 @@ type RuleGroupSummary struct { // The Amazon Resource Name (ARN) of the entity. ARN *string `min:"20" type:"string"` - // A friendly description of the rule group. You cannot change the description - // of a rule group after you create it. + // A description of the rule group that helps with identification. You cannot + // change the description of a rule group after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the rule group. This ID is returned in the responses @@ -9896,8 +10968,8 @@ type RuleGroupSummary struct { // operation. LockToken *string `min:"1" type:"string"` - // A friendly name of the data type instance. You cannot change the name after - // you create the instance. + // The name of the data type instance. You cannot change the name after you + // create the instance. Name *string `min:"1" type:"string"` } @@ -10206,8 +11278,8 @@ type SizeConstraintStatement struct { // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass detection. If you specify one // or more transformations in a rule statement, AWS WAF performs all transformations - // on the content identified by FieldToMatch, starting from the lowest priority - // setting, before inspecting the content for a match. + // on the content of the request component identified by FieldToMatch, starting + // from the lowest priority setting, before inspecting the content for a match. // // TextTransformations is a required field TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"` @@ -10311,8 +11383,8 @@ type SqliMatchStatement struct { // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass detection. If you specify one // or more transformations in a rule statement, AWS WAF performs all transformations - // on the content identified by FieldToMatch, starting from the lowest priority - // setting, before inspecting the content for a match. + // on the content of the request component identified by FieldToMatch, starting + // from the lowest priority setting, before inspecting the content for a match. // // TextTransformations is a required field TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"` @@ -11166,8 +12238,8 @@ type UpdateIPSetInput struct { // Addresses is a required field Addresses []*string `type:"list" required:"true"` - // A friendly description of the IP set. You cannot change the description of - // an IP set after you create it. + // A description of the IP set that helps with identification. You cannot change + // the description of an IP set after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the set. This ID is returned in the responses to @@ -11188,8 +12260,8 @@ type UpdateIPSetInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the IP set. You cannot change the name of an IPSet after - // you create it. + // The name of the IP set. You cannot change the name of an IPSet after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -11201,7 +12273,7 @@ type UpdateIPSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -11320,8 +12392,8 @@ func (s *UpdateIPSetOutput) SetNextLockToken(v string) *UpdateIPSetOutput { type UpdateRegexPatternSetInput struct { _ struct{} `type:"structure"` - // A friendly description of the set. You cannot change the description of a - // set after you create it. + // A description of the set that helps with identification. You cannot change + // the description of a set after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the set. This ID is returned in the responses to @@ -11342,14 +12414,13 @@ type UpdateRegexPatternSetInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the set. You cannot change the name after you create the - // set. + // The name of the set. You cannot change the name after you create the set. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // RegularExpressionList is a required field - RegularExpressionList []*Regex `min:"1" type:"list" required:"true"` + RegularExpressionList []*Regex `type:"list" required:"true"` // Specifies whether this is for an AWS CloudFront distribution or for a regional // application. A regional application can be an Application Load Balancer (ALB) @@ -11358,7 +12429,7 @@ type UpdateRegexPatternSetInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -11404,9 +12475,6 @@ func (s *UpdateRegexPatternSetInput) Validate() error { if s.RegularExpressionList == nil { invalidParams.Add(request.NewErrParamRequired("RegularExpressionList")) } - if s.RegularExpressionList != nil && len(s.RegularExpressionList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegularExpressionList", 1)) - } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } @@ -11490,8 +12558,8 @@ func (s *UpdateRegexPatternSetOutput) SetNextLockToken(v string) *UpdateRegexPat type UpdateRuleGroupInput struct { _ struct{} `type:"structure"` - // A friendly description of the rule group. You cannot change the description - // of a rule group after you create it. + // A description of the rule group that helps with identification. You cannot + // change the description of a rule group after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the rule group. This ID is returned in the responses @@ -11513,8 +12581,8 @@ type UpdateRuleGroupInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the rule group. You cannot change the name of a rule group - // after you create it. + // The name of the rule group. You cannot change the name of a rule group after + // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -11532,7 +12600,7 @@ type UpdateRuleGroupInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -11682,8 +12750,8 @@ type UpdateWebACLInput struct { // DefaultAction is a required field DefaultAction *DefaultAction `type:"structure" required:"true"` - // A friendly description of the Web ACL. You cannot change the description - // of a Web ACL after you create it. + // A description of the Web ACL that helps with identification. You cannot change + // the description of a Web ACL after you create it. Description *string `min:"1" type:"string"` // The unique identifier for the Web ACL. This ID is returned in the responses @@ -11705,8 +12773,8 @@ type UpdateWebACLInput struct { // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -11724,7 +12792,7 @@ type UpdateWebACLInput struct { // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // - // * CLI - Specify the region when you use the CloudFront scope: --scope=CLOUDFRONT + // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. @@ -11914,10 +12982,10 @@ type VisibilityConfig struct { // CloudWatchMetricsEnabled is a required field CloudWatchMetricsEnabled *bool `type:"boolean" required:"true"` - // A friendly name of the CloudWatch metric. The name can contain only alphanumeric - // characters (A-Z, a-z, 0-9), with length from one to 128 characters. It can't - // contain whitespace or metric names reserved for AWS WAF, for example "All" - // and "Default_Action." You can't change a MetricName after you create a VisibilityConfig. + // A name of the CloudWatch metric. The name can contain only alphanumeric characters + // (A-Z, a-z, 0-9), with length from one to 128 characters. It can't contain + // whitespace or metric names reserved for AWS WAF, for example "All" and "Default_Action." + // You can't change a MetricName after you create a VisibilityConfig. // // MetricName is a required field MetricName *string `min:"1" type:"string" required:"true"` @@ -11983,8 +13051,8 @@ func (s *VisibilityConfig) SetSampledRequestsEnabled(v bool) *VisibilityConfig { // AWS WAF couldn’t perform the operation because your resource is being used // by another resource or it’s associated with another resource. type WAFAssociatedItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12001,17 +13069,17 @@ func (s WAFAssociatedItemException) GoString() string { func newErrorWAFAssociatedItemException(v protocol.ResponseMetadata) error { return &WAFAssociatedItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFAssociatedItemException) Code() string { +func (s *WAFAssociatedItemException) Code() string { return "WAFAssociatedItemException" } // Message returns the exception's message. -func (s WAFAssociatedItemException) Message() string { +func (s *WAFAssociatedItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12019,29 +13087,29 @@ func (s WAFAssociatedItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFAssociatedItemException) OrigErr() error { +func (s *WAFAssociatedItemException) OrigErr() error { return nil } -func (s WAFAssociatedItemException) Error() string { +func (s *WAFAssociatedItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFAssociatedItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFAssociatedItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFAssociatedItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFAssociatedItemException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. type WAFDuplicateItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12058,17 +13126,17 @@ func (s WAFDuplicateItemException) GoString() string { func newErrorWAFDuplicateItemException(v protocol.ResponseMetadata) error { return &WAFDuplicateItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFDuplicateItemException) Code() string { +func (s *WAFDuplicateItemException) Code() string { return "WAFDuplicateItemException" } // Message returns the exception's message. -func (s WAFDuplicateItemException) Message() string { +func (s *WAFDuplicateItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12076,29 +13144,29 @@ func (s WAFDuplicateItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFDuplicateItemException) OrigErr() error { +func (s *WAFDuplicateItemException) OrigErr() error { return nil } -func (s WAFDuplicateItemException) Error() string { +func (s *WAFDuplicateItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFDuplicateItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFDuplicateItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFDuplicateItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFDuplicateItemException) RequestID() string { + return s.RespMetadata.RequestID } // Your request is valid, but AWS WAF couldn’t perform the operation because // of a system problem. Retry your request. type WAFInternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12115,17 +13183,73 @@ func (s WAFInternalErrorException) GoString() string { func newErrorWAFInternalErrorException(v protocol.ResponseMetadata) error { return &WAFInternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInternalErrorException) Code() string { +func (s *WAFInternalErrorException) Code() string { return "WAFInternalErrorException" } // Message returns the exception's message. -func (s WAFInternalErrorException) Message() string { +func (s *WAFInternalErrorException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *WAFInternalErrorException) OrigErr() error { + return nil +} + +func (s *WAFInternalErrorException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *WAFInternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *WAFInternalErrorException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The operation isn't valid. +type WAFInvalidOperationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s WAFInvalidOperationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WAFInvalidOperationException) GoString() string { + return s.String() +} + +func newErrorWAFInvalidOperationException(v protocol.ResponseMetadata) error { + return &WAFInvalidOperationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *WAFInvalidOperationException) Code() string { + return "WAFInvalidOperationException" +} + +// Message returns the exception's message. +func (s *WAFInvalidOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12133,22 +13257,22 @@ func (s WAFInternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInternalErrorException) OrigErr() error { +func (s *WAFInvalidOperationException) OrigErr() error { return nil } -func (s WAFInternalErrorException) Error() string { +func (s *WAFInvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidOperationException) RequestID() string { + return s.RespMetadata.RequestID } // The operation failed because AWS WAF didn't recognize a parameter in the @@ -12165,8 +13289,8 @@ func (s WAFInternalErrorException) RequestID() string { // * Your request references an ARN that is malformed, or corresponds to // a resource with which a Web ACL cannot be associated. type WAFInvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Field *string `type:"string" enum:"ParameterExceptionField"` @@ -12189,17 +13313,17 @@ func (s WAFInvalidParameterException) GoString() string { func newErrorWAFInvalidParameterException(v protocol.ResponseMetadata) error { return &WAFInvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidParameterException) Code() string { +func (s *WAFInvalidParameterException) Code() string { return "WAFInvalidParameterException" } // Message returns the exception's message. -func (s WAFInvalidParameterException) Message() string { +func (s *WAFInvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12207,29 +13331,101 @@ func (s WAFInvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidParameterException) OrigErr() error { +func (s *WAFInvalidParameterException) OrigErr() error { return nil } -func (s WAFInvalidParameterException) Error() string { +func (s *WAFInvalidParameterException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The operation failed because the specified policy isn't in the proper format. +// +// The policy specifications must conform to the following: +// +// * The policy must be composed using IAM Policy version 2012-10-17 or version +// 2015-01-01. +// +// * The policy must include specifications for Effect, Action, and Principal. +// +// * Effect must specify Allow. +// +// * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups. +// AWS WAF rejects any extra actions or wildcard actions in the policy. +// +// * The policy must not include a Resource parameter. +// +// For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). +type WAFInvalidPermissionPolicyException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s WAFInvalidPermissionPolicyException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WAFInvalidPermissionPolicyException) GoString() string { + return s.String() +} + +func newErrorWAFInvalidPermissionPolicyException(v protocol.ResponseMetadata) error { + return &WAFInvalidPermissionPolicyException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *WAFInvalidPermissionPolicyException) Code() string { + return "WAFInvalidPermissionPolicyException" +} + +// Message returns the exception's message. +func (s *WAFInvalidPermissionPolicyException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *WAFInvalidPermissionPolicyException) OrigErr() error { + return nil +} + +func (s *WAFInvalidPermissionPolicyException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *WAFInvalidPermissionPolicyException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *WAFInvalidPermissionPolicyException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t perform the operation because the resource that you requested // isn’t valid. Check the resource, and try again. type WAFInvalidResourceException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12246,17 +13442,17 @@ func (s WAFInvalidResourceException) GoString() string { func newErrorWAFInvalidResourceException(v protocol.ResponseMetadata) error { return &WAFInvalidResourceException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFInvalidResourceException) Code() string { +func (s *WAFInvalidResourceException) Code() string { return "WAFInvalidResourceException" } // Message returns the exception's message. -func (s WAFInvalidResourceException) Message() string { +func (s *WAFInvalidResourceException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12264,22 +13460,22 @@ func (s WAFInvalidResourceException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFInvalidResourceException) OrigErr() error { +func (s *WAFInvalidResourceException) OrigErr() error { return nil } -func (s WAFInvalidResourceException) Error() string { +func (s *WAFInvalidResourceException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFInvalidResourceException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFInvalidResourceException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFInvalidResourceException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFInvalidResourceException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t perform the operation because you exceeded your resource @@ -12287,8 +13483,8 @@ func (s WAFInvalidResourceException) RequestID() string { // for an AWS account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the AWS WAF Developer Guide. type WAFLimitsExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12305,17 +13501,17 @@ func (s WAFLimitsExceededException) GoString() string { func newErrorWAFLimitsExceededException(v protocol.ResponseMetadata) error { return &WAFLimitsExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFLimitsExceededException) Code() string { +func (s *WAFLimitsExceededException) Code() string { return "WAFLimitsExceededException" } // Message returns the exception's message. -func (s WAFLimitsExceededException) Message() string { +func (s *WAFLimitsExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12323,29 +13519,29 @@ func (s WAFLimitsExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFLimitsExceededException) OrigErr() error { +func (s *WAFLimitsExceededException) OrigErr() error { return nil } -func (s WAFLimitsExceededException) Error() string { +func (s *WAFLimitsExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFLimitsExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFLimitsExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFLimitsExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFLimitsExceededException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t perform the operation because your resource doesn’t // exist. type WAFNonexistentItemException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12362,17 +13558,17 @@ func (s WAFNonexistentItemException) GoString() string { func newErrorWAFNonexistentItemException(v protocol.ResponseMetadata) error { return &WAFNonexistentItemException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFNonexistentItemException) Code() string { +func (s *WAFNonexistentItemException) Code() string { return "WAFNonexistentItemException" } // Message returns the exception's message. -func (s WAFNonexistentItemException) Message() string { +func (s *WAFNonexistentItemException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12380,22 +13576,22 @@ func (s WAFNonexistentItemException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFNonexistentItemException) OrigErr() error { +func (s *WAFNonexistentItemException) OrigErr() error { return nil } -func (s WAFNonexistentItemException) Error() string { +func (s *WAFNonexistentItemException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFNonexistentItemException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFNonexistentItemException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFNonexistentItemException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFNonexistentItemException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t save your changes because you tried to update or delete @@ -12403,8 +13599,8 @@ func (s WAFNonexistentItemException) RequestID() string { // again, make any changes you need to make to the new copy, and retry your // operation. type WAFOptimisticLockException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12421,17 +13617,17 @@ func (s WAFOptimisticLockException) GoString() string { func newErrorWAFOptimisticLockException(v protocol.ResponseMetadata) error { return &WAFOptimisticLockException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFOptimisticLockException) Code() string { +func (s *WAFOptimisticLockException) Code() string { return "WAFOptimisticLockException" } // Message returns the exception's message. -func (s WAFOptimisticLockException) Message() string { +func (s *WAFOptimisticLockException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12439,22 +13635,22 @@ func (s WAFOptimisticLockException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFOptimisticLockException) OrigErr() error { +func (s *WAFOptimisticLockException) OrigErr() error { return nil } -func (s WAFOptimisticLockException) Error() string { +func (s *WAFOptimisticLockException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFOptimisticLockException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFOptimisticLockException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFOptimisticLockException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFOptimisticLockException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF is not able to access the service linked role. This can be caused @@ -12466,8 +13662,8 @@ func (s WAFOptimisticLockException) RequestID() string { // again. If you receive this same exception again, you will have to wait additional // time until the role is unlocked. type WAFServiceLinkedRoleErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -12484,17 +13680,17 @@ func (s WAFServiceLinkedRoleErrorException) GoString() string { func newErrorWAFServiceLinkedRoleErrorException(v protocol.ResponseMetadata) error { return &WAFServiceLinkedRoleErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFServiceLinkedRoleErrorException) Code() string { +func (s *WAFServiceLinkedRoleErrorException) Code() string { return "WAFServiceLinkedRoleErrorException" } // Message returns the exception's message. -func (s WAFServiceLinkedRoleErrorException) Message() string { +func (s *WAFServiceLinkedRoleErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12502,27 +13698,27 @@ func (s WAFServiceLinkedRoleErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFServiceLinkedRoleErrorException) OrigErr() error { +func (s *WAFServiceLinkedRoleErrorException) OrigErr() error { return nil } -func (s WAFServiceLinkedRoleErrorException) Error() string { +func (s *WAFServiceLinkedRoleErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFServiceLinkedRoleErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFServiceLinkedRoleErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFServiceLinkedRoleErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFServiceLinkedRoleErrorException) RequestID() string { + return s.RespMetadata.RequestID } type WAFSubscriptionNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12539,17 +13735,17 @@ func (s WAFSubscriptionNotFoundException) GoString() string { func newErrorWAFSubscriptionNotFoundException(v protocol.ResponseMetadata) error { return &WAFSubscriptionNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFSubscriptionNotFoundException) Code() string { +func (s *WAFSubscriptionNotFoundException) Code() string { return "WAFSubscriptionNotFoundException" } // Message returns the exception's message. -func (s WAFSubscriptionNotFoundException) Message() string { +func (s *WAFSubscriptionNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12557,28 +13753,28 @@ func (s WAFSubscriptionNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFSubscriptionNotFoundException) OrigErr() error { +func (s *WAFSubscriptionNotFoundException) OrigErr() error { return nil } -func (s WAFSubscriptionNotFoundException) Error() string { +func (s *WAFSubscriptionNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFSubscriptionNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFSubscriptionNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFSubscriptionNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFSubscriptionNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // An error occurred during the tagging operation. Retry your request. type WAFTagOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12595,17 +13791,17 @@ func (s WAFTagOperationException) GoString() string { func newErrorWAFTagOperationException(v protocol.ResponseMetadata) error { return &WAFTagOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFTagOperationException) Code() string { +func (s *WAFTagOperationException) Code() string { return "WAFTagOperationException" } // Message returns the exception's message. -func (s WAFTagOperationException) Message() string { +func (s *WAFTagOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12613,29 +13809,29 @@ func (s WAFTagOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFTagOperationException) OrigErr() error { +func (s *WAFTagOperationException) OrigErr() error { return nil } -func (s WAFTagOperationException) Error() string { +func (s *WAFTagOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFTagOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFTagOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFTagOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFTagOperationException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t perform your tagging operation because of an internal // error. Retry your request. type WAFTagOperationInternalErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12652,17 +13848,17 @@ func (s WAFTagOperationInternalErrorException) GoString() string { func newErrorWAFTagOperationInternalErrorException(v protocol.ResponseMetadata) error { return &WAFTagOperationInternalErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFTagOperationInternalErrorException) Code() string { +func (s *WAFTagOperationInternalErrorException) Code() string { return "WAFTagOperationInternalErrorException" } // Message returns the exception's message. -func (s WAFTagOperationInternalErrorException) Message() string { +func (s *WAFTagOperationInternalErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12670,28 +13866,28 @@ func (s WAFTagOperationInternalErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFTagOperationInternalErrorException) OrigErr() error { +func (s *WAFTagOperationInternalErrorException) OrigErr() error { return nil } -func (s WAFTagOperationInternalErrorException) Error() string { +func (s *WAFTagOperationInternalErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFTagOperationInternalErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFTagOperationInternalErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFTagOperationInternalErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFTagOperationInternalErrorException) RequestID() string { + return s.RespMetadata.RequestID } // AWS WAF couldn’t retrieve the resource that you requested. Retry your request. type WAFUnavailableEntityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -12708,17 +13904,17 @@ func (s WAFUnavailableEntityException) GoString() string { func newErrorWAFUnavailableEntityException(v protocol.ResponseMetadata) error { return &WAFUnavailableEntityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WAFUnavailableEntityException) Code() string { +func (s *WAFUnavailableEntityException) Code() string { return "WAFUnavailableEntityException" } // Message returns the exception's message. -func (s WAFUnavailableEntityException) Message() string { +func (s *WAFUnavailableEntityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -12726,22 +13922,22 @@ func (s WAFUnavailableEntityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WAFUnavailableEntityException) OrigErr() error { +func (s *WAFUnavailableEntityException) OrigErr() error { return nil } -func (s WAFUnavailableEntityException) Error() string { +func (s *WAFUnavailableEntityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WAFUnavailableEntityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WAFUnavailableEntityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WAFUnavailableEntityException) RequestID() string { - return s.respMetadata.RequestID +func (s *WAFUnavailableEntityException) RequestID() string { + return s.RespMetadata.RequestID } // @@ -12782,8 +13978,8 @@ type WebACL struct { // DefaultAction is a required field DefaultAction *DefaultAction `type:"structure" required:"true"` - // A friendly description of the Web ACL. You cannot change the description - // of a Web ACL after you create it. + // A description of the Web ACL that helps with identification. You cannot change + // the description of a Web ACL after you create it. Description *string `min:"1" type:"string"` // A unique identifier for the WebACL. This ID is returned in the responses @@ -12793,12 +13989,39 @@ type WebACL struct { // Id is a required field Id *string `min:"1" type:"string" required:"true"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // Indicates whether this web ACL is managed by AWS Firewall Manager. If true, + // then only AWS Firewall Manager can delete the web ACL or any Firewall Manager + // rule groups in the web ACL. + ManagedByFirewallManager *bool `type:"boolean"` + + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` + // The last set of rules for AWS WAF to process in the web ACL. This is defined + // in an AWS Firewall Manager WAF policy and contains only rule group references. + // You can't alter these. Any rules and rule groups that you define for the + // web ACL are prioritized before these. + // + // In the Firewall Manager WAF policy, the Firewall Manager administrator can + // define a set of rule groups to run first in the web ACL and a set of rule + // groups to run last. Within each set, the administrator prioritizes the rule + // groups, to determine their relative processing order. + PostProcessFirewallManagerRuleGroups []*FirewallManagerRuleGroup `type:"list"` + + // The first set of rules for AWS WAF to process in the web ACL. This is defined + // in an AWS Firewall Manager WAF policy and contains only rule group references. + // You can't alter these. Any rules and rule groups that you define for the + // web ACL are prioritized after these. + // + // In the Firewall Manager WAF policy, the Firewall Manager administrator can + // define a set of rule groups to run first in the web ACL and a set of rule + // groups to run last. Within each set, the administrator prioritizes the rule + // groups, to determine their relative processing order. + PreProcessFirewallManagerRuleGroups []*FirewallManagerRuleGroup `type:"list"` + // The Rule statements used to identify the web requests that you want to allow, // block, or count. Each rule includes one top-level statement that AWS WAF // uses to identify matching web requests, and parameters that govern how AWS @@ -12851,12 +14074,30 @@ func (s *WebACL) SetId(v string) *WebACL { return s } +// SetManagedByFirewallManager sets the ManagedByFirewallManager field's value. +func (s *WebACL) SetManagedByFirewallManager(v bool) *WebACL { + s.ManagedByFirewallManager = &v + return s +} + // SetName sets the Name field's value. func (s *WebACL) SetName(v string) *WebACL { s.Name = &v return s } +// SetPostProcessFirewallManagerRuleGroups sets the PostProcessFirewallManagerRuleGroups field's value. +func (s *WebACL) SetPostProcessFirewallManagerRuleGroups(v []*FirewallManagerRuleGroup) *WebACL { + s.PostProcessFirewallManagerRuleGroups = v + return s +} + +// SetPreProcessFirewallManagerRuleGroups sets the PreProcessFirewallManagerRuleGroups field's value. +func (s *WebACL) SetPreProcessFirewallManagerRuleGroups(v []*FirewallManagerRuleGroup) *WebACL { + s.PreProcessFirewallManagerRuleGroups = v + return s +} + // SetRules sets the Rules field's value. func (s *WebACL) SetRules(v []*Rule) *WebACL { s.Rules = v @@ -12883,8 +14124,8 @@ type WebACLSummary struct { // The Amazon Resource Name (ARN) of the entity. ARN *string `min:"20" type:"string"` - // A friendly description of the Web ACL. You cannot change the description - // of a Web ACL after you create it. + // A description of the Web ACL that helps with identification. You cannot change + // the description of a Web ACL after you create it. Description *string `min:"1" type:"string"` // The unique identifier for the Web ACL. This ID is returned in the responses @@ -12902,8 +14143,8 @@ type WebACLSummary struct { // operation. LockToken *string `min:"1" type:"string"` - // A friendly name of the Web ACL. You cannot change the name of a Web ACL after - // you create it. + // The name of the Web ACL. You cannot change the name of a Web ACL after you + // create it. Name *string `min:"1" type:"string"` } @@ -12971,8 +14212,8 @@ type XssMatchStatement struct { // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass detection. If you specify one // or more transformations in a rule statement, AWS WAF performs all transformations - // on the content identified by FieldToMatch, starting from the lowest priority - // setting, before inspecting the content for a match. + // on the content of the request component identified by FieldToMatch, starting + // from the lowest priority setting, before inspecting the content for a match. // // TextTransformations is a required field TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"` @@ -13922,6 +15163,9 @@ const ( // ParameterExceptionFieldMetricName is a ParameterExceptionField enum value ParameterExceptionFieldMetricName = "METRIC_NAME" + + // ParameterExceptionFieldFirewallManagerStatement is a ParameterExceptionField enum value + ParameterExceptionFieldFirewallManagerStatement = "FIREWALL_MANAGER_STATEMENT" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/wafv2/doc.go index 7ba3ae4f638..04e8ecfdda2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafv2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafv2/doc.go @@ -34,8 +34,8 @@ // WAF features and an overview of how to use AWS WAF, see the AWS WAF Developer // Guide (https://docs.aws.amazon.com/waf/latest/developerguide/). // -// You can make API calls using the endpoints listed in AWS Service Endpoints -// for AWS WAF (https://docs.aws.amazon.com/general/latest/gr/rande.html#waf_region). +// You can make calls using the endpoints listed in AWS Service Endpoints for +// AWS WAF (https://docs.aws.amazon.com/general/latest/gr/rande.html#waf_region). // // * For regional applications, you can use any of the endpoints in the list. // A regional application can be an Application Load Balancer (ALB) or an @@ -56,9 +56,9 @@ // need to distinguish the scope, you specify a Scope parameter and set it // to CLOUDFRONT or REGIONAL. // -// * You can define a Web ACL or rule group with a single API call, and update +// * You can define a Web ACL or rule group with a single call, and update // it with a single call. You define all rule specifications in JSON format, -// and pass them to your rule group or Web ACL API calls. +// and pass them to your rule group or Web ACL calls. // // * The limits AWS WAF places on the use of rules more closely reflects // the cost of running each type of rule. Rule groups include capacity settings, diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafv2/errors.go index e4985c1dfe8..e3d65731f70 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafv2/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafv2/errors.go @@ -29,6 +29,12 @@ const ( // of a system problem. Retry your request. ErrCodeWAFInternalErrorException = "WAFInternalErrorException" + // ErrCodeWAFInvalidOperationException for service response error code + // "WAFInvalidOperationException". + // + // The operation isn't valid. + ErrCodeWAFInvalidOperationException = "WAFInvalidOperationException" + // ErrCodeWAFInvalidParameterException for service response error code // "WAFInvalidParameterException". // @@ -47,6 +53,28 @@ const ( // a resource with which a Web ACL cannot be associated. ErrCodeWAFInvalidParameterException = "WAFInvalidParameterException" + // ErrCodeWAFInvalidPermissionPolicyException for service response error code + // "WAFInvalidPermissionPolicyException". + // + // The operation failed because the specified policy isn't in the proper format. + // + // The policy specifications must conform to the following: + // + // * The policy must be composed using IAM Policy version 2012-10-17 or version + // 2015-01-01. + // + // * The policy must include specifications for Effect, Action, and Principal. + // + // * Effect must specify Allow. + // + // * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups. + // AWS WAF rejects any extra actions or wildcard actions in the policy. + // + // * The policy must not include a Resource parameter. + // + // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). + ErrCodeWAFInvalidPermissionPolicyException = "WAFInvalidPermissionPolicyException" + // ErrCodeWAFInvalidResourceException for service response error code // "WAFInvalidResourceException". // @@ -120,7 +148,9 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "WAFAssociatedItemException": newErrorWAFAssociatedItemException, "WAFDuplicateItemException": newErrorWAFDuplicateItemException, "WAFInternalErrorException": newErrorWAFInternalErrorException, + "WAFInvalidOperationException": newErrorWAFInvalidOperationException, "WAFInvalidParameterException": newErrorWAFInvalidParameterException, + "WAFInvalidPermissionPolicyException": newErrorWAFInvalidPermissionPolicyException, "WAFInvalidResourceException": newErrorWAFInvalidResourceException, "WAFLimitsExceededException": newErrorWAFLimitsExceededException, "WAFNonexistentItemException": newErrorWAFNonexistentItemException, diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go index 201091da1f5..517b093fece 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go @@ -4647,8 +4647,8 @@ func (s *FleetSummary) SetLastUpdatedTime(v time.Time) *FleetSummary { // The service is temporarily unavailable. type InternalServerErrorException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4665,17 +4665,17 @@ func (s InternalServerErrorException) GoString() string { func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { return &InternalServerErrorException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InternalServerErrorException) Code() string { +func (s *InternalServerErrorException) Code() string { return "InternalServerErrorException" } // Message returns the exception's message. -func (s InternalServerErrorException) Message() string { +func (s *InternalServerErrorException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4683,28 +4683,28 @@ func (s InternalServerErrorException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InternalServerErrorException) OrigErr() error { +func (s *InternalServerErrorException) OrigErr() error { return nil } -func (s InternalServerErrorException) Error() string { +func (s *InternalServerErrorException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InternalServerErrorException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InternalServerErrorException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InternalServerErrorException) RequestID() string { - return s.respMetadata.RequestID +func (s *InternalServerErrorException) RequestID() string { + return s.RespMetadata.RequestID } // The request is not valid. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4721,17 +4721,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4739,22 +4739,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } type ListDevicesInput struct { @@ -5237,8 +5237,8 @@ func (s *ListWebsiteCertificateAuthoritiesOutput) SetWebsiteCertificateAuthoriti // The resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5255,17 +5255,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5273,28 +5273,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The requested resource was not found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5311,17 +5311,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5329,22 +5329,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } type RestoreDomainAccessInput struct { @@ -5565,8 +5565,8 @@ func (s SignOutUserOutput) GoString() string { // The number of requests exceeds the limit. type TooManyRequestsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5583,17 +5583,17 @@ func (s TooManyRequestsException) GoString() string { func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { return &TooManyRequestsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyRequestsException) Code() string { +func (s *TooManyRequestsException) Code() string { return "TooManyRequestsException" } // Message returns the exception's message. -func (s TooManyRequestsException) Message() string { +func (s *TooManyRequestsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5601,28 +5601,28 @@ func (s TooManyRequestsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyRequestsException) OrigErr() error { +func (s *TooManyRequestsException) OrigErr() error { return nil } -func (s TooManyRequestsException) Error() string { +func (s *TooManyRequestsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyRequestsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyRequestsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID } // You are not authorized to perform this action. type UnauthorizedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5639,17 +5639,17 @@ func (s UnauthorizedException) GoString() string { func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { return &UnauthorizedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnauthorizedException) Code() string { +func (s *UnauthorizedException) Code() string { return "UnauthorizedException" } // Message returns the exception's message. -func (s UnauthorizedException) Message() string { +func (s *UnauthorizedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5657,22 +5657,22 @@ func (s UnauthorizedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnauthorizedException) OrigErr() error { +func (s *UnauthorizedException) OrigErr() error { return nil } -func (s UnauthorizedException) Error() string { +func (s *UnauthorizedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnauthorizedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnauthorizedException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateAuditStreamConfigurationInput struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/workmail/api.go b/vendor/github.com/aws/aws-sdk-go/service/workmail/api.go index 8d0f2473292..709ad5ea41c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workmail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workmail/api.go @@ -2786,7 +2786,7 @@ func (c *WorkMail) ListOrganizationsRequest(input *ListOrganizationsInput) (req // ListOrganizations API operation for Amazon WorkMail. // -// Returns summaries of the customer's non-deleted organizations. +// Returns summaries of the customer's organizations. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5071,7 +5071,9 @@ type DeleteAccessControlRuleInput struct { Name *string `min:"1" type:"string" required:"true"` // The identifier for the organization. - OrganizationId *string `type:"string"` + // + // OrganizationId is a required field + OrganizationId *string `type:"string" required:"true"` } // String returns the string representation @@ -5093,6 +5095,9 @@ func (s *DeleteAccessControlRuleInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } + if s.OrganizationId == nil { + invalidParams.Add(request.NewErrParamRequired("OrganizationId")) + } if invalidParams.Len() > 0 { return invalidParams @@ -6132,8 +6137,8 @@ func (s *DescribeUserOutput) SetUserRole(v string) *DescribeUserOutput { // The directory service doesn't recognize the credentials supplied by WorkMail. type DirectoryServiceAuthenticationFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6150,17 +6155,17 @@ func (s DirectoryServiceAuthenticationFailedException) GoString() string { func newErrorDirectoryServiceAuthenticationFailedException(v protocol.ResponseMetadata) error { return &DirectoryServiceAuthenticationFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryServiceAuthenticationFailedException) Code() string { +func (s *DirectoryServiceAuthenticationFailedException) Code() string { return "DirectoryServiceAuthenticationFailedException" } // Message returns the exception's message. -func (s DirectoryServiceAuthenticationFailedException) Message() string { +func (s *DirectoryServiceAuthenticationFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6168,28 +6173,28 @@ func (s DirectoryServiceAuthenticationFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryServiceAuthenticationFailedException) OrigErr() error { +func (s *DirectoryServiceAuthenticationFailedException) OrigErr() error { return nil } -func (s DirectoryServiceAuthenticationFailedException) Error() string { +func (s *DirectoryServiceAuthenticationFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryServiceAuthenticationFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryServiceAuthenticationFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryServiceAuthenticationFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryServiceAuthenticationFailedException) RequestID() string { + return s.RespMetadata.RequestID } // The directory on which you are trying to perform operations isn't available. type DirectoryUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6206,17 +6211,17 @@ func (s DirectoryUnavailableException) GoString() string { func newErrorDirectoryUnavailableException(v protocol.ResponseMetadata) error { return &DirectoryUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s DirectoryUnavailableException) Code() string { +func (s *DirectoryUnavailableException) Code() string { return "DirectoryUnavailableException" } // Message returns the exception's message. -func (s DirectoryUnavailableException) Message() string { +func (s *DirectoryUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6224,22 +6229,22 @@ func (s DirectoryUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s DirectoryUnavailableException) OrigErr() error { +func (s *DirectoryUnavailableException) OrigErr() error { return nil } -func (s DirectoryUnavailableException) Error() string { +func (s *DirectoryUnavailableException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s DirectoryUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *DirectoryUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s DirectoryUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *DirectoryUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type DisassociateDelegateFromResourceInput struct { @@ -6415,8 +6420,8 @@ func (s DisassociateMemberFromGroupOutput) GoString() string { // The email address that you're trying to assign is already created for a different // user, group, or resource. type EmailAddressInUseException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6433,17 +6438,17 @@ func (s EmailAddressInUseException) GoString() string { func newErrorEmailAddressInUseException(v protocol.ResponseMetadata) error { return &EmailAddressInUseException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EmailAddressInUseException) Code() string { +func (s *EmailAddressInUseException) Code() string { return "EmailAddressInUseException" } // Message returns the exception's message. -func (s EmailAddressInUseException) Message() string { +func (s *EmailAddressInUseException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6451,28 +6456,28 @@ func (s EmailAddressInUseException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EmailAddressInUseException) OrigErr() error { +func (s *EmailAddressInUseException) OrigErr() error { return nil } -func (s EmailAddressInUseException) Error() string { +func (s *EmailAddressInUseException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EmailAddressInUseException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EmailAddressInUseException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EmailAddressInUseException) RequestID() string { - return s.respMetadata.RequestID +func (s *EmailAddressInUseException) RequestID() string { + return s.RespMetadata.RequestID } // The user, group, or resource that you're trying to register is already registered. type EntityAlreadyRegisteredException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6489,17 +6494,17 @@ func (s EntityAlreadyRegisteredException) GoString() string { func newErrorEntityAlreadyRegisteredException(v protocol.ResponseMetadata) error { return &EntityAlreadyRegisteredException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityAlreadyRegisteredException) Code() string { +func (s *EntityAlreadyRegisteredException) Code() string { return "EntityAlreadyRegisteredException" } // Message returns the exception's message. -func (s EntityAlreadyRegisteredException) Message() string { +func (s *EntityAlreadyRegisteredException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6507,29 +6512,29 @@ func (s EntityAlreadyRegisteredException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityAlreadyRegisteredException) OrigErr() error { +func (s *EntityAlreadyRegisteredException) OrigErr() error { return nil } -func (s EntityAlreadyRegisteredException) Error() string { +func (s *EntityAlreadyRegisteredException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityAlreadyRegisteredException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityAlreadyRegisteredException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityAlreadyRegisteredException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityAlreadyRegisteredException) RequestID() string { + return s.RespMetadata.RequestID } // The identifier supplied for the user, group, or resource does not exist in // your organization. type EntityNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6546,17 +6551,17 @@ func (s EntityNotFoundException) GoString() string { func newErrorEntityNotFoundException(v protocol.ResponseMetadata) error { return &EntityNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityNotFoundException) Code() string { +func (s *EntityNotFoundException) Code() string { return "EntityNotFoundException" } // Message returns the exception's message. -func (s EntityNotFoundException) Message() string { +func (s *EntityNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6564,29 +6569,29 @@ func (s EntityNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityNotFoundException) OrigErr() error { +func (s *EntityNotFoundException) OrigErr() error { return nil } -func (s EntityNotFoundException) Error() string { +func (s *EntityNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // You are performing an operation on a user, group, or resource that isn't // in the expected state, such as trying to delete an active user. type EntityStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6603,17 +6608,17 @@ func (s EntityStateException) GoString() string { func newErrorEntityStateException(v protocol.ResponseMetadata) error { return &EntityStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s EntityStateException) Code() string { +func (s *EntityStateException) Code() string { return "EntityStateException" } // Message returns the exception's message. -func (s EntityStateException) Message() string { +func (s *EntityStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6621,22 +6626,22 @@ func (s EntityStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s EntityStateException) OrigErr() error { +func (s *EntityStateException) OrigErr() error { return nil } -func (s EntityStateException) Error() string { +func (s *EntityStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s EntityStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *EntityStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s EntityStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *EntityStateException) RequestID() string { + return s.RespMetadata.RequestID } type GetAccessControlEffectInput struct { @@ -6922,8 +6927,8 @@ func (s *Group) SetState(v string) *Group { // to auto-respond to requests or have at least one delegate associated that // can do so on its behalf. type InvalidConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6940,17 +6945,17 @@ func (s InvalidConfigurationException) GoString() string { func newErrorInvalidConfigurationException(v protocol.ResponseMetadata) error { return &InvalidConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidConfigurationException) Code() string { +func (s *InvalidConfigurationException) Code() string { return "InvalidConfigurationException" } // Message returns the exception's message. -func (s InvalidConfigurationException) Message() string { +func (s *InvalidConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6958,28 +6963,28 @@ func (s InvalidConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidConfigurationException) OrigErr() error { +func (s *InvalidConfigurationException) OrigErr() error { return nil } -func (s InvalidConfigurationException) Error() string { +func (s *InvalidConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // One or more of the input parameters don't match the service's restrictions. type InvalidParameterException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -6996,17 +7001,17 @@ func (s InvalidParameterException) GoString() string { func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { return &InvalidParameterException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterException) Code() string { +func (s *InvalidParameterException) Code() string { return "InvalidParameterException" } // Message returns the exception's message. -func (s InvalidParameterException) Message() string { +func (s *InvalidParameterException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7014,29 +7019,29 @@ func (s InvalidParameterException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterException) OrigErr() error { +func (s *InvalidParameterException) OrigErr() error { return nil } -func (s InvalidParameterException) Error() string { +func (s *InvalidParameterException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterException) RequestID() string { + return s.RespMetadata.RequestID } // The supplied password doesn't match the minimum security constraints, such // as length or use of special characters. type InvalidPasswordException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7053,17 +7058,17 @@ func (s InvalidPasswordException) GoString() string { func newErrorInvalidPasswordException(v protocol.ResponseMetadata) error { return &InvalidPasswordException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidPasswordException) Code() string { +func (s *InvalidPasswordException) Code() string { return "InvalidPasswordException" } // Message returns the exception's message. -func (s InvalidPasswordException) Message() string { +func (s *InvalidPasswordException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7071,28 +7076,28 @@ func (s InvalidPasswordException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidPasswordException) OrigErr() error { +func (s *InvalidPasswordException) OrigErr() error { return nil } -func (s InvalidPasswordException) Error() string { +func (s *InvalidPasswordException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidPasswordException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidPasswordException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidPasswordException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidPasswordException) RequestID() string { + return s.RespMetadata.RequestID } // The request exceeds the limit of the resource. type LimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -7109,17 +7114,17 @@ func (s LimitExceededException) GoString() string { func newErrorLimitExceededException(v protocol.ResponseMetadata) error { return &LimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s LimitExceededException) Code() string { +func (s *LimitExceededException) Code() string { return "LimitExceededException" } // Message returns the exception's message. -func (s LimitExceededException) Message() string { +func (s *LimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7127,22 +7132,22 @@ func (s LimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s LimitExceededException) OrigErr() error { +func (s *LimitExceededException) OrigErr() error { return nil } -func (s LimitExceededException) Error() string { +func (s *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s LimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *LimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s LimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *LimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } type ListAccessControlRulesInput struct { @@ -8099,8 +8104,8 @@ func (s *ListUsersOutput) SetUsers(v []*User) *ListUsersOutput { // For an email or alias to be created in Amazon WorkMail, the included domain // must be defined in the organization. type MailDomainNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8117,17 +8122,17 @@ func (s MailDomainNotFoundException) GoString() string { func newErrorMailDomainNotFoundException(v protocol.ResponseMetadata) error { return &MailDomainNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MailDomainNotFoundException) Code() string { +func (s *MailDomainNotFoundException) Code() string { return "MailDomainNotFoundException" } // Message returns the exception's message. -func (s MailDomainNotFoundException) Message() string { +func (s *MailDomainNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8135,29 +8140,29 @@ func (s MailDomainNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MailDomainNotFoundException) OrigErr() error { +func (s *MailDomainNotFoundException) OrigErr() error { return nil } -func (s MailDomainNotFoundException) Error() string { +func (s *MailDomainNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MailDomainNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MailDomainNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MailDomainNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *MailDomainNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // After a domain has been added to the organization, it must be verified. The // domain is not yet verified. type MailDomainStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8174,17 +8179,17 @@ func (s MailDomainStateException) GoString() string { func newErrorMailDomainStateException(v protocol.ResponseMetadata) error { return &MailDomainStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s MailDomainStateException) Code() string { +func (s *MailDomainStateException) Code() string { return "MailDomainStateException" } // Message returns the exception's message. -func (s MailDomainStateException) Message() string { +func (s *MailDomainStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8192,22 +8197,22 @@ func (s MailDomainStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s MailDomainStateException) OrigErr() error { +func (s *MailDomainStateException) OrigErr() error { return nil } -func (s MailDomainStateException) Error() string { +func (s *MailDomainStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s MailDomainStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *MailDomainStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s MailDomainStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *MailDomainStateException) RequestID() string { + return s.RespMetadata.RequestID } // The representation of a user or group. @@ -8281,8 +8286,8 @@ func (s *Member) SetType(v string) *Member { // The user, group, or resource name isn't unique in Amazon WorkMail. type NameAvailabilityException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8299,17 +8304,17 @@ func (s NameAvailabilityException) GoString() string { func newErrorNameAvailabilityException(v protocol.ResponseMetadata) error { return &NameAvailabilityException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s NameAvailabilityException) Code() string { +func (s *NameAvailabilityException) Code() string { return "NameAvailabilityException" } // Message returns the exception's message. -func (s NameAvailabilityException) Message() string { +func (s *NameAvailabilityException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8317,29 +8322,29 @@ func (s NameAvailabilityException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s NameAvailabilityException) OrigErr() error { +func (s *NameAvailabilityException) OrigErr() error { return nil } -func (s NameAvailabilityException) Error() string { +func (s *NameAvailabilityException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s NameAvailabilityException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *NameAvailabilityException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s NameAvailabilityException) RequestID() string { - return s.respMetadata.RequestID +func (s *NameAvailabilityException) RequestID() string { + return s.RespMetadata.RequestID } // An operation received a valid organization identifier that either doesn't // belong or exist in the system. type OrganizationNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8356,17 +8361,17 @@ func (s OrganizationNotFoundException) GoString() string { func newErrorOrganizationNotFoundException(v protocol.ResponseMetadata) error { return &OrganizationNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationNotFoundException) Code() string { +func (s *OrganizationNotFoundException) Code() string { return "OrganizationNotFoundException" } // Message returns the exception's message. -func (s OrganizationNotFoundException) Message() string { +func (s *OrganizationNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8374,29 +8379,29 @@ func (s OrganizationNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationNotFoundException) OrigErr() error { +func (s *OrganizationNotFoundException) OrigErr() error { return nil } -func (s OrganizationNotFoundException) Error() string { +func (s *OrganizationNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The organization must have a valid state (Active or Synchronizing) to perform // certain operations on the organization or its members. type OrganizationStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8413,17 +8418,17 @@ func (s OrganizationStateException) GoString() string { func newErrorOrganizationStateException(v protocol.ResponseMetadata) error { return &OrganizationStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OrganizationStateException) Code() string { +func (s *OrganizationStateException) Code() string { return "OrganizationStateException" } // Message returns the exception's message. -func (s OrganizationStateException) Message() string { +func (s *OrganizationStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8431,22 +8436,22 @@ func (s OrganizationStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OrganizationStateException) OrigErr() error { +func (s *OrganizationStateException) OrigErr() error { return nil } -func (s OrganizationStateException) Error() string { +func (s *OrganizationStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OrganizationStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OrganizationStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OrganizationStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *OrganizationStateException) RequestID() string { + return s.RespMetadata.RequestID } // The representation of an organization. @@ -8906,8 +8911,8 @@ func (s RegisterToWorkMailOutput) GoString() string { // This user, group, or resource name is not allowed in Amazon WorkMail. type ReservedNameException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -8924,17 +8929,17 @@ func (s ReservedNameException) GoString() string { func newErrorReservedNameException(v protocol.ResponseMetadata) error { return &ReservedNameException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ReservedNameException) Code() string { +func (s *ReservedNameException) Code() string { return "ReservedNameException" } // Message returns the exception's message. -func (s ReservedNameException) Message() string { +func (s *ReservedNameException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8942,22 +8947,22 @@ func (s ReservedNameException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ReservedNameException) OrigErr() error { +func (s *ReservedNameException) OrigErr() error { return nil } -func (s ReservedNameException) Error() string { +func (s *ReservedNameException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ReservedNameException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ReservedNameException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ReservedNameException) RequestID() string { - return s.respMetadata.RequestID +func (s *ReservedNameException) RequestID() string { + return s.RespMetadata.RequestID } type ResetPasswordInput struct { @@ -9124,8 +9129,8 @@ func (s *Resource) SetType(v string) *Resource { // The resource cannot be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -9142,17 +9147,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9160,22 +9165,22 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a tag applied to a resource. @@ -9315,8 +9320,8 @@ func (s TagResourceOutput) GoString() string { // The resource can have up to 50 user-applied tags. type TooManyTagsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -9333,17 +9338,17 @@ func (s TooManyTagsException) GoString() string { func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { return &TooManyTagsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s TooManyTagsException) Code() string { +func (s *TooManyTagsException) Code() string { return "TooManyTagsException" } // Message returns the exception's message. -func (s TooManyTagsException) Message() string { +func (s *TooManyTagsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9351,28 +9356,28 @@ func (s TooManyTagsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s TooManyTagsException) OrigErr() error { +func (s *TooManyTagsException) OrigErr() error { return nil } -func (s TooManyTagsException) Error() string { +func (s *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s TooManyTagsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s TooManyTagsException) RequestID() string { - return s.respMetadata.RequestID +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID } // You can't perform a write operation against a read-only directory. type UnsupportedOperationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -9389,17 +9394,17 @@ func (s UnsupportedOperationException) GoString() string { func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { return &UnsupportedOperationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedOperationException) Code() string { +func (s *UnsupportedOperationException) Code() string { return "UnsupportedOperationException" } // Message returns the exception's message. -func (s UnsupportedOperationException) Message() string { +func (s *UnsupportedOperationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9407,22 +9412,22 @@ func (s UnsupportedOperationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedOperationException) OrigErr() error { +func (s *UnsupportedOperationException) OrigErr() error { return nil } -func (s UnsupportedOperationException) Error() string { +func (s *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedOperationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedOperationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedOperationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedOperationException) RequestID() string { + return s.RespMetadata.RequestID } type UntagResourceInput struct { 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 5ec35c9e415..16866ca6bec 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 @@ -3796,8 +3796,8 @@ func (c *WorkSpaces) UpdateRulesOfIpGroupWithContext(ctx aws.Context, input *Upd // The user is not authorized to access a resource. type AccessDeniedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -3814,17 +3814,17 @@ func (s AccessDeniedException) GoString() string { func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { return &AccessDeniedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s AccessDeniedException) Code() string { +func (s *AccessDeniedException) Code() string { return "AccessDeniedException" } // Message returns the exception's message. -func (s AccessDeniedException) Message() string { +func (s *AccessDeniedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -3832,22 +3832,22 @@ func (s AccessDeniedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s AccessDeniedException) OrigErr() error { +func (s *AccessDeniedException) OrigErr() error { return nil } -func (s AccessDeniedException) Error() string { +func (s *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s AccessDeniedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s AccessDeniedException) RequestID() string { - return s.respMetadata.RequestID +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } // Describes a modification to the configuration of Bring Your Own License (BYOL) @@ -6055,8 +6055,8 @@ func (s *ImportWorkspaceImageOutput) SetImageId(v string) *ImportWorkspaceImageO // One or more parameter values are not valid. type InvalidParameterValuesException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception error message. Message_ *string `locationName:"message" type:"string"` @@ -6074,17 +6074,17 @@ func (s InvalidParameterValuesException) GoString() string { func newErrorInvalidParameterValuesException(v protocol.ResponseMetadata) error { return &InvalidParameterValuesException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidParameterValuesException) Code() string { +func (s *InvalidParameterValuesException) Code() string { return "InvalidParameterValuesException" } // Message returns the exception's message. -func (s InvalidParameterValuesException) Message() string { +func (s *InvalidParameterValuesException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6092,28 +6092,28 @@ func (s InvalidParameterValuesException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidParameterValuesException) OrigErr() error { +func (s *InvalidParameterValuesException) OrigErr() error { return nil } -func (s InvalidParameterValuesException) Error() string { +func (s *InvalidParameterValuesException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidParameterValuesException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidParameterValuesException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidParameterValuesException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidParameterValuesException) RequestID() string { + return s.RespMetadata.RequestID } // The state of the resource is not valid for this operation. type InvalidResourceStateException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6130,17 +6130,17 @@ func (s InvalidResourceStateException) GoString() string { func newErrorInvalidResourceStateException(v protocol.ResponseMetadata) error { return &InvalidResourceStateException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidResourceStateException) Code() string { +func (s *InvalidResourceStateException) Code() string { return "InvalidResourceStateException" } // Message returns the exception's message. -func (s InvalidResourceStateException) Message() string { +func (s *InvalidResourceStateException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6148,22 +6148,22 @@ func (s InvalidResourceStateException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidResourceStateException) OrigErr() error { +func (s *InvalidResourceStateException) OrigErr() error { return nil } -func (s InvalidResourceStateException) Error() string { +func (s *InvalidResourceStateException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidResourceStateException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidResourceStateException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidResourceStateException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidResourceStateException) RequestID() string { + return s.RespMetadata.RequestID } // Describes an IP access control group. @@ -6958,8 +6958,8 @@ func (s *OperatingSystem) SetType(v string) *OperatingSystem { // The properties of this WorkSpace are currently being modified. Try again // in a moment. type OperationInProgressException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -6976,17 +6976,17 @@ func (s OperationInProgressException) GoString() string { func newErrorOperationInProgressException(v protocol.ResponseMetadata) error { return &OperationInProgressException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationInProgressException) Code() string { +func (s *OperationInProgressException) Code() string { return "OperationInProgressException" } // Message returns the exception's message. -func (s OperationInProgressException) Message() string { +func (s *OperationInProgressException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -6994,28 +6994,28 @@ func (s OperationInProgressException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationInProgressException) OrigErr() error { +func (s *OperationInProgressException) OrigErr() error { return nil } -func (s OperationInProgressException) Error() string { +func (s *OperationInProgressException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationInProgressException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationInProgressException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationInProgressException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationInProgressException) RequestID() string { + return s.RespMetadata.RequestID } // This operation is not supported. type OperationNotSupportedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7032,17 +7032,17 @@ func (s OperationNotSupportedException) GoString() string { func newErrorOperationNotSupportedException(v protocol.ResponseMetadata) error { return &OperationNotSupportedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s OperationNotSupportedException) Code() string { +func (s *OperationNotSupportedException) Code() string { return "OperationNotSupportedException" } // Message returns the exception's message. -func (s OperationNotSupportedException) Message() string { +func (s *OperationNotSupportedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7050,22 +7050,22 @@ func (s OperationNotSupportedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s OperationNotSupportedException) OrigErr() error { +func (s *OperationNotSupportedException) OrigErr() error { return nil } -func (s OperationNotSupportedException) Error() string { +func (s *OperationNotSupportedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s OperationNotSupportedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *OperationNotSupportedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s OperationNotSupportedException) RequestID() string { - return s.respMetadata.RequestID +func (s *OperationNotSupportedException) RequestID() string { + return s.RespMetadata.RequestID } // Describes the information used to reboot a WorkSpace. @@ -7427,8 +7427,8 @@ func (s RegisterWorkspaceDirectoryOutput) GoString() string { // The specified resource already exists. type ResourceAlreadyExistsException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7445,17 +7445,17 @@ func (s ResourceAlreadyExistsException) GoString() string { func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { return &ResourceAlreadyExistsException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAlreadyExistsException) Code() string { +func (s *ResourceAlreadyExistsException) Code() string { return "ResourceAlreadyExistsException" } // Message returns the exception's message. -func (s ResourceAlreadyExistsException) Message() string { +func (s *ResourceAlreadyExistsException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7463,28 +7463,28 @@ func (s ResourceAlreadyExistsException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAlreadyExistsException) OrigErr() error { +func (s *ResourceAlreadyExistsException) OrigErr() error { return nil } -func (s ResourceAlreadyExistsException) Error() string { +func (s *ResourceAlreadyExistsException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAlreadyExistsException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAlreadyExistsException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAlreadyExistsException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAlreadyExistsException) RequestID() string { + return s.RespMetadata.RequestID } // The resource is associated with a directory. type ResourceAssociatedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7501,17 +7501,17 @@ func (s ResourceAssociatedException) GoString() string { func newErrorResourceAssociatedException(v protocol.ResponseMetadata) error { return &ResourceAssociatedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceAssociatedException) Code() string { +func (s *ResourceAssociatedException) Code() string { return "ResourceAssociatedException" } // Message returns the exception's message. -func (s ResourceAssociatedException) Message() string { +func (s *ResourceAssociatedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7519,28 +7519,28 @@ func (s ResourceAssociatedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceAssociatedException) OrigErr() error { +func (s *ResourceAssociatedException) OrigErr() error { return nil } -func (s ResourceAssociatedException) Error() string { +func (s *ResourceAssociatedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceAssociatedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceAssociatedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceAssociatedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceAssociatedException) RequestID() string { + return s.RespMetadata.RequestID } // The resource could not be created. type ResourceCreationFailedException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -7557,17 +7557,17 @@ func (s ResourceCreationFailedException) GoString() string { func newErrorResourceCreationFailedException(v protocol.ResponseMetadata) error { return &ResourceCreationFailedException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceCreationFailedException) Code() string { +func (s *ResourceCreationFailedException) Code() string { return "ResourceCreationFailedException" } // Message returns the exception's message. -func (s ResourceCreationFailedException) Message() string { +func (s *ResourceCreationFailedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7575,28 +7575,28 @@ func (s ResourceCreationFailedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceCreationFailedException) OrigErr() error { +func (s *ResourceCreationFailedException) OrigErr() error { return nil } -func (s ResourceCreationFailedException) Error() string { +func (s *ResourceCreationFailedException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceCreationFailedException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceCreationFailedException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceCreationFailedException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceCreationFailedException) RequestID() string { + return s.RespMetadata.RequestID } // Your resource limits have been exceeded. type ResourceLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception error message. Message_ *string `locationName:"message" type:"string"` @@ -7614,17 +7614,17 @@ func (s ResourceLimitExceededException) GoString() string { func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { return &ResourceLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceLimitExceededException) Code() string { +func (s *ResourceLimitExceededException) Code() string { return "ResourceLimitExceededException" } // Message returns the exception's message. -func (s ResourceLimitExceededException) Message() string { +func (s *ResourceLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7632,28 +7632,28 @@ func (s ResourceLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceLimitExceededException) OrigErr() error { +func (s *ResourceLimitExceededException) OrigErr() error { return nil } -func (s ResourceLimitExceededException) Error() string { +func (s *ResourceLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // The resource could not be found. type ResourceNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The resource could not be found. Message_ *string `locationName:"message" type:"string"` @@ -7674,17 +7674,17 @@ func (s ResourceNotFoundException) GoString() string { func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { return &ResourceNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceNotFoundException) Code() string { +func (s *ResourceNotFoundException) Code() string { return "ResourceNotFoundException" } // Message returns the exception's message. -func (s ResourceNotFoundException) Message() string { +func (s *ResourceNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7692,28 +7692,28 @@ func (s ResourceNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceNotFoundException) OrigErr() error { +func (s *ResourceNotFoundException) OrigErr() error { return nil } -func (s ResourceNotFoundException) Error() string { +func (s *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } // The specified resource is not available. type ResourceUnavailableException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` // The exception error message. Message_ *string `locationName:"message" type:"string"` @@ -7734,17 +7734,17 @@ func (s ResourceUnavailableException) GoString() string { func newErrorResourceUnavailableException(v protocol.ResponseMetadata) error { return &ResourceUnavailableException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ResourceUnavailableException) Code() string { +func (s *ResourceUnavailableException) Code() string { return "ResourceUnavailableException" } // Message returns the exception's message. -func (s ResourceUnavailableException) Message() string { +func (s *ResourceUnavailableException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -7752,22 +7752,22 @@ func (s ResourceUnavailableException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ResourceUnavailableException) OrigErr() error { +func (s *ResourceUnavailableException) OrigErr() error { return nil } -func (s ResourceUnavailableException) Error() string { +func (s *ResourceUnavailableException) Error() string { return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s ResourceUnavailableException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ResourceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ResourceUnavailableException) RequestID() string { - return s.respMetadata.RequestID +func (s *ResourceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type RestoreWorkspaceInput struct { @@ -8345,8 +8345,8 @@ func (s *TerminateWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChange // network IP range. For more information, see Configure a VPC for Amazon WorkSpaces // (https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-vpc.html). type UnsupportedNetworkConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8363,17 +8363,17 @@ func (s UnsupportedNetworkConfigurationException) GoString() string { func newErrorUnsupportedNetworkConfigurationException(v protocol.ResponseMetadata) error { return &UnsupportedNetworkConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedNetworkConfigurationException) Code() string { +func (s *UnsupportedNetworkConfigurationException) Code() string { return "UnsupportedNetworkConfigurationException" } // Message returns the exception's message. -func (s UnsupportedNetworkConfigurationException) Message() string { +func (s *UnsupportedNetworkConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8381,30 +8381,30 @@ func (s UnsupportedNetworkConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedNetworkConfigurationException) OrigErr() error { +func (s *UnsupportedNetworkConfigurationException) OrigErr() error { return nil } -func (s UnsupportedNetworkConfigurationException) Error() string { +func (s *UnsupportedNetworkConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedNetworkConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedNetworkConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedNetworkConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedNetworkConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } // The configuration of this WorkSpace is not supported for this operation. // For more information, see Required Configuration and Service Components for // WorkSpaces (https://docs.aws.amazon.com/workspaces/latest/adminguide/required-service-components.html). type UnsupportedWorkspaceConfigurationException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -8421,17 +8421,17 @@ func (s UnsupportedWorkspaceConfigurationException) GoString() string { func newErrorUnsupportedWorkspaceConfigurationException(v protocol.ResponseMetadata) error { return &UnsupportedWorkspaceConfigurationException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s UnsupportedWorkspaceConfigurationException) Code() string { +func (s *UnsupportedWorkspaceConfigurationException) Code() string { return "UnsupportedWorkspaceConfigurationException" } // Message returns the exception's message. -func (s UnsupportedWorkspaceConfigurationException) Message() string { +func (s *UnsupportedWorkspaceConfigurationException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -8439,22 +8439,22 @@ func (s UnsupportedWorkspaceConfigurationException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s UnsupportedWorkspaceConfigurationException) OrigErr() error { +func (s *UnsupportedWorkspaceConfigurationException) OrigErr() error { return nil } -func (s UnsupportedWorkspaceConfigurationException) Error() string { +func (s *UnsupportedWorkspaceConfigurationException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s UnsupportedWorkspaceConfigurationException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *UnsupportedWorkspaceConfigurationException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s UnsupportedWorkspaceConfigurationException) RequestID() string { - return s.respMetadata.RequestID +func (s *UnsupportedWorkspaceConfigurationException) RequestID() string { + return s.RespMetadata.RequestID } type UpdateRulesOfIpGroupInput struct { @@ -9459,8 +9459,8 @@ func (s *WorkspaceRequest) SetWorkspaceProperties(v *WorkspaceProperties) *Works // role before you can register a directory. For more information, see Creating // the workspaces_DefaultRole Role (https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html#create-default-role). type WorkspacesDefaultRoleNotFoundException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` } @@ -9477,17 +9477,17 @@ func (s WorkspacesDefaultRoleNotFoundException) GoString() string { func newErrorWorkspacesDefaultRoleNotFoundException(v protocol.ResponseMetadata) error { return &WorkspacesDefaultRoleNotFoundException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s WorkspacesDefaultRoleNotFoundException) Code() string { +func (s *WorkspacesDefaultRoleNotFoundException) Code() string { return "WorkspacesDefaultRoleNotFoundException" } // Message returns the exception's message. -func (s WorkspacesDefaultRoleNotFoundException) Message() string { +func (s *WorkspacesDefaultRoleNotFoundException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -9495,22 +9495,22 @@ func (s WorkspacesDefaultRoleNotFoundException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s WorkspacesDefaultRoleNotFoundException) OrigErr() error { +func (s *WorkspacesDefaultRoleNotFoundException) OrigErr() error { return nil } -func (s WorkspacesDefaultRoleNotFoundException) Error() string { +func (s *WorkspacesDefaultRoleNotFoundException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s WorkspacesDefaultRoleNotFoundException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *WorkspacesDefaultRoleNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s WorkspacesDefaultRoleNotFoundException) RequestID() string { - return s.respMetadata.RequestID +func (s *WorkspacesDefaultRoleNotFoundException) RequestID() string { + return s.RespMetadata.RequestID } const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/xray/api.go b/vendor/github.com/aws/aws-sdk-go/service/xray/api.go index cdd6fd1f926..9092ddb1b4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/xray/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/xray/api.go @@ -2893,6 +2893,9 @@ func (s *EncryptionConfig) SetType(v string) *EncryptionConfig { type ErrorRootCause struct { _ struct{} `type:"structure"` + // A flag that denotes that the root cause impacts the trace client. + ClientImpacting *bool `type:"boolean"` + // A list of services corresponding to an error. A service identifies a segment // and it contains a name, account ID, type, and inferred flag. Services []*ErrorRootCauseService `type:"list"` @@ -2908,6 +2911,12 @@ func (s ErrorRootCause) GoString() string { return s.String() } +// SetClientImpacting sets the ClientImpacting field's value. +func (s *ErrorRootCause) SetClientImpacting(v bool) *ErrorRootCause { + s.ClientImpacting = &v + return s +} + // SetServices sets the Services field's value. func (s *ErrorRootCause) SetServices(v []*ErrorRootCauseService) *ErrorRootCause { s.Services = v @@ -3073,6 +3082,9 @@ func (s *ErrorStatistics) SetTotalCount(v int64) *ErrorStatistics { type FaultRootCause struct { _ struct{} `type:"structure"` + // A flag that denotes that the root cause impacts the trace client. + ClientImpacting *bool `type:"boolean"` + // A list of corresponding services. A service identifies a segment and it contains // a name, account ID, type, and inferred flag. Services []*FaultRootCauseService `type:"list"` @@ -3088,6 +3100,12 @@ func (s FaultRootCause) GoString() string { return s.String() } +// SetClientImpacting sets the ClientImpacting field's value. +func (s *FaultRootCause) SetClientImpacting(v bool) *FaultRootCause { + s.ClientImpacting = &v + return s +} + // SetServices sets the Services field's value. func (s *FaultRootCause) SetServices(v []*FaultRootCauseService) *FaultRootCause { s.Services = v @@ -4354,8 +4372,8 @@ func (s *InstanceIdDetail) SetId(v string) *InstanceIdDetail { // The request is missing required parameters or has invalid parameters. type InvalidRequestException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4372,17 +4390,17 @@ func (s InvalidRequestException) GoString() string { func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { return &InvalidRequestException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s InvalidRequestException) Code() string { +func (s *InvalidRequestException) Code() string { return "InvalidRequestException" } // Message returns the exception's message. -func (s InvalidRequestException) Message() string { +func (s *InvalidRequestException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4390,22 +4408,22 @@ func (s InvalidRequestException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s InvalidRequestException) OrigErr() error { +func (s *InvalidRequestException) OrigErr() error { return nil } -func (s InvalidRequestException) Error() string { +func (s *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s InvalidRequestException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s InvalidRequestException) RequestID() string { - return s.respMetadata.RequestID +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID } type PutEncryptionConfigInput struct { @@ -4666,6 +4684,9 @@ func (s *ResourceARNDetail) SetARN(v string) *ResourceARNDetail { type ResponseTimeRootCause struct { _ struct{} `type:"structure"` + // A flag that denotes that the root cause impacts the trace client. + ClientImpacting *bool `type:"boolean"` + // A list of corresponding services. A service identifies a segment and contains // a name, account ID, type, and inferred flag. Services []*ResponseTimeRootCauseService `type:"list"` @@ -4681,6 +4702,12 @@ func (s ResponseTimeRootCause) GoString() string { return s.String() } +// SetClientImpacting sets the ClientImpacting field's value. +func (s *ResponseTimeRootCause) SetClientImpacting(v bool) *ResponseTimeRootCause { + s.ClientImpacting = &v + return s +} + // SetServices sets the Services field's value. func (s *ResponseTimeRootCause) SetServices(v []*ResponseTimeRootCauseService) *ResponseTimeRootCause { s.Services = v @@ -4834,8 +4861,8 @@ func (s *RootCauseException) SetName(v string) *RootCauseException { // You have reached the maximum number of sampling rules. type RuleLimitExceededException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -4852,17 +4879,17 @@ func (s RuleLimitExceededException) GoString() string { func newErrorRuleLimitExceededException(v protocol.ResponseMetadata) error { return &RuleLimitExceededException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s RuleLimitExceededException) Code() string { +func (s *RuleLimitExceededException) Code() string { return "RuleLimitExceededException" } // Message returns the exception's message. -func (s RuleLimitExceededException) Message() string { +func (s *RuleLimitExceededException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -4870,22 +4897,22 @@ func (s RuleLimitExceededException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s RuleLimitExceededException) OrigErr() error { +func (s *RuleLimitExceededException) OrigErr() error { return nil } -func (s RuleLimitExceededException) Error() string { +func (s *RuleLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s RuleLimitExceededException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *RuleLimitExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s RuleLimitExceededException) RequestID() string { - return s.respMetadata.RequestID +func (s *RuleLimitExceededException) RequestID() string { + return s.RespMetadata.RequestID } // A sampling rule that services use to decide whether to instrument a request. @@ -5918,8 +5945,8 @@ func (s *TelemetryRecord) SetTimestamp(v time.Time) *TelemetryRecord { // The request exceeds the maximum number of requests per second. type ThrottledException struct { - _ struct{} `type:"structure"` - respMetadata protocol.ResponseMetadata + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"Message" type:"string"` } @@ -5936,17 +5963,17 @@ func (s ThrottledException) GoString() string { func newErrorThrottledException(v protocol.ResponseMetadata) error { return &ThrottledException{ - respMetadata: v, + RespMetadata: v, } } // Code returns the exception type name. -func (s ThrottledException) Code() string { +func (s *ThrottledException) Code() string { return "ThrottledException" } // Message returns the exception's message. -func (s ThrottledException) Message() string { +func (s *ThrottledException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -5954,22 +5981,22 @@ func (s ThrottledException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s ThrottledException) OrigErr() error { +func (s *ThrottledException) OrigErr() error { return nil } -func (s ThrottledException) Error() string { +func (s *ThrottledException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s ThrottledException) StatusCode() int { - return s.respMetadata.StatusCode +func (s *ThrottledException) StatusCode() int { + return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s ThrottledException) RequestID() string { - return s.respMetadata.RequestID +func (s *ThrottledException) RequestID() string { + return s.RespMetadata.RequestID } // A list of TimeSeriesStatistic structures. diff --git a/vendor/github.com/bflad/tfproviderdocs/.gitignore b/vendor/github.com/bflad/tfproviderdocs/.gitignore index 560afc14739..b7c5ec8050d 100644 --- a/vendor/github.com/bflad/tfproviderdocs/.gitignore +++ b/vendor/github.com/bflad/tfproviderdocs/.gitignore @@ -3,3 +3,4 @@ .idea/ .vscode/ dist/ +RELEASE-NOTES.md diff --git a/vendor/github.com/bflad/tfproviderdocs/CHANGELOG.md b/vendor/github.com/bflad/tfproviderdocs/CHANGELOG.md index 9837e0408d9..07ac77c6bc2 100644 --- a/vendor/github.com/bflad/tfproviderdocs/CHANGELOG.md +++ b/vendor/github.com/bflad/tfproviderdocs/CHANGELOG.md @@ -1,3 +1,28 @@ +# v0.6.0 + +ENHANCEMENTS + +* check: Add `-ignore-file-mismatch-data-sources` option +* check: Add `-ignore-file-mismatch-resources` option +* check: Add `-ignore-file-missing-data-sources` option +* check: Add `-ignore-file-missing-resources` option + +# v0.5.3 + +BUG FIXES + +* check: Prevent additional errors when `docs/` contains files outside Terraform Provider documentation + +# v0.5.2 + +BUG FIXES + +* check: Prevent `mixed Terraform Provider documentation directory layouts found` error when using `website/docs` and `docs/` contains files outside Terraform Provider documentation + +# v0.5.1 + +Released without changes. + # v0.5.0 ENHANCEMENTS diff --git a/vendor/github.com/bflad/tfproviderdocs/README.md b/vendor/github.com/bflad/tfproviderdocs/README.md index f2c38394d5c..4bc2d0ac687 100644 --- a/vendor/github.com/bflad/tfproviderdocs/README.md +++ b/vendor/github.com/bflad/tfproviderdocs/README.md @@ -58,6 +58,7 @@ The `tfproviderdocs check` command verifies the Terraform Provider documentation - Verifies that no invalid directories are found in the documentation directory structure. - Ensures that there is not a mix (legacy and Terraform Registry) of directory structures, which is not supported during Terraform Registry documentation ingress. +- Verifies side navigation for missing links and mismatched link text (if legacy directory structure). - Verifies number of documentation files is below Terraform Registry storage limits. - Verifies all known data sources and resources have an associated documentation file (if `-providers-schema-json` is provided) - Verifies no extraneous or incorrectly named documentation files exist (if `-providers-schema-json` is provided) diff --git a/vendor/github.com/bflad/tfproviderdocs/check/check.go b/vendor/github.com/bflad/tfproviderdocs/check/check.go index fabca3661d3..d29be21cc68 100644 --- a/vendor/github.com/bflad/tfproviderdocs/check/check.go +++ b/vendor/github.com/bflad/tfproviderdocs/check/check.go @@ -4,7 +4,6 @@ import ( "sort" "github.com/hashicorp/go-multierror" - tfjson "github.com/hashicorp/terraform-json" ) const ( @@ -22,6 +21,8 @@ type Check struct { } type CheckOptions struct { + DataSourceFileMismatch *FileMismatchOptions + LegacyDataSourceFile *LegacyDataSourceFileOptions LegacyGuideFile *LegacyGuideFileOptions LegacyIndexFile *LegacyIndexFileOptions @@ -34,8 +35,7 @@ type CheckOptions struct { RegistryIndexFile *RegistryIndexFileOptions RegistryResourceFile *RegistryResourceFileOptions - SchemaDataSources map[string]*tfjson.Schema - SchemaResources map[string]*tfjson.Schema + ResourceFileMismatch *FileMismatchOptions SideNavigation *SideNavigationOptions } @@ -65,37 +65,13 @@ func (check *Check) Run(directories map[string][]string) error { return err } - if len(check.Options.SchemaDataSources) > 0 && false { - var dataSourceFiles []string - - if files, ok := directories[RegistryDataSourcesDirectory]; ok { - dataSourceFiles = files - } else if files, ok := directories[LegacyDataSourcesDirectory]; ok { - dataSourceFiles = files - } - - if err := ResourceFileMismatchCheck(check.Options.ProviderName, ResourceTypeDataSource, check.Options.SchemaDataSources, dataSourceFiles); err != nil { - return err - } - } - - if len(check.Options.SchemaResources) > 0 { - var resourceFiles []string - - if files, ok := directories[RegistryResourcesDirectory]; ok { - resourceFiles = files - } else if files, ok := directories[LegacyResourcesDirectory]; ok { - resourceFiles = files - } - - if err := ResourceFileMismatchCheck(check.Options.ProviderName, ResourceTypeResource, check.Options.SchemaResources, resourceFiles); err != nil { - return err - } - } - var result *multierror.Error if files, ok := directories[RegistryDataSourcesDirectory]; ok { + if err := NewFileMismatchCheck(check.Options.DataSourceFileMismatch).Run(files); err != nil { + result = multierror.Append(result, err) + } + if err := NewRegistryDataSourceFileCheck(check.Options.RegistryDataSourceFile).RunAll(files); err != nil { result = multierror.Append(result, err) } @@ -114,6 +90,10 @@ func (check *Check) Run(directories map[string][]string) error { } if files, ok := directories[RegistryResourcesDirectory]; ok { + if err := NewFileMismatchCheck(check.Options.ResourceFileMismatch).Run(files); err != nil { + result = multierror.Append(result, err) + } + if err := NewRegistryResourceFileCheck(check.Options.RegistryResourceFile).RunAll(files); err != nil { result = multierror.Append(result, err) } @@ -123,6 +103,10 @@ func (check *Check) Run(directories map[string][]string) error { legacyResourcesFiles, legacyResourcesOk := directories[LegacyResourcesDirectory] if legacyDataSourcesOk { + if err := NewFileMismatchCheck(check.Options.DataSourceFileMismatch).Run(legacyDataSourcesFiles); err != nil { + result = multierror.Append(result, err) + } + if err := NewLegacyDataSourceFileCheck(check.Options.LegacyDataSourceFile).RunAll(legacyDataSourcesFiles); err != nil { result = multierror.Append(result, err) } @@ -141,6 +125,10 @@ func (check *Check) Run(directories map[string][]string) error { } if legacyResourcesOk { + if err := NewFileMismatchCheck(check.Options.ResourceFileMismatch).Run(legacyResourcesFiles); err != nil { + result = multierror.Append(result, err) + } + if err := NewLegacyResourceFileCheck(check.Options.LegacyResourceFile).RunAll(legacyResourcesFiles); err != nil { result = multierror.Append(result, err) } diff --git a/vendor/github.com/bflad/tfproviderdocs/check/directory.go b/vendor/github.com/bflad/tfproviderdocs/check/directory.go index dcd646f3f2e..aa3738e1e73 100644 --- a/vendor/github.com/bflad/tfproviderdocs/check/directory.go +++ b/vendor/github.com/bflad/tfproviderdocs/check/directory.go @@ -9,7 +9,7 @@ import ( ) const ( - DocumentationGlobPattern = `{docs,website/docs}/**/*` + DocumentationGlobPattern = `{docs/index.md,docs/{data-sources,guides,resources},website/docs}/**/*` LegacyIndexDirectory = `website/docs` LegacyDataSourcesDirectory = `website/docs/d` @@ -58,7 +58,8 @@ func MixedDirectoriesCheck(directories map[string][]string) error { err := fmt.Errorf("mixed Terraform Provider documentation directory layouts found, must use only legacy or registry layout") for directory := range directories { - if IsValidRegistryDirectory(directory) { + // Allow docs/ with other files + if IsValidRegistryDirectory(directory) && directory != RegistryIndexDirectory { registryDirectoryFound = true if legacyDirectoryFound { @@ -126,6 +127,14 @@ func GetDirectories(basepath string) (map[string][]string, error) { } directory := filepath.Dir(file) + + // Skip handling of docs/ files except index.md + // if directory == RegistryIndexDirectory && filepath.Base(file) != "index.md" { + // continue + // } + + // Skip handling of docs/** outside valid Registry Directories + directories[directory] = append(directories[directory], file) } diff --git a/vendor/github.com/bflad/tfproviderdocs/check/file_mismatch.go b/vendor/github.com/bflad/tfproviderdocs/check/file_mismatch.go index b5c4868dd36..85898240300 100644 --- a/vendor/github.com/bflad/tfproviderdocs/check/file_mismatch.go +++ b/vendor/github.com/bflad/tfproviderdocs/check/file_mismatch.go @@ -2,26 +2,79 @@ package check import ( "fmt" + "log" "sort" "github.com/hashicorp/go-multierror" tfjson "github.com/hashicorp/terraform-json" ) -func ResourceFileMismatchCheck(providerName string, resourceType string, schemaResources map[string]*tfjson.Schema, files []string) error { +type FileMismatchOptions struct { + *FileOptions + + IgnoreFileMismatch []string + + IgnoreFileMissing []string + + ProviderName string + + ResourceType string + + Schemas map[string]*tfjson.Schema +} + +type FileMismatchCheck struct { + Options *FileMismatchOptions +} + +func NewFileMismatchCheck(opts *FileMismatchOptions) *FileMismatchCheck { + check := &FileMismatchCheck{ + Options: opts, + } + + if check.Options == nil { + check.Options = &FileMismatchOptions{} + } + + if check.Options.FileOptions == nil { + check.Options.FileOptions = &FileOptions{} + } + + return check +} + +func (check *FileMismatchCheck) Run(files []string) error { + if len(files) == 0 { + log.Printf("[DEBUG] Skipping %s file mismatch checks due to missing file list", check.Options.ResourceType) + return nil + } + + if len(check.Options.Schemas) == 0 { + log.Printf("[DEBUG] Skipping %s file mismatch checks due to missing schemas", check.Options.ResourceType) + return nil + } + var extraFiles []string var missingFiles []string for _, file := range files { - if fileHasResource(schemaResources, providerName, file) { + if fileHasResource(check.Options.Schemas, check.Options.ProviderName, file) { + continue + } + + if check.IgnoreFileMismatch(file) { continue } extraFiles = append(extraFiles, file) } - for _, resourceName := range resourceNames(schemaResources) { - if resourceHasFile(files, providerName, resourceName) { + for _, resourceName := range resourceNames(check.Options.Schemas) { + if resourceHasFile(files, check.Options.ProviderName, resourceName) { + continue + } + + if check.IgnoreFileMissing(resourceName) { continue } @@ -31,18 +84,38 @@ func ResourceFileMismatchCheck(providerName string, resourceType string, schemaR var result *multierror.Error for _, extraFile := range extraFiles { - err := fmt.Errorf("matching %s for documentation file (%s) not found, file is extraneous or incorrectly named", resourceType, extraFile) + err := fmt.Errorf("matching %s for documentation file (%s) not found, file is extraneous or incorrectly named", check.Options.ResourceType, extraFile) result = multierror.Append(result, err) } for _, missingFile := range missingFiles { - err := fmt.Errorf("missing documentation file for %s: %s", resourceType, missingFile) + err := fmt.Errorf("missing documentation file for %s: %s", check.Options.ResourceType, missingFile) result = multierror.Append(result, err) } return result.ErrorOrNil() } +func (check *FileMismatchCheck) IgnoreFileMismatch(file string) bool { + for _, ignoreResourceName := range check.Options.IgnoreFileMismatch { + if ignoreResourceName == fileResourceName(check.Options.ProviderName, file) { + return true + } + } + + return false +} + +func (check *FileMismatchCheck) IgnoreFileMissing(resourceName string) bool { + for _, ignoreResourceName := range check.Options.IgnoreFileMissing { + if ignoreResourceName == resourceName { + return true + } + } + + return false +} + func fileHasResource(schemaResources map[string]*tfjson.Schema, providerName, file string) bool { if _, ok := schemaResources[fileResourceName(providerName, file)]; ok { return true diff --git a/vendor/github.com/bflad/tfproviderdocs/check/sidenavigation/sidenavigation.go b/vendor/github.com/bflad/tfproviderdocs/check/sidenavigation/sidenavigation.go index 7cf27416694..e64fb7d8c95 100644 --- a/vendor/github.com/bflad/tfproviderdocs/check/sidenavigation/sidenavigation.go +++ b/vendor/github.com/bflad/tfproviderdocs/check/sidenavigation/sidenavigation.go @@ -48,7 +48,7 @@ func FindFile(path string) (*SideNavigation, error) { fileContents, err := ioutil.ReadFile(path) if err != nil { - log.Fatalf("error opening file (%s): %w", path, err) + log.Fatalf("error opening file (%s): %s", path, err) } return FindString(string(fileContents)) diff --git a/vendor/github.com/bflad/tfproviderdocs/command/check.go b/vendor/github.com/bflad/tfproviderdocs/command/check.go index d83d8aca8f0..43934bb5833 100644 --- a/vendor/github.com/bflad/tfproviderdocs/command/check.go +++ b/vendor/github.com/bflad/tfproviderdocs/command/check.go @@ -24,6 +24,10 @@ type CheckCommandConfig struct { AllowedGuideSubcategoriesFile string AllowedResourceSubcategories string AllowedResourceSubcategoriesFile string + IgnoreFileMismatchDataSources string + IgnoreFileMismatchResources string + IgnoreFileMissingDataSources string + IgnoreFileMissingResources string IgnoreSideNavigationDataSources string IgnoreSideNavigationResources string LogLevel string @@ -47,6 +51,10 @@ func (*CheckCommand) Help() string { fmt.Fprintf(opts, CommandHelpOptionFormat, "-allowed-guide-subcategories-file", "Path to newline separated file of allowed guide frontmatter subcategories.") fmt.Fprintf(opts, CommandHelpOptionFormat, "-allowed-resource-subcategories", "Comma separated list of allowed data source and resource frontmatter subcategories.") fmt.Fprintf(opts, CommandHelpOptionFormat, "-allowed-resource-subcategories-file", "Path to newline separated file of allowed data source and resource frontmatter subcategories.") + fmt.Fprintf(opts, CommandHelpOptionFormat, "-ignore-file-mismatch-data-sources", "Comma separated list of data sources to ignore mismatched/extra files.") + fmt.Fprintf(opts, CommandHelpOptionFormat, "-ignore-file-mismatch-resources", "Comma separated list of resources to ignore mismatched/extra files.") + fmt.Fprintf(opts, CommandHelpOptionFormat, "-ignore-file-missing-data-sources", "Comma separated list of data sources to ignore missing files.") + fmt.Fprintf(opts, CommandHelpOptionFormat, "-ignore-file-missing-resources", "Comma separated list of resources to ignore missing files.") fmt.Fprintf(opts, CommandHelpOptionFormat, "-ignore-side-navigation-data-sources", "Comma separated list of data sources to ignore side navigation validation.") fmt.Fprintf(opts, CommandHelpOptionFormat, "-ignore-side-navigation-resources", "Comma separated list of resources to ignore side navigation validation.") fmt.Fprintf(opts, CommandHelpOptionFormat, "-provider-name", "Terraform Provider name. Automatically determined if current working directory or provided path is prefixed with terraform-provider-*.") @@ -80,6 +88,10 @@ func (c *CheckCommand) Run(args []string) int { flags.StringVar(&config.AllowedGuideSubcategoriesFile, "allowed-guide-subcategories-file", "", "") flags.StringVar(&config.AllowedResourceSubcategories, "allowed-resource-subcategories", "", "") flags.StringVar(&config.AllowedResourceSubcategoriesFile, "allowed-resource-subcategories-file", "", "") + flags.StringVar(&config.IgnoreFileMismatchDataSources, "ignore-file-mismatch-data-sources", "", "") + flags.StringVar(&config.IgnoreFileMismatchResources, "ignore-file-mismatch-resources", "", "") + flags.StringVar(&config.IgnoreFileMissingDataSources, "ignore-file-missing-data-sources", "", "") + flags.StringVar(&config.IgnoreFileMissingResources, "ignore-file-missing-resources", "", "") flags.StringVar(&config.IgnoreSideNavigationDataSources, "ignore-side-navigation-data-sources", "", "") flags.StringVar(&config.IgnoreSideNavigationResources, "ignore-side-navigation-resources", "", "") flags.StringVar(&config.ProviderName, "provider-name", "", "") @@ -131,8 +143,7 @@ func (c *CheckCommand) Run(args []string) int { return 1 } - var allowedGuideSubcategories, allowedResourceSubcategories, ignoreSideNavigationDataSources, ignoreSideNavigationResources []string - + var allowedGuideSubcategories []string if v := config.AllowedGuideSubcategories; v != "" { allowedGuideSubcategories = strings.Split(v, ",") } @@ -147,6 +158,7 @@ func (c *CheckCommand) Run(args []string) int { } } + var allowedResourceSubcategories []string if v := config.AllowedResourceSubcategories; v != "" { allowedResourceSubcategories = strings.Split(v, ",") } @@ -161,18 +173,68 @@ func (c *CheckCommand) Run(args []string) int { } } + var ignoreFileMismatchDataSources []string + if v := config.IgnoreFileMismatchDataSources; v != "" { + ignoreFileMismatchDataSources = strings.Split(v, ",") + } + + var ignoreFileMismatchResources []string + if v := config.IgnoreFileMismatchResources; v != "" { + ignoreFileMismatchResources = strings.Split(v, ",") + } + + var ignoreFileMissingDataSources []string + if v := config.IgnoreFileMissingDataSources; v != "" { + ignoreFileMissingDataSources = strings.Split(v, ",") + } + + var ignoreFileMissingResources []string + if v := config.IgnoreFileMissingResources; v != "" { + ignoreFileMissingResources = strings.Split(v, ",") + } + + var ignoreSideNavigationDataSources []string if v := config.IgnoreSideNavigationDataSources; v != "" { ignoreSideNavigationDataSources = strings.Split(v, ",") } + var ignoreSideNavigationResources []string if v := config.IgnoreSideNavigationResources; v != "" { ignoreSideNavigationResources = strings.Split(v, ",") } + var schemaDataSources, schemaResources map[string]*tfjson.Schema + if config.ProvidersSchemaJson != "" { + ps, err := providerSchemas(config.ProvidersSchemaJson) + + if err != nil { + c.Ui.Error(fmt.Sprintf("Error enabling Terraform Provider schema checks: %s", err)) + return 1 + } + + if config.ProviderName == "" { + msg := `Unknown provider name for enabling Terraform Provider schema checks. + +Check that the current working directory or provided path is prefixed with terraform-provider-*.` + c.Ui.Error(msg) + return 1 + } + + schemaDataSources = providerSchemasDataSources(ps, config.ProviderName) + schemaResources = providerSchemasResources(ps, config.ProviderName) + } + fileOpts := &check.FileOptions{ BasePath: config.Path, } checkOpts := &check.CheckOptions{ + DataSourceFileMismatch: &check.FileMismatchOptions{ + IgnoreFileMismatch: ignoreFileMismatchDataSources, + IgnoreFileMissing: ignoreFileMissingDataSources, + ProviderName: config.ProviderName, + ResourceType: check.ResourceTypeDataSource, + Schemas: schemaDataSources, + }, LegacyDataSourceFile: &check.LegacyDataSourceFileOptions{ FileOptions: fileOpts, FrontMatter: &check.FrontMatterOptions{ @@ -222,6 +284,13 @@ func (c *CheckCommand) Run(args []string) int { RequireSubcategory: config.RequireResourceSubcategory, }, }, + ResourceFileMismatch: &check.FileMismatchOptions{ + IgnoreFileMismatch: ignoreFileMismatchResources, + IgnoreFileMissing: ignoreFileMissingResources, + ProviderName: config.ProviderName, + ResourceType: check.ResourceTypeResource, + Schemas: schemaResources, + }, SideNavigation: &check.SideNavigationOptions{ FileOptions: fileOpts, IgnoreDataSources: ignoreSideNavigationDataSources, @@ -230,26 +299,6 @@ func (c *CheckCommand) Run(args []string) int { }, } - if config.ProvidersSchemaJson != "" { - ps, err := providerSchemas(config.ProvidersSchemaJson) - - if err != nil { - c.Ui.Error(fmt.Sprintf("Error enabling Terraform Provider schema checks: %s", err)) - return 1 - } - - if config.ProviderName == "" { - msg := `Unknown provider name for enabling Terraform Provider schema checks. - -Check that the current working directory or provided path is prefixed with terraform-provider-*.` - c.Ui.Error(msg) - return 1 - } - - checkOpts.SchemaDataSources = providerSchemasDataSources(ps, config.ProviderName) - checkOpts.SchemaResources = providerSchemasResources(ps, config.ProviderName) - } - if err := check.NewCheck(checkOpts).Run(directories); err != nil { c.Ui.Error(fmt.Sprintf("Error checking Terraform Provider documentation: %s", err)) return 1 diff --git a/vendor/github.com/bflad/tfproviderdocs/go.mod b/vendor/github.com/bflad/tfproviderdocs/go.mod index 11196dd4f7a..94e895337aa 100644 --- a/vendor/github.com/bflad/tfproviderdocs/go.mod +++ b/vendor/github.com/bflad/tfproviderdocs/go.mod @@ -6,7 +6,7 @@ require ( github.com/bmatcuk/doublestar v1.2.1 github.com/hashicorp/go-hclog v0.10.0 github.com/hashicorp/go-multierror v1.0.0 - github.com/hashicorp/terraform-json v0.3.1 + github.com/hashicorp/terraform-json v0.5.0 github.com/mattn/go-colorable v0.1.4 github.com/mitchellh/cli v1.0.0 golang.org/x/net v0.0.0-20180811021610-c39426892332 diff --git a/vendor/github.com/bflad/tfproviderdocs/go.sum b/vendor/github.com/bflad/tfproviderdocs/go.sum index 915d3453fb2..ed5ba548b98 100644 --- a/vendor/github.com/bflad/tfproviderdocs/go.sum +++ b/vendor/github.com/bflad/tfproviderdocs/go.sum @@ -10,14 +10,16 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-hclog v0.10.0 h1:b86HUuA126IcSHyC55WjPo7KtCOVeTCKIjr+3lBhPxI= github.com/hashicorp/go-hclog v0.10.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/terraform-json v0.3.1 h1:vRiOLck4YX4UqzljVhdQKsVLixX4L+Pgnm/q+xu6QvE= -github.com/hashicorp/terraform-json v0.3.1/go.mod h1:MdwQStcJb00ht55L/2YH0ypAO9RNtczJ1MaUlf+gJcg= +github.com/hashicorp/terraform-json v0.5.0 h1:7TV3/F3y7QVSuN4r9BEXqnWqrAyeOtON8f0wvREtyzs= +github.com/hashicorp/terraform-json v0.5.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -40,8 +42,8 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/zclconf/go-cty v0.0.0-20190430221426-d36a6f0dbffd h1:NZOOU7h+pDtcKo6xlqm8PwnarS8nJ+6+I83jT8ZfLPI= -github.com/zclconf/go-cty v0.0.0-20190430221426-d36a6f0dbffd/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= +github.com/zclconf/go-cty v1.2.1 h1:vGMsygfmeCl4Xb6OA5U5XVAaQZ69FvoG7X2jUtQujb8= +github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= golang.org/x/net v0.0.0-20180811021610-c39426892332 h1:efGso+ep0DjyCBJPjvoz0HI6UldX4Md2F1rZFe1ir0E= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/vendor/github.com/bflad/tfproviderdocs/version/version.go b/vendor/github.com/bflad/tfproviderdocs/version/version.go index b435d323504..c2072752726 100644 --- a/vendor/github.com/bflad/tfproviderdocs/version/version.go +++ b/vendor/github.com/bflad/tfproviderdocs/version/version.go @@ -11,7 +11,7 @@ var ( GitDescribe string // The main version number that is being run at the moment. - Version = "0.5.0" + Version = "0.6.0" // 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/bflad/tfproviderlint/helper/analysisutils/analyzers.go b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/analyzers.go index 0041b098bdf..b5fcb049387 100644 --- a/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/analyzers.go +++ b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/analyzers.go @@ -12,27 +12,77 @@ import ( ) // DeprecatedReceiverMethodSelectorExprAnalyzer returns an Analyzer for deprecated *ast.SelectorExpr -func DeprecatedReceiverMethodSelectorExprAnalyzer(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, packageName, typeName, methodName string) *analysis.Analyzer { +func DeprecatedReceiverMethodSelectorExprAnalyzer(analyzerName string, callExprAnalyzer, selectorExprAnalyzer *analysis.Analyzer, packagePath, typeName, methodName string) *analysis.Analyzer { doc := fmt.Sprintf(`check for deprecated %[2]s.%[3]s usage The %[1]s analyzer reports usage of the deprecated: %[2]s.%[3]s -`, analyzerName, packageName, typeName, methodName) +`, analyzerName, packagePath, typeName, methodName) return &analysis.Analyzer{ Name: analyzerName, Doc: doc, Requires: []*analysis.Analyzer{ + callExprAnalyzer, commentignore.Analyzer, selectorExprAnalyzer, }, - Run: DeprecatedReceiverMethodSelectorExprRunner(analyzerName, selectorExprAnalyzer, packageName, typeName, methodName), + Run: DeprecatedReceiverMethodSelectorExprRunner(analyzerName, callExprAnalyzer, selectorExprAnalyzer, packagePath, typeName, methodName), + } +} + +// DeprecatedEmptyCallExprWithReplacementSelectorExprAnalyzer returns an Analyzer for deprecated *ast.SelectorExpr with replacement +func DeprecatedEmptyCallExprWithReplacementSelectorExprAnalyzer(analyzerName string, callExprAnalyzer, selectorExprAnalyzer *analysis.Analyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName string) *analysis.Analyzer { + doc := fmt.Sprintf(`check for deprecated %[2]s.%[3]s usage + +The %[1]s analyzer reports usage of the deprecated: + +%[2]s.%[3]s + +That should be replaced with: + +%[4]s.%[5]s +`, analyzerName, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName) + + return &analysis.Analyzer{ + Name: analyzerName, + Doc: doc, + Requires: []*analysis.Analyzer{ + callExprAnalyzer, + commentignore.Analyzer, + selectorExprAnalyzer, + }, + Run: DeprecatedEmptyCallExprWithReplacementSelectorExprRunner(analyzerName, callExprAnalyzer, selectorExprAnalyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName), + } +} + +// DeprecatedWithReplacementPointerSelectorExprAnalyzer returns an Analyzer for deprecated *ast.SelectorExpr with replacement +func DeprecatedWithReplacementPointerSelectorExprAnalyzer(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName string) *analysis.Analyzer { + doc := fmt.Sprintf(`check for deprecated %[2]s.%[3]s usage + +The %[1]s analyzer reports usage of the deprecated: + +%[2]s.%[3]s + +That should be replaced with: + +*%[4]s.%[5]s +`, analyzerName, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName) + + return &analysis.Analyzer{ + Name: analyzerName, + Doc: doc, + Requires: []*analysis.Analyzer{ + commentignore.Analyzer, + selectorExprAnalyzer, + }, + Run: DeprecatedWithReplacementPointerSelectorExprRunner(analyzerName, selectorExprAnalyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName), } } // DeprecatedWithReplacementSelectorExprAnalyzer returns an Analyzer for deprecated *ast.SelectorExpr with replacement -func DeprecatedWithReplacementSelectorExprAnalyzer(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, oldPackageName, oldSelectorName, newPackageName, newSelectorName string) *analysis.Analyzer { +func DeprecatedWithReplacementSelectorExprAnalyzer(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName string) *analysis.Analyzer { doc := fmt.Sprintf(`check for deprecated %[2]s.%[3]s usage The %[1]s analyzer reports usage of the deprecated: @@ -42,7 +92,7 @@ The %[1]s analyzer reports usage of the deprecated: That should be replaced with: %[4]s.%[5]s -`, analyzerName, oldPackageName, oldSelectorName, newPackageName, newSelectorName) +`, analyzerName, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName) return &analysis.Analyzer{ Name: analyzerName, @@ -51,7 +101,7 @@ That should be replaced with: commentignore.Analyzer, selectorExprAnalyzer, }, - Run: DeprecatedWithReplacementSelectorExprRunner(analyzerName, selectorExprAnalyzer, oldPackageName, oldSelectorName, newPackageName, newSelectorName), + Run: DeprecatedWithReplacementSelectorExprRunner(analyzerName, selectorExprAnalyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName), } } @@ -119,3 +169,28 @@ func SelectorExprAnalyzer(analyzerName string, packageFunc func(ast.Expr, *types ResultType: reflect.TypeOf([]*ast.SelectorExpr{}), } } + +// TypeAssertExprRemovalAnalyzer returns an Analyzer for *ast.TypeAssertExpr +func TypeAssertExprRemovalAnalyzer(analyzerName string, typeAssertExprAnalyzer *analysis.Analyzer, packagePath string, selectorName string) *analysis.Analyzer { + return &analysis.Analyzer{ + Name: analyzerName, + Doc: fmt.Sprintf("remove %s.%s type assertions", packagePath, selectorName), + Requires: []*analysis.Analyzer{ + typeAssertExprAnalyzer, + }, + Run: TypeAssertExprRemovalRunner(analyzerName, typeAssertExprAnalyzer), + } +} + +// TypeAssertExprAnalyzer returns an Analyzer for *ast.TypeAssertExpr +func TypeAssertExprAnalyzer(analyzerName string, packageFunc func(ast.Expr, *types.Info, string) bool, packagePath string, selectorName string) *analysis.Analyzer { + return &analysis.Analyzer{ + Name: analyzerName, + Doc: fmt.Sprintf("find %s.%s type assertions for later passes", packagePath, selectorName), + Requires: []*analysis.Analyzer{ + inspect.Analyzer, + }, + Run: TypeAssertExprRunner(packageFunc, selectorName), + ResultType: reflect.TypeOf([]*ast.TypeAssertExpr{}), + } +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/runners.go b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/runners.go index dc95ca5c91e..50b44083efe 100644 --- a/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/runners.go +++ b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/runners.go @@ -1,8 +1,13 @@ package analysisutils import ( + "bytes" + "fmt" "go/ast" + "go/format" + "go/token" "go/types" + "path/filepath" "github.com/bflad/tfproviderlint/passes/commentignore" "golang.org/x/tools/go/analysis" @@ -11,17 +16,276 @@ import ( ) // DeprecatedReceiverMethodSelectorExprRunner returns an Analyzer runner for deprecated *ast.SelectorExpr -func DeprecatedReceiverMethodSelectorExprRunner(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, packageName, typeName, methodName string) func(*analysis.Pass) (interface{}, error) { +func DeprecatedReceiverMethodSelectorExprRunner(analyzerName string, callExprAnalyzer, selectorExprAnalyzer *analysis.Analyzer, packagePath, typeName, methodName string) func(*analysis.Pass) (interface{}, error) { return func(pass *analysis.Pass) (interface{}, error) { + callExprs := pass.ResultOf[callExprAnalyzer].([]*ast.CallExpr) selectorExprs := pass.ResultOf[selectorExprAnalyzer].([]*ast.SelectorExpr) ignorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) + // CallExpr and SelectorExpr will overlap, so only perform one report/fix + reported := make(map[token.Pos]struct{}) + + for _, callExpr := range callExprs { + if ignorer.ShouldIgnore(analyzerName, callExpr) { + continue + } + + var callExprBuf bytes.Buffer + + if err := format.Node(&callExprBuf, pass.Fset, callExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: callExpr.Pos(), + End: callExpr.End(), + Message: fmt.Sprintf("%s: deprecated %s", analyzerName, callExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Remove", + TextEdits: []analysis.TextEdit{ + { + Pos: callExpr.Pos(), + End: callExpr.End(), + NewText: []byte{}, + }, + }, + }, + }, + }) + + reported[callExpr.Pos()] = struct{}{} + } + for _, selectorExpr := range selectorExprs { if ignorer.ShouldIgnore(analyzerName, selectorExpr) { continue } - pass.Reportf(selectorExpr.Pos(), "%s: deprecated (%s.%s).%s", analyzerName, packageName, typeName, methodName) + if _, ok := reported[selectorExpr.Pos()]; ok { + continue + } + + var selectorExprBuf bytes.Buffer + + if err := format.Node(&selectorExprBuf, pass.Fset, selectorExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + Message: fmt.Sprintf("%s: deprecated %s", analyzerName, selectorExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Remove", + TextEdits: []analysis.TextEdit{ + { + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + NewText: []byte{}, + }, + }, + }, + }, + }) + } + + return nil, nil + } +} + +// DeprecatedEmptyCallExprWithReplacementSelectorExprRunner returns an Analyzer runner for deprecated *ast.SelectorExpr with replacement +func DeprecatedEmptyCallExprWithReplacementSelectorExprRunner(analyzerName string, callExprAnalyzer *analysis.Analyzer, selectorExprAnalyzer *analysis.Analyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName string) func(*analysis.Pass) (interface{}, error) { + return func(pass *analysis.Pass) (interface{}, error) { + callExprs := pass.ResultOf[callExprAnalyzer].([]*ast.CallExpr) + selectorExprs := pass.ResultOf[selectorExprAnalyzer].([]*ast.SelectorExpr) + ignorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) + + // CallExpr and SelectorExpr will overlap, so only perform one report/fix + reported := make(map[token.Pos]struct{}) + + for _, callExpr := range callExprs { + if ignorer.ShouldIgnore(analyzerName, callExpr) { + continue + } + + if len(callExpr.Args) != 0 { + continue + } + + selectorExpr, ok := callExpr.Fun.(*ast.SelectorExpr) + + if !ok { + continue + } + + newSelectorExpr := &ast.SelectorExpr{ + Sel: selectorExpr.Sel, + X: selectorExpr.X, + } + + if oldPackagePath != newPackagePath { + newSelectorExpr.X = &ast.Ident{ + Name: filepath.Base(newPackagePath), + } + } + + if oldSelectorName != newSelectorName { + newSelectorExpr.Sel = &ast.Ident{ + Name: newSelectorName, + } + } + + var callExprBuf, newSelectorExprBuf bytes.Buffer + + if err := format.Node(&callExprBuf, pass.Fset, selectorExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + if err := format.Node(&newSelectorExprBuf, pass.Fset, newSelectorExpr); err != nil { + return nil, fmt.Errorf("error formatting new: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: callExpr.Pos(), + End: callExpr.End(), + Message: fmt.Sprintf("%s: deprecated %s should be replaced with %s", analyzerName, callExprBuf.String(), newSelectorExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Replace", + TextEdits: []analysis.TextEdit{ + { + Pos: callExpr.Pos(), + End: callExpr.End(), + NewText: newSelectorExprBuf.Bytes(), + }, + }, + }, + }, + }) + + reported[callExpr.Pos()] = struct{}{} + } + + for _, selectorExpr := range selectorExprs { + if ignorer.ShouldIgnore(analyzerName, selectorExpr) { + continue + } + + if _, ok := reported[selectorExpr.Pos()]; ok { + continue + } + + newSelectorExpr := &ast.SelectorExpr{ + Sel: selectorExpr.Sel, + X: selectorExpr.X, + } + + if oldPackagePath != newPackagePath { + newSelectorExpr.X = &ast.Ident{ + Name: filepath.Base(newPackagePath), + } + } + + if oldSelectorName != newSelectorName { + newSelectorExpr.Sel = &ast.Ident{ + Name: newSelectorName, + } + } + + var selectorExprBuf, newSelectorExprBuf bytes.Buffer + + if err := format.Node(&selectorExprBuf, pass.Fset, selectorExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + if err := format.Node(&newSelectorExprBuf, pass.Fset, newSelectorExpr); err != nil { + return nil, fmt.Errorf("error formatting new: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + Message: fmt.Sprintf("%s: deprecated %s should be replaced with %s", analyzerName, selectorExprBuf.String(), newSelectorExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Replace", + TextEdits: []analysis.TextEdit{ + { + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + NewText: newSelectorExprBuf.Bytes(), + }, + }, + }, + }, + }) + } + + return nil, nil + } +} + +// DeprecatedWithReplacementPointerSelectorExprRunner returns an Analyzer runner for deprecated *ast.SelectorExpr with replacement +func DeprecatedWithReplacementPointerSelectorExprRunner(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName string) func(*analysis.Pass) (interface{}, error) { + return func(pass *analysis.Pass) (interface{}, error) { + ignorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) + selectorExprs := pass.ResultOf[selectorExprAnalyzer].([]*ast.SelectorExpr) + + for _, selectorExpr := range selectorExprs { + if ignorer.ShouldIgnore(analyzerName, selectorExpr) { + continue + } + + newSelectorExpr := &ast.SelectorExpr{ + Sel: selectorExpr.Sel, + X: selectorExpr.X, + } + + if oldPackagePath != newPackagePath { + newSelectorExpr.X = &ast.Ident{ + Name: filepath.Base(newPackagePath), + } + } + + if oldSelectorName != newSelectorName { + newSelectorExpr.Sel = &ast.Ident{ + Name: newSelectorName, + } + } + + newStarExpr := &ast.StarExpr{ + X: newSelectorExpr, + } + + var selectorExprBuf, newStarExprBuf bytes.Buffer + + if err := format.Node(&selectorExprBuf, pass.Fset, selectorExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + if err := format.Node(&newStarExprBuf, pass.Fset, newStarExpr); err != nil { + return nil, fmt.Errorf("error formatting new: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + Message: fmt.Sprintf("%s: deprecated %s should be replaced with %s", analyzerName, selectorExprBuf.String(), newStarExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Replace", + TextEdits: []analysis.TextEdit{ + { + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + NewText: newStarExprBuf.Bytes(), + }, + }, + }, + }, + }) } return nil, nil @@ -29,7 +293,7 @@ func DeprecatedReceiverMethodSelectorExprRunner(analyzerName string, selectorExp } // DeprecatedWithReplacementSelectorExprRunner returns an Analyzer runner for deprecated *ast.SelectorExpr with replacement -func DeprecatedWithReplacementSelectorExprRunner(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, oldPackageName, oldSelectorName, newPackageName, newSelectorName string) func(*analysis.Pass) (interface{}, error) { +func DeprecatedWithReplacementSelectorExprRunner(analyzerName string, selectorExprAnalyzer *analysis.Analyzer, oldPackagePath, oldSelectorName, newPackagePath, newSelectorName string) func(*analysis.Pass) (interface{}, error) { return func(pass *analysis.Pass) (interface{}, error) { selectorExprs := pass.ResultOf[selectorExprAnalyzer].([]*ast.SelectorExpr) ignorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) @@ -39,7 +303,50 @@ func DeprecatedWithReplacementSelectorExprRunner(analyzerName string, selectorEx continue } - pass.Reportf(selectorExpr.Pos(), "%s: deprecated %s.%s should be replaced with %s.%s", analyzerName, oldPackageName, oldSelectorName, newPackageName, newSelectorName) + newSelectorExpr := &ast.SelectorExpr{ + Sel: selectorExpr.Sel, + X: selectorExpr.X, + } + + if oldPackagePath != newPackagePath { + newSelectorExpr.X = &ast.Ident{ + Name: filepath.Base(newPackagePath), + } + } + + if oldSelectorName != newSelectorName { + newSelectorExpr.Sel = &ast.Ident{ + Name: newSelectorName, + } + } + + var selectorExprBuf, newSelectorExprBuf bytes.Buffer + + if err := format.Node(&selectorExprBuf, pass.Fset, selectorExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + if err := format.Node(&newSelectorExprBuf, pass.Fset, newSelectorExpr); err != nil { + return nil, fmt.Errorf("error formatting new: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + Message: fmt.Sprintf("%s: deprecated %s should be replaced with %s", analyzerName, selectorExprBuf.String(), newSelectorExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Replace", + TextEdits: []analysis.TextEdit{ + { + Pos: selectorExpr.Pos(), + End: selectorExpr.End(), + NewText: newSelectorExprBuf.Bytes(), + }, + }, + }, + }, + }) } return nil, nil @@ -170,3 +477,65 @@ func SelectorExprRunner(packageFunc func(ast.Expr, *types.Info, string) bool, se return result, nil } } + +// TypeAssertExprRemovalRunner returns an Analyzer runner for removing *ast.TypeAssertExpr +func TypeAssertExprRemovalRunner(analyzerName string, typeAssertExprAnalyzer *analysis.Analyzer) func(*analysis.Pass) (interface{}, error) { + return func(pass *analysis.Pass) (interface{}, error) { + typeAssertExprs := pass.ResultOf[typeAssertExprAnalyzer].([]*ast.TypeAssertExpr) + + for _, typeAssertExpr := range typeAssertExprs { + var typeAssertExprBuf, xBuf bytes.Buffer + + if err := format.Node(&typeAssertExprBuf, pass.Fset, typeAssertExpr); err != nil { + return nil, fmt.Errorf("error formatting original: %s", err) + } + + if err := format.Node(&xBuf, pass.Fset, typeAssertExpr.X); err != nil { + return nil, fmt.Errorf("error formatting new: %s", err) + } + + pass.Report(analysis.Diagnostic{ + Pos: typeAssertExpr.Pos(), + End: typeAssertExpr.End(), + Message: fmt.Sprintf("%s: %s type assertion should be removed", analyzerName, typeAssertExprBuf.String()), + SuggestedFixes: []analysis.SuggestedFix{ + { + Message: "Remove", + TextEdits: []analysis.TextEdit{ + { + Pos: typeAssertExpr.Pos(), + End: typeAssertExpr.End(), + NewText: xBuf.Bytes(), + }, + }, + }, + }, + }) + } + + return nil, nil + } +} + +// TypeAssertExprRunner returns an Analyzer runner for *ast.TypeAssertExpr +func TypeAssertExprRunner(packageFunc func(ast.Expr, *types.Info, string) bool, selectorName string) func(*analysis.Pass) (interface{}, error) { + return func(pass *analysis.Pass) (interface{}, error) { + inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) + nodeFilter := []ast.Node{ + (*ast.TypeAssertExpr)(nil), + } + var result []*ast.TypeAssertExpr + + inspect.Preorder(nodeFilter, func(n ast.Node) { + typeAssertExpr := n.(*ast.TypeAssertExpr) + + if !packageFunc(typeAssertExpr.Type, pass.TypesInfo, selectorName) { + return + } + + result = append(result, typeAssertExpr) + }) + + return result, nil + } +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_analyzers.go b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_analyzers.go new file mode 100644 index 00000000000..396148ce2c3 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_analyzers.go @@ -0,0 +1,29 @@ +package analysisutils + +import ( + "fmt" + + "github.com/bflad/tfproviderlint/passes/commentignore" + "github.com/bflad/tfproviderlint/passes/helper/schema/schemainfo" + "golang.org/x/tools/go/analysis" +) + +// SchemaAttributeReferencesAnalyzer returns an Analyzer for fields that use schema attribute references +func SchemaAttributeReferencesAnalyzer(analyzerName string, fieldName string) *analysis.Analyzer { + doc := fmt.Sprintf(`check for Schema with invalid %[2]s references + +The %[1]s analyzer ensures schema attribute references in the Schema %[2]s +field use valid syntax. The Terraform Plugin SDK can unit test attribute +references to verify the references against the full schema. +`, analyzerName, fieldName) + + return &analysis.Analyzer{ + Name: analyzerName, + Doc: doc, + Requires: []*analysis.Analyzer{ + commentignore.Analyzer, + schemainfo.Analyzer, + }, + Run: SchemaAttributeReferencesRunner(analyzerName, fieldName), + } +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_runners.go b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_runners.go new file mode 100644 index 00000000000..fde4b9ab18c --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/analysisutils/schema_runners.go @@ -0,0 +1,50 @@ +package analysisutils + +import ( + "go/ast" + + "github.com/bflad/tfproviderlint/helper/astutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" + "github.com/bflad/tfproviderlint/passes/commentignore" + "github.com/bflad/tfproviderlint/passes/helper/schema/schemainfo" + "golang.org/x/tools/go/analysis" +) + +// SchemaAttributeReferencesRunner returns an Analyzer runner for fields that use schema attribute references +func SchemaAttributeReferencesRunner(analyzerName string, fieldName string) func(*analysis.Pass) (interface{}, error) { + return func(pass *analysis.Pass) (interface{}, error) { + ignorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) + schemaInfos := pass.ResultOf[schemainfo.Analyzer].([]*schema.SchemaInfo) + + for _, schemaInfo := range schemaInfos { + if ignorer.ShouldIgnore(analyzerName, schemaInfo.AstCompositeLit) { + continue + } + + if !schemaInfo.DeclaresField(fieldName) { + continue + } + + switch value := schemaInfo.Fields[fieldName].Value.(type) { + case *ast.CompositeLit: + if !astutils.IsExprTypeArrayString(value.Type) { + continue + } + + for _, elt := range value.Elts { + attributeReference := astutils.ExprStringValue(elt) + + if attributeReference == nil { + continue + } + + if _, err := schema.ParseAttributeReference(*attributeReference); err != nil { + pass.Reportf(elt.Pos(), "%s: invalid %s attribute reference: %s", analyzerName, fieldName, err) + } + } + } + } + + return nil, nil + } +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/astutils/basiclit.go b/vendor/github.com/bflad/tfproviderlint/helper/astutils/basiclit.go index 94cee53a9a7..8fa6c327237 100644 --- a/vendor/github.com/bflad/tfproviderlint/helper/astutils/basiclit.go +++ b/vendor/github.com/bflad/tfproviderlint/helper/astutils/basiclit.go @@ -2,8 +2,8 @@ package astutils import ( "go/ast" + "go/token" "strconv" - "strings" ) // ExprBoolValue fetches a bool value from the Expr @@ -29,8 +29,7 @@ func ExprBoolValue(e ast.Expr) *bool { func ExprIntValue(e ast.Expr) *int { switch v := e.(type) { case *ast.BasicLit: - stringValue := strings.Trim(v.Value, `"`) - intValue, err := strconv.Atoi(stringValue) + intValue, err := strconv.Atoi(v.Value) if err != nil { return nil @@ -47,8 +46,10 @@ func ExprIntValue(e ast.Expr) *int { func ExprStringValue(e ast.Expr) *string { switch v := e.(type) { case *ast.BasicLit: - stringValue := strings.Trim(v.Value, `"`) - + if v.Kind != token.STRING { + return nil + } + stringValue, _ := strconv.Unquote(v.Value) // can assume well-formed Go return &stringValue } diff --git a/vendor/github.com/bflad/tfproviderlint/helper/astutils/expr.go b/vendor/github.com/bflad/tfproviderlint/helper/astutils/expr.go new file mode 100644 index 00000000000..b82499b1512 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/astutils/expr.go @@ -0,0 +1,54 @@ +package astutils + +import ( + "go/ast" +) + +// IsExprTypeArrayString returns true if the expression matches []string +func IsExprTypeArrayString(e ast.Expr) bool { + arrayType, ok := e.(*ast.ArrayType) + + return ok && IsExprTypeString(arrayType.Elt) +} + +// IsExprTypeArrayError returns true if the expression matches []error +func IsExprTypeArrayError(e ast.Expr) bool { + arrayType, ok := e.(*ast.ArrayType) + + return ok && IsExprTypeError(arrayType.Elt) +} + +// IsExprTypeString returns true if the expression matches bool +func IsExprTypeBool(e ast.Expr) bool { + ident, ok := e.(*ast.Ident) + + return ok && ident.Name == "bool" +} + +// IsExprTypeError returns true if the expression matches string +func IsExprTypeError(e ast.Expr) bool { + ident, ok := e.(*ast.Ident) + + return ok && ident.Name == "error" +} + +// IsExprTypeInterface returns true if the expression matches interface{} +func IsExprTypeInterface(e ast.Expr) bool { + _, ok := e.(*ast.InterfaceType) + + return ok +} + +// IsExprTypeMapStringInterface returns true if the expression matches []string +func IsExprTypeMapStringInterface(e ast.Expr) bool { + mapType, ok := e.(*ast.MapType) + + return ok && IsExprTypeString(mapType.Key) && IsExprTypeInterface(mapType.Value) +} + +// IsExprTypeString returns true if the expression matches string +func IsExprTypeString(e ast.Expr) bool { + ident, ok := e.(*ast.Ident) + + return ok && ident.Name == "string" +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/astutils/fieldlist.go b/vendor/github.com/bflad/tfproviderlint/helper/astutils/fieldlist.go index 81e19bab279..4b6c45802e5 100644 --- a/vendor/github.com/bflad/tfproviderlint/helper/astutils/fieldlist.go +++ b/vendor/github.com/bflad/tfproviderlint/helper/astutils/fieldlist.go @@ -60,6 +60,16 @@ func FieldListType(fieldList *ast.FieldList, position int) *ast.Expr { return &field.Type } +// HasFieldListLength returns true if the FieldList has the expected length +// If FieldList is nil, checks against expected length of 0. +func HasFieldListLength(fieldList *ast.FieldList, expectedLength int) bool { + if fieldList == nil { + return expectedLength == 0 + } + + return len(fieldList.List) == expectedLength +} + // IsFieldListType returns true if the field at position is present and matches expected ast.Expr func IsFieldListType(fieldList *ast.FieldList, position int, exprFunc func(ast.Expr) bool) bool { t := FieldListType(fieldList, position) diff --git a/vendor/github.com/bflad/tfproviderlint/helper/astutils/function_parameters.go b/vendor/github.com/bflad/tfproviderlint/helper/astutils/function_parameters.go deleted file mode 100644 index 941b88dcc50..00000000000 --- a/vendor/github.com/bflad/tfproviderlint/helper/astutils/function_parameters.go +++ /dev/null @@ -1,40 +0,0 @@ -package astutils - -import ( - "go/ast" -) - -// IsFunctionParameterTypeArrayString returns true if the expression matches []string -func IsFunctionParameterTypeArrayString(e ast.Expr) bool { - arrayType, ok := e.(*ast.ArrayType) - - return ok && IsFunctionParameterTypeString(arrayType.Elt) -} - -// IsFunctionParameterTypeArrayError returns true if the expression matches []error -func IsFunctionParameterTypeArrayError(e ast.Expr) bool { - arrayType, ok := e.(*ast.ArrayType) - - return ok && IsFunctionParameterTypeError(arrayType.Elt) -} - -// IsFunctionParameterTypeError returns true if the expression matches string -func IsFunctionParameterTypeError(e ast.Expr) bool { - ident, ok := e.(*ast.Ident) - - return ok && ident.Name == "error" -} - -// IsFunctionParameterTypeInterface returns true if the expression matches interface{} -func IsFunctionParameterTypeInterface(e ast.Expr) bool { - _, ok := e.(*ast.InterfaceType) - - return ok -} - -// IsFunctionParameterTypeString returns true if the expression matches string -func IsFunctionParameterTypeString(e ast.Expr) bool { - ident, ok := e.(*ast.Ident) - - return ok && ident.Name == "string" -} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/astutils/package.go b/vendor/github.com/bflad/tfproviderlint/helper/astutils/package.go index e983b9d6bdf..00eaa78a787 100644 --- a/vendor/github.com/bflad/tfproviderlint/helper/astutils/package.go +++ b/vendor/github.com/bflad/tfproviderlint/helper/astutils/package.go @@ -32,6 +32,8 @@ func IsPackageFunc(e ast.Expr, info *types.Info, packageSuffix string, funcName case *ast.Ident: return strings.HasSuffix(info.ObjectOf(x).(*types.PkgName).Imported().Path(), packageSuffix) } + case *ast.StarExpr: + return IsPackageFunc(e.X, info, packageSuffix, funcName) } return false diff --git a/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/attributes.go b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/attributes.go new file mode 100644 index 00000000000..8888276a710 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/attributes.go @@ -0,0 +1,61 @@ +package schema + +import ( + "fmt" + "math" + "regexp" + "strconv" + "strings" +) + +const ( + // Pattern for schema attribute names + AttributeNameRegexpPattern = `^[a-z0-9_]+$` + + // Pattern for schema references to attributes, such as ConflictsWith values + AttributeReferenceRegexpPattern = `^[a-z0-9_]+(\.[a-z0-9_]+)*$` +) + +var ( + AttributeNameRegexp = regexp.MustCompile(AttributeNameRegexpPattern) + AttributeReferenceRegexp = regexp.MustCompile(AttributeReferenceRegexpPattern) +) + +// ParseAttributeReference validates and returns the split representation of schema attribute reference. +// Attribute references are used in Schema fields such as AtLeastOneOf, ConflictsWith, and ExactlyOneOf. +func ParseAttributeReference(reference string) ([]string, error) { + if !AttributeReferenceRegexp.MatchString(reference) { + return nil, fmt.Errorf("%q must contain only valid attribute names, separated by periods", reference) + } + + attributeReferenceParts := strings.Split(reference, ".") + + if len(attributeReferenceParts) == 1 { + return attributeReferenceParts, nil + } + + configurationBlockReferenceErr := fmt.Errorf("%q configuration block attribute references are only valid for TypeList and MaxItems: 1 attributes and nested attributes must be separated by .0.", reference) + + if math.Mod(float64(len(attributeReferenceParts)), 2) == 0 { + return attributeReferenceParts, configurationBlockReferenceErr + } + + // All even parts of an attribute reference must be 0 + for idx, attributeReferencePart := range attributeReferenceParts { + if math.Mod(float64(idx), 2) == 0 { + continue + } + + attributeReferencePartInt, err := strconv.Atoi(attributeReferencePart) + + if err != nil { + return attributeReferenceParts, configurationBlockReferenceErr + } + + if attributeReferencePartInt != 0 { + return attributeReferenceParts, configurationBlockReferenceErr + } + } + + return attributeReferenceParts, nil +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_customizedifffunc.go b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_customizedifffunc.go new file mode 100644 index 00000000000..c90186db149 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_customizedifffunc.go @@ -0,0 +1,87 @@ +package schema + +import ( + "go/ast" + "go/token" + "go/types" + + "github.com/bflad/tfproviderlint/helper/astutils" +) + +const ( + TypeNameCustomizeDiffFunc = `CustomizeDiffFunc` +) + +// IsFuncTypeCustomizeDiffFunc returns true if the FuncType matches expected parameters and results types +func IsFuncTypeCustomizeDiffFunc(node ast.Node, info *types.Info) bool { + funcType := astutils.FuncTypeFromNode(node) + + if funcType == nil { + return false + } + + if !astutils.HasFieldListLength(funcType.Params, 2) { + return false + } + + if !astutils.IsFieldListTypePackageType(funcType.Params, 0, info, PackagePath, TypeNameResourceDiff) { + return false + } + + if !astutils.IsFieldListType(funcType.Params, 1, astutils.IsExprTypeInterface) { + return false + } + + if !astutils.HasFieldListLength(funcType.Results, 1) { + return false + } + + return astutils.IsFieldListType(funcType.Results, 0, astutils.IsExprTypeError) +} + +// IsTypeCustomizeDiffFunc returns if the type is CustomizeDiffFunc from the customdiff package +func IsTypeCustomizeDiffFunc(t types.Type) bool { + switch t := t.(type) { + case *types.Named: + return IsNamedType(t, TypeNameCustomizeDiffFunc) + case *types.Pointer: + return IsTypeCustomizeDiffFunc(t.Elem()) + default: + return false + } +} + +// CustomizeDiffFuncInfo represents all gathered CustomizeDiffFunc data for easier access +type CustomizeDiffFuncInfo struct { + AstFuncDecl *ast.FuncDecl + AstFuncLit *ast.FuncLit + Body *ast.BlockStmt + Node ast.Node + Pos token.Pos + Type *ast.FuncType + TypesInfo *types.Info +} + +// NewCustomizeDiffFuncInfo instantiates a CustomizeDiffFuncInfo +func NewCustomizeDiffFuncInfo(node ast.Node, info *types.Info) *CustomizeDiffFuncInfo { + result := &CustomizeDiffFuncInfo{ + TypesInfo: info, + } + + switch node := node.(type) { + case *ast.FuncDecl: + result.AstFuncDecl = node + result.Body = node.Body + result.Node = node + result.Pos = node.Pos() + result.Type = node.Type + case *ast.FuncLit: + result.AstFuncLit = node + result.Body = node.Body + result.Node = node + result.Pos = node.Pos() + result.Type = node.Type + } + + return result +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_provider.go b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_provider.go new file mode 100644 index 00000000000..4aabc603ccd --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_provider.go @@ -0,0 +1,26 @@ +package schema + +import "go/types" + +const ( + ProviderFieldConfigureFunc = `ConfigureFunc` + ProviderFieldDataSourcesMap = `DataSourcesMap` + ProviderFieldMetaReset = `MetaReset` + ProviderFieldResourcesMap = `ResourcesMap` + ProviderFieldSchema = `Schema` + ProviderFieldTerraformVersion = `TerraformVersion` + + TypeNameProvider = `Provider` +) + +// IsTypeProvider returns if the type is Provider from the schema package +func IsTypeProvider(t types.Type) bool { + switch t := t.(type) { + case *types.Named: + return IsNamedType(t, TypeNameProvider) + case *types.Pointer: + return IsTypeProvider(t.Elem()) + default: + return false + } +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_resourcediff.go b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_resourcediff.go new file mode 100644 index 00000000000..4d14e2a656a --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_resourcediff.go @@ -0,0 +1,21 @@ +package schema + +import ( + "go/types" +) + +const ( + TypeNameResourceDiff = `ResourceDiff` +) + +// IsTypeResourceDiff returns if the type is ResourceDiff from the schema package +func IsTypeResourceDiff(t types.Type) bool { + switch t := t.(type) { + case *types.Named: + return IsNamedType(t, TypeNameResourceDiff) + case *types.Pointer: + return IsTypeResourceDiff(t.Elem()) + default: + return false + } +} diff --git a/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_stateupgradefunc.go b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_stateupgradefunc.go new file mode 100644 index 00000000000..fc86c07d0f3 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema/type_stateupgradefunc.go @@ -0,0 +1,91 @@ +package schema + +import ( + "go/ast" + "go/token" + "go/types" + + "github.com/bflad/tfproviderlint/helper/astutils" +) + +const ( + TypeNameStateUpgradeFunc = `StateUpgradeFunc` +) + +// IsFuncTypeStateUpgradeFunc returns true if the FuncType matches expected parameters and results types +func IsFuncTypeStateUpgradeFunc(node ast.Node, info *types.Info) bool { + funcType := astutils.FuncTypeFromNode(node) + + if funcType == nil { + return false + } + + if !astutils.HasFieldListLength(funcType.Params, 2) { + return false + } + + if !astutils.IsFieldListType(funcType.Params, 0, astutils.IsExprTypeMapStringInterface) { + return false + } + + if !astutils.IsFieldListType(funcType.Params, 1, astutils.IsExprTypeInterface) { + return false + } + + if !astutils.HasFieldListLength(funcType.Results, 2) { + return false + } + + if !astutils.IsFieldListType(funcType.Results, 0, astutils.IsExprTypeMapStringInterface) { + return false + } + + return astutils.IsFieldListType(funcType.Results, 1, astutils.IsExprTypeError) +} + +// IsTypeStateUpgradeFunc returns if the type is StateUpgradeFunc from the schema package +func IsTypeStateUpgradeFunc(t types.Type) bool { + switch t := t.(type) { + case *types.Named: + return IsNamedType(t, TypeNameStateUpgradeFunc) + case *types.Pointer: + return IsTypeStateUpgradeFunc(t.Elem()) + default: + return false + } +} + +// StateUpgradeFuncInfo represents all gathered StateUpgradeFunc data for easier access +type StateUpgradeFuncInfo struct { + AstFuncDecl *ast.FuncDecl + AstFuncLit *ast.FuncLit + Body *ast.BlockStmt + Node ast.Node + Pos token.Pos + Type *ast.FuncType + TypesInfo *types.Info +} + +// NewStateUpgradeFuncInfo instantiates a StateUpgradeFuncInfo +func NewStateUpgradeFuncInfo(node ast.Node, info *types.Info) *StateUpgradeFuncInfo { + result := &StateUpgradeFuncInfo{ + TypesInfo: info, + } + + switch node := node.(type) { + case *ast.FuncDecl: + result.AstFuncDecl = node + result.Body = node.Body + result.Node = node + result.Pos = node.Pos() + result.Type = node.Type + case *ast.FuncLit: + result.AstFuncLit = node + result.Body = node.Body + result.Node = node + result.Pos = node.Pos() + result.Type = node.Type + } + + return result +} diff --git a/vendor/github.com/bflad/tfproviderlint/passes/R007/R007.go b/vendor/github.com/bflad/tfproviderlint/passes/R007/R007.go index 1060470e9ed..e59f6f5bd01 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/R007/R007.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/R007/R007.go @@ -3,13 +3,15 @@ package R007 import ( "github.com/bflad/tfproviderlint/helper/analysisutils" "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" + "github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialcallexpr" "github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialselectorexpr" ) var Analyzer = analysisutils.DeprecatedReceiverMethodSelectorExprAnalyzer( "R007", + resourcedatapartialcallexpr.Analyzer, resourcedatapartialselectorexpr.Analyzer, - schema.PackageName, + schema.PackagePath, schema.TypeNameResourceData, "Partial", ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/R008/R008.go b/vendor/github.com/bflad/tfproviderlint/passes/R008/R008.go index 46cd3b1feb3..2eaac056f04 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/R008/R008.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/R008/R008.go @@ -3,13 +3,15 @@ package R008 import ( "github.com/bflad/tfproviderlint/helper/analysisutils" "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" + "github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialcallexpr" "github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialselectorexpr" ) var Analyzer = analysisutils.DeprecatedReceiverMethodSelectorExprAnalyzer( "R008", + resourcedatasetpartialcallexpr.Analyzer, resourcedatasetpartialselectorexpr.Analyzer, - schema.PackageName, + schema.PackagePath, schema.TypeNameResourceData, "SetPartial", ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S015/S015.go b/vendor/github.com/bflad/tfproviderlint/passes/S015/S015.go index 1e62bd2dda8..9ecfe7bc347 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/S015/S015.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/S015/S015.go @@ -5,7 +5,6 @@ package S015 import ( "go/ast" - "regexp" "strings" "golang.org/x/tools/go/analysis" @@ -37,8 +36,6 @@ func run(pass *analysis.Pass) (interface{}, error) { ignorer := pass.ResultOf[commentignore.Analyzer].(*commentignore.Ignorer) schemamapcompositelits := pass.ResultOf[schemamapcompositelit.Analyzer].([]*ast.CompositeLit) - attributeNameRegex := regexp.MustCompile(`^[a-z0-9_]+$`) - for _, smap := range schemamapcompositelits { if ignorer.ShouldIgnore(analyzerName, smap) { continue @@ -51,7 +48,7 @@ func run(pass *analysis.Pass) (interface{}, error) { case *ast.BasicLit: value := strings.Trim(t.Value, `"`) - if !attributeNameRegex.MatchString(value) { + if !schema.AttributeNameRegexp.MatchString(value) { pass.Reportf(t.Pos(), "%s: schema attribute names should only be lowercase alphanumeric characters or underscores", analyzerName) } } diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S035/README.md b/vendor/github.com/bflad/tfproviderlint/passes/S035/README.md new file mode 100644 index 00000000000..28233004e70 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/S035/README.md @@ -0,0 +1,32 @@ +# S035 + +The S035 analyzer reports cases of Schemas which include `AtLeastOneOf` and have invalid schema attribute references. + +NOTE: This only verifies the syntax of attribute references. The Terraform Plugin SDK can unit test attribute references to verify the references against the full schema. + +## Flagged Code + +```go +&schema.Schema{ + AtLeastOneOf: []string{"config_block_attr.nested_attr"}, +} +``` + +## Passing Code + +```go +&schema.Schema{ + AtLeastOneOf: []string{"config_block_attr.0.nested_attr"}, +} +``` + +## Ignoring Reports + +Singular reports can be ignored by adding the a `//lintignore:S035` Go code comment at the end of the offending line or on the line immediately proceding, e.g. + +```go +//lintignore:S035 +&schema.Schema{ + AtLeastOneOf: []string{"config_block_attr.nested_attr"}, +} +``` diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S035/S035.go b/vendor/github.com/bflad/tfproviderlint/passes/S035/S035.go new file mode 100644 index 00000000000..48a5747322e --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/S035/S035.go @@ -0,0 +1,8 @@ +package S035 + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" +) + +var Analyzer = analysisutils.SchemaAttributeReferencesAnalyzer("S035", schema.SchemaFieldAtLeastOneOf) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S036/README.md b/vendor/github.com/bflad/tfproviderlint/passes/S036/README.md new file mode 100644 index 00000000000..1b00945d4e6 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/S036/README.md @@ -0,0 +1,32 @@ +# S036 + +The S036 analyzer reports cases of Schemas which include `ConflictsWith` and have invalid schema attribute references. + +NOTE: This only verifies the syntax of attribute references. The Terraform Plugin SDK can unit test attribute references to verify the references against the full schema. + +## Flagged Code + +```go +&schema.Schema{ + ConflictsWith: []string{"config_block_attr.nested_attr"}, +} +``` + +## Passing Code + +```go +&schema.Schema{ + ConflictsWith: []string{"config_block_attr.0.nested_attr"}, +} +``` + +## Ignoring Reports + +Singular reports can be ignored by adding the a `//lintignore:S036` Go code comment at the end of the offending line or on the line immediately proceding, e.g. + +```go +//lintignore:S036 +&schema.Schema{ + ConflictsWith: []string{"config_block_attr.nested_attr"}, +} +``` diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S036/S036.go b/vendor/github.com/bflad/tfproviderlint/passes/S036/S036.go new file mode 100644 index 00000000000..8121a618d72 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/S036/S036.go @@ -0,0 +1,8 @@ +package S036 + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" +) + +var Analyzer = analysisutils.SchemaAttributeReferencesAnalyzer("S036", schema.SchemaFieldConflictsWith) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S037/README.md b/vendor/github.com/bflad/tfproviderlint/passes/S037/README.md new file mode 100644 index 00000000000..ff3ed84139f --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/S037/README.md @@ -0,0 +1,32 @@ +# S037 + +The S037 analyzer reports cases of Schemas which include `ExactlyOneOf` and have invalid schema attribute references. + +NOTE: This only verifies the syntax of attribute references. The Terraform Plugin SDK can unit test attribute references to verify the references against the full schema. + +## Flagged Code + +```go +&schema.Schema{ + ExactlyOneOf: []string{"config_block_attr.nested_attr"}, +} +``` + +## Passing Code + +```go +&schema.Schema{ + ExactlyOneOf: []string{"config_block_attr.0.nested_attr"}, +} +``` + +## Ignoring Reports + +Singular reports can be ignored by adding the a `//lintignore:S037` Go code comment at the end of the offending line or on the line immediately proceding, e.g. + +```go +//lintignore:S037 +&schema.Schema{ + ExactlyOneOf: []string{"config_block_attr.nested_attr"}, +} +``` diff --git a/vendor/github.com/bflad/tfproviderlint/passes/S037/S037.go b/vendor/github.com/bflad/tfproviderlint/passes/S037/S037.go new file mode 100644 index 00000000000..aa9ebe5e135 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/S037/S037.go @@ -0,0 +1,8 @@ +package S037 + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" +) + +var Analyzer = analysisutils.SchemaAttributeReferencesAnalyzer("S037", schema.SchemaFieldExactlyOneOf) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V002/V002.go b/vendor/github.com/bflad/tfproviderlint/passes/V002/V002.go index 31ba026efb2..24aaec9e898 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V002/V002.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V002/V002.go @@ -9,8 +9,8 @@ import ( var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( "V002", cidrnetworkselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameCIDRNetwork, - validation.PackageName, + validation.PackagePath, validation.FuncNameIsCIDRNetwork, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V003/V003.go b/vendor/github.com/bflad/tfproviderlint/passes/V003/V003.go index 30e13cc4e2c..75b361e3894 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V003/V003.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V003/V003.go @@ -3,14 +3,16 @@ package V003 import ( "github.com/bflad/tfproviderlint/helper/analysisutils" "github.com/bflad/tfproviderlint/helper/terraformtype/helper/validation" + "github.com/bflad/tfproviderlint/passes/helper/validation/iprangecallexpr" "github.com/bflad/tfproviderlint/passes/helper/validation/iprangeselectorexpr" ) -var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( +var Analyzer = analysisutils.DeprecatedEmptyCallExprWithReplacementSelectorExprAnalyzer( "V003", + iprangecallexpr.Analyzer, iprangeselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameIPRange, - validation.PackageName, + validation.PackagePath, validation.FuncNameIsIPv4Range, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V004/V004.go b/vendor/github.com/bflad/tfproviderlint/passes/V004/V004.go index b06d59e9194..50b1a20da02 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V004/V004.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V004/V004.go @@ -3,14 +3,16 @@ package V004 import ( "github.com/bflad/tfproviderlint/helper/analysisutils" "github.com/bflad/tfproviderlint/helper/terraformtype/helper/validation" + "github.com/bflad/tfproviderlint/passes/helper/validation/singleipcallexpr" "github.com/bflad/tfproviderlint/passes/helper/validation/singleipselectorexpr" ) -var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( +var Analyzer = analysisutils.DeprecatedEmptyCallExprWithReplacementSelectorExprAnalyzer( "V004", + singleipcallexpr.Analyzer, singleipselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameSingleIP, - validation.PackageName, + validation.PackagePath, validation.FuncNameIsIPAddress, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V005/V005.go b/vendor/github.com/bflad/tfproviderlint/passes/V005/V005.go index 8483ed115ef..1336a2faef3 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V005/V005.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V005/V005.go @@ -9,8 +9,8 @@ import ( var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( "V005", validatejsonstringselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameValidateJsonString, - validation.PackageName, + validation.PackagePath, validation.FuncNameStringIsJSON, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V006/V006.go b/vendor/github.com/bflad/tfproviderlint/passes/V006/V006.go index 1e1ae4e2940..96f54bf8c62 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V006/V006.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V006/V006.go @@ -9,8 +9,8 @@ import ( var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( "V006", validatelistuniquestringsselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameValidateListUniqueStrings, - validation.PackageName, + validation.PackagePath, validation.FuncNameListOfUniqueStrings, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V007/V007.go b/vendor/github.com/bflad/tfproviderlint/passes/V007/V007.go index 1fc49fc4801..da36c8e601e 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V007/V007.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V007/V007.go @@ -9,8 +9,8 @@ import ( var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( "V007", validateregexpselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameValidateRegexp, - validation.PackageName, + validation.PackagePath, validation.FuncNameStringIsValidRegExp, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/V008/V008.go b/vendor/github.com/bflad/tfproviderlint/passes/V008/V008.go index 0644b8a5f1a..4a925a19a32 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/V008/V008.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/V008/V008.go @@ -9,8 +9,8 @@ import ( var Analyzer = analysisutils.DeprecatedWithReplacementSelectorExprAnalyzer( "V008", validaterfc3339timestringselectorexpr.Analyzer, - validation.PackageName, + validation.PackagePath, validation.FuncNameValidateRFC3339TimeString, - validation.PackageName, + validation.PackagePath, validation.FuncNameIsRFC3339Time, ) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/checks.go b/vendor/github.com/bflad/tfproviderlint/passes/checks.go index 76e26ee4594..e42e9570cb8 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/checks.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/checks.go @@ -57,6 +57,9 @@ import ( "github.com/bflad/tfproviderlint/passes/S032" "github.com/bflad/tfproviderlint/passes/S033" "github.com/bflad/tfproviderlint/passes/S034" + "github.com/bflad/tfproviderlint/passes/S035" + "github.com/bflad/tfproviderlint/passes/S036" + "github.com/bflad/tfproviderlint/passes/S037" "github.com/bflad/tfproviderlint/passes/V001" "github.com/bflad/tfproviderlint/passes/V002" "github.com/bflad/tfproviderlint/passes/V003" @@ -128,6 +131,9 @@ var AllChecks = []*analysis.Analyzer{ S032.Analyzer, S033.Analyzer, S034.Analyzer, + S035.Analyzer, + S036.Analyzer, + S037.Analyzer, V001.Analyzer, V002.Analyzer, V003.Analyzer, diff --git a/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/crudfuncinfo/crudfuncinfo.go b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/crudfuncinfo/crudfuncinfo.go index d176266b1ad..9ad00f0092c 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/crudfuncinfo/crudfuncinfo.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/crudfuncinfo/crudfuncinfo.go @@ -40,11 +40,11 @@ func run(pass *analysis.Pass) (interface{}, error) { return } - if !astutils.IsFieldListType(funcType.Params, 1, astutils.IsFunctionParameterTypeInterface) { + if !astutils.IsFieldListType(funcType.Params, 1, astutils.IsExprTypeInterface) { return } - if !astutils.IsFieldListType(funcType.Results, 0, astutils.IsFunctionParameterTypeError) { + if !astutils.IsFieldListType(funcType.Results, 0, astutils.IsExprTypeError) { return } diff --git a/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialcallexpr/resourcedatapartialcallexpr.go b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialcallexpr/resourcedatapartialcallexpr.go new file mode 100644 index 00000000000..6129b217472 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialcallexpr/resourcedatapartialcallexpr.go @@ -0,0 +1,14 @@ +package resourcedatapartialcallexpr + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" +) + +var Analyzer = analysisutils.ReceiverMethodCallExprAnalyzer( + "resourcedatapartialcallexpr", + schema.IsReceiverMethod, + schema.PackagePath, + schema.TypeNameResourceData, + "Partial", +) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialcallexpr/resourcedatasetpartialcallexpr.go b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialcallexpr/resourcedatasetpartialcallexpr.go new file mode 100644 index 00000000000..e01d742eab2 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialcallexpr/resourcedatasetpartialcallexpr.go @@ -0,0 +1,14 @@ +package resourcedatasetpartialcallexpr + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/schema" +) + +var Analyzer = analysisutils.ReceiverMethodCallExprAnalyzer( + "resourcedatasetpartialcallexpr", + schema.IsReceiverMethod, + schema.PackagePath, + schema.TypeNameResourceData, + "SetPartial", +) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/schemavalidatefuncinfo/schemavalidatefuncinfo.go b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/schemavalidatefuncinfo/schemavalidatefuncinfo.go index 92c577e16dc..5af0f0b6beb 100644 --- a/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/schemavalidatefuncinfo/schemavalidatefuncinfo.go +++ b/vendor/github.com/bflad/tfproviderlint/passes/helper/schema/schemavalidatefuncinfo/schemavalidatefuncinfo.go @@ -36,19 +36,19 @@ func run(pass *analysis.Pass) (interface{}, error) { return } - if !astutils.IsFieldListType(funcType.Params, 0, astutils.IsFunctionParameterTypeInterface) { + if !astutils.IsFieldListType(funcType.Params, 0, astutils.IsExprTypeInterface) { return } - if !astutils.IsFieldListType(funcType.Params, 1, astutils.IsFunctionParameterTypeString) { + if !astutils.IsFieldListType(funcType.Params, 1, astutils.IsExprTypeString) { return } - if !astutils.IsFieldListType(funcType.Results, 0, astutils.IsFunctionParameterTypeArrayString) { + if !astutils.IsFieldListType(funcType.Results, 0, astutils.IsExprTypeArrayString) { return } - if !astutils.IsFieldListType(funcType.Results, 1, astutils.IsFunctionParameterTypeArrayError) { + if !astutils.IsFieldListType(funcType.Results, 1, astutils.IsExprTypeArrayError) { return } diff --git a/vendor/github.com/bflad/tfproviderlint/passes/helper/validation/iprangecallexpr/iprangecallexpr.go b/vendor/github.com/bflad/tfproviderlint/passes/helper/validation/iprangecallexpr/iprangecallexpr.go new file mode 100644 index 00000000000..5f2f556173a --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/helper/validation/iprangecallexpr/iprangecallexpr.go @@ -0,0 +1,13 @@ +package iprangecallexpr + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/validation" +) + +var Analyzer = analysisutils.FunctionCallExprAnalyzer( + "iprangecallexpr", + validation.IsFunc, + validation.PackagePath, + validation.FuncNameIPRange, +) diff --git a/vendor/github.com/bflad/tfproviderlint/passes/helper/validation/singleipcallexpr/singleipcallexpr.go b/vendor/github.com/bflad/tfproviderlint/passes/helper/validation/singleipcallexpr/singleipcallexpr.go new file mode 100644 index 00000000000..6ddd27af991 --- /dev/null +++ b/vendor/github.com/bflad/tfproviderlint/passes/helper/validation/singleipcallexpr/singleipcallexpr.go @@ -0,0 +1,13 @@ +package singleipcallexpr + +import ( + "github.com/bflad/tfproviderlint/helper/analysisutils" + "github.com/bflad/tfproviderlint/helper/terraformtype/helper/validation" +) + +var Analyzer = analysisutils.FunctionCallExprAnalyzer( + "singleipcallexpr", + validation.IsFunc, + validation.PackagePath, + validation.FuncNameSingleIP, +) diff --git a/vendor/github.com/bflad/tfproviderlint/version/version.go b/vendor/github.com/bflad/tfproviderlint/version/version.go index 7a916a9802f..e167f14be56 100644 --- a/vendor/github.com/bflad/tfproviderlint/version/version.go +++ b/vendor/github.com/bflad/tfproviderlint/version/version.go @@ -10,7 +10,7 @@ var ( GitCommit string // The main version number that is being run at the moment. - Version = "0.11.0" + Version = "0.13.0" // 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/bombsimon/wsl/v2/go.mod b/vendor/github.com/bombsimon/wsl/v2/go.mod deleted file mode 100644 index 65385792959..00000000000 --- a/vendor/github.com/bombsimon/wsl/v2/go.mod +++ /dev/null @@ -1,12 +0,0 @@ -module github.com/bombsimon/wsl/v2 - -go 1.12 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kr/pretty v0.1.0 // indirect - github.com/stretchr/testify v1.4.0 - golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/yaml.v2 v2.2.5 // indirect -) diff --git a/vendor/github.com/bombsimon/wsl/v2/go.sum b/vendor/github.com/bombsimon/wsl/v2/go.sum deleted file mode 100644 index 0f5bdd5d162..00000000000 --- a/vendor/github.com/bombsimon/wsl/v2/go.sum +++ /dev/null @@ -1,30 +0,0 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a h1:3IG7HNvPBDvrxpnTWA6zpeNCS5ydX6cdt6oOiGlC8qg= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/bombsimon/wsl/v2/.gitignore b/vendor/github.com/bombsimon/wsl/v3/.gitignore similarity index 100% rename from vendor/github.com/bombsimon/wsl/v2/.gitignore rename to vendor/github.com/bombsimon/wsl/v3/.gitignore diff --git a/vendor/github.com/bombsimon/wsl/v2/.travis.yml b/vendor/github.com/bombsimon/wsl/v3/.travis.yml similarity index 100% rename from vendor/github.com/bombsimon/wsl/v2/.travis.yml rename to vendor/github.com/bombsimon/wsl/v3/.travis.yml diff --git a/vendor/github.com/bombsimon/wsl/v2/LICENSE b/vendor/github.com/bombsimon/wsl/v3/LICENSE similarity index 100% rename from vendor/github.com/bombsimon/wsl/v2/LICENSE rename to vendor/github.com/bombsimon/wsl/v3/LICENSE diff --git a/vendor/github.com/bombsimon/wsl/v2/README.md b/vendor/github.com/bombsimon/wsl/v3/README.md similarity index 96% rename from vendor/github.com/bombsimon/wsl/v2/README.md rename to vendor/github.com/bombsimon/wsl/v3/README.md index a8dfb5a85ed..c5068a8acf1 100644 --- a/vendor/github.com/bombsimon/wsl/v2/README.md +++ b/vendor/github.com/bombsimon/wsl/v3/README.md @@ -70,7 +70,7 @@ test files, use `-n` or `--no-test`. The recommended command is: ```sh -golangci-lint --disable-all --enable wsl +golangci-lint run --disable-all --enable wsl ``` For more information, please refer to @@ -109,6 +109,7 @@ feel free to raise an [issue](https://github.com/bombsimon/wsl/issues/new). * [If statements should only be cuddled with assignments used in the if statement itself](doc/rules.md#if-statements-should-only-be-cuddled-with-assignments-used-in-the-if-statement-itself) +* [If statements that check an error must be cuddled with the statement that assigned the error](doc/rules.md#if-statements-that-check-an-error-must-be-cuddled-with-the-statement-that-assigned-the-error) * [Only cuddled expressions if assigning variable or using from line above](doc/rules.md#only-cuddled-expressions-if-assigning-variable-or-using-from-line-above) * [Only one cuddle assignment allowed before defer statement](doc/rules.md#only-one-cuddle-assignment-allowed-before-defer-statement) diff --git a/vendor/github.com/bombsimon/wsl/v3/go.mod b/vendor/github.com/bombsimon/wsl/v3/go.mod new file mode 100644 index 00000000000..0c325eda1d8 --- /dev/null +++ b/vendor/github.com/bombsimon/wsl/v3/go.mod @@ -0,0 +1,12 @@ +module github.com/bombsimon/wsl/v3 + +go 1.12 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/stretchr/testify v1.5.1 + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + gopkg.in/yaml.v2 v2.2.8 // indirect +) diff --git a/vendor/github.com/bombsimon/wsl/v3/go.sum b/vendor/github.com/bombsimon/wsl/v3/go.sum new file mode 100644 index 00000000000..3bdb592470e --- /dev/null +++ b/vendor/github.com/bombsimon/wsl/v3/go.sum @@ -0,0 +1,25 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/bombsimon/wsl/v2/wsl.go b/vendor/github.com/bombsimon/wsl/v3/wsl.go similarity index 76% rename from vendor/github.com/bombsimon/wsl/v2/wsl.go rename to vendor/github.com/bombsimon/wsl/v3/wsl.go index ea8d4eb5c76..3b4a4e9a1a4 100644 --- a/vendor/github.com/bombsimon/wsl/v2/wsl.go +++ b/vendor/github.com/bombsimon/wsl/v3/wsl.go @@ -10,6 +10,49 @@ import ( "strings" ) +// Error reason strings +const ( + reasonMustCuddleErrCheck = "if statements that check an error must be cuddled with the statement that assigned the error" + reasonOnlyCuddleIfWithAssign = "if statements should only be cuddled with assignments" + reasonOnlyOneCuddle = "only one cuddle assignment allowed before if statement" + reasonOnlyCuddleWithUsedAssign = "if statements should only be cuddled with assignments used in the if statement itself" + reasonOnlyCuddle2LineReturn = "return statements should not be cuddled if block has more than two lines" + reasonMultiLineBranchCuddle = "branch statements should not be cuddled if block has more than two lines" + reasonAppendCuddledWithoutUse = "append only allowed to cuddle with appended value" + reasonAssignsCuddleAssign = "assignments should only be cuddled with other assignments" + reasonNeverCuddleDeclare = "declarations should never be cuddled" + reasonExpressionCuddledWithDeclOrRet = "expressions should not be cuddled with declarations or returns" + reasonExpressionCuddledWithBlock = "expressions should not be cuddled with blocks" + reasonExprCuddlingNonAssignedVar = "only cuddled expressions if assigning variable or using from line above" + reasonOneCuddleBeforeRange = "only one cuddle assignment allowed before range statement" + reasonRangeCuddledWithoutUse = "ranges should only be cuddled with assignments used in the iteration" + reasonOneCuddleBeforeDefer = "only one cuddle assignment allowed before defer statement" + reasonDeferCuddledWithOtherVar = "defer statements should only be cuddled with expressions on same variable" + reasonForWithoutCondition = "for statement without condition should never be cuddled" + reasonForWithMoreThanOneCuddle = "only one cuddle assignment allowed before for statement" + reasonForCuddledAssignWithoutUse = "for statements should only be cuddled with assignments used in the iteration" + reasonOneCuddleBeforeGo = "only one cuddle assignment allowed before go statement" + reasonGoFuncWithoutAssign = "go statements can only invoke functions assigned on line above" + reasonSwitchManyCuddles = "only one cuddle assignment allowed before switch statement" + reasonAnonSwitchCuddled = "anonymous switch statements should never be cuddled" + reasonSwitchCuddledWithoutUse = "switch statements should only be cuddled with variables switched" + reasonTypeSwitchTooCuddled = "only one cuddle assignment allowed before type switch statement" + reasonTypeSwitchCuddledWithoutUse = "type switch statements should only be cuddled with variables switched" + reasonBlockStartsWithWS = "block should not start with a whitespace" + reasonBlockEndsWithWS = "block should not end with a whitespace (or comment)" + reasonCaseBlockTooCuddly = "case block should end with newline at this size" +) + +// Warning strings +const ( + warnTypeNotImplement = "type not implemented" + warnStmtNotImplemented = "stmt type not implemented" + warnBodyStmtTypeNotImplemented = "body statement type not implemented " + warnWSNodeTypeNotImplemented = "whitespace node type not implemented " + warnUnknownLHS = "UNKNOWN LHS" + warnUnknownRHS = "UNKNOWN RHS" +) + type Configuration struct { // StrictAppend will do strict checking when assigning from append (x = // append(x, y)). If this is set to true the append call must append either @@ -52,11 +95,21 @@ type Configuration struct { // If the number of lines in a case block is equal to or lager than this // number, the case *must* end white a newline. - CaseForceTrailingWhitespaceLimit int + ForceCaseTrailingWhitespaceLimit int // AllowTrailingComment will allow blocks to end with comments. AllowTrailingComment bool + // AllowSeparatedLeadingComment will allow multiple comments in the + // beginning of a block separated with newline. Example: + // func () { + // // Comment one + // + // // Comment two + // fmt.Println("x") + // } + AllowSeparatedLeadingComment bool + // AllowCuddleDeclaration will allow multiple var/declaration statements to // be cuddled. This defaults to false but setting it to true will enable the // following example: @@ -79,6 +132,23 @@ type Configuration struct { // allow := thisAssignment() // mu.Unlock() AllowCuddleWithRHS []string + + // ForceCuddleErrCheckAndAssign will cause an error when an If statement that + // checks an error variable doesn't cuddle with the assignment of that variable. + // This defaults to false but setting it to true will cause the following + // to generate an error: + // + // err := ProduceError() + // + // if err != nil { + // return err + // } + ForceCuddleErrCheckAndAssign bool + + // When ForceCuddleErrCheckAndAssign is enabled this is a list of names + // used for error variables to check for in the conditional. + // Defaults to just "err" + ErrorVariableNames []string } // DefaultConfig returns default configuration @@ -88,9 +158,12 @@ func DefaultConfig() Configuration { AllowAssignAndCallCuddle: true, AllowMultiLineAssignCuddle: true, AllowTrailingComment: false, - CaseForceTrailingWhitespaceLimit: 0, + AllowSeparatedLeadingComment: false, + ForceCuddleErrCheckAndAssign: false, + ForceCaseTrailingWhitespaceLimit: 0, AllowCuddleWithCalls: []string{"Lock", "RLock"}, AllowCuddleWithRHS: []string{"Unlock", "RUnlock"}, + ErrorVariableNames: []string{"err"}, } } @@ -170,7 +243,7 @@ func (p *Processor) process(filename string, data []byte) { // `go fmt` will handle proper spacing for GenDecl such as imports, // constants etc. default: - p.addWarning("type not implemented", d.Pos(), v) + p.addWarning(warnTypeNotImplement, d.Pos(), v) } } } @@ -211,14 +284,15 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { } previousStatement := statements[i-1] + cuddledWithLastStmt := p.nodeEnd(previousStatement) == p.nodeStart(stmt)-1 - // If the last statement didn't end one line above the current statement - // we know we're not cuddled so just move on. - if p.nodeEnd(previousStatement) != p.nodeStart(stmt)-1 { + // If we're not cuddled and we don't need to enforce err-check cuddling + // then we can bail out here + if !cuddledWithLastStmt && !p.config.ForceCuddleErrCheckAndAssign { continue } - // We know we're cuddled, extract assigned variables on the line above + // Extract assigned variables on the line above // which is the only thing we allow cuddling with. If the assignment is // made over multiple lines we should not allow cuddling. var assignedOnLineAbove []string @@ -228,18 +302,18 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { var calledOnLineAbove []string // Check if the previous statement spans over multiple lines. - var isMultiLineAssignment = p.nodeStart(previousStatement) != p.nodeStart(stmt)-1 + var cuddledWithMultiLineAssignment = cuddledWithLastStmt && p.nodeStart(previousStatement) != p.nodeStart(stmt)-1 // Ensure previous line is not a multi line assignment and if not get // rightAndLeftHandSide assigned variables. - if !isMultiLineAssignment { + if !cuddledWithMultiLineAssignment { assignedOnLineAbove = p.findLHS(previousStatement) calledOnLineAbove = p.findRHS(previousStatement) } // If previous assignment is multi line and we allow it, fetch // assignments (but only assignments). - if isMultiLineAssignment && p.config.AllowMultiLineAssignCuddle { + if cuddledWithMultiLineAssignment && p.config.AllowMultiLineAssignCuddle { if _, ok := previousStatement.(*ast.AssignStmt); ok { assignedOnLineAbove = p.findLHS(previousStatement) } @@ -300,15 +374,49 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { return false } + // If it's not an if statement and we're not cuddled move on. The only + // reason we need to keep going for if statements is to check if we + // should be cuddled with an error check. + if _, ok := stmt.(*ast.IfStmt); !ok { + if !cuddledWithLastStmt { + continue + } + } + switch t := stmt.(type) { case *ast.IfStmt: + checkingErrInitializedInline := func() bool { + if t.Init == nil { + return false + } + + // Variables were initialized inline in the if statement + // Let's make sure it's the err just to be safe + return atLeastOneInListsMatch(p.findLHS(t.Init), p.config.ErrorVariableNames) + } + + if !cuddledWithLastStmt { + checkingErr := atLeastOneInListsMatch(rightAndLeftHandSide, p.config.ErrorVariableNames) + if checkingErr { + if checkingErrInitializedInline() { + continue + } + + if atLeastOneInListsMatch(assignedOnLineAbove, p.config.ErrorVariableNames) { + p.addError(t.Pos(), reasonMustCuddleErrCheck) + } + } + + continue + } + if len(assignedOnLineAbove) == 0 { - p.addError(t.Pos(), "if statements should only be cuddled with assignments") + p.addError(t.Pos(), reasonOnlyCuddleIfWithAssign) continue } if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before if statement") + p.addError(t.Pos(), reasonOnlyOneCuddle) continue } @@ -320,26 +428,26 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { continue } - p.addError(t.Pos(), "if statements should only be cuddled with assignments used in the if statement itself") + p.addError(t.Pos(), reasonOnlyCuddleWithUsedAssign) case *ast.ReturnStmt: if isLastStatementInBlockOfOnlyTwoLines() { continue } - p.addError(t.Pos(), "return statements should not be cuddled if block has more than two lines") + p.addError(t.Pos(), reasonOnlyCuddle2LineReturn) case *ast.BranchStmt: if isLastStatementInBlockOfOnlyTwoLines() { continue } - p.addError(t.Pos(), "branch statements should not be cuddled if block has more than two lines") + p.addError(t.Pos(), reasonMultiLineBranchCuddle) case *ast.AssignStmt: // append is usually an assignment but should not be allowed to be // cuddled with anything not appended. if len(rightHandSide) > 0 && rightHandSide[len(rightHandSide)-1] == "append" { if p.config.StrictAppend { if !atLeastOneInListsMatch(calledOrAssignedOnLineAbove, rightHandSide) { - p.addError(t.Pos(), "append only allowed to cuddle with appended value") + p.addError(t.Pos(), reasonAppendCuddledWithoutUse) } } @@ -362,17 +470,17 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { } } - p.addError(t.Pos(), "assignments should only be cuddled with other assignments") + p.addError(t.Pos(), reasonAssignsCuddleAssign) case *ast.DeclStmt: if !p.config.AllowCuddleDeclaration { - p.addError(t.Pos(), "declarations should never be cuddled") + p.addError(t.Pos(), reasonNeverCuddleDeclare) } case *ast.ExprStmt: switch previousStatement.(type) { case *ast.DeclStmt, *ast.ReturnStmt: - p.addError(t.Pos(), "expressions should not be cuddled with declarations or returns") + p.addError(t.Pos(), reasonExpressionCuddledWithDeclOrRet) case *ast.IfStmt, *ast.RangeStmt, *ast.SwitchStmt: - p.addError(t.Pos(), "expressions should not be cuddled with blocks") + p.addError(t.Pos(), reasonExpressionCuddledWithBlock) } // If the expression is called on a type or variable used or @@ -390,17 +498,17 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { // If we assigned variables on the line above but didn't use them in // this expression there should probably be a newline between them. if len(assignedOnLineAbove) > 0 && !atLeastOneInListsMatch(rightAndLeftHandSide, assignedOnLineAbove) { - p.addError(t.Pos(), "only cuddled expressions if assigning variable or using from line above") + p.addError(t.Pos(), reasonExprCuddlingNonAssignedVar) } case *ast.RangeStmt: if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before range statement") + p.addError(t.Pos(), reasonOneCuddleBeforeRange) continue } if !atLeastOneInListsMatch(rightAndLeftHandSide, assignedOnLineAbove) { if !atLeastOneInListsMatch(assignedOnLineAbove, assignedFirstInBlock) { - p.addError(t.Pos(), "ranges should only be cuddled with assignments used in the iteration") + p.addError(t.Pos(), reasonRangeCuddledWithoutUse) } } case *ast.DeferStmt: @@ -429,7 +537,7 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { } if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before defer statement") + p.addError(t.Pos(), reasonOneCuddleBeforeDefer) continue } @@ -443,17 +551,17 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { } if !atLeastOneInListsMatch(rightAndLeftHandSide, assignedOnLineAbove) { - p.addError(t.Pos(), "defer statements should only be cuddled with expressions on same variable") + p.addError(t.Pos(), reasonDeferCuddledWithOtherVar) } case *ast.ForStmt: if len(rightAndLeftHandSide) == 0 { - p.addError(t.Pos(), "for statement without condition should never be cuddled") + p.addError(t.Pos(), reasonForWithoutCondition) continue } if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before for statement") + p.addError(t.Pos(), reasonForWithMoreThanOneCuddle) continue } @@ -463,7 +571,7 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { // first line in the block for details. if !atLeastOneInListsMatch(rightAndLeftHandSide, assignedOnLineAbove) { if !atLeastOneInListsMatch(assignedOnLineAbove, assignedFirstInBlock) { - p.addError(t.Pos(), "for statements should only be cuddled with assignments used in the iteration") + p.addError(t.Pos(), reasonForCuddledAssignWithoutUse) } } case *ast.GoStmt: @@ -472,31 +580,31 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { } if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before go statement") + p.addError(t.Pos(), reasonOneCuddleBeforeGo) continue } if !atLeastOneInListsMatch(rightAndLeftHandSide, assignedOnLineAbove) { - p.addError(t.Pos(), "go statements can only invoke functions assigned on line above") + p.addError(t.Pos(), reasonGoFuncWithoutAssign) } case *ast.SwitchStmt: if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before switch statement") + p.addError(t.Pos(), reasonSwitchManyCuddles) continue } if !atLeastOneInListsMatch(rightAndLeftHandSide, assignedOnLineAbove) { if len(rightAndLeftHandSide) == 0 { - p.addError(t.Pos(), "anonymous switch statements should never be cuddled") + p.addError(t.Pos(), reasonAnonSwitchCuddled) } else { - p.addError(t.Pos(), "switch statements should only be cuddled with variables switched") + p.addError(t.Pos(), reasonSwitchCuddledWithoutUse) } } case *ast.TypeSwitchStmt: if moreThanOneStatementAbove() { - p.addError(t.Pos(), "only one cuddle assignment allowed before type switch statement") + p.addError(t.Pos(), reasonTypeSwitchTooCuddled) continue } @@ -506,7 +614,7 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { // Allow type assertion on variables used in the first case // immediately. if !atLeastOneInListsMatch(assignedOnLineAbove, assignedFirstInBlock) { - p.addError(t.Pos(), "type switch statements should only be cuddled with variables switched") + p.addError(t.Pos(), reasonTypeSwitchCuddledWithoutUse) } } case *ast.CaseClause, *ast.CommClause: @@ -514,7 +622,7 @@ func (p *Processor) parseBlockStatements(statements []ast.Stmt) { // whitespaces within the block. There's nothing in the case itself // that may be cuddled. default: - p.addWarning("stmt type not implemented", t.Pos(), t) + p.addWarning(warnStmtNotImplemented, t.Pos(), t) } } } @@ -572,7 +680,7 @@ func (p *Processor) firstBodyStatement(i int, allStmt []ast.Stmt) ast.Node { p.parseBlockStatements(statementBodyContent) default: p.addWarning( - "body statement type not implemented ", + warnBodyStmtTypeNotImplemented, stmt.Pos(), statementBodyContent, ) } @@ -633,7 +741,7 @@ func (p *Processor) findLHS(node ast.Node) []string { return p.findLHS(x) } - p.addWarning("UNKNOWN LHS", t.Pos(), t) + p.addWarning(warnUnknownLHS, t.Pos(), t) } return lhs @@ -715,7 +823,7 @@ func (p *Processor) findRHS(node ast.Node) []string { return p.findRHS(x) } - p.addWarning("UNKNOWN RHS", t.Pos(), t) + p.addWarning(warnUnknownRHS, t.Pos(), t) } return rhs @@ -825,7 +933,7 @@ func (p *Processor) findLeadingAndTrailingWhitespaces(ident *ast.Ident, stmt, ne blockStatements = t.Body blockStartPos = t.Colon default: - p.addWarning("whitespace node type not implemented ", stmt.Pos(), stmt) + p.addWarning(warnWSNodeTypeNotImplemented, stmt.Pos(), stmt) return } @@ -844,8 +952,9 @@ func (p *Processor) findLeadingAndTrailingWhitespaces(ident *ast.Ident, stmt, ne } var ( - firstStatement = blockStatements[0] - lastStatement = blockStatements[len(blockStatements)-1] + firstStatement = blockStatements[0] + lastStatement = blockStatements[len(blockStatements)-1] + seenCommentGroups = 0 ) // Get the comment related to the first statement, we do allow commends in @@ -865,6 +974,10 @@ func (p *Processor) findLeadingAndTrailingWhitespaces(ident *ast.Ident, stmt, ne break } + // We store number of seen comment groups because we allow multiple + // groups with a newline between them. + seenCommentGroups++ + // Support both /* multiline */ and //single line comments for _, c := range commentGroup.List { allowedLinesBeforeFirstStatement += len(strings.Split(c.Text, "\n")) @@ -872,10 +985,17 @@ func (p *Processor) findLeadingAndTrailingWhitespaces(ident *ast.Ident, stmt, ne } } + // If we have multiple groups, add support for newline between each group. + if p.config.AllowSeparatedLeadingComment { + if seenCommentGroups > 1 { + allowedLinesBeforeFirstStatement += seenCommentGroups - 1 + } + } + if p.nodeStart(firstStatement) != blockStartLine+allowedLinesBeforeFirstStatement { p.addError( blockStartPos, - "block should not start with a whitespace", + reasonBlockStartsWithWS, ) } @@ -899,7 +1019,7 @@ func (p *Processor) findLeadingAndTrailingWhitespaces(ident *ast.Ident, stmt, ne } if p.nodeEnd(lastStatement) != blockEndLine-1 && !isExampleFunc(ident) { - p.addError(blockEndPos, "block should not end with a whitespace (or comment)") + p.addError(blockEndPos, reasonBlockEndsWithWS) } return @@ -960,10 +1080,10 @@ func (p *Processor) findLeadingAndTrailingWhitespaces(ident *ast.Ident, stmt, ne hasTrailingWhitespace := p.nodeEnd(lastStatement)+caseTrailingCommentLines != blockEndLine // If the force trailing limit is configured and we don't end with a newline. - if p.config.CaseForceTrailingWhitespaceLimit > 0 && !hasTrailingWhitespace { + if p.config.ForceCaseTrailingWhitespaceLimit > 0 && !hasTrailingWhitespace { // Check if the block size is too big to miss the newline. - if blockSize >= p.config.CaseForceTrailingWhitespaceLimit { - p.addError(lastStatement.Pos(), "case block should end with newline at this size") + if blockSize >= p.config.ForceCaseTrailingWhitespaceLimit { + p.addError(lastStatement.Pos(), reasonCaseBlockTooCuddly) } } } diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go index fdd328bb7f5..70fbda5329c 100644 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -393,7 +393,7 @@ func (p *Buffer) Bytes() []byte { return p.buf } // than relying on this API. // // If deterministic serialization is requested, map entries will be sorted -// by keys in lexographical order. This is an implementation detail and +// by keys in lexicographical order. This is an implementation detail and // subject to change. func (p *Buffer) SetDeterministic(deterministic bool) { p.deterministic = deterministic diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go index 1aaee725b45..d97f9b3563e 100644 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ b/vendor/github.com/golang/protobuf/proto/text.go @@ -456,6 +456,8 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return nil } +var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + // writeAny writes an arbitrary field. func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { v = reflect.Indirect(v) @@ -519,8 +521,8 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert // mutating this value. v = v.Addr() } - if etm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() + if v.Type().Implements(textMarshalerType) { + text, err := v.Interface().(encoding.TextMarshaler).MarshalText() if err != nil { return err } diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go index 1ded05bbe71..d371d56974b 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go @@ -1376,8 +1376,8 @@ type FileOptions struct { // determining the namespace. PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be used - // for determining the namespace. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` // Use this option to change the package of ruby generated classes. Default // is empty. When this option is not set, the package name will be used for @@ -1627,7 +1627,7 @@ type MessageOptions struct { // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as + // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax @@ -2377,7 +2377,7 @@ type SourceCodeInfo struct { // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines + // does not mean that it is a descendant. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to @@ -2718,7 +2718,9 @@ func init() { proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") } -func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) } +func init() { + proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) +} var fileDescriptor_e5baabe45344a177 = []byte{ // 2589 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto index ed08fcbc542..a2102d7aa99 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto @@ -40,6 +40,7 @@ syntax = "proto2"; package google.protobuf; + option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; @@ -59,8 +60,8 @@ message FileDescriptorSet { // Describes a complete .proto file. message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. repeated string dependency = 3; @@ -100,8 +101,8 @@ message DescriptorProto { repeated EnumDescriptorProto enum_type = 4; message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. optional ExtensionRangeOptions options = 3; } @@ -115,8 +116,8 @@ message DescriptorProto { // fields or extension ranges in the same message. Reserved ranges may // not overlap. message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. } repeated ReservedRange reserved_range = 9; // Reserved field names, which may not be used by fields in the same message. @@ -137,42 +138,42 @@ message FieldDescriptorProto { enum Type { // 0 is reserved for errors. // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; + TYPE_INT64 = 3; + TYPE_UINT64 = 4; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; // Tag-delimited aggregate. // Group type is deprecated and not supported in proto3. However, Proto3 // implementations should still be able to parse the group wire format and // treat group fields as unknown fields. - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; // Length-delimited aggregate. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - }; + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } enum Label { // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - }; + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + } optional string name = 1; optional int32 number = 3; @@ -234,8 +235,8 @@ message EnumDescriptorProto { // is inclusive such that it can appropriately represent the entire int32 // domain. message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. } // Range of reserved numeric values. Reserved numeric values may not be used @@ -276,9 +277,9 @@ message MethodDescriptorProto { optional MethodOptions options = 4; // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default=false]; + optional bool client_streaming = 5 [default = false]; // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default=false]; + optional bool server_streaming = 6 [default = false]; } @@ -314,7 +315,6 @@ message MethodDescriptorProto { // If this turns out to be popular, a web service will be set up // to automatically assign option numbers. - message FileOptions { // Sets the Java package where classes generated from this .proto will be @@ -337,7 +337,7 @@ message FileOptions { // named by java_outer_classname. However, the outer class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default=false]; + optional bool java_multiple_files = 10 [default = false]; // This option does nothing. optional bool java_generate_equals_and_hash = 20 [deprecated=true]; @@ -348,17 +348,17 @@ message FileOptions { // Message reflection will do the same. // However, an extension field still accepts non-UTF-8 byte sequences. // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default=false]; + optional bool java_string_check_utf8 = 27 [default = false]; // Generated classes can be optimized for speed or code size. enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. } - optional OptimizeMode optimize_for = 9 [default=SPEED]; + optional OptimizeMode optimize_for = 9 [default = SPEED]; // Sets the Go package where structs generated from this .proto will be // placed. If omitted, the Go package will be derived from the following: @@ -369,6 +369,7 @@ message FileOptions { + // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). @@ -379,20 +380,20 @@ message FileOptions { // that generate code specific to your particular RPC system. Therefore, // these default to false. Old code which depends on generic services should // explicitly set them to true. - optional bool cc_generic_services = 16 [default=false]; - optional bool java_generic_services = 17 [default=false]; - optional bool py_generic_services = 18 [default=false]; - optional bool php_generic_services = 42 [default=false]; + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + optional bool php_generic_services = 42 [default = false]; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default=false]; + optional bool deprecated = 23 [default = false]; // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default=false]; + optional bool cc_enable_arenas = 31 [default = false]; // Sets the objective c class prefix which is prepended to all objective c @@ -417,10 +418,9 @@ message FileOptions { // determining the namespace. optional string php_namespace = 41; - // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be used - // for determining the namespace. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. optional string php_metadata_namespace = 44; // Use this option to change the package of ruby generated classes. Default @@ -428,6 +428,7 @@ message FileOptions { // determining the ruby package. optional string ruby_package = 45; + // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999; @@ -458,18 +459,18 @@ message MessageOptions { // // Because this is an option, the above two restrictions are not enforced by // the protocol compiler. - optional bool message_set_wire_format = 1 [default=false]; + optional bool message_set_wire_format = 1 [default = false]; // Disables the generation of the standard "descriptor()" accessor, which can // conflict with a field of the same name. This is meant to make migration // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default=false]; + optional bool no_standard_descriptor_accessor = 2 [default = false]; // Is this message deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default=false]; + optional bool deprecated = 3 [default = false]; // Whether the message is an automatically generated map entry type for the // maps field. @@ -486,7 +487,7 @@ message MessageOptions { // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as + // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax @@ -497,6 +498,7 @@ message MessageOptions { reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -576,16 +578,16 @@ message FieldOptions { // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. - optional bool lazy = 5 [default=false]; + optional bool lazy = 5 [default = false]; // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields. - optional bool deprecated = 3 [default=false]; + optional bool deprecated = 3 [default = false]; // For Google-internal migration only. Do not use. - optional bool weak = 10 [default=false]; + optional bool weak = 10 [default = false]; // The parser stores options it doesn't recognize here. See above. @@ -615,7 +617,7 @@ message EnumOptions { // Depending on the target platform, this can emit Deprecated annotations // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. - optional bool deprecated = 3 [default=false]; + optional bool deprecated = 3 [default = false]; reserved 5; // javanano_as_lite @@ -631,7 +633,7 @@ message EnumValueOptions { // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default=false]; + optional bool deprecated = 1 [default = false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -651,7 +653,7 @@ message ServiceOptions { // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, // this is a formalization for deprecating services. - optional bool deprecated = 33 [default=false]; + optional bool deprecated = 33 [default = false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -671,18 +673,18 @@ message MethodOptions { // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default=false]; + optional bool deprecated = 33 [default = false]; // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects } - optional IdempotencyLevel idempotency_level = - 34 [default=IDEMPOTENCY_UNKNOWN]; + optional IdempotencyLevel idempotency_level = 34 + [default = IDEMPOTENCY_UNKNOWN]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -763,7 +765,7 @@ message SourceCodeInfo { // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines + // does not mean that it is a descendant. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to @@ -794,14 +796,14 @@ message SourceCodeInfo { // [ 4, 3, 2, 7 ] // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). - repeated int32 path = 1 [packed=true]; + repeated int32 path = 1 [packed = true]; // Always has exactly three or four elements: start line, start column, // end line (optional, otherwise assumed same as start line), end column. // These are packed into a single field for efficiency. Note that line // and column numbers are zero-based -- typically you will want to add // 1 to each before displaying to a user. - repeated int32 span = 2 [packed=true]; + repeated int32 span = 2 [packed = true]; // If this SourceCodeInfo represents a complete declaration, these are any // comments appearing before and after the declaration which appear to be @@ -866,7 +868,7 @@ message GeneratedCodeInfo { message Annotation { // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed=true]; + repeated int32 path = 1 [packed = true]; // Identifies the filesystem path to the original source .proto. optional string source_file = 2; diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go index 78ee5233495..7b0ad1ad86c 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -102,7 +102,8 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // type Any struct { // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. The last segment of the URL's path must represent + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted). @@ -181,7 +182,9 @@ func init() { proto.RegisterType((*Any)(nil), "google.protobuf.Any") } -func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) } +func init() { + proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) +} var fileDescriptor_b53526c13ae22eb4 = []byte{ // 185 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto index 49329425583..c9be8541673 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.proto @@ -121,7 +121,8 @@ option objc_class_prefix = "GPB"; // message Any { // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. The last segment of the URL's path must represent + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted). diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go index 0d681ee21a0..58b0786990d 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -41,7 +41,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { +// } else if (duration.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // } @@ -142,7 +142,9 @@ func init() { proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") } -func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) } +func init() { + proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) +} var fileDescriptor_23597b2ebd7ac6c5 = []byte{ // 190 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto index 975fce41aae..99cb102c353 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto @@ -61,7 +61,7 @@ option objc_class_prefix = "GPB"; // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { +// } else if (duration.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // } @@ -101,7 +101,6 @@ option objc_class_prefix = "GPB"; // // message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go index 31cd846de99..7a3b1e40e29 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -20,17 +20,19 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// A Timestamp represents a point in time independent of any time zone -// or calendar, represented as seconds and fractions of seconds at -// nanosecond resolution in UTC Epoch time. It is encoded using the -// Proleptic Gregorian Calendar which extends the Gregorian calendar -// backwards to year one. It is encoded assuming all minutes are 60 -// seconds long, i.e. leap seconds are "smeared" so that no leap second -// table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -// By restricting to that range, we ensure that we can convert to -// and from RFC 3339 date strings. -// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // @@ -91,12 +93,14 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // 01:30 UTC on January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the -// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted -// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) -// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one -// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D // ) to obtain a formatter capable of generating timestamps in this format. // // @@ -160,7 +164,9 @@ func init() { proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") } -func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) } +func init() { + proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) +} var fileDescriptor_292007bbfe81227e = []byte{ // 191 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto index eafb3fa03a6..cd357864a9e 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto @@ -40,17 +40,19 @@ option java_outer_classname = "TimestampProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; -// A Timestamp represents a point in time independent of any time zone -// or calendar, represented as seconds and fractions of seconds at -// nanosecond resolution in UTC Epoch time. It is encoded using the -// Proleptic Gregorian Calendar which extends the Gregorian calendar -// backwards to year one. It is encoded assuming all minutes are 60 -// seconds long, i.e. leap seconds are "smeared" so that no leap second -// table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -// By restricting to that range, we ensure that we can convert to -// and from RFC 3339 date strings. -// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // @@ -111,17 +113,18 @@ option objc_class_prefix = "GPB"; // 01:30 UTC on January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the -// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted -// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) -// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one -// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D // ) to obtain a formatter capable of generating timestamps in this format. // // message Timestamp { - // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. diff --git a/vendor/github.com/golangci/golangci-lint/pkg/commands/run.go b/vendor/github.com/golangci/golangci-lint/pkg/commands/run.go index b306802a458..4149a00c4b0 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/commands/run.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/commands/run.go @@ -30,7 +30,7 @@ func getDefaultIssueExcludeHelp() string { parts := []string{"Use or not use default excludes:"} for _, ep := range config.DefaultExcludePatterns { parts = append(parts, - fmt.Sprintf(" # %s: %s", ep.Linter, ep.Why), + fmt.Sprintf(" # %s %s: %s", ep.ID, ep.Linter, ep.Why), fmt.Sprintf(" - %s", color.YellowString(ep.Pattern)), "", ) @@ -189,6 +189,8 @@ func initFlagSet(fs *pflag.FlagSet, cfg *config.Config, m *lintersdb.Manager, is ic := &cfg.Issues fs.StringSliceVarP(&ic.ExcludePatterns, "exclude", "e", nil, wh("Exclude issue by regexp")) fs.BoolVar(&ic.UseDefaultExcludes, "exclude-use-default", true, getDefaultIssueExcludeHelp()) + fs.BoolVar(&ic.ExcludeCaseSensitive, "exclude-case-sensitive", false, wh("If set to true exclude "+ + "and exclude rules regular expressions are case sensitive")) fs.IntVar(&ic.MaxIssuesPerLinter, "max-issues-per-linter", 50, wh("Maximum issues count per one linter. Set to 0 to disable")) @@ -396,6 +398,8 @@ func (e *Executor) createPrinter() (printers.Printer, error) { p = printers.NewCodeClimate() case config.OutFormatJunitXML: p = printers.NewJunitXML() + case config.OutFormatGithubActions: + p = printers.NewGithub() default: return nil, fmt.Errorf("unknown output format %s", format) } @@ -437,7 +441,7 @@ func (e *Executor) executeRun(_ *cobra.Command, args []string) { // to be removed when deadline is finally decommissioned func (e *Executor) setTimeoutToDeadlineIfOnlyDeadlineIsSet() { //lint:ignore SA1019 We want to promoted the deprecated config value when needed - deadlineValue := e.cfg.Run.Deadline // nolint: staticcheck + deadlineValue := e.cfg.Run.Deadline // nolint:staticcheck if deadlineValue != 0 && e.cfg.Run.Timeout == defaultTimeout { e.cfg.Run.Timeout = deadlineValue } diff --git a/vendor/github.com/golangci/golangci-lint/pkg/config/config.go b/vendor/github.com/golangci/golangci-lint/pkg/config/config.go index ba92cc00e36..2315f308c1c 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/config/config.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/config/config.go @@ -15,6 +15,7 @@ const ( OutFormatCheckstyle = "checkstyle" OutFormatCodeClimate = "code-climate" OutFormatJunitXML = "junit-xml" + OutFormatGithubActions = "github-actions" ) var OutFormats = []string{ @@ -25,9 +26,11 @@ var OutFormats = []string{ OutFormatCheckstyle, OutFormatCodeClimate, OutFormatJunitXML, + OutFormatGithubActions, } type ExcludePattern struct { + ID string Pattern string Linter string Why string @@ -35,53 +38,63 @@ type ExcludePattern struct { var DefaultExcludePatterns = []ExcludePattern{ { + ID: "EXC0001", Pattern: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close" + "|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked", Linter: "errcheck", Why: "Almost all programs ignore errors on these functions and in most cases it's ok", }, { + ID: "EXC0002", Pattern: "(comment on exported (method|function|type|const)|" + "should have( a package)? comment|comment should be of the form)", Linter: "golint", Why: "Annoying issue about not having a comment. The rare codebase has such comments", }, { + ID: "EXC0003", Pattern: "func name will be used as test\\.Test.* by other packages, and that stutters; consider calling this", Linter: "golint", Why: "False positive when tests are defined in package 'test'", }, { + ID: "EXC0004", Pattern: "(possible misuse of unsafe.Pointer|should have signature)", Linter: "govet", Why: "Common false positives", }, { + ID: "EXC0005", Pattern: "ineffective break statement. Did you mean to break out of the outer loop", Linter: "staticcheck", Why: "Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore", }, { + ID: "EXC0006", Pattern: "Use of unsafe calls should be audited", Linter: "gosec", Why: "Too many false-positives on 'unsafe' usage", }, { + ID: "EXC0007", Pattern: "Subprocess launch(ed with variable|ing should be audited)", Linter: "gosec", Why: "Too many false-positives for parametrized shell calls", }, { - Pattern: "G104", + ID: "EXC0008", + Pattern: "(G104|G307)", Linter: "gosec", Why: "Duplicated errcheck checks", }, { + ID: "EXC0009", Pattern: "(Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)", Linter: "gosec", Why: "Too many issues in popular repos", }, { + ID: "EXC0010", Pattern: "Potential file inclusion via variable", Linter: "gosec", Why: "False positive is triggered by 'src, err := ioutil.ReadFile(filename)'", @@ -89,9 +102,20 @@ var DefaultExcludePatterns = []ExcludePattern{ } func GetDefaultExcludePatternsStrings() []string { + return GetExcludePatternsStrings(nil) +} + +func GetExcludePatternsStrings(include []string) []string { + includeMap := make(map[string]bool, len(include)) + for _, inc := range include { + includeMap[inc] = true + } + var ret []string for _, p := range DefaultExcludePatterns { - ret = append(ret, p.Pattern) + if !includeMap[p.ID] { + ret = append(ret, p.Pattern) + } } return ret @@ -185,17 +209,33 @@ type LintersSettings struct { RowsErrCheck struct { Packages []string } + Gomodguard struct { + Allowed struct { + Modules []string `mapstructure:"modules"` + Domains []string `mapstructure:"domains"` + } `mapstructure:"allowed"` + Blocked struct { + Modules []map[string]struct { + Recommendations []string `mapstructure:"recommendations"` + Reason string `mapstructure:"reason"` + } `mapstructure:"modules"` + } `mapstructure:"blocked"` + } - WSL WSLSettings - Lll LllSettings - Unparam UnparamSettings - Nakedret NakedretSettings - Prealloc PreallocSettings - Errcheck ErrcheckSettings - Gocritic GocriticSettings - Godox GodoxSettings - Dogsled DogsledSettings - Gocognit GocognitSettings + WSL WSLSettings + Lll LllSettings + Unparam UnparamSettings + Nakedret NakedretSettings + Prealloc PreallocSettings + Errcheck ErrcheckSettings + Gocritic GocriticSettings + Godox GodoxSettings + Dogsled DogsledSettings + Gocognit GocognitSettings + Godot GodotSettings + Testpackage TestpackageSettings + Nestif NestifSettings + NoLintLint NoLintLintSettings Custom map[string]CustomLinterSettings } @@ -268,10 +308,31 @@ type WSLSettings struct { AllowMultiLineAssignCuddle bool `mapstructure:"allow-multiline-assign"` AllowCuddleDeclaration bool `mapstructure:"allow-cuddle-declarations"` AllowTrailingComment bool `mapstructure:"allow-trailing-comment"` - CaseForceTrailingWhitespaceLimit int `mapstructure:"force-case-trailing-whitespace:"` + AllowSeparatedLeadingComment bool `mapstructure:"allow-separated-leading-comment"` + ForceCuddleErrCheckAndAssign bool `mapstructure:"force-err-cuddling"` + ForceCaseTrailingWhitespaceLimit int `mapstructure:"force-case-trailing-whitespace"` +} + +type GodotSettings struct { + CheckAll bool `mapstructure:"check-all"` +} + +type NoLintLintSettings struct { + RequireExplanation bool `mapstructure:"require-explanation"` + AllowLeadingSpace bool `mapstructure:"allow-leading-space"` + RequireSpecific bool `mapstructure:"require-specific"` + AllowNoExplanation []string `mapstructure:"allow-no-explanation"` + AllowUnused bool `mapstructure:"allow-unused"` +} + +type TestpackageSettings struct { + SkipRegexp string `mapstructure:"skip-regexp"` +} + +type NestifSettings struct { + MinComplexity int `mapstructure:"min-complexity"` } -//nolint:gomnd var defaultLintersSettings = LintersSettings{ Lll: LllSettings{ LineLength: 120, @@ -306,7 +367,21 @@ var defaultLintersSettings = LintersSettings{ AllowMultiLineAssignCuddle: true, AllowCuddleDeclaration: false, AllowTrailingComment: false, - CaseForceTrailingWhitespaceLimit: 0, + AllowSeparatedLeadingComment: false, + ForceCuddleErrCheckAndAssign: false, + ForceCaseTrailingWhitespaceLimit: 0, + }, + NoLintLint: NoLintLintSettings{ + RequireExplanation: false, + AllowLeadingSpace: true, + RequireSpecific: false, + AllowUnused: false, + }, + Testpackage: TestpackageSettings{ + SkipRegexp: `(export|internal)_test\.go`, + }, + Nestif: NestifSettings{ + MinComplexity: 5, }, } @@ -372,9 +447,11 @@ func (e ExcludeRule) Validate() error { } type Issues struct { - ExcludePatterns []string `mapstructure:"exclude"` - ExcludeRules []ExcludeRule `mapstructure:"exclude-rules"` - UseDefaultExcludes bool `mapstructure:"exclude-use-default"` + IncludeDefaultExcludes []string `mapstructure:"include"` + ExcludeCaseSensitive bool `mapstructure:"exclude-case-sensitive"` + ExcludePatterns []string `mapstructure:"exclude"` + ExcludeRules []ExcludeRule `mapstructure:"exclude-rules"` + UseDefaultExcludes bool `mapstructure:"exclude-use-default"` MaxIssuesPerLinter int `mapstructure:"max-issues-per-linter"` MaxSameIssues int `mapstructure:"max-same-issues"` diff --git a/vendor/github.com/golangci/golangci-lint/pkg/config/config_gocritic.go b/vendor/github.com/golangci/golangci-lint/pkg/config/config_gocritic.go index b8397262bb0..bbfd7bb1338 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/config/config_gocritic.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/config/config_gocritic.go @@ -15,10 +15,18 @@ import ( const gocriticDebugKey = "gocritic" -var gocriticDebugf = logutils.Debug(gocriticDebugKey) -var isGocriticDebug = logutils.HaveDebugTag(gocriticDebugKey) - -var allGocriticCheckers = lintpack.GetCheckersInfo() +var ( + gocriticDebugf = logutils.Debug(gocriticDebugKey) + isGocriticDebug = logutils.HaveDebugTag(gocriticDebugKey) + allGocriticCheckers = lintpack.GetCheckersInfo() + allGocriticCheckerMap = func() map[string]*lintpack.CheckerInfo { + checkInfoMap := make(map[string]*lintpack.CheckerInfo) + for _, checkInfo := range allGocriticCheckers { + checkInfoMap[checkInfo.Name] = checkInfo + } + return checkInfoMap + }() +) type GocriticCheckSettings map[string]interface{} @@ -26,6 +34,7 @@ type GocriticSettings struct { EnabledChecks []string `mapstructure:"enabled-checks"` DisabledChecks []string `mapstructure:"disabled-checks"` EnabledTags []string `mapstructure:"enabled-tags"` + DisabledTags []string `mapstructure:"disabled-tags"` SettingsPerCheck map[string]GocriticCheckSettings `mapstructure:"settings"` inferredEnabledChecks map[string]bool @@ -107,6 +116,8 @@ func (s *GocriticSettings) InferEnabledChecks(log logutils.Log) { debugChecksListf(disabledByDefaultChecks, "Disabled by default") var enabledChecks []string + + // EnabledTags if len(s.EnabledTags) != 0 { tagToCheckers := buildGocriticTagToCheckersMap() for _, tag := range s.EnabledTags { @@ -120,6 +131,12 @@ func (s *GocriticSettings) InferEnabledChecks(log logutils.Log) { enabledChecks = append(enabledChecks, enabledByDefaultChecks...) } + // DisabledTags + if len(s.DisabledTags) != 0 { + enabledChecks = filterByDisableTags(enabledChecks, s.DisabledTags, log) + } + + // EnabledChecks if len(s.EnabledChecks) != 0 { debugChecksListf(s.EnabledChecks, "Enabled by config") @@ -133,6 +150,7 @@ func (s *GocriticSettings) InferEnabledChecks(log logutils.Log) { } } + // DisabledChecks if len(s.DisabledChecks) != 0 { debugChecksListf(s.DisabledChecks, "Disabled by config") @@ -174,6 +192,22 @@ func validateStringsUniq(ss []string) error { return nil } +func intersectStringSlice(s1, s2 []string) []string { + s1Map := make(map[string]struct{}) + for _, s := range s1 { + s1Map[s] = struct{}{} + } + + result := make([]string, 0) + for _, s := range s2 { + if _, exists := s1Map[s]; exists { + result = append(result, s) + } + } + + return result +} + func (s *GocriticSettings) Validate(log logutils.Log) error { if len(s.EnabledTags) == 0 { if len(s.EnabledChecks) != 0 && len(s.DisabledChecks) != 0 { @@ -187,7 +221,16 @@ func (s *GocriticSettings) Validate(log logutils.Log) error { tagToCheckers := buildGocriticTagToCheckersMap() for _, tag := range s.EnabledTags { if _, ok := tagToCheckers[tag]; !ok { - return fmt.Errorf("gocritic tag %q doesn't exist", tag) + return fmt.Errorf("gocritic [enabled]tag %q doesn't exist", tag) + } + } + } + + if len(s.DisabledTags) > 0 { + tagToCheckers := buildGocriticTagToCheckersMap() + for _, tag := range s.EnabledTags { + if _, ok := tagToCheckers[tag]; !ok { + return fmt.Errorf("gocritic [disabled]tag %q doesn't exist", tag) } } } @@ -301,3 +344,24 @@ func (s *GocriticSettings) GetLowercasedParams() map[string]GocriticCheckSetting } return ret } + +func filterByDisableTags(enabledChecks, disableTags []string, log logutils.Log) []string { + enabledChecksSet := stringsSliceToSet(enabledChecks) + for _, enabledCheck := range enabledChecks { + checkInfo, checkInfoExists := allGocriticCheckerMap[enabledCheck] + if !checkInfoExists { + log.Warnf("Gocritic check %q was not exists via filtering disabled tags", enabledCheck) + continue + } + hitTags := intersectStringSlice(checkInfo.Tags, disableTags) + if len(hitTags) != 0 { + delete(enabledChecksSet, enabledCheck) + } + debugChecksListf(enabledChecks, "Disabled by config tags %s", sprintStrings(disableTags)) + } + enabledChecks = nil + for enabledCheck := range enabledChecksSet { + enabledChecks = append(enabledChecks, enabledCheck) + } + return enabledChecks +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/asciicheck.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/asciicheck.go new file mode 100644 index 00000000000..7700c33e703 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/asciicheck.go @@ -0,0 +1,19 @@ +package golinters + +import ( + "github.com/tdakkota/asciicheck" + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" +) + +func NewAsciicheck() *goanalysis.Linter { + return goanalysis.NewLinter( + "asciicheck", + "Simple linter to check that your code does not contain non-ASCII identifiers", + []*analysis.Analyzer{ + asciicheck.NewAnalyzer(), + }, + nil, + ) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/deadcode.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/deadcode.go index 9889dad4ed6..6ff38909fba 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/deadcode.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/deadcode.go @@ -28,7 +28,7 @@ func NewDeadcode() *goanalysis.Linter { } res := make([]goanalysis.Issue, 0, len(issues)) for _, i := range issues { - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: i.Pos, Text: fmt.Sprintf("%s is unused", formatCode(i.UnusedIdentName, nil)), FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/depguard.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/depguard.go index 611f6d4950b..3bd85481100 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/depguard.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/depguard.go @@ -94,7 +94,7 @@ func NewDepguard() *goanalysis.Linter { if userSuppliedMsgSuffix != "" { userSuppliedMsgSuffix = ": " + userSuppliedMsgSuffix } - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: i.Position, Text: fmt.Sprintf("%s %s%s", formatCode(i.PackageName, lintCtx.Cfg), msgSuffix, userSuppliedMsgSuffix), FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/dupl.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/dupl.go index d6dc67fbb0e..eaac928e0aa 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/dupl.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/dupl.go @@ -57,7 +57,7 @@ func NewDupl() *goanalysis.Linter { text := fmt.Sprintf("%d-%d lines are duplicate of %s", i.From.LineStart(), i.From.LineEnd(), formatCode(dupl, lintCtx.Cfg)) - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: token.Position{ Filename: i.From.Filename(), Line: i.From.LineStart(), diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/errcheck.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/errcheck.go index bf6b9a45348..7df11fc8739 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/errcheck.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/errcheck.go @@ -59,7 +59,7 @@ func NewErrcheck() *goanalysis.Linter { } else { text = "Error return value is not checked" } - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + issues = append(issues, goanalysis.NewIssue(&result.Issue{ FromLinter: linterName, Text: text, Pos: i.Pos, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/funlen.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/funlen.go index 3031da48350..29cb6b7ef70 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/funlen.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/funlen.go @@ -42,7 +42,7 @@ func NewFunlen() *goanalysis.Linter { res := make([]goanalysis.Issue, len(issues)) for k, i := range issues { - res[k] = goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res[k] = goanalysis.NewIssue(&result.Issue{ Pos: token.Position{ Filename: i.Pos.Filename, Line: i.Pos.Line, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/issue.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/issue.go index b90a2912b9a..f331a3ab9f1 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/issue.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/issue.go @@ -21,9 +21,11 @@ func NewIssue(i *result.Issue, pass *analysis.Pass) Issue { } type EncodingIssue struct { - FromLinter string - Text string - Pos token.Position - LineRange *result.Range - Replacement *result.Replacement + FromLinter string + Text string + Pos token.Position + LineRange *result.Range + Replacement *result.Replacement + ExpectNoLint bool + ExpectedNoLintLinter string } diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/linter.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/linter.go index 778a1ef60be..f1cfcca8398 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/linter.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/linter.go @@ -323,11 +323,13 @@ func saveIssuesToCache(allPkgs []*packages.Package, pkgsFromCache map[*packages. for ind := range pkgIssues { i := &pkgIssues[ind] encodedIssues = append(encodedIssues, EncodingIssue{ - FromLinter: i.FromLinter, - Text: i.Text, - Pos: i.Pos, - LineRange: i.LineRange, - Replacement: i.Replacement, + FromLinter: i.FromLinter, + Text: i.Text, + Pos: i.Pos, + LineRange: i.LineRange, + Replacement: i.Replacement, + ExpectNoLint: i.ExpectNoLint, + ExpectedNoLintLinter: i.ExpectedNoLintLinter, }) } @@ -392,12 +394,14 @@ func loadIssuesFromCache(pkgs []*packages.Package, lintCtx *linter.Context, issues := make([]result.Issue, 0, len(pkgIssues)) for _, i := range pkgIssues { issues = append(issues, result.Issue{ - FromLinter: i.FromLinter, - Text: i.Text, - Pos: i.Pos, - LineRange: i.LineRange, - Replacement: i.Replacement, - Pkg: pkg, + FromLinter: i.FromLinter, + Text: i.Text, + Pos: i.Pos, + LineRange: i.LineRange, + Replacement: i.Replacement, + Pkg: pkg, + ExpectNoLint: i.ExpectNoLint, + ExpectedNoLintLinter: i.ExpectedNoLintLinter, }) } cacheRes.issues = issues diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go index 940e005331b..64087c2833e 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner.go @@ -312,7 +312,7 @@ func (r *runner) analyze(pkgs []*packages.Package, analyzers []*analysis.Analyze debugf("There are %d initial and %d total packages", len(initialPkgs), len(loadingPackages)) for _, lp := range loadingPackages { if lp.isInitial { - wg.Add(1) //nolint:gomnd + wg.Add(1) go func(lp *loadingPackage) { lp.analyzeRecursive(r.loadMode, loadSem) wg.Done() @@ -478,6 +478,49 @@ func (e *IllTypedError) Error() string { return fmt.Sprintf("errors in package: %v", e.Pkg.Errors) } +type FailedPrerequisitesError struct { + errors map[string][]string +} + +func (f FailedPrerequisitesError) NotEmpty() bool { + return len(f.errors) > 0 +} + +func (f *FailedPrerequisitesError) Consume(name string, err error) { + if f.errors == nil { + f.errors = map[string][]string{} + } + k := fmt.Sprintf("%v", err) + f.errors[k] = append(f.errors[k], name) +} + +type groupedPrerequisiteErr struct { + names []string + err string +} + +func (g groupedPrerequisiteErr) String() string { + if len(g.names) == 1 { + return fmt.Sprintf("%s: %s", g.names[0], g.err) + } + return fmt.Sprintf("(%s): %s", strings.Join(g.names, ", "), g.err) +} + +func (f FailedPrerequisitesError) Error() string { + var errs []string + for err := range f.errors { + errs = append(errs, err) + } + var groups []groupedPrerequisiteErr + for _, err := range errs { + groups = append(groups, groupedPrerequisiteErr{ + err: err, + names: f.errors[err], + }) + } + return fmt.Sprintf("failed prerequisites: %s", groups) +} + func (act *action) analyzeSafe() { defer func() { if p := recover(); p != nil { @@ -501,16 +544,16 @@ func (act *action) analyze() { analyzeDebugf("go/analysis: %s: %s: analyzed package %q in %s", act.r.prefix, act.a.Name, act.pkg.Name, time.Since(now)) }(time.Now()) - // Report an error if any dependency failed. - var failed []string + // Report an error if any dependency failures. + var depErr FailedPrerequisitesError for _, dep := range act.deps { - if dep.err != nil { - failed = append(failed, dep.String()) + if dep.err == nil { + continue } + depErr.Consume(dep.String(), dep.err) } - if failed != nil { - sort.Strings(failed) - act.err = fmt.Errorf("failed prerequisites: %s", strings.Join(failed, ", ")) + if depErr.NotEmpty() { + act.err = depErr return } diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocognit.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocognit.go index 71301180874..8044e3e51d0 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocognit.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocognit.go @@ -49,7 +49,7 @@ func NewGocognit() *goanalysis.Linter { break // Break as the stats is already sorted from greatest to least } - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: s.Pos, Text: fmt.Sprintf("cognitive complexity %d of func %s is high (> %d)", s.Complexity, formatCode(s.FuncName, lintCtx.Cfg), lintCtx.Settings().Gocognit.MinComplexity), diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goconst.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goconst.go index c77dc64e839..8e91feef894 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goconst.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goconst.go @@ -70,7 +70,7 @@ func checkConstants(pass *analysis.Pass, lintCtx *linter.Context) ([]goanalysis. } else { textEnd = fmt.Sprintf(", but such constant %s already exists", formatCode(i.MatchingConst, lintCtx.Cfg)) } - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: i.Pos, Text: textBegin + textEnd, FromLinter: goconstName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocyclo.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocyclo.go index 4fb288989be..f9c0a799348 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocyclo.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gocyclo.go @@ -49,7 +49,7 @@ func NewGocyclo() *goanalysis.Linter { break // Break as the stats is already sorted from greatest to least } - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: s.Pos, Text: fmt.Sprintf("cyclomatic complexity %d of func %s is high (> %d)", s.Complexity, formatCode(s.FuncName, lintCtx.Cfg), lintCtx.Settings().Gocyclo.MinComplexity), diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/godot.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/godot.go new file mode 100644 index 00000000000..842ec97d26e --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/godot.go @@ -0,0 +1,64 @@ +package golinters + +import ( + "sync" + + "github.com/tetafro/godot" + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" + "github.com/golangci/golangci-lint/pkg/lint/linter" + "github.com/golangci/golangci-lint/pkg/result" +) + +const godotName = "godot" + +func NewGodot() *goanalysis.Linter { + var mu sync.Mutex + var resIssues []goanalysis.Issue + + analyzer := &analysis.Analyzer{ + Name: godotName, + Doc: goanalysis.TheOnlyanalyzerDoc, + } + return goanalysis.NewLinter( + godotName, + "Check if comments end in a period", + []*analysis.Analyzer{analyzer}, + nil, + ).WithContextSetter(func(lintCtx *linter.Context) { + cfg := lintCtx.Cfg.LintersSettings.Godot + settings := godot.Settings{CheckAll: cfg.CheckAll} + + analyzer.Run = func(pass *analysis.Pass) (interface{}, error) { + var issues []godot.Message + for _, file := range pass.Files { + issues = append(issues, godot.Run(file, pass.Fset, settings)...) + } + + if len(issues) == 0 { + return nil, nil + } + + res := make([]goanalysis.Issue, len(issues)) + for k, i := range issues { + issue := result.Issue{ + Pos: i.Pos, + Text: i.Message, + FromLinter: godotName, + Replacement: &result.Replacement{}, + } + + res[k] = goanalysis.NewIssue(&issue, pass) + } + + mu.Lock() + resIssues = append(resIssues, res...) + mu.Unlock() + + return nil, nil + } + }).WithIssuesReporter(func(*linter.Context) []goanalysis.Issue { + return resIssues + }).WithLoadMode(goanalysis.LoadModeSyntax) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/godox.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/godox.go index 78d13f3bd4c..2a4dd9fafb6 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/godox.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/godox.go @@ -41,7 +41,7 @@ func NewGodox() *goanalysis.Linter { res := make([]goanalysis.Issue, len(issues)) for k, i := range issues { - res[k] = goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res[k] = goanalysis.NewIssue(&result.Issue{ Pos: token.Position{ Filename: i.Pos.Filename, Line: i.Pos.Line, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/goerr113.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goerr113.go new file mode 100644 index 00000000000..0c10005a089 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/goerr113.go @@ -0,0 +1,19 @@ +package golinters + +import ( + "github.com/Djarvur/go-err113" + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" +) + +func NewGoerr113() *goanalysis.Linter { + return goanalysis.NewLinter( + "goerr113", + "Golang linter to check the errors handling expressions", + []*analysis.Analyzer{ + err113.NewAnalyzer(), + }, + nil, + ).WithLoadMode(goanalysis.LoadModeTypesInfo) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gofmt_common.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gofmt_common.go index ae152ad7c4b..fb1e3f6623f 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gofmt_common.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gofmt_common.go @@ -59,7 +59,6 @@ func (p *hunkChangesParser) parseDiffLines(h *diffpkg.Hunk) { lineStr := string(line) - //nolint:gocritic if strings.HasPrefix(lineStr, "-") { dl.typ = diffLineDeleted dl.data = strings.TrimPrefix(lineStr, "-") diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gomodguard.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gomodguard.go new file mode 100644 index 00000000000..29cc3c303ab --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gomodguard.go @@ -0,0 +1,88 @@ +package golinters + +import ( + "log" + "os" + "sync" + + "github.com/ryancurrah/gomodguard" + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" + "github.com/golangci/golangci-lint/pkg/lint/linter" + "github.com/golangci/golangci-lint/pkg/result" +) + +const ( + gomodguardName = "gomodguard" +) + +// NewGomodguard returns a new Gomodguard linter. +func NewGomodguard() *goanalysis.Linter { + var ( + issues []goanalysis.Issue + mu = sync.Mutex{} + analyzer = &analysis.Analyzer{ + Name: goanalysis.TheOnlyAnalyzerName, + Doc: goanalysis.TheOnlyanalyzerDoc, + } + ) + + return goanalysis.NewLinter( + gomodguardName, + "Allow and block list linter for direct Go module dependencies.", + []*analysis.Analyzer{analyzer}, + nil, + ).WithContextSetter(func(lintCtx *linter.Context) { + analyzer.Run = func(pass *analysis.Pass) (interface{}, error) { + var ( + files = []string{} + linterCfg = lintCtx.Cfg.LintersSettings.Gomodguard + processorCfg = gomodguard.Configuration{} + ) + processorCfg.Allowed.Modules = linterCfg.Allowed.Modules + processorCfg.Allowed.Domains = linterCfg.Allowed.Domains + for n := range linterCfg.Blocked.Modules { + for k, v := range linterCfg.Blocked.Modules[n] { + m := gomodguard.BlockedModule{k: gomodguard.Recommendations{ + Recommendations: v.Recommendations, + Reason: v.Reason, + }} + processorCfg.Blocked.Modules = append(processorCfg.Blocked.Modules, m) + break + } + } + + for _, file := range pass.Files { + files = append(files, pass.Fset.Position(file.Pos()).Filename) + } + + processor, err := gomodguard.NewProcessor(processorCfg, log.New(os.Stderr, "", 0)) + if err != nil { + lintCtx.Log.Warnf("running gomodguard failed: %s: if you are not using go modules "+ + "it is suggested to disable this linter", err) + return nil, nil + } + + gomodguardErrors := processor.ProcessFiles(files) + if len(gomodguardErrors) == 0 { + return nil, nil + } + + mu.Lock() + defer mu.Unlock() + + for _, err := range gomodguardErrors { + issues = append(issues, goanalysis.NewIssue(&result.Issue{ + FromLinter: gomodguardName, + Pos: err.Position, + Text: err.Reason, + }, pass)) + } + + return nil, nil + } + }).WithIssuesReporter(func(*linter.Context) []goanalysis.Issue { + return issues + }).WithLoadMode(goanalysis.LoadModeSyntax) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gosec.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gosec.go index 0b84824c319..974429583b9 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gosec.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gosec.go @@ -73,7 +73,7 @@ func NewGosec() *goanalysis.Linter { continue } - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: token.Position{ Filename: i.File, Line: line, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/govet.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/govet.go index 0cbc3d318bc..7ea1f094e64 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/govet.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/govet.go @@ -101,6 +101,11 @@ var ( func isAnalyzerEnabled(name string, cfg *config.GovetSettings, defaultAnalyzers []*analysis.Analyzer) bool { if cfg.EnableAll { + for _, n := range cfg.Disable { + if n == name { + return false + } + } return true } // Raw for loops should be OK on small slice lengths. diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/ineffassign.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/ineffassign.go index 7d755809d79..601252f729a 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/ineffassign.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/ineffassign.go @@ -42,7 +42,7 @@ func NewIneffassign() *goanalysis.Linter { res := make([]goanalysis.Issue, 0, len(issues)) for _, i := range issues { - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: i.Pos, Text: fmt.Sprintf("ineffectual assignment to %s", formatCode(i.IdentName, lintCtx.Cfg)), FromLinter: ineffassignName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/interfacer.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/interfacer.go index 96f6b5b9d46..1edbe894cc6 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/interfacer.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/interfacer.go @@ -48,7 +48,7 @@ func NewInterfacer() *goanalysis.Linter { res := make([]goanalysis.Issue, 0, len(issues)) for _, i := range issues { pos := pass.Fset.Position(i.Pos()) - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: pos, Text: i.Message(), FromLinter: interfacerName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/maligned.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/maligned.go index 4f34f0ea18b..22422b8c6a4 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/maligned.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/maligned.go @@ -40,7 +40,7 @@ func NewMaligned() *goanalysis.Linter { if lintCtx.Settings().Maligned.SuggestNewOrder { text += fmt.Sprintf(":\n%s", formatCodeBlock(i.NewStructDef, lintCtx.Cfg)) } - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + issues = append(issues, goanalysis.NewIssue(&result.Issue{ Pos: i.Pos, Text: text, FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/nestif.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nestif.go new file mode 100644 index 00000000000..0998a8ce2f6 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nestif.go @@ -0,0 +1,65 @@ +package golinters + +import ( + "sort" + "sync" + + "github.com/nakabonne/nestif" + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" + "github.com/golangci/golangci-lint/pkg/lint/linter" + "github.com/golangci/golangci-lint/pkg/result" +) + +const nestifName = "nestif" + +func NewNestif() *goanalysis.Linter { + var mu sync.Mutex + var resIssues []goanalysis.Issue + + analyzer := &analysis.Analyzer{ + Name: goanalysis.TheOnlyAnalyzerName, + Doc: goanalysis.TheOnlyanalyzerDoc, + } + return goanalysis.NewLinter( + nestifName, + "Reports deeply nested if statements", + []*analysis.Analyzer{analyzer}, + nil, + ).WithContextSetter(func(lintCtx *linter.Context) { + analyzer.Run = func(pass *analysis.Pass) (interface{}, error) { + checker := &nestif.Checker{ + MinComplexity: lintCtx.Settings().Nestif.MinComplexity, + } + var issues []nestif.Issue + for _, f := range pass.Files { + issues = append(issues, checker.Check(f, pass.Fset)...) + } + if len(issues) == 0 { + return nil, nil + } + + sort.SliceStable(issues, func(i, j int) bool { + return issues[i].Complexity > issues[j].Complexity + }) + + res := make([]goanalysis.Issue, 0, len(issues)) + for _, i := range issues { + res = append(res, goanalysis.NewIssue(&result.Issue{ + Pos: i.Pos, + Text: i.Message, + FromLinter: nestifName, + }, pass)) + } + + mu.Lock() + resIssues = append(resIssues, res...) + mu.Unlock() + + return nil, nil + } + }).WithIssuesReporter(func(*linter.Context) []goanalysis.Issue { + return resIssues + }).WithLoadMode(goanalysis.LoadModeSyntax) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint.go new file mode 100644 index 00000000000..d98b50cf8a0 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint.go @@ -0,0 +1,92 @@ +package golinters + +import ( + "fmt" + "go/ast" + "sync" + + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" + "github.com/golangci/golangci-lint/pkg/golinters/nolintlint" + "github.com/golangci/golangci-lint/pkg/lint/linter" + "github.com/golangci/golangci-lint/pkg/result" +) + +const NolintlintName = "nolintlint" + +func NewNoLintLint() *goanalysis.Linter { + var mu sync.Mutex + var resIssues []goanalysis.Issue + + analyzer := &analysis.Analyzer{ + Name: NolintlintName, + Doc: goanalysis.TheOnlyanalyzerDoc, + } + return goanalysis.NewLinter( + NolintlintName, + "Reports ill-formed or insufficient nolint directives", + []*analysis.Analyzer{analyzer}, + nil, + ).WithContextSetter(func(lintCtx *linter.Context) { + analyzer.Run = func(pass *analysis.Pass) (interface{}, error) { + var needs nolintlint.Needs + settings := lintCtx.Settings().NoLintLint + if settings.RequireExplanation { + needs |= nolintlint.NeedsExplanation + } + if !settings.AllowLeadingSpace { + needs |= nolintlint.NeedsMachineOnly + } + if settings.RequireSpecific { + needs |= nolintlint.NeedsSpecific + } + if !settings.AllowUnused { + needs |= nolintlint.NeedsUnused + } + + lnt, err := nolintlint.NewLinter(needs, settings.AllowNoExplanation) + if err != nil { + return nil, err + } + + nodes := make([]ast.Node, 0, len(pass.Files)) + for _, n := range pass.Files { + nodes = append(nodes, n) + } + issues, err := lnt.Run(pass.Fset, nodes...) + if err != nil { + return nil, fmt.Errorf("linter failed to run: %s", err) + } + var res []goanalysis.Issue + for _, i := range issues { + expectNoLint := false + var expectedNolintLinter string + if ii, ok := i.(nolintlint.UnusedCandidate); ok { + expectedNolintLinter = ii.ExpectedLinter + expectNoLint = true + } + issue := &result.Issue{ + FromLinter: NolintlintName, + Text: i.Details(), + Pos: i.Position(), + ExpectNoLint: expectNoLint, + ExpectedNoLintLinter: expectedNolintLinter, + } + res = append(res, goanalysis.NewIssue(issue, pass)) + } + + if len(res) == 0 { + return nil, nil + } + + mu.Lock() + resIssues = append(resIssues, res...) + mu.Unlock() + + return nil, nil + } + }).WithIssuesReporter(func(*linter.Context) []goanalysis.Issue { + return resIssues + }).WithLoadMode(goanalysis.LoadModeSyntax) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/README.md b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/README.md new file mode 100644 index 00000000000..3d440d5a5b9 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/README.md @@ -0,0 +1,31 @@ +# nolintlint + +nolintlint is a Go static analysis tool to find ill-formed or insufficiently explained `// nolint` directives for golangci +(or any other linter, using th ) + +## Purpose + +To ensure that lint exceptions have explanations. Consider the case below: + +```Go +import "crypto/md5" //nolint + +func hash(data []byte) []byte { + return md5.New().Sum(data) //nolint +} +``` + +In the above case, nolint directives are present but the user has no idea why this is being done or which linter +is being suppressed (in this case, gosec recommends against use of md5). `nolintlint` can require that the code provide an explanation, which might look as follows: + +```Go +import "crypto/md5" //nolint:gosec // this is not used in a secure application + +func hash(data []byte) []byte { + return md5.New().Sum(data) //nolint:gosec // this result is not used in a secure application +} +``` + +`nolintlint` can also identify cases where you may have written `// nolint`. Finally `nolintlint`, can also enforce that you +use the machine-readable nolint directive format `//nolint` and that you mention what linter is being suppressed, as shown above when we write `//nolint:gosec`. + diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/nolintlint.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/nolintlint.go new file mode 100644 index 00000000000..6da31c60fd5 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/nolintlint/nolintlint.go @@ -0,0 +1,239 @@ +// nolintlint provides a linter to ensure that all //nolint directives are followed by explanations +package nolintlint + +import ( + "fmt" + "go/ast" + "go/token" + "regexp" + "strings" + "unicode" +) + +type BaseIssue struct { + fullDirective string + directiveWithOptionalLeadingSpace string + position token.Position +} + +func (b BaseIssue) Position() token.Position { + return b.position +} + +type ExtraLeadingSpace struct { + BaseIssue +} + +func (i ExtraLeadingSpace) Details() string { + return fmt.Sprintf("directive `%s` should not have more than one leading space", i.fullDirective) +} + +func (i ExtraLeadingSpace) String() string { return toString(i) } + +type NotMachine struct { + BaseIssue +} + +func (i NotMachine) Details() string { + expected := i.fullDirective[:2] + strings.TrimLeftFunc(i.fullDirective[2:], unicode.IsSpace) + return fmt.Sprintf("directive `%s` should be written without leading space as `%s`", + i.fullDirective, expected) +} + +func (i NotMachine) String() string { return toString(i) } + +type NotSpecific struct { + BaseIssue +} + +func (i NotSpecific) Details() string { + return fmt.Sprintf("directive `%s` should mention specific linter such as `//%s:my-linter`", + i.fullDirective, i.directiveWithOptionalLeadingSpace) +} + +func (i NotSpecific) String() string { return toString(i) } + +type ParseError struct { + BaseIssue +} + +func (i ParseError) Details() string { + return fmt.Sprintf("directive `%s` should match `//%s[:] [// ]`", + i.fullDirective, + i.directiveWithOptionalLeadingSpace) +} + +func (i ParseError) String() string { return toString(i) } + +type NoExplanation struct { + BaseIssue + fullDirectiveWithoutExplanation string +} + +func (i NoExplanation) Details() string { + return fmt.Sprintf("directive `%s` should provide explanation such as `%s // this is why`", + i.fullDirective, i.fullDirectiveWithoutExplanation) +} + +func (i NoExplanation) String() string { return toString(i) } + +type UnusedCandidate struct { + BaseIssue + ExpectedLinter string +} + +func (i UnusedCandidate) Details() string { + details := fmt.Sprintf("directive `%s` is unused", i.fullDirective) + if i.ExpectedLinter != "" { + details += fmt.Sprintf(" for linter %s", i.ExpectedLinter) + } + return details +} + +func (i UnusedCandidate) String() string { return toString(i) } + +func toString(i Issue) string { + return fmt.Sprintf("%s at %s", i.Details(), i.Position()) +} + +type Issue interface { + Details() string + Position() token.Position + String() string +} + +type Needs uint + +const ( + NeedsMachineOnly Needs = 1 << iota + NeedsSpecific + NeedsExplanation + NeedsUnused + NeedsAll = NeedsMachineOnly | NeedsSpecific | NeedsExplanation +) + +// matches lines starting with the nolint directive +var directiveOnlyPattern = regexp.MustCompile(`^\s*(nolint)(:\s*[\w-]+\s*(?:,\s*[\w-]+\s*)*)?\b`) + +// matches a complete nolint directive +var fullDirectivePattern = regexp.MustCompile(`^//\s*nolint(:\s*[\w-]+\s*(?:,\s*[\w-]+\s*)*)?\s*(//.*)?\s*\n?$`) + +type Linter struct { + excludes []string // lists individual linters that don't require explanations + needs Needs // indicates which linter checks to perform + excludeByLinter map[string]bool +} + +// NewLinter creates a linter that enforces that the provided directives fulfill the provided requirements +func NewLinter(needs Needs, excludes []string) (*Linter, error) { + excludeByName := make(map[string]bool) + for _, e := range excludes { + excludeByName[e] = true + } + + return &Linter{ + needs: needs, + excludeByLinter: excludeByName, + }, nil +} + +var leadingSpacePattern = regexp.MustCompile(`^//(\s*)`) +var trailingBlankExplanation = regexp.MustCompile(`\s*(//\s*)?$`) + +func (l Linter) Run(fset *token.FileSet, nodes ...ast.Node) ([]Issue, error) { + var issues []Issue + for _, node := range nodes { + if file, ok := node.(*ast.File); ok { + for _, c := range file.Comments { + text := c.Text() + matches := directiveOnlyPattern.FindStringSubmatch(text) + if len(matches) == 0 { + continue + } + directive := matches[1] + + // check for a space between the "//" and the directive + leadingSpaceMatches := leadingSpacePattern.FindStringSubmatch(c.List[0].Text) // c.Text() doesn't have all leading space + if len(leadingSpaceMatches) == 0 { + continue + } + leadingSpace := leadingSpaceMatches[1] + + directiveWithOptionalLeadingSpace := directive + if len(leadingSpace) > 0 { + directiveWithOptionalLeadingSpace = " " + directive + } + + base := BaseIssue{ + fullDirective: c.List[0].Text, + directiveWithOptionalLeadingSpace: directiveWithOptionalLeadingSpace, + position: fset.Position(c.Pos()), + } + + // check for, report and eliminate leading spaces so we can check for other issues + if leadingSpace != "" && leadingSpace != " " { + issues = append(issues, ExtraLeadingSpace{ + BaseIssue: base, + }) + } + + if (l.needs&NeedsMachineOnly) != 0 && strings.HasPrefix(directiveWithOptionalLeadingSpace, " ") { + issues = append(issues, NotMachine{BaseIssue: base}) + } + + fullMatches := fullDirectivePattern.FindStringSubmatch(c.List[0].Text) + if len(fullMatches) == 0 { + issues = append(issues, ParseError{BaseIssue: base}) + continue + } + lintersText, explanation := fullMatches[1], fullMatches[2] + var linters []string + if len(lintersText) > 0 { + lls := strings.Split(lintersText[1:], ",") + linters = make([]string, 0, len(lls)) + for _, ll := range lls { + ll = strings.TrimSpace(ll) + if ll != "" { + linters = append(linters, ll) + } + } + } + if (l.needs & NeedsSpecific) != 0 { + if len(linters) == 0 { + issues = append(issues, NotSpecific{BaseIssue: base}) + } + } + + // when detecting unused directives, we send all the directives through and filter them out in the nolint processor + if l.needs&NeedsUnused != 0 { + if len(linters) == 0 { + issues = append(issues, UnusedCandidate{BaseIssue: base}) + } else { + for _, linter := range linters { + issues = append(issues, UnusedCandidate{BaseIssue: base, ExpectedLinter: linter}) + } + } + } + + if (l.needs&NeedsExplanation) != 0 && (explanation == "" || strings.TrimSpace(explanation) == "//") { + needsExplanation := len(linters) == 0 // if no linters are mentioned, we must have explanation + // otherwise, check if we are excluding all of the mentioned linters + for _, ll := range linters { + if !l.excludeByLinter[ll] { // if a linter does require explanation + needsExplanation = true + break + } + } + if needsExplanation { + fullDirectiveWithoutExplanation := trailingBlankExplanation.ReplaceAllString(c.List[0].Text, "") + issues = append(issues, NoExplanation{ + BaseIssue: base, + fullDirectiveWithoutExplanation: fullDirectiveWithoutExplanation, + }) + } + } + } + } + } + return issues, nil +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/prealloc.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/prealloc.go index 168dc1713e9..534a69253c3 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/prealloc.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/prealloc.go @@ -34,7 +34,7 @@ func NewPrealloc() *goanalysis.Linter { var res []goanalysis.Issue hints := prealloc.Check(pass.Files, s.Simple, s.RangeLoops, s.ForLoops) for _, hint := range hints { - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: pass.Fset.Position(hint.Pos), Text: fmt.Sprintf("Consider preallocating %s", formatCode(hint.DeclaredSliceName, lintCtx.Cfg)), FromLinter: preallocName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/structcheck.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/structcheck.go index 8acfc403aa7..7c16f8ec366 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/structcheck.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/structcheck.go @@ -37,7 +37,7 @@ func NewStructcheck() *goanalysis.Linter { issues := make([]goanalysis.Issue, 0, len(structcheckIssues)) for _, i := range structcheckIssues { - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + issues = append(issues, goanalysis.NewIssue(&result.Issue{ Pos: i.Pos, Text: fmt.Sprintf("%s is unused", formatCode(i.FieldName, lintCtx.Cfg)), FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/testpackage.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/testpackage.go new file mode 100644 index 00000000000..1248e78fdac --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/testpackage.go @@ -0,0 +1,23 @@ +package golinters + +import ( + "github.com/maratori/testpackage/pkg/testpackage" + "golang.org/x/tools/go/analysis" + + "github.com/golangci/golangci-lint/pkg/config" + "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" +) + +func NewTestpackage(cfg *config.TestpackageSettings) *goanalysis.Linter { + var a = testpackage.NewAnalyzer() + var settings map[string]map[string]interface{} + if cfg != nil { + settings = map[string]map[string]interface{}{ + a.Name: { + testpackage.SkipRegexpFlagName: cfg.SkipRegexp, + }, + } + } + return goanalysis.NewLinter(a.Name, a.Doc, []*analysis.Analyzer{a}, settings). + WithLoadMode(goanalysis.LoadModeSyntax) +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/unconvert.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/unconvert.go index 147570170e2..456f6836cc1 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/unconvert.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/unconvert.go @@ -35,7 +35,7 @@ func NewUnconvert() *goanalysis.Linter { issues := make([]goanalysis.Issue, 0, len(positions)) for _, pos := range positions { - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + issues = append(issues, goanalysis.NewIssue(&result.Issue{ Pos: pos, Text: "unnecessary conversion", FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/unparam.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/unparam.go index 866d0663e63..fabb6b527a0 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/unparam.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/unparam.go @@ -58,7 +58,7 @@ func NewUnparam() *goanalysis.Linter { var res []goanalysis.Issue for _, i := range unparamIssues { - res = append(res, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + res = append(res, goanalysis.NewIssue(&result.Issue{ Pos: pass.Fset.Position(i.Pos()), Text: i.Message(), FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/unused.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/unused.go index 5f6d8371c57..ac5a90d4185 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/unused.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/unused.go @@ -33,7 +33,7 @@ func NewUnused() *goanalysis.Linter { for _, ur := range u.Result() { p := u.ProblemObject(lintCtx.Packages[0].Fset, ur) pkg := typesToPkg[ur.Pkg()] - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + i := &result.Issue{ FromLinter: name, Text: p.Message, Pos: p.Pos, @@ -42,11 +42,16 @@ func NewUnused() *goanalysis.Linter { From: p.Pos.Line, To: p.End.Line, }, - Replacement: &result.Replacement{ + } + // See https://github.com/golangci/golangci-lint/issues/1048 + // If range is invalid, this will break `--fix` mode. + if i.LineRange.To >= i.LineRange.From { + i.Replacement = &result.Replacement{ // Suggest deleting unused stuff. NeedOnlyDelete: true, - }, - }, nil)) + } + } + issues = append(issues, goanalysis.NewIssue(i, nil)) } return issues }).WithContextSetter(func(lintCtx *linter.Context) { diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/varcheck.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/varcheck.go index 3c650d8c9d3..dcf2e7de8e6 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/varcheck.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/varcheck.go @@ -37,7 +37,7 @@ func NewVarcheck() *goanalysis.Linter { issues := make([]goanalysis.Issue, 0, len(varcheckIssues)) for _, i := range varcheckIssues { - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + issues = append(issues, goanalysis.NewIssue(&result.Issue{ Pos: i.Pos, Text: fmt.Sprintf("%s is unused", formatCode(i.VarName, lintCtx.Cfg)), FromLinter: linterName, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/whitespace.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/whitespace.go index 4a2ccce5d64..d475465a211 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/whitespace.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/whitespace.go @@ -70,7 +70,7 @@ func NewWhitespace() *goanalysis.Linter { } issue.Replacement.NewLines = []string{bracketLine} - res[k] = goanalysis.NewIssue(&issue, pass) //nolint:scopelint + res[k] = goanalysis.NewIssue(&issue, pass) } mu.Lock() diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/wsl.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/wsl.go index 55e6eb4467e..f44d09f245c 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/wsl.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/wsl.go @@ -3,7 +3,7 @@ package golinters import ( "sync" - "github.com/bombsimon/wsl/v2" + "github.com/bombsimon/wsl/v3" "golang.org/x/tools/go/analysis" "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" @@ -42,9 +42,12 @@ func NewWSL() *goanalysis.Linter { AllowMultiLineAssignCuddle: linterCfg.AllowMultiLineAssignCuddle, AllowCuddleDeclaration: linterCfg.AllowCuddleDeclaration, AllowTrailingComment: linterCfg.AllowTrailingComment, - CaseForceTrailingWhitespaceLimit: linterCfg.CaseForceTrailingWhitespaceLimit, + AllowSeparatedLeadingComment: linterCfg.AllowSeparatedLeadingComment, + ForceCuddleErrCheckAndAssign: linterCfg.ForceCuddleErrCheckAndAssign, + ForceCaseTrailingWhitespaceLimit: linterCfg.ForceCaseTrailingWhitespaceLimit, AllowCuddleWithCalls: []string{"Lock", "RLock"}, AllowCuddleWithRHS: []string{"Unlock", "RUnlock"}, + ErrorVariableNames: []string{"err"}, } ) @@ -63,7 +66,7 @@ func NewWSL() *goanalysis.Linter { defer mu.Unlock() for _, err := range wslErrors { - issues = append(issues, goanalysis.NewIssue(&result.Issue{ //nolint:scopelint + issues = append(issues, goanalysis.NewIssue(&result.Issue{ FromLinter: name, Pos: err.Position, Text: err.Reason, diff --git a/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/enabled_set.go b/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/enabled_set.go index a3b73e7074b..73e3bcfed29 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/enabled_set.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/enabled_set.go @@ -113,7 +113,7 @@ func (es EnabledSet) combineGoAnalysisLinters(linters map[string]*linter.Config) } } - if len(goanalysisLinters) <= 1 { //nolint:gomnd + if len(goanalysisLinters) <= 1 { es.debugf("Didn't combine go/analysis linters: got only %d linters", len(goanalysisLinters)) return } diff --git a/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go b/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go index cf71c1f4636..492b92256f6 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go @@ -86,8 +86,10 @@ func enableLinterConfigs(lcs []*linter.Config, isEnabled func(lc *linter.Config) //nolint:funlen func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { var govetCfg *config.GovetSettings + var testpackageCfg *config.TestpackageSettings if m.cfg != nil { govetCfg = &m.cfg.LintersSettings.Govet + testpackageCfg = &m.cfg.LintersSettings.Testpackage } const megacheckName = "megacheck" lcs := []*linter.Config{ @@ -178,6 +180,9 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { WithLoadForGoAnalysis(). WithPresets(linter.PresetBugs). WithURL(""), + linter.NewConfig(golinters.NewAsciicheck()). + WithPresets(linter.PresetBugs, linter.PresetStyle). + WithURL("https://github.com/tdakkota/asciicheck"), linter.NewConfig(golinters.NewGofmt()). WithPresets(linter.PresetFormatting). @@ -247,6 +252,27 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { linter.NewConfig(golinters.NewGoMND(m.cfg)). WithPresets(linter.PresetStyle). WithURL("https://github.com/tommy-muehle/go-mnd"), + linter.NewConfig(golinters.NewGoerr113()). + WithPresets(linter.PresetStyle). + WithURL("https://github.com/Djarvur/go-err113"), + linter.NewConfig(golinters.NewGomodguard()). + WithPresets(linter.PresetStyle). + WithLoadForGoAnalysis(). + WithURL("https://github.com/ryancurrah/gomodguard"), + linter.NewConfig(golinters.NewGodot()). + WithPresets(linter.PresetStyle). + WithURL("https://github.com/tetafro/godot"), + linter.NewConfig(golinters.NewTestpackage(testpackageCfg)). + WithPresets(linter.PresetStyle). + WithLoadForGoAnalysis(). + WithURL("https://github.com/maratori/testpackage"), + linter.NewConfig(golinters.NewNestif()). + WithPresets(linter.PresetComplexity). + WithURL("https://github.com/nakabonne/nestif"), + // nolintlint must be last because it looks at the results of all the previous linters for unused nolint directives + linter.NewConfig(golinters.NewNoLintLint()). + WithPresets(linter.PresetStyle). + WithURL("https://github.com/golangci-lint/pkg/golinters/nolintlint"), } isLocalRun := os.Getenv("GOLANGCI_COM_RUN") == "" diff --git a/vendor/github.com/golangci/golangci-lint/pkg/lint/runner.go b/vendor/github.com/golangci/golangci-lint/pkg/lint/runner.go index 4dc40f3fe04..e8f427e0214 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/lint/runner.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/lint/runner.go @@ -32,7 +32,7 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env, icfg := cfg.Issues excludePatterns := icfg.ExcludePatterns if icfg.UseDefaultExcludes { - excludePatterns = append(excludePatterns, config.GetDefaultExcludePatternsStrings()...) + excludePatterns = append(excludePatterns, config.GetExcludePatternsStrings(icfg.IncludeDefaultExcludes)...) } var excludeTotalPattern string @@ -40,6 +40,13 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env, excludeTotalPattern = fmt.Sprintf("(%s)", strings.Join(excludePatterns, "|")) } + var excludeProcessor processors.Processor + if cfg.Issues.ExcludeCaseSensitive { + excludeProcessor = processors.NewExcludeCaseSensitive(excludeTotalPattern) + } else { + excludeProcessor = processors.NewExclude(excludeTotalPattern) + } + skipFilesProcessor, err := processors.NewSkipFiles(cfg.Run.SkipFiles) if err != nil { return nil, err @@ -63,6 +70,19 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env, Linters: r.Linters, }) } + var excludeRulesProcessor processors.Processor + if cfg.Issues.ExcludeCaseSensitive { + excludeRulesProcessor = processors.NewExcludeRulesCaseSensitive(excludeRules, lineCache, log.Child("exclude_rules")) + } else { + excludeRulesProcessor = processors.NewExcludeRules(excludeRules, lineCache, log.Child("exclude_rules")) + } + + enabledLintersSet := lintersdb.NewEnabledSet(dbManager, + lintersdb.NewValidator(dbManager), log.Child("enabledLinters"), cfg) + lcs, err := enabledLintersSet.Get(false) + if err != nil { + return nil, err + } return &Runner{ Processors: []processors.Processor{ @@ -81,9 +101,9 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env, // Must be before exclude because users see already marked output and configure excluding by it. processors.NewIdentifierMarker(), - processors.NewExclude(excludeTotalPattern), - processors.NewExcludeRules(excludeRules, lineCache, log.Child("exclude_rules")), - processors.NewNolint(log.Child("nolint"), dbManager), + excludeProcessor, + excludeRulesProcessor, + processors.NewNolint(log.Child("nolint"), dbManager, lcs), processors.NewUniqByLine(cfg), processors.NewDiff(icfg.Diff, icfg.DiffFromRevision, icfg.DiffPatchFilePath), diff --git a/vendor/github.com/golangci/golangci-lint/pkg/printers/github.go b/vendor/github.com/golangci/golangci-lint/pkg/printers/github.go new file mode 100644 index 00000000000..fa11a2839a3 --- /dev/null +++ b/vendor/github.com/golangci/golangci-lint/pkg/printers/github.go @@ -0,0 +1,39 @@ +package printers + +import ( + "context" + "fmt" + + "github.com/golangci/golangci-lint/pkg/logutils" + "github.com/golangci/golangci-lint/pkg/result" +) + +type github struct { +} + +// Github output format outputs issues according to Github actions format: +// https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message +func NewGithub() Printer { + return &github{} +} + +// print each line as: ::error file=app.js,line=10,col=15::Something went wrong +func formatIssueAsGithub(issue *result.Issue) string { + ret := fmt.Sprintf("::error file=%s,line=%d", issue.FilePath(), issue.Line()) + if issue.Pos.Column != 0 { + ret += fmt.Sprintf(",col=%d", issue.Pos.Column) + } + + ret += fmt.Sprintf("::%s (%s)", issue.Text, issue.FromLinter) + return ret +} + +func (g *github) Print(_ context.Context, issues []result.Issue) error { + for ind := range issues { + _, err := fmt.Fprintln(logutils.StdOut, formatIssueAsGithub(&issues[ind])) + if err != nil { + return err + } + } + return nil +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/issue.go b/vendor/github.com/golangci/golangci-lint/pkg/result/issue.go index 83ba705edfc..16d9a8a8c19 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/issue.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/issue.go @@ -41,6 +41,10 @@ type Issue struct { // HunkPos is used only when golangci-lint is run over a diff HunkPos int `json:",omitempty"` + + // If we are expecting a nolint (because this is from nolintlint), record the expected linter + ExpectNoLint bool + ExpectedNoLintLinter string } func (i *Issue) FilePath() string { diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/autogenerated_exclude.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/autogenerated_exclude.go index 8bdaae66104..249ba9d4437 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/autogenerated_exclude.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/autogenerated_exclude.go @@ -132,7 +132,7 @@ func getDoc(filePath string) (string, error) { var docLines []string for scanner.Scan() { line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, "//") { //nolint:gocritic + if strings.HasPrefix(line, "//") { text := strings.TrimSpace(strings.TrimPrefix(line, "//")) docLines = append(docLines, text) } else if line == "" || strings.HasPrefix(line, "package") { diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude.go index 80c4b8945d6..92959a328ca 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude.go @@ -37,3 +37,23 @@ func (p Exclude) Process(issues []result.Issue) ([]result.Issue, error) { } func (p Exclude) Finish() {} + +type ExcludeCaseSensitive struct { + *Exclude +} + +var _ Processor = ExcludeCaseSensitive{} + +func NewExcludeCaseSensitive(pattern string) *ExcludeCaseSensitive { + var patternRe *regexp.Regexp + if pattern != "" { + patternRe = regexp.MustCompile(pattern) + } + return &ExcludeCaseSensitive{ + &Exclude{pattern: patternRe}, + } +} + +func (p ExcludeCaseSensitive) Name() string { + return "exclude-case-sensitive" +} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude_rules.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude_rules.go index 6b16fdc5dad..b926af5b1d4 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude_rules.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/exclude_rules.go @@ -37,24 +37,29 @@ func NewExcludeRules(rules []ExcludeRule, lineCache *fsutils.LineCache, log logu lineCache: lineCache, log: log, } + r.rules = createRules(rules, "(?i)") + return r +} + +func createRules(rules []ExcludeRule, prefix string) []excludeRule { + parsedRules := make([]excludeRule, 0, len(rules)) for _, rule := range rules { parsedRule := excludeRule{ linters: rule.Linters, } if rule.Text != "" { - parsedRule.text = regexp.MustCompile("(?i)" + rule.Text) + parsedRule.text = regexp.MustCompile(prefix + rule.Text) } if rule.Source != "" { - parsedRule.source = regexp.MustCompile("(?i)" + rule.Source) + parsedRule.source = regexp.MustCompile(prefix + rule.Source) } if rule.Path != "" { parsedRule.path = regexp.MustCompile(rule.Path) } - r.rules = append(r.rules, parsedRule) + parsedRules = append(parsedRules, parsedRule) } - - return r + return parsedRules } func (p ExcludeRules) Process(issues []result.Issue) ([]result.Issue, error) { @@ -118,3 +123,21 @@ func (ExcludeRules) Name() string { return "exclude-rules" } func (ExcludeRules) Finish() {} var _ Processor = ExcludeRules{} + +type ExcludeRulesCaseSensitive struct { + *ExcludeRules +} + +func NewExcludeRulesCaseSensitive(rules []ExcludeRule, lineCache *fsutils.LineCache, log logutils.Log) *ExcludeRulesCaseSensitive { + r := &ExcludeRules{ + lineCache: lineCache, + log: log, + } + r.rules = createRules(rules, "") + + return &ExcludeRulesCaseSensitive{r} +} + +func (ExcludeRulesCaseSensitive) Name() string { return "exclude-rules-case-sensitive" } + +var _ Processor = ExcludeCaseSensitive{} diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/fixer.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/fixer.go index 401c68dad12..75fdc93f100 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/fixer.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/fixer.go @@ -185,7 +185,7 @@ func (f Fixer) applyInlineFixes(lineIssues []result.Issue, origLine []byte, line func (f Fixer) findNotIntersectingIssues(issues []result.Issue) []result.Issue { sort.SliceStable(issues, func(i, j int) bool { - a, b := issues[i], issues[j] //nolint:scopelint + a, b := issues[i], issues[j] return a.Line() < b.Line() }) @@ -218,11 +218,17 @@ func (f Fixer) writeFixedFile(origFileLines [][]byte, issues []result.Issue, tmp } origFileLineNumber := i + 1 - if nextIssue == nil || origFileLineNumber != nextIssue.Line() { + if nextIssue == nil || origFileLineNumber != nextIssue.GetLineRange().From { outLine = string(origFileLines[i]) } else { nextIssueIndex++ rng := nextIssue.GetLineRange() + if rng.From > rng.To { + // Maybe better decision is to skip such issues, re-evaluate if regressed. + f.log.Warnf("[fixer]: issue line range is probably invalid, fix can be incorrect (from=%d, to=%d, linter=%s)", + rng.From, rng.To, nextIssue.FromLinter, + ) + } i += rng.To - rng.From if nextIssue.Replacement.NeedOnlyDelete { continue diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/max_per_file_from_linter.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/max_per_file_from_linter.go index e9842966b5a..e83c569ef5e 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/max_per_file_from_linter.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/max_per_file_from_linter.go @@ -27,7 +27,7 @@ func NewMaxPerFileFromLinter(cfg *config.Config) *MaxPerFileFromLinter { } return &MaxPerFileFromLinter{ - flc: fileToLinterToCountMap{}, //nolint:goimports,gofmt + flc: fileToLinterToCountMap{}, maxPerFileFromLinterConfig: maxPerFileFromLinterConfig, } } diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/nolint.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/nolint.go index da7abacd4e3..2f1e48db4e9 100644 --- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/nolint.go +++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/nolint.go @@ -8,6 +8,8 @@ import ( "sort" "strings" + "github.com/golangci/golangci-lint/pkg/golinters" + "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/lint/lintersdb" "github.com/golangci/golangci-lint/pkg/logutils" "github.com/golangci/golangci-lint/pkg/result" @@ -16,7 +18,8 @@ import ( var nolintDebugf = logutils.Debug("nolint") type ignoredRange struct { - linters []string + linters []string + matchedIssueFromLinter map[string]bool result.Range col int } @@ -26,6 +29,15 @@ func (i *ignoredRange) doesMatch(issue *result.Issue) bool { return false } + // handle possible unused nolint directives + // nolintlint generates potential issues for every nolint directive and they are filtered out here + if issue.ExpectNoLint { + if issue.ExpectedNoLintLinter != "" { + return i.matchedIssueFromLinter[issue.ExpectedNoLintLinter] + } + return len(i.matchedIssueFromLinter) > 0 + } + if len(i.linters) == 0 { return true } @@ -46,17 +58,24 @@ type fileData struct { type filesCache map[string]*fileData type Nolint struct { - cache filesCache - dbManager *lintersdb.Manager - log logutils.Log + cache filesCache + dbManager *lintersdb.Manager + enabledLinters map[string]bool + log logutils.Log unknownLintersSet map[string]bool } -func NewNolint(log logutils.Log, dbManager *lintersdb.Manager) *Nolint { +func NewNolint(log logutils.Log, dbManager *lintersdb.Manager, enabledLCs []*linter.Config) *Nolint { + enabledLinters := make(map[string]bool, len(enabledLCs)) + for _, lc := range enabledLCs { + enabledLinters[lc.Name()] = true + } + return &Nolint{ cache: filesCache{}, dbManager: dbManager, + enabledLinters: enabledLinters, log: log, unknownLintersSet: map[string]bool{}, } @@ -69,6 +88,8 @@ func (p Nolint) Name() string { } func (p *Nolint) Process(issues []result.Issue) ([]result.Issue, error) { + // put nolintlint issues last because we process other issues first to determine which nolint directives are unused + sort.Stable(sortWithNolintlintLast(issues)) return filterIssuesErr(issues, p.shouldPassIssue) } @@ -124,6 +145,22 @@ func (p *Nolint) buildIgnoredRangesForFile(f *ast.File, fset *token.FileSet, fil } func (p *Nolint) shouldPassIssue(i *result.Issue) (bool, error) { + nolintDebugf("got issue: %v", *i) + if i.FromLinter == golinters.NolintlintName { + // always pass nolintlint issues except ones trying find unused nolint directives + if !i.ExpectNoLint { + return true, nil + } + if i.ExpectedNoLintLinter != "" { + // don't expect disabled linters to cover their nolint statements + nolintDebugf("enabled linters: %v", p.enabledLinters) + if !p.enabledLinters[i.ExpectedNoLintLinter] { + return false, nil + } + nolintDebugf("checking that lint issue was used for %s: %v", i.ExpectedNoLintLinter, i) + } + } + fd, err := p.getOrCreateFileData(i) if err != nil { return false, err @@ -131,6 +168,7 @@ func (p *Nolint) shouldPassIssue(i *result.Issue) (bool, error) { for _, ir := range fd.ignoredRanges { if ir.doesMatch(i) { + ir.matchedIssueFromLinter[i.FromLinter] = true return false, nil } } @@ -203,8 +241,9 @@ func (p *Nolint) extractInlineRangeFromComment(text string, g ast.Node, fset *to From: pos.Line, To: fset.Position(g.End()).Line, }, - col: pos.Column, - linters: linters, + col: pos.Column, + linters: linters, + matchedIssueFromLinter: make(map[string]bool), } } @@ -253,3 +292,18 @@ func (p Nolint) Finish() { p.log.Warnf("Found unknown linters in //nolint directives: %s", strings.Join(unknownLinters, ", ")) } + +// put nolintlint last +type sortWithNolintlintLast []result.Issue + +func (issues sortWithNolintlintLast) Len() int { + return len(issues) +} + +func (issues sortWithNolintlintLast) Less(i, j int) bool { + return issues[i].FromLinter != golinters.NolintlintName && issues[j].FromLinter == golinters.NolintlintName +} + +func (issues sortWithNolintlintLast) Swap(i, j int) { + issues[j], issues[i] = issues[i], issues[j] +} diff --git a/vendor/github.com/hashicorp/terraform-json/schemas.go b/vendor/github.com/hashicorp/terraform-json/schemas.go index e025fbe0410..5dd430a5553 100644 --- a/vendor/github.com/hashicorp/terraform-json/schemas.go +++ b/vendor/github.com/hashicorp/terraform-json/schemas.go @@ -83,6 +83,18 @@ type Schema struct { Block *SchemaBlock `json:"block,omitempty"` } +// SchemaDescriptionKind describes the format type for a particular description's field. +type SchemaDescriptionKind string + +const ( + // SchemaDescriptionKindPlain indicates a string in plain text format. + SchemaDescriptionKindPlain SchemaDescriptionKind = "plaintext" + + // SchemaDescriptionKindMarkdown indicates a Markdown string and may need to be + // processed prior to presentation. + SchemaDescriptionKindMarkdown SchemaDescriptionKind = "markdown" +) + // SchemaBlock represents a nested block within a particular schema. type SchemaBlock struct { // The attributes defined at the particular level of this block. @@ -90,6 +102,14 @@ type SchemaBlock struct { // Any nested blocks within this particular block. NestedBlocks map[string]*SchemaBlockType `json:"block_types,omitempty"` + + // The description for this block and format of the description. If + // no kind is provided, it can be assumed to be plain text. + Description string `json:"description,omitempty"` + DescriptionKind SchemaDescriptionKind `json:"description_kind,omitempty"` + + // If true, this block is deprecated. + Deprecated bool `json:"deprecated,omitempty"` } // SchemaNestingMode is the nesting mode for a particular nested @@ -145,8 +165,13 @@ type SchemaAttribute struct { // The attribute type. AttributeType cty.Type `json:"type,omitempty"` - // The description field for this attribute. - Description string `json:"description,omitempty"` + // The description field for this attribute. If no kind is + // provided, it can be assumed to be plain text. + Description string `json:"description,omitempty"` + DescriptionKind SchemaDescriptionKind `json:"description_kind,omitempty"` + + // If true, this attribute is deprecated. + Deprecated bool `json:"deprecated,omitempty"` // If true, this attribute is required - it has to be entered in // configuration. diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/acctest/doc.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/acctest/doc.go new file mode 100644 index 00000000000..08bff3c88b5 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/acctest/doc.go @@ -0,0 +1,31 @@ +// Package acctest provides the ability to opt in to the new binary test driver. The binary +// test driver allows you to run your acceptance tests with a binary of Terraform instead of +// an emulated version packaged inside the SDK. This allows for a number of important +// enhancements, but most notably a more realistic testing experience and matrix testing +// against multiple versions of Terraform CLI. This also allows the SDK to be completely +// separated, at a dependency level, from the Terraform CLI, as long as it is >= 0.12.0 +// +// The new test driver must be enabled by initialising the test helper in your TestMain +// function in all provider packages that run acceptance tests. Most providers have only +// one package. +// +// In v2 of the SDK, the binary test driver will be mandatory. +// +// After importing this package, you can add code similar to the following: +// +// func TestMain(m *testing.M) { +// acctest.UseBinaryDriver("provider_name", Provider) +// resource.TestMain(m) +// } +// +// Where `Provider` is the function that returns the instance of a configured `terraform.ResourceProvider` +// Some providers already have a TestMain defined, usually for the purpose of enabling test +// sweepers. These additional occurrences should be removed. +// +// Initialising the binary test helper using UseBinaryDriver causes all tests to be run using +// the new binary driver. Until SDK v2, the DisableBinaryDriver boolean property can be used +// to use the legacy test driver for an individual TestCase. +// +// It is no longer necessary to import other Terraform providers as Go modules: these +// imports should be removed. +package acctest diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/encryption/encryption.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/encryption/encryption.go index 110ed18cd96..a84bf4020e3 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/encryption/encryption.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/encryption/encryption.go @@ -12,6 +12,10 @@ import ( // RetrieveGPGKey returns the PGP key specified as the pgpKey parameter, or queries // the public key from the keybase service if the parameter is a keybase username // prefixed with the phrase "keybase:" +// +// Deprecated: This function will be removed in v2 without replacement. Please +// see https://www.terraform.io/docs/extend/best-practices/sensitive-state.html#don-39-t-encrypt-state +// for more information. func RetrieveGPGKey(pgpKey string) (string, error) { const keybasePrefix = "keybase:" @@ -29,6 +33,10 @@ func RetrieveGPGKey(pgpKey string) (string, error) { // EncryptValue encrypts the given value with the given encryption key. Description // should be set such that errors return a meaningful user-facing response. +// +// Deprecated: This function will be removed in v2 without replacement. Please +// see https://www.terraform.io/docs/extend/best-practices/sensitive-state.html#don-39-t-encrypt-state +// for more information. func EncryptValue(encryptionKey, value, description string) (string, string, error) { fingerprints, encryptedValue, err := pgpkeys.EncryptShares([][]byte{[]byte(value)}, []string{encryptionKey}) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/hashcode/hashcode.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/hashcode/hashcode.go index 6ccc5231834..f0c022dd235 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/hashcode/hashcode.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/hashcode/hashcode.go @@ -8,6 +8,10 @@ import ( // String hashes a string to a unique hashcode. // +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it, import crc32 directly, or reference the +// v1 package. +// // crc32 returns a uint32, but for our use we need // and non negative integer. Here we cast to an integer // and invert it if the result is negative. @@ -24,6 +28,10 @@ func String(s string) int { } // Strings hashes a list of strings to a unique hashcode. +// +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it, import crc32 directly, or reference the +// v1 package. func Strings(strings []string) string { var buf bytes.Buffer diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/mutexkv/mutexkv.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/mutexkv/mutexkv.go index 6917f2142bd..427ac9c88ad 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/mutexkv/mutexkv.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/mutexkv/mutexkv.go @@ -9,6 +9,9 @@ import ( // serialize changes across arbitrary collaborators that share knowledge of the // keys they must serialize on. // +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it or reference the v1 package. +// // The initial use case is to let aws_security_group_rule resources serialize // their access to individual security groups based on SG ID. type MutexKV struct { @@ -18,6 +21,9 @@ type MutexKV struct { // Locks the mutex for the given key. Caller is responsible for calling Unlock // for the same key +// +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it or reference the v1 package. func (m *MutexKV) Lock(key string) { log.Printf("[DEBUG] Locking %q", key) m.get(key).Lock() @@ -25,6 +31,9 @@ func (m *MutexKV) Lock(key string) { } // Unlock the mutex for the given key. Caller must have called Lock for the same key first +// +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it or reference the v1 package. func (m *MutexKV) Unlock(key string) { log.Printf("[DEBUG] Unlocking %q", key) m.get(key).Unlock() @@ -44,6 +53,9 @@ func (m *MutexKV) get(key string) *sync.Mutex { } // Returns a properly initalized MutexKV +// +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it or reference the v1 package. func NewMutexKV() *MutexKV { return &MutexKV{ store: make(map[string]*sync.Mutex), diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/map.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/map.go index 02a993d6922..4befdb353f0 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/map.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/map.go @@ -124,7 +124,7 @@ func (m *Map) Refresh( // a ResourceProvider. func (m *Map) Resources() []terraform.ResourceType { ks := make([]string, 0, len(m.Mapping)) - for k, _ := range m.Mapping { + for k := range m.Mapping { ks = append(ks, k) } sort.Strings(ks) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing.go index 8fa28d7bf7c..e9e8129827a 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing.go @@ -12,6 +12,7 @@ import ( "path/filepath" "reflect" "regexp" + "strconv" "strings" "syscall" "testing" @@ -108,10 +109,15 @@ func TestMain(m *testing.M) { os.Exit(1) } } else { + exitCode := m.Run() + if acctest.TestHelper != nil { - defer acctest.TestHelper.Close() + err := acctest.TestHelper.Close() + if err != nil { + log.Printf("Error cleaning up temporary test files: %s", err) + } } - os.Exit(m.Run()) + os.Exit(exitCode) } } @@ -255,6 +261,7 @@ func runSweeperWithRegion(region string, s *Sweeper, sweepers map[string]*Sweepe } const TestEnvVar = "TF_ACC" +const TestDisableBinaryTestingFlagEnvVar = "TF_DISABLE_BINARY_TESTING" // TestProvider can be implemented by any ResourceProvider to provide custom // reset functionality at the start of an acceptance test. @@ -331,7 +338,8 @@ type TestCase struct { // DisableBinaryDriver forces this test case to run using the legacy test // driver, even if the binary test driver has been enabled. - // This property will be removed in version 2.0.0 of the SDK. + // + // Deprecated: This property will be removed in version 2.0.0 of the SDK. DisableBinaryDriver bool } @@ -543,6 +551,14 @@ func Test(t TestT, c TestCase) { TestEnvVar)) return } + if v := os.Getenv(TestDisableBinaryTestingFlagEnvVar); v != "" { + b, err := strconv.ParseBool(v) + if err != nil { + t.Error(fmt.Errorf("Error parsing EnvVar %q value %q: %s", TestDisableBinaryTestingFlagEnvVar, v, err)) + } + + c.DisableBinaryDriver = b + } logWriter, err := LogOutput(t) if err != nil { @@ -553,12 +569,6 @@ func Test(t TestT, c TestCase) { // We require verbose mode so that the user knows what is going on. if !testTesting && !testing.Verbose() && !c.IsUnitTest { t.Fatal("Acceptance tests must be run with the -v flag on tests") - return - } - - // Run the PreCheck if we have it - if c.PreCheck != nil { - c.PreCheck() } // get instances of all providers, so we can use the individual @@ -573,9 +583,29 @@ func Test(t TestT, c TestCase) { } if acctest.TestHelper != nil && c.DisableBinaryDriver == false { + // auto-configure all providers + for _, p := range providers { + err = p.Configure(terraform.NewResourceConfigRaw(nil)) + if err != nil { + t.Fatal(err) + } + } + + // Run the PreCheck if we have it. + // This is done after the auto-configure to allow providers + // to override the default auto-configure parameters. + if c.PreCheck != nil { + c.PreCheck() + } + // inject providers for ImportStateVerify RunNewTest(t.(*testing.T), c, providers) return + } else { + // run the PreCheck if we have it + if c.PreCheck != nil { + c.PreCheck() + } } providerResolver, err := testProviderResolver(c) @@ -858,12 +888,12 @@ func testIDOnlyRefresh(c TestCase, opts terraform.ContextOpts, step TestStep, r expected := r.Primary.Attributes // Remove fields we're ignoring for _, v := range c.IDRefreshIgnore { - for k, _ := range actual { + for k := range actual { if strings.HasPrefix(k, v) { delete(actual, k) } } - for k, _ := range expected { + for k := range expected { if strings.HasPrefix(k, v) { delete(expected, k) } @@ -1001,28 +1031,28 @@ func ComposeAggregateTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc { // testing that computed values were set, when it is not possible to // know ahead of time what the values will be. func TestCheckResourceAttrSet(name, key string) TestCheckFunc { - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := primaryInstanceState(s, name) if err != nil { return err } return testCheckResourceAttrSet(is, name, key) - } + }) } // TestCheckModuleResourceAttrSet - as per TestCheckResourceAttrSet but with // support for non-root modules func TestCheckModuleResourceAttrSet(mp []string, name string, key string) TestCheckFunc { mpt := addrs.Module(mp).UnkeyedInstanceShim() - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := modulePathPrimaryInstanceState(s, mpt, name) if err != nil { return err } return testCheckResourceAttrSet(is, name, key) - } + }) } func testCheckResourceAttrSet(is *terraform.InstanceState, name string, key string) error { @@ -1036,28 +1066,28 @@ func testCheckResourceAttrSet(is *terraform.InstanceState, name string, key stri // TestCheckResourceAttr is a TestCheckFunc which validates // the value in state for the given name/key combination. func TestCheckResourceAttr(name, key, value string) TestCheckFunc { - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := primaryInstanceState(s, name) if err != nil { return err } return testCheckResourceAttr(is, name, key, value) - } + }) } // TestCheckModuleResourceAttr - as per TestCheckResourceAttr but with // support for non-root modules func TestCheckModuleResourceAttr(mp []string, name string, key string, value string) TestCheckFunc { mpt := addrs.Module(mp).UnkeyedInstanceShim() - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := modulePathPrimaryInstanceState(s, mpt, name) if err != nil { return err } return testCheckResourceAttr(is, name, key, value) - } + }) } func testCheckResourceAttr(is *terraform.InstanceState, name string, key string, value string) error { @@ -1091,28 +1121,28 @@ func testCheckResourceAttr(is *terraform.InstanceState, name string, key string, // TestCheckNoResourceAttr is a TestCheckFunc which ensures that // NO value exists in state for the given name/key combination. func TestCheckNoResourceAttr(name, key string) TestCheckFunc { - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := primaryInstanceState(s, name) if err != nil { return err } return testCheckNoResourceAttr(is, name, key) - } + }) } // TestCheckModuleNoResourceAttr - as per TestCheckNoResourceAttr but with // support for non-root modules func TestCheckModuleNoResourceAttr(mp []string, name string, key string) TestCheckFunc { mpt := addrs.Module(mp).UnkeyedInstanceShim() - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := modulePathPrimaryInstanceState(s, mpt, name) if err != nil { return err } return testCheckNoResourceAttr(is, name, key) - } + }) } func testCheckNoResourceAttr(is *terraform.InstanceState, name string, key string) error { @@ -1139,28 +1169,28 @@ func testCheckNoResourceAttr(is *terraform.InstanceState, name string, key strin // TestMatchResourceAttr is a TestCheckFunc which checks that the value // in state for the given name/key combination matches the given regex. func TestMatchResourceAttr(name, key string, r *regexp.Regexp) TestCheckFunc { - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := primaryInstanceState(s, name) if err != nil { return err } return testMatchResourceAttr(is, name, key, r) - } + }) } // TestModuleMatchResourceAttr - as per TestMatchResourceAttr but with // support for non-root modules func TestModuleMatchResourceAttr(mp []string, name string, key string, r *regexp.Regexp) TestCheckFunc { mpt := addrs.Module(mp).UnkeyedInstanceShim() - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSet(key, func(s *terraform.State) error { is, err := modulePathPrimaryInstanceState(s, mpt, name) if err != nil { return err } return testMatchResourceAttr(is, name, key, r) - } + }) } func testMatchResourceAttr(is *terraform.InstanceState, name string, key string, r *regexp.Regexp) error { @@ -1196,7 +1226,7 @@ func TestCheckModuleResourceAttrPtr(mp []string, name string, key string, value // TestCheckResourceAttrPair is a TestCheckFunc which validates that the values // in state for a pair of name/key combinations are equal. func TestCheckResourceAttrPair(nameFirst, keyFirst, nameSecond, keySecond string) TestCheckFunc { - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSetPair(keyFirst, keySecond, func(s *terraform.State) error { isFirst, err := primaryInstanceState(s, nameFirst) if err != nil { return err @@ -1208,7 +1238,7 @@ func TestCheckResourceAttrPair(nameFirst, keyFirst, nameSecond, keySecond string } return testCheckResourceAttrPair(isFirst, nameFirst, keyFirst, isSecond, nameSecond, keySecond) - } + }) } // TestCheckModuleResourceAttrPair - as per TestCheckResourceAttrPair but with @@ -1216,7 +1246,7 @@ func TestCheckResourceAttrPair(nameFirst, keyFirst, nameSecond, keySecond string func TestCheckModuleResourceAttrPair(mpFirst []string, nameFirst string, keyFirst string, mpSecond []string, nameSecond string, keySecond string) TestCheckFunc { mptFirst := addrs.Module(mpFirst).UnkeyedInstanceShim() mptSecond := addrs.Module(mpSecond).UnkeyedInstanceShim() - return func(s *terraform.State) error { + return checkIfIndexesIntoTypeSetPair(keyFirst, keySecond, func(s *terraform.State) error { isFirst, err := modulePathPrimaryInstanceState(s, mptFirst, nameFirst) if err != nil { return err @@ -1228,7 +1258,7 @@ func TestCheckModuleResourceAttrPair(mpFirst []string, nameFirst string, keyFirs } return testCheckResourceAttrPair(isFirst, nameFirst, keyFirst, isSecond, nameSecond, keySecond) - } + }) } func testCheckResourceAttrPair(isFirst *terraform.InstanceState, nameFirst string, keyFirst string, isSecond *terraform.InstanceState, nameSecond string, keySecond string) error { @@ -1404,3 +1434,35 @@ func detailedErrorMessage(err error) string { return err.Error() } } + +// indexesIntoTypeSet is a heuristic to try and identify if a flatmap style +// string address uses a precalculated TypeSet hash, which are integers and +// typically are large and obviously not a list index +func indexesIntoTypeSet(key string) bool { + for _, part := range strings.Split(key, ".") { + if i, err := strconv.Atoi(part); err == nil && i > 100 { + return true + } + } + return false +} + +func checkIfIndexesIntoTypeSet(key string, f TestCheckFunc) TestCheckFunc { + return func(s *terraform.State) error { + err := f(s) + if err != nil && s.IsBinaryDrivenTest && indexesIntoTypeSet(key) { + return fmt.Errorf("Error in test check: %s\nTest check address %q likely indexes into TypeSet\nThis is not possible in V1 of the SDK while using the binary driver\nPlease disable the driver for this TestCase with DisableBinaryDriver: true", err, key) + } + return err + } +} + +func checkIfIndexesIntoTypeSetPair(keyFirst, keySecond string, f TestCheckFunc) TestCheckFunc { + return func(s *terraform.State) error { + err := f(s) + if err != nil && s.IsBinaryDrivenTest && (indexesIntoTypeSet(keyFirst) || indexesIntoTypeSet(keySecond)) { + return fmt.Errorf("Error in test check: %s\nTest check address %q or %q likely indexes into TypeSet\nThis is not possible in V1 of the SDK while using the binary driver\nPlease disable the driver for this TestCase with DisableBinaryDriver: true", err, keyFirst, keySecond) + } + return err + } +} diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_import_state.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_import_state.go index 561873dea13..7b7c30a7a2b 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_import_state.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_import_state.go @@ -81,7 +81,7 @@ func testStepImportState( Config: cfg, Targets: []*terraform.ImportTarget{ - &terraform.ImportTarget{ + { Addr: importAddr, ID: importId, }, diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new.go index c393d9c24b3..34244e095f8 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new.go @@ -14,13 +14,18 @@ import ( tftest "github.com/hashicorp/terraform-plugin-test" ) -func getState(t *testing.T, wd *tftest.WorkingDir) *terraform.State { - jsonState := wd.RequireState(t) - state, err := shimStateFromJson(jsonState) - if err != nil { - t.Fatal(err) +func runPostTestDestroy(t *testing.T, c TestCase, wd *tftest.WorkingDir) error { + wd.RequireDestroy(t) + + if c.CheckDestroy != nil { + statePostDestroy := getState(t, wd) + + if err := c.CheckDestroy(statePostDestroy); err != nil { + return err + } } - return state + + return nil } func RunNewTest(t *testing.T, c TestCase, providers map[string]terraform.ResourceProvider) { @@ -29,15 +34,12 @@ func RunNewTest(t *testing.T, c TestCase, providers map[string]terraform.Resourc wd := acctest.TestHelper.RequireNewWorkingDir(t) defer func() { - wd.RequireDestroy(t) + statePreDestroy := getState(t, wd) - if c.CheckDestroy != nil { - statePostDestroy := getState(t, wd) - - if err := c.CheckDestroy(statePostDestroy); err != nil { - t.Fatal(err) - } + if !stateIsEmpty(statePreDestroy) { + runPostTestDestroy(t, c, wd) } + wd.Close() }() @@ -98,6 +100,19 @@ func RunNewTest(t *testing.T, c TestCase, providers map[string]terraform.Resourc } } +func getState(t *testing.T, wd *tftest.WorkingDir) *terraform.State { + jsonState := wd.RequireState(t) + state, err := shimStateFromJson(jsonState) + if err != nil { + t.Fatal(err) + } + return state +} + +func stateIsEmpty(state *terraform.State) bool { + return state.Empty() || !state.HasResources() +} + func planIsEmpty(plan *tfjson.Plan) bool { for _, rc := range plan.ResourceChanges { if rc.Mode == tfjson.DataResourceMode { @@ -114,6 +129,7 @@ func planIsEmpty(plan *tfjson.Plan) bool { } return true } + func testIDRefresh(c TestCase, t *testing.T, wd *tftest.WorkingDir, step TestStep, r *terraform.ResourceState) error { spewConf := spew.NewDefaultConfig() spewConf.SortKeys = true @@ -146,12 +162,12 @@ func testIDRefresh(c TestCase, t *testing.T, wd *tftest.WorkingDir, step TestSte expected := r.Primary.Attributes // Remove fields we're ignoring for _, v := range c.IDRefreshIgnore { - for k, _ := range actual { + for k := range actual { if strings.HasPrefix(k, v) { delete(actual, k) } } - for k, _ := range expected { + for k := range expected { if strings.HasPrefix(k, v) { delete(expected, k) } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new_config.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new_config.go index d2fbf29d783..a59d685d8d9 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new_config.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/resource/testing_new_config.go @@ -32,6 +32,7 @@ func testStepNewConfig(t *testing.T, c TestCase, wd *tftest.WorkingDir, step Tes state := getState(t, wd) if step.Check != nil { + state.IsBinaryDrivenTest = true if err := step.Check(state); err != nil { t.Fatal(err) } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/core_schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/core_schema.go index fa03d83384c..d16abef88f4 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/core_schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/core_schema.go @@ -7,6 +7,26 @@ import ( "github.com/zclconf/go-cty/cty" ) +var ( + // DescriptionKind is the default StringKind of descriptions in this provider. + // It defaults to StringPlain but can be globally switched to StringMarkdown. + DescriptionKind = configschema.StringPlain + + // SchemaDescriptionBuilder converts helper/schema.Schema Descriptions to configschema.Attribute + // and Block Descriptions. This method can be used to modify the description text prior to it + // being returned in the schema. + SchemaDescriptionBuilder = func(s *Schema) string { + return s.Description + } + + // ResourceDescriptionBuilder converts helper/schema.Resource Descriptions to configschema.Block + // Descriptions at the resource top level. This method can be used to modify the description prior + // to it being returned in the schema. + ResourceDescriptionBuilder = func(r *Resource) string { + return r.Description + } +) + // The functions and methods in this file are concerned with the conversion // of this package's schema model into the slightly-lower-level schema model // used by Terraform core for configuration parsing. @@ -115,13 +135,22 @@ func (s *Schema) coreConfigSchemaAttribute() *configschema.Attribute { } } + desc := SchemaDescriptionBuilder(s) + descKind := DescriptionKind + if desc == "" { + // fallback to plain text if empty + descKind = configschema.StringPlain + } + return &configschema.Attribute{ - Type: s.coreConfigSchemaType(), - Optional: opt, - Required: reqd, - Computed: s.Computed, - Sensitive: s.Sensitive, - Description: s.Description, + Type: s.coreConfigSchemaType(), + Optional: opt, + Required: reqd, + Computed: s.Computed, + Sensitive: s.Sensitive, + Description: desc, + DescriptionKind: descKind, + Deprecated: s.Deprecated != "", } } @@ -132,6 +161,17 @@ func (s *Schema) coreConfigSchemaBlock() *configschema.NestedBlock { ret := &configschema.NestedBlock{} if nested := s.Elem.(*Resource).coreConfigSchema(); nested != nil { ret.Block = *nested + + desc := SchemaDescriptionBuilder(s) + descKind := DescriptionKind + if desc == "" { + // fallback to plain text if empty + descKind = configschema.StringPlain + } + // set these on the block from the attribute Schema + ret.Block.Description = desc + ret.Block.DescriptionKind = descKind + ret.Block.Deprecated = s.Deprecated != "" } switch s.Type { case TypeList: @@ -231,6 +271,18 @@ func (s *Schema) coreConfigSchemaType() cty.Type { func (r *Resource) CoreConfigSchema() *configschema.Block { block := r.coreConfigSchema() + desc := ResourceDescriptionBuilder(r) + descKind := DescriptionKind + if desc == "" { + // fallback to plain text if empty + descKind = configschema.StringPlain + } + + // Only apply Resource Description, Kind, Deprecation at top level + block.Description = desc + block.DescriptionKind = descKind + block.Deprecated = r.DeprecationMessage != "" + if block.Attributes == nil { block.Attributes = map[string]*configschema.Attribute{} } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader.go index 2a66a068fb6..b3c023d19f1 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_reader.go @@ -44,6 +44,8 @@ func (r *FieldReadResult) ValueOrZero(s *Schema) interface{} { // SchemasForFlatmapPath tries its best to find a sequence of schemas that // the given dot-delimited attribute path traverses through. +// +// Deprecated: This function will be removed in version 2 without replacement. func SchemasForFlatmapPath(path string, schemaMap map[string]*Schema) []*Schema { parts := strings.Split(path, ".") return addrToSchema(parts, schemaMap) @@ -205,7 +207,7 @@ func readListField( // Go through each count, and get the item value out of it result := make([]interface{}, countResult.Value.(int)) - for i, _ := range result { + for i := range result { is := strconv.FormatInt(int64(i), 10) addrPadded[len(addrPadded)-1] = is rawResult, err := r.ReadField(addrPadded) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_writer_map.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_writer_map.go index c09358b1bb4..85d05be4c3b 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_writer_map.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/field_writer_map.go @@ -146,7 +146,7 @@ func (w *MapFieldWriter) setList( } } if err != nil { - for i, _ := range vs { + for i := range vs { is := strconv.FormatInt(int64(i), 10) setElement(is, nil) } @@ -227,7 +227,7 @@ func (w *MapFieldWriter) setObject( } } if err != nil { - for k1, _ := range v { + for k1 := range v { w.set(append(addrCopy, k1), nil) } } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go index bbea5dbd57a..2f88f1eab91 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go @@ -98,7 +98,7 @@ func (p *Provider) InternalValidate() error { } // Provider-specific checks - for k, _ := range sm { + for k := range sm { if isReservedProviderFieldName(k) { return fmt.Errorf("%s is a reserved field name for a provider", k) } @@ -454,7 +454,7 @@ func (p *Provider) ReadDataApply( // DataSources implementation of terraform.ResourceProvider interface. func (p *Provider) DataSources() []terraform.DataSource { keys := make([]string, 0, len(p.DataSourcesMap)) - for k, _ := range p.DataSourcesMap { + for k := range p.DataSourcesMap { keys = append(keys, k) } sort.Strings(keys) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go index 406dcdf7123..1bc30808819 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go @@ -172,6 +172,11 @@ type Resource struct { // actions (Create, Read, Update, Delete, Default) to the Resource struct, and // accessing them in the matching methods. Timeouts *ResourceTimeout + + // Description is used as the description for docs, the language server and + // other user facing usage. It can be plain-text or markdown depending on the + // global DescriptionKind setting. + Description string } // ShimInstanceStateFromValue converts a cty.Value to a @@ -689,7 +694,7 @@ func (r *Resource) InternalValidate(topSchemaMap schemaMap, writable bool) error // Data source if r.isTopLevel() && !writable { tsm = schemaMap(r.Schema) - for k, _ := range tsm { + for k := range tsm { if isReservedDataSourceFieldName(k) { return fmt.Errorf("%s is a reserved field name", k) } @@ -765,6 +770,8 @@ func (r *Resource) TestResourceData() *ResourceData { // SchemasForFlatmapPath tries its best to find a sequence of schemas that // the given dot-delimited attribute path traverses through in the schema // of the receiving Resource. +// +// Deprecated: This function will be removed in version 2 without replacement. func (r *Resource) SchemasForFlatmapPath(path string) []*Schema { return SchemasForFlatmapPath(path, r.Schema) } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go index ad00b93d0b7..b855801d91d 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource_data.go @@ -108,16 +108,11 @@ func (d *ResourceData) GetOk(key string) (interface{}, bool) { return r.Value, exists } -// GetOkExists returns the data for a given key and whether or not the key -// has been set to a non-zero value. This is only useful for determining -// if boolean attributes have been set, if they are Optional but do not -// have a Default value. +// GetOkExists can check if TypeBool attributes that are Optional with +// no Default value have been set. // -// 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. -// This should only be used if absolutely required/needed. +// Deprecated: usage is discouraged due to undefined behaviors and may be +// removed in a future version of the SDK func (d *ResourceData) GetOkExists(key string) (interface{}, bool) { r := d.getRaw(key, getSourceSet) exists := r.Exists && !r.Computed @@ -162,9 +157,6 @@ func (d *ResourceData) HasChange(key string) bool { // When partial state mode is enabled, then only key prefixes specified // by SetPartial will be in the final state. This allows providers to return // partial states for partially applied resources (when errors occur). -// -// Deprecated: Partial state has very limited benefit given Terraform refreshes -// before operations by default. func (d *ResourceData) Partial(on bool) { d.partial = on if on { @@ -320,7 +312,7 @@ func (d *ResourceData) State() *terraform.InstanceState { // integrity check of fields existing in the schema, allowing dynamic // keys to be created. hasDynamicAttributes := false - for k, _ := range d.schema { + for k := range d.schema { if k == "__has_dynamic_attributes" { hasDynamicAttributes = true log.Printf("[INFO] Resource %s has dynamic attributes", result.ID) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go index 0cd64635e7e..df0172fa108 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go @@ -138,9 +138,9 @@ type Schema struct { Default interface{} DefaultFunc SchemaDefaultFunc - // Description is used as the description for docs or asking for user - // input. It should be relatively short (a few sentences max) and should - // be formatted to fit a CLI. + // Description is used as the description for docs, the language server and + // other user facing usage. It can be plain-text or markdown depending on the + // global DescriptionKind setting. Description string // InputDefault is the default value to use for when inputs are requested. @@ -223,9 +223,12 @@ type Schema struct { // // AtLeastOneOf is a set of schema keys that, when set, at least one of // the keys in that list must be specified. + // + // RequiredWith is a set of schema keys that must be set simultaneously. ConflictsWith []string ExactlyOneOf []string AtLeastOneOf []string + RequiredWith []string // When Deprecated is set, this attribute is deprecated. // @@ -236,6 +239,9 @@ type Schema struct { // When Removed is set, this attribute has been removed from the schema // + // Deprecated: This field will be removed in version 2 without replacement + // as the functionality is not necessary. + // // Removed attributes can be left in the Schema to generate informative error // messages for the user when they show up in resource configurations. // This string is the message shown to the user with instructions on @@ -625,7 +631,7 @@ func (m schemaMap) Input( input terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error) { keys := make([]string, 0, len(m)) - for k, _ := range m { + for k := range m { keys = append(keys, k) } sort.Strings(keys) @@ -767,21 +773,28 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro } if len(v.ConflictsWith) > 0 { - err := checkKeysAgainstSchemaFlags(k, v.ConflictsWith, topSchemaMap) + err := checkKeysAgainstSchemaFlags(k, v.ConflictsWith, topSchemaMap, v, false) if err != nil { return fmt.Errorf("ConflictsWith: %+v", err) } } + if len(v.RequiredWith) > 0 { + err := checkKeysAgainstSchemaFlags(k, v.RequiredWith, topSchemaMap, v, true) + if err != nil { + return fmt.Errorf("RequiredWith: %+v", err) + } + } + if len(v.ExactlyOneOf) > 0 { - err := checkKeysAgainstSchemaFlags(k, v.ExactlyOneOf, topSchemaMap) + err := checkKeysAgainstSchemaFlags(k, v.ExactlyOneOf, topSchemaMap, v, true) if err != nil { return fmt.Errorf("ExactlyOneOf: %+v", err) } } if len(v.AtLeastOneOf) > 0 { - err := checkKeysAgainstSchemaFlags(k, v.AtLeastOneOf, topSchemaMap) + err := checkKeysAgainstSchemaFlags(k, v.AtLeastOneOf, topSchemaMap, v, true) if err != nil { return fmt.Errorf("AtLeastOneOf: %+v", err) } @@ -850,14 +863,20 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro return nil } -func checkKeysAgainstSchemaFlags(k string, keys []string, topSchemaMap schemaMap) error { +func checkKeysAgainstSchemaFlags(k string, keys []string, topSchemaMap schemaMap, self *Schema, allowSelfReference bool) error { for _, key := range keys { parts := strings.Split(key, ".") sm := topSchemaMap var target *Schema - for _, part := range parts { - // Skip index fields - if _, err := strconv.Atoi(part); err == nil { + for idx, part := range parts { + // Skip index fields if 0 + partInt, err := strconv.Atoi(part) + + if err == nil { + if partInt != 0 { + return fmt.Errorf("%s configuration block reference (%s) can only use the .0. index for TypeList and MaxItems: 1 configuration blocks", k, key) + } + continue } @@ -866,13 +885,28 @@ func checkKeysAgainstSchemaFlags(k string, keys []string, topSchemaMap schemaMap return fmt.Errorf("%s references unknown attribute (%s) at part (%s)", k, key, part) } - if subResource, ok := target.Elem.(*Resource); ok { - sm = schemaMap(subResource.Schema) + subResource, ok := target.Elem.(*Resource) + + if !ok { + continue + } + + // Skip Type/MaxItems check if not the last element + if (target.Type == TypeSet || target.MaxItems != 1) && idx+1 != len(parts) { + return fmt.Errorf("%s configuration block reference (%s) can only be used with TypeList and MaxItems: 1 configuration blocks", k, key) } + + sm = schemaMap(subResource.Schema) } + if target == nil { return fmt.Errorf("%s cannot find target attribute (%s), sm: %#v", k, key, sm) } + + if target == self && !allowSelfReference { + return fmt.Errorf("%s cannot reference self (%s)", k, key) + } + if target.Required { return fmt.Errorf("%s cannot contain Required attribute (%s)", k, key) } @@ -881,6 +915,7 @@ func checkKeysAgainstSchemaFlags(k string, keys []string, topSchemaMap schemaMap return fmt.Errorf("%s cannot contain Computed(When) attribute (%s)", k, key) } } + return nil } @@ -1414,6 +1449,11 @@ func (m schemaMap) validate( "%q: this field cannot be set", k)} } + err = validateRequiredWithAttribute(k, schema, c) + if err != nil { + return nil, []error{err} + } + // If the value is unknown then we can't validate it yet. // In particular, this avoids spurious type errors where downstream // validation code sees UnknownVariableValue as being just a string. @@ -1494,6 +1534,27 @@ func removeDuplicates(elements []string) []string { return result } +func validateRequiredWithAttribute( + k string, + schema *Schema, + c *terraform.ResourceConfig) error { + + if len(schema.RequiredWith) == 0 { + return nil + } + + allKeys := removeDuplicates(append(schema.RequiredWith, k)) + sort.Strings(allKeys) + + for _, key := range allKeys { + if _, ok := c.Get(key); !ok { + return fmt.Errorf("%q: all of `%s` must be specified", k, strings.Join(allKeys, ",")) + } + } + + return nil +} + func validateExactlyOneAttribute( k string, schema *Schema, @@ -1608,7 +1669,7 @@ func (m schemaMap) validateList( // Now build the []interface{} raws := make([]interface{}, rawV.Len()) - for i, _ := range raws { + for i := range raws { raws[i] = rawV.Index(i).Interface() } @@ -1694,7 +1755,7 @@ func (m schemaMap) validateMap( // It is a slice, verify that all the elements are maps raws := make([]interface{}, rawV.Len()) - for i, _ := range raws { + for i := range raws { raws[i] = rawV.Index(i).Interface() } @@ -1818,7 +1879,7 @@ func (m schemaMap) validateObject( // Detect any extra/unknown keys and report those as errors. if m, ok := raw.(map[string]interface{}); ok { - for subk, _ := range m { + for subk := range m { if _, ok := schema[subk]; !ok { if subk == TimeoutsConfigKey { continue diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go index fe6d7504c74..945b0b7ed35 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go @@ -51,6 +51,8 @@ func SerializeValueForHash(buf *bytes.Buffer, val interface{}, schema *Schema) { buf.WriteRune(':') switch innerVal := innerVal.(type) { + case bool: + buf.WriteString(strconv.FormatBool(innerVal)) case int: buf.WriteString(strconv.Itoa(innerVal)) case float64: diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go index daa431ddb1c..1b39ff639d1 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/set.go @@ -150,13 +150,46 @@ func (s *Set) Union(other *Set) *Set { return result } +func checkSetMapEqual(m1, m2 map[string]interface{}) bool { + if (m1 == nil) != (m2 == nil) { + return false + } + if len(m1) != len(m2) { + return false + } + for k := range m1 { + v1 := m1[k] + v2, ok := m2[k] + if !ok { + return false + } + switch v1.(type) { + case map[string]interface{}: + same := checkSetMapEqual(v1.(map[string]interface{}), v2.(map[string]interface{})) + if !same { + return false + } + case *Set: + same := v1.(*Set).Equal(v2) + if !same { + return false + } + default: + same := reflect.DeepEqual(v1, v2) + if !same { + return false + } + } + } + return true +} + func (s *Set) Equal(raw interface{}) bool { other, ok := raw.(*Set) if !ok { return false } - - return reflect.DeepEqual(s.m, other.m) + return checkSetMapEqual(s.m, other.m) } // HashEqual simply checks to the keys the top-level map to the keys in the diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/validation/strings.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/validation/strings.go index a5bfb6bea54..c4e53b5126f 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/validation/strings.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/validation/strings.go @@ -148,6 +148,28 @@ func StringInSlice(valid []string, ignoreCase bool) schema.SchemaValidateFunc { } } +// StringNotInSlice returns a SchemaValidateFunc which tests if the provided value +// is of type string and does not match the value of any element in the invalid slice +// will test with in lower case if ignoreCase is true +func StringNotInSlice(invalid []string, ignoreCase bool) schema.SchemaValidateFunc { + return func(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected type of %s to be string", k)) + return warnings, errors + } + + for _, str := range invalid { + if v == str || (ignoreCase && strings.ToLower(v) == strings.ToLower(str)) { + errors = append(errors, fmt.Errorf("expected %s to not be any of %v, got %s", k, invalid, v)) + return warnings, errors + } + } + + return warnings, errors + } +} + // StringDoesNotContainAny returns a SchemaValidateFunc which validates that the // provided value does not contain any of the specified Unicode code points in chars. func StringDoesNotContainAny(chars string) schema.SchemaValidateFunc { diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/httpclient/useragent.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/httpclient/useragent.go index 36b494c0149..158b499e7c3 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/httpclient/useragent.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/httpclient/useragent.go @@ -11,6 +11,10 @@ import ( const uaEnvVar = "TF_APPEND_USER_AGENT" +// TerraformUserAgent returns a User-Agent header for a Terraform version string. +// +// Deprecated: This will be removed in v2 without replacement. If you need +// its functionality, you can copy it or reference the v1 package. func TerraformUserAgent(version string) string { ua := fmt.Sprintf("HashiCorp Terraform/%s (+https://www.terraform.io) Terraform Plugin SDK/%s", version, meta.SDKVersionString()) diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/configs/configschema/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/configs/configschema/schema.go index f4702d369ed..b41a3096889 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/configs/configschema/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/configs/configschema/schema.go @@ -4,6 +4,17 @@ import ( "github.com/zclconf/go-cty/cty" ) +// StringKind represents the format a string is in. +type StringKind int + +const ( + // StringPlain indicates a string is plain-text and requires no processing for display. + StringPlain StringKind = iota + // StringMarkdown indicates a string is in markdown format and may + // require additional processing to display. + StringMarkdown +) + // Block represents a configuration block. // // "Block" here is a logical grouping construct, though it happens to map @@ -21,6 +32,15 @@ type Block struct { // BlockTypes describes any nested block types that may appear directly // inside the block. BlockTypes map[string]*NestedBlock + + // Description and DescriptionKind contain a user facing description of the block + // and the format of that string. + Description string + DescriptionKind StringKind + + // Deprecated indicates whether the block has been marked as deprecated in the + // provider and usage should be discouraged. + Deprecated bool } // Attribute represents a configuration attribute, within a block. @@ -32,7 +52,8 @@ type Attribute struct { // usage of the attribute. A description should be concise and use only // one or two sentences, leaving full definition to longer-form // documentation defined elsewhere. - Description string + Description string + DescriptionKind StringKind // Required, if set to true, specifies that an omitted or null value is // not permitted. @@ -55,6 +76,10 @@ type Attribute struct { // future to help Terraform mask sensitive information. (Terraform // currently achieves this in a limited sense via other mechanisms.) Sensitive bool + + // Deprecated indicates whether the attribute has been marked as deprecated in the + // provider and usage should be discouraged. + Deprecated bool } // NestedBlock represents the embedding of one block within another. diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/flatmap/map.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/flatmap/map.go index 46b72c4014a..435e04a39db 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/flatmap/map.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/flatmap/map.go @@ -25,7 +25,7 @@ func (m Map) Contains(key string) bool { // Delete deletes a key out of the map with the given prefix. func (m Map) Delete(prefix string) { - for k, _ := range m { + for k := range m { match := k == prefix if !match { if !strings.HasPrefix(k, prefix) { @@ -44,7 +44,7 @@ func (m Map) Delete(prefix string) { // Keys returns all of the top-level keys in this map func (m Map) Keys() []string { ks := make(map[string]struct{}) - for k, _ := range m { + for k := range m { idx := strings.Index(k, ".") if idx == -1 { idx = len(k) @@ -54,7 +54,7 @@ func (m Map) Keys() []string { } result := make([]string, 0, len(ks)) - for k, _ := range ks { + for k := range ks { result = append(result, k) } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/config/validator.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/config/validator.go index 35a3e7a4989..be5db8b982d 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/config/validator.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/config/validator.go @@ -76,7 +76,7 @@ func (v *Validator) Validate( } // The rest are unknown - for k, _ := range flat { + for k := range flat { es = append(es, fmt.Errorf("Unknown configuration: %s", k)) } @@ -116,7 +116,7 @@ type basicValidatorKey struct { func (v *basicValidatorKey) Validate( m map[string]string) ([]string, []string, []error) { - for k, _ := range m { + for k := range m { // If we have the exact key its a match if k == v.Key { return []string{k}, nil, nil @@ -188,7 +188,7 @@ func (v *nestedValidatorKey) validate( u = append(u, prefix) // Mark all prefixes of this - for k, _ := range m { + for k := range m { if !strings.HasPrefix(k, prefix+".") { continue } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/plugin/convert/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/plugin/convert/schema.go index 105c32c6fa5..88b8a9a6992 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/plugin/convert/schema.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/plugin/convert/schema.go @@ -2,6 +2,7 @@ package convert import ( "encoding/json" + "log" "reflect" "sort" @@ -13,17 +14,24 @@ import ( // ConfigSchemaToProto takes a *configschema.Block and converts it to a // proto.Schema_Block for a grpc response. func ConfigSchemaToProto(b *configschema.Block) *proto.Schema_Block { - block := &proto.Schema_Block{} + block := &proto.Schema_Block{ + Description: b.Description, + DescriptionKind: protoStringKind(b.DescriptionKind), + Deprecated: b.Deprecated, + } for _, name := range sortedKeys(b.Attributes) { a := b.Attributes[name] + attr := &proto.Schema_Attribute{ - Name: name, - Description: a.Description, - Optional: a.Optional, - Computed: a.Computed, - Required: a.Required, - Sensitive: a.Sensitive, + Name: name, + Description: a.Description, + DescriptionKind: protoStringKind(a.DescriptionKind), + Optional: a.Optional, + Computed: a.Computed, + Required: a.Required, + Sensitive: a.Sensitive, + Deprecated: a.Deprecated, } ty, err := json.Marshal(a.Type) @@ -44,6 +52,18 @@ func ConfigSchemaToProto(b *configschema.Block) *proto.Schema_Block { return block } +func protoStringKind(k configschema.StringKind) proto.StringKind { + switch k { + default: + log.Printf("[TRACE] unexpected configschema.StringKind: %d", k) + return proto.StringKind_PLAIN + case configschema.StringPlain: + return proto.StringKind_PLAIN + case configschema.StringMarkdown: + return proto.StringKind_MARKDOWN + } +} + func protoSchemaNestedBlock(name string, b *configschema.NestedBlock) *proto.Schema_NestedBlock { var nesting proto.Schema_NestedBlock_NestingMode switch b.Nesting { @@ -83,15 +103,21 @@ func ProtoToConfigSchema(b *proto.Schema_Block) *configschema.Block { block := &configschema.Block{ Attributes: make(map[string]*configschema.Attribute), BlockTypes: make(map[string]*configschema.NestedBlock), + + Description: b.Description, + DescriptionKind: schemaStringKind(b.DescriptionKind), + Deprecated: b.Deprecated, } for _, a := range b.Attributes { attr := &configschema.Attribute{ - Description: a.Description, - Required: a.Required, - Optional: a.Optional, - Computed: a.Computed, - Sensitive: a.Sensitive, + Description: a.Description, + DescriptionKind: schemaStringKind(a.DescriptionKind), + Required: a.Required, + Optional: a.Optional, + Computed: a.Computed, + Sensitive: a.Sensitive, + Deprecated: a.Deprecated, } if err := json.Unmarshal(a.Type, &attr.Type); err != nil { @@ -108,6 +134,18 @@ func ProtoToConfigSchema(b *proto.Schema_Block) *configschema.Block { return block } +func schemaStringKind(k proto.StringKind) configschema.StringKind { + switch k { + default: + log.Printf("[TRACE] unexpected proto.StringKind: %d", k) + return configschema.StringPlain + case proto.StringKind_PLAIN: + return configschema.StringPlain + case proto.StringKind_MARKDOWN: + return configschema.StringMarkdown + } +} + func schemaNestedBlock(b *proto.Schema_NestedBlock) *configschema.NestedBlock { var nesting configschema.NestingMode switch b.Nesting { diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go index 86fd21e41e0..84179725d69 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go @@ -24,6 +24,31 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +type StringKind int32 + +const ( + StringKind_PLAIN StringKind = 0 + StringKind_MARKDOWN StringKind = 1 +) + +var StringKind_name = map[int32]string{ + 0: "PLAIN", + 1: "MARKDOWN", +} + +var StringKind_value = map[string]int32{ + "PLAIN": 0, + "MARKDOWN": 1, +} + +func (x StringKind) String() string { + return proto.EnumName(StringKind_name, int32(x)) +} + +func (StringKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_17ae6090ff270234, []int{0} +} + type Diagnostic_Severity int32 const ( @@ -542,6 +567,9 @@ type Schema_Block struct { Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Attributes []*Schema_Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` BlockTypes []*Schema_NestedBlock `protobuf:"bytes,3,rep,name=block_types,json=blockTypes,proto3" json:"block_types,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + DescriptionKind StringKind `protobuf:"varint,5,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"` + Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -593,17 +621,40 @@ func (m *Schema_Block) GetBlockTypes() []*Schema_NestedBlock { return nil } +func (m *Schema_Block) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Schema_Block) GetDescriptionKind() StringKind { + if m != nil { + return m.DescriptionKind + } + return StringKind_PLAIN +} + +func (m *Schema_Block) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + type Schema_Attribute struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` - Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"` - Computed bool `protobuf:"varint,6,opt,name=computed,proto3" json:"computed,omitempty"` - Sensitive bool `protobuf:"varint,7,opt,name=sensitive,proto3" json:"sensitive,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"` + Computed bool `protobuf:"varint,6,opt,name=computed,proto3" json:"computed,omitempty"` + Sensitive bool `protobuf:"varint,7,opt,name=sensitive,proto3" json:"sensitive,omitempty"` + DescriptionKind StringKind `protobuf:"varint,8,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"` + Deprecated bool `protobuf:"varint,9,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Schema_Attribute) Reset() { *m = Schema_Attribute{} } @@ -680,6 +731,20 @@ func (m *Schema_Attribute) GetSensitive() bool { return false } +func (m *Schema_Attribute) GetDescriptionKind() StringKind { + if m != nil { + return m.DescriptionKind + } + return StringKind_PLAIN +} + +func (m *Schema_Attribute) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + type Schema_NestedBlock struct { TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` @@ -818,6 +883,7 @@ type GetProviderSchema_Response struct { ResourceSchemas map[string]*Schema `protobuf:"bytes,2,rep,name=resource_schemas,json=resourceSchemas,proto3" json:"resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` DataSourceSchemas map[string]*Schema `protobuf:"bytes,3,rep,name=data_source_schemas,json=dataSourceSchemas,proto3" json:"data_source_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + ProviderMeta *Schema `protobuf:"bytes,5,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -876,6 +942,13 @@ func (m *GetProviderSchema_Response) GetDiagnostics() []*Diagnostic { return nil } +func (m *GetProviderSchema_Response) GetProviderMeta() *Schema { + if m != nil { + return m.ProviderMeta + } + return nil +} + type PrepareProviderConfig struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1524,6 +1597,7 @@ type ReadResource_Request struct { TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"` Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"` + ProviderMeta *DynamicValue `protobuf:"bytes,4,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1575,6 +1649,13 @@ func (m *ReadResource_Request) GetPrivate() []byte { return nil } +func (m *ReadResource_Request) GetProviderMeta() *DynamicValue { + if m != nil { + return m.ProviderMeta + } + return nil +} + type ReadResource_Response struct { NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"` Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` @@ -1667,6 +1748,7 @@ type PlanResourceChange_Request struct { ProposedNewState *DynamicValue `protobuf:"bytes,3,opt,name=proposed_new_state,json=proposedNewState,proto3" json:"proposed_new_state,omitempty"` Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` PriorPrivate []byte `protobuf:"bytes,5,opt,name=prior_private,json=priorPrivate,proto3" json:"prior_private,omitempty"` + ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1732,6 +1814,13 @@ func (m *PlanResourceChange_Request) GetPriorPrivate() []byte { return nil } +func (m *PlanResourceChange_Request) GetProviderMeta() *DynamicValue { + if m != nil { + return m.ProviderMeta + } + return nil +} + type PlanResourceChange_Response struct { PlannedState *DynamicValue `protobuf:"bytes,1,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"` RequiresReplace []*AttributePath `protobuf:"bytes,2,rep,name=requires_replace,json=requiresReplace,proto3" json:"requires_replace,omitempty"` @@ -1851,6 +1940,7 @@ type ApplyResourceChange_Request struct { PlannedState *DynamicValue `protobuf:"bytes,3,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"` Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` PlannedPrivate []byte `protobuf:"bytes,5,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"` + ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1916,6 +2006,13 @@ func (m *ApplyResourceChange_Request) GetPlannedPrivate() []byte { return nil } +func (m *ApplyResourceChange_Request) GetProviderMeta() *DynamicValue { + if m != nil { + return m.ProviderMeta + } + return nil +} + type ApplyResourceChange_Response struct { NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"` Private []byte `protobuf:"bytes,2,opt,name=private,proto3" json:"private,omitempty"` @@ -2204,6 +2301,7 @@ var xxx_messageInfo_ReadDataSource proto.InternalMessageInfo type ReadDataSource_Request struct { TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + ProviderMeta *DynamicValue `protobuf:"bytes,3,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2248,6 +2346,13 @@ func (m *ReadDataSource_Request) GetConfig() *DynamicValue { return nil } +func (m *ReadDataSource_Request) GetProviderMeta() *DynamicValue { + if m != nil { + return m.ProviderMeta + } + return nil +} + type ReadDataSource_Response struct { State *DynamicValue `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` @@ -2639,6 +2744,7 @@ func (m *ProvisionResource_Response) GetDiagnostics() []*Diagnostic { } func init() { + proto.RegisterEnum("tfplugin5.StringKind", StringKind_name, StringKind_value) proto.RegisterEnum("tfplugin5.Diagnostic_Severity", Diagnostic_Severity_name, Diagnostic_Severity_value) proto.RegisterEnum("tfplugin5.Schema_NestedBlock_NestingMode", Schema_NestedBlock_NestingMode_name, Schema_NestedBlock_NestingMode_value) proto.RegisterType((*DynamicValue)(nil), "tfplugin5.DynamicValue") @@ -2701,137 +2807,147 @@ func init() { proto.RegisterType((*ProvisionResource_Response)(nil), "tfplugin5.ProvisionResource.Response") } -func init() { proto.RegisterFile("tfplugin5.proto", fileDescriptor_17ae6090ff270234) } +func init() { + proto.RegisterFile("tfplugin5.proto", fileDescriptor_17ae6090ff270234) +} var fileDescriptor_17ae6090ff270234 = []byte{ - // 1880 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x6f, 0x23, 0x49, - 0x19, 0x9f, 0xf6, 0x23, 0xb1, 0x3f, 0xe7, 0xe1, 0xd4, 0xcc, 0x0e, 0xa6, 0x77, 0x17, 0x82, 0x79, - 0x24, 0xab, 0xdd, 0xf1, 0xac, 0x32, 0xb0, 0xbb, 0x84, 0xd1, 0x8a, 0x6c, 0x26, 0x64, 0x22, 0x66, - 0xb2, 0xa1, 0x3c, 0x0f, 0x24, 0xa4, 0xb5, 0x6a, 0xdc, 0x15, 0x4f, 0x33, 0x76, 0x77, 0x6f, 0x75, - 0x39, 0x89, 0x85, 0xc4, 0x05, 0xc1, 0x19, 0x09, 0xf1, 0x90, 0x78, 0x5c, 0x40, 0xe2, 0x1f, 0xe0, - 0x00, 0xdc, 0x38, 0xf1, 0x0f, 0x70, 0x03, 0x4e, 0x08, 0x6e, 0x9c, 0xe1, 0x82, 0x84, 0xea, 0xd5, - 0x5d, 0xb6, 0xdb, 0x4e, 0x4f, 0xb2, 0x23, 0xc4, 0xad, 0xab, 0xbe, 0x5f, 0x7d, 0xdf, 0x57, 0xdf, - 0xab, 0xbe, 0xcf, 0x86, 0x55, 0x7e, 0x1c, 0xf5, 0x87, 0x3d, 0x3f, 0xf8, 0x42, 0x2b, 0x62, 0x21, - 0x0f, 0x51, 0x35, 0xd9, 0x68, 0xde, 0x86, 0xa5, 0x3b, 0xa3, 0x80, 0x0c, 0xfc, 0xee, 0x23, 0xd2, - 0x1f, 0x52, 0xd4, 0x80, 0xc5, 0x41, 0xdc, 0x8b, 0x48, 0xf7, 0x59, 0xc3, 0x59, 0x77, 0x36, 0x97, - 0xb0, 0x59, 0x22, 0x04, 0xa5, 0x6f, 0xc6, 0x61, 0xd0, 0x28, 0xc8, 0x6d, 0xf9, 0xdd, 0xfc, 0x9b, - 0x03, 0x70, 0xc7, 0x27, 0xbd, 0x20, 0x8c, 0xb9, 0xdf, 0x45, 0xdb, 0x50, 0x89, 0xe9, 0x09, 0x65, - 0x3e, 0x1f, 0xc9, 0xd3, 0x2b, 0x5b, 0x9f, 0x68, 0xa5, 0xb2, 0x53, 0x60, 0xab, 0xad, 0x51, 0x38, - 0xc1, 0x0b, 0xc1, 0xf1, 0x70, 0x30, 0x20, 0x6c, 0x24, 0x25, 0x54, 0xb1, 0x59, 0xa2, 0xeb, 0xb0, - 0xe0, 0x51, 0x4e, 0xfc, 0x7e, 0xa3, 0x28, 0x09, 0x7a, 0x85, 0xde, 0x82, 0x2a, 0xe1, 0x9c, 0xf9, - 0x4f, 0x86, 0x9c, 0x36, 0x4a, 0xeb, 0xce, 0x66, 0x6d, 0xab, 0x61, 0x89, 0xdb, 0x31, 0xb4, 0x23, - 0xc2, 0x9f, 0xe2, 0x14, 0xda, 0xbc, 0x09, 0x15, 0x23, 0x1f, 0xd5, 0x60, 0xf1, 0xe0, 0xf0, 0xd1, - 0xce, 0xbd, 0x83, 0x3b, 0xf5, 0x2b, 0xa8, 0x0a, 0xe5, 0x3d, 0x8c, 0xdf, 0xc7, 0x75, 0x47, 0xec, - 0x3f, 0xde, 0xc1, 0x87, 0x07, 0x87, 0xfb, 0xf5, 0x42, 0xf3, 0x2f, 0x0e, 0x2c, 0x8f, 0x71, 0x43, - 0xb7, 0xa0, 0x1c, 0x73, 0x1a, 0xc5, 0x0d, 0x67, 0xbd, 0xb8, 0x59, 0xdb, 0x7a, 0x75, 0x96, 0xd8, - 0x56, 0x9b, 0xd3, 0x08, 0x2b, 0xac, 0xfb, 0x43, 0x07, 0x4a, 0x62, 0x8d, 0x36, 0x60, 0x25, 0xd1, - 0xa6, 0x13, 0x90, 0x01, 0x95, 0xc6, 0xaa, 0xde, 0xbd, 0x82, 0x97, 0x93, 0xfd, 0x43, 0x32, 0xa0, - 0xa8, 0x05, 0x88, 0xf6, 0xe9, 0x80, 0x06, 0xbc, 0xf3, 0x8c, 0x8e, 0x3a, 0x31, 0x67, 0x7e, 0xd0, - 0x53, 0xe6, 0xb9, 0x7b, 0x05, 0xd7, 0x35, 0xed, 0xab, 0x74, 0xd4, 0x96, 0x14, 0xb4, 0x09, 0xab, - 0x36, 0xde, 0x0f, 0xb8, 0x34, 0x59, 0x51, 0x70, 0x4e, 0xc1, 0x07, 0x01, 0x7f, 0x0f, 0x84, 0xa7, - 0xfa, 0xb4, 0xcb, 0x43, 0xd6, 0xbc, 0x25, 0xd4, 0x0a, 0x23, 0xb7, 0x0a, 0x8b, 0x98, 0x7e, 0x38, - 0xa4, 0x31, 0x77, 0xd7, 0xa1, 0x82, 0x69, 0x1c, 0x85, 0x41, 0x4c, 0xd1, 0x35, 0x28, 0xef, 0x31, - 0x16, 0x32, 0xa5, 0x24, 0x56, 0x8b, 0xe6, 0x8f, 0x1c, 0xa8, 0x60, 0x72, 0xda, 0xe6, 0x84, 0xd3, - 0x24, 0x34, 0x9c, 0x34, 0x34, 0xd0, 0x36, 0x2c, 0x1e, 0xf7, 0x09, 0x1f, 0x90, 0xa8, 0x51, 0x90, - 0x46, 0x5a, 0xb7, 0x8c, 0x64, 0x4e, 0xb6, 0xbe, 0xa2, 0x20, 0x7b, 0x01, 0x67, 0x23, 0x6c, 0x0e, - 0xb8, 0xdb, 0xb0, 0x64, 0x13, 0x50, 0x1d, 0x8a, 0xcf, 0xe8, 0x48, 0x2b, 0x20, 0x3e, 0x85, 0x52, - 0x27, 0x22, 0x5e, 0x75, 0xac, 0xa8, 0xc5, 0x76, 0xe1, 0x1d, 0xa7, 0xf9, 0x8f, 0x32, 0x2c, 0xb4, - 0xbb, 0x4f, 0xe9, 0x80, 0x88, 0x90, 0x3a, 0xa1, 0x2c, 0xf6, 0xb5, 0x66, 0x45, 0x6c, 0x96, 0xe8, - 0x06, 0x94, 0x9f, 0xf4, 0xc3, 0xee, 0x33, 0x79, 0xbc, 0xb6, 0xf5, 0x31, 0x4b, 0x35, 0x75, 0xb6, - 0xf5, 0x9e, 0x20, 0x63, 0x85, 0x72, 0x7f, 0xe1, 0x40, 0x59, 0x6e, 0xcc, 0x61, 0xf9, 0x25, 0x80, - 0xc4, 0x79, 0xb1, 0xbe, 0xf2, 0xcb, 0xd3, 0x7c, 0x93, 0xf0, 0xc0, 0x16, 0x1c, 0xbd, 0x0b, 0x35, - 0x29, 0xa9, 0xc3, 0x47, 0x11, 0x8d, 0x1b, 0xc5, 0xa9, 0xa8, 0xd2, 0xa7, 0x0f, 0x69, 0xcc, 0xa9, - 0xa7, 0x74, 0x03, 0x79, 0xe2, 0x81, 0x38, 0xe0, 0xfe, 0xd1, 0x81, 0x6a, 0xc2, 0x59, 0xb8, 0x23, - 0x8d, 0x2a, 0x2c, 0xbf, 0xc5, 0x9e, 0xe0, 0x6d, 0xb2, 0x57, 0x7c, 0xa3, 0x75, 0xa8, 0x79, 0x34, - 0xee, 0x32, 0x3f, 0xe2, 0xe2, 0x42, 0x2a, 0xbb, 0xec, 0x2d, 0xe4, 0x42, 0x85, 0xd1, 0x0f, 0x87, - 0x3e, 0xa3, 0x9e, 0xcc, 0xb0, 0x0a, 0x4e, 0xd6, 0x82, 0x16, 0x4a, 0x14, 0xe9, 0x37, 0xca, 0x8a, - 0x66, 0xd6, 0x82, 0xd6, 0x0d, 0x07, 0xd1, 0x90, 0x53, 0xaf, 0xb1, 0xa0, 0x68, 0x66, 0x8d, 0x5e, - 0x81, 0x6a, 0x4c, 0x83, 0xd8, 0xe7, 0xfe, 0x09, 0x6d, 0x2c, 0x4a, 0x62, 0xba, 0xe1, 0xfe, 0xba, - 0x00, 0x35, 0xeb, 0x96, 0xe8, 0x65, 0xa8, 0x0a, 0x5d, 0xad, 0x34, 0xc1, 0x15, 0xb1, 0x21, 0xf3, - 0xe3, 0xf9, 0xdc, 0x88, 0x76, 0x61, 0x31, 0xa0, 0x31, 0x17, 0x39, 0x54, 0x94, 0xd5, 0xe9, 0xb5, - 0xb9, 0x16, 0x96, 0xdf, 0x7e, 0xd0, 0xbb, 0x1f, 0x7a, 0x14, 0x9b, 0x93, 0x42, 0xa1, 0x81, 0x1f, - 0x74, 0x7c, 0x4e, 0x07, 0xb1, 0xb4, 0x49, 0x11, 0x57, 0x06, 0x7e, 0x70, 0x20, 0xd6, 0x92, 0x48, - 0xce, 0x34, 0xb1, 0xac, 0x89, 0xe4, 0x4c, 0x12, 0x9b, 0xf7, 0xd5, 0xcd, 0x34, 0xc7, 0xf1, 0xd2, - 0x03, 0xb0, 0xd0, 0x3e, 0x38, 0xdc, 0xbf, 0xb7, 0x57, 0x77, 0x50, 0x05, 0x4a, 0xf7, 0x0e, 0xda, - 0x0f, 0xea, 0x05, 0xb4, 0x08, 0xc5, 0xf6, 0xde, 0x83, 0x7a, 0x51, 0x7c, 0xdc, 0xdf, 0x39, 0xaa, - 0x97, 0x44, 0x89, 0xda, 0xc7, 0xef, 0x3f, 0x3c, 0xaa, 0x97, 0x9b, 0x3f, 0x29, 0xc1, 0xda, 0x3e, - 0xe5, 0x47, 0x2c, 0x3c, 0xf1, 0x3d, 0xca, 0x94, 0xfe, 0x76, 0x12, 0xff, 0xab, 0x68, 0x65, 0xf1, - 0x0d, 0xa8, 0x44, 0x1a, 0x29, 0xcd, 0x58, 0xdb, 0x5a, 0x9b, 0xba, 0x3c, 0x4e, 0x20, 0x88, 0x42, - 0x9d, 0xd1, 0x38, 0x1c, 0xb2, 0x2e, 0xed, 0xc4, 0x92, 0x68, 0x62, 0x7a, 0xdb, 0x3a, 0x36, 0x25, - 0xbe, 0x65, 0xe4, 0x89, 0x0f, 0x79, 0x5a, 0xed, 0xc7, 0x2a, 0xc1, 0x57, 0xd9, 0xf8, 0x2e, 0xea, - 0xc3, 0x55, 0x8f, 0x70, 0xd2, 0x99, 0x90, 0xa4, 0xe2, 0xff, 0x76, 0x3e, 0x49, 0x77, 0x08, 0x27, - 0xed, 0x69, 0x59, 0x6b, 0xde, 0xe4, 0x3e, 0x7a, 0x1b, 0x6a, 0x5e, 0xf2, 0x06, 0x09, 0xe7, 0x09, - 0x29, 0x2f, 0x65, 0xbe, 0x50, 0xd8, 0x46, 0xba, 0x0f, 0xe1, 0x5a, 0xd6, 0x7d, 0x32, 0xea, 0xd2, - 0x86, 0x5d, 0x97, 0x32, 0x6d, 0x9c, 0x96, 0x2a, 0xf7, 0x31, 0x5c, 0xcf, 0x56, 0xfe, 0x92, 0x8c, - 0x9b, 0x7f, 0x76, 0xe0, 0xa5, 0x23, 0x46, 0x23, 0xc2, 0xa8, 0xb1, 0xda, 0x6e, 0x18, 0x1c, 0xfb, - 0x3d, 0x77, 0x3b, 0x09, 0x0f, 0x74, 0x13, 0x16, 0xba, 0x72, 0x53, 0xc7, 0x83, 0x9d, 0x3d, 0x76, - 0x4b, 0x80, 0x35, 0xcc, 0xfd, 0xae, 0x63, 0xc5, 0xd3, 0x97, 0x61, 0x35, 0x52, 0x12, 0xbc, 0x4e, - 0x3e, 0x36, 0x2b, 0x06, 0xaf, 0x54, 0x99, 0xf4, 0x46, 0x21, 0xaf, 0x37, 0x9a, 0xdf, 0x2f, 0xc0, - 0xb5, 0x87, 0x51, 0x8f, 0x11, 0x8f, 0x26, 0x5e, 0x11, 0x8f, 0x89, 0xcb, 0xd2, 0xcb, 0xcd, 0x2d, - 0x1b, 0x56, 0x11, 0x2f, 0x8c, 0x17, 0xf1, 0x37, 0xa1, 0xca, 0xc8, 0x69, 0x27, 0x16, 0xec, 0x64, - 0x8d, 0xa8, 0x6d, 0x5d, 0xcd, 0x78, 0xb6, 0x70, 0x85, 0xe9, 0x2f, 0xf7, 0x3b, 0xb6, 0x51, 0xde, - 0x85, 0x95, 0xa1, 0x52, 0xcc, 0xd3, 0x3c, 0xce, 0xb1, 0xc9, 0xb2, 0x81, 0xab, 0x77, 0xf4, 0xc2, - 0x26, 0xf9, 0xbd, 0x03, 0xee, 0x23, 0xd2, 0xf7, 0x3d, 0xa1, 0x9c, 0xb6, 0x89, 0x78, 0x19, 0xb4, - 0xd7, 0x1f, 0xe7, 0x34, 0x4c, 0x1a, 0x12, 0x85, 0x7c, 0x21, 0xb1, 0x6b, 0x5d, 0x7e, 0x42, 0x79, - 0x27, 0xb7, 0xf2, 0xbf, 0x75, 0xa0, 0x61, 0x94, 0x4f, 0xf3, 0xe1, 0xff, 0x42, 0xf5, 0xdf, 0x39, - 0x50, 0x55, 0x8a, 0x0e, 0x19, 0x75, 0x7b, 0xa9, 0xae, 0xaf, 0xc3, 0x1a, 0xa7, 0x8c, 0x91, 0xe3, - 0x90, 0x0d, 0x3a, 0x76, 0xc7, 0x50, 0xc5, 0xf5, 0x84, 0xf0, 0x48, 0x47, 0xdd, 0xff, 0x46, 0xf7, - 0x5f, 0x15, 0x60, 0x09, 0x53, 0xe2, 0x99, 0x78, 0x71, 0xbf, 0x9d, 0xd3, 0xd4, 0xb7, 0x61, 0xb9, - 0x3b, 0x64, 0x4c, 0x74, 0x99, 0x2a, 0xc8, 0xcf, 0xd1, 0x7a, 0x49, 0xa3, 0x55, 0x8c, 0x37, 0x60, - 0x31, 0x62, 0xfe, 0x89, 0x49, 0xb0, 0x25, 0x6c, 0x96, 0xee, 0x0f, 0xec, 0x54, 0xfa, 0x3c, 0x54, - 0x03, 0x7a, 0x9a, 0x2f, 0x8b, 0x2a, 0x01, 0x3d, 0xbd, 0x5c, 0x02, 0xcd, 0xd6, 0xaa, 0xf9, 0x9b, - 0x12, 0xa0, 0xa3, 0x3e, 0x09, 0x8c, 0x99, 0x76, 0x9f, 0x92, 0xa0, 0x47, 0xdd, 0xff, 0x38, 0x39, - 0xad, 0xf5, 0x0e, 0xd4, 0x22, 0xe6, 0x87, 0x2c, 0x9f, 0xad, 0x40, 0x62, 0xd5, 0x65, 0xf6, 0x00, - 0x45, 0x2c, 0x8c, 0xc2, 0x98, 0x7a, 0x9d, 0xd4, 0x16, 0xc5, 0xf9, 0x0c, 0xea, 0xe6, 0xc8, 0xa1, - 0xb1, 0x49, 0x1a, 0x5d, 0xa5, 0x5c, 0xd1, 0x85, 0x3e, 0x0d, 0xcb, 0x4a, 0x63, 0x63, 0x91, 0xb2, - 0xb4, 0xc8, 0x92, 0xdc, 0x3c, 0xd2, 0xce, 0xfa, 0x79, 0xc1, 0x72, 0xd6, 0x6d, 0x58, 0x8e, 0xfa, - 0x24, 0x08, 0xf2, 0x96, 0xbd, 0x25, 0x8d, 0x56, 0x0a, 0xee, 0x8a, 0x5e, 0x43, 0x36, 0x95, 0x71, - 0x87, 0xd1, 0xa8, 0x4f, 0xba, 0x54, 0x7b, 0x6e, 0xf6, 0x38, 0xb7, 0x6a, 0x4e, 0x60, 0x75, 0x00, - 0x6d, 0xc0, 0xaa, 0x51, 0x61, 0xdc, 0x91, 0x2b, 0x7a, 0x5b, 0x2b, 0x7e, 0xe1, 0x26, 0x00, 0xbd, - 0x01, 0xa8, 0x4f, 0x7b, 0xa4, 0x3b, 0x92, 0x4d, 0x7a, 0x27, 0x1e, 0xc5, 0x9c, 0x0e, 0x74, 0xe7, - 0x5b, 0x57, 0x14, 0x51, 0x72, 0xdb, 0x72, 0xbf, 0xf9, 0xa7, 0x22, 0x5c, 0xdd, 0x89, 0xa2, 0xfe, - 0x68, 0x22, 0x6e, 0xfe, 0xfd, 0xe2, 0xe3, 0x66, 0xca, 0x1b, 0xc5, 0xe7, 0xf1, 0xc6, 0x73, 0x87, - 0x4b, 0x86, 0xe5, 0xcb, 0x59, 0x96, 0x77, 0xff, 0x70, 0xf9, 0xfc, 0xb6, 0xd2, 0xb4, 0x30, 0x96, - 0xa6, 0x93, 0x6e, 0x2d, 0x5e, 0xd2, 0xad, 0xa5, 0x19, 0x6e, 0xfd, 0x67, 0x01, 0xae, 0x1e, 0x0c, - 0xa2, 0x90, 0xf1, 0xf1, 0xd6, 0xe3, 0xad, 0x9c, 0x5e, 0x5d, 0x81, 0x82, 0xef, 0xe9, 0xa1, 0xb5, - 0xe0, 0x7b, 0xee, 0x19, 0xd4, 0x15, 0x3b, 0x9a, 0xd4, 0xe1, 0x73, 0x47, 0x9e, 0x5c, 0x01, 0xa1, - 0x50, 0x73, 0xaa, 0xed, 0x2f, 0x6d, 0x6f, 0x7c, 0x00, 0xc8, 0xd7, 0x6a, 0x74, 0x4c, 0x8f, 0x6e, - 0xde, 0x92, 0x9b, 0x96, 0x88, 0x8c, 0xab, 0xb7, 0x26, 0xf5, 0xc7, 0x6b, 0xfe, 0xc4, 0x4e, 0x7c, - 0xf1, 0xc6, 0xe6, 0xaf, 0x0e, 0xac, 0x88, 0x47, 0x2a, 0xed, 0x0b, 0x5e, 0x5c, 0x47, 0xc0, 0xc6, - 0xc6, 0xa5, 0x72, 0xae, 0xd0, 0xd4, 0x66, 0xbe, 0xf0, 0xfd, 0x7e, 0xea, 0xc0, 0x35, 0x33, 0xdb, - 0x88, 0x5e, 0x20, 0x6b, 0x8e, 0x3b, 0xb3, 0xf4, 0xba, 0x25, 0xaa, 0x42, 0x82, 0x9d, 0x3d, 0xc9, - 0xd9, 0xa8, 0x8b, 0x6b, 0xf7, 0x33, 0x07, 0x3e, 0x6e, 0x3a, 0x33, 0x4b, 0xc5, 0x8f, 0x60, 0x96, - 0xf8, 0x48, 0x3a, 0x98, 0xbf, 0x3b, 0xb0, 0x96, 0xa8, 0x95, 0xb4, 0x31, 0xf1, 0xc5, 0xd5, 0x42, - 0x6f, 0x03, 0x74, 0xc3, 0x20, 0xa0, 0x5d, 0x6e, 0x86, 0x83, 0x79, 0x35, 0x37, 0x85, 0xba, 0xdf, - 0xb0, 0xee, 0x73, 0x1d, 0x16, 0xc2, 0x21, 0x8f, 0x86, 0x5c, 0x87, 0xa4, 0x5e, 0x5d, 0xd8, 0x0d, - 0x5b, 0x3f, 0xae, 0x42, 0xc5, 0xcc, 0x71, 0xe8, 0xeb, 0x50, 0xdd, 0xa7, 0x5c, 0xff, 0xc2, 0xf5, - 0x99, 0x73, 0x46, 0x64, 0x15, 0x40, 0x9f, 0xcd, 0x35, 0x48, 0xa3, 0xfe, 0x8c, 0xa1, 0x11, 0x6d, - 0x5a, 0xe7, 0x33, 0x11, 0x89, 0xa4, 0xd7, 0x72, 0x20, 0xb5, 0xb4, 0x6f, 0xcd, 0x9b, 0x58, 0xd0, - 0x0d, 0x8b, 0xd1, 0x6c, 0x58, 0x22, 0xb7, 0x95, 0x17, 0xae, 0x85, 0x0f, 0x67, 0x4f, 0x1c, 0xe8, - 0xf5, 0x0c, 0x5e, 0x93, 0xa0, 0x44, 0xf0, 0x1b, 0xf9, 0xc0, 0x5a, 0xac, 0x9f, 0x3d, 0xb8, 0xa2, - 0x0d, 0x8b, 0x4b, 0x16, 0x20, 0x11, 0xb7, 0x79, 0x3e, 0x50, 0x8b, 0xba, 0x6b, 0x0d, 0x26, 0xe8, - 0x15, 0xeb, 0x58, 0xb2, 0x9b, 0x30, 0x7d, 0x75, 0x06, 0x55, 0x73, 0xfa, 0xda, 0xf8, 0x98, 0x80, - 0x3e, 0x69, 0x0f, 0xc4, 0x16, 0x21, 0xe1, 0xb7, 0x3e, 0x1b, 0xa0, 0x59, 0x76, 0xb3, 0x5a, 0x6a, - 0x64, 0x87, 0xe9, 0x34, 0x39, 0x61, 0xff, 0xb9, 0xf3, 0x60, 0x5a, 0xc8, 0x71, 0x66, 0x03, 0x86, - 0xec, 0xe3, 0x19, 0xf4, 0x44, 0xcc, 0xc6, 0xb9, 0xb8, 0x54, 0x4e, 0xc6, 0xb3, 0x38, 0x26, 0x27, - 0xeb, 0xd9, 0xcc, 0x92, 0x93, 0x8d, 0xd3, 0x72, 0x1e, 0x4f, 0xbe, 0x84, 0xe8, 0x53, 0x13, 0x86, - 0x4e, 0x49, 0x09, 0xf7, 0xe6, 0x3c, 0x88, 0x66, 0xfc, 0x45, 0xf5, 0xfb, 0x3f, 0x1a, 0xfb, 0xf9, - 0x94, 0x87, 0x51, 0xc2, 0xa4, 0x31, 0x4d, 0x50, 0x47, 0xb7, 0xbe, 0x57, 0x84, 0x9a, 0xf5, 0x30, - 0xa0, 0x0f, 0xec, 0xe2, 0xb4, 0x91, 0x51, 0x76, 0xec, 0x37, 0x2e, 0x33, 0xaa, 0x67, 0x00, 0xb5, - 0xaa, 0x67, 0x73, 0xde, 0x23, 0x94, 0x95, 0x8b, 0x53, 0xa8, 0x44, 0xe8, 0x8d, 0x9c, 0x68, 0x2d, - 0xf9, 0x49, 0xc6, 0x53, 0x33, 0x56, 0x7e, 0xa7, 0xa8, 0x99, 0xe5, 0x37, 0x0b, 0xa5, 0x24, 0xbc, - 0xe9, 0x5c, 0xc2, 0x11, 0x4f, 0x16, 0xe4, 0x1f, 0x7b, 0xb7, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, - 0x8a, 0x61, 0xfa, 0xcc, 0xeb, 0x1b, 0x00, 0x00, + // 2010 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x9f, 0x6e, 0xdb, 0x89, 0xfd, 0xec, 0x49, 0x3a, 0x35, 0x1f, 0x98, 0xde, 0x0f, 0x82, 0x61, + 0x49, 0x96, 0xdd, 0xf1, 0xac, 0x32, 0x30, 0xbb, 0x84, 0xd1, 0x6a, 0xb3, 0x49, 0xc8, 0x44, 0x33, + 0xf1, 0x84, 0xf2, 0xcc, 0x04, 0x09, 0x69, 0xad, 0x1a, 0x77, 0xc5, 0xd3, 0xc4, 0xee, 0xee, 0xad, + 0x2e, 0x67, 0x62, 0x71, 0x44, 0x70, 0x46, 0xa0, 0x85, 0x03, 0x70, 0x81, 0x03, 0xe2, 0xc4, 0x0d, + 0xf1, 0x75, 0xe1, 0xce, 0x81, 0x3b, 0xdc, 0x56, 0x1c, 0xb9, 0xf0, 0x17, 0xa0, 0xaa, 0xae, 0xee, + 0x2e, 0xdb, 0xed, 0xa4, 0x93, 0xec, 0x0a, 0xed, 0xad, 0xeb, 0xbd, 0x5f, 0xbd, 0xf7, 0xea, 0xbd, + 0x5f, 0xbd, 0xaa, 0xb2, 0x61, 0x91, 0x1f, 0x06, 0xfd, 0x61, 0xcf, 0xf5, 0xbe, 0xde, 0x0c, 0x98, + 0xcf, 0x7d, 0x54, 0x49, 0x04, 0x8d, 0x7b, 0x50, 0xdb, 0x1a, 0x79, 0x64, 0xe0, 0x76, 0x9f, 0x92, + 0xfe, 0x90, 0xa2, 0x3a, 0xcc, 0x0f, 0xc2, 0x5e, 0x40, 0xba, 0x47, 0x75, 0x63, 0xd9, 0x58, 0xad, + 0xe1, 0x78, 0x88, 0x10, 0x14, 0xbf, 0x17, 0xfa, 0x5e, 0xdd, 0x94, 0x62, 0xf9, 0xdd, 0xf8, 0xd8, + 0x00, 0xd8, 0x72, 0x49, 0xcf, 0xf3, 0x43, 0xee, 0x76, 0xd1, 0x3a, 0x94, 0x43, 0x7a, 0x4c, 0x99, + 0xcb, 0x47, 0x72, 0xf6, 0xc2, 0xda, 0xab, 0xcd, 0xd4, 0x77, 0x0a, 0x6c, 0xb6, 0x15, 0x0a, 0x27, + 0x78, 0xe1, 0x38, 0x1c, 0x0e, 0x06, 0x84, 0x8d, 0xa4, 0x87, 0x0a, 0x8e, 0x87, 0xe8, 0x26, 0xcc, + 0x39, 0x94, 0x13, 0xb7, 0x5f, 0x2f, 0x48, 0x85, 0x1a, 0xa1, 0xbb, 0x50, 0x21, 0x9c, 0x33, 0xf7, + 0xd9, 0x90, 0xd3, 0x7a, 0x71, 0xd9, 0x58, 0xad, 0xae, 0xd5, 0x35, 0x77, 0x1b, 0xb1, 0x6e, 0x9f, + 0xf0, 0xe7, 0x38, 0x85, 0x36, 0x6e, 0x43, 0x39, 0xf6, 0x8f, 0xaa, 0x30, 0xbf, 0xdb, 0x7a, 0xba, + 0xf1, 0x70, 0x77, 0xcb, 0xba, 0x82, 0x2a, 0x50, 0xda, 0xc6, 0xf8, 0x11, 0xb6, 0x0c, 0x21, 0x3f, + 0xd8, 0xc0, 0xad, 0xdd, 0xd6, 0x8e, 0x65, 0x36, 0xfe, 0x65, 0xc0, 0xd5, 0x31, 0x6b, 0xe8, 0x0e, + 0x94, 0x42, 0x4e, 0x83, 0xb0, 0x6e, 0x2c, 0x17, 0x56, 0xab, 0x6b, 0xaf, 0xcc, 0x72, 0xdb, 0x6c, + 0x73, 0x1a, 0xe0, 0x08, 0x6b, 0x7f, 0x64, 0x40, 0x51, 0x8c, 0xd1, 0x0a, 0x2c, 0x24, 0xd1, 0x74, + 0x3c, 0x32, 0xa0, 0x32, 0x59, 0x95, 0xfb, 0x57, 0xf0, 0xd5, 0x44, 0xde, 0x22, 0x03, 0x8a, 0x9a, + 0x80, 0x68, 0x9f, 0x0e, 0xa8, 0xc7, 0x3b, 0x47, 0x74, 0xd4, 0x09, 0x39, 0x73, 0xbd, 0x5e, 0x94, + 0x9e, 0xfb, 0x57, 0xb0, 0xa5, 0x74, 0x0f, 0xe8, 0xa8, 0x2d, 0x35, 0x68, 0x15, 0x16, 0x75, 0xbc, + 0xeb, 0x71, 0x99, 0xb2, 0x82, 0xb0, 0x9c, 0x82, 0x77, 0x3d, 0xfe, 0x3e, 0x88, 0x4a, 0xf5, 0x69, + 0x97, 0xfb, 0xac, 0x71, 0x47, 0x84, 0xe5, 0x07, 0x76, 0x05, 0xe6, 0x31, 0xfd, 0x70, 0x48, 0x43, + 0x6e, 0x2f, 0x43, 0x19, 0xd3, 0x30, 0xf0, 0xbd, 0x90, 0xa2, 0xeb, 0x50, 0xda, 0x66, 0xcc, 0x67, + 0x51, 0x90, 0x38, 0x1a, 0x34, 0x7e, 0x66, 0x40, 0x19, 0x93, 0x17, 0x6d, 0x4e, 0x38, 0x4d, 0xa8, + 0x61, 0xa4, 0xd4, 0x40, 0xeb, 0x30, 0x7f, 0xd8, 0x27, 0x7c, 0x40, 0x82, 0xba, 0x29, 0x93, 0xb4, + 0xac, 0x25, 0x29, 0x9e, 0xd9, 0xfc, 0x56, 0x04, 0xd9, 0xf6, 0x38, 0x1b, 0xe1, 0x78, 0x82, 0xbd, + 0x0e, 0x35, 0x5d, 0x81, 0x2c, 0x28, 0x1c, 0xd1, 0x91, 0x0a, 0x40, 0x7c, 0x8a, 0xa0, 0x8e, 0x05, + 0x5f, 0x15, 0x57, 0xa2, 0xc1, 0xba, 0xf9, 0x8e, 0xd1, 0xf8, 0xfb, 0x3c, 0xcc, 0xb5, 0xbb, 0xcf, + 0xe9, 0x80, 0x08, 0x4a, 0x1d, 0x53, 0x16, 0xba, 0x2a, 0xb2, 0x02, 0x8e, 0x87, 0xe8, 0x16, 0x94, + 0x9e, 0xf5, 0xfd, 0xee, 0x91, 0x9c, 0x5e, 0x5d, 0xfb, 0x9c, 0x16, 0x5a, 0x34, 0xb7, 0xf9, 0xbe, + 0x50, 0xe3, 0x08, 0x65, 0xff, 0xda, 0x84, 0x92, 0x14, 0x9c, 0x62, 0xf2, 0x9b, 0x00, 0x49, 0xf1, + 0x42, 0xb5, 0xe4, 0x97, 0xa6, 0xed, 0x26, 0xf4, 0xc0, 0x1a, 0x1c, 0xbd, 0x0b, 0x55, 0xe9, 0xa9, + 0xc3, 0x47, 0x01, 0x0d, 0xeb, 0x85, 0x29, 0x56, 0xa9, 0xd9, 0x2d, 0x1a, 0x72, 0xea, 0x44, 0xb1, + 0x81, 0x9c, 0xf1, 0x58, 0x4c, 0x40, 0xcb, 0x50, 0x75, 0x68, 0xd8, 0x65, 0x6e, 0xc0, 0x45, 0x68, + 0x45, 0x99, 0x14, 0x5d, 0x84, 0xde, 0x03, 0x4b, 0x1b, 0x76, 0x8e, 0x5c, 0xcf, 0xa9, 0x97, 0xe4, + 0x16, 0xbd, 0xa1, 0xbb, 0x91, 0x3c, 0x7a, 0xe0, 0x7a, 0x0e, 0x5e, 0xd4, 0xe0, 0x42, 0x80, 0x5e, + 0x05, 0x70, 0x68, 0xc0, 0x68, 0x97, 0x70, 0xea, 0xd4, 0xe7, 0x96, 0x8d, 0xd5, 0x32, 0xd6, 0x24, + 0xf6, 0xef, 0x4c, 0xa8, 0x24, 0xab, 0x13, 0x94, 0x48, 0x99, 0x8d, 0xe5, 0xb7, 0x90, 0x89, 0xf5, + 0xc5, 0x1d, 0x44, 0x7c, 0x4f, 0x46, 0x5e, 0x98, 0x8e, 0xdc, 0x86, 0x32, 0xa3, 0x1f, 0x0e, 0x5d, + 0x46, 0x1d, 0xb9, 0xb0, 0x32, 0x4e, 0xc6, 0x42, 0xe7, 0x4b, 0x14, 0xe9, 0xcb, 0xd5, 0x94, 0x71, + 0x32, 0x16, 0xba, 0xae, 0x3f, 0x08, 0x86, 0x69, 0xb4, 0xc9, 0x18, 0xbd, 0x0c, 0x95, 0x90, 0x7a, + 0xa1, 0xcb, 0xdd, 0x63, 0x5a, 0x9f, 0x97, 0xca, 0x54, 0x90, 0x99, 0xab, 0xf2, 0x25, 0x72, 0x55, + 0x99, 0xca, 0xd5, 0x6f, 0x4d, 0xa8, 0x6a, 0xb5, 0x44, 0x2f, 0x41, 0x45, 0x64, 0x43, 0x6b, 0x06, + 0xb8, 0x2c, 0x04, 0xb2, 0x0b, 0x9c, 0x8f, 0xac, 0x68, 0x13, 0xe6, 0x3d, 0x1a, 0x72, 0xd1, 0x29, + 0x0a, 0x32, 0xe8, 0xd7, 0x4f, 0xe5, 0x91, 0xfc, 0x76, 0xbd, 0xde, 0x9e, 0xef, 0x50, 0x1c, 0xcf, + 0x14, 0x01, 0x0d, 0x5c, 0xaf, 0xe3, 0x72, 0x3a, 0x08, 0x65, 0xd6, 0x0b, 0xb8, 0x3c, 0x70, 0xbd, + 0x5d, 0x31, 0x96, 0x4a, 0x72, 0xa2, 0x94, 0x25, 0xa5, 0x24, 0x27, 0x52, 0xd9, 0xd8, 0x8b, 0x56, + 0xa6, 0x2c, 0x8e, 0x37, 0x58, 0x80, 0xb9, 0xf6, 0x6e, 0x6b, 0xe7, 0xe1, 0xb6, 0x65, 0xa0, 0x32, + 0x14, 0x1f, 0xee, 0xb6, 0x1f, 0x5b, 0x26, 0x9a, 0x87, 0x42, 0x7b, 0xfb, 0xb1, 0x55, 0x10, 0x1f, + 0x7b, 0x1b, 0xfb, 0x56, 0x51, 0x34, 0xe2, 0x1d, 0xfc, 0xe8, 0xc9, 0xbe, 0x55, 0x6a, 0xfc, 0xa3, + 0x08, 0x4b, 0x3b, 0x94, 0xef, 0x33, 0xff, 0xd8, 0x75, 0x28, 0x8b, 0xe2, 0xd7, 0x5b, 0xd5, 0xef, + 0x8b, 0x5a, 0xaf, 0xba, 0x05, 0xe5, 0x40, 0x21, 0x65, 0x1a, 0xab, 0x6b, 0x4b, 0x53, 0x8b, 0xc7, + 0x09, 0x04, 0x51, 0xb0, 0x18, 0x0d, 0xfd, 0x21, 0xeb, 0xd2, 0x4e, 0x28, 0x95, 0xf1, 0xce, 0x5d, + 0xd7, 0xa6, 0x4d, 0xb9, 0x6f, 0xc6, 0xfe, 0xc4, 0x87, 0x9c, 0x1d, 0xc9, 0xc3, 0xa8, 0x8d, 0x2d, + 0xb2, 0x71, 0x29, 0xea, 0xc3, 0x35, 0x87, 0x70, 0xd2, 0x99, 0xf0, 0x14, 0xed, 0xf2, 0x7b, 0xf9, + 0x3c, 0x6d, 0x11, 0x4e, 0xda, 0xd3, 0xbe, 0x96, 0x9c, 0x49, 0x39, 0x7a, 0x1b, 0xaa, 0x4e, 0x72, + 0xd2, 0x8a, 0xe2, 0x09, 0x2f, 0x37, 0x32, 0xcf, 0x61, 0xac, 0x23, 0xd1, 0x5d, 0xb8, 0x1a, 0x67, + 0xa6, 0x33, 0xa0, 0x9c, 0xc8, 0xd2, 0x66, 0x66, 0xb0, 0x16, 0xe3, 0xf6, 0x28, 0x27, 0xf6, 0x13, + 0xb8, 0x9e, 0x95, 0x87, 0x8c, 0xae, 0xbd, 0xa2, 0x77, 0xed, 0x4c, 0xcb, 0x69, 0x23, 0xb7, 0x0f, + 0xe0, 0x66, 0xf6, 0xa2, 0x2f, 0x69, 0xb8, 0xf1, 0x4f, 0x03, 0x6e, 0xec, 0x33, 0x1a, 0x10, 0x46, + 0xe3, 0x6c, 0x6f, 0xfa, 0xde, 0xa1, 0xdb, 0xb3, 0xd7, 0x13, 0x5a, 0xa1, 0xdb, 0x30, 0xd7, 0x95, + 0x42, 0xc5, 0x23, 0x7d, 0xd7, 0xe9, 0x17, 0x26, 0xac, 0x60, 0xf6, 0x0f, 0x0d, 0x8d, 0x87, 0xef, + 0xc1, 0x62, 0x10, 0x79, 0x70, 0x3a, 0xf9, 0xcc, 0x2c, 0xc4, 0xf8, 0x28, 0x94, 0xc9, 0x2a, 0x9a, + 0x79, 0xab, 0xd8, 0xf8, 0xb1, 0x09, 0xd7, 0x9f, 0x04, 0x3d, 0x46, 0x1c, 0x9a, 0x54, 0x45, 0x1c, + 0xb5, 0x36, 0x4b, 0x17, 0x77, 0x6a, 0xbb, 0xd1, 0x8e, 0x38, 0x73, 0xfc, 0x88, 0x7b, 0x0b, 0x2a, + 0x8c, 0xbc, 0xe8, 0x84, 0xc2, 0x9c, 0xec, 0x2d, 0xd5, 0xb5, 0x6b, 0x19, 0x87, 0x3a, 0x2e, 0x33, + 0xf5, 0x65, 0xff, 0x40, 0x4f, 0xca, 0xbb, 0xb0, 0x30, 0x8c, 0x02, 0x73, 0x94, 0x8d, 0x33, 0x72, + 0x72, 0x35, 0x86, 0x47, 0xb7, 0x8c, 0x0b, 0xa7, 0xe4, 0xcf, 0x06, 0xd8, 0x4f, 0x49, 0xdf, 0x75, + 0x44, 0x70, 0x2a, 0x27, 0xe2, 0xdc, 0x54, 0x55, 0x3f, 0xc8, 0x99, 0x98, 0x94, 0x12, 0x66, 0x3e, + 0x4a, 0x6c, 0x6a, 0x8b, 0x9f, 0x08, 0xde, 0xc8, 0x1d, 0xfc, 0x1f, 0x0d, 0xa8, 0xc7, 0xc1, 0xa7, + 0xfb, 0xe1, 0x33, 0x11, 0xfa, 0x9f, 0x0c, 0xa8, 0x44, 0x81, 0x0e, 0x19, 0xb5, 0x7b, 0x69, 0xac, + 0x6f, 0xc0, 0x12, 0xa7, 0x8c, 0x91, 0x43, 0x9f, 0x0d, 0x3a, 0xfa, 0x7d, 0xaa, 0x82, 0xad, 0x44, + 0xf1, 0x54, 0xb1, 0xee, 0xff, 0x13, 0xfb, 0xc7, 0x26, 0xd4, 0x30, 0x25, 0x4e, 0xcc, 0x17, 0xfb, + 0xaf, 0x46, 0xce, 0x5c, 0xdf, 0x83, 0xab, 0xdd, 0x21, 0x63, 0xe2, 0x12, 0x1e, 0xb1, 0xfc, 0x8c, + 0xb0, 0x6b, 0x0a, 0x1d, 0x91, 0xbc, 0x0e, 0xf3, 0x01, 0x73, 0x8f, 0xe3, 0x1d, 0x56, 0xc3, 0xf1, + 0x50, 0xd8, 0x1d, 0x6f, 0xcf, 0xc5, 0x33, 0xec, 0x8e, 0x35, 0xe9, 0x9f, 0xea, 0x3b, 0xf1, 0x6b, + 0x50, 0xf1, 0xe8, 0x8b, 0x7c, 0x9b, 0xb0, 0xec, 0xd1, 0x17, 0x97, 0xdb, 0x7f, 0xb3, 0xd7, 0xd4, + 0xf8, 0x6f, 0x11, 0xd0, 0x7e, 0x9f, 0x78, 0x71, 0x96, 0x37, 0x9f, 0x13, 0xaf, 0x47, 0xed, 0xbf, + 0x98, 0x39, 0x73, 0xfd, 0x0e, 0x54, 0x03, 0xe6, 0xfa, 0x2c, 0x5f, 0xa6, 0x41, 0x62, 0xa3, 0xc5, + 0x6c, 0x03, 0x0a, 0x98, 0x1f, 0xf8, 0x21, 0x75, 0x3a, 0x69, 0x2e, 0x0a, 0xa7, 0x1b, 0xb0, 0xe2, + 0x29, 0xad, 0x38, 0x27, 0x29, 0x39, 0x8b, 0xb9, 0xc8, 0x89, 0xbe, 0x24, 0xaa, 0x28, 0x22, 0x8e, + 0x33, 0x52, 0x92, 0x19, 0xa9, 0x49, 0xe1, 0xfe, 0xac, 0x52, 0xcf, 0x9d, 0xa7, 0xd4, 0xbf, 0x32, + 0xb5, 0x52, 0x0b, 0x53, 0x7d, 0xe2, 0x79, 0x79, 0x7b, 0x6e, 0x4d, 0xa1, 0xa3, 0xe5, 0x6d, 0x8a, + 0x0b, 0x92, 0xbc, 0x6b, 0x87, 0x1d, 0x46, 0x83, 0x3e, 0xe9, 0x52, 0x55, 0xf7, 0xd9, 0x2f, 0xed, + 0xc5, 0x78, 0x06, 0x8e, 0x26, 0xa0, 0x15, 0x58, 0x8c, 0x43, 0x18, 0xa7, 0xc1, 0x82, 0x12, 0xc7, + 0xcb, 0xbe, 0xf0, 0xcd, 0xe5, 0x4d, 0x40, 0x7d, 0xda, 0x23, 0xdd, 0x91, 0x7c, 0x3f, 0x75, 0xc2, + 0x51, 0xc8, 0xe9, 0x40, 0x3d, 0x08, 0xac, 0x48, 0x23, 0xfa, 0x7d, 0x5b, 0xca, 0x1b, 0x3f, 0x29, + 0xc2, 0xb5, 0x8d, 0x20, 0xe8, 0x8f, 0x26, 0x58, 0xf7, 0x87, 0x4f, 0x9f, 0x75, 0x53, 0xd5, 0x28, + 0x9c, 0xa7, 0x1a, 0xe7, 0x26, 0x5b, 0x46, 0xe6, 0x4b, 0x99, 0x99, 0xbf, 0x1c, 0xe1, 0xfe, 0x76, + 0xf9, 0xde, 0xa2, 0xb5, 0x08, 0x73, 0xbc, 0xed, 0x4d, 0x90, 0xa2, 0x70, 0x49, 0x52, 0x14, 0x67, + 0x90, 0xe2, 0x3f, 0x26, 0x5c, 0xdb, 0x1d, 0x04, 0x3e, 0xe3, 0xe3, 0xb7, 0xa6, 0xbb, 0x39, 0x39, + 0xb1, 0x00, 0xa6, 0xeb, 0xa8, 0x5f, 0x23, 0x4c, 0xd7, 0xb1, 0x4f, 0xc0, 0x8a, 0xcc, 0xd1, 0xe4, + 0x08, 0x39, 0xf3, 0x95, 0x97, 0x8b, 0x4e, 0x11, 0x6a, 0x76, 0x4f, 0xb5, 0x7f, 0xa3, 0x57, 0xe3, + 0x03, 0x40, 0xae, 0x0a, 0xa3, 0x13, 0x3f, 0x4b, 0xe2, 0x63, 0xf0, 0xb6, 0xe6, 0x22, 0x63, 0xe9, + 0xcd, 0xc9, 0xf8, 0xf1, 0x92, 0x3b, 0x21, 0x09, 0x2f, 0x7e, 0x27, 0xfb, 0xa5, 0x09, 0x0b, 0xe2, + 0x7c, 0x4d, 0xaf, 0x34, 0xf6, 0x47, 0xc6, 0xa7, 0x74, 0x9b, 0x99, 0xa6, 0x77, 0xe1, 0x3c, 0xf4, + 0x66, 0x63, 0x0f, 0xcc, 0x52, 0x2e, 0x66, 0xab, 0x2a, 0x5d, 0x38, 0x3d, 0xbf, 0x30, 0xe0, 0x7a, + 0xfc, 0x1a, 0x14, 0xb7, 0xa0, 0xac, 0x97, 0xef, 0x89, 0x16, 0xd7, 0x1d, 0xd1, 0x92, 0x12, 0xec, + 0xec, 0xb7, 0xaf, 0x8e, 0xba, 0x44, 0xf1, 0x0c, 0xf8, 0x7c, 0x7c, 0x27, 0xd5, 0x42, 0xfc, 0x04, + 0x5e, 0x51, 0x9f, 0xc8, 0xdd, 0xed, 0xdf, 0x06, 0x2c, 0x25, 0x61, 0x25, 0x17, 0xb8, 0xf0, 0xe2, + 0x61, 0xa1, 0xb7, 0x01, 0xba, 0xbe, 0xe7, 0xd1, 0x2e, 0x8f, 0x9f, 0x45, 0xa7, 0x35, 0xfc, 0x14, + 0x6a, 0x7f, 0x57, 0x5b, 0xcf, 0x4d, 0x98, 0xf3, 0x87, 0x3c, 0x18, 0x72, 0x45, 0x68, 0x35, 0xba, + 0x70, 0x19, 0xbe, 0xfa, 0x1a, 0x40, 0xfa, 0x23, 0x14, 0xaa, 0x40, 0x69, 0xff, 0xe1, 0xc6, 0x6e, + 0xcb, 0xba, 0x82, 0x6a, 0x50, 0xde, 0xdb, 0xc0, 0x0f, 0xb6, 0x1e, 0x1d, 0xb4, 0x2c, 0x63, 0xed, + 0xe7, 0x15, 0x28, 0xc7, 0x0f, 0x5d, 0xf4, 0x1d, 0xa8, 0xec, 0x50, 0xae, 0x7e, 0x20, 0xfd, 0xf2, + 0x19, 0xbf, 0x3d, 0x44, 0x3c, 0x7b, 0x2d, 0xd7, 0x2f, 0x14, 0xa8, 0x3f, 0xe3, 0x55, 0x8d, 0x56, + 0xb5, 0xf9, 0x99, 0x88, 0xc4, 0xd3, 0xeb, 0x39, 0x90, 0xca, 0xdb, 0xf7, 0x4f, 0x7b, 0xd2, 0xa1, + 0x5b, 0x9a, 0xa1, 0xd9, 0xb0, 0xc4, 0x6f, 0x33, 0x2f, 0x5c, 0x39, 0x1f, 0xce, 0x7e, 0x92, 0xa1, + 0x37, 0x32, 0x6c, 0x4d, 0x82, 0x12, 0xc7, 0x6f, 0xe6, 0x03, 0x2b, 0xb7, 0x6e, 0xf6, 0xcb, 0x1e, + 0xad, 0x68, 0x56, 0xb2, 0x00, 0x89, 0xbb, 0xd5, 0xb3, 0x81, 0xca, 0xd5, 0x7d, 0xed, 0xe5, 0x86, + 0x5e, 0xd6, 0xa6, 0x25, 0xd2, 0xc4, 0xe8, 0x2b, 0x33, 0xb4, 0xca, 0xd2, 0xb7, 0xc7, 0xdf, 0x51, + 0xe8, 0x0b, 0xfa, 0x2f, 0x06, 0x9a, 0x22, 0xb1, 0xb7, 0x3c, 0x1b, 0xa0, 0x4c, 0x76, 0xb3, 0x1e, + 0x0d, 0x48, 0xa7, 0xe9, 0xb4, 0x3a, 0x31, 0xff, 0x95, 0xb3, 0x60, 0xca, 0xc9, 0x61, 0xe6, 0x25, + 0x11, 0xe9, 0xd3, 0x33, 0xf4, 0x89, 0x9b, 0x95, 0x33, 0x71, 0xa9, 0x9f, 0x8c, 0xc3, 0x77, 0xcc, + 0x4f, 0xd6, 0xe1, 0x9c, 0xe5, 0x27, 0x1b, 0xa7, 0xfc, 0x1c, 0x4c, 0x9e, 0xb7, 0xe8, 0x8b, 0x13, + 0x89, 0x4e, 0x55, 0x89, 0xf5, 0xc6, 0x69, 0x10, 0x65, 0xf8, 0x1b, 0xd1, 0xdf, 0x47, 0x68, 0xec, + 0x77, 0x69, 0xee, 0x07, 0x89, 0x91, 0xfa, 0xb4, 0x22, 0x9a, 0xba, 0xf6, 0xa3, 0x02, 0x54, 0xb5, + 0xf3, 0x03, 0x7d, 0xa0, 0x37, 0xa7, 0x95, 0x8c, 0xb6, 0xa3, 0x1f, 0x85, 0x99, 0xac, 0x9e, 0x01, + 0x54, 0xa1, 0x9e, 0x9c, 0x72, 0x6c, 0xa1, 0xac, 0xbd, 0x38, 0x85, 0x4a, 0x9c, 0xde, 0xca, 0x89, + 0x56, 0x9e, 0x9f, 0x65, 0x9c, 0x48, 0x63, 0xed, 0x77, 0x4a, 0x9b, 0xd9, 0x7e, 0xb3, 0x50, 0x91, + 0x87, 0xb7, 0x8c, 0x4b, 0x14, 0xe2, 0xd9, 0x9c, 0xfc, 0x5f, 0xf8, 0xce, 0xff, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xe3, 0x8e, 0xe1, 0x22, 0x2a, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // ProviderClient is the client API for Provider service. // @@ -2856,10 +2972,10 @@ type ProviderClient interface { } type providerClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewProviderClient(cc *grpc.ClientConn) ProviderClient { +func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient { return &providerClient{cc} } @@ -3320,10 +3436,10 @@ type ProvisionerClient interface { } type provisionerClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewProvisionerClient(cc *grpc.ClientConn) ProvisionerClient { +func NewProvisionerClient(cc grpc.ClientConnInterface) ProvisionerClient { return &provisionerClient{cc} } diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.proto b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.proto index 9875d9ba627..4f365697a81 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.proto +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.proto @@ -1,12 +1,12 @@ -// Terraform Plugin RPC protocol version 5.1 +// Terraform Plugin RPC protocol version 5.2 // -// This file defines version 5.1 of the RPC protocol. To implement a plugin +// This file defines version 5.2 of the RPC protocol. To implement a plugin // against this protocol, copy this definition into your own codebase and // use protoc to generate stubs for your target language. // -// This file will be updated in-place in the source Terraform repository for -// any minor versions of protocol 5, but later minor versions will always be -// backwards compatible. Breaking changes, if any are required, will come +// This file will not be updated. Any minor versions of protocol 5 to follow +// should copy this file and modify the copy while maintaing backwards +// compatibility. Breaking changes, if any are required, will come // in a subsequent major version with its own separate proto definition. // // Note that only the proto files included in a release tag of Terraform are @@ -58,7 +58,7 @@ message Stop { message Request { } message Response { - string Error = 1; + string Error = 1; } } @@ -70,12 +70,20 @@ message RawState { map flatmap = 2; } +enum StringKind { + PLAIN = 0; + MARKDOWN = 1; +} + // Schema is the configuration schema for a Resource, Provider, or Provisioner. message Schema { message Block { int64 version = 1; repeated Attribute attributes = 2; repeated NestedBlock block_types = 3; + string description = 4; + StringKind description_kind = 5; + bool deprecated = 6; } message Attribute { @@ -86,6 +94,8 @@ message Schema { bool optional = 5; bool computed = 6; bool sensitive = 7; + StringKind description_kind = 8; + bool deprecated = 9; } message NestedBlock { @@ -145,6 +155,7 @@ message GetProviderSchema { map resource_schemas = 2; map data_source_schemas = 3; repeated Diagnostic diagnostics = 4; + Schema provider_meta = 5; } } @@ -220,6 +231,7 @@ message ReadResource { string type_name = 1; DynamicValue current_state = 2; bytes private = 3; + DynamicValue provider_meta = 4; } message Response { DynamicValue new_state = 1; @@ -235,6 +247,7 @@ message PlanResourceChange { DynamicValue proposed_new_state = 3; DynamicValue config = 4; bytes prior_private = 5; + DynamicValue provider_meta = 6; } message Response { @@ -266,6 +279,7 @@ message ApplyResourceChange { DynamicValue planned_state = 3; DynamicValue config = 4; bytes planned_private = 5; + DynamicValue provider_meta = 6; } message Response { DynamicValue new_state = 1; @@ -309,6 +323,7 @@ message ReadDataSource { message Request { string type_name = 1; DynamicValue config = 2; + DynamicValue provider_meta = 3; } message Response { DynamicValue state = 1; diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/meta/meta.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/meta/meta.go index aab6027280e..af843b3d251 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/meta/meta.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/meta/meta.go @@ -11,7 +11,7 @@ import ( ) // The main version number that is being run at the moment. -var SDKVersion = "1.7.0" +var SDKVersion = "1.13.1" // 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/hashicorp/terraform-plugin-sdk/terraform/diff.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/diff.go index e2f54883bcd..fd5b389b066 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/diff.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/diff.go @@ -303,7 +303,7 @@ func (d *ModuleDiff) String() string { var buf bytes.Buffer names := make([]string, 0, len(d.Resources)) - for name, _ := range d.Resources { + for name := range d.Resources { names = append(names, name) } sort.Strings(names) @@ -335,7 +335,7 @@ func (d *ModuleDiff) String() string { keyLen := 0 rdiffAttrs := rdiff.CopyAttributes() keys := make([]string, 0, len(rdiffAttrs)) - for key, _ := range rdiffAttrs { + for key := range rdiffAttrs { if key == "id" { continue } @@ -1242,7 +1242,7 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { // Found it! Ignore all of these. The prefix here is stripping // off the "%" so it is just "k." prefix := k[:len(k)-1] - for k2, _ := range d.Attributes { + for k2 := range d.Attributes { if strings.HasPrefix(k2, prefix) { ignoreAttrs[k2] = struct{}{} } @@ -1282,17 +1282,17 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { // same attributes. To start, build up the check map to be all the keys. checkOld := make(map[string]struct{}) checkNew := make(map[string]struct{}) - for k, _ := range d.Attributes { + for k := range d.Attributes { checkOld[k] = struct{}{} } - for k, _ := range d2.CopyAttributes() { + for k := range d2.CopyAttributes() { checkNew[k] = struct{}{} } // Make an ordered list so we are sure the approximated hashes are left // to process at the end of the loop keys := make([]string, 0, len(d.Attributes)) - for k, _ := range d.Attributes { + for k := range d.Attributes { keys = append(keys, k) } sort.StringSlice(keys).Sort() @@ -1350,7 +1350,7 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { return false, fmt.Sprintf("regexp failed to compile; err: %#v", err) } - for k2, _ := range checkNew { + for k2 := range checkNew { if re.MatchString(k2) { delete(checkNew, k2) } @@ -1387,12 +1387,12 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { // This is a computed list, set, or map, so remove any keys with // this prefix from the check list. kprefix := k[:len(k)-matchLen] - for k2, _ := range checkOld { + for k2 := range checkOld { if strings.HasPrefix(k2, kprefix) { delete(checkOld, k2) } } - for k2, _ := range checkNew { + for k2 := range checkNew { if strings.HasPrefix(k2, kprefix) { delete(checkNew, k2) } @@ -1412,7 +1412,7 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) { // Check for leftover attributes if len(checkNew) > 0 { extras := make([]string, 0, len(checkNew)) - for attr, _ := range checkNew { + for attr := range checkNew { extras = append(extras, attr) } return false, diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/state.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/state.go index 1d742c2f8f2..98b20be7cbe 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/state.go +++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/state.go @@ -112,6 +112,10 @@ type State struct { Modules []*ModuleState `json:"modules"` mu sync.Mutex + + // IsBinaryDrivenTest is a special flag that assists with a binary driver + // heuristic, it should not be set externally + IsBinaryDrivenTest bool } func (s *State) Lock() { s.mu.Lock() } @@ -1110,7 +1114,7 @@ func (m *ModuleState) View(id string) *ModuleState { } r := m.deepcopy() - for k, _ := range r.Resources { + for k := range r.Resources { if id == k || strings.HasPrefix(k, id+".") { continue } @@ -1197,7 +1201,7 @@ func (m *ModuleState) String() string { } names := make([]string, 0, len(m.Resources)) - for name, _ := range m.Resources { + for name := range m.Resources { names = append(names, name) } @@ -1234,7 +1238,7 @@ func (m *ModuleState) String() string { attributes = rs.Primary.Attributes } attrKeys := make([]string, 0, len(attributes)) - for ak, _ := range attributes { + for ak := range attributes { if ak == "id" { continue } @@ -1269,7 +1273,7 @@ func (m *ModuleState) String() string { buf.WriteString("\nOutputs:\n\n") ks := make([]string, 0, len(m.Outputs)) - for k, _ := range m.Outputs { + for k := range m.Outputs { ks = append(ks, k) } @@ -1284,7 +1288,7 @@ func (m *ModuleState) String() string { buf.WriteString(fmt.Sprintf("%s = %s\n", k, vTyped)) case map[string]interface{}: var mapKeys []string - for key, _ := range vTyped { + for key := range vTyped { mapKeys = append(mapKeys, key) } sort.Strings(mapKeys) @@ -1820,7 +1824,7 @@ func (s *InstanceState) String() string { attributes := s.Attributes attrKeys := make([]string, 0, len(attributes)) - for ak, _ := range attributes { + for ak := range attributes { if ak == "id" { continue } diff --git a/vendor/github.com/hashicorp/terraform-plugin-test/helper.go b/vendor/github.com/hashicorp/terraform-plugin-test/helper.go index d4de44680e8..8a519aaf088 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-test/helper.go +++ b/vendor/github.com/hashicorp/terraform-plugin-test/helper.go @@ -196,6 +196,11 @@ func symlinkAuxiliaryProviders(pluginDir string) error { return nil } +// GetPluginName returns the configured plugin name. +func (h *Helper) GetPluginName() string { + return h.pluginName +} + // Close cleans up temporary files and directories created to support this // helper, returning an error if any of the cleanup fails. // @@ -218,7 +223,7 @@ func (h *Helper) NewWorkingDir() (*WorkingDir, error) { } // symlink the provider source files into the base directory - err = symlinkDir(h.sourceDir, dir) + err = symlinkDirectoriesOnly(h.sourceDir, dir) if err != nil { return nil, err } diff --git a/vendor/github.com/hashicorp/terraform-plugin-test/util.go b/vendor/github.com/hashicorp/terraform-plugin-test/util.go index 0732c82d197..57bc84f2dcc 100644 --- a/vendor/github.com/hashicorp/terraform-plugin-test/util.go +++ b/vendor/github.com/hashicorp/terraform-plugin-test/util.go @@ -53,3 +53,43 @@ func symlinkDir(srcDir string, destDir string) (err error) { } return } + +// symlinkDirectoriesOnly finds only the first-level child directories in srcDir +// and symlinks them into destDir. +// Unlike symlinkDir, this is done non-recursively in order to limit the number +// of file descriptors used. +func symlinkDirectoriesOnly(srcDir string, destDir string) (err error) { + srcInfo, err := os.Stat(srcDir) + if err != nil { + return err + } + + err = os.MkdirAll(destDir, srcInfo.Mode()) + if err != nil { + return err + } + + directory, err := os.Open(srcDir) + if err != nil { + return err + } + defer directory.Close() + objects, err := directory.Readdir(-1) + if err != nil { + return err + } + + for _, obj := range objects { + srcPath := filepath.Join(srcDir, obj.Name()) + destPath := filepath.Join(destDir, obj.Name()) + + if obj.IsDir() { + err = symlinkFile(srcPath, destPath) + if err != nil { + return err + } + } + + } + return +} diff --git a/vendor/github.com/jmespath/go-jmespath/.travis.yml b/vendor/github.com/jmespath/go-jmespath/.travis.yml index 1f98077570d..730c7fa51be 100644 --- a/vendor/github.com/jmespath/go-jmespath/.travis.yml +++ b/vendor/github.com/jmespath/go-jmespath/.travis.yml @@ -3,7 +3,15 @@ language: go sudo: false go: - - 1.4 + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + - 1.11.x + - 1.12.x + - 1.13.x install: go get -v -t ./... script: make test diff --git a/vendor/github.com/jmespath/go-jmespath/README.md b/vendor/github.com/jmespath/go-jmespath/README.md index 187ef676dc9..110ad799976 100644 --- a/vendor/github.com/jmespath/go-jmespath/README.md +++ b/vendor/github.com/jmespath/go-jmespath/README.md @@ -4,4 +4,84 @@ -See http://jmespath.org for more info. +go-jmespath is a GO implementation of JMESPath, +which is a query language for JSON. It will take a JSON +document and transform it into another JSON document +through a JMESPath expression. + +Using go-jmespath is really easy. There's a single function +you use, `jmespath.search`: + + +```go +> import "github.com/jmespath/go-jmespath" +> +> var jsondata = []byte(`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}`) // your data +> var data interface{} +> err := json.Unmarshal(jsondata, &data) +> result, err := jmespath.Search("foo.bar.baz[2]", data) +result = 2 +``` + +In the example we gave the ``search`` function input data of +`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}` as well as the JMESPath +expression `foo.bar.baz[2]`, and the `search` function evaluated +the expression against the input data to produce the result ``2``. + +The JMESPath language can do a lot more than select an element +from a list. Here are a few more examples: + +```go +> var jsondata = []byte(`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}`) // your data +> var data interface{} +> err := json.Unmarshal(jsondata, &data) +> result, err := jmespath.search("foo.bar", data) +result = { "baz": [ 0, 1, 2, 3, 4 ] } + + +> var jsondata = []byte(`{"foo": [{"first": "a", "last": "b"}, + {"first": "c", "last": "d"}]}`) // your data +> var data interface{} +> err := json.Unmarshal(jsondata, &data) +> result, err := jmespath.search({"foo[*].first", data) +result [ 'a', 'c' ] + + +> var jsondata = []byte(`{"foo": [{"age": 20}, {"age": 25}, + {"age": 30}, {"age": 35}, + {"age": 40}]}`) // your data +> var data interface{} +> err := json.Unmarshal(jsondata, &data) +> result, err := jmespath.search("foo[?age > `30`]") +result = [ { age: 35 }, { age: 40 } ] +``` + +You can also pre-compile your query. This is usefull if +you are going to run multiple searches with it: + +```go + > var jsondata = []byte(`{"foo": "bar"}`) + > var data interface{} + > err := json.Unmarshal(jsondata, &data) + > precompiled, err := Compile("foo") + > if err != nil{ + > // ... handle the error + > } + > result, err := precompiled.Search(data) + result = "bar" +``` + +## More Resources + +The example above only show a small amount of what +a JMESPath expression can do. If you want to take a +tour of the language, the *best* place to go is the +[JMESPath Tutorial](http://jmespath.org/tutorial.html). + +One of the best things about JMESPath is that it is +implemented in many different programming languages including +python, ruby, php, lua, etc. To see a complete list of libraries, +check out the [JMESPath libraries page](http://jmespath.org/libraries.html). + +And finally, the full JMESPath specification can be found +on the [JMESPath site](http://jmespath.org/specification.html). diff --git a/vendor/github.com/jmespath/go-jmespath/api.go b/vendor/github.com/jmespath/go-jmespath/api.go index 8e26ffeecff..010efe9bfba 100644 --- a/vendor/github.com/jmespath/go-jmespath/api.go +++ b/vendor/github.com/jmespath/go-jmespath/api.go @@ -2,7 +2,7 @@ package jmespath import "strconv" -// JMESPath is the epresentation of a compiled JMES path query. A JMESPath is +// JMESPath is the representation of a compiled JMES path query. A JMESPath is // safe for concurrent use by multiple goroutines. type JMESPath struct { ast ASTNode diff --git a/vendor/github.com/jmespath/go-jmespath/go.mod b/vendor/github.com/jmespath/go-jmespath/go.mod new file mode 100644 index 00000000000..aa1e3f1c9f7 --- /dev/null +++ b/vendor/github.com/jmespath/go-jmespath/go.mod @@ -0,0 +1,5 @@ +module github.com/jmespath/go-jmespath + +go 1.14 + +require github.com/stretchr/testify v1.5.1 diff --git a/vendor/github.com/jmespath/go-jmespath/go.sum b/vendor/github.com/jmespath/go-jmespath/go.sum new file mode 100644 index 00000000000..331fa69822d --- /dev/null +++ b/vendor/github.com/jmespath/go-jmespath/go.sum @@ -0,0 +1,11 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/jmespath/go-jmespath/parser.go b/vendor/github.com/jmespath/go-jmespath/parser.go index 1240a175521..4abc303ab4a 100644 --- a/vendor/github.com/jmespath/go-jmespath/parser.go +++ b/vendor/github.com/jmespath/go-jmespath/parser.go @@ -137,7 +137,7 @@ func (p *Parser) Parse(expression string) (ASTNode, error) { } if p.current() != tEOF { return ASTNode{}, p.syntaxError(fmt.Sprintf( - "Unexpected token at the end of the expresssion: %s", p.current())) + "Unexpected token at the end of the expression: %s", p.current())) } return parsed, nil } diff --git a/vendor/github.com/maratori/testpackage/LICENSE b/vendor/github.com/maratori/testpackage/LICENSE new file mode 100644 index 00000000000..644d0b1c8c3 --- /dev/null +++ b/vendor/github.com/maratori/testpackage/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Marat Reymers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go b/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go new file mode 100644 index 00000000000..cad24e1a5f5 --- /dev/null +++ b/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go @@ -0,0 +1,53 @@ +package testpackage + +import ( + "flag" + "regexp" + "strings" + + "golang.org/x/tools/go/analysis" +) + +const ( + SkipRegexpFlagName = "skip-regexp" + SkipRegexpFlagUsage = `regexp pattern to skip file by name. To not skip files use -skip-regexp="^$"` + SkipRegexpFlagDefault = `(export|internal)_test\.go` +) + +// NewAnalyzer returns Analyzer that makes you use a separate _test package +func NewAnalyzer() *analysis.Analyzer { + var ( + skipFileRegexp = SkipRegexpFlagDefault + fs flag.FlagSet + ) + + fs.StringVar(&skipFileRegexp, SkipRegexpFlagName, skipFileRegexp, SkipRegexpFlagUsage) + + return &analysis.Analyzer{ + Name: "testpackage", + Doc: "linter that makes you use a separate _test package", + Flags: fs, + Run: func(pass *analysis.Pass) (interface{}, error) { + skipFile, err := regexp.Compile(skipFileRegexp) + if err != nil { + return nil, err + } + + for _, f := range pass.Files { + fileName := pass.Fset.Position(f.Pos()).Filename + if skipFile.MatchString(fileName) { + continue + } + + if strings.HasSuffix(fileName, "_test.go") { + packageName := f.Name.Name + if !strings.HasSuffix(packageName, "_test") { + pass.Reportf(f.Name.Pos(), "package should be `%s_test` instead of `%s`", packageName, packageName) + } + } + } + + return nil, nil + }, + } +} diff --git a/vendor/github.com/nakabonne/nestif/.gitignore b/vendor/github.com/nakabonne/nestif/.gitignore new file mode 100644 index 00000000000..df71a2ac7fb --- /dev/null +++ b/vendor/github.com/nakabonne/nestif/.gitignore @@ -0,0 +1,16 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +/nestif + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ diff --git a/vendor/github.com/nakabonne/nestif/LICENSE b/vendor/github.com/nakabonne/nestif/LICENSE new file mode 100644 index 00000000000..ddf4d71ede8 --- /dev/null +++ b/vendor/github.com/nakabonne/nestif/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2020, Ryo Nakao +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/nakabonne/nestif/README.md b/vendor/github.com/nakabonne/nestif/README.md new file mode 100644 index 00000000000..ede411f7311 --- /dev/null +++ b/vendor/github.com/nakabonne/nestif/README.md @@ -0,0 +1,122 @@ +# nestif + +[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/nakabonne/nestif) + +Reports deeply nested if statements in Go code, by calculating its complexities based on the rules defined by the [Cognitive Complexity white paper by G. Ann Campbell](https://www.sonarsource.com/docs/CognitiveComplexity.pdf). + +It helps you find if statements that make your code hard to read, and clarifies which parts to refactor. + +## Installation + +``` +go get github.com/nakabonne/nestif/cmd/nestif +``` + +## Usage + +### Quick Start + +```bash +nestif +``` + +The `...` glob operator is supported, and the above is an equivalent of: + +```bash +nestif ./... +``` + +One or more files and directories can be specified in a single command: + +```bash +nestif dir/foo.go dir2 dir3/... +``` + +Packages can be specified as well: + +```bash +nestif github.com/foo/bar example.com/bar/baz +``` + +### Options + +``` +usage: nestif [ ...] ... + -e, --exclude-dirs strings regexps of directories to be excluded for checking; comma-separated list + --json emit json format + --min int minimum complexity to show (default 1) + --top int show only the top N most complex if statements (default 10) + -v, --verbose verbose output +``` + +### Example + +Let's say you write: + +```go +package main + +func _() { + if foo { + if bar { + } + } + + if baz == "baz" { + if qux { + if quux { + } + } + } +} +``` + +And give it to nestif: + +```console +$ nestif foo.go +foo.go:9:2: `if baz == "baz"` is nested (complexity: 3) +foo.go:4:2: `if foo` is nested (complexity: 1) +``` + +Note that the results are sorted in descending order of complexity. In addition, it shows only the top 10 most complex if statements by default, and you can specify how many to show with `-top` flag. + +### Rules + +It calculates the complexities of if statements according to the nesting rules of Cognitive Complexity. +Since the more deeply-nested your code gets, the harder it can be to reason about, it assesses a nesting increment for it: + +```go +if condition1 { + if condition2 { // +1 + if condition3 { // +2 + if condition4 { // +3 + } + } + } +} +``` + +`else` and `else if` increase complexity by one wherever they are because the mental cost has already been paid when reading the if: + +```go +if condition1 { + if condition2 { // +1 + if condition3 { // +2 + } else if condition4 { // +1 + } else { // +1 + if condition5 { // +3 + } + } + } +} +``` + +## Inspired by + +- [uudashr/gocognit](https://github.com/uudashr/gocognit) +- [fzipp/gocyclo](https://github.com/fzipp/gocyclo) + +## Further reading + +Please see the [Cognitive Complexity: A new way of measuring understandability](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) white paper by G. Ann Campbell for more detail on Cognitive Complexity. diff --git a/vendor/github.com/nakabonne/nestif/go.mod b/vendor/github.com/nakabonne/nestif/go.mod new file mode 100644 index 00000000000..325901d5905 --- /dev/null +++ b/vendor/github.com/nakabonne/nestif/go.mod @@ -0,0 +1,8 @@ +module github.com/nakabonne/nestif + +go 1.13 + +require ( + github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.4.0 +) diff --git a/vendor/github.com/nakabonne/nestif/go.sum b/vendor/github.com/nakabonne/nestif/go.sum new file mode 100644 index 00000000000..6d790ef35bd --- /dev/null +++ b/vendor/github.com/nakabonne/nestif/go.sum @@ -0,0 +1,12 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/nakabonne/nestif/nestif.go b/vendor/github.com/nakabonne/nestif/nestif.go new file mode 100644 index 00000000000..d458022fb69 --- /dev/null +++ b/vendor/github.com/nakabonne/nestif/nestif.go @@ -0,0 +1,148 @@ +// Copyright 2020 Ryo Nakao . +// +// All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package nestif provides an API to detect deeply nested if statements. +package nestif + +import ( + "bytes" + "fmt" + "go/ast" + "go/printer" + "go/token" + "io" +) + +// Issue represents an issue of root if statement that has nested ifs. +type Issue struct { + Pos token.Position + Complexity int + Message string +} + +// Checker represents a checker that finds nested if statements. +type Checker struct { + // Minimum complexity to report. + MinComplexity int + + // For debug mode. + debugWriter io.Writer + issues []Issue +} + +// Check inspects a single file and returns found issues. +func (c *Checker) Check(f *ast.File, fset *token.FileSet) []Issue { + c.issues = []Issue{} // refresh + ast.Inspect(f, func(n ast.Node) bool { + fn, ok := n.(*ast.FuncDecl) + if !ok || fn.Body == nil { + return true + } + for _, stmt := range fn.Body.List { + c.checkFunc(&stmt, fset) + } + return true + }) + + return c.issues +} + +// checkFunc inspects a function and sets a list of issues if there are. +func (c *Checker) checkFunc(stmt *ast.Stmt, fset *token.FileSet) { + ast.Inspect(*stmt, func(n ast.Node) bool { + ifStmt, ok := n.(*ast.IfStmt) + if !ok { + return true + } + + c.checkIf(ifStmt, fset) + return false + }) +} + +// checkIf inspects a if statement and sets an issue if there is. +func (c *Checker) checkIf(stmt *ast.IfStmt, fset *token.FileSet) { + v := newVisitor() + ast.Walk(v, stmt) + if v.complexity < c.MinComplexity { + return + } + pos := fset.Position(stmt.Pos()) + c.issues = append(c.issues, Issue{ + Pos: pos, + Complexity: v.complexity, + Message: c.makeMessage(v.complexity, stmt.Cond, fset), + }) +} + +type visitor struct { + complexity int + nesting int + // To avoid adding complexity including nesting level to `else if`. + elseifs map[*ast.IfStmt]bool +} + +func newVisitor() *visitor { + return &visitor{ + elseifs: make(map[*ast.IfStmt]bool), + } +} + +// Visit traverses an AST in depth-first order by calling itself +// recursively, and calculates the complexities of if statements. +func (v *visitor) Visit(n ast.Node) ast.Visitor { + ifStmt, ok := n.(*ast.IfStmt) + if !ok { + return v + } + + v.incComplexity(ifStmt) + v.nesting++ + ast.Walk(v, ifStmt.Body) + v.nesting-- + + switch t := ifStmt.Else.(type) { + case *ast.BlockStmt: + v.complexity++ + v.nesting++ + ast.Walk(v, t) + v.nesting-- + case *ast.IfStmt: + v.elseifs[t] = true + ast.Walk(v, t) + } + + return nil +} + +func (v *visitor) incComplexity(n *ast.IfStmt) { + // In case of `else if`, increase by 1. + if v.elseifs[n] { + v.complexity++ + } else { + v.complexity += v.nesting + } +} + +func (c *Checker) makeMessage(complexity int, cond ast.Expr, fset *token.FileSet) string { + p := &printer.Config{} + b := new(bytes.Buffer) + if err := p.Fprint(b, fset, cond); err != nil { + c.debug("failed to convert condition into string: %v", err) + } + return fmt.Sprintf("`if %s` is deeply nested (complexity: %d)", b.String(), complexity) +} + +// DebugMode makes it possible to emit debug logs. +func (c *Checker) DebugMode(w io.Writer) { + c.debugWriter = w +} + +func (c *Checker) debug(format string, a ...interface{}) { + if c.debugWriter != nil { + fmt.Fprintf(c.debugWriter, format, a...) + } +} diff --git a/vendor/github.com/ryancurrah/gomodguard/.dockerignore b/vendor/github.com/ryancurrah/gomodguard/.dockerignore new file mode 100644 index 00000000000..77738287f0e --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/.dockerignore @@ -0,0 +1 @@ +dist/ \ No newline at end of file diff --git a/vendor/github.com/ryancurrah/gomodguard/.gitignore b/vendor/github.com/ryancurrah/gomodguard/.gitignore new file mode 100644 index 00000000000..5131b46d6b5 --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/.gitignore @@ -0,0 +1,21 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +/gomodguard + +*.xml + +dist/ diff --git a/vendor/github.com/ryancurrah/gomodguard/.gomodguard.yaml b/vendor/github.com/ryancurrah/gomodguard/.gomodguard.yaml new file mode 100644 index 00000000000..c0f061f59ff --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/.gomodguard.yaml @@ -0,0 +1,18 @@ +allowed: + modules: # List of allowed modules + - gopkg.in/yaml.v2 + - github.com/go-xmlfmt/xmlfmt + - github.com/phayes/checkstyle + domains: # List of allowed module domains + - golang.org + +blocked: + modules: # List of blocked modules + - github.com/uudashr/go-module: # Blocked module + recommendations: # Recommended modules that should be used instead (Optional) + - golang.org/x/mod + reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional) + - github.com/mitchellh/go-homedir: + recommendations: + - github.com/ryancurrah/gomodguard + reason: "testing if the linted module is not blocked when it is recommended" diff --git a/vendor/github.com/ryancurrah/gomodguard/.goreleaser.yml b/vendor/github.com/ryancurrah/gomodguard/.goreleaser.yml new file mode 100644 index 00000000000..20d8349926c --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/.goreleaser.yml @@ -0,0 +1,31 @@ +builds: +- main: ./cmd/gomodguard/main.go + env: + - CGO_ENABLED=0 +archives: +- replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +dockers: +- goos: linux + goarch: amd64 + binaries: + - gomodguard + image_templates: + - "ryancurrah/gomodguard:latest" + - "ryancurrah/gomodguard:{{.Tag}}" + skip_push: false + dockerfile: Dockerfile.goreleaser + build_flag_templates: + - "--pull" + - "--build-arg=gomodguard_VERSION={{.Version}}" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source={{.GitURL}}" diff --git a/vendor/github.com/ryancurrah/gomodguard/Dockerfile b/vendor/github.com/ryancurrah/gomodguard/Dockerfile new file mode 100644 index 00000000000..719a0ebdb6d --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/Dockerfile @@ -0,0 +1,17 @@ +ARG GO_VERSION=1.14.2 +ARG ALPINE_VERSION=3.11 +ARG gomodguard_VERSION= + +# ---- Build container +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder +WORKDIR /gomodguard +COPY . . +RUN apk add --no-cache git +RUN go build -o gomodguard cmd/gomodguard/main.go + +# ---- App container +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} +WORKDIR / +RUN apk --no-cache add ca-certificates +COPY --from=builder gomodguard/gomodguard / +ENTRYPOINT ./gomodguard diff --git a/vendor/github.com/ryancurrah/gomodguard/Dockerfile.goreleaser b/vendor/github.com/ryancurrah/gomodguard/Dockerfile.goreleaser new file mode 100644 index 00000000000..57a042a67ce --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/Dockerfile.goreleaser @@ -0,0 +1,10 @@ +ARG GO_VERSION=1.14.2 +ARG ALPINE_VERSION=3.11 +ARG gomodguard_VERSION= + +# ---- App container +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} +WORKDIR / +RUN apk --no-cache add ca-certificates +COPY gomodguard /gomodguard +ENTRYPOINT ./gomodguard diff --git a/vendor/github.com/ryancurrah/gomodguard/LICENSE b/vendor/github.com/ryancurrah/gomodguard/LICENSE new file mode 100644 index 00000000000..acd8a81e167 --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Ryan Currah + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/ryancurrah/gomodguard/Makefile b/vendor/github.com/ryancurrah/gomodguard/Makefile new file mode 100644 index 00000000000..d765f52d5da --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/Makefile @@ -0,0 +1,37 @@ +current_dir = $(shell pwd) +version = $(shell printf '%s' $$(cat VERSION)) + +.PHONEY: lint +lint: + golangci-lint run -v --enable-all --disable funlen,gochecknoglobals,lll ./... + +.PHONEY: build +build: + go build -o gomodguard cmd/gomodguard/main.go + +.PHONEY: dockerbuild +dockerbuild: + docker build --build-arg GOMODGUARD_VERSION=${version} --tag ryancurrah/gomodguard:${version} . + +.PHONEY: run +run: build + ./gomodguard + +.PHONEY: dockerrun +dockerrun: dockerbuild + docker run -v "${current_dir}/.gomodguard.yaml:/.gomodguard.yaml" ryancurrah/gomodguard:latest + +.PHONEY: release +release: + git tag ${version} + git push --tags + goreleaser --skip-validate --rm-dist + +.PHONEY: clean +clean: + rm -rf dist/ + rm -f gomodguard + +.PHONEY: install-tools-mac +install-tools-mac: + brew install goreleaser/tap/goreleaser diff --git a/vendor/github.com/ryancurrah/gomodguard/README.md b/vendor/github.com/ryancurrah/gomodguard/README.md new file mode 100644 index 00000000000..89a2398be03 --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/README.md @@ -0,0 +1,114 @@ +# gomodguard + + + +Allow and block list linter for direct Go module dependencies. This is useful for organizations where they want to standardize on the modules used and be able to recommend alternative modules. + +## Description + +Allowed and blocked modules are defined in a `.gomodguard.yaml` or `~/.gomodguard.yaml` file. + +Modules can be allowed by module or domain name. When allowed modules are specified any modules not in the allowed configuration are blocked. + +If no allowed modules or domains are specified then all modules are allowed except for blocked ones. + +The linter looks for blocked modules in `go.mod` and searches for imported packages where the imported packages module is blocked. Indirect modules are not considered. + +Alternative modules can be optionally recommended in the blocked modules list. + +If the linted module imports a blocked module but the linted module is in the recommended modules list the blocked module is ignored. Usually, this means the linted module wraps that blocked module for use by other modules, therefore the import of the blocked module should not be blocked. + +Results are printed to `stdout`. + +Logging statements are printed to `stderr`. + +Results can be exported to different report formats. Which can be imported into CI tools. See the help section for more information. + +## Configuration + +```yaml +allowed: + modules: # List of allowed modules + - gopkg.in/yaml.v2 + - github.com/go-xmlfmt/xmlfmt + - github.com/phayes/checkstyle + - github.com/mitchellh/go-homedir + domains: # List of allowed module domains + - golang.org + +blocked: + modules: # List of blocked modules + - github.com/uudashr/go-module: # Blocked module + recommendations: # Recommended modules that should be used instead (Optional) + - golang.org/x/mod + reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional) +``` + +## Usage + +``` +╰─ ./gomodguard -h +Usage: gomodguard [files...] +Also supports package syntax but will use it in relative path, i.e. ./pkg/... +Flags: + -f string + Report results to the specified file. A report type must also be specified + -file string + + -h Show this help text + -help + + -n Don't lint test files + -no-test + + -r string + Report results to one of the following formats: checkstyle. A report file destination must also be specified + -report string +``` + +## Example + +``` +╰─ ./gomodguard -r checkstyle -f gomodguard-checkstyle.xml ./... + +info: allowed modules, [gopkg.in/yaml.v2 github.com/go-xmlfmt/xmlfmt github.com/phayes/checkstyle github.com/mitchellh/go-homedir] +info: allowed module domains, [golang.org] +info: blocked modules, [github.com/uudashr/go-module] +info: found `2` blocked modules in the go.mod file, [github.com/gofrs/uuid github.com/uudashr/go-module] +blocked_example.go:6: import of package `github.com/gofrs/uuid` is blocked because the module is not in the allowed modules list. +blocked_example.go:7: import of package `github.com/uudashr/go-module` is blocked because the module is in the blocked modules list. `golang.org/x/mod` is a recommended module. `mod` is the official go.mod parser library. +``` + +Resulting checkstyle file + +``` +╰─ cat gomodguard-checkstyle.xml + + + + + + + + + + +``` + +## Install + +``` +go get -u github.com/ryancurrah/gomodguard/cmd/gomodguard +``` + +## Develop + +``` +git clone https://github.com/ryancurrah/gomodguard.git && cd gomodguard + +go build -o gomodguard cmd/gomodguard/main.go +``` + +## License + +**MIT** diff --git a/vendor/github.com/ryancurrah/gomodguard/VERSION b/vendor/github.com/ryancurrah/gomodguard/VERSION new file mode 100644 index 00000000000..3e7bcf08c23 --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/VERSION @@ -0,0 +1 @@ +v1.0.4 diff --git a/vendor/github.com/ryancurrah/gomodguard/go.mod b/vendor/github.com/ryancurrah/gomodguard/go.mod new file mode 100644 index 00000000000..0f0e92e4e1a --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/go.mod @@ -0,0 +1,11 @@ +module github.com/ryancurrah/gomodguard + +go 1.14 + +require ( + github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b + github.com/mitchellh/go-homedir v1.1.0 + github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d + golang.org/x/mod v0.2.0 + gopkg.in/yaml.v2 v2.2.8 +) diff --git a/vendor/github.com/ryancurrah/gomodguard/go.sum b/vendor/github.com/ryancurrah/gomodguard/go.sum new file mode 100644 index 00000000000..0f4bf323120 --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/go.sum @@ -0,0 +1,24 @@ +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/ryancurrah/gomodguard/gomodguard.go b/vendor/github.com/ryancurrah/gomodguard/gomodguard.go new file mode 100644 index 00000000000..cd4f7d66e57 --- /dev/null +++ b/vendor/github.com/ryancurrah/gomodguard/gomodguard.go @@ -0,0 +1,403 @@ +package gomodguard + +import ( + "bytes" + "encoding/json" + "fmt" + "go/parser" + "go/token" + "io/ioutil" + "log" + "os" + "os/exec" + "strings" + + "golang.org/x/mod/modfile" +) + +var ( + blockedReasonNotInAllowedList = "import of package `%s` is blocked because the module is not in the allowed modules list." + blockedReasonInBlockedList = "import of package `%s` is blocked because the module is in the blocked modules list." + goModFilename = "go.mod" +) + +// Recommendations are alternative modules to use and a reason why. +type Recommendations struct { + Recommendations []string `yaml:"recommendations"` + Reason string `yaml:"reason"` +} + +// IsRecommended returns true if the package provided is in the Recommendations list +func (r *Recommendations) IsRecommended(pkg string) bool { + for n := range r.Recommendations { + if strings.TrimSpace(pkg) == strings.TrimSpace(r.Recommendations[n]) { + return true + } + } + + return false +} + +// String returns the recommended modules and reason message. +func (r *Recommendations) String() string { + msg := "" + + if r == nil { + return msg + } + + for i := range r.Recommendations { + switch { + case len(r.Recommendations) == 1: + msg += fmt.Sprintf("`%s` is a recommended module.", r.Recommendations[i]) + case (i+1) != len(r.Recommendations) && (i+1) == (len(r.Recommendations)-1): + msg += fmt.Sprintf("`%s` ", r.Recommendations[i]) + case (i + 1) != len(r.Recommendations): + msg += fmt.Sprintf("`%s`, ", r.Recommendations[i]) + default: + msg += fmt.Sprintf("and `%s` are recommended modules.", r.Recommendations[i]) + } + } + + if r.Reason != "" { + msg += fmt.Sprintf(" %s", r.Reason) + } + + return msg +} + +// HasRecommendations returns true if the blocked package has +// recommended modules. +func (r *Recommendations) HasRecommendations() bool { + return len(r.Recommendations) > 0 +} + +// BlockedModule is a blocked module name and +// optionally a list of recommended modules +// and a reason message. +type BlockedModule map[string]Recommendations + +// BlockedModules a list of blocked modules. +type BlockedModules []BlockedModule + +// Get returns the modules that are blocked. +func (b BlockedModules) Get() []string { + modules := make([]string, len(b)) + + for i := range b { + for module := range b[i] { + modules[i] = module + break + } + } + + return modules +} + +// RecommendedModules will return a list of recommended modules for the +// package provided. If there is no recommendation nil will be returned. +func (b BlockedModules) RecommendedModules(pkg string) *Recommendations { + for i := range b { + for blockedModule, recommendations := range b[i] { + if strings.HasPrefix(strings.ToLower(pkg), strings.ToLower(blockedModule)) && recommendations.HasRecommendations() { + return &recommendations + } + + break + } + } + + return nil +} + +// IsBlockedPackage returns true if the package name is in +// the blocked modules list. +func (b BlockedModules) IsBlockedPackage(pkg string) bool { + blockedModules := b.Get() + for i := range blockedModules { + if strings.HasPrefix(strings.ToLower(pkg), strings.ToLower(blockedModules[i])) { + return true + } + } + + return false +} + +// IsBlockedModule returns true if the given module name is in the +// blocked modules list. +func (b BlockedModules) IsBlockedModule(module string) bool { + blockedModules := b.Get() + for i := range blockedModules { + if strings.EqualFold(module, strings.TrimSpace(blockedModules[i])) { + return true + } + } + + return false +} + +// Allowed is a list of modules and module +// domains that are allowed to be used. +type Allowed struct { + Modules []string `yaml:"modules"` + Domains []string `yaml:"domains"` +} + +// IsAllowedModule returns true if the given module +// name is in the allowed modules list. +func (a *Allowed) IsAllowedModule(module string) bool { + allowedModules := a.Modules + for i := range allowedModules { + if strings.EqualFold(module, strings.TrimSpace(allowedModules[i])) { + return true + } + } + + return false +} + +// IsAllowedModuleDomain returns true if the given modules domain is +// in the allowed module domains list. +func (a *Allowed) IsAllowedModuleDomain(module string) bool { + allowedDomains := a.Domains + for i := range allowedDomains { + if strings.HasPrefix(strings.ToLower(module), strings.TrimSpace(strings.ToLower(allowedDomains[i]))) { + return true + } + } + + return false +} + +// Blocked is a list of modules that are +// blocked and not to be used. +type Blocked struct { + Modules BlockedModules `yaml:"modules"` +} + +// Configuration of gomodguard allow and block lists. +type Configuration struct { + Allowed Allowed `yaml:"allowed"` + Blocked Blocked `yaml:"blocked"` +} + +// Result represents the result of one error. +type Result struct { + FileName string + LineNumber int + Position token.Position + Reason string +} + +// String returns the filename, line +// number and reason of a Result. +func (r *Result) String() string { + return fmt.Sprintf("%s:%d: %s", r.FileName, r.LineNumber, r.Reason) +} + +// Processor processes Go files. +type Processor struct { + config Configuration + logger *log.Logger + modfile *modfile.File + blockedModulesFromModFile []string + result []Result +} + +// NewProcessor will create a Processor to lint blocked packages. +func NewProcessor(config Configuration, logger *log.Logger) (*Processor, error) { + goModFileBytes, err := loadGoModFile() + if err != nil { + errMsg := fmt.Sprintf("unable to read %s file: %s", goModFilename, err) + + return nil, fmt.Errorf(errMsg) + } + + mfile, err := modfile.Parse(goModFilename, goModFileBytes, nil) + if err != nil { + errMsg := fmt.Sprintf("unable to parse %s file: %s", goModFilename, err) + + return nil, fmt.Errorf(errMsg) + } + + logger.Printf("info: allowed modules, %+v", config.Allowed.Modules) + logger.Printf("info: allowed module domains, %+v", config.Allowed.Domains) + logger.Printf("info: blocked modules, %+v", config.Blocked.Modules.Get()) + + p := &Processor{ + config: config, + logger: logger, + modfile: mfile, + result: []Result{}, + } + + p.setBlockedModulesFromModFile() + + return p, nil +} + +// ProcessFiles takes a string slice with file names (full paths) +// and lints them. +func (p *Processor) ProcessFiles(filenames []string) []Result { + pluralModuleMsg := "s" + if len(p.blockedModulesFromModFile) == 1 { + pluralModuleMsg = "" + } + + p.logger.Printf("info: found `%d` blocked module%s in the %s file, %+v", + len(p.blockedModulesFromModFile), pluralModuleMsg, goModFilename, p.blockedModulesFromModFile) + + for _, filename := range filenames { + data, err := ioutil.ReadFile(filename) + if err != nil { + p.result = append(p.result, Result{ + FileName: filename, + LineNumber: 0, + Reason: fmt.Sprintf("unable to read file, file cannot be linted (%s)", err.Error()), + }) + } + + p.process(filename, data) + } + + return p.result +} + +// process file imports and add lint error if blocked package is imported. +func (p *Processor) process(filename string, data []byte) { + fileSet := token.NewFileSet() + + file, err := parser.ParseFile(fileSet, filename, data, parser.ParseComments) + if err != nil { + p.result = append(p.result, Result{ + FileName: filename, + LineNumber: 0, + Reason: fmt.Sprintf("invalid syntax, file cannot be linted (%s)", err.Error()), + }) + + return + } + + imports := file.Imports + for i := range imports { + importedPkg := strings.TrimSpace(strings.Trim(imports[i].Path.Value, "\"")) + if p.isBlockedPackageFromModFile(importedPkg) { + reason := "" + + if p.config.Blocked.Modules.IsBlockedPackage(importedPkg) { + reason = fmt.Sprintf(blockedReasonInBlockedList, importedPkg) + } else { + reason = fmt.Sprintf(blockedReasonNotInAllowedList, importedPkg) + } + + recommendedModules := p.config.Blocked.Modules.RecommendedModules(importedPkg) + if recommendedModules != nil { + reason += fmt.Sprintf(" %s", recommendedModules.String()) + } + + p.addError(fileSet, imports[i].Pos(), reason) + } + } +} + +// addError adds an error for the file and line number for the current token.Pos +// with the given reason. +func (p *Processor) addError(fileset *token.FileSet, pos token.Pos, reason string) { + position := fileset.Position(pos) + + p.result = append(p.result, Result{ + FileName: position.Filename, + LineNumber: position.Line, + Position: position, + Reason: reason, + }) +} + +// setBlockedModules determines which modules are blocked by reading +// the go.mod file and comparing the require modules to the allowed modules. +func (p *Processor) setBlockedModulesFromModFile() { + blockedModules := make([]string, 0, len(p.modfile.Require)) + requiredModules := p.modfile.Require + lintedModule := p.modfile.Module.Mod.Path + + for i := range requiredModules { + if !requiredModules[i].Indirect { + requiredModule := strings.TrimSpace(requiredModules[i].Mod.Path) + + if p.config.Allowed.IsAllowedModuleDomain(requiredModule) { + continue + } + + if p.config.Allowed.IsAllowedModule(requiredModule) { + continue + } + + requiredModuleIsBlocked := p.config.Blocked.Modules.IsBlockedModule(requiredModule) + + if len(p.config.Allowed.Modules) == 0 && + len(p.config.Allowed.Domains) == 0 && + !requiredModuleIsBlocked { + continue + } + + // If the go.mod file being linted is a recommended module of a blocked module + // and it imports that blocked module, do not set as a blocked. This means + // that the linted module wraps that blocked module + if requiredModuleIsBlocked { + recommendedModules := p.config.Blocked.Modules.RecommendedModules(requiredModule) + + if recommendedModules.IsRecommended(lintedModule) { + continue + } + } + + blockedModules = append(blockedModules, requiredModule) + } + } + + if len(blockedModules) > 0 { + p.blockedModulesFromModFile = blockedModules + } +} + +// isBlockedPackageFromModFile returns true if the imported packages +// module is in the go.mod file and was blocked. +func (p *Processor) isBlockedPackageFromModFile(pkg string) bool { + blockedModulesFromModFile := p.blockedModulesFromModFile + for i := range blockedModulesFromModFile { + if strings.HasPrefix(strings.ToLower(pkg), strings.ToLower(blockedModulesFromModFile[i])) { + return true + } + } + + return false +} + +func loadGoModFile() ([]byte, error) { + cmd := exec.Command("go", "env", "-json") + stdout, _ := cmd.StdoutPipe() + _ = cmd.Start() + + if stdout == nil { + return ioutil.ReadFile(goModFilename) + } + + buf := new(bytes.Buffer) + _, _ = buf.ReadFrom(stdout) + + goEnv := make(map[string]string) + err := json.Unmarshal(buf.Bytes(), &goEnv) + if err != nil { + return ioutil.ReadFile(goModFilename) + } + + if _, ok := goEnv["GOMOD"]; !ok { + return ioutil.ReadFile(goModFilename) + } + + if _, err := os.Stat(goEnv["GOMOD"]); os.IsNotExist(err) { + return ioutil.ReadFile(goModFilename) + } + + return ioutil.ReadFile(goEnv["GOMOD"]) +} diff --git a/vendor/github.com/securego/gosec/.travis.yml b/vendor/github.com/securego/gosec/.travis.yml index 26bb6d307a3..265b2a623f3 100644 --- a/vendor/github.com/securego/gosec/.travis.yml +++ b/vendor/github.com/securego/gosec/.travis.yml @@ -1,9 +1,9 @@ language: go go: - - "1.11.x" - "1.12.x" - "1.13.x" + - "1.14.x" - tip install: diff --git a/vendor/github.com/securego/gosec/Makefile b/vendor/github.com/securego/gosec/Makefile index d9886e9816d..21d8f837ec6 100644 --- a/vendor/github.com/securego/gosec/Makefile +++ b/vendor/github.com/securego/gosec/Makefile @@ -6,27 +6,32 @@ BUILDFLAGS := '-w -s' CGO_ENABLED = 0 GO := GO111MODULE=on go GO_NOMOD :=GO111MODULE=off go +GOPATH ?= $(shell $(GO) env GOPATH) +GOBIN ?= $(GOPATH)/bin +GOLINT ?= $(GOBIN)/golint +GOSEC ?= $(GOBIN)/gosec +GINKGO ?= $(GOBIN)/ginkgo default: $(MAKE) build test: build fmt lint sec $(GO_NOMOD) get -u github.com/onsi/ginkgo/ginkgo - ginkgo -r -v + $(GINKGO) -r -v fmt: @echo "FORMATTING" @FORMATTED=`$(GO) fmt ./...` @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true -lint: +lint: @echo "LINTING" $(GO_NOMOD) get -u golang.org/x/lint/golint - golint -set_exit_status ./... + $(GOLINT) -set_exit_status ./... @echo "VETTING" - $(GO) vet ./... + $(GO) vet ./... -sec: +sec: @echo "SECURITY SCANNING" ./$(BIN) ./... @@ -40,10 +45,10 @@ clean: rm -rf build vendor dist rm -f release image $(BIN) -release: +release: @echo "Releasing the gosec binary..." goreleaser release - + build-linux: CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -ldflags $(BUILDFLAGS) -o $(BIN) ./cmd/gosec/ @@ -59,4 +64,3 @@ image-push: image docker push $(IMAGE_REPO)/$(BIN):latest .PHONY: test build clean release image image-push - diff --git a/vendor/github.com/securego/gosec/README.md b/vendor/github.com/securego/gosec/README.md index ca4eb15e86c..fcd2faef4d6 100644 --- a/vendor/github.com/securego/gosec/README.md +++ b/vendor/github.com/securego/gosec/README.md @@ -71,6 +71,8 @@ directory you can supply `./...` as the input argument. - G106: Audit the use of ssh.InsecureIgnoreHostKey - G107: Url provided to HTTP request as taint input - G108: Profiling endpoint automatically exposed on /debug/pprof +- G109: Potential Integer overflow made by strconv.Atoi result conversion to int16/32 +- G110: Potential DoS vulnerability via decompression bomb - G201: SQL query construction using format string - G202: SQL query construction using string concatenation - G203: Use of unescaped data in HTML templates @@ -80,6 +82,8 @@ directory you can supply `./...` as the input argument. - G303: Creating tempfile using a predictable path - G304: File path provided as taint input - G305: File traversal when extracting zip archive +- G306: Poor file permissions used when writing to a new file +- G307: Deferring a method which returns an error - G401: Detect the usage of DES, RC4, MD5 or SHA1 - G402: Look for bad TLS connection settings - G403: Ensure minimum RSA key length of 2048 bits diff --git a/vendor/github.com/securego/gosec/analyzer.go b/vendor/github.com/securego/gosec/analyzer.go index 20f08d5ded7..ca4440c20e5 100644 --- a/vendor/github.com/securego/gosec/analyzer.go +++ b/vendor/github.com/securego/gosec/analyzer.go @@ -24,6 +24,7 @@ import ( "log" "os" "path" + "path/filepath" "reflect" "regexp" "strconv" @@ -47,15 +48,16 @@ const LoadMode = packages.NeedName | // It is passed through to all rule functions as they are called. Rules may use // this data in conjunction withe the encountered AST node. type Context struct { - FileSet *token.FileSet - Comments ast.CommentMap - Info *types.Info - Pkg *types.Package - PkgFiles []*ast.File - Root *ast.File - Config Config - Imports *ImportTracker - Ignores []map[string]bool + FileSet *token.FileSet + Comments ast.CommentMap + Info *types.Info + Pkg *types.Package + PkgFiles []*ast.File + Root *ast.File + Config Config + Imports *ImportTracker + Ignores []map[string]bool + PassedValues map[string]interface{} } // Metrics used when reporting information about a scanning run. @@ -173,6 +175,9 @@ func (gosec *Analyzer) load(pkgPath string, conf *packages.Config) ([]*packages. for _, filename := range basePackage.GoFiles { packageFiles = append(packageFiles, path.Join(pkgPath, filename)) } + for _, filename := range basePackage.CgoFiles { + packageFiles = append(packageFiles, path.Join(pkgPath, filename)) + } if gosec.tests { testsFiles := []string{} @@ -194,7 +199,13 @@ func (gosec *Analyzer) load(pkgPath string, conf *packages.Config) ([]*packages. func (gosec *Analyzer) Check(pkg *packages.Package) { gosec.logger.Println("Checking package:", pkg.Name) for _, file := range pkg.Syntax { - gosec.logger.Println("Checking file:", pkg.Fset.File(file.Pos()).Name()) + checkedFile := pkg.Fset.File(file.Pos()).Name() + // Skip the no-Go file from analysis (e.g. a Cgo files is expanded in 3 different files + // stored in the cache which do not need to by analyzed) + if filepath.Ext(checkedFile) != ".go" { + continue + } + gosec.logger.Println("Checking file:", checkedFile) gosec.context.FileSet = pkg.Fset gosec.context.Config = gosec.config gosec.context.Comments = ast.NewCommentMap(gosec.context.FileSet, file, file.Comments) @@ -204,6 +215,7 @@ func (gosec *Analyzer) Check(pkg *packages.Package) { gosec.context.PkgFiles = pkg.Syntax gosec.context.Imports = NewImportTracker() gosec.context.Imports.TrackFile(file) + gosec.context.PassedValues = make(map[string]interface{}) ast.Walk(gosec, file) gosec.stats.NumFiles++ gosec.stats.NumLines += pkg.Fset.File(file.Pos()).LineCount() @@ -259,18 +271,23 @@ func (gosec *Analyzer) AppendError(file string, err error) { gosec.errors[file] = errors } -// ignore a node (and sub-tree) if it is tagged with a "#nosec" comment +// ignore a node (and sub-tree) if it is tagged with a nosec tag comment func (gosec *Analyzer) ignore(n ast.Node) ([]string, bool) { if groups, ok := gosec.context.Comments[n]; ok && !gosec.ignoreNosec { // Checks if an alternative for #nosec is set and, if not, uses the default. - noSecAlternative, err := gosec.config.GetGlobal(NoSecAlternative) + noSecDefaultTag := "#nosec" + noSecAlternativeTag, err := gosec.config.GetGlobal(NoSecAlternative) if err != nil { - noSecAlternative = "#nosec" + noSecAlternativeTag = noSecDefaultTag } for _, group := range groups { - if strings.Contains(group.Text(), noSecAlternative) { + + foundDefaultTag := strings.Contains(group.Text(), noSecDefaultTag) + foundAlternativeTag := strings.Contains(group.Text(), noSecAlternativeTag) + + if foundDefaultTag || foundAlternativeTag { gosec.stats.NumNosec++ // Pull out the specific rules that are listed to be ignored. diff --git a/vendor/github.com/securego/gosec/call_list.go b/vendor/github.com/securego/gosec/call_list.go index 556a1e8c968..115c6c88e52 100644 --- a/vendor/github.com/securego/gosec/call_list.go +++ b/vendor/github.com/securego/gosec/call_list.go @@ -56,9 +56,22 @@ func (c CallList) Contains(selector, ident string) bool { return false } -// ContainsCallExpr resolves the call expression name and type -/// or package and determines if it exists within the CallList -func (c CallList) ContainsCallExpr(n ast.Node, ctx *Context, stripVendor bool) *ast.CallExpr { +// ContainsPointer returns true if a pointer to the selector type or the type +// itself is a members of this call list. +func (c CallList) ContainsPointer(selector, indent string) bool { + if strings.HasPrefix(selector, "*") { + if c.Contains(selector, indent) { + return true + } + s := strings.TrimPrefix(selector, "*") + return c.Contains(s, indent) + } + return false +} + +// ContainsPkgCallExpr resolves the call expression name and type, and then further looks +// up the package path for that type. Finally, it determines if the call exists within the call list +func (c CallList) ContainsPkgCallExpr(n ast.Node, ctx *Context, stripVendor bool) *ast.CallExpr { selector, ident, err := GetCallInfo(n, ctx) if err != nil { return nil @@ -79,12 +92,18 @@ func (c CallList) ContainsCallExpr(n ast.Node, ctx *Context, stripVendor bool) * } return n.(*ast.CallExpr) - /* - // Try direct resolution - if c.Contains(selector, ident) { - log.Printf("c.Contains == true, %s, %s.", selector, ident) - return n.(*ast.CallExpr) - } - */ +} +// ContainsCallExpr resolves the call expression name and type, and then determines +// if the call exists with the call list +func (c CallList) ContainsCallExpr(n ast.Node, ctx *Context) *ast.CallExpr { + selector, ident, err := GetCallInfo(n, ctx) + if err != nil { + return nil + } + if !c.Contains(selector, ident) && !c.ContainsPointer(selector, ident) { + return nil + } + + return n.(*ast.CallExpr) } diff --git a/vendor/github.com/securego/gosec/go.mod b/vendor/github.com/securego/gosec/go.mod index ee6c6983412..5a9b826130e 100644 --- a/vendor/github.com/securego/gosec/go.mod +++ b/vendor/github.com/securego/gosec/go.mod @@ -5,18 +5,18 @@ require ( github.com/kr/pretty v0.1.0 // indirect github.com/kr/pty v1.1.8 // indirect github.com/lib/pq v1.2.0 // indirect - github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd + github.com/mozilla/tls-observatory v0.0.0-20200220173314-aae45faa4006 github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d - github.com/onsi/ginkgo v1.11.0 - github.com/onsi/gomega v1.8.1 + github.com/onsi/ginkgo v1.12.0 + github.com/onsi/gomega v1.9.0 github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 // indirect + golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect golang.org/x/net v0.0.0-20190923162816-aa69164e4478 // indirect - golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 // indirect golang.org/x/text v0.3.2 // indirect - golang.org/x/tools v0.0.0-20200102140908-9497f49d5709 + golang.org/x/tools v0.0.0-20200228224639-71482053b885 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/yaml.v2 v2.2.7 + gopkg.in/yaml.v2 v2.2.8 ) go 1.13 diff --git a/vendor/github.com/securego/gosec/go.sum b/vendor/github.com/securego/gosec/go.sum index 3f2a05f8580..d784e974117 100644 --- a/vendor/github.com/securego/gosec/go.sum +++ b/vendor/github.com/securego/gosec/go.sum @@ -21,6 +21,8 @@ github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd h1:Av0AX0PnAlPZ3AY2rQUobGFaZfE4KHVRdKWIEPvsCWY= github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mozilla/tls-observatory v0.0.0-20200220173314-aae45faa4006 h1:MZ4Tk6cAXt694UZYVwB+rNZ5D/e5cXf0G6p4yjKm1v4= +github.com/mozilla/tls-observatory v0.0.0-20200220173314-aae45faa4006/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -28,14 +30,20 @@ github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -52,7 +60,10 @@ golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 h1:ACG4HJsFiNMf47Y4PeRoebLNy/2lXT9EtprMuTFWt1M= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -85,6 +96,7 @@ golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -116,11 +128,17 @@ golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0 h1:7+F62GGWUowoiJOUDivedlB golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191101200257-8dbcdeb83d3f h1:+QO45yvqhfD79HVNFPAgvstYLFye8zA+rd0mHFsGV9s= golang.org/x/tools v0.0.0-20191101200257-8dbcdeb83d3f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191217033636-bbbf87ae2631 h1:6/HU2wqgxuc1kG3FdVH8K60WlieDAlIYaVc21Cit9Us= golang.org/x/tools v0.0.0-20191217033636-bbbf87ae2631/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200102140908-9497f49d5709 h1:AfG1EmoRkFK24HWWLxSrRKNg2G+oA3JVOG8GJsHWypQ= -golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114 h1:DnSr2mCsxyCE6ZgIkmcWUQY2R5cH/6wL7eIxEmQOMSE= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200203023011-6f24f261dadb h1:Mjk7HEiAvEl5eS8doSYHgS8vXw90VXegoY/vbw8uRGE= +golang.org/x/tools v0.0.0-20200203023011-6f24f261dadb/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200228224639-71482053b885 h1:y09Juz/HD0YjGlyEd4bLUWG0s8Yx6iPniPqUGzUxNrU= +golang.org/x/tools v0.0.0-20200228224639-71482053b885/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= @@ -137,3 +155,4 @@ gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/securego/gosec/helpers.go b/vendor/github.com/securego/gosec/helpers.go index d708626afdf..40dc8e9c30e 100644 --- a/vendor/github.com/securego/gosec/helpers.go +++ b/vendor/github.com/securego/gosec/helpers.go @@ -135,11 +135,48 @@ func GetCallInfo(n ast.Node, ctx *Context) (string, string, error) { return "undefined", fn.Sel.Name, fmt.Errorf("missing type info") } return expr.Name, fn.Sel.Name, nil + case *ast.SelectorExpr: + if expr.Sel != nil { + t := ctx.Info.TypeOf(expr.Sel) + if t != nil { + return t.String(), fn.Sel.Name, nil + } + return "undefined", fn.Sel.Name, fmt.Errorf("missing type info") + } + case *ast.CallExpr: + switch call := expr.Fun.(type) { + case *ast.Ident: + if call.Name == "new" { + t := ctx.Info.TypeOf(expr.Args[0]) + if t != nil { + return t.String(), fn.Sel.Name, nil + } + return "undefined", fn.Sel.Name, fmt.Errorf("missing type info") + } + if call.Obj != nil { + switch decl := call.Obj.Decl.(type) { + case *ast.FuncDecl: + ret := decl.Type.Results + if ret != nil && len(ret.List) > 0 { + ret1 := ret.List[0] + if ret1 != nil { + t := ctx.Info.TypeOf(ret1.Type) + if t != nil { + return t.String(), fn.Sel.Name, nil + } + return "undefined", fn.Sel.Name, fmt.Errorf("missing type info") + } + } + } + } + + } } case *ast.Ident: return ctx.Pkg.Name(), fn.Name, nil } } + return "", "", fmt.Errorf("unable to determine call info") } diff --git a/vendor/github.com/securego/gosec/install.sh b/vendor/github.com/securego/gosec/install.sh index 9ee8143e6fb..37bed0a2e35 100644 --- a/vendor/github.com/securego/gosec/install.sh +++ b/vendor/github.com/securego/gosec/install.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -# Code generated by godownloader on 2018-10-05T09:52:28Z. DO NOT EDIT. +# Code generated by godownloader on 2020-03-02T13:35:13Z. DO NOT EDIT. # usage() { @@ -27,11 +27,12 @@ parse_args() { # over-ridden by flag below BINDIR=${BINDIR:-./bin} - while getopts "b:dh?" arg; do + while getopts "b:dh?x" arg; do case "$arg" in b) BINDIR="$OPTARG" ;; d) log_set_priority 10 ;; h | \?) usage "$0" ;; + x) set -x ;; esac done shift $((OPTIND - 1)) @@ -42,40 +43,33 @@ parse_args() { # network, either nothing will happen or will syntax error # out preventing half-done work execute() { - tmpdir=$(mktmpdir) + tmpdir=$(mktemp -d) log_debug "downloading files into ${tmpdir}" http_download "${tmpdir}/${TARBALL}" "${TARBALL_URL}" http_download "${tmpdir}/${CHECKSUM}" "${CHECKSUM_URL}" hash_sha256_verify "${tmpdir}/${TARBALL}" "${tmpdir}/${CHECKSUM}" srcdir="${tmpdir}" (cd "${tmpdir}" && untar "${TARBALL}") - install -d "${BINDIR}" - for binexe in "gosec" ; do + test ! -d "${BINDIR}" && install -d "${BINDIR}" + for binexe in $BINARIES; do if [ "$OS" = "windows" ]; then binexe="${binexe}.exe" fi install "${srcdir}/${binexe}" "${BINDIR}/" log_info "installed ${BINDIR}/${binexe}" done + rm -rf "${tmpdir}" } -is_supported_platform() { - platform=$1 - found=1 - case "$platform" in - darwin/amd64) found=0 ;; - linux/amd64) found=0 ;; - windows/amd64) found=0 ;; +get_binaries() { + case "$PLATFORM" in + darwin/amd64) BINARIES="gosec" ;; + linux/amd64) BINARIES="gosec" ;; + windows/amd64) BINARIES="gosec" ;; + *) + log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new" + exit 1 + ;; esac - return $found -} -check_platform() { - if is_supported_platform "$PLATFORM"; then - # optional logging goes here - true - else - log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new" - exit 1 - fi } tag_to_version() { if [ -z "${TAG}" ]; then @@ -93,7 +87,7 @@ tag_to_version() { VERSION=${TAG#v} } adjust_format() { - # change format (tar.gz or zip) based on ARCH + # change format (tar.gz or zip) based on OS true } adjust_os() { @@ -165,7 +159,9 @@ log_crit() { uname_os() { os=$(uname -s | tr '[:upper:]' '[:lower:]') case "$os" in - msys_nt) os="windows" ;; + cygwin_nt*) os="windows" ;; + mingw*) os="windows" ;; + msys_nt*) os="windows" ;; esac echo "$os" } @@ -225,8 +221,8 @@ uname_arch_check() { untar() { tarball=$1 case "${tarball}" in - *.tar.gz | *.tgz) tar -xzf "${tarball}" ;; - *.tar) tar -xf "${tarball}" ;; + *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" ;; + *.tar) tar --no-same-owner -xf "${tarball}" ;; *.zip) unzip "${tarball}" ;; *) log_err "untar unknown archive format for ${tarball}" @@ -234,11 +230,6 @@ untar() { ;; esac } -mktmpdir() { - test -z "$TMPDIR" && TMPDIR="$(mktemp -d)" - mkdir -p "${TMPDIR}" - echo "${TMPDIR}" -} http_download_curl() { local_file=$1 source_url=$2 @@ -359,7 +350,7 @@ uname_arch_check "$ARCH" parse_args "$@" -check_platform +get_binaries tag_to_version diff --git a/vendor/github.com/securego/gosec/issue.go b/vendor/github.com/securego/gosec/issue.go index 297030c0338..829bbb5d27c 100644 --- a/vendor/github.com/securego/gosec/issue.go +++ b/vendor/github.com/securego/gosec/issue.go @@ -53,6 +53,8 @@ var IssueToCWE = map[string]Cwe{ "G104": GetCwe("703"), "G106": GetCwe("322"), "G107": GetCwe("88"), + "G109": GetCwe("190"), + "G110": GetCwe("409"), "G201": GetCwe("89"), "G202": GetCwe("89"), "G203": GetCwe("79"), diff --git a/vendor/github.com/securego/gosec/rules/archive.go b/vendor/github.com/securego/gosec/rules/archive.go index 55f390c55bc..d9e7ea9a317 100644 --- a/vendor/github.com/securego/gosec/rules/archive.go +++ b/vendor/github.com/securego/gosec/rules/archive.go @@ -19,7 +19,7 @@ func (a *archive) ID() string { // Match inspects AST nodes to determine if the filepath.Joins uses any argument derived from type zip.File func (a *archive) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { - if node := a.calls.ContainsCallExpr(n, c, false); node != nil { + if node := a.calls.ContainsPkgCallExpr(n, c, false); node != nil { for _, arg := range node.Args { var argType types.Type if selector, ok := arg.(*ast.SelectorExpr); ok { diff --git a/vendor/github.com/securego/gosec/rules/bad_defer.go b/vendor/github.com/securego/gosec/rules/bad_defer.go new file mode 100644 index 00000000000..9d8b21105e4 --- /dev/null +++ b/vendor/github.com/securego/gosec/rules/bad_defer.go @@ -0,0 +1,69 @@ +package rules + +import ( + "fmt" + "go/ast" + "strings" + + "github.com/securego/gosec" +) + +type deferType struct { + typ string + methods []string +} + +type badDefer struct { + gosec.MetaData + types []deferType +} + +func (r *badDefer) ID() string { + return r.MetaData.ID +} + +func normalize(typ string) string { + return strings.TrimPrefix(typ, "*") +} + +func contains(methods []string, method string) bool { + for _, m := range methods { + if m == method { + return true + } + } + return false +} + +func (r *badDefer) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { + if deferStmt, ok := n.(*ast.DeferStmt); ok { + for _, deferTyp := range r.types { + if typ, method, err := gosec.GetCallInfo(deferStmt.Call, c); err == nil { + if normalize(typ) == deferTyp.typ && contains(deferTyp.methods, method) { + return gosec.NewIssue(c, n, r.ID(), fmt.Sprintf(r.What, typ, method), r.Severity, r.Confidence), nil + } + } + } + + } + + return nil, nil +} + +// NewDeferredClosing detects unsafe defer of error returning methods +func NewDeferredClosing(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { + return &badDefer{ + types: []deferType{ + { + typ: "os.File", + methods: []string{"Close"}, + }, + }, + MetaData: gosec.MetaData{ + ID: id, + Severity: gosec.Medium, + Confidence: gosec.High, + What: "Deferring unsafe method %q on type %q", + }, + }, []ast.Node{(*ast.DeferStmt)(nil)} +} diff --git a/vendor/github.com/securego/gosec/rules/bind.go b/vendor/github.com/securego/gosec/rules/bind.go index 7273588c7a9..eb2ed05b464 100644 --- a/vendor/github.com/securego/gosec/rules/bind.go +++ b/vendor/github.com/securego/gosec/rules/bind.go @@ -33,7 +33,7 @@ func (r *bindsToAllNetworkInterfaces) ID() string { } func (r *bindsToAllNetworkInterfaces) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { - callExpr := r.calls.ContainsCallExpr(n, c, false) + callExpr := r.calls.ContainsPkgCallExpr(n, c, false) if callExpr == nil { return nil, nil } diff --git a/vendor/github.com/securego/gosec/rules/decompression-bomb.go b/vendor/github.com/securego/gosec/rules/decompression-bomb.go new file mode 100644 index 00000000000..9b9caf57fb2 --- /dev/null +++ b/vendor/github.com/securego/gosec/rules/decompression-bomb.go @@ -0,0 +1,109 @@ +// (c) Copyright 2016 Hewlett Packard Enterprise Development LP +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package rules + +import ( + "fmt" + "go/ast" + + "github.com/securego/gosec" +) + +type decompressionBombCheck struct { + gosec.MetaData + readerCalls gosec.CallList + copyCalls gosec.CallList +} + +func (d *decompressionBombCheck) ID() string { + return d.MetaData.ID +} + +func containsReaderCall(node ast.Node, ctx *gosec.Context, list gosec.CallList) bool { + if list.ContainsPkgCallExpr(node, ctx, false) != nil { + return true + } + // Resolve type info of ident (for *archive/zip.File.Open) + s, idt, _ := gosec.GetCallInfo(node, ctx) + return list.Contains(s, idt) +} + +func (d *decompressionBombCheck) Match(node ast.Node, ctx *gosec.Context) (*gosec.Issue, error) { + var readerVarObj map[*ast.Object]struct{} + + // To check multiple lines, ctx.PassedValues is used to store temporary data. + if _, ok := ctx.PassedValues[d.ID()]; !ok { + readerVarObj = make(map[*ast.Object]struct{}) + ctx.PassedValues[d.ID()] = readerVarObj + } else if pv, ok := ctx.PassedValues[d.ID()].(map[*ast.Object]struct{}); ok { + readerVarObj = pv + } else { + return nil, fmt.Errorf("PassedValues[%s] of Context is not map[*ast.Object]struct{}, but %T", d.ID(), ctx.PassedValues[d.ID()]) + } + + // io.Copy is a common function. + // To reduce false positives, This rule detects code which is used for compressed data only. + switch n := node.(type) { + case *ast.AssignStmt: + for _, expr := range n.Rhs { + if callExpr, ok := expr.(*ast.CallExpr); ok && containsReaderCall(callExpr, ctx, d.readerCalls) { + if idt, ok := n.Lhs[0].(*ast.Ident); ok && idt.Name != "_" { + // Example: + // r, _ := zlib.NewReader(buf) + // Add r's Obj to readerVarObj map + readerVarObj[idt.Obj] = struct{}{} + } + } + } + case *ast.CallExpr: + if d.copyCalls.ContainsPkgCallExpr(n, ctx, false) != nil { + if idt, ok := n.Args[1].(*ast.Ident); ok { + if _, ok := readerVarObj[idt.Obj]; ok { + // Detect io.Copy(x, r) + return gosec.NewIssue(ctx, n, d.ID(), d.What, d.Severity, d.Confidence), nil + } + } + } + } + + return nil, nil +} + +// NewDecompressionBombCheck detects if there is potential DoS vulnerability via decompression bomb +func NewDecompressionBombCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { + readerCalls := gosec.NewCallList() + readerCalls.Add("compress/gzip", "NewReader") + readerCalls.AddAll("compress/zlib", "NewReader", "NewReaderDict") + readerCalls.Add("compress/bzip2", "NewReader") + readerCalls.AddAll("compress/flate", "NewReader", "NewReaderDict") + readerCalls.Add("compress/lzw", "NewReader") + readerCalls.Add("archive/tar", "NewReader") + readerCalls.Add("archive/zip", "NewReader") + readerCalls.Add("*archive/zip.File", "Open") + + copyCalls := gosec.NewCallList() + copyCalls.Add("io", "Copy") + + return &decompressionBombCheck{ + MetaData: gosec.MetaData{ + ID: id, + Severity: gosec.Medium, + Confidence: gosec.Medium, + What: "Potential DoS vulnerability via decompression bomb", + }, + readerCalls: readerCalls, + copyCalls: copyCalls, + }, []ast.Node{(*ast.FuncDecl)(nil), (*ast.AssignStmt)(nil), (*ast.CallExpr)(nil)} +} diff --git a/vendor/github.com/securego/gosec/rules/errors.go b/vendor/github.com/securego/gosec/rules/errors.go index d2e98b530e2..de3163e9e46 100644 --- a/vendor/github.com/securego/gosec/rules/errors.go +++ b/vendor/github.com/securego/gosec/rules/errors.go @@ -55,7 +55,7 @@ func (r *noErrorCheck) Match(n ast.Node, ctx *gosec.Context) (*gosec.Issue, erro cfg := ctx.Config if enabled, err := cfg.IsGlobalEnabled(gosec.Audit); err == nil && enabled { for _, expr := range stmt.Rhs { - if callExpr, ok := expr.(*ast.CallExpr); ok && r.whitelist.ContainsCallExpr(expr, ctx, false) == nil { + if callExpr, ok := expr.(*ast.CallExpr); ok && r.whitelist.ContainsCallExpr(expr, ctx) == nil { pos := returnsError(callExpr, ctx) if pos < 0 || pos >= len(stmt.Lhs) { return nil, nil @@ -67,7 +67,7 @@ func (r *noErrorCheck) Match(n ast.Node, ctx *gosec.Context) (*gosec.Issue, erro } } case *ast.ExprStmt: - if callExpr, ok := stmt.X.(*ast.CallExpr); ok && r.whitelist.ContainsCallExpr(stmt.X, ctx, false) == nil { + if callExpr, ok := stmt.X.(*ast.CallExpr); ok && r.whitelist.ContainsCallExpr(stmt.X, ctx) == nil { pos := returnsError(callExpr, ctx) if pos >= 0 { return gosec.NewIssue(ctx, n, r.ID(), r.What, r.Severity, r.Confidence), nil diff --git a/vendor/github.com/securego/gosec/rules/fileperms.go b/vendor/github.com/securego/gosec/rules/fileperms.go index 2a56f35b2db..b9c0d68ba6f 100644 --- a/vendor/github.com/securego/gosec/rules/fileperms.go +++ b/vendor/github.com/securego/gosec/rules/fileperms.go @@ -60,6 +60,22 @@ func (r *filePermissions) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, err return nil, nil } +// NewWritePerms creates a rule to detect file Writes with bad permissions. +func NewWritePerms(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { + mode := getConfiguredMode(conf, "G306", 0600) + return &filePermissions{ + mode: mode, + pkg: "io/ioutil", + calls: []string{"WriteFile"}, + MetaData: gosec.MetaData{ + ID: id, + Severity: gosec.Medium, + Confidence: gosec.High, + What: fmt.Sprintf("Expect WriteFile permissions to be %#o or less", mode), + }, + }, []ast.Node{(*ast.CallExpr)(nil)} +} + // NewFilePerms creates a rule to detect file creation with a more permissive than configured // permission mask. func NewFilePerms(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { diff --git a/vendor/github.com/securego/gosec/rules/integer_overflow.go b/vendor/github.com/securego/gosec/rules/integer_overflow.go new file mode 100644 index 00000000000..311ff52907a --- /dev/null +++ b/vendor/github.com/securego/gosec/rules/integer_overflow.go @@ -0,0 +1,89 @@ +// (c) Copyright 2016 Hewlett Packard Enterprise Development LP +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package rules + +import ( + "fmt" + "go/ast" + + "github.com/securego/gosec" +) + +type integerOverflowCheck struct { + gosec.MetaData + calls gosec.CallList +} + +func (i *integerOverflowCheck) ID() string { + return i.MetaData.ID +} + +func (i *integerOverflowCheck) Match(node ast.Node, ctx *gosec.Context) (*gosec.Issue, error) { + var atoiVarObj map[*ast.Object]ast.Node + + // To check multiple lines, ctx.PassedValues is used to store temporary data. + if _, ok := ctx.PassedValues[i.ID()]; !ok { + atoiVarObj = make(map[*ast.Object]ast.Node) + ctx.PassedValues[i.ID()] = atoiVarObj + } else if pv, ok := ctx.PassedValues[i.ID()].(map[*ast.Object]ast.Node); ok { + atoiVarObj = pv + } else { + return nil, fmt.Errorf("PassedValues[%s] of Context is not map[*ast.Object]ast.Node, but %T", i.ID(), ctx.PassedValues[i.ID()]) + } + + // strconv.Atoi is a common function. + // To reduce false positives, This rule detects code which is converted to int32/int16 only. + switch n := node.(type) { + case *ast.AssignStmt: + for _, expr := range n.Rhs { + if callExpr, ok := expr.(*ast.CallExpr); ok && i.calls.ContainsPkgCallExpr(callExpr, ctx, false) != nil { + if idt, ok := n.Lhs[0].(*ast.Ident); ok && idt.Name != "_" { + // Example: + // v, _ := strconv.Atoi("1111") + // Add v's Obj to atoiVarObj map + atoiVarObj[idt.Obj] = n + } + } + } + case *ast.CallExpr: + if fun, ok := n.Fun.(*ast.Ident); ok { + if fun.Name == "int32" || fun.Name == "int16" { + if idt, ok := n.Args[0].(*ast.Ident); ok { + if n, ok := atoiVarObj[idt.Obj]; ok { + // Detect int32(v) and int16(v) + return gosec.NewIssue(ctx, n, i.ID(), i.What, i.Severity, i.Confidence), nil + } + } + } + } + } + + return nil, nil +} + +// NewIntegerOverflowCheck detects if there is potential Integer OverFlow +func NewIntegerOverflowCheck(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { + calls := gosec.NewCallList() + calls.Add("strconv", "Atoi") + return &integerOverflowCheck{ + MetaData: gosec.MetaData{ + ID: id, + Severity: gosec.High, + Confidence: gosec.Medium, + What: "Potential Integer overflow made by strconv.Atoi result conversion to int16/32", + }, + calls: calls, + }, []ast.Node{(*ast.FuncDecl)(nil), (*ast.AssignStmt)(nil), (*ast.CallExpr)(nil)} +} diff --git a/vendor/github.com/securego/gosec/rules/readfile.go b/vendor/github.com/securego/gosec/rules/readfile.go index 87158f03f7d..6464360a1c5 100644 --- a/vendor/github.com/securego/gosec/rules/readfile.go +++ b/vendor/github.com/securego/gosec/rules/readfile.go @@ -34,7 +34,7 @@ func (r *readfile) ID() string { // isJoinFunc checks if there is a filepath.Join or other join function func (r *readfile) isJoinFunc(n ast.Node, c *gosec.Context) bool { - if call := r.pathJoin.ContainsCallExpr(n, c, false); call != nil { + if call := r.pathJoin.ContainsPkgCallExpr(n, c, false); call != nil { for _, arg := range call.Args { // edge case: check if one of the args is a BinaryExpr if binExp, ok := arg.(*ast.BinaryExpr); ok { @@ -58,7 +58,7 @@ func (r *readfile) isJoinFunc(n ast.Node, c *gosec.Context) bool { // Match inspects AST nodes to determine if the match the methods `os.Open` or `ioutil.ReadFile` func (r *readfile) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { - if node := r.ContainsCallExpr(n, c, false); node != nil { + if node := r.ContainsPkgCallExpr(n, c, false); node != nil { for _, arg := range node.Args { // handles path joining functions in Arg // eg. os.Open(filepath.Join("/tmp/", file)) diff --git a/vendor/github.com/securego/gosec/rules/rsa.go b/vendor/github.com/securego/gosec/rules/rsa.go index 8f17afee3f2..1ceee37b408 100644 --- a/vendor/github.com/securego/gosec/rules/rsa.go +++ b/vendor/github.com/securego/gosec/rules/rsa.go @@ -32,7 +32,7 @@ func (w *weakKeyStrength) ID() string { } func (w *weakKeyStrength) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { - if callExpr := w.calls.ContainsCallExpr(n, c, false); callExpr != nil { + if callExpr := w.calls.ContainsPkgCallExpr(n, c, false); callExpr != nil { if bits, err := gosec.GetInt(callExpr.Args[1]); err == nil && bits < (int64)(w.bits) { return gosec.NewIssue(c, n, w.ID(), w.What, w.Severity, w.Confidence), nil } diff --git a/vendor/github.com/securego/gosec/rules/rulelist.go b/vendor/github.com/securego/gosec/rules/rulelist.go index 97d262a3778..c45f5175e64 100644 --- a/vendor/github.com/securego/gosec/rules/rulelist.go +++ b/vendor/github.com/securego/gosec/rules/rulelist.go @@ -66,6 +66,8 @@ func Generate(filters ...RuleFilter) RuleList { {"G106", "Audit the use of ssh.InsecureIgnoreHostKey function", NewSSHHostKey}, {"G107", "Url provided to HTTP request as taint input", NewSSRFCheck}, {"G108", "Profiling endpoint is automatically exposed", NewPprofCheck}, + {"G109", "Converting strconv.Atoi result to int32/int16", NewIntegerOverflowCheck}, + {"G110", "Detect io.Copy instead of io.CopyN when decompression", NewDecompressionBombCheck}, // injection {"G201", "SQL query construction using format string", NewSQLStrFormat}, @@ -79,6 +81,8 @@ func Generate(filters ...RuleFilter) RuleList { {"G303", "Creating tempfile using a predictable path", NewBadTempFile}, {"G304", "File path provided as taint input", NewReadFile}, {"G305", "File path traversal when extracting zip archive", NewArchive}, + {"G306", "Poor file permissions used when writing to a file", NewWritePerms}, + {"G307", "Unsafe defer call of a method returning an error", NewDeferredClosing}, // crypto {"G401", "Detect the usage of DES, RC4, MD5 or SHA1", NewUsesWeakCryptography}, diff --git a/vendor/github.com/securego/gosec/rules/sql.go b/vendor/github.com/securego/gosec/rules/sql.go index ccee0a6bd8b..885f1057b6f 100644 --- a/vendor/github.com/securego/gosec/rules/sql.go +++ b/vendor/github.com/securego/gosec/rules/sql.go @@ -137,7 +137,7 @@ func (s *sqlStrFormat) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) argIndex := 0 // TODO(gm) improve confidence if database/sql is being used - if node := s.calls.ContainsCallExpr(n, c, false); node != nil { + if node := s.calls.ContainsPkgCallExpr(n, c, false); node != nil { // if the function is fmt.Fprintf, search for SQL statement in Args[1] instead if sel, ok := node.Fun.(*ast.SelectorExpr); ok { if sel.Sel.Name == "Fprintf" { @@ -177,7 +177,7 @@ func (s *sqlStrFormat) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) if argIndex+1 < len(node.Args) { allSafe := true for _, arg := range node.Args[argIndex+1:] { - if n := s.noIssueQuoted.ContainsCallExpr(arg, c, true); n == nil && !s.constObject(arg, c) { + if n := s.noIssueQuoted.ContainsPkgCallExpr(arg, c, true); n == nil && !s.constObject(arg, c) { allSafe = false break } diff --git a/vendor/github.com/securego/gosec/rules/ssrf.go b/vendor/github.com/securego/gosec/rules/ssrf.go index b1409a5f747..41b53865742 100644 --- a/vendor/github.com/securego/gosec/rules/ssrf.go +++ b/vendor/github.com/securego/gosec/rules/ssrf.go @@ -42,7 +42,7 @@ func (r *ssrf) ResolveVar(n *ast.CallExpr, c *gosec.Context) bool { // Match inspects AST nodes to determine if certain net/http methods are called with variable input func (r *ssrf) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { // Call expression is using http package directly - if node := r.ContainsCallExpr(n, c, false); node != nil { + if node := r.ContainsPkgCallExpr(n, c, false); node != nil { if r.ResolveVar(node, c) { return gosec.NewIssue(c, n, r.ID(), r.What, r.Severity, r.Confidence), nil } diff --git a/vendor/github.com/securego/gosec/rules/subproc.go b/vendor/github.com/securego/gosec/rules/subproc.go index c4528989109..536e99dc458 100644 --- a/vendor/github.com/securego/gosec/rules/subproc.go +++ b/vendor/github.com/securego/gosec/rules/subproc.go @@ -40,8 +40,12 @@ func (r *subprocess) ID() string { // // syscall.Exec("echo", "foobar" + tainted) func (r *subprocess) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { - if node := r.ContainsCallExpr(n, c, false); node != nil { - for _, arg := range node.Args { + if node := r.ContainsPkgCallExpr(n, c, false); node != nil { + args := node.Args + if r.isContext(n, c) { + args = args[1:] + } + for _, arg := range args { if ident, ok := arg.(*ast.Ident); ok { obj := c.Info.ObjectOf(ident) if _, ok := obj.(*types.Var); ok && !gosec.TryResolve(ident, c) { @@ -56,11 +60,26 @@ func (r *subprocess) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { return nil, nil } +// isContext checks whether or not the node is a CommandContext call or not +// Thi is requried in order to skip the first argument from the check. +func (r *subprocess) isContext(n ast.Node, ctx *gosec.Context) bool { + selector, indent, err := gosec.GetCallInfo(n, ctx) + if err != nil { + return false + } + if selector == "exec" && indent == "CommandContext" { + return true + } + return false +} + // NewSubproc detects cases where we are forking out to an external process func NewSubproc(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { rule := &subprocess{gosec.MetaData{ID: id}, gosec.NewCallList()} rule.Add("os/exec", "Command") rule.Add("os/exec", "CommandContext") rule.Add("syscall", "Exec") + rule.Add("syscall", "ForkExec") + rule.Add("syscall", "StartProcess") return rule, []ast.Node{(*ast.CallExpr)(nil)} } diff --git a/vendor/github.com/securego/gosec/rules/tempfiles.go b/vendor/github.com/securego/gosec/rules/tempfiles.go index 095544d395f..4adafd10f54 100644 --- a/vendor/github.com/securego/gosec/rules/tempfiles.go +++ b/vendor/github.com/securego/gosec/rules/tempfiles.go @@ -32,7 +32,7 @@ func (t *badTempFile) ID() string { } func (t *badTempFile) Match(n ast.Node, c *gosec.Context) (gi *gosec.Issue, err error) { - if node := t.calls.ContainsCallExpr(n, c, false); node != nil { + if node := t.calls.ContainsPkgCallExpr(n, c, false); node != nil { if arg, e := gosec.GetString(node.Args[0]); t.args.MatchString(arg) && e == nil { return gosec.NewIssue(c, n, t.ID(), t.What, t.Severity, t.Confidence), nil } diff --git a/vendor/github.com/securego/gosec/rules/templates.go b/vendor/github.com/securego/gosec/rules/templates.go index 0bff687542d..3c663f15de0 100644 --- a/vendor/github.com/securego/gosec/rules/templates.go +++ b/vendor/github.com/securego/gosec/rules/templates.go @@ -30,7 +30,7 @@ func (t *templateCheck) ID() string { } func (t *templateCheck) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error) { - if node := t.calls.ContainsCallExpr(n, c, false); node != nil { + if node := t.calls.ContainsPkgCallExpr(n, c, false); node != nil { for _, arg := range node.Args { if _, ok := arg.(*ast.BasicLit); !ok { // basic lits are safe return gosec.NewIssue(c, n, t.ID(), t.What, t.Severity, t.Confidence), nil diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go index e0364e9e7f6..bf89ecd21f7 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_format.go @@ -32,7 +32,8 @@ func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args return Contains(t, s, contains, append([]interface{}{msg}, args...)...) } -// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. +// DirExistsf checks whether a directory exists in the given path. It also fails +// if the path is a file rather a directory or there is an error checking whether it exists. func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -160,7 +161,8 @@ func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { return False(t, value, append([]interface{}{msg}, args...)...) } -// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. +// FileExistsf checks whether a file exists in the given path. It also fails if +// the path points to a directory or there is an error when trying to check the file. func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -267,7 +269,7 @@ func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, ms // InDeltaf asserts that the two numerals are within delta of each other. // -// assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) +// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -325,14 +327,6 @@ func JSONEqf(t TestingT, expected string, actual string, msg string, args ...int return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) } -// YAMLEqf asserts that two YAML strings are equivalent. -func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...) -} - // Lenf asserts that the specified object has specific length. // Lenf also fails if the object has a type that len() not accept. // @@ -369,6 +363,17 @@ func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args . return LessOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) } +// Neverf asserts that the given condition doesn't satisfy in waitFor time, +// periodically checking the target function each tick. +// +// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return Never(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) +} + // Nilf asserts that the specified object is nil. // // assert.Nilf(t, err, "error message %s", "formatted") @@ -379,6 +384,15 @@ func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool return Nil(t, object, append([]interface{}{msg}, args...)...) } +// NoDirExistsf checks whether a directory does not exist in the given path. +// It fails if the path points to an existing _directory_ only. +func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return NoDirExists(t, path, append([]interface{}{msg}, args...)...) +} + // NoErrorf asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() @@ -392,6 +406,15 @@ func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { return NoError(t, err, append([]interface{}{msg}, args...)...) } +// NoFileExistsf checks whether a file does not exist in a given path. It fails +// if the path points to an existing _file_ only. +func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return NoFileExists(t, path, append([]interface{}{msg}, args...)...) +} + // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // @@ -462,6 +485,19 @@ func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args .. return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...) } +// NotSamef asserts that two pointers do not reference the same object. +// +// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") +// +// Both arguments must be pointer variables. Pointer variable sameness is +// determined based on the equality of both type and value. +func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...) +} + // NotSubsetf asserts that the specified list(array, slice...) contains not all // elements given in the specified subset(array, slice...). // @@ -491,6 +527,18 @@ func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool return Panics(t, f, append([]interface{}{msg}, args...)...) } +// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc +// panics, and that the recovered panic value is an error that satisfies the +// EqualError comparison. +// +// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...) +} + // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // @@ -557,6 +605,14 @@ func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta tim return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } +// YAMLEqf asserts that two YAML strings are equivalent. +func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + return YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...) +} + // Zerof asserts that i is the zero value for its type. func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go index 26830403a9b..75ecdcaa2f3 100644 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ b/vendor/github.com/stretchr/testify/assert/assertion_forward.go @@ -53,7 +53,8 @@ func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, return Containsf(a.t, s, contains, msg, args...) } -// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. +// DirExists checks whether a directory exists in the given path. It also fails +// if the path is a file rather a directory or there is an error checking whether it exists. func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -61,7 +62,8 @@ func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { return DirExists(a.t, path, msgAndArgs...) } -// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. +// DirExistsf checks whether a directory exists in the given path. It also fails +// if the path is a file rather a directory or there is an error checking whether it exists. func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -309,7 +311,8 @@ func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { return Falsef(a.t, value, msg, args...) } -// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. +// FileExists checks whether a file exists in the given path. It also fails if +// the path points to a directory or there is an error when trying to check the file. func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -317,7 +320,8 @@ func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { return FileExists(a.t, path, msgAndArgs...) } -// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. +// FileExistsf checks whether a file exists in the given path. It also fails if +// the path points to a directory or there is an error when trying to check the file. func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -521,7 +525,7 @@ func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{} // InDelta asserts that the two numerals are within delta of each other. // -// a.InDelta(math.Pi, (22 / 7.0), 0.01) +// a.InDelta(math.Pi, 22/7.0, 0.01) func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -563,7 +567,7 @@ func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, del // InDeltaf asserts that the two numerals are within delta of each other. // -// a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01) +// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -639,22 +643,6 @@ func (a *Assertions) JSONEqf(expected string, actual string, msg string, args .. return JSONEqf(a.t, expected, actual, msg, args...) } -// YAMLEq asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return YAMLEq(a.t, expected, actual, msgAndArgs...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return YAMLEqf(a.t, expected, actual, msg, args...) -} - // Len asserts that the specified object has specific length. // Len also fails if the object has a type that len() not accept. // @@ -727,6 +715,28 @@ func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...i return Lessf(a.t, e1, e2, msg, args...) } +// Never asserts that the given condition doesn't satisfy in waitFor time, +// periodically checking the target function each tick. +// +// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) +func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return Never(a.t, condition, waitFor, tick, msgAndArgs...) +} + +// Neverf asserts that the given condition doesn't satisfy in waitFor time, +// periodically checking the target function each tick. +// +// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return Neverf(a.t, condition, waitFor, tick, msg, args...) +} + // Nil asserts that the specified object is nil. // // a.Nil(err) @@ -747,6 +757,24 @@ func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) b return Nilf(a.t, object, msg, args...) } +// NoDirExists checks whether a directory does not exist in the given path. +// It fails if the path points to an existing _directory_ only. +func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NoDirExists(a.t, path, msgAndArgs...) +} + +// NoDirExistsf checks whether a directory does not exist in the given path. +// It fails if the path points to an existing _directory_ only. +func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NoDirExistsf(a.t, path, msg, args...) +} + // NoError asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() @@ -773,6 +801,24 @@ func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { return NoErrorf(a.t, err, msg, args...) } +// NoFileExists checks whether a file does not exist in a given path. It fails +// if the path points to an existing _file_ only. +func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NoFileExists(a.t, path, msgAndArgs...) +} + +// NoFileExistsf checks whether a file does not exist in a given path. It fails +// if the path points to an existing _file_ only. +func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NoFileExistsf(a.t, path, msg, args...) +} + // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // @@ -913,6 +959,32 @@ func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, arg return NotRegexpf(a.t, rx, str, msg, args...) } +// NotSame asserts that two pointers do not reference the same object. +// +// a.NotSame(ptr1, ptr2) +// +// Both arguments must be pointer variables. Pointer variable sameness is +// determined based on the equality of both type and value. +func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NotSame(a.t, expected, actual, msgAndArgs...) +} + +// NotSamef asserts that two pointers do not reference the same object. +// +// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") +// +// Both arguments must be pointer variables. Pointer variable sameness is +// determined based on the equality of both type and value. +func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return NotSamef(a.t, expected, actual, msg, args...) +} + // NotSubset asserts that the specified list(array, slice...) contains not all // elements given in the specified subset(array, slice...). // @@ -961,6 +1033,30 @@ func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { return Panics(a.t, f, msgAndArgs...) } +// PanicsWithError asserts that the code inside the specified PanicTestFunc +// panics, and that the recovered panic value is an error that satisfies the +// EqualError comparison. +// +// a.PanicsWithError("crazy error", func(){ GoCrazy() }) +func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return PanicsWithError(a.t, errString, f, msgAndArgs...) +} + +// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc +// panics, and that the recovered panic value is an error that satisfies the +// EqualError comparison. +// +// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return PanicsWithErrorf(a.t, errString, f, msg, args...) +} + // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // @@ -1103,6 +1199,22 @@ func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta return WithinDurationf(a.t, expected, actual, delta, msg, args...) } +// YAMLEq asserts that two YAML strings are equivalent. +func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return YAMLEq(a.t, expected, actual, msgAndArgs...) +} + +// YAMLEqf asserts that two YAML strings are equivalent. +func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool { + if h, ok := a.t.(tHelper); ok { + h.Helper() + } + return YAMLEqf(a.t, expected, actual, msg, args...) +} + // Zero asserts that i is the zero value for its type. func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go index 044da8b01f2..bdd81389a97 100644 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ b/vendor/github.com/stretchr/testify/assert/assertions.go @@ -11,6 +11,7 @@ import ( "reflect" "regexp" "runtime" + "runtime/debug" "strings" "time" "unicode" @@ -21,7 +22,7 @@ import ( yaml "gopkg.in/yaml.v2" ) -//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_format.go.tmpl +//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl" // TestingT is an interface wrapper around *testing.T type TestingT interface { @@ -351,6 +352,19 @@ func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) } +// validateEqualArgs checks whether provided arguments can be safely used in the +// Equal/NotEqual functions. +func validateEqualArgs(expected, actual interface{}) error { + if expected == nil && actual == nil { + return nil + } + + if isFunction(expected) || isFunction(actual) { + return errors.New("cannot take func type as argument") + } + return nil +} + // Same asserts that two pointers reference the same object. // // assert.Same(t, ptr1, ptr2) @@ -362,18 +376,7 @@ func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) b h.Helper() } - expectedPtr, actualPtr := reflect.ValueOf(expected), reflect.ValueOf(actual) - if expectedPtr.Kind() != reflect.Ptr || actualPtr.Kind() != reflect.Ptr { - return Fail(t, "Invalid operation: both arguments must be pointers", msgAndArgs...) - } - - expectedType, actualType := reflect.TypeOf(expected), reflect.TypeOf(actual) - if expectedType != actualType { - return Fail(t, fmt.Sprintf("Pointer expected to be of type %v, but was %v", - expectedType, actualType), msgAndArgs...) - } - - if expected != actual { + if !samePointers(expected, actual) { return Fail(t, fmt.Sprintf("Not same: \n"+ "expected: %p %#v\n"+ "actual : %p %#v", expected, expected, actual, actual), msgAndArgs...) @@ -382,6 +385,42 @@ func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) b return true } +// NotSame asserts that two pointers do not reference the same object. +// +// assert.NotSame(t, ptr1, ptr2) +// +// Both arguments must be pointer variables. Pointer variable sameness is +// determined based on the equality of both type and value. +func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + + if samePointers(expected, actual) { + return Fail(t, fmt.Sprintf( + "Expected and actual point to the same object: %p %#v", + expected, expected), msgAndArgs...) + } + return true +} + +// samePointers compares two generic interface objects and returns whether +// they point to the same object +func samePointers(first, second interface{}) bool { + firstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second) + if firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr { + return false + } + + firstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second) + if firstType != secondType { + return false + } + + // compare pointer addresses + return first == second +} + // formatUnequalValues takes two values of arbitrary types and returns string // representations appropriate to be presented to the user. // @@ -393,9 +432,11 @@ func formatUnequalValues(expected, actual interface{}) (e string, a string) { return fmt.Sprintf("%T(%#v)", expected, expected), fmt.Sprintf("%T(%#v)", actual, actual) } - - return fmt.Sprintf("%#v", expected), - fmt.Sprintf("%#v", actual) + switch expected.(type) { + case time.Duration: + return fmt.Sprintf("%v", expected), fmt.Sprintf("%v", actual) + } + return fmt.Sprintf("%#v", expected), fmt.Sprintf("%#v", actual) } // EqualValues asserts that two objects are equal or convertable to the same types @@ -901,15 +942,17 @@ func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { type PanicTestFunc func() // didPanic returns true if the function passed to it panics. Otherwise, it returns false. -func didPanic(f PanicTestFunc) (bool, interface{}) { +func didPanic(f PanicTestFunc) (bool, interface{}, string) { didPanic := false var message interface{} + var stack string func() { defer func() { if message = recover(); message != nil { didPanic = true + stack = string(debug.Stack()) } }() @@ -918,7 +961,7 @@ func didPanic(f PanicTestFunc) (bool, interface{}) { }() - return didPanic, message + return didPanic, message, stack } @@ -930,7 +973,7 @@ func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { h.Helper() } - if funcDidPanic, panicValue := didPanic(f); !funcDidPanic { + if funcDidPanic, panicValue, _ := didPanic(f); !funcDidPanic { return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } @@ -946,12 +989,34 @@ func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndAr h.Helper() } - funcDidPanic, panicValue := didPanic(f) + funcDidPanic, panicValue, panickedStack := didPanic(f) if !funcDidPanic { return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } if panicValue != expected { - return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v", f, expected, panicValue), msgAndArgs...) + return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, expected, panicValue, panickedStack), msgAndArgs...) + } + + return true +} + +// PanicsWithError asserts that the code inside the specified PanicTestFunc +// panics, and that the recovered panic value is an error that satisfies the +// EqualError comparison. +// +// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) +func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + + funcDidPanic, panicValue, panickedStack := didPanic(f) + if !funcDidPanic { + return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) + } + panicErr, ok := panicValue.(error) + if !ok || panicErr.Error() != errString { + return Fail(t, fmt.Sprintf("func %#v should panic with error message:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, errString, panicValue, panickedStack), msgAndArgs...) } return true @@ -965,8 +1030,8 @@ func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { h.Helper() } - if funcDidPanic, panicValue := didPanic(f); funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v", f, panicValue), msgAndArgs...) + if funcDidPanic, panicValue, panickedStack := didPanic(f); funcDidPanic { + return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v\n\tPanic stack:\t%s", f, panicValue, panickedStack), msgAndArgs...) } return true @@ -1026,7 +1091,7 @@ func toFloat(x interface{}) (float64, bool) { // InDelta asserts that the two numerals are within delta of each other. // -// assert.InDelta(t, math.Pi, (22 / 7.0), 0.01) +// assert.InDelta(t, math.Pi, 22/7.0, 0.01) func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1314,7 +1379,8 @@ func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { return true } -// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file. +// FileExists checks whether a file exists in the given path. It also fails if +// the path points to a directory or there is an error when trying to check the file. func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1332,7 +1398,24 @@ func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { return true } -// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists. +// NoFileExists checks whether a file does not exist in a given path. It fails +// if the path points to an existing _file_ only. +func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + info, err := os.Lstat(path) + if err != nil { + return true + } + if info.IsDir() { + return true + } + return Fail(t, fmt.Sprintf("file %q exists", path), msgAndArgs...) +} + +// DirExists checks whether a directory exists in the given path. It also fails +// if the path is a file rather a directory or there is an error checking whether it exists. func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -1350,6 +1433,25 @@ func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { return true } +// NoDirExists checks whether a directory does not exist in the given path. +// It fails if the path points to an existing _directory_ only. +func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + info, err := os.Lstat(path) + if err != nil { + if os.IsNotExist(err) { + return true + } + return true + } + if !info.IsDir() { + return true + } + return Fail(t, fmt.Sprintf("directory %q exists", path), msgAndArgs...) +} + // JSONEq asserts that two JSON strings are equivalent. // // assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) @@ -1439,15 +1541,6 @@ func diff(expected interface{}, actual interface{}) string { return "\n\nDiff:\n" + diff } -// validateEqualArgs checks whether provided arguments can be safely used in the -// Equal/NotEqual functions. -func validateEqualArgs(expected, actual interface{}) error { - if isFunction(expected) || isFunction(actual) { - return errors.New("cannot take func type as argument") - } - return nil -} - func isFunction(arg interface{}) bool { if arg == nil { return false @@ -1475,24 +1568,59 @@ func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick t h.Helper() } + ch := make(chan bool, 1) + timer := time.NewTimer(waitFor) - ticker := time.NewTicker(tick) - checkPassed := make(chan bool) defer timer.Stop() + + ticker := time.NewTicker(tick) defer ticker.Stop() - defer close(checkPassed) - for { + + for tick := ticker.C; ; { select { case <-timer.C: return Fail(t, "Condition never satisfied", msgAndArgs...) - case result := <-checkPassed: - if result { + case <-tick: + tick = nil + go func() { ch <- condition() }() + case v := <-ch: + if v { return true } - case <-ticker.C: - go func() { - checkPassed <- condition() - }() + tick = ticker.C + } + } +} + +// Never asserts that the given condition doesn't satisfy in waitFor time, +// periodically checking the target function each tick. +// +// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) +func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { + if h, ok := t.(tHelper); ok { + h.Helper() + } + + ch := make(chan bool, 1) + + timer := time.NewTimer(waitFor) + defer timer.Stop() + + ticker := time.NewTicker(tick) + defer ticker.Stop() + + for tick := ticker.C; ; { + select { + case <-timer.C: + return true + case <-tick: + tick = nil + go func() { ch <- condition() }() + case v := <-ch: + if v { + return Fail(t, "Condition satisfied", msgAndArgs...) + } + tick = ticker.C } } } diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/testify/assert/forward_assertions.go index 9ad56851d97..df189d2348f 100644 --- a/vendor/github.com/stretchr/testify/assert/forward_assertions.go +++ b/vendor/github.com/stretchr/testify/assert/forward_assertions.go @@ -13,4 +13,4 @@ func New(t TestingT) *Assertions { } } -//go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs +//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/stretchr/testify/mock/mock.go b/vendor/github.com/stretchr/testify/mock/mock.go index b5288af5b7c..58e0798da43 100644 --- a/vendor/github.com/stretchr/testify/mock/mock.go +++ b/vendor/github.com/stretchr/testify/mock/mock.go @@ -147,7 +147,7 @@ func (c *Call) After(d time.Duration) *Call { } // Run sets a handler to be called before returning. It can be used when -// mocking a method such as unmarshalers that takes a pointer to a struct and +// mocking a method (such as an unmarshaler) that takes a pointer to a struct and // sets properties in such struct // // Mock.On("Unmarshal", AnythingOfType("*map[string]interface{}").Return().Run(func(args Arguments) { @@ -578,6 +578,23 @@ func AnythingOfType(t string) AnythingOfTypeArgument { return AnythingOfTypeArgument(t) } +// IsTypeArgument is a struct that contains the type of an argument +// for use when type checking. This is an alternative to AnythingOfType. +// Used in Diff and Assert. +type IsTypeArgument struct { + t interface{} +} + +// IsType returns an IsTypeArgument object containing the type to check for. +// You can provide a zero-value of the type to check. This is an +// alternative to AnythingOfType. Used in Diff and Assert. +// +// For example: +// Assert(t, IsType(""), IsType(0)) +func IsType(t interface{}) *IsTypeArgument { + return &IsTypeArgument{t: t} +} + // argumentMatcher performs custom argument matching, returning whether or // not the argument is matched by the expectation fixture function. type argumentMatcher struct { @@ -711,6 +728,12 @@ func (args Arguments) Diff(objects []interface{}) (string, int) { output = fmt.Sprintf("%s\t%d: FAIL: type %s != type %s - %s\n", output, i, expected, reflect.TypeOf(actual).Name(), actualFmt) } + } else if reflect.TypeOf(expected) == reflect.TypeOf((*IsTypeArgument)(nil)) { + t := expected.(*IsTypeArgument).t + if reflect.TypeOf(t) != reflect.TypeOf(actual) { + differences++ + output = fmt.Sprintf("%s\t%d: FAIL: type %s != type %s - %s\n", output, i, reflect.TypeOf(t).Name(), reflect.TypeOf(actual).Name(), actualFmt) + } } else { // normal checking diff --git a/vendor/github.com/tdakkota/asciicheck/.gitignore b/vendor/github.com/tdakkota/asciicheck/.gitignore new file mode 100644 index 00000000000..cf875a71118 --- /dev/null +++ b/vendor/github.com/tdakkota/asciicheck/.gitignore @@ -0,0 +1,33 @@ +# IntelliJ project files +.idea +*.iml +out +gen + +# Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ +.idea/$CACHE_FILE$ +.idea/$PRODUCT_WORKSPACE_FILE$ +.idea/.gitignore +.idea/codeStyles +.idea/deployment.xml +.idea/inspectionProfiles/ +.idea/kotlinc.xml +.idea/misc.xml +.idea/modules.xml +asciicheck.iml +go.sum diff --git a/vendor/github.com/tdakkota/asciicheck/LICENSE b/vendor/github.com/tdakkota/asciicheck/LICENSE new file mode 100644 index 00000000000..48a60cf1c4e --- /dev/null +++ b/vendor/github.com/tdakkota/asciicheck/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 tdakkota + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/tdakkota/asciicheck/README.md b/vendor/github.com/tdakkota/asciicheck/README.md new file mode 100644 index 00000000000..fc62811be41 --- /dev/null +++ b/vendor/github.com/tdakkota/asciicheck/README.md @@ -0,0 +1,44 @@ +# asciicheck [![Go Report Card](https://goreportcard.com/badge/github.com/tdakkota/asciicheck)](https://goreportcard.com/report/github.com/tdakkota/asciicheck) [![codecov](https://codecov.io/gh/tdakkota/asciicheck/branch/master/graph/badge.svg)](https://codecov.io/gh/tdakkota/asciicheck) ![Go](https://github.com/tdakkota/asciicheck/workflows/Go/badge.svg) +Simple linter to check that your code does not contain non-ASCII identifiers + +# Install + +``` +go get -u github.com/tdakkota/asciicheck/cmd/asciicheck +``` + +# Usage +asciicheck uses [`singlechecker`](https://pkg.go.dev/golang.org/x/tools/go/analysis/singlechecker) package to run: + +``` +asciicheck: checks that all code identifiers does not have non-ASCII symbols in the name + +Usage: asciicheck [-flag] [package] + + +Flags: + -V print version and exit + -all + no effect (deprecated) + -c int + display offending line with this many lines of context (default -1) + -cpuprofile string + write CPU profile to this file + -debug string + debug flags, any subset of "fpstv" + -fix + apply all suggested fixes + -flags + print analyzer flags in JSON + -json + emit JSON output + -memprofile string + write memory profile to this file + -source + no effect (deprecated) + -tags string + no effect (deprecated) + -trace string + write trace log to this file + -v no effect (deprecated) +``` diff --git a/vendor/github.com/tdakkota/asciicheck/ascii.go b/vendor/github.com/tdakkota/asciicheck/ascii.go new file mode 100644 index 00000000000..9e70c391dc7 --- /dev/null +++ b/vendor/github.com/tdakkota/asciicheck/ascii.go @@ -0,0 +1,18 @@ +package asciicheck + +import "unicode" + +func isASCII(s string) (rune, bool) { + if len(s) == 1 { + return []rune(s)[0], s[0] <= unicode.MaxASCII + } + + r := []rune(s) + for i := 0; i < len(s); i++ { + if r[i] > unicode.MaxASCII { + return r[i], false + } + } + + return 0, true +} diff --git a/vendor/github.com/tdakkota/asciicheck/asciicheck.go b/vendor/github.com/tdakkota/asciicheck/asciicheck.go new file mode 100644 index 00000000000..69072802223 --- /dev/null +++ b/vendor/github.com/tdakkota/asciicheck/asciicheck.go @@ -0,0 +1,49 @@ +package asciicheck + +import ( + "fmt" + "go/ast" + "golang.org/x/tools/go/analysis" +) + +func NewAnalyzer() *analysis.Analyzer { + return &analysis.Analyzer{ + Name: "asciicheck", + Doc: "checks that all code identifiers does not have non-ASCII symbols in the name", + Run: run, + } +} + +func run(pass *analysis.Pass) (interface{}, error) { + for _, file := range pass.Files { + alreadyViewed := map[*ast.Object]struct{}{} + ast.Inspect( + file, func(node ast.Node) bool { + cb(pass, node, alreadyViewed) + return true + }, + ) + } + + return nil, nil +} + +func cb(pass *analysis.Pass, n ast.Node, m map[*ast.Object]struct{}) { + if v, ok := n.(*ast.Ident); ok { + if _, ok := m[v.Obj]; ok { + return + } else { + m[v.Obj] = struct{}{} + } + + ch, ascii := isASCII(v.Name) + if !ascii { + pass.Report( + analysis.Diagnostic{ + Pos: v.Pos(), + Message: fmt.Sprintf("identifier \"%s\" contain non-ASCII character: %#U", v.Name, ch), + }, + ) + } + } +} diff --git a/vendor/github.com/tdakkota/asciicheck/go.mod b/vendor/github.com/tdakkota/asciicheck/go.mod new file mode 100644 index 00000000000..43aa5d80615 --- /dev/null +++ b/vendor/github.com/tdakkota/asciicheck/go.mod @@ -0,0 +1,5 @@ +module github.com/tdakkota/asciicheck + +go 1.13 + +require golang.org/x/tools v0.0.0-20200414032229-332987a829c3 diff --git a/vendor/github.com/tetafro/godot/.gitignore b/vendor/github.com/tetafro/godot/.gitignore new file mode 100644 index 00000000000..339f1705266 --- /dev/null +++ b/vendor/github.com/tetafro/godot/.gitignore @@ -0,0 +1 @@ +/godot diff --git a/vendor/github.com/tetafro/godot/LICENSE b/vendor/github.com/tetafro/godot/LICENSE new file mode 100644 index 00000000000..120c6d50237 --- /dev/null +++ b/vendor/github.com/tetafro/godot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Denis Krivak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/tetafro/godot/README.md b/vendor/github.com/tetafro/godot/README.md new file mode 100644 index 00000000000..569d4e512ef --- /dev/null +++ b/vendor/github.com/tetafro/godot/README.md @@ -0,0 +1,44 @@ +# godot + +[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/tetafro/godot/master/LICENSE) +[![Github CI](https://img.shields.io/github/workflow/status/tetafro/godot/Test)](https://github.com/tetafro/godot/actions?query=workflow%3ATest) +[![Go Report](https://goreportcard.com/badge/github.com/tetafro/godot)](https://goreportcard.com/report/github.com/tetafro/godot) +[![Codecov](https://codecov.io/gh/tetafro/godot/branch/master/graph/badge.svg)](https://codecov.io/gh/tetafro/godot) + +Linter that checks if all top-level comments contain a period at the +end of the last sentence if needed. + +[CodeReviewComments](https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences) quote: + +> Comments should begin with the name of the thing being described +> and end in a period + +## Install and run + +```sh +go get -u github.com/tetafro/godot/cmd/godot +godot ./myproject +``` + +## Examples + +Code + +```go +package math + +// Sum sums two integers +func Sum(a, b int) int { + return a + b // result +} +``` + +Output + +```sh +Top level comment should end in a period: math/math.go:3:1 +``` + +See more examples in test files: +- [for default mode](testdata/example_default.go) +- [for using --all flag](testdata/example_checkall.go) diff --git a/vendor/github.com/tetafro/godot/go.mod b/vendor/github.com/tetafro/godot/go.mod new file mode 100644 index 00000000000..ae9467ba479 --- /dev/null +++ b/vendor/github.com/tetafro/godot/go.mod @@ -0,0 +1,3 @@ +module github.com/tetafro/godot + +go 1.13 diff --git a/vendor/github.com/tetafro/godot/godot.go b/vendor/github.com/tetafro/godot/godot.go new file mode 100644 index 00000000000..c5381396114 --- /dev/null +++ b/vendor/github.com/tetafro/godot/godot.go @@ -0,0 +1,147 @@ +// Package godot checks if all top-level comments contain a period at the +// end of the last sentence if needed. +package godot + +import ( + "go/ast" + "go/token" + "regexp" + "strings" +) + +const noPeriodMessage = "Top level comment should end in a period" + +// Message contains a message of linting error. +type Message struct { + Pos token.Position + Message string +} + +// Settings contains linter settings. +type Settings struct { + // Check all top-level comments, not only declarations + CheckAll bool +} + +var ( + // List of valid last characters. + lastChars = []string{".", "?", "!"} + + // Special tags in comments like "nolint" or "build". + tags = regexp.MustCompile("^[a-z]+:") + + // Special hashtags in comments like "#nosec". + hashtags = regexp.MustCompile("^#[a-z]+ ") + + // URL at the end of the line. + endURL = regexp.MustCompile(`[a-z]+://[^\s]+$`) +) + +// Run runs this linter on the provided code. +func Run(file *ast.File, fset *token.FileSet, settings Settings) []Message { + msgs := []Message{} + + // Check all top-level comments + if settings.CheckAll { + for _, group := range file.Comments { + if ok, msg := check(fset, group); !ok { + msgs = append(msgs, msg) + } + } + return msgs + } + + // Check only declaration comments + for _, decl := range file.Decls { + switch d := decl.(type) { + case *ast.GenDecl: + if ok, msg := check(fset, d.Doc); !ok { + msgs = append(msgs, msg) + } + case *ast.FuncDecl: + if ok, msg := check(fset, d.Doc); !ok { + msgs = append(msgs, msg) + } + } + } + return msgs +} + +func check(fset *token.FileSet, group *ast.CommentGroup) (ok bool, msg Message) { + if group == nil || len(group.List) == 0 { + return true, Message{} + } + + // Check only top-level comments + if fset.Position(group.Pos()).Column > 1 { + return true, Message{} + } + + // Get last element from comment group - it can be either + // last (or single) line for "//"-comment, or multiline string + // for "/*"-comment + last := group.List[len(group.List)-1] + + line, ok := checkComment(last.Text) + if ok { + return true, Message{} + } + pos := fset.Position(last.Slash) + pos.Line += line + return false, Message{ + Pos: pos, + Message: noPeriodMessage, + } +} + +func checkComment(comment string) (line int, ok bool) { + // Check last line of "//"-comment + if strings.HasPrefix(comment, "//") { + comment = strings.TrimPrefix(comment, "//") + return 0, checkLastChar(comment) + } + + // Skip cgo code blocks + // TODO: Find a better way to detect cgo code. + if strings.Contains(comment, "#include") || strings.Contains(comment, "#define") { + return 0, true + } + + // Check last non-empty line in multiline "/*"-comment block + lines := strings.Split(comment, "\n") + var i int + for i = len(lines) - 1; i >= 0; i-- { + if s := strings.TrimSpace(lines[i]); s == "*/" || s == "" { + continue + } + break + } + comment = strings.TrimPrefix(lines[i], "/*") + comment = strings.TrimSuffix(comment, "*/") + return i, checkLastChar(comment) +} + +func checkLastChar(s string) bool { + // Don't check comments starting with space indentation - they may + // contain code examples, which shouldn't end with period + if strings.HasPrefix(s, " ") || strings.HasPrefix(s, "\t") { + return true + } + s = strings.TrimSpace(s) + if tags.MatchString(s) || + hashtags.MatchString(s) || + endURL.MatchString(s) || + strings.HasPrefix(s, "+build") { + return true + } + // Don't check empty lines + if s == "" { + return true + } + for _, ch := range lastChars { + if string(s[len(s)-1]) == ch { + return true + } + } + return false +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/.goreleaser.yml b/vendor/github.com/tommy-muehle/go-mnd/.goreleaser.yml index 8185cf48e67..0986ff2f067 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/.goreleaser.yml +++ b/vendor/github.com/tommy-muehle/go-mnd/.goreleaser.yml @@ -10,19 +10,21 @@ builds: - amd64 ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`. -archive: - format: tar.gz - format_overrides: +archives: + - + format: tar.gz + format_overrides: - goos: windows format: zip -brew: - name: mnd - github: +brews: + - + name: mnd + github: owner: tommy-muehle name: homebrew-tap - folder: Formula - homepage: https://github.com/tommy-muehle/go-mnd - description: Magic number detector for Go - test: | + folder: Formula + homepage: https://github.com/tommy-muehle/go-mnd + description: Magic number detector for Go + test: | system "#{bin}/mnd --version" diff --git a/vendor/github.com/tommy-muehle/go-mnd/.travis.yml b/vendor/github.com/tommy-muehle/go-mnd/.travis.yml index 1f9e88e2203..fd76a2fc6ad 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/.travis.yml +++ b/vendor/github.com/tommy-muehle/go-mnd/.travis.yml @@ -1,8 +1,12 @@ language: go go: + - 1.13.x - 1.12.x - tip script: - go test -v ./... + +notifications: + email: false diff --git a/vendor/github.com/tommy-muehle/go-mnd/README.md b/vendor/github.com/tommy-muehle/go-mnd/README.md index 3d6f32afa95..a85ed780c73 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/README.md +++ b/vendor/github.com/tommy-muehle/go-mnd/README.md @@ -42,6 +42,10 @@ mnd ./... The ```-checks``` option let's you define a comma separated list of checks. +The ```-ignored-numbers``` option let's you define a comma separated list of numbers to ignore. + +The ```-excludes``` option let's you define a comma separated list of regexp patterns to exclude. + ## Checks By default this detector analyses arguments, assigns, cases, conditions, operations and return statements. @@ -88,9 +92,19 @@ y = 10 * x return 3 ``` -## Notices +## Excludes + +By default the numbers 0 and 1 as well as test files are excluded! + +### Further known excludes + +The function "Date" in the "Time" package. + +``` +t := time.Date(2017, time.September, 26, 12, 13, 14, 0, time.UTC) +``` -By default the number 0 is excluded! +Additional custom excludes can be defined via option flag. ## License diff --git a/vendor/github.com/tommy-muehle/go-mnd/analyzer.go b/vendor/github.com/tommy-muehle/go-mnd/analyzer.go index 4acc42960e4..9930170f281 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/analyzer.go +++ b/vendor/github.com/tommy-muehle/go-mnd/analyzer.go @@ -5,6 +5,7 @@ import ( "go/ast" "github.com/tommy-muehle/go-mnd/checks" + "github.com/tommy-muehle/go-mnd/config" "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" @@ -29,40 +30,59 @@ type Checker interface { func options() flag.FlagSet { options := flag.NewFlagSet("", flag.ExitOnError) - options.String("checks", "", "comma separated list of checks") + options.String("excludes", "", "comma separated list of patterns to exclude from analysis") + options.String("ignored-numbers", "", "comma separated list of numbers excluded from analysis") + options.String( + "checks", + checks.ArgumentCheck+","+ + checks.CaseCheck+","+ + checks.ConditionCheck+","+ + checks.OperationCheck+","+ + checks.ReturnCheck+","+ + checks.AssignCheck, + "comma separated list of checks", + ) return *options } func run(pass *analysis.Pass) (interface{}, error) { - config := WithOptions( - WithCustomChecks(pass.Analyzer.Flags.Lookup("checks").Value.String()), + conf := config.WithOptions( + config.WithCustomChecks(pass.Analyzer.Flags.Lookup("checks").Value.String()), + config.WithExcludes(pass.Analyzer.Flags.Lookup("excludes").Value.String()), + config.WithIgnoredNumbers(pass.Analyzer.Flags.Lookup("ignored-numbers").Value.String()), ) var checker []Checker - if config.IsCheckEnabled(checks.ArgumentCheck) { - checker = append(checker, checks.NewArgumentAnalyzer(pass)) + if conf.IsCheckEnabled(checks.ArgumentCheck) { + checker = append(checker, checks.NewArgumentAnalyzer(pass, conf)) } - if config.IsCheckEnabled(checks.CaseCheck) { - checker = append(checker, checks.NewCaseAnalyzer(pass)) + if conf.IsCheckEnabled(checks.CaseCheck) { + checker = append(checker, checks.NewCaseAnalyzer(pass, conf)) } - if config.IsCheckEnabled(checks.ConditionCheck) { - checker = append(checker, checks.NewConditionAnalyzer(pass)) + if conf.IsCheckEnabled(checks.ConditionCheck) { + checker = append(checker, checks.NewConditionAnalyzer(pass, conf)) } - if config.IsCheckEnabled(checks.OperationCheck) { - checker = append(checker, checks.NewOperationAnalyzer(pass)) + if conf.IsCheckEnabled(checks.OperationCheck) { + checker = append(checker, checks.NewOperationAnalyzer(pass, conf)) } - if config.IsCheckEnabled(checks.ReturnCheck) { - checker = append(checker, checks.NewReturnAnalyzer(pass)) + if conf.IsCheckEnabled(checks.ReturnCheck) { + checker = append(checker, checks.NewReturnAnalyzer(pass, conf)) } - if config.IsCheckEnabled(checks.AssignCheck) { - checker = append(checker, checks.NewAssignAnalyzer(pass)) + if conf.IsCheckEnabled(checks.AssignCheck) { + checker = append(checker, checks.NewAssignAnalyzer(pass, conf)) } i := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) for _, c := range checker { i.Preorder(c.NodeFilter(), func(node ast.Node) { + for _, exclude := range conf.Excludes { + if exclude.MatchString(pass.Fset.Position(node.Pos()).Filename) { + return + } + } + c.Check(node) }) } diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/argument.go b/vendor/github.com/tommy-muehle/go-mnd/checks/argument.go index 8ee2d243dd7..34cc1d09f54 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/argument.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/argument.go @@ -2,8 +2,11 @@ package checks import ( "go/ast" + "go/token" "golang.org/x/tools/go/analysis" + + config "github.com/tommy-muehle/go-mnd/config" ) const ArgumentCheck = "argument" @@ -15,12 +18,14 @@ var argumentExcludes = map[string]string{ } type ArgumentAnalyzer struct { - pass *analysis.Pass + config *config.Config + pass *analysis.Pass } -func NewArgumentAnalyzer(pass *analysis.Pass) *ArgumentAnalyzer { +func NewArgumentAnalyzer(pass *analysis.Pass, config *config.Config) *ArgumentAnalyzer { return &ArgumentAnalyzer{ - pass: pass, + pass: pass, + config: config, } } @@ -44,7 +49,7 @@ func (a *ArgumentAnalyzer) Check(n ast.Node) { for i, arg := range expr.Args { switch x := arg.(type) { case *ast.BasicLit: - if !isMagicNumber(x) { + if !a.isMagicNumber(x) { continue } // If it's a magic number and has no previous element, report it @@ -55,7 +60,7 @@ func (a *ArgumentAnalyzer) Check(n ast.Node) { switch expr.Args[i-1].(type) { case *ast.ChanType: // When it's not a simple buffered channel, report it - if x.Value != "1" { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, ArgumentCheck) } } @@ -84,15 +89,19 @@ func (a *ArgumentAnalyzer) isExcluded(expr *ast.SelectorExpr) bool { func (a *ArgumentAnalyzer) checkBinaryExpr(expr *ast.BinaryExpr) { switch x := expr.X.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, ArgumentCheck) } } switch y := expr.Y.(type) { case *ast.BasicLit: - if isMagicNumber(y) { + if a.isMagicNumber(y) { a.pass.Reportf(y.Pos(), reportMsg, y.Value, ArgumentCheck) } } } + +func (a *ArgumentAnalyzer) isMagicNumber(l *ast.BasicLit) bool { + return (l.Kind == token.FLOAT || l.Kind == token.INT) && !a.config.IsIgnoredNumber(l.Value) +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/assign.go b/vendor/github.com/tommy-muehle/go-mnd/checks/assign.go index 9f21d499d10..8699ce17fb3 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/assign.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/assign.go @@ -2,19 +2,24 @@ package checks import ( "go/ast" + "go/token" "golang.org/x/tools/go/analysis" + + config "github.com/tommy-muehle/go-mnd/config" ) const AssignCheck = "assign" type AssignAnalyzer struct { - pass *analysis.Pass + pass *analysis.Pass + config *config.Config } -func NewAssignAnalyzer(pass *analysis.Pass) *AssignAnalyzer { +func NewAssignAnalyzer(pass *analysis.Pass, config *config.Config) *AssignAnalyzer { return &AssignAnalyzer{ - pass: pass, + pass: pass, + config: config, } } @@ -32,7 +37,7 @@ func (a *AssignAnalyzer) Check(n ast.Node) { switch x := expr.Value.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, AssignCheck) } case *ast.BinaryExpr: @@ -43,15 +48,19 @@ func (a *AssignAnalyzer) Check(n ast.Node) { func (a *AssignAnalyzer) checkBinaryExpr(expr *ast.BinaryExpr) { switch x := expr.X.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, AssignCheck) } } switch y := expr.Y.(type) { case *ast.BasicLit: - if isMagicNumber(y) { + if a.isMagicNumber(y) { a.pass.Reportf(y.Pos(), reportMsg, y.Value, AssignCheck) } } } + +func (a *AssignAnalyzer) isMagicNumber(l *ast.BasicLit) bool { + return (l.Kind == token.FLOAT || l.Kind == token.INT) && !a.config.IsIgnoredNumber(l.Value) +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/case.go b/vendor/github.com/tommy-muehle/go-mnd/checks/case.go index ac6041ebefc..d7993ede0be 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/case.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/case.go @@ -2,19 +2,24 @@ package checks import ( "go/ast" + "go/token" "golang.org/x/tools/go/analysis" + + config "github.com/tommy-muehle/go-mnd/config" ) const CaseCheck = "case" type CaseAnalyzer struct { - pass *analysis.Pass + pass *analysis.Pass + config *config.Config } -func NewCaseAnalyzer(pass *analysis.Pass) *CaseAnalyzer { +func NewCaseAnalyzer(pass *analysis.Pass, config *config.Config) *CaseAnalyzer { return &CaseAnalyzer{ - pass: pass, + pass: pass, + config: config, } } @@ -33,7 +38,7 @@ func (a *CaseAnalyzer) Check(n ast.Node) { for _, c := range caseClause.List { switch x := c.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, CaseCheck) } case *ast.BinaryExpr: @@ -45,15 +50,19 @@ func (a *CaseAnalyzer) Check(n ast.Node) { func (a *CaseAnalyzer) checkBinaryExpr(expr *ast.BinaryExpr) { switch x := expr.X.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, CaseCheck) } } switch y := expr.Y.(type) { case *ast.BasicLit: - if isMagicNumber(y) { + if a.isMagicNumber(y) { a.pass.Reportf(y.Pos(), reportMsg, y.Value, CaseCheck) } } } + +func (a *CaseAnalyzer) isMagicNumber(l *ast.BasicLit) bool { + return (l.Kind == token.FLOAT || l.Kind == token.INT) && !a.config.IsIgnoredNumber(l.Value) +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/checks.go b/vendor/github.com/tommy-muehle/go-mnd/checks/checks.go index 0ee00e3c0b2..deff0c7bf0d 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/checks.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/checks.go @@ -1,12 +1,3 @@ package checks -import ( - "go/ast" - "go/token" -) - const reportMsg = "Magic number: %v, in <%s> detected" - -func isMagicNumber(l *ast.BasicLit) bool { - return (l.Kind == token.FLOAT || l.Kind == token.INT) && l.Value != "0" -} diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/condition.go b/vendor/github.com/tommy-muehle/go-mnd/checks/condition.go index c98035a50e7..b61bc0de9d9 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/condition.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/condition.go @@ -2,19 +2,24 @@ package checks import ( "go/ast" + "go/token" "golang.org/x/tools/go/analysis" + + config "github.com/tommy-muehle/go-mnd/config" ) const ConditionCheck = "condition" type ConditionAnalyzer struct { - pass *analysis.Pass + pass *analysis.Pass + config *config.Config } -func NewConditionAnalyzer(pass *analysis.Pass) *ConditionAnalyzer { +func NewConditionAnalyzer(pass *analysis.Pass, config *config.Config) *ConditionAnalyzer { return &ConditionAnalyzer{ - pass: pass, + pass: pass, + config: config, } } @@ -32,15 +37,19 @@ func (a *ConditionAnalyzer) Check(n ast.Node) { switch x := expr.X.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, ConditionCheck) } } switch y := expr.Y.(type) { case *ast.BasicLit: - if isMagicNumber(y) { + if a.isMagicNumber(y) { a.pass.Reportf(y.Pos(), reportMsg, y.Value, ConditionCheck) } } } + +func (a *ConditionAnalyzer) isMagicNumber(l *ast.BasicLit) bool { + return (l.Kind == token.FLOAT || l.Kind == token.INT) && !a.config.IsIgnoredNumber(l.Value) +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/operation.go b/vendor/github.com/tommy-muehle/go-mnd/checks/operation.go index 5317f996799..f1f8cf4459c 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/operation.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/operation.go @@ -2,19 +2,24 @@ package checks import ( "go/ast" + "go/token" "golang.org/x/tools/go/analysis" + + config "github.com/tommy-muehle/go-mnd/config" ) const OperationCheck = "operation" type OperationAnalyzer struct { - pass *analysis.Pass + pass *analysis.Pass + config *config.Config } -func NewOperationAnalyzer(pass *analysis.Pass) *OperationAnalyzer { +func NewOperationAnalyzer(pass *analysis.Pass, config *config.Config) *OperationAnalyzer { return &OperationAnalyzer{ - pass: pass, + pass: pass, + config: config, } } @@ -50,15 +55,19 @@ func (a *OperationAnalyzer) Check(n ast.Node) { func (a *OperationAnalyzer) checkBinaryExpr(expr *ast.BinaryExpr) { switch x := expr.X.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, OperationCheck) } } switch y := expr.Y.(type) { case *ast.BasicLit: - if isMagicNumber(y) { + if a.isMagicNumber(y) { a.pass.Reportf(y.Pos(), reportMsg, y.Value, OperationCheck) } } } + +func (a *OperationAnalyzer) isMagicNumber(l *ast.BasicLit) bool { + return (l.Kind == token.FLOAT || l.Kind == token.INT) && !a.config.IsIgnoredNumber(l.Value) +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/checks/return.go b/vendor/github.com/tommy-muehle/go-mnd/checks/return.go index c30ee0d6274..be7f54697f8 100644 --- a/vendor/github.com/tommy-muehle/go-mnd/checks/return.go +++ b/vendor/github.com/tommy-muehle/go-mnd/checks/return.go @@ -2,19 +2,24 @@ package checks import ( "go/ast" + "go/token" "golang.org/x/tools/go/analysis" + + config "github.com/tommy-muehle/go-mnd/config" ) const ReturnCheck = "return" type ReturnAnalyzer struct { - pass *analysis.Pass + pass *analysis.Pass + config *config.Config } -func NewReturnAnalyzer(pass *analysis.Pass) *ReturnAnalyzer { +func NewReturnAnalyzer(pass *analysis.Pass, config *config.Config) *ReturnAnalyzer { return &ReturnAnalyzer{ - pass: pass, + pass: pass, + config: config, } } @@ -33,9 +38,13 @@ func (a *ReturnAnalyzer) Check(n ast.Node) { for _, expr := range stmt.Results { switch x := expr.(type) { case *ast.BasicLit: - if isMagicNumber(x) { + if a.isMagicNumber(x) { a.pass.Reportf(x.Pos(), reportMsg, x.Value, ReturnCheck) } } } } + +func (a *ReturnAnalyzer) isMagicNumber(l *ast.BasicLit) bool { + return (l.Kind == token.FLOAT || l.Kind == token.INT) && !a.config.IsIgnoredNumber(l.Value) +} diff --git a/vendor/github.com/tommy-muehle/go-mnd/config.go b/vendor/github.com/tommy-muehle/go-mnd/config.go deleted file mode 100644 index a2d86d1e402..00000000000 --- a/vendor/github.com/tommy-muehle/go-mnd/config.go +++ /dev/null @@ -1,58 +0,0 @@ -package magic_numbers - -import ( - "strings" - - "github.com/tommy-muehle/go-mnd/checks" -) - -var knownChecks = map[string]bool{ - checks.ArgumentCheck: true, - checks.CaseCheck: true, - checks.ConditionCheck: true, - checks.OperationCheck: true, - checks.ReturnCheck: true, - checks.AssignCheck: true, -} - -type Config struct { - Checks map[string]bool -} - -type Option func(config *Config) - -func DefaultConfig() *Config { - return &Config{ - Checks: knownChecks, - } -} - -func WithOptions(options ...Option) *Config { - c := DefaultConfig() - for _, option := range options { - option(c) - } - return c -} - -func WithCustomChecks(checks string) Option { - return func(config *Config) { - config.Checks = knownChecks - - if checks == "" { - return - } - - for name, _ := range knownChecks { - config.Checks[name] = false - } - - for _, name := range strings.Split(checks, ",") { - config.Checks[name] = true - } - } -} - -func (c *Config) IsCheckEnabled(name string) bool { - return c.Checks[name] -} diff --git a/vendor/github.com/tommy-muehle/go-mnd/config/config.go b/vendor/github.com/tommy-muehle/go-mnd/config/config.go new file mode 100644 index 00000000000..35c82eaf274 --- /dev/null +++ b/vendor/github.com/tommy-muehle/go-mnd/config/config.go @@ -0,0 +1,84 @@ +package config + +import ( + "regexp" + "strings" +) + +type Config struct { + Checks map[string]bool + IgnoredNumbers map[string]struct{} + Excludes []*regexp.Regexp +} + +type Option func(config *Config) + +func DefaultConfig() *Config { + return &Config{ + Checks: map[string]bool{}, + IgnoredNumbers: map[string]struct{}{ + "0": {}, + "1": {}, + }, + Excludes: []*regexp.Regexp{ + regexp.MustCompile(`_test.go`), + }, + } +} + +func WithOptions(options ...Option) *Config { + c := DefaultConfig() + for _, option := range options { + option(c) + } + return c +} + +func WithExcludes(excludes string) Option { + return func(config *Config) { + if excludes == "" { + return + } + + for _, exclude := range strings.Split(excludes, ",") { + config.Excludes = append(config.Excludes, regexp.MustCompile(exclude)) + } + } +} + +func WithIgnoredNumbers(numbers string) Option { + return func(config *Config) { + if numbers == "" { + return + } + + for _, number := range strings.Split(numbers, ",") { + config.IgnoredNumbers[number] = struct{}{} + } + } +} + +func WithCustomChecks(checks string) Option { + return func(config *Config) { + if checks == "" { + return + } + + for name, _ := range config.Checks { + config.Checks[name] = false + } + + for _, name := range strings.Split(checks, ",") { + config.Checks[name] = true + } + } +} + +func (c *Config) IsCheckEnabled(name string) bool { + return c.Checks[name] +} + +func (c *Config) IsIgnoredNumber(number string) bool { + _, ok := c.IgnoredNumbers[number] + return ok +} diff --git a/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go b/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go new file mode 100644 index 00000000000..2681af35af1 --- /dev/null +++ b/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go @@ -0,0 +1,78 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package lazyregexp is a thin wrapper over regexp, allowing the use of global +// regexp variables without forcing them to be compiled at init. +package lazyregexp + +import ( + "os" + "regexp" + "strings" + "sync" +) + +// Regexp is a wrapper around regexp.Regexp, where the underlying regexp will be +// compiled the first time it is needed. +type Regexp struct { + str string + once sync.Once + rx *regexp.Regexp +} + +func (r *Regexp) re() *regexp.Regexp { + r.once.Do(r.build) + return r.rx +} + +func (r *Regexp) build() { + r.rx = regexp.MustCompile(r.str) + r.str = "" +} + +func (r *Regexp) FindSubmatch(s []byte) [][]byte { + return r.re().FindSubmatch(s) +} + +func (r *Regexp) FindStringSubmatch(s string) []string { + return r.re().FindStringSubmatch(s) +} + +func (r *Regexp) FindStringSubmatchIndex(s string) []int { + return r.re().FindStringSubmatchIndex(s) +} + +func (r *Regexp) ReplaceAllString(src, repl string) string { + return r.re().ReplaceAllString(src, repl) +} + +func (r *Regexp) FindString(s string) string { + return r.re().FindString(s) +} + +func (r *Regexp) FindAllString(s string, n int) []string { + return r.re().FindAllString(s, n) +} + +func (r *Regexp) MatchString(s string) bool { + return r.re().MatchString(s) +} + +func (r *Regexp) SubexpNames() []string { + return r.re().SubexpNames() +} + +var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test") + +// New creates a new lazy regexp, delaying the compiling work until it is first +// needed. If the code is being run as part of tests, the regexp compiling will +// happen immediately. +func New(str string) *Regexp { + lr := &Regexp{str: str} + if inTest { + // In tests, always compile the regexps early. + lr.re() + } + return lr +} diff --git a/vendor/golang.org/x/mod/modfile/print.go b/vendor/golang.org/x/mod/modfile/print.go new file mode 100644 index 00000000000..3bbea38529f --- /dev/null +++ b/vendor/golang.org/x/mod/modfile/print.go @@ -0,0 +1,165 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Module file printer. + +package modfile + +import ( + "bytes" + "fmt" + "strings" +) + +// Format returns a go.mod file as a byte slice, formatted in standard style. +func Format(f *FileSyntax) []byte { + pr := &printer{} + pr.file(f) + return pr.Bytes() +} + +// A printer collects the state during printing of a file or expression. +type printer struct { + bytes.Buffer // output buffer + comment []Comment // pending end-of-line comments + margin int // left margin (indent), a number of tabs +} + +// printf prints to the buffer. +func (p *printer) printf(format string, args ...interface{}) { + fmt.Fprintf(p, format, args...) +} + +// indent returns the position on the current line, in bytes, 0-indexed. +func (p *printer) indent() int { + b := p.Bytes() + n := 0 + for n < len(b) && b[len(b)-1-n] != '\n' { + n++ + } + return n +} + +// newline ends the current line, flushing end-of-line comments. +func (p *printer) newline() { + if len(p.comment) > 0 { + p.printf(" ") + for i, com := range p.comment { + if i > 0 { + p.trim() + p.printf("\n") + for i := 0; i < p.margin; i++ { + p.printf("\t") + } + } + p.printf("%s", strings.TrimSpace(com.Token)) + } + p.comment = p.comment[:0] + } + + p.trim() + p.printf("\n") + for i := 0; i < p.margin; i++ { + p.printf("\t") + } +} + +// trim removes trailing spaces and tabs from the current line. +func (p *printer) trim() { + // Remove trailing spaces and tabs from line we're about to end. + b := p.Bytes() + n := len(b) + for n > 0 && (b[n-1] == '\t' || b[n-1] == ' ') { + n-- + } + p.Truncate(n) +} + +// file formats the given file into the print buffer. +func (p *printer) file(f *FileSyntax) { + for _, com := range f.Before { + p.printf("%s", strings.TrimSpace(com.Token)) + p.newline() + } + + for i, stmt := range f.Stmt { + switch x := stmt.(type) { + case *CommentBlock: + // comments already handled + p.expr(x) + + default: + p.expr(x) + p.newline() + } + + for _, com := range stmt.Comment().After { + p.printf("%s", strings.TrimSpace(com.Token)) + p.newline() + } + + if i+1 < len(f.Stmt) { + p.newline() + } + } +} + +func (p *printer) expr(x Expr) { + // Emit line-comments preceding this expression. + if before := x.Comment().Before; len(before) > 0 { + // Want to print a line comment. + // Line comments must be at the current margin. + p.trim() + if p.indent() > 0 { + // There's other text on the line. Start a new line. + p.printf("\n") + } + // Re-indent to margin. + for i := 0; i < p.margin; i++ { + p.printf("\t") + } + for _, com := range before { + p.printf("%s", strings.TrimSpace(com.Token)) + p.newline() + } + } + + switch x := x.(type) { + default: + panic(fmt.Errorf("printer: unexpected type %T", x)) + + case *CommentBlock: + // done + + case *LParen: + p.printf("(") + case *RParen: + p.printf(")") + + case *Line: + sep := "" + for _, tok := range x.Token { + p.printf("%s%s", sep, tok) + sep = " " + } + + case *LineBlock: + for _, tok := range x.Token { + p.printf("%s ", tok) + } + p.expr(&x.LParen) + p.margin++ + for _, l := range x.Line { + p.newline() + p.expr(l) + } + p.margin-- + p.newline() + p.expr(&x.RParen) + } + + // Queue end-of-line comments for printing when we + // reach the end of the line. + p.comment = append(p.comment, x.Comment().Suffix...) +} diff --git a/vendor/golang.org/x/mod/modfile/read.go b/vendor/golang.org/x/mod/modfile/read.go new file mode 100644 index 00000000000..616d00efdb1 --- /dev/null +++ b/vendor/golang.org/x/mod/modfile/read.go @@ -0,0 +1,909 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Module file parser. +// This is a simplified copy of Google's buildifier parser. + +package modfile + +import ( + "bytes" + "fmt" + "os" + "strconv" + "strings" + "unicode" + "unicode/utf8" +) + +// A Position describes an arbitrary source position in a file, including the +// file, line, column, and byte offset. +type Position struct { + Line int // line in input (starting at 1) + LineRune int // rune in line (starting at 1) + Byte int // byte in input (starting at 0) +} + +// add returns the position at the end of s, assuming it starts at p. +func (p Position) add(s string) Position { + p.Byte += len(s) + if n := strings.Count(s, "\n"); n > 0 { + p.Line += n + s = s[strings.LastIndex(s, "\n")+1:] + p.LineRune = 1 + } + p.LineRune += utf8.RuneCountInString(s) + return p +} + +// An Expr represents an input element. +type Expr interface { + // Span returns the start and end position of the expression, + // excluding leading or trailing comments. + Span() (start, end Position) + + // Comment returns the comments attached to the expression. + // This method would normally be named 'Comments' but that + // would interfere with embedding a type of the same name. + Comment() *Comments +} + +// A Comment represents a single // comment. +type Comment struct { + Start Position + Token string // without trailing newline + Suffix bool // an end of line (not whole line) comment +} + +// Comments collects the comments associated with an expression. +type Comments struct { + Before []Comment // whole-line comments before this expression + Suffix []Comment // end-of-line comments after this expression + + // For top-level expressions only, After lists whole-line + // comments following the expression. + After []Comment +} + +// Comment returns the receiver. This isn't useful by itself, but +// a Comments struct is embedded into all the expression +// implementation types, and this gives each of those a Comment +// method to satisfy the Expr interface. +func (c *Comments) Comment() *Comments { + return c +} + +// A FileSyntax represents an entire go.mod file. +type FileSyntax struct { + Name string // file path + Comments + Stmt []Expr +} + +func (x *FileSyntax) Span() (start, end Position) { + if len(x.Stmt) == 0 { + return + } + start, _ = x.Stmt[0].Span() + _, end = x.Stmt[len(x.Stmt)-1].Span() + return start, end +} + +// addLine adds a line containing the given tokens to the file. +// +// If the first token of the hint matches the first token of the +// line, the new line is added at the end of the block containing hint, +// extracting hint into a new block if it is not yet in one. +// +// If the hint is non-nil buts its first token does not match, +// the new line is added after the block containing hint +// (or hint itself, if not in a block). +// +// If no hint is provided, addLine appends the line to the end of +// the last block with a matching first token, +// or to the end of the file if no such block exists. +func (x *FileSyntax) addLine(hint Expr, tokens ...string) *Line { + if hint == nil { + // If no hint given, add to the last statement of the given type. + Loop: + for i := len(x.Stmt) - 1; i >= 0; i-- { + stmt := x.Stmt[i] + switch stmt := stmt.(type) { + case *Line: + if stmt.Token != nil && stmt.Token[0] == tokens[0] { + hint = stmt + break Loop + } + case *LineBlock: + if stmt.Token[0] == tokens[0] { + hint = stmt + break Loop + } + } + } + } + + newLineAfter := func(i int) *Line { + new := &Line{Token: tokens} + if i == len(x.Stmt) { + x.Stmt = append(x.Stmt, new) + } else { + x.Stmt = append(x.Stmt, nil) + copy(x.Stmt[i+2:], x.Stmt[i+1:]) + x.Stmt[i+1] = new + } + return new + } + + if hint != nil { + for i, stmt := range x.Stmt { + switch stmt := stmt.(type) { + case *Line: + if stmt == hint { + if stmt.Token == nil || stmt.Token[0] != tokens[0] { + return newLineAfter(i) + } + + // Convert line to line block. + stmt.InBlock = true + block := &LineBlock{Token: stmt.Token[:1], Line: []*Line{stmt}} + stmt.Token = stmt.Token[1:] + x.Stmt[i] = block + new := &Line{Token: tokens[1:], InBlock: true} + block.Line = append(block.Line, new) + return new + } + + case *LineBlock: + if stmt == hint { + if stmt.Token[0] != tokens[0] { + return newLineAfter(i) + } + + new := &Line{Token: tokens[1:], InBlock: true} + stmt.Line = append(stmt.Line, new) + return new + } + + for j, line := range stmt.Line { + if line == hint { + if stmt.Token[0] != tokens[0] { + return newLineAfter(i) + } + + // Add new line after hint within the block. + stmt.Line = append(stmt.Line, nil) + copy(stmt.Line[j+2:], stmt.Line[j+1:]) + new := &Line{Token: tokens[1:], InBlock: true} + stmt.Line[j+1] = new + return new + } + } + } + } + } + + new := &Line{Token: tokens} + x.Stmt = append(x.Stmt, new) + return new +} + +func (x *FileSyntax) updateLine(line *Line, tokens ...string) { + if line.InBlock { + tokens = tokens[1:] + } + line.Token = tokens +} + +func (x *FileSyntax) removeLine(line *Line) { + line.Token = nil +} + +// Cleanup cleans up the file syntax x after any edit operations. +// To avoid quadratic behavior, removeLine marks the line as dead +// by setting line.Token = nil but does not remove it from the slice +// in which it appears. After edits have all been indicated, +// calling Cleanup cleans out the dead lines. +func (x *FileSyntax) Cleanup() { + w := 0 + for _, stmt := range x.Stmt { + switch stmt := stmt.(type) { + case *Line: + if stmt.Token == nil { + continue + } + case *LineBlock: + ww := 0 + for _, line := range stmt.Line { + if line.Token != nil { + stmt.Line[ww] = line + ww++ + } + } + if ww == 0 { + continue + } + if ww == 1 { + // Collapse block into single line. + line := &Line{ + Comments: Comments{ + Before: commentsAdd(stmt.Before, stmt.Line[0].Before), + Suffix: commentsAdd(stmt.Line[0].Suffix, stmt.Suffix), + After: commentsAdd(stmt.Line[0].After, stmt.After), + }, + Token: stringsAdd(stmt.Token, stmt.Line[0].Token), + } + x.Stmt[w] = line + w++ + continue + } + stmt.Line = stmt.Line[:ww] + } + x.Stmt[w] = stmt + w++ + } + x.Stmt = x.Stmt[:w] +} + +func commentsAdd(x, y []Comment) []Comment { + return append(x[:len(x):len(x)], y...) +} + +func stringsAdd(x, y []string) []string { + return append(x[:len(x):len(x)], y...) +} + +// A CommentBlock represents a top-level block of comments separate +// from any rule. +type CommentBlock struct { + Comments + Start Position +} + +func (x *CommentBlock) Span() (start, end Position) { + return x.Start, x.Start +} + +// A Line is a single line of tokens. +type Line struct { + Comments + Start Position + Token []string + InBlock bool + End Position +} + +func (x *Line) Span() (start, end Position) { + return x.Start, x.End +} + +// A LineBlock is a factored block of lines, like +// +// require ( +// "x" +// "y" +// ) +// +type LineBlock struct { + Comments + Start Position + LParen LParen + Token []string + Line []*Line + RParen RParen +} + +func (x *LineBlock) Span() (start, end Position) { + return x.Start, x.RParen.Pos.add(")") +} + +// An LParen represents the beginning of a parenthesized line block. +// It is a place to store suffix comments. +type LParen struct { + Comments + Pos Position +} + +func (x *LParen) Span() (start, end Position) { + return x.Pos, x.Pos.add(")") +} + +// An RParen represents the end of a parenthesized line block. +// It is a place to store whole-line (before) comments. +type RParen struct { + Comments + Pos Position +} + +func (x *RParen) Span() (start, end Position) { + return x.Pos, x.Pos.add(")") +} + +// An input represents a single input file being parsed. +type input struct { + // Lexing state. + filename string // name of input file, for errors + complete []byte // entire input + remaining []byte // remaining input + token []byte // token being scanned + lastToken string // most recently returned token, for error messages + pos Position // current input position + comments []Comment // accumulated comments + endRule int // position of end of current rule + + // Parser state. + file *FileSyntax // returned top-level syntax tree + parseError error // error encountered during parsing + + // Comment assignment state. + pre []Expr // all expressions, in preorder traversal + post []Expr // all expressions, in postorder traversal +} + +func newInput(filename string, data []byte) *input { + return &input{ + filename: filename, + complete: data, + remaining: data, + pos: Position{Line: 1, LineRune: 1, Byte: 0}, + } +} + +// parse parses the input file. +func parse(file string, data []byte) (f *FileSyntax, err error) { + in := newInput(file, data) + // The parser panics for both routine errors like syntax errors + // and for programmer bugs like array index errors. + // Turn both into error returns. Catching bug panics is + // especially important when processing many files. + defer func() { + if e := recover(); e != nil { + if e == in.parseError { + err = in.parseError + } else { + err = fmt.Errorf("%s:%d:%d: internal error: %v", in.filename, in.pos.Line, in.pos.LineRune, e) + } + } + }() + + // Invoke the parser. + in.parseFile() + if in.parseError != nil { + return nil, in.parseError + } + in.file.Name = in.filename + + // Assign comments to nearby syntax. + in.assignComments() + + return in.file, nil +} + +// Error is called to report an error. +// The reason s is often "syntax error". +// Error does not return: it panics. +func (in *input) Error(s string) { + if s == "syntax error" && in.lastToken != "" { + s += " near " + in.lastToken + } + in.parseError = fmt.Errorf("%s:%d:%d: %v", in.filename, in.pos.Line, in.pos.LineRune, s) + panic(in.parseError) +} + +// eof reports whether the input has reached end of file. +func (in *input) eof() bool { + return len(in.remaining) == 0 +} + +// peekRune returns the next rune in the input without consuming it. +func (in *input) peekRune() int { + if len(in.remaining) == 0 { + return 0 + } + r, _ := utf8.DecodeRune(in.remaining) + return int(r) +} + +// peekPrefix reports whether the remaining input begins with the given prefix. +func (in *input) peekPrefix(prefix string) bool { + // This is like bytes.HasPrefix(in.remaining, []byte(prefix)) + // but without the allocation of the []byte copy of prefix. + for i := 0; i < len(prefix); i++ { + if i >= len(in.remaining) || in.remaining[i] != prefix[i] { + return false + } + } + return true +} + +// readRune consumes and returns the next rune in the input. +func (in *input) readRune() int { + if len(in.remaining) == 0 { + in.Error("internal lexer error: readRune at EOF") + } + r, size := utf8.DecodeRune(in.remaining) + in.remaining = in.remaining[size:] + if r == '\n' { + in.pos.Line++ + in.pos.LineRune = 1 + } else { + in.pos.LineRune++ + } + in.pos.Byte += size + return int(r) +} + +type symType struct { + pos Position + endPos Position + text string +} + +// startToken marks the beginning of the next input token. +// It must be followed by a call to endToken, once the token has +// been consumed using readRune. +func (in *input) startToken(sym *symType) { + in.token = in.remaining + sym.text = "" + sym.pos = in.pos +} + +// endToken marks the end of an input token. +// It records the actual token string in sym.text if the caller +// has not done that already. +func (in *input) endToken(sym *symType) { + if sym.text == "" { + tok := string(in.token[:len(in.token)-len(in.remaining)]) + sym.text = tok + in.lastToken = sym.text + } + sym.endPos = in.pos +} + +// lex is called from the parser to obtain the next input token. +// It returns the token value (either a rune like '+' or a symbolic token _FOR) +// and sets val to the data associated with the token. +// For all our input tokens, the associated data is +// val.Pos (the position where the token begins) +// and val.Token (the input string corresponding to the token). +func (in *input) lex(sym *symType) int { + // Skip past spaces, stopping at non-space or EOF. + countNL := 0 // number of newlines we've skipped past + for !in.eof() { + // Skip over spaces. Count newlines so we can give the parser + // information about where top-level blank lines are, + // for top-level comment assignment. + c := in.peekRune() + if c == ' ' || c == '\t' || c == '\r' { + in.readRune() + continue + } + + // Comment runs to end of line. + if in.peekPrefix("//") { + in.startToken(sym) + + // Is this comment the only thing on its line? + // Find the last \n before this // and see if it's all + // spaces from there to here. + i := bytes.LastIndex(in.complete[:in.pos.Byte], []byte("\n")) + suffix := len(bytes.TrimSpace(in.complete[i+1:in.pos.Byte])) > 0 + in.readRune() + in.readRune() + + // Consume comment. + for len(in.remaining) > 0 && in.readRune() != '\n' { + } + in.endToken(sym) + + sym.text = strings.TrimRight(sym.text, "\n") + in.lastToken = "comment" + + // If we are at top level (not in a statement), hand the comment to + // the parser as a _COMMENT token. The grammar is written + // to handle top-level comments itself. + if !suffix { + // Not in a statement. Tell parser about top-level comment. + return _COMMENT + } + + // Otherwise, save comment for later attachment to syntax tree. + if countNL > 1 { + in.comments = append(in.comments, Comment{sym.pos, "", false}) + } + in.comments = append(in.comments, Comment{sym.pos, sym.text, suffix}) + countNL = 1 + return _EOL + } + + if in.peekPrefix("/*") { + in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) + } + + // Found non-space non-comment. + break + } + + // Found the beginning of the next token. + in.startToken(sym) + defer in.endToken(sym) + + // End of file. + if in.eof() { + in.lastToken = "EOF" + return _EOF + } + + // Punctuation tokens. + switch c := in.peekRune(); c { + case '\n': + in.readRune() + return c + + case '(': + in.readRune() + return c + + case ')': + in.readRune() + return c + + case '"', '`': // quoted string + quote := c + in.readRune() + for { + if in.eof() { + in.pos = sym.pos + in.Error("unexpected EOF in string") + } + if in.peekRune() == '\n' { + in.Error("unexpected newline in string") + } + c := in.readRune() + if c == quote { + break + } + if c == '\\' && quote != '`' { + if in.eof() { + in.pos = sym.pos + in.Error("unexpected EOF in string") + } + in.readRune() + } + } + in.endToken(sym) + return _STRING + } + + // Checked all punctuation. Must be identifier token. + if c := in.peekRune(); !isIdent(c) { + in.Error(fmt.Sprintf("unexpected input character %#q", c)) + } + + // Scan over identifier. + for isIdent(in.peekRune()) { + if in.peekPrefix("//") { + break + } + if in.peekPrefix("/*") { + in.Error(fmt.Sprintf("mod files must use // comments (not /* */ comments)")) + } + in.readRune() + } + return _IDENT +} + +// isIdent reports whether c is an identifier rune. +// We treat nearly all runes as identifier runes. +func isIdent(c int) bool { + return c != 0 && !unicode.IsSpace(rune(c)) +} + +// Comment assignment. +// We build two lists of all subexpressions, preorder and postorder. +// The preorder list is ordered by start location, with outer expressions first. +// The postorder list is ordered by end location, with outer expressions last. +// We use the preorder list to assign each whole-line comment to the syntax +// immediately following it, and we use the postorder list to assign each +// end-of-line comment to the syntax immediately preceding it. + +// order walks the expression adding it and its subexpressions to the +// preorder and postorder lists. +func (in *input) order(x Expr) { + if x != nil { + in.pre = append(in.pre, x) + } + switch x := x.(type) { + default: + panic(fmt.Errorf("order: unexpected type %T", x)) + case nil: + // nothing + case *LParen, *RParen: + // nothing + case *CommentBlock: + // nothing + case *Line: + // nothing + case *FileSyntax: + for _, stmt := range x.Stmt { + in.order(stmt) + } + case *LineBlock: + in.order(&x.LParen) + for _, l := range x.Line { + in.order(l) + } + in.order(&x.RParen) + } + if x != nil { + in.post = append(in.post, x) + } +} + +// assignComments attaches comments to nearby syntax. +func (in *input) assignComments() { + const debug = false + + // Generate preorder and postorder lists. + in.order(in.file) + + // Split into whole-line comments and suffix comments. + var line, suffix []Comment + for _, com := range in.comments { + if com.Suffix { + suffix = append(suffix, com) + } else { + line = append(line, com) + } + } + + if debug { + for _, c := range line { + fmt.Fprintf(os.Stderr, "LINE %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) + } + } + + // Assign line comments to syntax immediately following. + for _, x := range in.pre { + start, _ := x.Span() + if debug { + fmt.Printf("pre %T :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte) + } + xcom := x.Comment() + for len(line) > 0 && start.Byte >= line[0].Start.Byte { + if debug { + fmt.Fprintf(os.Stderr, "ASSIGN LINE %q #%d\n", line[0].Token, line[0].Start.Byte) + } + xcom.Before = append(xcom.Before, line[0]) + line = line[1:] + } + } + + // Remaining line comments go at end of file. + in.file.After = append(in.file.After, line...) + + if debug { + for _, c := range suffix { + fmt.Fprintf(os.Stderr, "SUFFIX %q :%d:%d #%d\n", c.Token, c.Start.Line, c.Start.LineRune, c.Start.Byte) + } + } + + // Assign suffix comments to syntax immediately before. + for i := len(in.post) - 1; i >= 0; i-- { + x := in.post[i] + + start, end := x.Span() + if debug { + fmt.Printf("post %T :%d:%d #%d :%d:%d #%d\n", x, start.Line, start.LineRune, start.Byte, end.Line, end.LineRune, end.Byte) + } + + // Do not assign suffix comments to end of line block or whole file. + // Instead assign them to the last element inside. + switch x.(type) { + case *FileSyntax: + continue + } + + // Do not assign suffix comments to something that starts + // on an earlier line, so that in + // + // x ( y + // z ) // comment + // + // we assign the comment to z and not to x ( ... ). + if start.Line != end.Line { + continue + } + xcom := x.Comment() + for len(suffix) > 0 && end.Byte <= suffix[len(suffix)-1].Start.Byte { + if debug { + fmt.Fprintf(os.Stderr, "ASSIGN SUFFIX %q #%d\n", suffix[len(suffix)-1].Token, suffix[len(suffix)-1].Start.Byte) + } + xcom.Suffix = append(xcom.Suffix, suffix[len(suffix)-1]) + suffix = suffix[:len(suffix)-1] + } + } + + // We assigned suffix comments in reverse. + // If multiple suffix comments were appended to the same + // expression node, they are now in reverse. Fix that. + for _, x := range in.post { + reverseComments(x.Comment().Suffix) + } + + // Remaining suffix comments go at beginning of file. + in.file.Before = append(in.file.Before, suffix...) +} + +// reverseComments reverses the []Comment list. +func reverseComments(list []Comment) { + for i, j := 0, len(list)-1; i < j; i, j = i+1, j-1 { + list[i], list[j] = list[j], list[i] + } +} + +func (in *input) parseFile() { + in.file = new(FileSyntax) + var sym symType + var cb *CommentBlock + for { + tok := in.lex(&sym) + switch tok { + case '\n': + if cb != nil { + in.file.Stmt = append(in.file.Stmt, cb) + cb = nil + } + case _COMMENT: + if cb == nil { + cb = &CommentBlock{Start: sym.pos} + } + com := cb.Comment() + com.Before = append(com.Before, Comment{Start: sym.pos, Token: sym.text}) + case _EOF: + if cb != nil { + in.file.Stmt = append(in.file.Stmt, cb) + } + return + default: + in.parseStmt(&sym) + if cb != nil { + in.file.Stmt[len(in.file.Stmt)-1].Comment().Before = cb.Before + cb = nil + } + } + } +} + +func (in *input) parseStmt(sym *symType) { + start := sym.pos + end := sym.endPos + token := []string{sym.text} + for { + tok := in.lex(sym) + switch tok { + case '\n', _EOF, _EOL: + in.file.Stmt = append(in.file.Stmt, &Line{ + Start: start, + Token: token, + End: end, + }) + return + case '(': + in.file.Stmt = append(in.file.Stmt, in.parseLineBlock(start, token, sym)) + return + default: + token = append(token, sym.text) + end = sym.endPos + } + } +} + +func (in *input) parseLineBlock(start Position, token []string, sym *symType) *LineBlock { + x := &LineBlock{ + Start: start, + Token: token, + LParen: LParen{Pos: sym.pos}, + } + var comments []Comment + for { + tok := in.lex(sym) + switch tok { + case _EOL: + // ignore + case '\n': + if len(comments) == 0 && len(x.Line) > 0 || len(comments) > 0 && comments[len(comments)-1].Token != "" { + comments = append(comments, Comment{}) + } + case _COMMENT: + comments = append(comments, Comment{Start: sym.pos, Token: sym.text}) + case _EOF: + in.Error(fmt.Sprintf("syntax error (unterminated block started at %s:%d:%d)", in.filename, x.Start.Line, x.Start.LineRune)) + case ')': + x.RParen.Before = comments + x.RParen.Pos = sym.pos + tok = in.lex(sym) + if tok != '\n' && tok != _EOF && tok != _EOL { + in.Error("syntax error (expected newline after closing paren)") + } + return x + default: + l := in.parseLine(sym) + x.Line = append(x.Line, l) + l.Comment().Before = comments + comments = nil + } + } +} + +func (in *input) parseLine(sym *symType) *Line { + start := sym.pos + end := sym.endPos + token := []string{sym.text} + for { + tok := in.lex(sym) + switch tok { + case '\n', _EOF, _EOL: + return &Line{ + Start: start, + Token: token, + End: end, + InBlock: true, + } + default: + token = append(token, sym.text) + end = sym.endPos + } + } +} + +const ( + _EOF = -(1 + iota) + _EOL + _IDENT + _STRING + _COMMENT +) + +var ( + slashSlash = []byte("//") + moduleStr = []byte("module") +) + +// ModulePath returns the module path from the gomod file text. +// If it cannot find a module path, it returns an empty string. +// It is tolerant of unrelated problems in the go.mod file. +func ModulePath(mod []byte) string { + for len(mod) > 0 { + line := mod + mod = nil + if i := bytes.IndexByte(line, '\n'); i >= 0 { + line, mod = line[:i], line[i+1:] + } + if i := bytes.Index(line, slashSlash); i >= 0 { + line = line[:i] + } + line = bytes.TrimSpace(line) + if !bytes.HasPrefix(line, moduleStr) { + continue + } + line = line[len(moduleStr):] + n := len(line) + line = bytes.TrimSpace(line) + if len(line) == n || len(line) == 0 { + continue + } + + if line[0] == '"' || line[0] == '`' { + p, err := strconv.Unquote(string(line)) + if err != nil { + return "" // malformed quoted string or multiline module path + } + return p + } + + return string(line) + } + return "" // missing module path +} diff --git a/vendor/golang.org/x/mod/modfile/rule.go b/vendor/golang.org/x/mod/modfile/rule.go new file mode 100644 index 00000000000..62af06889f6 --- /dev/null +++ b/vendor/golang.org/x/mod/modfile/rule.go @@ -0,0 +1,776 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package modfile + +import ( + "bytes" + "errors" + "fmt" + "path/filepath" + "sort" + "strconv" + "strings" + "unicode" + + "golang.org/x/mod/internal/lazyregexp" + "golang.org/x/mod/module" +) + +// A File is the parsed, interpreted form of a go.mod file. +type File struct { + Module *Module + Go *Go + Require []*Require + Exclude []*Exclude + Replace []*Replace + + Syntax *FileSyntax +} + +// A Module is the module statement. +type Module struct { + Mod module.Version + Syntax *Line +} + +// A Go is the go statement. +type Go struct { + Version string // "1.23" + Syntax *Line +} + +// A Require is a single require statement. +type Require struct { + Mod module.Version + Indirect bool // has "// indirect" comment + Syntax *Line +} + +// An Exclude is a single exclude statement. +type Exclude struct { + Mod module.Version + Syntax *Line +} + +// A Replace is a single replace statement. +type Replace struct { + Old module.Version + New module.Version + Syntax *Line +} + +func (f *File) AddModuleStmt(path string) error { + if f.Syntax == nil { + f.Syntax = new(FileSyntax) + } + if f.Module == nil { + f.Module = &Module{ + Mod: module.Version{Path: path}, + Syntax: f.Syntax.addLine(nil, "module", AutoQuote(path)), + } + } else { + f.Module.Mod.Path = path + f.Syntax.updateLine(f.Module.Syntax, "module", AutoQuote(path)) + } + return nil +} + +func (f *File) AddComment(text string) { + if f.Syntax == nil { + f.Syntax = new(FileSyntax) + } + f.Syntax.Stmt = append(f.Syntax.Stmt, &CommentBlock{ + Comments: Comments{ + Before: []Comment{ + { + Token: text, + }, + }, + }, + }) +} + +type VersionFixer func(path, version string) (string, error) + +// Parse parses the data, reported in errors as being from file, +// into a File struct. It applies fix, if non-nil, to canonicalize all module versions found. +func Parse(file string, data []byte, fix VersionFixer) (*File, error) { + return parseToFile(file, data, fix, true) +} + +// ParseLax is like Parse but ignores unknown statements. +// It is used when parsing go.mod files other than the main module, +// under the theory that most statement types we add in the future will +// only apply in the main module, like exclude and replace, +// and so we get better gradual deployments if old go commands +// simply ignore those statements when found in go.mod files +// in dependencies. +func ParseLax(file string, data []byte, fix VersionFixer) (*File, error) { + return parseToFile(file, data, fix, false) +} + +func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (*File, error) { + fs, err := parse(file, data) + if err != nil { + return nil, err + } + f := &File{ + Syntax: fs, + } + + var errs bytes.Buffer + for _, x := range fs.Stmt { + switch x := x.(type) { + case *Line: + f.add(&errs, x, x.Token[0], x.Token[1:], fix, strict) + + case *LineBlock: + if len(x.Token) > 1 { + if strict { + fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) + } + continue + } + switch x.Token[0] { + default: + if strict { + fmt.Fprintf(&errs, "%s:%d: unknown block type: %s\n", file, x.Start.Line, strings.Join(x.Token, " ")) + } + continue + case "module", "require", "exclude", "replace": + for _, l := range x.Line { + f.add(&errs, l, x.Token[0], l.Token, fix, strict) + } + } + } + } + + if errs.Len() > 0 { + return nil, errors.New(strings.TrimRight(errs.String(), "\n")) + } + return f, nil +} + +var GoVersionRE = lazyregexp.New(`^([1-9][0-9]*)\.(0|[1-9][0-9]*)$`) + +func (f *File) add(errs *bytes.Buffer, line *Line, verb string, args []string, fix VersionFixer, strict bool) { + // If strict is false, this module is a dependency. + // We ignore all unknown directives as well as main-module-only + // directives like replace and exclude. It will work better for + // forward compatibility if we can depend on modules that have unknown + // statements (presumed relevant only when acting as the main module) + // and simply ignore those statements. + if !strict { + switch verb { + case "module", "require", "go": + // want these even for dependency go.mods + default: + return + } + } + + switch verb { + default: + fmt.Fprintf(errs, "%s:%d: unknown directive: %s\n", f.Syntax.Name, line.Start.Line, verb) + + case "go": + if f.Go != nil { + fmt.Fprintf(errs, "%s:%d: repeated go statement\n", f.Syntax.Name, line.Start.Line) + return + } + if len(args) != 1 || !GoVersionRE.MatchString(args[0]) { + fmt.Fprintf(errs, "%s:%d: usage: go 1.23\n", f.Syntax.Name, line.Start.Line) + return + } + f.Go = &Go{Syntax: line} + f.Go.Version = args[0] + case "module": + if f.Module != nil { + fmt.Fprintf(errs, "%s:%d: repeated module statement\n", f.Syntax.Name, line.Start.Line) + return + } + f.Module = &Module{Syntax: line} + if len(args) != 1 { + + fmt.Fprintf(errs, "%s:%d: usage: module module/path\n", f.Syntax.Name, line.Start.Line) + return + } + s, err := parseString(&args[0]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + f.Module.Mod = module.Version{Path: s} + case "require", "exclude": + if len(args) != 2 { + fmt.Fprintf(errs, "%s:%d: usage: %s module/path v1.2.3\n", f.Syntax.Name, line.Start.Line, verb) + return + } + s, err := parseString(&args[0]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + v, err := parseVersion(verb, s, &args[1], fix) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + pathMajor, err := modulePathMajor(s) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + if err := module.CheckPathMajor(v, pathMajor); err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, &Error{Verb: verb, ModPath: s, Err: err}) + return + } + if verb == "require" { + f.Require = append(f.Require, &Require{ + Mod: module.Version{Path: s, Version: v}, + Syntax: line, + Indirect: isIndirect(line), + }) + } else { + f.Exclude = append(f.Exclude, &Exclude{ + Mod: module.Version{Path: s, Version: v}, + Syntax: line, + }) + } + case "replace": + arrow := 2 + if len(args) >= 2 && args[1] == "=>" { + arrow = 1 + } + if len(args) < arrow+2 || len(args) > arrow+3 || args[arrow] != "=>" { + fmt.Fprintf(errs, "%s:%d: usage: %s module/path [v1.2.3] => other/module v1.4\n\t or %s module/path [v1.2.3] => ../local/directory\n", f.Syntax.Name, line.Start.Line, verb, verb) + return + } + s, err := parseString(&args[0]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + pathMajor, err := modulePathMajor(s) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + var v string + if arrow == 2 { + v, err = parseVersion(verb, s, &args[1], fix) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + if err := module.CheckPathMajor(v, pathMajor); err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, &Error{Verb: verb, ModPath: s, Err: err}) + return + } + } + ns, err := parseString(&args[arrow+1]) + if err != nil { + fmt.Fprintf(errs, "%s:%d: invalid quoted string: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + nv := "" + if len(args) == arrow+2 { + if !IsDirectoryPath(ns) { + fmt.Fprintf(errs, "%s:%d: replacement module without version must be directory path (rooted or starting with ./ or ../)\n", f.Syntax.Name, line.Start.Line) + return + } + if filepath.Separator == '/' && strings.Contains(ns, `\`) { + fmt.Fprintf(errs, "%s:%d: replacement directory appears to be Windows path (on a non-windows system)\n", f.Syntax.Name, line.Start.Line) + return + } + } + if len(args) == arrow+3 { + nv, err = parseVersion(verb, ns, &args[arrow+2], fix) + if err != nil { + fmt.Fprintf(errs, "%s:%d: %v\n", f.Syntax.Name, line.Start.Line, err) + return + } + if IsDirectoryPath(ns) { + fmt.Fprintf(errs, "%s:%d: replacement module directory path %q cannot have version\n", f.Syntax.Name, line.Start.Line, ns) + return + } + } + f.Replace = append(f.Replace, &Replace{ + Old: module.Version{Path: s, Version: v}, + New: module.Version{Path: ns, Version: nv}, + Syntax: line, + }) + } +} + +// isIndirect reports whether line has a "// indirect" comment, +// meaning it is in go.mod only for its effect on indirect dependencies, +// so that it can be dropped entirely once the effective version of the +// indirect dependency reaches the given minimum version. +func isIndirect(line *Line) bool { + if len(line.Suffix) == 0 { + return false + } + f := strings.Fields(strings.TrimPrefix(line.Suffix[0].Token, string(slashSlash))) + return (len(f) == 1 && f[0] == "indirect" || len(f) > 1 && f[0] == "indirect;") +} + +// setIndirect sets line to have (or not have) a "// indirect" comment. +func setIndirect(line *Line, indirect bool) { + if isIndirect(line) == indirect { + return + } + if indirect { + // Adding comment. + if len(line.Suffix) == 0 { + // New comment. + line.Suffix = []Comment{{Token: "// indirect", Suffix: true}} + return + } + + com := &line.Suffix[0] + text := strings.TrimSpace(strings.TrimPrefix(com.Token, string(slashSlash))) + if text == "" { + // Empty comment. + com.Token = "// indirect" + return + } + + // Insert at beginning of existing comment. + com.Token = "// indirect; " + text + return + } + + // Removing comment. + f := strings.Fields(line.Suffix[0].Token) + if len(f) == 2 { + // Remove whole comment. + line.Suffix = nil + return + } + + // Remove comment prefix. + com := &line.Suffix[0] + i := strings.Index(com.Token, "indirect;") + com.Token = "//" + com.Token[i+len("indirect;"):] +} + +// IsDirectoryPath reports whether the given path should be interpreted +// as a directory path. Just like on the go command line, relative paths +// and rooted paths are directory paths; the rest are module paths. +func IsDirectoryPath(ns string) bool { + // Because go.mod files can move from one system to another, + // we check all known path syntaxes, both Unix and Windows. + return strings.HasPrefix(ns, "./") || strings.HasPrefix(ns, "../") || strings.HasPrefix(ns, "/") || + strings.HasPrefix(ns, `.\`) || strings.HasPrefix(ns, `..\`) || strings.HasPrefix(ns, `\`) || + len(ns) >= 2 && ('A' <= ns[0] && ns[0] <= 'Z' || 'a' <= ns[0] && ns[0] <= 'z') && ns[1] == ':' +} + +// MustQuote reports whether s must be quoted in order to appear as +// a single token in a go.mod line. +func MustQuote(s string) bool { + for _, r := range s { + if !unicode.IsPrint(r) || r == ' ' || r == '"' || r == '\'' || r == '`' { + return true + } + } + return s == "" || strings.Contains(s, "//") || strings.Contains(s, "/*") +} + +// AutoQuote returns s or, if quoting is required for s to appear in a go.mod, +// the quotation of s. +func AutoQuote(s string) string { + if MustQuote(s) { + return strconv.Quote(s) + } + return s +} + +func parseString(s *string) (string, error) { + t := *s + if strings.HasPrefix(t, `"`) { + var err error + if t, err = strconv.Unquote(t); err != nil { + return "", err + } + } else if strings.ContainsAny(t, "\"'`") { + // Other quotes are reserved both for possible future expansion + // and to avoid confusion. For example if someone types 'x' + // we want that to be a syntax error and not a literal x in literal quotation marks. + return "", fmt.Errorf("unquoted string cannot contain quote") + } + *s = AutoQuote(t) + return t, nil +} + +type Error struct { + Verb string + ModPath string + Err error +} + +func (e *Error) Error() string { + return fmt.Sprintf("%s %s: %v", e.Verb, e.ModPath, e.Err) +} + +func (e *Error) Unwrap() error { return e.Err } + +func parseVersion(verb string, path string, s *string, fix VersionFixer) (string, error) { + t, err := parseString(s) + if err != nil { + return "", &Error{ + Verb: verb, + ModPath: path, + Err: &module.InvalidVersionError{ + Version: *s, + Err: err, + }, + } + } + if fix != nil { + var err error + t, err = fix(path, t) + if err != nil { + if err, ok := err.(*module.ModuleError); ok { + return "", &Error{ + Verb: verb, + ModPath: path, + Err: err.Err, + } + } + return "", err + } + } + if v := module.CanonicalVersion(t); v != "" { + *s = v + return *s, nil + } + return "", &Error{ + Verb: verb, + ModPath: path, + Err: &module.InvalidVersionError{ + Version: t, + Err: errors.New("must be of the form v1.2.3"), + }, + } +} + +func modulePathMajor(path string) (string, error) { + _, major, ok := module.SplitPathVersion(path) + if !ok { + return "", fmt.Errorf("invalid module path") + } + return major, nil +} + +func (f *File) Format() ([]byte, error) { + return Format(f.Syntax), nil +} + +// Cleanup cleans up the file f after any edit operations. +// To avoid quadratic behavior, modifications like DropRequire +// clear the entry but do not remove it from the slice. +// Cleanup cleans out all the cleared entries. +func (f *File) Cleanup() { + w := 0 + for _, r := range f.Require { + if r.Mod.Path != "" { + f.Require[w] = r + w++ + } + } + f.Require = f.Require[:w] + + w = 0 + for _, x := range f.Exclude { + if x.Mod.Path != "" { + f.Exclude[w] = x + w++ + } + } + f.Exclude = f.Exclude[:w] + + w = 0 + for _, r := range f.Replace { + if r.Old.Path != "" { + f.Replace[w] = r + w++ + } + } + f.Replace = f.Replace[:w] + + f.Syntax.Cleanup() +} + +func (f *File) AddGoStmt(version string) error { + if !GoVersionRE.MatchString(version) { + return fmt.Errorf("invalid language version string %q", version) + } + if f.Go == nil { + var hint Expr + if f.Module != nil && f.Module.Syntax != nil { + hint = f.Module.Syntax + } + f.Go = &Go{ + Version: version, + Syntax: f.Syntax.addLine(hint, "go", version), + } + } else { + f.Go.Version = version + f.Syntax.updateLine(f.Go.Syntax, "go", version) + } + return nil +} + +func (f *File) AddRequire(path, vers string) error { + need := true + for _, r := range f.Require { + if r.Mod.Path == path { + if need { + r.Mod.Version = vers + f.Syntax.updateLine(r.Syntax, "require", AutoQuote(path), vers) + need = false + } else { + f.Syntax.removeLine(r.Syntax) + *r = Require{} + } + } + } + + if need { + f.AddNewRequire(path, vers, false) + } + return nil +} + +func (f *File) AddNewRequire(path, vers string, indirect bool) { + line := f.Syntax.addLine(nil, "require", AutoQuote(path), vers) + setIndirect(line, indirect) + f.Require = append(f.Require, &Require{module.Version{Path: path, Version: vers}, indirect, line}) +} + +func (f *File) SetRequire(req []*Require) { + need := make(map[string]string) + indirect := make(map[string]bool) + for _, r := range req { + need[r.Mod.Path] = r.Mod.Version + indirect[r.Mod.Path] = r.Indirect + } + + for _, r := range f.Require { + if v, ok := need[r.Mod.Path]; ok { + r.Mod.Version = v + r.Indirect = indirect[r.Mod.Path] + } else { + *r = Require{} + } + } + + var newStmts []Expr + for _, stmt := range f.Syntax.Stmt { + switch stmt := stmt.(type) { + case *LineBlock: + if len(stmt.Token) > 0 && stmt.Token[0] == "require" { + var newLines []*Line + for _, line := range stmt.Line { + if p, err := parseString(&line.Token[0]); err == nil && need[p] != "" { + if len(line.Comments.Before) == 1 && len(line.Comments.Before[0].Token) == 0 { + line.Comments.Before = line.Comments.Before[:0] + } + line.Token[1] = need[p] + delete(need, p) + setIndirect(line, indirect[p]) + newLines = append(newLines, line) + } + } + if len(newLines) == 0 { + continue // drop stmt + } + stmt.Line = newLines + } + + case *Line: + if len(stmt.Token) > 0 && stmt.Token[0] == "require" { + if p, err := parseString(&stmt.Token[1]); err == nil && need[p] != "" { + stmt.Token[2] = need[p] + delete(need, p) + setIndirect(stmt, indirect[p]) + } else { + continue // drop stmt + } + } + } + newStmts = append(newStmts, stmt) + } + f.Syntax.Stmt = newStmts + + for path, vers := range need { + f.AddNewRequire(path, vers, indirect[path]) + } + f.SortBlocks() +} + +func (f *File) DropRequire(path string) error { + for _, r := range f.Require { + if r.Mod.Path == path { + f.Syntax.removeLine(r.Syntax) + *r = Require{} + } + } + return nil +} + +func (f *File) AddExclude(path, vers string) error { + var hint *Line + for _, x := range f.Exclude { + if x.Mod.Path == path && x.Mod.Version == vers { + return nil + } + if x.Mod.Path == path { + hint = x.Syntax + } + } + + f.Exclude = append(f.Exclude, &Exclude{Mod: module.Version{Path: path, Version: vers}, Syntax: f.Syntax.addLine(hint, "exclude", AutoQuote(path), vers)}) + return nil +} + +func (f *File) DropExclude(path, vers string) error { + for _, x := range f.Exclude { + if x.Mod.Path == path && x.Mod.Version == vers { + f.Syntax.removeLine(x.Syntax) + *x = Exclude{} + } + } + return nil +} + +func (f *File) AddReplace(oldPath, oldVers, newPath, newVers string) error { + need := true + old := module.Version{Path: oldPath, Version: oldVers} + new := module.Version{Path: newPath, Version: newVers} + tokens := []string{"replace", AutoQuote(oldPath)} + if oldVers != "" { + tokens = append(tokens, oldVers) + } + tokens = append(tokens, "=>", AutoQuote(newPath)) + if newVers != "" { + tokens = append(tokens, newVers) + } + + var hint *Line + for _, r := range f.Replace { + if r.Old.Path == oldPath && (oldVers == "" || r.Old.Version == oldVers) { + if need { + // Found replacement for old; update to use new. + r.New = new + f.Syntax.updateLine(r.Syntax, tokens...) + need = false + continue + } + // Already added; delete other replacements for same. + f.Syntax.removeLine(r.Syntax) + *r = Replace{} + } + if r.Old.Path == oldPath { + hint = r.Syntax + } + } + if need { + f.Replace = append(f.Replace, &Replace{Old: old, New: new, Syntax: f.Syntax.addLine(hint, tokens...)}) + } + return nil +} + +func (f *File) DropReplace(oldPath, oldVers string) error { + for _, r := range f.Replace { + if r.Old.Path == oldPath && r.Old.Version == oldVers { + f.Syntax.removeLine(r.Syntax) + *r = Replace{} + } + } + return nil +} + +func (f *File) SortBlocks() { + f.removeDups() // otherwise sorting is unsafe + + for _, stmt := range f.Syntax.Stmt { + block, ok := stmt.(*LineBlock) + if !ok { + continue + } + sort.Slice(block.Line, func(i, j int) bool { + li := block.Line[i] + lj := block.Line[j] + for k := 0; k < len(li.Token) && k < len(lj.Token); k++ { + if li.Token[k] != lj.Token[k] { + return li.Token[k] < lj.Token[k] + } + } + return len(li.Token) < len(lj.Token) + }) + } +} + +func (f *File) removeDups() { + have := make(map[module.Version]bool) + kill := make(map[*Line]bool) + for _, x := range f.Exclude { + if have[x.Mod] { + kill[x.Syntax] = true + continue + } + have[x.Mod] = true + } + var excl []*Exclude + for _, x := range f.Exclude { + if !kill[x.Syntax] { + excl = append(excl, x) + } + } + f.Exclude = excl + + have = make(map[module.Version]bool) + // Later replacements take priority over earlier ones. + for i := len(f.Replace) - 1; i >= 0; i-- { + x := f.Replace[i] + if have[x.Old] { + kill[x.Syntax] = true + continue + } + have[x.Old] = true + } + var repl []*Replace + for _, x := range f.Replace { + if !kill[x.Syntax] { + repl = append(repl, x) + } + } + f.Replace = repl + + var stmts []Expr + for _, stmt := range f.Syntax.Stmt { + switch stmt := stmt.(type) { + case *Line: + if kill[stmt] { + continue + } + case *LineBlock: + var lines []*Line + for _, line := range stmt.Line { + if !kill[line] { + lines = append(lines, line) + } + } + stmt.Line = lines + if len(lines) == 0 { + continue + } + } + stmts = append(stmts, stmt) + } + f.Syntax.Stmt = stmts +} diff --git a/vendor/golang.org/x/mod/module/module.go b/vendor/golang.org/x/mod/module/module.go index 21f123957da..6cd37280a85 100644 --- a/vendor/golang.org/x/mod/module/module.go +++ b/vendor/golang.org/x/mod/module/module.go @@ -123,8 +123,12 @@ type Version struct { Version string `json:",omitempty"` } -// String returns the module version syntax Path@Version. +// String returns a representation of the Version suitable for logging +// (Path@Version, or just Path if Version is empty). func (m Version) String() string { + if m.Version == "" { + return m.Path + } return m.Path + "@" + m.Version } diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index bdaba1d46b1..27cc893cc0e 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -19,7 +19,6 @@ package http2 // import "golang.org/x/net/http2" import ( "bufio" "crypto/tls" - "errors" "fmt" "io" "net/http" @@ -173,11 +172,6 @@ func (s SettingID) String() string { return fmt.Sprintf("UNKNOWN_SETTING_%d", uint16(s)) } -var ( - errInvalidHeaderFieldName = errors.New("http2: invalid header field name") - errInvalidHeaderFieldValue = errors.New("http2: invalid header field value") -) - // validWireHeaderFieldName reports whether v is a valid header field // name (key). See httpguts.ValidHeaderName for the base rules. // diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index de31d72b2c3..bc9e41a1b77 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -581,13 +581,10 @@ type stream struct { cancelCtx func() // owned by serverConn's serve loop: - bodyBytes int64 // body bytes seen so far - declBodyBytes int64 // or -1 if undeclared - flow flow // limits writing from Handler to client - inflow flow // what the client is allowed to POST/etc to us - parent *stream // or nil - numTrailerValues int64 - weight uint8 + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow flow // limits writing from Handler to client + inflow flow // what the client is allowed to POST/etc to us state streamState resetQueued bool // RST_STREAM queued for write; set by sc.resetStream gotTrailerHeader bool // HEADER frame for trailers was seen diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index d948e96eec2..81778bec612 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -2198,8 +2198,6 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { return nil } -var errInvalidTrailers = errors.New("http2: invalid trailers") - func (rl *clientConnReadLoop) endStream(cs *clientStream) { // TODO: check that any declared content-length matches, like // server.go's (*stream).endStream method. @@ -2430,7 +2428,6 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) var ( errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit") - errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") ) func (cc *ClientConn) logf(format string, args ...interface{}) { diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go index b4e6ecb2dcc..e44deb75746 100644 --- a/vendor/golang.org/x/sys/cpu/cpu.go +++ b/vendor/golang.org/x/sys/cpu/cpu.go @@ -114,6 +114,15 @@ var ARM struct { _ CacheLinePad } +// MIPS64X contains the supported CPU features of the current mips64/mips64le +// platforms. If the current platform is not mips64/mips64le or the current +// operating system is not Linux then all feature flags are false. +var MIPS64X struct { + _ CacheLinePad + HasMSA bool // MIPS SIMD architecture + _ CacheLinePad +} + // PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms. // If the current platform is not ppc64/ppc64le then all feature flags are false. // diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go new file mode 100644 index 00000000000..9c87677aef9 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -0,0 +1,138 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +import "runtime" + +const cacheLineSize = 64 + +func init() { + switch runtime.GOOS { + case "android", "darwin": + // Android and iOS don't seem to allow reading these registers. + // Fake the minimal features expected by + // TestARM64minimalFeatures. + ARM64.HasASIMD = true + ARM64.HasFP = true + case "linux": + doinit() + default: + readARM64Registers() + } +} + +func readARM64Registers() { + Initialized = true + + // ID_AA64ISAR0_EL1 + isar0 := getisar0() + + switch extractBits(isar0, 4, 7) { + case 1: + ARM64.HasAES = true + case 2: + ARM64.HasAES = true + ARM64.HasPMULL = true + } + + switch extractBits(isar0, 8, 11) { + case 1: + ARM64.HasSHA1 = true + } + + switch extractBits(isar0, 12, 15) { + case 1: + ARM64.HasSHA2 = true + case 2: + ARM64.HasSHA2 = true + ARM64.HasSHA512 = true + } + + switch extractBits(isar0, 16, 19) { + case 1: + ARM64.HasCRC32 = true + } + + switch extractBits(isar0, 20, 23) { + case 2: + ARM64.HasATOMICS = true + } + + switch extractBits(isar0, 28, 31) { + case 1: + ARM64.HasASIMDRDM = true + } + + switch extractBits(isar0, 32, 35) { + case 1: + ARM64.HasSHA3 = true + } + + switch extractBits(isar0, 36, 39) { + case 1: + ARM64.HasSM3 = true + } + + switch extractBits(isar0, 40, 43) { + case 1: + ARM64.HasSM4 = true + } + + switch extractBits(isar0, 44, 47) { + case 1: + ARM64.HasASIMDDP = true + } + + // ID_AA64ISAR1_EL1 + isar1 := getisar1() + + switch extractBits(isar1, 0, 3) { + case 1: + ARM64.HasDCPOP = true + } + + switch extractBits(isar1, 12, 15) { + case 1: + ARM64.HasJSCVT = true + } + + switch extractBits(isar1, 16, 19) { + case 1: + ARM64.HasFCMA = true + } + + switch extractBits(isar1, 20, 23) { + case 1: + ARM64.HasLRCPC = true + } + + // ID_AA64PFR0_EL1 + pfr0 := getpfr0() + + switch extractBits(pfr0, 16, 19) { + case 0: + ARM64.HasFP = true + case 1: + ARM64.HasFP = true + ARM64.HasFPHP = true + } + + switch extractBits(pfr0, 20, 23) { + case 0: + ARM64.HasASIMD = true + case 1: + ARM64.HasASIMD = true + ARM64.HasASIMDHP = true + } + + switch extractBits(pfr0, 32, 35) { + case 1: + ARM64.HasSVE = true + } +} + +func extractBits(data uint64, start, end uint) uint { + return (uint)(data>>start) & ((1 << (end - start + 1)) - 1) +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/vendor/golang.org/x/sys/cpu/cpu_arm64.s new file mode 100644 index 00000000000..a54436e3909 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.s @@ -0,0 +1,31 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// func getisar0() uint64 +TEXT ·getisar0(SB),NOSPLIT,$0-8 + // get Instruction Set Attributes 0 into x0 + // mrs x0, ID_AA64ISAR0_EL1 = d5380600 + WORD $0xd5380600 + MOVD R0, ret+0(FP) + RET + +// func getisar1() uint64 +TEXT ·getisar1(SB),NOSPLIT,$0-8 + // get Instruction Set Attributes 1 into x0 + // mrs x0, ID_AA64ISAR1_EL1 = d5380620 + WORD $0xd5380620 + MOVD R0, ret+0(FP) + RET + +// func getpfr0() uint64 +TEXT ·getpfr0(SB),NOSPLIT,$0-8 + // get Processor Feature Register 0 into x0 + // mrs x0, ID_AA64PFR0_EL1 = d5380400 + WORD $0xd5380400 + MOVD R0, ret+0(FP) + RET diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go new file mode 100644 index 00000000000..7b88e865a42 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go @@ -0,0 +1,11 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +package cpu + +func getisar0() uint64 +func getisar1() uint64 +func getpfr0() uint64 diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go new file mode 100644 index 00000000000..53ca8d65c37 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go @@ -0,0 +1,11 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo + +package cpu + +func getisar0() uint64 { return 0 } +func getisar1() uint64 { return 0 } +func getpfr0() uint64 { return 0 } diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo.c b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c similarity index 100% rename from vendor/golang.org/x/sys/cpu/cpu_gccgo.c rename to vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go similarity index 100% rename from vendor/golang.org/x/sys/cpu/cpu_gccgo.go rename to vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux.go b/vendor/golang.org/x/sys/cpu/cpu_linux.go index 10e712dc5d3..fe139182c8d 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux.go @@ -2,58 +2,14 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64,!amd64p32,!386 +// +build !386,!amd64,!amd64p32,!arm64 package cpu -import ( - "io/ioutil" -) - -const ( - _AT_HWCAP = 16 - _AT_HWCAP2 = 26 - - procAuxv = "/proc/self/auxv" - - uintSize = int(32 << (^uint(0) >> 63)) -) - -// For those platforms don't have a 'cpuid' equivalent we use HWCAP/HWCAP2 -// These are initialized in cpu_$GOARCH.go -// and should not be changed after they are initialized. -var hwCap uint -var hwCap2 uint - func init() { - buf, err := ioutil.ReadFile(procAuxv) - if err != nil { - // e.g. on android /proc/self/auxv is not accessible, so silently - // ignore the error and leave Initialized = false + if err := readHWCAP(); err != nil { return } - - bo := hostByteOrder() - for len(buf) >= 2*(uintSize/8) { - var tag, val uint - switch uintSize { - case 32: - tag = uint(bo.Uint32(buf[0:])) - val = uint(bo.Uint32(buf[4:])) - buf = buf[8:] - case 64: - tag = uint(bo.Uint64(buf[0:])) - val = uint(bo.Uint64(buf[8:])) - buf = buf[16:] - } - switch tag { - case _AT_HWCAP: - hwCap = val - case _AT_HWCAP2: - hwCap2 = val - } - } doinit() - Initialized = true } diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go index fa7fb1bd7b2..79a38a0b9bc 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go @@ -4,8 +4,6 @@ package cpu -const cacheLineSize = 64 - // HWCAP/HWCAP2 bits. These are exposed by Linux. const ( hwcap_FP = 1 << 0 @@ -35,6 +33,12 @@ const ( ) func doinit() { + if err := readHWCAP(); err != nil { + // failed to read /proc/self/auxv, try reading registers directly + readARM64Registers() + return + } + // HWCAP feature bits ARM64.HasFP = isSet(hwCap, hwcap_FP) ARM64.HasASIMD = isSet(hwCap, hwcap_ASIMD) diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go new file mode 100644 index 00000000000..eb24e5073e7 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go @@ -0,0 +1,22 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build mips64 mips64le + +package cpu + +// HWCAP bits. These are exposed by the Linux kernel 5.4. +const ( + // CPU features + hwcap_MIPS_MSA = 1 << 1 +) + +func doinit() { + // HWCAP feature bits + MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA) +} + +func isSet(hwc uint, value uint) bool { + return hwc&value != 0 +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go new file mode 100644 index 00000000000..42b5d33cb69 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go @@ -0,0 +1,9 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x + +package cpu + +func doinit() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go index f55e0c82c73..6165f121249 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go @@ -7,5 +7,3 @@ package cpu const cacheLineSize = 32 - -func doinit() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go index cda87b1a1b1..1269eee88d0 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go @@ -7,5 +7,3 @@ package cpu const cacheLineSize = 32 - -func doinit() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go index dd1e76dc921..3ffc4afa03c 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go @@ -6,6 +6,4 @@ package cpu -const cacheLineSize = 64 - func doinit() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go new file mode 100644 index 00000000000..efe2b7a8477 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go @@ -0,0 +1,9 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build riscv64 + +package cpu + +const cacheLineSize = 32 diff --git a/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/vendor/golang.org/x/sys/cpu/cpu_wasm.go index bd9bbda0c08..8681e876a95 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_wasm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_wasm.go @@ -11,5 +11,3 @@ package cpu // rules are good enough. const cacheLineSize = 0 - -func doinit() {} diff --git a/vendor/golang.org/x/sys/cpu/hwcap_linux.go b/vendor/golang.org/x/sys/cpu/hwcap_linux.go new file mode 100644 index 00000000000..f3baa379328 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/hwcap_linux.go @@ -0,0 +1,56 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +import ( + "io/ioutil" +) + +const ( + _AT_HWCAP = 16 + _AT_HWCAP2 = 26 + + procAuxv = "/proc/self/auxv" + + uintSize = int(32 << (^uint(0) >> 63)) +) + +// For those platforms don't have a 'cpuid' equivalent we use HWCAP/HWCAP2 +// These are initialized in cpu_$GOARCH.go +// and should not be changed after they are initialized. +var hwCap uint +var hwCap2 uint + +func readHWCAP() error { + buf, err := ioutil.ReadFile(procAuxv) + if err != nil { + // e.g. on android /proc/self/auxv is not accessible, so silently + // ignore the error and leave Initialized = false. On some + // architectures (e.g. arm64) doinit() implements a fallback + // readout and will set Initialized = true again. + return err + } + bo := hostByteOrder() + for len(buf) >= 2*(uintSize/8) { + var tag, val uint + switch uintSize { + case 32: + tag = uint(bo.Uint32(buf[0:])) + val = uint(bo.Uint32(buf[4:])) + buf = buf[8:] + case 64: + tag = uint(bo.Uint64(buf[0:])) + val = uint(bo.Uint64(buf[8:])) + buf = buf[16:] + } + switch tag { + case _AT_HWCAP: + hwCap = val + case _AT_HWCAP2: + hwCap2 = val + } + } + return nil +} diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md index eb2f78ae295..ab433ccfbb4 100644 --- a/vendor/golang.org/x/sys/unix/README.md +++ b/vendor/golang.org/x/sys/unix/README.md @@ -149,6 +149,17 @@ To add a constant, add the header that includes it to the appropriate variable. Then, edit the regex (if necessary) to match the desired constant. Avoid making the regex too broad to avoid matching unintended constants. +### mkmerge.go + +This program is used to extract duplicate const, func, and type declarations +from the generated architecture-specific files listed below, and merge these +into a common file for each OS. + +The merge is performed in the following steps: +1. Construct the set of common code that is idential in all architecture-specific files. +2. Write this common code to the merged file. +3. Remove the common code from all architecture-specific files. + ## Generated files diff --git a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s index 6db717de53c..3cfefed2ec0 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s @@ -23,10 +23,6 @@ TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 MOV a1+8(FP), A0 MOV a2+16(FP), A1 MOV a3+24(FP), A2 - MOV $0, A3 - MOV $0, A4 - MOV $0, A5 - MOV $0, A6 MOV trap+0(FP), A7 // syscall entry ECALL MOV A0, r1+32(FP) // r1 @@ -44,9 +40,6 @@ TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOV a1+8(FP), A0 MOV a2+16(FP), A1 MOV a3+24(FP), A2 - MOV ZERO, A3 - MOV ZERO, A4 - MOV ZERO, A5 MOV trap+0(FP), A7 // syscall entry ECALL MOV A0, r1+32(FP) diff --git a/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/golang.org/x/sys/unix/bluetooth_linux.go index 6e322969706..a178a6149bb 100644 --- a/vendor/golang.org/x/sys/unix/bluetooth_linux.go +++ b/vendor/golang.org/x/sys/unix/bluetooth_linux.go @@ -23,6 +23,7 @@ const ( HCI_CHANNEL_USER = 1 HCI_CHANNEL_MONITOR = 2 HCI_CHANNEL_CONTROL = 3 + HCI_CHANNEL_LOGGING = 4 ) // Socketoption Level diff --git a/vendor/golang.org/x/sys/unix/fcntl.go b/vendor/golang.org/x/sys/unix/fcntl.go index 39c03f1ef13..4dc53486436 100644 --- a/vendor/golang.org/x/sys/unix/fcntl.go +++ b/vendor/golang.org/x/sys/unix/fcntl.go @@ -9,12 +9,11 @@ package unix import "unsafe" // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux -// systems by flock_linux_32bit.go to be SYS_FCNTL64. +// systems by fcntl_linux_32bit.go to be SYS_FCNTL64. var fcntl64Syscall uintptr = SYS_FCNTL -// FcntlInt performs a fcntl syscall on fd with the provided command and argument. -func FcntlInt(fd uintptr, cmd, arg int) (int, error) { - valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) +func fcntl(fd int, cmd, arg int) (int, error) { + valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) var err error if errno != 0 { err = errno @@ -22,6 +21,11 @@ func FcntlInt(fd uintptr, cmd, arg int) (int, error) { return int(valptr), err } +// FcntlInt performs a fcntl syscall on fd with the provided command and argument. +func FcntlInt(fd uintptr, cmd, arg int) (int, error) { + return fcntl(int(fd), cmd, arg) +} + // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go new file mode 100644 index 00000000000..b27be0a014c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/fdset.go @@ -0,0 +1,29 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +// Set adds fd to the set fds. +func (fds *FdSet) Set(fd int) { + fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) +} + +// Clear removes fd from the set fds. +func (fds *FdSet) Clear(fd int) { + fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) +} + +// IsSet returns whether fd is in the set fds. +func (fds *FdSet) IsSet(fd int) bool { + return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 +} + +// Zero clears the set fds. +func (fds *FdSet) Zero() { + for i := range fds.Bits { + fds.Bits[i] = 0 + } +} diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index 890ec464c7a..fa0c69b9da0 100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then # Use the Docker-based build system # Files generated through docker (use $cmd so you can Ctl-C the build or run) $cmd docker build --tag generate:$GOOS $GOOS - $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS + $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS exit fi diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 67b84828ac0..96bf2a91978 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -44,6 +44,7 @@ includes_AIX=' #include #include #include +#include #include #include #include @@ -185,16 +186,19 @@ struct ltchars { #include #include #include +#include #include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -482,7 +486,7 @@ ccflags="$@" $2 ~ /^TCSET/ || $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ || $2 !~ "RTF_BITS" && - $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || + $2 ~ /^(IFF|IFT|NET_RT|RTM(GRP)?|RTF|RTV|RTA|RTAX)_/ || $2 ~ /^BIOC/ || $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ || @@ -494,7 +498,9 @@ ccflags="$@" $2 ~ /^CAN_/ || $2 ~ /^CAP_/ || $2 ~ /^ALG_/ || - $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ || + $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ || + $2 ~ /^FS_IOC_.*ENCRYPTION/ || + $2 ~ /^FSCRYPT_/ || $2 ~ /^GRND_/ || $2 ~ /^RND/ || $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || @@ -521,9 +527,11 @@ ccflags="$@" $2 ~ /^WDIOC_/ || $2 ~ /^NFN/ || $2 ~ /^XDP_/ || + $2 ~ /^RWF_/ || $2 ~ /^(HDIO|WIN|SMART)_/ || $2 ~ /^CRYPTO_/ || $2 ~ /^TIPC_/ || + $2 ~ /^DEVLINK_/ || $2 !~ "WMESGLEN" && $2 ~ /^W[A-Z0-9]+$/ || $2 ~/^PPPIOC/ || diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go b/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go new file mode 100644 index 00000000000..5144deeccd5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go @@ -0,0 +1,16 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +// Round the length of a raw sockaddr up to align it properly. +func cmsgAlignOf(salen int) int { + salign := SizeofPtr + if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { + // 64-bit Dragonfly before the September 2019 ABI changes still requires + // 32-bit aligned access to network subsystem. + salign = 4 + } + return (salen + salign - 1) & ^(salign - 1) +} diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go index 6079eb4ac1e..8bf45705947 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go @@ -17,7 +17,7 @@ func UnixCredentials(ucred *Ucred) []byte { h.Level = SOL_SOCKET h.Type = SCM_CREDENTIALS h.SetLen(CmsgLen(SizeofUcred)) - *((*Ucred)(cmsgData(h))) = *ucred + *(*Ucred)(h.data(0)) = *ucred return b } diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go index 062bcabab1b..003916ed7a0 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go @@ -9,35 +9,9 @@ package unix import ( - "runtime" "unsafe" ) -// Round the length of a raw sockaddr up to align it properly. -func cmsgAlignOf(salen int) int { - salign := SizeofPtr - - switch runtime.GOOS { - case "aix": - // There is no alignment on AIX. - salign = 1 - case "darwin", "dragonfly", "solaris", "illumos": - // NOTE: It seems like 64-bit Darwin, DragonFly BSD, - // illumos, and Solaris kernels still require 32-bit - // aligned access to network subsystem. - if SizeofPtr == 8 { - salign = 4 - } - case "netbsd", "openbsd": - // NetBSD and OpenBSD armv7 require 64-bit alignment. - if runtime.GOARCH == "arm" { - salign = 8 - } - } - - return (salen + salign - 1) & ^(salign - 1) -} - // CmsgLen returns the value to store in the Len field of the Cmsghdr // structure, taking into account any necessary alignment. func CmsgLen(datalen int) int { @@ -50,8 +24,8 @@ func CmsgSpace(datalen int) int { return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen) } -func cmsgData(h *Cmsghdr) unsafe.Pointer { - return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr))) +func (h *Cmsghdr) data(offset uintptr) unsafe.Pointer { + return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)) + offset) } // SocketControlMessage represents a socket control message. @@ -94,10 +68,8 @@ func UnixRights(fds ...int) []byte { h.Level = SOL_SOCKET h.Type = SCM_RIGHTS h.SetLen(CmsgLen(datalen)) - data := cmsgData(h) - for _, fd := range fds { - *(*int32)(data) = int32(fd) - data = unsafe.Pointer(uintptr(data) + 4) + for i, fd := range fds { + *(*int32)(h.data(4 * uintptr(i))) = int32(fd) } return b } diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go new file mode 100644 index 00000000000..7d08dae5baf --- /dev/null +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go @@ -0,0 +1,38 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build aix darwin freebsd linux netbsd openbsd solaris + +package unix + +import ( + "runtime" +) + +// Round the length of a raw sockaddr up to align it properly. +func cmsgAlignOf(salen int) int { + salign := SizeofPtr + + // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in + // sockcmsg_dragonfly.go + switch runtime.GOOS { + case "aix": + // There is no alignment on AIX. + salign = 1 + case "darwin", "illumos", "solaris": + // NOTE: It seems like 64-bit Darwin, Illumos and Solaris + // kernels still require 32-bit aligned access to network + // subsystem. + if SizeofPtr == 8 { + salign = 4 + } + case "netbsd", "openbsd": + // NetBSD and OpenBSD armv7 require 64-bit alignment. + if runtime.GOARCH == "arm" { + salign = 8 + } + } + + return (salen + salign - 1) & ^(salign - 1) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 3e6671426c0..68605db6248 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -237,7 +237,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { break } } - bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil @@ -510,6 +510,23 @@ func SysctlRaw(name string, args ...int) ([]byte, error) { return buf[:n], nil } +func SysctlClockinfo(name string) (*Clockinfo, error) { + mib, err := sysctlmib(name) + if err != nil { + return nil, err + } + + n := uintptr(SizeofClockinfo) + var ci Clockinfo + if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { + return nil, err + } + if n != SizeofClockinfo { + return nil, EIO + } + return &ci, nil +} + //sys utimes(path string, timeval *[2]Timeval) (err error) func Utimes(path string, tv []Timeval) error { @@ -577,8 +594,6 @@ func Futimes(fd int, tv []Timeval) error { return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } -//sys fcntl(fd int, cmd int, arg int) (val int, err error) - //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go index 24960c38ba5..f911617be95 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go @@ -27,8 +27,6 @@ func libc_fdopendir_trampoline() func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { // Simulate Getdirentries using fdopendir/readdir_r/closedir. - const ptrSize = unsafe.Sizeof(uintptr(0)) - // We store the number of entries to skip in the seek // offset of fd. See issue #31368. // It's not the full required semantics, but should handle the case diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index c5018a385c8..9a5a6ee5445 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -155,23 +155,6 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) ( //sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) -func SysctlClockinfo(name string) (*Clockinfo, error) { - mib, err := sysctlmib(name) - if err != nil { - return nil, err - } - - n := uintptr(SizeofClockinfo) - var ci Clockinfo - if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { - return nil, err - } - if n != SizeofClockinfo { - return nil, EIO - } - return &ci, nil -} - //sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { @@ -333,12 +316,16 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error { * Wrapped */ +//sys fcntl(fd int, cmd int, arg int) (val int, err error) + //sys kill(pid int, signum int, posix int) (err error) func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) } //sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL + func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go index dd756e708c2..707ba4f59a2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -10,7 +10,6 @@ import ( "syscall" ) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) func setTimespec(sec, nsec int64) Timespec { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index 7f148c428e8..fdbfb5911ac 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -10,7 +10,6 @@ import ( "syscall" ) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) func setTimespec(sec, nsec int64) Timespec { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go index c81510da27f..0e3f25aca1a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin,386,!go1.12 +// +build darwin,arm,!go1.12 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go index 58be02e718a..f8bc4cfb1fa 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -12,10 +12,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) error { return ENOTSUP } -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { - return ENOTSUP -} - func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go index 1ee931f97c1..5ede3ac316a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -14,10 +14,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) error { return ENOTSUP } -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { - return ENOTSUP -} - func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 8c8d5029799..8a195ae586c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -12,9 +12,25 @@ package unix -import "unsafe" - -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +import ( + "sync" + "unsafe" +) + +// See version list in https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/sys/param.h +var ( + osreldateOnce sync.Once + osreldate uint32 +) + +// First __DragonFly_version after September 2019 ABI changes +// http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html +const _dragonflyABIChangeVersion = 500705 + +func supportsABI(ver uint32) bool { + osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") }) + return osreldate >= ver +} // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { @@ -152,6 +168,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL + func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error { err := sysctl(mib, old, oldlen, nil, 0) if err != nil { diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 25ac9340c02..6b2eca493d1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -36,8 +36,6 @@ var ( // INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h const _ino64First = 1200031 -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL - func supportsABI(ver uint32) bool { osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") }) return osreldate >= ver @@ -203,6 +201,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL + func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) @@ -462,8 +462,12 @@ func convertFromDirents11(buf []byte, old []byte) int { dstPos := 0 srcPos := 0 for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) { - dstDirent := (*Dirent)(unsafe.Pointer(&buf[dstPos])) - srcDirent := (*dirent_freebsd11)(unsafe.Pointer(&old[srcPos])) + var dstDirent Dirent + var srcDirent dirent_freebsd11 + + // If multiple direntries are written, sometimes when we reach the final one, + // we may have cap of old less than size of dirent_freebsd11. + copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:]) reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8) if dstPos+reclen > len(buf) { @@ -479,6 +483,7 @@ func convertFromDirents11(buf []byte, old []byte) int { dstDirent.Pad1 = 0 copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen]) + copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:]) padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen] for i := range padding { padding[i] = 0 @@ -524,12 +529,6 @@ func PtraceGetRegs(pid int, regsout *Reg) (err error) { return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0) } -func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { - ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint(countin)} - err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) - return int(ioDesc.Len), err -} - func PtraceLwpEvents(pid int, enable int) (err error) { return ptrace(PTRACE_LWPEVENTS, pid, 0, enable) } diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go index dcc56457a02..0a5a66fabd9 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { + ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)} + err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) + return int(ioDesc.Len), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go index 321c3baceb6..8025b22d089 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { + ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)} + err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) + return int(ioDesc.Len), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go index 69770083132..4ea45bce52b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { + ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)} + err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) + return int(ioDesc.Len), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go index dbbbfd6035c..aa5326db193 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go @@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) { + ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)} + err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0) + return int(ioDesc.Len), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index ebf3195b654..95f7a159ad7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -884,7 +884,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { for n < len(pp.Path) && pp.Path[n] != 0 { n++ } - bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil @@ -1555,8 +1555,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Acct(path string) (err error) //sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) //sys Adjtimex(buf *Timex) (state int, err error) -//sys Capget(hdr *CapUserHeader, data *CapUserData) (err error) -//sys Capset(hdr *CapUserHeader, data *CapUserData) (err error) +//sysnb Capget(hdr *CapUserHeader, data *CapUserData) (err error) +//sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error) //sys Chdir(path string) (err error) //sys Chroot(path string) (err error) //sys ClockGetres(clockid int32, res *Timespec) (err error) @@ -1575,7 +1575,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Fchdir(fd int) (err error) //sys Fchmod(fd int, mode uint32) (err error) //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) -//sys fcntl(fd int, cmd int, arg int) (val int, err error) //sys Fdatasync(fd int) (err error) //sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) //sys FinitModule(fd int, params string, flags int) (err error) @@ -1631,6 +1630,17 @@ func Getpgrp() (pid int) { //sysnb Settimeofday(tv *Timeval) (err error) //sys Setns(fd int, nstype int) (err error) +// PrctlRetInt performs a prctl operation specified by option and further +// optional arguments arg2 through arg5 depending on option. It returns a +// non-negative integer that is returned by the prctl syscall. +func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (int, error) { + ret, _, err := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if err != 0 { + return 0, err + } + return int(ret), nil +} + // issue 1435. // On linux Setuid and Setgid only affects the current thread, not the process. // This does not match what most callers expect so we must return an error @@ -1644,6 +1654,30 @@ func Setgid(uid int) (err error) { return EOPNOTSUPP } +// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set. +// setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability. +// If the call fails due to other reasons, current fsgid will be returned. +func SetfsgidRetGid(gid int) (int, error) { + return setfsgid(gid) +} + +// SetfsuidRetUid sets fsuid for current thread and returns previous fsuid set. +// setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability +// If the call fails due to other reasons, current fsuid will be returned. +func SetfsuidRetUid(uid int) (int, error) { + return setfsuid(uid) +} + +func Setfsgid(gid int) error { + _, err := setfsgid(gid) + return err +} + +func Setfsuid(uid int) error { + _, err := setfsuid(uid) + return err +} + func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { return signalfd(fd, sigmask, _C__NSIG/8, flags) } @@ -1666,6 +1700,123 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { //sys exitThread(code int) (err error) = SYS_EXIT //sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ //sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE +//sys readv(fd int, iovs []Iovec) (n int, err error) = SYS_READV +//sys writev(fd int, iovs []Iovec) (n int, err error) = SYS_WRITEV +//sys preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV +//sys pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV +//sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 +//sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 + +func bytes2iovec(bs [][]byte) []Iovec { + iovecs := make([]Iovec, len(bs)) + for i, b := range bs { + iovecs[i].SetLen(len(b)) + if len(b) > 0 { + iovecs[i].Base = &b[0] + } else { + iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero)) + } + } + return iovecs +} + +// offs2lohi splits offs into its lower and upper unsigned long. On 64-bit +// systems, hi will always be 0. On 32-bit systems, offs will be split in half. +// preadv/pwritev chose this calling convention so they don't need to add a +// padding-register for alignment on ARM. +func offs2lohi(offs int64) (lo, hi uintptr) { + return uintptr(offs), uintptr(uint64(offs) >> SizeofLong) +} + +func Readv(fd int, iovs [][]byte) (n int, err error) { + iovecs := bytes2iovec(iovs) + n, err = readv(fd, iovecs) + readvRacedetect(iovecs, n, err) + return n, err +} + +func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { + iovecs := bytes2iovec(iovs) + lo, hi := offs2lohi(offset) + n, err = preadv(fd, iovecs, lo, hi) + readvRacedetect(iovecs, n, err) + return n, err +} + +func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { + iovecs := bytes2iovec(iovs) + lo, hi := offs2lohi(offset) + n, err = preadv2(fd, iovecs, lo, hi, flags) + readvRacedetect(iovecs, n, err) + return n, err +} + +func readvRacedetect(iovecs []Iovec, n int, err error) { + if !raceenabled { + return + } + for i := 0; n > 0 && i < len(iovecs); i++ { + m := int(iovecs[i].Len) + if m > n { + m = n + } + n -= m + if m > 0 { + raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) + } + } + if err == nil { + raceAcquire(unsafe.Pointer(&ioSync)) + } +} + +func Writev(fd int, iovs [][]byte) (n int, err error) { + iovecs := bytes2iovec(iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = writev(fd, iovecs) + writevRacedetect(iovecs, n) + return n, err +} + +func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { + iovecs := bytes2iovec(iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + lo, hi := offs2lohi(offset) + n, err = pwritev(fd, iovecs, lo, hi) + writevRacedetect(iovecs, n) + return n, err +} + +func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { + iovecs := bytes2iovec(iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + lo, hi := offs2lohi(offset) + n, err = pwritev2(fd, iovecs, lo, hi, flags) + writevRacedetect(iovecs, n) + return n, err +} + +func writevRacedetect(iovecs []Iovec, n int) { + if !raceenabled { + return + } + for i := 0; n > 0 && i < len(iovecs); i++ { + m := int(iovecs[i].Len) + if m > n { + m = n + } + n -= m + if m > 0 { + raceReadRange(unsafe.Pointer(iovecs[i].Base), m) + } + } +} // mmap varies by architecture; see syscall_linux_*.go. //sys munmap(addr uintptr, length uintptr) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index e7fa665e68b..a8374b67cf8 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -70,8 +70,8 @@ func Pipe2(p []int, flags int) (err error) { //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 -//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32 -//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32 +//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32 +//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32 //sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32 //sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32 //sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32 diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 088ce0f9356..8ed1d546f0b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -55,8 +55,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 11930fc8fac..99ae6137332 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -98,8 +98,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT -//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32 -//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32 +//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32 +//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32 //sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32 //sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32 //sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32 diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 251e2d97155..807a0b20c3f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -42,8 +42,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index 7562fe97b83..af77e6e25eb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -36,8 +36,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) @@ -216,6 +216,10 @@ func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } +func InotifyInit() (fd int, err error) { + return InotifyInit1(0) +} + //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index a939ff8f219..e286c6ba317 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -31,8 +31,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 28d6d0f229e..ca0345aabf2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -34,8 +34,8 @@ package unix //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 6798c26258a..abdabbac3f4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -41,8 +41,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index eb5cb1a71d8..533e9305e7d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -34,8 +34,8 @@ import ( //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index 37321c12efb..d890a227bf0 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -30,8 +30,8 @@ package unix //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) -//sys Setfsgid(gid int) (err error) -//sys Setfsuid(uid int) (err error) +//sys setfsgid(gid int) (prev int, err error) +//sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index f95463ee287..45b50a6105e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -18,8 +18,6 @@ import ( "unsafe" ) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL - // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Len uint8 @@ -108,23 +106,6 @@ func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } -func SysctlClockinfo(name string) (*Clockinfo, error) { - mib, err := sysctlmib(name) - if err != nil { - return nil, err - } - - n := uintptr(SizeofClockinfo) - var ci Clockinfo - if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { - return nil, err - } - if n != SizeofClockinfo { - return nil, EIO - } - return &ci, nil -} - //sysnb pipe() (fd1 int, fd2 int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -189,6 +170,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL + func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) { var value Ptmget err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) @@ -249,6 +232,14 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e return sendfile(outfd, infd, offset, count) } +func Fstatvfs(fd int, buf *Statvfs_t) (err error) { + return Fstatvfs1(fd, buf, ST_WAIT) +} + +func Statvfs(path string, buf *Statvfs_t) (err error) { + return Statvfs1(path, buf, ST_WAIT) +} + /* * Exposed directly */ @@ -262,6 +253,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) +//sys Dup3(from int, to int, flags int) (err error) //sys Exit(code int) //sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) //sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) @@ -287,6 +279,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) +//sys Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) = SYS_FSTATVFS1 //sys Fsync(fd int) (err error) //sys Ftruncate(fd int, length int64) (err error) //sysnb Getegid() (egid int) @@ -343,6 +336,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) //sys Stat(path string, stat *Stat_t) (err error) +//sys Statvfs1(path string, buf *Statvfs_t, flags int) (err error) = SYS_STATVFS1 //sys Symlink(path string, link string) (err error) //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) //sys Sync() (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 7fe65ef75f8..a266e92a9b1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -18,8 +18,6 @@ import ( "unsafe" ) -//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL - // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Len uint8 @@ -57,23 +55,6 @@ func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } -func SysctlClockinfo(name string) (*Clockinfo, error) { - mib, err := sysctlmib(name) - if err != nil { - return nil, err - } - - n := uintptr(SizeofClockinfo) - var ci Clockinfo - if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { - return nil, err - } - if n != SizeofClockinfo { - return nil, EIO - } - return &ci, nil -} - func SysctlUvmexp(name string) (*Uvmexp, error) { mib, err := sysctlmib(name) if err != nil { @@ -91,16 +72,20 @@ func SysctlUvmexp(name string) (*Uvmexp, error) { return &u, nil } -//sysnb pipe(p *[2]_C_int) (err error) func Pipe(p []int) (err error) { + return Pipe2(p, 0) +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) +func Pipe2(p []int, flags int) error { if len(p) != 2 { return EINVAL } var pp [2]_C_int - err = pipe(&pp) + err := pipe2(&pp, flags) p[0] = int(pp[0]) p[1] = int(pp[1]) - return + return err } //sys Getdents(fd int, buf []byte) (n int, err error) @@ -180,6 +165,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { //sys ioctl(fd int, req uint, arg uintptr) (err error) +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL + //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { @@ -248,6 +235,7 @@ func Uname(uname *Utsname) error { //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) +//sys Dup3(from int, to int, flags int) (err error) //sys Exit(code int) //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) @@ -352,7 +340,6 @@ func Uname(uname *Utsname) error { // clock_settime // closefrom // execve -// fcntl // fhopen // fhstat // fhstatfs diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 62f968c7f02..0e2a696ad36 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -391,7 +391,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { for n < len(pp.Path) && pp.Path[n] != 0 { n++ } - bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go index 1def8a58126..104994bc6a9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go @@ -459,6 +459,15 @@ const ( MAP_SHARED = 0x1 MAP_TYPE = 0xf0 MAP_VARIABLE = 0x0 + MCAST_BLOCK_SOURCE = 0x40 + MCAST_EXCLUDE = 0x2 + MCAST_INCLUDE = 0x1 + MCAST_JOIN_GROUP = 0x3e + MCAST_JOIN_SOURCE_GROUP = 0x42 + MCAST_LEAVE_GROUP = 0x3f + MCAST_LEAVE_SOURCE_GROUP = 0x43 + MCAST_SOURCE_FILTER = 0x49 + MCAST_UNBLOCK_SOURCE = 0x41 MCL_CURRENT = 0x100 MCL_FUTURE = 0x200 MSG_ANY = 0x4 @@ -483,6 +492,7 @@ const ( MS_INVALIDATE = 0x40 MS_PER_SEC = 0x3e8 MS_SYNC = 0x20 + NFDBITS = 0x20 NL0 = 0x0 NL1 = 0x4000 NL2 = 0x8000 @@ -688,7 +698,7 @@ const ( SIOCGHIWAT = 0x40047301 SIOCGIFADDR = -0x3fd796df SIOCGIFADDRS = 0x2000698c - SIOCGIFBAUDRATE = -0x3fd79693 + SIOCGIFBAUDRATE = -0x3fdf9669 SIOCGIFBRDADDR = -0x3fd796dd SIOCGIFCONF = -0x3ff796bb SIOCGIFCONFGLOB = -0x3ff79670 diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go index 03187dea98f..4fc8d306493 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go @@ -459,6 +459,15 @@ const ( MAP_SHARED = 0x1 MAP_TYPE = 0xf0 MAP_VARIABLE = 0x0 + MCAST_BLOCK_SOURCE = 0x40 + MCAST_EXCLUDE = 0x2 + MCAST_INCLUDE = 0x1 + MCAST_JOIN_GROUP = 0x3e + MCAST_JOIN_SOURCE_GROUP = 0x42 + MCAST_LEAVE_GROUP = 0x3f + MCAST_LEAVE_SOURCE_GROUP = 0x43 + MCAST_SOURCE_FILTER = 0x49 + MCAST_UNBLOCK_SOURCE = 0x41 MCL_CURRENT = 0x100 MCL_FUTURE = 0x200 MSG_ANY = 0x4 @@ -483,6 +492,7 @@ const ( MS_INVALIDATE = 0x40 MS_PER_SEC = 0x3e8 MS_SYNC = 0x20 + NFDBITS = 0x40 NL0 = 0x0 NL1 = 0x4000 NL2 = 0x8000 @@ -688,7 +698,7 @@ const ( SIOCGHIWAT = 0x40047301 SIOCGIFADDR = -0x3fd796df SIOCGIFADDRS = 0x2000698c - SIOCGIFBAUDRATE = -0x3fd79693 + SIOCGIFBAUDRATE = -0x3fdf9669 SIOCGIFBRDADDR = -0x3fd796dd SIOCGIFCONF = -0x3fef96bb SIOCGIFCONFGLOB = -0x3fef9670 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go new file mode 100644 index 00000000000..5be454c0d1c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -0,0 +1,2453 @@ +// Code generated by mkmerge.go; DO NOT EDIT. + +// +build linux + +package unix + +import "syscall" + +const ( + AAFS_MAGIC = 0x5a3c69f0 + ADFS_SUPER_MAGIC = 0xadf5 + AFFS_SUPER_MAGIC = 0xadff + AFS_FS_MAGIC = 0x6b414653 + AFS_SUPER_MAGIC = 0x5346414f + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IB = 0x1b + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KCM = 0x29 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x2d + AF_MPLS = 0x1c + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_QIPCRTR = 0x2a + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SMC = 0x2b + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + AF_XDP = 0x2c + ALG_OP_DECRYPT = 0x0 + ALG_OP_ENCRYPT = 0x1 + ALG_SET_AEAD_ASSOCLEN = 0x4 + ALG_SET_AEAD_AUTHSIZE = 0x5 + ALG_SET_IV = 0x2 + ALG_SET_KEY = 0x1 + ALG_SET_OP = 0x3 + ANON_INODE_FS_MAGIC = 0x9041934 + ARPHRD_6LOWPAN = 0x339 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_RAWIP = 0x207 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_VSOCKMON = 0x33a + ARPHRD_X25 = 0x10f + AUTOFS_SUPER_MAGIC = 0x187 + B0 = 0x0 + B110 = 0x3 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2400 = 0xb + B300 = 0x7 + B38400 = 0xf + B4800 = 0xc + B50 = 0x1 + B600 = 0x8 + B75 = 0x2 + B9600 = 0xd + BALLOON_KVM_MAGIC = 0x13661366 + BDEVFS_MAGIC = 0x62646576 + BINDERFS_SUPER_MAGIC = 0x6c6f6f70 + BINFMTFS_MAGIC = 0x42494e4d + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 + BPF_ALU = 0x4 + BPF_ALU64 = 0x7 + BPF_AND = 0x50 + BPF_ANY = 0x0 + BPF_ARSH = 0xc0 + BPF_B = 0x10 + BPF_BUILD_ID_SIZE = 0x14 + BPF_CALL = 0x80 + BPF_DEVCG_ACC_MKNOD = 0x1 + BPF_DEVCG_ACC_READ = 0x2 + BPF_DEVCG_ACC_WRITE = 0x4 + BPF_DEVCG_DEV_BLOCK = 0x1 + BPF_DEVCG_DEV_CHAR = 0x2 + BPF_DIV = 0x30 + BPF_DW = 0x18 + BPF_END = 0xd0 + BPF_EXIST = 0x2 + BPF_EXIT = 0x90 + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1 + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4 + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2 + BPF_FROM_BE = 0x8 + BPF_FROM_LE = 0x0 + BPF_FS_MAGIC = 0xcafe4a11 + BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 + BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 + BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 + BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 + BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 + BPF_F_ALLOW_MULTI = 0x2 + BPF_F_ALLOW_OVERRIDE = 0x1 + BPF_F_ANY_ALIGNMENT = 0x2 + BPF_F_CLONE = 0x200 + BPF_F_CTXLEN_MASK = 0xfffff00000000 + BPF_F_CURRENT_CPU = 0xffffffff + BPF_F_CURRENT_NETNS = -0x1 + BPF_F_DONT_FRAGMENT = 0x4 + BPF_F_FAST_STACK_CMP = 0x200 + BPF_F_HDR_FIELD_MASK = 0xf + BPF_F_INDEX_MASK = 0xffffffff + BPF_F_INGRESS = 0x1 + BPF_F_INVALIDATE_HASH = 0x2 + BPF_F_LOCK = 0x4 + BPF_F_MARK_ENFORCE = 0x40 + BPF_F_MARK_MANGLED_0 = 0x20 + BPF_F_MMAPABLE = 0x400 + BPF_F_NO_COMMON_LRU = 0x2 + BPF_F_NO_PREALLOC = 0x1 + BPF_F_NUMA_NODE = 0x4 + BPF_F_PSEUDO_HDR = 0x10 + BPF_F_QUERY_EFFECTIVE = 0x1 + BPF_F_RDONLY = 0x8 + BPF_F_RDONLY_PROG = 0x80 + BPF_F_RECOMPUTE_CSUM = 0x1 + BPF_F_REUSE_STACKID = 0x400 + BPF_F_SEQ_NUMBER = 0x8 + BPF_F_SKIP_FIELD_MASK = 0xff + BPF_F_STACK_BUILD_ID = 0x20 + BPF_F_STRICT_ALIGNMENT = 0x1 + BPF_F_SYSCTL_BASE_NAME = 0x1 + BPF_F_TEST_RND_HI32 = 0x4 + BPF_F_TEST_STATE_FREQ = 0x8 + BPF_F_TUNINFO_IPV6 = 0x1 + BPF_F_USER_BUILD_ID = 0x800 + BPF_F_USER_STACK = 0x100 + BPF_F_WRONLY = 0x10 + BPF_F_WRONLY_PROG = 0x100 + BPF_F_ZERO_CSUM_TX = 0x2 + BPF_F_ZERO_SEED = 0x40 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JLE = 0xb0 + BPF_JLT = 0xa0 + BPF_JMP = 0x5 + BPF_JMP32 = 0x6 + BPF_JNE = 0x50 + BPF_JSET = 0x40 + BPF_JSGE = 0x70 + BPF_JSGT = 0x60 + BPF_JSLE = 0xd0 + BPF_JSLT = 0xc0 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LL_OFF = -0x200000 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MOV = 0xb0 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_NET_OFF = -0x100000 + BPF_NOEXIST = 0x1 + BPF_OBJ_NAME_LEN = 0x10 + BPF_OR = 0x40 + BPF_PSEUDO_CALL = 0x1 + BPF_PSEUDO_MAP_FD = 0x1 + BPF_PSEUDO_MAP_VALUE = 0x2 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_SK_STORAGE_GET_F_CREATE = 0x1 + BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf + BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 + BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 + BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 + BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAG_SIZE = 0x8 + BPF_TAX = 0x0 + BPF_TO_BE = 0x8 + BPF_TO_LE = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XADD = 0xc0 + BPF_XOR = 0xa0 + BRKINT = 0x2 + BS0 = 0x0 + BTRFS_SUPER_MAGIC = 0x9123683e + BTRFS_TEST_MAGIC = 0x73727279 + CAN_BCM = 0x2 + CAN_EFF_FLAG = 0x80000000 + CAN_EFF_ID_BITS = 0x1d + CAN_EFF_MASK = 0x1fffffff + CAN_ERR_FLAG = 0x20000000 + CAN_ERR_MASK = 0x1fffffff + CAN_INV_FILTER = 0x20000000 + CAN_ISOTP = 0x6 + CAN_J1939 = 0x7 + CAN_MAX_DLC = 0x8 + CAN_MAX_DLEN = 0x8 + CAN_MCNET = 0x5 + CAN_MTU = 0x10 + CAN_NPROTO = 0x8 + CAN_RAW = 0x1 + CAN_RAW_FILTER_MAX = 0x200 + CAN_RTR_FLAG = 0x40000000 + CAN_SFF_ID_BITS = 0xb + CAN_SFF_MASK = 0x7ff + CAN_TP16 = 0x3 + CAN_TP20 = 0x4 + CAP_AUDIT_CONTROL = 0x1e + CAP_AUDIT_READ = 0x25 + CAP_AUDIT_WRITE = 0x1d + CAP_BLOCK_SUSPEND = 0x24 + CAP_CHOWN = 0x0 + CAP_DAC_OVERRIDE = 0x1 + CAP_DAC_READ_SEARCH = 0x2 + CAP_FOWNER = 0x3 + CAP_FSETID = 0x4 + CAP_IPC_LOCK = 0xe + CAP_IPC_OWNER = 0xf + CAP_KILL = 0x5 + CAP_LAST_CAP = 0x25 + CAP_LEASE = 0x1c + CAP_LINUX_IMMUTABLE = 0x9 + CAP_MAC_ADMIN = 0x21 + CAP_MAC_OVERRIDE = 0x20 + CAP_MKNOD = 0x1b + CAP_NET_ADMIN = 0xc + CAP_NET_BIND_SERVICE = 0xa + CAP_NET_BROADCAST = 0xb + CAP_NET_RAW = 0xd + CAP_SETFCAP = 0x1f + CAP_SETGID = 0x6 + CAP_SETPCAP = 0x8 + CAP_SETUID = 0x7 + CAP_SYSLOG = 0x22 + CAP_SYS_ADMIN = 0x15 + CAP_SYS_BOOT = 0x16 + CAP_SYS_CHROOT = 0x12 + CAP_SYS_MODULE = 0x10 + CAP_SYS_NICE = 0x17 + CAP_SYS_PACCT = 0x14 + CAP_SYS_PTRACE = 0x13 + CAP_SYS_RAWIO = 0x11 + CAP_SYS_RESOURCE = 0x18 + CAP_SYS_TIME = 0x19 + CAP_SYS_TTY_CONFIG = 0x1a + CAP_WAKE_ALARM = 0x23 + CFLUSH = 0xf + CGROUP2_SUPER_MAGIC = 0x63677270 + CGROUP_SUPER_MAGIC = 0x27e0eb + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_TAI = 0xb + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_ARGS_SIZE_VER0 = 0x40 + CLONE_ARGS_SIZE_VER1 = 0x50 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_CLEAR_SIGHAND = 0x100000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PIDFD = 0x1000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CODA_SUPER_MAGIC = 0x73757245 + CR0 = 0x0 + CRAMFS_MAGIC = 0x28cd3d45 + CRTSCTS = 0x80000000 + CRYPTO_MAX_NAME = 0x40 + CRYPTO_MSG_MAX = 0x15 + CRYPTO_NR_MSGTYPES = 0x6 + CRYPTO_REPORT_MAXSIZE = 0x160 + CS5 = 0x0 + CSIGNAL = 0xff + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSUSP = 0x1a + DAXFS_MAGIC = 0x64646178 + DEBUGFS_MAGIC = 0x64626720 + DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d + DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e + DEVLINK_GENL_MCGRP_CONFIG_NAME = "config" + DEVLINK_GENL_NAME = "devlink" + DEVLINK_GENL_VERSION = 0x1 + DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 + DEVPTS_SUPER_MAGIC = 0x1cd1 + DMA_BUF_MAGIC = 0x444d4142 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECRYPTFS_SUPER_MAGIC = 0xf15f + EFD_SEMAPHORE = 0x1 + EFIVARFS_MAGIC = 0xde5e81e4 + EFS_SUPER_MAGIC = 0x414a53 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLEXCLUSIVE = 0x10000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_80221 = 0x8917 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_DSA_8021Q = 0xdadb + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_ERSPAN = 0x88be + ETH_P_ERSPAN2 = 0x22eb + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_HSR = 0x892f + ETH_P_IBOE = 0x8915 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IFE = 0xed3e + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LLDP = 0x88cc + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_LOOPBACK = 0x9000 + ETH_P_MACSEC = 0x88e5 + ETH_P_MAP = 0xf9 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_NCSI = 0x88f8 + ETH_P_NSH = 0x894f + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PREAUTH = 0x88c7 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_TSN = 0x22f0 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + ETH_P_XDSA = 0xf8 + EXABYTE_ENABLE_NEST = 0xf0 + EXT2_SUPER_MAGIC = 0xef53 + EXT3_SUPER_MAGIC = 0xef53 + EXT4_SUPER_MAGIC = 0xef53 + EXTA = 0xe + EXTB = 0xf + F2FS_SUPER_MAGIC = 0xf2f52010 + FALLOC_FL_COLLAPSE_RANGE = 0x8 + FALLOC_FL_INSERT_RANGE = 0x20 + FALLOC_FL_KEEP_SIZE = 0x1 + FALLOC_FL_NO_HIDE_STALE = 0x4 + FALLOC_FL_PUNCH_HOLE = 0x2 + FALLOC_FL_UNSHARE_RANGE = 0x40 + FALLOC_FL_ZERO_RANGE = 0x10 + FANOTIFY_METADATA_VERSION = 0x3 + FAN_ACCESS = 0x1 + FAN_ACCESS_PERM = 0x20000 + FAN_ALLOW = 0x1 + FAN_ALL_CLASS_BITS = 0xc + FAN_ALL_EVENTS = 0x3b + FAN_ALL_INIT_FLAGS = 0x3f + FAN_ALL_MARK_FLAGS = 0xff + FAN_ALL_OUTGOING_EVENTS = 0x3403b + FAN_ALL_PERM_EVENTS = 0x30000 + FAN_ATTRIB = 0x4 + FAN_AUDIT = 0x10 + FAN_CLASS_CONTENT = 0x4 + FAN_CLASS_NOTIF = 0x0 + FAN_CLASS_PRE_CONTENT = 0x8 + FAN_CLOEXEC = 0x1 + FAN_CLOSE = 0x18 + FAN_CLOSE_NOWRITE = 0x10 + FAN_CLOSE_WRITE = 0x8 + FAN_CREATE = 0x100 + FAN_DELETE = 0x200 + FAN_DELETE_SELF = 0x400 + FAN_DENY = 0x2 + FAN_ENABLE_AUDIT = 0x40 + FAN_EVENT_INFO_TYPE_FID = 0x1 + FAN_EVENT_METADATA_LEN = 0x18 + FAN_EVENT_ON_CHILD = 0x8000000 + FAN_MARK_ADD = 0x1 + FAN_MARK_DONT_FOLLOW = 0x4 + FAN_MARK_FILESYSTEM = 0x100 + FAN_MARK_FLUSH = 0x80 + FAN_MARK_IGNORED_MASK = 0x20 + FAN_MARK_IGNORED_SURV_MODIFY = 0x40 + FAN_MARK_INODE = 0x0 + FAN_MARK_MOUNT = 0x10 + FAN_MARK_ONLYDIR = 0x8 + FAN_MARK_REMOVE = 0x2 + FAN_MODIFY = 0x2 + FAN_MOVE = 0xc0 + FAN_MOVED_FROM = 0x40 + FAN_MOVED_TO = 0x80 + FAN_MOVE_SELF = 0x800 + FAN_NOFD = -0x1 + FAN_NONBLOCK = 0x2 + FAN_ONDIR = 0x40000000 + FAN_OPEN = 0x20 + FAN_OPEN_EXEC = 0x1000 + FAN_OPEN_EXEC_PERM = 0x40000 + FAN_OPEN_PERM = 0x10000 + FAN_Q_OVERFLOW = 0x4000 + FAN_REPORT_FID = 0x200 + FAN_REPORT_TID = 0x100 + FAN_UNLIMITED_MARKS = 0x20 + FAN_UNLIMITED_QUEUE = 0x10 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8 + FSCRYPT_KEY_DESC_PREFIX = "fscrypt:" + FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8 + FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10 + FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1 + FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2 + FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1 + FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2 + FSCRYPT_KEY_STATUS_ABSENT = 0x1 + FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1 + FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3 + FSCRYPT_KEY_STATUS_PRESENT = 0x2 + FSCRYPT_MAX_KEY_SIZE = 0x40 + FSCRYPT_MODE_ADIANTUM = 0x9 + FSCRYPT_MODE_AES_128_CBC = 0x5 + FSCRYPT_MODE_AES_128_CTS = 0x6 + FSCRYPT_MODE_AES_256_CTS = 0x4 + FSCRYPT_MODE_AES_256_XTS = 0x1 + FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2 + FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3 + FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0 + FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1 + FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3 + FSCRYPT_POLICY_FLAGS_VALID = 0xf + FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4 + FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8 + FSCRYPT_POLICY_V1 = 0x0 + FSCRYPT_POLICY_V2 = 0x2 + FS_ENCRYPTION_MODE_ADIANTUM = 0x9 + FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 + FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 + FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 + FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 + FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 + FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 + FS_ENCRYPTION_MODE_INVALID = 0x0 + FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 + FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 + FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617 + FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a + FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616 + FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618 + FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619 + FS_KEY_DESCRIPTOR_SIZE = 0x8 + FS_KEY_DESC_PREFIX = "fscrypt:" + FS_KEY_DESC_PREFIX_SIZE = 0x8 + FS_MAX_KEY_SIZE = 0x40 + FS_POLICY_FLAGS_PAD_16 = 0x2 + FS_POLICY_FLAGS_PAD_32 = 0x3 + FS_POLICY_FLAGS_PAD_4 = 0x0 + FS_POLICY_FLAGS_PAD_8 = 0x1 + FS_POLICY_FLAGS_PAD_MASK = 0x3 + FS_POLICY_FLAGS_VALID = 0xf + FUTEXFS_SUPER_MAGIC = 0xbad1dea + F_ADD_SEALS = 0x409 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_GET_FILE_RW_HINT = 0x40d + F_GET_RW_HINT = 0x40b + F_GET_SEALS = 0x40a + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OFD_GETLK = 0x24 + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 + F_SEAL_FUTURE_WRITE = 0x10 + F_SEAL_GROW = 0x4 + F_SEAL_SEAL = 0x1 + F_SEAL_SHRINK = 0x2 + F_SEAL_WRITE = 0x8 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SET_FILE_RW_HINT = 0x40e + F_SET_RW_HINT = 0x40c + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + GENL_ADMIN_PERM = 0x1 + GENL_CMD_CAP_DO = 0x2 + GENL_CMD_CAP_DUMP = 0x4 + GENL_CMD_CAP_HASPOL = 0x8 + GENL_HDRLEN = 0x4 + GENL_ID_CTRL = 0x10 + GENL_ID_PMCRAID = 0x12 + GENL_ID_VFS_DQUOT = 0x11 + GENL_MAX_ID = 0x3ff + GENL_MIN_ID = 0x10 + GENL_NAMSIZ = 0x10 + GENL_START_ALLOC = 0x13 + GENL_UNS_ADMIN_PERM = 0x10 + GRND_NONBLOCK = 0x1 + GRND_RANDOM = 0x2 + HDIO_DRIVE_CMD = 0x31f + HDIO_DRIVE_CMD_AEB = 0x31e + HDIO_DRIVE_CMD_HDR_SIZE = 0x4 + HDIO_DRIVE_HOB_HDR_SIZE = 0x8 + HDIO_DRIVE_RESET = 0x31c + HDIO_DRIVE_TASK = 0x31e + HDIO_DRIVE_TASKFILE = 0x31d + HDIO_DRIVE_TASK_HDR_SIZE = 0x8 + HDIO_GETGEO = 0x301 + HDIO_GET_32BIT = 0x309 + HDIO_GET_ACOUSTIC = 0x30f + HDIO_GET_ADDRESS = 0x310 + HDIO_GET_BUSSTATE = 0x31a + HDIO_GET_DMA = 0x30b + HDIO_GET_IDENTITY = 0x30d + HDIO_GET_KEEPSETTINGS = 0x308 + HDIO_GET_MULTCOUNT = 0x304 + HDIO_GET_NICE = 0x30c + HDIO_GET_NOWERR = 0x30a + HDIO_GET_QDMA = 0x305 + HDIO_GET_UNMASKINTR = 0x302 + HDIO_GET_WCACHE = 0x30e + HDIO_OBSOLETE_IDENTITY = 0x307 + HDIO_SCAN_HWIF = 0x328 + HDIO_SET_32BIT = 0x324 + HDIO_SET_ACOUSTIC = 0x32c + HDIO_SET_ADDRESS = 0x32f + HDIO_SET_BUSSTATE = 0x32d + HDIO_SET_DMA = 0x326 + HDIO_SET_KEEPSETTINGS = 0x323 + HDIO_SET_MULTCOUNT = 0x321 + HDIO_SET_NICE = 0x329 + HDIO_SET_NOWERR = 0x325 + HDIO_SET_PIO_MODE = 0x327 + HDIO_SET_QDMA = 0x32e + HDIO_SET_UNMASKINTR = 0x322 + HDIO_SET_WCACHE = 0x32b + HDIO_SET_XFER = 0x306 + HDIO_TRISTATE_HWIF = 0x31b + HDIO_UNREGISTER_HWIF = 0x32a + HOSTFS_SUPER_MAGIC = 0xc0ffee + HPFS_SUPER_MAGIC = 0xf995e849 + HUGETLBFS_MAGIC = 0x958458f6 + IBSHIFT = 0x10 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_MANAGETEMPADDR = 0x100 + IFA_F_MCAUTOJOIN = 0x400 + IFA_F_NODAD = 0x2 + IFA_F_NOPREFIXROUTE = 0x200 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_STABLE_PRIVACY = 0x800 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0xa + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_ECHO = 0x40000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NAPI = 0x10 + IFF_NAPI_FRAGS = 0x20 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MASK_CREATE = 0x10000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADDR_PREFERENCES = 0x48 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_AUTOFLOWLABEL = 0x46 + IPV6_CHECKSUM = 0x7 + IPV6_DONTFRAG = 0x3e + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_FREEBIND = 0x4e + IPV6_HDRINCL = 0x24 + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MINHOPCOUNT = 0x49 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_ALL = 0x1d + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_ORIGDSTADDR = 0x4a + IPV6_PATHMTU = 0x3d + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_INTERFACE = 0x4 + IPV6_PMTUDISC_OMIT = 0x5 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVFRAGSIZE = 0x4d + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVORIGDSTADDR = 0x4a + IPV6_RECVPATHMTU = 0x3c + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_ROUTER_ALERT_ISOLATE = 0x1e + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_TRANSPARENT = 0x4b + IPV6_UNICAST_HOPS = 0x10 + IPV6_UNICAST_IF = 0x4c + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BIND_ADDRESS_NO_PORT = 0x18 + IP_BLOCK_SOURCE = 0x26 + IP_CHECKSUM = 0x17 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_NODEFRAG = 0x16 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_INTERFACE = 0x4 + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVFRAGSIZE = 0x19 + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISOFS_SUPER_MAGIC = 0x9660 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + JFFS2_SUPER_MAGIC = 0x72b6 + KEXEC_ARCH_386 = 0x30000 + KEXEC_ARCH_68K = 0x40000 + KEXEC_ARCH_AARCH64 = 0xb70000 + KEXEC_ARCH_ARM = 0x280000 + KEXEC_ARCH_DEFAULT = 0x0 + KEXEC_ARCH_IA_64 = 0x320000 + KEXEC_ARCH_MASK = 0xffff0000 + KEXEC_ARCH_MIPS = 0x80000 + KEXEC_ARCH_MIPS_LE = 0xa0000 + KEXEC_ARCH_PARISC = 0xf0000 + KEXEC_ARCH_PPC = 0x140000 + KEXEC_ARCH_PPC64 = 0x150000 + KEXEC_ARCH_S390 = 0x160000 + KEXEC_ARCH_SH = 0x2a0000 + KEXEC_ARCH_X86_64 = 0x3e0000 + KEXEC_FILE_NO_INITRAMFS = 0x4 + KEXEC_FILE_ON_CRASH = 0x2 + KEXEC_FILE_UNLOAD = 0x1 + KEXEC_ON_CRASH = 0x1 + KEXEC_PRESERVE_CONTEXT = 0x2 + KEXEC_SEGMENT_MAX = 0x10 + KEYCTL_ASSUME_AUTHORITY = 0x10 + KEYCTL_CAPABILITIES = 0x1f + KEYCTL_CAPS0_BIG_KEY = 0x10 + KEYCTL_CAPS0_CAPABILITIES = 0x1 + KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 + KEYCTL_CAPS0_INVALIDATE = 0x20 + KEYCTL_CAPS0_MOVE = 0x80 + KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 + KEYCTL_CAPS0_PUBLIC_KEY = 0x8 + KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 + KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 + KEYCTL_CAPS1_NS_KEY_TAG = 0x2 + KEYCTL_CHOWN = 0x4 + KEYCTL_CLEAR = 0x7 + KEYCTL_DESCRIBE = 0x6 + KEYCTL_DH_COMPUTE = 0x17 + KEYCTL_GET_KEYRING_ID = 0x0 + KEYCTL_GET_PERSISTENT = 0x16 + KEYCTL_GET_SECURITY = 0x11 + KEYCTL_INSTANTIATE = 0xc + KEYCTL_INSTANTIATE_IOV = 0x14 + KEYCTL_INVALIDATE = 0x15 + KEYCTL_JOIN_SESSION_KEYRING = 0x1 + KEYCTL_LINK = 0x8 + KEYCTL_MOVE = 0x1e + KEYCTL_MOVE_EXCL = 0x1 + KEYCTL_NEGATE = 0xd + KEYCTL_PKEY_DECRYPT = 0x1a + KEYCTL_PKEY_ENCRYPT = 0x19 + KEYCTL_PKEY_QUERY = 0x18 + KEYCTL_PKEY_SIGN = 0x1b + KEYCTL_PKEY_VERIFY = 0x1c + KEYCTL_READ = 0xb + KEYCTL_REJECT = 0x13 + KEYCTL_RESTRICT_KEYRING = 0x1d + KEYCTL_REVOKE = 0x3 + KEYCTL_SEARCH = 0xa + KEYCTL_SESSION_TO_PARENT = 0x12 + KEYCTL_SETPERM = 0x5 + KEYCTL_SET_REQKEY_KEYRING = 0xe + KEYCTL_SET_TIMEOUT = 0xf + KEYCTL_SUPPORTS_DECRYPT = 0x2 + KEYCTL_SUPPORTS_ENCRYPT = 0x1 + KEYCTL_SUPPORTS_SIGN = 0x4 + KEYCTL_SUPPORTS_VERIFY = 0x8 + KEYCTL_UNLINK = 0x9 + KEYCTL_UPDATE = 0x2 + KEY_REQKEY_DEFL_DEFAULT = 0x0 + KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 + KEY_REQKEY_DEFL_NO_CHANGE = -0x1 + KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 + KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 + KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 + KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 + KEY_REQKEY_DEFL_USER_KEYRING = 0x4 + KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 + KEY_SPEC_GROUP_KEYRING = -0x6 + KEY_SPEC_PROCESS_KEYRING = -0x2 + KEY_SPEC_REQKEY_AUTH_KEY = -0x7 + KEY_SPEC_REQUESTOR_KEYRING = -0x8 + KEY_SPEC_SESSION_KEYRING = -0x3 + KEY_SPEC_THREAD_KEYRING = -0x1 + KEY_SPEC_USER_KEYRING = -0x4 + KEY_SPEC_USER_SESSION_KEYRING = -0x5 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + LOOP_CLR_FD = 0x4c01 + LOOP_CTL_ADD = 0x4c80 + LOOP_CTL_GET_FREE = 0x4c82 + LOOP_CTL_REMOVE = 0x4c81 + LOOP_GET_STATUS = 0x4c03 + LOOP_GET_STATUS64 = 0x4c05 + LOOP_SET_BLOCK_SIZE = 0x4c09 + LOOP_SET_CAPACITY = 0x4c07 + LOOP_SET_DIRECT_IO = 0x4c08 + LOOP_SET_FD = 0x4c00 + LOOP_SET_STATUS = 0x4c02 + LOOP_SET_STATUS64 = 0x4c04 + LO_KEY_SIZE = 0x20 + LO_NAME_SIZE = 0x40 + MADV_COLD = 0x14 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_FREE = 0x8 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_KEEPONFORK = 0x13 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_PAGEOUT = 0x15 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MADV_WIPEONFORK = 0x12 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FIXED_NOREPLACE = 0x100000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_SHARED_VALIDATE = 0x3 + MAP_TYPE = 0xf + MCAST_BLOCK_SOURCE = 0x2b + MCAST_EXCLUDE = 0x0 + MCAST_INCLUDE = 0x1 + MCAST_JOIN_GROUP = 0x2a + MCAST_JOIN_SOURCE_GROUP = 0x2e + MCAST_LEAVE_GROUP = 0x2d + MCAST_LEAVE_SOURCE_GROUP = 0x2f + MCAST_MSFILTER = 0x30 + MCAST_UNBLOCK_SOURCE = 0x2c + MFD_ALLOW_SEALING = 0x2 + MFD_CLOEXEC = 0x1 + MFD_HUGETLB = 0x4 + MFD_HUGE_16GB = -0x78000000 + MFD_HUGE_16MB = 0x60000000 + MFD_HUGE_1GB = 0x78000000 + MFD_HUGE_1MB = 0x50000000 + MFD_HUGE_256MB = 0x70000000 + MFD_HUGE_2GB = 0x7c000000 + MFD_HUGE_2MB = 0x54000000 + MFD_HUGE_32MB = 0x64000000 + MFD_HUGE_512KB = 0x4c000000 + MFD_HUGE_512MB = 0x74000000 + MFD_HUGE_64KB = 0x40000000 + MFD_HUGE_8MB = 0x5c000000 + MFD_HUGE_MASK = 0x3f + MFD_HUGE_SHIFT = 0x1a + MINIX2_SUPER_MAGIC = 0x2468 + MINIX2_SUPER_MAGIC2 = 0x2478 + MINIX3_SUPER_MAGIC = 0x4d5a + MINIX_SUPER_MAGIC = 0x137f + MINIX_SUPER_MAGIC2 = 0x138f + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 + MSDOS_SUPER_MAGIC = 0x4d44 + MSG_BATCH = 0x40000 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MSG_ZEROCOPY = 0x4000000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_BORN = 0x20000000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_LAZYTIME = 0x2000000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOREMOTELOCK = 0x8000000 + MS_NOSEC = 0x10000000 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x2800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SUBMOUNT = 0x4000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + MS_VERBOSE = 0x8000 + MTD_INODE_FS_MAGIC = 0x11307854 + NAME_MAX = 0xff + NCP_SUPER_MAGIC = 0x564c + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CAP_ACK = 0xa + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_EXT_ACK = 0xb + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_GET_STRICT_CHK = 0xc + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_LISTEN_ALL_NSID = 0x8 + NETLINK_LIST_MEMBERSHIPS = 0x9 + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SMC = 0x16 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NETNSA_MAX = 0x5 + NETNSA_NSID_NOT_ASSIGNED = -0x1 + NFNETLINK_V0 = 0x0 + NFNLGRP_ACCT_QUOTA = 0x8 + NFNLGRP_CONNTRACK_DESTROY = 0x3 + NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 + NFNLGRP_CONNTRACK_EXP_NEW = 0x4 + NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 + NFNLGRP_CONNTRACK_NEW = 0x1 + NFNLGRP_CONNTRACK_UPDATE = 0x2 + NFNLGRP_MAX = 0x9 + NFNLGRP_NFTABLES = 0x7 + NFNLGRP_NFTRACE = 0x9 + NFNLGRP_NONE = 0x0 + NFNL_BATCH_MAX = 0x1 + NFNL_MSG_BATCH_BEGIN = 0x10 + NFNL_MSG_BATCH_END = 0x11 + NFNL_NFA_NEST = 0x8000 + NFNL_SUBSYS_ACCT = 0x7 + NFNL_SUBSYS_COUNT = 0xc + NFNL_SUBSYS_CTHELPER = 0x9 + NFNL_SUBSYS_CTNETLINK = 0x1 + NFNL_SUBSYS_CTNETLINK_EXP = 0x2 + NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 + NFNL_SUBSYS_IPSET = 0x6 + NFNL_SUBSYS_NFTABLES = 0xa + NFNL_SUBSYS_NFT_COMPAT = 0xb + NFNL_SUBSYS_NONE = 0x0 + NFNL_SUBSYS_OSF = 0x5 + NFNL_SUBSYS_QUEUE = 0x3 + NFNL_SUBSYS_ULOG = 0x4 + NFS_SUPER_MAGIC = 0x6969 + NILFS_SUPER_MAGIC = 0x3434 + NL0 = 0x0 + NL1 = 0x100 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_ACK_TLVS = 0x200 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CAPPED = 0x100 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_FILTERED = 0x20 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_NONREC = 0x100 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NSFS_MAGIC = 0x6e736673 + OCFS2_SUPER_MAGIC = 0x7461636f + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLRET = 0x20 + ONOCR = 0x10 + OPENPROM_SUPER_MAGIC = 0x9fa1 + OPOST = 0x1 + OVERLAYFS_SUPER_MAGIC = 0x794c7630 + O_ACCMODE = 0x3 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CBPF = 0x6 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_DATA = 0x16 + PACKET_FANOUT_EBPF = 0x7 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_QM = 0x5 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_IGNORE_OUTGOING = 0x17 + PACKET_KERNEL = 0x7 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_QDISC_BYPASS = 0x14 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_ROLLOVER_STATS = 0x15 + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_USER = 0x6 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PIPEFS_MAGIC = 0x50495045 + PPC_CMM_MAGIC = 0xc7571590 + PPPIOCGNPMODE = 0xc008744c + PPPIOCNEWUNIT = 0xc004743e + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROC_SUPER_MAGIC = 0x9fa0 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_CAP_AMBIENT = 0x2f + PR_CAP_AMBIENT_CLEAR_ALL = 0x4 + PR_CAP_AMBIENT_IS_SET = 0x1 + PR_CAP_AMBIENT_LOWER = 0x3 + PR_CAP_AMBIENT_RAISE = 0x2 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_FP_MODE_FR = 0x1 + PR_FP_MODE_FRE = 0x2 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_FP_MODE = 0x2e + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_SPECULATION_CTRL = 0x34 + PR_GET_TAGGED_ADDR_CTRL = 0x38 + PR_GET_THP_DISABLE = 0x2a + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_MPX_DISABLE_MANAGEMENT = 0x2c + PR_MPX_ENABLE_MANAGEMENT = 0x2b + PR_PAC_APDAKEY = 0x4 + PR_PAC_APDBKEY = 0x8 + PR_PAC_APGAKEY = 0x10 + PR_PAC_APIAKEY = 0x1 + PR_PAC_APIBKEY = 0x2 + PR_PAC_RESET_KEYS = 0x36 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_FP_MODE = 0x2d + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_MAP = 0xe + PR_SET_MM_MAP_SIZE = 0xf + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_SPECULATION_CTRL = 0x35 + PR_SET_TAGGED_ADDR_CTRL = 0x37 + PR_SET_THP_DISABLE = 0x29 + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_SPEC_DISABLE = 0x4 + PR_SPEC_DISABLE_NOEXEC = 0x10 + PR_SPEC_ENABLE = 0x2 + PR_SPEC_FORCE_DISABLE = 0x8 + PR_SPEC_INDIRECT_BRANCH = 0x1 + PR_SPEC_NOT_AFFECTED = 0x0 + PR_SPEC_PRCTL = 0x1 + PR_SPEC_STORE_BYPASS = 0x0 + PR_SVE_GET_VL = 0x33 + PR_SVE_SET_VL = 0x32 + PR_SVE_SET_VL_ONEXEC = 0x40000 + PR_SVE_VL_INHERIT = 0x20000 + PR_SVE_VL_LEN_MASK = 0xffff + PR_TAGGED_ADDR_ENABLE = 0x1 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PSTOREFS_MAGIC = 0x6165676c + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 + PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GET_SYSCALL_INFO = 0x420e + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x3000ff + PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SECCOMP_GET_FILTER = 0x420c + PTRACE_SECCOMP_GET_METADATA = 0x420d + PTRACE_SEIZE = 0x4206 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_SYSCALL_INFO_ENTRY = 0x1 + PTRACE_SYSCALL_INFO_EXIT = 0x2 + PTRACE_SYSCALL_INFO_NONE = 0x0 + PTRACE_SYSCALL_INFO_SECCOMP = 0x3 + PTRACE_TRACEME = 0x0 + QNX4_SUPER_MAGIC = 0x2f + QNX6_SUPER_MAGIC = 0x68191122 + RAMFS_MAGIC = 0x858458f6 + RDTGROUP_SUPER_MAGIC = 0x7655821 + REISERFS_SUPER_MAGIC = 0x52654973 + RENAME_EXCHANGE = 0x2 + RENAME_NOREPLACE = 0x1 + RENAME_WHITEOUT = 0x4 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_LOCKS = 0xa + RLIMIT_MSGQUEUE = 0xc + RLIMIT_NICE = 0xd + RLIMIT_RTPRIO = 0xe + RLIMIT_RTTIME = 0xf + RLIMIT_SIGPENDING = 0xb + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0xffffffffffffffff + RTAX_ADVMSS = 0x8 + RTAX_CC_ALGO = 0x10 + RTAX_CWND = 0x7 + RTAX_FASTOPEN_NO_COOKIE = 0x11 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0x11 + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x1e + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTC_AF = 0x20 + RTC_IRQF = 0x80 + RTC_MAX_FREQ = 0x2000 + RTC_PF = 0x40 + RTC_UF = 0x10 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTMGRP_DECnet_IFADDR = 0x1000 + RTMGRP_DECnet_ROUTE = 0x4000 + RTMGRP_IPV4_IFADDR = 0x10 + RTMGRP_IPV4_MROUTE = 0x20 + RTMGRP_IPV4_ROUTE = 0x40 + RTMGRP_IPV4_RULE = 0x80 + RTMGRP_IPV6_IFADDR = 0x100 + RTMGRP_IPV6_IFINFO = 0x800 + RTMGRP_IPV6_MROUTE = 0x200 + RTMGRP_IPV6_PREFIX = 0x20000 + RTMGRP_IPV6_ROUTE = 0x400 + RTMGRP_LINK = 0x1 + RTMGRP_NEIGH = 0x4 + RTMGRP_NOTIFY = 0x2 + RTMGRP_TC = 0x8 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELCHAIN = 0x65 + RTM_DELLINK = 0x11 + RTM_DELLINKPROP = 0x6d + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELNETCONF = 0x51 + RTM_DELNEXTHOP = 0x69 + RTM_DELNSID = 0x59 + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_FIB_MATCH = 0x2000 + RTM_F_LOOKUP_TABLE = 0x1000 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETCHAIN = 0x66 + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETLINKPROP = 0x6e + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETNEXTHOP = 0x6a + RTM_GETNSID = 0x5a + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETSTATS = 0x5e + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x6f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWCACHEREPORT = 0x60 + RTM_NEWCHAIN = 0x64 + RTM_NEWLINK = 0x10 + RTM_NEWLINKPROP = 0x6c + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWNEXTHOP = 0x68 + RTM_NEWNSID = 0x58 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWSTATS = 0x5c + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x18 + RTM_NR_MSGTYPES = 0x60 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_COMPARE_MASK = 0x19 + RTNH_F_DEAD = 0x1 + RTNH_F_LINKDOWN = 0x10 + RTNH_F_OFFLOAD = 0x8 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTNH_F_UNRESOLVED = 0x20 + RTN_MAX = 0xb + RTPROT_BABEL = 0x2a + RTPROT_BGP = 0xba + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_EIGRP = 0xc0 + RTPROT_GATED = 0x8 + RTPROT_ISIS = 0xbb + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_OSPF = 0xbc + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_RIP = 0xbd + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + RWF_APPEND = 0x10 + RWF_DSYNC = 0x2 + RWF_HIPRI = 0x1 + RWF_NOWAIT = 0x8 + RWF_SUPPORTED = 0x1f + RWF_SYNC = 0x4 + RWF_WRITE_LIFE_NOT_SET = 0x0 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SC_LOG_FLUSH = 0x100000 + SECCOMP_MODE_DISABLED = 0x0 + SECCOMP_MODE_FILTER = 0x2 + SECCOMP_MODE_STRICT = 0x1 + SECURITYFS_MAGIC = 0x73636673 + SELINUX_MAGIC = 0xf97cff8c + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCBONDCHANGEACTIVE = 0x8995 + SIOCBONDENSLAVE = 0x8990 + SIOCBONDINFOQUERY = 0x8994 + SIOCBONDRELEASE = 0x8991 + SIOCBONDSETHWADDR = 0x8992 + SIOCBONDSLAVEINFOQUERY = 0x8993 + SIOCBRADDBR = 0x89a0 + SIOCBRADDIF = 0x89a2 + SIOCBRDELBR = 0x89a1 + SIOCBRDELIF = 0x89a3 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCETHTOOL = 0x8946 + SIOCGARP = 0x8954 + SIOCGETLINKNAME = 0x89e0 + SIOCGETNODEID = 0x89e1 + SIOCGHWTSTAMP = 0x89b1 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGIFVLAN = 0x8982 + SIOCGMIIPHY = 0x8947 + SIOCGMIIREG = 0x8948 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 + SIOCGRARP = 0x8961 + SIOCGSKNS = 0x894c + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCGSTAMPNS_OLD = 0x8907 + SIOCGSTAMP_OLD = 0x8906 + SIOCOUTQNSD = 0x894b + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSHWTSTAMP = 0x89b0 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSIFVLAN = 0x8983 + SIOCSMIIREG = 0x8949 + SIOCSRARP = 0x8962 + SIOCWANDEV = 0x894a + SMACK_MAGIC = 0x43415d53 + SMART_AUTOSAVE = 0xd2 + SMART_AUTO_OFFLINE = 0xdb + SMART_DISABLE = 0xd9 + SMART_ENABLE = 0xd8 + SMART_HCYL_PASS = 0xc2 + SMART_IMMEDIATE_OFFLINE = 0xd4 + SMART_LCYL_PASS = 0x4f + SMART_READ_LOG_SECTOR = 0xd5 + SMART_READ_THRESHOLDS = 0xd1 + SMART_READ_VALUES = 0xd0 + SMART_SAVE = 0xd3 + SMART_STATUS = 0xda + SMART_WRITE_LOG_SECTOR = 0xd6 + SMART_WRITE_THRESHOLDS = 0xd7 + SMB_SUPER_MAGIC = 0x517b + SOCKFS_MAGIC = 0x534f434b + SOCK_DCCP = 0x6 + SOCK_IOC_TYPE = 0x89 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOL_AAL = 0x109 + SOL_ALG = 0x117 + SOL_ATM = 0x108 + SOL_CAIF = 0x116 + SOL_CAN_BASE = 0x64 + SOL_DCCP = 0x10d + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_IUCV = 0x115 + SOL_KCM = 0x119 + SOL_LLC = 0x10c + SOL_NETBEUI = 0x10b + SOL_NETLINK = 0x10e + SOL_NFC = 0x118 + SOL_PACKET = 0x107 + SOL_PNPIPE = 0x113 + SOL_PPPOL2TP = 0x111 + SOL_RAW = 0xff + SOL_RDS = 0x114 + SOL_RXRPC = 0x110 + SOL_TCP = 0x6 + SOL_TIPC = 0x10f + SOL_TLS = 0x11a + SOL_X25 = 0x106 + SOL_XDP = 0x11b + SOMAXCONN = 0x1000 + SO_ATTACH_FILTER = 0x1a + SO_DEBUG = 0x1 + SO_DETACH_BPF = 0x1b + SO_DETACH_FILTER = 0x1b + SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 + SO_EE_CODE_TXTIME_MISSED = 0x2 + SO_EE_CODE_ZEROCOPY_COPIED = 0x1 + SO_EE_ORIGIN_ICMP = 0x2 + SO_EE_ORIGIN_ICMP6 = 0x3 + SO_EE_ORIGIN_LOCAL = 0x1 + SO_EE_ORIGIN_NONE = 0x0 + SO_EE_ORIGIN_TIMESTAMPING = 0x4 + SO_EE_ORIGIN_TXSTATUS = 0x4 + SO_EE_ORIGIN_TXTIME = 0x6 + SO_EE_ORIGIN_ZEROCOPY = 0x5 + SO_GET_FILTER = 0x1a + SO_NO_CHECK = 0xb + SO_PEERNAME = 0x1c + SO_PRIORITY = 0xc + SO_TIMESTAMP = 0x1d + SO_TIMESTAMP_OLD = 0x1d + SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 + SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 + SO_VM_SOCKETS_BUFFER_SIZE = 0x0 + SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 + SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 + SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 + SO_VM_SOCKETS_TRUSTED = 0x5 + SPLICE_F_GIFT = 0x8 + SPLICE_F_MORE = 0x4 + SPLICE_F_MOVE = 0x1 + SPLICE_F_NONBLOCK = 0x2 + SQUASHFS_MAGIC = 0x73717368 + STACK_END_MAGIC = 0x57ac6e9d + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_ATTR_VERITY = 0x100000 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 + SYNC_FILE_RANGE_WAIT_AFTER = 0x4 + SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 + SYNC_FILE_RANGE_WRITE = 0x2 + SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 + SYSFS_MAGIC = 0x62656572 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TASKSTATS_CMD_ATTR_MAX = 0x4 + TASKSTATS_CMD_MAX = 0x2 + TASKSTATS_GENL_NAME = "TASKSTATS" + TASKSTATS_GENL_VERSION = 0x1 + TASKSTATS_TYPE_MAX = 0x6 + TASKSTATS_VERSION = 0x9 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_BPF_IW = 0x3e9 + TCP_BPF_SNDCWND_CLAMP = 0x3ea + TCP_CC_INFO = 0x1a + TCP_CM_INQ = 0x24 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_FASTOPEN_CONNECT = 0x1e + TCP_FASTOPEN_KEY = 0x21 + TCP_FASTOPEN_NO_COOKIE = 0x22 + TCP_INFO = 0xb + TCP_INQ = 0x24 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_EXT = 0x20 + TCP_MD5SIG_FLAG_PREFIX = 0x1 + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_NOTSENT_LOWAT = 0x19 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OFF = 0x0 + TCP_REPAIR_OFF_NO_WP = -0x1 + TCP_REPAIR_ON = 0x1 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_REPAIR_WINDOW = 0x1d + TCP_SAVED_SYN = 0x1c + TCP_SAVE_SYN = 0x1b + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_TX_DELAY = 0x25 + TCP_ULP = 0x1f + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCP_ZEROCOPY_RECEIVE = 0x23 + TIMER_ABSTIME = 0x1 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RTS = 0x4 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIPC_ADDR_ID = 0x3 + TIPC_ADDR_MCAST = 0x1 + TIPC_ADDR_NAME = 0x2 + TIPC_ADDR_NAMESEQ = 0x1 + TIPC_AEAD_ALG_NAME = 0x20 + TIPC_AEAD_KEYLEN_MAX = 0x24 + TIPC_AEAD_KEYLEN_MIN = 0x14 + TIPC_AEAD_KEY_SIZE_MAX = 0x48 + TIPC_CFG_SRV = 0x0 + TIPC_CLUSTER_BITS = 0xc + TIPC_CLUSTER_MASK = 0xfff000 + TIPC_CLUSTER_OFFSET = 0xc + TIPC_CLUSTER_SIZE = 0xfff + TIPC_CONN_SHUTDOWN = 0x5 + TIPC_CONN_TIMEOUT = 0x82 + TIPC_CRITICAL_IMPORTANCE = 0x3 + TIPC_DESTNAME = 0x3 + TIPC_DEST_DROPPABLE = 0x81 + TIPC_ERRINFO = 0x1 + TIPC_ERR_NO_NAME = 0x1 + TIPC_ERR_NO_NODE = 0x3 + TIPC_ERR_NO_PORT = 0x2 + TIPC_ERR_OVERLOAD = 0x4 + TIPC_GROUP_JOIN = 0x87 + TIPC_GROUP_LEAVE = 0x88 + TIPC_GROUP_LOOPBACK = 0x1 + TIPC_GROUP_MEMBER_EVTS = 0x2 + TIPC_HIGH_IMPORTANCE = 0x2 + TIPC_IMPORTANCE = 0x7f + TIPC_LINK_STATE = 0x2 + TIPC_LOW_IMPORTANCE = 0x0 + TIPC_MAX_BEARER_NAME = 0x20 + TIPC_MAX_IF_NAME = 0x10 + TIPC_MAX_LINK_NAME = 0x44 + TIPC_MAX_MEDIA_NAME = 0x10 + TIPC_MAX_USER_MSG_SIZE = 0x101d0 + TIPC_MCAST_BROADCAST = 0x85 + TIPC_MCAST_REPLICAST = 0x86 + TIPC_MEDIUM_IMPORTANCE = 0x1 + TIPC_NODEID_LEN = 0x10 + TIPC_NODELAY = 0x8a + TIPC_NODE_BITS = 0xc + TIPC_NODE_MASK = 0xfff + TIPC_NODE_OFFSET = 0x0 + TIPC_NODE_RECVQ_DEPTH = 0x83 + TIPC_NODE_SIZE = 0xfff + TIPC_NODE_STATE = 0x0 + TIPC_OK = 0x0 + TIPC_PUBLISHED = 0x1 + TIPC_RESERVED_TYPES = 0x40 + TIPC_RETDATA = 0x2 + TIPC_SERVICE_ADDR = 0x2 + TIPC_SERVICE_RANGE = 0x1 + TIPC_SOCKET_ADDR = 0x3 + TIPC_SOCK_RECVQ_DEPTH = 0x84 + TIPC_SOCK_RECVQ_USED = 0x89 + TIPC_SRC_DROPPABLE = 0x80 + TIPC_SUBSCR_TIMEOUT = 0x3 + TIPC_SUB_CANCEL = 0x4 + TIPC_SUB_PORTS = 0x1 + TIPC_SUB_SERVICE = 0x2 + TIPC_TOP_SRV = 0x1 + TIPC_WAIT_FOREVER = 0xffffffff + TIPC_WITHDRAWN = 0x2 + TIPC_ZONE_BITS = 0x8 + TIPC_ZONE_CLUSTER_MASK = 0xfffff000 + TIPC_ZONE_MASK = 0xff000000 + TIPC_ZONE_OFFSET = 0x18 + TIPC_ZONE_SCOPE = 0x1 + TIPC_ZONE_SIZE = 0xff + TMPFS_MAGIC = 0x1021994 + TPACKET_ALIGNMENT = 0x10 + TPACKET_HDRLEN = 0x34 + TP_STATUS_AVAILABLE = 0x0 + TP_STATUS_BLK_TMO = 0x20 + TP_STATUS_COPY = 0x2 + TP_STATUS_CSUMNOTREADY = 0x8 + TP_STATUS_CSUM_VALID = 0x80 + TP_STATUS_KERNEL = 0x0 + TP_STATUS_LOSING = 0x4 + TP_STATUS_SENDING = 0x2 + TP_STATUS_SEND_REQUEST = 0x1 + TP_STATUS_TS_RAW_HARDWARE = 0x80000000 + TP_STATUS_TS_SOFTWARE = 0x20000000 + TP_STATUS_TS_SYS_HARDWARE = 0x40000000 + TP_STATUS_USER = 0x1 + TP_STATUS_VLAN_TPID_VALID = 0x40 + TP_STATUS_VLAN_VALID = 0x10 + TP_STATUS_WRONG_FORMAT = 0x4 + TRACEFS_MAGIC = 0x74726163 + TS_COMM_LEN = 0x20 + UDF_SUPER_MAGIC = 0x15013346 + UMOUNT_NOFOLLOW = 0x8 + USBDEVICE_SUPER_MAGIC = 0x9fa2 + UTIME_NOW = 0x3fffffff + UTIME_OMIT = 0x3ffffffe + V9FS_MAGIC = 0x1021997 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMADDR_CID_ANY = 0xffffffff + VMADDR_CID_HOST = 0x2 + VMADDR_CID_HYPERVISOR = 0x0 + VMADDR_CID_RESERVED = 0x1 + VMADDR_PORT_ANY = 0xffffffff + VM_SOCKETS_INVALID_VERSION = 0xffffffff + VQUIT = 0x1 + VT0 = 0x0 + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WDIOC_SETPRETIMEOUT = 0xc0045708 + WDIOC_SETTIMEOUT = 0xc0045706 + WEXITED = 0x4 + WIN_ACKMEDIACHANGE = 0xdb + WIN_CHECKPOWERMODE1 = 0xe5 + WIN_CHECKPOWERMODE2 = 0x98 + WIN_DEVICE_RESET = 0x8 + WIN_DIAGNOSE = 0x90 + WIN_DOORLOCK = 0xde + WIN_DOORUNLOCK = 0xdf + WIN_DOWNLOAD_MICROCODE = 0x92 + WIN_FLUSH_CACHE = 0xe7 + WIN_FLUSH_CACHE_EXT = 0xea + WIN_FORMAT = 0x50 + WIN_GETMEDIASTATUS = 0xda + WIN_IDENTIFY = 0xec + WIN_IDENTIFY_DMA = 0xee + WIN_IDLEIMMEDIATE = 0xe1 + WIN_INIT = 0x60 + WIN_MEDIAEJECT = 0xed + WIN_MULTREAD = 0xc4 + WIN_MULTREAD_EXT = 0x29 + WIN_MULTWRITE = 0xc5 + WIN_MULTWRITE_EXT = 0x39 + WIN_NOP = 0x0 + WIN_PACKETCMD = 0xa0 + WIN_PIDENTIFY = 0xa1 + WIN_POSTBOOT = 0xdc + WIN_PREBOOT = 0xdd + WIN_QUEUED_SERVICE = 0xa2 + WIN_READ = 0x20 + WIN_READDMA = 0xc8 + WIN_READDMA_EXT = 0x25 + WIN_READDMA_ONCE = 0xc9 + WIN_READDMA_QUEUED = 0xc7 + WIN_READDMA_QUEUED_EXT = 0x26 + WIN_READ_BUFFER = 0xe4 + WIN_READ_EXT = 0x24 + WIN_READ_LONG = 0x22 + WIN_READ_LONG_ONCE = 0x23 + WIN_READ_NATIVE_MAX = 0xf8 + WIN_READ_NATIVE_MAX_EXT = 0x27 + WIN_READ_ONCE = 0x21 + WIN_RECAL = 0x10 + WIN_RESTORE = 0x10 + WIN_SECURITY_DISABLE = 0xf6 + WIN_SECURITY_ERASE_PREPARE = 0xf3 + WIN_SECURITY_ERASE_UNIT = 0xf4 + WIN_SECURITY_FREEZE_LOCK = 0xf5 + WIN_SECURITY_SET_PASS = 0xf1 + WIN_SECURITY_UNLOCK = 0xf2 + WIN_SEEK = 0x70 + WIN_SETFEATURES = 0xef + WIN_SETIDLE1 = 0xe3 + WIN_SETIDLE2 = 0x97 + WIN_SETMULT = 0xc6 + WIN_SET_MAX = 0xf9 + WIN_SET_MAX_EXT = 0x37 + WIN_SLEEPNOW1 = 0xe6 + WIN_SLEEPNOW2 = 0x99 + WIN_SMART = 0xb0 + WIN_SPECIFY = 0x91 + WIN_SRST = 0x8 + WIN_STANDBY = 0xe2 + WIN_STANDBY2 = 0x96 + WIN_STANDBYNOW1 = 0xe0 + WIN_STANDBYNOW2 = 0x94 + WIN_VERIFY = 0x40 + WIN_VERIFY_EXT = 0x42 + WIN_VERIFY_ONCE = 0x41 + WIN_WRITE = 0x30 + WIN_WRITEDMA = 0xca + WIN_WRITEDMA_EXT = 0x35 + WIN_WRITEDMA_ONCE = 0xcb + WIN_WRITEDMA_QUEUED = 0xcc + WIN_WRITEDMA_QUEUED_EXT = 0x36 + WIN_WRITE_BUFFER = 0xe8 + WIN_WRITE_EXT = 0x34 + WIN_WRITE_LONG = 0x32 + WIN_WRITE_LONG_ONCE = 0x33 + WIN_WRITE_ONCE = 0x31 + WIN_WRITE_SAME = 0xe9 + WIN_WRITE_VERIFY = 0x3c + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XATTR_CREATE = 0x1 + XATTR_REPLACE = 0x2 + XDP_COPY = 0x2 + XDP_FLAGS_DRV_MODE = 0x4 + XDP_FLAGS_HW_MODE = 0x8 + XDP_FLAGS_MASK = 0xf + XDP_FLAGS_MODES = 0xe + XDP_FLAGS_SKB_MODE = 0x2 + XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 + XDP_MMAP_OFFSETS = 0x1 + XDP_OPTIONS = 0x8 + XDP_OPTIONS_ZEROCOPY = 0x1 + XDP_PACKET_HEADROOM = 0x100 + XDP_PGOFF_RX_RING = 0x0 + XDP_PGOFF_TX_RING = 0x80000000 + XDP_RING_NEED_WAKEUP = 0x1 + XDP_RX_RING = 0x2 + XDP_SHARED_UMEM = 0x1 + XDP_STATISTICS = 0x7 + XDP_TX_RING = 0x3 + XDP_UMEM_COMPLETION_RING = 0x6 + XDP_UMEM_FILL_RING = 0x5 + XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 + XDP_UMEM_PGOFF_FILL_RING = 0x100000000 + XDP_UMEM_REG = 0x4 + XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 + XDP_USE_NEED_WAKEUP = 0x8 + XDP_ZEROCOPY = 0x4 + XENFS_SUPER_MAGIC = 0xabba1974 + XFS_SUPER_MAGIC = 0x58465342 + Z3FOLD_MAGIC = 0x33 + ZSMALLOC_MAGIC = 0x58295829 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EAGAIN = syscall.Errno(0xb) + EBADF = syscall.Errno(0x9) + EBUSY = syscall.Errno(0x10) + ECHILD = syscall.Errno(0xa) + EDOM = syscall.Errno(0x21) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISDIR = syscall.Errno(0x15) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + ENFILE = syscall.Errno(0x17) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOMEM = syscall.Errno(0xc) + ENOSPC = syscall.Errno(0x1c) + ENOTBLK = syscall.Errno(0xf) + ENOTDIR = syscall.Errno(0x14) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EPERM = syscall.Errno(0x1) + EPIPE = syscall.Errno(0x20) + ERANGE = syscall.Errno(0x22) + EROFS = syscall.Errno(0x1e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ETXTBSY = syscall.Errno(0x1a) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) +) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index fcf5796a01b..0876cf92ff3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -11,2784 +11,485 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x80041270 - BLKBSZSET = 0x40041271 - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80041272 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKRRPART = 0x125f - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FP_XSTATE_MAGIC2 = 0x46505845 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xc - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0xd - F_SETLK64 = 0xd - F_SETLKW = 0xe - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_32BIT = 0x40 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x20 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_USERNS = 0xb701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x8000 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80042407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc004240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40042406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8008743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x40087446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x400c744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40087447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCXFERUNIT = 0x744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETFPXREGS = 0x12 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETFPXREGS = 0x13 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SINGLEBLOCK = 0x21 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_SYSEMU = 0x1f - PTRACE_SYSEMU_SINGLESTEP = 0x20 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8004700d - RTC_EPOCH_SET = 0x4004700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x8004700b - RTC_IRQP_SET = 0x4004700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x801c7011 - RTC_PLL_SET = 0x401c7012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x400854d5 - TUNDETACHFILTER = 0x400854d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x800854db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - X86_FXSR_MAGIC = 0x0 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x80041270 + BLKBSZSET = 0x40041271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80041272 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FP_XSTATE_MAGIC2 = 0x46505845 + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0xc + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0xd + F_SETLK64 = 0xd + F_SETLKW = 0xe + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_32BIT = 0x40 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x8000 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80042407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc004240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40042406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8008743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40087446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x400c744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40087447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffff + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPXREGS = 0x13 + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SINGLEBLOCK = 0x21 + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8004700d + RTC_EPOCH_SET = 0x4004700e + RTC_IRQP_READ = 0x8004700b + RTC_IRQP_SET = 0x4004700c + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x801c7011 + RTC_PLL_SET = 0x401c7012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x400854d5 + TUNDETACHFILTER = 0x400854d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x800854db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x20 + X86_FXSR_MAGIC = 0x0 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2797,23 +498,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x23) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2830,8 +523,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2839,99 +530,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 5bcf3dbd75b..d5be2e83770 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -11,2784 +11,485 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x80081270 - BLKBSZSET = 0x40081271 - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKRRPART = 0x125f - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FP_XSTATE_MAGIC2 = 0x46505845 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_32BIT = 0x40 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_USERNS = 0xb701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8010743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x40107446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x4010744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40107447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCXFERUNIT = 0x744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ARCH_PRCTL = 0x1e - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETFPXREGS = 0x12 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETFPXREGS = 0x13 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SINGLEBLOCK = 0x21 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_SYSEMU = 0x1f - PTRACE_SYSEMU_SINGLESTEP = 0x20 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8008700d - RTC_EPOCH_SET = 0x4008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x8008700b - RTC_IRQP_SET = 0x4008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x80207011 - RTC_PLL_SET = 0x40207012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FP_XSTATE_MAGIC2 = 0x46505845 + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_32BIT = 0x40 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_ARCH_PRCTL = 0x1e + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPXREGS = 0x13 + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SINGLEBLOCK = 0x21 + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8008700d + RTC_EPOCH_SET = 0x4008700e + RTC_IRQP_READ = 0x8008700b + RTC_IRQP_SET = 0x4008700c + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x80207011 + RTC_PLL_SET = 0x40207012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2797,23 +498,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x23) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2830,8 +523,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2839,99 +530,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 3e02dcff881..fbeef832523 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -11,2790 +11,491 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x80041270 - BLKBSZSET = 0x40041271 - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80041272 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKRRPART = 0x125f - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xc - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0xd - F_SETLK64 = 0xd - F_SETLKW = 0xe - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x20 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_USERNS = 0xb701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x20000 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x404000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80042407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc004240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40042406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8008743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x40087446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x400c744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40087447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCXFERUNIT = 0x744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETCRUNCHREGS = 0x19 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFDPIC = 0x1f - PTRACE_GETFDPIC_EXEC = 0x0 - PTRACE_GETFDPIC_INTERP = 0x1 - PTRACE_GETFPREGS = 0xe - PTRACE_GETHBPREGS = 0x1d - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GETVFPREGS = 0x1b - PTRACE_GETWMMXREGS = 0x12 - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x16 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETCRUNCHREGS = 0x1a - PTRACE_SETFPREGS = 0xf - PTRACE_SETHBPREGS = 0x1e - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SETVFPREGS = 0x1c - PTRACE_SETWMMXREGS = 0x13 - PTRACE_SET_SYSCALL = 0x17 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - PT_DATA_ADDR = 0x10004 - PT_TEXT_ADDR = 0x10000 - PT_TEXT_END_ADDR = 0x10008 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8004700d - RTC_EPOCH_SET = 0x4004700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x8004700b - RTC_IRQP_SET = 0x4004700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x801c7011 - RTC_PLL_SET = 0x401c7012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x400854d5 - TUNDETACHFILTER = 0x400854d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x800854db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x80041270 + BLKBSZSET = 0x40041271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80041272 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0xc + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0xd + F_SETLK64 = 0xd + F_SETLKW = 0xe + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x20000 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x404000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80042407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc004240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40042406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8008743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40087446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x400c744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40087447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffff + PTRACE_GETCRUNCHREGS = 0x19 + PTRACE_GETFDPIC = 0x1f + PTRACE_GETFDPIC_EXEC = 0x0 + PTRACE_GETFDPIC_INTERP = 0x1 + PTRACE_GETFPREGS = 0xe + PTRACE_GETHBPREGS = 0x1d + PTRACE_GETVFPREGS = 0x1b + PTRACE_GETWMMXREGS = 0x12 + PTRACE_GET_THREAD_AREA = 0x16 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_SETCRUNCHREGS = 0x1a + PTRACE_SETFPREGS = 0xf + PTRACE_SETHBPREGS = 0x1e + PTRACE_SETVFPREGS = 0x1c + PTRACE_SETWMMXREGS = 0x13 + PTRACE_SET_SYSCALL = 0x17 + PT_DATA_ADDR = 0x10004 + PT_TEXT_ADDR = 0x10000 + PT_TEXT_END_ADDR = 0x10008 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8004700d + RTC_EPOCH_SET = 0x4004700e + RTC_IRQP_READ = 0x8004700b + RTC_IRQP_SET = 0x4004700c + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x801c7011 + RTC_PLL_SET = 0x401c7012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x400854d5 + TUNDETACHFILTER = 0x400854d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x800854db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x20 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2803,23 +504,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x23) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2836,8 +529,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2845,99 +536,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 2293f8bb869..06daa50ebdc 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -11,2777 +11,478 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x80081270 - BLKBSZSET = 0x40081271 - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKRRPART = 0x125f - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ESR_MAGIC = 0x45535201 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - EXTRA_MAGIC = 0x45585401 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FPSIMD_MAGIC = 0x46508001 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_USERNS = 0xb701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x10000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x404000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8010743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x40107446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x4010744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40107447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCXFERUNIT = 0x744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_SYSEMU = 0x1f - PTRACE_SYSEMU_SINGLESTEP = 0x20 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8008700d - RTC_EPOCH_SET = 0x4008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x8008700b - RTC_IRQP_SET = 0x4008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x80207011 - RTC_PLL_SET = 0x40207012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SVE_MAGIC = 0x53564501 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + ESR_MAGIC = 0x45535201 + EXTPROC = 0x10000 + EXTRA_MAGIC = 0x45585401 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FPSIMD_MAGIC = 0x46508001 + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x404000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8008700d + RTC_EPOCH_SET = 0x4008700e + RTC_IRQP_READ = 0x8008700b + RTC_IRQP_SET = 0x4008700c + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x80207011 + RTC_PLL_SET = 0x40207012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + SVE_MAGIC = 0x53564501 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2790,23 +491,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x23) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2823,8 +516,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2832,99 +523,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 57742ea2768..7c866b8f5be 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -11,2786 +11,487 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40041270 - BLKBSZSET = 0x80041271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40041272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x80 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x21 - F_GETLK64 = 0x21 - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x22 - F_SETLK64 = 0x22 - F_SETLKW = 0x23 - F_SETLKW64 = 0x23 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x20 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x2000 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40042407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc004240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80042406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4008743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80087446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x800c744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80087447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x9 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x5 - RLIMIT_NPROC = 0x8 - RLIMIT_RSS = 0x7 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4004700d - RTC_EPOCH_SET = 0x8004700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4004700b - RTC_IRQP_SET = 0x8004700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x401c7011 - RTC_PLL_SET = 0x801c7012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x80 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x40047309 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x467f - SIOCOUTQ = 0x7472 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x5407 - TCGETA = 0x5401 - TCGETS = 0x540d - TCGETS2 = 0x4030542a - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x5410 - TCSBRK = 0x5405 - TCSBRKP = 0x5486 - TCSETA = 0x5402 - TCSETAF = 0x5404 - TCSETAW = 0x5403 - TCSETS = 0x540e - TCSETS2 = 0x8030542b - TCSETSF = 0x5410 - TCSETSF2 = 0x8030542d - TCSETSW = 0x540f - TCSETSW2 = 0x8030542c - TCXONC = 0x5406 - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGISO7816 = 0x40285442 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGPTPEER = 0x20005441 - TIOCGRS485 = 0x4020542e - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0xc020542f - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x8000 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x800854d5 - TUNDETACHFILTER = 0x800854d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x400854db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x40041270 + BLKBSZSET = 0x80041271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40041272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x2000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0x21 + F_GETLK64 = 0x21 + F_GETOWN = 0x17 + F_RDLCK = 0x0 + F_SETLK = 0x22 + F_SETLK64 = 0x22 + F_SETLKW = 0x23 + F_SETLKW64 = 0x23 + F_SETOWN = 0x18 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x80 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x800 + MAP_ANONYMOUS = 0x800 + MAP_DENYWRITE = 0x2000 + MAP_EXECUTABLE = 0x4000 + MAP_GROWSDOWN = 0x1000 + MAP_HUGETLB = 0x80000 + MAP_LOCKED = 0x8000 + MAP_NONBLOCK = 0x20000 + MAP_NORESERVE = 0x400 + MAP_POPULATE = 0x10000 + MAP_RENAME = 0x800 + MAP_STACK = 0x40000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x8 + O_ASYNC = 0x1000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x100 + O_DIRECT = 0x8000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x10 + O_EXCL = 0x400 + O_FSYNC = 0x4010 + O_LARGEFILE = 0x2000 + O_NDELAY = 0x80 + O_NOATIME = 0x40000 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x80 + O_PATH = 0x200000 + O_RSYNC = 0x4010 + O_SYNC = 0x4010 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40042407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc004240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80042406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4008743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80087446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x800c744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80087447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PR_SET_PTRACER_ANY = 0xffffffff + PTRACE_GETFPREGS = 0xe + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 + PTRACE_GET_WATCH_REGS = 0xd0 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_PEEKDATA_3264 = 0xc1 + PTRACE_PEEKTEXT_3264 = 0xc0 + PTRACE_POKEDATA_3264 = 0xc3 + PTRACE_POKETEXT_3264 = 0xc2 + PTRACE_SETFPREGS = 0xf + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SET_WATCH_REGS = 0xd1 + RLIMIT_AS = 0x6 + RLIMIT_MEMLOCK = 0x9 + RLIMIT_NOFILE = 0x5 + RLIMIT_NPROC = 0x8 + RLIMIT_RSS = 0x7 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4004700d + RTC_EPOCH_SET = 0x8004700e + RTC_IRQP_READ = 0x4004700b + RTC_IRQP_SET = 0x8004700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x401c7011 + RTC_PLL_SET = 0x801c7012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x80 + SIOCATMARK = 0x40047307 + SIOCGPGRP = 0x40047309 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x467f + SIOCOUTQ = 0x7472 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x1 + SOCK_NONBLOCK = 0x80 + SOCK_STREAM = 0x2 + SOL_SOCKET = 0xffff + SO_ACCEPTCONN = 0x1009 + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x11 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1e + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x1f + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x1005 + SO_STYLE = 0x1008 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x5407 + TCGETA = 0x5401 + TCGETS = 0x540d + TCGETS2 = 0x4030542a + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCSBRKP = 0x5486 + TCSETA = 0x5402 + TCSETAF = 0x5404 + TCSETAW = 0x5403 + TCSETS = 0x540e + TCSETS2 = 0x8030542b + TCSETSF = 0x5410 + TCSETSF2 = 0x8030542d + TCSETSW = 0x540f + TCSETSW2 = 0x8030542c + TCXONC = 0x5406 + TIOCCBRK = 0x5428 + TIOCCONS = 0x80047478 + TIOCEXCL = 0x740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x5492 + TIOCGISO7816 = 0x40285442 + TIOCGLCKTRMIOS = 0x548b + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 + TIOCGRS485 = 0x4020542e + TIOCGSERIAL = 0x5484 + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5481 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x467f + TIOCLINUX = 0x5483 + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMIWAIT = 0x5491 + TIOCMSET = 0x741a + TIOCM_CAR = 0x100 + TIOCM_CD = 0x100 + TIOCM_CTS = 0x40 + TIOCM_DSR = 0x400 + TIOCM_RI = 0x200 + TIOCM_RNG = 0x200 + TIOCM_SR = 0x20 + TIOCM_ST = 0x10 + TIOCNOTTY = 0x5471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7472 + TIOCPKT = 0x5470 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x5480 + TIOCSERCONFIG = 0x5488 + TIOCSERGETLSR = 0x548e + TIOCSERGETMULTI = 0x548f + TIOCSERGSTRUCT = 0x548d + TIOCSERGWILD = 0x5489 + TIOCSERSETMULTI = 0x5490 + TIOCSERSWILD = 0x548a + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIG = 0x80045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x548c + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0xc020542f + TIOCSSERIAL = 0x5485 + TIOCSSOFTCAR = 0x5482 + TIOCSTI = 0x5472 + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x8000 + TUNATTACHFILTER = 0x800854d5 + TUNDETACHFILTER = 0x800854d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x400854db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0xd + VEOF = 0x10 + VEOL = 0x11 + VEOL2 = 0x6 + VMIN = 0x4 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VSWTCH = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x20 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x9e) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x82) @@ -2799,12 +500,8 @@ const ( EDEADLK = syscall.Errno(0x2d) EDEADLOCK = syscall.Errno(0x38) EDESTADDRREQ = syscall.Errno(0x60) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -2812,11 +509,7 @@ const ( EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x85) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) @@ -2833,8 +526,6 @@ const ( ELNRNG = syscall.Errno(0x29) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) @@ -2842,100 +533,68 @@ const ( ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x86) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x50) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x7b) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x34) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x16) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x18) SIGTTIN = syscall.Signal(0x1a) SIGTTOU = syscall.Signal(0x1b) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 33bfa6cbf05..c42966d19ce 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -11,2786 +11,487 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x80 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xe - F_GETLK64 = 0xe - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x0 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4010743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80107446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x8010744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80107447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x9 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x5 - RLIMIT_NPROC = 0x8 - RLIMIT_RSS = 0x7 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4008700d - RTC_EPOCH_SET = 0x8008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4008700b - RTC_IRQP_SET = 0x8008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x40207011 - RTC_PLL_SET = 0x80207012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x80 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x40047309 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x467f - SIOCOUTQ = 0x7472 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x5407 - TCGETA = 0x5401 - TCGETS = 0x540d - TCGETS2 = 0x4030542a - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x5410 - TCSBRK = 0x5405 - TCSBRKP = 0x5486 - TCSETA = 0x5402 - TCSETAF = 0x5404 - TCSETAW = 0x5403 - TCSETS = 0x540e - TCSETS2 = 0x8030542b - TCSETSF = 0x5410 - TCSETSF2 = 0x8030542d - TCSETSW = 0x540f - TCSETSW2 = 0x8030542c - TCXONC = 0x5406 - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGISO7816 = 0x40285442 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGPTPEER = 0x20005441 - TIOCGRS485 = 0x4020542e - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0xc020542f - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x8000 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x40081270 + BLKBSZSET = 0x80081271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40081272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x2000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0xe + F_GETLK64 = 0xe + F_GETOWN = 0x17 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x18 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x80 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x800 + MAP_ANONYMOUS = 0x800 + MAP_DENYWRITE = 0x2000 + MAP_EXECUTABLE = 0x4000 + MAP_GROWSDOWN = 0x1000 + MAP_HUGETLB = 0x80000 + MAP_LOCKED = 0x8000 + MAP_NONBLOCK = 0x20000 + MAP_NORESERVE = 0x400 + MAP_POPULATE = 0x10000 + MAP_RENAME = 0x800 + MAP_STACK = 0x40000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x8 + O_ASYNC = 0x1000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x100 + O_DIRECT = 0x8000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x10 + O_EXCL = 0x400 + O_FSYNC = 0x4010 + O_LARGEFILE = 0x0 + O_NDELAY = 0x80 + O_NOATIME = 0x40000 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x80 + O_PATH = 0x200000 + O_RSYNC = 0x4010 + O_SYNC = 0x4010 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETFPREGS = 0xe + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 + PTRACE_GET_WATCH_REGS = 0xd0 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_PEEKDATA_3264 = 0xc1 + PTRACE_PEEKTEXT_3264 = 0xc0 + PTRACE_POKEDATA_3264 = 0xc3 + PTRACE_POKETEXT_3264 = 0xc2 + PTRACE_SETFPREGS = 0xf + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SET_WATCH_REGS = 0xd1 + RLIMIT_AS = 0x6 + RLIMIT_MEMLOCK = 0x9 + RLIMIT_NOFILE = 0x5 + RLIMIT_NPROC = 0x8 + RLIMIT_RSS = 0x7 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4008700d + RTC_EPOCH_SET = 0x8008700e + RTC_IRQP_READ = 0x4008700b + RTC_IRQP_SET = 0x8008700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x40207011 + RTC_PLL_SET = 0x80207012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x80 + SIOCATMARK = 0x40047307 + SIOCGPGRP = 0x40047309 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x467f + SIOCOUTQ = 0x7472 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x1 + SOCK_NONBLOCK = 0x80 + SOCK_STREAM = 0x2 + SOL_SOCKET = 0xffff + SO_ACCEPTCONN = 0x1009 + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x11 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1e + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x1f + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x1005 + SO_STYLE = 0x1008 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x5407 + TCGETA = 0x5401 + TCGETS = 0x540d + TCGETS2 = 0x4030542a + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCSBRKP = 0x5486 + TCSETA = 0x5402 + TCSETAF = 0x5404 + TCSETAW = 0x5403 + TCSETS = 0x540e + TCSETS2 = 0x8030542b + TCSETSF = 0x5410 + TCSETSF2 = 0x8030542d + TCSETSW = 0x540f + TCSETSW2 = 0x8030542c + TCXONC = 0x5406 + TIOCCBRK = 0x5428 + TIOCCONS = 0x80047478 + TIOCEXCL = 0x740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x5492 + TIOCGISO7816 = 0x40285442 + TIOCGLCKTRMIOS = 0x548b + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 + TIOCGRS485 = 0x4020542e + TIOCGSERIAL = 0x5484 + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5481 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x467f + TIOCLINUX = 0x5483 + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMIWAIT = 0x5491 + TIOCMSET = 0x741a + TIOCM_CAR = 0x100 + TIOCM_CD = 0x100 + TIOCM_CTS = 0x40 + TIOCM_DSR = 0x400 + TIOCM_RI = 0x200 + TIOCM_RNG = 0x200 + TIOCM_SR = 0x20 + TIOCM_ST = 0x10 + TIOCNOTTY = 0x5471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7472 + TIOCPKT = 0x5470 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x5480 + TIOCSERCONFIG = 0x5488 + TIOCSERGETLSR = 0x548e + TIOCSERGETMULTI = 0x548f + TIOCSERGSTRUCT = 0x548d + TIOCSERGWILD = 0x5489 + TIOCSERSETMULTI = 0x5490 + TIOCSERSWILD = 0x548a + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIG = 0x80045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x548c + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0xc020542f + TIOCSSERIAL = 0x5485 + TIOCSSOFTCAR = 0x5482 + TIOCSTI = 0x5472 + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x8000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0xd + VEOF = 0x10 + VEOL = 0x11 + VEOL2 = 0x6 + VMIN = 0x4 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VSWTCH = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x9e) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x82) @@ -2799,12 +500,8 @@ const ( EDEADLK = syscall.Errno(0x2d) EDEADLOCK = syscall.Errno(0x38) EDESTADDRREQ = syscall.Errno(0x60) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -2812,11 +509,7 @@ const ( EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x85) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) @@ -2833,8 +526,6 @@ const ( ELNRNG = syscall.Errno(0x29) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) @@ -2842,100 +533,68 @@ const ( ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x86) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x50) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x7b) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x34) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x16) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x18) SIGTTIN = syscall.Signal(0x1a) SIGTTOU = syscall.Signal(0x1b) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 89fd414e66e..a5b2b42739d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -11,2786 +11,487 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x80 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0xe - F_GETLK64 = 0xe - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x0 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4010743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80107446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x8010744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80107447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x9 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x5 - RLIMIT_NPROC = 0x8 - RLIMIT_RSS = 0x7 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4008700d - RTC_EPOCH_SET = 0x8008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4008700b - RTC_IRQP_SET = 0x8008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x40207011 - RTC_PLL_SET = 0x80207012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x80 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x40047309 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x467f - SIOCOUTQ = 0x7472 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x5407 - TCGETA = 0x5401 - TCGETS = 0x540d - TCGETS2 = 0x4030542a - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x5410 - TCSBRK = 0x5405 - TCSBRKP = 0x5486 - TCSETA = 0x5402 - TCSETAF = 0x5404 - TCSETAW = 0x5403 - TCSETS = 0x540e - TCSETS2 = 0x8030542b - TCSETSF = 0x5410 - TCSETSF2 = 0x8030542d - TCSETSW = 0x540f - TCSETSW2 = 0x8030542c - TCXONC = 0x5406 - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGISO7816 = 0x40285442 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGPTPEER = 0x20005441 - TIOCGRS485 = 0x4020542e - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0xc020542f - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x8000 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x40081270 + BLKBSZSET = 0x80081271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40081272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x2000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0xe + F_GETLK64 = 0xe + F_GETOWN = 0x17 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x18 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x80 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x800 + MAP_ANONYMOUS = 0x800 + MAP_DENYWRITE = 0x2000 + MAP_EXECUTABLE = 0x4000 + MAP_GROWSDOWN = 0x1000 + MAP_HUGETLB = 0x80000 + MAP_LOCKED = 0x8000 + MAP_NONBLOCK = 0x20000 + MAP_NORESERVE = 0x400 + MAP_POPULATE = 0x10000 + MAP_RENAME = 0x800 + MAP_STACK = 0x40000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x8 + O_ASYNC = 0x1000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x100 + O_DIRECT = 0x8000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x10 + O_EXCL = 0x400 + O_FSYNC = 0x4010 + O_LARGEFILE = 0x0 + O_NDELAY = 0x80 + O_NOATIME = 0x40000 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x80 + O_PATH = 0x200000 + O_RSYNC = 0x4010 + O_SYNC = 0x4010 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETFPREGS = 0xe + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 + PTRACE_GET_WATCH_REGS = 0xd0 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_PEEKDATA_3264 = 0xc1 + PTRACE_PEEKTEXT_3264 = 0xc0 + PTRACE_POKEDATA_3264 = 0xc3 + PTRACE_POKETEXT_3264 = 0xc2 + PTRACE_SETFPREGS = 0xf + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SET_WATCH_REGS = 0xd1 + RLIMIT_AS = 0x6 + RLIMIT_MEMLOCK = 0x9 + RLIMIT_NOFILE = 0x5 + RLIMIT_NPROC = 0x8 + RLIMIT_RSS = 0x7 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4008700d + RTC_EPOCH_SET = 0x8008700e + RTC_IRQP_READ = 0x4008700b + RTC_IRQP_SET = 0x8008700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x40207011 + RTC_PLL_SET = 0x80207012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x80 + SIOCATMARK = 0x40047307 + SIOCGPGRP = 0x40047309 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x467f + SIOCOUTQ = 0x7472 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x1 + SOCK_NONBLOCK = 0x80 + SOCK_STREAM = 0x2 + SOL_SOCKET = 0xffff + SO_ACCEPTCONN = 0x1009 + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x11 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1e + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x1f + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x1005 + SO_STYLE = 0x1008 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x5407 + TCGETA = 0x5401 + TCGETS = 0x540d + TCGETS2 = 0x4030542a + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCSBRKP = 0x5486 + TCSETA = 0x5402 + TCSETAF = 0x5404 + TCSETAW = 0x5403 + TCSETS = 0x540e + TCSETS2 = 0x8030542b + TCSETSF = 0x5410 + TCSETSF2 = 0x8030542d + TCSETSW = 0x540f + TCSETSW2 = 0x8030542c + TCXONC = 0x5406 + TIOCCBRK = 0x5428 + TIOCCONS = 0x80047478 + TIOCEXCL = 0x740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x5492 + TIOCGISO7816 = 0x40285442 + TIOCGLCKTRMIOS = 0x548b + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 + TIOCGRS485 = 0x4020542e + TIOCGSERIAL = 0x5484 + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5481 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x467f + TIOCLINUX = 0x5483 + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMIWAIT = 0x5491 + TIOCMSET = 0x741a + TIOCM_CAR = 0x100 + TIOCM_CD = 0x100 + TIOCM_CTS = 0x40 + TIOCM_DSR = 0x400 + TIOCM_RI = 0x200 + TIOCM_RNG = 0x200 + TIOCM_SR = 0x20 + TIOCM_ST = 0x10 + TIOCNOTTY = 0x5471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7472 + TIOCPKT = 0x5470 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x5480 + TIOCSERCONFIG = 0x5488 + TIOCSERGETLSR = 0x548e + TIOCSERGETMULTI = 0x548f + TIOCSERGSTRUCT = 0x548d + TIOCSERGWILD = 0x5489 + TIOCSERSETMULTI = 0x5490 + TIOCSERSWILD = 0x548a + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIG = 0x80045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x548c + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0xc020542f + TIOCSSERIAL = 0x5485 + TIOCSSOFTCAR = 0x5482 + TIOCSTI = 0x5472 + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x8000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0xd + VEOF = 0x10 + VEOL = 0x11 + VEOL2 = 0x6 + VMIN = 0x4 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VSWTCH = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x9e) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x82) @@ -2799,12 +500,8 @@ const ( EDEADLK = syscall.Errno(0x2d) EDEADLOCK = syscall.Errno(0x38) EDESTADDRREQ = syscall.Errno(0x60) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -2812,11 +509,7 @@ const ( EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x85) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) @@ -2833,8 +526,6 @@ const ( ELNRNG = syscall.Errno(0x29) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) @@ -2842,100 +533,68 @@ const ( ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x86) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x50) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x7b) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x34) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x16) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x18) SIGTTIN = syscall.Signal(0x1a) SIGTTOU = syscall.Signal(0x1b) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index aabe5e4244f..7f91881b819 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -11,2786 +11,487 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40041270 - BLKBSZSET = 0x80041271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40041272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x80 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x2000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x21 - F_GETLK64 = 0x21 - F_GETOWN = 0x17 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x22 - F_SETLK64 = 0x22 - F_SETLKW = 0x23 - F_SETLKW64 = 0x23 - F_SETOWN = 0x18 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x100 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x80 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x800 - MAP_ANONYMOUS = 0x800 - MAP_DENYWRITE = 0x2000 - MAP_EXECUTABLE = 0x4000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x1000 - MAP_HUGETLB = 0x80000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x8000 - MAP_NONBLOCK = 0x20000 - MAP_NORESERVE = 0x400 - MAP_POPULATE = 0x10000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x800 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x40000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x20 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x1000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x100 - O_DIRECT = 0x8000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x10 - O_EXCL = 0x400 - O_FSYNC = 0x4010 - O_LARGEFILE = 0x2000 - O_NDELAY = 0x80 - O_NOATIME = 0x40000 - O_NOCTTY = 0x800 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x80 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x4010 - O_SYNC = 0x4010 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40042407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc004240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80042406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4008743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80087446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x800c744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80087447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_GET_THREAD_AREA = 0x19 - PTRACE_GET_THREAD_AREA_3264 = 0xc4 - PTRACE_GET_WATCH_REGS = 0xd0 - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_3264 = 0xc1 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_3264 = 0xc0 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_3264 = 0xc3 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_3264 = 0xc2 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SET_THREAD_AREA = 0x1a - PTRACE_SET_WATCH_REGS = 0xd1 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x6 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x9 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x5 - RLIMIT_NPROC = 0x8 - RLIMIT_RSS = 0x7 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4004700d - RTC_EPOCH_SET = 0x8004700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4004700b - RTC_IRQP_SET = 0x8004700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x401c7011 - RTC_PLL_SET = 0x801c7012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x80 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x40047307 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x40047309 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x467f - SIOCOUTQ = 0x7472 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x80047308 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x1 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x80 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x2 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1009 - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x11 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x12 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x1004 - SO_RCVTIMEO = 0x1006 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x1006 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x1f - SO_SNDLOWAT = 0x1003 - SO_SNDTIMEO = 0x1005 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x1005 - SO_STYLE = 0x1008 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x5407 - TCGETA = 0x5401 - TCGETS = 0x540d - TCGETS2 = 0x4030542a - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x5410 - TCSBRK = 0x5405 - TCSBRKP = 0x5486 - TCSETA = 0x5402 - TCSETAF = 0x5404 - TCSETAW = 0x5403 - TCSETS = 0x540e - TCSETS2 = 0x8030542b - TCSETSF = 0x5410 - TCSETSF2 = 0x8030542d - TCSETSW = 0x540f - TCSETSW2 = 0x8030542c - TCXONC = 0x5406 - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x80047478 - TIOCEXCL = 0x740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x7400 - TIOCGETP = 0x7408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x5492 - TIOCGISO7816 = 0x40285442 - TIOCGLCKTRMIOS = 0x548b - TIOCGLTC = 0x7474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGPTPEER = 0x20005441 - TIOCGRS485 = 0x4020542e - TIOCGSERIAL = 0x5484 - TIOCGSID = 0x7416 - TIOCGSOFTCAR = 0x5481 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x467f - TIOCLINUX = 0x5483 - TIOCMBIC = 0x741c - TIOCMBIS = 0x741b - TIOCMGET = 0x741d - TIOCMIWAIT = 0x5491 - TIOCMSET = 0x741a - TIOCM_CAR = 0x100 - TIOCM_CD = 0x100 - TIOCM_CTS = 0x40 - TIOCM_DSR = 0x400 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x200 - TIOCM_RNG = 0x200 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x20 - TIOCM_ST = 0x10 - TIOCNOTTY = 0x5471 - TIOCNXCL = 0x740e - TIOCOUTQ = 0x7472 - TIOCPKT = 0x5470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x5480 - TIOCSERCONFIG = 0x5488 - TIOCSERGETLSR = 0x548e - TIOCSERGETMULTI = 0x548f - TIOCSERGSTRUCT = 0x548d - TIOCSERGWILD = 0x5489 - TIOCSERSETMULTI = 0x5490 - TIOCSERSWILD = 0x548a - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x7401 - TIOCSETN = 0x740a - TIOCSETP = 0x7409 - TIOCSIG = 0x80045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x548c - TIOCSLTC = 0x7475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0xc020542f - TIOCSSERIAL = 0x5485 - TIOCSSOFTCAR = 0x5482 - TIOCSTI = 0x5472 - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x8000 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x800854d5 - TUNDETACHFILTER = 0x800854d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x400854db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x10 - VEOL = 0x11 - VEOL2 = 0x6 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x4 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VSWTCH = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x20 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x40041270 + BLKBSZSET = 0x80041271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40041272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x2000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0x21 + F_GETLK64 = 0x21 + F_GETOWN = 0x17 + F_RDLCK = 0x0 + F_SETLK = 0x22 + F_SETLK64 = 0x22 + F_SETLKW = 0x23 + F_SETLKW64 = 0x23 + F_SETOWN = 0x18 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x80 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x800 + MAP_ANONYMOUS = 0x800 + MAP_DENYWRITE = 0x2000 + MAP_EXECUTABLE = 0x4000 + MAP_GROWSDOWN = 0x1000 + MAP_HUGETLB = 0x80000 + MAP_LOCKED = 0x8000 + MAP_NONBLOCK = 0x20000 + MAP_NORESERVE = 0x400 + MAP_POPULATE = 0x10000 + MAP_RENAME = 0x800 + MAP_STACK = 0x40000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x8 + O_ASYNC = 0x1000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x100 + O_DIRECT = 0x8000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x10 + O_EXCL = 0x400 + O_FSYNC = 0x4010 + O_LARGEFILE = 0x2000 + O_NDELAY = 0x80 + O_NOATIME = 0x40000 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x80 + O_PATH = 0x200000 + O_RSYNC = 0x4010 + O_SYNC = 0x4010 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40042407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc004240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80042406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4008743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80087446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x800c744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80087447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PR_SET_PTRACER_ANY = 0xffffffff + PTRACE_GETFPREGS = 0xe + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 + PTRACE_GET_WATCH_REGS = 0xd0 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_PEEKDATA_3264 = 0xc1 + PTRACE_PEEKTEXT_3264 = 0xc0 + PTRACE_POKEDATA_3264 = 0xc3 + PTRACE_POKETEXT_3264 = 0xc2 + PTRACE_SETFPREGS = 0xf + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SET_WATCH_REGS = 0xd1 + RLIMIT_AS = 0x6 + RLIMIT_MEMLOCK = 0x9 + RLIMIT_NOFILE = 0x5 + RLIMIT_NPROC = 0x8 + RLIMIT_RSS = 0x7 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4004700d + RTC_EPOCH_SET = 0x8004700e + RTC_IRQP_READ = 0x4004700b + RTC_IRQP_SET = 0x8004700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x401c7011 + RTC_PLL_SET = 0x801c7012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x80 + SIOCATMARK = 0x40047307 + SIOCGPGRP = 0x40047309 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x467f + SIOCOUTQ = 0x7472 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x1 + SOCK_NONBLOCK = 0x80 + SOCK_STREAM = 0x2 + SOL_SOCKET = 0xffff + SO_ACCEPTCONN = 0x1009 + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x11 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x12 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1e + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x1f + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x1005 + SO_STYLE = 0x1008 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x5407 + TCGETA = 0x5401 + TCGETS = 0x540d + TCGETS2 = 0x4030542a + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCSBRKP = 0x5486 + TCSETA = 0x5402 + TCSETAF = 0x5404 + TCSETAW = 0x5403 + TCSETS = 0x540e + TCSETS2 = 0x8030542b + TCSETSF = 0x5410 + TCSETSF2 = 0x8030542d + TCSETSW = 0x540f + TCSETSW2 = 0x8030542c + TCXONC = 0x5406 + TIOCCBRK = 0x5428 + TIOCCONS = 0x80047478 + TIOCEXCL = 0x740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x5492 + TIOCGISO7816 = 0x40285442 + TIOCGLCKTRMIOS = 0x548b + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 + TIOCGRS485 = 0x4020542e + TIOCGSERIAL = 0x5484 + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5481 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x467f + TIOCLINUX = 0x5483 + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMIWAIT = 0x5491 + TIOCMSET = 0x741a + TIOCM_CAR = 0x100 + TIOCM_CD = 0x100 + TIOCM_CTS = 0x40 + TIOCM_DSR = 0x400 + TIOCM_RI = 0x200 + TIOCM_RNG = 0x200 + TIOCM_SR = 0x20 + TIOCM_ST = 0x10 + TIOCNOTTY = 0x5471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7472 + TIOCPKT = 0x5470 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x5480 + TIOCSERCONFIG = 0x5488 + TIOCSERGETLSR = 0x548e + TIOCSERGETMULTI = 0x548f + TIOCSERGSTRUCT = 0x548d + TIOCSERGWILD = 0x5489 + TIOCSERSETMULTI = 0x5490 + TIOCSERSWILD = 0x548a + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIG = 0x80045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x548c + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0xc020542f + TIOCSSERIAL = 0x5485 + TIOCSSOFTCAR = 0x5482 + TIOCSTI = 0x5472 + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x8000 + TUNATTACHFILTER = 0x800854d5 + TUNDETACHFILTER = 0x800854d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x400854db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0xd + VEOF = 0x10 + VEOL = 0x11 + VEOL2 = 0x6 + VMIN = 0x4 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VSWTCH = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x20 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x9e) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x82) @@ -2799,12 +500,8 @@ const ( EDEADLK = syscall.Errno(0x2d) EDEADLOCK = syscall.Errno(0x38) EDESTADDRREQ = syscall.Errno(0x60) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -2812,11 +509,7 @@ const ( EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x85) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) @@ -2833,8 +526,6 @@ const ( ELNRNG = syscall.Errno(0x29) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) @@ -2842,100 +533,68 @@ const ( ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x86) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x50) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x7b) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x34) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x16) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x18) SIGTTIN = syscall.Signal(0x1a) SIGTTOU = syscall.Signal(0x1b) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 27227912879..63df35597ec 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -11,2845 +11,547 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x17 - B110 = 0x3 - B115200 = 0x11 - B1152000 = 0x18 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x19 - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x1a - B230400 = 0x12 - B2400 = 0xb - B2500000 = 0x1b - B300 = 0x7 - B3000000 = 0x1c - B3500000 = 0x1d - B38400 = 0xf - B4000000 = 0x1e - B460800 = 0x13 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x14 - B57600 = 0x10 - B576000 = 0x15 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x16 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1f - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x8000 - BSDLY = 0x8000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0xff - CBAUDEX = 0x0 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0xff0000 - CLOCAL = 0x8000 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x1000 - CR2 = 0x2000 - CR3 = 0x3000 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x3000 - CREAD = 0x800 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIGNAL = 0xff - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x4000 - FFDLY = 0x4000 - FLUSHO = 0x800000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0xd - F_SETLKW = 0x7 - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x4000 - IBSHIFT = 0x10 - ICANON = 0x100 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x400 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x80 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x1000 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x80 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x40 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x2000 - MCL_FUTURE = 0x4000 - MCL_ONFAULT = 0x8000 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NL2 = 0x200 - NL3 = 0x300 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x300 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80000000 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x4 - ONLCR = 0x2 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x20000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x404000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x1000 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4010743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80107446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x8010744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80107447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_SAO = 0x10 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETEVRREGS = 0x14 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGS64 = 0x16 - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GETVRREGS = 0x12 - PTRACE_GETVSRREGS = 0x1b - PTRACE_GET_DEBUGREG = 0x19 - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETEVRREGS = 0x15 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGS64 = 0x17 - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SETVRREGS = 0x13 - PTRACE_SETVSRREGS = 0x1c - PTRACE_SET_DEBUGREG = 0x1a - PTRACE_SINGLEBLOCK = 0x100 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_SYSEMU = 0x1d - PTRACE_SYSEMU_SINGLESTEP = 0x1e - PTRACE_TRACEME = 0x0 - PT_CCR = 0x26 - PT_CTR = 0x23 - PT_DAR = 0x29 - PT_DSCR = 0x2c - PT_DSISR = 0x2a - PT_FPR0 = 0x30 - PT_FPSCR = 0x50 - PT_LNK = 0x24 - PT_MSR = 0x21 - PT_NIP = 0x20 - PT_ORIG_R3 = 0x22 - PT_R0 = 0x0 - PT_R1 = 0x1 - PT_R10 = 0xa - PT_R11 = 0xb - PT_R12 = 0xc - PT_R13 = 0xd - PT_R14 = 0xe - PT_R15 = 0xf - PT_R16 = 0x10 - PT_R17 = 0x11 - PT_R18 = 0x12 - PT_R19 = 0x13 - PT_R2 = 0x2 - PT_R20 = 0x14 - PT_R21 = 0x15 - PT_R22 = 0x16 - PT_R23 = 0x17 - PT_R24 = 0x18 - PT_R25 = 0x19 - PT_R26 = 0x1a - PT_R27 = 0x1b - PT_R28 = 0x1c - PT_R29 = 0x1d - PT_R3 = 0x3 - PT_R30 = 0x1e - PT_R31 = 0x1f - PT_R4 = 0x4 - PT_R5 = 0x5 - PT_R6 = 0x6 - PT_R7 = 0x7 - PT_R8 = 0x8 - PT_R9 = 0x9 - PT_REGS_COUNT = 0x2c - PT_RESULT = 0x2b - PT_SOFTE = 0x27 - PT_TRAP = 0x28 - PT_VR0 = 0x52 - PT_VRSAVE = 0x94 - PT_VSCR = 0x93 - PT_VSR0 = 0x96 - PT_VSR31 = 0xd4 - PT_XER = 0x25 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4008700d - RTC_EPOCH_SET = 0x8008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4008700b - RTC_IRQP_SET = 0x8008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x40207011 - RTC_PLL_SET = 0x80207012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x4004667f - SIOCOUTQ = 0x40047473 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x14 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x15 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x10 - SO_RCVTIMEO = 0x12 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x12 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x11 - SO_SNDTIMEO = 0x13 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x13 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x400 - TAB2 = 0x800 - TAB3 = 0xc00 - TABDLY = 0xc00 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x2000741f - TCGETA = 0x40147417 - TCGETS = 0x402c7413 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x2000741d - TCSBRKP = 0x5425 - TCSETA = 0x80147418 - TCSETAF = 0x8014741c - TCSETAW = 0x80147419 - TCSETS = 0x802c7414 - TCSETSF = 0x802c7416 - TCSETSW = 0x802c7415 - TCXONC = 0x2000741e - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x40045432 - TIOCGETC = 0x40067412 - TIOCGETD = 0x5424 - TIOCGETP = 0x40067408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x40285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGLTC = 0x40067474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGPTPEER = 0x20005441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x4004667f - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_LOOP = 0x8000 - TIOCM_OUT1 = 0x2000 - TIOCM_OUT2 = 0x4000 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETC = 0x80067411 - TIOCSETD = 0x5423 - TIOCSETN = 0x8006740a - TIOCSETP = 0x80067409 - TIOCSIG = 0x80045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSLTC = 0x80067475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTART = 0x2000746e - TIOCSTI = 0x5412 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x400000 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0x10 - VEOF = 0x4 - VEOL = 0x6 - VEOL2 = 0x8 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x5 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xb - VSTART = 0xd - VSTOP = 0xe - VSUSP = 0xc - VSWTC = 0x9 - VT0 = 0x0 - VT1 = 0x10000 - VTDLY = 0x10000 - VTIME = 0x7 - VWERASE = 0xa - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4000 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0xc00 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x17 + B115200 = 0x11 + B1152000 = 0x18 + B1500000 = 0x19 + B2000000 = 0x1a + B230400 = 0x12 + B2500000 = 0x1b + B3000000 = 0x1c + B3500000 = 0x1d + B4000000 = 0x1e + B460800 = 0x13 + B500000 = 0x14 + B57600 = 0x10 + B576000 = 0x15 + B921600 = 0x16 + BLKBSZGET = 0x40081270 + BLKBSZSET = 0x80081271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40081272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1f + BS1 = 0x8000 + BSDLY = 0x8000 + CBAUD = 0xff + CBAUDEX = 0x0 + CIBAUD = 0xff0000 + CLOCAL = 0x8000 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 + CREAD = 0x800 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTOPB = 0x400 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000000 + FF1 = 0x4000 + FFDLY = 0x4000 + FLUSHO = 0x800000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0x5 + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0xd + F_SETLKW = 0x7 + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x4000 + ICANON = 0x100 + IEXTEN = 0x400 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x80 + IUCLC = 0x1000 + IXOFF = 0x400 + IXON = 0x200 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x80 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MCL_ONFAULT = 0x8000 + NFDBITS = 0x40 + NL2 = 0x200 + NL3 = 0x300 + NLDLY = 0x300 + NOFLSH = 0x80000000 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x4 + ONLCR = 0x2 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x20000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x404000 + O_TRUNC = 0x200 + PARENB = 0x1000 + PARODD = 0x2000 + PENDIN = 0x20000000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PROT_SAO = 0x10 + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETEVRREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS64 = 0x16 + PTRACE_GETVRREGS = 0x12 + PTRACE_GETVSRREGS = 0x1b + PTRACE_GET_DEBUGREG = 0x19 + PTRACE_SETEVRREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETREGS64 = 0x17 + PTRACE_SETVRREGS = 0x13 + PTRACE_SETVSRREGS = 0x1c + PTRACE_SET_DEBUGREG = 0x1a + PTRACE_SINGLEBLOCK = 0x100 + PTRACE_SYSEMU = 0x1d + PTRACE_SYSEMU_SINGLESTEP = 0x1e + PT_CCR = 0x26 + PT_CTR = 0x23 + PT_DAR = 0x29 + PT_DSCR = 0x2c + PT_DSISR = 0x2a + PT_FPR0 = 0x30 + PT_FPSCR = 0x50 + PT_LNK = 0x24 + PT_MSR = 0x21 + PT_NIP = 0x20 + PT_ORIG_R3 = 0x22 + PT_R0 = 0x0 + PT_R1 = 0x1 + PT_R10 = 0xa + PT_R11 = 0xb + PT_R12 = 0xc + PT_R13 = 0xd + PT_R14 = 0xe + PT_R15 = 0xf + PT_R16 = 0x10 + PT_R17 = 0x11 + PT_R18 = 0x12 + PT_R19 = 0x13 + PT_R2 = 0x2 + PT_R20 = 0x14 + PT_R21 = 0x15 + PT_R22 = 0x16 + PT_R23 = 0x17 + PT_R24 = 0x18 + PT_R25 = 0x19 + PT_R26 = 0x1a + PT_R27 = 0x1b + PT_R28 = 0x1c + PT_R29 = 0x1d + PT_R3 = 0x3 + PT_R30 = 0x1e + PT_R31 = 0x1f + PT_R4 = 0x4 + PT_R5 = 0x5 + PT_R6 = 0x6 + PT_R7 = 0x7 + PT_R8 = 0x8 + PT_R9 = 0x9 + PT_REGS_COUNT = 0x2c + PT_RESULT = 0x2b + PT_SOFTE = 0x27 + PT_TRAP = 0x28 + PT_VR0 = 0x52 + PT_VRSAVE = 0x94 + PT_VSCR = 0x93 + PT_VSR0 = 0x96 + PT_VSR31 = 0xd4 + PT_XER = 0x25 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4008700d + RTC_EPOCH_SET = 0x8008700e + RTC_IRQP_READ = 0x4008700b + RTC_IRQP_SET = 0x8008700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x40207011 + RTC_PLL_SET = 0x80207012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x4004667f + SIOCOUTQ = 0x40047473 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x14 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x15 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x10 + SO_RCVTIMEO = 0x12 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x12 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x11 + SO_SNDTIMEO = 0x13 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x13 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0xc00 + TABDLY = 0xc00 + TCFLSH = 0x2000741f + TCGETA = 0x40147417 + TCGETS = 0x402c7413 + TCSAFLUSH = 0x2 + TCSBRK = 0x2000741d + TCSBRKP = 0x5425 + TCSETA = 0x80147418 + TCSETAF = 0x8014741c + TCSETAW = 0x80147419 + TCSETS = 0x802c7414 + TCSETSF = 0x802c7416 + TCSETSW = 0x802c7415 + TCXONC = 0x2000741e + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x40045432 + TIOCGETC = 0x40067412 + TIOCGETD = 0x5424 + TIOCGETP = 0x40067408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x40285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGLTC = 0x40067474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_LOOP = 0x8000 + TIOCM_OUT1 = 0x2000 + TIOCM_OUT2 = 0x4000 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETC = 0x80067411 + TIOCSETD = 0x5423 + TIOCSETN = 0x8006740a + TIOCSETP = 0x80067409 + TIOCSIG = 0x80045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSLTC = 0x80067475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTART = 0x2000746e + TIOCSTI = 0x5412 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x400000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0x10 + VEOF = 0x4 + VEOL = 0x6 + VEOL2 = 0x8 + VMIN = 0x5 + VREPRINT = 0xb + VSTART = 0xd + VSTOP = 0xe + VSUSP = 0xc + VSWTC = 0x9 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x7 + VWERASE = 0xa + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x40 + XCASE = 0x4000 + XTABS = 0xc00 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2858,23 +560,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x3a) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2891,8 +585,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2900,99 +592,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index e33be416c7d..7ab68f7c8a3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -11,2845 +11,547 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x17 - B110 = 0x3 - B115200 = 0x11 - B1152000 = 0x18 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x19 - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x1a - B230400 = 0x12 - B2400 = 0xb - B2500000 = 0x1b - B300 = 0x7 - B3000000 = 0x1c - B3500000 = 0x1d - B38400 = 0xf - B4000000 = 0x1e - B460800 = 0x13 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x14 - B57600 = 0x10 - B576000 = 0x15 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x16 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1f - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x8000 - BSDLY = 0x8000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0xff - CBAUDEX = 0x0 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0xff0000 - CLOCAL = 0x8000 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x1000 - CR2 = 0x2000 - CR3 = 0x3000 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x3000 - CREAD = 0x800 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x100 - CS7 = 0x200 - CS8 = 0x300 - CSIGNAL = 0xff - CSIZE = 0x300 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x400 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x40 - ECHOE = 0x2 - ECHOK = 0x4 - ECHOKE = 0x1 - ECHONL = 0x10 - ECHOPRT = 0x20 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x4000 - FFDLY = 0x4000 - FLUSHO = 0x800000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0xc - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0xd - F_SETLKW = 0x7 - F_SETLKW64 = 0xe - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x4000 - IBSHIFT = 0x10 - ICANON = 0x100 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x400 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x80 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x1000 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x400 - IXON = 0x200 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x80 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x40 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x2000 - MCL_FUTURE = 0x4000 - MCL_ONFAULT = 0x8000 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NL2 = 0x200 - NL3 = 0x300 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x300 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80000000 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x4 - ONLCR = 0x2 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x20000 - O_DIRECTORY = 0x4000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x8000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x404000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x1000 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x2000 - PENDIN = 0x20000000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4010743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80107446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x8010744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80107447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_SAO = 0x10 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETEVRREGS = 0x14 - PTRACE_GETFPREGS = 0xe - PTRACE_GETREGS = 0xc - PTRACE_GETREGS64 = 0x16 - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GETVRREGS = 0x12 - PTRACE_GETVSRREGS = 0x1b - PTRACE_GET_DEBUGREG = 0x19 - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETEVRREGS = 0x15 - PTRACE_SETFPREGS = 0xf - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGS64 = 0x17 - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SETVRREGS = 0x13 - PTRACE_SETVSRREGS = 0x1c - PTRACE_SET_DEBUGREG = 0x1a - PTRACE_SINGLEBLOCK = 0x100 - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_SYSEMU = 0x1d - PTRACE_SYSEMU_SINGLESTEP = 0x1e - PTRACE_TRACEME = 0x0 - PT_CCR = 0x26 - PT_CTR = 0x23 - PT_DAR = 0x29 - PT_DSCR = 0x2c - PT_DSISR = 0x2a - PT_FPR0 = 0x30 - PT_FPSCR = 0x50 - PT_LNK = 0x24 - PT_MSR = 0x21 - PT_NIP = 0x20 - PT_ORIG_R3 = 0x22 - PT_R0 = 0x0 - PT_R1 = 0x1 - PT_R10 = 0xa - PT_R11 = 0xb - PT_R12 = 0xc - PT_R13 = 0xd - PT_R14 = 0xe - PT_R15 = 0xf - PT_R16 = 0x10 - PT_R17 = 0x11 - PT_R18 = 0x12 - PT_R19 = 0x13 - PT_R2 = 0x2 - PT_R20 = 0x14 - PT_R21 = 0x15 - PT_R22 = 0x16 - PT_R23 = 0x17 - PT_R24 = 0x18 - PT_R25 = 0x19 - PT_R26 = 0x1a - PT_R27 = 0x1b - PT_R28 = 0x1c - PT_R29 = 0x1d - PT_R3 = 0x3 - PT_R30 = 0x1e - PT_R31 = 0x1f - PT_R4 = 0x4 - PT_R5 = 0x5 - PT_R6 = 0x6 - PT_R7 = 0x7 - PT_R8 = 0x8 - PT_R9 = 0x9 - PT_REGS_COUNT = 0x2c - PT_RESULT = 0x2b - PT_SOFTE = 0x27 - PT_TRAP = 0x28 - PT_VR0 = 0x52 - PT_VRSAVE = 0x94 - PT_VSCR = 0x93 - PT_VSR0 = 0x96 - PT_VSR31 = 0xd4 - PT_XER = 0x25 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4008700d - RTC_EPOCH_SET = 0x8008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4008700b - RTC_IRQP_SET = 0x8008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x40207011 - RTC_PLL_SET = 0x80207012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x4004667f - SIOCOUTQ = 0x40047473 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x14 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x15 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x10 - SO_RCVTIMEO = 0x12 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x12 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x11 - SO_SNDTIMEO = 0x13 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x13 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x400 - TAB2 = 0x800 - TAB3 = 0xc00 - TABDLY = 0xc00 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x2000741f - TCGETA = 0x40147417 - TCGETS = 0x402c7413 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x2000741d - TCSBRKP = 0x5425 - TCSETA = 0x80147418 - TCSETAF = 0x8014741c - TCSETAW = 0x80147419 - TCSETS = 0x802c7414 - TCSETSF = 0x802c7416 - TCSETSW = 0x802c7415 - TCXONC = 0x2000741e - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x40045432 - TIOCGETC = 0x40067412 - TIOCGETD = 0x5424 - TIOCGETP = 0x40067408 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x40285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGLTC = 0x40067474 - TIOCGPGRP = 0x40047477 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40045430 - TIOCGPTPEER = 0x20005441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x4004667f - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_LOOP = 0x8000 - TIOCM_OUT1 = 0x2000 - TIOCM_OUT2 = 0x4000 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETC = 0x80067411 - TIOCSETD = 0x5423 - TIOCSETN = 0x8006740a - TIOCSETP = 0x80067409 - TIOCSIG = 0x80045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSLTC = 0x80067475 - TIOCSPGRP = 0x80047476 - TIOCSPTLCK = 0x80045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTART = 0x2000746e - TIOCSTI = 0x5412 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x400000 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0x10 - VEOF = 0x4 - VEOL = 0x6 - VEOL2 = 0x8 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x5 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xb - VSTART = 0xd - VSTOP = 0xe - VSUSP = 0xc - VSWTC = 0x9 - VT0 = 0x0 - VT1 = 0x10000 - VTDLY = 0x10000 - VTIME = 0x7 - VWERASE = 0xa - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4000 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0xc00 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x17 + B115200 = 0x11 + B1152000 = 0x18 + B1500000 = 0x19 + B2000000 = 0x1a + B230400 = 0x12 + B2500000 = 0x1b + B3000000 = 0x1c + B3500000 = 0x1d + B4000000 = 0x1e + B460800 = 0x13 + B500000 = 0x14 + B57600 = 0x10 + B576000 = 0x15 + B921600 = 0x16 + BLKBSZGET = 0x40081270 + BLKBSZSET = 0x80081271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40081272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1f + BS1 = 0x8000 + BSDLY = 0x8000 + CBAUD = 0xff + CBAUDEX = 0x0 + CIBAUD = 0xff0000 + CLOCAL = 0x8000 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 + CREAD = 0x800 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTOPB = 0x400 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000000 + FF1 = 0x4000 + FFDLY = 0x4000 + FLUSHO = 0x800000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0x5 + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0xd + F_SETLKW = 0x7 + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x4000 + ICANON = 0x100 + IEXTEN = 0x400 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x80 + IUCLC = 0x1000 + IXOFF = 0x400 + IXON = 0x200 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x80 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MCL_ONFAULT = 0x8000 + NFDBITS = 0x40 + NL2 = 0x200 + NL3 = 0x300 + NLDLY = 0x300 + NOFLSH = 0x80000000 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x4 + ONLCR = 0x2 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x20000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x404000 + O_TRUNC = 0x200 + PARENB = 0x1000 + PARODD = 0x2000 + PENDIN = 0x20000000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PROT_SAO = 0x10 + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETEVRREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS64 = 0x16 + PTRACE_GETVRREGS = 0x12 + PTRACE_GETVSRREGS = 0x1b + PTRACE_GET_DEBUGREG = 0x19 + PTRACE_SETEVRREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETREGS64 = 0x17 + PTRACE_SETVRREGS = 0x13 + PTRACE_SETVSRREGS = 0x1c + PTRACE_SET_DEBUGREG = 0x1a + PTRACE_SINGLEBLOCK = 0x100 + PTRACE_SYSEMU = 0x1d + PTRACE_SYSEMU_SINGLESTEP = 0x1e + PT_CCR = 0x26 + PT_CTR = 0x23 + PT_DAR = 0x29 + PT_DSCR = 0x2c + PT_DSISR = 0x2a + PT_FPR0 = 0x30 + PT_FPSCR = 0x50 + PT_LNK = 0x24 + PT_MSR = 0x21 + PT_NIP = 0x20 + PT_ORIG_R3 = 0x22 + PT_R0 = 0x0 + PT_R1 = 0x1 + PT_R10 = 0xa + PT_R11 = 0xb + PT_R12 = 0xc + PT_R13 = 0xd + PT_R14 = 0xe + PT_R15 = 0xf + PT_R16 = 0x10 + PT_R17 = 0x11 + PT_R18 = 0x12 + PT_R19 = 0x13 + PT_R2 = 0x2 + PT_R20 = 0x14 + PT_R21 = 0x15 + PT_R22 = 0x16 + PT_R23 = 0x17 + PT_R24 = 0x18 + PT_R25 = 0x19 + PT_R26 = 0x1a + PT_R27 = 0x1b + PT_R28 = 0x1c + PT_R29 = 0x1d + PT_R3 = 0x3 + PT_R30 = 0x1e + PT_R31 = 0x1f + PT_R4 = 0x4 + PT_R5 = 0x5 + PT_R6 = 0x6 + PT_R7 = 0x7 + PT_R8 = 0x8 + PT_R9 = 0x9 + PT_REGS_COUNT = 0x2c + PT_RESULT = 0x2b + PT_SOFTE = 0x27 + PT_TRAP = 0x28 + PT_VR0 = 0x52 + PT_VRSAVE = 0x94 + PT_VSCR = 0x93 + PT_VSR0 = 0x96 + PT_VSR31 = 0xd4 + PT_XER = 0x25 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4008700d + RTC_EPOCH_SET = 0x8008700e + RTC_IRQP_READ = 0x4008700b + RTC_IRQP_SET = 0x8008700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x40207011 + RTC_PLL_SET = 0x80207012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x4004667f + SIOCOUTQ = 0x40047473 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x14 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x15 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x10 + SO_RCVTIMEO = 0x12 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x12 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x11 + SO_SNDTIMEO = 0x13 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x13 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0xc00 + TABDLY = 0xc00 + TCFLSH = 0x2000741f + TCGETA = 0x40147417 + TCGETS = 0x402c7413 + TCSAFLUSH = 0x2 + TCSBRK = 0x2000741d + TCSBRKP = 0x5425 + TCSETA = 0x80147418 + TCSETAF = 0x8014741c + TCSETAW = 0x80147419 + TCSETS = 0x802c7414 + TCSETSF = 0x802c7416 + TCSETSW = 0x802c7415 + TCXONC = 0x2000741e + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x40045432 + TIOCGETC = 0x40067412 + TIOCGETD = 0x5424 + TIOCGETP = 0x40067408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x40285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGLTC = 0x40067474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGPTPEER = 0x20005441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_LOOP = 0x8000 + TIOCM_OUT1 = 0x2000 + TIOCM_OUT2 = 0x4000 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETC = 0x80067411 + TIOCSETD = 0x5423 + TIOCSETN = 0x8006740a + TIOCSETP = 0x80067409 + TIOCSIG = 0x80045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSLTC = 0x80067475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTART = 0x2000746e + TIOCSTI = 0x5412 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x400000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0x10 + VEOF = 0x4 + VEOL = 0x6 + VEOL2 = 0x8 + VMIN = 0x5 + VREPRINT = 0xb + VSTART = 0xd + VSTOP = 0xe + VSUSP = 0xc + VSWTC = 0x9 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x7 + VWERASE = 0xa + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x40 + XCASE = 0x4000 + XTABS = 0xc00 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2858,23 +560,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x3a) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2891,8 +585,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2900,99 +592,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index b9908d3094f..f99cf1b9e08 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -11,2771 +11,472 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x80081270 - BLKBSZSET = 0x40081271 - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKRRPART = 0x125f - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_USERNS = 0xb701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8010743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x40107446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x4010744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40107447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCXFERUNIT = 0x744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8008700d - RTC_EPOCH_SET = 0x4008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x8008700b - RTC_IRQP_SET = 0x4008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x80207011 - RTC_PLL_SET = 0x40207012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8008700d + RTC_EPOCH_SET = 0x4008700e + RTC_IRQP_READ = 0x8008700b + RTC_IRQP_SET = 0x4008700c + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x80207011 + RTC_PLL_SET = 0x40207012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2784,23 +485,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x23) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2817,8 +510,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2826,99 +517,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 85647f4f79e..613ee237e30 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -11,2844 +11,545 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x80081270 - BLKBSZSET = 0x40081271 - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80081272 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKRRPART = 0x125f - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x80000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x0 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x80000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x800 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_USERNS = 0xb701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8010743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x40107446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x4010744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40107447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCXFERUNIT = 0x744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_DISABLE_TE = 0x5010 - PTRACE_ENABLE_TE = 0x5009 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETREGS = 0xc - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_LAST_BREAK = 0x5006 - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_OLDSETOPTIONS = 0x15 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKDATA_AREA = 0x5003 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKTEXT_AREA = 0x5002 - PTRACE_PEEKUSR = 0x3 - PTRACE_PEEKUSR_AREA = 0x5000 - PTRACE_PEEK_SYSTEM_CALL = 0x5007 - PTRACE_POKEDATA = 0x5 - PTRACE_POKEDATA_AREA = 0x5005 - PTRACE_POKETEXT = 0x4 - PTRACE_POKETEXT_AREA = 0x5004 - PTRACE_POKEUSR = 0x6 - PTRACE_POKEUSR_AREA = 0x5001 - PTRACE_POKE_SYSTEM_CALL = 0x5008 - PTRACE_PROT = 0x15 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLEBLOCK = 0xc - PTRACE_SINGLESTEP = 0x9 - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TE_ABORT_RAND = 0x5011 - PTRACE_TRACEME = 0x0 - PT_ACR0 = 0x90 - PT_ACR1 = 0x94 - PT_ACR10 = 0xb8 - PT_ACR11 = 0xbc - PT_ACR12 = 0xc0 - PT_ACR13 = 0xc4 - PT_ACR14 = 0xc8 - PT_ACR15 = 0xcc - PT_ACR2 = 0x98 - PT_ACR3 = 0x9c - PT_ACR4 = 0xa0 - PT_ACR5 = 0xa4 - PT_ACR6 = 0xa8 - PT_ACR7 = 0xac - PT_ACR8 = 0xb0 - PT_ACR9 = 0xb4 - PT_CR_10 = 0x168 - PT_CR_11 = 0x170 - PT_CR_9 = 0x160 - PT_ENDREGS = 0x1af - PT_FPC = 0xd8 - PT_FPR0 = 0xe0 - PT_FPR1 = 0xe8 - PT_FPR10 = 0x130 - PT_FPR11 = 0x138 - PT_FPR12 = 0x140 - PT_FPR13 = 0x148 - PT_FPR14 = 0x150 - PT_FPR15 = 0x158 - PT_FPR2 = 0xf0 - PT_FPR3 = 0xf8 - PT_FPR4 = 0x100 - PT_FPR5 = 0x108 - PT_FPR6 = 0x110 - PT_FPR7 = 0x118 - PT_FPR8 = 0x120 - PT_FPR9 = 0x128 - PT_GPR0 = 0x10 - PT_GPR1 = 0x18 - PT_GPR10 = 0x60 - PT_GPR11 = 0x68 - PT_GPR12 = 0x70 - PT_GPR13 = 0x78 - PT_GPR14 = 0x80 - PT_GPR15 = 0x88 - PT_GPR2 = 0x20 - PT_GPR3 = 0x28 - PT_GPR4 = 0x30 - PT_GPR5 = 0x38 - PT_GPR6 = 0x40 - PT_GPR7 = 0x48 - PT_GPR8 = 0x50 - PT_GPR9 = 0x58 - PT_IEEE_IP = 0x1a8 - PT_LASTOFF = 0x1a8 - PT_ORIGGPR2 = 0xd0 - PT_PSWADDR = 0x8 - PT_PSWMASK = 0x0 - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8008700d - RTC_EPOCH_SET = 0x4008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x8008700b - RTC_IRQP_SET = 0x4008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x80207011 - RTC_PLL_SET = 0x40207012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x80000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x800 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0x1 - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUSY_POLL = 0x2e - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x4 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NOFCS = 0x2b - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1f - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKRRPART = 0x125f + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_DISABLE_TE = 0x5010 + PTRACE_ENABLE_TE = 0x5009 + PTRACE_GET_LAST_BREAK = 0x5006 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_PEEKDATA_AREA = 0x5003 + PTRACE_PEEKTEXT_AREA = 0x5002 + PTRACE_PEEKUSR_AREA = 0x5000 + PTRACE_PEEK_SYSTEM_CALL = 0x5007 + PTRACE_POKEDATA_AREA = 0x5005 + PTRACE_POKETEXT_AREA = 0x5004 + PTRACE_POKEUSR_AREA = 0x5001 + PTRACE_POKE_SYSTEM_CALL = 0x5008 + PTRACE_PROT = 0x15 + PTRACE_SINGLEBLOCK = 0xc + PTRACE_TE_ABORT_RAND = 0x5011 + PT_ACR0 = 0x90 + PT_ACR1 = 0x94 + PT_ACR10 = 0xb8 + PT_ACR11 = 0xbc + PT_ACR12 = 0xc0 + PT_ACR13 = 0xc4 + PT_ACR14 = 0xc8 + PT_ACR15 = 0xcc + PT_ACR2 = 0x98 + PT_ACR3 = 0x9c + PT_ACR4 = 0xa0 + PT_ACR5 = 0xa4 + PT_ACR6 = 0xa8 + PT_ACR7 = 0xac + PT_ACR8 = 0xb0 + PT_ACR9 = 0xb4 + PT_CR_10 = 0x168 + PT_CR_11 = 0x170 + PT_CR_9 = 0x160 + PT_ENDREGS = 0x1af + PT_FPC = 0xd8 + PT_FPR0 = 0xe0 + PT_FPR1 = 0xe8 + PT_FPR10 = 0x130 + PT_FPR11 = 0x138 + PT_FPR12 = 0x140 + PT_FPR13 = 0x148 + PT_FPR14 = 0x150 + PT_FPR15 = 0x158 + PT_FPR2 = 0xf0 + PT_FPR3 = 0xf8 + PT_FPR4 = 0x100 + PT_FPR5 = 0x108 + PT_FPR6 = 0x110 + PT_FPR7 = 0x118 + PT_FPR8 = 0x120 + PT_FPR9 = 0x128 + PT_GPR0 = 0x10 + PT_GPR1 = 0x18 + PT_GPR10 = 0x60 + PT_GPR11 = 0x68 + PT_GPR12 = 0x70 + PT_GPR13 = 0x78 + PT_GPR14 = 0x80 + PT_GPR15 = 0x88 + PT_GPR2 = 0x20 + PT_GPR3 = 0x28 + PT_GPR4 = 0x30 + PT_GPR5 = 0x38 + PT_GPR6 = 0x40 + PT_GPR7 = 0x48 + PT_GPR8 = 0x50 + PT_GPR9 = 0x58 + PT_IEEE_IP = 0x1a8 + PT_LASTOFF = 0x1a8 + PT_ORIGGPR2 = 0xd0 + PT_PSWADDR = 0x8 + PT_PSWMASK = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8008700d + RTC_EPOCH_SET = 0x4008700e + RTC_IRQP_READ = 0x8008700b + RTC_IRQP_SET = 0x4008700c + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x80207011 + RTC_PLL_SET = 0x40207012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERSEC = 0x1f + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7d) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x2c) ECOMM = syscall.Errno(0x46) ECONNABORTED = syscall.Errno(0x67) @@ -2857,23 +558,15 @@ const ( EDEADLK = syscall.Errno(0x23) EDEADLOCK = syscall.Errno(0x23) EDESTADDRREQ = syscall.Errno(0x59) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x6a) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x7f) EKEYREJECTED = syscall.Errno(0x81) @@ -2890,8 +583,6 @@ const ( ELNRNG = syscall.Errno(0x30) ELOOP = syscall.Errno(0x28) EMEDIUMTYPE = syscall.Errno(0x7c) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x5a) EMULTIHOP = syscall.Errno(0x48) ENAMETOOLONG = syscall.Errno(0x24) @@ -2899,99 +590,67 @@ const ( ENETDOWN = syscall.Errno(0x64) ENETRESET = syscall.Errno(0x66) ENETUNREACH = syscall.Errno(0x65) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x6b) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x4c) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x60) - EPIPE = syscall.Errno(0x20) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) - EROFS = syscall.Errno(0x1e) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x36) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x1d) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index c0095a5432e..1f7a68d5cce 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -11,2834 +11,536 @@ package unix import "syscall" const ( - AAFS_MAGIC = 0x5a3c69f0 - ADFS_SUPER_MAGIC = 0xadf5 - AFFS_SUPER_MAGIC = 0xadff - AFS_FS_MAGIC = 0x6b414653 - AFS_SUPER_MAGIC = 0x5346414f - AF_ALG = 0x26 - AF_APPLETALK = 0x5 - AF_ASH = 0x12 - AF_ATMPVC = 0x8 - AF_ATMSVC = 0x14 - AF_AX25 = 0x3 - AF_BLUETOOTH = 0x1f - AF_BRIDGE = 0x7 - AF_CAIF = 0x25 - AF_CAN = 0x1d - AF_DECnet = 0xc - AF_ECONET = 0x13 - AF_FILE = 0x1 - AF_IB = 0x1b - AF_IEEE802154 = 0x24 - AF_INET = 0x2 - AF_INET6 = 0xa - AF_IPX = 0x4 - AF_IRDA = 0x17 - AF_ISDN = 0x22 - AF_IUCV = 0x20 - AF_KCM = 0x29 - AF_KEY = 0xf - AF_LLC = 0x1a - AF_LOCAL = 0x1 - AF_MAX = 0x2d - AF_MPLS = 0x1c - AF_NETBEUI = 0xd - AF_NETLINK = 0x10 - AF_NETROM = 0x6 - AF_NFC = 0x27 - AF_PACKET = 0x11 - AF_PHONET = 0x23 - AF_PPPOX = 0x18 - AF_QIPCRTR = 0x2a - AF_RDS = 0x15 - AF_ROSE = 0xb - AF_ROUTE = 0x10 - AF_RXRPC = 0x21 - AF_SECURITY = 0xe - AF_SMC = 0x2b - AF_SNA = 0x16 - AF_TIPC = 0x1e - AF_UNIX = 0x1 - AF_UNSPEC = 0x0 - AF_VSOCK = 0x28 - AF_WANPIPE = 0x19 - AF_X25 = 0x9 - AF_XDP = 0x2c - ALG_OP_DECRYPT = 0x0 - ALG_OP_ENCRYPT = 0x1 - ALG_SET_AEAD_ASSOCLEN = 0x4 - ALG_SET_AEAD_AUTHSIZE = 0x5 - ALG_SET_IV = 0x2 - ALG_SET_KEY = 0x1 - ALG_SET_OP = 0x3 - ANON_INODE_FS_MAGIC = 0x9041934 - ARPHRD_6LOWPAN = 0x339 - ARPHRD_ADAPT = 0x108 - ARPHRD_APPLETLK = 0x8 - ARPHRD_ARCNET = 0x7 - ARPHRD_ASH = 0x30d - ARPHRD_ATM = 0x13 - ARPHRD_AX25 = 0x3 - ARPHRD_BIF = 0x307 - ARPHRD_CAIF = 0x336 - ARPHRD_CAN = 0x118 - ARPHRD_CHAOS = 0x5 - ARPHRD_CISCO = 0x201 - ARPHRD_CSLIP = 0x101 - ARPHRD_CSLIP6 = 0x103 - ARPHRD_DDCMP = 0x205 - ARPHRD_DLCI = 0xf - ARPHRD_ECONET = 0x30e - ARPHRD_EETHER = 0x2 - ARPHRD_ETHER = 0x1 - ARPHRD_EUI64 = 0x1b - ARPHRD_FCAL = 0x311 - ARPHRD_FCFABRIC = 0x313 - ARPHRD_FCPL = 0x312 - ARPHRD_FCPP = 0x310 - ARPHRD_FDDI = 0x306 - ARPHRD_FRAD = 0x302 - ARPHRD_HDLC = 0x201 - ARPHRD_HIPPI = 0x30c - ARPHRD_HWX25 = 0x110 - ARPHRD_IEEE1394 = 0x18 - ARPHRD_IEEE802 = 0x6 - ARPHRD_IEEE80211 = 0x321 - ARPHRD_IEEE80211_PRISM = 0x322 - ARPHRD_IEEE80211_RADIOTAP = 0x323 - ARPHRD_IEEE802154 = 0x324 - ARPHRD_IEEE802154_MONITOR = 0x325 - ARPHRD_IEEE802_TR = 0x320 - ARPHRD_INFINIBAND = 0x20 - ARPHRD_IP6GRE = 0x337 - ARPHRD_IPDDP = 0x309 - ARPHRD_IPGRE = 0x30a - ARPHRD_IRDA = 0x30f - ARPHRD_LAPB = 0x204 - ARPHRD_LOCALTLK = 0x305 - ARPHRD_LOOPBACK = 0x304 - ARPHRD_METRICOM = 0x17 - ARPHRD_NETLINK = 0x338 - ARPHRD_NETROM = 0x0 - ARPHRD_NONE = 0xfffe - ARPHRD_PHONET = 0x334 - ARPHRD_PHONET_PIPE = 0x335 - ARPHRD_PIMREG = 0x30b - ARPHRD_PPP = 0x200 - ARPHRD_PRONET = 0x4 - ARPHRD_RAWHDLC = 0x206 - ARPHRD_RAWIP = 0x207 - ARPHRD_ROSE = 0x10e - ARPHRD_RSRVD = 0x104 - ARPHRD_SIT = 0x308 - ARPHRD_SKIP = 0x303 - ARPHRD_SLIP = 0x100 - ARPHRD_SLIP6 = 0x102 - ARPHRD_TUNNEL = 0x300 - ARPHRD_TUNNEL6 = 0x301 - ARPHRD_VOID = 0xffff - ARPHRD_VSOCKMON = 0x33a - ARPHRD_X25 = 0x10f - ASI_LEON_DFLUSH = 0x11 - ASI_LEON_IFLUSH = 0x10 - ASI_LEON_MMUFLUSH = 0x18 - AUTOFS_SUPER_MAGIC = 0x187 - B0 = 0x0 - B1000000 = 0x1008 - B110 = 0x3 - B115200 = 0x1002 - B1152000 = 0x1009 - B1200 = 0x9 - B134 = 0x4 - B150 = 0x5 - B1500000 = 0x100a - B1800 = 0xa - B19200 = 0xe - B200 = 0x6 - B2000000 = 0x100b - B230400 = 0x1003 - B2400 = 0xb - B2500000 = 0x100c - B300 = 0x7 - B3000000 = 0x100d - B3500000 = 0x100e - B38400 = 0xf - B4000000 = 0x100f - B460800 = 0x1004 - B4800 = 0xc - B50 = 0x1 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B600 = 0x8 - B75 = 0x2 - B921600 = 0x1007 - B9600 = 0xd - BALLOON_KVM_MAGIC = 0x13661366 - BDEVFS_MAGIC = 0x62646576 - BINDERFS_SUPER_MAGIC = 0x6c6f6f70 - BINFMTFS_MAGIC = 0x42494e4d - BLKBSZGET = 0x40081270 - BLKBSZSET = 0x80081271 - BLKFLSBUF = 0x20001261 - BLKFRAGET = 0x20001265 - BLKFRASET = 0x20001264 - BLKGETSIZE = 0x20001260 - BLKGETSIZE64 = 0x40081272 - BLKPBSZGET = 0x2000127b - BLKRAGET = 0x20001263 - BLKRASET = 0x20001262 - BLKROGET = 0x2000125e - BLKROSET = 0x2000125d - BLKRRPART = 0x2000125f - BLKSECTGET = 0x20001267 - BLKSECTSET = 0x20001266 - BLKSSZGET = 0x20001268 - BOTHER = 0x1000 - BPF_A = 0x10 - BPF_ABS = 0x20 - BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 - BPF_ALU = 0x4 - BPF_ALU64 = 0x7 - BPF_AND = 0x50 - BPF_ANY = 0x0 - BPF_ARSH = 0xc0 - BPF_B = 0x10 - BPF_BUILD_ID_SIZE = 0x14 - BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 - BPF_DIV = 0x30 - BPF_DW = 0x18 - BPF_END = 0xd0 - BPF_EXIST = 0x2 - BPF_EXIT = 0x90 - BPF_FROM_BE = 0x8 - BPF_FROM_LE = 0x0 - BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 - BPF_F_ALLOW_MULTI = 0x2 - BPF_F_ALLOW_OVERRIDE = 0x1 - BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 - BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 - BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 - BPF_F_TEST_RND_HI32 = 0x4 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 - BPF_H = 0x8 - BPF_IMM = 0x0 - BPF_IND = 0x40 - BPF_JA = 0x0 - BPF_JEQ = 0x10 - BPF_JGE = 0x30 - BPF_JGT = 0x20 - BPF_JLE = 0xb0 - BPF_JLT = 0xa0 - BPF_JMP = 0x5 - BPF_JMP32 = 0x6 - BPF_JNE = 0x50 - BPF_JSET = 0x40 - BPF_JSGE = 0x70 - BPF_JSGT = 0x60 - BPF_JSLE = 0xd0 - BPF_JSLT = 0xc0 - BPF_K = 0x0 - BPF_LD = 0x0 - BPF_LDX = 0x1 - BPF_LEN = 0x80 - BPF_LL_OFF = -0x200000 - BPF_LSH = 0x60 - BPF_MAJOR_VERSION = 0x1 - BPF_MAXINSNS = 0x1000 - BPF_MEM = 0x60 - BPF_MEMWORDS = 0x10 - BPF_MINOR_VERSION = 0x1 - BPF_MISC = 0x7 - BPF_MOD = 0x90 - BPF_MOV = 0xb0 - BPF_MSH = 0xa0 - BPF_MUL = 0x20 - BPF_NEG = 0x80 - BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 - BPF_OBJ_NAME_LEN = 0x10 - BPF_OR = 0x40 - BPF_PSEUDO_CALL = 0x1 - BPF_PSEUDO_MAP_FD = 0x1 - BPF_PSEUDO_MAP_VALUE = 0x2 - BPF_RET = 0x6 - BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 - BPF_ST = 0x2 - BPF_STX = 0x3 - BPF_SUB = 0x10 - BPF_TAG_SIZE = 0x8 - BPF_TAX = 0x0 - BPF_TO_BE = 0x8 - BPF_TO_LE = 0x0 - BPF_TXA = 0x80 - BPF_W = 0x0 - BPF_X = 0x8 - BPF_XADD = 0xc0 - BPF_XOR = 0xa0 - BRKINT = 0x2 - BS0 = 0x0 - BS1 = 0x2000 - BSDLY = 0x2000 - BTRFS_SUPER_MAGIC = 0x9123683e - BTRFS_TEST_MAGIC = 0x73727279 - CAN_BCM = 0x2 - CAN_EFF_FLAG = 0x80000000 - CAN_EFF_ID_BITS = 0x1d - CAN_EFF_MASK = 0x1fffffff - CAN_ERR_FLAG = 0x20000000 - CAN_ERR_MASK = 0x1fffffff - CAN_INV_FILTER = 0x20000000 - CAN_ISOTP = 0x6 - CAN_MAX_DLC = 0x8 - CAN_MAX_DLEN = 0x8 - CAN_MCNET = 0x5 - CAN_MTU = 0x10 - CAN_NPROTO = 0x7 - CAN_RAW = 0x1 - CAN_RAW_FILTER_MAX = 0x200 - CAN_RTR_FLAG = 0x40000000 - CAN_SFF_ID_BITS = 0xb - CAN_SFF_MASK = 0x7ff - CAN_TP16 = 0x3 - CAN_TP20 = 0x4 - CAP_AUDIT_CONTROL = 0x1e - CAP_AUDIT_READ = 0x25 - CAP_AUDIT_WRITE = 0x1d - CAP_BLOCK_SUSPEND = 0x24 - CAP_CHOWN = 0x0 - CAP_DAC_OVERRIDE = 0x1 - CAP_DAC_READ_SEARCH = 0x2 - CAP_FOWNER = 0x3 - CAP_FSETID = 0x4 - CAP_IPC_LOCK = 0xe - CAP_IPC_OWNER = 0xf - CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 - CAP_LEASE = 0x1c - CAP_LINUX_IMMUTABLE = 0x9 - CAP_MAC_ADMIN = 0x21 - CAP_MAC_OVERRIDE = 0x20 - CAP_MKNOD = 0x1b - CAP_NET_ADMIN = 0xc - CAP_NET_BIND_SERVICE = 0xa - CAP_NET_BROADCAST = 0xb - CAP_NET_RAW = 0xd - CAP_SETFCAP = 0x1f - CAP_SETGID = 0x6 - CAP_SETPCAP = 0x8 - CAP_SETUID = 0x7 - CAP_SYSLOG = 0x22 - CAP_SYS_ADMIN = 0x15 - CAP_SYS_BOOT = 0x16 - CAP_SYS_CHROOT = 0x12 - CAP_SYS_MODULE = 0x10 - CAP_SYS_NICE = 0x17 - CAP_SYS_PACCT = 0x14 - CAP_SYS_PTRACE = 0x13 - CAP_SYS_RAWIO = 0x11 - CAP_SYS_RESOURCE = 0x18 - CAP_SYS_TIME = 0x19 - CAP_SYS_TTY_CONFIG = 0x1a - CAP_WAKE_ALARM = 0x23 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CFLUSH = 0xf - CGROUP2_SUPER_MAGIC = 0x63677270 - CGROUP_SUPER_MAGIC = 0x27e0eb - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CLOCK_BOOTTIME = 0x7 - CLOCK_BOOTTIME_ALARM = 0x9 - CLOCK_DEFAULT = 0x0 - CLOCK_EXT = 0x1 - CLOCK_INT = 0x2 - CLOCK_MONOTONIC = 0x1 - CLOCK_MONOTONIC_COARSE = 0x6 - CLOCK_MONOTONIC_RAW = 0x4 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_REALTIME_ALARM = 0x8 - CLOCK_REALTIME_COARSE = 0x5 - CLOCK_TAI = 0xb - CLOCK_THREAD_CPUTIME_ID = 0x3 - CLOCK_TXFROMRX = 0x4 - CLOCK_TXINT = 0x3 - CLONE_CHILD_CLEARTID = 0x200000 - CLONE_CHILD_SETTID = 0x1000000 - CLONE_DETACHED = 0x400000 - CLONE_FILES = 0x400 - CLONE_FS = 0x200 - CLONE_IO = 0x80000000 - CLONE_NEWCGROUP = 0x2000000 - CLONE_NEWIPC = 0x8000000 - CLONE_NEWNET = 0x40000000 - CLONE_NEWNS = 0x20000 - CLONE_NEWPID = 0x20000000 - CLONE_NEWUSER = 0x10000000 - CLONE_NEWUTS = 0x4000000 - CLONE_PARENT = 0x8000 - CLONE_PARENT_SETTID = 0x100000 - CLONE_PIDFD = 0x1000 - CLONE_PTRACE = 0x2000 - CLONE_SETTLS = 0x80000 - CLONE_SIGHAND = 0x800 - CLONE_SYSVSEM = 0x40000 - CLONE_THREAD = 0x10000 - CLONE_UNTRACED = 0x800000 - CLONE_VFORK = 0x4000 - CLONE_VM = 0x100 - CMSPAR = 0x40000000 - CODA_SUPER_MAGIC = 0x73757245 - CR0 = 0x0 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRAMFS_MAGIC = 0x28cd3d45 - CRDLY = 0x600 - CREAD = 0x80 - CRTSCTS = 0x80000000 - CRYPTO_MAX_NAME = 0x40 - CRYPTO_MSG_MAX = 0x15 - CRYPTO_NR_MSGTYPES = 0x6 - CRYPTO_REPORT_MAXSIZE = 0x160 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIGNAL = 0xff - CSIZE = 0x30 - CSTART = 0x11 - CSTATUS = 0x0 - CSTOP = 0x13 - CSTOPB = 0x40 - CSUSP = 0x1a - DAXFS_MAGIC = 0x64646178 - DEBUGFS_MAGIC = 0x64626720 - DEVPTS_SUPER_MAGIC = 0x1cd1 - DMA_BUF_MAGIC = 0x444d4142 - DT_BLK = 0x6 - DT_CHR = 0x2 - DT_DIR = 0x4 - DT_FIFO = 0x1 - DT_LNK = 0xa - DT_REG = 0x8 - DT_SOCK = 0xc - DT_UNKNOWN = 0x0 - DT_WHT = 0xe - ECHO = 0x8 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - ECRYPTFS_SUPER_MAGIC = 0xf15f - EFD_CLOEXEC = 0x400000 - EFD_NONBLOCK = 0x4000 - EFD_SEMAPHORE = 0x1 - EFIVARFS_MAGIC = 0xde5e81e4 - EFS_SUPER_MAGIC = 0x414a53 - EMT_TAGOVF = 0x1 - ENCODING_DEFAULT = 0x0 - ENCODING_FM_MARK = 0x3 - ENCODING_FM_SPACE = 0x4 - ENCODING_MANCHESTER = 0x5 - ENCODING_NRZ = 0x1 - ENCODING_NRZI = 0x2 - EPOLLERR = 0x8 - EPOLLET = 0x80000000 - EPOLLEXCLUSIVE = 0x10000000 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLONESHOT = 0x40000000 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDHUP = 0x2000 - EPOLLRDNORM = 0x40 - EPOLLWAKEUP = 0x20000000 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CLOEXEC = 0x400000 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - ETH_P_1588 = 0x88f7 - ETH_P_8021AD = 0x88a8 - ETH_P_8021AH = 0x88e7 - ETH_P_8021Q = 0x8100 - ETH_P_80221 = 0x8917 - ETH_P_802_2 = 0x4 - ETH_P_802_3 = 0x1 - ETH_P_802_3_MIN = 0x600 - ETH_P_802_EX1 = 0x88b5 - ETH_P_AARP = 0x80f3 - ETH_P_AF_IUCV = 0xfbfb - ETH_P_ALL = 0x3 - ETH_P_AOE = 0x88a2 - ETH_P_ARCNET = 0x1a - ETH_P_ARP = 0x806 - ETH_P_ATALK = 0x809b - ETH_P_ATMFATE = 0x8884 - ETH_P_ATMMPOA = 0x884c - ETH_P_AX25 = 0x2 - ETH_P_BATMAN = 0x4305 - ETH_P_BPQ = 0x8ff - ETH_P_CAIF = 0xf7 - ETH_P_CAN = 0xc - ETH_P_CANFD = 0xd - ETH_P_CONTROL = 0x16 - ETH_P_CUST = 0x6006 - ETH_P_DDCMP = 0x6 - ETH_P_DEC = 0x6000 - ETH_P_DIAG = 0x6005 - ETH_P_DNA_DL = 0x6001 - ETH_P_DNA_RC = 0x6002 - ETH_P_DNA_RT = 0x6003 - ETH_P_DSA = 0x1b - ETH_P_DSA_8021Q = 0xdadb - ETH_P_ECONET = 0x18 - ETH_P_EDSA = 0xdada - ETH_P_ERSPAN = 0x88be - ETH_P_ERSPAN2 = 0x22eb - ETH_P_FCOE = 0x8906 - ETH_P_FIP = 0x8914 - ETH_P_HDLC = 0x19 - ETH_P_HSR = 0x892f - ETH_P_IBOE = 0x8915 - ETH_P_IEEE802154 = 0xf6 - ETH_P_IEEEPUP = 0xa00 - ETH_P_IEEEPUPAT = 0xa01 - ETH_P_IFE = 0xed3e - ETH_P_IP = 0x800 - ETH_P_IPV6 = 0x86dd - ETH_P_IPX = 0x8137 - ETH_P_IRDA = 0x17 - ETH_P_LAT = 0x6004 - ETH_P_LINK_CTL = 0x886c - ETH_P_LLDP = 0x88cc - ETH_P_LOCALTALK = 0x9 - ETH_P_LOOP = 0x60 - ETH_P_LOOPBACK = 0x9000 - ETH_P_MACSEC = 0x88e5 - ETH_P_MAP = 0xf9 - ETH_P_MOBITEX = 0x15 - ETH_P_MPLS_MC = 0x8848 - ETH_P_MPLS_UC = 0x8847 - ETH_P_MVRP = 0x88f5 - ETH_P_NCSI = 0x88f8 - ETH_P_NSH = 0x894f - ETH_P_PAE = 0x888e - ETH_P_PAUSE = 0x8808 - ETH_P_PHONET = 0xf5 - ETH_P_PPPTALK = 0x10 - ETH_P_PPP_DISC = 0x8863 - ETH_P_PPP_MP = 0x8 - ETH_P_PPP_SES = 0x8864 - ETH_P_PREAUTH = 0x88c7 - ETH_P_PRP = 0x88fb - ETH_P_PUP = 0x200 - ETH_P_PUPAT = 0x201 - ETH_P_QINQ1 = 0x9100 - ETH_P_QINQ2 = 0x9200 - ETH_P_QINQ3 = 0x9300 - ETH_P_RARP = 0x8035 - ETH_P_SCA = 0x6007 - ETH_P_SLOW = 0x8809 - ETH_P_SNAP = 0x5 - ETH_P_TDLS = 0x890d - ETH_P_TEB = 0x6558 - ETH_P_TIPC = 0x88ca - ETH_P_TRAILER = 0x1c - ETH_P_TR_802_2 = 0x11 - ETH_P_TSN = 0x22f0 - ETH_P_WAN_PPP = 0x7 - ETH_P_WCCP = 0x883e - ETH_P_X25 = 0x805 - ETH_P_XDSA = 0xf8 - EXABYTE_ENABLE_NEST = 0xf0 - EXT2_SUPER_MAGIC = 0xef53 - EXT3_SUPER_MAGIC = 0xef53 - EXT4_SUPER_MAGIC = 0xef53 - EXTA = 0xe - EXTB = 0xf - EXTPROC = 0x10000 - F2FS_SUPER_MAGIC = 0xf2f52010 - FALLOC_FL_COLLAPSE_RANGE = 0x8 - FALLOC_FL_INSERT_RANGE = 0x20 - FALLOC_FL_KEEP_SIZE = 0x1 - FALLOC_FL_NO_HIDE_STALE = 0x4 - FALLOC_FL_PUNCH_HOLE = 0x2 - FALLOC_FL_UNSHARE_RANGE = 0x40 - FALLOC_FL_ZERO_RANGE = 0x10 - FANOTIFY_METADATA_VERSION = 0x3 - FAN_ACCESS = 0x1 - FAN_ACCESS_PERM = 0x20000 - FAN_ALLOW = 0x1 - FAN_ALL_CLASS_BITS = 0xc - FAN_ALL_EVENTS = 0x3b - FAN_ALL_INIT_FLAGS = 0x3f - FAN_ALL_MARK_FLAGS = 0xff - FAN_ALL_OUTGOING_EVENTS = 0x3403b - FAN_ALL_PERM_EVENTS = 0x30000 - FAN_ATTRIB = 0x4 - FAN_AUDIT = 0x10 - FAN_CLASS_CONTENT = 0x4 - FAN_CLASS_NOTIF = 0x0 - FAN_CLASS_PRE_CONTENT = 0x8 - FAN_CLOEXEC = 0x1 - FAN_CLOSE = 0x18 - FAN_CLOSE_NOWRITE = 0x10 - FAN_CLOSE_WRITE = 0x8 - FAN_CREATE = 0x100 - FAN_DELETE = 0x200 - FAN_DELETE_SELF = 0x400 - FAN_DENY = 0x2 - FAN_ENABLE_AUDIT = 0x40 - FAN_EVENT_INFO_TYPE_FID = 0x1 - FAN_EVENT_METADATA_LEN = 0x18 - FAN_EVENT_ON_CHILD = 0x8000000 - FAN_MARK_ADD = 0x1 - FAN_MARK_DONT_FOLLOW = 0x4 - FAN_MARK_FILESYSTEM = 0x100 - FAN_MARK_FLUSH = 0x80 - FAN_MARK_IGNORED_MASK = 0x20 - FAN_MARK_IGNORED_SURV_MODIFY = 0x40 - FAN_MARK_INODE = 0x0 - FAN_MARK_MOUNT = 0x10 - FAN_MARK_ONLYDIR = 0x8 - FAN_MARK_REMOVE = 0x2 - FAN_MODIFY = 0x2 - FAN_MOVE = 0xc0 - FAN_MOVED_FROM = 0x40 - FAN_MOVED_TO = 0x80 - FAN_MOVE_SELF = 0x800 - FAN_NOFD = -0x1 - FAN_NONBLOCK = 0x2 - FAN_ONDIR = 0x40000000 - FAN_OPEN = 0x20 - FAN_OPEN_EXEC = 0x1000 - FAN_OPEN_EXEC_PERM = 0x40000 - FAN_OPEN_PERM = 0x10000 - FAN_Q_OVERFLOW = 0x4000 - FAN_REPORT_FID = 0x200 - FAN_REPORT_TID = 0x100 - FAN_UNLIMITED_MARKS = 0x20 - FAN_UNLIMITED_QUEUE = 0x10 - FD_CLOEXEC = 0x1 - FD_SETSIZE = 0x400 - FF0 = 0x0 - FF1 = 0x8000 - FFDLY = 0x8000 - FLUSHO = 0x1000 - FS_ENCRYPTION_MODE_ADIANTUM = 0x9 - FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 - FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 - FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 - FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 - FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 - FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 - FS_ENCRYPTION_MODE_INVALID = 0x0 - FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8 - FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7 - FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 - FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 - FS_KEY_DESCRIPTOR_SIZE = 0x8 - FS_KEY_DESC_PREFIX = "fscrypt:" - FS_KEY_DESC_PREFIX_SIZE = 0x8 - FS_MAX_KEY_SIZE = 0x40 - FS_POLICY_FLAGS_PAD_16 = 0x2 - FS_POLICY_FLAGS_PAD_32 = 0x3 - FS_POLICY_FLAGS_PAD_4 = 0x0 - FS_POLICY_FLAGS_PAD_8 = 0x1 - FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0x7 - FUTEXFS_SUPER_MAGIC = 0xbad1dea - F_ADD_SEALS = 0x409 - F_DUPFD = 0x0 - F_DUPFD_CLOEXEC = 0x406 - F_EXLCK = 0x4 - F_GETFD = 0x1 - F_GETFL = 0x3 - F_GETLEASE = 0x401 - F_GETLK = 0x7 - F_GETLK64 = 0x7 - F_GETOWN = 0x5 - F_GETOWN_EX = 0x10 - F_GETPIPE_SZ = 0x408 - F_GETSIG = 0xb - F_GET_FILE_RW_HINT = 0x40d - F_GET_RW_HINT = 0x40b - F_GET_SEALS = 0x40a - F_LOCK = 0x1 - F_NOTIFY = 0x402 - F_OFD_GETLK = 0x24 - F_OFD_SETLK = 0x25 - F_OFD_SETLKW = 0x26 - F_OK = 0x0 - F_RDLCK = 0x1 - F_SEAL_FUTURE_WRITE = 0x10 - F_SEAL_GROW = 0x4 - F_SEAL_SEAL = 0x1 - F_SEAL_SHRINK = 0x2 - F_SEAL_WRITE = 0x8 - F_SETFD = 0x2 - F_SETFL = 0x4 - F_SETLEASE = 0x400 - F_SETLK = 0x8 - F_SETLK64 = 0x8 - F_SETLKW = 0x9 - F_SETLKW64 = 0x9 - F_SETOWN = 0x6 - F_SETOWN_EX = 0xf - F_SETPIPE_SZ = 0x407 - F_SETSIG = 0xa - F_SET_FILE_RW_HINT = 0x40e - F_SET_RW_HINT = 0x40c - F_SHLCK = 0x8 - F_TEST = 0x3 - F_TLOCK = 0x2 - F_ULOCK = 0x0 - F_UNLCK = 0x3 - F_WRLCK = 0x2 - GENL_ADMIN_PERM = 0x1 - GENL_CMD_CAP_DO = 0x2 - GENL_CMD_CAP_DUMP = 0x4 - GENL_CMD_CAP_HASPOL = 0x8 - GENL_HDRLEN = 0x4 - GENL_ID_CTRL = 0x10 - GENL_ID_PMCRAID = 0x12 - GENL_ID_VFS_DQUOT = 0x11 - GENL_MAX_ID = 0x3ff - GENL_MIN_ID = 0x10 - GENL_NAMSIZ = 0x10 - GENL_START_ALLOC = 0x13 - GENL_UNS_ADMIN_PERM = 0x10 - GRND_NONBLOCK = 0x1 - GRND_RANDOM = 0x2 - HDIO_DRIVE_CMD = 0x31f - HDIO_DRIVE_CMD_AEB = 0x31e - HDIO_DRIVE_CMD_HDR_SIZE = 0x4 - HDIO_DRIVE_HOB_HDR_SIZE = 0x8 - HDIO_DRIVE_RESET = 0x31c - HDIO_DRIVE_TASK = 0x31e - HDIO_DRIVE_TASKFILE = 0x31d - HDIO_DRIVE_TASK_HDR_SIZE = 0x8 - HDIO_GETGEO = 0x301 - HDIO_GET_32BIT = 0x309 - HDIO_GET_ACOUSTIC = 0x30f - HDIO_GET_ADDRESS = 0x310 - HDIO_GET_BUSSTATE = 0x31a - HDIO_GET_DMA = 0x30b - HDIO_GET_IDENTITY = 0x30d - HDIO_GET_KEEPSETTINGS = 0x308 - HDIO_GET_MULTCOUNT = 0x304 - HDIO_GET_NICE = 0x30c - HDIO_GET_NOWERR = 0x30a - HDIO_GET_QDMA = 0x305 - HDIO_GET_UNMASKINTR = 0x302 - HDIO_GET_WCACHE = 0x30e - HDIO_OBSOLETE_IDENTITY = 0x307 - HDIO_SCAN_HWIF = 0x328 - HDIO_SET_32BIT = 0x324 - HDIO_SET_ACOUSTIC = 0x32c - HDIO_SET_ADDRESS = 0x32f - HDIO_SET_BUSSTATE = 0x32d - HDIO_SET_DMA = 0x326 - HDIO_SET_KEEPSETTINGS = 0x323 - HDIO_SET_MULTCOUNT = 0x321 - HDIO_SET_NICE = 0x329 - HDIO_SET_NOWERR = 0x325 - HDIO_SET_PIO_MODE = 0x327 - HDIO_SET_QDMA = 0x32e - HDIO_SET_UNMASKINTR = 0x322 - HDIO_SET_WCACHE = 0x32b - HDIO_SET_XFER = 0x306 - HDIO_TRISTATE_HWIF = 0x31b - HDIO_UNREGISTER_HWIF = 0x32a - HOSTFS_SUPER_MAGIC = 0xc0ffee - HPFS_SUPER_MAGIC = 0xf995e849 - HUGETLBFS_MAGIC = 0x958458f6 - HUPCL = 0x400 - IBSHIFT = 0x10 - ICANON = 0x2 - ICMPV6_FILTER = 0x1 - ICRNL = 0x100 - IEXTEN = 0x8000 - IFA_F_DADFAILED = 0x8 - IFA_F_DEPRECATED = 0x20 - IFA_F_HOMEADDRESS = 0x10 - IFA_F_MANAGETEMPADDR = 0x100 - IFA_F_MCAUTOJOIN = 0x400 - IFA_F_NODAD = 0x2 - IFA_F_NOPREFIXROUTE = 0x200 - IFA_F_OPTIMISTIC = 0x4 - IFA_F_PERMANENT = 0x80 - IFA_F_SECONDARY = 0x1 - IFA_F_STABLE_PRIVACY = 0x800 - IFA_F_TEMPORARY = 0x1 - IFA_F_TENTATIVE = 0x40 - IFA_MAX = 0xa - IFF_ALLMULTI = 0x200 - IFF_ATTACH_QUEUE = 0x200 - IFF_AUTOMEDIA = 0x4000 - IFF_BROADCAST = 0x2 - IFF_DEBUG = 0x4 - IFF_DETACH_QUEUE = 0x400 - IFF_DORMANT = 0x20000 - IFF_DYNAMIC = 0x8000 - IFF_ECHO = 0x40000 - IFF_LOOPBACK = 0x8 - IFF_LOWER_UP = 0x10000 - IFF_MASTER = 0x400 - IFF_MULTICAST = 0x1000 - IFF_MULTI_QUEUE = 0x100 - IFF_NAPI = 0x10 - IFF_NAPI_FRAGS = 0x20 - IFF_NOARP = 0x80 - IFF_NOFILTER = 0x1000 - IFF_NOTRAILERS = 0x20 - IFF_NO_PI = 0x1000 - IFF_ONE_QUEUE = 0x2000 - IFF_PERSIST = 0x800 - IFF_POINTOPOINT = 0x10 - IFF_PORTSEL = 0x2000 - IFF_PROMISC = 0x100 - IFF_RUNNING = 0x40 - IFF_SLAVE = 0x800 - IFF_TAP = 0x2 - IFF_TUN = 0x1 - IFF_TUN_EXCL = 0x8000 - IFF_UP = 0x1 - IFF_VNET_HDR = 0x4000 - IFF_VOLATILE = 0x70c5a - IFNAMSIZ = 0x10 - IGNBRK = 0x1 - IGNCR = 0x80 - IGNPAR = 0x4 - IMAXBEL = 0x2000 - INLCR = 0x40 - INPCK = 0x10 - IN_ACCESS = 0x1 - IN_ALL_EVENTS = 0xfff - IN_ATTRIB = 0x4 - IN_CLASSA_HOST = 0xffffff - IN_CLASSA_MAX = 0x80 - IN_CLASSA_NET = 0xff000000 - IN_CLASSA_NSHIFT = 0x18 - IN_CLASSB_HOST = 0xffff - IN_CLASSB_MAX = 0x10000 - IN_CLASSB_NET = 0xffff0000 - IN_CLASSB_NSHIFT = 0x10 - IN_CLASSC_HOST = 0xff - IN_CLASSC_NET = 0xffffff00 - IN_CLASSC_NSHIFT = 0x8 - IN_CLOEXEC = 0x400000 - IN_CLOSE = 0x18 - IN_CLOSE_NOWRITE = 0x10 - IN_CLOSE_WRITE = 0x8 - IN_CREATE = 0x100 - IN_DELETE = 0x200 - IN_DELETE_SELF = 0x400 - IN_DONT_FOLLOW = 0x2000000 - IN_EXCL_UNLINK = 0x4000000 - IN_IGNORED = 0x8000 - IN_ISDIR = 0x40000000 - IN_LOOPBACKNET = 0x7f - IN_MASK_ADD = 0x20000000 - IN_MASK_CREATE = 0x10000000 - IN_MODIFY = 0x2 - IN_MOVE = 0xc0 - IN_MOVED_FROM = 0x40 - IN_MOVED_TO = 0x80 - IN_MOVE_SELF = 0x800 - IN_NONBLOCK = 0x4000 - IN_ONESHOT = 0x80000000 - IN_ONLYDIR = 0x1000000 - IN_OPEN = 0x20 - IN_Q_OVERFLOW = 0x4000 - IN_UNMOUNT = 0x2000 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 - IPPROTO_AH = 0x33 - IPPROTO_BEETPH = 0x5e - IPPROTO_COMP = 0x6c - IPPROTO_DCCP = 0x21 - IPPROTO_DSTOPTS = 0x3c - IPPROTO_EGP = 0x8 - IPPROTO_ENCAP = 0x62 - IPPROTO_ESP = 0x32 - IPPROTO_FRAGMENT = 0x2c - IPPROTO_GRE = 0x2f - IPPROTO_HOPOPTS = 0x0 - IPPROTO_ICMP = 0x1 - IPPROTO_ICMPV6 = 0x3a - IPPROTO_IDP = 0x16 - IPPROTO_IGMP = 0x2 - IPPROTO_IP = 0x0 - IPPROTO_IPIP = 0x4 - IPPROTO_IPV6 = 0x29 - IPPROTO_MH = 0x87 - IPPROTO_MPLS = 0x89 - IPPROTO_MTP = 0x5c - IPPROTO_NONE = 0x3b - IPPROTO_PIM = 0x67 - IPPROTO_PUP = 0xc - IPPROTO_RAW = 0xff - IPPROTO_ROUTING = 0x2b - IPPROTO_RSVP = 0x2e - IPPROTO_SCTP = 0x84 - IPPROTO_TCP = 0x6 - IPPROTO_TP = 0x1d - IPPROTO_UDP = 0x11 - IPPROTO_UDPLITE = 0x88 - IPV6_2292DSTOPTS = 0x4 - IPV6_2292HOPLIMIT = 0x8 - IPV6_2292HOPOPTS = 0x3 - IPV6_2292PKTINFO = 0x2 - IPV6_2292PKTOPTIONS = 0x6 - IPV6_2292RTHDR = 0x5 - IPV6_ADDRFORM = 0x1 - IPV6_ADDR_PREFERENCES = 0x48 - IPV6_ADD_MEMBERSHIP = 0x14 - IPV6_AUTHHDR = 0xa - IPV6_AUTOFLOWLABEL = 0x46 - IPV6_CHECKSUM = 0x7 - IPV6_DONTFRAG = 0x3e - IPV6_DROP_MEMBERSHIP = 0x15 - IPV6_DSTOPTS = 0x3b - IPV6_FREEBIND = 0x4e - IPV6_HDRINCL = 0x24 - IPV6_HOPLIMIT = 0x34 - IPV6_HOPOPTS = 0x36 - IPV6_IPSEC_POLICY = 0x22 - IPV6_JOIN_ANYCAST = 0x1b - IPV6_JOIN_GROUP = 0x14 - IPV6_LEAVE_ANYCAST = 0x1c - IPV6_LEAVE_GROUP = 0x15 - IPV6_MINHOPCOUNT = 0x49 - IPV6_MTU = 0x18 - IPV6_MTU_DISCOVER = 0x17 - IPV6_MULTICAST_ALL = 0x1d - IPV6_MULTICAST_HOPS = 0x12 - IPV6_MULTICAST_IF = 0x11 - IPV6_MULTICAST_LOOP = 0x13 - IPV6_NEXTHOP = 0x9 - IPV6_ORIGDSTADDR = 0x4a - IPV6_PATHMTU = 0x3d - IPV6_PKTINFO = 0x32 - IPV6_PMTUDISC_DO = 0x2 - IPV6_PMTUDISC_DONT = 0x0 - IPV6_PMTUDISC_INTERFACE = 0x4 - IPV6_PMTUDISC_OMIT = 0x5 - IPV6_PMTUDISC_PROBE = 0x3 - IPV6_PMTUDISC_WANT = 0x1 - IPV6_RECVDSTOPTS = 0x3a - IPV6_RECVERR = 0x19 - IPV6_RECVFRAGSIZE = 0x4d - IPV6_RECVHOPLIMIT = 0x33 - IPV6_RECVHOPOPTS = 0x35 - IPV6_RECVORIGDSTADDR = 0x4a - IPV6_RECVPATHMTU = 0x3c - IPV6_RECVPKTINFO = 0x31 - IPV6_RECVRTHDR = 0x38 - IPV6_RECVTCLASS = 0x42 - IPV6_ROUTER_ALERT = 0x16 - IPV6_ROUTER_ALERT_ISOLATE = 0x1e - IPV6_RTHDR = 0x39 - IPV6_RTHDRDSTOPTS = 0x37 - IPV6_RTHDR_LOOSE = 0x0 - IPV6_RTHDR_STRICT = 0x1 - IPV6_RTHDR_TYPE_0 = 0x0 - IPV6_RXDSTOPTS = 0x3b - IPV6_RXHOPOPTS = 0x36 - IPV6_TCLASS = 0x43 - IPV6_TRANSPARENT = 0x4b - IPV6_UNICAST_HOPS = 0x10 - IPV6_UNICAST_IF = 0x4c - IPV6_V6ONLY = 0x1a - IPV6_XFRM_POLICY = 0x23 - IP_ADD_MEMBERSHIP = 0x23 - IP_ADD_SOURCE_MEMBERSHIP = 0x27 - IP_BIND_ADDRESS_NO_PORT = 0x18 - IP_BLOCK_SOURCE = 0x26 - IP_CHECKSUM = 0x17 - IP_DEFAULT_MULTICAST_LOOP = 0x1 - IP_DEFAULT_MULTICAST_TTL = 0x1 - IP_DF = 0x4000 - IP_DROP_MEMBERSHIP = 0x24 - IP_DROP_SOURCE_MEMBERSHIP = 0x28 - IP_FREEBIND = 0xf - IP_HDRINCL = 0x3 - IP_IPSEC_POLICY = 0x10 - IP_MAXPACKET = 0xffff - IP_MAX_MEMBERSHIPS = 0x14 - IP_MF = 0x2000 - IP_MINTTL = 0x15 - IP_MSFILTER = 0x29 - IP_MSS = 0x240 - IP_MTU = 0xe - IP_MTU_DISCOVER = 0xa - IP_MULTICAST_ALL = 0x31 - IP_MULTICAST_IF = 0x20 - IP_MULTICAST_LOOP = 0x22 - IP_MULTICAST_TTL = 0x21 - IP_NODEFRAG = 0x16 - IP_OFFMASK = 0x1fff - IP_OPTIONS = 0x4 - IP_ORIGDSTADDR = 0x14 - IP_PASSSEC = 0x12 - IP_PKTINFO = 0x8 - IP_PKTOPTIONS = 0x9 - IP_PMTUDISC = 0xa - IP_PMTUDISC_DO = 0x2 - IP_PMTUDISC_DONT = 0x0 - IP_PMTUDISC_INTERFACE = 0x4 - IP_PMTUDISC_OMIT = 0x5 - IP_PMTUDISC_PROBE = 0x3 - IP_PMTUDISC_WANT = 0x1 - IP_RECVERR = 0xb - IP_RECVFRAGSIZE = 0x19 - IP_RECVOPTS = 0x6 - IP_RECVORIGDSTADDR = 0x14 - IP_RECVRETOPTS = 0x7 - IP_RECVTOS = 0xd - IP_RECVTTL = 0xc - IP_RETOPTS = 0x7 - IP_RF = 0x8000 - IP_ROUTER_ALERT = 0x5 - IP_TOS = 0x1 - IP_TRANSPARENT = 0x13 - IP_TTL = 0x2 - IP_UNBLOCK_SOURCE = 0x25 - IP_UNICAST_IF = 0x32 - IP_XFRM_POLICY = 0x11 - ISIG = 0x1 - ISOFS_SUPER_MAGIC = 0x9660 - ISTRIP = 0x20 - IUCLC = 0x200 - IUTF8 = 0x4000 - IXANY = 0x800 - IXOFF = 0x1000 - IXON = 0x400 - JFFS2_SUPER_MAGIC = 0x72b6 - KEXEC_ARCH_386 = 0x30000 - KEXEC_ARCH_68K = 0x40000 - KEXEC_ARCH_AARCH64 = 0xb70000 - KEXEC_ARCH_ARM = 0x280000 - KEXEC_ARCH_DEFAULT = 0x0 - KEXEC_ARCH_IA_64 = 0x320000 - KEXEC_ARCH_MASK = 0xffff0000 - KEXEC_ARCH_MIPS = 0x80000 - KEXEC_ARCH_MIPS_LE = 0xa0000 - KEXEC_ARCH_PPC = 0x140000 - KEXEC_ARCH_PPC64 = 0x150000 - KEXEC_ARCH_S390 = 0x160000 - KEXEC_ARCH_SH = 0x2a0000 - KEXEC_ARCH_X86_64 = 0x3e0000 - KEXEC_FILE_NO_INITRAMFS = 0x4 - KEXEC_FILE_ON_CRASH = 0x2 - KEXEC_FILE_UNLOAD = 0x1 - KEXEC_ON_CRASH = 0x1 - KEXEC_PRESERVE_CONTEXT = 0x2 - KEXEC_SEGMENT_MAX = 0x10 - KEYCTL_ASSUME_AUTHORITY = 0x10 - KEYCTL_CAPABILITIES = 0x1f - KEYCTL_CAPS0_BIG_KEY = 0x10 - KEYCTL_CAPS0_CAPABILITIES = 0x1 - KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 - KEYCTL_CAPS0_INVALIDATE = 0x20 - KEYCTL_CAPS0_MOVE = 0x80 - KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 - KEYCTL_CAPS0_PUBLIC_KEY = 0x8 - KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 - KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 - KEYCTL_CAPS1_NS_KEY_TAG = 0x2 - KEYCTL_CHOWN = 0x4 - KEYCTL_CLEAR = 0x7 - KEYCTL_DESCRIBE = 0x6 - KEYCTL_DH_COMPUTE = 0x17 - KEYCTL_GET_KEYRING_ID = 0x0 - KEYCTL_GET_PERSISTENT = 0x16 - KEYCTL_GET_SECURITY = 0x11 - KEYCTL_INSTANTIATE = 0xc - KEYCTL_INSTANTIATE_IOV = 0x14 - KEYCTL_INVALIDATE = 0x15 - KEYCTL_JOIN_SESSION_KEYRING = 0x1 - KEYCTL_LINK = 0x8 - KEYCTL_MOVE = 0x1e - KEYCTL_MOVE_EXCL = 0x1 - KEYCTL_NEGATE = 0xd - KEYCTL_PKEY_DECRYPT = 0x1a - KEYCTL_PKEY_ENCRYPT = 0x19 - KEYCTL_PKEY_QUERY = 0x18 - KEYCTL_PKEY_SIGN = 0x1b - KEYCTL_PKEY_VERIFY = 0x1c - KEYCTL_READ = 0xb - KEYCTL_REJECT = 0x13 - KEYCTL_RESTRICT_KEYRING = 0x1d - KEYCTL_REVOKE = 0x3 - KEYCTL_SEARCH = 0xa - KEYCTL_SESSION_TO_PARENT = 0x12 - KEYCTL_SETPERM = 0x5 - KEYCTL_SET_REQKEY_KEYRING = 0xe - KEYCTL_SET_TIMEOUT = 0xf - KEYCTL_SUPPORTS_DECRYPT = 0x2 - KEYCTL_SUPPORTS_ENCRYPT = 0x1 - KEYCTL_SUPPORTS_SIGN = 0x4 - KEYCTL_SUPPORTS_VERIFY = 0x8 - KEYCTL_UNLINK = 0x9 - KEYCTL_UPDATE = 0x2 - KEY_REQKEY_DEFL_DEFAULT = 0x0 - KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 - KEY_REQKEY_DEFL_NO_CHANGE = -0x1 - KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 - KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 - KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 - KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 - KEY_REQKEY_DEFL_USER_KEYRING = 0x4 - KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 - KEY_SPEC_GROUP_KEYRING = -0x6 - KEY_SPEC_PROCESS_KEYRING = -0x2 - KEY_SPEC_REQKEY_AUTH_KEY = -0x7 - KEY_SPEC_REQUESTOR_KEYRING = -0x8 - KEY_SPEC_SESSION_KEYRING = -0x3 - KEY_SPEC_THREAD_KEYRING = -0x1 - KEY_SPEC_USER_KEYRING = -0x4 - KEY_SPEC_USER_SESSION_KEYRING = -0x5 - LINUX_REBOOT_CMD_CAD_OFF = 0x0 - LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef - LINUX_REBOOT_CMD_HALT = 0xcdef0123 - LINUX_REBOOT_CMD_KEXEC = 0x45584543 - LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc - LINUX_REBOOT_CMD_RESTART = 0x1234567 - LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 - LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 - LINUX_REBOOT_MAGIC1 = 0xfee1dead - LINUX_REBOOT_MAGIC2 = 0x28121969 - LOCK_EX = 0x2 - LOCK_NB = 0x4 - LOCK_SH = 0x1 - LOCK_UN = 0x8 - LOOP_CLR_FD = 0x4c01 - LOOP_CTL_ADD = 0x4c80 - LOOP_CTL_GET_FREE = 0x4c82 - LOOP_CTL_REMOVE = 0x4c81 - LOOP_GET_STATUS = 0x4c03 - LOOP_GET_STATUS64 = 0x4c05 - LOOP_SET_BLOCK_SIZE = 0x4c09 - LOOP_SET_CAPACITY = 0x4c07 - LOOP_SET_DIRECT_IO = 0x4c08 - LOOP_SET_FD = 0x4c00 - LOOP_SET_STATUS = 0x4c02 - LOOP_SET_STATUS64 = 0x4c04 - LO_KEY_SIZE = 0x20 - LO_NAME_SIZE = 0x40 - MADV_DODUMP = 0x11 - MADV_DOFORK = 0xb - MADV_DONTDUMP = 0x10 - MADV_DONTFORK = 0xa - MADV_DONTNEED = 0x4 - MADV_FREE = 0x8 - MADV_HUGEPAGE = 0xe - MADV_HWPOISON = 0x64 - MADV_KEEPONFORK = 0x13 - MADV_MERGEABLE = 0xc - MADV_NOHUGEPAGE = 0xf - MADV_NORMAL = 0x0 - MADV_RANDOM = 0x1 - MADV_REMOVE = 0x9 - MADV_SEQUENTIAL = 0x2 - MADV_UNMERGEABLE = 0xd - MADV_WILLNEED = 0x3 - MADV_WIPEONFORK = 0x12 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_FILE = 0x0 - MAP_FIXED = 0x10 - MAP_FIXED_NOREPLACE = 0x100000 - MAP_GROWSDOWN = 0x200 - MAP_HUGETLB = 0x40000 - MAP_HUGE_MASK = 0x3f - MAP_HUGE_SHIFT = 0x1a - MAP_LOCKED = 0x100 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x40 - MAP_POPULATE = 0x8000 - MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 - MAP_SHARED = 0x1 - MAP_SHARED_VALIDATE = 0x3 - MAP_STACK = 0x20000 - MAP_TYPE = 0xf - MCAST_BLOCK_SOURCE = 0x2b - MCAST_EXCLUDE = 0x0 - MCAST_INCLUDE = 0x1 - MCAST_JOIN_GROUP = 0x2a - MCAST_JOIN_SOURCE_GROUP = 0x2e - MCAST_LEAVE_GROUP = 0x2d - MCAST_LEAVE_SOURCE_GROUP = 0x2f - MCAST_MSFILTER = 0x30 - MCAST_UNBLOCK_SOURCE = 0x2c - MCL_CURRENT = 0x2000 - MCL_FUTURE = 0x4000 - MCL_ONFAULT = 0x8000 - MFD_ALLOW_SEALING = 0x2 - MFD_CLOEXEC = 0x1 - MFD_HUGETLB = 0x4 - MFD_HUGE_16GB = -0x78000000 - MFD_HUGE_16MB = 0x60000000 - MFD_HUGE_1GB = 0x78000000 - MFD_HUGE_1MB = 0x50000000 - MFD_HUGE_256MB = 0x70000000 - MFD_HUGE_2GB = 0x7c000000 - MFD_HUGE_2MB = 0x54000000 - MFD_HUGE_32MB = 0x64000000 - MFD_HUGE_512KB = 0x4c000000 - MFD_HUGE_512MB = 0x74000000 - MFD_HUGE_64KB = 0x40000000 - MFD_HUGE_8MB = 0x5c000000 - MFD_HUGE_MASK = 0x3f - MFD_HUGE_SHIFT = 0x1a - MINIX2_SUPER_MAGIC = 0x2468 - MINIX2_SUPER_MAGIC2 = 0x2478 - MINIX3_SUPER_MAGIC = 0x4d5a - MINIX_SUPER_MAGIC = 0x137f - MINIX_SUPER_MAGIC2 = 0x138f - MNT_DETACH = 0x2 - MNT_EXPIRE = 0x4 - MNT_FORCE = 0x1 - MODULE_INIT_IGNORE_MODVERSIONS = 0x1 - MODULE_INIT_IGNORE_VERMAGIC = 0x2 - MSDOS_SUPER_MAGIC = 0x4d44 - MSG_BATCH = 0x40000 - MSG_CMSG_CLOEXEC = 0x40000000 - MSG_CONFIRM = 0x800 - MSG_CTRUNC = 0x8 - MSG_DONTROUTE = 0x4 - MSG_DONTWAIT = 0x40 - MSG_EOR = 0x80 - MSG_ERRQUEUE = 0x2000 - MSG_FASTOPEN = 0x20000000 - MSG_FIN = 0x200 - MSG_MORE = 0x8000 - MSG_NOSIGNAL = 0x4000 - MSG_OOB = 0x1 - MSG_PEEK = 0x2 - MSG_PROXY = 0x10 - MSG_RST = 0x1000 - MSG_SYN = 0x400 - MSG_TRUNC = 0x20 - MSG_TRYHARD = 0x4 - MSG_WAITALL = 0x100 - MSG_WAITFORONE = 0x10000 - MSG_ZEROCOPY = 0x4000000 - MS_ACTIVE = 0x40000000 - MS_ASYNC = 0x1 - MS_BIND = 0x1000 - MS_BORN = 0x20000000 - MS_DIRSYNC = 0x80 - MS_INVALIDATE = 0x2 - MS_I_VERSION = 0x800000 - MS_KERNMOUNT = 0x400000 - MS_LAZYTIME = 0x2000000 - MS_MANDLOCK = 0x40 - MS_MGC_MSK = 0xffff0000 - MS_MGC_VAL = 0xc0ed0000 - MS_MOVE = 0x2000 - MS_NOATIME = 0x400 - MS_NODEV = 0x4 - MS_NODIRATIME = 0x800 - MS_NOEXEC = 0x8 - MS_NOREMOTELOCK = 0x8000000 - MS_NOSEC = 0x10000000 - MS_NOSUID = 0x2 - MS_NOUSER = -0x80000000 - MS_POSIXACL = 0x10000 - MS_PRIVATE = 0x40000 - MS_RDONLY = 0x1 - MS_REC = 0x4000 - MS_RELATIME = 0x200000 - MS_REMOUNT = 0x20 - MS_RMT_MASK = 0x2800051 - MS_SHARED = 0x100000 - MS_SILENT = 0x8000 - MS_SLAVE = 0x80000 - MS_STRICTATIME = 0x1000000 - MS_SUBMOUNT = 0x4000000 - MS_SYNC = 0x4 - MS_SYNCHRONOUS = 0x10 - MS_UNBINDABLE = 0x20000 - MS_VERBOSE = 0x8000 - MTD_INODE_FS_MAGIC = 0x11307854 - NAME_MAX = 0xff - NCP_SUPER_MAGIC = 0x564c - NETLINK_ADD_MEMBERSHIP = 0x1 - NETLINK_AUDIT = 0x9 - NETLINK_BROADCAST_ERROR = 0x4 - NETLINK_CAP_ACK = 0xa - NETLINK_CONNECTOR = 0xb - NETLINK_CRYPTO = 0x15 - NETLINK_DNRTMSG = 0xe - NETLINK_DROP_MEMBERSHIP = 0x2 - NETLINK_ECRYPTFS = 0x13 - NETLINK_EXT_ACK = 0xb - NETLINK_FIB_LOOKUP = 0xa - NETLINK_FIREWALL = 0x3 - NETLINK_GENERIC = 0x10 - NETLINK_GET_STRICT_CHK = 0xc - NETLINK_INET_DIAG = 0x4 - NETLINK_IP6_FW = 0xd - NETLINK_ISCSI = 0x8 - NETLINK_KOBJECT_UEVENT = 0xf - NETLINK_LISTEN_ALL_NSID = 0x8 - NETLINK_LIST_MEMBERSHIPS = 0x9 - NETLINK_NETFILTER = 0xc - NETLINK_NFLOG = 0x5 - NETLINK_NO_ENOBUFS = 0x5 - NETLINK_PKTINFO = 0x3 - NETLINK_RDMA = 0x14 - NETLINK_ROUTE = 0x0 - NETLINK_RX_RING = 0x6 - NETLINK_SCSITRANSPORT = 0x12 - NETLINK_SELINUX = 0x7 - NETLINK_SMC = 0x16 - NETLINK_SOCK_DIAG = 0x4 - NETLINK_TX_RING = 0x7 - NETLINK_UNUSED = 0x1 - NETLINK_USERSOCK = 0x2 - NETLINK_XFRM = 0x6 - NETNSA_MAX = 0x5 - NETNSA_NSID_NOT_ASSIGNED = -0x1 - NFDBITS = 0x40 - NFNETLINK_V0 = 0x0 - NFNLGRP_ACCT_QUOTA = 0x8 - NFNLGRP_CONNTRACK_DESTROY = 0x3 - NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 - NFNLGRP_CONNTRACK_EXP_NEW = 0x4 - NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 - NFNLGRP_CONNTRACK_NEW = 0x1 - NFNLGRP_CONNTRACK_UPDATE = 0x2 - NFNLGRP_MAX = 0x9 - NFNLGRP_NFTABLES = 0x7 - NFNLGRP_NFTRACE = 0x9 - NFNLGRP_NONE = 0x0 - NFNL_BATCH_MAX = 0x1 - NFNL_MSG_BATCH_BEGIN = 0x10 - NFNL_MSG_BATCH_END = 0x11 - NFNL_NFA_NEST = 0x8000 - NFNL_SUBSYS_ACCT = 0x7 - NFNL_SUBSYS_COUNT = 0xc - NFNL_SUBSYS_CTHELPER = 0x9 - NFNL_SUBSYS_CTNETLINK = 0x1 - NFNL_SUBSYS_CTNETLINK_EXP = 0x2 - NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 - NFNL_SUBSYS_IPSET = 0x6 - NFNL_SUBSYS_NFTABLES = 0xa - NFNL_SUBSYS_NFT_COMPAT = 0xb - NFNL_SUBSYS_NONE = 0x0 - NFNL_SUBSYS_OSF = 0x5 - NFNL_SUBSYS_QUEUE = 0x3 - NFNL_SUBSYS_ULOG = 0x4 - NFS_SUPER_MAGIC = 0x6969 - NILFS_SUPER_MAGIC = 0x3434 - NL0 = 0x0 - NL1 = 0x100 - NLA_ALIGNTO = 0x4 - NLA_F_NESTED = 0x8000 - NLA_F_NET_BYTEORDER = 0x4000 - NLA_HDRLEN = 0x4 - NLDLY = 0x100 - NLMSG_ALIGNTO = 0x4 - NLMSG_DONE = 0x3 - NLMSG_ERROR = 0x2 - NLMSG_HDRLEN = 0x10 - NLMSG_MIN_TYPE = 0x10 - NLMSG_NOOP = 0x1 - NLMSG_OVERRUN = 0x4 - NLM_F_ACK = 0x4 - NLM_F_ACK_TLVS = 0x200 - NLM_F_APPEND = 0x800 - NLM_F_ATOMIC = 0x400 - NLM_F_CAPPED = 0x100 - NLM_F_CREATE = 0x400 - NLM_F_DUMP = 0x300 - NLM_F_DUMP_FILTERED = 0x20 - NLM_F_DUMP_INTR = 0x10 - NLM_F_ECHO = 0x8 - NLM_F_EXCL = 0x200 - NLM_F_MATCH = 0x200 - NLM_F_MULTI = 0x2 - NLM_F_NONREC = 0x100 - NLM_F_REPLACE = 0x100 - NLM_F_REQUEST = 0x1 - NLM_F_ROOT = 0x100 - NOFLSH = 0x80 - NSFS_MAGIC = 0x6e736673 - NS_GET_NSTYPE = 0x2000b703 - NS_GET_OWNER_UID = 0x2000b704 - NS_GET_PARENT = 0x2000b702 - NS_GET_USERNS = 0x2000b701 - OCFS2_SUPER_MAGIC = 0x7461636f - OCRNL = 0x8 - OFDEL = 0x80 - OFILL = 0x40 - OLCUC = 0x2 - ONLCR = 0x4 - ONLRET = 0x20 - ONOCR = 0x10 - OPENPROM_SUPER_MAGIC = 0x9fa1 - OPOST = 0x1 - OVERLAYFS_SUPER_MAGIC = 0x794c7630 - O_ACCMODE = 0x3 - O_APPEND = 0x8 - O_ASYNC = 0x40 - O_CLOEXEC = 0x400000 - O_CREAT = 0x200 - O_DIRECT = 0x100000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x2000 - O_EXCL = 0x800 - O_FSYNC = 0x802000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x4004 - O_NOATIME = 0x200000 - O_NOCTTY = 0x8000 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x4000 - O_PATH = 0x1000000 - O_RDONLY = 0x0 - O_RDWR = 0x2 - O_RSYNC = 0x802000 - O_SYNC = 0x802000 - O_TMPFILE = 0x2010000 - O_TRUNC = 0x400 - O_WRONLY = 0x1 - PACKET_ADD_MEMBERSHIP = 0x1 - PACKET_AUXDATA = 0x8 - PACKET_BROADCAST = 0x1 - PACKET_COPY_THRESH = 0x7 - PACKET_DROP_MEMBERSHIP = 0x2 - PACKET_FANOUT = 0x12 - PACKET_FANOUT_CBPF = 0x6 - PACKET_FANOUT_CPU = 0x2 - PACKET_FANOUT_DATA = 0x16 - PACKET_FANOUT_EBPF = 0x7 - PACKET_FANOUT_FLAG_DEFRAG = 0x8000 - PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 - PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 - PACKET_FANOUT_HASH = 0x0 - PACKET_FANOUT_LB = 0x1 - PACKET_FANOUT_QM = 0x5 - PACKET_FANOUT_RND = 0x4 - PACKET_FANOUT_ROLLOVER = 0x3 - PACKET_FASTROUTE = 0x6 - PACKET_HDRLEN = 0xb - PACKET_HOST = 0x0 - PACKET_IGNORE_OUTGOING = 0x17 - PACKET_KERNEL = 0x7 - PACKET_LOOPBACK = 0x5 - PACKET_LOSS = 0xe - PACKET_MR_ALLMULTI = 0x2 - PACKET_MR_MULTICAST = 0x0 - PACKET_MR_PROMISC = 0x1 - PACKET_MR_UNICAST = 0x3 - PACKET_MULTICAST = 0x2 - PACKET_ORIGDEV = 0x9 - PACKET_OTHERHOST = 0x3 - PACKET_OUTGOING = 0x4 - PACKET_QDISC_BYPASS = 0x14 - PACKET_RECV_OUTPUT = 0x3 - PACKET_RESERVE = 0xc - PACKET_ROLLOVER_STATS = 0x15 - PACKET_RX_RING = 0x5 - PACKET_STATISTICS = 0x6 - PACKET_TIMESTAMP = 0x11 - PACKET_TX_HAS_OFF = 0x13 - PACKET_TX_RING = 0xd - PACKET_TX_TIMESTAMP = 0x10 - PACKET_USER = 0x6 - PACKET_VERSION = 0xa - PACKET_VNET_HDR = 0xf - PARENB = 0x100 - PARITY_CRC16_PR0 = 0x2 - PARITY_CRC16_PR0_CCITT = 0x4 - PARITY_CRC16_PR1 = 0x3 - PARITY_CRC16_PR1_CCITT = 0x5 - PARITY_CRC32_PR0_CCITT = 0x6 - PARITY_CRC32_PR1_CCITT = 0x7 - PARITY_DEFAULT = 0x0 - PARITY_NONE = 0x1 - PARMRK = 0x8 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x20002401 - PERF_EVENT_IOC_ENABLE = 0x20002400 - PERF_EVENT_IOC_ID = 0x40082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 - PERF_EVENT_IOC_PERIOD = 0x80082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x20002402 - PERF_EVENT_IOC_RESET = 0x20002403 - PERF_EVENT_IOC_SET_BPF = 0x80042408 - PERF_EVENT_IOC_SET_FILTER = 0x80082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 - PIPEFS_MAGIC = 0x50495045 - PPPIOCATTACH = 0x8004743d - PPPIOCATTCHAN = 0x80047438 - PPPIOCCONNECT = 0x8004743a - PPPIOCDETACH = 0x8004743c - PPPIOCDISCONN = 0x20007439 - PPPIOCGASYNCMAP = 0x40047458 - PPPIOCGCHAN = 0x40047437 - PPPIOCGDEBUG = 0x40047441 - PPPIOCGFLAGS = 0x4004745a - PPPIOCGIDLE = 0x4010743f - PPPIOCGL2TPSTATS = 0x40487436 - PPPIOCGMRU = 0x40047453 - PPPIOCGNPMODE = 0xc008744c - PPPIOCGRASYNCMAP = 0x40047455 - PPPIOCGUNIT = 0x40047456 - PPPIOCGXASYNCMAP = 0x40207450 - PPPIOCNEWUNIT = 0xc004743e - PPPIOCSACTIVE = 0x80107446 - PPPIOCSASYNCMAP = 0x80047457 - PPPIOCSCOMPRESS = 0x8010744d - PPPIOCSDEBUG = 0x80047440 - PPPIOCSFLAGS = 0x80047459 - PPPIOCSMAXCID = 0x80047451 - PPPIOCSMRRU = 0x8004743b - PPPIOCSMRU = 0x80047452 - PPPIOCSNPMODE = 0x8008744b - PPPIOCSPASS = 0x80107447 - PPPIOCSRASYNCMAP = 0x80047454 - PPPIOCSXASYNCMAP = 0x8020744f - PPPIOCXFERUNIT = 0x2000744e - PRIO_PGRP = 0x1 - PRIO_PROCESS = 0x0 - PRIO_USER = 0x2 - PROC_SUPER_MAGIC = 0x9fa0 - PROT_EXEC = 0x4 - PROT_GROWSDOWN = 0x1000000 - PROT_GROWSUP = 0x2000000 - PROT_NONE = 0x0 - PROT_READ = 0x1 - PROT_WRITE = 0x2 - PR_CAPBSET_DROP = 0x18 - PR_CAPBSET_READ = 0x17 - PR_CAP_AMBIENT = 0x2f - PR_CAP_AMBIENT_CLEAR_ALL = 0x4 - PR_CAP_AMBIENT_IS_SET = 0x1 - PR_CAP_AMBIENT_LOWER = 0x3 - PR_CAP_AMBIENT_RAISE = 0x2 - PR_ENDIAN_BIG = 0x0 - PR_ENDIAN_LITTLE = 0x1 - PR_ENDIAN_PPC_LITTLE = 0x2 - PR_FPEMU_NOPRINT = 0x1 - PR_FPEMU_SIGFPE = 0x2 - PR_FP_EXC_ASYNC = 0x2 - PR_FP_EXC_DISABLED = 0x0 - PR_FP_EXC_DIV = 0x10000 - PR_FP_EXC_INV = 0x100000 - PR_FP_EXC_NONRECOV = 0x1 - PR_FP_EXC_OVF = 0x20000 - PR_FP_EXC_PRECISE = 0x3 - PR_FP_EXC_RES = 0x80000 - PR_FP_EXC_SW_ENABLE = 0x80 - PR_FP_EXC_UND = 0x40000 - PR_FP_MODE_FR = 0x1 - PR_FP_MODE_FRE = 0x2 - PR_GET_CHILD_SUBREAPER = 0x25 - PR_GET_DUMPABLE = 0x3 - PR_GET_ENDIAN = 0x13 - PR_GET_FPEMU = 0x9 - PR_GET_FPEXC = 0xb - PR_GET_FP_MODE = 0x2e - PR_GET_KEEPCAPS = 0x7 - PR_GET_NAME = 0x10 - PR_GET_NO_NEW_PRIVS = 0x27 - PR_GET_PDEATHSIG = 0x2 - PR_GET_SECCOMP = 0x15 - PR_GET_SECUREBITS = 0x1b - PR_GET_SPECULATION_CTRL = 0x34 - PR_GET_THP_DISABLE = 0x2a - PR_GET_TID_ADDRESS = 0x28 - PR_GET_TIMERSLACK = 0x1e - PR_GET_TIMING = 0xd - PR_GET_TSC = 0x19 - PR_GET_UNALIGN = 0x5 - PR_MCE_KILL = 0x21 - PR_MCE_KILL_CLEAR = 0x0 - PR_MCE_KILL_DEFAULT = 0x2 - PR_MCE_KILL_EARLY = 0x1 - PR_MCE_KILL_GET = 0x22 - PR_MCE_KILL_LATE = 0x0 - PR_MCE_KILL_SET = 0x1 - PR_MPX_DISABLE_MANAGEMENT = 0x2c - PR_MPX_ENABLE_MANAGEMENT = 0x2b - PR_PAC_APDAKEY = 0x4 - PR_PAC_APDBKEY = 0x8 - PR_PAC_APGAKEY = 0x10 - PR_PAC_APIAKEY = 0x1 - PR_PAC_APIBKEY = 0x2 - PR_PAC_RESET_KEYS = 0x36 - PR_SET_CHILD_SUBREAPER = 0x24 - PR_SET_DUMPABLE = 0x4 - PR_SET_ENDIAN = 0x14 - PR_SET_FPEMU = 0xa - PR_SET_FPEXC = 0xc - PR_SET_FP_MODE = 0x2d - PR_SET_KEEPCAPS = 0x8 - PR_SET_MM = 0x23 - PR_SET_MM_ARG_END = 0x9 - PR_SET_MM_ARG_START = 0x8 - PR_SET_MM_AUXV = 0xc - PR_SET_MM_BRK = 0x7 - PR_SET_MM_END_CODE = 0x2 - PR_SET_MM_END_DATA = 0x4 - PR_SET_MM_ENV_END = 0xb - PR_SET_MM_ENV_START = 0xa - PR_SET_MM_EXE_FILE = 0xd - PR_SET_MM_MAP = 0xe - PR_SET_MM_MAP_SIZE = 0xf - PR_SET_MM_START_BRK = 0x6 - PR_SET_MM_START_CODE = 0x1 - PR_SET_MM_START_DATA = 0x3 - PR_SET_MM_START_STACK = 0x5 - PR_SET_NAME = 0xf - PR_SET_NO_NEW_PRIVS = 0x26 - PR_SET_PDEATHSIG = 0x1 - PR_SET_PTRACER = 0x59616d61 - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PR_SET_SECCOMP = 0x16 - PR_SET_SECUREBITS = 0x1c - PR_SET_SPECULATION_CTRL = 0x35 - PR_SET_THP_DISABLE = 0x29 - PR_SET_TIMERSLACK = 0x1d - PR_SET_TIMING = 0xe - PR_SET_TSC = 0x1a - PR_SET_UNALIGN = 0x6 - PR_SPEC_DISABLE = 0x4 - PR_SPEC_DISABLE_NOEXEC = 0x10 - PR_SPEC_ENABLE = 0x2 - PR_SPEC_FORCE_DISABLE = 0x8 - PR_SPEC_INDIRECT_BRANCH = 0x1 - PR_SPEC_NOT_AFFECTED = 0x0 - PR_SPEC_PRCTL = 0x1 - PR_SPEC_STORE_BYPASS = 0x0 - PR_SVE_GET_VL = 0x33 - PR_SVE_SET_VL = 0x32 - PR_SVE_SET_VL_ONEXEC = 0x40000 - PR_SVE_VL_INHERIT = 0x20000 - PR_SVE_VL_LEN_MASK = 0xffff - PR_TASK_PERF_EVENTS_DISABLE = 0x1f - PR_TASK_PERF_EVENTS_ENABLE = 0x20 - PR_TIMING_STATISTICAL = 0x0 - PR_TIMING_TIMESTAMP = 0x1 - PR_TSC_ENABLE = 0x1 - PR_TSC_SIGSEGV = 0x2 - PR_UNALIGN_NOPRINT = 0x1 - PR_UNALIGN_SIGBUS = 0x2 - PSTOREFS_MAGIC = 0x6165676c - PTRACE_ATTACH = 0x10 - PTRACE_CONT = 0x7 - PTRACE_DETACH = 0x11 - PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 - PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 - PTRACE_EVENT_CLONE = 0x3 - PTRACE_EVENT_EXEC = 0x4 - PTRACE_EVENT_EXIT = 0x6 - PTRACE_EVENT_FORK = 0x1 - PTRACE_EVENT_SECCOMP = 0x7 - PTRACE_EVENT_STOP = 0x80 - PTRACE_EVENT_VFORK = 0x2 - PTRACE_EVENT_VFORK_DONE = 0x5 - PTRACE_GETEVENTMSG = 0x4201 - PTRACE_GETFPAREGS = 0x14 - PTRACE_GETFPREGS = 0xe - PTRACE_GETFPREGS64 = 0x19 - PTRACE_GETREGS = 0xc - PTRACE_GETREGS64 = 0x16 - PTRACE_GETREGSET = 0x4204 - PTRACE_GETSIGINFO = 0x4202 - PTRACE_GETSIGMASK = 0x420a - PTRACE_GET_SYSCALL_INFO = 0x420e - PTRACE_INTERRUPT = 0x4207 - PTRACE_KILL = 0x8 - PTRACE_LISTEN = 0x4208 - PTRACE_O_EXITKILL = 0x100000 - PTRACE_O_MASK = 0x3000ff - PTRACE_O_SUSPEND_SECCOMP = 0x200000 - PTRACE_O_TRACECLONE = 0x8 - PTRACE_O_TRACEEXEC = 0x10 - PTRACE_O_TRACEEXIT = 0x40 - PTRACE_O_TRACEFORK = 0x2 - PTRACE_O_TRACESECCOMP = 0x80 - PTRACE_O_TRACESYSGOOD = 0x1 - PTRACE_O_TRACEVFORK = 0x4 - PTRACE_O_TRACEVFORKDONE = 0x20 - PTRACE_PEEKDATA = 0x2 - PTRACE_PEEKSIGINFO = 0x4209 - PTRACE_PEEKSIGINFO_SHARED = 0x1 - PTRACE_PEEKTEXT = 0x1 - PTRACE_PEEKUSR = 0x3 - PTRACE_POKEDATA = 0x5 - PTRACE_POKETEXT = 0x4 - PTRACE_POKEUSR = 0x6 - PTRACE_READDATA = 0x10 - PTRACE_READTEXT = 0x12 - PTRACE_SECCOMP_GET_FILTER = 0x420c - PTRACE_SECCOMP_GET_METADATA = 0x420d - PTRACE_SEIZE = 0x4206 - PTRACE_SETFPAREGS = 0x15 - PTRACE_SETFPREGS = 0xf - PTRACE_SETFPREGS64 = 0x1a - PTRACE_SETOPTIONS = 0x4200 - PTRACE_SETREGS = 0xd - PTRACE_SETREGS64 = 0x17 - PTRACE_SETREGSET = 0x4205 - PTRACE_SETSIGINFO = 0x4203 - PTRACE_SETSIGMASK = 0x420b - PTRACE_SINGLESTEP = 0x9 - PTRACE_SPARC_DETACH = 0xb - PTRACE_SYSCALL = 0x18 - PTRACE_SYSCALL_INFO_ENTRY = 0x1 - PTRACE_SYSCALL_INFO_EXIT = 0x2 - PTRACE_SYSCALL_INFO_NONE = 0x0 - PTRACE_SYSCALL_INFO_SECCOMP = 0x3 - PTRACE_TRACEME = 0x0 - PTRACE_WRITEDATA = 0x11 - PTRACE_WRITETEXT = 0x13 - PT_FP = 0x48 - PT_G0 = 0x10 - PT_G1 = 0x14 - PT_G2 = 0x18 - PT_G3 = 0x1c - PT_G4 = 0x20 - PT_G5 = 0x24 - PT_G6 = 0x28 - PT_G7 = 0x2c - PT_I0 = 0x30 - PT_I1 = 0x34 - PT_I2 = 0x38 - PT_I3 = 0x3c - PT_I4 = 0x40 - PT_I5 = 0x44 - PT_I6 = 0x48 - PT_I7 = 0x4c - PT_NPC = 0x8 - PT_PC = 0x4 - PT_PSR = 0x0 - PT_REGS_MAGIC = 0x57ac6c00 - PT_TNPC = 0x90 - PT_TPC = 0x88 - PT_TSTATE = 0x80 - PT_V9_FP = 0x70 - PT_V9_G0 = 0x0 - PT_V9_G1 = 0x8 - PT_V9_G2 = 0x10 - PT_V9_G3 = 0x18 - PT_V9_G4 = 0x20 - PT_V9_G5 = 0x28 - PT_V9_G6 = 0x30 - PT_V9_G7 = 0x38 - PT_V9_I0 = 0x40 - PT_V9_I1 = 0x48 - PT_V9_I2 = 0x50 - PT_V9_I3 = 0x58 - PT_V9_I4 = 0x60 - PT_V9_I5 = 0x68 - PT_V9_I6 = 0x70 - PT_V9_I7 = 0x78 - PT_V9_MAGIC = 0x9c - PT_V9_TNPC = 0x90 - PT_V9_TPC = 0x88 - PT_V9_TSTATE = 0x80 - PT_V9_Y = 0x98 - PT_WIM = 0x10 - PT_Y = 0xc - QNX4_SUPER_MAGIC = 0x2f - QNX6_SUPER_MAGIC = 0x68191122 - RAMFS_MAGIC = 0x858458f6 - RDTGROUP_SUPER_MAGIC = 0x7655821 - REISERFS_SUPER_MAGIC = 0x52654973 - RENAME_EXCHANGE = 0x2 - RENAME_NOREPLACE = 0x1 - RENAME_WHITEOUT = 0x4 - RLIMIT_AS = 0x9 - RLIMIT_CORE = 0x4 - RLIMIT_CPU = 0x0 - RLIMIT_DATA = 0x2 - RLIMIT_FSIZE = 0x1 - RLIMIT_LOCKS = 0xa - RLIMIT_MEMLOCK = 0x8 - RLIMIT_MSGQUEUE = 0xc - RLIMIT_NICE = 0xd - RLIMIT_NOFILE = 0x6 - RLIMIT_NPROC = 0x7 - RLIMIT_RSS = 0x5 - RLIMIT_RTPRIO = 0xe - RLIMIT_RTTIME = 0xf - RLIMIT_SIGPENDING = 0xb - RLIMIT_STACK = 0x3 - RLIM_INFINITY = 0xffffffffffffffff - RNDADDENTROPY = 0x80085203 - RNDADDTOENTCNT = 0x80045201 - RNDCLEARPOOL = 0x20005206 - RNDGETENTCNT = 0x40045200 - RNDGETPOOL = 0x40085202 - RNDRESEEDCRNG = 0x20005207 - RNDZAPENTCNT = 0x20005204 - RTAX_ADVMSS = 0x8 - RTAX_CC_ALGO = 0x10 - RTAX_CWND = 0x7 - RTAX_FASTOPEN_NO_COOKIE = 0x11 - RTAX_FEATURES = 0xc - RTAX_FEATURE_ALLFRAG = 0x8 - RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf - RTAX_FEATURE_SACK = 0x2 - RTAX_FEATURE_TIMESTAMP = 0x4 - RTAX_HOPLIMIT = 0xa - RTAX_INITCWND = 0xb - RTAX_INITRWND = 0xe - RTAX_LOCK = 0x1 - RTAX_MAX = 0x11 - RTAX_MTU = 0x2 - RTAX_QUICKACK = 0xf - RTAX_REORDERING = 0x9 - RTAX_RTO_MIN = 0xd - RTAX_RTT = 0x4 - RTAX_RTTVAR = 0x5 - RTAX_SSTHRESH = 0x6 - RTAX_UNSPEC = 0x0 - RTAX_WINDOW = 0x3 - RTA_ALIGNTO = 0x4 - RTA_MAX = 0x1e - RTCF_DIRECTSRC = 0x4000000 - RTCF_DOREDIRECT = 0x1000000 - RTCF_LOG = 0x2000000 - RTCF_MASQ = 0x400000 - RTCF_NAT = 0x800000 - RTCF_VALVE = 0x200000 - RTC_AF = 0x20 - RTC_AIE_OFF = 0x20007002 - RTC_AIE_ON = 0x20007001 - RTC_ALM_READ = 0x40247008 - RTC_ALM_SET = 0x80247007 - RTC_EPOCH_READ = 0x4008700d - RTC_EPOCH_SET = 0x8008700e - RTC_IRQF = 0x80 - RTC_IRQP_READ = 0x4008700b - RTC_IRQP_SET = 0x8008700c - RTC_MAX_FREQ = 0x2000 - RTC_PF = 0x40 - RTC_PIE_OFF = 0x20007006 - RTC_PIE_ON = 0x20007005 - RTC_PLL_GET = 0x40207011 - RTC_PLL_SET = 0x80207012 - RTC_RD_TIME = 0x40247009 - RTC_SET_TIME = 0x8024700a - RTC_UF = 0x10 - RTC_UIE_OFF = 0x20007004 - RTC_UIE_ON = 0x20007003 - RTC_VL_CLR = 0x20007014 - RTC_VL_READ = 0x40047013 - RTC_WIE_OFF = 0x20007010 - RTC_WIE_ON = 0x2000700f - RTC_WKALM_RD = 0x40287010 - RTC_WKALM_SET = 0x8028700f - RTF_ADDRCLASSMASK = 0xf8000000 - RTF_ADDRCONF = 0x40000 - RTF_ALLONLINK = 0x20000 - RTF_BROADCAST = 0x10000000 - RTF_CACHE = 0x1000000 - RTF_DEFAULT = 0x10000 - RTF_DYNAMIC = 0x10 - RTF_FLOW = 0x2000000 - RTF_GATEWAY = 0x2 - RTF_HOST = 0x4 - RTF_INTERFACE = 0x40000000 - RTF_IRTT = 0x100 - RTF_LINKRT = 0x100000 - RTF_LOCAL = 0x80000000 - RTF_MODIFIED = 0x20 - RTF_MSS = 0x40 - RTF_MTU = 0x40 - RTF_MULTICAST = 0x20000000 - RTF_NAT = 0x8000000 - RTF_NOFORWARD = 0x1000 - RTF_NONEXTHOP = 0x200000 - RTF_NOPMTUDISC = 0x4000 - RTF_POLICY = 0x4000000 - RTF_REINSTATE = 0x8 - RTF_REJECT = 0x200 - RTF_STATIC = 0x400 - RTF_THROW = 0x2000 - RTF_UP = 0x1 - RTF_WINDOW = 0x80 - RTF_XRESOLVE = 0x800 - RTM_BASE = 0x10 - RTM_DELACTION = 0x31 - RTM_DELADDR = 0x15 - RTM_DELADDRLABEL = 0x49 - RTM_DELCHAIN = 0x65 - RTM_DELLINK = 0x11 - RTM_DELMDB = 0x55 - RTM_DELNEIGH = 0x1d - RTM_DELNETCONF = 0x51 - RTM_DELNEXTHOP = 0x69 - RTM_DELNSID = 0x59 - RTM_DELQDISC = 0x25 - RTM_DELROUTE = 0x19 - RTM_DELRULE = 0x21 - RTM_DELTCLASS = 0x29 - RTM_DELTFILTER = 0x2d - RTM_F_CLONED = 0x200 - RTM_F_EQUALIZE = 0x400 - RTM_F_FIB_MATCH = 0x2000 - RTM_F_LOOKUP_TABLE = 0x1000 - RTM_F_NOTIFY = 0x100 - RTM_F_PREFIX = 0x800 - RTM_GETACTION = 0x32 - RTM_GETADDR = 0x16 - RTM_GETADDRLABEL = 0x4a - RTM_GETANYCAST = 0x3e - RTM_GETCHAIN = 0x66 - RTM_GETDCB = 0x4e - RTM_GETLINK = 0x12 - RTM_GETMDB = 0x56 - RTM_GETMULTICAST = 0x3a - RTM_GETNEIGH = 0x1e - RTM_GETNEIGHTBL = 0x42 - RTM_GETNETCONF = 0x52 - RTM_GETNEXTHOP = 0x6a - RTM_GETNSID = 0x5a - RTM_GETQDISC = 0x26 - RTM_GETROUTE = 0x1a - RTM_GETRULE = 0x22 - RTM_GETSTATS = 0x5e - RTM_GETTCLASS = 0x2a - RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6b - RTM_NEWACTION = 0x30 - RTM_NEWADDR = 0x14 - RTM_NEWADDRLABEL = 0x48 - RTM_NEWCACHEREPORT = 0x60 - RTM_NEWCHAIN = 0x64 - RTM_NEWLINK = 0x10 - RTM_NEWMDB = 0x54 - RTM_NEWNDUSEROPT = 0x44 - RTM_NEWNEIGH = 0x1c - RTM_NEWNEIGHTBL = 0x40 - RTM_NEWNETCONF = 0x50 - RTM_NEWNEXTHOP = 0x68 - RTM_NEWNSID = 0x58 - RTM_NEWPREFIX = 0x34 - RTM_NEWQDISC = 0x24 - RTM_NEWROUTE = 0x18 - RTM_NEWRULE = 0x20 - RTM_NEWSTATS = 0x5c - RTM_NEWTCLASS = 0x28 - RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x17 - RTM_NR_MSGTYPES = 0x5c - RTM_SETDCB = 0x4f - RTM_SETLINK = 0x13 - RTM_SETNEIGHTBL = 0x43 - RTNH_ALIGNTO = 0x4 - RTNH_COMPARE_MASK = 0x19 - RTNH_F_DEAD = 0x1 - RTNH_F_LINKDOWN = 0x10 - RTNH_F_OFFLOAD = 0x8 - RTNH_F_ONLINK = 0x4 - RTNH_F_PERVASIVE = 0x2 - RTNH_F_UNRESOLVED = 0x20 - RTN_MAX = 0xb - RTPROT_BABEL = 0x2a - RTPROT_BGP = 0xba - RTPROT_BIRD = 0xc - RTPROT_BOOT = 0x3 - RTPROT_DHCP = 0x10 - RTPROT_DNROUTED = 0xd - RTPROT_EIGRP = 0xc0 - RTPROT_GATED = 0x8 - RTPROT_ISIS = 0xbb - RTPROT_KERNEL = 0x2 - RTPROT_MROUTED = 0x11 - RTPROT_MRT = 0xa - RTPROT_NTK = 0xf - RTPROT_OSPF = 0xbc - RTPROT_RA = 0x9 - RTPROT_REDIRECT = 0x1 - RTPROT_RIP = 0xbd - RTPROT_STATIC = 0x4 - RTPROT_UNSPEC = 0x0 - RTPROT_XORP = 0xe - RTPROT_ZEBRA = 0xb - RT_CLASS_DEFAULT = 0xfd - RT_CLASS_LOCAL = 0xff - RT_CLASS_MAIN = 0xfe - RT_CLASS_MAX = 0xff - RT_CLASS_UNSPEC = 0x0 - RUSAGE_CHILDREN = -0x1 - RUSAGE_SELF = 0x0 - RUSAGE_THREAD = 0x1 - SCM_CREDENTIALS = 0x2 - SCM_RIGHTS = 0x1 - SCM_TIMESTAMP = 0x1d - SCM_TIMESTAMPING = 0x23 - SCM_TIMESTAMPING_OPT_STATS = 0x38 - SCM_TIMESTAMPING_PKTINFO = 0x3c - SCM_TIMESTAMPNS = 0x21 - SCM_TXTIME = 0x3f - SCM_WIFI_STATUS = 0x25 - SC_LOG_FLUSH = 0x100000 - SECCOMP_MODE_DISABLED = 0x0 - SECCOMP_MODE_FILTER = 0x2 - SECCOMP_MODE_STRICT = 0x1 - SECURITYFS_MAGIC = 0x73636673 - SELINUX_MAGIC = 0xf97cff8c - SFD_CLOEXEC = 0x400000 - SFD_NONBLOCK = 0x4000 - SHUT_RD = 0x0 - SHUT_RDWR = 0x2 - SHUT_WR = 0x1 - SIOCADDDLCI = 0x8980 - SIOCADDMULTI = 0x8931 - SIOCADDRT = 0x890b - SIOCATMARK = 0x8905 - SIOCBONDCHANGEACTIVE = 0x8995 - SIOCBONDENSLAVE = 0x8990 - SIOCBONDINFOQUERY = 0x8994 - SIOCBONDRELEASE = 0x8991 - SIOCBONDSETHWADDR = 0x8992 - SIOCBONDSLAVEINFOQUERY = 0x8993 - SIOCBRADDBR = 0x89a0 - SIOCBRADDIF = 0x89a2 - SIOCBRDELBR = 0x89a1 - SIOCBRDELIF = 0x89a3 - SIOCDARP = 0x8953 - SIOCDELDLCI = 0x8981 - SIOCDELMULTI = 0x8932 - SIOCDELRT = 0x890c - SIOCDEVPRIVATE = 0x89f0 - SIOCDIFADDR = 0x8936 - SIOCDRARP = 0x8960 - SIOCETHTOOL = 0x8946 - SIOCGARP = 0x8954 - SIOCGETLINKNAME = 0x89e0 - SIOCGETNODEID = 0x89e1 - SIOCGHWTSTAMP = 0x89b1 - SIOCGIFADDR = 0x8915 - SIOCGIFBR = 0x8940 - SIOCGIFBRDADDR = 0x8919 - SIOCGIFCONF = 0x8912 - SIOCGIFCOUNT = 0x8938 - SIOCGIFDSTADDR = 0x8917 - SIOCGIFENCAP = 0x8925 - SIOCGIFFLAGS = 0x8913 - SIOCGIFHWADDR = 0x8927 - SIOCGIFINDEX = 0x8933 - SIOCGIFMAP = 0x8970 - SIOCGIFMEM = 0x891f - SIOCGIFMETRIC = 0x891d - SIOCGIFMTU = 0x8921 - SIOCGIFNAME = 0x8910 - SIOCGIFNETMASK = 0x891b - SIOCGIFPFLAGS = 0x8935 - SIOCGIFSLAVE = 0x8929 - SIOCGIFTXQLEN = 0x8942 - SIOCGIFVLAN = 0x8982 - SIOCGMIIPHY = 0x8947 - SIOCGMIIREG = 0x8948 - SIOCGPGRP = 0x8904 - SIOCGPPPCSTATS = 0x89f2 - SIOCGPPPSTATS = 0x89f0 - SIOCGPPPVER = 0x89f1 - SIOCGRARP = 0x8961 - SIOCGSKNS = 0x894c - SIOCGSTAMP = 0x8906 - SIOCGSTAMPNS = 0x8907 - SIOCGSTAMPNS_NEW = 0x40108907 - SIOCGSTAMPNS_OLD = 0x8907 - SIOCGSTAMP_NEW = 0x40108906 - SIOCGSTAMP_OLD = 0x8906 - SIOCINQ = 0x4004667f - SIOCOUTQ = 0x40047473 - SIOCOUTQNSD = 0x894b - SIOCPROTOPRIVATE = 0x89e0 - SIOCRTMSG = 0x890d - SIOCSARP = 0x8955 - SIOCSHWTSTAMP = 0x89b0 - SIOCSIFADDR = 0x8916 - SIOCSIFBR = 0x8941 - SIOCSIFBRDADDR = 0x891a - SIOCSIFDSTADDR = 0x8918 - SIOCSIFENCAP = 0x8926 - SIOCSIFFLAGS = 0x8914 - SIOCSIFHWADDR = 0x8924 - SIOCSIFHWBROADCAST = 0x8937 - SIOCSIFLINK = 0x8911 - SIOCSIFMAP = 0x8971 - SIOCSIFMEM = 0x8920 - SIOCSIFMETRIC = 0x891e - SIOCSIFMTU = 0x8922 - SIOCSIFNAME = 0x8923 - SIOCSIFNETMASK = 0x891c - SIOCSIFPFLAGS = 0x8934 - SIOCSIFSLAVE = 0x8930 - SIOCSIFTXQLEN = 0x8943 - SIOCSIFVLAN = 0x8983 - SIOCSMIIREG = 0x8949 - SIOCSPGRP = 0x8902 - SIOCSRARP = 0x8962 - SIOCWANDEV = 0x894a - SMACK_MAGIC = 0x43415d53 - SMART_AUTOSAVE = 0xd2 - SMART_AUTO_OFFLINE = 0xdb - SMART_DISABLE = 0xd9 - SMART_ENABLE = 0xd8 - SMART_HCYL_PASS = 0xc2 - SMART_IMMEDIATE_OFFLINE = 0xd4 - SMART_LCYL_PASS = 0x4f - SMART_READ_LOG_SECTOR = 0xd5 - SMART_READ_THRESHOLDS = 0xd1 - SMART_READ_VALUES = 0xd0 - SMART_SAVE = 0xd3 - SMART_STATUS = 0xda - SMART_WRITE_LOG_SECTOR = 0xd6 - SMART_WRITE_THRESHOLDS = 0xd7 - SMB_SUPER_MAGIC = 0x517b - SOCKFS_MAGIC = 0x534f434b - SOCK_CLOEXEC = 0x400000 - SOCK_DCCP = 0x6 - SOCK_DGRAM = 0x2 - SOCK_IOC_TYPE = 0x89 - SOCK_NONBLOCK = 0x4000 - SOCK_PACKET = 0xa - SOCK_RAW = 0x3 - SOCK_RDM = 0x4 - SOCK_SEQPACKET = 0x5 - SOCK_STREAM = 0x1 - SOL_AAL = 0x109 - SOL_ALG = 0x117 - SOL_ATM = 0x108 - SOL_CAIF = 0x116 - SOL_CAN_BASE = 0x64 - SOL_DCCP = 0x10d - SOL_DECNET = 0x105 - SOL_ICMPV6 = 0x3a - SOL_IP = 0x0 - SOL_IPV6 = 0x29 - SOL_IRDA = 0x10a - SOL_IUCV = 0x115 - SOL_KCM = 0x119 - SOL_LLC = 0x10c - SOL_NETBEUI = 0x10b - SOL_NETLINK = 0x10e - SOL_NFC = 0x118 - SOL_PACKET = 0x107 - SOL_PNPIPE = 0x113 - SOL_PPPOL2TP = 0x111 - SOL_RAW = 0xff - SOL_RDS = 0x114 - SOL_RXRPC = 0x110 - SOL_SOCKET = 0xffff - SOL_TCP = 0x6 - SOL_TIPC = 0x10f - SOL_TLS = 0x11a - SOL_X25 = 0x106 - SOL_XDP = 0x11b - SOMAXCONN = 0x80 - SO_ACCEPTCONN = 0x8000 - SO_ATTACH_BPF = 0x34 - SO_ATTACH_FILTER = 0x1a - SO_ATTACH_REUSEPORT_CBPF = 0x35 - SO_ATTACH_REUSEPORT_EBPF = 0x36 - SO_BINDTODEVICE = 0xd - SO_BINDTOIFINDEX = 0x41 - SO_BPF_EXTENSIONS = 0x32 - SO_BROADCAST = 0x20 - SO_BSDCOMPAT = 0x400 - SO_BUSY_POLL = 0x30 - SO_CNX_ADVICE = 0x37 - SO_COOKIE = 0x3b - SO_DEBUG = 0x1 - SO_DETACH_BPF = 0x1b - SO_DETACH_FILTER = 0x1b - SO_DETACH_REUSEPORT_BPF = 0x47 - SO_DOMAIN = 0x1029 - SO_DONTROUTE = 0x10 - SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 - SO_EE_CODE_TXTIME_MISSED = 0x2 - SO_EE_CODE_ZEROCOPY_COPIED = 0x1 - SO_EE_ORIGIN_ICMP = 0x2 - SO_EE_ORIGIN_ICMP6 = 0x3 - SO_EE_ORIGIN_LOCAL = 0x1 - SO_EE_ORIGIN_NONE = 0x0 - SO_EE_ORIGIN_TIMESTAMPING = 0x4 - SO_EE_ORIGIN_TXSTATUS = 0x4 - SO_EE_ORIGIN_TXTIME = 0x6 - SO_EE_ORIGIN_ZEROCOPY = 0x5 - SO_ERROR = 0x1007 - SO_GET_FILTER = 0x1a - SO_INCOMING_CPU = 0x33 - SO_INCOMING_NAPI_ID = 0x3a - SO_KEEPALIVE = 0x8 - SO_LINGER = 0x80 - SO_LOCK_FILTER = 0x28 - SO_MARK = 0x22 - SO_MAX_PACING_RATE = 0x31 - SO_MEMINFO = 0x39 - SO_NOFCS = 0x27 - SO_NO_CHECK = 0xb - SO_OOBINLINE = 0x100 - SO_PASSCRED = 0x2 - SO_PASSSEC = 0x1f - SO_PEEK_OFF = 0x26 - SO_PEERCRED = 0x40 - SO_PEERGROUPS = 0x3d - SO_PEERNAME = 0x1c - SO_PEERSEC = 0x1e - SO_PRIORITY = 0xc - SO_PROTOCOL = 0x1028 - SO_RCVBUF = 0x1002 - SO_RCVBUFFORCE = 0x100b - SO_RCVLOWAT = 0x800 - SO_RCVTIMEO = 0x2000 - SO_RCVTIMEO_NEW = 0x44 - SO_RCVTIMEO_OLD = 0x2000 - SO_REUSEADDR = 0x4 - SO_REUSEPORT = 0x200 - SO_RXQ_OVFL = 0x24 - SO_SECURITY_AUTHENTICATION = 0x5001 - SO_SECURITY_ENCRYPTION_NETWORK = 0x5004 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002 - SO_SELECT_ERR_QUEUE = 0x29 - SO_SNDBUF = 0x1001 - SO_SNDBUFFORCE = 0x100a - SO_SNDLOWAT = 0x1000 - SO_SNDTIMEO = 0x4000 - SO_SNDTIMEO_NEW = 0x45 - SO_SNDTIMEO_OLD = 0x4000 - SO_TIMESTAMP = 0x1d - SO_TIMESTAMPING = 0x23 - SO_TIMESTAMPING_NEW = 0x43 - SO_TIMESTAMPING_OLD = 0x23 - SO_TIMESTAMPNS = 0x21 - SO_TIMESTAMPNS_NEW = 0x42 - SO_TIMESTAMPNS_OLD = 0x21 - SO_TIMESTAMP_NEW = 0x46 - SO_TIMESTAMP_OLD = 0x1d - SO_TXTIME = 0x3f - SO_TYPE = 0x1008 - SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 - SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 - SO_VM_SOCKETS_BUFFER_SIZE = 0x0 - SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 - SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 - SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 - SO_VM_SOCKETS_TRUSTED = 0x5 - SO_WIFI_STATUS = 0x25 - SO_ZEROCOPY = 0x3e - SPLICE_F_GIFT = 0x8 - SPLICE_F_MORE = 0x4 - SPLICE_F_MOVE = 0x1 - SPLICE_F_NONBLOCK = 0x2 - SQUASHFS_MAGIC = 0x73717368 - STACK_END_MAGIC = 0x57ac6e9d - STATX_ALL = 0xfff - STATX_ATIME = 0x20 - STATX_ATTR_APPEND = 0x20 - STATX_ATTR_AUTOMOUNT = 0x1000 - STATX_ATTR_COMPRESSED = 0x4 - STATX_ATTR_ENCRYPTED = 0x800 - STATX_ATTR_IMMUTABLE = 0x10 - STATX_ATTR_NODUMP = 0x40 - STATX_BASIC_STATS = 0x7ff - STATX_BLOCKS = 0x400 - STATX_BTIME = 0x800 - STATX_CTIME = 0x80 - STATX_GID = 0x10 - STATX_INO = 0x100 - STATX_MODE = 0x2 - STATX_MTIME = 0x40 - STATX_NLINK = 0x4 - STATX_SIZE = 0x200 - STATX_TYPE = 0x1 - STATX_UID = 0x8 - STATX__RESERVED = 0x80000000 - SYNC_FILE_RANGE_WAIT_AFTER = 0x4 - SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 - SYNC_FILE_RANGE_WRITE = 0x2 - SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 - SYSFS_MAGIC = 0x62656572 - S_BLKSIZE = 0x200 - S_IEXEC = 0x40 - S_IFBLK = 0x6000 - S_IFCHR = 0x2000 - S_IFDIR = 0x4000 - S_IFIFO = 0x1000 - S_IFLNK = 0xa000 - S_IFMT = 0xf000 - S_IFREG = 0x8000 - S_IFSOCK = 0xc000 - S_IREAD = 0x100 - S_IRGRP = 0x20 - S_IROTH = 0x4 - S_IRUSR = 0x100 - S_IRWXG = 0x38 - S_IRWXO = 0x7 - S_IRWXU = 0x1c0 - S_ISGID = 0x400 - S_ISUID = 0x800 - S_ISVTX = 0x200 - S_IWGRP = 0x10 - S_IWOTH = 0x2 - S_IWRITE = 0x80 - S_IWUSR = 0x80 - S_IXGRP = 0x8 - S_IXOTH = 0x1 - S_IXUSR = 0x40 - TAB0 = 0x0 - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TASKSTATS_CMD_ATTR_MAX = 0x4 - TASKSTATS_CMD_MAX = 0x2 - TASKSTATS_GENL_NAME = "TASKSTATS" - TASKSTATS_GENL_VERSION = 0x1 - TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 - TCFLSH = 0x20005407 - TCGETA = 0x40125401 - TCGETS = 0x40245408 - TCGETS2 = 0x402c540c - TCIFLUSH = 0x0 - TCIOFF = 0x2 - TCIOFLUSH = 0x2 - TCION = 0x3 - TCOFLUSH = 0x1 - TCOOFF = 0x0 - TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea - TCP_CC_INFO = 0x1a - TCP_CM_INQ = 0x24 - TCP_CONGESTION = 0xd - TCP_COOKIE_IN_ALWAYS = 0x1 - TCP_COOKIE_MAX = 0x10 - TCP_COOKIE_MIN = 0x8 - TCP_COOKIE_OUT_NEVER = 0x2 - TCP_COOKIE_PAIR_SIZE = 0x20 - TCP_COOKIE_TRANSACTIONS = 0xf - TCP_CORK = 0x3 - TCP_DEFER_ACCEPT = 0x9 - TCP_FASTOPEN = 0x17 - TCP_FASTOPEN_CONNECT = 0x1e - TCP_FASTOPEN_KEY = 0x21 - TCP_FASTOPEN_NO_COOKIE = 0x22 - TCP_INFO = 0xb - TCP_INQ = 0x24 - TCP_KEEPCNT = 0x6 - TCP_KEEPIDLE = 0x4 - TCP_KEEPINTVL = 0x5 - TCP_LINGER2 = 0x8 - TCP_MAXSEG = 0x2 - TCP_MAXWIN = 0xffff - TCP_MAX_WINSHIFT = 0xe - TCP_MD5SIG = 0xe - TCP_MD5SIG_EXT = 0x20 - TCP_MD5SIG_FLAG_PREFIX = 0x1 - TCP_MD5SIG_MAXKEYLEN = 0x50 - TCP_MSS = 0x200 - TCP_MSS_DEFAULT = 0x218 - TCP_MSS_DESIRED = 0x4c4 - TCP_NODELAY = 0x1 - TCP_NOTSENT_LOWAT = 0x19 - TCP_QUEUE_SEQ = 0x15 - TCP_QUICKACK = 0xc - TCP_REPAIR = 0x13 - TCP_REPAIR_OFF = 0x0 - TCP_REPAIR_OFF_NO_WP = -0x1 - TCP_REPAIR_ON = 0x1 - TCP_REPAIR_OPTIONS = 0x16 - TCP_REPAIR_QUEUE = 0x14 - TCP_REPAIR_WINDOW = 0x1d - TCP_SAVED_SYN = 0x1c - TCP_SAVE_SYN = 0x1b - TCP_SYNCNT = 0x7 - TCP_S_DATA_IN = 0x4 - TCP_S_DATA_OUT = 0x8 - TCP_THIN_DUPACK = 0x11 - TCP_THIN_LINEAR_TIMEOUTS = 0x10 - TCP_TIMESTAMP = 0x18 - TCP_ULP = 0x1f - TCP_USER_TIMEOUT = 0x12 - TCP_WINDOW_CLAMP = 0xa - TCP_ZEROCOPY_RECEIVE = 0x23 - TCSAFLUSH = 0x2 - TCSBRK = 0x20005405 - TCSBRKP = 0x5425 - TCSETA = 0x80125402 - TCSETAF = 0x80125404 - TCSETAW = 0x80125403 - TCSETS = 0x80245409 - TCSETS2 = 0x802c540d - TCSETSF = 0x8024540b - TCSETSF2 = 0x802c540f - TCSETSW = 0x8024540a - TCSETSW2 = 0x802c540e - TCXONC = 0x20005406 - TIMER_ABSTIME = 0x1 - TIOCCBRK = 0x2000747a - TIOCCONS = 0x20007424 - TIOCEXCL = 0x2000740d - TIOCGDEV = 0x40045432 - TIOCGETD = 0x40047400 - TIOCGEXCL = 0x40045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x40285443 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x40047483 - TIOCGPKT = 0x40045438 - TIOCGPTLCK = 0x40045439 - TIOCGPTN = 0x40047486 - TIOCGPTPEER = 0x20007489 - TIOCGRS485 = 0x40205441 - TIOCGSERIAL = 0x541e - TIOCGSID = 0x40047485 - TIOCGSOFTCAR = 0x40047464 - TIOCGWINSZ = 0x40087468 - TIOCINQ = 0x4004667f - TIOCLINUX = 0x541c - TIOCMBIC = 0x8004746b - TIOCMBIS = 0x8004746c - TIOCMGET = 0x4004746a - TIOCMIWAIT = 0x545c - TIOCMSET = 0x8004746d - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_DTR = 0x2 - TIOCM_LE = 0x1 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_RTS = 0x4 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x20007471 - TIOCNXCL = 0x2000740e - TIOCOUTQ = 0x40047473 - TIOCPKT = 0x80047470 - TIOCPKT_DATA = 0x0 - TIOCPKT_DOSTOP = 0x20 - TIOCPKT_FLUSHREAD = 0x1 - TIOCPKT_FLUSHWRITE = 0x2 - TIOCPKT_IOCTL = 0x40 - TIOCPKT_NOSTOP = 0x10 - TIOCPKT_START = 0x8 - TIOCPKT_STOP = 0x4 - TIOCSBRK = 0x2000747b - TIOCSCTTY = 0x20007484 - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSETD = 0x80047401 - TIOCSIG = 0x80047488 - TIOCSISO7816 = 0xc0285444 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x80047482 - TIOCSPTLCK = 0x80047487 - TIOCSRS485 = 0xc0205442 - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x80047465 - TIOCSTART = 0x2000746e - TIOCSTI = 0x80017472 - TIOCSTOP = 0x2000746f - TIOCSWINSZ = 0x80087467 - TIOCVHANGUP = 0x20005437 - TIPC_ADDR_ID = 0x3 - TIPC_ADDR_MCAST = 0x1 - TIPC_ADDR_NAME = 0x2 - TIPC_ADDR_NAMESEQ = 0x1 - TIPC_CFG_SRV = 0x0 - TIPC_CLUSTER_BITS = 0xc - TIPC_CLUSTER_MASK = 0xfff000 - TIPC_CLUSTER_OFFSET = 0xc - TIPC_CLUSTER_SIZE = 0xfff - TIPC_CONN_SHUTDOWN = 0x5 - TIPC_CONN_TIMEOUT = 0x82 - TIPC_CRITICAL_IMPORTANCE = 0x3 - TIPC_DESTNAME = 0x3 - TIPC_DEST_DROPPABLE = 0x81 - TIPC_ERRINFO = 0x1 - TIPC_ERR_NO_NAME = 0x1 - TIPC_ERR_NO_NODE = 0x3 - TIPC_ERR_NO_PORT = 0x2 - TIPC_ERR_OVERLOAD = 0x4 - TIPC_GROUP_JOIN = 0x87 - TIPC_GROUP_LEAVE = 0x88 - TIPC_GROUP_LOOPBACK = 0x1 - TIPC_GROUP_MEMBER_EVTS = 0x2 - TIPC_HIGH_IMPORTANCE = 0x2 - TIPC_IMPORTANCE = 0x7f - TIPC_LINK_STATE = 0x2 - TIPC_LOW_IMPORTANCE = 0x0 - TIPC_MAX_BEARER_NAME = 0x20 - TIPC_MAX_IF_NAME = 0x10 - TIPC_MAX_LINK_NAME = 0x44 - TIPC_MAX_MEDIA_NAME = 0x10 - TIPC_MAX_USER_MSG_SIZE = 0x101d0 - TIPC_MCAST_BROADCAST = 0x85 - TIPC_MCAST_REPLICAST = 0x86 - TIPC_MEDIUM_IMPORTANCE = 0x1 - TIPC_NODEID_LEN = 0x10 - TIPC_NODE_BITS = 0xc - TIPC_NODE_MASK = 0xfff - TIPC_NODE_OFFSET = 0x0 - TIPC_NODE_RECVQ_DEPTH = 0x83 - TIPC_NODE_SIZE = 0xfff - TIPC_NODE_STATE = 0x0 - TIPC_OK = 0x0 - TIPC_PUBLISHED = 0x1 - TIPC_RESERVED_TYPES = 0x40 - TIPC_RETDATA = 0x2 - TIPC_SERVICE_ADDR = 0x2 - TIPC_SERVICE_RANGE = 0x1 - TIPC_SOCKET_ADDR = 0x3 - TIPC_SOCK_RECVQ_DEPTH = 0x84 - TIPC_SOCK_RECVQ_USED = 0x89 - TIPC_SRC_DROPPABLE = 0x80 - TIPC_SUBSCR_TIMEOUT = 0x3 - TIPC_SUB_CANCEL = 0x4 - TIPC_SUB_PORTS = 0x1 - TIPC_SUB_SERVICE = 0x2 - TIPC_TOP_SRV = 0x1 - TIPC_WAIT_FOREVER = 0xffffffff - TIPC_WITHDRAWN = 0x2 - TIPC_ZONE_BITS = 0x8 - TIPC_ZONE_CLUSTER_MASK = 0xfffff000 - TIPC_ZONE_MASK = 0xff000000 - TIPC_ZONE_OFFSET = 0x18 - TIPC_ZONE_SCOPE = 0x1 - TIPC_ZONE_SIZE = 0xff - TMPFS_MAGIC = 0x1021994 - TOSTOP = 0x100 - TPACKET_ALIGNMENT = 0x10 - TPACKET_HDRLEN = 0x34 - TP_STATUS_AVAILABLE = 0x0 - TP_STATUS_BLK_TMO = 0x20 - TP_STATUS_COPY = 0x2 - TP_STATUS_CSUMNOTREADY = 0x8 - TP_STATUS_CSUM_VALID = 0x80 - TP_STATUS_KERNEL = 0x0 - TP_STATUS_LOSING = 0x4 - TP_STATUS_SENDING = 0x2 - TP_STATUS_SEND_REQUEST = 0x1 - TP_STATUS_TS_RAW_HARDWARE = 0x80000000 - TP_STATUS_TS_SOFTWARE = 0x20000000 - TP_STATUS_TS_SYS_HARDWARE = 0x40000000 - TP_STATUS_USER = 0x1 - TP_STATUS_VLAN_TPID_VALID = 0x40 - TP_STATUS_VLAN_VALID = 0x10 - TP_STATUS_WRONG_FORMAT = 0x4 - TRACEFS_MAGIC = 0x74726163 - TS_COMM_LEN = 0x20 - TUNATTACHFILTER = 0x801054d5 - TUNDETACHFILTER = 0x801054d6 - TUNGETDEVNETNS = 0x200054e3 - TUNGETFEATURES = 0x400454cf - TUNGETFILTER = 0x401054db - TUNGETIFF = 0x400454d2 - TUNGETSNDBUF = 0x400454d3 - TUNGETVNETBE = 0x400454df - TUNGETVNETHDRSZ = 0x400454d7 - TUNGETVNETLE = 0x400454dd - TUNSETCARRIER = 0x800454e2 - TUNSETDEBUG = 0x800454c9 - TUNSETFILTEREBPF = 0x400454e1 - TUNSETGROUP = 0x800454ce - TUNSETIFF = 0x800454ca - TUNSETIFINDEX = 0x800454da - TUNSETLINK = 0x800454cd - TUNSETNOCSUM = 0x800454c8 - TUNSETOFFLOAD = 0x800454d0 - TUNSETOWNER = 0x800454cc - TUNSETPERSIST = 0x800454cb - TUNSETQUEUE = 0x800454d9 - TUNSETSNDBUF = 0x800454d4 - TUNSETSTEERINGEBPF = 0x400454e0 - TUNSETTXFILTER = 0x800454d1 - TUNSETVNETBE = 0x800454de - TUNSETVNETHDRSZ = 0x800454d8 - TUNSETVNETLE = 0x800454dc - UBI_IOCATT = 0x80186f40 - UBI_IOCDET = 0x80046f41 - UBI_IOCEBCH = 0x80044f02 - UBI_IOCEBER = 0x80044f01 - UBI_IOCEBISMAP = 0x40044f05 - UBI_IOCEBMAP = 0x80084f03 - UBI_IOCEBUNMAP = 0x80044f04 - UBI_IOCMKVOL = 0x80986f00 - UBI_IOCRMVOL = 0x80046f01 - UBI_IOCRNVOL = 0x91106f03 - UBI_IOCRPEB = 0x80046f04 - UBI_IOCRSVOL = 0x800c6f02 - UBI_IOCSETVOLPROP = 0x80104f06 - UBI_IOCSPEB = 0x80046f05 - UBI_IOCVOLCRBLK = 0x80804f07 - UBI_IOCVOLRMBLK = 0x20004f08 - UBI_IOCVOLUP = 0x80084f00 - UDF_SUPER_MAGIC = 0x15013346 - UMOUNT_NOFOLLOW = 0x8 - USBDEVICE_SUPER_MAGIC = 0x9fa2 - UTIME_NOW = 0x3fffffff - UTIME_OMIT = 0x3ffffffe - V9FS_MAGIC = 0x1021997 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VERASE = 0x2 - VINTR = 0x0 - VKILL = 0x3 - VLNEXT = 0xf - VMADDR_CID_ANY = 0xffffffff - VMADDR_CID_HOST = 0x2 - VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 - VMADDR_PORT_ANY = 0xffffffff - VMIN = 0x6 - VM_SOCKETS_INVALID_VERSION = 0xffffffff - VQUIT = 0x1 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT0 = 0x0 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WALL = 0x40000000 - WCLONE = 0x80000000 - WCONTINUED = 0x8 - WDIOC_GETBOOTSTATUS = 0x40045702 - WDIOC_GETPRETIMEOUT = 0x40045709 - WDIOC_GETSTATUS = 0x40045701 - WDIOC_GETSUPPORT = 0x40285700 - WDIOC_GETTEMP = 0x40045703 - WDIOC_GETTIMELEFT = 0x4004570a - WDIOC_GETTIMEOUT = 0x40045707 - WDIOC_KEEPALIVE = 0x40045705 - WDIOC_SETOPTIONS = 0x40045704 - WDIOC_SETPRETIMEOUT = 0xc0045708 - WDIOC_SETTIMEOUT = 0xc0045706 - WEXITED = 0x4 - WIN_ACKMEDIACHANGE = 0xdb - WIN_CHECKPOWERMODE1 = 0xe5 - WIN_CHECKPOWERMODE2 = 0x98 - WIN_DEVICE_RESET = 0x8 - WIN_DIAGNOSE = 0x90 - WIN_DOORLOCK = 0xde - WIN_DOORUNLOCK = 0xdf - WIN_DOWNLOAD_MICROCODE = 0x92 - WIN_FLUSH_CACHE = 0xe7 - WIN_FLUSH_CACHE_EXT = 0xea - WIN_FORMAT = 0x50 - WIN_GETMEDIASTATUS = 0xda - WIN_IDENTIFY = 0xec - WIN_IDENTIFY_DMA = 0xee - WIN_IDLEIMMEDIATE = 0xe1 - WIN_INIT = 0x60 - WIN_MEDIAEJECT = 0xed - WIN_MULTREAD = 0xc4 - WIN_MULTREAD_EXT = 0x29 - WIN_MULTWRITE = 0xc5 - WIN_MULTWRITE_EXT = 0x39 - WIN_NOP = 0x0 - WIN_PACKETCMD = 0xa0 - WIN_PIDENTIFY = 0xa1 - WIN_POSTBOOT = 0xdc - WIN_PREBOOT = 0xdd - WIN_QUEUED_SERVICE = 0xa2 - WIN_READ = 0x20 - WIN_READDMA = 0xc8 - WIN_READDMA_EXT = 0x25 - WIN_READDMA_ONCE = 0xc9 - WIN_READDMA_QUEUED = 0xc7 - WIN_READDMA_QUEUED_EXT = 0x26 - WIN_READ_BUFFER = 0xe4 - WIN_READ_EXT = 0x24 - WIN_READ_LONG = 0x22 - WIN_READ_LONG_ONCE = 0x23 - WIN_READ_NATIVE_MAX = 0xf8 - WIN_READ_NATIVE_MAX_EXT = 0x27 - WIN_READ_ONCE = 0x21 - WIN_RECAL = 0x10 - WIN_RESTORE = 0x10 - WIN_SECURITY_DISABLE = 0xf6 - WIN_SECURITY_ERASE_PREPARE = 0xf3 - WIN_SECURITY_ERASE_UNIT = 0xf4 - WIN_SECURITY_FREEZE_LOCK = 0xf5 - WIN_SECURITY_SET_PASS = 0xf1 - WIN_SECURITY_UNLOCK = 0xf2 - WIN_SEEK = 0x70 - WIN_SETFEATURES = 0xef - WIN_SETIDLE1 = 0xe3 - WIN_SETIDLE2 = 0x97 - WIN_SETMULT = 0xc6 - WIN_SET_MAX = 0xf9 - WIN_SET_MAX_EXT = 0x37 - WIN_SLEEPNOW1 = 0xe6 - WIN_SLEEPNOW2 = 0x99 - WIN_SMART = 0xb0 - WIN_SPECIFY = 0x91 - WIN_SRST = 0x8 - WIN_STANDBY = 0xe2 - WIN_STANDBY2 = 0x96 - WIN_STANDBYNOW1 = 0xe0 - WIN_STANDBYNOW2 = 0x94 - WIN_VERIFY = 0x40 - WIN_VERIFY_EXT = 0x42 - WIN_VERIFY_ONCE = 0x41 - WIN_WRITE = 0x30 - WIN_WRITEDMA = 0xca - WIN_WRITEDMA_EXT = 0x35 - WIN_WRITEDMA_ONCE = 0xcb - WIN_WRITEDMA_QUEUED = 0xcc - WIN_WRITEDMA_QUEUED_EXT = 0x36 - WIN_WRITE_BUFFER = 0xe8 - WIN_WRITE_EXT = 0x34 - WIN_WRITE_LONG = 0x32 - WIN_WRITE_LONG_ONCE = 0x33 - WIN_WRITE_ONCE = 0x31 - WIN_WRITE_SAME = 0xe9 - WIN_WRITE_VERIFY = 0x3c - WNOHANG = 0x1 - WNOTHREAD = 0x20000000 - WNOWAIT = 0x1000000 - WORDSIZE = 0x40 - WSTOPPED = 0x2 - WUNTRACED = 0x2 - XATTR_CREATE = 0x1 - XATTR_REPLACE = 0x2 - XCASE = 0x4 - XDP_COPY = 0x2 - XDP_FLAGS_DRV_MODE = 0x4 - XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf - XDP_FLAGS_MODES = 0xe - XDP_FLAGS_SKB_MODE = 0x2 - XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 - XDP_MMAP_OFFSETS = 0x1 - XDP_OPTIONS = 0x8 - XDP_OPTIONS_ZEROCOPY = 0x1 - XDP_PACKET_HEADROOM = 0x100 - XDP_PGOFF_RX_RING = 0x0 - XDP_PGOFF_TX_RING = 0x80000000 - XDP_RX_RING = 0x2 - XDP_SHARED_UMEM = 0x1 - XDP_STATISTICS = 0x7 - XDP_TX_RING = 0x3 - XDP_UMEM_COMPLETION_RING = 0x6 - XDP_UMEM_FILL_RING = 0x5 - XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 - XDP_UMEM_PGOFF_FILL_RING = 0x100000000 - XDP_UMEM_REG = 0x4 - XDP_ZEROCOPY = 0x4 - XENFS_SUPER_MAGIC = 0xabba1974 - XFS_SUPER_MAGIC = 0x58465342 - XTABS = 0x1800 - Z3FOLD_MAGIC = 0x33 - ZSMALLOC_MAGIC = 0x58295829 - __TIOCFLUSH = 0x80047410 + ASI_LEON_DFLUSH = 0x11 + ASI_LEON_IFLUSH = 0x10 + ASI_LEON_MMUFLUSH = 0x18 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKBSZGET = 0x40081270 + BLKBSZSET = 0x80081271 + BLKFLSBUF = 0x20001261 + BLKFRAGET = 0x20001265 + BLKFRASET = 0x20001264 + BLKGETSIZE = 0x20001260 + BLKGETSIZE64 = 0x40081272 + BLKPBSZGET = 0x2000127b + BLKRAGET = 0x20001263 + BLKRASET = 0x20001262 + BLKROGET = 0x2000125e + BLKROSET = 0x2000125d + BLKRRPART = 0x2000125f + BLKSECTGET = 0x20001267 + BLKSECTSET = 0x20001266 + BLKSSZGET = 0x20001268 + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x400000 + EFD_NONBLOCK = 0x4000 + EMT_TAGOVF = 0x1 + EPOLL_CLOEXEC = 0x400000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 + F_GETLK = 0x7 + F_GETLK64 = 0x7 + F_GETOWN = 0x5 + F_RDLCK = 0x1 + F_SETLK = 0x8 + F_SETLK64 = 0x8 + F_SETLKW = 0x9 + F_SETLKW64 = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x3 + F_WRLCK = 0x2 + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x400000 + IN_NONBLOCK = 0x4000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x200 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x100 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_RENAME = 0x20 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MCL_ONFAULT = 0x8000 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + NS_GET_PARENT = 0x2000b702 + NS_GET_USERNS = 0x2000b701 + OLCUC = 0x2 + ONLCR = 0x4 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x100000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x2000 + O_EXCL = 0x800 + O_FSYNC = 0x802000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x4004 + O_NOATIME = 0x200000 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x4000 + O_PATH = 0x1000000 + O_RSYNC = 0x802000 + O_SYNC = 0x802000 + O_TMPFILE = 0x2010000 + O_TRUNC = 0x400 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x20002401 + PERF_EVENT_IOC_ENABLE = 0x20002400 + PERF_EVENT_IOC_ID = 0x40082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 + PERF_EVENT_IOC_PERIOD = 0x80082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x20002402 + PERF_EVENT_IOC_RESET = 0x20002403 + PERF_EVENT_IOC_SET_BPF = 0x80042408 + PERF_EVENT_IOC_SET_FILTER = 0x80082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGIDLE32 = 0x4008743f + PPPIOCGIDLE64 = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTRACE_GETFPAREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPREGS64 = 0x19 + PTRACE_GETREGS64 = 0x16 + PTRACE_READDATA = 0x10 + PTRACE_READTEXT = 0x12 + PTRACE_SETFPAREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPREGS64 = 0x1a + PTRACE_SETREGS64 = 0x17 + PTRACE_SPARC_DETACH = 0xb + PTRACE_WRITEDATA = 0x11 + PTRACE_WRITETEXT = 0x13 + PT_FP = 0x48 + PT_G0 = 0x10 + PT_G1 = 0x14 + PT_G2 = 0x18 + PT_G3 = 0x1c + PT_G4 = 0x20 + PT_G5 = 0x24 + PT_G6 = 0x28 + PT_G7 = 0x2c + PT_I0 = 0x30 + PT_I1 = 0x34 + PT_I2 = 0x38 + PT_I3 = 0x3c + PT_I4 = 0x40 + PT_I5 = 0x44 + PT_I6 = 0x48 + PT_I7 = 0x4c + PT_NPC = 0x8 + PT_PC = 0x4 + PT_PSR = 0x0 + PT_REGS_MAGIC = 0x57ac6c00 + PT_TNPC = 0x90 + PT_TPC = 0x88 + PT_TSTATE = 0x80 + PT_V9_FP = 0x70 + PT_V9_G0 = 0x0 + PT_V9_G1 = 0x8 + PT_V9_G2 = 0x10 + PT_V9_G3 = 0x18 + PT_V9_G4 = 0x20 + PT_V9_G5 = 0x28 + PT_V9_G6 = 0x30 + PT_V9_G7 = 0x38 + PT_V9_I0 = 0x40 + PT_V9_I1 = 0x48 + PT_V9_I2 = 0x50 + PT_V9_I3 = 0x58 + PT_V9_I4 = 0x60 + PT_V9_I5 = 0x68 + PT_V9_I6 = 0x70 + PT_V9_I7 = 0x78 + PT_V9_MAGIC = 0x9c + PT_V9_TNPC = 0x90 + PT_V9_TPC = 0x88 + PT_V9_TSTATE = 0x80 + PT_V9_Y = 0x98 + PT_WIM = 0x10 + PT_Y = 0xc + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x6 + RLIMIT_NPROC = 0x7 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 + RTC_AIE_OFF = 0x20007002 + RTC_AIE_ON = 0x20007001 + RTC_ALM_READ = 0x40247008 + RTC_ALM_SET = 0x80247007 + RTC_EPOCH_READ = 0x4008700d + RTC_EPOCH_SET = 0x8008700e + RTC_IRQP_READ = 0x4008700b + RTC_IRQP_SET = 0x8008700c + RTC_PIE_OFF = 0x20007006 + RTC_PIE_ON = 0x20007005 + RTC_PLL_GET = 0x40207011 + RTC_PLL_SET = 0x80207012 + RTC_RD_TIME = 0x40247009 + RTC_SET_TIME = 0x8024700a + RTC_UIE_OFF = 0x20007004 + RTC_UIE_ON = 0x20007003 + RTC_VL_CLR = 0x20007014 + RTC_VL_READ = 0x40047013 + RTC_WIE_OFF = 0x20007010 + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f + SCM_TIMESTAMPING = 0x23 + SCM_TIMESTAMPING_OPT_STATS = 0x38 + SCM_TIMESTAMPING_PKTINFO = 0x3c + SCM_TIMESTAMPNS = 0x21 + SCM_TXTIME = 0x3f + SCM_WIFI_STATUS = 0x25 + SFD_CLOEXEC = 0x400000 + SFD_NONBLOCK = 0x4000 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x40108907 + SIOCGSTAMP_NEW = 0x40108906 + SIOCINQ = 0x4004667f + SIOCOUTQ = 0x40047473 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x400000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x4000 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SO_ACCEPTCONN = 0x8000 + SO_ATTACH_BPF = 0x34 + SO_ATTACH_REUSEPORT_CBPF = 0x35 + SO_ATTACH_REUSEPORT_EBPF = 0x36 + SO_BINDTODEVICE = 0xd + SO_BINDTOIFINDEX = 0x41 + SO_BPF_EXTENSIONS = 0x32 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0x400 + SO_BUSY_POLL = 0x30 + SO_CNX_ADVICE = 0x37 + SO_COOKIE = 0x3b + SO_DETACH_REUSEPORT_BPF = 0x47 + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_INCOMING_CPU = 0x33 + SO_INCOMING_NAPI_ID = 0x3a + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x28 + SO_MARK = 0x22 + SO_MAX_PACING_RATE = 0x31 + SO_MEMINFO = 0x39 + SO_NOFCS = 0x27 + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x2 + SO_PASSSEC = 0x1f + SO_PEEK_OFF = 0x26 + SO_PEERCRED = 0x40 + SO_PEERGROUPS = 0x3d + SO_PEERSEC = 0x1e + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x100b + SO_RCVLOWAT = 0x800 + SO_RCVTIMEO = 0x2000 + SO_RCVTIMEO_NEW = 0x44 + SO_RCVTIMEO_OLD = 0x2000 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x24 + SO_SECURITY_AUTHENTICATION = 0x5001 + SO_SECURITY_ENCRYPTION_NETWORK = 0x5004 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002 + SO_SELECT_ERR_QUEUE = 0x29 + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x100a + SO_SNDLOWAT = 0x1000 + SO_SNDTIMEO = 0x4000 + SO_SNDTIMEO_NEW = 0x45 + SO_SNDTIMEO_OLD = 0x4000 + SO_TIMESTAMPING = 0x23 + SO_TIMESTAMPING_NEW = 0x43 + SO_TIMESTAMPING_OLD = 0x23 + SO_TIMESTAMPNS = 0x21 + SO_TIMESTAMPNS_NEW = 0x42 + SO_TIMESTAMPNS_OLD = 0x21 + SO_TIMESTAMP_NEW = 0x46 + SO_TXTIME = 0x3f + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x25 + SO_ZEROCOPY = 0x3e + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x20005407 + TCGETA = 0x40125401 + TCGETS = 0x40245408 + TCGETS2 = 0x402c540c + TCSAFLUSH = 0x2 + TCSBRK = 0x20005405 + TCSBRKP = 0x5425 + TCSETA = 0x80125402 + TCSETAF = 0x80125404 + TCSETAW = 0x80125403 + TCSETS = 0x80245409 + TCSETS2 = 0x802c540d + TCSETSF = 0x8024540b + TCSETSF2 = 0x802c540f + TCSETSW = 0x8024540a + TCSETSW2 = 0x802c540e + TCXONC = 0x20005406 + TIOCCBRK = 0x2000747a + TIOCCONS = 0x20007424 + TIOCEXCL = 0x2000740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x40047400 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x40285443 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x40047483 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40047486 + TIOCGPTPEER = 0x20007489 + TIOCGRS485 = 0x40205441 + TIOCGSERIAL = 0x541e + TIOCGSID = 0x40047485 + TIOCGSOFTCAR = 0x40047464 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMIWAIT = 0x545c + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007484 + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSETD = 0x80047401 + TIOCSIG = 0x80047488 + TIOCSISO7816 = 0xc0285444 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x80047482 + TIOCSPTLCK = 0x80047487 + TIOCSRS485 = 0xc0205442 + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x80047465 + TIOCSTART = 0x2000746e + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x20005437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETDEVNETNS = 0x200054e3 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETCARRIER = 0x800454e2 + TUNSETDEBUG = 0x800454c9 + TUNSETFILTEREBPF = 0x400454e1 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETSTEERINGEBPF = 0x400454e0 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + UBI_IOCATT = 0x80186f40 + UBI_IOCDET = 0x80046f41 + UBI_IOCEBCH = 0x80044f02 + UBI_IOCEBER = 0x80044f01 + UBI_IOCEBISMAP = 0x40044f05 + UBI_IOCEBMAP = 0x80084f03 + UBI_IOCEBUNMAP = 0x80044f04 + UBI_IOCMKVOL = 0x80986f00 + UBI_IOCRMVOL = 0x80046f01 + UBI_IOCRNVOL = 0x91106f03 + UBI_IOCRPEB = 0x80046f04 + UBI_IOCRSVOL = 0x800c6f02 + UBI_IOCSETVOLPROP = 0x80104f06 + UBI_IOCSPEB = 0x80046f05 + UBI_IOCVOLCRBLK = 0x80804f07 + UBI_IOCVOLRMBLK = 0x20004f08 + UBI_IOCVOLUP = 0x80084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x40045702 + WDIOC_GETPRETIMEOUT = 0x40045709 + WDIOC_GETSTATUS = 0x40045701 + WDIOC_GETSUPPORT = 0x40285700 + WDIOC_GETTEMP = 0x40045703 + WDIOC_GETTIMELEFT = 0x4004570a + WDIOC_GETTIMEOUT = 0x40045707 + WDIOC_KEEPALIVE = 0x40045705 + WDIOC_SETOPTIONS = 0x40045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 + __TIOCFLUSH = 0x80047410 ) // Errors const ( - E2BIG = syscall.Errno(0x7) - EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x30) EADDRNOTAVAIL = syscall.Errno(0x31) EADV = syscall.Errno(0x53) EAFNOSUPPORT = syscall.Errno(0x2f) - EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x25) EBADE = syscall.Errno(0x66) - EBADF = syscall.Errno(0x9) EBADFD = syscall.Errno(0x5d) EBADMSG = syscall.Errno(0x4c) EBADR = syscall.Errno(0x67) EBADRQC = syscall.Errno(0x6a) EBADSLT = syscall.Errno(0x6b) EBFONT = syscall.Errno(0x6d) - EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x7f) - ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x5e) ECOMM = syscall.Errno(0x55) ECONNABORTED = syscall.Errno(0x35) @@ -2847,23 +549,15 @@ const ( EDEADLK = syscall.Errno(0x4e) EDEADLOCK = syscall.Errno(0x6c) EDESTADDRREQ = syscall.Errno(0x27) - EDOM = syscall.Errno(0x21) EDOTDOT = syscall.Errno(0x58) EDQUOT = syscall.Errno(0x45) - EEXIST = syscall.Errno(0x11) - EFAULT = syscall.Errno(0xe) - EFBIG = syscall.Errno(0x1b) EHOSTDOWN = syscall.Errno(0x40) EHOSTUNREACH = syscall.Errno(0x41) EHWPOISON = syscall.Errno(0x87) EIDRM = syscall.Errno(0x4d) EILSEQ = syscall.Errno(0x7a) EINPROGRESS = syscall.Errno(0x24) - EINTR = syscall.Errno(0x4) - EINVAL = syscall.Errno(0x16) - EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) - EISDIR = syscall.Errno(0x15) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x81) EKEYREJECTED = syscall.Errno(0x83) @@ -2880,8 +574,6 @@ const ( ELNRNG = syscall.Errno(0x62) ELOOP = syscall.Errno(0x3e) EMEDIUMTYPE = syscall.Errno(0x7e) - EMFILE = syscall.Errno(0x18) - EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x28) EMULTIHOP = syscall.Errno(0x57) ENAMETOOLONG = syscall.Errno(0x3f) @@ -2889,102 +581,70 @@ const ( ENETDOWN = syscall.Errno(0x32) ENETRESET = syscall.Errno(0x34) ENETUNREACH = syscall.Errno(0x33) - ENFILE = syscall.Errno(0x17) ENOANO = syscall.Errno(0x69) ENOBUFS = syscall.Errno(0x37) ENOCSI = syscall.Errno(0x64) ENODATA = syscall.Errno(0x6f) - ENODEV = syscall.Errno(0x13) - ENOENT = syscall.Errno(0x2) - ENOEXEC = syscall.Errno(0x8) ENOKEY = syscall.Errno(0x80) ENOLCK = syscall.Errno(0x4f) ENOLINK = syscall.Errno(0x52) ENOMEDIUM = syscall.Errno(0x7d) - ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x4b) ENONET = syscall.Errno(0x50) ENOPKG = syscall.Errno(0x71) ENOPROTOOPT = syscall.Errno(0x2a) - ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x4a) ENOSTR = syscall.Errno(0x48) ENOSYS = syscall.Errno(0x5a) - ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x39) - ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x85) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x2d) - ENOTTY = syscall.Errno(0x19) ENOTUNIQ = syscall.Errno(0x73) - ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x5c) EOWNERDEAD = syscall.Errno(0x84) - EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) - EPIPE = syscall.Errno(0x20) EPROCLIM = syscall.Errno(0x43) EPROTO = syscall.Errno(0x56) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) - ERANGE = syscall.Errno(0x22) EREMCHG = syscall.Errno(0x59) EREMOTE = syscall.Errno(0x47) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x74) ERFKILL = syscall.Errno(0x86) - EROFS = syscall.Errno(0x1e) ERREMOTE = syscall.Errno(0x51) ESHUTDOWN = syscall.Errno(0x3a) ESOCKTNOSUPPORT = syscall.Errno(0x2c) - ESPIPE = syscall.Errno(0x1d) - ESRCH = syscall.Errno(0x3) ESRMNT = syscall.Errno(0x54) ESTALE = syscall.Errno(0x46) ESTRPIPE = syscall.Errno(0x5b) ETIME = syscall.Errno(0x49) ETIMEDOUT = syscall.Errno(0x3c) ETOOMANYREFS = syscall.Errno(0x3b) - ETXTBSY = syscall.Errno(0x1a) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x63) EUSERS = syscall.Errno(0x44) - EWOULDBLOCK = syscall.Errno(0xb) - EXDEV = syscall.Errno(0x12) EXFULL = syscall.Errno(0x68) ) // Signals const ( - SIGABRT = syscall.Signal(0x6) - SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x14) SIGCLD = syscall.Signal(0x14) SIGCONT = syscall.Signal(0x13) SIGEMT = syscall.Signal(0x7) - SIGFPE = syscall.Signal(0x8) - SIGHUP = syscall.Signal(0x1) - SIGILL = syscall.Signal(0x4) - SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x17) - SIGIOT = syscall.Signal(0x6) - SIGKILL = syscall.Signal(0x9) SIGLOST = syscall.Signal(0x1d) - SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x17) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1d) - SIGQUIT = syscall.Signal(0x3) - SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x11) SIGSYS = syscall.Signal(0xc) - SIGTERM = syscall.Signal(0xf) - SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x12) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) diff --git a/vendor/golang.org/x/sys/unix/zptracearm_linux.go b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go similarity index 93% rename from vendor/golang.org/x/sys/unix/zptracearm_linux.go rename to vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go index faf23bbed97..89c5920e0cb 100644 --- a/vendor/golang.org/x/sys/unix/zptracearm_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go @@ -1,4 +1,4 @@ -// Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT. +// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. // +build linux // +build arm arm64 diff --git a/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go b/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go new file mode 100644 index 00000000000..6cb6d688aa4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go @@ -0,0 +1,17 @@ +// Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. + +package unix + +import "unsafe" + +// PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. +func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { + iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} + return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) +} + +// PtraceSetRegSetArm64 sets the registers used by arm64 binaries. +func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { + iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} + return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) +} diff --git a/vendor/golang.org/x/sys/unix/zptracemips_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go similarity index 93% rename from vendor/golang.org/x/sys/unix/zptracemips_linux.go rename to vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go index c431131e63c..24b841eec50 100644 --- a/vendor/golang.org/x/sys/unix/zptracemips_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go @@ -1,4 +1,4 @@ -// Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT. +// Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT. // +build linux // +build mips mips64 diff --git a/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go similarity index 93% rename from vendor/golang.org/x/sys/unix/zptracemipsle_linux.go rename to vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go index dc3d6d37322..47b04895651 100644 --- a/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go @@ -1,4 +1,4 @@ -// Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT. +// Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT. // +build linux // +build mipsle mips64le diff --git a/vendor/golang.org/x/sys/unix/zptrace386_linux.go b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go similarity index 95% rename from vendor/golang.org/x/sys/unix/zptrace386_linux.go rename to vendor/golang.org/x/sys/unix/zptrace_x86_linux.go index 2d21c49e126..ea5d9cb536c 100644 --- a/vendor/golang.org/x/sys/unix/zptrace386_linux.go +++ b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go @@ -1,4 +1,4 @@ -// Code generated by linux/mkall.go generatePtracePair(386, amd64). DO NOT EDIT. +// Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT. // +build linux // +build 386 amd64 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go index b42c1cbadd2..c1cc0a415fe 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0) if e1 != 0 { @@ -1683,22 +1699,6 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go index 603c9f6eb19..a3fc4900412 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -339,22 +339,6 @@ func libc_futimes_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_fcntl_trampoline() - -//go:linkname libc_fcntl libc_fcntl -//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -727,6 +711,22 @@ func libc_setattrlist_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_fcntl_trampoline() + +//go:linkname libc_fcntl libc_fcntl +//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -757,6 +757,27 @@ func libc_ioctl_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_sysctl_trampoline() + +//go:linkname libc_sysctl libc_sysctl +//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0) if e1 != 0 { @@ -2321,27 +2342,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc___sysctl_trampoline() - -//go:linkname libc___sysctl libc___sysctl -//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s index ece6f67c26e..6836a41290e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s @@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) -TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 - JMP libc_fcntl(SB) TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0 JMP libc_poll(SB) TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0 @@ -84,10 +82,14 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0 JMP libc_flistxattr(SB) TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0 JMP libc_setattrlist(SB) +TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0 JMP libc_kill(SB) TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) +TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0 @@ -262,8 +264,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) -TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0 - JMP libc___sysctl(SB) TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go index 38b7cbab38a..f8e5c37c5ca 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { @@ -1683,22 +1699,6 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index fda478e8bdf..50d6437e6b8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -339,22 +339,6 @@ func libc_futimes_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_fcntl_trampoline() - -//go:linkname libc_fcntl libc_fcntl -//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -727,6 +711,22 @@ func libc_setattrlist_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_fcntl_trampoline() + +//go:linkname libc_fcntl libc_fcntl +//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -757,6 +757,27 @@ func libc_ioctl_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_sysctl_trampoline() + +//go:linkname libc_sysctl libc_sysctl +//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { @@ -2321,27 +2342,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc___sysctl_trampoline() - -//go:linkname libc___sysctl libc___sysctl -//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index 7c4d5901633..a3fdf099d0e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) -TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 - JMP libc_fcntl(SB) TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0 JMP libc_poll(SB) TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0 @@ -84,10 +82,14 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0 JMP libc_flistxattr(SB) TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0 JMP libc_setattrlist(SB) +TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0 JMP libc_kill(SB) TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) +TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0 @@ -262,8 +264,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) -TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0 - JMP libc___sysctl(SB) TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go index abb69183a34..cea04e041c4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go index 163b3912d32..63103950ca7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -339,22 +339,6 @@ func libc_futimes_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_fcntl_trampoline() - -//go:linkname libc_fcntl libc_fcntl -//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -727,6 +711,22 @@ func libc_setattrlist_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_fcntl_trampoline() + +//go:linkname libc_fcntl libc_fcntl +//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -757,6 +757,27 @@ func libc_ioctl_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_sysctl_trampoline() + +//go:linkname libc_sysctl libc_sysctl +//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s index 5bebb1bbd00..b67f518fa30 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s @@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) -TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 - JMP libc_fcntl(SB) TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0 JMP libc_poll(SB) TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0 @@ -84,10 +82,14 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0 JMP libc_flistxattr(SB) TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0 JMP libc_setattrlist(SB) +TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0 JMP libc_kill(SB) TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) +TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go index b75c11d41e0..8c3bb3a25d1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 7c5bd510e5f..a8709f72dd7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -339,22 +339,6 @@ func libc_futimes_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_fcntl_trampoline() - -//go:linkname libc_fcntl libc_fcntl -//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -727,6 +711,22 @@ func libc_setattrlist_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_fcntl_trampoline() + +//go:linkname libc_fcntl libc_fcntl +//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func kill(pid int, signum int, posix int) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { @@ -757,6 +757,27 @@ func libc_ioctl_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_sysctl_trampoline() + +//go:linkname libc_sysctl libc_sysctl +//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index 96ab9877eb0..40cce1bb282 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) -TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 - JMP libc_fcntl(SB) TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0 JMP libc_poll(SB) TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0 @@ -84,10 +82,14 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0 JMP libc_flistxattr(SB) TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0 JMP libc_setattrlist(SB) +TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0 JMP libc_kill(SB) TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) +TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index df199b34545..fe1fdd78d70 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -255,17 +255,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index e68185f1e30..c9058f3091b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -255,17 +255,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 2f77f93c4ea..49b20c22966 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index e9a12c9d93b..31d2c461657 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index 27ab0fbda0b..abab3d7cbe3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go new file mode 100644 index 00000000000..fd2dae8e577 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -0,0 +1,1825 @@ +// Code generated by mkmerge.go; DO NOT EDIT. + +// +build linux + +package unix + +import ( + "syscall" + "unsafe" +) + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { + r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fchmodat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func keyctlJoin(cmd int, arg2 string) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg2) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg3) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(arg4) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { + var _p0 unsafe.Pointer + if len(payload) > 0 { + _p0 = unsafe.Pointer(&payload[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(keyType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(restriction) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { + _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(keyType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(description) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(payload) > 0 { + _p2 = unsafe.Pointer(&payload[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) + id = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { + _, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { + _, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGetres(clockid int32, res *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { + _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Eventfd(initval uint, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flistxattr(fd int, dest []byte) (sz int, err error) { + var _p0 unsafe.Pointer + if len(dest) > 0 { + _p0 = unsafe.Pointer(&dest[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fremovexattr(fd int, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrandom(buf []byte, flags int) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Llistxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lremovexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func MemfdCreate(name string, flags int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(keyType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(description) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(callback) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) + id = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { + r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) + newfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + SyscallNoError(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Syncfs(fd int) (err error) { + _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readv(fd int, iovs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovs) > 0 { + _p0 = unsafe.Pointer(&iovs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovs) > 0 { + _p0 = unsafe.Pointer(&iovs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovs) > 0 { + _p0 = unsafe.Pointer(&iovs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovs) > 0 { + _p0 = unsafe.Pointer(&iovs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovs) > 0 { + _p0 = unsafe.Pointer(&iovs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovs) > 0 { + _p0 = unsafe.Pointer(&iovs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func faccessat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index fe5d462e494..ba63af7b08d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe(p *[2]_C_int) (err error) { _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) if e1 != 0 { @@ -1769,16 +55,6 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -2030,8 +306,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2040,8 +317,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 536abcea339..f64adef415a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -2046,8 +332,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2056,8 +343,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2432,16 +720,6 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index 37823cd6bfc..ac19523e887 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe(p *[2]_C_int) (err error) { _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) if e1 != 0 { @@ -1769,16 +55,6 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) @@ -2166,8 +442,9 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2176,8 +453,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 794f61264ad..f0d2890b161 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { @@ -1969,8 +255,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -1979,8 +266,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2300,16 +588,6 @@ func Gettimeofday(tv *Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 1b34b550c36..aecbbca7542 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len)) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -1960,8 +246,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -1970,8 +257,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2417,16 +705,6 @@ func Pause() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe() (p1 int, p2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) p1 = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index 5714e259227..424fb7fb601 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -1990,8 +276,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2000,8 +287,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2376,16 +664,6 @@ func utimes(path string, times *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func fstat(fd int, st *stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index 88a6b3362f0..28c7239cf64 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -1990,8 +276,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2000,8 +287,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2376,16 +664,6 @@ func utimes(path string, times *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func fstat(fd int, st *stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index c09dbe34548..84596b300a6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -1960,8 +246,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -1970,8 +257,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2417,16 +705,6 @@ func Pause() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe() (p1 int, p2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) p1 = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 42f6c210398..de022639d68 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -2072,8 +358,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2082,8 +369,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2484,16 +772,6 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index de2cd8db918..888f21d37ac 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -2072,8 +358,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2082,8 +369,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2484,16 +772,6 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index d51bf07fc57..b76133447e8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { @@ -1949,8 +235,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -1959,8 +246,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2280,16 +568,6 @@ func Gettimeofday(tv *Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 1e3a3cb7324..9bc353f0c42 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Dup2(oldfd int, newfd int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if e1 != 0 { @@ -2042,8 +328,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2052,8 +339,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2264,16 +552,6 @@ func utimes(path string, times *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index 3c97008cd0c..854e816d672 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -14,1458 +14,8 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { - r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { - _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fchmodat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unlinkat(dirfd int, path string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getcwd(buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) - wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlJoin(cmd int, arg2 string) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg2) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg3) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(arg4) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { - var _p0 unsafe.Pointer - if len(payload) > 0 { - _p0 = unsafe.Pointer(&payload[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(restriction) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { - _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(arg) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(source) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(target) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Acct(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(payload) > 0 { - _p2 = unsafe.Pointer(&payload[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Adjtimex(buf *Timex) (state int, err error) { - r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) - state = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capget(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { - _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Chroot(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGetres(clockid int32, res *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockGettime(clockid int32, time *Timespec) (err error) { - _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { - _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { - r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func DeleteModule(name string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Dup3(oldfd int, newfd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCreate1(flag int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Eventfd(initval uint, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Exit(code int) { - SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fdatasync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func FinitModule(fd int, params string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flistxattr(fd int, dest []byte) (sz int, err error) { - var _p0 unsafe.Pointer - if len(dest) > 0 { - _p0 = unsafe.Pointer(&dest[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fremovexattr(fd int, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getdents(fd int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpid() (pid int) { - r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) - pid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getppid() (ppid int) { - r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) - ppid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Gettid() (tid int) { - r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) - tid = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InitModule(moduleImage []byte, params string) (err error) { - var _p0 unsafe.Pointer - if len(moduleImage) > 0 { - _p0 = unsafe.Pointer(&moduleImage[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - var _p1 *byte - _p1, err = BytePtrFromString(params) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) - watchdesc = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyInit1(flags int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { - r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) - success = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Kill(pid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Klogctl(typ int, buf []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(dest) > 0 { - _p2 = unsafe.Pointer(&dest[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Listxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Llistxattr(path string, dest []byte) (sz int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(dest) > 0 { - _p1 = unsafe.Pointer(&dest[0]) - } else { - _p1 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) - sz = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lremovexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func MemfdCreate(name string, flags int) (fd int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(name) - if err != nil { - return - } - r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mkdirat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { - r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func PivotRoot(newroot string, putold string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(newroot) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(putold) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { - _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func read(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Removexattr(path string, attr string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(oldpath) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(newpath) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(keyType) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(description) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(callback) - if err != nil { - return - } - r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) - id = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setdomainname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sethostname(p []byte) (err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) - pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Settimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setns(fd int, nstype int) (err error) { - _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Setxattr(path string, attr string, data []byte, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(attr) - if err != nil { - return - } - var _p2 unsafe.Pointer - if len(data) > 0 { - _p2 = unsafe.Pointer(&data[0]) - } else { - _p2 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { - r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) - newfd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Sync() { - SyscallNoError(SYS_SYNC, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Syncfs(fd int) (err error) { - _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) +func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { + _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) if e1 != 0 { err = errnoErr(e1) } @@ -1474,8 +24,8 @@ func Syncfs(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Sysinfo(info *Sysinfo_t) (err error) { - _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) if e1 != 0 { err = errnoErr(e1) } @@ -1495,270 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { - _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Umask(mask int) (oldmask int) { - r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) - oldmask = int(r0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Uname(buf *Utsname) (err error) { - _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unmount(target string, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(target) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Unshare(flags int) (err error) { - _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func write(fd int, p []byte) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func exitThread(code int) (err error) { - _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func readlen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func writelen(fd int, p *byte, np int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Madvise(b []byte, advice int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mprotect(b []byte, prot int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlock(b []byte) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func faccessat(dirfd int, path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(pathname) - if err != nil { - return - } - _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { - r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) - fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { @@ -2041,8 +327,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsgid(gid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) +func setfsgid(gid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2051,8 +338,9 @@ func Setfsgid(gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setfsuid(uid int) (err error) { - _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) +func setfsuid(uid int) (prev int, err error) { + r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + prev = int(r0) if e1 != 0 { err = errnoErr(e1) } @@ -2442,16 +730,6 @@ func pipe(p *[2]_C_int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 5ade42cce0e..3bbd9e39cda 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,22 +350,6 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -433,6 +406,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -564,6 +553,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return @@ -926,6 +925,16 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { + _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fsync(fd int) (err error) { _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) if e1 != 0 { @@ -1635,6 +1644,21 @@ func Stat(path string, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Symlink(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 3e0bbc5f101..d8cf5012c27 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,22 +350,6 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -433,6 +406,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -564,6 +553,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return @@ -926,6 +925,16 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { + _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fsync(fd int) (err error) { _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) if e1 != 0 { @@ -1635,6 +1644,21 @@ func Stat(path string, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Symlink(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index cb0af13a3cb..1153fe69b8e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,22 +350,6 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -433,6 +406,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -564,6 +553,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return @@ -926,6 +925,16 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { + _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fsync(fd int) (err error) { _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) if e1 != 0 { @@ -1635,6 +1644,21 @@ func Stat(path string, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Symlink(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index 6fd48d3dcd7..24b4ebb41fa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,22 +350,6 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func pipe() (fd1 int, fd2 int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) fd1 = int(r0) @@ -433,6 +406,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -564,6 +553,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return @@ -926,6 +925,16 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { + _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fsync(fd int) (err error) { _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) if e1 != 0 { @@ -1635,6 +1644,21 @@ func Stat(path string, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Symlink(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 2938e4124ed..b44b31aeb16 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,24 +350,8 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]_C_int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } @@ -431,6 +404,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -573,6 +562,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 22b79ab0e27..67f93ee76d8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,24 +350,8 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]_C_int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } @@ -431,6 +404,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -573,6 +562,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index cb921f37afd..d7c878b1d0a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,24 +350,8 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]_C_int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } @@ -431,6 +404,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -573,6 +562,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 5a743803550..8facd695d5a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - val = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) @@ -361,24 +350,8 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func pipe(p *[2]_C_int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } @@ -431,6 +404,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) @@ -573,6 +562,16 @@ func Dup2(from int, to int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 753def987ec..1f3b4d150fe 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -297,4 +297,5 @@ const ( SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 + SYS_CLONE3 = 435 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index ac86bd5446a..00da3de9077 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -415,4 +415,5 @@ const ( SYS_FSMOUNT = 4432 SYS_FSPICK = 4433 SYS_PIDFD_OPEN = 4434 + SYS_CLONE3 = 4435 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 1f5705b5884..d404fbd4d42 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -345,4 +345,5 @@ const ( SYS_FSMOUNT = 5432 SYS_FSPICK = 5433 SYS_PIDFD_OPEN = 5434 + SYS_CLONE3 = 5435 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d9ed953264c..bfbf242f331 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -345,4 +345,5 @@ const ( SYS_FSMOUNT = 5432 SYS_FSPICK = 5433 SYS_PIDFD_OPEN = 5434 + SYS_CLONE3 = 5435 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 94266b65a45..3826f497ad7 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -415,4 +415,5 @@ const ( SYS_FSMOUNT = 4432 SYS_FSPICK = 4433 SYS_PIDFD_OPEN = 4434 + SYS_CLONE3 = 4435 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go index c206f2b0534..71ea1d6d23f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -467,3 +467,13 @@ type Utsname struct { Version [32]byte Machine [32]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 7312e95ff42..0ec159680b9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -423,7 +423,7 @@ type PtraceIoDesc struct { Op int32 Offs *byte Addr *byte - Len uint + Len uint32 } type Kevent_t struct { @@ -698,3 +698,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Spare int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 29ba2f5bf74..8340f577536 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -428,7 +428,7 @@ type PtraceIoDesc struct { Op int32 Offs *byte Addr *byte - Len uint + Len uint64 } type Kevent_t struct { @@ -704,3 +704,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Spare int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index b4090ef3115..6f79227d745 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -405,7 +405,7 @@ type PtraceIoDesc struct { Op int32 Offs *byte Addr *byte - Len uint + Len uint32 } type Kevent_t struct { @@ -681,3 +681,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Spare int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 1542a87734a..e751e00336b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -397,7 +397,7 @@ type Reg struct { } type FpReg struct { - Fp_q [32]uint128 + Fp_q [512]uint8 Fp_sr uint32 Fp_cr uint32 } @@ -406,7 +406,7 @@ type PtraceIoDesc struct { Op int32 Offs *byte Addr *byte - Len uint + Len uint64 } type Kevent_t struct { @@ -682,3 +682,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Spare int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go new file mode 100644 index 00000000000..6c81e7515c8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -0,0 +1,2274 @@ +// Code generated by mkmerge.go; DO NOT EDIT. + +// +build linux + +package unix + +const ( + SizeofShort = 0x2 + SizeofInt = 0x4 + SizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + + _C_long_long int64 +) + +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + _ int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + +type Fsid struct { + Val [2]int32 +} + +type FscryptPolicy struct { + Version uint8 + Contents_encryption_mode uint8 + Filenames_encryption_mode uint8 + Flags uint8 + Master_key_descriptor [8]uint8 +} + +type FscryptKey struct { + Mode uint32 + Raw [64]uint8 + Size uint32 +} + +type FscryptPolicyV1 struct { + Version uint8 + Contents_encryption_mode uint8 + Filenames_encryption_mode uint8 + Flags uint8 + Master_key_descriptor [8]uint8 +} + +type FscryptPolicyV2 struct { + Version uint8 + Contents_encryption_mode uint8 + Filenames_encryption_mode uint8 + Flags uint8 + _ [4]uint8 + Master_key_identifier [16]uint8 +} + +type FscryptGetPolicyExArg struct { + Size uint64 + Policy [24]byte +} + +type FscryptKeySpecifier struct { + Type uint32 + _ uint32 + U [32]byte +} + +type FscryptAddKeyArg struct { + Key_spec FscryptKeySpecifier + Raw_size uint32 + _ [9]uint32 +} + +type FscryptRemoveKeyArg struct { + Key_spec FscryptKeySpecifier + Removal_status_flags uint32 + _ [5]uint32 +} + +type FscryptGetKeyStatusArg struct { + Key_spec FscryptKeySpecifier + _ [6]uint32 + Status uint32 + Status_flags uint32 + User_count uint32 + _ [13]uint32 +} + +type KeyctlDHParams struct { + Private int32 + Prime int32 + Base int32 +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddrL2 struct { + Family uint16 + Psm uint16 + Bdaddr [6]uint8 + Cid uint16 + Bdaddr_type uint8 + _ [1]byte +} + +type RawSockaddrRFCOMM struct { + Family uint16 + Bdaddr [6]uint8 + Channel uint8 + _ [1]byte +} + +type RawSockaddrCAN struct { + Family uint16 + Ifindex int32 + Addr [16]byte +} + +type RawSockaddrALG struct { + Family uint16 + Type [14]uint8 + Feat uint32 + Mask uint32 + Name [64]uint8 +} + +type RawSockaddrVM struct { + Family uint16 + Reserved1 uint16 + Port uint32 + Cid uint32 + Zero [4]uint8 +} + +type RawSockaddrXDP struct { + Family uint16 + Flags uint16 + Ifindex uint32 + Queue_id uint32 + Shared_umem_fd uint32 +} + +type RawSockaddrPPPoX [0x1e]byte + +type RawSockaddrTIPC struct { + Family uint16 + Addrtype uint8 + Scope int8 + Addr [12]byte +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type PacketMreq struct { + Ifindex int32 + Type uint16 + Alen uint16 + Address [8]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +type CanFilter struct { + Id uint32 + Mask uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofSockaddrL2 = 0xe + SizeofSockaddrRFCOMM = 0xa + SizeofSockaddrCAN = 0x18 + SizeofSockaddrALG = 0x58 + SizeofSockaddrVM = 0x10 + SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e + SizeofSockaddrTIPC = 0x10 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofPacketMreq = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 + SizeofCanFilter = 0x8 +) + +const ( + NDA_UNSPEC = 0x0 + NDA_DST = 0x1 + NDA_LLADDR = 0x2 + NDA_CACHEINFO = 0x3 + NDA_PROBES = 0x4 + NDA_VLAN = 0x5 + NDA_PORT = 0x6 + NDA_VNI = 0x7 + NDA_IFINDEX = 0x8 + NDA_MASTER = 0x9 + NDA_LINK_NETNSID = 0xa + NDA_SRC_VNI = 0xb + NTF_USE = 0x1 + NTF_SELF = 0x2 + NTF_MASTER = 0x4 + NTF_PROXY = 0x8 + NTF_EXT_LEARNED = 0x10 + NTF_OFFLOADED = 0x20 + NTF_ROUTER = 0x80 + NUD_INCOMPLETE = 0x1 + NUD_REACHABLE = 0x2 + NUD_STALE = 0x4 + NUD_DELAY = 0x8 + NUD_PROBE = 0x10 + NUD_FAILED = 0x20 + NUD_NOARP = 0x40 + NUD_PERMANENT = 0x80 + NUD_NONE = 0x0 + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFA_FLAGS = 0x8 + IFA_RT_PRIORITY = 0x9 + IFA_TARGET_NETNSID = 0xa + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_NUM_VF = 0x15 + IFLA_VFINFO_LIST = 0x16 + IFLA_STATS64 = 0x17 + IFLA_VF_PORTS = 0x18 + IFLA_PORT_SELF = 0x19 + IFLA_AF_SPEC = 0x1a + IFLA_GROUP = 0x1b + IFLA_NET_NS_FD = 0x1c + IFLA_EXT_MASK = 0x1d + IFLA_PROMISCUITY = 0x1e + IFLA_NUM_TX_QUEUES = 0x1f + IFLA_NUM_RX_QUEUES = 0x20 + IFLA_CARRIER = 0x21 + IFLA_PHYS_PORT_ID = 0x22 + IFLA_CARRIER_CHANGES = 0x23 + IFLA_PHYS_SWITCH_ID = 0x24 + IFLA_LINK_NETNSID = 0x25 + IFLA_PHYS_PORT_NAME = 0x26 + IFLA_PROTO_DOWN = 0x27 + IFLA_GSO_MAX_SEGS = 0x28 + IFLA_GSO_MAX_SIZE = 0x29 + IFLA_PAD = 0x2a + IFLA_XDP = 0x2b + IFLA_EVENT = 0x2c + IFLA_NEW_NETNSID = 0x2d + IFLA_IF_NETNSID = 0x2e + IFLA_TARGET_NETNSID = 0x2e + IFLA_CARRIER_UP_COUNT = 0x2f + IFLA_CARRIER_DOWN_COUNT = 0x30 + IFLA_NEW_IFINDEX = 0x31 + IFLA_MIN_MTU = 0x32 + IFLA_MAX_MTU = 0x33 + IFLA_MAX = 0x35 + IFLA_INFO_KIND = 0x1 + IFLA_INFO_DATA = 0x2 + IFLA_INFO_XSTATS = 0x3 + IFLA_INFO_SLAVE_KIND = 0x4 + IFLA_INFO_SLAVE_DATA = 0x5 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTA_MARK = 0x10 + RTA_MFC_STATS = 0x11 + RTA_VIA = 0x12 + RTA_NEWDST = 0x13 + RTA_PREF = 0x14 + RTA_ENCAP_TYPE = 0x15 + RTA_ENCAP = 0x16 + RTA_EXPIRES = 0x17 + RTA_PAD = 0x18 + RTA_UID = 0x19 + RTA_TTL_PROPAGATE = 0x1a + RTA_IP_PROTO = 0x1b + RTA_SPORT = 0x1c + RTA_DPORT = 0x1d + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofIfaCacheinfo = 0x10 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 + SizeofNdUseroptmsg = 0x10 + SizeofNdMsg = 0xc +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + _ uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type IfaCacheinfo struct { + Prefered uint32 + Valid uint32 + Cstamp uint32 + Tstamp uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +type NdUseroptmsg struct { + Family uint8 + Pad1 uint8 + Opts_len uint16 + Ifindex int32 + Icmp_type uint8 + Icmp_code uint8 + Pad2 uint16 + Pad3 uint32 +} + +type NdMsg struct { + Family uint8 + Pad1 uint8 + Pad2 uint16 + Ifindex int32 + State uint16 + Flags uint8 + Type uint8 +} + +const ( + SizeofSockFilter = 0x8 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 +} + +const SizeofInotifyEvent = 0x10 + +type Utsname struct { + Sysname [65]byte + Nodename [65]byte + Release [65]byte + Version [65]byte + Machine [65]byte + Domainname [65]byte +} + +const ( + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 + + AT_EACCESS = 0x200 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type SignalfdSiginfo struct { + Signo uint32 + Errno int32 + Code int32 + Pid uint32 + Uid uint32 + Fd int32 + Tid uint32 + Band uint32 + Overrun uint32 + Trapno uint32 + Status int32 + Int int32 + Ptr uint64 + Utime uint64 + Stime uint64 + Addr uint64 + Addr_lsb uint16 + _ uint16 + Syscall int32 + Call_addr uint64 + Arch uint32 + _ [28]uint8 +} + +const PERF_IOC_FLAG_GROUP = 0x1 + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + TASKSTATS_CMD_UNSPEC = 0x0 + TASKSTATS_CMD_GET = 0x1 + TASKSTATS_CMD_NEW = 0x2 + TASKSTATS_TYPE_UNSPEC = 0x0 + TASKSTATS_TYPE_PID = 0x1 + TASKSTATS_TYPE_TGID = 0x2 + TASKSTATS_TYPE_STATS = 0x3 + TASKSTATS_TYPE_AGGR_PID = 0x4 + TASKSTATS_TYPE_AGGR_TGID = 0x5 + TASKSTATS_TYPE_NULL = 0x6 + TASKSTATS_CMD_ATTR_UNSPEC = 0x0 + TASKSTATS_CMD_ATTR_PID = 0x1 + TASKSTATS_CMD_ATTR_TGID = 0x2 + TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 + TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 +) + +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + +type Genlmsghdr struct { + Cmd uint8 + Version uint8 + Reserved uint16 +} + +const ( + CTRL_CMD_UNSPEC = 0x0 + CTRL_CMD_NEWFAMILY = 0x1 + CTRL_CMD_DELFAMILY = 0x2 + CTRL_CMD_GETFAMILY = 0x3 + CTRL_CMD_NEWOPS = 0x4 + CTRL_CMD_DELOPS = 0x5 + CTRL_CMD_GETOPS = 0x6 + CTRL_CMD_NEWMCAST_GRP = 0x7 + CTRL_CMD_DELMCAST_GRP = 0x8 + CTRL_CMD_GETMCAST_GRP = 0x9 + CTRL_ATTR_UNSPEC = 0x0 + CTRL_ATTR_FAMILY_ID = 0x1 + CTRL_ATTR_FAMILY_NAME = 0x2 + CTRL_ATTR_VERSION = 0x3 + CTRL_ATTR_HDRSIZE = 0x4 + CTRL_ATTR_MAXATTR = 0x5 + CTRL_ATTR_OPS = 0x6 + CTRL_ATTR_MCAST_GROUPS = 0x7 + CTRL_ATTR_OP_UNSPEC = 0x0 + CTRL_ATTR_OP_ID = 0x1 + CTRL_ATTR_OP_FLAGS = 0x2 + CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 + CTRL_ATTR_MCAST_GRP_NAME = 0x1 + CTRL_ATTR_MCAST_GRP_ID = 0x2 +) + +const ( + _CPU_SETSIZE = 0x400 +) + +const ( + BDADDR_BREDR = 0x0 + BDADDR_LE_PUBLIC = 0x1 + BDADDR_LE_RANDOM = 0x2 +) + +type PerfEventAttr struct { + Type uint32 + Size uint32 + Config uint64 + Sample uint64 + Sample_type uint64 + Read_format uint64 + Bits uint64 + Wakeup uint32 + Bp_type uint32 + Ext1 uint64 + Ext2 uint64 + Branch_sample_type uint64 + Sample_regs_user uint64 + Sample_stack_user uint32 + Clockid int32 + Sample_regs_intr uint64 + Aux_watermark uint32 + Sample_max_stack uint16 + _ uint16 +} + +type PerfEventMmapPage struct { + Version uint32 + Compat_version uint32 + Lock uint32 + Index uint32 + Offset int64 + Time_enabled uint64 + Time_running uint64 + Capabilities uint64 + Pmc_width uint16 + Time_shift uint16 + Time_mult uint32 + Time_offset uint64 + Time_zero uint64 + Size uint32 + _ [948]uint8 + Data_head uint64 + Data_tail uint64 + Data_offset uint64 + Data_size uint64 + Aux_head uint64 + Aux_tail uint64 + Aux_offset uint64 + Aux_size uint64 +} + +const ( + PerfBitDisabled uint64 = CBitFieldMaskBit0 + PerfBitInherit = CBitFieldMaskBit1 + PerfBitPinned = CBitFieldMaskBit2 + PerfBitExclusive = CBitFieldMaskBit3 + PerfBitExcludeUser = CBitFieldMaskBit4 + PerfBitExcludeKernel = CBitFieldMaskBit5 + PerfBitExcludeHv = CBitFieldMaskBit6 + PerfBitExcludeIdle = CBitFieldMaskBit7 + PerfBitMmap = CBitFieldMaskBit8 + PerfBitComm = CBitFieldMaskBit9 + PerfBitFreq = CBitFieldMaskBit10 + PerfBitInheritStat = CBitFieldMaskBit11 + PerfBitEnableOnExec = CBitFieldMaskBit12 + PerfBitTask = CBitFieldMaskBit13 + PerfBitWatermark = CBitFieldMaskBit14 + PerfBitPreciseIPBit1 = CBitFieldMaskBit15 + PerfBitPreciseIPBit2 = CBitFieldMaskBit16 + PerfBitMmapData = CBitFieldMaskBit17 + PerfBitSampleIDAll = CBitFieldMaskBit18 + PerfBitExcludeHost = CBitFieldMaskBit19 + PerfBitExcludeGuest = CBitFieldMaskBit20 + PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 + PerfBitExcludeCallchainUser = CBitFieldMaskBit22 + PerfBitMmap2 = CBitFieldMaskBit23 + PerfBitCommExec = CBitFieldMaskBit24 + PerfBitUseClockID = CBitFieldMaskBit25 + PerfBitContextSwitch = CBitFieldMaskBit26 +) + +const ( + PERF_TYPE_HARDWARE = 0x0 + PERF_TYPE_SOFTWARE = 0x1 + PERF_TYPE_TRACEPOINT = 0x2 + PERF_TYPE_HW_CACHE = 0x3 + PERF_TYPE_RAW = 0x4 + PERF_TYPE_BREAKPOINT = 0x5 + + PERF_COUNT_HW_CPU_CYCLES = 0x0 + PERF_COUNT_HW_INSTRUCTIONS = 0x1 + PERF_COUNT_HW_CACHE_REFERENCES = 0x2 + PERF_COUNT_HW_CACHE_MISSES = 0x3 + PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 + PERF_COUNT_HW_BRANCH_MISSES = 0x5 + PERF_COUNT_HW_BUS_CYCLES = 0x6 + PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 + PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 + PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 + + PERF_COUNT_HW_CACHE_L1D = 0x0 + PERF_COUNT_HW_CACHE_L1I = 0x1 + PERF_COUNT_HW_CACHE_LL = 0x2 + PERF_COUNT_HW_CACHE_DTLB = 0x3 + PERF_COUNT_HW_CACHE_ITLB = 0x4 + PERF_COUNT_HW_CACHE_BPU = 0x5 + PERF_COUNT_HW_CACHE_NODE = 0x6 + + PERF_COUNT_HW_CACHE_OP_READ = 0x0 + PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 + PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 + + PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 + PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 + + PERF_COUNT_SW_CPU_CLOCK = 0x0 + PERF_COUNT_SW_TASK_CLOCK = 0x1 + PERF_COUNT_SW_PAGE_FAULTS = 0x2 + PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 + PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 + PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 + PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 + PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 + PERF_COUNT_SW_EMULATION_FAULTS = 0x8 + PERF_COUNT_SW_DUMMY = 0x9 + PERF_COUNT_SW_BPF_OUTPUT = 0xa + + PERF_SAMPLE_IP = 0x1 + PERF_SAMPLE_TID = 0x2 + PERF_SAMPLE_TIME = 0x4 + PERF_SAMPLE_ADDR = 0x8 + PERF_SAMPLE_READ = 0x10 + PERF_SAMPLE_CALLCHAIN = 0x20 + PERF_SAMPLE_ID = 0x40 + PERF_SAMPLE_CPU = 0x80 + PERF_SAMPLE_PERIOD = 0x100 + PERF_SAMPLE_STREAM_ID = 0x200 + PERF_SAMPLE_RAW = 0x400 + PERF_SAMPLE_BRANCH_STACK = 0x800 + + PERF_SAMPLE_BRANCH_USER = 0x1 + PERF_SAMPLE_BRANCH_KERNEL = 0x2 + PERF_SAMPLE_BRANCH_HV = 0x4 + PERF_SAMPLE_BRANCH_ANY = 0x8 + PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 + PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 + PERF_SAMPLE_BRANCH_IND_CALL = 0x40 + PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 + PERF_SAMPLE_BRANCH_IN_TX = 0x100 + PERF_SAMPLE_BRANCH_NO_TX = 0x200 + PERF_SAMPLE_BRANCH_COND = 0x400 + PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 + PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 + PERF_SAMPLE_BRANCH_CALL = 0x2000 + PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 + PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 + PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 + + PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 + PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 + PERF_FORMAT_ID = 0x4 + PERF_FORMAT_GROUP = 0x8 + + PERF_RECORD_MMAP = 0x1 + PERF_RECORD_LOST = 0x2 + PERF_RECORD_COMM = 0x3 + PERF_RECORD_EXIT = 0x4 + PERF_RECORD_THROTTLE = 0x5 + PERF_RECORD_UNTHROTTLE = 0x6 + PERF_RECORD_FORK = 0x7 + PERF_RECORD_READ = 0x8 + PERF_RECORD_SAMPLE = 0x9 + PERF_RECORD_MMAP2 = 0xa + PERF_RECORD_AUX = 0xb + PERF_RECORD_ITRACE_START = 0xc + PERF_RECORD_LOST_SAMPLES = 0xd + PERF_RECORD_SWITCH = 0xe + PERF_RECORD_SWITCH_CPU_WIDE = 0xf + PERF_RECORD_NAMESPACES = 0x10 + + PERF_CONTEXT_HV = -0x20 + PERF_CONTEXT_KERNEL = -0x80 + PERF_CONTEXT_USER = -0x200 + + PERF_CONTEXT_GUEST = -0x800 + PERF_CONTEXT_GUEST_KERNEL = -0x880 + PERF_CONTEXT_GUEST_USER = -0xa00 + + PERF_FLAG_FD_NO_GROUP = 0x1 + PERF_FLAG_FD_OUTPUT = 0x2 + PERF_FLAG_PID_CGROUP = 0x4 + PERF_FLAG_FD_CLOEXEC = 0x8 +) + +type TCPMD5Sig struct { + Addr SockaddrStorage + Flags uint8 + Prefixlen uint8 + Keylen uint16 + _ uint32 + Key [80]uint8 +} + +type HDDriveCmdHdr struct { + Command uint8 + Number uint8 + Feature uint8 + Count uint8 +} + +type HDDriveID struct { + Config uint16 + Cyls uint16 + Reserved2 uint16 + Heads uint16 + Track_bytes uint16 + Sector_bytes uint16 + Sectors uint16 + Vendor0 uint16 + Vendor1 uint16 + Vendor2 uint16 + Serial_no [20]uint8 + Buf_type uint16 + Buf_size uint16 + Ecc_bytes uint16 + Fw_rev [8]uint8 + Model [40]uint8 + Max_multsect uint8 + Vendor3 uint8 + Dword_io uint16 + Vendor4 uint8 + Capability uint8 + Reserved50 uint16 + Vendor5 uint8 + TPIO uint8 + Vendor6 uint8 + TDMA uint8 + Field_valid uint16 + Cur_cyls uint16 + Cur_heads uint16 + Cur_sectors uint16 + Cur_capacity0 uint16 + Cur_capacity1 uint16 + Multsect uint8 + Multsect_valid uint8 + Lba_capacity uint32 + Dma_1word uint16 + Dma_mword uint16 + Eide_pio_modes uint16 + Eide_dma_min uint16 + Eide_dma_time uint16 + Eide_pio uint16 + Eide_pio_iordy uint16 + Words69_70 [2]uint16 + Words71_74 [4]uint16 + Queue_depth uint16 + Words76_79 [4]uint16 + Major_rev_num uint16 + Minor_rev_num uint16 + Command_set_1 uint16 + Command_set_2 uint16 + Cfsse uint16 + Cfs_enable_1 uint16 + Cfs_enable_2 uint16 + Csf_default uint16 + Dma_ultra uint16 + Trseuc uint16 + TrsEuc uint16 + CurAPMvalues uint16 + Mprc uint16 + Hw_config uint16 + Acoustic uint16 + Msrqs uint16 + Sxfert uint16 + Sal uint16 + Spg uint32 + Lba_capacity_2 uint64 + Words104_125 [22]uint16 + Last_lun uint16 + Word127 uint16 + Dlf uint16 + Csfo uint16 + Words130_155 [26]uint16 + Word156 uint16 + Words157_159 [3]uint16 + Cfa_power uint16 + Words161_175 [15]uint16 + Words176_205 [30]uint16 + Words206_254 [49]uint16 + Integrity_word uint16 +} + +const ( + ST_MANDLOCK = 0x40 + ST_NOATIME = 0x400 + ST_NODEV = 0x4 + ST_NODIRATIME = 0x800 + ST_NOEXEC = 0x8 + ST_NOSUID = 0x2 + ST_RDONLY = 0x1 + ST_RELATIME = 0x1000 + ST_SYNCHRONOUS = 0x10 +) + +type Tpacket2Hdr struct { + Status uint32 + Len uint32 + Snaplen uint32 + Mac uint16 + Net uint16 + Sec uint32 + Nsec uint32 + Vlan_tci uint16 + Vlan_tpid uint16 + _ [4]uint8 +} + +type Tpacket3Hdr struct { + Next_offset uint32 + Sec uint32 + Nsec uint32 + Snaplen uint32 + Len uint32 + Status uint32 + Mac uint16 + Net uint16 + Hv1 TpacketHdrVariant1 + _ [8]uint8 +} + +type TpacketHdrVariant1 struct { + Rxhash uint32 + Vlan_tci uint32 + Vlan_tpid uint16 + _ uint16 +} + +type TpacketBlockDesc struct { + Version uint32 + To_priv uint32 + Hdr [40]byte +} + +type TpacketBDTS struct { + Sec uint32 + Usec uint32 +} + +type TpacketHdrV1 struct { + Block_status uint32 + Num_pkts uint32 + Offset_to_first_pkt uint32 + Blk_len uint32 + Seq_num uint64 + Ts_first_pkt TpacketBDTS + Ts_last_pkt TpacketBDTS +} + +type TpacketReq struct { + Block_size uint32 + Block_nr uint32 + Frame_size uint32 + Frame_nr uint32 +} + +type TpacketReq3 struct { + Block_size uint32 + Block_nr uint32 + Frame_size uint32 + Frame_nr uint32 + Retire_blk_tov uint32 + Sizeof_priv uint32 + Feature_req_word uint32 +} + +type TpacketStats struct { + Packets uint32 + Drops uint32 +} + +type TpacketStatsV3 struct { + Packets uint32 + Drops uint32 + Freeze_q_cnt uint32 +} + +type TpacketAuxdata struct { + Status uint32 + Len uint32 + Snaplen uint32 + Mac uint16 + Net uint16 + Vlan_tci uint16 + Vlan_tpid uint16 +} + +const ( + TPACKET_V1 = 0x0 + TPACKET_V2 = 0x1 + TPACKET_V3 = 0x2 +) + +const ( + SizeofTpacket2Hdr = 0x20 + SizeofTpacket3Hdr = 0x30 + + SizeofTpacketStats = 0x8 + SizeofTpacketStatsV3 = 0xc +) + +const ( + NF_INET_PRE_ROUTING = 0x0 + NF_INET_LOCAL_IN = 0x1 + NF_INET_FORWARD = 0x2 + NF_INET_LOCAL_OUT = 0x3 + NF_INET_POST_ROUTING = 0x4 + NF_INET_NUMHOOKS = 0x5 +) + +const ( + NF_NETDEV_INGRESS = 0x0 + NF_NETDEV_NUMHOOKS = 0x1 +) + +const ( + NFPROTO_UNSPEC = 0x0 + NFPROTO_INET = 0x1 + NFPROTO_IPV4 = 0x2 + NFPROTO_ARP = 0x3 + NFPROTO_NETDEV = 0x5 + NFPROTO_BRIDGE = 0x7 + NFPROTO_IPV6 = 0xa + NFPROTO_DECNET = 0xc + NFPROTO_NUMPROTO = 0xd +) + +type Nfgenmsg struct { + Nfgen_family uint8 + Version uint8 + Res_id uint16 +} + +const ( + NFNL_BATCH_UNSPEC = 0x0 + NFNL_BATCH_GENID = 0x1 +) + +const ( + NFT_REG_VERDICT = 0x0 + NFT_REG_1 = 0x1 + NFT_REG_2 = 0x2 + NFT_REG_3 = 0x3 + NFT_REG_4 = 0x4 + NFT_REG32_00 = 0x8 + NFT_REG32_01 = 0x9 + NFT_REG32_02 = 0xa + NFT_REG32_03 = 0xb + NFT_REG32_04 = 0xc + NFT_REG32_05 = 0xd + NFT_REG32_06 = 0xe + NFT_REG32_07 = 0xf + NFT_REG32_08 = 0x10 + NFT_REG32_09 = 0x11 + NFT_REG32_10 = 0x12 + NFT_REG32_11 = 0x13 + NFT_REG32_12 = 0x14 + NFT_REG32_13 = 0x15 + NFT_REG32_14 = 0x16 + NFT_REG32_15 = 0x17 + NFT_CONTINUE = -0x1 + NFT_BREAK = -0x2 + NFT_JUMP = -0x3 + NFT_GOTO = -0x4 + NFT_RETURN = -0x5 + NFT_MSG_NEWTABLE = 0x0 + NFT_MSG_GETTABLE = 0x1 + NFT_MSG_DELTABLE = 0x2 + NFT_MSG_NEWCHAIN = 0x3 + NFT_MSG_GETCHAIN = 0x4 + NFT_MSG_DELCHAIN = 0x5 + NFT_MSG_NEWRULE = 0x6 + NFT_MSG_GETRULE = 0x7 + NFT_MSG_DELRULE = 0x8 + NFT_MSG_NEWSET = 0x9 + NFT_MSG_GETSET = 0xa + NFT_MSG_DELSET = 0xb + NFT_MSG_NEWSETELEM = 0xc + NFT_MSG_GETSETELEM = 0xd + NFT_MSG_DELSETELEM = 0xe + NFT_MSG_NEWGEN = 0xf + NFT_MSG_GETGEN = 0x10 + NFT_MSG_TRACE = 0x11 + NFT_MSG_NEWOBJ = 0x12 + NFT_MSG_GETOBJ = 0x13 + NFT_MSG_DELOBJ = 0x14 + NFT_MSG_GETOBJ_RESET = 0x15 + NFT_MSG_MAX = 0x19 + NFTA_LIST_UNPEC = 0x0 + NFTA_LIST_ELEM = 0x1 + NFTA_HOOK_UNSPEC = 0x0 + NFTA_HOOK_HOOKNUM = 0x1 + NFTA_HOOK_PRIORITY = 0x2 + NFTA_HOOK_DEV = 0x3 + NFT_TABLE_F_DORMANT = 0x1 + NFTA_TABLE_UNSPEC = 0x0 + NFTA_TABLE_NAME = 0x1 + NFTA_TABLE_FLAGS = 0x2 + NFTA_TABLE_USE = 0x3 + NFTA_CHAIN_UNSPEC = 0x0 + NFTA_CHAIN_TABLE = 0x1 + NFTA_CHAIN_HANDLE = 0x2 + NFTA_CHAIN_NAME = 0x3 + NFTA_CHAIN_HOOK = 0x4 + NFTA_CHAIN_POLICY = 0x5 + NFTA_CHAIN_USE = 0x6 + NFTA_CHAIN_TYPE = 0x7 + NFTA_CHAIN_COUNTERS = 0x8 + NFTA_CHAIN_PAD = 0x9 + NFTA_RULE_UNSPEC = 0x0 + NFTA_RULE_TABLE = 0x1 + NFTA_RULE_CHAIN = 0x2 + NFTA_RULE_HANDLE = 0x3 + NFTA_RULE_EXPRESSIONS = 0x4 + NFTA_RULE_COMPAT = 0x5 + NFTA_RULE_POSITION = 0x6 + NFTA_RULE_USERDATA = 0x7 + NFTA_RULE_PAD = 0x8 + NFTA_RULE_ID = 0x9 + NFT_RULE_COMPAT_F_INV = 0x2 + NFT_RULE_COMPAT_F_MASK = 0x2 + NFTA_RULE_COMPAT_UNSPEC = 0x0 + NFTA_RULE_COMPAT_PROTO = 0x1 + NFTA_RULE_COMPAT_FLAGS = 0x2 + NFT_SET_ANONYMOUS = 0x1 + NFT_SET_CONSTANT = 0x2 + NFT_SET_INTERVAL = 0x4 + NFT_SET_MAP = 0x8 + NFT_SET_TIMEOUT = 0x10 + NFT_SET_EVAL = 0x20 + NFT_SET_OBJECT = 0x40 + NFT_SET_POL_PERFORMANCE = 0x0 + NFT_SET_POL_MEMORY = 0x1 + NFTA_SET_DESC_UNSPEC = 0x0 + NFTA_SET_DESC_SIZE = 0x1 + NFTA_SET_UNSPEC = 0x0 + NFTA_SET_TABLE = 0x1 + NFTA_SET_NAME = 0x2 + NFTA_SET_FLAGS = 0x3 + NFTA_SET_KEY_TYPE = 0x4 + NFTA_SET_KEY_LEN = 0x5 + NFTA_SET_DATA_TYPE = 0x6 + NFTA_SET_DATA_LEN = 0x7 + NFTA_SET_POLICY = 0x8 + NFTA_SET_DESC = 0x9 + NFTA_SET_ID = 0xa + NFTA_SET_TIMEOUT = 0xb + NFTA_SET_GC_INTERVAL = 0xc + NFTA_SET_USERDATA = 0xd + NFTA_SET_PAD = 0xe + NFTA_SET_OBJ_TYPE = 0xf + NFT_SET_ELEM_INTERVAL_END = 0x1 + NFTA_SET_ELEM_UNSPEC = 0x0 + NFTA_SET_ELEM_KEY = 0x1 + NFTA_SET_ELEM_DATA = 0x2 + NFTA_SET_ELEM_FLAGS = 0x3 + NFTA_SET_ELEM_TIMEOUT = 0x4 + NFTA_SET_ELEM_EXPIRATION = 0x5 + NFTA_SET_ELEM_USERDATA = 0x6 + NFTA_SET_ELEM_EXPR = 0x7 + NFTA_SET_ELEM_PAD = 0x8 + NFTA_SET_ELEM_OBJREF = 0x9 + NFTA_SET_ELEM_LIST_UNSPEC = 0x0 + NFTA_SET_ELEM_LIST_TABLE = 0x1 + NFTA_SET_ELEM_LIST_SET = 0x2 + NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 + NFTA_SET_ELEM_LIST_SET_ID = 0x4 + NFT_DATA_VALUE = 0x0 + NFT_DATA_VERDICT = 0xffffff00 + NFTA_DATA_UNSPEC = 0x0 + NFTA_DATA_VALUE = 0x1 + NFTA_DATA_VERDICT = 0x2 + NFTA_VERDICT_UNSPEC = 0x0 + NFTA_VERDICT_CODE = 0x1 + NFTA_VERDICT_CHAIN = 0x2 + NFTA_EXPR_UNSPEC = 0x0 + NFTA_EXPR_NAME = 0x1 + NFTA_EXPR_DATA = 0x2 + NFTA_IMMEDIATE_UNSPEC = 0x0 + NFTA_IMMEDIATE_DREG = 0x1 + NFTA_IMMEDIATE_DATA = 0x2 + NFTA_BITWISE_UNSPEC = 0x0 + NFTA_BITWISE_SREG = 0x1 + NFTA_BITWISE_DREG = 0x2 + NFTA_BITWISE_LEN = 0x3 + NFTA_BITWISE_MASK = 0x4 + NFTA_BITWISE_XOR = 0x5 + NFT_BYTEORDER_NTOH = 0x0 + NFT_BYTEORDER_HTON = 0x1 + NFTA_BYTEORDER_UNSPEC = 0x0 + NFTA_BYTEORDER_SREG = 0x1 + NFTA_BYTEORDER_DREG = 0x2 + NFTA_BYTEORDER_OP = 0x3 + NFTA_BYTEORDER_LEN = 0x4 + NFTA_BYTEORDER_SIZE = 0x5 + NFT_CMP_EQ = 0x0 + NFT_CMP_NEQ = 0x1 + NFT_CMP_LT = 0x2 + NFT_CMP_LTE = 0x3 + NFT_CMP_GT = 0x4 + NFT_CMP_GTE = 0x5 + NFTA_CMP_UNSPEC = 0x0 + NFTA_CMP_SREG = 0x1 + NFTA_CMP_OP = 0x2 + NFTA_CMP_DATA = 0x3 + NFT_RANGE_EQ = 0x0 + NFT_RANGE_NEQ = 0x1 + NFTA_RANGE_UNSPEC = 0x0 + NFTA_RANGE_SREG = 0x1 + NFTA_RANGE_OP = 0x2 + NFTA_RANGE_FROM_DATA = 0x3 + NFTA_RANGE_TO_DATA = 0x4 + NFT_LOOKUP_F_INV = 0x1 + NFTA_LOOKUP_UNSPEC = 0x0 + NFTA_LOOKUP_SET = 0x1 + NFTA_LOOKUP_SREG = 0x2 + NFTA_LOOKUP_DREG = 0x3 + NFTA_LOOKUP_SET_ID = 0x4 + NFTA_LOOKUP_FLAGS = 0x5 + NFT_DYNSET_OP_ADD = 0x0 + NFT_DYNSET_OP_UPDATE = 0x1 + NFT_DYNSET_F_INV = 0x1 + NFTA_DYNSET_UNSPEC = 0x0 + NFTA_DYNSET_SET_NAME = 0x1 + NFTA_DYNSET_SET_ID = 0x2 + NFTA_DYNSET_OP = 0x3 + NFTA_DYNSET_SREG_KEY = 0x4 + NFTA_DYNSET_SREG_DATA = 0x5 + NFTA_DYNSET_TIMEOUT = 0x6 + NFTA_DYNSET_EXPR = 0x7 + NFTA_DYNSET_PAD = 0x8 + NFTA_DYNSET_FLAGS = 0x9 + NFT_PAYLOAD_LL_HEADER = 0x0 + NFT_PAYLOAD_NETWORK_HEADER = 0x1 + NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 + NFT_PAYLOAD_CSUM_NONE = 0x0 + NFT_PAYLOAD_CSUM_INET = 0x1 + NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 + NFTA_PAYLOAD_UNSPEC = 0x0 + NFTA_PAYLOAD_DREG = 0x1 + NFTA_PAYLOAD_BASE = 0x2 + NFTA_PAYLOAD_OFFSET = 0x3 + NFTA_PAYLOAD_LEN = 0x4 + NFTA_PAYLOAD_SREG = 0x5 + NFTA_PAYLOAD_CSUM_TYPE = 0x6 + NFTA_PAYLOAD_CSUM_OFFSET = 0x7 + NFTA_PAYLOAD_CSUM_FLAGS = 0x8 + NFT_EXTHDR_F_PRESENT = 0x1 + NFT_EXTHDR_OP_IPV6 = 0x0 + NFT_EXTHDR_OP_TCPOPT = 0x1 + NFTA_EXTHDR_UNSPEC = 0x0 + NFTA_EXTHDR_DREG = 0x1 + NFTA_EXTHDR_TYPE = 0x2 + NFTA_EXTHDR_OFFSET = 0x3 + NFTA_EXTHDR_LEN = 0x4 + NFTA_EXTHDR_FLAGS = 0x5 + NFTA_EXTHDR_OP = 0x6 + NFTA_EXTHDR_SREG = 0x7 + NFT_META_LEN = 0x0 + NFT_META_PROTOCOL = 0x1 + NFT_META_PRIORITY = 0x2 + NFT_META_MARK = 0x3 + NFT_META_IIF = 0x4 + NFT_META_OIF = 0x5 + NFT_META_IIFNAME = 0x6 + NFT_META_OIFNAME = 0x7 + NFT_META_IIFTYPE = 0x8 + NFT_META_OIFTYPE = 0x9 + NFT_META_SKUID = 0xa + NFT_META_SKGID = 0xb + NFT_META_NFTRACE = 0xc + NFT_META_RTCLASSID = 0xd + NFT_META_SECMARK = 0xe + NFT_META_NFPROTO = 0xf + NFT_META_L4PROTO = 0x10 + NFT_META_BRI_IIFNAME = 0x11 + NFT_META_BRI_OIFNAME = 0x12 + NFT_META_PKTTYPE = 0x13 + NFT_META_CPU = 0x14 + NFT_META_IIFGROUP = 0x15 + NFT_META_OIFGROUP = 0x16 + NFT_META_CGROUP = 0x17 + NFT_META_PRANDOM = 0x18 + NFT_RT_CLASSID = 0x0 + NFT_RT_NEXTHOP4 = 0x1 + NFT_RT_NEXTHOP6 = 0x2 + NFT_RT_TCPMSS = 0x3 + NFT_HASH_JENKINS = 0x0 + NFT_HASH_SYM = 0x1 + NFTA_HASH_UNSPEC = 0x0 + NFTA_HASH_SREG = 0x1 + NFTA_HASH_DREG = 0x2 + NFTA_HASH_LEN = 0x3 + NFTA_HASH_MODULUS = 0x4 + NFTA_HASH_SEED = 0x5 + NFTA_HASH_OFFSET = 0x6 + NFTA_HASH_TYPE = 0x7 + NFTA_META_UNSPEC = 0x0 + NFTA_META_DREG = 0x1 + NFTA_META_KEY = 0x2 + NFTA_META_SREG = 0x3 + NFTA_RT_UNSPEC = 0x0 + NFTA_RT_DREG = 0x1 + NFTA_RT_KEY = 0x2 + NFT_CT_STATE = 0x0 + NFT_CT_DIRECTION = 0x1 + NFT_CT_STATUS = 0x2 + NFT_CT_MARK = 0x3 + NFT_CT_SECMARK = 0x4 + NFT_CT_EXPIRATION = 0x5 + NFT_CT_HELPER = 0x6 + NFT_CT_L3PROTOCOL = 0x7 + NFT_CT_SRC = 0x8 + NFT_CT_DST = 0x9 + NFT_CT_PROTOCOL = 0xa + NFT_CT_PROTO_SRC = 0xb + NFT_CT_PROTO_DST = 0xc + NFT_CT_LABELS = 0xd + NFT_CT_PKTS = 0xe + NFT_CT_BYTES = 0xf + NFT_CT_AVGPKT = 0x10 + NFT_CT_ZONE = 0x11 + NFT_CT_EVENTMASK = 0x12 + NFTA_CT_UNSPEC = 0x0 + NFTA_CT_DREG = 0x1 + NFTA_CT_KEY = 0x2 + NFTA_CT_DIRECTION = 0x3 + NFTA_CT_SREG = 0x4 + NFT_LIMIT_PKTS = 0x0 + NFT_LIMIT_PKT_BYTES = 0x1 + NFT_LIMIT_F_INV = 0x1 + NFTA_LIMIT_UNSPEC = 0x0 + NFTA_LIMIT_RATE = 0x1 + NFTA_LIMIT_UNIT = 0x2 + NFTA_LIMIT_BURST = 0x3 + NFTA_LIMIT_TYPE = 0x4 + NFTA_LIMIT_FLAGS = 0x5 + NFTA_LIMIT_PAD = 0x6 + NFTA_COUNTER_UNSPEC = 0x0 + NFTA_COUNTER_BYTES = 0x1 + NFTA_COUNTER_PACKETS = 0x2 + NFTA_COUNTER_PAD = 0x3 + NFTA_LOG_UNSPEC = 0x0 + NFTA_LOG_GROUP = 0x1 + NFTA_LOG_PREFIX = 0x2 + NFTA_LOG_SNAPLEN = 0x3 + NFTA_LOG_QTHRESHOLD = 0x4 + NFTA_LOG_LEVEL = 0x5 + NFTA_LOG_FLAGS = 0x6 + NFTA_QUEUE_UNSPEC = 0x0 + NFTA_QUEUE_NUM = 0x1 + NFTA_QUEUE_TOTAL = 0x2 + NFTA_QUEUE_FLAGS = 0x3 + NFTA_QUEUE_SREG_QNUM = 0x4 + NFT_QUOTA_F_INV = 0x1 + NFT_QUOTA_F_DEPLETED = 0x2 + NFTA_QUOTA_UNSPEC = 0x0 + NFTA_QUOTA_BYTES = 0x1 + NFTA_QUOTA_FLAGS = 0x2 + NFTA_QUOTA_PAD = 0x3 + NFTA_QUOTA_CONSUMED = 0x4 + NFT_REJECT_ICMP_UNREACH = 0x0 + NFT_REJECT_TCP_RST = 0x1 + NFT_REJECT_ICMPX_UNREACH = 0x2 + NFT_REJECT_ICMPX_NO_ROUTE = 0x0 + NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 + NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 + NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 + NFTA_REJECT_UNSPEC = 0x0 + NFTA_REJECT_TYPE = 0x1 + NFTA_REJECT_ICMP_CODE = 0x2 + NFT_NAT_SNAT = 0x0 + NFT_NAT_DNAT = 0x1 + NFTA_NAT_UNSPEC = 0x0 + NFTA_NAT_TYPE = 0x1 + NFTA_NAT_FAMILY = 0x2 + NFTA_NAT_REG_ADDR_MIN = 0x3 + NFTA_NAT_REG_ADDR_MAX = 0x4 + NFTA_NAT_REG_PROTO_MIN = 0x5 + NFTA_NAT_REG_PROTO_MAX = 0x6 + NFTA_NAT_FLAGS = 0x7 + NFTA_MASQ_UNSPEC = 0x0 + NFTA_MASQ_FLAGS = 0x1 + NFTA_MASQ_REG_PROTO_MIN = 0x2 + NFTA_MASQ_REG_PROTO_MAX = 0x3 + NFTA_REDIR_UNSPEC = 0x0 + NFTA_REDIR_REG_PROTO_MIN = 0x1 + NFTA_REDIR_REG_PROTO_MAX = 0x2 + NFTA_REDIR_FLAGS = 0x3 + NFTA_DUP_UNSPEC = 0x0 + NFTA_DUP_SREG_ADDR = 0x1 + NFTA_DUP_SREG_DEV = 0x2 + NFTA_FWD_UNSPEC = 0x0 + NFTA_FWD_SREG_DEV = 0x1 + NFTA_OBJREF_UNSPEC = 0x0 + NFTA_OBJREF_IMM_TYPE = 0x1 + NFTA_OBJREF_IMM_NAME = 0x2 + NFTA_OBJREF_SET_SREG = 0x3 + NFTA_OBJREF_SET_NAME = 0x4 + NFTA_OBJREF_SET_ID = 0x5 + NFTA_GEN_UNSPEC = 0x0 + NFTA_GEN_ID = 0x1 + NFTA_GEN_PROC_PID = 0x2 + NFTA_GEN_PROC_NAME = 0x3 + NFTA_FIB_UNSPEC = 0x0 + NFTA_FIB_DREG = 0x1 + NFTA_FIB_RESULT = 0x2 + NFTA_FIB_FLAGS = 0x3 + NFT_FIB_RESULT_UNSPEC = 0x0 + NFT_FIB_RESULT_OIF = 0x1 + NFT_FIB_RESULT_OIFNAME = 0x2 + NFT_FIB_RESULT_ADDRTYPE = 0x3 + NFTA_FIB_F_SADDR = 0x1 + NFTA_FIB_F_DADDR = 0x2 + NFTA_FIB_F_MARK = 0x4 + NFTA_FIB_F_IIF = 0x8 + NFTA_FIB_F_OIF = 0x10 + NFTA_FIB_F_PRESENT = 0x20 + NFTA_CT_HELPER_UNSPEC = 0x0 + NFTA_CT_HELPER_NAME = 0x1 + NFTA_CT_HELPER_L3PROTO = 0x2 + NFTA_CT_HELPER_L4PROTO = 0x3 + NFTA_OBJ_UNSPEC = 0x0 + NFTA_OBJ_TABLE = 0x1 + NFTA_OBJ_NAME = 0x2 + NFTA_OBJ_TYPE = 0x3 + NFTA_OBJ_DATA = 0x4 + NFTA_OBJ_USE = 0x5 + NFTA_TRACE_UNSPEC = 0x0 + NFTA_TRACE_TABLE = 0x1 + NFTA_TRACE_CHAIN = 0x2 + NFTA_TRACE_RULE_HANDLE = 0x3 + NFTA_TRACE_TYPE = 0x4 + NFTA_TRACE_VERDICT = 0x5 + NFTA_TRACE_ID = 0x6 + NFTA_TRACE_LL_HEADER = 0x7 + NFTA_TRACE_NETWORK_HEADER = 0x8 + NFTA_TRACE_TRANSPORT_HEADER = 0x9 + NFTA_TRACE_IIF = 0xa + NFTA_TRACE_IIFTYPE = 0xb + NFTA_TRACE_OIF = 0xc + NFTA_TRACE_OIFTYPE = 0xd + NFTA_TRACE_MARK = 0xe + NFTA_TRACE_NFPROTO = 0xf + NFTA_TRACE_POLICY = 0x10 + NFTA_TRACE_PAD = 0x11 + NFT_TRACETYPE_UNSPEC = 0x0 + NFT_TRACETYPE_POLICY = 0x1 + NFT_TRACETYPE_RETURN = 0x2 + NFT_TRACETYPE_RULE = 0x3 + NFTA_NG_UNSPEC = 0x0 + NFTA_NG_DREG = 0x1 + NFTA_NG_MODULUS = 0x2 + NFTA_NG_TYPE = 0x3 + NFTA_NG_OFFSET = 0x4 + NFT_NG_INCREMENTAL = 0x0 + NFT_NG_RANDOM = 0x1 +) + +type RTCTime struct { + Sec int32 + Min int32 + Hour int32 + Mday int32 + Mon int32 + Year int32 + Wday int32 + Yday int32 + Isdst int32 +} + +type RTCWkAlrm struct { + Enabled uint8 + Pending uint8 + Time RTCTime +} + +type BlkpgIoctlArg struct { + Op int32 + Flags int32 + Datalen int32 + Data *byte +} + +const ( + BLKPG_ADD_PARTITION = 0x1 + BLKPG_DEL_PARTITION = 0x2 + BLKPG_RESIZE_PARTITION = 0x3 +) + +const ( + NETNSA_NONE = 0x0 + NETNSA_NSID = 0x1 + NETNSA_PID = 0x2 + NETNSA_FD = 0x3 +) + +type XDPRingOffset struct { + Producer uint64 + Consumer uint64 + Desc uint64 + Flags uint64 +} + +type XDPMmapOffsets struct { + Rx XDPRingOffset + Tx XDPRingOffset + Fr XDPRingOffset + Cr XDPRingOffset +} + +type XDPStatistics struct { + Rx_dropped uint64 + Rx_invalid_descs uint64 + Tx_invalid_descs uint64 +} + +type XDPDesc struct { + Addr uint64 + Len uint32 + Options uint32 +} + +const ( + NCSI_CMD_UNSPEC = 0x0 + NCSI_CMD_PKG_INFO = 0x1 + NCSI_CMD_SET_INTERFACE = 0x2 + NCSI_CMD_CLEAR_INTERFACE = 0x3 + NCSI_ATTR_UNSPEC = 0x0 + NCSI_ATTR_IFINDEX = 0x1 + NCSI_ATTR_PACKAGE_LIST = 0x2 + NCSI_ATTR_PACKAGE_ID = 0x3 + NCSI_ATTR_CHANNEL_ID = 0x4 + NCSI_PKG_ATTR_UNSPEC = 0x0 + NCSI_PKG_ATTR = 0x1 + NCSI_PKG_ATTR_ID = 0x2 + NCSI_PKG_ATTR_FORCED = 0x3 + NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 + NCSI_CHANNEL_ATTR_UNSPEC = 0x0 + NCSI_CHANNEL_ATTR = 0x1 + NCSI_CHANNEL_ATTR_ID = 0x2 + NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 + NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 + NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 + NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 + NCSI_CHANNEL_ATTR_ACTIVE = 0x7 + NCSI_CHANNEL_ATTR_FORCED = 0x8 + NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 + NCSI_CHANNEL_ATTR_VLAN_ID = 0xa +) + +type ScmTimestamping struct { + Ts [3]Timespec +} + +const ( + SOF_TIMESTAMPING_TX_HARDWARE = 0x1 + SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 + SOF_TIMESTAMPING_RX_HARDWARE = 0x4 + SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 + SOF_TIMESTAMPING_SOFTWARE = 0x10 + SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 + SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 + SOF_TIMESTAMPING_OPT_ID = 0x80 + SOF_TIMESTAMPING_TX_SCHED = 0x100 + SOF_TIMESTAMPING_TX_ACK = 0x200 + SOF_TIMESTAMPING_OPT_CMSG = 0x400 + SOF_TIMESTAMPING_OPT_TSONLY = 0x800 + SOF_TIMESTAMPING_OPT_STATS = 0x1000 + SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 + SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 + + SOF_TIMESTAMPING_LAST = 0x4000 + SOF_TIMESTAMPING_MASK = 0x7fff + + SCM_TSTAMP_SND = 0x0 + SCM_TSTAMP_SCHED = 0x1 + SCM_TSTAMP_ACK = 0x2 +) + +type SockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type FanotifyEventMetadata struct { + Event_len uint32 + Vers uint8 + Reserved uint8 + Metadata_len uint16 + Mask uint64 + Fd int32 + Pid int32 +} + +type FanotifyResponse struct { + Fd int32 + Response uint32 +} + +const ( + CRYPTO_MSG_BASE = 0x10 + CRYPTO_MSG_NEWALG = 0x10 + CRYPTO_MSG_DELALG = 0x11 + CRYPTO_MSG_UPDATEALG = 0x12 + CRYPTO_MSG_GETALG = 0x13 + CRYPTO_MSG_DELRNG = 0x14 + CRYPTO_MSG_GETSTAT = 0x15 +) + +const ( + CRYPTOCFGA_UNSPEC = 0x0 + CRYPTOCFGA_PRIORITY_VAL = 0x1 + CRYPTOCFGA_REPORT_LARVAL = 0x2 + CRYPTOCFGA_REPORT_HASH = 0x3 + CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 + CRYPTOCFGA_REPORT_AEAD = 0x5 + CRYPTOCFGA_REPORT_COMPRESS = 0x6 + CRYPTOCFGA_REPORT_RNG = 0x7 + CRYPTOCFGA_REPORT_CIPHER = 0x8 + CRYPTOCFGA_REPORT_AKCIPHER = 0x9 + CRYPTOCFGA_REPORT_KPP = 0xa + CRYPTOCFGA_REPORT_ACOMP = 0xb + CRYPTOCFGA_STAT_LARVAL = 0xc + CRYPTOCFGA_STAT_HASH = 0xd + CRYPTOCFGA_STAT_BLKCIPHER = 0xe + CRYPTOCFGA_STAT_AEAD = 0xf + CRYPTOCFGA_STAT_COMPRESS = 0x10 + CRYPTOCFGA_STAT_RNG = 0x11 + CRYPTOCFGA_STAT_CIPHER = 0x12 + CRYPTOCFGA_STAT_AKCIPHER = 0x13 + CRYPTOCFGA_STAT_KPP = 0x14 + CRYPTOCFGA_STAT_ACOMP = 0x15 +) + +const ( + BPF_REG_0 = 0x0 + BPF_REG_1 = 0x1 + BPF_REG_2 = 0x2 + BPF_REG_3 = 0x3 + BPF_REG_4 = 0x4 + BPF_REG_5 = 0x5 + BPF_REG_6 = 0x6 + BPF_REG_7 = 0x7 + BPF_REG_8 = 0x8 + BPF_REG_9 = 0x9 + BPF_REG_10 = 0xa + BPF_MAP_CREATE = 0x0 + BPF_MAP_LOOKUP_ELEM = 0x1 + BPF_MAP_UPDATE_ELEM = 0x2 + BPF_MAP_DELETE_ELEM = 0x3 + BPF_MAP_GET_NEXT_KEY = 0x4 + BPF_PROG_LOAD = 0x5 + BPF_OBJ_PIN = 0x6 + BPF_OBJ_GET = 0x7 + BPF_PROG_ATTACH = 0x8 + BPF_PROG_DETACH = 0x9 + BPF_PROG_TEST_RUN = 0xa + BPF_PROG_GET_NEXT_ID = 0xb + BPF_MAP_GET_NEXT_ID = 0xc + BPF_PROG_GET_FD_BY_ID = 0xd + BPF_MAP_GET_FD_BY_ID = 0xe + BPF_OBJ_GET_INFO_BY_FD = 0xf + BPF_PROG_QUERY = 0x10 + BPF_RAW_TRACEPOINT_OPEN = 0x11 + BPF_BTF_LOAD = 0x12 + BPF_BTF_GET_FD_BY_ID = 0x13 + BPF_TASK_FD_QUERY = 0x14 + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 + BPF_MAP_FREEZE = 0x16 + BPF_BTF_GET_NEXT_ID = 0x17 + BPF_MAP_TYPE_UNSPEC = 0x0 + BPF_MAP_TYPE_HASH = 0x1 + BPF_MAP_TYPE_ARRAY = 0x2 + BPF_MAP_TYPE_PROG_ARRAY = 0x3 + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 + BPF_MAP_TYPE_PERCPU_HASH = 0x5 + BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 + BPF_MAP_TYPE_STACK_TRACE = 0x7 + BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 + BPF_MAP_TYPE_LRU_HASH = 0x9 + BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa + BPF_MAP_TYPE_LPM_TRIE = 0xb + BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc + BPF_MAP_TYPE_HASH_OF_MAPS = 0xd + BPF_MAP_TYPE_DEVMAP = 0xe + BPF_MAP_TYPE_SOCKMAP = 0xf + BPF_MAP_TYPE_CPUMAP = 0x10 + BPF_MAP_TYPE_XSKMAP = 0x11 + BPF_MAP_TYPE_SOCKHASH = 0x12 + BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 + BPF_MAP_TYPE_QUEUE = 0x16 + BPF_MAP_TYPE_STACK = 0x17 + BPF_MAP_TYPE_SK_STORAGE = 0x18 + BPF_MAP_TYPE_DEVMAP_HASH = 0x19 + BPF_PROG_TYPE_UNSPEC = 0x0 + BPF_PROG_TYPE_SOCKET_FILTER = 0x1 + BPF_PROG_TYPE_KPROBE = 0x2 + BPF_PROG_TYPE_SCHED_CLS = 0x3 + BPF_PROG_TYPE_SCHED_ACT = 0x4 + BPF_PROG_TYPE_TRACEPOINT = 0x5 + BPF_PROG_TYPE_XDP = 0x6 + BPF_PROG_TYPE_PERF_EVENT = 0x7 + BPF_PROG_TYPE_CGROUP_SKB = 0x8 + BPF_PROG_TYPE_CGROUP_SOCK = 0x9 + BPF_PROG_TYPE_LWT_IN = 0xa + BPF_PROG_TYPE_LWT_OUT = 0xb + BPF_PROG_TYPE_LWT_XMIT = 0xc + BPF_PROG_TYPE_SOCK_OPS = 0xd + BPF_PROG_TYPE_SK_SKB = 0xe + BPF_PROG_TYPE_CGROUP_DEVICE = 0xf + BPF_PROG_TYPE_SK_MSG = 0x10 + BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 + BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 + BPF_PROG_TYPE_LIRC_MODE2 = 0x14 + BPF_PROG_TYPE_SK_REUSEPORT = 0x15 + BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 + BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17 + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18 + BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19 + BPF_PROG_TYPE_TRACING = 0x1a + BPF_CGROUP_INET_INGRESS = 0x0 + BPF_CGROUP_INET_EGRESS = 0x1 + BPF_CGROUP_INET_SOCK_CREATE = 0x2 + BPF_CGROUP_SOCK_OPS = 0x3 + BPF_SK_SKB_STREAM_PARSER = 0x4 + BPF_SK_SKB_STREAM_VERDICT = 0x5 + BPF_CGROUP_DEVICE = 0x6 + BPF_SK_MSG_VERDICT = 0x7 + BPF_CGROUP_INET4_BIND = 0x8 + BPF_CGROUP_INET6_BIND = 0x9 + BPF_CGROUP_INET4_CONNECT = 0xa + BPF_CGROUP_INET6_CONNECT = 0xb + BPF_CGROUP_INET4_POST_BIND = 0xc + BPF_CGROUP_INET6_POST_BIND = 0xd + BPF_CGROUP_UDP4_SENDMSG = 0xe + BPF_CGROUP_UDP6_SENDMSG = 0xf + BPF_LIRC_MODE2 = 0x10 + BPF_FLOW_DISSECTOR = 0x11 + BPF_CGROUP_SYSCTL = 0x12 + BPF_CGROUP_UDP4_RECVMSG = 0x13 + BPF_CGROUP_UDP6_RECVMSG = 0x14 + BPF_CGROUP_GETSOCKOPT = 0x15 + BPF_CGROUP_SETSOCKOPT = 0x16 + BPF_TRACE_RAW_TP = 0x17 + BPF_TRACE_FENTRY = 0x18 + BPF_TRACE_FEXIT = 0x19 + BPF_STACK_BUILD_ID_EMPTY = 0x0 + BPF_STACK_BUILD_ID_VALID = 0x1 + BPF_STACK_BUILD_ID_IP = 0x2 + BPF_ADJ_ROOM_NET = 0x0 + BPF_ADJ_ROOM_MAC = 0x1 + BPF_HDR_START_MAC = 0x0 + BPF_HDR_START_NET = 0x1 + BPF_LWT_ENCAP_SEG6 = 0x0 + BPF_LWT_ENCAP_SEG6_INLINE = 0x1 + BPF_LWT_ENCAP_IP = 0x2 + BPF_OK = 0x0 + BPF_DROP = 0x2 + BPF_REDIRECT = 0x7 + BPF_LWT_REROUTE = 0x80 + BPF_SOCK_OPS_VOID = 0x0 + BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 + BPF_SOCK_OPS_RWND_INIT = 0x2 + BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 + BPF_SOCK_OPS_NEEDS_ECN = 0x6 + BPF_SOCK_OPS_BASE_RTT = 0x7 + BPF_SOCK_OPS_RTO_CB = 0x8 + BPF_SOCK_OPS_RETRANS_CB = 0x9 + BPF_SOCK_OPS_STATE_CB = 0xa + BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb + BPF_SOCK_OPS_RTT_CB = 0xc + BPF_TCP_ESTABLISHED = 0x1 + BPF_TCP_SYN_SENT = 0x2 + BPF_TCP_SYN_RECV = 0x3 + BPF_TCP_FIN_WAIT1 = 0x4 + BPF_TCP_FIN_WAIT2 = 0x5 + BPF_TCP_TIME_WAIT = 0x6 + BPF_TCP_CLOSE = 0x7 + BPF_TCP_CLOSE_WAIT = 0x8 + BPF_TCP_LAST_ACK = 0x9 + BPF_TCP_LISTEN = 0xa + BPF_TCP_CLOSING = 0xb + BPF_TCP_NEW_SYN_RECV = 0xc + BPF_TCP_MAX_STATES = 0xd + BPF_FIB_LKUP_RET_SUCCESS = 0x0 + BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 + BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 + BPF_FIB_LKUP_RET_PROHIBIT = 0x3 + BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 + BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 + BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 + BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 + BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 + BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 + BPF_FD_TYPE_TRACEPOINT = 0x1 + BPF_FD_TYPE_KPROBE = 0x2 + BPF_FD_TYPE_KRETPROBE = 0x3 + BPF_FD_TYPE_UPROBE = 0x4 + BPF_FD_TYPE_URETPROBE = 0x5 +) + +const ( + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_DECnet_IFADDR = 0xd + RTNLGRP_NOP2 = 0xe + RTNLGRP_DECnet_ROUTE = 0xf + RTNLGRP_DECnet_RULE = 0x10 + RTNLGRP_NOP4 = 0x11 + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + RTNLGRP_PHONET_IFADDR = 0x15 + RTNLGRP_PHONET_ROUTE = 0x16 + RTNLGRP_DCB = 0x17 + RTNLGRP_IPV4_NETCONF = 0x18 + RTNLGRP_IPV6_NETCONF = 0x19 + RTNLGRP_MDB = 0x1a + RTNLGRP_MPLS_ROUTE = 0x1b + RTNLGRP_NSID = 0x1c + RTNLGRP_MPLS_NETCONF = 0x1d + RTNLGRP_IPV4_MROUTE_R = 0x1e + RTNLGRP_IPV6_MROUTE_R = 0x1f + RTNLGRP_NEXTHOP = 0x20 +) + +type CapUserHeader struct { + Version uint32 + Pid int32 +} + +type CapUserData struct { + Effective uint32 + Permitted uint32 + Inheritable uint32 +} + +const ( + LINUX_CAPABILITY_VERSION_1 = 0x19980330 + LINUX_CAPABILITY_VERSION_2 = 0x20071026 + LINUX_CAPABILITY_VERSION_3 = 0x20080522 +) + +const ( + LO_FLAGS_READ_ONLY = 0x1 + LO_FLAGS_AUTOCLEAR = 0x4 + LO_FLAGS_PARTSCAN = 0x8 + LO_FLAGS_DIRECT_IO = 0x10 +) + +type LoopInfo64 struct { + Device uint64 + Inode uint64 + Rdevice uint64 + Offset uint64 + Sizelimit uint64 + Number uint32 + Encrypt_type uint32 + Encrypt_key_size uint32 + Flags uint32 + File_name [64]uint8 + Crypt_name [64]uint8 + Encrypt_key [32]uint8 + Init [2]uint64 +} + +type TIPCSocketAddr struct { + Ref uint32 + Node uint32 +} + +type TIPCServiceRange struct { + Type uint32 + Lower uint32 + Upper uint32 +} + +type TIPCServiceName struct { + Type uint32 + Instance uint32 + Domain uint32 +} + +type TIPCEvent struct { + Event uint32 + Lower uint32 + Upper uint32 + Port TIPCSocketAddr + S TIPCSubscr +} + +type TIPCGroupReq struct { + Type uint32 + Instance uint32 + Scope uint32 + Flags uint32 +} + +const ( + TIPC_CLUSTER_SCOPE = 0x2 + TIPC_NODE_SCOPE = 0x3 +) + +const ( + SYSLOG_ACTION_CLOSE = 0 + SYSLOG_ACTION_OPEN = 1 + SYSLOG_ACTION_READ = 2 + SYSLOG_ACTION_READ_ALL = 3 + SYSLOG_ACTION_READ_CLEAR = 4 + SYSLOG_ACTION_CLEAR = 5 + SYSLOG_ACTION_CONSOLE_OFF = 6 + SYSLOG_ACTION_CONSOLE_ON = 7 + SYSLOG_ACTION_CONSOLE_LEVEL = 8 + SYSLOG_ACTION_SIZE_UNREAD = 9 + SYSLOG_ACTION_SIZE_BUFFER = 10 +) + +const ( + DEVLINK_CMD_UNSPEC = 0x0 + DEVLINK_CMD_GET = 0x1 + DEVLINK_CMD_SET = 0x2 + DEVLINK_CMD_NEW = 0x3 + DEVLINK_CMD_DEL = 0x4 + DEVLINK_CMD_PORT_GET = 0x5 + DEVLINK_CMD_PORT_SET = 0x6 + DEVLINK_CMD_PORT_NEW = 0x7 + DEVLINK_CMD_PORT_DEL = 0x8 + DEVLINK_CMD_PORT_SPLIT = 0x9 + DEVLINK_CMD_PORT_UNSPLIT = 0xa + DEVLINK_CMD_SB_GET = 0xb + DEVLINK_CMD_SB_SET = 0xc + DEVLINK_CMD_SB_NEW = 0xd + DEVLINK_CMD_SB_DEL = 0xe + DEVLINK_CMD_SB_POOL_GET = 0xf + DEVLINK_CMD_SB_POOL_SET = 0x10 + DEVLINK_CMD_SB_POOL_NEW = 0x11 + DEVLINK_CMD_SB_POOL_DEL = 0x12 + DEVLINK_CMD_SB_PORT_POOL_GET = 0x13 + DEVLINK_CMD_SB_PORT_POOL_SET = 0x14 + DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15 + DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16 + DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17 + DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18 + DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19 + DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a + DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b + DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c + DEVLINK_CMD_ESWITCH_GET = 0x1d + DEVLINK_CMD_ESWITCH_SET = 0x1e + DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f + DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20 + DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21 + DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22 + DEVLINK_CMD_MAX = 0x44 + DEVLINK_PORT_TYPE_NOTSET = 0x0 + DEVLINK_PORT_TYPE_AUTO = 0x1 + DEVLINK_PORT_TYPE_ETH = 0x2 + DEVLINK_PORT_TYPE_IB = 0x3 + DEVLINK_SB_POOL_TYPE_INGRESS = 0x0 + DEVLINK_SB_POOL_TYPE_EGRESS = 0x1 + DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0 + DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1 + DEVLINK_ESWITCH_MODE_LEGACY = 0x0 + DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1 + DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0 + DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1 + DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2 + DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3 + DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0 + DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1 + DEVLINK_ATTR_UNSPEC = 0x0 + DEVLINK_ATTR_BUS_NAME = 0x1 + DEVLINK_ATTR_DEV_NAME = 0x2 + DEVLINK_ATTR_PORT_INDEX = 0x3 + DEVLINK_ATTR_PORT_TYPE = 0x4 + DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5 + DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6 + DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7 + DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8 + DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9 + DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa + DEVLINK_ATTR_SB_INDEX = 0xb + DEVLINK_ATTR_SB_SIZE = 0xc + DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd + DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe + DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf + DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10 + DEVLINK_ATTR_SB_POOL_INDEX = 0x11 + DEVLINK_ATTR_SB_POOL_TYPE = 0x12 + DEVLINK_ATTR_SB_POOL_SIZE = 0x13 + DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14 + DEVLINK_ATTR_SB_THRESHOLD = 0x15 + DEVLINK_ATTR_SB_TC_INDEX = 0x16 + DEVLINK_ATTR_SB_OCC_CUR = 0x17 + DEVLINK_ATTR_SB_OCC_MAX = 0x18 + DEVLINK_ATTR_ESWITCH_MODE = 0x19 + DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a + DEVLINK_ATTR_DPIPE_TABLES = 0x1b + DEVLINK_ATTR_DPIPE_TABLE = 0x1c + DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d + DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e + DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f + DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20 + DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21 + DEVLINK_ATTR_DPIPE_ENTRIES = 0x22 + DEVLINK_ATTR_DPIPE_ENTRY = 0x23 + DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24 + DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25 + DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26 + DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27 + DEVLINK_ATTR_DPIPE_MATCH = 0x28 + DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29 + DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a + DEVLINK_ATTR_DPIPE_ACTION = 0x2b + DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c + DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d + DEVLINK_ATTR_DPIPE_VALUE = 0x2e + DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f + DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30 + DEVLINK_ATTR_DPIPE_HEADERS = 0x31 + DEVLINK_ATTR_DPIPE_HEADER = 0x32 + DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33 + DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34 + DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35 + DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36 + DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37 + DEVLINK_ATTR_DPIPE_FIELD = 0x38 + DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39 + DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a + DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b + DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c + DEVLINK_ATTR_PAD = 0x3d + DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e + DEVLINK_ATTR_MAX = 0x8c + DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0 + DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1 + DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0 + DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0 + DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0 + DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0 + DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0 + DEVLINK_DPIPE_HEADER_ETHERNET = 0x0 + DEVLINK_DPIPE_HEADER_IPV4 = 0x1 + DEVLINK_DPIPE_HEADER_IPV6 = 0x2 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 74d42bb5d47..fc6b3fb5c4e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x4 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x4 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x4 + SizeofLong = 0x4 ) type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 + _C_long int32 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int32 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 _ uint16 @@ -114,36 +100,6 @@ type Stat_t struct { Ino uint64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -153,10 +109,6 @@ type Dirent struct { _ [1]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -165,133 +117,11 @@ type Flock_t struct { Pid int32 } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -302,41 +132,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint32 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -353,399 +153,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 -) - const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofIovec = 0x8 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 + SizeofSockFprog = 0x8 ) -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Ebx int32 Ecx int32 @@ -787,15 +204,6 @@ type Sysinfo_t struct { _ [8]int8 } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint32 @@ -810,35 +218,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -847,33 +227,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -885,13 +238,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -943,277 +289,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint32 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x20 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x20 ) const ( @@ -1289,22 +368,6 @@ type SockaddrStorage struct { _ uint32 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1312,88 +375,6 @@ type HDGeometry struct { Start uint32 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int32 Bsize int32 @@ -1409,18 +390,6 @@ type Statfs_t struct { Spare [4]int32 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint32 Len uint32 @@ -1431,589 +400,10 @@ type TpacketHdr struct { Usec uint32 } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x18 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 + SizeofTpacketHdr = 0x18 ) -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2024,13 +414,6 @@ type RTCPLLInfo struct { Clock int32 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2040,168 +423,17 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x1269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x1269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2332,182 +564,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint16 @@ -2522,38 +578,6 @@ type LoopInfo struct { Init [2]uint32 Reserved [4]int8 } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2562,21 +586,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2587,22 +596,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 8debef94a0d..26c30b84d09 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 Ino uint64 @@ -113,36 +99,6 @@ type Stat_t struct { _ [3]int64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -152,10 +108,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -165,133 +117,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -302,41 +132,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -354,399 +154,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { R15 uint64 R14 uint64 @@ -799,15 +216,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -823,35 +231,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -860,33 +240,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -898,13 +251,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -954,277 +300,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1300,22 +379,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1323,88 +386,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1420,18 +401,6 @@ type Statfs_t struct { Spare [4]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1443,589 +412,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd + SizeofTpacketHdr = 0x20 ) -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2036,13 +426,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2053,168 +436,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x1269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x1269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2345,182 +578,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint64 @@ -2536,38 +593,6 @@ type LoopInfo struct { Reserved [4]int8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2576,21 +601,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2601,22 +611,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index feb7d8370a2..814d42d5435 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x4 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x4 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x4 + SizeofLong = 0x4 ) type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 + _C_long int32 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int32 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 _ uint16 @@ -116,36 +102,6 @@ type Stat_t struct { Ino uint64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -155,10 +111,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -169,133 +121,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -306,41 +136,11 @@ type RawSockaddrAny struct { Pad [96]uint8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint32 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -357,399 +157,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 -) - const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofIovec = 0x8 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 + SizeofSockFprog = 0x8 ) -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Uregs [18]uint32 } @@ -775,15 +192,6 @@ type Sysinfo_t struct { _ [8]uint8 } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint32 @@ -799,35 +207,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -836,33 +216,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -874,13 +227,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -932,277 +278,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint32 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x20 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x20 ) const ( @@ -1278,22 +357,6 @@ type SockaddrStorage struct { _ uint32 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1301,88 +364,6 @@ type HDGeometry struct { Start uint32 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int32 Bsize int32 @@ -1399,18 +380,6 @@ type Statfs_t struct { _ [4]byte } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint32 Len uint32 @@ -1421,589 +390,10 @@ type TpacketHdr struct { Usec uint32 } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x18 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 + SizeofTpacketHdr = 0x18 ) -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2014,13 +404,6 @@ type RTCPLLInfo struct { Clock int32 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2031,168 +414,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x1269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x1269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 @@ -2323,182 +556,6 @@ type CryptoReportAcomp struct { Type [64]uint8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint16 @@ -2513,38 +570,6 @@ type LoopInfo struct { Init [2]uint32 Reserved [4]uint8 } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2553,21 +578,6 @@ type TIPCSubscr struct { Handle [8]uint8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2578,22 +588,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 6da21783709..d9664c71355 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 Ino uint64 @@ -114,36 +100,6 @@ type Stat_t struct { _ [2]int32 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -153,10 +109,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -166,133 +118,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -303,41 +133,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -355,399 +155,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Regs [31]uint64 Sp uint64 @@ -777,15 +194,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -802,35 +210,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -839,33 +219,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -877,13 +230,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -933,277 +279,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1279,22 +358,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1302,88 +365,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1399,18 +380,6 @@ type Statfs_t struct { Spare [4]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1422,589 +391,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 + SizeofTpacketHdr = 0x20 ) -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2015,13 +405,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2032,168 +415,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x1269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 + BLKPG = 0x1269 ) -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 -) - -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2324,182 +557,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2515,38 +572,6 @@ type LoopInfo struct { Reserved [4]int8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2555,21 +580,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2580,22 +590,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 14b1dea683f..0d721454f5f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x4 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x4 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x4 + SizeofLong = 0x4 ) type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 + _C_long int32 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int32 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint32 Pad1 [3]int32 @@ -115,36 +101,6 @@ type Stat_t struct { Pad5 [14]int32 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -154,10 +110,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -168,133 +120,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -305,41 +135,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint32 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -356,399 +156,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 -) - const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofIovec = 0x8 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 + SizeofSockFprog = 0x8 ) -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Regs [32]uint64 Lo uint64 @@ -780,15 +197,6 @@ type Sysinfo_t struct { _ [8]int8 } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint32 @@ -804,35 +212,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -841,33 +221,6 @@ type Sigset_t struct { const _C__NSIG = 0x80 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -879,13 +232,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -937,277 +283,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint32 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x20 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x20 ) const ( @@ -1283,22 +362,6 @@ type SockaddrStorage struct { _ uint32 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1306,88 +369,6 @@ type HDGeometry struct { Start uint32 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int32 Bsize int32 @@ -1405,18 +386,6 @@ type Statfs_t struct { _ [4]byte } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint32 Len uint32 @@ -1427,589 +396,10 @@ type TpacketHdr struct { Usec uint32 } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x18 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 + SizeofTpacketHdr = 0x18 ) -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2020,13 +410,6 @@ type RTCPLLInfo struct { Clock int32 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2037,168 +420,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x20001269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2329,182 +562,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2519,38 +576,6 @@ type LoopInfo struct { Init [2]uint32 Reserved [4]int8 } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2559,21 +584,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2584,22 +594,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 0fb94a7687f..ef697684d13 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint32 Pad1 [3]uint32 @@ -114,36 +100,6 @@ type Stat_t struct { Blocks int64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -153,10 +109,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -166,133 +118,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -303,41 +133,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -355,399 +155,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Regs [32]uint64 Lo uint64 @@ -780,15 +197,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -799,40 +207,13 @@ type Ustat_t struct { type EpollEvent struct { Events uint32 + _ int32 Fd int32 Pad int32 } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -841,33 +222,6 @@ type Sigset_t struct { const _C__NSIG = 0x80 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -879,13 +233,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -935,277 +282,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1281,22 +361,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1304,88 +368,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1401,18 +383,6 @@ type Statfs_t struct { Spare [5]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1424,589 +394,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 + SizeofTpacketHdr = 0x20 ) -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2017,13 +408,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2034,168 +418,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 + BLKPG = 0x20001269 ) -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 -) - -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2326,182 +560,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2517,38 +575,6 @@ type LoopInfo struct { Reserved [4]int8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2557,21 +583,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2582,22 +593,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 7ffc7bbc533..485fda70be1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint32 Pad1 [3]uint32 @@ -114,36 +100,6 @@ type Stat_t struct { Blocks int64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -153,10 +109,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -166,133 +118,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -303,41 +133,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -355,399 +155,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Regs [32]uint64 Lo uint64 @@ -780,15 +197,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -799,40 +207,13 @@ type Ustat_t struct { type EpollEvent struct { Events uint32 + _ int32 Fd int32 Pad int32 } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -841,33 +222,6 @@ type Sigset_t struct { const _C__NSIG = 0x80 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -879,13 +233,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -935,277 +282,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1281,22 +361,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1304,88 +368,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1401,18 +383,6 @@ type Statfs_t struct { Spare [5]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1424,589 +394,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 + SizeofTpacketHdr = 0x20 ) -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2017,13 +408,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2034,168 +418,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 + BLKPG = 0x20001269 ) -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 -) - -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2326,182 +560,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2517,38 +575,6 @@ type LoopInfo struct { Reserved [4]int8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2557,21 +583,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2582,22 +593,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 12ef8eb4545..569477eef8e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x4 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x4 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x4 + SizeofLong = 0x4 ) type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 + _C_long int32 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int32 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint32 Pad1 [3]int32 @@ -115,36 +101,6 @@ type Stat_t struct { Pad5 [14]int32 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -154,10 +110,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -168,133 +120,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -305,41 +135,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint32 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -356,399 +156,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - -const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x8 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x1c - SizeofCmsghdr = 0xc - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 -) - const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofIovec = 0x8 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x8 + SizeofSockFprog = 0x8 ) -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Regs [32]uint64 Lo uint64 @@ -780,15 +197,6 @@ type Sysinfo_t struct { _ [8]int8 } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint32 @@ -804,35 +212,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -841,33 +221,6 @@ type Sigset_t struct { const _C__NSIG = 0x80 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -879,13 +232,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -937,277 +283,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint32 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x20 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x20 ) const ( @@ -1283,22 +362,6 @@ type SockaddrStorage struct { _ uint32 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1306,88 +369,6 @@ type HDGeometry struct { Start uint32 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int32 Bsize int32 @@ -1405,18 +386,6 @@ type Statfs_t struct { _ [4]byte } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint32 Len uint32 @@ -1427,589 +396,10 @@ type TpacketHdr struct { Usec uint32 } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x18 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 + SizeofTpacketHdr = 0x18 ) -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2020,13 +410,6 @@ type RTCPLLInfo struct { Clock int32 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2037,168 +420,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x20001269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2329,182 +562,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2519,38 +576,6 @@ type LoopInfo struct { Init [2]uint32 Reserved [4]int8 } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2559,21 +584,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2584,22 +594,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index cb89d8a1eb3..602d8b4eede 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 Ino uint64 @@ -115,36 +101,6 @@ type Stat_t struct { _ uint64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -154,10 +110,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -167,133 +119,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -304,41 +134,11 @@ type RawSockaddrAny struct { Pad [96]uint8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -356,399 +156,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Gpr [32]uint64 Nip uint64 @@ -787,15 +204,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -812,35 +220,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -849,33 +229,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -887,13 +240,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -943,277 +289,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1289,22 +368,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1312,88 +375,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1409,18 +390,6 @@ type Statfs_t struct { Spare [4]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1432,589 +401,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd + SizeofTpacketHdr = 0x20 ) -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2025,13 +415,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2042,168 +425,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x20001269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 @@ -2334,182 +567,6 @@ type CryptoReportAcomp struct { Type [64]uint8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint64 @@ -2525,38 +582,6 @@ type LoopInfo struct { Reserved [4]uint8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2565,21 +590,6 @@ type TIPCSubscr struct { Handle [8]uint8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2590,22 +600,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index d9c93affb02..6db9a7b7377 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 Ino uint64 @@ -115,36 +101,6 @@ type Stat_t struct { _ uint64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -154,10 +110,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -167,133 +119,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -304,41 +134,11 @@ type RawSockaddrAny struct { Pad [96]uint8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -356,399 +156,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Gpr [32]uint64 Nip uint64 @@ -787,15 +204,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -812,35 +220,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -849,33 +229,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -887,13 +240,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -943,277 +289,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1289,22 +368,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1312,88 +375,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1409,18 +390,6 @@ type Statfs_t struct { Spare [4]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1432,589 +401,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - -const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 -) - const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd + SizeofTpacketHdr = 0x20 ) -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2025,13 +415,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2042,168 +425,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 -) - -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 + BLKPG = 0x20001269 ) -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 @@ -2334,182 +567,6 @@ type CryptoReportAcomp struct { Type [64]uint8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint64 @@ -2525,38 +582,6 @@ type LoopInfo struct { Reserved [4]uint8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2565,21 +590,6 @@ type TIPCSubscr struct { Handle [8]uint8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2590,22 +600,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index a198cc5295c..52b5348c2e9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 Ino uint64 @@ -114,36 +100,6 @@ type Stat_t struct { _ [2]int32 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -153,10 +109,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -166,133 +118,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -303,41 +133,11 @@ type RawSockaddrAny struct { Pad [96]uint8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -355,399 +155,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Pc uint64 Ra uint64 @@ -805,15 +222,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -830,35 +238,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -867,33 +247,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -905,13 +258,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -961,277 +307,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1307,22 +386,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1330,88 +393,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1427,18 +408,6 @@ type Statfs_t struct { Spare [4]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1450,589 +419,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 + SizeofTpacketHdr = 0x20 ) -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2043,13 +433,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2060,168 +443,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x1269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 + BLKPG = 0x1269 ) -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 -) - -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 @@ -2352,182 +585,6 @@ type CryptoReportAcomp struct { Type [64]uint8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2543,38 +600,6 @@ type LoopInfo struct { Reserved [4]uint8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2583,21 +608,6 @@ type TIPCSubscr struct { Handle [8]uint8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2608,22 +618,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index f1e26c56538..a111387b3ac 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -88,13 +81,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 Ino uint64 @@ -113,36 +99,6 @@ type Stat_t struct { _ [3]int64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -152,10 +108,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -165,133 +117,11 @@ type Flock_t struct { _ [4]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x6 - FADV_NOREUSE = 0x7 + FADV_DONTNEED = 0x6 + FADV_NOREUSE = 0x7 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -302,41 +132,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -354,399 +154,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Psw PtracePsw Gprs [16]uint64 @@ -800,15 +217,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -825,35 +233,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x2000 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -862,33 +242,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -900,13 +253,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -956,277 +302,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1302,22 +381,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1325,88 +388,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type uint32 Bsize uint32 @@ -1423,18 +404,6 @@ type Statfs_t struct { _ [4]byte } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1446,589 +415,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 + SizeofTpacketHdr = 0x20 ) -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2039,13 +429,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2056,168 +439,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x1269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 + BLKPG = 0x1269 ) -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 -) - -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2348,182 +581,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint16 @@ -2539,38 +596,6 @@ type LoopInfo struct { Reserved [4]int8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2579,21 +604,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2604,22 +614,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index d28248040a7..8153af18189 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -6,19 +6,12 @@ package unix const ( - SizeofPtr = 0x8 - SizeofShort = 0x2 - SizeofInt = 0x4 - SizeofLong = 0x8 - SizeofLongLong = 0x8 - PathMax = 0x1000 + SizeofPtr = 0x8 + SizeofLong = 0x8 ) type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 + _C_long int64 ) type Timespec struct { @@ -89,13 +82,6 @@ type Rusage struct { Nivcsw int64 } -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type _Gid_t uint32 - type Stat_t struct { Dev uint64 _ uint16 @@ -116,36 +102,6 @@ type Stat_t struct { _ uint64 } -type StatxTimestamp struct { - Sec int64 - Nsec uint32 - _ int32 -} - -type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - _ [14]uint64 -} - type Dirent struct { Ino uint64 Off int64 @@ -155,10 +111,6 @@ type Dirent struct { _ [5]byte } -type Fsid struct { - Val [2]int32 -} - type Flock_t struct { Type int16 Whence int16 @@ -169,133 +121,11 @@ type Flock_t struct { _ [2]byte } -type FscryptPolicy struct { - Version uint8 - Contents_encryption_mode uint8 - Filenames_encryption_mode uint8 - Flags uint8 - Master_key_descriptor [8]uint8 -} - -type FscryptKey struct { - Mode uint32 - Raw [64]uint8 - Size uint32 -} - -type KeyctlDHParams struct { - Private int32 - Prime int32 - Base int32 -} - const ( - FADV_NORMAL = 0x0 - FADV_RANDOM = 0x1 - FADV_SEQUENTIAL = 0x2 - FADV_WILLNEED = 0x3 - FADV_DONTNEED = 0x4 - FADV_NOREUSE = 0x5 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 ) -type RawSockaddrInet4 struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type RawSockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type RawSockaddrUnix struct { - Family uint16 - Path [108]int8 -} - -type RawSockaddrLinklayer struct { - Family uint16 - Protocol uint16 - Ifindex int32 - Hatype uint16 - Pkttype uint8 - Halen uint8 - Addr [8]uint8 -} - -type RawSockaddrNetlink struct { - Family uint16 - Pad uint16 - Pid uint32 - Groups uint32 -} - -type RawSockaddrHCI struct { - Family uint16 - Dev uint16 - Channel uint16 -} - -type RawSockaddrL2 struct { - Family uint16 - Psm uint16 - Bdaddr [6]uint8 - Cid uint16 - Bdaddr_type uint8 - _ [1]byte -} - -type RawSockaddrRFCOMM struct { - Family uint16 - Bdaddr [6]uint8 - Channel uint8 - _ [1]byte -} - -type RawSockaddrCAN struct { - Family uint16 - Ifindex int32 - Addr [8]byte -} - -type RawSockaddrALG struct { - Family uint16 - Type [14]uint8 - Feat uint32 - Mask uint32 - Name [64]uint8 -} - -type RawSockaddrVM struct { - Family uint16 - Reserved1 uint16 - Port uint32 - Cid uint32 - Zero [4]uint8 -} - -type RawSockaddrXDP struct { - Family uint16 - Flags uint16 - Ifindex uint32 - Queue_id uint32 - Shared_umem_fd uint32 -} - -type RawSockaddrPPPoX [0x1e]byte - -type RawSockaddrTIPC struct { - Family uint16 - Addrtype uint8 - Scope int8 - Addr [12]byte -} - type RawSockaddr struct { Family uint16 Data [14]int8 @@ -306,41 +136,11 @@ type RawSockaddrAny struct { Pad [96]int8 } -type _Socklen uint32 - -type Linger struct { - Onoff int32 - Linger int32 -} - type Iovec struct { Base *byte Len uint64 } -type IPMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type IPMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type IPv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type PacketMreq struct { - Ifindex int32 - Type uint16 - Alen uint16 - Address [8]uint8 -} - type Msghdr struct { Name *byte Namelen uint32 @@ -358,399 +158,16 @@ type Cmsghdr struct { Type int32 } -type Inet4Pktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type Inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type IPv6MTUInfo struct { - Addr RawSockaddrInet6 - Mtu uint32 -} - -type ICMPv6Filter struct { - Data [8]uint32 -} - -type Ucred struct { - Pid int32 - Uid uint32 - Gid uint32 -} - -type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 -} - -type CanFilter struct { - Id uint32 - Mask uint32 -} - const ( - SizeofSockaddrInet4 = 0x10 - SizeofSockaddrInet6 = 0x1c - SizeofSockaddrAny = 0x70 - SizeofSockaddrUnix = 0x6e - SizeofSockaddrLinklayer = 0x14 - SizeofSockaddrNetlink = 0xc - SizeofSockaddrHCI = 0x6 - SizeofSockaddrL2 = 0xe - SizeofSockaddrRFCOMM = 0xa - SizeofSockaddrCAN = 0x10 - SizeofSockaddrALG = 0x58 - SizeofSockaddrVM = 0x10 - SizeofSockaddrXDP = 0x10 - SizeofSockaddrPPPoX = 0x1e - SizeofSockaddrTIPC = 0x10 - SizeofLinger = 0x8 - SizeofIovec = 0x10 - SizeofIPMreq = 0x8 - SizeofIPMreqn = 0xc - SizeofIPv6Mreq = 0x14 - SizeofPacketMreq = 0x10 - SizeofMsghdr = 0x38 - SizeofCmsghdr = 0x10 - SizeofInet4Pktinfo = 0xc - SizeofInet6Pktinfo = 0x14 - SizeofIPv6MTUInfo = 0x20 - SizeofICMPv6Filter = 0x20 - SizeofUcred = 0xc - SizeofTCPInfo = 0x68 - SizeofCanFilter = 0x8 + SizeofIovec = 0x10 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 ) const ( - NDA_UNSPEC = 0x0 - NDA_DST = 0x1 - NDA_LLADDR = 0x2 - NDA_CACHEINFO = 0x3 - NDA_PROBES = 0x4 - NDA_VLAN = 0x5 - NDA_PORT = 0x6 - NDA_VNI = 0x7 - NDA_IFINDEX = 0x8 - NDA_MASTER = 0x9 - NDA_LINK_NETNSID = 0xa - NDA_SRC_VNI = 0xb - NTF_USE = 0x1 - NTF_SELF = 0x2 - NTF_MASTER = 0x4 - NTF_PROXY = 0x8 - NTF_EXT_LEARNED = 0x10 - NTF_OFFLOADED = 0x20 - NTF_ROUTER = 0x80 - NUD_INCOMPLETE = 0x1 - NUD_REACHABLE = 0x2 - NUD_STALE = 0x4 - NUD_DELAY = 0x8 - NUD_PROBE = 0x10 - NUD_FAILED = 0x20 - NUD_NOARP = 0x40 - NUD_PERMANENT = 0x80 - NUD_NONE = 0x0 - IFA_UNSPEC = 0x0 - IFA_ADDRESS = 0x1 - IFA_LOCAL = 0x2 - IFA_LABEL = 0x3 - IFA_BROADCAST = 0x4 - IFA_ANYCAST = 0x5 - IFA_CACHEINFO = 0x6 - IFA_MULTICAST = 0x7 - IFA_FLAGS = 0x8 - IFA_RT_PRIORITY = 0x9 - IFA_TARGET_NETNSID = 0xa - IFLA_UNSPEC = 0x0 - IFLA_ADDRESS = 0x1 - IFLA_BROADCAST = 0x2 - IFLA_IFNAME = 0x3 - IFLA_MTU = 0x4 - IFLA_LINK = 0x5 - IFLA_QDISC = 0x6 - IFLA_STATS = 0x7 - IFLA_COST = 0x8 - IFLA_PRIORITY = 0x9 - IFLA_MASTER = 0xa - IFLA_WIRELESS = 0xb - IFLA_PROTINFO = 0xc - IFLA_TXQLEN = 0xd - IFLA_MAP = 0xe - IFLA_WEIGHT = 0xf - IFLA_OPERSTATE = 0x10 - IFLA_LINKMODE = 0x11 - IFLA_LINKINFO = 0x12 - IFLA_NET_NS_PID = 0x13 - IFLA_IFALIAS = 0x14 - IFLA_NUM_VF = 0x15 - IFLA_VFINFO_LIST = 0x16 - IFLA_STATS64 = 0x17 - IFLA_VF_PORTS = 0x18 - IFLA_PORT_SELF = 0x19 - IFLA_AF_SPEC = 0x1a - IFLA_GROUP = 0x1b - IFLA_NET_NS_FD = 0x1c - IFLA_EXT_MASK = 0x1d - IFLA_PROMISCUITY = 0x1e - IFLA_NUM_TX_QUEUES = 0x1f - IFLA_NUM_RX_QUEUES = 0x20 - IFLA_CARRIER = 0x21 - IFLA_PHYS_PORT_ID = 0x22 - IFLA_CARRIER_CHANGES = 0x23 - IFLA_PHYS_SWITCH_ID = 0x24 - IFLA_LINK_NETNSID = 0x25 - IFLA_PHYS_PORT_NAME = 0x26 - IFLA_PROTO_DOWN = 0x27 - IFLA_GSO_MAX_SEGS = 0x28 - IFLA_GSO_MAX_SIZE = 0x29 - IFLA_PAD = 0x2a - IFLA_XDP = 0x2b - IFLA_EVENT = 0x2c - IFLA_NEW_NETNSID = 0x2d - IFLA_IF_NETNSID = 0x2e - IFLA_TARGET_NETNSID = 0x2e - IFLA_CARRIER_UP_COUNT = 0x2f - IFLA_CARRIER_DOWN_COUNT = 0x30 - IFLA_NEW_IFINDEX = 0x31 - IFLA_MIN_MTU = 0x32 - IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x33 - IFLA_INFO_KIND = 0x1 - IFLA_INFO_DATA = 0x2 - IFLA_INFO_XSTATS = 0x3 - IFLA_INFO_SLAVE_KIND = 0x4 - IFLA_INFO_SLAVE_DATA = 0x5 - RT_SCOPE_UNIVERSE = 0x0 - RT_SCOPE_SITE = 0xc8 - RT_SCOPE_LINK = 0xfd - RT_SCOPE_HOST = 0xfe - RT_SCOPE_NOWHERE = 0xff - RT_TABLE_UNSPEC = 0x0 - RT_TABLE_COMPAT = 0xfc - RT_TABLE_DEFAULT = 0xfd - RT_TABLE_MAIN = 0xfe - RT_TABLE_LOCAL = 0xff - RT_TABLE_MAX = 0xffffffff - RTA_UNSPEC = 0x0 - RTA_DST = 0x1 - RTA_SRC = 0x2 - RTA_IIF = 0x3 - RTA_OIF = 0x4 - RTA_GATEWAY = 0x5 - RTA_PRIORITY = 0x6 - RTA_PREFSRC = 0x7 - RTA_METRICS = 0x8 - RTA_MULTIPATH = 0x9 - RTA_FLOW = 0xb - RTA_CACHEINFO = 0xc - RTA_TABLE = 0xf - RTA_MARK = 0x10 - RTA_MFC_STATS = 0x11 - RTA_VIA = 0x12 - RTA_NEWDST = 0x13 - RTA_PREF = 0x14 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 - RTA_EXPIRES = 0x17 - RTA_PAD = 0x18 - RTA_UID = 0x19 - RTA_TTL_PROPAGATE = 0x1a - RTA_IP_PROTO = 0x1b - RTA_SPORT = 0x1c - RTA_DPORT = 0x1d - RTN_UNSPEC = 0x0 - RTN_UNICAST = 0x1 - RTN_LOCAL = 0x2 - RTN_BROADCAST = 0x3 - RTN_ANYCAST = 0x4 - RTN_MULTICAST = 0x5 - RTN_BLACKHOLE = 0x6 - RTN_UNREACHABLE = 0x7 - RTN_PROHIBIT = 0x8 - RTN_THROW = 0x9 - RTN_NAT = 0xa - RTN_XRESOLVE = 0xb - RTNLGRP_NONE = 0x0 - RTNLGRP_LINK = 0x1 - RTNLGRP_NOTIFY = 0x2 - RTNLGRP_NEIGH = 0x3 - RTNLGRP_TC = 0x4 - RTNLGRP_IPV4_IFADDR = 0x5 - RTNLGRP_IPV4_MROUTE = 0x6 - RTNLGRP_IPV4_ROUTE = 0x7 - RTNLGRP_IPV4_RULE = 0x8 - RTNLGRP_IPV6_IFADDR = 0x9 - RTNLGRP_IPV6_MROUTE = 0xa - RTNLGRP_IPV6_ROUTE = 0xb - RTNLGRP_IPV6_IFINFO = 0xc - RTNLGRP_IPV6_PREFIX = 0x12 - RTNLGRP_IPV6_RULE = 0x13 - RTNLGRP_ND_USEROPT = 0x14 - SizeofNlMsghdr = 0x10 - SizeofNlMsgerr = 0x14 - SizeofRtGenmsg = 0x1 - SizeofNlAttr = 0x4 - SizeofRtAttr = 0x4 - SizeofIfInfomsg = 0x10 - SizeofIfAddrmsg = 0x8 - SizeofIfaCacheinfo = 0x10 - SizeofRtMsg = 0xc - SizeofRtNexthop = 0x8 - SizeofNdUseroptmsg = 0x10 - SizeofNdMsg = 0xc + SizeofSockFprog = 0x10 ) -type NlMsghdr struct { - Len uint32 - Type uint16 - Flags uint16 - Seq uint32 - Pid uint32 -} - -type NlMsgerr struct { - Error int32 - Msg NlMsghdr -} - -type RtGenmsg struct { - Family uint8 -} - -type NlAttr struct { - Len uint16 - Type uint16 -} - -type RtAttr struct { - Len uint16 - Type uint16 -} - -type IfInfomsg struct { - Family uint8 - _ uint8 - Type uint16 - Index int32 - Flags uint32 - Change uint32 -} - -type IfAddrmsg struct { - Family uint8 - Prefixlen uint8 - Flags uint8 - Scope uint8 - Index uint32 -} - -type IfaCacheinfo struct { - Prefered uint32 - Valid uint32 - Cstamp uint32 - Tstamp uint32 -} - -type RtMsg struct { - Family uint8 - Dst_len uint8 - Src_len uint8 - Tos uint8 - Table uint8 - Protocol uint8 - Scope uint8 - Type uint8 - Flags uint32 -} - -type RtNexthop struct { - Len uint16 - Flags uint8 - Hops uint8 - Ifindex int32 -} - -type NdUseroptmsg struct { - Family uint8 - Pad1 uint8 - Opts_len uint16 - Ifindex int32 - Icmp_type uint8 - Icmp_code uint8 - Pad2 uint16 - Pad3 uint32 -} - -type NdMsg struct { - Family uint8 - Pad1 uint8 - Pad2 uint16 - Ifindex int32 - State uint16 - Flags uint8 - Type uint8 -} - -const ( - SizeofSockFilter = 0x8 - SizeofSockFprog = 0x10 -) - -type SockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} - -type SockFprog struct { - Len uint16 - Filter *SockFilter -} - -type InotifyEvent struct { - Wd int32 - Mask uint32 - Cookie uint32 - Len uint32 -} - -const SizeofInotifyEvent = 0x10 - type PtraceRegs struct { Regs [16]uint64 Tstate uint64 @@ -782,15 +199,6 @@ type Sysinfo_t struct { _ [4]byte } -type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte -} - type Ustat_t struct { Tfree int32 Tinode uint64 @@ -807,35 +215,7 @@ type EpollEvent struct { } const ( - AT_EMPTY_PATH = 0x1000 - AT_FDCWD = -0x64 - AT_NO_AUTOMOUNT = 0x800 - AT_REMOVEDIR = 0x200 - - AT_STATX_SYNC_AS_STAT = 0x0 - AT_STATX_FORCE_SYNC = 0x2000 - AT_STATX_DONT_SYNC = 0x4000 - - AT_SYMLINK_FOLLOW = 0x400 - AT_SYMLINK_NOFOLLOW = 0x100 - - AT_EACCESS = 0x200 -) - -type PollFd struct { - Fd int32 - Events int16 - Revents int16 -} - -const ( - POLLIN = 0x1 - POLLPRI = 0x2 - POLLOUT = 0x4 POLLRDHUP = 0x800 - POLLERR = 0x8 - POLLHUP = 0x10 - POLLNVAL = 0x20 ) type Sigset_t struct { @@ -844,33 +224,6 @@ type Sigset_t struct { const _C__NSIG = 0x41 -type SignalfdSiginfo struct { - Signo uint32 - Errno int32 - Code int32 - Pid uint32 - Uid uint32 - Fd int32 - Tid uint32 - Band uint32 - Overrun uint32 - Trapno uint32 - Status int32 - Int int32 - Ptr uint64 - Utime uint64 - Stime uint64 - Addr uint64 - Addr_lsb uint16 - _ uint16 - Syscall int32 - Call_addr uint64 - Arch uint32 - _ [28]uint8 -} - -const PERF_IOC_FLAG_GROUP = 0x1 - type Termios struct { Iflag uint32 Oflag uint32 @@ -882,13 +235,6 @@ type Termios struct { Ospeed uint32 } -type Winsize struct { - Row uint16 - Col uint16 - Xpixel uint16 - Ypixel uint16 -} - type Taskstats struct { Version uint16 Ac_exitcode uint32 @@ -938,277 +284,10 @@ type Taskstats struct { Thrashing_delay_total uint64 } -const ( - TASKSTATS_CMD_UNSPEC = 0x0 - TASKSTATS_CMD_GET = 0x1 - TASKSTATS_CMD_NEW = 0x2 - TASKSTATS_TYPE_UNSPEC = 0x0 - TASKSTATS_TYPE_PID = 0x1 - TASKSTATS_TYPE_TGID = 0x2 - TASKSTATS_TYPE_STATS = 0x3 - TASKSTATS_TYPE_AGGR_PID = 0x4 - TASKSTATS_TYPE_AGGR_TGID = 0x5 - TASKSTATS_TYPE_NULL = 0x6 - TASKSTATS_CMD_ATTR_UNSPEC = 0x0 - TASKSTATS_CMD_ATTR_PID = 0x1 - TASKSTATS_CMD_ATTR_TGID = 0x2 - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 -) - -type CGroupStats struct { - Sleeping uint64 - Running uint64 - Stopped uint64 - Uninterruptible uint64 - Io_wait uint64 -} - -const ( - CGROUPSTATS_CMD_UNSPEC = 0x3 - CGROUPSTATS_CMD_GET = 0x4 - CGROUPSTATS_CMD_NEW = 0x5 - CGROUPSTATS_TYPE_UNSPEC = 0x0 - CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 - CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 - CGROUPSTATS_CMD_ATTR_FD = 0x1 -) - -type Genlmsghdr struct { - Cmd uint8 - Version uint8 - Reserved uint16 -} - -const ( - CTRL_CMD_UNSPEC = 0x0 - CTRL_CMD_NEWFAMILY = 0x1 - CTRL_CMD_DELFAMILY = 0x2 - CTRL_CMD_GETFAMILY = 0x3 - CTRL_CMD_NEWOPS = 0x4 - CTRL_CMD_DELOPS = 0x5 - CTRL_CMD_GETOPS = 0x6 - CTRL_CMD_NEWMCAST_GRP = 0x7 - CTRL_CMD_DELMCAST_GRP = 0x8 - CTRL_CMD_GETMCAST_GRP = 0x9 - CTRL_ATTR_UNSPEC = 0x0 - CTRL_ATTR_FAMILY_ID = 0x1 - CTRL_ATTR_FAMILY_NAME = 0x2 - CTRL_ATTR_VERSION = 0x3 - CTRL_ATTR_HDRSIZE = 0x4 - CTRL_ATTR_MAXATTR = 0x5 - CTRL_ATTR_OPS = 0x6 - CTRL_ATTR_MCAST_GROUPS = 0x7 - CTRL_ATTR_OP_UNSPEC = 0x0 - CTRL_ATTR_OP_ID = 0x1 - CTRL_ATTR_OP_FLAGS = 0x2 - CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 - CTRL_ATTR_MCAST_GRP_NAME = 0x1 - CTRL_ATTR_MCAST_GRP_ID = 0x2 -) - type cpuMask uint64 const ( - _CPU_SETSIZE = 0x400 - _NCPUBITS = 0x40 -) - -const ( - BDADDR_BREDR = 0x0 - BDADDR_LE_PUBLIC = 0x1 - BDADDR_LE_RANDOM = 0x2 -) - -type PerfEventAttr struct { - Type uint32 - Size uint32 - Config uint64 - Sample uint64 - Sample_type uint64 - Read_format uint64 - Bits uint64 - Wakeup uint32 - Bp_type uint32 - Ext1 uint64 - Ext2 uint64 - Branch_sample_type uint64 - Sample_regs_user uint64 - Sample_stack_user uint32 - Clockid int32 - Sample_regs_intr uint64 - Aux_watermark uint32 - Sample_max_stack uint16 - _ uint16 -} - -type PerfEventMmapPage struct { - Version uint32 - Compat_version uint32 - Lock uint32 - Index uint32 - Offset int64 - Time_enabled uint64 - Time_running uint64 - Capabilities uint64 - Pmc_width uint16 - Time_shift uint16 - Time_mult uint32 - Time_offset uint64 - Time_zero uint64 - Size uint32 - _ [948]uint8 - Data_head uint64 - Data_tail uint64 - Data_offset uint64 - Data_size uint64 - Aux_head uint64 - Aux_tail uint64 - Aux_offset uint64 - Aux_size uint64 -} - -const ( - PerfBitDisabled uint64 = CBitFieldMaskBit0 - PerfBitInherit = CBitFieldMaskBit1 - PerfBitPinned = CBitFieldMaskBit2 - PerfBitExclusive = CBitFieldMaskBit3 - PerfBitExcludeUser = CBitFieldMaskBit4 - PerfBitExcludeKernel = CBitFieldMaskBit5 - PerfBitExcludeHv = CBitFieldMaskBit6 - PerfBitExcludeIdle = CBitFieldMaskBit7 - PerfBitMmap = CBitFieldMaskBit8 - PerfBitComm = CBitFieldMaskBit9 - PerfBitFreq = CBitFieldMaskBit10 - PerfBitInheritStat = CBitFieldMaskBit11 - PerfBitEnableOnExec = CBitFieldMaskBit12 - PerfBitTask = CBitFieldMaskBit13 - PerfBitWatermark = CBitFieldMaskBit14 - PerfBitPreciseIPBit1 = CBitFieldMaskBit15 - PerfBitPreciseIPBit2 = CBitFieldMaskBit16 - PerfBitMmapData = CBitFieldMaskBit17 - PerfBitSampleIDAll = CBitFieldMaskBit18 - PerfBitExcludeHost = CBitFieldMaskBit19 - PerfBitExcludeGuest = CBitFieldMaskBit20 - PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 - PerfBitExcludeCallchainUser = CBitFieldMaskBit22 - PerfBitMmap2 = CBitFieldMaskBit23 - PerfBitCommExec = CBitFieldMaskBit24 - PerfBitUseClockID = CBitFieldMaskBit25 - PerfBitContextSwitch = CBitFieldMaskBit26 -) - -const ( - PERF_TYPE_HARDWARE = 0x0 - PERF_TYPE_SOFTWARE = 0x1 - PERF_TYPE_TRACEPOINT = 0x2 - PERF_TYPE_HW_CACHE = 0x3 - PERF_TYPE_RAW = 0x4 - PERF_TYPE_BREAKPOINT = 0x5 - - PERF_COUNT_HW_CPU_CYCLES = 0x0 - PERF_COUNT_HW_INSTRUCTIONS = 0x1 - PERF_COUNT_HW_CACHE_REFERENCES = 0x2 - PERF_COUNT_HW_CACHE_MISSES = 0x3 - PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 - PERF_COUNT_HW_BRANCH_MISSES = 0x5 - PERF_COUNT_HW_BUS_CYCLES = 0x6 - PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 - PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 - PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 - - PERF_COUNT_HW_CACHE_L1D = 0x0 - PERF_COUNT_HW_CACHE_L1I = 0x1 - PERF_COUNT_HW_CACHE_LL = 0x2 - PERF_COUNT_HW_CACHE_DTLB = 0x3 - PERF_COUNT_HW_CACHE_ITLB = 0x4 - PERF_COUNT_HW_CACHE_BPU = 0x5 - PERF_COUNT_HW_CACHE_NODE = 0x6 - - PERF_COUNT_HW_CACHE_OP_READ = 0x0 - PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 - PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 - - PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 - PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 - - PERF_COUNT_SW_CPU_CLOCK = 0x0 - PERF_COUNT_SW_TASK_CLOCK = 0x1 - PERF_COUNT_SW_PAGE_FAULTS = 0x2 - PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 - PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 - PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 - PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 - PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 - PERF_COUNT_SW_EMULATION_FAULTS = 0x8 - PERF_COUNT_SW_DUMMY = 0x9 - PERF_COUNT_SW_BPF_OUTPUT = 0xa - - PERF_SAMPLE_IP = 0x1 - PERF_SAMPLE_TID = 0x2 - PERF_SAMPLE_TIME = 0x4 - PERF_SAMPLE_ADDR = 0x8 - PERF_SAMPLE_READ = 0x10 - PERF_SAMPLE_CALLCHAIN = 0x20 - PERF_SAMPLE_ID = 0x40 - PERF_SAMPLE_CPU = 0x80 - PERF_SAMPLE_PERIOD = 0x100 - PERF_SAMPLE_STREAM_ID = 0x200 - PERF_SAMPLE_RAW = 0x400 - PERF_SAMPLE_BRANCH_STACK = 0x800 - - PERF_SAMPLE_BRANCH_USER = 0x1 - PERF_SAMPLE_BRANCH_KERNEL = 0x2 - PERF_SAMPLE_BRANCH_HV = 0x4 - PERF_SAMPLE_BRANCH_ANY = 0x8 - PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 - PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 - PERF_SAMPLE_BRANCH_IND_CALL = 0x40 - PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 - PERF_SAMPLE_BRANCH_IN_TX = 0x100 - PERF_SAMPLE_BRANCH_NO_TX = 0x200 - PERF_SAMPLE_BRANCH_COND = 0x400 - PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 - PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 - PERF_SAMPLE_BRANCH_CALL = 0x2000 - PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 - PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 - PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 - - PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 - PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 - PERF_FORMAT_ID = 0x4 - PERF_FORMAT_GROUP = 0x8 - - PERF_RECORD_MMAP = 0x1 - PERF_RECORD_LOST = 0x2 - PERF_RECORD_COMM = 0x3 - PERF_RECORD_EXIT = 0x4 - PERF_RECORD_THROTTLE = 0x5 - PERF_RECORD_UNTHROTTLE = 0x6 - PERF_RECORD_FORK = 0x7 - PERF_RECORD_READ = 0x8 - PERF_RECORD_SAMPLE = 0x9 - PERF_RECORD_MMAP2 = 0xa - PERF_RECORD_AUX = 0xb - PERF_RECORD_ITRACE_START = 0xc - PERF_RECORD_LOST_SAMPLES = 0xd - PERF_RECORD_SWITCH = 0xe - PERF_RECORD_SWITCH_CPU_WIDE = 0xf - PERF_RECORD_NAMESPACES = 0x10 - - PERF_CONTEXT_HV = -0x20 - PERF_CONTEXT_KERNEL = -0x80 - PERF_CONTEXT_USER = -0x200 - - PERF_CONTEXT_GUEST = -0x800 - PERF_CONTEXT_GUEST_KERNEL = -0x880 - PERF_CONTEXT_GUEST_USER = -0xa00 - - PERF_FLAG_FD_NO_GROUP = 0x1 - PERF_FLAG_FD_OUTPUT = 0x2 - PERF_FLAG_PID_CGROUP = 0x4 - PERF_FLAG_FD_CLOEXEC = 0x8 + _NCPUBITS = 0x40 ) const ( @@ -1284,22 +363,6 @@ type SockaddrStorage struct { _ uint64 } -type TCPMD5Sig struct { - Addr SockaddrStorage - Flags uint8 - Prefixlen uint8 - Keylen uint16 - _ uint32 - Key [80]uint8 -} - -type HDDriveCmdHdr struct { - Command uint8 - Number uint8 - Feature uint8 - Count uint8 -} - type HDGeometry struct { Heads uint8 Sectors uint8 @@ -1307,88 +370,6 @@ type HDGeometry struct { Start uint64 } -type HDDriveID struct { - Config uint16 - Cyls uint16 - Reserved2 uint16 - Heads uint16 - Track_bytes uint16 - Sector_bytes uint16 - Sectors uint16 - Vendor0 uint16 - Vendor1 uint16 - Vendor2 uint16 - Serial_no [20]uint8 - Buf_type uint16 - Buf_size uint16 - Ecc_bytes uint16 - Fw_rev [8]uint8 - Model [40]uint8 - Max_multsect uint8 - Vendor3 uint8 - Dword_io uint16 - Vendor4 uint8 - Capability uint8 - Reserved50 uint16 - Vendor5 uint8 - TPIO uint8 - Vendor6 uint8 - TDMA uint8 - Field_valid uint16 - Cur_cyls uint16 - Cur_heads uint16 - Cur_sectors uint16 - Cur_capacity0 uint16 - Cur_capacity1 uint16 - Multsect uint8 - Multsect_valid uint8 - Lba_capacity uint32 - Dma_1word uint16 - Dma_mword uint16 - Eide_pio_modes uint16 - Eide_dma_min uint16 - Eide_dma_time uint16 - Eide_pio uint16 - Eide_pio_iordy uint16 - Words69_70 [2]uint16 - Words71_74 [4]uint16 - Queue_depth uint16 - Words76_79 [4]uint16 - Major_rev_num uint16 - Minor_rev_num uint16 - Command_set_1 uint16 - Command_set_2 uint16 - Cfsse uint16 - Cfs_enable_1 uint16 - Cfs_enable_2 uint16 - Csf_default uint16 - Dma_ultra uint16 - Trseuc uint16 - TrsEuc uint16 - CurAPMvalues uint16 - Mprc uint16 - Hw_config uint16 - Acoustic uint16 - Msrqs uint16 - Sxfert uint16 - Sal uint16 - Spg uint32 - Lba_capacity_2 uint64 - Words104_125 [22]uint16 - Last_lun uint16 - Word127 uint16 - Dlf uint16 - Csfo uint16 - Words130_155 [26]uint16 - Word156 uint16 - Words157_159 [3]uint16 - Cfa_power uint16 - Words161_175 [15]uint16 - Words176_205 [30]uint16 - Words206_254 [49]uint16 - Integrity_word uint16 -} - type Statfs_t struct { Type int64 Bsize int64 @@ -1404,18 +385,6 @@ type Statfs_t struct { Spare [4]int64 } -const ( - ST_MANDLOCK = 0x40 - ST_NOATIME = 0x400 - ST_NODEV = 0x4 - ST_NODIRATIME = 0x800 - ST_NOEXEC = 0x8 - ST_NOSUID = 0x2 - ST_RDONLY = 0x1 - ST_RELATIME = 0x1000 - ST_SYNCHRONOUS = 0x10 -) - type TpacketHdr struct { Status uint64 Len uint32 @@ -1427,589 +396,10 @@ type TpacketHdr struct { _ [4]byte } -type Tpacket2Hdr struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Sec uint32 - Nsec uint32 - Vlan_tci uint16 - Vlan_tpid uint16 - _ [4]uint8 -} - -type Tpacket3Hdr struct { - Next_offset uint32 - Sec uint32 - Nsec uint32 - Snaplen uint32 - Len uint32 - Status uint32 - Mac uint16 - Net uint16 - Hv1 TpacketHdrVariant1 - _ [8]uint8 -} - -type TpacketHdrVariant1 struct { - Rxhash uint32 - Vlan_tci uint32 - Vlan_tpid uint16 - _ uint16 -} - -type TpacketBlockDesc struct { - Version uint32 - To_priv uint32 - Hdr [40]byte -} - -type TpacketBDTS struct { - Sec uint32 - Usec uint32 -} - -type TpacketHdrV1 struct { - Block_status uint32 - Num_pkts uint32 - Offset_to_first_pkt uint32 - Blk_len uint32 - Seq_num uint64 - Ts_first_pkt TpacketBDTS - Ts_last_pkt TpacketBDTS -} - -type TpacketReq struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 -} - -type TpacketReq3 struct { - Block_size uint32 - Block_nr uint32 - Frame_size uint32 - Frame_nr uint32 - Retire_blk_tov uint32 - Sizeof_priv uint32 - Feature_req_word uint32 -} - -type TpacketStats struct { - Packets uint32 - Drops uint32 -} - -type TpacketStatsV3 struct { - Packets uint32 - Drops uint32 - Freeze_q_cnt uint32 -} - -type TpacketAuxdata struct { - Status uint32 - Len uint32 - Snaplen uint32 - Mac uint16 - Net uint16 - Vlan_tci uint16 - Vlan_tpid uint16 -} - -const ( - TPACKET_V1 = 0x0 - TPACKET_V2 = 0x1 - TPACKET_V3 = 0x2 -) - -const ( - SizeofTpacketHdr = 0x20 - SizeofTpacket2Hdr = 0x20 - SizeofTpacket3Hdr = 0x30 - - SizeofTpacketStats = 0x8 - SizeofTpacketStatsV3 = 0xc -) - -const ( - NF_INET_PRE_ROUTING = 0x0 - NF_INET_LOCAL_IN = 0x1 - NF_INET_FORWARD = 0x2 - NF_INET_LOCAL_OUT = 0x3 - NF_INET_POST_ROUTING = 0x4 - NF_INET_NUMHOOKS = 0x5 -) - const ( - NF_NETDEV_INGRESS = 0x0 - NF_NETDEV_NUMHOOKS = 0x1 + SizeofTpacketHdr = 0x20 ) -const ( - NFPROTO_UNSPEC = 0x0 - NFPROTO_INET = 0x1 - NFPROTO_IPV4 = 0x2 - NFPROTO_ARP = 0x3 - NFPROTO_NETDEV = 0x5 - NFPROTO_BRIDGE = 0x7 - NFPROTO_IPV6 = 0xa - NFPROTO_DECNET = 0xc - NFPROTO_NUMPROTO = 0xd -) - -type Nfgenmsg struct { - Nfgen_family uint8 - Version uint8 - Res_id uint16 -} - -const ( - NFNL_BATCH_UNSPEC = 0x0 - NFNL_BATCH_GENID = 0x1 -) - -const ( - NFT_REG_VERDICT = 0x0 - NFT_REG_1 = 0x1 - NFT_REG_2 = 0x2 - NFT_REG_3 = 0x3 - NFT_REG_4 = 0x4 - NFT_REG32_00 = 0x8 - NFT_REG32_01 = 0x9 - NFT_REG32_02 = 0xa - NFT_REG32_03 = 0xb - NFT_REG32_04 = 0xc - NFT_REG32_05 = 0xd - NFT_REG32_06 = 0xe - NFT_REG32_07 = 0xf - NFT_REG32_08 = 0x10 - NFT_REG32_09 = 0x11 - NFT_REG32_10 = 0x12 - NFT_REG32_11 = 0x13 - NFT_REG32_12 = 0x14 - NFT_REG32_13 = 0x15 - NFT_REG32_14 = 0x16 - NFT_REG32_15 = 0x17 - NFT_CONTINUE = -0x1 - NFT_BREAK = -0x2 - NFT_JUMP = -0x3 - NFT_GOTO = -0x4 - NFT_RETURN = -0x5 - NFT_MSG_NEWTABLE = 0x0 - NFT_MSG_GETTABLE = 0x1 - NFT_MSG_DELTABLE = 0x2 - NFT_MSG_NEWCHAIN = 0x3 - NFT_MSG_GETCHAIN = 0x4 - NFT_MSG_DELCHAIN = 0x5 - NFT_MSG_NEWRULE = 0x6 - NFT_MSG_GETRULE = 0x7 - NFT_MSG_DELRULE = 0x8 - NFT_MSG_NEWSET = 0x9 - NFT_MSG_GETSET = 0xa - NFT_MSG_DELSET = 0xb - NFT_MSG_NEWSETELEM = 0xc - NFT_MSG_GETSETELEM = 0xd - NFT_MSG_DELSETELEM = 0xe - NFT_MSG_NEWGEN = 0xf - NFT_MSG_GETGEN = 0x10 - NFT_MSG_TRACE = 0x11 - NFT_MSG_NEWOBJ = 0x12 - NFT_MSG_GETOBJ = 0x13 - NFT_MSG_DELOBJ = 0x14 - NFT_MSG_GETOBJ_RESET = 0x15 - NFT_MSG_MAX = 0x19 - NFTA_LIST_UNPEC = 0x0 - NFTA_LIST_ELEM = 0x1 - NFTA_HOOK_UNSPEC = 0x0 - NFTA_HOOK_HOOKNUM = 0x1 - NFTA_HOOK_PRIORITY = 0x2 - NFTA_HOOK_DEV = 0x3 - NFT_TABLE_F_DORMANT = 0x1 - NFTA_TABLE_UNSPEC = 0x0 - NFTA_TABLE_NAME = 0x1 - NFTA_TABLE_FLAGS = 0x2 - NFTA_TABLE_USE = 0x3 - NFTA_CHAIN_UNSPEC = 0x0 - NFTA_CHAIN_TABLE = 0x1 - NFTA_CHAIN_HANDLE = 0x2 - NFTA_CHAIN_NAME = 0x3 - NFTA_CHAIN_HOOK = 0x4 - NFTA_CHAIN_POLICY = 0x5 - NFTA_CHAIN_USE = 0x6 - NFTA_CHAIN_TYPE = 0x7 - NFTA_CHAIN_COUNTERS = 0x8 - NFTA_CHAIN_PAD = 0x9 - NFTA_RULE_UNSPEC = 0x0 - NFTA_RULE_TABLE = 0x1 - NFTA_RULE_CHAIN = 0x2 - NFTA_RULE_HANDLE = 0x3 - NFTA_RULE_EXPRESSIONS = 0x4 - NFTA_RULE_COMPAT = 0x5 - NFTA_RULE_POSITION = 0x6 - NFTA_RULE_USERDATA = 0x7 - NFTA_RULE_PAD = 0x8 - NFTA_RULE_ID = 0x9 - NFT_RULE_COMPAT_F_INV = 0x2 - NFT_RULE_COMPAT_F_MASK = 0x2 - NFTA_RULE_COMPAT_UNSPEC = 0x0 - NFTA_RULE_COMPAT_PROTO = 0x1 - NFTA_RULE_COMPAT_FLAGS = 0x2 - NFT_SET_ANONYMOUS = 0x1 - NFT_SET_CONSTANT = 0x2 - NFT_SET_INTERVAL = 0x4 - NFT_SET_MAP = 0x8 - NFT_SET_TIMEOUT = 0x10 - NFT_SET_EVAL = 0x20 - NFT_SET_OBJECT = 0x40 - NFT_SET_POL_PERFORMANCE = 0x0 - NFT_SET_POL_MEMORY = 0x1 - NFTA_SET_DESC_UNSPEC = 0x0 - NFTA_SET_DESC_SIZE = 0x1 - NFTA_SET_UNSPEC = 0x0 - NFTA_SET_TABLE = 0x1 - NFTA_SET_NAME = 0x2 - NFTA_SET_FLAGS = 0x3 - NFTA_SET_KEY_TYPE = 0x4 - NFTA_SET_KEY_LEN = 0x5 - NFTA_SET_DATA_TYPE = 0x6 - NFTA_SET_DATA_LEN = 0x7 - NFTA_SET_POLICY = 0x8 - NFTA_SET_DESC = 0x9 - NFTA_SET_ID = 0xa - NFTA_SET_TIMEOUT = 0xb - NFTA_SET_GC_INTERVAL = 0xc - NFTA_SET_USERDATA = 0xd - NFTA_SET_PAD = 0xe - NFTA_SET_OBJ_TYPE = 0xf - NFT_SET_ELEM_INTERVAL_END = 0x1 - NFTA_SET_ELEM_UNSPEC = 0x0 - NFTA_SET_ELEM_KEY = 0x1 - NFTA_SET_ELEM_DATA = 0x2 - NFTA_SET_ELEM_FLAGS = 0x3 - NFTA_SET_ELEM_TIMEOUT = 0x4 - NFTA_SET_ELEM_EXPIRATION = 0x5 - NFTA_SET_ELEM_USERDATA = 0x6 - NFTA_SET_ELEM_EXPR = 0x7 - NFTA_SET_ELEM_PAD = 0x8 - NFTA_SET_ELEM_OBJREF = 0x9 - NFTA_SET_ELEM_LIST_UNSPEC = 0x0 - NFTA_SET_ELEM_LIST_TABLE = 0x1 - NFTA_SET_ELEM_LIST_SET = 0x2 - NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 - NFTA_SET_ELEM_LIST_SET_ID = 0x4 - NFT_DATA_VALUE = 0x0 - NFT_DATA_VERDICT = 0xffffff00 - NFTA_DATA_UNSPEC = 0x0 - NFTA_DATA_VALUE = 0x1 - NFTA_DATA_VERDICT = 0x2 - NFTA_VERDICT_UNSPEC = 0x0 - NFTA_VERDICT_CODE = 0x1 - NFTA_VERDICT_CHAIN = 0x2 - NFTA_EXPR_UNSPEC = 0x0 - NFTA_EXPR_NAME = 0x1 - NFTA_EXPR_DATA = 0x2 - NFTA_IMMEDIATE_UNSPEC = 0x0 - NFTA_IMMEDIATE_DREG = 0x1 - NFTA_IMMEDIATE_DATA = 0x2 - NFTA_BITWISE_UNSPEC = 0x0 - NFTA_BITWISE_SREG = 0x1 - NFTA_BITWISE_DREG = 0x2 - NFTA_BITWISE_LEN = 0x3 - NFTA_BITWISE_MASK = 0x4 - NFTA_BITWISE_XOR = 0x5 - NFT_BYTEORDER_NTOH = 0x0 - NFT_BYTEORDER_HTON = 0x1 - NFTA_BYTEORDER_UNSPEC = 0x0 - NFTA_BYTEORDER_SREG = 0x1 - NFTA_BYTEORDER_DREG = 0x2 - NFTA_BYTEORDER_OP = 0x3 - NFTA_BYTEORDER_LEN = 0x4 - NFTA_BYTEORDER_SIZE = 0x5 - NFT_CMP_EQ = 0x0 - NFT_CMP_NEQ = 0x1 - NFT_CMP_LT = 0x2 - NFT_CMP_LTE = 0x3 - NFT_CMP_GT = 0x4 - NFT_CMP_GTE = 0x5 - NFTA_CMP_UNSPEC = 0x0 - NFTA_CMP_SREG = 0x1 - NFTA_CMP_OP = 0x2 - NFTA_CMP_DATA = 0x3 - NFT_RANGE_EQ = 0x0 - NFT_RANGE_NEQ = 0x1 - NFTA_RANGE_UNSPEC = 0x0 - NFTA_RANGE_SREG = 0x1 - NFTA_RANGE_OP = 0x2 - NFTA_RANGE_FROM_DATA = 0x3 - NFTA_RANGE_TO_DATA = 0x4 - NFT_LOOKUP_F_INV = 0x1 - NFTA_LOOKUP_UNSPEC = 0x0 - NFTA_LOOKUP_SET = 0x1 - NFTA_LOOKUP_SREG = 0x2 - NFTA_LOOKUP_DREG = 0x3 - NFTA_LOOKUP_SET_ID = 0x4 - NFTA_LOOKUP_FLAGS = 0x5 - NFT_DYNSET_OP_ADD = 0x0 - NFT_DYNSET_OP_UPDATE = 0x1 - NFT_DYNSET_F_INV = 0x1 - NFTA_DYNSET_UNSPEC = 0x0 - NFTA_DYNSET_SET_NAME = 0x1 - NFTA_DYNSET_SET_ID = 0x2 - NFTA_DYNSET_OP = 0x3 - NFTA_DYNSET_SREG_KEY = 0x4 - NFTA_DYNSET_SREG_DATA = 0x5 - NFTA_DYNSET_TIMEOUT = 0x6 - NFTA_DYNSET_EXPR = 0x7 - NFTA_DYNSET_PAD = 0x8 - NFTA_DYNSET_FLAGS = 0x9 - NFT_PAYLOAD_LL_HEADER = 0x0 - NFT_PAYLOAD_NETWORK_HEADER = 0x1 - NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 - NFT_PAYLOAD_CSUM_NONE = 0x0 - NFT_PAYLOAD_CSUM_INET = 0x1 - NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 - NFTA_PAYLOAD_UNSPEC = 0x0 - NFTA_PAYLOAD_DREG = 0x1 - NFTA_PAYLOAD_BASE = 0x2 - NFTA_PAYLOAD_OFFSET = 0x3 - NFTA_PAYLOAD_LEN = 0x4 - NFTA_PAYLOAD_SREG = 0x5 - NFTA_PAYLOAD_CSUM_TYPE = 0x6 - NFTA_PAYLOAD_CSUM_OFFSET = 0x7 - NFTA_PAYLOAD_CSUM_FLAGS = 0x8 - NFT_EXTHDR_F_PRESENT = 0x1 - NFT_EXTHDR_OP_IPV6 = 0x0 - NFT_EXTHDR_OP_TCPOPT = 0x1 - NFTA_EXTHDR_UNSPEC = 0x0 - NFTA_EXTHDR_DREG = 0x1 - NFTA_EXTHDR_TYPE = 0x2 - NFTA_EXTHDR_OFFSET = 0x3 - NFTA_EXTHDR_LEN = 0x4 - NFTA_EXTHDR_FLAGS = 0x5 - NFTA_EXTHDR_OP = 0x6 - NFTA_EXTHDR_SREG = 0x7 - NFT_META_LEN = 0x0 - NFT_META_PROTOCOL = 0x1 - NFT_META_PRIORITY = 0x2 - NFT_META_MARK = 0x3 - NFT_META_IIF = 0x4 - NFT_META_OIF = 0x5 - NFT_META_IIFNAME = 0x6 - NFT_META_OIFNAME = 0x7 - NFT_META_IIFTYPE = 0x8 - NFT_META_OIFTYPE = 0x9 - NFT_META_SKUID = 0xa - NFT_META_SKGID = 0xb - NFT_META_NFTRACE = 0xc - NFT_META_RTCLASSID = 0xd - NFT_META_SECMARK = 0xe - NFT_META_NFPROTO = 0xf - NFT_META_L4PROTO = 0x10 - NFT_META_BRI_IIFNAME = 0x11 - NFT_META_BRI_OIFNAME = 0x12 - NFT_META_PKTTYPE = 0x13 - NFT_META_CPU = 0x14 - NFT_META_IIFGROUP = 0x15 - NFT_META_OIFGROUP = 0x16 - NFT_META_CGROUP = 0x17 - NFT_META_PRANDOM = 0x18 - NFT_RT_CLASSID = 0x0 - NFT_RT_NEXTHOP4 = 0x1 - NFT_RT_NEXTHOP6 = 0x2 - NFT_RT_TCPMSS = 0x3 - NFT_HASH_JENKINS = 0x0 - NFT_HASH_SYM = 0x1 - NFTA_HASH_UNSPEC = 0x0 - NFTA_HASH_SREG = 0x1 - NFTA_HASH_DREG = 0x2 - NFTA_HASH_LEN = 0x3 - NFTA_HASH_MODULUS = 0x4 - NFTA_HASH_SEED = 0x5 - NFTA_HASH_OFFSET = 0x6 - NFTA_HASH_TYPE = 0x7 - NFTA_META_UNSPEC = 0x0 - NFTA_META_DREG = 0x1 - NFTA_META_KEY = 0x2 - NFTA_META_SREG = 0x3 - NFTA_RT_UNSPEC = 0x0 - NFTA_RT_DREG = 0x1 - NFTA_RT_KEY = 0x2 - NFT_CT_STATE = 0x0 - NFT_CT_DIRECTION = 0x1 - NFT_CT_STATUS = 0x2 - NFT_CT_MARK = 0x3 - NFT_CT_SECMARK = 0x4 - NFT_CT_EXPIRATION = 0x5 - NFT_CT_HELPER = 0x6 - NFT_CT_L3PROTOCOL = 0x7 - NFT_CT_SRC = 0x8 - NFT_CT_DST = 0x9 - NFT_CT_PROTOCOL = 0xa - NFT_CT_PROTO_SRC = 0xb - NFT_CT_PROTO_DST = 0xc - NFT_CT_LABELS = 0xd - NFT_CT_PKTS = 0xe - NFT_CT_BYTES = 0xf - NFT_CT_AVGPKT = 0x10 - NFT_CT_ZONE = 0x11 - NFT_CT_EVENTMASK = 0x12 - NFTA_CT_UNSPEC = 0x0 - NFTA_CT_DREG = 0x1 - NFTA_CT_KEY = 0x2 - NFTA_CT_DIRECTION = 0x3 - NFTA_CT_SREG = 0x4 - NFT_LIMIT_PKTS = 0x0 - NFT_LIMIT_PKT_BYTES = 0x1 - NFT_LIMIT_F_INV = 0x1 - NFTA_LIMIT_UNSPEC = 0x0 - NFTA_LIMIT_RATE = 0x1 - NFTA_LIMIT_UNIT = 0x2 - NFTA_LIMIT_BURST = 0x3 - NFTA_LIMIT_TYPE = 0x4 - NFTA_LIMIT_FLAGS = 0x5 - NFTA_LIMIT_PAD = 0x6 - NFTA_COUNTER_UNSPEC = 0x0 - NFTA_COUNTER_BYTES = 0x1 - NFTA_COUNTER_PACKETS = 0x2 - NFTA_COUNTER_PAD = 0x3 - NFTA_LOG_UNSPEC = 0x0 - NFTA_LOG_GROUP = 0x1 - NFTA_LOG_PREFIX = 0x2 - NFTA_LOG_SNAPLEN = 0x3 - NFTA_LOG_QTHRESHOLD = 0x4 - NFTA_LOG_LEVEL = 0x5 - NFTA_LOG_FLAGS = 0x6 - NFTA_QUEUE_UNSPEC = 0x0 - NFTA_QUEUE_NUM = 0x1 - NFTA_QUEUE_TOTAL = 0x2 - NFTA_QUEUE_FLAGS = 0x3 - NFTA_QUEUE_SREG_QNUM = 0x4 - NFT_QUOTA_F_INV = 0x1 - NFT_QUOTA_F_DEPLETED = 0x2 - NFTA_QUOTA_UNSPEC = 0x0 - NFTA_QUOTA_BYTES = 0x1 - NFTA_QUOTA_FLAGS = 0x2 - NFTA_QUOTA_PAD = 0x3 - NFTA_QUOTA_CONSUMED = 0x4 - NFT_REJECT_ICMP_UNREACH = 0x0 - NFT_REJECT_TCP_RST = 0x1 - NFT_REJECT_ICMPX_UNREACH = 0x2 - NFT_REJECT_ICMPX_NO_ROUTE = 0x0 - NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 - NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 - NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 - NFTA_REJECT_UNSPEC = 0x0 - NFTA_REJECT_TYPE = 0x1 - NFTA_REJECT_ICMP_CODE = 0x2 - NFT_NAT_SNAT = 0x0 - NFT_NAT_DNAT = 0x1 - NFTA_NAT_UNSPEC = 0x0 - NFTA_NAT_TYPE = 0x1 - NFTA_NAT_FAMILY = 0x2 - NFTA_NAT_REG_ADDR_MIN = 0x3 - NFTA_NAT_REG_ADDR_MAX = 0x4 - NFTA_NAT_REG_PROTO_MIN = 0x5 - NFTA_NAT_REG_PROTO_MAX = 0x6 - NFTA_NAT_FLAGS = 0x7 - NFTA_MASQ_UNSPEC = 0x0 - NFTA_MASQ_FLAGS = 0x1 - NFTA_MASQ_REG_PROTO_MIN = 0x2 - NFTA_MASQ_REG_PROTO_MAX = 0x3 - NFTA_REDIR_UNSPEC = 0x0 - NFTA_REDIR_REG_PROTO_MIN = 0x1 - NFTA_REDIR_REG_PROTO_MAX = 0x2 - NFTA_REDIR_FLAGS = 0x3 - NFTA_DUP_UNSPEC = 0x0 - NFTA_DUP_SREG_ADDR = 0x1 - NFTA_DUP_SREG_DEV = 0x2 - NFTA_FWD_UNSPEC = 0x0 - NFTA_FWD_SREG_DEV = 0x1 - NFTA_OBJREF_UNSPEC = 0x0 - NFTA_OBJREF_IMM_TYPE = 0x1 - NFTA_OBJREF_IMM_NAME = 0x2 - NFTA_OBJREF_SET_SREG = 0x3 - NFTA_OBJREF_SET_NAME = 0x4 - NFTA_OBJREF_SET_ID = 0x5 - NFTA_GEN_UNSPEC = 0x0 - NFTA_GEN_ID = 0x1 - NFTA_GEN_PROC_PID = 0x2 - NFTA_GEN_PROC_NAME = 0x3 - NFTA_FIB_UNSPEC = 0x0 - NFTA_FIB_DREG = 0x1 - NFTA_FIB_RESULT = 0x2 - NFTA_FIB_FLAGS = 0x3 - NFT_FIB_RESULT_UNSPEC = 0x0 - NFT_FIB_RESULT_OIF = 0x1 - NFT_FIB_RESULT_OIFNAME = 0x2 - NFT_FIB_RESULT_ADDRTYPE = 0x3 - NFTA_FIB_F_SADDR = 0x1 - NFTA_FIB_F_DADDR = 0x2 - NFTA_FIB_F_MARK = 0x4 - NFTA_FIB_F_IIF = 0x8 - NFTA_FIB_F_OIF = 0x10 - NFTA_FIB_F_PRESENT = 0x20 - NFTA_CT_HELPER_UNSPEC = 0x0 - NFTA_CT_HELPER_NAME = 0x1 - NFTA_CT_HELPER_L3PROTO = 0x2 - NFTA_CT_HELPER_L4PROTO = 0x3 - NFTA_OBJ_UNSPEC = 0x0 - NFTA_OBJ_TABLE = 0x1 - NFTA_OBJ_NAME = 0x2 - NFTA_OBJ_TYPE = 0x3 - NFTA_OBJ_DATA = 0x4 - NFTA_OBJ_USE = 0x5 - NFTA_TRACE_UNSPEC = 0x0 - NFTA_TRACE_TABLE = 0x1 - NFTA_TRACE_CHAIN = 0x2 - NFTA_TRACE_RULE_HANDLE = 0x3 - NFTA_TRACE_TYPE = 0x4 - NFTA_TRACE_VERDICT = 0x5 - NFTA_TRACE_ID = 0x6 - NFTA_TRACE_LL_HEADER = 0x7 - NFTA_TRACE_NETWORK_HEADER = 0x8 - NFTA_TRACE_TRANSPORT_HEADER = 0x9 - NFTA_TRACE_IIF = 0xa - NFTA_TRACE_IIFTYPE = 0xb - NFTA_TRACE_OIF = 0xc - NFTA_TRACE_OIFTYPE = 0xd - NFTA_TRACE_MARK = 0xe - NFTA_TRACE_NFPROTO = 0xf - NFTA_TRACE_POLICY = 0x10 - NFTA_TRACE_PAD = 0x11 - NFT_TRACETYPE_UNSPEC = 0x0 - NFT_TRACETYPE_POLICY = 0x1 - NFT_TRACETYPE_RETURN = 0x2 - NFT_TRACETYPE_RULE = 0x3 - NFTA_NG_UNSPEC = 0x0 - NFTA_NG_DREG = 0x1 - NFTA_NG_MODULUS = 0x2 - NFTA_NG_TYPE = 0x3 - NFTA_NG_OFFSET = 0x4 - NFT_NG_INCREMENTAL = 0x0 - NFT_NG_RANDOM = 0x1 -) - -type RTCTime struct { - Sec int32 - Min int32 - Hour int32 - Mday int32 - Mon int32 - Year int32 - Wday int32 - Yday int32 - Isdst int32 -} - -type RTCWkAlrm struct { - Enabled uint8 - Pending uint8 - Time RTCTime -} - type RTCPLLInfo struct { Ctrl int32 Value int32 @@ -2020,13 +410,6 @@ type RTCPLLInfo struct { Clock int64 } -type BlkpgIoctlArg struct { - Op int32 - Flags int32 - Datalen int32 - Data *byte -} - type BlkpgPartition struct { Start int64 Length int64 @@ -2037,168 +420,18 @@ type BlkpgPartition struct { } const ( - BLKPG = 0x20001269 - BLKPG_ADD_PARTITION = 0x1 - BLKPG_DEL_PARTITION = 0x2 - BLKPG_RESIZE_PARTITION = 0x3 + BLKPG = 0x20001269 ) -const ( - NETNSA_NONE = 0x0 - NETNSA_NSID = 0x1 - NETNSA_PID = 0x2 - NETNSA_FD = 0x3 -) - -type XDPRingOffset struct { - Producer uint64 - Consumer uint64 - Desc uint64 -} - -type XDPMmapOffsets struct { - Rx XDPRingOffset - Tx XDPRingOffset - Fr XDPRingOffset - Cr XDPRingOffset -} - type XDPUmemReg struct { Addr uint64 Len uint64 Size uint32 Headroom uint32 + Flags uint32 + _ [4]byte } -type XDPStatistics struct { - Rx_dropped uint64 - Rx_invalid_descs uint64 - Tx_invalid_descs uint64 -} - -type XDPDesc struct { - Addr uint64 - Len uint32 - Options uint32 -} - -const ( - NCSI_CMD_UNSPEC = 0x0 - NCSI_CMD_PKG_INFO = 0x1 - NCSI_CMD_SET_INTERFACE = 0x2 - NCSI_CMD_CLEAR_INTERFACE = 0x3 - NCSI_ATTR_UNSPEC = 0x0 - NCSI_ATTR_IFINDEX = 0x1 - NCSI_ATTR_PACKAGE_LIST = 0x2 - NCSI_ATTR_PACKAGE_ID = 0x3 - NCSI_ATTR_CHANNEL_ID = 0x4 - NCSI_PKG_ATTR_UNSPEC = 0x0 - NCSI_PKG_ATTR = 0x1 - NCSI_PKG_ATTR_ID = 0x2 - NCSI_PKG_ATTR_FORCED = 0x3 - NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 - NCSI_CHANNEL_ATTR_UNSPEC = 0x0 - NCSI_CHANNEL_ATTR = 0x1 - NCSI_CHANNEL_ATTR_ID = 0x2 - NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 - NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 - NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 - NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 - NCSI_CHANNEL_ATTR_ACTIVE = 0x7 - NCSI_CHANNEL_ATTR_FORCED = 0x8 - NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 - NCSI_CHANNEL_ATTR_VLAN_ID = 0xa -) - -type ScmTimestamping struct { - Ts [3]Timespec -} - -const ( - SOF_TIMESTAMPING_TX_HARDWARE = 0x1 - SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 - SOF_TIMESTAMPING_RX_HARDWARE = 0x4 - SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 - SOF_TIMESTAMPING_SOFTWARE = 0x10 - SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 - SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 - SOF_TIMESTAMPING_OPT_ID = 0x80 - SOF_TIMESTAMPING_TX_SCHED = 0x100 - SOF_TIMESTAMPING_TX_ACK = 0x200 - SOF_TIMESTAMPING_OPT_CMSG = 0x400 - SOF_TIMESTAMPING_OPT_TSONLY = 0x800 - SOF_TIMESTAMPING_OPT_STATS = 0x1000 - SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 - SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 - - SOF_TIMESTAMPING_LAST = 0x4000 - SOF_TIMESTAMPING_MASK = 0x7fff - - SCM_TSTAMP_SND = 0x0 - SCM_TSTAMP_SCHED = 0x1 - SCM_TSTAMP_ACK = 0x2 -) - -type SockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type FanotifyEventMetadata struct { - Event_len uint32 - Vers uint8 - Reserved uint8 - Metadata_len uint16 - Mask uint64 - Fd int32 - Pid int32 -} - -type FanotifyResponse struct { - Fd int32 - Response uint32 -} - -const ( - CRYPTO_MSG_BASE = 0x10 - CRYPTO_MSG_NEWALG = 0x10 - CRYPTO_MSG_DELALG = 0x11 - CRYPTO_MSG_UPDATEALG = 0x12 - CRYPTO_MSG_GETALG = 0x13 - CRYPTO_MSG_DELRNG = 0x14 - CRYPTO_MSG_GETSTAT = 0x15 -) - -const ( - CRYPTOCFGA_UNSPEC = 0x0 - CRYPTOCFGA_PRIORITY_VAL = 0x1 - CRYPTOCFGA_REPORT_LARVAL = 0x2 - CRYPTOCFGA_REPORT_HASH = 0x3 - CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 - CRYPTOCFGA_REPORT_AEAD = 0x5 - CRYPTOCFGA_REPORT_COMPRESS = 0x6 - CRYPTOCFGA_REPORT_RNG = 0x7 - CRYPTOCFGA_REPORT_CIPHER = 0x8 - CRYPTOCFGA_REPORT_AKCIPHER = 0x9 - CRYPTOCFGA_REPORT_KPP = 0xa - CRYPTOCFGA_REPORT_ACOMP = 0xb - CRYPTOCFGA_STAT_LARVAL = 0xc - CRYPTOCFGA_STAT_HASH = 0xd - CRYPTOCFGA_STAT_BLKCIPHER = 0xe - CRYPTOCFGA_STAT_AEAD = 0xf - CRYPTOCFGA_STAT_COMPRESS = 0x10 - CRYPTOCFGA_STAT_RNG = 0x11 - CRYPTOCFGA_STAT_CIPHER = 0x12 - CRYPTOCFGA_STAT_AKCIPHER = 0x13 - CRYPTOCFGA_STAT_KPP = 0x14 - CRYPTOCFGA_STAT_ACOMP = 0x15 -) - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 @@ -2329,182 +562,6 @@ type CryptoReportAcomp struct { Type [64]int8 } -const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 -) - -type CapUserHeader struct { - Version uint32 - Pid int32 -} - -type CapUserData struct { - Effective uint32 - Permitted uint32 - Inheritable uint32 -} - -const ( - LINUX_CAPABILITY_VERSION_1 = 0x19980330 - LINUX_CAPABILITY_VERSION_2 = 0x20071026 - LINUX_CAPABILITY_VERSION_3 = 0x20080522 -) - -const ( - LO_FLAGS_READ_ONLY = 0x1 - LO_FLAGS_AUTOCLEAR = 0x4 - LO_FLAGS_PARTSCAN = 0x8 - LO_FLAGS_DIRECT_IO = 0x10 -) - type LoopInfo struct { Number int32 Device uint32 @@ -2520,38 +577,6 @@ type LoopInfo struct { Reserved [4]int8 _ [4]byte } -type LoopInfo64 struct { - Device uint64 - Inode uint64 - Rdevice uint64 - Offset uint64 - Sizelimit uint64 - Number uint32 - Encrypt_type uint32 - Encrypt_key_size uint32 - Flags uint32 - File_name [64]uint8 - Crypt_name [64]uint8 - Encrypt_key [32]uint8 - Init [2]uint64 -} - -type TIPCSocketAddr struct { - Ref uint32 - Node uint32 -} - -type TIPCServiceRange struct { - Type uint32 - Lower uint32 - Upper uint32 -} - -type TIPCServiceName struct { - Type uint32 - Instance uint32 - Domain uint32 -} type TIPCSubscr struct { Seq TIPCServiceRange @@ -2560,21 +585,6 @@ type TIPCSubscr struct { Handle [8]int8 } -type TIPCEvent struct { - Event uint32 - Lower uint32 - Upper uint32 - Port TIPCSocketAddr - S TIPCSubscr -} - -type TIPCGroupReq struct { - Type uint32 - Instance uint32 - Scope uint32 - Flags uint32 -} - type TIPCSIOCLNReq struct { Peer uint32 Id uint32 @@ -2585,22 +595,3 @@ type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } - -const ( - TIPC_CLUSTER_SCOPE = 0x2 - TIPC_NODE_SCOPE = 0x3 -) - -const ( - SYSLOG_ACTION_CLOSE = 0 - SYSLOG_ACTION_OPEN = 1 - SYSLOG_ACTION_READ = 2 - SYSLOG_ACTION_READ_ALL = 3 - SYSLOG_ACTION_READ_CLEAR = 4 - SYSLOG_ACTION_CLEAR = 5 - SYSLOG_ACTION_CONSOLE_OFF = 6 - SYSLOG_ACTION_CONSOLE_ON = 7 - SYSLOG_ACTION_CONSOLE_LEVEL = 8 - SYSLOG_ACTION_SIZE_UNREAD = 9 - SYSLOG_ACTION_SIZE_BUFFER = 10 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index 86736ab6e7f..a89100c08ae 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -78,6 +78,33 @@ type Stat_t struct { type Statfs_t [0]byte +type Statvfs_t struct { + Flag uint32 + Bsize uint32 + Frsize uint32 + Iosize uint32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Bresvd uint64 + Files uint64 + Ffree uint64 + Favail uint64 + Fresvd uint64 + Syncreads uint64 + Syncwrites uint64 + Asyncreads uint64 + Asyncwrites uint64 + Fsidx Fsid + Fsid uint32 + Namemax uint32 + Owner uint32 + Spare [4]uint32 + Fstypename [32]byte + Mntonname [1024]byte + Mntfromname [1024]byte +} + type Flock_t struct { Start int64 Len int64 @@ -103,6 +130,11 @@ const ( PathMax = 0x400 ) +const ( + ST_WAIT = 0x1 + ST_NOWAIT = 0x2 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 3427811f989..289184e0b3a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -82,6 +82,34 @@ type Stat_t struct { type Statfs_t [0]byte +type Statvfs_t struct { + Flag uint64 + Bsize uint64 + Frsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Bresvd uint64 + Files uint64 + Ffree uint64 + Favail uint64 + Fresvd uint64 + Syncreads uint64 + Syncwrites uint64 + Asyncreads uint64 + Asyncwrites uint64 + Fsidx Fsid + Fsid uint64 + Namemax uint64 + Owner uint32 + Spare [4]uint32 + Fstypename [32]byte + Mntonname [1024]byte + Mntfromname [1024]byte + _ [4]byte +} + type Flock_t struct { Start int64 Len int64 @@ -107,6 +135,11 @@ const ( PathMax = 0x400 ) +const ( + ST_WAIT = 0x1 + ST_NOWAIT = 0x2 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index 399f37a4341..428c450e4ce 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -83,6 +83,33 @@ type Stat_t struct { type Statfs_t [0]byte +type Statvfs_t struct { + Flag uint32 + Bsize uint32 + Frsize uint32 + Iosize uint32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Bresvd uint64 + Files uint64 + Ffree uint64 + Favail uint64 + Fresvd uint64 + Syncreads uint64 + Syncwrites uint64 + Asyncreads uint64 + Asyncwrites uint64 + Fsidx Fsid + Fsid uint32 + Namemax uint32 + Owner uint32 + Spare [4]uint32 + Fstypename [32]byte + Mntonname [1024]byte + Mntfromname [1024]byte +} + type Flock_t struct { Start int64 Len int64 @@ -108,6 +135,11 @@ const ( PathMax = 0x400 ) +const ( + ST_WAIT = 0x1 + ST_NOWAIT = 0x2 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go index 32f0c15d98e..6f1f2842cc3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go @@ -82,6 +82,34 @@ type Stat_t struct { type Statfs_t [0]byte +type Statvfs_t struct { + Flag uint64 + Bsize uint64 + Frsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Bresvd uint64 + Files uint64 + Ffree uint64 + Favail uint64 + Fresvd uint64 + Syncreads uint64 + Syncwrites uint64 + Asyncreads uint64 + Asyncwrites uint64 + Fsidx Fsid + Fsid uint64 + Namemax uint64 + Owner uint32 + Spare [4]uint32 + Fstypename [32]byte + Mntonname [1024]byte + Mntfromname [1024]byte + _ [4]byte +} + type Flock_t struct { Start int64 Len int64 @@ -107,6 +135,11 @@ const ( PathMax = 0x400 ) +const ( + ST_WAIT = 0x1 + ST_NOWAIT = 0x2 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go index 8531a190f26..23ed9fe51d4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -211,6 +211,12 @@ type Cmsghdr struct { Type int32 } +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + type Inet6Pktinfo struct { Addr [16]byte /* in6_addr */ Ifindex uint32 @@ -236,6 +242,7 @@ const ( SizeofIPv6Mreq = 0x14 SizeofMsghdr = 0x30 SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofIPv6MTUInfo = 0x24 SizeofICMPv6Filter = 0x20 diff --git a/vendor/golang.org/x/tools/go/analysis/analysis.go b/vendor/golang.org/x/tools/go/analysis/analysis.go index ea605f4fd46..8c9977355c9 100644 --- a/vendor/golang.org/x/tools/go/analysis/analysis.go +++ b/vendor/golang.org/x/tools/go/analysis/analysis.go @@ -7,6 +7,8 @@ import ( "go/token" "go/types" "reflect" + + "golang.org/x/tools/internal/analysisinternal" ) // An Analyzer describes an analysis function and its options. @@ -69,6 +71,17 @@ type Analyzer struct { func (a *Analyzer) String() string { return a.Name } +func init() { + // Set the analysisinternal functions to be able to pass type errors + // to the Pass type without modifying the go/analysis API. + analysisinternal.SetTypeErrors = func(p interface{}, errors []types.Error) { + p.(*Pass).typeErrors = errors + } + analysisinternal.GetTypeErrors = func(p interface{}) []types.Error { + return p.(*Pass).typeErrors + } +} + // A Pass provides information to the Run function that // applies a specific analyzer to a single Go package. // @@ -138,6 +151,9 @@ type Pass struct { // WARNING: This is an experimental API and may change in the future. AllObjectFacts func() []ObjectFact + // typeErrors contains types.Errors that are associated with the pkg. + typeErrors []types.Error + /* Further fields may be added in future. */ // For example, suggested or applied refactorings. } diff --git a/vendor/golang.org/x/tools/go/analysis/analysistest/analysistest.go b/vendor/golang.org/x/tools/go/analysis/analysistest/analysistest.go index 74043c59de0..506b77fbfbd 100644 --- a/vendor/golang.org/x/tools/go/analysis/analysistest/analysistest.go +++ b/vendor/golang.org/x/tools/go/analysis/analysistest/analysistest.go @@ -3,6 +3,7 @@ package analysistest import ( "fmt" + "go/format" "go/token" "go/types" "io/ioutil" @@ -18,6 +19,9 @@ import ( "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/internal/checker" "golang.org/x/tools/go/packages" + "golang.org/x/tools/internal/lsp/diff" + "golang.org/x/tools/internal/lsp/diff/myers" + "golang.org/x/tools/internal/span" "golang.org/x/tools/internal/testenv" ) @@ -61,6 +65,77 @@ type Testing interface { Errorf(format string, args ...interface{}) } +func RunWithSuggestedFixes(t Testing, dir string, a *analysis.Analyzer, patterns ...string) []*Result { + r := Run(t, dir, a, patterns...) + + fileEdits := make(map[*token.File][]diff.TextEdit) + fileContents := make(map[*token.File][]byte) + + // Validate edits, prepare the fileEdits map and read the file contents. + for _, act := range r { + for _, diag := range act.Diagnostics { + for _, sf := range diag.SuggestedFixes { + for _, edit := range sf.TextEdits { + // Validate the edit. + if edit.Pos > edit.End { + t.Errorf( + "diagnostic for analysis %v contains Suggested Fix with malformed edit: pos (%v) > end (%v)", + act.Pass.Analyzer.Name, edit.Pos, edit.End) + continue + } + file, endfile := act.Pass.Fset.File(edit.Pos), act.Pass.Fset.File(edit.End) + if file == nil || endfile == nil || file != endfile { + t.Errorf( + "diagnostic for analysis %v contains Suggested Fix with malformed spanning files %v and %v", + act.Pass.Analyzer.Name, file.Name(), endfile.Name()) + continue + } + if _, ok := fileContents[file]; !ok { + contents, err := ioutil.ReadFile(file.Name()) + if err != nil { + t.Errorf("error reading %s: %v", file.Name(), err) + } + fileContents[file] = contents + } + spn, err := span.NewRange(act.Pass.Fset, edit.Pos, edit.End).Span() + if err != nil { + t.Errorf("error converting edit to span %s: %v", file.Name(), err) + } + fileEdits[file] = append(fileEdits[file], diff.TextEdit{ + Span: spn, + NewText: string(edit.NewText), + }) + } + } + } + } + + for file, edits := range fileEdits { + // Get the original file contents. + orig, ok := fileContents[file] + if !ok { + t.Errorf("could not find file contents for %s", file.Name()) + continue + } + out := diff.ApplyEdits(string(orig), edits) + // Get the golden file and read the contents. + want, err := ioutil.ReadFile(file.Name() + ".golden") + if err != nil { + t.Errorf("error reading %s.golden: %v", file.Name(), err) + continue + } + formatted, err := format.Source([]byte(out)) + if err != nil { + continue + } + if string(want) != string(formatted) { + d := myers.ComputeEdits("", string(want), string(formatted)) + t.Errorf("suggested fixes failed for %s:\n%s", file.Name(), diff.ToUnified(file.Name()+".golden", "actual", string(want), d)) + } + } + return r +} + // Run applies an analysis to the packages denoted by the "go list" patterns. // // It loads the packages from the specified GOPATH-style project diff --git a/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go b/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go index 0778f422074..4b7be2d1f5f 100644 --- a/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go +++ b/vendor/golang.org/x/tools/go/analysis/internal/analysisflags/flags.go @@ -382,7 +382,7 @@ func (tree JSONTree) Add(fset *token.FileSet, id, name string, diags []analysis. func (tree JSONTree) Print() { data, err := json.MarshalIndent(tree, "", "\t") if err != nil { - log.Panicf("internal error: JSON marshalling failed: %v", err) + log.Panicf("internal error: JSON marshaling failed: %v", err) } fmt.Printf("%s\n", data) } diff --git a/vendor/golang.org/x/tools/go/analysis/internal/checker/checker.go b/vendor/golang.org/x/tools/go/analysis/internal/checker/checker.go index 671a9696ac9..a26f801b581 100644 --- a/vendor/golang.org/x/tools/go/analysis/internal/checker/checker.go +++ b/vendor/golang.org/x/tools/go/analysis/internal/checker/checker.go @@ -32,6 +32,8 @@ import ( "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/internal/analysisflags" "golang.org/x/tools/go/packages" + "golang.org/x/tools/internal/analysisinternal" + "golang.org/x/tools/internal/span" ) var ( @@ -651,6 +653,36 @@ func (act *action) execOnce() { } act.pass = pass + var errors []types.Error + // Get any type errors that are attributed to the pkg. + // This is necessary to test analyzers that provide + // suggested fixes for compiler/type errors. + for _, err := range act.pkg.Errors { + if err.Kind != packages.TypeError { + continue + } + // err.Pos is a string of form: "file:line:col" or "file:line" or "" or "-" + spn := span.Parse(err.Pos) + // Extract the token positions from the error string. + line, col, offset := spn.Start().Line(), spn.Start().Column(), -1 + act.pkg.Fset.Iterate(func(f *token.File) bool { + if f.Name() != spn.URI().Filename() { + return true + } + offset = int(f.LineStart(line)) + col - 1 + return false + }) + if offset == -1 { + continue + } + errors = append(errors, types.Error{ + Fset: act.pkg.Fset, + Msg: err.Msg, + Pos: token.Pos(offset), + }) + } + analysisinternal.SetTypeErrors(pass, errors) + var err error if act.pkg.IllTyped && !pass.Analyzer.RunDespiteErrors { err = fmt.Errorf("analysis skipped due to errors in package") diff --git a/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go b/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go index b80271afb95..384f0255704 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go @@ -51,7 +51,7 @@ func run(pass *analysis.Pass) (interface{}, error) { return // not enough arguments, e.g. called with return values of another function } if fn.FullName() == "errors.As" && !pointerToInterfaceOrError(pass, call.Args[1]) { - pass.ReportRangef(call, "second argument to errors.As must be a pointer to an interface or a type implementing error") + pass.ReportRangef(call, "second argument to errors.As must be a non-nil pointer to either a type that implements error, or to any interface type") } }) return nil, nil diff --git a/vendor/golang.org/x/tools/go/analysis/passes/findcall/findcall.go b/vendor/golang.org/x/tools/go/analysis/passes/findcall/findcall.go index 948dfe66331..27b1b8400f5 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/findcall/findcall.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/findcall/findcall.go @@ -11,6 +11,7 @@ package findcall import ( + "fmt" "go/ast" "go/types" @@ -48,7 +49,18 @@ func run(pass *analysis.Pass) (interface{}, error) { id = fun.Sel } if id != nil && !pass.TypesInfo.Types[id].IsType() && id.Name == name { - pass.Reportf(call.Lparen, "call of %s(...)", id.Name) + pass.Report(analysis.Diagnostic{ + Pos: call.Lparen, + Message: fmt.Sprintf("call of %s(...)", id.Name), + SuggestedFixes: []analysis.SuggestedFix{{ + Message: fmt.Sprintf("Add '_TEST_'"), + TextEdits: []analysis.TextEdit{{ + Pos: call.Lparen, + End: call.Lparen, + NewText: []byte("_TEST_"), + }}, + }}, + }) } } return true diff --git a/vendor/golang.org/x/tools/go/analysis/passes/nilness/nilness.go b/vendor/golang.org/x/tools/go/analysis/passes/nilness/nilness.go index 5fe3f267375..f0d2c7edfec 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/nilness/nilness.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/nilness/nilness.go @@ -20,10 +20,13 @@ import ( const Doc = `check for redundant or impossible nil comparisons The nilness checker inspects the control-flow graph of each function in -a package and reports nil pointer dereferences and degenerate nil -pointers. A degenerate comparison is of the form x==nil or x!=nil where x -is statically known to be nil or non-nil. These are often a mistake, -especially in control flow related to errors. +a package and reports nil pointer dereferences, degenerate nil +pointers, and panics with nil values. A degenerate comparison is of the form +x==nil or x!=nil where x is statically known to be nil or non-nil. These are +often a mistake, especially in control flow related to errors. Panics with nil +values are checked because they are not detectable by + + if r := recover(); r != nil { This check reports conditions such as: @@ -42,6 +45,12 @@ and: if p == nil { print(*p) // nil dereference } + +and: + + if p == nil { + panic(p) + } ` var Analyzer = &analysis.Analyzer{ @@ -109,7 +118,9 @@ func runFunc(pass *analysis.Pass, fn *ssa.Function) { case *ssa.Store: notNil(stack, instr, instr.Addr, "store") case *ssa.TypeAssert: - notNil(stack, instr, instr.X, "type assertion") + if !instr.CommaOk { + notNil(stack, instr, instr.X, "type assertion") + } case *ssa.UnOp: if instr.Op == token.MUL { // *X notNil(stack, instr, instr.X, "load") @@ -117,6 +128,16 @@ func runFunc(pass *analysis.Pass, fn *ssa.Function) { } } + // Look for panics with nil value + for _, instr := range b.Instrs { + switch instr := instr.(type) { + case *ssa.Panic: + if nilnessOf(stack, instr.X) == isnil { + reportf("nilpanic", instr.Pos(), "panic with nil value") + } + } + } + // For nil comparison blocks, report an error if the condition // is degenerate, and push a nilness fact on the stack when // visiting its true and false successor blocks. @@ -158,15 +179,15 @@ func runFunc(pass *analysis.Pass, fn *ssa.Function) { // "if x == nil" or "if nil == y" condition; x, y are unknown. if xnil == isnil || ynil == isnil { - var f fact + var newFacts facts if xnil == isnil { // x is nil, y is unknown: // t successor learns y is nil. - f = fact{binop.Y, isnil} + newFacts = expandFacts(fact{binop.Y, isnil}) } else { // x is nil, y is unknown: // t successor learns x is nil. - f = fact{binop.X, isnil} + newFacts = expandFacts(fact{binop.X, isnil}) } for _, d := range b.Dominees() { @@ -177,9 +198,9 @@ func runFunc(pass *analysis.Pass, fn *ssa.Function) { s := stack if len(d.Preds) == 1 { if d == tsucc { - s = append(s, f) + s = append(s, newFacts...) } else if d == fsucc { - s = append(s, f.negate()) + s = append(s, newFacts.negate()...) } } visit(d, s) @@ -223,6 +244,23 @@ func (n nilness) String() string { return nilnessStrings[n+1] } // nilnessOf reports whether v is definitely nil, definitely not nil, // or unknown given the dominating stack of facts. func nilnessOf(stack []fact, v ssa.Value) nilness { + switch v := v.(type) { + // unwrap ChangeInterface values recursively, to detect if underlying + // values have any facts recorded or are otherwise known with regard to nilness. + // + // This work must be in addition to expanding facts about + // ChangeInterfaces during inference/fact gathering because this covers + // cases where the nilness of a value is intrinsic, rather than based + // on inferred facts, such as a zero value interface variable. That + // said, this work alone would only inform us when facts are about + // underlying values, rather than outer values, when the analysis is + // transitive in both directions. + case *ssa.ChangeInterface: + if underlying := nilnessOf(stack, v.X); underlying != unknown { + return underlying + } + } + // Is value intrinsically nil or non-nil? switch v := v.(type) { case *ssa.Alloc, @@ -269,3 +307,48 @@ func eq(b *ssa.BasicBlock) (op *ssa.BinOp, tsucc, fsucc *ssa.BasicBlock) { } return nil, nil, nil } + +// expandFacts takes a single fact and returns the set of facts that can be +// known about it or any of its related values. Some operations, like +// ChangeInterface, have transitive nilness, such that if you know the +// underlying value is nil, you also know the value itself is nil, and vice +// versa. This operation allows callers to match on any of the related values +// in analyses, rather than just the one form of the value that happend to +// appear in a comparison. +// +// This work must be in addition to unwrapping values within nilnessOf because +// while this work helps give facts about transitively known values based on +// inferred facts, the recursive check within nilnessOf covers cases where +// nilness facts are intrinsic to the underlying value, such as a zero value +// interface variables. +// +// ChangeInterface is the only expansion currently supported, but others, like +// Slice, could be added. At this time, this tool does not check slice +// operations in a way this expansion could help. See +// https://play.golang.org/p/mGqXEp7w4fR for an example. +func expandFacts(f fact) []fact { + ff := []fact{f} + +Loop: + for { + switch v := f.value.(type) { + case *ssa.ChangeInterface: + f = fact{v.X, f.nilness} + ff = append(ff, f) + default: + break Loop + } + } + + return ff +} + +type facts []fact + +func (ff facts) negate() facts { + nn := make([]fact, len(ff)) + for i, f := range ff { + nn[i] = f.negate() + } + return nn +} diff --git a/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go b/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go index ebd7f6e34b4..14f3a47610b 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go @@ -508,9 +508,13 @@ func printfNameAndKind(pass *analysis.Pass, call *ast.CallExpr) (fn *types.Func, return fn, KindNone } -// isFormatter reports whether t satisfies fmt.Formatter. +// isFormatter reports whether t could satisfy fmt.Formatter. // The only interface method to look for is "Format(State, rune)". func isFormatter(typ types.Type) bool { + // If the type is an interface, the value it holds might satisfy fmt.Formatter. + if _, ok := typ.Underlying().(*types.Interface); ok { + return true + } obj, _, _ := types.LookupFieldOrMethod(typ, false, nil, "Format") fn, ok := obj.(*types.Func) if !ok { @@ -827,7 +831,7 @@ func okPrintfArg(pass *analysis.Pass, call *ast.CallExpr, state *formatState) (o } } - // Does current arg implement fmt.Formatter? + // Could current arg implement fmt.Formatter? formatter := false if state.argNum < len(call.Args) { if tv, ok := pass.TypesInfo.Types[call.Args[state.argNum]]; ok { @@ -891,43 +895,51 @@ func okPrintfArg(pass *analysis.Pass, call *ast.CallExpr, state *formatState) (o pass.ReportRangef(call, "%s format %s has arg %s of wrong type %s", state.name, state.format, analysisutil.Format(pass.Fset, arg), typeString) return false } - if v.typ&argString != 0 && v.verb != 'T' && !bytes.Contains(state.flags, []byte{'#'}) && recursiveStringer(pass, arg) { - pass.ReportRangef(call, "%s format %s with arg %s causes recursive String method call", state.name, state.format, analysisutil.Format(pass.Fset, arg)) - return false + if v.typ&argString != 0 && v.verb != 'T' && !bytes.Contains(state.flags, []byte{'#'}) { + if methodName, ok := recursiveStringer(pass, arg); ok { + pass.ReportRangef(call, "%s format %s with arg %s causes recursive %s method call", state.name, state.format, analysisutil.Format(pass.Fset, arg), methodName) + return false + } } return true } // recursiveStringer reports whether the argument e is a potential -// recursive call to stringer, such as t and &t in these examples: +// recursive call to stringer or is an error, such as t and &t in these examples: // // func (t *T) String() string { printf("%s", t) } -// func (t T) String() string { printf("%s", t) } +// func (t T) Error() string { printf("%s", t) } // func (t T) String() string { printf("%s", &t) } -// -func recursiveStringer(pass *analysis.Pass, e ast.Expr) bool { +func recursiveStringer(pass *analysis.Pass, e ast.Expr) (string, bool) { typ := pass.TypesInfo.Types[e].Type // It's unlikely to be a recursive stringer if it has a Format method. if isFormatter(typ) { - return false + return "", false } - // Does e allow e.String()? - obj, _, _ := types.LookupFieldOrMethod(typ, false, pass.Pkg, "String") - stringMethod, ok := obj.(*types.Func) - if !ok { - return false + // Does e allow e.String() or e.Error()? + strObj, _, _ := types.LookupFieldOrMethod(typ, false, pass.Pkg, "String") + strMethod, strOk := strObj.(*types.Func) + errObj, _, _ := types.LookupFieldOrMethod(typ, false, pass.Pkg, "Error") + errMethod, errOk := errObj.(*types.Func) + if !strOk && !errOk { + return "", false } - // Is the expression e within the body of that String method? - if stringMethod.Pkg() != pass.Pkg || !stringMethod.Scope().Contains(e.Pos()) { - return false + // Is the expression e within the body of that String or Error method? + var method *types.Func + if strOk && strMethod.Pkg() == pass.Pkg && strMethod.Scope().Contains(e.Pos()) { + method = strMethod + } else if errOk && errMethod.Pkg() == pass.Pkg && errMethod.Scope().Contains(e.Pos()) { + method = errMethod + } else { + return "", false } - sig := stringMethod.Type().(*types.Signature) + sig := method.Type().(*types.Signature) if !isStringer(sig) { - return false + return "", false } // Is it the receiver r, or &r? @@ -935,9 +947,11 @@ func recursiveStringer(pass *analysis.Pass, e ast.Expr) bool { e = u.X // strip off & from &r } if id, ok := e.(*ast.Ident); ok { - return pass.TypesInfo.Uses[id] == sig.Recv() + if pass.TypesInfo.Uses[id] == sig.Recv() { + return method.Name(), true + } } - return false + return "", false } // isStringer reports whether the method signature matches the String() definition in fmt.Stringer. @@ -1061,8 +1075,8 @@ func checkPrint(pass *analysis.Pass, call *ast.CallExpr, fn *types.Func) { if isFunctionValue(pass, arg) { pass.ReportRangef(call, "%s arg %s is a func value, not called", fn.Name(), analysisutil.Format(pass.Fset, arg)) } - if recursiveStringer(pass, arg) { - pass.ReportRangef(call, "%s arg %s causes recursive call to String method", fn.Name(), analysisutil.Format(pass.Fset, arg)) + if methodName, ok := recursiveStringer(pass, arg); ok { + pass.ReportRangef(call, "%s arg %s causes recursive call to %s method", fn.Name(), analysisutil.Format(pass.Fset, arg), methodName) } } } diff --git a/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go b/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go index 089c064838d..90896dd1bb9 100644 --- a/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go +++ b/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go @@ -189,7 +189,18 @@ func (d *deadState) findDead(stmt ast.Stmt) { case *ast.EmptyStmt: // do not warn about unreachable empty statements default: - d.pass.ReportRangef(stmt, "unreachable code") + d.pass.Report(analysis.Diagnostic{ + Pos: stmt.Pos(), + End: stmt.End(), + Message: "unreachable code", + SuggestedFixes: []analysis.SuggestedFix{{ + Message: "Remove", + TextEdits: []analysis.TextEdit{{ + Pos: stmt.Pos(), + End: stmt.End(), + }}, + }}, + }) d.reachable = true // silence error about next statement } } diff --git a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go index 3084508b5f8..af5e17feeea 100644 --- a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go +++ b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go @@ -150,7 +150,11 @@ func traverse(files []*ast.File) []event { extent += int(f.End() - f.Pos()) } // This estimate is based on the net/http package. - events := make([]event, 0, extent*33/100) + capacity := extent * 33 / 100 + if capacity > 1e6 { + capacity = 1e6 // impose some reasonable maximum + } + events := make([]event, 0, capacity) var stack []event for _, f := range files { diff --git a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go index db0c9a7ea61..dc6177c122d 100644 --- a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go +++ b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go @@ -11,17 +11,15 @@ import ( "encoding/json" "fmt" "go/types" - "log" - "os" "os/exec" "strings" - "time" + + "golang.org/x/tools/internal/gocommand" ) var debug = false -// GetSizes returns the sizes used by the underlying driver with the given parameters. -func GetSizes(ctx context.Context, buildFlags, env []string, dir string, usesExportData bool) (types.Sizes, error) { +func GetSizes(ctx context.Context, buildFlags, env []string, gocmdRunner *gocommand.Runner, dir string) (types.Sizes, error) { // TODO(matloob): Clean this up. This code is mostly a copy of packages.findExternalDriver. const toolPrefix = "GOPACKAGESDRIVER=" tool := "" @@ -41,7 +39,7 @@ func GetSizes(ctx context.Context, buildFlags, env []string, dir string, usesExp } if tool == "off" { - return GetSizesGolist(ctx, buildFlags, env, dir, usesExportData) + return GetSizesGolist(ctx, buildFlags, env, gocmdRunner, dir) } req, err := json.Marshal(struct { @@ -77,98 +75,43 @@ func GetSizes(ctx context.Context, buildFlags, env []string, dir string, usesExp return response.Sizes, nil } -func GetSizesGolist(ctx context.Context, buildFlags, env []string, dir string, usesExportData bool) (types.Sizes, error) { - args := []string{"list", "-f", "{{context.GOARCH}} {{context.Compiler}}"} - args = append(args, buildFlags...) - args = append(args, "--", "unsafe") - stdout, stderr, err := invokeGo(ctx, env, dir, usesExportData, args...) +func GetSizesGolist(ctx context.Context, buildFlags, env []string, gocmdRunner *gocommand.Runner, dir string) (types.Sizes, error) { + inv := gocommand.Invocation{ + Verb: "list", + Args: []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"}, + Env: env, + BuildFlags: buildFlags, + WorkingDir: dir, + } + stdout, stderr, friendlyErr, rawErr := gocmdRunner.RunRaw(ctx, inv) var goarch, compiler string - if err != nil { - if strings.Contains(err.Error(), "cannot find main module") { + if rawErr != nil { + if strings.Contains(rawErr.Error(), "cannot find main module") { // User's running outside of a module. All bets are off. Get GOARCH and guess compiler is gc. // TODO(matloob): Is this a problem in practice? - envout, _, enverr := invokeGo(ctx, env, dir, usesExportData, "env", "GOARCH") + inv := gocommand.Invocation{ + Verb: "env", + Args: []string{"GOARCH"}, + Env: env, + WorkingDir: dir, + } + envout, enverr := gocmdRunner.Run(ctx, inv) if enverr != nil { - return nil, err + return nil, enverr } goarch = strings.TrimSpace(envout.String()) compiler = "gc" } else { - return nil, err + return nil, friendlyErr } } else { fields := strings.Fields(stdout.String()) if len(fields) < 2 { - return nil, fmt.Errorf("could not parse GOARCH and Go compiler in format \" \" from stdout of go command:\n%s\ndir: %s\nstdout: <<%s>>\nstderr: <<%s>>", - cmdDebugStr(env, args...), dir, stdout.String(), stderr.String()) + return nil, fmt.Errorf("could not parse GOARCH and Go compiler in format \" \":\nstdout: <<%s>>\nstderr: <<%s>>", + stdout.String(), stderr.String()) } goarch = fields[0] compiler = fields[1] } return types.SizesFor(compiler, goarch), nil } - -// invokeGo returns the stdout and stderr of a go command invocation. -func invokeGo(ctx context.Context, env []string, dir string, usesExportData bool, args ...string) (*bytes.Buffer, *bytes.Buffer, error) { - if debug { - defer func(start time.Time) { log.Printf("%s for %v", time.Since(start), cmdDebugStr(env, args...)) }(time.Now()) - } - stdout := new(bytes.Buffer) - stderr := new(bytes.Buffer) - cmd := exec.CommandContext(ctx, "go", args...) - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the - // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. - cmd.Env = append(append([]string{}, env...), "PWD="+dir) - cmd.Dir = dir - cmd.Stdout = stdout - cmd.Stderr = stderr - if err := cmd.Run(); err != nil { - exitErr, ok := err.(*exec.ExitError) - if !ok { - // Catastrophic error: - // - executable not found - // - context cancellation - return nil, nil, fmt.Errorf("couldn't exec 'go %v': %s %T", args, err, err) - } - - // Export mode entails a build. - // If that build fails, errors appear on stderr - // (despite the -e flag) and the Export field is blank. - // Do not fail in that case. - if !usesExportData { - return nil, nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr) - } - } - - // As of writing, go list -export prints some non-fatal compilation - // errors to stderr, even with -e set. We would prefer that it put - // them in the Package.Error JSON (see https://golang.org/issue/26319). - // In the meantime, there's nowhere good to put them, but they can - // be useful for debugging. Print them if $GOPACKAGESPRINTGOLISTERRORS - // is set. - if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTGOLISTERRORS") != "" { - fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(env, args...), stderr) - } - - // debugging - if false { - fmt.Fprintf(os.Stderr, "%s stdout: <<%s>>\n", cmdDebugStr(env, args...), stdout) - } - - return stdout, stderr, nil -} - -func cmdDebugStr(envlist []string, args ...string) string { - env := make(map[string]string) - for _, kv := range envlist { - split := strings.Split(kv, "=") - k, v := split[0], split[1] - env[k] = v - } - - return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["PWD"], args) -} diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go index fc0b28ecf95..88ca6691de5 100644 --- a/vendor/golang.org/x/tools/go/packages/golist.go +++ b/vendor/golang.org/x/tools/go/packages/golist.go @@ -20,10 +20,12 @@ import ( "strconv" "strings" "sync" - "time" "unicode" "golang.org/x/tools/go/internal/packagesdriver" + "golang.org/x/tools/internal/gocommand" + "golang.org/x/tools/internal/packagesinternal" + "golang.org/x/xerrors" ) // debug controls verbose logging. @@ -141,7 +143,7 @@ func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) { sizeswg.Add(1) go func() { var sizes types.Sizes - sizes, sizeserr = packagesdriver.GetSizesGolist(ctx, cfg.BuildFlags, cfg.Env, cfg.Dir, usesExportData(cfg)) + sizes, sizeserr = packagesdriver.GetSizesGolist(ctx, cfg.BuildFlags, cfg.Env, cfg.gocmdRunner, cfg.Dir) // types.SizesFor always returns nil or a *types.StdSizes. response.dr.Sizes, _ = sizes.(*types.StdSizes) sizeswg.Done() @@ -380,6 +382,7 @@ type jsonPackage struct { Imports []string ImportMap map[string]string Deps []string + Module *packagesinternal.Module TestGoFiles []string TestImports []string XTestGoFiles []string @@ -500,10 +503,19 @@ func (state *golistState) createDriverResponse(words ...string) (*driverResponse errkind = "use of internal package not allowed" } if errkind != "" { - if len(old.Error.ImportStack) < 2 { - return nil, fmt.Errorf(`internal error: go list gave a %q error with an import stack with fewer than two elements`, errkind) + if len(old.Error.ImportStack) < 1 { + return nil, fmt.Errorf(`internal error: go list gave a %q error with empty import stack`, errkind) + } + importingPkg := old.Error.ImportStack[len(old.Error.ImportStack)-1] + if importingPkg == old.ImportPath { + // Using an older version of Go which put this package itself on top of import + // stack, instead of the importer. Look for importer in second from top + // position. + if len(old.Error.ImportStack) < 2 { + return nil, fmt.Errorf(`internal error: go list gave a %q error with an import stack without importing package`, errkind) + } + importingPkg = old.Error.ImportStack[len(old.Error.ImportStack)-2] } - importingPkg := old.Error.ImportStack[len(old.Error.ImportStack)-2] additionalErrors[importingPkg] = append(additionalErrors[importingPkg], Error{ Pos: old.Error.Pos, Msg: old.Error.Err, @@ -529,6 +541,7 @@ func (state *golistState) createDriverResponse(words ...string) (*driverResponse CompiledGoFiles: absJoin(p.Dir, p.CompiledGoFiles), OtherFiles: absJoin(p.Dir, otherFiles(p)...), forTest: p.ForTest, + module: p.Module, } // Work around https://golang.org/issue/28749: @@ -704,29 +717,20 @@ func golistargs(cfg *Config, words []string) []string { func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, error) { cfg := state.cfg - stdout := new(bytes.Buffer) - stderr := new(bytes.Buffer) - goArgs := []string{verb} - if verb != "env" { - goArgs = append(goArgs, cfg.BuildFlags...) - } - goArgs = append(goArgs, args...) - cmd := exec.CommandContext(state.ctx, "go", goArgs...) - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the - // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. - cmd.Env = append(append([]string{}, cfg.Env...), "PWD="+cfg.Dir) - cmd.Dir = cfg.Dir - cmd.Stdout = stdout - cmd.Stderr = stderr - defer func(start time.Time) { - cfg.Logf("%s for %v, stderr: <<%s>> stdout: <<%s>>\n", time.Since(start), cmdDebugStr(cmd, goArgs...), stderr, stdout) - }(time.Now()) - - if err := cmd.Run(); err != nil { + inv := gocommand.Invocation{ + Verb: verb, + Args: args, + BuildFlags: cfg.BuildFlags, + Env: cfg.Env, + Logf: cfg.Logf, + WorkingDir: cfg.Dir, + } + gocmdRunner := cfg.gocmdRunner + if gocmdRunner == nil { + gocmdRunner = &gocommand.Runner{} + } + stdout, stderr, _, err := gocmdRunner.RunRaw(cfg.Context, inv) + if err != nil { // Check for 'go' executable not being found. if ee, ok := err.(*exec.Error); ok && ee.Err == exec.ErrNotFound { return nil, fmt.Errorf("'go list' driver requires 'go', but %s", exec.ErrNotFound) @@ -736,7 +740,7 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, if !ok { // Catastrophic error: // - context cancellation - return nil, fmt.Errorf("couldn't exec 'go %v': %s %T", args, err, err) + return nil, xerrors.Errorf("couldn't run 'go': %w", err) } // Old go version? @@ -857,16 +861,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, return nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr) } } - - // As of writing, go list -export prints some non-fatal compilation - // errors to stderr, even with -e set. We would prefer that it put - // them in the Package.Error JSON (see https://golang.org/issue/26319). - // In the meantime, there's nowhere good to put them, but they can - // be useful for debugging. Print them if $GOPACKAGESPRINTGOLISTERRORS - // is set. - if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTGOLISTERRORS") != "" { - fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd, args...), stderr) - } return stdout, nil } diff --git a/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/vendor/golang.org/x/tools/go/packages/golist_overlay.go index 7974a6c9bb6..3c99b6e48d7 100644 --- a/vendor/golang.org/x/tools/go/packages/golist_overlay.go +++ b/vendor/golang.org/x/tools/go/packages/golist_overlay.go @@ -5,6 +5,7 @@ import ( "fmt" "go/parser" "go/token" + "log" "os" "path/filepath" "sort" @@ -22,10 +23,15 @@ func (state *golistState) processGolistOverlay(response *responseDeduper) (modif needPkgsSet := make(map[string]bool) modifiedPkgsSet := make(map[string]bool) + pkgOfDir := make(map[string][]*Package) for _, pkg := range response.dr.Packages { // This is an approximation of import path to id. This can be // wrong for tests, vendored packages, and a number of other cases. havePkgs[pkg.PkgPath] = pkg.ID + x := commonDir(pkg.GoFiles) + if x != "" { + pkgOfDir[x] = append(pkgOfDir[x], pkg) + } } // If no new imports are added, it is safe to avoid loading any needPkgs. @@ -64,6 +70,9 @@ func (state *golistState) processGolistOverlay(response *responseDeduper) (modif // to the overlay. continue } + // if all the overlay files belong to a different package, change the package + // name to that package. Otherwise leave it alone; there will be an error message. + maybeFixPackageName(pkgName, pkgOfDir, dir) nextPackage: for _, p := range response.dr.Packages { if pkgName != p.Name && p.ID != "command-line-arguments" { @@ -282,7 +291,17 @@ func (state *golistState) determineRootDirs() (map[string]string, error) { } func (state *golistState) determineRootDirsModules() (map[string]string, error) { - out, err := state.invokeGo("list", "-m", "-json", "all") + // This will only return the root directory for the main module. + // For now we only support overlays in main modules. + // Editing files in the module cache isn't a great idea, so we don't + // plan to ever support that, but editing files in replaced modules + // is something we may want to support. To do that, we'll want to + // do a go list -m to determine the replaced module's module path and + // directory, and then a go list -m {{with .Replace}}{{.Dir}}{{end}} + // from the main module to determine if that module is actually a replacement. + // See bcmills's comment here: https://github.com/golang/go/issues/37629#issuecomment-594179751 + // for more information. + out, err := state.invokeGo("list", "-m", "-json") if err != nil { return nil, err } @@ -374,3 +393,46 @@ func extractPackageName(filename string, contents []byte) (string, bool) { } return f.Name.Name, true } + +func commonDir(a []string) string { + seen := make(map[string]bool) + x := append([]string{}, a...) + for _, f := range x { + seen[filepath.Dir(f)] = true + } + if len(seen) > 1 { + log.Fatalf("commonDir saw %v for %v", seen, x) + } + for k := range seen { + // len(seen) == 1 + return k + } + return "" // no files +} + +// It is possible that the files in the disk directory dir have a different package +// name from newName, which is deduced from the overlays. If they all have a different +// package name, and they all have the same package name, then that name becomes +// the package name. +// It returns true if it changes the package name, false otherwise. +func maybeFixPackageName(newName string, pkgOfDir map[string][]*Package, dir string) bool { + names := make(map[string]int) + for _, p := range pkgOfDir[dir] { + names[p.Name]++ + } + if len(names) != 1 { + // some files are in different packages + return false + } + oldName := "" + for k := range names { + oldName = k + } + if newName == oldName { + return false + } + for _, p := range pkgOfDir[dir] { + p.Name = newName + } + return true +} diff --git a/vendor/golang.org/x/tools/go/packages/loadmode_string.go b/vendor/golang.org/x/tools/go/packages/loadmode_string.go index aff94a3fe91..7ea37e7eeac 100644 --- a/vendor/golang.org/x/tools/go/packages/loadmode_string.go +++ b/vendor/golang.org/x/tools/go/packages/loadmode_string.go @@ -38,7 +38,7 @@ var modeStrings = []string{ func (mod LoadMode) String() string { m := mod if m == 0 { - return fmt.Sprintf("LoadMode(0)") + return "LoadMode(0)" } var out []string for i, x := range allModes { diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go index 586c714f608..03fd999c0cb 100644 --- a/vendor/golang.org/x/tools/go/packages/packages.go +++ b/vendor/golang.org/x/tools/go/packages/packages.go @@ -23,6 +23,7 @@ import ( "sync" "golang.org/x/tools/go/gcexportdata" + "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/packagesinternal" ) @@ -127,6 +128,9 @@ type Config struct { // Env []string + // gocmdRunner guards go command calls from concurrency errors. + gocmdRunner *gocommand.Runner + // BuildFlags is a list of command-line flags to be passed through to // the build system's query tool. BuildFlags []string @@ -299,12 +303,24 @@ type Package struct { // forTest is the package under test, if any. forTest string + + // module is the module information for the package if it exists. + module *packagesinternal.Module } func init() { packagesinternal.GetForTest = func(p interface{}) string { return p.(*Package).forTest } + packagesinternal.GetModule = func(p interface{}) *packagesinternal.Module { + return p.(*Package).module + } + packagesinternal.GetGoCmdRunner = func(config interface{}) *gocommand.Runner { + return config.(*Config).gocmdRunner + } + packagesinternal.SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) { + config.(*Config).gocmdRunner = runner + } } // An Error describes a problem with a package's metadata, syntax, or types. @@ -467,6 +483,9 @@ func newLoader(cfg *Config) *loader { if ld.Config.Env == nil { ld.Config.Env = os.Environ() } + if ld.Config.gocmdRunner == nil { + ld.Config.gocmdRunner = &gocommand.Runner{} + } if ld.Context == nil { ld.Context = context.Background() } diff --git a/vendor/golang.org/x/tools/imports/forward.go b/vendor/golang.org/x/tools/imports/forward.go index b4f42876790..dbe5b49a9f3 100644 --- a/vendor/golang.org/x/tools/imports/forward.go +++ b/vendor/golang.org/x/tools/imports/forward.go @@ -4,6 +4,7 @@ package imports // import "golang.org/x/tools/imports" import ( "go/build" + "log" "os" intimp "golang.org/x/tools/internal/imports" @@ -47,7 +48,6 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) { GO111MODULE: os.Getenv("GO111MODULE"), GOPROXY: os.Getenv("GOPROXY"), GOSUMDB: os.Getenv("GOSUMDB"), - Debug: Debug, LocalPrefix: LocalPrefix, }, AllErrors: opt.AllErrors, @@ -57,6 +57,9 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) { TabIndent: opt.TabIndent, TabWidth: opt.TabWidth, } + if Debug { + intopt.Env.Logf = log.Printf + } return intimp.Process(filename, src, intopt) } diff --git a/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go b/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go new file mode 100644 index 00000000000..26586810c7f --- /dev/null +++ b/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go @@ -0,0 +1,118 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package analysisinternal exposes internal-only fields from go/analysis. +package analysisinternal + +import ( + "bytes" + "fmt" + "go/ast" + "go/token" + "go/types" + "strings" + + "golang.org/x/tools/go/ast/astutil" +) + +func TypeErrorEndPos(fset *token.FileSet, src []byte, start token.Pos) token.Pos { + // Get the end position for the type error. + offset, end := fset.PositionFor(start, false).Offset, start + if offset >= len(src) { + return end + } + if width := bytes.IndexAny(src[offset:], " \n,():;[]+-*"); width > 0 { + end = start + token.Pos(width) + } + return end +} + +func ZeroValue(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Type) ast.Expr { + under := typ + if n, ok := typ.(*types.Named); ok { + under = n.Underlying() + } + switch u := under.(type) { + case *types.Basic: + switch { + case u.Info()&types.IsNumeric != 0: + return &ast.BasicLit{Kind: token.INT, Value: "0"} + case u.Info()&types.IsBoolean != 0: + return &ast.Ident{Name: "false"} + case u.Info()&types.IsString != 0: + return &ast.BasicLit{Kind: token.STRING, Value: `""`} + default: + panic("unknown basic type") + } + case *types.Chan, *types.Interface, *types.Map, *types.Pointer, *types.Signature, *types.Slice: + return ast.NewIdent("nil") + case *types.Struct: + texpr := typeExpr(fset, f, pkg, typ) // typ because we want the name here. + if texpr == nil { + return nil + } + return &ast.CompositeLit{ + Type: texpr, + } + case *types.Array: + texpr := typeExpr(fset, f, pkg, u.Elem()) + if texpr == nil { + return nil + } + return &ast.CompositeLit{ + Type: &ast.ArrayType{ + Elt: texpr, + Len: &ast.BasicLit{Kind: token.INT, Value: fmt.Sprintf("%v", u.Len())}, + }, + } + } + return nil +} + +func typeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Type) ast.Expr { + switch t := typ.(type) { + case *types.Basic: + switch t.Kind() { + case types.UnsafePointer: + return &ast.SelectorExpr{X: ast.NewIdent("unsafe"), Sel: ast.NewIdent("Pointer")} + default: + return ast.NewIdent(t.Name()) + } + case *types.Named: + if t.Obj().Pkg() == pkg { + return ast.NewIdent(t.Obj().Name()) + } + pkgName := t.Obj().Pkg().Name() + // If the file already imports the package under another name, use that. + for _, group := range astutil.Imports(fset, f) { + for _, cand := range group { + if strings.Trim(cand.Path.Value, `"`) == t.Obj().Pkg().Path() { + if cand.Name != nil && cand.Name.Name != "" { + pkgName = cand.Name.Name + } + } + } + } + if pkgName == "." { + return ast.NewIdent(t.Obj().Name()) + } + return &ast.SelectorExpr{ + X: ast.NewIdent(pkgName), + Sel: ast.NewIdent(t.Obj().Name()), + } + default: + return nil // TODO: anonymous structs, but who does that + } +} + +var GetTypeErrors = func(p interface{}) []types.Error { return nil } +var SetTypeErrors = func(p interface{}, errors []types.Error) {} + +type TypeErrorPass string + +const ( + NoNewVars TypeErrorPass = "nonewvars" + NoResultValues TypeErrorPass = "noresultvalues" + UndeclaredName TypeErrorPass = "undeclaredname" +) diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go index ce38fdcf83f..5901a8f6160 100644 --- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go +++ b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go @@ -76,8 +76,9 @@ func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) e } func parseDirEnt(buf []byte) (consumed int, name string, typ os.FileMode) { - // golang.org/issue/15653 - dirent := (*syscall.Dirent)(unsafe.Pointer(&buf[0])) + // golang.org/issue/37269 + dirent := &syscall.Dirent{} + copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(dirent))[:], buf) if v := unsafe.Offsetof(dirent.Reclen) + unsafe.Sizeof(dirent.Reclen); uintptr(len(buf)) < v { panic(fmt.Sprintf("buf size of %d smaller than dirent header size %d", len(buf), v)) } diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go new file mode 100644 index 00000000000..5b134127089 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go @@ -0,0 +1,186 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package gocommand is a helper for calling the go command. +package gocommand + +import ( + "bytes" + "context" + "fmt" + "io" + "os" + "os/exec" + "regexp" + "strings" + "sync" + "time" + + "golang.org/x/tools/internal/telemetry/event" +) + +// An Runner will run go command invocations and serialize +// them if it sees a concurrency error. +type Runner struct { + // LoadMu guards packages.Load calls and associated state. + loadMu sync.Mutex + serializeLoads int +} + +// 1.13: go: updates to go.mod needed, but contents have changed +// 1.14: go: updating go.mod: existing contents have changed since last read +var modConcurrencyError = regexp.MustCompile(`go:.*go.mod.*contents have changed`) + +// Run calls Runner.RunRaw, serializing requests if they fight over +// go.mod changes. +func (runner *Runner) Run(ctx context.Context, inv Invocation) (*bytes.Buffer, error) { + stdout, _, friendly, _ := runner.RunRaw(ctx, inv) + return stdout, friendly +} + +// Run calls Innvocation.RunRaw, serializing requests if they fight over +// go.mod changes. +func (runner *Runner) RunRaw(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) { + // We want to run invocations concurrently as much as possible. However, + // if go.mod updates are needed, only one can make them and the others will + // fail. We need to retry in those cases, but we don't want to thrash so + // badly we never recover. To avoid that, once we've seen one concurrency + // error, start serializing everything until the backlog has cleared out. + runner.loadMu.Lock() + var locked bool // If true, we hold the mutex and have incremented. + if runner.serializeLoads == 0 { + runner.loadMu.Unlock() + } else { + locked = true + runner.serializeLoads++ + } + defer func() { + if locked { + runner.serializeLoads-- + runner.loadMu.Unlock() + } + }() + + for { + stdout, stderr, friendlyErr, err := inv.runRaw(ctx) + if friendlyErr == nil || !modConcurrencyError.MatchString(friendlyErr.Error()) { + return stdout, stderr, friendlyErr, err + } + event.Error(ctx, "Load concurrency error, will retry serially", err) + if !locked { + runner.loadMu.Lock() + runner.serializeLoads++ + locked = true + } + } +} + +// An Invocation represents a call to the go command. +type Invocation struct { + Verb string + Args []string + BuildFlags []string + Env []string + WorkingDir string + Logf func(format string, args ...interface{}) +} + +// RunRaw is like RunPiped, but also returns the raw stderr and error for callers +// that want to do low-level error handling/recovery. +func (i *Invocation) runRaw(ctx context.Context) (stdout *bytes.Buffer, stderr *bytes.Buffer, friendlyError error, rawError error) { + stdout = &bytes.Buffer{} + stderr = &bytes.Buffer{} + rawError = i.RunPiped(ctx, stdout, stderr) + if rawError != nil { + // Check for 'go' executable not being found. + if ee, ok := rawError.(*exec.Error); ok && ee.Err == exec.ErrNotFound { + friendlyError = fmt.Errorf("go command required, not found: %v", ee) + } + if ctx.Err() != nil { + friendlyError = ctx.Err() + } + friendlyError = fmt.Errorf("err: %v: stderr: %s", rawError, stderr) + } + return +} + +// RunPiped is like Run, but relies on the given stdout/stderr +func (i *Invocation) RunPiped(ctx context.Context, stdout, stderr io.Writer) error { + log := i.Logf + if log == nil { + log = func(string, ...interface{}) {} + } + + goArgs := []string{i.Verb} + switch i.Verb { + case "mod": + // mod needs the sub-verb before build flags. + goArgs = append(goArgs, i.Args[0]) + goArgs = append(goArgs, i.BuildFlags...) + goArgs = append(goArgs, i.Args[1:]...) + case "env": + // env doesn't take build flags. + goArgs = append(goArgs, i.Args...) + default: + goArgs = append(goArgs, i.BuildFlags...) + goArgs = append(goArgs, i.Args...) + } + cmd := exec.Command("go", goArgs...) + cmd.Stdout = stdout + cmd.Stderr = stderr + // On darwin the cwd gets resolved to the real path, which breaks anything that + // expects the working directory to keep the original path, including the + // go command when dealing with modules. + // The Go stdlib has a special feature where if the cwd and the PWD are the + // same node then it trusts the PWD, so by setting it in the env for the child + // process we fix up all the paths returned by the go command. + cmd.Env = append(os.Environ(), i.Env...) + if i.WorkingDir != "" { + cmd.Env = append(cmd.Env, "PWD="+i.WorkingDir) + cmd.Dir = i.WorkingDir + } + + defer func(start time.Time) { log("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now()) + + return runCmdContext(ctx, cmd) +} + +// runCmdContext is like exec.CommandContext except it sends os.Interrupt +// before os.Kill. +func runCmdContext(ctx context.Context, cmd *exec.Cmd) error { + if err := cmd.Start(); err != nil { + return err + } + resChan := make(chan error, 1) + go func() { + resChan <- cmd.Wait() + }() + + select { + case err := <-resChan: + return err + case <-ctx.Done(): + } + // Cancelled. Interrupt and see if it ends voluntarily. + cmd.Process.Signal(os.Interrupt) + select { + case err := <-resChan: + return err + case <-time.After(time.Second): + } + // Didn't shut down in response to interrupt. Kill it hard. + cmd.Process.Kill() + return <-resChan +} + +func cmdDebugStr(cmd *exec.Cmd) string { + env := make(map[string]string) + for _, kv := range cmd.Env { + split := strings.Split(kv, "=") + k, v := split[0], split[1] + env[k] = v + } + + return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], cmd.Args) +} diff --git a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go index 64309db74c9..390cb9db795 100644 --- a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go +++ b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go @@ -23,8 +23,10 @@ import ( // Options controls the behavior of a Walk call. type Options struct { - Debug bool // Enable debug logging - ModulesEnabled bool // Search module caches. Also disables legacy goimports ignore rules. + // If Logf is non-nil, debug logging is enabled through this function. + Logf func(format string, args ...interface{}) + // Search module caches. Also disables legacy goimports ignore rules. + ModulesEnabled bool } // RootType indicates the type of a Root. @@ -80,14 +82,14 @@ func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root // walkDir creates a walker and starts fastwalk with this walker. func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) bool, opts Options) { if _, err := os.Stat(root.Path); os.IsNotExist(err) { - if opts.Debug { - log.Printf("skipping nonexistent directory: %v", root.Path) + if opts.Logf != nil { + opts.Logf("skipping nonexistent directory: %v", root.Path) } return } start := time.Now() - if opts.Debug { - log.Printf("gopathwalk: scanning %s", root.Path) + if opts.Logf != nil { + opts.Logf("gopathwalk: scanning %s", root.Path) } w := &walker{ root: root, @@ -100,8 +102,8 @@ func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) log.Printf("gopathwalk: scanning directory %v: %v", root.Path, err) } - if opts.Debug { - log.Printf("gopathwalk: scanned %s in %v", root.Path, time.Since(start)) + if opts.Logf != nil { + opts.Logf("gopathwalk: scanned %s in %v", root.Path, time.Since(start)) } } @@ -130,11 +132,11 @@ func (w *walker) init() { full := filepath.Join(w.root.Path, p) if fi, err := os.Stat(full); err == nil { w.ignoredDirs = append(w.ignoredDirs, fi) - if w.opts.Debug { - log.Printf("Directory added to ignore list: %s", full) + if w.opts.Logf != nil { + w.opts.Logf("Directory added to ignore list: %s", full) } - } else if w.opts.Debug { - log.Printf("Error statting ignored directory: %v", err) + } else if w.opts.Logf != nil { + w.opts.Logf("Error statting ignored directory: %v", err) } } } @@ -145,11 +147,11 @@ func (w *walker) init() { func (w *walker) getIgnoredDirs(path string) []string { file := filepath.Join(path, ".goimportsignore") slurp, err := ioutil.ReadFile(file) - if w.opts.Debug { + if w.opts.Logf != nil { if err != nil { - log.Print(err) + w.opts.Logf("%v", err) } else { - log.Printf("Read %s", file) + w.opts.Logf("Read %s", file) } } if err != nil { diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go index ee01d34b1bd..264d001edcf 100644 --- a/vendor/golang.org/x/tools/internal/imports/fix.go +++ b/vendor/golang.org/x/tools/internal/imports/fix.go @@ -14,7 +14,6 @@ import ( "go/token" "io/ioutil" "os" - "os/exec" "path" "path/filepath" "reflect" @@ -22,11 +21,11 @@ import ( "strconv" "strings" "sync" - "time" "unicode" "unicode/utf8" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/gopathwalk" ) @@ -263,7 +262,7 @@ type pass struct { // loadPackageNames saves the package names for everything referenced by imports. func (p *pass) loadPackageNames(imports []*ImportInfo) error { - if p.env.Debug { + if p.env.Logf != nil { p.env.Logf("loading package names for %v packages", len(imports)) defer func() { p.env.Logf("done loading package names for %v packages", len(imports)) @@ -335,7 +334,7 @@ func (p *pass) load() ([]*ImportFix, bool) { if p.loadRealPackageNames { err := p.loadPackageNames(append(imports, p.candidates...)) if err != nil { - if p.env.Debug { + if p.env.Logf != nil { p.env.Logf("loading package names: %v", err) } return nil, false @@ -529,7 +528,7 @@ func getFixes(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv return nil, err } srcDir := filepath.Dir(abs) - if env.Debug { + if env.Logf != nil { env.Logf("fixImports(filename=%q), abs=%q, srcDir=%q ...", filename, abs, srcDir) } @@ -747,7 +746,8 @@ func getPackageExports(ctx context.Context, wrapped func(PackageExport), searchP // the go command, the go/build package, etc. type ProcessEnv struct { LocalPrefix string - Debug bool + + GocmdRunner *gocommand.Runner BuildFlags []string @@ -756,7 +756,7 @@ type ProcessEnv struct { GOPATH, GOROOT, GO111MODULE, GOPROXY, GOFLAGS, GOSUMDB string WorkingDir string - // Logf is the default logger for the ProcessEnv. + // If Logf is non-nil, debug logging is enabled through this function. Logf func(format string, args ...interface{}) resolver Resolver @@ -792,7 +792,7 @@ func (e *ProcessEnv) GetResolver() Resolver { if e.resolver != nil { return e.resolver } - out, err := e.invokeGo("env", "GOMOD") + out, err := e.invokeGo(context.TODO(), "env", "GOMOD") if err != nil || len(bytes.TrimSpace(out.Bytes())) == 0 { e.resolver = newGopathResolver(e) return e.resolver @@ -823,38 +823,16 @@ func (e *ProcessEnv) buildContext() *build.Context { return &ctx } -func (e *ProcessEnv) invokeGo(verb string, args ...string) (*bytes.Buffer, error) { - goArgs := []string{verb} - if verb != "env" { - goArgs = append(goArgs, e.BuildFlags...) - } - goArgs = append(goArgs, args...) - cmd := exec.Command("go", goArgs...) - stdout := &bytes.Buffer{} - stderr := &bytes.Buffer{} - cmd.Stdout = stdout - cmd.Stderr = stderr - cmd.Env = e.env() - cmd.Dir = e.WorkingDir - - if e.Debug { - defer func(start time.Time) { e.Logf("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now()) - } - if err := cmd.Run(); err != nil { - return nil, fmt.Errorf("running go: %v (stderr:\n%s)", err, stderr) - } - return stdout, nil -} - -func cmdDebugStr(cmd *exec.Cmd) string { - env := make(map[string]string) - for _, kv := range cmd.Env { - split := strings.Split(kv, "=") - k, v := split[0], split[1] - env[k] = v +func (e *ProcessEnv) invokeGo(ctx context.Context, verb string, args ...string) (*bytes.Buffer, error) { + inv := gocommand.Invocation{ + Verb: verb, + Args: args, + BuildFlags: e.BuildFlags, + Env: e.env(), + Logf: e.Logf, + WorkingDir: e.WorkingDir, } - - return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], cmd.Args) + return e.GocmdRunner.Run(ctx, inv) } func addStdlibCandidates(pass *pass, refs references) { @@ -1261,7 +1239,7 @@ func (r *gopathResolver) scan(ctx context.Context, callback *scanCallback) error case <-r.scanSema: } defer func() { r.scanSema <- struct{}{} }() - gopathwalk.Walk(roots, add, gopathwalk.Options{Debug: r.env.Debug, ModulesEnabled: false}) + gopathwalk.Walk(roots, add, gopathwalk.Options{Logf: r.env.Logf, ModulesEnabled: false}) close(scanDone) }() select { @@ -1365,7 +1343,7 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl } } - if env.Debug { + if env.Logf != nil { sortedExports := append([]string(nil), exports...) sort.Strings(sortedExports) env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, strings.Join(sortedExports, ", ")) @@ -1381,7 +1359,7 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa // ones. Note that this sorts by the de-vendored name, so // there's no "penalty" for vendoring. sort.Sort(byDistanceOrImportPathShortLength(candidates)) - if pass.env.Debug { + if pass.env.Logf != nil { for i, c := range candidates { pass.env.Logf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir) } @@ -1419,14 +1397,14 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa wg.Done() }() - if pass.env.Debug { + if pass.env.Logf != nil { pass.env.Logf("loading exports in dir %s (seeking package %s)", c.pkg.dir, pkgName) } // If we're an x_test, load the package under test's test variant. includeTest := strings.HasSuffix(pass.f.Name.Name, "_test") && c.pkg.dir == pass.srcDir _, exports, err := pass.env.GetResolver().loadExports(ctx, c.pkg, includeTest) if err != nil { - if pass.env.Debug { + if pass.env.Logf != nil { pass.env.Logf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err) } resc <- nil diff --git a/vendor/golang.org/x/tools/internal/imports/imports.go b/vendor/golang.org/x/tools/internal/imports/imports.go index 2e7a317e55b..f43d6b22e54 100644 --- a/vendor/golang.org/x/tools/internal/imports/imports.go +++ b/vendor/golang.org/x/tools/internal/imports/imports.go @@ -21,13 +21,13 @@ import ( "go/token" "io" "io/ioutil" - "log" "os" "regexp" "strconv" "strings" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/internal/gocommand" ) // Options is golang.org/x/tools/imports.Options with extra internal-only options. @@ -155,12 +155,10 @@ func initialize(filename string, src []byte, opt *Options) ([]byte, *Options, er GOSUMDB: os.Getenv("GOSUMDB"), } } - - // Set the logger if the user has not provided it. - if opt.Env.Logf == nil { - opt.Env.Logf = log.Printf + // Set the gocmdRunner if the user has not provided it. + if opt.Env.GocmdRunner == nil { + opt.Env.GocmdRunner = &gocommand.Runner{} } - if src == nil { b, err := ioutil.ReadFile(filename) if err != nil { diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 1980f59de54..69e3eecc4c7 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -146,7 +146,7 @@ func (r *ModuleResolver) init() error { } func (r *ModuleResolver) initAllMods() error { - stdout, err := r.env.invokeGo("list", "-m", "-json", "...") + stdout, err := r.env.invokeGo(context.TODO(), "list", "-m", "-json", "...") if err != nil { return err } @@ -156,12 +156,14 @@ func (r *ModuleResolver) initAllMods() error { return err } if mod.Dir == "" { - if r.env.Debug { + if r.env.Logf != nil { r.env.Logf("module %v has not been downloaded and will be ignored", mod.Path) } // Can't do anything with a module that's not downloaded. continue } + // golang/go#36193: the go command doesn't always clean paths. + mod.Dir = filepath.Clean(mod.Dir) r.modsByModPath = append(r.modsByModPath, mod) r.modsByDir = append(r.modsByDir, mod) if mod.Main { @@ -468,7 +470,7 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error if r.scannedRoots[root] { continue } - gopathwalk.WalkSkip([]gopathwalk.Root{root}, add, skip, gopathwalk.Options{Debug: r.env.Debug, ModulesEnabled: true}) + gopathwalk.WalkSkip([]gopathwalk.Root{root}, add, skip, gopathwalk.Options{Logf: r.env.Logf, ModulesEnabled: true}) r.scannedRoots[root] = true } close(scanDone) @@ -581,7 +583,7 @@ func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) dir } modPath, err := module.UnescapePath(filepath.ToSlash(matches[1])) if err != nil { - if r.env.Debug { + if r.env.Logf != nil { r.env.Logf("decoding module cache path %q: %v", subdir, err) } return directoryPackageInfo{ @@ -697,7 +699,7 @@ func getMainModuleAnd114(env *ProcessEnv) (*ModuleJSON, bool, error) { {{.GoVersion}} {{range context.ReleaseTags}}{{if eq . "go1.14"}}{{.}}{{end}}{{end}} ` - stdout, err := env.invokeGo("list", "-m", "-f", format) + stdout, err := env.invokeGo(context.TODO(), "list", "-m", "-f", format) if err != nil { return nil, false, nil } diff --git a/vendor/golang.org/x/tools/internal/imports/zstdlib.go b/vendor/golang.org/x/tools/internal/imports/zstdlib.go index 7e60eb04e52..16252111ff2 100644 --- a/vendor/golang.org/x/tools/internal/imports/zstdlib.go +++ b/vendor/golang.org/x/tools/internal/imports/zstdlib.go @@ -415,6 +415,9 @@ var stdlib = map[string][]string{ "crypto/tls": []string{ "Certificate", "CertificateRequestInfo", + "CipherSuite", + "CipherSuiteName", + "CipherSuites", "Client", "ClientAuthType", "ClientHelloInfo", @@ -434,6 +437,7 @@ var stdlib = map[string][]string{ "ECDSAWithP521AndSHA512", "ECDSAWithSHA1", "Ed25519", + "InsecureCipherSuites", "Listen", "LoadX509KeyPair", "NewLRUClientSessionCache", @@ -465,6 +469,7 @@ var stdlib = map[string][]string{ "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", + "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", @@ -473,6 +478,7 @@ var stdlib = map[string][]string{ "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", + "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_RC4_128_SHA", "TLS_FALLBACK_SCSV", "TLS_RSA_WITH_3DES_EDE_CBC_SHA", @@ -698,36 +704,65 @@ var stdlib = map[string][]string{ "Attr", "AttrAbstractOrigin", "AttrAccessibility", + "AttrAddrBase", "AttrAddrClass", + "AttrAlignment", "AttrAllocated", "AttrArtificial", "AttrAssociated", "AttrBaseTypes", + "AttrBinaryScale", "AttrBitOffset", "AttrBitSize", "AttrByteSize", + "AttrCallAllCalls", + "AttrCallAllSourceCalls", + "AttrCallAllTailCalls", "AttrCallColumn", + "AttrCallDataLocation", + "AttrCallDataValue", "AttrCallFile", "AttrCallLine", + "AttrCallOrigin", + "AttrCallPC", + "AttrCallParameter", + "AttrCallReturnPC", + "AttrCallTailCall", + "AttrCallTarget", + "AttrCallTargetClobbered", + "AttrCallValue", "AttrCalling", "AttrCommonRef", "AttrCompDir", + "AttrConstExpr", "AttrConstValue", "AttrContainingType", "AttrCount", + "AttrDataBitOffset", "AttrDataLocation", "AttrDataMemberLoc", + "AttrDecimalScale", + "AttrDecimalSign", "AttrDeclColumn", "AttrDeclFile", "AttrDeclLine", "AttrDeclaration", "AttrDefaultValue", + "AttrDefaulted", + "AttrDeleted", "AttrDescription", + "AttrDigitCount", "AttrDiscr", "AttrDiscrList", "AttrDiscrValue", + "AttrDwoName", + "AttrElemental", "AttrEncoding", + "AttrEndianity", "AttrEntrypc", + "AttrEnumClass", + "AttrExplicit", + "AttrExportSymbols", "AttrExtension", "AttrExternal", "AttrFrameBase", @@ -738,27 +773,47 @@ var stdlib = map[string][]string{ "AttrInline", "AttrIsOptional", "AttrLanguage", + "AttrLinkageName", "AttrLocation", + "AttrLoclistsBase", "AttrLowerBound", "AttrLowpc", "AttrMacroInfo", + "AttrMacros", + "AttrMainSubprogram", + "AttrMutable", "AttrName", "AttrNamelistItem", + "AttrNoreturn", + "AttrObjectPointer", "AttrOrdering", + "AttrPictureString", "AttrPriority", "AttrProducer", "AttrPrototyped", + "AttrPure", "AttrRanges", + "AttrRank", + "AttrRecursive", + "AttrReference", "AttrReturnAddr", + "AttrRnglistsBase", + "AttrRvalueReference", "AttrSegment", "AttrSibling", + "AttrSignature", + "AttrSmall", "AttrSpecification", "AttrStartScope", "AttrStaticLink", "AttrStmtList", + "AttrStrOffsetsBase", "AttrStride", "AttrStrideSize", "AttrStringLength", + "AttrStringLengthBitSize", + "AttrStringLengthByteSize", + "AttrThreadsScaled", "AttrTrampoline", "AttrType", "AttrUpperBound", @@ -772,18 +827,23 @@ var stdlib = map[string][]string{ "BoolType", "CharType", "Class", + "ClassAddrPtr", "ClassAddress", "ClassBlock", "ClassConstant", "ClassExprLoc", "ClassFlag", "ClassLinePtr", + "ClassLocList", "ClassLocListPtr", "ClassMacPtr", "ClassRangeListPtr", "ClassReference", "ClassReferenceAlt", "ClassReferenceSig", + "ClassRngList", + "ClassRngListsPtr", + "ClassStrOffsetsPtr", "ClassString", "ClassStringAlt", "ClassUnknown", @@ -814,9 +874,13 @@ var stdlib = map[string][]string{ "Tag", "TagAccessDeclaration", "TagArrayType", + "TagAtomicType", "TagBaseType", + "TagCallSite", + "TagCallSiteParameter", "TagCatchDwarfBlock", "TagClassType", + "TagCoarrayType", "TagCommonDwarfBlock", "TagCommonInclusion", "TagCompileUnit", @@ -824,12 +888,15 @@ var stdlib = map[string][]string{ "TagConstType", "TagConstant", "TagDwarfProcedure", + "TagDynamicType", "TagEntryPoint", "TagEnumerationType", "TagEnumerator", "TagFileType", "TagFormalParameter", "TagFriend", + "TagGenericSubrange", + "TagImmutableType", "TagImportedDeclaration", "TagImportedModule", "TagImportedUnit", @@ -853,6 +920,7 @@ var stdlib = map[string][]string{ "TagRvalueReferenceType", "TagSetType", "TagSharedType", + "TagSkeletonUnit", "TagStringType", "TagStructType", "TagSubprogram", @@ -2359,6 +2427,7 @@ var stdlib = map[string][]string{ "RawValue", "StructuralError", "SyntaxError", + "TagBMPString", "TagBitString", "TagBoolean", "TagEnum", @@ -2787,6 +2856,7 @@ var stdlib = map[string][]string{ "IsPredeclared", "Mode", "New", + "NewFromFiles", "Note", "Package", "PreserveAST", @@ -3115,6 +3185,11 @@ var stdlib = map[string][]string{ "New64", "New64a", }, + "hash/maphash": []string{ + "Hash", + "MakeSeed", + "Seed", + }, "html": []string{ "EscapeString", "UnescapeString", @@ -3367,6 +3442,7 @@ var stdlib = map[string][]string{ "Ldate", "Llongfile", "Lmicroseconds", + "Lmsgprefix", "Logger", "Lshortfile", "LstdFlags", @@ -3443,6 +3519,7 @@ var stdlib = map[string][]string{ "Exp", "Exp2", "Expm1", + "FMA", "Float32bits", "Float32frombits", "Float64bits", @@ -3567,6 +3644,9 @@ var stdlib = map[string][]string{ "OnesCount32", "OnesCount64", "OnesCount8", + "Rem", + "Rem32", + "Rem64", "Reverse", "Reverse16", "Reverse32", @@ -5140,7 +5220,10 @@ var stdlib = map[string][]string{ "CTL_NET", "CTL_QUERY", "CTRL_BREAK_EVENT", + "CTRL_CLOSE_EVENT", "CTRL_C_EVENT", + "CTRL_LOGOFF_EVENT", + "CTRL_SHUTDOWN_EVENT", "CancelIo", "CancelIoEx", "CertAddCertificateContextToStore", @@ -10112,6 +10195,7 @@ var stdlib = map[string][]string{ "Duployan", "Egyptian_Hieroglyphs", "Elbasan", + "Elymaic", "Ethiopic", "Extender", "FoldCategory", @@ -10215,6 +10299,7 @@ var stdlib = map[string][]string{ "Myanmar", "N", "Nabataean", + "Nandinagari", "Nd", "New_Tai_Lue", "Newa", @@ -10224,6 +10309,7 @@ var stdlib = map[string][]string{ "Noncharacter_Code_Point", "Number", "Nushu", + "Nyiakeng_Puachue_Hmong", "Ogham", "Ol_Chiki", "Old_Hungarian", @@ -10331,6 +10417,7 @@ var stdlib = map[string][]string{ "Vai", "Variation_Selector", "Version", + "Wancho", "Warang_Citi", "White_Space", "Yi", diff --git a/vendor/golang.org/x/tools/internal/lsp/diff/diff.go b/vendor/golang.org/x/tools/internal/lsp/diff/diff.go new file mode 100644 index 00000000000..5536c3b8955 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/lsp/diff/diff.go @@ -0,0 +1,159 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package diff supports a pluggable diff algorithm. +package diff + +import ( + "sort" + "strings" + + "golang.org/x/tools/internal/span" +) + +// TextEdit represents a change to a section of a document. +// The text within the specified span should be replaced by the supplied new text. +type TextEdit struct { + Span span.Span + NewText string +} + +// ComputeEdits is the type for a function that produces a set of edits that +// convert from the before content to the after content. +type ComputeEdits func(uri span.URI, before, after string) []TextEdit + +// SortTextEdits attempts to order all edits by their starting points. +// The sort is stable so that edits with the same starting point will not +// be reordered. +func SortTextEdits(d []TextEdit) { + // Use a stable sort to maintain the order of edits inserted at the same position. + sort.SliceStable(d, func(i int, j int) bool { + return span.Compare(d[i].Span, d[j].Span) < 0 + }) +} + +// ApplyEdits applies the set of edits to the before and returns the resulting +// content. +// It may panic or produce garbage if the edits are not valid for the provided +// before content. +func ApplyEdits(before string, edits []TextEdit) string { + // Preconditions: + // - all of the edits apply to before + // - and all the spans for each TextEdit have the same URI + if len(edits) == 0 { + return before + } + _, edits, _ = prepareEdits(before, edits) + after := strings.Builder{} + last := 0 + for _, edit := range edits { + start := edit.Span.Start().Offset() + if start > last { + after.WriteString(before[last:start]) + last = start + } + after.WriteString(edit.NewText) + last = edit.Span.End().Offset() + } + if last < len(before) { + after.WriteString(before[last:]) + } + return after.String() +} + +// LineEdits takes a set of edits and expands and merges them as necessary +// to ensure that there are only full line edits left when it is done. +func LineEdits(before string, edits []TextEdit) []TextEdit { + if len(edits) == 0 { + return nil + } + c, edits, partial := prepareEdits(before, edits) + if partial { + edits = lineEdits(before, c, edits) + } + return edits +} + +// prepareEdits returns a sorted copy of the edits +func prepareEdits(before string, edits []TextEdit) (*span.TokenConverter, []TextEdit, bool) { + partial := false + c := span.NewContentConverter("", []byte(before)) + copied := make([]TextEdit, len(edits)) + for i, edit := range edits { + edit.Span, _ = edit.Span.WithAll(c) + copied[i] = edit + partial = partial || + edit.Span.Start().Offset() >= len(before) || + edit.Span.Start().Column() > 1 || edit.Span.End().Column() > 1 + } + SortTextEdits(copied) + return c, copied, partial +} + +// lineEdits rewrites the edits to always be full line edits +func lineEdits(before string, c *span.TokenConverter, edits []TextEdit) []TextEdit { + adjusted := make([]TextEdit, 0, len(edits)) + current := TextEdit{Span: span.Invalid} + for _, edit := range edits { + if current.Span.IsValid() && edit.Span.Start().Line() <= current.Span.End().Line() { + // overlaps with the current edit, need to combine + // first get the gap from the previous edit + gap := before[current.Span.End().Offset():edit.Span.Start().Offset()] + // now add the text of this edit + current.NewText += gap + edit.NewText + // and then adjust the end position + current.Span = span.New(current.Span.URI(), current.Span.Start(), edit.Span.End()) + } else { + // does not overlap, add previous run (if there is one) + adjusted = addEdit(before, adjusted, current) + // and then remember this edit as the start of the next run + current = edit + } + } + // add the current pending run if there is one + return addEdit(before, adjusted, current) +} + +func addEdit(before string, edits []TextEdit, edit TextEdit) []TextEdit { + if !edit.Span.IsValid() { + return edits + } + // if edit is partial, expand it to full line now + start := edit.Span.Start() + end := edit.Span.End() + if start.Column() > 1 { + // prepend the text and adjust to start of line + delta := start.Column() - 1 + start = span.NewPoint(start.Line(), 1, start.Offset()-delta) + edit.Span = span.New(edit.Span.URI(), start, end) + edit.NewText = before[start.Offset():start.Offset()+delta] + edit.NewText + } + if start.Offset() >= len(before) && start.Line() > 1 && before[len(before)-1] != '\n' { + // after end of file that does not end in eol, so join to last line of file + // to do this we need to know where the start of the last line was + eol := strings.LastIndex(before, "\n") + if eol < 0 { + // file is one non terminated line + eol = 0 + } + delta := len(before) - eol + start = span.NewPoint(start.Line()-1, 1, start.Offset()-delta) + edit.Span = span.New(edit.Span.URI(), start, end) + edit.NewText = before[start.Offset():start.Offset()+delta] + edit.NewText + } + if end.Column() > 1 { + remains := before[end.Offset():] + eol := strings.IndexRune(remains, '\n') + if eol < 0 { + eol = len(remains) + } else { + eol++ + } + end = span.NewPoint(end.Line()+1, 1, end.Offset()+eol) + edit.Span = span.New(edit.Span.URI(), start, end) + edit.NewText = edit.NewText + remains[:eol] + } + edits = append(edits, edit) + return edits +} diff --git a/vendor/golang.org/x/tools/internal/lsp/diff/myers/diff.go b/vendor/golang.org/x/tools/internal/lsp/diff/myers/diff.go new file mode 100644 index 00000000000..c50e33a80ae --- /dev/null +++ b/vendor/golang.org/x/tools/internal/lsp/diff/myers/diff.go @@ -0,0 +1,205 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package myers implements the Myers diff algorithm. +package myers + +import ( + "strings" + + "golang.org/x/tools/internal/lsp/diff" + "golang.org/x/tools/internal/span" +) + +// Sources: +// https://blog.jcoglan.com/2017/02/17/the-myers-diff-algorithm-part-3/ +// https://www.codeproject.com/Articles/42279/%2FArticles%2F42279%2FInvestigating-Myers-diff-algorithm-Part-1-of-2 + +func ComputeEdits(uri span.URI, before, after string) []diff.TextEdit { + ops := operations(splitLines(before), splitLines(after)) + edits := make([]diff.TextEdit, 0, len(ops)) + for _, op := range ops { + s := span.New(uri, span.NewPoint(op.I1+1, 1, 0), span.NewPoint(op.I2+1, 1, 0)) + switch op.Kind { + case diff.Delete: + // Delete: unformatted[i1:i2] is deleted. + edits = append(edits, diff.TextEdit{Span: s}) + case diff.Insert: + // Insert: formatted[j1:j2] is inserted at unformatted[i1:i1]. + if content := strings.Join(op.Content, ""); content != "" { + edits = append(edits, diff.TextEdit{Span: s, NewText: content}) + } + } + } + return edits +} + +type operation struct { + Kind diff.OpKind + Content []string // content from b + I1, I2 int // indices of the line in a + J1 int // indices of the line in b, J2 implied by len(Content) +} + +// operations returns the list of operations to convert a into b, consolidating +// operations for multiple lines and not including equal lines. +func operations(a, b []string) []*operation { + if len(a) == 0 && len(b) == 0 { + return nil + } + + trace, offset := shortestEditSequence(a, b) + snakes := backtrack(trace, len(a), len(b), offset) + + M, N := len(a), len(b) + + var i int + solution := make([]*operation, len(a)+len(b)) + + add := func(op *operation, i2, j2 int) { + if op == nil { + return + } + op.I2 = i2 + if op.Kind == diff.Insert { + op.Content = b[op.J1:j2] + } + solution[i] = op + i++ + } + x, y := 0, 0 + for _, snake := range snakes { + if len(snake) < 2 { + continue + } + var op *operation + // delete (horizontal) + for snake[0]-snake[1] > x-y { + if op == nil { + op = &operation{ + Kind: diff.Delete, + I1: x, + J1: y, + } + } + x++ + if x == M { + break + } + } + add(op, x, y) + op = nil + // insert (vertical) + for snake[0]-snake[1] < x-y { + if op == nil { + op = &operation{ + Kind: diff.Insert, + I1: x, + J1: y, + } + } + y++ + } + add(op, x, y) + op = nil + // equal (diagonal) + for x < snake[0] { + x++ + y++ + } + if x >= M && y >= N { + break + } + } + return solution[:i] +} + +// backtrack uses the trace for the edit sequence computation and returns the +// "snakes" that make up the solution. A "snake" is a single deletion or +// insertion followed by zero or diagonals. +func backtrack(trace [][]int, x, y, offset int) [][]int { + snakes := make([][]int, len(trace)) + d := len(trace) - 1 + for ; x > 0 && y > 0 && d > 0; d-- { + V := trace[d] + if len(V) == 0 { + continue + } + snakes[d] = []int{x, y} + + k := x - y + + var kPrev int + if k == -d || (k != d && V[k-1+offset] < V[k+1+offset]) { + kPrev = k + 1 + } else { + kPrev = k - 1 + } + + x = V[kPrev+offset] + y = x - kPrev + } + if x < 0 || y < 0 { + return snakes + } + snakes[d] = []int{x, y} + return snakes +} + +// shortestEditSequence returns the shortest edit sequence that converts a into b. +func shortestEditSequence(a, b []string) ([][]int, int) { + M, N := len(a), len(b) + V := make([]int, 2*(N+M)+1) + offset := N + M + trace := make([][]int, N+M+1) + + // Iterate through the maximum possible length of the SES (N+M). + for d := 0; d <= N+M; d++ { + copyV := make([]int, len(V)) + // k lines are represented by the equation y = x - k. We move in + // increments of 2 because end points for even d are on even k lines. + for k := -d; k <= d; k += 2 { + // At each point, we either go down or to the right. We go down if + // k == -d, and we go to the right if k == d. We also prioritize + // the maximum x value, because we prefer deletions to insertions. + var x int + if k == -d || (k != d && V[k-1+offset] < V[k+1+offset]) { + x = V[k+1+offset] // down + } else { + x = V[k-1+offset] + 1 // right + } + + y := x - k + + // Diagonal moves while we have equal contents. + for x < M && y < N && a[x] == b[y] { + x++ + y++ + } + + V[k+offset] = x + + // Return if we've exceeded the maximum values. + if x == M && y == N { + // Makes sure to save the state of the array before returning. + copy(copyV, V) + trace[d] = copyV + return trace, offset + } + } + + // Save the state of the array. + copy(copyV, V) + trace[d] = copyV + } + return nil, 0 +} + +func splitLines(text string) []string { + lines := strings.SplitAfter(text, "\n") + if lines[len(lines)-1] == "" { + lines = lines[:len(lines)-1] + } + return lines +} diff --git a/vendor/golang.org/x/tools/internal/lsp/diff/unified.go b/vendor/golang.org/x/tools/internal/lsp/diff/unified.go new file mode 100644 index 00000000000..b2e630effe7 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/lsp/diff/unified.go @@ -0,0 +1,210 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package diff + +import ( + "fmt" + "strings" +) + +// Unified represents a set of edits as a unified diff. +type Unified struct { + // From is the name of the original file. + From string + // To is the name of the modified file. + To string + // Hunks is the set of edit hunks needed to transform the file content. + Hunks []*Hunk +} + +// Hunk represents a contiguous set of line edits to apply. +type Hunk struct { + // The line in the original source where the hunk starts. + FromLine int + // The line in the original source where the hunk finishes. + ToLine int + // The set of line based edits to apply. + Lines []Line +} + +// Line represents a single line operation to apply as part of a Hunk. +type Line struct { + // Kind is the type of line this represents, deletion, insertion or copy. + Kind OpKind + // Content is the content of this line. + // For deletion it is the line being removed, for all others it is the line + // to put in the output. + Content string +} + +// OpKind is used to denote the type of operation a line represents. +type OpKind int + +const ( + // Delete is the operation kind for a line that is present in the input + // but not in the output. + Delete OpKind = iota + // Insert is the operation kind for a line that is new in the output. + Insert + // Equal is the operation kind for a line that is the same in the input and + // output, often used to provide context around edited lines. + Equal +) + +// String returns a human readable representation of an OpKind. It is not +// intended for machine processing. +func (k OpKind) String() string { + switch k { + case Delete: + return "delete" + case Insert: + return "insert" + case Equal: + return "equal" + default: + panic("unknown operation kind") + } +} + +const ( + edge = 3 + gap = edge * 2 +) + +// ToUnified takes a file contents and a sequence of edits, and calculates +// a unified diff that represents those edits. +func ToUnified(from, to string, content string, edits []TextEdit) Unified { + u := Unified{ + From: from, + To: to, + } + if len(edits) == 0 { + return u + } + c, edits, partial := prepareEdits(content, edits) + if partial { + edits = lineEdits(content, c, edits) + } + lines := splitLines(content) + var h *Hunk + last := 0 + toLine := 0 + for _, edit := range edits { + start := edit.Span.Start().Line() - 1 + end := edit.Span.End().Line() - 1 + switch { + case h != nil && start == last: + //direct extension + case h != nil && start <= last+gap: + //within range of previous lines, add the joiners + addEqualLines(h, lines, last, start) + default: + //need to start a new hunk + if h != nil { + // add the edge to the previous hunk + addEqualLines(h, lines, last, last+edge) + u.Hunks = append(u.Hunks, h) + } + toLine += start - last + h = &Hunk{ + FromLine: start + 1, + ToLine: toLine + 1, + } + // add the edge to the new hunk + delta := addEqualLines(h, lines, start-edge, start) + h.FromLine -= delta + h.ToLine -= delta + } + last = start + for i := start; i < end; i++ { + h.Lines = append(h.Lines, Line{Kind: Delete, Content: lines[i]}) + last++ + } + if edit.NewText != "" { + for _, line := range splitLines(edit.NewText) { + h.Lines = append(h.Lines, Line{Kind: Insert, Content: line}) + toLine++ + } + } + } + if h != nil { + // add the edge to the final hunk + addEqualLines(h, lines, last, last+edge) + u.Hunks = append(u.Hunks, h) + } + return u +} + +func splitLines(text string) []string { + lines := strings.SplitAfter(text, "\n") + if lines[len(lines)-1] == "" { + lines = lines[:len(lines)-1] + } + return lines +} + +func addEqualLines(h *Hunk, lines []string, start, end int) int { + delta := 0 + for i := start; i < end; i++ { + if i < 0 { + continue + } + if i >= len(lines) { + return delta + } + h.Lines = append(h.Lines, Line{Kind: Equal, Content: lines[i]}) + delta++ + } + return delta +} + +// Format converts a unified diff to the standard textual form for that diff. +// The output of this function can be passed to tools like patch. +func (u Unified) Format(f fmt.State, r rune) { + if len(u.Hunks) == 0 { + return + } + fmt.Fprintf(f, "--- %s\n", u.From) + fmt.Fprintf(f, "+++ %s\n", u.To) + for _, hunk := range u.Hunks { + fromCount, toCount := 0, 0 + for _, l := range hunk.Lines { + switch l.Kind { + case Delete: + fromCount++ + case Insert: + toCount++ + default: + fromCount++ + toCount++ + } + } + fmt.Fprint(f, "@@") + if fromCount > 1 { + fmt.Fprintf(f, " -%d,%d", hunk.FromLine, fromCount) + } else { + fmt.Fprintf(f, " -%d", hunk.FromLine) + } + if toCount > 1 { + fmt.Fprintf(f, " +%d,%d", hunk.ToLine, toCount) + } else { + fmt.Fprintf(f, " +%d", hunk.ToLine) + } + fmt.Fprint(f, " @@\n") + for _, l := range hunk.Lines { + switch l.Kind { + case Delete: + fmt.Fprintf(f, "-%s", l.Content) + case Insert: + fmt.Fprintf(f, "+%s", l.Content) + default: + fmt.Fprintf(f, " %s", l.Content) + } + if !strings.HasSuffix(l.Content, "\n") { + fmt.Fprintf(f, "\n\\ No newline at end of file\n") + } + } + } +} diff --git a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go index 0c0dbb6a9da..a88750be2b4 100644 --- a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go +++ b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go @@ -1,4 +1,35 @@ // Package packagesinternal exposes internal-only fields from go/packages. package packagesinternal +import ( + "time" + + "golang.org/x/tools/internal/gocommand" +) + +// Fields must match go list; +type Module struct { + Path string // module path + Version string // module version + Versions []string // available module versions (with -versions) + Replace *Module // replaced by this module + Time *time.Time // time version was created + Update *Module // available update, if any (with -u) + Main bool // is this the main module? + Indirect bool // is this module only an indirect dependency of main module? + Dir string // directory holding files for this module, if any + GoMod string // path to go.mod file used when loading this module, if any + GoVersion string // go version used in module + Error *ModuleError // error loading module +} +type ModuleError struct { + Err string // the error itself +} + var GetForTest = func(p interface{}) string { return "" } + +var GetModule = func(p interface{}) *Module { return nil } + +var GetGoCmdRunner = func(config interface{}) *gocommand.Runner { return nil } + +var SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {} diff --git a/vendor/golang.org/x/tools/internal/span/parse.go b/vendor/golang.org/x/tools/internal/span/parse.go new file mode 100644 index 00000000000..aa17c84ec15 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/parse.go @@ -0,0 +1,100 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package span + +import ( + "strconv" + "strings" + "unicode/utf8" +) + +// Parse returns the location represented by the input. +// Only file paths are accepted, not URIs. +// The returned span will be normalized, and thus if printed may produce a +// different string. +func Parse(input string) Span { + // :0:0#0-0:0#0 + valid := input + var hold, offset int + hadCol := false + suf := rstripSuffix(input) + if suf.sep == "#" { + offset = suf.num + suf = rstripSuffix(suf.remains) + } + if suf.sep == ":" { + valid = suf.remains + hold = suf.num + hadCol = true + suf = rstripSuffix(suf.remains) + } + switch { + case suf.sep == ":": + return New(URIFromPath(suf.remains), NewPoint(suf.num, hold, offset), Point{}) + case suf.sep == "-": + // we have a span, fall out of the case to continue + default: + // separator not valid, rewind to either the : or the start + return New(URIFromPath(valid), NewPoint(hold, 0, offset), Point{}) + } + // only the span form can get here + // at this point we still don't know what the numbers we have mean + // if have not yet seen a : then we might have either a line or a column depending + // on whether start has a column or not + // we build an end point and will fix it later if needed + end := NewPoint(suf.num, hold, offset) + hold, offset = 0, 0 + suf = rstripSuffix(suf.remains) + if suf.sep == "#" { + offset = suf.num + suf = rstripSuffix(suf.remains) + } + if suf.sep != ":" { + // turns out we don't have a span after all, rewind + return New(URIFromPath(valid), end, Point{}) + } + valid = suf.remains + hold = suf.num + suf = rstripSuffix(suf.remains) + if suf.sep != ":" { + // line#offset only + return New(URIFromPath(valid), NewPoint(hold, 0, offset), end) + } + // we have a column, so if end only had one number, it is also the column + if !hadCol { + end = NewPoint(suf.num, end.v.Line, end.v.Offset) + } + return New(URIFromPath(suf.remains), NewPoint(suf.num, hold, offset), end) +} + +type suffix struct { + remains string + sep string + num int +} + +func rstripSuffix(input string) suffix { + if len(input) == 0 { + return suffix{"", "", -1} + } + remains := input + num := -1 + // first see if we have a number at the end + last := strings.LastIndexFunc(remains, func(r rune) bool { return r < '0' || r > '9' }) + if last >= 0 && last < len(remains)-1 { + number, err := strconv.ParseInt(remains[last+1:], 10, 64) + if err == nil { + num = int(number) + remains = remains[:last+1] + } + } + // now see if we have a trailing separator + r, w := utf8.DecodeLastRuneInString(remains) + if r != ':' && r != '#' && r == '#' { + return suffix{input, "", -1} + } + remains = remains[:len(remains)-w] + return suffix{remains, string(r), num} +} diff --git a/vendor/golang.org/x/tools/internal/span/span.go b/vendor/golang.org/x/tools/internal/span/span.go new file mode 100644 index 00000000000..4d2ad098667 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/span.go @@ -0,0 +1,285 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package span contains support for representing with positions and ranges in +// text files. +package span + +import ( + "encoding/json" + "fmt" + "path" +) + +// Span represents a source code range in standardized form. +type Span struct { + v span +} + +// Point represents a single point within a file. +// In general this should only be used as part of a Span, as on its own it +// does not carry enough information. +type Point struct { + v point +} + +type span struct { + URI URI `json:"uri"` + Start point `json:"start"` + End point `json:"end"` +} + +type point struct { + Line int `json:"line"` + Column int `json:"column"` + Offset int `json:"offset"` +} + +// Invalid is a span that reports false from IsValid +var Invalid = Span{v: span{Start: invalidPoint.v, End: invalidPoint.v}} + +var invalidPoint = Point{v: point{Line: 0, Column: 0, Offset: -1}} + +// Converter is the interface to an object that can convert between line:column +// and offset forms for a single file. +type Converter interface { + //ToPosition converts from an offset to a line:column pair. + ToPosition(offset int) (int, int, error) + //ToOffset converts from a line:column pair to an offset. + ToOffset(line, col int) (int, error) +} + +func New(uri URI, start Point, end Point) Span { + s := Span{v: span{URI: uri, Start: start.v, End: end.v}} + s.v.clean() + return s +} + +func NewPoint(line, col, offset int) Point { + p := Point{v: point{Line: line, Column: col, Offset: offset}} + p.v.clean() + return p +} + +func Compare(a, b Span) int { + if r := CompareURI(a.URI(), b.URI()); r != 0 { + return r + } + if r := comparePoint(a.v.Start, b.v.Start); r != 0 { + return r + } + return comparePoint(a.v.End, b.v.End) +} + +func ComparePoint(a, b Point) int { + return comparePoint(a.v, b.v) +} + +func comparePoint(a, b point) int { + if !a.hasPosition() { + if a.Offset < b.Offset { + return -1 + } + if a.Offset > b.Offset { + return 1 + } + return 0 + } + if a.Line < b.Line { + return -1 + } + if a.Line > b.Line { + return 1 + } + if a.Column < b.Column { + return -1 + } + if a.Column > b.Column { + return 1 + } + return 0 +} + +func (s Span) HasPosition() bool { return s.v.Start.hasPosition() } +func (s Span) HasOffset() bool { return s.v.Start.hasOffset() } +func (s Span) IsValid() bool { return s.v.Start.isValid() } +func (s Span) IsPoint() bool { return s.v.Start == s.v.End } +func (s Span) URI() URI { return s.v.URI } +func (s Span) Start() Point { return Point{s.v.Start} } +func (s Span) End() Point { return Point{s.v.End} } +func (s *Span) MarshalJSON() ([]byte, error) { return json.Marshal(&s.v) } +func (s *Span) UnmarshalJSON(b []byte) error { return json.Unmarshal(b, &s.v) } + +func (p Point) HasPosition() bool { return p.v.hasPosition() } +func (p Point) HasOffset() bool { return p.v.hasOffset() } +func (p Point) IsValid() bool { return p.v.isValid() } +func (p *Point) MarshalJSON() ([]byte, error) { return json.Marshal(&p.v) } +func (p *Point) UnmarshalJSON(b []byte) error { return json.Unmarshal(b, &p.v) } +func (p Point) Line() int { + if !p.v.hasPosition() { + panic(fmt.Errorf("position not set in %v", p.v)) + } + return p.v.Line +} +func (p Point) Column() int { + if !p.v.hasPosition() { + panic(fmt.Errorf("position not set in %v", p.v)) + } + return p.v.Column +} +func (p Point) Offset() int { + if !p.v.hasOffset() { + panic(fmt.Errorf("offset not set in %v", p.v)) + } + return p.v.Offset +} + +func (p point) hasPosition() bool { return p.Line > 0 } +func (p point) hasOffset() bool { return p.Offset >= 0 } +func (p point) isValid() bool { return p.hasPosition() || p.hasOffset() } +func (p point) isZero() bool { + return (p.Line == 1 && p.Column == 1) || (!p.hasPosition() && p.Offset == 0) +} + +func (s *span) clean() { + //this presumes the points are already clean + if !s.End.isValid() || (s.End == point{}) { + s.End = s.Start + } +} + +func (p *point) clean() { + if p.Line < 0 { + p.Line = 0 + } + if p.Column <= 0 { + if p.Line > 0 { + p.Column = 1 + } else { + p.Column = 0 + } + } + if p.Offset == 0 && (p.Line > 1 || p.Column > 1) { + p.Offset = -1 + } +} + +// Format implements fmt.Formatter to print the Location in a standard form. +// The format produced is one that can be read back in using Parse. +func (s Span) Format(f fmt.State, c rune) { + fullForm := f.Flag('+') + preferOffset := f.Flag('#') + // we should always have a uri, simplify if it is file format + //TODO: make sure the end of the uri is unambiguous + uri := string(s.v.URI) + if c == 'f' { + uri = path.Base(uri) + } else if !fullForm { + uri = s.v.URI.Filename() + } + fmt.Fprint(f, uri) + if !s.IsValid() || (!fullForm && s.v.Start.isZero() && s.v.End.isZero()) { + return + } + // see which bits of start to write + printOffset := s.HasOffset() && (fullForm || preferOffset || !s.HasPosition()) + printLine := s.HasPosition() && (fullForm || !printOffset) + printColumn := printLine && (fullForm || (s.v.Start.Column > 1 || s.v.End.Column > 1)) + fmt.Fprint(f, ":") + if printLine { + fmt.Fprintf(f, "%d", s.v.Start.Line) + } + if printColumn { + fmt.Fprintf(f, ":%d", s.v.Start.Column) + } + if printOffset { + fmt.Fprintf(f, "#%d", s.v.Start.Offset) + } + // start is written, do we need end? + if s.IsPoint() { + return + } + // we don't print the line if it did not change + printLine = fullForm || (printLine && s.v.End.Line > s.v.Start.Line) + fmt.Fprint(f, "-") + if printLine { + fmt.Fprintf(f, "%d", s.v.End.Line) + } + if printColumn { + if printLine { + fmt.Fprint(f, ":") + } + fmt.Fprintf(f, "%d", s.v.End.Column) + } + if printOffset { + fmt.Fprintf(f, "#%d", s.v.End.Offset) + } +} + +func (s Span) WithPosition(c Converter) (Span, error) { + if err := s.update(c, true, false); err != nil { + return Span{}, err + } + return s, nil +} + +func (s Span) WithOffset(c Converter) (Span, error) { + if err := s.update(c, false, true); err != nil { + return Span{}, err + } + return s, nil +} + +func (s Span) WithAll(c Converter) (Span, error) { + if err := s.update(c, true, true); err != nil { + return Span{}, err + } + return s, nil +} + +func (s *Span) update(c Converter, withPos, withOffset bool) error { + if !s.IsValid() { + return fmt.Errorf("cannot add information to an invalid span") + } + if withPos && !s.HasPosition() { + if err := s.v.Start.updatePosition(c); err != nil { + return err + } + if s.v.End.Offset == s.v.Start.Offset { + s.v.End = s.v.Start + } else if err := s.v.End.updatePosition(c); err != nil { + return err + } + } + if withOffset && (!s.HasOffset() || (s.v.End.hasPosition() && !s.v.End.hasOffset())) { + if err := s.v.Start.updateOffset(c); err != nil { + return err + } + if s.v.End.Line == s.v.Start.Line && s.v.End.Column == s.v.Start.Column { + s.v.End.Offset = s.v.Start.Offset + } else if err := s.v.End.updateOffset(c); err != nil { + return err + } + } + return nil +} + +func (p *point) updatePosition(c Converter) error { + line, col, err := c.ToPosition(p.Offset) + if err != nil { + return err + } + p.Line = line + p.Column = col + return nil +} + +func (p *point) updateOffset(c Converter) error { + offset, err := c.ToOffset(p.Line, p.Column) + if err != nil { + return err + } + p.Offset = offset + return nil +} diff --git a/vendor/golang.org/x/tools/internal/span/token.go b/vendor/golang.org/x/tools/internal/span/token.go new file mode 100644 index 00000000000..1710b7779d5 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/token.go @@ -0,0 +1,182 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package span + +import ( + "fmt" + "go/token" +) + +// Range represents a source code range in token.Pos form. +// It also carries the FileSet that produced the positions, so that it is +// self contained. +type Range struct { + FileSet *token.FileSet + Start token.Pos + End token.Pos + Converter Converter +} + +// TokenConverter is a Converter backed by a token file set and file. +// It uses the file set methods to work out the conversions, which +// makes it fast and does not require the file contents. +type TokenConverter struct { + fset *token.FileSet + file *token.File +} + +// NewRange creates a new Range from a FileSet and two positions. +// To represent a point pass a 0 as the end pos. +func NewRange(fset *token.FileSet, start, end token.Pos) Range { + return Range{ + FileSet: fset, + Start: start, + End: end, + } +} + +// NewTokenConverter returns an implementation of Converter backed by a +// token.File. +func NewTokenConverter(fset *token.FileSet, f *token.File) *TokenConverter { + return &TokenConverter{fset: fset, file: f} +} + +// NewContentConverter returns an implementation of Converter for the +// given file content. +func NewContentConverter(filename string, content []byte) *TokenConverter { + fset := token.NewFileSet() + f := fset.AddFile(filename, -1, len(content)) + f.SetLinesForContent(content) + return &TokenConverter{fset: fset, file: f} +} + +// IsPoint returns true if the range represents a single point. +func (r Range) IsPoint() bool { + return r.Start == r.End +} + +// Span converts a Range to a Span that represents the Range. +// It will fill in all the members of the Span, calculating the line and column +// information. +func (r Range) Span() (Span, error) { + if !r.Start.IsValid() { + return Span{}, fmt.Errorf("start pos is not valid") + } + f := r.FileSet.File(r.Start) + if f == nil { + return Span{}, fmt.Errorf("file not found in FileSet") + } + var s Span + var err error + var startFilename string + startFilename, s.v.Start.Line, s.v.Start.Column, err = position(f, r.Start) + if err != nil { + return Span{}, err + } + s.v.URI = URIFromPath(startFilename) + if r.End.IsValid() { + var endFilename string + endFilename, s.v.End.Line, s.v.End.Column, err = position(f, r.End) + if err != nil { + return Span{}, err + } + // In the presence of line directives, a single File can have sections from + // multiple file names. + if endFilename != startFilename { + return Span{}, fmt.Errorf("span begins in file %q but ends in %q", startFilename, endFilename) + } + } + s.v.Start.clean() + s.v.End.clean() + s.v.clean() + if r.Converter != nil { + return s.WithOffset(r.Converter) + } + if startFilename != f.Name() { + return Span{}, fmt.Errorf("must supply Converter for file %q containing lines from %q", f.Name(), startFilename) + } + return s.WithOffset(NewTokenConverter(r.FileSet, f)) +} + +func position(f *token.File, pos token.Pos) (string, int, int, error) { + off, err := offset(f, pos) + if err != nil { + return "", 0, 0, err + } + return positionFromOffset(f, off) +} + +func positionFromOffset(f *token.File, offset int) (string, int, int, error) { + if offset > f.Size() { + return "", 0, 0, fmt.Errorf("offset %v is past the end of the file %v", offset, f.Size()) + } + pos := f.Pos(offset) + p := f.Position(pos) + if offset == f.Size() { + return p.Filename, p.Line + 1, 1, nil + } + return p.Filename, p.Line, p.Column, nil +} + +// offset is a copy of the Offset function in go/token, but with the adjustment +// that it does not panic on invalid positions. +func offset(f *token.File, pos token.Pos) (int, error) { + if int(pos) < f.Base() || int(pos) > f.Base()+f.Size() { + return 0, fmt.Errorf("invalid pos") + } + return int(pos) - f.Base(), nil +} + +// Range converts a Span to a Range that represents the Span for the supplied +// File. +func (s Span) Range(converter *TokenConverter) (Range, error) { + s, err := s.WithOffset(converter) + if err != nil { + return Range{}, err + } + // go/token will panic if the offset is larger than the file's size, + // so check here to avoid panicking. + if s.Start().Offset() > converter.file.Size() { + return Range{}, fmt.Errorf("start offset %v is past the end of the file %v", s.Start(), converter.file.Size()) + } + if s.End().Offset() > converter.file.Size() { + return Range{}, fmt.Errorf("end offset %v is past the end of the file %v", s.End(), converter.file.Size()) + } + return Range{ + FileSet: converter.fset, + Start: converter.file.Pos(s.Start().Offset()), + End: converter.file.Pos(s.End().Offset()), + Converter: converter, + }, nil +} + +func (l *TokenConverter) ToPosition(offset int) (int, int, error) { + _, line, col, err := positionFromOffset(l.file, offset) + return line, col, err +} + +func (l *TokenConverter) ToOffset(line, col int) (int, error) { + if line < 0 { + return -1, fmt.Errorf("line is not valid") + } + lineMax := l.file.LineCount() + 1 + if line > lineMax { + return -1, fmt.Errorf("line is beyond end of file %v", lineMax) + } else if line == lineMax { + if col > 1 { + return -1, fmt.Errorf("column is beyond end of file") + } + // at the end of the file, allowing for a trailing eol + return l.file.Size(), nil + } + pos := lineStart(l.file, line) + if !pos.IsValid() { + return -1, fmt.Errorf("line is not in file") + } + // we assume that column is in bytes here, and that the first byte of a + // line is at column 1 + pos += token.Pos(col - 1) + return offset(l.file, pos) +} diff --git a/vendor/golang.org/x/tools/internal/span/token111.go b/vendor/golang.org/x/tools/internal/span/token111.go new file mode 100644 index 00000000000..bf7a5406b6e --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/token111.go @@ -0,0 +1,39 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.12 + +package span + +import ( + "go/token" +) + +// lineStart is the pre-Go 1.12 version of (*token.File).LineStart. For Go +// versions <= 1.11, we borrow logic from the analysisutil package. +// TODO(rstambler): Delete this file when we no longer support Go 1.11. +func lineStart(f *token.File, line int) token.Pos { + // Use binary search to find the start offset of this line. + + min := 0 // inclusive + max := f.Size() // exclusive + for { + offset := (min + max) / 2 + pos := f.Pos(offset) + posn := f.Position(pos) + if posn.Line == line { + return pos - (token.Pos(posn.Column) - 1) + } + + if min+1 >= max { + return token.NoPos + } + + if posn.Line < line { + min = offset + } else { + max = offset + } + } +} diff --git a/vendor/golang.org/x/tools/internal/span/token112.go b/vendor/golang.org/x/tools/internal/span/token112.go new file mode 100644 index 00000000000..017aec9c13e --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/token112.go @@ -0,0 +1,16 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.12 + +package span + +import ( + "go/token" +) + +// TODO(rstambler): Delete this file when we no longer support Go 1.11. +func lineStart(f *token.File, line int) token.Pos { + return f.LineStart(line) +} diff --git a/vendor/golang.org/x/tools/internal/span/uri.go b/vendor/golang.org/x/tools/internal/span/uri.go new file mode 100644 index 00000000000..f9f77600761 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/uri.go @@ -0,0 +1,165 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package span + +import ( + "fmt" + "net/url" + "os" + "path" + "path/filepath" + "runtime" + "strings" + "unicode" +) + +const fileScheme = "file" + +// URI represents the full URI for a file. +type URI string + +func (uri URI) IsFile() bool { + return strings.HasPrefix(string(uri), "file://") +} + +// Filename returns the file path for the given URI. +// It is an error to call this on a URI that is not a valid filename. +func (uri URI) Filename() string { + filename, err := filename(uri) + if err != nil { + panic(err) + } + return filepath.FromSlash(filename) +} + +func filename(uri URI) (string, error) { + if uri == "" { + return "", nil + } + u, err := url.ParseRequestURI(string(uri)) + if err != nil { + return "", err + } + if u.Scheme != fileScheme { + return "", fmt.Errorf("only file URIs are supported, got %q from %q", u.Scheme, uri) + } + // If the URI is a Windows URI, we trim the leading "/" and lowercase + // the drive letter, which will never be case sensitive. + if isWindowsDriveURIPath(u.Path) { + u.Path = strings.ToUpper(string(u.Path[1])) + u.Path[2:] + } + return u.Path, nil +} + +func URIFromURI(s string) URI { + if !strings.HasPrefix(s, "file:///") { + return URI(s) + } + + // Even though the input is a URI, it may not be in canonical form. VS Code + // in particular over-escapes :, @, etc. Unescape and re-encode to canonicalize. + path, err := url.PathUnescape(s[len("file://"):]) + if err != nil { + panic(err) + } + + // File URIs from Windows may have lowercase drive letters. + // Since drive letters are guaranteed to be case insensitive, + // we change them to uppercase to remain consistent. + // For example, file:///c:/x/y/z becomes file:///C:/x/y/z. + if isWindowsDriveURIPath(path) { + path = path[:1] + strings.ToUpper(string(path[1])) + path[2:] + } + u := url.URL{Scheme: fileScheme, Path: path} + return URI(u.String()) +} + +func CompareURI(a, b URI) int { + if equalURI(a, b) { + return 0 + } + if a < b { + return -1 + } + return 1 +} + +func equalURI(a, b URI) bool { + if a == b { + return true + } + // If we have the same URI basename, we may still have the same file URIs. + if !strings.EqualFold(path.Base(string(a)), path.Base(string(b))) { + return false + } + fa, err := filename(a) + if err != nil { + return false + } + fb, err := filename(b) + if err != nil { + return false + } + // Stat the files to check if they are equal. + infoa, err := os.Stat(filepath.FromSlash(fa)) + if err != nil { + return false + } + infob, err := os.Stat(filepath.FromSlash(fb)) + if err != nil { + return false + } + return os.SameFile(infoa, infob) +} + +// URIFromPath returns a span URI for the supplied file path. +// It will always have the file scheme. +func URIFromPath(path string) URI { + if path == "" { + return "" + } + // Handle standard library paths that contain the literal "$GOROOT". + // TODO(rstambler): The go/packages API should allow one to determine a user's $GOROOT. + const prefix = "$GOROOT" + if len(path) >= len(prefix) && strings.EqualFold(prefix, path[:len(prefix)]) { + suffix := path[len(prefix):] + path = runtime.GOROOT() + suffix + } + if !isWindowsDrivePath(path) { + if abs, err := filepath.Abs(path); err == nil { + path = abs + } + } + // Check the file path again, in case it became absolute. + if isWindowsDrivePath(path) { + path = "/" + strings.ToUpper(string(path[0])) + path[1:] + } + path = filepath.ToSlash(path) + u := url.URL{ + Scheme: fileScheme, + Path: path, + } + return URI(u.String()) +} + +// isWindowsDrivePath returns true if the file path is of the form used by +// Windows. We check if the path begins with a drive letter, followed by a ":". +// For example: C:/x/y/z. +func isWindowsDrivePath(path string) bool { + if len(path) < 3 { + return false + } + return unicode.IsLetter(rune(path[0])) && path[1] == ':' +} + +// isWindowsDriveURI returns true if the file URI is of the format used by +// Windows URIs. The url.Parse package does not specially handle Windows paths +// (see golang/go#6027). We check if the URI path has a drive prefix (e.g. "/C:"). +func isWindowsDriveURIPath(uri string) bool { + if len(uri) < 4 { + return false + } + return uri[0] == '/' && unicode.IsLetter(rune(uri[1])) && uri[2] == ':' +} diff --git a/vendor/golang.org/x/tools/internal/span/utf16.go b/vendor/golang.org/x/tools/internal/span/utf16.go new file mode 100644 index 00000000000..561b3fa50a8 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/span/utf16.go @@ -0,0 +1,94 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package span + +import ( + "fmt" + "unicode/utf16" + "unicode/utf8" +) + +// ToUTF16Column calculates the utf16 column expressed by the point given the +// supplied file contents. +// This is used to convert from the native (always in bytes) column +// representation and the utf16 counts used by some editors. +func ToUTF16Column(p Point, content []byte) (int, error) { + if content == nil { + return -1, fmt.Errorf("ToUTF16Column: missing content") + } + if !p.HasPosition() { + return -1, fmt.Errorf("ToUTF16Column: point is missing position") + } + if !p.HasOffset() { + return -1, fmt.Errorf("ToUTF16Column: point is missing offset") + } + offset := p.Offset() // 0-based + colZero := p.Column() - 1 // 0-based + if colZero == 0 { + // 0-based column 0, so it must be chr 1 + return 1, nil + } else if colZero < 0 { + return -1, fmt.Errorf("ToUTF16Column: column is invalid (%v)", colZero) + } + // work out the offset at the start of the line using the column + lineOffset := offset - colZero + if lineOffset < 0 || offset > len(content) { + return -1, fmt.Errorf("ToUTF16Column: offsets %v-%v outside file contents (%v)", lineOffset, offset, len(content)) + } + // Use the offset to pick out the line start. + // This cannot panic: offset > len(content) and lineOffset < offset. + start := content[lineOffset:] + + // Now, truncate down to the supplied column. + start = start[:colZero] + + // and count the number of utf16 characters + // in theory we could do this by hand more efficiently... + return len(utf16.Encode([]rune(string(start)))) + 1, nil +} + +// FromUTF16Column advances the point by the utf16 character offset given the +// supplied line contents. +// This is used to convert from the utf16 counts used by some editors to the +// native (always in bytes) column representation. +func FromUTF16Column(p Point, chr int, content []byte) (Point, error) { + if !p.HasOffset() { + return Point{}, fmt.Errorf("FromUTF16Column: point is missing offset") + } + // if chr is 1 then no adjustment needed + if chr <= 1 { + return p, nil + } + if p.Offset() >= len(content) { + return p, fmt.Errorf("FromUTF16Column: offset (%v) greater than length of content (%v)", p.Offset(), len(content)) + } + remains := content[p.Offset():] + // scan forward the specified number of characters + for count := 1; count < chr; count++ { + if len(remains) <= 0 { + return Point{}, fmt.Errorf("FromUTF16Column: chr goes beyond the content") + } + r, w := utf8.DecodeRune(remains) + if r == '\n' { + // Per the LSP spec: + // + // > If the character value is greater than the line length it + // > defaults back to the line length. + break + } + remains = remains[w:] + if r >= 0x10000 { + // a two point rune + count++ + // if we finished in a two point rune, do not advance past the first + if count >= chr { + break + } + } + p.v.Column += w + p.v.Offset += w + } + return p, nil +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/event.go b/vendor/golang.org/x/tools/internal/telemetry/event/event.go new file mode 100644 index 00000000000..2b990c5c1e0 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/event.go @@ -0,0 +1,113 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package event provides support for event based telemetry. +package event + +import ( + "fmt" + "time" +) + +type eventType uint8 + +const ( + invalidType = eventType(iota) + LogType // an event that should be recorded in a log + StartSpanType // the start of a span of time + EndSpanType // the end of a span of time + LabelType // some values that should be noted for later events + DetachType // an event that causes a context to detach + RecordType // a value that should be tracked +) + +// sTags is used to hold a small number of tags inside an event whichout +// requiring a separate allocation. +// As tags are often on the stack, this avoids an allocation at all for +// the very common cases of simple events. +// The length needs to be large enough to cope with the majority of events +// but no so large as to cause undue stack pressure. +// A log message with two values will use 3 tags (one for each value and +// one for the message itself). +type sTags [3]Tag + +// Event holds the information about an event of note that ocurred. +type Event struct { + At time.Time + + typ eventType + static sTags // inline storage for the first few tags + dynamic []Tag // dynamically sized storage for remaining tags +} + +// eventTagMap implements TagMap for a the tags of an Event. +type eventTagMap struct { + event Event +} + +func (ev Event) IsLog() bool { return ev.typ == LogType } +func (ev Event) IsEndSpan() bool { return ev.typ == EndSpanType } +func (ev Event) IsStartSpan() bool { return ev.typ == StartSpanType } +func (ev Event) IsLabel() bool { return ev.typ == LabelType } +func (ev Event) IsDetach() bool { return ev.typ == DetachType } +func (ev Event) IsRecord() bool { return ev.typ == RecordType } + +func (ev Event) Format(f fmt.State, r rune) { + tagMap := TagMap(ev) + if !ev.At.IsZero() { + fmt.Fprint(f, ev.At.Format("2006/01/02 15:04:05 ")) + } + msg := Msg.Get(tagMap) + err := Err.Get(tagMap) + fmt.Fprint(f, msg) + if err != nil { + if f.Flag('+') { + fmt.Fprintf(f, ": %+v", err) + } else { + fmt.Fprintf(f, ": %v", err) + } + } + for index := 0; ev.Valid(index); index++ { + tag := ev.Tag(index) + // msg and err were both already printed above, so we skip them to avoid + // double printing + if !tag.Valid() || tag.Key() == Msg || tag.Key() == Err { + continue + } + fmt.Fprintf(f, "\n\t%v", tag) + } +} + +func (ev Event) Valid(index int) bool { + return index >= 0 && index < len(ev.static)+len(ev.dynamic) +} + +func (ev Event) Tag(index int) Tag { + if index < len(ev.static) { + return ev.static[index] + } + return ev.dynamic[index-len(ev.static)] +} + +func (ev Event) Find(key Key) Tag { + for _, tag := range ev.static { + if tag.Key() == key { + return tag + } + } + for _, tag := range ev.dynamic { + if tag.Key() == key { + return tag + } + } + return Tag{} +} + +func makeEvent(typ eventType, static sTags, tags []Tag) Event { + return Event{ + typ: typ, + static: static, + dynamic: tags, + } +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/export.go b/vendor/golang.org/x/tools/internal/telemetry/event/export.go new file mode 100644 index 00000000000..a2633b60230 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/export.go @@ -0,0 +1,68 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "context" + "sync/atomic" + "time" + "unsafe" +) + +// Exporter is a function that handles events. +// It may return a modified context and event. +type Exporter func(context.Context, Event, TagMap) context.Context + +var ( + exporter unsafe.Pointer +) + +// SetExporter sets the global exporter function that handles all events. +// The exporter is called synchronously from the event call site, so it should +// return quickly so as not to hold up user code. +func SetExporter(e Exporter) { + p := unsafe.Pointer(&e) + if e == nil { + // &e is always valid, and so p is always valid, but for the early abort + // of ProcessEvent to be efficient it needs to make the nil check on the + // pointer without having to dereference it, so we make the nil function + // also a nil pointer + p = nil + } + atomic.StorePointer(&exporter, p) +} + +// deliver is called to deliver an event to the supplied exporter. +// it will fill in the time and generate the basic tag source. +func deliver(ctx context.Context, exporter Exporter, ev Event) context.Context { + // add the current time to the event + ev.At = time.Now() + // hand the event off to the current exporter + return exporter(ctx, ev, ev) +} + +// dispatch is called to deliver an event to the global exporter if set. +func dispatch(ctx context.Context, ev Event) context.Context { + // get the global exporter and abort early if there is not one + exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter)) + if exporterPtr == nil { + return ctx + } + return deliver(ctx, *exporterPtr, ev) +} + +// dispatchPair is called to deliver a start event to the supplied exporter. +// It also returns a function that will deliver the end event to the same +// exporter. +// it will fill in the time and generate the basic tag source. +func dispatchPair(ctx context.Context, begin, end Event) (context.Context, func()) { + // get the global exporter and abort early if there is not one + exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter)) + if exporterPtr == nil { + return ctx, func() {} + } + ctx = deliver(ctx, *exporterPtr, begin) + return ctx, func() { deliver(ctx, *exporterPtr, end) } +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/key.go b/vendor/golang.org/x/tools/internal/telemetry/event/key.go new file mode 100644 index 00000000000..acde7511e39 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/key.go @@ -0,0 +1,565 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "fmt" + "io" + "math" + "strconv" +) + +var ( + // Msg is a key used to add message strings to tag lists. + Msg = NewStringKey("message", "a readable message") + // Name is used for things like traces that have a name. + Name = NewStringKey("name", "an entity name") + // Err is a key used to add error values to tag lists. + Err = NewErrorKey("error", "an error that occurred") +) + +// Key is used as the identity of a Tag. +// Keys are intended to be compared by pointer only, the name should be unique +// for communicating with external systems, but it is not required or enforced. +type Key interface { + // Name returns the key name. + Name() string + // Description returns a string that can be used to describe the value. + Description() string + + // Format is used in formatting to append the value of the tag to the + // supplied buffer. + // The formatter may use the supplied buf as a scratch area to avoid + // allocations. + Format(w io.Writer, buf []byte, tag Tag) +} + +// ValueKey represents a key for untyped values. +type ValueKey struct { + name string + description string +} + +// NewKey creates a new Key for untyped values. +func NewKey(name, description string) *ValueKey { + return &ValueKey{name: name, description: description} +} + +func (k *ValueKey) Name() string { return k.name } +func (k *ValueKey) Description() string { return k.description } + +func (k *ValueKey) Format(w io.Writer, buf []byte, tag Tag) { + fmt.Fprint(w, k.From(tag)) +} + +// Get can be used to get a tag for the key from a TagMap. +func (k *ValueKey) Get(tags TagMap) interface{} { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return nil +} + +// From can be used to get a value from a Tag. +func (k *ValueKey) From(t Tag) interface{} { return t.UnpackValue() } + +// Of creates a new Tag with this key and the supplied value. +func (k *ValueKey) Of(value interface{}) Tag { return TagOfValue(k, value) } + +// IntKey represents a key +type IntKey struct { + name string + description string +} + +// NewIntKey creates a new Key for int values. +func NewIntKey(name, description string) *IntKey { + return &IntKey{name: name, description: description} +} + +func (k *IntKey) Name() string { return k.name } +func (k *IntKey) Description() string { return k.description } + +func (k *IntKey) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendInt(buf, int64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *IntKey) Of(v int) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *IntKey) Get(tags TagMap) int { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *IntKey) From(t Tag) int { return int(t.Unpack64()) } + +// Int8Key represents a key +type Int8Key struct { + name string + description string +} + +// NewInt8Key creates a new Key for int8 values. +func NewInt8Key(name, description string) *Int8Key { + return &Int8Key{name: name, description: description} +} + +func (k *Int8Key) Name() string { return k.name } +func (k *Int8Key) Description() string { return k.description } + +func (k *Int8Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendInt(buf, int64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *Int8Key) Of(v int8) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *Int8Key) Get(tags TagMap) int8 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *Int8Key) From(t Tag) int8 { return int8(t.Unpack64()) } + +// Int16Key represents a key +type Int16Key struct { + name string + description string +} + +// NewInt16Key creates a new Key for int16 values. +func NewInt16Key(name, description string) *Int16Key { + return &Int16Key{name: name, description: description} +} + +func (k *Int16Key) Name() string { return k.name } +func (k *Int16Key) Description() string { return k.description } + +func (k *Int16Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendInt(buf, int64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *Int16Key) Of(v int16) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *Int16Key) Get(tags TagMap) int16 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *Int16Key) From(t Tag) int16 { return int16(t.Unpack64()) } + +// Int32Key represents a key +type Int32Key struct { + name string + description string +} + +// NewInt32Key creates a new Key for int32 values. +func NewInt32Key(name, description string) *Int32Key { + return &Int32Key{name: name, description: description} +} + +func (k *Int32Key) Name() string { return k.name } +func (k *Int32Key) Description() string { return k.description } + +func (k *Int32Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendInt(buf, int64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *Int32Key) Of(v int32) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *Int32Key) Get(tags TagMap) int32 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *Int32Key) From(t Tag) int32 { return int32(t.Unpack64()) } + +// Int64Key represents a key +type Int64Key struct { + name string + description string +} + +// NewInt64Key creates a new Key for int64 values. +func NewInt64Key(name, description string) *Int64Key { + return &Int64Key{name: name, description: description} +} + +func (k *Int64Key) Name() string { return k.name } +func (k *Int64Key) Description() string { return k.description } + +func (k *Int64Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendInt(buf, k.From(tag), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *Int64Key) Of(v int64) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *Int64Key) Get(tags TagMap) int64 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *Int64Key) From(t Tag) int64 { return int64(t.Unpack64()) } + +// UIntKey represents a key +type UIntKey struct { + name string + description string +} + +// NewUIntKey creates a new Key for uint values. +func NewUIntKey(name, description string) *UIntKey { + return &UIntKey{name: name, description: description} +} + +func (k *UIntKey) Name() string { return k.name } +func (k *UIntKey) Description() string { return k.description } + +func (k *UIntKey) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendUint(buf, uint64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *UIntKey) Of(v uint) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *UIntKey) Get(tags TagMap) uint { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *UIntKey) From(t Tag) uint { return uint(t.Unpack64()) } + +// UInt8Key represents a key +type UInt8Key struct { + name string + description string +} + +// NewUInt8Key creates a new Key for uint8 values. +func NewUInt8Key(name, description string) *UInt8Key { + return &UInt8Key{name: name, description: description} +} + +func (k *UInt8Key) Name() string { return k.name } +func (k *UInt8Key) Description() string { return k.description } + +func (k *UInt8Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendUint(buf, uint64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *UInt8Key) Of(v uint8) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *UInt8Key) Get(tags TagMap) uint8 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *UInt8Key) From(t Tag) uint8 { return uint8(t.Unpack64()) } + +// UInt16Key represents a key +type UInt16Key struct { + name string + description string +} + +// NewUInt16Key creates a new Key for uint16 values. +func NewUInt16Key(name, description string) *UInt16Key { + return &UInt16Key{name: name, description: description} +} + +func (k *UInt16Key) Name() string { return k.name } +func (k *UInt16Key) Description() string { return k.description } + +func (k *UInt16Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendUint(buf, uint64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *UInt16Key) Of(v uint16) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *UInt16Key) Get(tags TagMap) uint16 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *UInt16Key) From(t Tag) uint16 { return uint16(t.Unpack64()) } + +// UInt32Key represents a key +type UInt32Key struct { + name string + description string +} + +// NewUInt32Key creates a new Key for uint32 values. +func NewUInt32Key(name, description string) *UInt32Key { + return &UInt32Key{name: name, description: description} +} + +func (k *UInt32Key) Name() string { return k.name } +func (k *UInt32Key) Description() string { return k.description } + +func (k *UInt32Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendUint(buf, uint64(k.From(tag)), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *UInt32Key) Of(v uint32) Tag { return TagOf64(k, uint64(v)) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *UInt32Key) Get(tags TagMap) uint32 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *UInt32Key) From(t Tag) uint32 { return uint32(t.Unpack64()) } + +// UInt64Key represents a key +type UInt64Key struct { + name string + description string +} + +// NewUInt64Key creates a new Key for uint64 values. +func NewUInt64Key(name, description string) *UInt64Key { + return &UInt64Key{name: name, description: description} +} + +func (k *UInt64Key) Name() string { return k.name } +func (k *UInt64Key) Description() string { return k.description } + +func (k *UInt64Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendUint(buf, k.From(tag), 10)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *UInt64Key) Of(v uint64) Tag { return TagOf64(k, v) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *UInt64Key) Get(tags TagMap) uint64 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *UInt64Key) From(t Tag) uint64 { return t.Unpack64() } + +// Float32Key represents a key +type Float32Key struct { + name string + description string +} + +// NewFloat32Key creates a new Key for float32 values. +func NewFloat32Key(name, description string) *Float32Key { + return &Float32Key{name: name, description: description} +} + +func (k *Float32Key) Name() string { return k.name } +func (k *Float32Key) Description() string { return k.description } + +func (k *Float32Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendFloat(buf, float64(k.From(tag)), 'E', -1, 32)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *Float32Key) Of(v float32) Tag { + return TagOf64(k, uint64(math.Float32bits(v))) +} + +// Get can be used to get a tag for the key from a TagMap. +func (k *Float32Key) Get(tags TagMap) float32 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *Float32Key) From(t Tag) float32 { + return math.Float32frombits(uint32(t.Unpack64())) +} + +// Float64Key represents a key +type Float64Key struct { + name string + description string +} + +// NewFloat64Key creates a new Key for int64 values. +func NewFloat64Key(name, description string) *Float64Key { + return &Float64Key{name: name, description: description} +} + +func (k *Float64Key) Name() string { return k.name } +func (k *Float64Key) Description() string { return k.description } + +func (k *Float64Key) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendFloat(buf, k.From(tag), 'E', -1, 64)) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *Float64Key) Of(v float64) Tag { + return TagOf64(k, math.Float64bits(v)) +} + +// Get can be used to get a tag for the key from a TagMap. +func (k *Float64Key) Get(tags TagMap) float64 { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Tag. +func (k *Float64Key) From(t Tag) float64 { + return math.Float64frombits(t.Unpack64()) +} + +// StringKey represents a key +type StringKey struct { + name string + description string +} + +// NewStringKey creates a new Key for int64 values. +func NewStringKey(name, description string) *StringKey { + return &StringKey{name: name, description: description} +} + +func (k *StringKey) Name() string { return k.name } +func (k *StringKey) Description() string { return k.description } + +func (k *StringKey) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendQuote(buf, k.From(tag))) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *StringKey) Of(v string) Tag { return TagOfString(k, v) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *StringKey) Get(tags TagMap) string { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return "" +} + +// From can be used to get a value from a Tag. +func (k *StringKey) From(t Tag) string { return t.UnpackString() } + +// BooleanKey represents a key +type BooleanKey struct { + name string + description string +} + +// NewBooleanKey creates a new Key for bool values. +func NewBooleanKey(name, description string) *BooleanKey { + return &BooleanKey{name: name, description: description} +} + +func (k *BooleanKey) Name() string { return k.name } +func (k *BooleanKey) Description() string { return k.description } + +func (k *BooleanKey) Format(w io.Writer, buf []byte, tag Tag) { + w.Write(strconv.AppendBool(buf, k.From(tag))) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *BooleanKey) Of(v bool) Tag { + if v { + return TagOf64(k, 1) + } + return TagOf64(k, 0) +} + +// Get can be used to get a tag for the key from a TagMap. +func (k *BooleanKey) Get(tags TagMap) bool { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return false +} + +// From can be used to get a value from a Tag. +func (k *BooleanKey) From(t Tag) bool { return t.Unpack64() > 0 } + +// ErrorKey represents a key +type ErrorKey struct { + name string + description string +} + +// NewErrorKey creates a new Key for int64 values. +func NewErrorKey(name, description string) *ErrorKey { + return &ErrorKey{name: name, description: description} +} + +func (k *ErrorKey) Name() string { return k.name } +func (k *ErrorKey) Description() string { return k.description } + +func (k *ErrorKey) Format(w io.Writer, buf []byte, tag Tag) { + io.WriteString(w, k.From(tag).Error()) +} + +// Of creates a new Tag with this key and the supplied value. +func (k *ErrorKey) Of(v error) Tag { return TagOfValue(k, v) } + +// Get can be used to get a tag for the key from a TagMap. +func (k *ErrorKey) Get(tags TagMap) error { + if t := tags.Find(k); t.Valid() { + return k.From(t) + } + return nil +} + +// From can be used to get a value from a Tag. +func (k *ErrorKey) From(t Tag) error { + err, _ := t.UnpackValue().(error) + return err +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/label.go b/vendor/golang.org/x/tools/internal/telemetry/event/label.go new file mode 100644 index 00000000000..edd34bb08c4 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/label.go @@ -0,0 +1,29 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "context" +) + +// Label sends a label event to the exporter with the supplied tags. +func Label(ctx context.Context, tags ...Tag) context.Context { + return dispatch(ctx, makeEvent(LabelType, sTags{}, tags)) +} + +// Label1 sends a label event to the exporter with the supplied tags. +func Label1(ctx context.Context, t1 Tag) context.Context { + return dispatch(ctx, makeEvent(LabelType, sTags{t1}, nil)) +} + +// Label2 sends a label event to the exporter with the supplied tags. +func Label2(ctx context.Context, t1, t2 Tag) context.Context { + return dispatch(ctx, makeEvent(LabelType, sTags{t1, t2}, nil)) +} + +// Label3 sends a label event to the exporter with the supplied tags. +func Label3(ctx context.Context, t1, t2, t3 Tag) context.Context { + return dispatch(ctx, makeEvent(LabelType, sTags{t1, t2, t3}, nil)) +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/log.go b/vendor/golang.org/x/tools/internal/telemetry/event/log.go new file mode 100644 index 00000000000..8d0a046e78b --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/log.go @@ -0,0 +1,68 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "context" + "errors" + "fmt" +) + +// Log sends a log event with the supplied tag list to the exporter. +func Log(ctx context.Context, tags ...Tag) { + dispatch(ctx, makeEvent(LogType, sTags{}, tags)) +} + +// Log1 sends a label event to the exporter with the supplied tags. +func Log1(ctx context.Context, t1 Tag) context.Context { + return dispatch(ctx, makeEvent(LogType, sTags{t1}, nil)) +} + +// Log2 sends a label event to the exporter with the supplied tags. +func Log2(ctx context.Context, t1, t2 Tag) context.Context { + return dispatch(ctx, makeEvent(LogType, sTags{t1, t2}, nil)) +} + +// Log3 sends a label event to the exporter with the supplied tags. +func Log3(ctx context.Context, t1, t2, t3 Tag) context.Context { + return dispatch(ctx, makeEvent(LogType, sTags{t1, t2, t3}, nil)) +} + +// Print takes a message and a tag list and combines them into a single event +// before delivering them to the exporter. +func Print(ctx context.Context, message string, tags ...Tag) { + dispatch(ctx, makeEvent(LogType, sTags{Msg.Of(message)}, tags)) +} + +// Print1 takes a message and one tag delivers a log event to the exporter. +// It is a customized version of Print that is faster and does no allocation. +func Print1(ctx context.Context, message string, t1 Tag) { + dispatch(ctx, makeEvent(LogType, sTags{Msg.Of(message), t1}, nil)) +} + +// Print2 takes a message and two tags and delivers a log event to the exporter. +// It is a customized version of Print that is faster and does no allocation. +func Print2(ctx context.Context, message string, t1 Tag, t2 Tag) { + dispatch(ctx, makeEvent(LogType, sTags{Msg.Of(message), t1, t2}, nil)) +} + +// Error takes a message and a tag list and combines them into a single event +// before delivering them to the exporter. It captures the error in the +// delivered event. +func Error(ctx context.Context, message string, err error, tags ...Tag) { + if err == nil { + err = errors.New(message) + message = "" + } + dispatch(ctx, makeEvent(LogType, sTags{Msg.Of(message), Err.Of(err)}, tags)) +} + +// Debugf sends a log event with the supplied message to the exporter. +// This is intended only for temporary debugging lines, and usage should not +// normally be checked in, preffering structured log events for things +// that have to be used in production. +func Debugf(ctx context.Context, message string, args ...interface{}) { + dispatch(ctx, makeEvent(LogType, sTags{Msg.Of(fmt.Sprintf(message, args...))}, nil)) +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/metric.go b/vendor/golang.org/x/tools/internal/telemetry/event/metric.go new file mode 100644 index 00000000000..e4092bb0d33 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/metric.go @@ -0,0 +1,29 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "context" +) + +// Record sends a label event to the exporter with the supplied tags. +func Record(ctx context.Context, tags ...Tag) context.Context { + return dispatch(ctx, makeEvent(RecordType, sTags{}, tags)) +} + +// Record1 sends a label event to the exporter with the supplied tags. +func Record1(ctx context.Context, t1 Tag) context.Context { + return dispatch(ctx, makeEvent(RecordType, sTags{t1}, nil)) +} + +// Record2 sends a label event to the exporter with the supplied tags. +func Record2(ctx context.Context, t1, t2 Tag) context.Context { + return dispatch(ctx, makeEvent(RecordType, sTags{t1, t2}, nil)) +} + +// Record3 sends a label event to the exporter with the supplied tags. +func Record3(ctx context.Context, t1, t2, t3 Tag) context.Context { + return dispatch(ctx, makeEvent(RecordType, sTags{t1, t2, t3}, nil)) +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/tag.go b/vendor/golang.org/x/tools/internal/telemetry/event/tag.go new file mode 100644 index 00000000000..5230736ef3c --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/tag.go @@ -0,0 +1,197 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "fmt" + "io" + "reflect" + "unsafe" +) + +// Tag holds a key and value pair. +// It is normally used when passing around lists of tags. +type Tag struct { + key Key + packed uint64 + untyped interface{} +} + +// TagMap is the interface to a collection of Tags indexed by key. +type TagMap interface { + // Find returns the tag that matches the supplied key. + Find(key Key) Tag +} + +// TagList is the interface to something that provides an iterable +// list of tags. +// Iteration should start from 0 and continue until Valid returns false. +type TagList interface { + // Valid returns true if the index is within range for the list. + // It does not imply the tag at that index will itself be valid. + Valid(index int) bool + // Tag returns the tag at the given index. + Tag(index int) Tag +} + +// tagList implements TagList for a list of Tags. +type tagList struct { + tags []Tag +} + +// tagFilter wraps a TagList filtering out specific tags. +type tagFilter struct { + keys []Key + underlying TagList +} + +// tagMap implements TagMap for a simple list of tags. +type tagMap struct { + tags []Tag +} + +// tagMapChain implements TagMap for a list of underlying TagMap. +type tagMapChain struct { + maps []TagMap +} + +// TagOfValue creates a new tag from the key and value. +// This method is for implementing new key types, tag creation should +// normally be done with the Of method of the key. +func TagOfValue(k Key, value interface{}) Tag { return Tag{key: k, untyped: value} } + +// UnpackValue assumes the tag was built using TagOfValue and returns the value +// that was passed to that constructor. +// This method is for implementing new key types, for type safety normal +// access should be done with the From method of the key. +func (t Tag) UnpackValue() interface{} { return t.untyped } + +// TagOf64 creates a new tag from a key and a uint64. This is often +// used for non uint64 values that can be packed into a uint64. +// This method is for implementing new key types, tag creation should +// normally be done with the Of method of the key. +func TagOf64(k Key, v uint64) Tag { return Tag{key: k, packed: v} } + +// Unpack64 assumes the tag was built using TagOf64 and returns the value that +// was passed to that constructor. +// This method is for implementing new key types, for type safety normal +// access should be done with the From method of the key. +func (t Tag) Unpack64() uint64 { return t.packed } + +// TagOfString creates a new tag from a key and a string. +// This method is for implementing new key types, tag creation should +// normally be done with the Of method of the key. +func TagOfString(k Key, v string) Tag { + hdr := (*reflect.StringHeader)(unsafe.Pointer(&v)) + return Tag{ + key: k, + packed: uint64(hdr.Len), + untyped: unsafe.Pointer(hdr.Data), + } +} + +// UnpackString assumes the tag was built using TagOfString and returns the +// value that was passed to that constructor. +// This method is for implementing new key types, for type safety normal +// access should be done with the From method of the key. +func (t Tag) UnpackString() string { + var v string + hdr := (*reflect.StringHeader)(unsafe.Pointer(&v)) + hdr.Data = uintptr(t.untyped.(unsafe.Pointer)) + hdr.Len = int(t.packed) + return *(*string)(unsafe.Pointer(hdr)) +} + +// Valid returns true if the Tag is a valid one (it has a key). +func (t Tag) Valid() bool { return t.key != nil } + +// Key returns the key of this Tag. +func (t Tag) Key() Key { return t.key } + +// Format is used for debug printing of tags. +func (t Tag) Format(f fmt.State, r rune) { + if !t.Valid() { + io.WriteString(f, `nil`) + return + } + io.WriteString(f, t.Key().Name()) + io.WriteString(f, "=") + var buf [128]byte + t.Key().Format(f, buf[:0], t) +} + +func (l *tagList) Valid(index int) bool { + return index >= 0 && index < len(l.tags) +} + +func (l *tagList) Tag(index int) Tag { + return l.tags[index] +} + +func (f *tagFilter) Valid(index int) bool { + return f.underlying.Valid(index) +} + +func (f *tagFilter) Tag(index int) Tag { + tag := f.underlying.Tag(index) + for _, f := range f.keys { + if tag.Key() == f { + return Tag{} + } + } + return tag +} + +func (l tagMap) Find(key Key) Tag { + for _, tag := range l.tags { + if tag.Key() == key { + return tag + } + } + return Tag{} +} + +func (c tagMapChain) Find(key Key) Tag { + for _, src := range c.maps { + tag := src.Find(key) + if tag.Valid() { + return tag + } + } + return Tag{} +} + +var emptyList = &tagList{} + +func NewTagList(tags ...Tag) TagList { + if len(tags) == 0 { + return emptyList + } + return &tagList{tags: tags} +} + +func Filter(l TagList, keys ...Key) TagList { + if len(keys) == 0 { + return l + } + return &tagFilter{keys: keys, underlying: l} +} + +func NewTagMap(tags ...Tag) TagMap { + return tagMap{tags: tags} +} + +func MergeTagMaps(srcs ...TagMap) TagMap { + var nonNil []TagMap + for _, src := range srcs { + if src != nil { + nonNil = append(nonNil, src) + } + } + if len(nonNil) == 1 { + return nonNil[0] + } + return tagMapChain{maps: nonNil} +} diff --git a/vendor/golang.org/x/tools/internal/telemetry/event/trace.go b/vendor/golang.org/x/tools/internal/telemetry/event/trace.go new file mode 100644 index 00000000000..2c40341ff40 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/telemetry/event/trace.go @@ -0,0 +1,42 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "context" +) + +// StartSpan sends a span start event with the supplied tag list to the exporter. +// It also returns a function that will end the span, which should normally be +// deferred. +func StartSpan(ctx context.Context, name string, tags ...Tag) (context.Context, func()) { + return dispatchPair(ctx, + makeEvent(StartSpanType, sTags{Name.Of(name)}, tags), + makeEvent(EndSpanType, sTags{}, nil)) +} + +// StartSpan1 sends a span start event with the supplied tag list to the exporter. +// It also returns a function that will end the span, which should normally be +// deferred. +func StartSpan1(ctx context.Context, name string, t1 Tag) (context.Context, func()) { + return dispatchPair(ctx, + makeEvent(StartSpanType, sTags{Name.Of(name), t1}, nil), + makeEvent(EndSpanType, sTags{}, nil)) +} + +// StartSpan2 sends a span start event with the supplied tag list to the exporter. +// It also returns a function that will end the span, which should normally be +// deferred. +func StartSpan2(ctx context.Context, name string, t1, t2 Tag) (context.Context, func()) { + return dispatchPair(ctx, + makeEvent(StartSpanType, sTags{Name.Of(name), t1, t2}, nil), + makeEvent(EndSpanType, sTags{}, nil)) +} + +// Detach returns a context without an associated span. +// This allows the creation of spans that are not children of the current span. +func Detach(ctx context.Context) context.Context { + return dispatch(ctx, makeEvent(DetachType, sTags{}, nil)) +} diff --git a/vendor/golang.org/x/xerrors/fmt.go b/vendor/golang.org/x/xerrors/fmt.go index 74c1c93ec9c..829862ddf6a 100644 --- a/vendor/golang.org/x/xerrors/fmt.go +++ b/vendor/golang.org/x/xerrors/fmt.go @@ -7,10 +7,14 @@ package xerrors import ( "fmt" "strings" + "unicode" + "unicode/utf8" "golang.org/x/xerrors/internal" ) +const percentBangString = "%!" + // Errorf formats according to a format specifier and returns the string as a // value that satisfies error. // @@ -18,29 +22,71 @@ import ( // formatted with additional detail enabled. If the last argument is an error // the returned error's Format method will return it if the format string ends // with ": %s", ": %v", or ": %w". If the last argument is an error and the -// format string ends with ": %w", the returned error implements Wrapper -// with an Unwrap method returning it. +// format string ends with ": %w", the returned error implements an Unwrap +// method returning it. +// +// If the format specifier includes a %w verb with an error operand in a +// position other than at the end, the returned error will still implement an +// Unwrap method returning the operand, but the error's Format method will not +// return the wrapped error. +// +// It is invalid to include more than one %w verb or to supply it with an +// operand that does not implement the error interface. The %w verb is otherwise +// a synonym for %v. func Errorf(format string, a ...interface{}) error { - err, wrap := lastError(format, a) format = formatPlusW(format) - if err == nil { - return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} + // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter. + wrap := strings.HasSuffix(format, ": %w") + idx, format2, ok := parsePercentW(format) + percentWElsewhere := !wrap && idx >= 0 + if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) { + err := errorAt(a, len(a)-1) + if err == nil { + return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} + } + // TODO: this is not entirely correct. The error value could be + // printed elsewhere in format if it mixes numbered with unnumbered + // substitutions. With relatively small changes to doPrintf we can + // have it optionally ignore extra arguments and pass the argument + // list in its entirety. + msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) + frame := Frame{} + if internal.EnableTrace { + frame = Caller(1) + } + if wrap { + return &wrapError{msg, err, frame} + } + return &noWrapError{msg, err, frame} + } + // Support %w anywhere. + // TODO: don't repeat the wrapped error's message when %w occurs in the middle. + msg := fmt.Sprintf(format2, a...) + if idx < 0 { + return &noWrapError{msg, nil, Caller(1)} + } + err := errorAt(a, idx) + if !ok || err == nil { + // Too many %ws or argument of %w is not an error. Approximate the Go + // 1.13 fmt.Errorf message. + return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)} } - - // TODO: this is not entirely correct. The error value could be - // printed elsewhere in format if it mixes numbered with unnumbered - // substitutions. With relatively small changes to doPrintf we can - // have it optionally ignore extra arguments and pass the argument - // list in its entirety. - msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) frame := Frame{} if internal.EnableTrace { frame = Caller(1) } - if wrap { - return &wrapError{msg, err, frame} + return &wrapError{msg, err, frame} +} + +func errorAt(args []interface{}, i int) error { + if i < 0 || i >= len(args) { + return nil } - return &noWrapError{msg, err, frame} + err, ok := args[i].(error) + if !ok { + return nil + } + return err } // formatPlusW is used to avoid the vet check that will barf at %w. @@ -48,24 +94,56 @@ func formatPlusW(s string) string { return s } -func lastError(format string, a []interface{}) (err error, wrap bool) { - wrap = strings.HasSuffix(format, ": %w") - if !wrap && - !strings.HasSuffix(format, ": %s") && - !strings.HasSuffix(format, ": %v") { - return nil, false - } - - if len(a) == 0 { - return nil, false +// Return the index of the only %w in format, or -1 if none. +// Also return a rewritten format string with %w replaced by %v, and +// false if there is more than one %w. +// TODO: handle "%[N]w". +func parsePercentW(format string) (idx int, newFormat string, ok bool) { + // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go. + idx = -1 + ok = true + n := 0 + sz := 0 + var isW bool + for i := 0; i < len(format); i += sz { + if format[i] != '%' { + sz = 1 + continue + } + // "%%" is not a format directive. + if i+1 < len(format) && format[i+1] == '%' { + sz = 2 + continue + } + sz, isW = parsePrintfVerb(format[i:]) + if isW { + if idx >= 0 { + ok = false + } else { + idx = n + } + // "Replace" the last character, the 'w', with a 'v'. + p := i + sz - 1 + format = format[:p] + "v" + format[p+1:] + } + n++ } + return idx, format, ok +} - err, ok := a[len(a)-1].(error) - if !ok { - return nil, false +// Parse the printf verb starting with a % at s[0]. +// Return how many bytes it occupies and whether the verb is 'w'. +func parsePrintfVerb(s string) (int, bool) { + // Assume only that the directive is a sequence of non-letters followed by a single letter. + sz := 0 + var r rune + for i := 1; i < len(s); i += sz { + r, sz = utf8.DecodeRuneInString(s[i:]) + if unicode.IsLetter(r) { + return i + sz, r == 'w' + } } - - return err, wrap + return len(s), false } type noWrapError struct { diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go index bf2f703fff5..4f3526e1db4 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go @@ -35,7 +35,9 @@ func init() { proto.RegisterExtension(E_Http) } -func init() { proto.RegisterFile("google/api/annotations.proto", fileDescriptor_c591c5aa9fb79aab) } +func init() { + proto.RegisterFile("google/api/annotations.proto", fileDescriptor_c591c5aa9fb79aab) +} var fileDescriptor_c591c5aa9fb79aab = []byte{ // 208 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go index 867fc0c3faa..9757593e922 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go @@ -55,7 +55,9 @@ func init() { proto.RegisterExtension(E_OauthScopes) } -func init() { proto.RegisterFile("google/api/client.proto", fileDescriptor_78f2c6f7c3a942c1) } +func init() { + proto.RegisterFile("google/api/client.proto", fileDescriptor_78f2c6f7c3a942c1) +} var fileDescriptor_78f2c6f7c3a942c1 = []byte{ // 262 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go index 31f87dd00d5..6e67a93febe 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go @@ -96,7 +96,9 @@ func init() { proto.RegisterExtension(E_FieldBehavior) } -func init() { proto.RegisterFile("google/api/field_behavior.proto", fileDescriptor_4648f18fd5079967) } +func init() { + proto.RegisterFile("google/api/field_behavior.proto", fileDescriptor_4648f18fd5079967) +} var fileDescriptor_4648f18fd5079967 = []byte{ // 303 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go index a63870374d3..6ed6f3c9176 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go @@ -599,7 +599,9 @@ func init() { proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern") } -func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_ff9994be407cdcc9) } +func init() { + proto.RegisterFile("google/api/http.proto", fileDescriptor_ff9994be407cdcc9) +} var fileDescriptor_ff9994be407cdcc9 = []byte{ // 419 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go index af057b90be5..d1d8eb54a3e 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go @@ -66,30 +66,106 @@ func (ResourceDescriptor_History) EnumDescriptor() ([]byte, []int) { // // Example: // -// message Topic { -// // Indicates this message defines a resource schema. -// // Declares the resource type in the format of {service}/{kind}. -// // For Kubernetes resources, the format is {api group}/{kind}. -// option (google.api.resource) = { -// type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" -// }; -// } +// message Topic { +// // Indicates this message defines a resource schema. +// // Declares the resource type in the format of {service}/{kind}. +// // For Kubernetes resources, the format is {api group}/{kind}. +// option (google.api.resource) = { +// type: "pubsub.googleapis.com/Topic" +// name_descriptor: { +// pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: "pubsub.googleapis.com/Topic" +// name_descriptor: +// - pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" // // Sometimes, resources have multiple patterns, typically because they can // live under multiple parents. // // Example: // -// message LogEntry { -// option (google.api.resource) = { -// type: "logging.googleapis.com/LogEntry" -// pattern: "projects/{project}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" -// }; -// } +// message LogEntry { +// option (google.api.resource) = { +// type: "logging.googleapis.com/LogEntry" +// name_descriptor: { +// pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } +// name_descriptor: { +// pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// } +// name_descriptor: { +// pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// } +// name_descriptor: { +// pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: 'logging.googleapis.com/LogEntry' +// name_descriptor: +// - pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// - pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// - pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// - pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// +// For flexible resources, the resource name doesn't contain parent names, but +// the resource itself has parents for policy evaluation. +// +// Example: +// +// message Shelf { +// option (google.api.resource) = { +// type: "library.googleapis.com/Shelf" +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// } +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: 'library.googleapis.com/Shelf' +// name_descriptor: +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" type ResourceDescriptor struct { // The resource type. It must be in the format of // {service_name}/{resource_type_kind}. The `resource_type_kind` must be @@ -102,11 +178,20 @@ type ResourceDescriptor struct { // should use PascalCase (UpperCamelCase). The maximum number of // characters allowed for the `resource_type_kind` is 100. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Optional. The valid resource name pattern(s) for this resource type. + // Optional. The relative resource name pattern associated with this resource + // type. The DNS prefix of the full resource name shouldn't be specified here. + // + // The path pattern must follow the syntax, which aligns with HTTP binding + // syntax: + // + // Template = Segment { "/" Segment } ; + // Segment = LITERAL | Variable ; + // Variable = "{" LITERAL "}" ; // // Examples: - // - "projects/{project}/topics/{topic}" - // - "projects/{project}/knowledgeBases/{knowledge_base}" + // + // - "projects/{project}/topics/{topic}" + // - "projects/{project}/knowledgeBases/{knowledge_base}" // // The components in braces correspond to the IDs for each resource in the // hierarchy. It is expected that, if multiple patterns are provided, @@ -119,21 +204,31 @@ type ResourceDescriptor struct { // Optional. The historical or future-looking state of the resource pattern. // // Example: - // // The InspectTemplate message originally only supported resource - // // names with organization, and project was added later. - // message InspectTemplate { - // option (google.api.resource) = { - // type: "dlp.googleapis.com/InspectTemplate" - // pattern: - // "organizations/{organization}/inspectTemplates/{inspect_template}" - // pattern: "projects/{project}/inspectTemplates/{inspect_template}" - // history: ORIGINALLY_SINGLE_PATTERN - // }; - // } - History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // + // // The InspectTemplate message originally only supported resource + // // names with organization, and project was added later. + // message InspectTemplate { + // option (google.api.resource) = { + // type: "dlp.googleapis.com/InspectTemplate" + // pattern: + // "organizations/{organization}/inspectTemplates/{inspect_template}" + // pattern: "projects/{project}/inspectTemplates/{inspect_template}" + // history: ORIGINALLY_SINGLE_PATTERN + // }; + // } + History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"` + // The plural name used in the resource name, such as 'projects' for + // the name of 'projects/{project}'. It is the same concept of the `plural` + // field in k8s CRD spec + // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + Plural string `protobuf:"bytes,5,opt,name=plural,proto3" json:"plural,omitempty"` + // The same concept of the `singular` field in k8s CRD spec + // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + // Such as "project" for the `resourcemanager.googleapis.com/Project` type. + Singular string `protobuf:"bytes,6,opt,name=singular,proto3" json:"singular,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ResourceDescriptor) Reset() { *m = ResourceDescriptor{} } @@ -189,21 +284,36 @@ func (m *ResourceDescriptor) GetHistory() ResourceDescriptor_History { return ResourceDescriptor_HISTORY_UNSPECIFIED } -// Defines a proto annotation that describes a field that refers to a resource. +func (m *ResourceDescriptor) GetPlural() string { + if m != nil { + return m.Plural + } + return "" +} + +func (m *ResourceDescriptor) GetSingular() string { + if m != nil { + return m.Singular + } + return "" +} + +// Defines a proto annotation that describes a string field that refers to +// an API resource. type ResourceReference struct { // The resource type that the annotated field references. // // Example: // - // message Subscription { - // string topic = 2 [(google.api.resource_reference) = { - // type = "pubsub.googleapis.com/Topic" - // }]; - // } + // message Subscription { + // string topic = 2 [(google.api.resource_reference) = { + // type: "pubsub.googleapis.com/Topic" + // }]; + // } Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // The resource type of a child collection that the annotated field - // references. This is useful for `parent` fields where a resource has more - // than one possible type of parent. + // references. This is useful for annotating the `parent` field that + // doesn't have a fixed resource type. // // Example: // @@ -266,6 +376,15 @@ var E_ResourceReference = &proto.ExtensionDesc{ Filename: "google/api/resource.proto", } +var E_ResourceDefinition = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: ([]*ResourceDescriptor)(nil), + Field: 1053, + Name: "google.api.resource_definition", + Tag: "bytes,1053,rep,name=resource_definition", + Filename: "google/api/resource.proto", +} + var E_Resource = &proto.ExtensionDesc{ ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*ResourceDescriptor)(nil), @@ -280,38 +399,45 @@ func init() { proto.RegisterType((*ResourceDescriptor)(nil), "google.api.ResourceDescriptor") proto.RegisterType((*ResourceReference)(nil), "google.api.ResourceReference") proto.RegisterExtension(E_ResourceReference) + proto.RegisterExtension(E_ResourceDefinition) proto.RegisterExtension(E_Resource) } -func init() { proto.RegisterFile("google/api/resource.proto", fileDescriptor_465e9122405d1bb5) } +func init() { + proto.RegisterFile("google/api/resource.proto", fileDescriptor_465e9122405d1bb5) +} var fileDescriptor_465e9122405d1bb5 = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x25, 0x59, 0x45, 0xd7, 0x0f, 0x31, 0x6d, 0x06, 0x89, 0x0c, 0x29, 0x10, 0xf5, 0x80, 0x7a, - 0x4a, 0xa4, 0x71, 0x1b, 0x17, 0x3a, 0x96, 0x76, 0x91, 0xba, 0x36, 0x72, 0xd3, 0xc3, 0x00, 0x29, - 0xf2, 0xd2, 0xaf, 0x59, 0xa4, 0xcc, 0xb6, 0x9c, 0xec, 0xd0, 0x1b, 0x7f, 0x04, 0x21, 0xf1, 0x2b, - 0x39, 0xa2, 0x3a, 0x71, 0x98, 0xd8, 0xb4, 0x9b, 0xf3, 0xde, 0xfb, 0xbe, 0xf7, 0xfc, 0x1c, 0x38, - 0xce, 0x85, 0xc8, 0x4b, 0x0c, 0x98, 0x2c, 0x02, 0x85, 0x95, 0xb8, 0x53, 0x19, 0xfa, 0x52, 0x89, - 0x5a, 0x10, 0x68, 0x28, 0x9f, 0xc9, 0xe2, 0xad, 0xd7, 0xca, 0x34, 0x73, 0x7d, 0xb7, 0x09, 0xd6, - 0x58, 0x65, 0xaa, 0x90, 0xb5, 0x50, 0x8d, 0x7a, 0xf8, 0xc3, 0x06, 0x42, 0xdb, 0x05, 0xe7, 0x1d, - 0x49, 0x08, 0xf4, 0xea, 0xad, 0x44, 0xc7, 0xf2, 0xac, 0xd1, 0x80, 0xea, 0x33, 0x71, 0xa0, 0x2f, - 0x59, 0x5d, 0xa3, 0xe2, 0x8e, 0xed, 0xed, 0x8d, 0x06, 0xd4, 0x7c, 0x12, 0x17, 0x80, 0xb3, 0x5b, - 0x4c, 0x37, 0x05, 0x96, 0x6b, 0x67, 0x4f, 0xcf, 0x0c, 0x76, 0xc8, 0x64, 0x07, 0x90, 0xcf, 0xd0, - 0xbf, 0x29, 0xaa, 0x5a, 0xa8, 0xad, 0xd3, 0xf3, 0xac, 0xd1, 0xc1, 0xc9, 0x07, 0xff, 0x5f, 0x46, - 0xff, 0xa1, 0xbb, 0x7f, 0xd1, 0xa8, 0xa9, 0x19, 0x1b, 0x7e, 0x83, 0x7e, 0x8b, 0x91, 0x37, 0xf0, - 0xea, 0x22, 0x5a, 0x26, 0x0b, 0x7a, 0x95, 0xae, 0xe6, 0xcb, 0x38, 0xfc, 0x12, 0x4d, 0xa2, 0xf0, - 0xfc, 0xf0, 0x19, 0x71, 0xe1, 0x78, 0x41, 0xa3, 0x69, 0x34, 0x1f, 0xcf, 0x66, 0x57, 0xe9, 0x32, - 0x9a, 0x4f, 0x67, 0x61, 0x1a, 0x8f, 0x93, 0x24, 0xa4, 0xf3, 0x43, 0x8b, 0x38, 0xf0, 0x7a, 0xb2, - 0x4a, 0x56, 0x34, 0x4c, 0x2f, 0x57, 0xb3, 0x24, 0xea, 0x18, 0x7b, 0x38, 0x81, 0x23, 0x93, 0x81, - 0xe2, 0x06, 0x15, 0xf2, 0x0c, 0x1f, 0x2d, 0xc0, 0x05, 0xc8, 0x6e, 0x8a, 0x72, 0x9d, 0x6a, 0xc6, - 0x6e, 0xae, 0xa9, 0x91, 0x64, 0x2b, 0xf1, 0xb4, 0x04, 0x62, 0x9e, 0x22, 0x55, 0xdd, 0x22, 0xd7, - 0xdc, 0xd5, 0xbc, 0x81, 0xaf, 0x4b, 0x59, 0xc8, 0xba, 0x10, 0xbc, 0x72, 0x7e, 0xed, 0x7b, 0xd6, - 0xe8, 0xc5, 0x89, 0xfb, 0x58, 0x23, 0x5d, 0x1a, 0x7a, 0xa4, 0xfe, 0x87, 0x4e, 0xbf, 0xc3, 0xbe, - 0x01, 0xc9, 0xfb, 0x07, 0x1e, 0x97, 0x58, 0x55, 0x2c, 0x47, 0xe3, 0xf2, 0xb3, 0x71, 0x79, 0xf7, - 0x74, 0xef, 0xb4, 0xdb, 0x78, 0xc6, 0xe1, 0x20, 0x13, 0xb7, 0xf7, 0xe4, 0x67, 0x2f, 0x8d, 0x3e, - 0xde, 0x79, 0xc4, 0xd6, 0xd7, 0x71, 0x4b, 0xe6, 0xa2, 0x64, 0x3c, 0xf7, 0x85, 0xca, 0x83, 0x1c, - 0xb9, 0x4e, 0x10, 0x34, 0x14, 0x93, 0x45, 0xa5, 0xff, 0x50, 0xc6, 0xb9, 0xa8, 0x99, 0x8e, 0xf2, - 0xe9, 0xde, 0xf9, 0x8f, 0x65, 0xfd, 0xb6, 0x7b, 0xd3, 0x71, 0x1c, 0x5d, 0x3f, 0xd7, 0x73, 0x1f, - 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x1e, 0x07, 0x80, 0xd8, 0x02, 0x00, 0x00, + // 490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xfd, 0x9c, 0xe4, 0xcb, 0xcf, 0xad, 0xa8, 0xda, 0x29, 0x02, 0xb7, 0x22, 0x60, 0x65, 0x81, + 0xb2, 0xb2, 0xa5, 0xb0, 0x0b, 0x1b, 0x52, 0xe2, 0xa4, 0x96, 0xd2, 0xc4, 0x9a, 0x38, 0x8b, 0x02, + 0x92, 0x35, 0x75, 0x26, 0xee, 0x48, 0xee, 0xcc, 0x68, 0xec, 0x2c, 0xf2, 0x30, 0x08, 0x89, 0x67, + 0xe0, 0xe1, 0x58, 0xa2, 0x8c, 0x7f, 0x88, 0x68, 0x84, 0xd8, 0xcd, 0xbd, 0xe7, 0xde, 0x73, 0x8e, + 0xcf, 0x95, 0xe1, 0x32, 0x16, 0x22, 0x4e, 0xa8, 0x43, 0x24, 0x73, 0x14, 0x4d, 0xc5, 0x56, 0x45, + 0xd4, 0x96, 0x4a, 0x64, 0x02, 0x41, 0x0e, 0xd9, 0x44, 0xb2, 0x2b, 0xab, 0x18, 0xd3, 0xc8, 0xfd, + 0x76, 0xe3, 0xac, 0x69, 0x1a, 0x29, 0x26, 0x33, 0xa1, 0xf2, 0xe9, 0xde, 0x8f, 0x1a, 0x20, 0x5c, + 0x10, 0x8c, 0x2b, 0x10, 0x21, 0x68, 0x64, 0x3b, 0x49, 0x4d, 0xc3, 0x32, 0xfa, 0x1d, 0xac, 0xdf, + 0xc8, 0x84, 0x96, 0x24, 0x59, 0x46, 0x15, 0x37, 0x6b, 0x56, 0xbd, 0xdf, 0xc1, 0x65, 0x89, 0xba, + 0x00, 0x9c, 0x3c, 0xd2, 0x70, 0xc3, 0x68, 0xb2, 0x36, 0xeb, 0x7a, 0xa7, 0xb3, 0xef, 0x4c, 0xf6, + 0x0d, 0xf4, 0x01, 0x5a, 0x0f, 0x2c, 0xcd, 0x84, 0xda, 0x99, 0x0d, 0xcb, 0xe8, 0x9f, 0x0e, 0xde, + 0xda, 0xbf, 0x3d, 0xda, 0x4f, 0xd5, 0xed, 0x9b, 0x7c, 0x1a, 0x97, 0x6b, 0xe8, 0x05, 0x34, 0x65, + 0xb2, 0x55, 0x24, 0x31, 0xff, 0xd7, 0xe4, 0x45, 0x85, 0xae, 0xa0, 0x9d, 0x32, 0x1e, 0x6f, 0x13, + 0xa2, 0xcc, 0xa6, 0x46, 0xaa, 0xba, 0xf7, 0x19, 0x5a, 0x05, 0x0f, 0x7a, 0x09, 0x17, 0x37, 0xde, + 0x32, 0x58, 0xe0, 0xbb, 0x70, 0x35, 0x5f, 0xfa, 0xee, 0x47, 0x6f, 0xe2, 0xb9, 0xe3, 0xb3, 0xff, + 0x50, 0x17, 0x2e, 0x17, 0xd8, 0x9b, 0x7a, 0xf3, 0xd1, 0x6c, 0x76, 0x17, 0x2e, 0xbd, 0xf9, 0x74, + 0xe6, 0x86, 0xfe, 0x28, 0x08, 0x5c, 0x3c, 0x3f, 0x33, 0x90, 0x09, 0xcf, 0x27, 0xab, 0x60, 0x85, + 0xdd, 0xf0, 0x76, 0x35, 0x0b, 0xbc, 0x0a, 0xa9, 0xf5, 0x26, 0x70, 0x5e, 0xfa, 0xc6, 0x74, 0x43, + 0x15, 0xe5, 0x11, 0x3d, 0x1a, 0x5a, 0x17, 0x20, 0x7a, 0x60, 0xc9, 0x3a, 0xd4, 0x48, 0x2d, 0x8f, + 0x46, 0x77, 0x82, 0x9d, 0xa4, 0xc3, 0x04, 0x50, 0x79, 0xbe, 0x50, 0x55, 0x44, 0xdd, 0x32, 0x9f, + 0xf2, 0x6e, 0xb6, 0x0e, 0x72, 0x21, 0x33, 0x26, 0x78, 0x6a, 0x7e, 0x6b, 0x5b, 0x46, 0xff, 0x64, + 0xd0, 0x3d, 0x96, 0x62, 0xe5, 0x06, 0x9f, 0xab, 0x3f, 0x5b, 0x43, 0x0e, 0x17, 0x95, 0xda, 0x9a, + 0x6e, 0x18, 0x67, 0x7b, 0x42, 0xf4, 0xea, 0x88, 0x5c, 0x42, 0x4b, 0xb5, 0xaf, 0x6d, 0xab, 0xde, + 0x3f, 0x19, 0xbc, 0xfe, 0xfb, 0xcd, 0x70, 0xf5, 0x1d, 0xe3, 0x8a, 0x78, 0xf8, 0x05, 0xda, 0x65, + 0x17, 0xbd, 0x79, 0x22, 0x72, 0x4b, 0xd3, 0x94, 0xc4, 0x87, 0x3a, 0xc6, 0x3f, 0xe8, 0x54, 0x8c, + 0xd7, 0x1c, 0x4e, 0x23, 0xf1, 0x78, 0x30, 0x7e, 0xfd, 0xac, 0x9c, 0xf7, 0xf7, 0x1a, 0xbe, 0xf1, + 0x69, 0x54, 0x80, 0xb1, 0x48, 0x08, 0x8f, 0x6d, 0xa1, 0x62, 0x27, 0xa6, 0x5c, 0x3b, 0x70, 0x72, + 0x88, 0x48, 0x96, 0xea, 0xbf, 0x88, 0x70, 0x2e, 0x32, 0xa2, 0xad, 0xbc, 0x3f, 0x78, 0xff, 0x34, + 0x8c, 0xef, 0xb5, 0xc6, 0x74, 0xe4, 0x7b, 0xf7, 0x4d, 0xbd, 0xf7, 0xee, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x75, 0x12, 0x53, 0xef, 0x7c, 0x03, 0x00, 0x00, } diff --git a/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go b/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go index 0499510d7c9..9950ac2d325 100644 --- a/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/iam/v1/iam_policy.pb.go @@ -11,6 +11,8 @@ import ( proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -233,49 +235,54 @@ func init() { proto.RegisterType((*TestIamPermissionsResponse)(nil), "google.iam.v1.TestIamPermissionsResponse") } -func init() { proto.RegisterFile("google/iam/v1/iam_policy.proto", fileDescriptor_d2728eb97d748a32) } +func init() { + proto.RegisterFile("google/iam/v1/iam_policy.proto", fileDescriptor_d2728eb97d748a32) +} var fileDescriptor_d2728eb97d748a32 = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcd, 0x8a, 0x13, 0x31, - 0x1c, 0x27, 0x5d, 0x58, 0x6d, 0x56, 0x05, 0xa7, 0x88, 0x35, 0x2b, 0xb5, 0x44, 0x0f, 0x6d, 0xa1, - 0x19, 0xbb, 0x9e, 0xac, 0x28, 0xec, 0x7a, 0x18, 0xe6, 0x20, 0x96, 0x51, 0x16, 0x94, 0x82, 0xc6, - 0x31, 0x0c, 0x81, 0xc9, 0x24, 0x4e, 0xd2, 0x05, 0x11, 0x2f, 0x1e, 0x7c, 0x01, 0x6f, 0x3e, 0x82, - 0x67, 0x9f, 0x62, 0xaf, 0xbe, 0x82, 0x0f, 0xe1, 0x51, 0x66, 0x92, 0xee, 0xce, 0x47, 0x95, 0x0a, - 0x9e, 0x4a, 0xf3, 0xfb, 0xfa, 0x7f, 0xcc, 0x1f, 0x0e, 0x12, 0x29, 0x93, 0x94, 0xf9, 0x9c, 0x0a, - 0xff, 0x64, 0x56, 0xfc, 0xbc, 0x52, 0x32, 0xe5, 0xf1, 0x7b, 0xa2, 0x72, 0x69, 0xa4, 0x77, 0xd9, - 0xe2, 0x84, 0x53, 0x41, 0x4e, 0x66, 0x68, 0xbf, 0x4e, 0x97, 0xca, 0x70, 0x99, 0x69, 0xcb, 0x45, - 0xa8, 0x0e, 0x56, 0x7d, 0xd0, 0x4d, 0x87, 0x51, 0xc5, 0x7d, 0x9a, 0x65, 0xd2, 0xd0, 0xaa, 0xf2, - 0x7a, 0x05, 0x8d, 0x53, 0xce, 0x32, 0x63, 0x01, 0xfc, 0x1a, 0xf6, 0x9e, 0x31, 0x13, 0x52, 0xb1, - 0x28, 0xcd, 0x22, 0xf6, 0x6e, 0xc5, 0xb4, 0xf1, 0x10, 0xbc, 0x98, 0x33, 0x2d, 0x57, 0x79, 0xcc, - 0xfa, 0x60, 0x08, 0x46, 0xdd, 0xe8, 0xec, 0xbf, 0x37, 0x85, 0xbb, 0x36, 0xb9, 0xdf, 0x19, 0x82, - 0xd1, 0xde, 0xc1, 0x35, 0x52, 0x6b, 0x81, 0x38, 0x27, 0x47, 0xc2, 0x29, 0xec, 0x05, 0xff, 0x98, - 0x70, 0x1f, 0x5e, 0x70, 0x8d, 0xbb, 0x88, 0x5b, 0x8d, 0x88, 0x80, 0x19, 0xeb, 0xf6, 0xd4, 0xd2, - 0xa2, 0x35, 0x1f, 0xbf, 0x80, 0x37, 0x9e, 0x33, 0x5d, 0xc6, 0xb1, 0x5c, 0x70, 0xad, 0x4b, 0x78, - 0x8b, 0xcc, 0x21, 0xdc, 0x53, 0xe7, 0x8a, 0x7e, 0x67, 0xb8, 0x33, 0xea, 0x46, 0xd5, 0x27, 0xfc, - 0x08, 0xa2, 0x4d, 0xd6, 0x5a, 0xc9, 0x4c, 0xb7, 0xf4, 0xa0, 0xa5, 0x3f, 0xf8, 0xbe, 0x03, 0xbb, - 0xe1, 0xe1, 0x13, 0x5b, 0xb8, 0x67, 0xe0, 0xa5, 0xea, 0xe0, 0x3d, 0xdc, 0x68, 0x71, 0xc3, 0x56, - 0xd0, 0xe6, 0x49, 0xe3, 0xf1, 0xa7, 0x1f, 0x3f, 0xbf, 0x74, 0x6e, 0xe3, 0x41, 0xf1, 0x51, 0x7c, - 0x58, 0x77, 0xf4, 0x70, 0x32, 0xf9, 0x38, 0xd7, 0x15, 0x97, 0x39, 0x98, 0x14, 0xa9, 0xc1, 0xdf, - 0x52, 0x83, 0xff, 0x92, 0x9a, 0x34, 0x52, 0xbf, 0x02, 0xe8, 0xb5, 0x47, 0xe7, 0x8d, 0x1a, 0xc6, - 0x7f, 0x5c, 0x1c, 0x1a, 0x6f, 0xc1, 0xb4, 0x7b, 0xc0, 0x7e, 0x59, 0xd6, 0x18, 0xdf, 0x69, 0x97, - 0x65, 0x5a, 0xaa, 0x39, 0x98, 0xa0, 0xc1, 0xe9, 0xe1, 0x3e, 0xa7, 0x62, 0x2a, 0x98, 0xa1, 0x53, - 0xaa, 0xb8, 0x8b, 0xa2, 0x8a, 0x6b, 0x12, 0x4b, 0x71, 0xf4, 0x19, 0xc0, 0xab, 0xb1, 0x14, 0xf5, - 0x0a, 0x8e, 0xae, 0x9c, 0x35, 0xb8, 0x28, 0xee, 0x68, 0x01, 0x5e, 0xde, 0x75, 0x84, 0x44, 0xa6, - 0x34, 0x4b, 0x88, 0xcc, 0x13, 0x3f, 0x61, 0x59, 0x79, 0x65, 0xfe, 0xb9, 0xa5, 0xbb, 0xdd, 0x07, - 0x9c, 0x8a, 0x5f, 0x00, 0x7c, 0xeb, 0xf4, 0x02, 0xab, 0x7a, 0x9c, 0xca, 0xd5, 0x5b, 0x12, 0x52, - 0x41, 0x8e, 0x67, 0xa7, 0xeb, 0xd7, 0x65, 0xf9, 0xba, 0x0c, 0xa9, 0x58, 0x1e, 0xcf, 0xde, 0xec, - 0x96, 0x5e, 0xf7, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x57, 0xb0, 0xe9, 0x52, 0x04, 0x00, - 0x00, + // 514 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x8a, 0xd3, 0x40, + 0x18, 0x66, 0x52, 0x58, 0xed, 0xac, 0x0a, 0xa6, 0x88, 0xdd, 0xac, 0x74, 0x4b, 0x74, 0xa1, 0x0d, + 0xec, 0xc4, 0xd6, 0x93, 0x15, 0x85, 0xd4, 0x43, 0xe8, 0x41, 0x2c, 0x55, 0xf6, 0x20, 0x85, 0x65, + 0x36, 0x3b, 0xc6, 0x81, 0x4c, 0x66, 0xcc, 0x4c, 0x2b, 0x22, 0x5e, 0x3c, 0xf8, 0x02, 0xde, 0x7c, + 0x04, 0xcf, 0x3e, 0xc5, 0x5e, 0x7d, 0x81, 0x3d, 0xf8, 0x10, 0xe2, 0x49, 0x92, 0x99, 0x6e, 0x93, + 0xb6, 0x8a, 0xca, 0x9e, 0x0a, 0xff, 0xf7, 0xfd, 0xdf, 0xf7, 0x7f, 0xff, 0xdf, 0x09, 0x6c, 0xc5, + 0x9c, 0xc7, 0x09, 0xf1, 0x29, 0x66, 0xfe, 0xbc, 0x97, 0xff, 0x1c, 0x09, 0x9e, 0xd0, 0xe8, 0x2d, + 0x12, 0x19, 0x57, 0xdc, 0xbe, 0xaa, 0x71, 0x44, 0x31, 0x43, 0xf3, 0x9e, 0xb3, 0x5b, 0xa5, 0x73, + 0xa1, 0x28, 0x4f, 0xa5, 0xe6, 0x3a, 0x4e, 0x15, 0x2c, 0xeb, 0x38, 0xb7, 0x0c, 0x86, 0x05, 0xf5, + 0x71, 0x9a, 0x72, 0x85, 0xcb, 0x9d, 0x37, 0x4b, 0x68, 0x94, 0x50, 0x92, 0x2a, 0x03, 0xec, 0x95, + 0x80, 0x97, 0x94, 0x24, 0x27, 0x47, 0xc7, 0xe4, 0x15, 0x9e, 0x53, 0x9e, 0x19, 0xc2, 0x4e, 0x89, + 0x90, 0x11, 0xc9, 0x67, 0x59, 0x44, 0x34, 0xe4, 0x0a, 0xd8, 0x78, 0x46, 0xd4, 0x08, 0xb3, 0x71, + 0x31, 0xc8, 0x84, 0xbc, 0x9e, 0x11, 0xa9, 0xec, 0x7d, 0x78, 0x79, 0x41, 0x6c, 0x82, 0x36, 0xe8, + 0xd4, 0x87, 0xf5, 0xb3, 0xc0, 0xfa, 0x19, 0xd4, 0x20, 0xf0, 0x26, 0xe7, 0x90, 0xdd, 0x87, 0x5b, + 0x3a, 0x40, 0xd3, 0x6a, 0x83, 0xce, 0x76, 0xff, 0x06, 0xaa, 0x6c, 0x02, 0x69, 0xd1, 0x61, 0xed, + 0x2c, 0xb0, 0x26, 0x86, 0xe9, 0xbe, 0x81, 0x8d, 0xf0, 0xff, 0x1d, 0xef, 0xc3, 0x4b, 0x66, 0x9f, + 0xc6, 0x72, 0x6f, 0xc5, 0x32, 0x24, 0x4a, 0x0b, 0x3f, 0xd5, 0xb4, 0xc9, 0x82, 0xef, 0x52, 0xb8, + 0xf3, 0x9c, 0xc8, 0xc2, 0x99, 0x64, 0x8c, 0x4a, 0x59, 0xc0, 0xff, 0x66, 0xbf, 0x0f, 0xb7, 0xc5, + 0xb2, 0xb9, 0x69, 0xb5, 0x6b, 0x9d, 0xba, 0x8e, 0x57, 0xae, 0xbb, 0x8f, 0xa0, 0xb3, 0xc9, 0x4a, + 0x0a, 0x9e, 0x4a, 0x62, 0xb7, 0xab, 0x22, 0x20, 0x17, 0xa9, 0xf4, 0xf7, 0xbf, 0xd6, 0x60, 0x7d, + 0x14, 0x3c, 0xd1, 0x41, 0x6c, 0x05, 0xaf, 0x94, 0x6f, 0x64, 0xbb, 0x2b, 0x91, 0x37, 0x1c, 0xd0, + 0xd9, 0x7c, 0x09, 0xb7, 0xfb, 0xe1, 0xdb, 0xf7, 0x4f, 0xd6, 0x6d, 0xb7, 0x95, 0xff, 0xf7, 0xde, + 0x2d, 0x62, 0x3d, 0xf4, 0xbc, 0xf7, 0x03, 0x59, 0x52, 0x19, 0x00, 0x2f, 0x77, 0x0d, 0xff, 0xe4, + 0x1a, 0x5e, 0x88, 0x6b, 0xbc, 0xe2, 0xfa, 0x19, 0x40, 0x7b, 0x7d, 0x75, 0x76, 0x67, 0x45, 0xf8, + 0xb7, 0x87, 0x74, 0xba, 0x7f, 0xc1, 0xd4, 0x77, 0x70, 0xfd, 0x62, 0xac, 0xae, 0x7b, 0x67, 0x7d, + 0x2c, 0xb5, 0xd6, 0x35, 0x00, 0x9e, 0xd3, 0x3a, 0x0d, 0x76, 0x29, 0x66, 0x07, 0x8c, 0x28, 0x7c, + 0x80, 0x05, 0x35, 0x56, 0x58, 0x50, 0x89, 0x22, 0xce, 0x86, 0x1f, 0x01, 0xbc, 0x1e, 0x71, 0x56, + 0x9d, 0x60, 0x78, 0xed, 0x3c, 0xe0, 0x38, 0x7f, 0x72, 0x63, 0xf0, 0xe2, 0xae, 0x21, 0xc4, 0x3c, + 0xc1, 0x69, 0x8c, 0x78, 0x16, 0xfb, 0x31, 0x49, 0x8b, 0x07, 0xe9, 0x2f, 0x25, 0xcd, 0x27, 0xe2, + 0x01, 0xc5, 0xec, 0x07, 0x00, 0x5f, 0xac, 0x46, 0xa8, 0xbb, 0x1e, 0x27, 0x7c, 0x76, 0x82, 0x46, + 0x98, 0xa1, 0xc3, 0xde, 0xe9, 0xa2, 0x3a, 0x2d, 0xaa, 0xd3, 0x11, 0x66, 0xd3, 0xc3, 0xde, 0xf1, + 0x56, 0xa1, 0x75, 0xef, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x24, 0xb5, 0x51, 0xb9, 0x04, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // IAMPolicyClient is the client API for IAMPolicy service. // @@ -299,10 +306,10 @@ type IAMPolicyClient interface { } type iAMPolicyClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewIAMPolicyClient(cc *grpc.ClientConn) IAMPolicyClient { +func NewIAMPolicyClient(cc grpc.ClientConnInterface) IAMPolicyClient { return &iAMPolicyClient{cc} } @@ -352,6 +359,20 @@ type IAMPolicyServer interface { TestIamPermissions(context.Context, *TestIamPermissionsRequest) (*TestIamPermissionsResponse, error) } +// UnimplementedIAMPolicyServer can be embedded to have forward compatible implementations. +type UnimplementedIAMPolicyServer struct { +} + +func (*UnimplementedIAMPolicyServer) SetIamPolicy(ctx context.Context, req *SetIamPolicyRequest) (*Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (*UnimplementedIAMPolicyServer) GetIamPolicy(ctx context.Context, req *GetIamPolicyRequest) (*Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (*UnimplementedIAMPolicyServer) TestIamPermissions(ctx context.Context, req *TestIamPermissionsRequest) (*TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} + func RegisterIAMPolicyServer(s *grpc.Server, srv IAMPolicyServer) { s.RegisterService(&_IAMPolicy_serviceDesc, srv) } diff --git a/vendor/google.golang.org/genproto/googleapis/iam/v1/options.pb.go b/vendor/google.golang.org/genproto/googleapis/iam/v1/options.pb.go index 8f02bd3c4f6..fc3a218b703 100644 --- a/vendor/google.golang.org/genproto/googleapis/iam/v1/options.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/iam/v1/options.pb.go @@ -25,9 +25,13 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // Encapsulates settings provided to GetIamPolicy. type GetPolicyOptions struct { // Optional. The policy format version to be returned. - // Acceptable values are 0 and 1. - // If the value is 0, or the field is omitted, policy format version 1 will be - // returned. + // + // Valid values are 0, 1, and 3. Requests specifying an invalid value will be + // rejected. + // + // Requests for policies with any conditional bindings must specify version 3. + // Policies without any conditional bindings may specify any valid value or + // leave the field unset. RequestedPolicyVersion int32 `protobuf:"varint,1,opt,name=requested_policy_version,json=requestedPolicyVersion,proto3" json:"requested_policy_version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -70,7 +74,9 @@ func init() { proto.RegisterType((*GetPolicyOptions)(nil), "google.iam.v1.GetPolicyOptions") } -func init() { proto.RegisterFile("google/iam/v1/options.proto", fileDescriptor_19aa09e909092bd1) } +func init() { + proto.RegisterFile("google/iam/v1/options.proto", fileDescriptor_19aa09e909092bd1) +} var fileDescriptor_19aa09e909092bd1 = []byte{ // 229 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go b/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go index 275cfcea8f0..086732f120e 100644 --- a/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/iam/v1/policy.pb.go @@ -91,27 +91,36 @@ func (AuditConfigDelta_Action) EnumDescriptor() ([]byte, []int) { // specify access control policies for Cloud Platform resources. // // -// A `Policy` consists of a list of `bindings`. A `binding` binds a list of -// `members` to a `role`, where the members can be user accounts, Google groups, -// Google domains, and service accounts. A `role` is a named list of permissions -// defined by IAM. +// A `Policy` is a collection of `bindings`. A `binding` binds one or more +// `members` to a single `role`. Members can be user accounts, service accounts, +// Google groups, and domains (such as G Suite). A `role` is a named list of +// permissions (defined by IAM or configured by users). A `binding` can +// optionally specify a `condition`, which is a logic expression that further +// constrains the role binding based on attributes about the request and/or +// target resource. // // **JSON Example** // // { // "bindings": [ // { -// "role": "roles/owner", +// "role": "roles/resourcemanager.organizationAdmin", // "members": [ // "user:mike@example.com", // "group:admins@example.com", // "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com" +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" // ] // }, // { -// "role": "roles/viewer", -// "members": ["user:sean@example.com"] +// "role": "roles/resourcemanager.organizationViewer", +// "members": ["user:eve@example.com"], +// "condition": { +// "title": "expirable access", +// "description": "Does not grant access after Sep 2020", +// "expression": "request.time < +// timestamp('2020-10-01T00:00:00.000Z')", +// } // } // ] // } @@ -123,19 +132,36 @@ func (AuditConfigDelta_Action) EnumDescriptor() ([]byte, []int) { // - user:mike@example.com // - group:admins@example.com // - domain:google.com -// - serviceAccount:my-other-app@appspot.gserviceaccount.com -// role: roles/owner +// - serviceAccount:my-project-id@appspot.gserviceaccount.com +// role: roles/resourcemanager.organizationAdmin // - members: -// - user:sean@example.com -// role: roles/viewer -// +// - user:eve@example.com +// role: roles/resourcemanager.organizationViewer +// condition: +// title: expirable access +// description: Does not grant access after Sep 2020 +// expression: request.time < timestamp('2020-10-01T00:00:00.000Z') // // For a description of IAM and its features, see the // [IAM developer's guide](https://cloud.google.com/iam/docs). type Policy struct { - // Deprecated. + // Specifies the format of the policy. + // + // Valid values are 0, 1, and 3. Requests specifying an invalid value will be + // rejected. + // + // Operations affecting conditional bindings must specify version 3. This can + // be either setting a conditional policy, modifying a conditional binding, + // or removing a binding (conditional or unconditional) from the stored + // conditional policy. + // Operations on non-conditional policies may specify any valid value or + // leave the field unset. + // + // If no etag is provided in the call to `setIamPolicy`, version compliance + // checks against the stored policy is skipped. Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - // Associates a list of `members` to a `role`. + // Associates a list of `members` to a `role`. Optionally may specify a + // `condition` that determines when binding is in effect. // `bindings` with no members will result in an error. Bindings []*Binding `protobuf:"bytes,4,rep,name=bindings,proto3" json:"bindings,omitempty"` // `etag` is used for optimistic concurrency control as a way to help @@ -147,7 +173,9 @@ type Policy struct { // ensure that their change will be applied to the same version of the policy. // // If no `etag` is provided in the call to `setIamPolicy`, then the existing - // policy is overwritten. + // policy is overwritten. Due to blind-set semantics of an etag-less policy, + // 'setIamPolicy' will not fail even if the incoming policy version does not + // meet the requirements for modifying the stored policy. Etag []byte `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -350,8 +378,7 @@ type BindingDelta struct { // Follows the same format of Binding.members. // Required Member string `protobuf:"bytes,3,opt,name=member,proto3" json:"member,omitempty"` - // The condition that is associated with this binding. This field is logged - // only for Cloud Audit Logging. + // The condition that is associated with this binding. Condition *expr.Expr `protobuf:"bytes,4,opt,name=condition,proto3" json:"condition,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -498,7 +525,9 @@ func init() { proto.RegisterType((*AuditConfigDelta)(nil), "google.iam.v1.AuditConfigDelta") } -func init() { proto.RegisterFile("google/iam/v1/policy.proto", fileDescriptor_a3cd40b8a66b2a99) } +func init() { + proto.RegisterFile("google/iam/v1/policy.proto", fileDescriptor_a3cd40b8a66b2a99) +} var fileDescriptor_a3cd40b8a66b2a99 = []byte{ // 550 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go index 9ff770b5f7e..a6e45696447 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go @@ -21,7 +21,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// The canonical error codes for Google APIs. +// The canonical error codes for gRPC APIs. // // // Sometimes multiple error codes may apply. Services should return @@ -156,7 +156,8 @@ const ( Code_INTERNAL Code = 13 // The service is currently unavailable. This is most likely a // transient condition, which can be corrected by retrying with - // a backoff. + // a backoff. Note that it is not always safe to retry + // non-idempotent operations. // // See the guidelines above for deciding between `FAILED_PRECONDITION`, // `ABORTED`, and `UNAVAILABLE`. @@ -221,7 +222,9 @@ func init() { proto.RegisterEnum("google.rpc.Code", Code_name, Code_value) } -func init() { proto.RegisterFile("google/rpc/code.proto", fileDescriptor_fe593a732623ccf0) } +func init() { + proto.RegisterFile("google/rpc/code.proto", fileDescriptor_fe593a732623ccf0) +} var fileDescriptor_fe593a732623ccf0 = []byte{ // 362 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go index 0b9907f89b2..c988461b639 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go @@ -24,65 +24,17 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). The error model is designed to be: +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. // -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes -// if needed. The error message should be a developer-facing English message -// that helps developers *understand* and *resolve* the error. If a localized -// user-facing error message is needed, put the localized message in the error -// details or localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of error -// detail types in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). type Status struct { - // The status code, which should be an enum value of - // [google.rpc.Code][google.rpc.Code]. + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized - // by the client. + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. @@ -142,10 +94,12 @@ func init() { proto.RegisterType((*Status)(nil), "google.rpc.Status") } -func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) } +func init() { + proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) +} var fileDescriptor_24d244abaf643bfe = []byte{ - // 209 bytes of a gzipped FileDescriptorProto + // 212 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81, @@ -154,10 +108,10 @@ var fileDescriptor_24d244abaf643bfe = []byte{ 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7, 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7, - 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0x38, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x3d, 0x84, 0xa3, 0x9c, + 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0x44, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x3d, 0x84, 0xa3, 0x9c, 0xb8, 0x21, 0xf6, 0x06, 0x80, 0x94, 0x07, 0x30, 0x46, 0x99, 0x43, 0xa5, 0xd2, 0xf3, 0x73, 0x12, 0xf3, 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, 0xd3, 0x53, 0xf3, 0xc0, 0x86, 0xe9, 0x43, 0xa4, 0x12, - 0x0b, 0x32, 0x8b, 0x91, 0xfc, 0x69, 0x0d, 0xa1, 0x16, 0x31, 0x31, 0x07, 0x05, 0x38, 0x27, 0xb1, - 0x81, 0x55, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x53, 0xf0, 0x7c, 0x10, 0x01, 0x00, - 0x00, + 0x0b, 0x32, 0x8b, 0x91, 0xfc, 0x69, 0x0d, 0xa1, 0x7e, 0x30, 0x32, 0x2e, 0x62, 0x62, 0x0e, 0x0a, + 0x70, 0x4e, 0x62, 0x03, 0x2b, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x28, 0x45, 0xb1, + 0x13, 0x01, 0x00, 0x00, } diff --git a/vendor/google.golang.org/genproto/googleapis/type/expr/expr.pb.go b/vendor/google.golang.org/genproto/googleapis/type/expr/expr.pb.go index 27d46fe00a4..5f8f3d7c2e2 100644 --- a/vendor/google.golang.org/genproto/googleapis/type/expr/expr.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/type/expr/expr.pb.go @@ -105,7 +105,9 @@ func init() { proto.RegisterType((*Expr)(nil), "google.type.Expr") } -func init() { proto.RegisterFile("google/type/expr.proto", fileDescriptor_d7920f1ae7a2722f) } +func init() { + proto.RegisterFile("google/type/expr.proto", fileDescriptor_d7920f1ae7a2722f) +} var fileDescriptor_d7920f1ae7a2722f = []byte{ // 195 bytes of a gzipped FileDescriptorProto diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml index 024408e6462..a11e8cbca66 100644 --- a/vendor/google.golang.org/grpc/.travis.yml +++ b/vendor/google.golang.org/grpc/.travis.yml @@ -2,18 +2,20 @@ language: go matrix: include: - - go: 1.12.x + - go: 1.13.x env: VET=1 GO111MODULE=on - - go: 1.12.x + - go: 1.13.x env: RACE=1 GO111MODULE=on - - go: 1.12.x + - go: 1.13.x env: RUN386=1 - - go: 1.12.x + - go: 1.13.x env: GRPC_GO_RETRY=on + - go: 1.13.x + env: TESTEXTRAS=1 + - go: 1.12.x + env: GO111MODULE=on - go: 1.11.x env: GO111MODULE=on - - go: 1.10.x - - go: 1.9.x - go: 1.9.x env: GAE=1 @@ -23,17 +25,18 @@ before_install: - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi - if [[ -n "${RUN386}" ]]; then export GOARCH=386; fi - if [[ "${TRAVIS_EVENT_TYPE}" = "cron" && -z "${RUN386}" ]]; then RACE=1; fi - - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then VET_SKIP_PROTO=1; fi + - if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]; then export VET_SKIP_PROTO=1; fi install: - try3() { eval "$*" || eval "$*" || eval "$*"; } - try3 'if [[ "${GO111MODULE}" = "on" ]]; then go mod download; else make testdeps; fi' - - if [[ "${GAE}" = 1 ]]; then source ./install_gae.sh; make testappenginedeps; fi - - if [[ "${VET}" = 1 ]]; then ./vet.sh -install; fi + - if [[ -n "${GAE}" ]]; then source ./install_gae.sh; make testappenginedeps; fi + - if [[ -n "${VET}" ]]; then ./vet.sh -install; fi script: - set -e - - if [[ "${VET}" = 1 ]]; then ./vet.sh; fi - - if [[ "${GAE}" = 1 ]]; then make testappengine; exit 0; fi - - if [[ "${RACE}" = 1 ]]; then make testrace; exit 0; fi + - if [[ -n "${TESTEXTRAS}" ]]; then examples/examples_test.sh; interop/interop_test.sh; make testsubmodule; exit 0; fi + - if [[ -n "${VET}" ]]; then ./vet.sh; fi + - if [[ -n "${GAE}" ]]; then make testappengine; exit 0; fi + - if [[ -n "${RACE}" ]]; then make testrace; exit 0; fi - make test diff --git a/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md b/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md new file mode 100644 index 00000000000..9d4213ebca7 --- /dev/null +++ b/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md @@ -0,0 +1,3 @@ +## Community Code of Conduct + +gRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md index 6e69b28c270..4f1567e2f95 100644 --- a/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ b/vendor/google.golang.org/grpc/CONTRIBUTING.md @@ -1,6 +1,8 @@ # How to contribute -We definitely welcome your patches and contributions to gRPC! +We definitely welcome your patches and contributions to gRPC! Please read the gRPC +organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md) +and [contribution guidelines](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) before proceeding. If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) diff --git a/vendor/google.golang.org/grpc/GOVERNANCE.md b/vendor/google.golang.org/grpc/GOVERNANCE.md new file mode 100644 index 00000000000..d6ff2674710 --- /dev/null +++ b/vendor/google.golang.org/grpc/GOVERNANCE.md @@ -0,0 +1 @@ +This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md). diff --git a/vendor/google.golang.org/grpc/MAINTAINERS.md b/vendor/google.golang.org/grpc/MAINTAINERS.md new file mode 100644 index 00000000000..093c82b3afe --- /dev/null +++ b/vendor/google.golang.org/grpc/MAINTAINERS.md @@ -0,0 +1,27 @@ +This page lists all active maintainers of this repository. If you were a +maintainer and would like to add your name to the Emeritus list, please send us a +PR. + +See [GOVERNANCE.md](https://github.com/grpc/grpc-community/blob/master/governance.md) +for governance guidelines and how to become a maintainer. +See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) +for general contribution guidelines. + +## Maintainers (in alphabetical order) +- [canguler](https://github.com/canguler), Google LLC +- [cesarghali](https://github.com/cesarghali), Google LLC +- [dfawley](https://github.com/dfawley), Google LLC +- [easwars](https://github.com/easwars), Google LLC +- [jadekler](https://github.com/jadekler), Google LLC +- [menghanl](https://github.com/menghanl), Google LLC +- [srini100](https://github.com/srini100), Google LLC + +## Emeritus Maintainers (in alphabetical order) +- [adelez](https://github.com/adelez), Google LLC +- [iamqizhao](https://github.com/iamqizhao), Google LLC +- [jtattermusch](https://github.com/jtattermusch), Google LLC +- [lyuxuan](https://github.com/lyuxuan), Google LLC +- [makmukhi](https://github.com/makmukhi), Google LLC +- [matt-kwong](https://github.com/matt-kwong), Google LLC +- [nicolasnoble](https://github.com/nicolasnoble), Google LLC +- [yongni](https://github.com/yongni), Google LLC diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile index db982aabde6..410f7d56d4c 100644 --- a/vendor/google.golang.org/grpc/Makefile +++ b/vendor/google.golang.org/grpc/Makefile @@ -19,6 +19,9 @@ proto: test: testdeps go test -cpu 1,4 -timeout 7m google.golang.org/grpc/... +testsubmodule: testdeps + cd security/advancedtls && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/advancedtls/... + testappengine: testappenginedeps goapp test -cpu 1,4 -timeout 7m google.golang.org/grpc/... diff --git a/vendor/google.golang.org/grpc/attributes/attributes.go b/vendor/google.golang.org/grpc/attributes/attributes.go new file mode 100644 index 00000000000..68ffc620137 --- /dev/null +++ b/vendor/google.golang.org/grpc/attributes/attributes.go @@ -0,0 +1,70 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package attributes defines a generic key/value store used in various gRPC +// components. +// +// All APIs in this package are EXPERIMENTAL. +package attributes + +import "fmt" + +// Attributes is an immutable struct for storing and retrieving generic +// key/value pairs. Keys must be hashable, and users should define their own +// types for keys. +type Attributes struct { + m map[interface{}]interface{} +} + +// New returns a new Attributes containing all key/value pairs in kvs. If the +// same key appears multiple times, the last value overwrites all previous +// values for that key. Panics if len(kvs) is not even. +func New(kvs ...interface{}) *Attributes { + if len(kvs)%2 != 0 { + panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs))) + } + a := &Attributes{m: make(map[interface{}]interface{}, len(kvs)/2)} + for i := 0; i < len(kvs)/2; i++ { + a.m[kvs[i*2]] = kvs[i*2+1] + } + return a +} + +// WithValues returns a new Attributes containing all key/value pairs in a and +// kvs. Panics if len(kvs) is not even. If the same key appears multiple +// times, the last value overwrites all previous values for that key. To +// remove an existing key, use a nil value. +func (a *Attributes) WithValues(kvs ...interface{}) *Attributes { + if len(kvs)%2 != 0 { + panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs))) + } + n := &Attributes{m: make(map[interface{}]interface{}, len(a.m)+len(kvs)/2)} + for k, v := range a.m { + n.m[k] = v + } + for i := 0; i < len(kvs)/2; i++ { + n.m[kvs[i*2]] = kvs[i*2+1] + } + return n +} + +// Value returns the value associated with these attributes for key, or nil if +// no value is associated with key. +func (a *Attributes) Value(key interface{}) interface{} { + return a.m[key] +} diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go index 97c6e2568f4..ff7c3ee6f48 100644 --- a/vendor/google.golang.org/grpc/backoff.go +++ b/vendor/google.golang.org/grpc/backoff.go @@ -23,16 +23,36 @@ package grpc import ( "time" + + "google.golang.org/grpc/backoff" ) // DefaultBackoffConfig uses values specified for backoff in // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// Deprecated: use ConnectParams instead. Will be supported throughout 1.x. var DefaultBackoffConfig = BackoffConfig{ MaxDelay: 120 * time.Second, } // BackoffConfig defines the parameters for the default gRPC backoff strategy. +// +// Deprecated: use ConnectParams instead. Will be supported throughout 1.x. type BackoffConfig struct { // MaxDelay is the upper bound of backoff delay. MaxDelay time.Duration } + +// ConnectParams defines the parameters for connecting and retrying. Users are +// encouraged to use this instead of the BackoffConfig type defined above. See +// here for more details: +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// This API is EXPERIMENTAL. +type ConnectParams struct { + // Backoff specifies the configuration options for connection backoff. + Backoff backoff.Config + // MinConnectTimeout is the minimum amount of time we are willing to give a + // connection to complete. + MinConnectTimeout time.Duration +} diff --git a/vendor/google.golang.org/grpc/backoff/backoff.go b/vendor/google.golang.org/grpc/backoff/backoff.go new file mode 100644 index 00000000000..0787d0b50ce --- /dev/null +++ b/vendor/google.golang.org/grpc/backoff/backoff.go @@ -0,0 +1,52 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package backoff provides configuration options for backoff. +// +// More details can be found at: +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// All APIs in this package are experimental. +package backoff + +import "time" + +// Config defines the configuration options for backoff. +type Config struct { + // BaseDelay is the amount of time to backoff after the first failure. + BaseDelay time.Duration + // Multiplier is the factor with which to multiply backoffs after a + // failed retry. Should ideally be greater than 1. + Multiplier float64 + // Jitter is the factor with which backoffs are randomized. + Jitter float64 + // MaxDelay is the upper bound of backoff delay. + MaxDelay time.Duration +} + +// DefaultConfig is a backoff configuration with the default values specfied +// at https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +// +// This should be useful for callers who want to configure backoff with +// non-default values only for a subset of the options. +var DefaultConfig = Config{ + BaseDelay: 1.0 * time.Second, + Multiplier: 1.6, + Jitter: 0.2, + MaxDelay: 120 * time.Second, +} diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index c266f4ec102..9258858ed75 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -117,6 +117,15 @@ type NewSubConnOptions struct { HealthCheckEnabled bool } +// State contains the balancer's state relevant to the gRPC ClientConn. +type State struct { + // State contains the connectivity state of the balancer, which is used to + // determine the state of the ClientConn. + ConnectivityState connectivity.State + // Picker is used to choose connections (SubConns) for RPCs. + Picker V2Picker +} + // ClientConn represents a gRPC ClientConn. // // This interface is to be implemented by gRPC. Users should not need a @@ -137,10 +146,19 @@ type ClientConn interface { // // gRPC will update the connectivity state of the ClientConn, and will call pick // on the new picker to pick new SubConn. + // + // Deprecated: use UpdateState instead UpdateBalancerState(s connectivity.State, p Picker) + // UpdateState notifies gRPC that the balancer's internal state has + // changed. + // + // gRPC will update the connectivity state of the ClientConn, and will call pick + // on the new picker to pick new SubConns. + UpdateState(State) + // ResolveNow is called by balancer to notify gRPC to do a name resolving. - ResolveNow(resolver.ResolveNowOption) + ResolveNow(resolver.ResolveNowOptions) // Target returns the dial target for this ClientConn. // @@ -185,11 +203,14 @@ type ConfigParser interface { ParseConfig(LoadBalancingConfigJSON json.RawMessage) (serviceconfig.LoadBalancingConfig, error) } -// PickOptions contains addition information for the Pick operation. -type PickOptions struct { +// PickInfo contains additional information for the Pick operation. +type PickInfo struct { // FullMethodName is the method name that NewClientStream() is called // with. The canonical format is /service/Method. FullMethodName string + // Ctx is the RPC's context, and may contain relevant RPC-level information + // like the outgoing header metadata. + Ctx context.Context } // DoneInfo contains additional information for done. @@ -215,7 +236,7 @@ var ( ErrNoSubConnAvailable = errors.New("no SubConn is available") // ErrTransientFailure indicates all SubConns are in TransientFailure. // WaitForReady RPCs will block, non-WaitForReady RPCs will fail. - ErrTransientFailure = errors.New("all SubConns are in TransientFailure") + ErrTransientFailure = TransientFailureError(errors.New("all SubConns are in TransientFailure")) ) // Picker is used by gRPC to pick a SubConn to send an RPC. @@ -223,6 +244,8 @@ var ( // internal state has changed. // // The pickers used by gRPC can be updated by ClientConn.UpdateBalancerState(). +// +// Deprecated: use V2Picker instead type Picker interface { // Pick returns the SubConn to be used to send the RPC. // The returned SubConn must be one returned by NewSubConn(). @@ -243,18 +266,76 @@ type Picker interface { // // If the returned error is not nil: // - If the error is ErrNoSubConnAvailable, gRPC will block until UpdateBalancerState() - // - If the error is ErrTransientFailure: + // - If the error is ErrTransientFailure or implements IsTransientFailure() + // bool, returning true: // - If the RPC is wait-for-ready, gRPC will block until UpdateBalancerState() // is called to pick again; // - Otherwise, RPC will fail with unavailable error. // - Else (error is other non-nil error): - // - The RPC will fail with unavailable error. + // - The RPC will fail with the error's status code, or Unknown if it is + // not a status error. // // The returned done() function will be called once the rpc has finished, // with the final status of that RPC. If the SubConn returned is not a // valid SubConn type, done may not be called. done may be nil if balancer // doesn't care about the RPC status. - Pick(ctx context.Context, opts PickOptions) (conn SubConn, done func(DoneInfo), err error) + Pick(ctx context.Context, info PickInfo) (conn SubConn, done func(DoneInfo), err error) +} + +// PickResult contains information related to a connection chosen for an RPC. +type PickResult struct { + // SubConn is the connection to use for this pick, if its state is Ready. + // If the state is not Ready, gRPC will block the RPC until a new Picker is + // provided by the balancer (using ClientConn.UpdateState). The SubConn + // must be one returned by ClientConn.NewSubConn. + SubConn SubConn + + // Done is called when the RPC is completed. If the SubConn is not ready, + // this will be called with a nil parameter. If the SubConn is not a valid + // type, Done may not be called. May be nil if the balancer does not wish + // to be notified when the RPC completes. + Done func(DoneInfo) +} + +type transientFailureError struct { + error +} + +func (e *transientFailureError) IsTransientFailure() bool { return true } + +// TransientFailureError wraps err in an error implementing +// IsTransientFailure() bool, returning true. +func TransientFailureError(err error) error { + return &transientFailureError{error: err} +} + +// V2Picker is used by gRPC to pick a SubConn to send an RPC. +// Balancer is expected to generate a new picker from its snapshot every time its +// internal state has changed. +// +// The pickers used by gRPC can be updated by ClientConn.UpdateBalancerState(). +type V2Picker interface { + // Pick returns the connection to use for this RPC and related information. + // + // Pick should not block. If the balancer needs to do I/O or any blocking + // or time-consuming work to service this call, it should return + // ErrNoSubConnAvailable, and the Pick call will be repeated by gRPC when + // the Picker is updated (using ClientConn.UpdateState). + // + // If an error is returned: + // + // - If the error is ErrNoSubConnAvailable, gRPC will block until a new + // Picker is provided by the balancer (using ClientConn.UpdateState). + // + // - If the error implements IsTransientFailure() bool, returning true, + // wait for ready RPCs will wait, but non-wait for ready RPCs will be + // terminated with this error's Error() string and status code + // Unavailable. + // + // - Any other errors terminate all RPCs with the code and message + // provided. If the error is not a status error, it will be converted by + // gRPC to a status error with code Unknown. + Pick(info PickInfo) (PickResult, error) } // Balancer takes input from gRPC, manages SubConns, and collects and aggregates @@ -292,8 +373,11 @@ type Balancer interface { // SubConnState describes the state of a SubConn. type SubConnState struct { + // ConnectivityState is the connectivity state of the SubConn. ConnectivityState connectivity.State - // TODO: add last connection error + // ConnectionError is set if the ConnectivityState is TransientFailure, + // describing the reason the SubConn failed. Otherwise, it is nil. + ConnectionError error } // ClientConnState describes the state of a ClientConn relevant to the @@ -305,14 +389,23 @@ type ClientConnState struct { BalancerConfig serviceconfig.LoadBalancingConfig } +// ErrBadResolverState may be returned by UpdateClientConnState to indicate a +// problem with the provided name resolver data. +var ErrBadResolverState = errors.New("bad resolver state") + // V2Balancer is defined for documentation purposes. If a Balancer also // implements V2Balancer, its UpdateClientConnState method will be called // instead of HandleResolvedAddrs and its UpdateSubConnState will be called // instead of HandleSubConnStateChange. type V2Balancer interface { // UpdateClientConnState is called by gRPC when the state of the ClientConn - // changes. - UpdateClientConnState(ClientConnState) + // changes. If the error returned is ErrBadResolverState, the ClientConn + // will begin calling ResolveNow on the active name resolver with + // exponential backoff until a subsequent call to UpdateClientConnState + // returns a nil error. Any other errors are currently ignored. + UpdateClientConnState(ClientConnState) error + // ResolverError is called by gRPC when the name resolver reports an error. + ResolverError(error) // UpdateSubConnState is called by gRPC when the state of a SubConn // changes. UpdateSubConnState(SubConn, SubConnState) @@ -326,9 +419,8 @@ type V2Balancer interface { // // It's not thread safe. type ConnectivityStateEvaluator struct { - numReady uint64 // Number of addrConns in ready state. - numConnecting uint64 // Number of addrConns in connecting state. - numTransientFailure uint64 // Number of addrConns in transientFailure. + numReady uint64 // Number of addrConns in ready state. + numConnecting uint64 // Number of addrConns in connecting state. } // RecordTransition records state change happening in subConn and based on that @@ -348,8 +440,6 @@ func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState conne cse.numReady += updateVal case connectivity.Connecting: cse.numConnecting += updateVal - case connectivity.TransientFailure: - cse.numTransientFailure += updateVal } } diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index 1af88f0a3f1..d7d72918ad6 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -20,6 +20,8 @@ package base import ( "context" + "errors" + "fmt" "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" @@ -28,34 +30,44 @@ import ( ) type baseBuilder struct { - name string - pickerBuilder PickerBuilder - config Config + name string + pickerBuilder PickerBuilder + v2PickerBuilder V2PickerBuilder + config Config } func (bb *baseBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { - return &baseBalancer{ - cc: cc, - pickerBuilder: bb.pickerBuilder, + bal := &baseBalancer{ + cc: cc, + pickerBuilder: bb.pickerBuilder, + v2PickerBuilder: bb.v2PickerBuilder, subConns: make(map[resolver.Address]balancer.SubConn), scStates: make(map[balancer.SubConn]connectivity.State), csEvltr: &balancer.ConnectivityStateEvaluator{}, - // Initialize picker to a picker that always return - // ErrNoSubConnAvailable, because when state of a SubConn changes, we - // may call UpdateBalancerState with this picker. - picker: NewErrPicker(balancer.ErrNoSubConnAvailable), - config: bb.config, + config: bb.config, } + // Initialize picker to a picker that always returns + // ErrNoSubConnAvailable, because when state of a SubConn changes, we + // may call UpdateState with this picker. + if bb.pickerBuilder != nil { + bal.picker = NewErrPicker(balancer.ErrNoSubConnAvailable) + } else { + bal.v2Picker = NewErrPickerV2(balancer.ErrNoSubConnAvailable) + } + return bal } func (bb *baseBuilder) Name() string { return bb.name } +var _ balancer.V2Balancer = (*baseBalancer)(nil) // Assert that we implement V2Balancer + type baseBalancer struct { - cc balancer.ClientConn - pickerBuilder PickerBuilder + cc balancer.ClientConn + pickerBuilder PickerBuilder + v2PickerBuilder V2PickerBuilder csEvltr *balancer.ConnectivityStateEvaluator state connectivity.State @@ -63,19 +75,50 @@ type baseBalancer struct { subConns map[resolver.Address]balancer.SubConn scStates map[balancer.SubConn]connectivity.State picker balancer.Picker + v2Picker balancer.V2Picker config Config + + resolverErr error // the last error reported by the resolver; cleared on successful resolution + connErr error // the last connection error; cleared upon leaving TransientFailure } func (b *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error) { panic("not implemented") } -func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) { +func (b *baseBalancer) ResolverError(err error) { + b.resolverErr = err + if len(b.subConns) == 0 { + b.state = connectivity.TransientFailure + } + if b.state != connectivity.TransientFailure { + // The picker will not change since the balancer does not currently + // report an error. + return + } + b.regeneratePicker() + if b.picker != nil { + b.cc.UpdateBalancerState(b.state, b.picker) + } else { + b.cc.UpdateState(balancer.State{ + ConnectivityState: b.state, + Picker: b.v2Picker, + }) + } +} + +func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error { // TODO: handle s.ResolverState.Err (log if not nil) once implemented. // TODO: handle s.ResolverState.ServiceConfig? if grpclog.V(2) { grpclog.Infoln("base.baseBalancer: got new ClientConn state: ", s) } + if len(s.ResolverState.Addresses) == 0 { + b.ResolverError(errors.New("produced zero addresses")) + return balancer.ErrBadResolverState + } + // Successful resolution; clear resolver error and ensure we return nil. + b.resolverErr = nil // addrsSet is the set converted from addrs, it's used for quick lookup of an address. addrsSet := make(map[resolver.Address]struct{}) for _, a := range s.ResolverState.Addresses { @@ -101,26 +144,57 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) { // The entry will be deleted in HandleSubConnStateChange. } } + return nil +} + +// mergeErrors builds an error from the last connection error and the last +// resolver error. Must only be called if b.state is TransientFailure. +func (b *baseBalancer) mergeErrors() error { + // connErr must always be non-nil unless there are no SubConns, in which + // case resolverErr must be non-nil. + if b.connErr == nil { + return fmt.Errorf("last resolver error: %v", b.resolverErr) + } + if b.resolverErr == nil { + return fmt.Errorf("last connection error: %v", b.connErr) + } + return fmt.Errorf("last connection error: %v; last resolver error: %v", b.connErr, b.resolverErr) } // regeneratePicker takes a snapshot of the balancer, and generates a picker // from it. The picker is -// - errPicker with ErrTransientFailure if the balancer is in TransientFailure, +// - errPicker if the balancer is in TransientFailure, // - built by the pickerBuilder with all READY SubConns otherwise. func (b *baseBalancer) regeneratePicker() { if b.state == connectivity.TransientFailure { - b.picker = NewErrPicker(balancer.ErrTransientFailure) + if b.pickerBuilder != nil { + b.picker = NewErrPicker(balancer.ErrTransientFailure) + } else { + b.v2Picker = NewErrPickerV2(balancer.TransientFailureError(b.mergeErrors())) + } return } - readySCs := make(map[resolver.Address]balancer.SubConn) + if b.pickerBuilder != nil { + readySCs := make(map[resolver.Address]balancer.SubConn) - // Filter out all ready SCs from full subConn map. - for addr, sc := range b.subConns { - if st, ok := b.scStates[sc]; ok && st == connectivity.Ready { - readySCs[addr] = sc + // Filter out all ready SCs from full subConn map. + for addr, sc := range b.subConns { + if st, ok := b.scStates[sc]; ok && st == connectivity.Ready { + readySCs[addr] = sc + } } + b.picker = b.pickerBuilder.Build(readySCs) + } else { + readySCs := make(map[balancer.SubConn]SubConnInfo) + + // Filter out all ready SCs from full subConn map. + for addr, sc := range b.subConns { + if st, ok := b.scStates[sc]; ok && st == connectivity.Ready { + readySCs[sc] = SubConnInfo{Address: addr} + } + } + b.v2Picker = b.v2PickerBuilder.Build(PickerBuildInfo{ReadySCs: readySCs}) } - b.picker = b.pickerBuilder.Build(readySCs) } func (b *baseBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connectivity.State) { @@ -152,6 +226,9 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su oldAggrState := b.state b.state = b.csEvltr.RecordTransition(oldS, s) + // Set or clear the last connection error accordingly. + b.connErr = state.ConnectionError + // Regenerate picker when one of the following happens: // - this sc became ready from not-ready // - this sc became not-ready from ready @@ -162,7 +239,11 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su b.regeneratePicker() } - b.cc.UpdateBalancerState(b.state, b.picker) + if b.picker != nil { + b.cc.UpdateBalancerState(b.state, b.picker) + } else { + b.cc.UpdateState(balancer.State{ConnectivityState: b.state, Picker: b.v2Picker}) + } } // Close is a nop because base balancer doesn't have internal state to clean up, @@ -179,6 +260,19 @@ type errPicker struct { err error // Pick() always returns this err. } -func (p *errPicker) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) { +func (p *errPicker) Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error) { return nil, nil, p.err } + +// NewErrPickerV2 returns a V2Picker that always returns err on Pick(). +func NewErrPickerV2(err error) balancer.V2Picker { + return &errPickerV2{err: err} +} + +type errPickerV2 struct { + err error // Pick() always returns this err. +} + +func (p *errPickerV2) Pick(info balancer.PickInfo) (balancer.PickResult, error) { + return balancer.PickResult{}, p.err +} diff --git a/vendor/google.golang.org/grpc/balancer/base/base.go b/vendor/google.golang.org/grpc/balancer/base/base.go index 34b1f2994a7..4192918b9e2 100644 --- a/vendor/google.golang.org/grpc/balancer/base/base.go +++ b/vendor/google.golang.org/grpc/balancer/base/base.go @@ -42,6 +42,26 @@ type PickerBuilder interface { Build(readySCs map[resolver.Address]balancer.SubConn) balancer.Picker } +// V2PickerBuilder creates balancer.V2Picker. +type V2PickerBuilder interface { + // Build returns a picker that will be used by gRPC to pick a SubConn. + Build(info PickerBuildInfo) balancer.V2Picker +} + +// PickerBuildInfo contains information needed by the picker builder to +// construct a picker. +type PickerBuildInfo struct { + // ReadySCs is a map from all ready SubConns to the Addresses used to + // create them. + ReadySCs map[balancer.SubConn]SubConnInfo +} + +// SubConnInfo contains information about a SubConn created by the base +// balancer. +type SubConnInfo struct { + Address resolver.Address // the address used to create this SubConn +} + // NewBalancerBuilder returns a balancer builder. The balancers // built by this builder will use the picker builder to build pickers. func NewBalancerBuilder(name string, pb PickerBuilder) balancer.Builder { @@ -62,3 +82,12 @@ func NewBalancerBuilderWithConfig(name string, pb PickerBuilder, config Config) config: config, } } + +// NewBalancerBuilderV2 returns a base balancer builder configured by the provided config. +func NewBalancerBuilderV2(name string, pb V2PickerBuilder, config Config) balancer.Builder { + return &baseBuilder{ + name: name, + v2PickerBuilder: pb, + config: config, + } +} diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go index 29f7a4ddd68..d4d645501c1 100644 --- a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go +++ b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go @@ -22,14 +22,12 @@ package roundrobin import ( - "context" "sync" "google.golang.org/grpc/balancer" "google.golang.org/grpc/balancer/base" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal/grpcrand" - "google.golang.org/grpc/resolver" ) // Name is the name of round_robin balancer. @@ -37,7 +35,7 @@ const Name = "round_robin" // newBuilder creates a new roundrobin balancer builder. func newBuilder() balancer.Builder { - return base.NewBalancerBuilderWithConfig(Name, &rrPickerBuilder{}, base.Config{HealthCheck: true}) + return base.NewBalancerBuilderV2(Name, &rrPickerBuilder{}, base.Config{HealthCheck: true}) } func init() { @@ -46,13 +44,13 @@ func init() { type rrPickerBuilder struct{} -func (*rrPickerBuilder) Build(readySCs map[resolver.Address]balancer.SubConn) balancer.Picker { - grpclog.Infof("roundrobinPicker: newPicker called with readySCs: %v", readySCs) - if len(readySCs) == 0 { - return base.NewErrPicker(balancer.ErrNoSubConnAvailable) +func (*rrPickerBuilder) Build(info base.PickerBuildInfo) balancer.V2Picker { + grpclog.Infof("roundrobinPicker: newPicker called with info: %v", info) + if len(info.ReadySCs) == 0 { + return base.NewErrPickerV2(balancer.ErrNoSubConnAvailable) } var scs []balancer.SubConn - for _, sc := range readySCs { + for sc := range info.ReadySCs { scs = append(scs, sc) } return &rrPicker{ @@ -74,10 +72,10 @@ type rrPicker struct { next int } -func (p *rrPicker) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) { +func (p *rrPicker) Pick(balancer.PickInfo) (balancer.PickResult, error) { p.mu.Lock() sc := p.subConns[p.next] p.next = (p.next + 1) % len(p.subConns) p.mu.Unlock() - return sc, nil, nil + return balancer.PickResult{SubConn: sc}, nil } diff --git a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go index 8df4095ca95..824f28e740a 100644 --- a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go +++ b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go @@ -25,6 +25,8 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal/buffer" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" ) @@ -32,64 +34,17 @@ import ( type scStateUpdate struct { sc balancer.SubConn state connectivity.State -} - -// scStateUpdateBuffer is an unbounded channel for scStateChangeTuple. -// TODO make a general purpose buffer that uses interface{}. -type scStateUpdateBuffer struct { - c chan *scStateUpdate - mu sync.Mutex - backlog []*scStateUpdate -} - -func newSCStateUpdateBuffer() *scStateUpdateBuffer { - return &scStateUpdateBuffer{ - c: make(chan *scStateUpdate, 1), - } -} - -func (b *scStateUpdateBuffer) put(t *scStateUpdate) { - b.mu.Lock() - defer b.mu.Unlock() - if len(b.backlog) == 0 { - select { - case b.c <- t: - return - default: - } - } - b.backlog = append(b.backlog, t) -} - -func (b *scStateUpdateBuffer) load() { - b.mu.Lock() - defer b.mu.Unlock() - if len(b.backlog) > 0 { - select { - case b.c <- b.backlog[0]: - b.backlog[0] = nil - b.backlog = b.backlog[1:] - default: - } - } -} - -// get returns the channel that the scStateUpdate will be sent to. -// -// Upon receiving, the caller should call load to send another -// scStateChangeTuple onto the channel if there is any. -func (b *scStateUpdateBuffer) get() <-chan *scStateUpdate { - return b.c + err error } // ccBalancerWrapper is a wrapper on top of cc for balancers. // It implements balancer.ClientConn interface. type ccBalancerWrapper struct { - cc *ClientConn - balancer balancer.Balancer - stateChangeQueue *scStateUpdateBuffer - ccUpdateCh chan *balancer.ClientConnState - done chan struct{} + cc *ClientConn + balancerMu sync.Mutex // synchronizes calls to the balancer + balancer balancer.Balancer + scBuffer *buffer.Unbounded + done *grpcsync.Event mu sync.Mutex subConns map[*acBalancerWrapper]struct{} @@ -97,11 +52,10 @@ type ccBalancerWrapper struct { func newCCBalancerWrapper(cc *ClientConn, b balancer.Builder, bopts balancer.BuildOptions) *ccBalancerWrapper { ccb := &ccBalancerWrapper{ - cc: cc, - stateChangeQueue: newSCStateUpdateBuffer(), - ccUpdateCh: make(chan *balancer.ClientConnState, 1), - done: make(chan struct{}), - subConns: make(map[*acBalancerWrapper]struct{}), + cc: cc, + scBuffer: buffer.NewUnbounded(), + done: grpcsync.NewEvent(), + subConns: make(map[*acBalancerWrapper]struct{}), } go ccb.watcher() ccb.balancer = b.Build(ccb, bopts) @@ -113,36 +67,23 @@ func newCCBalancerWrapper(cc *ClientConn, b balancer.Builder, bopts balancer.Bui func (ccb *ccBalancerWrapper) watcher() { for { select { - case t := <-ccb.stateChangeQueue.get(): - ccb.stateChangeQueue.load() - select { - case <-ccb.done: - ccb.balancer.Close() - return - default: + case t := <-ccb.scBuffer.Get(): + ccb.scBuffer.Load() + if ccb.done.HasFired() { + break } + ccb.balancerMu.Lock() + su := t.(*scStateUpdate) if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { - ub.UpdateSubConnState(t.sc, balancer.SubConnState{ConnectivityState: t.state}) + ub.UpdateSubConnState(su.sc, balancer.SubConnState{ConnectivityState: su.state, ConnectionError: su.err}) } else { - ccb.balancer.HandleSubConnStateChange(t.sc, t.state) + ccb.balancer.HandleSubConnStateChange(su.sc, su.state) } - case s := <-ccb.ccUpdateCh: - select { - case <-ccb.done: - ccb.balancer.Close() - return - default: - } - if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { - ub.UpdateClientConnState(*s) - } else { - ccb.balancer.HandleResolvedAddrs(s.ResolverState.Addresses, nil) - } - case <-ccb.done: + ccb.balancerMu.Unlock() + case <-ccb.done.Done(): } - select { - case <-ccb.done: + if ccb.done.HasFired() { ccb.balancer.Close() ccb.mu.Lock() scs := ccb.subConns @@ -151,19 +92,17 @@ func (ccb *ccBalancerWrapper) watcher() { for acbw := range scs { ccb.cc.removeAddrConn(acbw.getAddrConn(), errConnDrain) } - ccb.UpdateBalancerState(connectivity.Connecting, nil) + ccb.UpdateState(balancer.State{ConnectivityState: connectivity.Connecting, Picker: nil}) return - default: } - ccb.cc.firstResolveEvent.Fire() } } func (ccb *ccBalancerWrapper) close() { - close(ccb.done) + ccb.done.Fire() } -func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State) { +func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State, err error) { // When updating addresses for a SubConn, if the address in use is not in // the new addresses, the old ac will be tearDown() and a new ac will be // created. tearDown() generates a state change with Shutdown state, we @@ -174,30 +113,29 @@ func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s co if sc == nil { return } - ccb.stateChangeQueue.put(&scStateUpdate{ + ccb.scBuffer.Put(&scStateUpdate{ sc: sc, state: s, + err: err, }) } -func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) { - if ccb.cc.curBalancerName != grpclbName { - // Filter any grpclb addresses since we don't have the grpclb balancer. - s := &ccs.ResolverState - for i := 0; i < len(s.Addresses); { - if s.Addresses[i].Type == resolver.GRPCLB { - copy(s.Addresses[i:], s.Addresses[i+1:]) - s.Addresses = s.Addresses[:len(s.Addresses)-1] - continue - } - i++ - } +func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error { + ccb.balancerMu.Lock() + defer ccb.balancerMu.Unlock() + if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { + return ub.UpdateClientConnState(*ccs) } - select { - case <-ccb.ccUpdateCh: - default: + ccb.balancer.HandleResolvedAddrs(ccs.ResolverState.Addresses, nil) + return nil +} + +func (ccb *ccBalancerWrapper) resolverError(err error) { + if ub, ok := ccb.balancer.(balancer.V2Balancer); ok { + ccb.balancerMu.Lock() + ub.ResolverError(err) + ccb.balancerMu.Unlock() } - ccb.ccUpdateCh <- ccs } func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) { @@ -250,7 +188,22 @@ func (ccb *ccBalancerWrapper) UpdateBalancerState(s connectivity.State, p balanc ccb.cc.csMgr.updateState(s) } -func (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOption) { +func (ccb *ccBalancerWrapper) UpdateState(s balancer.State) { + ccb.mu.Lock() + defer ccb.mu.Unlock() + if ccb.subConns == nil { + return + } + // Update picker before updating state. Even though the ordering here does + // not matter, it can lead to multiple calls of Pick in the common start-up + // case where we wait for ready and then perform an RPC. If the picker is + // updated later, we could call the "connecting" picker when the state is + // updated, and then call the "ready" picker after the picker gets updated. + ccb.cc.blockingpicker.updatePickerV2(s.Picker) + ccb.cc.csMgr.updateState(s.ConnectivityState) +} + +func (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOptions) { ccb.cc.resolveNow(o) } diff --git a/vendor/google.golang.org/grpc/balancer_v1_wrapper.go b/vendor/google.golang.org/grpc/balancer_v1_wrapper.go index 66e9a44ac4d..db04b08b842 100644 --- a/vendor/google.golang.org/grpc/balancer_v1_wrapper.go +++ b/vendor/google.golang.org/grpc/balancer_v1_wrapper.go @@ -19,7 +19,6 @@ package grpc import ( - "context" "sync" "google.golang.org/grpc/balancer" @@ -49,7 +48,7 @@ func (bwb *balancerWrapperBuilder) Build(cc balancer.ClientConn, opts balancer.B csEvltr: &balancer.ConnectivityStateEvaluator{}, state: connectivity.Idle, } - cc.UpdateBalancerState(connectivity.Idle, bw) + cc.UpdateState(balancer.State{ConnectivityState: connectivity.Idle, Picker: bw}) go bw.lbWatcher() return bw } @@ -243,7 +242,7 @@ func (bw *balancerWrapper) HandleSubConnStateChange(sc balancer.SubConn, s conne if bw.state != sa { bw.state = sa } - bw.cc.UpdateBalancerState(bw.state, bw) + bw.cc.UpdateState(balancer.State{ConnectivityState: bw.state, Picker: bw}) if s == connectivity.Shutdown { // Remove state for this sc. delete(bw.connSt, sc) @@ -275,17 +274,17 @@ func (bw *balancerWrapper) Close() { // The picker is the balancerWrapper itself. // It either blocks or returns error, consistent with v1 balancer Get(). -func (bw *balancerWrapper) Pick(ctx context.Context, opts balancer.PickOptions) (sc balancer.SubConn, done func(balancer.DoneInfo), err error) { +func (bw *balancerWrapper) Pick(info balancer.PickInfo) (result balancer.PickResult, err error) { failfast := true // Default failfast is true. - if ss, ok := rpcInfoFromContext(ctx); ok { + if ss, ok := rpcInfoFromContext(info.Ctx); ok { failfast = ss.failfast } - a, p, err := bw.balancer.Get(ctx, BalancerGetOptions{BlockingWait: !failfast}) + a, p, err := bw.balancer.Get(info.Ctx, BalancerGetOptions{BlockingWait: !failfast}) if err != nil { - return nil, nil, err + return balancer.PickResult{}, toRPCErr(err) } if p != nil { - done = func(balancer.DoneInfo) { p() } + result.Done = func(balancer.DoneInfo) { p() } defer func() { if err != nil { p() @@ -297,38 +296,39 @@ func (bw *balancerWrapper) Pick(ctx context.Context, opts balancer.PickOptions) defer bw.mu.Unlock() if bw.pickfirst { // Get the first sc in conns. - for _, sc := range bw.conns { - return sc, done, nil + for _, result.SubConn = range bw.conns { + return result, nil } - return nil, nil, balancer.ErrNoSubConnAvailable + return balancer.PickResult{}, balancer.ErrNoSubConnAvailable } - sc, ok1 := bw.conns[resolver.Address{ + var ok1 bool + result.SubConn, ok1 = bw.conns[resolver.Address{ Addr: a.Addr, Type: resolver.Backend, ServerName: "", Metadata: a.Metadata, }] - s, ok2 := bw.connSt[sc] + s, ok2 := bw.connSt[result.SubConn] if !ok1 || !ok2 { // This can only happen due to a race where Get() returned an address // that was subsequently removed by Notify. In this case we should // retry always. - return nil, nil, balancer.ErrNoSubConnAvailable + return balancer.PickResult{}, balancer.ErrNoSubConnAvailable } switch s.s { case connectivity.Ready, connectivity.Idle: - return sc, done, nil + return result, nil case connectivity.Shutdown, connectivity.TransientFailure: // If the returned sc has been shut down or is in transient failure, // return error, and this RPC will fail or wait for another picker (if // non-failfast). - return nil, nil, balancer.ErrTransientFailure + return balancer.PickResult{}, balancer.ErrTransientFailure default: // For other states (connecting or unknown), the v1 balancer would // traditionally wait until ready and then issue the RPC. Returning // ErrNoSubConnAvailable will be a slight improvement in that it will // allow the balancer to choose another address in case others are // connected. - return nil, nil, balancer.ErrNoSubConnAvailable + return balancer.PickResult{}, balancer.ErrNoSubConnAvailable } } diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index a7643df7d29..f58740b2507 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -31,7 +31,7 @@ import ( "time" "google.golang.org/grpc/balancer" - _ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin. + "google.golang.org/grpc/balancer/base" "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" @@ -42,10 +42,12 @@ import ( "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" - _ "google.golang.org/grpc/resolver/dns" // To register dns resolver. - _ "google.golang.org/grpc/resolver/passthrough" // To register passthrough resolver. "google.golang.org/grpc/serviceconfig" "google.golang.org/grpc/status" + + _ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin. + _ "google.golang.org/grpc/internal/resolver/dns" // To register dns resolver. + _ "google.golang.org/grpc/internal/resolver/passthrough" // To register passthrough resolver. ) const ( @@ -186,11 +188,11 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } if cc.dopts.defaultServiceConfigRawJSON != nil { - sc, err := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON) - if err != nil { - return nil, fmt.Errorf("%s: %v", invalidDefaultServiceConfigErrPrefix, err) + scpr := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON) + if scpr.Err != nil { + return nil, fmt.Errorf("%s: %v", invalidDefaultServiceConfigErrPrefix, scpr.Err) } - cc.dopts.defaultServiceConfig = sc + cc.dopts.defaultServiceConfig, _ = scpr.Config.(*ServiceConfig) } cc.mkp = cc.dopts.copts.KeepaliveParams @@ -235,29 +237,28 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } } if cc.dopts.bs == nil { - cc.dopts.bs = backoff.Exponential{ - MaxDelay: DefaultBackoffConfig.MaxDelay, + cc.dopts.bs = backoff.DefaultExponential + } + + // Determine the resolver to use. + cc.parsedTarget = parseTarget(cc.target) + grpclog.Infof("parsed scheme: %q", cc.parsedTarget.Scheme) + resolverBuilder := cc.getResolver(cc.parsedTarget.Scheme) + if resolverBuilder == nil { + // If resolver builder is still nil, the parsed target's scheme is + // not registered. Fallback to default resolver and set Endpoint to + // the original target. + grpclog.Infof("scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme) + cc.parsedTarget = resolver.Target{ + Scheme: resolver.GetDefaultScheme(), + Endpoint: target, } - } - if cc.dopts.resolverBuilder == nil { - // Only try to parse target when resolver builder is not already set. - cc.parsedTarget = parseTarget(cc.target) - grpclog.Infof("parsed scheme: %q", cc.parsedTarget.Scheme) - cc.dopts.resolverBuilder = resolver.Get(cc.parsedTarget.Scheme) - if cc.dopts.resolverBuilder == nil { - // If resolver builder is still nil, the parsed target's scheme is - // not registered. Fallback to default resolver and set Endpoint to - // the original target. - grpclog.Infof("scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme) - cc.parsedTarget = resolver.Target{ - Scheme: resolver.GetDefaultScheme(), - Endpoint: target, - } - cc.dopts.resolverBuilder = resolver.Get(cc.parsedTarget.Scheme) + resolverBuilder = cc.getResolver(cc.parsedTarget.Scheme) + if resolverBuilder == nil { + return nil, fmt.Errorf("could not get resolver for default scheme: %q", cc.parsedTarget.Scheme) } - } else { - cc.parsedTarget = resolver.Target{Endpoint: target} } + creds := cc.dopts.copts.TransportCredentials if creds != nil && creds.Info().ServerName != "" { cc.authority = creds.Info().ServerName @@ -297,14 +298,14 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } // Build the resolver. - rWrapper, err := newCCResolverWrapper(cc) + rWrapper, err := newCCResolverWrapper(cc, resolverBuilder) if err != nil { return nil, fmt.Errorf("failed to build resolver: %v", err) } - cc.mu.Lock() cc.resolverWrapper = rWrapper cc.mu.Unlock() + // A blocking dial blocks until the clientConn is ready. if cc.dopts.block { for { @@ -443,7 +444,32 @@ func (csm *connectivityStateManager) getNotifyChan() <-chan struct{} { return csm.notifyChan } -// ClientConn represents a client connection to an RPC server. +// ClientConnInterface defines the functions clients need to perform unary and +// streaming RPCs. It is implemented by *ClientConn, and is only intended to +// be referenced by generated code. +type ClientConnInterface interface { + // Invoke performs a unary RPC and returns after the response is received + // into reply. + Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error + // NewStream begins a streaming RPC. + NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) +} + +// Assert *ClientConn implements ClientConnInterface. +var _ ClientConnInterface = (*ClientConn)(nil) + +// ClientConn represents a virtual connection to a conceptual endpoint, to +// perform RPCs. +// +// A ClientConn is free to have zero or more actual connections to the endpoint +// based on configuration, load, etc. It is also free to determine which actual +// endpoints to use and may change it every RPC, permitting client-side load +// balancing. +// +// A ClientConn encapsulates a range of functionality including name +// resolution, TCP connection establishment (with retries and backoff) and TLS +// handshakes. It also handles errors on established connections by +// re-resolving the name and reconnecting. type ClientConn struct { ctx context.Context cancel context.CancelFunc @@ -532,58 +558,104 @@ func (cc *ClientConn) waitForResolvedAddrs(ctx context.Context) error { } } -func (cc *ClientConn) updateResolverState(s resolver.State) error { +var emptyServiceConfig *ServiceConfig + +func init() { + cfg := parseServiceConfig("{}") + if cfg.Err != nil { + panic(fmt.Sprintf("impossible error parsing empty service config: %v", cfg.Err)) + } + emptyServiceConfig = cfg.Config.(*ServiceConfig) +} + +func (cc *ClientConn) maybeApplyDefaultServiceConfig(addrs []resolver.Address) { + if cc.sc != nil { + cc.applyServiceConfigAndBalancer(cc.sc, addrs) + return + } + if cc.dopts.defaultServiceConfig != nil { + cc.applyServiceConfigAndBalancer(cc.dopts.defaultServiceConfig, addrs) + } else { + cc.applyServiceConfigAndBalancer(emptyServiceConfig, addrs) + } +} + +func (cc *ClientConn) updateResolverState(s resolver.State, err error) error { + defer cc.firstResolveEvent.Fire() cc.mu.Lock() - defer cc.mu.Unlock() // Check if the ClientConn is already closed. Some fields (e.g. // balancerWrapper) are set to nil when closing the ClientConn, and could // cause nil pointer panic if we don't have this check. if cc.conns == nil { + cc.mu.Unlock() return nil } - if cc.dopts.disableServiceConfig || s.ServiceConfig == nil { - if cc.dopts.defaultServiceConfig != nil && cc.sc == nil { - cc.applyServiceConfig(cc.dopts.defaultServiceConfig) + if err != nil { + // May need to apply the initial service config in case the resolver + // doesn't support service configs, or doesn't provide a service config + // with the new addresses. + cc.maybeApplyDefaultServiceConfig(nil) + + if cc.balancerWrapper != nil { + cc.balancerWrapper.resolverError(err) } - } else if sc, ok := s.ServiceConfig.(*ServiceConfig); ok { - cc.applyServiceConfig(sc) + + // No addresses are valid with err set; return early. + cc.mu.Unlock() + return balancer.ErrBadResolverState } - var balCfg serviceconfig.LoadBalancingConfig - if cc.dopts.balancerBuilder == nil { - // Only look at balancer types and switch balancer if balancer dial - // option is not set. - var newBalancerName string - if cc.sc != nil && cc.sc.lbConfig != nil { - newBalancerName = cc.sc.lbConfig.name - balCfg = cc.sc.lbConfig.cfg + var ret error + if cc.dopts.disableServiceConfig || s.ServiceConfig == nil { + cc.maybeApplyDefaultServiceConfig(s.Addresses) + // TODO: do we need to apply a failing LB policy if there is no + // default, per the error handling design? + } else { + if sc, ok := s.ServiceConfig.Config.(*ServiceConfig); s.ServiceConfig.Err == nil && ok { + cc.applyServiceConfigAndBalancer(sc, s.Addresses) } else { - var isGRPCLB bool - for _, a := range s.Addresses { - if a.Type == resolver.GRPCLB { - isGRPCLB = true - break + ret = balancer.ErrBadResolverState + if cc.balancerWrapper == nil { + var err error + if s.ServiceConfig.Err != nil { + err = status.Errorf(codes.Unavailable, "error parsing service config: %v", s.ServiceConfig.Err) + } else { + err = status.Errorf(codes.Unavailable, "illegal service config type: %T", s.ServiceConfig.Config) } - } - if isGRPCLB { - newBalancerName = grpclbName - } else if cc.sc != nil && cc.sc.LB != nil { - newBalancerName = *cc.sc.LB - } else { - newBalancerName = PickFirstBalancerName + cc.blockingpicker.updatePicker(base.NewErrPicker(err)) + cc.csMgr.updateState(connectivity.TransientFailure) + cc.mu.Unlock() + return ret } } - cc.switchBalancer(newBalancerName) - } else if cc.balancerWrapper == nil { - // Balancer dial option was set, and this is the first time handling - // resolved addresses. Build a balancer with dopts.balancerBuilder. - cc.curBalancerName = cc.dopts.balancerBuilder.Name() - cc.balancerWrapper = newCCBalancerWrapper(cc, cc.dopts.balancerBuilder, cc.balancerBuildOpts) } - cc.balancerWrapper.updateClientConnState(&balancer.ClientConnState{ResolverState: s, BalancerConfig: balCfg}) - return nil + var balCfg serviceconfig.LoadBalancingConfig + if cc.dopts.balancerBuilder == nil && cc.sc != nil && cc.sc.lbConfig != nil { + balCfg = cc.sc.lbConfig.cfg + } + + cbn := cc.curBalancerName + bw := cc.balancerWrapper + cc.mu.Unlock() + if cbn != grpclbName { + // Filter any grpclb addresses since we don't have the grpclb balancer. + for i := 0; i < len(s.Addresses); { + if s.Addresses[i].Type == resolver.GRPCLB { + copy(s.Addresses[i:], s.Addresses[i+1:]) + s.Addresses = s.Addresses[:len(s.Addresses)-1] + continue + } + i++ + } + } + uccsErr := bw.updateClientConnState(&balancer.ClientConnState{ResolverState: s, BalancerConfig: balCfg}) + if ret == nil { + ret = uccsErr // prefer ErrBadResolver state since any other error is + // currently meaningless to the caller. + } + return ret } // switchBalancer starts the switching from current balancer to the balancer @@ -631,7 +703,7 @@ func (cc *ClientConn) switchBalancer(name string) { cc.balancerWrapper = newCCBalancerWrapper(cc, builder, cc.balancerBuildOpts) } -func (cc *ClientConn) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State) { +func (cc *ClientConn) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State, err error) { cc.mu.Lock() if cc.conns == nil { cc.mu.Unlock() @@ -639,7 +711,7 @@ func (cc *ClientConn) handleSubConnStateChange(sc balancer.SubConn, s connectivi } // TODO(bar switching) send updates to all balancer wrappers when balancer // gracefully switching is supported. - cc.balancerWrapper.handleSubConnStateChange(sc, s) + cc.balancerWrapper.handleSubConnStateChange(sc, s, err) cc.mu.Unlock() } @@ -736,7 +808,7 @@ func (ac *addrConn) connect() error { } // Update connectivity state within the lock to prevent subsequent or // concurrent calls from resetting the transport more than once. - ac.updateConnectivityState(connectivity.Connecting) + ac.updateConnectivityState(connectivity.Connecting, nil) ac.mu.Unlock() // Start a goroutine connecting to the server asynchronously. @@ -822,7 +894,8 @@ func (cc *ClientConn) healthCheckConfig() *healthCheckConfig { } func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, func(balancer.DoneInfo), error) { - t, done, err := cc.blockingpicker.pick(ctx, failfast, balancer.PickOptions{ + t, done, err := cc.blockingpicker.pick(ctx, failfast, balancer.PickInfo{ + Ctx: ctx, FullMethodName: method, }) if err != nil { @@ -831,10 +904,10 @@ func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method st return t, done, nil } -func (cc *ClientConn) applyServiceConfig(sc *ServiceConfig) error { +func (cc *ClientConn) applyServiceConfigAndBalancer(sc *ServiceConfig, addrs []resolver.Address) { if sc == nil { // should never reach here. - return fmt.Errorf("got nil pointer for service config") + return } cc.sc = sc @@ -850,10 +923,38 @@ func (cc *ClientConn) applyServiceConfig(sc *ServiceConfig) error { cc.retryThrottler.Store((*retryThrottler)(nil)) } - return nil + if cc.dopts.balancerBuilder == nil { + // Only look at balancer types and switch balancer if balancer dial + // option is not set. + var newBalancerName string + if cc.sc != nil && cc.sc.lbConfig != nil { + newBalancerName = cc.sc.lbConfig.name + } else { + var isGRPCLB bool + for _, a := range addrs { + if a.Type == resolver.GRPCLB { + isGRPCLB = true + break + } + } + if isGRPCLB { + newBalancerName = grpclbName + } else if cc.sc != nil && cc.sc.LB != nil { + newBalancerName = *cc.sc.LB + } else { + newBalancerName = PickFirstBalancerName + } + } + cc.switchBalancer(newBalancerName) + } else if cc.balancerWrapper == nil { + // Balancer dial option was set, and this is the first time handling + // resolved addresses. Build a balancer with dopts.balancerBuilder. + cc.curBalancerName = cc.dopts.balancerBuilder.Name() + cc.balancerWrapper = newCCBalancerWrapper(cc, cc.dopts.balancerBuilder, cc.balancerBuildOpts) + } } -func (cc *ClientConn) resolveNow(o resolver.ResolveNowOption) { +func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) { cc.mu.RLock() r := cc.resolverWrapper cc.mu.RUnlock() @@ -875,8 +976,9 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOption) { // This API is EXPERIMENTAL. func (cc *ClientConn) ResetConnectBackoff() { cc.mu.Lock() - defer cc.mu.Unlock() - for ac := range cc.conns { + conns := cc.conns + cc.mu.Unlock() + for ac := range conns { ac.resetConnectBackoff() } } @@ -962,7 +1064,7 @@ type addrConn struct { } // Note: this requires a lock on ac.mu. -func (ac *addrConn) updateConnectivityState(s connectivity.State) { +func (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error) { if ac.state == s { return } @@ -975,7 +1077,7 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State) { Severity: channelz.CtINFO, }) } - ac.cc.handleSubConnStateChange(ac.acbw, s) + ac.cc.handleSubConnStateChange(ac.acbw, s, lastErr) } // adjustParams updates parameters used to create transports upon @@ -995,7 +1097,7 @@ func (ac *addrConn) adjustParams(r transport.GoAwayReason) { func (ac *addrConn) resetTransport() { for i := 0; ; i++ { if i > 0 { - ac.cc.resolveNow(resolver.ResolveNowOption{}) + ac.cc.resolveNow(resolver.ResolveNowOptions{}) } ac.mu.Lock() @@ -1024,7 +1126,7 @@ func (ac *addrConn) resetTransport() { // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md#proposed-backoff-algorithm connectDeadline := time.Now().Add(dialDuration) - ac.updateConnectivityState(connectivity.Connecting) + ac.updateConnectivityState(connectivity.Connecting, nil) ac.transport = nil ac.mu.Unlock() @@ -1037,7 +1139,7 @@ func (ac *addrConn) resetTransport() { ac.mu.Unlock() return } - ac.updateConnectivityState(connectivity.TransientFailure) + ac.updateConnectivityState(connectivity.TransientFailure, err) // Backoff. b := ac.resetBackoff @@ -1093,6 +1195,7 @@ func (ac *addrConn) resetTransport() { // first successful one. It returns the transport, the address and a Event in // the successful case. The Event fires when the returned transport disconnects. func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.Time) (transport.ClientTransport, resolver.Address, *grpcsync.Event, error) { + var firstConnErr error for _, addr := range addrs { ac.mu.Lock() if ac.state == connectivity.Shutdown { @@ -1121,11 +1224,14 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T if err == nil { return newTr, addr, reconnect, nil } + if firstConnErr == nil { + firstConnErr = err + } ac.cc.blockingpicker.updateConnectionError(err) } // Couldn't connect to any address. - return nil, resolver.Address{}, nil, fmt.Errorf("couldn't connect to any address") + return nil, resolver.Address{}, nil, firstConnErr } // createTransport creates a connection to addr. It returns the transport and a @@ -1136,10 +1242,16 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne onCloseCalled := make(chan struct{}) reconnect := grpcsync.NewEvent() + authority := ac.cc.authority + // addr.ServerName takes precedent over ClientConn authority, if present. + if addr.ServerName != "" { + authority = addr.ServerName + } + target := transport.TargetInfo{ Addr: addr.Addr, Metadata: addr.Metadata, - Authority: ac.cc.authority, + Authority: authority, } once := sync.Once{} @@ -1152,7 +1264,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne // state to Connecting. // // TODO: this should be Idle when grpc-go properly supports it. - ac.updateConnectivityState(connectivity.Connecting) + ac.updateConnectivityState(connectivity.Connecting, nil) } }) ac.mu.Unlock() @@ -1167,7 +1279,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne // state to Connecting. // // TODO: this should be Idle when grpc-go properly supports it. - ac.updateConnectivityState(connectivity.Connecting) + ac.updateConnectivityState(connectivity.Connecting, nil) } }) ac.mu.Unlock() @@ -1193,7 +1305,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne } select { - case <-time.After(connectDeadline.Sub(time.Now())): + case <-time.After(time.Until(connectDeadline)): // We didn't get the preface in time. newTr.Close() grpclog.Warningf("grpc: addrConn.createTransport failed to connect to %v: didn't receive server preface in time. Reconnecting...", addr) @@ -1224,7 +1336,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { var healthcheckManagingState bool defer func() { if !healthcheckManagingState { - ac.updateConnectivityState(connectivity.Ready) + ac.updateConnectivityState(connectivity.Ready, nil) } }() @@ -1260,13 +1372,13 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { ac.mu.Unlock() return newNonRetryClientStream(ctx, &StreamDesc{ServerStreams: true}, method, currentTr, ac) } - setConnectivityState := func(s connectivity.State) { + setConnectivityState := func(s connectivity.State, lastErr error) { ac.mu.Lock() defer ac.mu.Unlock() if ac.transport != currentTr { return } - ac.updateConnectivityState(s) + ac.updateConnectivityState(s, lastErr) } // Start the health checking stream. go func() { @@ -1331,8 +1443,8 @@ func (ac *addrConn) tearDown(err error) { curTr := ac.transport ac.transport = nil // We have to set the state to Shutdown before anything else to prevent races - // between setting the state and logic that waits on context cancelation / etc. - ac.updateConnectivityState(connectivity.Shutdown) + // between setting the state and logic that waits on context cancellation / etc. + ac.updateConnectivityState(connectivity.Shutdown, nil) ac.cancel() ac.curAddr = resolver.Address{} if err == errConnDrain && curTr != nil { @@ -1355,7 +1467,7 @@ func (ac *addrConn) tearDown(err error) { }, }) // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add trace reference to - // the entity beng deleted, and thus prevent it from being deleted right away. + // the entity being deleted, and thus prevent it from being deleted right away. channelz.RemoveEntry(ac.channelzID) } ac.mu.Unlock() @@ -1445,3 +1557,12 @@ func (c *channelzChannel) ChannelzMetric() *channelz.ChannelInternalMetric { // Deprecated: This error is never returned by grpc and should not be // referenced by users. var ErrClientConnTimeout = errors.New("grpc: timed out when dialing") + +func (cc *ClientConn) getResolver(scheme string) resolver.Builder { + for _, rb := range cc.dopts.resolvers { + if cc.parsedTarget.Scheme == rb.Scheme() { + return rb + } + } + return resolver.Get(cc.parsedTarget.Scheme) +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 8ea3d4a1dc2..845ce5d2161 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -24,16 +24,12 @@ package credentials // import "google.golang.org/grpc/credentials" import ( "context" - "crypto/tls" - "crypto/x509" "errors" "fmt" - "io/ioutil" "net" - "strings" "github.com/golang/protobuf/proto" - "google.golang.org/grpc/credentials/internal" + "google.golang.org/grpc/internal" ) // PerRPCCredentials defines the common interface for the credentials which need to @@ -45,7 +41,8 @@ type PerRPCCredentials interface { // context. If a status code is returned, it will be used as the status // for the RPC. uri is the URI of the entry point for the request. // When supported by the underlying implementation, ctx can be used for - // timeout and cancellation. + // timeout and cancellation. Additionally, RequestInfo data will be + // available via ctx to this call. // TODO(zhaoq): Define the set of the qualified keys instead of leaving // it as an arbitrary string. GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) @@ -54,6 +51,48 @@ type PerRPCCredentials interface { RequireTransportSecurity() bool } +// SecurityLevel defines the protection level on an established connection. +// +// This API is experimental. +type SecurityLevel int + +const ( + // NoSecurity indicates a connection is insecure. + // The zero SecurityLevel value is invalid for backward compatibility. + NoSecurity SecurityLevel = iota + 1 + // IntegrityOnly indicates a connection only provides integrity protection. + IntegrityOnly + // PrivacyAndIntegrity indicates a connection provides both privacy and integrity protection. + PrivacyAndIntegrity +) + +// String returns SecurityLevel in a string format. +func (s SecurityLevel) String() string { + switch s { + case NoSecurity: + return "NoSecurity" + case IntegrityOnly: + return "IntegrityOnly" + case PrivacyAndIntegrity: + return "PrivacyAndIntegrity" + } + return fmt.Sprintf("invalid SecurityLevel: %v", int(s)) +} + +// CommonAuthInfo contains authenticated information common to AuthInfo implementations. +// It should be embedded in a struct implementing AuthInfo to provide additional information +// about the credentials. +// +// This API is experimental. +type CommonAuthInfo struct { + SecurityLevel SecurityLevel +} + +// GetCommonAuthInfo returns the pointer to CommonAuthInfo struct. +func (c *CommonAuthInfo) GetCommonAuthInfo() *CommonAuthInfo { + return c +} + // ProtocolInfo provides information regarding the gRPC wire protocol version, // security protocol, security protocol version in use, server name, etc. type ProtocolInfo struct { @@ -68,6 +107,8 @@ type ProtocolInfo struct { } // AuthInfo defines the common interface for the auth information the users are interested in. +// A struct that implements AuthInfo should embed CommonAuthInfo by including additional +// information about the credentials in it. type AuthInfo interface { AuthType() string } @@ -82,7 +123,8 @@ type TransportCredentials interface { // ClientHandshake does the authentication handshake specified by the corresponding // authentication protocol on rawConn for clients. It returns the authenticated // connection and the corresponding auth information about the connection. - // Implementations must use the provided context to implement timely cancellation. + // The auth information should embed CommonAuthInfo to return additional information about + // the credentials. Implementations must use the provided context to implement timely cancellation. // gRPC will try to reconnect if the error returned is a temporary error // (io.EOF, context.DeadlineExceeded or err.Temporary() == true). // If the returned error is a wrapper error, implementations should make sure that @@ -92,7 +134,8 @@ type TransportCredentials interface { ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error) // ServerHandshake does the authentication handshake for servers. It returns // the authenticated connection and the corresponding auth information about - // the connection. + // the connection. The auth information should embed CommonAuthInfo to return additional information + // about the credentials. // // If the returned net.Conn is closed, it MUST close the net.Conn provided. ServerHandshake(net.Conn) (net.Conn, AuthInfo, error) @@ -125,145 +168,63 @@ type Bundle interface { NewWithMode(mode string) (Bundle, error) } -// TLSInfo contains the auth information for a TLS authenticated connection. -// It implements the AuthInfo interface. -type TLSInfo struct { - State tls.ConnectionState -} - -// AuthType returns the type of TLSInfo as a string. -func (t TLSInfo) AuthType() string { - return "tls" +// RequestInfo contains request data attached to the context passed to GetRequestMetadata calls. +// +// This API is experimental. +type RequestInfo struct { + // The method passed to Invoke or NewStream for this RPC. (For proto methods, this has the format "/some.Service/Method") + Method string + // AuthInfo contains the information from a security handshake (TransportCredentials.ClientHandshake, TransportCredentials.ServerHandshake) + AuthInfo AuthInfo } -// GetSecurityValue returns security info requested by channelz. -func (t TLSInfo) GetSecurityValue() ChannelzSecurityValue { - v := &TLSChannelzSecurityValue{ - StandardName: cipherSuiteLookup[t.State.CipherSuite], - } - // Currently there's no way to get LocalCertificate info from tls package. - if len(t.State.PeerCertificates) > 0 { - v.RemoteCertificate = t.State.PeerCertificates[0].Raw - } - return v -} +// requestInfoKey is a struct to be used as the key when attaching a RequestInfo to a context object. +type requestInfoKey struct{} -// tlsCreds is the credentials required for authenticating a connection using TLS. -type tlsCreds struct { - // TLS configuration - config *tls.Config +// RequestInfoFromContext extracts the RequestInfo from the context if it exists. +// +// This API is experimental. +func RequestInfoFromContext(ctx context.Context) (ri RequestInfo, ok bool) { + ri, ok = ctx.Value(requestInfoKey{}).(RequestInfo) + return } -func (c tlsCreds) Info() ProtocolInfo { - return ProtocolInfo{ - SecurityProtocol: "tls", - SecurityVersion: "1.2", - ServerName: c.config.ServerName, +// CheckSecurityLevel checks if a connection's security level is greater than or equal to the specified one. +// It returns success if 1) the condition is satisified or 2) AuthInfo struct does not implement GetCommonAuthInfo() method +// or 3) CommonAuthInfo.SecurityLevel has an invalid zero value. For 2) and 3), it is for the purpose of backward-compatibility. +// +// This API is experimental. +func CheckSecurityLevel(ctx context.Context, level SecurityLevel) error { + type internalInfo interface { + GetCommonAuthInfo() *CommonAuthInfo } -} - -func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (_ net.Conn, _ AuthInfo, err error) { - // use local cfg to avoid clobbering ServerName if using multiple endpoints - cfg := cloneTLSConfig(c.config) - if cfg.ServerName == "" { - colonPos := strings.LastIndex(authority, ":") - if colonPos == -1 { - colonPos = len(authority) - } - cfg.ServerName = authority[:colonPos] + ri, _ := RequestInfoFromContext(ctx) + if ri.AuthInfo == nil { + return errors.New("unable to obtain SecurityLevel from context") } - conn := tls.Client(rawConn, cfg) - errChannel := make(chan error, 1) - go func() { - errChannel <- conn.Handshake() - }() - select { - case err := <-errChannel: - if err != nil { - return nil, nil, err + if ci, ok := ri.AuthInfo.(internalInfo); ok { + // CommonAuthInfo.SecurityLevel has an invalid value. + if ci.GetCommonAuthInfo().SecurityLevel == 0 { + return nil } - case <-ctx.Done(): - return nil, nil, ctx.Err() - } - return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState()}, nil -} - -func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) { - conn := tls.Server(rawConn, c.config) - if err := conn.Handshake(); err != nil { - return nil, nil, err - } - return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState()}, nil -} - -func (c *tlsCreds) Clone() TransportCredentials { - return NewTLS(c.config) -} - -func (c *tlsCreds) OverrideServerName(serverNameOverride string) error { - c.config.ServerName = serverNameOverride - return nil -} - -const alpnProtoStrH2 = "h2" - -func appendH2ToNextProtos(ps []string) []string { - for _, p := range ps { - if p == alpnProtoStrH2 { - return ps + if ci.GetCommonAuthInfo().SecurityLevel < level { + return fmt.Errorf("requires SecurityLevel %v; connection has %v", level, ci.GetCommonAuthInfo().SecurityLevel) } } - ret := make([]string, 0, len(ps)+1) - ret = append(ret, ps...) - return append(ret, alpnProtoStrH2) -} - -// NewTLS uses c to construct a TransportCredentials based on TLS. -func NewTLS(c *tls.Config) TransportCredentials { - tc := &tlsCreds{cloneTLSConfig(c)} - tc.config.NextProtos = appendH2ToNextProtos(tc.config.NextProtos) - return tc -} - -// NewClientTLSFromCert constructs TLS credentials from the input certificate for client. -// serverNameOverride is for testing only. If set to a non empty string, -// it will override the virtual host name of authority (e.g. :authority header field) in requests. -func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials { - return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}) -} - -// NewClientTLSFromFile constructs TLS credentials from the input certificate file for client. -// serverNameOverride is for testing only. If set to a non empty string, -// it will override the virtual host name of authority (e.g. :authority header field) in requests. -func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) { - b, err := ioutil.ReadFile(certFile) - if err != nil { - return nil, err - } - cp := x509.NewCertPool() - if !cp.AppendCertsFromPEM(b) { - return nil, fmt.Errorf("credentials: failed to append certificates") - } - return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}), nil -} - -// NewServerTLSFromCert constructs TLS credentials from the input certificate for server. -func NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials { - return NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}}) + // The condition is satisfied or AuthInfo struct does not implement GetCommonAuthInfo() method. + return nil } -// NewServerTLSFromFile constructs TLS credentials from the input certificate file and key -// file for server. -func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error) { - cert, err := tls.LoadX509KeyPair(certFile, keyFile) - if err != nil { - return nil, err +func init() { + internal.NewRequestInfoContext = func(ctx context.Context, ri RequestInfo) context.Context { + return context.WithValue(ctx, requestInfoKey{}, ri) } - return NewTLS(&tls.Config{Certificates: []tls.Certificate{cert}}), nil } // ChannelzSecurityInfo defines the interface that security protocols should implement // in order to provide security info to channelz. +// +// This API is experimental. type ChannelzSecurityInfo interface { GetSecurityValue() ChannelzSecurityValue } @@ -271,66 +232,20 @@ type ChannelzSecurityInfo interface { // ChannelzSecurityValue defines the interface that GetSecurityValue() return value // should satisfy. This interface should only be satisfied by *TLSChannelzSecurityValue // and *OtherChannelzSecurityValue. +// +// This API is experimental. type ChannelzSecurityValue interface { isChannelzSecurityValue() } -// TLSChannelzSecurityValue defines the struct that TLS protocol should return -// from GetSecurityValue(), containing security info like cipher and certificate used. -type TLSChannelzSecurityValue struct { - ChannelzSecurityValue - StandardName string - LocalCertificate []byte - RemoteCertificate []byte -} - // OtherChannelzSecurityValue defines the struct that non-TLS protocol should return // from GetSecurityValue(), which contains protocol specific security info. Note // the Value field will be sent to users of channelz requesting channel info, and // thus sensitive info should better be avoided. +// +// This API is experimental. type OtherChannelzSecurityValue struct { ChannelzSecurityValue Name string Value proto.Message } - -var cipherSuiteLookup = map[uint16]string{ - tls.TLS_RSA_WITH_RC4_128_SHA: "TLS_RSA_WITH_RC4_128_SHA", - tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - tls.TLS_RSA_WITH_AES_128_CBC_SHA: "TLS_RSA_WITH_AES_128_CBC_SHA", - tls.TLS_RSA_WITH_AES_256_CBC_SHA: "TLS_RSA_WITH_AES_256_CBC_SHA", - tls.TLS_RSA_WITH_AES_128_GCM_SHA256: "TLS_RSA_WITH_AES_128_GCM_SHA256", - tls.TLS_RSA_WITH_AES_256_GCM_SHA384: "TLS_RSA_WITH_AES_256_GCM_SHA384", - tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", - tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA: "TLS_ECDHE_RSA_WITH_RC4_128_SHA", - tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - tls.TLS_FALLBACK_SCSV: "TLS_FALLBACK_SCSV", - tls.TLS_RSA_WITH_AES_128_CBC_SHA256: "TLS_RSA_WITH_AES_128_CBC_SHA256", - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", - tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", -} - -// cloneTLSConfig returns a shallow clone of the exported -// fields of cfg, ignoring the unexported sync.Once, which -// contains a mutex and must not be copied. -// -// If cfg is nil, a new zero tls.Config is returned. -// -// TODO: inline this function if possible. -func cloneTLSConfig(cfg *tls.Config) *tls.Config { - if cfg == nil { - return &tls.Config{} - } - - return cfg.Clone() -} diff --git a/vendor/google.golang.org/grpc/credentials/tls13.go b/vendor/google.golang.org/grpc/credentials/go12.go similarity index 100% rename from vendor/google.golang.org/grpc/credentials/tls13.go rename to vendor/google.golang.org/grpc/credentials/go12.go diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go new file mode 100644 index 00000000000..28b4f6232de --- /dev/null +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -0,0 +1,225 @@ +/* + * + * Copyright 2014 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package credentials + +import ( + "context" + "crypto/tls" + "crypto/x509" + "fmt" + "io/ioutil" + "net" + + "google.golang.org/grpc/credentials/internal" +) + +// TLSInfo contains the auth information for a TLS authenticated connection. +// It implements the AuthInfo interface. +type TLSInfo struct { + State tls.ConnectionState + CommonAuthInfo +} + +// AuthType returns the type of TLSInfo as a string. +func (t TLSInfo) AuthType() string { + return "tls" +} + +// GetSecurityValue returns security info requested by channelz. +func (t TLSInfo) GetSecurityValue() ChannelzSecurityValue { + v := &TLSChannelzSecurityValue{ + StandardName: cipherSuiteLookup[t.State.CipherSuite], + } + // Currently there's no way to get LocalCertificate info from tls package. + if len(t.State.PeerCertificates) > 0 { + v.RemoteCertificate = t.State.PeerCertificates[0].Raw + } + return v +} + +// tlsCreds is the credentials required for authenticating a connection using TLS. +type tlsCreds struct { + // TLS configuration + config *tls.Config +} + +func (c tlsCreds) Info() ProtocolInfo { + return ProtocolInfo{ + SecurityProtocol: "tls", + SecurityVersion: "1.2", + ServerName: c.config.ServerName, + } +} + +func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (_ net.Conn, _ AuthInfo, err error) { + // use local cfg to avoid clobbering ServerName if using multiple endpoints + cfg := cloneTLSConfig(c.config) + if cfg.ServerName == "" { + serverName, _, err := net.SplitHostPort(authority) + if err != nil { + // If the authority had no host port or if the authority cannot be parsed, use it as-is. + serverName = authority + } + cfg.ServerName = serverName + } + conn := tls.Client(rawConn, cfg) + errChannel := make(chan error, 1) + go func() { + errChannel <- conn.Handshake() + close(errChannel) + }() + select { + case err := <-errChannel: + if err != nil { + conn.Close() + return nil, nil, err + } + case <-ctx.Done(): + conn.Close() + return nil, nil, ctx.Err() + } + return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState(), CommonAuthInfo{PrivacyAndIntegrity}}, nil +} + +func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) { + conn := tls.Server(rawConn, c.config) + if err := conn.Handshake(); err != nil { + conn.Close() + return nil, nil, err + } + return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState(), CommonAuthInfo{PrivacyAndIntegrity}}, nil +} + +func (c *tlsCreds) Clone() TransportCredentials { + return NewTLS(c.config) +} + +func (c *tlsCreds) OverrideServerName(serverNameOverride string) error { + c.config.ServerName = serverNameOverride + return nil +} + +const alpnProtoStrH2 = "h2" + +func appendH2ToNextProtos(ps []string) []string { + for _, p := range ps { + if p == alpnProtoStrH2 { + return ps + } + } + ret := make([]string, 0, len(ps)+1) + ret = append(ret, ps...) + return append(ret, alpnProtoStrH2) +} + +// NewTLS uses c to construct a TransportCredentials based on TLS. +func NewTLS(c *tls.Config) TransportCredentials { + tc := &tlsCreds{cloneTLSConfig(c)} + tc.config.NextProtos = appendH2ToNextProtos(tc.config.NextProtos) + return tc +} + +// NewClientTLSFromCert constructs TLS credentials from the input certificate for client. +// serverNameOverride is for testing only. If set to a non empty string, +// it will override the virtual host name of authority (e.g. :authority header field) in requests. +func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) TransportCredentials { + return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}) +} + +// NewClientTLSFromFile constructs TLS credentials from the input certificate file for client. +// serverNameOverride is for testing only. If set to a non empty string, +// it will override the virtual host name of authority (e.g. :authority header field) in requests. +func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) { + b, err := ioutil.ReadFile(certFile) + if err != nil { + return nil, err + } + cp := x509.NewCertPool() + if !cp.AppendCertsFromPEM(b) { + return nil, fmt.Errorf("credentials: failed to append certificates") + } + return NewTLS(&tls.Config{ServerName: serverNameOverride, RootCAs: cp}), nil +} + +// NewServerTLSFromCert constructs TLS credentials from the input certificate for server. +func NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials { + return NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}}) +} + +// NewServerTLSFromFile constructs TLS credentials from the input certificate file and key +// file for server. +func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error) { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + return nil, err + } + return NewTLS(&tls.Config{Certificates: []tls.Certificate{cert}}), nil +} + +// TLSChannelzSecurityValue defines the struct that TLS protocol should return +// from GetSecurityValue(), containing security info like cipher and certificate used. +// +// This API is EXPERIMENTAL. +type TLSChannelzSecurityValue struct { + ChannelzSecurityValue + StandardName string + LocalCertificate []byte + RemoteCertificate []byte +} + +var cipherSuiteLookup = map[uint16]string{ + tls.TLS_RSA_WITH_RC4_128_SHA: "TLS_RSA_WITH_RC4_128_SHA", + tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_RSA_WITH_3DES_EDE_CBC_SHA", + tls.TLS_RSA_WITH_AES_128_CBC_SHA: "TLS_RSA_WITH_AES_128_CBC_SHA", + tls.TLS_RSA_WITH_AES_256_CBC_SHA: "TLS_RSA_WITH_AES_256_CBC_SHA", + tls.TLS_RSA_WITH_AES_128_GCM_SHA256: "TLS_RSA_WITH_AES_128_GCM_SHA256", + tls.TLS_RSA_WITH_AES_256_GCM_SHA384: "TLS_RSA_WITH_AES_256_GCM_SHA384", + tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", + tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA: "TLS_ECDHE_RSA_WITH_RC4_128_SHA", + tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", + tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", + tls.TLS_FALLBACK_SCSV: "TLS_FALLBACK_SCSV", + tls.TLS_RSA_WITH_AES_128_CBC_SHA256: "TLS_RSA_WITH_AES_128_CBC_SHA256", + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", + tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", + tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", +} + +// cloneTLSConfig returns a shallow clone of the exported +// fields of cfg, ignoring the unexported sync.Once, which +// contains a mutex and must not be copied. +// +// If cfg is nil, a new zero tls.Config is returned. +// +// TODO: inline this function if possible. +func cloneTLSConfig(cfg *tls.Config) *tls.Config { + if cfg == nil { + return &tls.Config{} + } + + return cfg.Clone() +} diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index e8f34d0d6ea..63f5ae21df1 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -24,11 +24,12 @@ import ( "net" "time" + "google.golang.org/grpc/backoff" "google.golang.org/grpc/balancer" "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" - "google.golang.org/grpc/internal/backoff" + internalbackoff "google.golang.org/grpc/internal/backoff" "google.golang.org/grpc/internal/envconfig" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" @@ -47,7 +48,7 @@ type dialOptions struct { cp Compressor dc Decompressor - bs backoff.Strategy + bs internalbackoff.Strategy block bool insecure bool timeout time.Duration @@ -57,9 +58,7 @@ type dialOptions struct { callOptions []CallOption // This is used by v1 balancer dial option WithBalancer to support v1 // balancer, and also by WithBalancerName dial option. - balancerBuilder balancer.Builder - // This is to support grpclb. - resolverBuilder resolver.Builder + balancerBuilder balancer.Builder channelzParentID int64 disableServiceConfig bool disableRetry bool @@ -68,6 +67,11 @@ type dialOptions struct { minConnectTimeout func() time.Duration defaultServiceConfig *ServiceConfig // defaultServiceConfig is parsed from defaultServiceConfigRawJSON. defaultServiceConfigRawJSON *string + // This is used by ccResolverWrapper to backoff between successive calls to + // resolver.ResolveNow(). The user will have no need to configure this, but + // we need to be able to configure this in tests. + resolveNowBackoff func(int) time.Duration + resolvers []resolver.Builder } // DialOption configures how we set up the connection. @@ -226,13 +230,6 @@ func WithBalancerName(balancerName string) DialOption { }) } -// withResolverBuilder is only for grpclb. -func withResolverBuilder(b resolver.Builder) DialOption { - return newFuncDialOption(func(o *dialOptions) { - o.resolverBuilder = b - }) -} - // WithServiceConfig returns a DialOption which has a channel to read the // service configuration. // @@ -246,8 +243,28 @@ func WithServiceConfig(c <-chan ServiceConfig) DialOption { }) } +// WithConnectParams configures the dialer to use the provided ConnectParams. +// +// The backoff configuration specified as part of the ConnectParams overrides +// all defaults specified in +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. Consider +// using the backoff.DefaultConfig as a base, in cases where you want to +// override only a subset of the backoff configuration. +// +// This API is EXPERIMENTAL. +func WithConnectParams(p ConnectParams) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.bs = internalbackoff.Exponential{Config: p.Backoff} + o.minConnectTimeout = func() time.Duration { + return p.MinConnectTimeout + } + }) +} + // WithBackoffMaxDelay configures the dialer to use the provided maximum delay // when backing off after failed connection attempts. +// +// Deprecated: use WithConnectParams instead. Will be supported throughout 1.x. func WithBackoffMaxDelay(md time.Duration) DialOption { return WithBackoffConfig(BackoffConfig{MaxDelay: md}) } @@ -255,19 +272,18 @@ func WithBackoffMaxDelay(md time.Duration) DialOption { // WithBackoffConfig configures the dialer to use the provided backoff // parameters after connection failures. // -// Use WithBackoffMaxDelay until more parameters on BackoffConfig are opened up -// for use. +// Deprecated: use WithConnectParams instead. Will be supported throughout 1.x. func WithBackoffConfig(b BackoffConfig) DialOption { - return withBackoff(backoff.Exponential{ - MaxDelay: b.MaxDelay, - }) + bc := backoff.DefaultConfig + bc.MaxDelay = b.MaxDelay + return withBackoff(internalbackoff.Exponential{Config: bc}) } // withBackoff sets the backoff strategy used for connectRetryNum after a failed // connection attempt. // // This can be exported if arbitrary backoff strategies are allowed by gRPC. -func withBackoff(bs backoff.Strategy) DialOption { +func withBackoff(bs internalbackoff.Strategy) DialOption { return newFuncDialOption(func(o *dialOptions) { o.bs = bs }) @@ -322,8 +338,8 @@ func WithCredentialsBundle(b credentials.Bundle) DialOption { // WithTimeout returns a DialOption that configures a timeout for dialing a // ClientConn initially. This is valid if and only if WithBlock() is present. // -// Deprecated: use DialContext and context.WithTimeout instead. Will be -// supported throughout 1.x. +// Deprecated: use DialContext instead of Dial and context.WithTimeout +// instead. Will be supported throughout 1.x. func WithTimeout(d time.Duration) DialOption { return newFuncDialOption(func(o *dialOptions) { o.timeout = d @@ -341,7 +357,6 @@ func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOp } func init() { - internal.WithResolverBuilder = withResolverBuilder internal.WithHealthCheckFunc = withHealthCheckFunc } @@ -455,6 +470,8 @@ func WithAuthority(a string) DialOption { // WithChannelzParentID returns a DialOption that specifies the channelz ID of // current ClientConn's parent. This function is used in nested channel creation // (e.g. grpclb dial). +// +// This API is EXPERIMENTAL. func WithChannelzParentID(id int64) DialOption { return newFuncDialOption(func(o *dialOptions) { o.channelzParentID = id @@ -539,6 +556,7 @@ func defaultDialOptions() dialOptions { WriteBufferSize: defaultWriteBufSize, ReadBufferSize: defaultReadBufSize, }, + resolveNowBackoff: internalbackoff.DefaultExponential.Backoff, } } @@ -552,3 +570,25 @@ func withMinConnectDeadline(f func() time.Duration) DialOption { o.minConnectTimeout = f }) } + +// withResolveNowBackoff specifies the function that clientconn uses to backoff +// between successive calls to resolver.ResolveNow(). +// +// For testing purpose only. +func withResolveNowBackoff(f func(int) time.Duration) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.resolveNowBackoff = f + }) +} + +// WithResolvers allows a list of resolver implementations to be registered +// locally with the ClientConn without needing to be globally registered via +// resolver.Register. They will be matched against the scheme used for the +// current Dial only, and will take precedence over the global registry. +// +// This API is EXPERIMENTAL. +func WithResolvers(rs ...resolver.Builder) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.resolvers = append(o.resolvers, rs...) + }) +} diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 30a75da99d5..195e8448b64 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -46,6 +46,10 @@ type Compressor interface { // coding header. The result must be static; the result cannot change // between calls. Name() string + // EXPERIMENTAL: if a Compressor implements + // DecompressedSize(compressedBytes []byte) int, gRPC will call it + // to determine the size of the buffer allocated for the result of decompression. + // Return -1 to indicate unknown size. } var registeredCompressor = make(map[string]Compressor) diff --git a/vendor/google.golang.org/grpc/go.mod b/vendor/google.golang.org/grpc/go.mod index c1a8340c5ba..2378361302f 100644 --- a/vendor/google.golang.org/grpc/go.mod +++ b/vendor/google.golang.org/grpc/go.mod @@ -1,19 +1,16 @@ module google.golang.org/grpc +go 1.11 + require ( - cloud.google.com/go v0.26.0 // indirect - github.com/BurntSushi/toml v0.3.1 // indirect - github.com/client9/misspell v0.3.4 + github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 + github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/mock v1.1.1 - github.com/golang/protobuf v1.2.0 + github.com/golang/protobuf v1.3.2 github.com/google/go-cmp v0.2.0 - golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 golang.org/x/net v0.0.0-20190311183353-d8887717615a golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a - golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 - google.golang.org/appengine v1.1.0 // indirect - google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 - honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc + google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 ) diff --git a/vendor/google.golang.org/grpc/go.sum b/vendor/google.golang.org/grpc/go.sum index 741677d2e81..dd5d0cee7ad 100644 --- a/vendor/google.golang.org/grpc/go.sum +++ b/vendor/google.golang.org/grpc/go.sum @@ -1,37 +1,53 @@ cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 h1:5Beo0mZN8dRzgrMMkDp0jc8YXQKx9DiJ2k1dkvGsn5A= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/google.golang.org/grpc/grpclog/grpclog.go b/vendor/google.golang.org/grpc/grpclog/grpclog.go index 51bb9457cda..874ea6d98a6 100644 --- a/vendor/google.golang.org/grpc/grpclog/grpclog.go +++ b/vendor/google.golang.org/grpc/grpclog/grpclog.go @@ -89,7 +89,7 @@ func Fatal(args ...interface{}) { } // Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf. -// It calles os.Exit() with exit code 1. +// It calls os.Exit() with exit code 1. func Fatalf(format string, args ...interface{}) { logger.Fatalf(format, args...) // Make sure fatal logs will exit. diff --git a/vendor/google.golang.org/grpc/health/client.go b/vendor/google.golang.org/grpc/health/client.go index b43746e616c..b5bee483802 100644 --- a/vendor/google.golang.org/grpc/health/client.go +++ b/vendor/google.golang.org/grpc/health/client.go @@ -33,20 +33,20 @@ import ( "google.golang.org/grpc/status" ) -const maxDelay = 120 * time.Second - -var backoffStrategy = backoff.Exponential{MaxDelay: maxDelay} -var backoffFunc = func(ctx context.Context, retries int) bool { - d := backoffStrategy.Backoff(retries) - timer := time.NewTimer(d) - select { - case <-timer.C: - return true - case <-ctx.Done(): - timer.Stop() - return false +var ( + backoffStrategy = backoff.DefaultExponential + backoffFunc = func(ctx context.Context, retries int) bool { + d := backoffStrategy.Backoff(retries) + timer := time.NewTimer(d) + select { + case <-timer.C: + return true + case <-ctx.Done(): + timer.Stop() + return false + } } -} +) func init() { internal.HealthCheckFunc = clientHealthCheck @@ -56,7 +56,7 @@ const healthCheckMethod = "/grpc.health.v1.Health/Watch" // This function implements the protocol defined at: // https://github.com/grpc/grpc/blob/master/doc/health-checking.md -func clientHealthCheck(ctx context.Context, newStream func(string) (interface{}, error), setConnectivityState func(connectivity.State), service string) error { +func clientHealthCheck(ctx context.Context, newStream func(string) (interface{}, error), setConnectivityState func(connectivity.State, error), service string) error { tryCnt := 0 retryConnection: @@ -70,7 +70,7 @@ retryConnection: if ctx.Err() != nil { return nil } - setConnectivityState(connectivity.Connecting) + setConnectivityState(connectivity.Connecting, nil) rawS, err := newStream(healthCheckMethod) if err != nil { continue retryConnection @@ -79,7 +79,7 @@ retryConnection: s, ok := rawS.(grpc.ClientStream) // Ideally, this should never happen. But if it happens, the server is marked as healthy for LBing purposes. if !ok { - setConnectivityState(connectivity.Ready) + setConnectivityState(connectivity.Ready, nil) return fmt.Errorf("newStream returned %v (type %T); want grpc.ClientStream", rawS, rawS) } @@ -95,22 +95,22 @@ retryConnection: // Reports healthy for the LBing purposes if health check is not implemented in the server. if status.Code(err) == codes.Unimplemented { - setConnectivityState(connectivity.Ready) + setConnectivityState(connectivity.Ready, nil) return err } // Reports unhealthy if server's Watch method gives an error other than UNIMPLEMENTED. if err != nil { - setConnectivityState(connectivity.TransientFailure) + setConnectivityState(connectivity.TransientFailure, fmt.Errorf("connection active but received health check RPC error: %v", err)) continue retryConnection } - // As a message has been received, removes the need for backoff for the next retry by reseting the try count. + // As a message has been received, removes the need for backoff for the next retry by resetting the try count. tryCnt = 0 if resp.Status == healthpb.HealthCheckResponse_SERVING { - setConnectivityState(connectivity.Ready) + setConnectivityState(connectivity.Ready, nil) } else { - setConnectivityState(connectivity.TransientFailure) + setConnectivityState(connectivity.TransientFailure, fmt.Errorf("connection active but health check failed. status=%s", resp.Status)) } } } diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go index c2f2c7729d0..c99e27ae5b6 100644 --- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go +++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go @@ -1,15 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: grpc/health/v1/health.proto -package grpc_health_v1 // import "google.golang.org/grpc/health/grpc_health_v1" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +package grpc_health_v1 import ( - context "golang.org/x/net/context" + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type HealthCheckResponse_ServingStatus int32 @@ -38,6 +39,7 @@ var HealthCheckResponse_ServingStatus_name = map[int32]string{ 2: "NOT_SERVING", 3: "SERVICE_UNKNOWN", } + var HealthCheckResponse_ServingStatus_value = map[string]int32{ "UNKNOWN": 0, "SERVING": 1, @@ -48,8 +50,9 @@ var HealthCheckResponse_ServingStatus_value = map[string]int32{ func (x HealthCheckResponse_ServingStatus) String() string { return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x)) } + func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_health_6b1a06aa67f91efd, []int{1, 0} + return fileDescriptor_e265fd9d4e077217, []int{1, 0} } type HealthCheckRequest struct { @@ -63,16 +66,17 @@ func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} } func (m *HealthCheckRequest) String() string { return proto.CompactTextString(m) } func (*HealthCheckRequest) ProtoMessage() {} func (*HealthCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_health_6b1a06aa67f91efd, []int{0} + return fileDescriptor_e265fd9d4e077217, []int{0} } + func (m *HealthCheckRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HealthCheckRequest.Unmarshal(m, b) } func (m *HealthCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_HealthCheckRequest.Marshal(b, m, deterministic) } -func (dst *HealthCheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckRequest.Merge(dst, src) +func (m *HealthCheckRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckRequest.Merge(m, src) } func (m *HealthCheckRequest) XXX_Size() int { return xxx_messageInfo_HealthCheckRequest.Size(m) @@ -101,16 +105,17 @@ func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } func (m *HealthCheckResponse) String() string { return proto.CompactTextString(m) } func (*HealthCheckResponse) ProtoMessage() {} func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_health_6b1a06aa67f91efd, []int{1} + return fileDescriptor_e265fd9d4e077217, []int{1} } + func (m *HealthCheckResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HealthCheckResponse.Unmarshal(m, b) } func (m *HealthCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_HealthCheckResponse.Marshal(b, m, deterministic) } -func (dst *HealthCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HealthCheckResponse.Merge(dst, src) +func (m *HealthCheckResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealthCheckResponse.Merge(m, src) } func (m *HealthCheckResponse) XXX_Size() int { return xxx_messageInfo_HealthCheckResponse.Size(m) @@ -129,9 +134,34 @@ func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus { } func init() { + proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v1.HealthCheckRequest") proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v1.HealthCheckResponse") - proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) +} + +func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_e265fd9d4e077217) } + +var fileDescriptor_e265fd9d4e077217 = []byte{ + // 297 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0x2a, 0x48, + 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, 0xd0, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, + 0x4b, 0xf2, 0x85, 0xf8, 0x40, 0x92, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21, 0x0f, + 0x30, 0xc7, 0x39, 0x23, 0x35, 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, + 0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, + 0xc6, 0x55, 0xda, 0xc8, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, + 0x93, 0x8b, 0xad, 0xb8, 0x24, 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5, + 0x22, 0x3d, 0x2c, 0x9a, 0xf4, 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d, + 0x50, 0xf2, 0xe7, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, + 0xf7, 0x13, 0x60, 0x00, 0x71, 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8, + 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x42, 0xc2, 0x5c, 0xfc, 0x60, 0x8e, 0xb3, + 0x6b, 0x3c, 0x4c, 0x0b, 0xb3, 0xd1, 0x3a, 0x46, 0x2e, 0x36, 0x88, 0xf5, 0x42, 0x01, 0x5c, 0xac, + 0x60, 0x27, 0x08, 0x29, 0xe1, 0x75, 0x1f, 0x38, 0x14, 0xa4, 0x94, 0x89, 0xf0, 0x83, 0x50, 0x10, + 0x17, 0x6b, 0x78, 0x62, 0x49, 0x72, 0x06, 0xd5, 0x4c, 0x34, 0x60, 0x74, 0x4a, 0xe4, 0x12, 0xcc, + 0xcc, 0x47, 0x53, 0xea, 0xc4, 0x0d, 0x51, 0x1b, 0x00, 0x8a, 0xc6, 0x00, 0xc6, 0x28, 0x9d, 0xf4, + 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xbd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74, + 0x7d, 0xe4, 0x78, 0x07, 0xb1, 0xe3, 0x21, 0xec, 0xf8, 0x32, 0xc3, 0x55, 0x4c, 0x7c, 0xee, 0x20, + 0xd3, 0x20, 0x46, 0xe8, 0x85, 0x19, 0x26, 0xb1, 0x81, 0x93, 0x83, 0x31, 0x20, 0x00, 0x00, 0xff, + 0xff, 0x12, 0x7d, 0x96, 0xcb, 0x2d, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -239,6 +269,17 @@ type HealthServer interface { Watch(*HealthCheckRequest, Health_WatchServer) error } +// UnimplementedHealthServer can be embedded to have forward compatible implementations. +type UnimplementedHealthServer struct { +} + +func (*UnimplementedHealthServer) Check(ctx context.Context, req *HealthCheckRequest) (*HealthCheckResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") +} +func (*UnimplementedHealthServer) Watch(req *HealthCheckRequest, srv Health_WatchServer) error { + return status.Errorf(codes.Unimplemented, "method Watch not implemented") +} + func RegisterHealthServer(s *grpc.Server, srv HealthServer) { s.RegisterService(&_Health_serviceDesc, srv) } @@ -300,28 +341,3 @@ var _Health_serviceDesc = grpc.ServiceDesc{ }, Metadata: "grpc/health/v1/health.proto", } - -func init() { proto.RegisterFile("grpc/health/v1/health.proto", fileDescriptor_health_6b1a06aa67f91efd) } - -var fileDescriptor_health_6b1a06aa67f91efd = []byte{ - // 297 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0x2a, 0x48, - 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9, 0xd0, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, - 0x4b, 0xf2, 0x85, 0xf8, 0x40, 0x92, 0x7a, 0x50, 0xa1, 0x32, 0x43, 0x25, 0x3d, 0x2e, 0x21, 0x0f, - 0x30, 0xc7, 0x39, 0x23, 0x35, 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, - 0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, - 0xc6, 0x55, 0xda, 0xc8, 0xc8, 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, - 0x93, 0x8b, 0xad, 0xb8, 0x24, 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x50, 0x0f, 0xd5, - 0x22, 0x3d, 0x2c, 0x9a, 0xf4, 0x82, 0x41, 0x86, 0xe6, 0xa5, 0x07, 0x83, 0x35, 0x06, 0x41, 0x0d, - 0x50, 0xf2, 0xe7, 0xe2, 0x45, 0x91, 0x10, 0xe2, 0xe6, 0x62, 0x0f, 0xf5, 0xf3, 0xf6, 0xf3, 0x0f, - 0xf7, 0x13, 0x60, 0x00, 0x71, 0x82, 0x5d, 0x83, 0xc2, 0x3c, 0xfd, 0xdc, 0x05, 0x18, 0x85, 0xf8, - 0xb9, 0xb8, 0xfd, 0xfc, 0x43, 0xe2, 0x61, 0x02, 0x4c, 0x42, 0xc2, 0x5c, 0xfc, 0x60, 0x8e, 0xb3, - 0x6b, 0x3c, 0x4c, 0x0b, 0xb3, 0xd1, 0x3a, 0x46, 0x2e, 0x36, 0x88, 0xf5, 0x42, 0x01, 0x5c, 0xac, - 0x60, 0x27, 0x08, 0x29, 0xe1, 0x75, 0x1f, 0x38, 0x14, 0xa4, 0x94, 0x89, 0xf0, 0x83, 0x50, 0x10, - 0x17, 0x6b, 0x78, 0x62, 0x49, 0x72, 0x06, 0xd5, 0x4c, 0x34, 0x60, 0x74, 0x4a, 0xe4, 0x12, 0xcc, - 0xcc, 0x47, 0x53, 0xea, 0xc4, 0x0d, 0x51, 0x1b, 0x00, 0x8a, 0xc6, 0x00, 0xc6, 0x28, 0x9d, 0xf4, - 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0xbd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74, - 0x7d, 0xe4, 0x78, 0x07, 0xb1, 0xe3, 0x21, 0xec, 0xf8, 0x32, 0xc3, 0x55, 0x4c, 0x7c, 0xee, 0x20, - 0xd3, 0x20, 0x46, 0xe8, 0x85, 0x19, 0x26, 0xb1, 0x81, 0x93, 0x83, 0x31, 0x20, 0x00, 0x00, 0xff, - 0xff, 0x12, 0x7d, 0x96, 0xcb, 0x2d, 0x02, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/grpc/health/server.go b/vendor/google.golang.org/grpc/health/server.go index c79f9d2ab80..2262607f882 100644 --- a/vendor/google.golang.org/grpc/health/server.go +++ b/vendor/google.golang.org/grpc/health/server.go @@ -35,7 +35,7 @@ import ( // Server implements `service Health`. type Server struct { - mu sync.Mutex + mu sync.RWMutex // If shutdown is true, it's expected all serving status is NOT_SERVING, and // will stay in NOT_SERVING. shutdown bool @@ -54,8 +54,8 @@ func NewServer() *Server { // Check implements `service Health`. func (s *Server) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) { - s.mu.Lock() - defer s.mu.Unlock() + s.mu.RLock() + defer s.mu.RUnlock() if servingStatus, ok := s.statusMap[in.Service]; ok { return &healthpb.HealthCheckResponse{ Status: servingStatus, @@ -139,7 +139,7 @@ func (s *Server) setServingStatusLocked(service string, servingStatus healthpb.H // Shutdown sets all serving status to NOT_SERVING, and configures the server to // ignore all future status changes. // -// This changes serving status for all services. To set status for a perticular +// This changes serving status for all services. To set status for a particular // services, call SetServingStatus(). func (s *Server) Shutdown() { s.mu.Lock() @@ -153,7 +153,7 @@ func (s *Server) Shutdown() { // Resume sets all serving status to SERVING, and configures the server to // accept all future status changes. // -// This changes serving status for all services. To set status for a perticular +// This changes serving status for all services. To set status for a particular // services, call SetServingStatus(). func (s *Server) Resume() { s.mu.Lock() diff --git a/vendor/google.golang.org/grpc/internal/backoff/backoff.go b/vendor/google.golang.org/grpc/internal/backoff/backoff.go index 1bd0cce5abd..5fc0ee3da53 100644 --- a/vendor/google.golang.org/grpc/internal/backoff/backoff.go +++ b/vendor/google.golang.org/grpc/internal/backoff/backoff.go @@ -25,44 +25,39 @@ package backoff import ( "time" + grpcbackoff "google.golang.org/grpc/backoff" "google.golang.org/grpc/internal/grpcrand" ) // Strategy defines the methodology for backing off after a grpc connection // failure. -// type Strategy interface { // Backoff returns the amount of time to wait before the next retry given // the number of consecutive failures. Backoff(retries int) time.Duration } -const ( - // baseDelay is the amount of time to wait before retrying after the first - // failure. - baseDelay = 1.0 * time.Second - // factor is applied to the backoff after each retry. - factor = 1.6 - // jitter provides a range to randomize backoff delays. - jitter = 0.2 -) +// DefaultExponential is an exponential backoff implementation using the +// default values for all the configurable knobs defined in +// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. +var DefaultExponential = Exponential{Config: grpcbackoff.DefaultConfig} // Exponential implements exponential backoff algorithm as defined in // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. type Exponential struct { - // MaxDelay is the upper bound of backoff delay. - MaxDelay time.Duration + // Config contains all options to configure the backoff algorithm. + Config grpcbackoff.Config } // Backoff returns the amount of time to wait before the next retry given the // number of retries. func (bc Exponential) Backoff(retries int) time.Duration { if retries == 0 { - return baseDelay + return bc.Config.BaseDelay } - backoff, max := float64(baseDelay), float64(bc.MaxDelay) + backoff, max := float64(bc.Config.BaseDelay), float64(bc.Config.MaxDelay) for backoff < max && retries > 0 { - backoff *= factor + backoff *= bc.Config.Multiplier retries-- } if backoff > max { @@ -70,7 +65,7 @@ func (bc Exponential) Backoff(retries int) time.Duration { } // Randomize backoff delays so that if a cluster of requests start at // the same time, they won't operate in lockstep. - backoff *= 1 + jitter*(grpcrand.Float64()*2-1) + backoff *= 1 + bc.Config.Jitter*(grpcrand.Float64()*2-1) if backoff < 0 { return 0 } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go index fee6aecd08f..8b105167491 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go @@ -34,7 +34,7 @@ type Logger interface { } // binLogger is the global binary logger for the binary. One of this should be -// built at init time from the configuration (environment varialbe or flags). +// built at init time from the configuration (environment variable or flags). // // It is used to get a methodLogger for each individual method. var binLogger Logger @@ -98,7 +98,7 @@ func (l *logger) setDefaultMethodLogger(ml *methodLoggerConfig) error { // New methodLogger with same service overrides the old one. func (l *logger) setServiceMethodLogger(service string, ml *methodLoggerConfig) error { if _, ok := l.services[service]; ok { - return fmt.Errorf("conflicting rules for service %v found", service) + return fmt.Errorf("conflicting service rules for service %v found", service) } if l.services == nil { l.services = make(map[string]*methodLoggerConfig) @@ -112,10 +112,10 @@ func (l *logger) setServiceMethodLogger(service string, ml *methodLoggerConfig) // New methodLogger with same method overrides the old one. func (l *logger) setMethodMethodLogger(method string, ml *methodLoggerConfig) error { if _, ok := l.blacklist[method]; ok { - return fmt.Errorf("conflicting rules for method %v found", method) + return fmt.Errorf("conflicting blacklist rules for method %v found", method) } if _, ok := l.methods[method]; ok { - return fmt.Errorf("conflicting rules for method %v found", method) + return fmt.Errorf("conflicting method rules for method %v found", method) } if l.methods == nil { l.methods = make(map[string]*methodLoggerConfig) @@ -127,10 +127,10 @@ func (l *logger) setMethodMethodLogger(method string, ml *methodLoggerConfig) er // Set blacklist method for "-service/method". func (l *logger) setBlacklist(method string) error { if _, ok := l.blacklist[method]; ok { - return fmt.Errorf("conflicting rules for method %v found", method) + return fmt.Errorf("conflicting blacklist rules for method %v found", method) } if _, ok := l.methods[method]; ok { - return fmt.Errorf("conflicting rules for method %v found", method) + return fmt.Errorf("conflicting method rules for method %v found", method) } if l.blacklist == nil { l.blacklist = make(map[string]struct{}) diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index 4cc2525df7f..be30d0e65e7 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -43,7 +43,7 @@ import ( // Foo. // // If two configs exist for one certain method or service, the one specified -// later overrides the privous config. +// later overrides the previous config. func NewLoggerFromConfigString(s string) Logger { if s == "" { return nil @@ -74,7 +74,7 @@ func (l *logger) fillMethodLoggerWithConfigString(config string) error { return fmt.Errorf("invalid config: %q, %v", config, err) } if m == "*" { - return fmt.Errorf("invalid config: %q, %v", config, "* not allowd in blacklist config") + return fmt.Errorf("invalid config: %q, %v", config, "* not allowed in blacklist config") } if suffix != "" { return fmt.Errorf("invalid config: %q, %v", config, "header/message limit not allowed in blacklist config") diff --git a/vendor/google.golang.org/grpc/internal/binarylog/sink.go b/vendor/google.golang.org/grpc/internal/binarylog/sink.go index 20d044f0fd7..a2e7c346dd0 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/sink.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/sink.go @@ -63,7 +63,7 @@ func (ns *noopSink) Close() error { return nil } // newWriterSink creates a binary log sink with the given writer. // -// Write() marshalls the proto message and writes it to the given writer. Each +// Write() marshals the proto message and writes it to the given writer. Each // message is prefixed with a 4 byte big endian unsigned integer as the length. // // No buffer is done, Close() doesn't try to close the writer. diff --git a/vendor/google.golang.org/grpc/internal/buffer/unbounded.go b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go new file mode 100644 index 00000000000..9f6a0c1200d --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go @@ -0,0 +1,85 @@ +/* + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package buffer provides an implementation of an unbounded buffer. +package buffer + +import "sync" + +// Unbounded is an implementation of an unbounded buffer which does not use +// extra goroutines. This is typically used for passing updates from one entity +// to another within gRPC. +// +// All methods on this type are thread-safe and don't block on anything except +// the underlying mutex used for synchronization. +// +// Unbounded supports values of any type to be stored in it by using a channel +// of `interface{}`. This means that a call to Put() incurs an extra memory +// allocation, and also that users need a type assertion while reading. For +// performance critical code paths, using Unbounded is strongly discouraged and +// defining a new type specific implementation of this buffer is preferred. See +// internal/transport/transport.go for an example of this. +type Unbounded struct { + c chan interface{} + mu sync.Mutex + backlog []interface{} +} + +// NewUnbounded returns a new instance of Unbounded. +func NewUnbounded() *Unbounded { + return &Unbounded{c: make(chan interface{}, 1)} +} + +// Put adds t to the unbounded buffer. +func (b *Unbounded) Put(t interface{}) { + b.mu.Lock() + if len(b.backlog) == 0 { + select { + case b.c <- t: + b.mu.Unlock() + return + default: + } + } + b.backlog = append(b.backlog, t) + b.mu.Unlock() +} + +// Load sends the earliest buffered data, if any, onto the read channel +// returned by Get(). Users are expected to call this every time they read a +// value from the read channel. +func (b *Unbounded) Load() { + b.mu.Lock() + if len(b.backlog) > 0 { + select { + case b.c <- b.backlog[0]: + b.backlog[0] = nil + b.backlog = b.backlog[1:] + default: + } + } + b.mu.Unlock() +} + +// Get returns a read channel on which values added to the buffer, via Put(), +// are sent on. +// +// Upon reading a value from this channel, users are expected to call Load() to +// send the next buffered value onto the channel if there is any. +func (b *Unbounded) Get() <-chan interface{} { + return b.c +} diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 3ee8740f1f9..ae6c8972fd7 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -25,11 +25,14 @@ import ( ) const ( - prefix = "GRPC_GO_" - retryStr = prefix + "RETRY" + prefix = "GRPC_GO_" + retryStr = prefix + "RETRY" + txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" ) var ( // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on". Retry = strings.EqualFold(os.Getenv(retryStr), "on") + // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). + TXTErrIgnore = !strings.EqualFold(os.Getenv(retryStr), "false") ) diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index bc1f99ac803..0912f0bf4c3 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -28,9 +28,7 @@ import ( ) var ( - // WithResolverBuilder is exported by dialoptions.go - WithResolverBuilder interface{} // func (resolver.Builder) grpc.DialOption - // WithHealthCheckFunc is not exported by dialoptions.go + // WithHealthCheckFunc is set by dialoptions.go WithHealthCheckFunc interface{} // func (HealthChecker) DialOption // HealthCheckFunc is used to provide client-side LB channel health checking HealthCheckFunc HealthChecker @@ -39,14 +37,17 @@ var ( // KeepaliveMinPingTime is the minimum ping interval. This must be 10s by // default, but tests may wish to set it lower for convenience. KeepaliveMinPingTime = 10 * time.Second - // ParseServiceConfig is a function to parse JSON service configs into - // opaque data structures. - ParseServiceConfig func(sc string) (interface{}, error) // StatusRawProto is exported by status/status.go. This func returns a // pointer to the wrapped Status proto for a given status.Status without a // call to proto.Clone(). The returned Status proto should not be mutated by // the caller. StatusRawProto interface{} // func (*status.Status) *spb.Status + // NewRequestInfoContext creates a new context based on the argument context attaching + // the passed in RequestInfo to the new context. + NewRequestInfoContext interface{} // func(context.Context, credentials.RequestInfo) context.Context + // ParseServiceConfigForTesting is for creating a fake + // ClientConn for resolver testing only + ParseServiceConfigForTesting interface{} // func(string) *serviceconfig.ParseResult ) // HealthChecker defines the signature of the client-side LB channel health checking function. @@ -57,7 +58,7 @@ var ( // // The health checking protocol is defined at: // https://github.com/grpc/grpc/blob/master/doc/health-checking.md -type HealthChecker func(ctx context.Context, newStream func(string) (interface{}, error), setConnectivityState func(connectivity.State), serviceName string) error +type HealthChecker func(ctx context.Context, newStream func(string) (interface{}, error), setConnectivityState func(connectivity.State, error), serviceName string) error const ( // CredsBundleModeFallback switches GoogleDefaultCreds to fallback mode. diff --git a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go similarity index 72% rename from vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go rename to vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 297492e87af..c368db62ea1 100644 --- a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -33,18 +33,22 @@ import ( "time" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/internal/backoff" + "google.golang.org/grpc/internal/envconfig" "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/serviceconfig" ) +// EnableSRVLookups controls whether the DNS resolver attempts to fetch gRPCLB +// addresses from SRV records. Must not be changed after init time. +var EnableSRVLookups = false + func init() { resolver.Register(NewBuilder()) } const ( defaultPort = "443" - defaultFreq = time.Minute * 30 defaultDNSSvrPort = "53" golang = "GO" // txtPrefix is the prefix string to be prepended to the host name for txt record lookup. @@ -94,47 +98,33 @@ var customAuthorityResolver = func(authority string) (netResolver, error) { // NewBuilder creates a dnsBuilder which is used to factory DNS resolvers. func NewBuilder() resolver.Builder { - return &dnsBuilder{minFreq: defaultFreq} + return &dnsBuilder{} } -type dnsBuilder struct { - // minimum frequency of polling the DNS server. - minFreq time.Duration -} +type dnsBuilder struct{} // Build creates and starts a DNS resolver that watches the name resolution of the target. -func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) { +func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { host, port, err := parseTarget(target.Endpoint, defaultPort) if err != nil { return nil, err } // IP address. - if net.ParseIP(host) != nil { - host, _ = formatIP(host) - addr := []resolver.Address{{Addr: host + ":" + port}} - i := &ipResolver{ - cc: cc, - ip: addr, - rn: make(chan struct{}, 1), - q: make(chan struct{}), - } - cc.NewAddress(addr) - go i.watcher() - return i, nil + if ipAddr, ok := formatIP(host); ok { + addr := []resolver.Address{{Addr: ipAddr + ":" + port}} + cc.UpdateState(resolver.State{Addresses: addr}) + return deadResolver{}, nil } // DNS address (non-IP). ctx, cancel := context.WithCancel(context.Background()) d := &dnsResolver{ - freq: b.minFreq, - backoff: backoff.Exponential{MaxDelay: b.minFreq}, host: host, port: port, ctx: ctx, cancel: cancel, cc: cc, - t: time.NewTimer(0), rn: make(chan struct{}, 1), disableServiceConfig: opts.DisableServiceConfig, } @@ -150,6 +140,7 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts d.wg.Add(1) go d.watcher() + d.ResolveNow(resolver.ResolveNowOptions{}) return d, nil } @@ -164,53 +155,23 @@ type netResolver interface { LookupTXT(ctx context.Context, name string) (txts []string, err error) } -// ipResolver watches for the name resolution update for an IP address. -type ipResolver struct { - cc resolver.ClientConn - ip []resolver.Address - // rn channel is used by ResolveNow() to force an immediate resolution of the target. - rn chan struct{} - q chan struct{} -} - -// ResolveNow resend the address it stores, no resolution is needed. -func (i *ipResolver) ResolveNow(opt resolver.ResolveNowOption) { - select { - case i.rn <- struct{}{}: - default: - } -} +// deadResolver is a resolver that does nothing. +type deadResolver struct{} -// Close closes the ipResolver. -func (i *ipResolver) Close() { - close(i.q) -} +func (deadResolver) ResolveNow(resolver.ResolveNowOptions) {} -func (i *ipResolver) watcher() { - for { - select { - case <-i.rn: - i.cc.NewAddress(i.ip) - case <-i.q: - return - } - } -} +func (deadResolver) Close() {} // dnsResolver watches for the name resolution update for a non-IP target. type dnsResolver struct { - freq time.Duration - backoff backoff.Exponential - retryCount int - host string - port string - resolver netResolver - ctx context.Context - cancel context.CancelFunc - cc resolver.ClientConn + host string + port string + resolver netResolver + ctx context.Context + cancel context.CancelFunc + cc resolver.ClientConn // rn channel is used by ResolveNow() to force an immediate resolution of the target. rn chan struct{} - t *time.Timer // wg is used to enforce Close() to return after the watcher() goroutine has finished. // Otherwise, data race will be possible. [Race Example] in dns_resolver_test we // replace the real lookup functions with mocked ones to facilitate testing. @@ -222,7 +183,7 @@ type dnsResolver struct { } // ResolveNow invoke an immediate resolution of the target that this dnsResolver watches. -func (d *dnsResolver) ResolveNow(opt resolver.ResolveNowOption) { +func (d *dnsResolver) ResolveNow(resolver.ResolveNowOptions) { select { case d.rn <- struct{}{}: default: @@ -233,7 +194,6 @@ func (d *dnsResolver) ResolveNow(opt resolver.ResolveNowOption) { func (d *dnsResolver) Close() { d.cancel() d.wg.Wait() - d.t.Stop() } func (d *dnsResolver) watcher() { @@ -242,27 +202,15 @@ func (d *dnsResolver) watcher() { select { case <-d.ctx.Done(): return - case <-d.t.C: case <-d.rn: - if !d.t.Stop() { - // Before resetting a timer, it should be stopped to prevent racing with - // reads on it's channel. - <-d.t.C - } } - result, sc := d.lookup() - // Next lookup should happen within an interval defined by d.freq. It may be - // more often due to exponential retry on empty address list. - if len(result) == 0 { - d.retryCount++ - d.t.Reset(d.backoff.Backoff(d.retryCount)) + state, err := d.lookup() + if err != nil { + d.cc.ReportError(err) } else { - d.retryCount = 0 - d.t.Reset(d.freq) + d.cc.UpdateState(*state) } - d.cc.NewServiceConfig(sc) - d.cc.NewAddress(result) // Sleep to prevent excessive re-resolutions. Incoming resolution requests // will be queued in d.rn. @@ -276,37 +224,68 @@ func (d *dnsResolver) watcher() { } } -func (d *dnsResolver) lookupSRV() []resolver.Address { +func (d *dnsResolver) lookupSRV() ([]resolver.Address, error) { + if !EnableSRVLookups { + return nil, nil + } var newAddrs []resolver.Address _, srvs, err := d.resolver.LookupSRV(d.ctx, "grpclb", "tcp", d.host) if err != nil { - grpclog.Infof("grpc: failed dns SRV record lookup due to %v.\n", err) - return nil + err = handleDNSError(err, "SRV") // may become nil + return nil, err } for _, s := range srvs { lbAddrs, err := d.resolver.LookupHost(d.ctx, s.Target) if err != nil { - grpclog.Infof("grpc: failed load balancer address dns lookup due to %v.\n", err) - continue + err = handleDNSError(err, "A") // may become nil + if err == nil { + // If there are other SRV records, look them up and ignore this + // one that does not exist. + continue + } + return nil, err } for _, a := range lbAddrs { - a, ok := formatIP(a) + ip, ok := formatIP(a) if !ok { - grpclog.Errorf("grpc: failed IP parsing due to %v.\n", err) - continue + return nil, fmt.Errorf("dns: error parsing A record IP address %v", a) } - addr := a + ":" + strconv.Itoa(int(s.Port)) + addr := ip + ":" + strconv.Itoa(int(s.Port)) newAddrs = append(newAddrs, resolver.Address{Addr: addr, Type: resolver.GRPCLB, ServerName: s.Target}) } } - return newAddrs + return newAddrs, nil +} + +var filterError = func(err error) error { + if dnsErr, ok := err.(*net.DNSError); ok && !dnsErr.IsTimeout && !dnsErr.IsTemporary { + // Timeouts and temporary errors should be communicated to gRPC to + // attempt another DNS query (with backoff). Other errors should be + // suppressed (they may represent the absence of a TXT record). + return nil + } + return err +} + +func handleDNSError(err error, lookupType string) error { + err = filterError(err) + if err != nil { + err = fmt.Errorf("dns: %v record lookup error: %v", lookupType, err) + grpclog.Infoln(err) + } + return err } -func (d *dnsResolver) lookupTXT() string { +func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult { ss, err := d.resolver.LookupTXT(d.ctx, txtPrefix+d.host) if err != nil { - grpclog.Infof("grpc: failed dns TXT record lookup due to %v.\n", err) - return "" + if envconfig.TXTErrIgnore { + return nil + } + if err = handleDNSError(err, "TXT"); err != nil { + return &serviceconfig.ParseResult{Err: err} + } + return nil } var res string for _, s := range ss { @@ -315,40 +294,45 @@ func (d *dnsResolver) lookupTXT() string { // TXT record must have "grpc_config=" attribute in order to be used as service config. if !strings.HasPrefix(res, txtAttribute) { - grpclog.Warningf("grpc: TXT record %v missing %v attribute", res, txtAttribute) - return "" + grpclog.Warningf("dns: TXT record %v missing %v attribute", res, txtAttribute) + // This is not an error; it is the equivalent of not having a service config. + return nil } - return strings.TrimPrefix(res, txtAttribute) + sc := canaryingSC(strings.TrimPrefix(res, txtAttribute)) + return d.cc.ParseServiceConfig(sc) } -func (d *dnsResolver) lookupHost() []resolver.Address { +func (d *dnsResolver) lookupHost() ([]resolver.Address, error) { var newAddrs []resolver.Address addrs, err := d.resolver.LookupHost(d.ctx, d.host) if err != nil { - grpclog.Warningf("grpc: failed dns A record lookup due to %v.\n", err) - return nil + err = handleDNSError(err, "A") + return nil, err } for _, a := range addrs { - a, ok := formatIP(a) + ip, ok := formatIP(a) if !ok { - grpclog.Errorf("grpc: failed IP parsing due to %v.\n", err) - continue + return nil, fmt.Errorf("dns: error parsing A record IP address %v", a) } - addr := a + ":" + d.port + addr := ip + ":" + d.port newAddrs = append(newAddrs, resolver.Address{Addr: addr}) } - return newAddrs + return newAddrs, nil } -func (d *dnsResolver) lookup() ([]resolver.Address, string) { - newAddrs := d.lookupSRV() - // Support fallback to non-balancer address. - newAddrs = append(newAddrs, d.lookupHost()...) - if d.disableServiceConfig { - return newAddrs, "" +func (d *dnsResolver) lookup() (*resolver.State, error) { + srv, srvErr := d.lookupSRV() + addrs, hostErr := d.lookupHost() + if hostErr != nil && (srvErr != nil || len(srv) == 0) { + return nil, hostErr + } + state := &resolver.State{ + Addresses: append(addrs, srv...), + } + if !d.disableServiceConfig { + state.ServiceConfig = d.lookupTXT() } - sc := d.lookupTXT() - return newAddrs, canaryingSC(sc) + return state, nil } // formatIP returns ok = false if addr is not a valid textual representation of an IP address. @@ -434,12 +418,12 @@ func canaryingSC(js string) string { var rcs []rawChoice err := json.Unmarshal([]byte(js), &rcs) if err != nil { - grpclog.Warningf("grpc: failed to parse service config json string due to %v.\n", err) + grpclog.Warningf("dns: error parsing service config json: %v", err) return "" } cliHostname, err := os.Hostname() if err != nil { - grpclog.Warningf("grpc: failed to get client hostname due to %v.\n", err) + grpclog.Warningf("dns: error getting client hostname: %v", err) return "" } var sc string diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/go113.go b/vendor/google.golang.org/grpc/internal/resolver/dns/go113.go new file mode 100644 index 00000000000..8783a8cf821 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/go113.go @@ -0,0 +1,33 @@ +// +build go1.13 + +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package dns + +import "net" + +func init() { + filterError = func(err error) error { + if dnsErr, ok := err.(*net.DNSError); ok && dnsErr.IsNotFound { + // The name does not exist; not an error. + return nil + } + return err + } +} diff --git a/vendor/google.golang.org/grpc/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go similarity index 94% rename from vendor/google.golang.org/grpc/resolver/passthrough/passthrough.go rename to vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index 893d5d12cb0..520d9229e1e 100644 --- a/vendor/google.golang.org/grpc/resolver/passthrough/passthrough.go +++ b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -26,7 +26,7 @@ const scheme = "passthrough" type passthroughBuilder struct{} -func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error) { +func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { r := &passthroughResolver{ target: target, cc: cc, @@ -48,7 +48,7 @@ func (r *passthroughResolver) start() { r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint}}}) } -func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOption) {} +func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOptions) {} func (*passthroughResolver) Close() {} diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index b8e0aa4db27..ddee20b6bef 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -107,8 +107,8 @@ func (*registerStream) isTransportResponseFrame() bool { return false } type headerFrame struct { streamID uint32 hf []hpack.HeaderField - endStream bool // Valid on server side. - initStream func(uint32) (bool, error) // Used only on the client side. + endStream bool // Valid on server side. + initStream func(uint32) error // Used only on the client side. onWrite func() wq *writeQuota // write quota for the stream created. cleanup *cleanupStream // Valid on the server side. @@ -637,21 +637,17 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error { func (l *loopyWriter) originateStream(str *outStream) error { hdr := str.itl.dequeue().(*headerFrame) - sendPing, err := hdr.initStream(str.id) - if err != nil { + if err := hdr.initStream(str.id); err != nil { if err == ErrConnClosing { return err } // Other errors(errStreamDrain) need not close transport. return nil } - if err = l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { + if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { return err } l.estdStreams[str.id] = str - if sendPing { - return l.pingHandler(&ping{data: [8]byte{}}) - } return nil } diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index 78f9ddc3d3a..c3c32dafe9e 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -227,7 +227,9 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro if err == nil { // transport has not been closed if ht.stats != nil { - ht.stats.HandleRPC(s.Context(), &stats.OutTrailer{}) + ht.stats.HandleRPC(s.Context(), &stats.OutTrailer{ + Trailer: s.trailer.Copy(), + }) } } ht.Close() @@ -289,7 +291,9 @@ func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error { if err == nil { if ht.stats != nil { - ht.stats.HandleRPC(s.Context(), &stats.OutHeader{}) + ht.stats.HandleRPC(s.Context(), &stats.OutHeader{ + Header: md.Copy(), + }) } } return err @@ -334,7 +338,7 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), trace Addr: ht.RemoteAddr(), } if req.TLS != nil { - pr.AuthInfo = credentials.TLSInfo{State: *req.TLS} + pr.AuthInfo = credentials.TLSInfo{State: *req.TLS, CommonAuthInfo: credentials.CommonAuthInfo{credentials.PrivacyAndIntegrity}} } ctx = metadata.NewIncomingContext(ctx, ht.headerMD) s.ctx = peer.NewContext(ctx, pr) diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 41a79c56702..2d6feeb1be9 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -35,6 +35,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/keepalive" @@ -44,8 +45,14 @@ import ( "google.golang.org/grpc/status" ) +// clientConnectionCounter counts the number of connections a client has +// initiated (equal to the number of http2Clients created). Must be accessed +// atomically. +var clientConnectionCounter uint64 + // http2Client implements the ClientTransport interface with HTTP2. type http2Client struct { + lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. ctx context.Context cancel context.CancelFunc ctxDone <-chan struct{} // Cache the ctx.Done() chan. @@ -62,8 +69,6 @@ type http2Client struct { // goAway is closed to notify the upper layer (i.e., addrConn.transportMonitor) // that the server sent GoAway on this transport. goAway chan struct{} - // awakenKeepalive is used to wake up keepalive when after it has gone dormant. - awakenKeepalive chan struct{} framer *framer // controlBuf delivers all the control related tasks (e.g., window @@ -77,9 +82,6 @@ type http2Client struct { perRPCCreds []credentials.PerRPCCredentials - // Boolean to keep track of reading activity on transport. - // 1 is true and 0 is false. - activity uint32 // Accessed atomically. kp keepalive.ClientParameters keepaliveEnabled bool @@ -110,6 +112,16 @@ type http2Client struct { // goAwayReason records the http2.ErrCode and debug data received with the // GoAway frame. goAwayReason GoAwayReason + // A condition variable used to signal when the keepalive goroutine should + // go dormant. The condition for dormancy is based on the number of active + // streams and the `PermitWithoutStream` keepalive client parameter. And + // since the number of active streams is guarded by the above mutex, we use + // the same for this condition variable as well. + kpDormancyCond *sync.Cond + // A boolean to track whether the keepalive goroutine is dormant or not. + // This is checked before attempting to signal the above condition + // variable. + kpDormant bool // Fields below are for channelz metric collection. channelzID int64 // channelz unique identification number @@ -119,6 +131,8 @@ type http2Client struct { onClose func() bufferPool *bufferPool + + connectionID uint64 } func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr string) (net.Conn, error) { @@ -232,7 +246,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne readerDone: make(chan struct{}), writerDone: make(chan struct{}), goAway: make(chan struct{}), - awakenKeepalive: make(chan struct{}, 1), framer: newFramer(conn, writeBufSize, readBufSize, maxHeaderListSize), fc: &trInFlow{limit: uint32(icwz)}, scheme: scheme, @@ -264,9 +277,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne updateFlowControl: t.updateFlowControl, } } - // Make sure awakenKeepalive can't be written upon. - // keepalive routine will make it writable, if need be. - t.awakenKeepalive <- struct{}{} if t.statsHandler != nil { t.ctx = t.statsHandler.TagConn(t.ctx, &stats.ConnTagInfo{ RemoteAddr: t.remoteAddr, @@ -281,6 +291,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne t.channelzID = channelz.RegisterNormalSocket(t, opts.ChannelzParentID, fmt.Sprintf("%s -> %s", t.localAddr, t.remoteAddr)) } if t.keepaliveEnabled { + t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() } // Start the reader goroutine for incoming message. Each transport has @@ -325,6 +336,8 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne } } + t.connectionID = atomic.AddUint64(&clientConnectionCounter, 1) + if err := t.framer.writer.Flush(); err != nil { return nil, err } @@ -347,6 +360,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr TargetInfo, opts Conne func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { // TODO(zhaoq): Handle uint32 overflow of Stream.id. s := &Stream{ + ct: t, done: make(chan struct{}), method: callHdr.Method, sendCompress: callHdr.SendCompress, @@ -380,23 +394,24 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { } func (t *http2Client) getPeer() *peer.Peer { - pr := &peer.Peer{ - Addr: t.remoteAddr, + return &peer.Peer{ + Addr: t.remoteAddr, + AuthInfo: t.authInfo, } - // Attach Auth info if there is any. - if t.authInfo != nil { - pr.AuthInfo = t.authInfo - } - return pr } func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) ([]hpack.HeaderField, error) { aud := t.createAudience(callHdr) - authData, err := t.getTrAuthData(ctx, aud) + ri := credentials.RequestInfo{ + Method: callHdr.Method, + AuthInfo: t.authInfo, + } + ctxWithRequestInfo := internal.NewRequestInfoContext.(func(context.Context, credentials.RequestInfo) context.Context)(ctx, ri) + authData, err := t.getTrAuthData(ctxWithRequestInfo, aud) if err != nil { return nil, err } - callAuthData, err := t.getCallAuthData(ctx, aud, callHdr) + callAuthData, err := t.getCallAuthData(ctxWithRequestInfo, aud, callHdr) if err != nil { return nil, err } @@ -419,6 +434,7 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) if callHdr.SendCompress != "" { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress}) + headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress}) } if dl, ok := ctx.Deadline(); ok { // Send out timeout regardless its value. The server can detect timeout context by itself. @@ -564,7 +580,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea hdr := &headerFrame{ hf: headerFields, endStream: false, - initStream: func(id uint32) (bool, error) { + initStream: func(id uint32) error { t.mu.Lock() if state := t.state; state != reachable { t.mu.Unlock() @@ -574,29 +590,19 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea err = ErrConnClosing } cleanup(err) - return false, err + return err } t.activeStreams[id] = s if channelz.IsOn() { atomic.AddInt64(&t.czData.streamsStarted, 1) atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano()) } - var sendPing bool - // If the number of active streams change from 0 to 1, then check if keepalive - // has gone dormant. If so, wake it up. - if len(t.activeStreams) == 1 && t.keepaliveEnabled { - select { - case t.awakenKeepalive <- struct{}{}: - sendPing = true - // Fill the awakenKeepalive channel again as this channel must be - // kept non-writable except at the point that the keepalive() - // goroutine is waiting either to be awaken or shutdown. - t.awakenKeepalive <- struct{}{} - default: - } + // If the keepalive goroutine has gone dormant, wake it up. + if t.kpDormant { + t.kpDormancyCond.Signal() } t.mu.Unlock() - return sendPing, nil + return nil }, onOrphaned: cleanup, wq: s.wq, @@ -674,12 +680,14 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea } } if t.statsHandler != nil { + header, _, _ := metadata.FromOutgoingContextRaw(ctx) outHeader := &stats.OutHeader{ Client: true, FullMethod: callHdr.Method, RemoteAddr: t.remoteAddr, LocalAddr: t.localAddr, Compression: callHdr.SendCompress, + Header: header.Copy(), } t.statsHandler.HandleRPC(s.ctx, outHeader) } @@ -778,6 +786,11 @@ func (t *http2Client) Close() error { t.state = closing streams := t.activeStreams t.activeStreams = nil + if t.kpDormant { + // If the keepalive goroutine is blocked on this condition variable, we + // should unblock it so that the goroutine eventually exits. + t.kpDormancyCond.Signal() + } t.mu.Unlock() t.controlBuf.finish() t.cancel() @@ -853,11 +866,11 @@ func (t *http2Client) Write(s *Stream, hdr []byte, data []byte, opts *Options) e return t.controlBuf.put(df) } -func (t *http2Client) getStream(f http2.Frame) (*Stream, bool) { +func (t *http2Client) getStream(f http2.Frame) *Stream { t.mu.Lock() - defer t.mu.Unlock() - s, ok := t.activeStreams[f.Header().StreamID] - return s, ok + s := t.activeStreams[f.Header().StreamID] + t.mu.Unlock() + return s } // adjustWindow sends out extra window update over the initial window size @@ -937,8 +950,8 @@ func (t *http2Client) handleData(f *http2.DataFrame) { t.controlBuf.put(bdpPing) } // Select the right stream to dispatch. - s, ok := t.getStream(f) - if !ok { + s := t.getStream(f) + if s == nil { return } if size > 0 { @@ -969,8 +982,8 @@ func (t *http2Client) handleData(f *http2.DataFrame) { } func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { - s, ok := t.getStream(f) - if !ok { + s := t.getStream(f) + if s == nil { return } if f.ErrCode == http2.ErrCodeRefusedStream { @@ -1147,8 +1160,8 @@ func (t *http2Client) handleWindowUpdate(f *http2.WindowUpdateFrame) { // operateHeaders takes action on the decoded headers. func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { - s, ok := t.getStream(frame) - if !ok { + s := t.getStream(frame) + if s == nil { return } endStream := frame.StreamEnded() @@ -1177,12 +1190,14 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { inHeader := &stats.InHeader{ Client: true, WireLength: int(frame.Header().Length), + Header: s.header.Copy(), } t.statsHandler.HandleRPC(s.ctx, inHeader) } else { inTrailer := &stats.InTrailer{ Client: true, WireLength: int(frame.Header().Length), + Trailer: s.trailer.Copy(), } t.statsHandler.HandleRPC(s.ctx, inTrailer) } @@ -1191,6 +1206,7 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { // If headerChan hasn't been closed yet if atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) { + s.headerValid = true if !endStream { // HEADERS frame block carries a Response-Headers. isHeader = true @@ -1233,7 +1249,7 @@ func (t *http2Client) reader() { } t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!) if t.keepaliveEnabled { - atomic.CompareAndSwapUint32(&t.activity, 0, 1) + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) } sf, ok := frame.(*http2.SettingsFrame) if !ok { @@ -1248,7 +1264,7 @@ func (t *http2Client) reader() { t.controlBuf.throttle() frame, err := t.framer.fr.ReadFrame() if t.keepaliveEnabled { - atomic.CompareAndSwapUint32(&t.activity, 0, 1) + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) } if err != nil { // Abort an active stream if the http2.Framer returns a @@ -1292,56 +1308,83 @@ func (t *http2Client) reader() { } } +func minTime(a, b time.Duration) time.Duration { + if a < b { + return a + } + return b +} + // keepalive running in a separate goroutune makes sure the connection is alive by sending pings. func (t *http2Client) keepalive() { p := &ping{data: [8]byte{}} + // True iff a ping has been sent, and no data has been received since then. + outstandingPing := false + // Amount of time remaining before which we should receive an ACK for the + // last sent ping. + timeoutLeft := time.Duration(0) + // Records the last value of t.lastRead before we go block on the timer. + // This is required to check for read activity since then. + prevNano := time.Now().UnixNano() timer := time.NewTimer(t.kp.Time) for { select { case <-timer.C: - if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { - timer.Reset(t.kp.Time) + lastRead := atomic.LoadInt64(&t.lastRead) + if lastRead > prevNano { + // There has been read activity since the last time we were here. + outstandingPing = false + // Next timer should fire at kp.Time seconds from lastRead time. + timer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano())) + prevNano = lastRead continue } - // Check if keepalive should go dormant. + if outstandingPing && timeoutLeft <= 0 { + t.Close() + return + } t.mu.Lock() - if len(t.activeStreams) < 1 && !t.kp.PermitWithoutStream { - // Make awakenKeepalive writable. - <-t.awakenKeepalive - t.mu.Unlock() - select { - case <-t.awakenKeepalive: - // If the control gets here a ping has been sent - // need to reset the timer with keepalive.Timeout. - case <-t.ctx.Done(): - return - } - } else { + if t.state == closing { + // If the transport is closing, we should exit from the + // keepalive goroutine here. If not, we could have a race + // between the call to Signal() from Close() and the call to + // Wait() here, whereby the keepalive goroutine ends up + // blocking on the condition variable which will never be + // signalled again. t.mu.Unlock() + return + } + if len(t.activeStreams) < 1 && !t.kp.PermitWithoutStream { + // If a ping was sent out previously (because there were active + // streams at that point) which wasn't acked and its timeout + // hadn't fired, but we got here and are about to go dormant, + // we should make sure that we unconditionally send a ping once + // we awaken. + outstandingPing = false + t.kpDormant = true + t.kpDormancyCond.Wait() + } + t.kpDormant = false + t.mu.Unlock() + + // We get here either because we were dormant and a new stream was + // created which unblocked the Wait() call, or because the + // keepalive timer expired. In both cases, we need to send a ping. + if !outstandingPing { if channelz.IsOn() { atomic.AddInt64(&t.czData.kpCount, 1) } - // Send ping. t.controlBuf.put(p) + timeoutLeft = t.kp.Timeout + outstandingPing = true } - - // By the time control gets here a ping has been sent one way or the other. - timer.Reset(t.kp.Timeout) - select { - case <-timer.C: - if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { - timer.Reset(t.kp.Time) - continue - } - infof("transport: closing client transport due to idleness.") - t.Close() - return - case <-t.ctx.Done(): - if !timer.Stop() { - <-timer.C - } - return - } + // The amount of time to sleep here is the minimum of kp.Time and + // timeoutLeft. This will ensure that we wait only for kp.Time + // before sending out the next ping (for cases where the ping is + // acked). + sleepDuration := minTime(t.kp.Time, timeoutLeft) + timeoutLeft -= sleepDuration + timer.Reset(sleepDuration) case <-t.ctx.Done(): if !timer.Stop() { <-timer.C diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 83439b5627d..8b04b0392a0 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -62,11 +62,15 @@ var ( statusRawProto = internal.StatusRawProto.(func(*status.Status) *spb.Status) ) +// serverConnectionCounter counts the number of connections a server has seen +// (equal to the number of http2Servers created). Must be accessed atomically. +var serverConnectionCounter uint64 + // http2Server implements the ServerTransport interface with HTTP2. type http2Server struct { + lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. ctx context.Context - ctxDone <-chan struct{} // Cache the context.Done() chan - cancel context.CancelFunc + done chan struct{} conn net.Conn loopy *loopyWriter readerDone chan struct{} // sync point to enable testing. @@ -84,12 +88,8 @@ type http2Server struct { controlBuf *controlBuffer fc *trInFlow stats stats.Handler - // Flag to keep track of reading activity on transport. - // 1 is true and 0 is false. - activity uint32 // Accessed atomically. // Keepalive and max-age parameters for the server. kp keepalive.ServerParameters - // Keepalive enforcement policy. kep keepalive.EnforcementPolicy // The time instance last ping was received. @@ -125,6 +125,8 @@ type http2Server struct { channelzID int64 // channelz unique identification number czData *channelzData bufferPool *bufferPool + + connectionID uint64 } // newHTTP2Server constructs a ServerTransport based on HTTP2. ConnectionError is @@ -138,7 +140,10 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err } framer := newFramer(conn, writeBufSize, readBufSize, maxHeaderListSize) // Send initial settings as connection preface to client. - var isettings []http2.Setting + isettings := []http2.Setting{{ + ID: http2.SettingMaxFrameSize, + Val: http2MaxFrameLen, + }} // TODO(zhaoq): Have a better way to signal "no limit" because 0 is // permitted in the HTTP2 spec. maxStreams := config.MaxStreams @@ -172,6 +177,12 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err Val: *config.MaxHeaderListSize, }) } + if config.HeaderTableSize != nil { + isettings = append(isettings, http2.Setting{ + ID: http2.SettingHeaderTableSize, + Val: *config.HeaderTableSize, + }) + } if err := framer.fr.WriteSettings(isettings...); err != nil { return nil, connectionErrorf(false, err, "transport: %v", err) } @@ -203,11 +214,10 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err if kep.MinTime == 0 { kep.MinTime = defaultKeepalivePolicyMinTime } - ctx, cancel := context.WithCancel(context.Background()) + done := make(chan struct{}) t := &http2Server{ - ctx: ctx, - cancel: cancel, - ctxDone: ctx.Done(), + ctx: context.Background(), + done: done, conn: conn, remoteAddr: conn.RemoteAddr(), localAddr: conn.LocalAddr(), @@ -228,7 +238,7 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err czData: new(channelzData), bufferPool: newBufferPool(), } - t.controlBuf = newControlBuffer(t.ctxDone) + t.controlBuf = newControlBuffer(t.done) if dynamicWindow { t.bdpEst = &bdpEstimator{ bdp: initialWindowSize, @@ -246,6 +256,9 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err if channelz.IsOn() { t.channelzID = channelz.RegisterNormalSocket(t, config.ChannelzParentID, fmt.Sprintf("%s -> %s", t.remoteAddr, t.localAddr)) } + + t.connectionID = atomic.AddUint64(&serverConnectionCounter, 1) + t.framer.writer.Flush() defer func() { @@ -270,7 +283,7 @@ func newHTTP2Server(conn net.Conn, config *ServerConfig) (_ ServerTransport, err if err != nil { return nil, connectionErrorf(false, err, "transport: http2Server.HandleStreams failed to read initial settings frame: %v", err) } - atomic.StoreUint32(&t.activity, 1) + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) sf, ok := frame.(*http2.SettingsFrame) if !ok { return nil, connectionErrorf(false, nil, "transport: http2Server.HandleStreams saw invalid preface type %T from client", frame) @@ -359,12 +372,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeRefusedStream, onWrite: func() {}, }) + s.cancel() return false } } t.mu.Lock() if t.state != reachable { t.mu.Unlock() + s.cancel() return false } if uint32(len(t.activeStreams)) >= t.maxStreams { @@ -375,12 +390,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeRefusedStream, onWrite: func() {}, }) + s.cancel() return false } if streamID%2 != 1 || streamID <= t.maxStreamID { t.mu.Unlock() // illegal gRPC stream id. errorf("transport: http2Server.HandleStreams received an illegal stream id: %v", streamID) + s.cancel() return true } t.maxStreamID = streamID @@ -405,6 +422,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( LocalAddr: t.localAddr, Compression: s.recvCompress, WireLength: int(frame.Header().Length), + Header: metadata.MD(state.data.mdata).Copy(), } t.stats.HandleRPC(s.ctx, inHeader) } @@ -438,7 +456,7 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context. for { t.controlBuf.throttle() frame, err := t.framer.fr.ReadFrame() - atomic.StoreUint32(&t.activity, 1) + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) if err != nil { if se, ok := err.(http2.StreamError); ok { warningf("transport: http2Server.HandleStreams encountered http2.StreamError: %v", se) @@ -746,7 +764,7 @@ func (t *http2Server) checkForHeaderListSize(it interface{}) bool { return true } -// WriteHeader sends the header metedata md back to the client. +// WriteHeader sends the header metadata md back to the client. func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error { if s.updateHeaderSent() || s.getState() == streamDone { return ErrIllegalHeaderWrite @@ -797,7 +815,9 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error { if t.stats != nil { // Note: WireLength is not set in outHeader. // TODO(mmukhi): Revisit this later, if needed. - outHeader := &stats.OutHeader{} + outHeader := &stats.OutHeader{ + Header: s.header.Copy(), + } t.stats.HandleRPC(s.Context(), outHeader) } return nil @@ -860,7 +880,9 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { rst := s.getState() == streamActive t.finishStream(s, rst, http2.ErrCodeNo, trailingHeader, true) if t.stats != nil { - t.stats.HandleRPC(s.Context(), &stats.OutTrailer{}) + t.stats.HandleRPC(s.Context(), &stats.OutTrailer{ + Trailer: s.trailer.Copy(), + }) } return nil } @@ -882,7 +904,7 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) e // TODO(mmukhi, dfawley): Should the server write also return io.EOF? s.cancel() select { - case <-t.ctx.Done(): + case <-t.done: return ErrConnClosing default: } @@ -904,7 +926,7 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) e } if err := s.wq.get(int32(len(hdr) + len(data))); err != nil { select { - case <-t.ctx.Done(): + case <-t.done: return ErrConnClosing default: } @@ -921,32 +943,35 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) e // after an additional duration of keepalive.Timeout. func (t *http2Server) keepalive() { p := &ping{} - var pingSent bool - maxIdle := time.NewTimer(t.kp.MaxConnectionIdle) - maxAge := time.NewTimer(t.kp.MaxConnectionAge) - keepalive := time.NewTimer(t.kp.Time) - // NOTE: All exit paths of this function should reset their - // respective timers. A failure to do so will cause the - // following clean-up to deadlock and eventually leak. + // True iff a ping has been sent, and no data has been received since then. + outstandingPing := false + // Amount of time remaining before which we should receive an ACK for the + // last sent ping. + kpTimeoutLeft := time.Duration(0) + // Records the last value of t.lastRead before we go block on the timer. + // This is required to check for read activity since then. + prevNano := time.Now().UnixNano() + // Initialize the different timers to their default values. + idleTimer := time.NewTimer(t.kp.MaxConnectionIdle) + ageTimer := time.NewTimer(t.kp.MaxConnectionAge) + kpTimer := time.NewTimer(t.kp.Time) defer func() { - if !maxIdle.Stop() { - <-maxIdle.C - } - if !maxAge.Stop() { - <-maxAge.C - } - if !keepalive.Stop() { - <-keepalive.C - } + // We need to drain the underlying channel in these timers after a call + // to Stop(), only if we are interested in resetting them. Clearly we + // are not interested in resetting them here. + idleTimer.Stop() + ageTimer.Stop() + kpTimer.Stop() }() + for { select { - case <-maxIdle.C: + case <-idleTimer.C: t.mu.Lock() idle := t.idle if idle.IsZero() { // The connection is non-idle. t.mu.Unlock() - maxIdle.Reset(t.kp.MaxConnectionIdle) + idleTimer.Reset(t.kp.MaxConnectionIdle) continue } val := t.kp.MaxConnectionIdle - time.Since(idle) @@ -955,44 +980,52 @@ func (t *http2Server) keepalive() { // The connection has been idle for a duration of keepalive.MaxConnectionIdle or more. // Gracefully close the connection. t.drain(http2.ErrCodeNo, []byte{}) - // Resetting the timer so that the clean-up doesn't deadlock. - maxIdle.Reset(infinity) return } - maxIdle.Reset(val) - case <-maxAge.C: + idleTimer.Reset(val) + case <-ageTimer.C: t.drain(http2.ErrCodeNo, []byte{}) - maxAge.Reset(t.kp.MaxConnectionAgeGrace) + ageTimer.Reset(t.kp.MaxConnectionAgeGrace) select { - case <-maxAge.C: + case <-ageTimer.C: // Close the connection after grace period. infof("transport: closing server transport due to maximum connection age.") t.Close() - // Resetting the timer so that the clean-up doesn't deadlock. - maxAge.Reset(infinity) - case <-t.ctx.Done(): + case <-t.done: } return - case <-keepalive.C: - if atomic.CompareAndSwapUint32(&t.activity, 1, 0) { - pingSent = false - keepalive.Reset(t.kp.Time) + case <-kpTimer.C: + lastRead := atomic.LoadInt64(&t.lastRead) + if lastRead > prevNano { + // There has been read activity since the last time we were + // here. Setup the timer to fire at kp.Time seconds from + // lastRead time and continue. + outstandingPing = false + kpTimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano())) + prevNano = lastRead continue } - if pingSent { + if outstandingPing && kpTimeoutLeft <= 0 { infof("transport: closing server transport due to idleness.") t.Close() - // Resetting the timer so that the clean-up doesn't deadlock. - keepalive.Reset(infinity) return } - pingSent = true - if channelz.IsOn() { - atomic.AddInt64(&t.czData.kpCount, 1) + if !outstandingPing { + if channelz.IsOn() { + atomic.AddInt64(&t.czData.kpCount, 1) + } + t.controlBuf.put(p) + kpTimeoutLeft = t.kp.Timeout + outstandingPing = true } - t.controlBuf.put(p) - keepalive.Reset(t.kp.Timeout) - case <-t.ctx.Done(): + // The amount of time to sleep here is the minimum of kp.Time and + // timeoutLeft. This will ensure that we wait only for kp.Time + // before sending out the next ping (for cases where the ping is + // acked). + sleepDuration := minTime(t.kp.Time, kpTimeoutLeft) + kpTimeoutLeft -= sleepDuration + kpTimer.Reset(sleepDuration) + case <-t.done: return } } @@ -1012,7 +1045,7 @@ func (t *http2Server) Close() error { t.activeStreams = nil t.mu.Unlock() t.controlBuf.finish() - t.cancel() + close(t.done) err := t.conn.Close() if channelz.IsOn() { channelz.RemoveEntry(t.channelzID) @@ -1152,7 +1185,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { select { case <-t.drainChan: case <-timer.C: - case <-t.ctx.Done(): + case <-t.done: return } t.controlBuf.put(&goAway{code: g.code, debugData: g.debugData}) @@ -1202,7 +1235,7 @@ func (t *http2Server) getOutFlowWindow() int64 { select { case sz := <-resp: return int64(sz) - case <-t.ctxDone: + case <-t.done: return -1 case <-timer.C: return -2 diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go index 9d212867ce2..8f5f3349d90 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http_util.go +++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go @@ -667,6 +667,7 @@ func newFramer(conn net.Conn, writeBufferSize, readBufferSize int, maxHeaderList writer: w, fr: http2.NewFramer(w, r), } + f.fr.SetMaxReadFrameSize(http2MaxFrameLen) // Opt-in to Frame reuse API on framer to reduce garbage. // Frames aren't safe to read from after a subsequent call to ReadFrame. f.fr.SetReuseFrames() diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 1c1d106709a..a30da9eb324 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -73,10 +73,11 @@ type recvMsg struct { } // recvBuffer is an unbounded channel of recvMsg structs. -// Note recvBuffer differs from controlBuffer only in that recvBuffer -// holds a channel of only recvMsg structs instead of objects implementing "item" interface. -// recvBuffer is written to much more often than -// controlBuffer and using strict recvMsg structs helps avoid allocation in "recvBuffer.put" +// +// Note: recvBuffer differs from buffer.Unbounded only in the fact that it +// holds a channel of recvMsg structs instead of objects implementing "item" +// interface. recvBuffer is written to much more often and using strict recvMsg +// structs helps avoid allocation in "recvBuffer.put" type recvBuffer struct { c chan recvMsg mu sync.Mutex @@ -233,6 +234,7 @@ const ( type Stream struct { id uint32 st ServerTransport // nil for client side Stream + ct *http2Client // nil for server side Stream ctx context.Context // the associated context of the stream cancel context.CancelFunc // always nil for client side Stream done chan struct{} // closed at the end of stream to unblock writers. On the client side. @@ -251,6 +253,10 @@ type Stream struct { headerChan chan struct{} // closed to indicate the end of header metadata. headerChanClosed uint32 // set when headerChan is closed. Used to avoid closing headerChan multiple times. + // headerValid indicates whether a valid header was received. Only + // meaningful after headerChan is closed (always call waitOnHeader() before + // reading its value). Not valid on server side. + headerValid bool // hdrMu protects header and trailer metadata on the server-side. hdrMu sync.Mutex @@ -303,34 +309,28 @@ func (s *Stream) getState() streamState { return streamState(atomic.LoadUint32((*uint32)(&s.state))) } -func (s *Stream) waitOnHeader() error { +func (s *Stream) waitOnHeader() { if s.headerChan == nil { // On the server headerChan is always nil since a stream originates // only after having received headers. - return nil + return } select { case <-s.ctx.Done(): - // We prefer success over failure when reading messages because we delay - // context error in stream.Read(). To keep behavior consistent, we also - // prefer success here. - select { - case <-s.headerChan: - return nil - default: - } - return ContextErr(s.ctx.Err()) + // Close the stream to prevent headers/trailers from changing after + // this function returns. + s.ct.CloseStream(s, ContextErr(s.ctx.Err())) + // headerChan could possibly not be closed yet if closeStream raced + // with operateHeaders; wait until it is closed explicitly here. + <-s.headerChan case <-s.headerChan: - return nil } } // RecvCompress returns the compression algorithm applied to the inbound // message. It is empty string if there is no compression applied. func (s *Stream) RecvCompress() string { - if err := s.waitOnHeader(); err != nil { - return "" - } + s.waitOnHeader() return s.recvCompress } @@ -351,36 +351,27 @@ func (s *Stream) Done() <-chan struct{} { // available. It blocks until i) the metadata is ready or ii) there is no header // metadata or iii) the stream is canceled/expired. // -// On server side, it returns the out header after t.WriteHeader is called. +// On server side, it returns the out header after t.WriteHeader is called. It +// does not block and must not be called until after WriteHeader. func (s *Stream) Header() (metadata.MD, error) { - if s.headerChan == nil && s.header != nil { + if s.headerChan == nil { // On server side, return the header in stream. It will be the out // header after t.WriteHeader is called. return s.header.Copy(), nil } - err := s.waitOnHeader() - // Even if the stream is closed, header is returned if available. - select { - case <-s.headerChan: - if s.header == nil { - return nil, nil - } - return s.header.Copy(), nil - default: + s.waitOnHeader() + if !s.headerValid { + return nil, s.status.Err() } - return nil, err + return s.header.Copy(), nil } // TrailersOnly blocks until a header or trailers-only frame is received and // then returns true if the stream was trailers-only. If the stream ends -// before headers are received, returns true, nil. If a context error happens -// first, returns it as a status error. Client-side only. -func (s *Stream) TrailersOnly() (bool, error) { - err := s.waitOnHeader() - if err != nil { - return false, err - } - return s.noHeaders, nil +// before headers are received, returns true, nil. Client-side only. +func (s *Stream) TrailersOnly() bool { + s.waitOnHeader() + return s.noHeaders } // Trailer returns the cached trailer metedata. Note that if it is not called @@ -534,6 +525,7 @@ type ServerConfig struct { ReadBufferSize int ChannelzParentID int64 MaxHeaderListSize *uint32 + HeaderTableSize *uint32 } // NewServerTransport creates a ServerTransport with conn or non-nil error diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 45baa2ae13d..00447894f07 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -20,6 +20,7 @@ package grpc import ( "context" + "fmt" "io" "sync" @@ -31,49 +32,78 @@ import ( "google.golang.org/grpc/status" ) +// v2PickerWrapper wraps a balancer.Picker while providing the +// balancer.V2Picker API. It requires a pickerWrapper to generate errors +// including the latest connectionError. To be deleted when balancer.Picker is +// updated to the balancer.V2Picker API. +type v2PickerWrapper struct { + picker balancer.Picker + connErr *connErr +} + +func (v *v2PickerWrapper) Pick(info balancer.PickInfo) (balancer.PickResult, error) { + sc, done, err := v.picker.Pick(info.Ctx, info) + if err != nil { + if err == balancer.ErrTransientFailure { + return balancer.PickResult{}, balancer.TransientFailureError(fmt.Errorf("%v, latest connection error: %v", err, v.connErr.connectionError())) + } + return balancer.PickResult{}, err + } + return balancer.PickResult{SubConn: sc, Done: done}, nil +} + // pickerWrapper is a wrapper of balancer.Picker. It blocks on certain pick // actions and unblock when there's a picker update. type pickerWrapper struct { mu sync.Mutex done bool blockingCh chan struct{} - picker balancer.Picker + picker balancer.V2Picker - // The latest connection happened. - connErrMu sync.Mutex - connErr error + // The latest connection error. TODO: remove when V1 picker is deprecated; + // balancer should be responsible for providing the error. + *connErr } -func newPickerWrapper() *pickerWrapper { - bp := &pickerWrapper{blockingCh: make(chan struct{})} - return bp +type connErr struct { + mu sync.Mutex + err error } -func (bp *pickerWrapper) updateConnectionError(err error) { - bp.connErrMu.Lock() - bp.connErr = err - bp.connErrMu.Unlock() +func (c *connErr) updateConnectionError(err error) { + c.mu.Lock() + c.err = err + c.mu.Unlock() } -func (bp *pickerWrapper) connectionError() error { - bp.connErrMu.Lock() - err := bp.connErr - bp.connErrMu.Unlock() +func (c *connErr) connectionError() error { + c.mu.Lock() + err := c.err + c.mu.Unlock() return err } +func newPickerWrapper() *pickerWrapper { + return &pickerWrapper{blockingCh: make(chan struct{}), connErr: &connErr{}} +} + // updatePicker is called by UpdateBalancerState. It unblocks all blocked pick. -func (bp *pickerWrapper) updatePicker(p balancer.Picker) { - bp.mu.Lock() - if bp.done { - bp.mu.Unlock() +func (pw *pickerWrapper) updatePicker(p balancer.Picker) { + pw.updatePickerV2(&v2PickerWrapper{picker: p, connErr: pw.connErr}) +} + +// updatePicker is called by UpdateBalancerState. It unblocks all blocked pick. +func (pw *pickerWrapper) updatePickerV2(p balancer.V2Picker) { + pw.mu.Lock() + if pw.done { + pw.mu.Unlock() return } - bp.picker = p - // bp.blockingCh should never be nil. - close(bp.blockingCh) - bp.blockingCh = make(chan struct{}) - bp.mu.Unlock() + pw.picker = p + // pw.blockingCh should never be nil. + close(pw.blockingCh) + pw.blockingCh = make(chan struct{}) + pw.mu.Unlock() } func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) func(balancer.DoneInfo) { @@ -100,83 +130,85 @@ func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) f // - the current picker returns other errors and failfast is false. // - the subConn returned by the current picker is not READY // When one of these situations happens, pick blocks until the picker gets updated. -func (bp *pickerWrapper) pick(ctx context.Context, failfast bool, opts balancer.PickOptions) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, func(balancer.DoneInfo), error) { var ch chan struct{} + var lastPickErr error for { - bp.mu.Lock() - if bp.done { - bp.mu.Unlock() + pw.mu.Lock() + if pw.done { + pw.mu.Unlock() return nil, nil, ErrClientConnClosing } - if bp.picker == nil { - ch = bp.blockingCh + if pw.picker == nil { + ch = pw.blockingCh } - if ch == bp.blockingCh { + if ch == pw.blockingCh { // This could happen when either: - // - bp.picker is nil (the previous if condition), or + // - pw.picker is nil (the previous if condition), or // - has called pick on the current picker. - bp.mu.Unlock() + pw.mu.Unlock() select { case <-ctx.Done(): - if connectionErr := bp.connectionError(); connectionErr != nil { - switch ctx.Err() { - case context.DeadlineExceeded: - return nil, nil, status.Errorf(codes.DeadlineExceeded, "latest connection error: %v", connectionErr) - case context.Canceled: - return nil, nil, status.Errorf(codes.Canceled, "latest connection error: %v", connectionErr) - } + var errStr string + if lastPickErr != nil { + errStr = "latest balancer error: " + lastPickErr.Error() + } else if connectionErr := pw.connectionError(); connectionErr != nil { + errStr = "latest connection error: " + connectionErr.Error() + } else { + errStr = ctx.Err().Error() + } + switch ctx.Err() { + case context.DeadlineExceeded: + return nil, nil, status.Error(codes.DeadlineExceeded, errStr) + case context.Canceled: + return nil, nil, status.Error(codes.Canceled, errStr) } - return nil, nil, ctx.Err() case <-ch: } continue } - ch = bp.blockingCh - p := bp.picker - bp.mu.Unlock() + ch = pw.blockingCh + p := pw.picker + pw.mu.Unlock() - subConn, done, err := p.Pick(ctx, opts) + pickResult, err := p.Pick(info) if err != nil { - switch err { - case balancer.ErrNoSubConnAvailable: + if err == balancer.ErrNoSubConnAvailable { continue - case balancer.ErrTransientFailure: + } + if tfe, ok := err.(interface{ IsTransientFailure() bool }); ok && tfe.IsTransientFailure() { if !failfast { + lastPickErr = err continue } - return nil, nil, status.Errorf(codes.Unavailable, "%v, latest connection error: %v", err, bp.connectionError()) - case context.DeadlineExceeded: - return nil, nil, status.Error(codes.DeadlineExceeded, err.Error()) - case context.Canceled: - return nil, nil, status.Error(codes.Canceled, err.Error()) - default: - if _, ok := status.FromError(err); ok { - return nil, nil, err - } - // err is some other error. - return nil, nil, status.Error(codes.Unknown, err.Error()) + return nil, nil, status.Error(codes.Unavailable, err.Error()) } + if _, ok := status.FromError(err); ok { + return nil, nil, err + } + // err is some other error. + return nil, nil, status.Error(codes.Unknown, err.Error()) } - acw, ok := subConn.(*acBalancerWrapper) + acw, ok := pickResult.SubConn.(*acBalancerWrapper) if !ok { grpclog.Error("subconn returned from pick is not *acBalancerWrapper") continue } if t, ok := acw.getAddrConn().getReadyTransport(); ok { if channelz.IsOn() { - return t, doneChannelzWrapper(acw, done), nil + return t, doneChannelzWrapper(acw, pickResult.Done), nil } - return t, done, nil + return t, pickResult.Done, nil } - if done != nil { + if pickResult.Done != nil { // Calling done with nil error, no bytes sent and no bytes received. // DoneInfo with default value works. - done(balancer.DoneInfo{}) + pickResult.Done(balancer.DoneInfo{}) } grpclog.Infof("blockingPicker: the picked transport is not ready, loop back to repick") // If ok == false, ac.state is not READY. @@ -186,12 +218,12 @@ func (bp *pickerWrapper) pick(ctx context.Context, failfast bool, opts balancer. } } -func (bp *pickerWrapper) close() { - bp.mu.Lock() - defer bp.mu.Unlock() - if bp.done { +func (pw *pickerWrapper) close() { + pw.mu.Lock() + defer pw.mu.Unlock() + if pw.done { return } - bp.done = true - close(bp.blockingCh) + pw.done = true + close(pw.blockingCh) } diff --git a/vendor/google.golang.org/grpc/pickfirst.go b/vendor/google.golang.org/grpc/pickfirst.go index ed05b02ed96..c43dac9ad84 100644 --- a/vendor/google.golang.org/grpc/pickfirst.go +++ b/vendor/google.golang.org/grpc/pickfirst.go @@ -19,12 +19,14 @@ package grpc import ( - "context" + "errors" "google.golang.org/grpc/balancer" + "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/status" ) // PickFirstBalancerName is the name of the pick_first balancer. @@ -45,35 +47,67 @@ func (*pickfirstBuilder) Name() string { } type pickfirstBalancer struct { - cc balancer.ClientConn - sc balancer.SubConn + state connectivity.State + cc balancer.ClientConn + sc balancer.SubConn } +var _ balancer.V2Balancer = &pickfirstBalancer{} // Assert we implement v2 + func (b *pickfirstBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error) { if err != nil { - if grpclog.V(2) { - grpclog.Infof("pickfirstBalancer: HandleResolvedAddrs called with error %v", err) - } + b.ResolverError(err) return } + b.UpdateClientConnState(balancer.ClientConnState{ResolverState: resolver.State{Addresses: addrs}}) // Ignore error +} + +func (b *pickfirstBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connectivity.State) { + b.UpdateSubConnState(sc, balancer.SubConnState{ConnectivityState: s}) +} + +func (b *pickfirstBalancer) ResolverError(err error) { + switch b.state { + case connectivity.TransientFailure, connectivity.Idle, connectivity.Connecting: + // Set a failing picker if we don't have a good picker. + b.cc.UpdateState(balancer.State{ConnectivityState: connectivity.TransientFailure, + Picker: &picker{err: status.Errorf(codes.Unavailable, "name resolver error: %v", err)}}, + ) + } + if grpclog.V(2) { + grpclog.Infof("pickfirstBalancer: ResolverError called with error %v", err) + } +} + +func (b *pickfirstBalancer) UpdateClientConnState(cs balancer.ClientConnState) error { + if len(cs.ResolverState.Addresses) == 0 { + b.ResolverError(errors.New("produced zero addresses")) + return balancer.ErrBadResolverState + } if b.sc == nil { - b.sc, err = b.cc.NewSubConn(addrs, balancer.NewSubConnOptions{}) + var err error + b.sc, err = b.cc.NewSubConn(cs.ResolverState.Addresses, balancer.NewSubConnOptions{}) if err != nil { - //TODO(yuxuanli): why not change the cc state to Idle? if grpclog.V(2) { grpclog.Errorf("pickfirstBalancer: failed to NewSubConn: %v", err) } - return + b.state = connectivity.TransientFailure + b.cc.UpdateState(balancer.State{ConnectivityState: connectivity.TransientFailure, + Picker: &picker{err: status.Errorf(codes.Unavailable, "error creating connection: %v", err)}}, + ) + return balancer.ErrBadResolverState } - b.cc.UpdateBalancerState(connectivity.Idle, &picker{sc: b.sc}) + b.state = connectivity.Idle + b.cc.UpdateState(balancer.State{ConnectivityState: connectivity.Idle, Picker: &picker{result: balancer.PickResult{SubConn: b.sc}}}) b.sc.Connect() } else { - b.sc.UpdateAddresses(addrs) + b.sc.UpdateAddresses(cs.ResolverState.Addresses) b.sc.Connect() } + return nil } -func (b *pickfirstBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connectivity.State) { +func (b *pickfirstBalancer) UpdateSubConnState(sc balancer.SubConn, s balancer.SubConnState) { if grpclog.V(2) { grpclog.Infof("pickfirstBalancer: HandleSubConnStateChange: %p, %v", sc, s) } @@ -83,18 +117,28 @@ func (b *pickfirstBalancer) HandleSubConnStateChange(sc balancer.SubConn, s conn } return } - if s == connectivity.Shutdown { + b.state = s.ConnectivityState + if s.ConnectivityState == connectivity.Shutdown { b.sc = nil return } - switch s { + switch s.ConnectivityState { case connectivity.Ready, connectivity.Idle: - b.cc.UpdateBalancerState(s, &picker{sc: sc}) + b.cc.UpdateState(balancer.State{ConnectivityState: s.ConnectivityState, Picker: &picker{result: balancer.PickResult{SubConn: sc}}}) case connectivity.Connecting: - b.cc.UpdateBalancerState(s, &picker{err: balancer.ErrNoSubConnAvailable}) + b.cc.UpdateState(balancer.State{ConnectivityState: s.ConnectivityState, Picker: &picker{err: balancer.ErrNoSubConnAvailable}}) case connectivity.TransientFailure: - b.cc.UpdateBalancerState(s, &picker{err: balancer.ErrTransientFailure}) + err := balancer.ErrTransientFailure + // TODO: this can be unconditional after the V1 API is removed, as + // SubConnState will always contain a connection error. + if s.ConnectionError != nil { + err = balancer.TransientFailureError(s.ConnectionError) + } + b.cc.UpdateState(balancer.State{ + ConnectivityState: s.ConnectivityState, + Picker: &picker{err: err}, + }) } } @@ -102,15 +146,12 @@ func (b *pickfirstBalancer) Close() { } type picker struct { - err error - sc balancer.SubConn + result balancer.PickResult + err error } -func (p *picker) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) { - if p.err != nil { - return nil, nil, p.err - } - return p.sc, nil, nil +func (p *picker) Pick(info balancer.PickInfo) (balancer.PickResult, error) { + return p.result, p.err } func init() { diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index e83da346a5c..fe14b2fb982 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -21,6 +21,11 @@ package resolver import ( + "context" + "net" + + "google.golang.org/grpc/attributes" + "google.golang.org/grpc/credentials" "google.golang.org/grpc/serviceconfig" ) @@ -69,12 +74,18 @@ func GetDefaultScheme() string { } // AddressType indicates the address type returned by name resolution. +// +// Deprecated: use Attributes in Address instead. type AddressType uint8 const ( // Backend indicates the address is for a backend server. + // + // Deprecated: use Attributes in Address instead. Backend AddressType = iota // GRPCLB indicates the address is for a grpclb load balancer. + // + // Deprecated: use Attributes in Address instead. GRPCLB ) @@ -83,33 +94,75 @@ const ( type Address struct { // Addr is the server address on which a connection will be established. Addr string - // Type is the type of this address. - Type AddressType + // ServerName is the name of this address. + // If non-empty, the ServerName is used as the transport certification authority for + // the address, instead of the hostname from the Dial target string. In most cases, + // this should not be set. // - // e.g. if Type is GRPCLB, ServerName should be the name of the remote load + // If Type is GRPCLB, ServerName should be the name of the remote load // balancer, not the name of the backend. + // + // WARNING: ServerName must only be populated with trusted values. It + // is insecure to populate it with data from untrusted inputs since untrusted + // values could be used to bypass the authority checks performed by TLS. ServerName string + + // Attributes contains arbitrary data about this address intended for + // consumption by the load balancing policy. + Attributes *attributes.Attributes + + // Type is the type of this address. + // + // Deprecated: use Attributes instead. + Type AddressType + // Metadata is the information associated with Addr, which may be used // to make load balancing decision. + // + // Deprecated: use Attributes instead. Metadata interface{} } -// BuildOption includes additional information for the builder to create +// BuildOptions includes additional information for the builder to create // the resolver. -type BuildOption struct { - // DisableServiceConfig indicates whether resolver should fetch service config data. +type BuildOptions struct { + // DisableServiceConfig indicates whether a resolver implementation should + // fetch service config data. DisableServiceConfig bool + // DialCreds is the transport credentials used by the ClientConn for + // communicating with the target gRPC service (set via + // WithTransportCredentials). In cases where a name resolution service + // requires the same credentials, the resolver may use this field. In most + // cases though, it is not appropriate, and this field may be ignored. + DialCreds credentials.TransportCredentials + // CredsBundle is the credentials bundle used by the ClientConn for + // communicating with the target gRPC service (set via + // WithCredentialsBundle). In cases where a name resolution service + // requires the same credentials, the resolver may use this field. In most + // cases though, it is not appropriate, and this field may be ignored. + CredsBundle credentials.Bundle + // Dialer is the custom dialer used by the ClientConn for dialling the + // target gRPC service (set via WithDialer). In cases where a name + // resolution service requires the same dialer, the resolver may use this + // field. In most cases though, it is not appropriate, and this field may + // be ignored. + Dialer func(context.Context, string) (net.Conn, error) } // State contains the current Resolver state relevant to the ClientConn. type State struct { - Addresses []Address // Resolved addresses for the target - // ServiceConfig is the parsed service config; obtained from - // serviceconfig.Parse. - ServiceConfig serviceconfig.Config + // Addresses is the latest set of resolved addresses for the target. + Addresses []Address + + // ServiceConfig contains the result from parsing the latest service + // config. If it is nil, it indicates no service config is present or the + // resolver does not provide service configs. + ServiceConfig *serviceconfig.ParseResult - // TODO: add Err error + // Attributes contains arbitrary data about the resolver intended for + // consumption by the load balancing policy. + Attributes *attributes.Attributes } // ClientConn contains the callbacks for resolver to notify any updates @@ -122,6 +175,10 @@ type State struct { type ClientConn interface { // UpdateState updates the state of the ClientConn appropriately. UpdateState(State) + // ReportError notifies the ClientConn that the Resolver encountered an + // error. The ClientConn will notify the load balancer and begin calling + // ResolveNow on the Resolver with exponential backoff. + ReportError(error) // NewAddress is called by resolver to notify ClientConn a new list // of resolved addresses. // The address list should be the complete list of resolved addresses. @@ -133,6 +190,9 @@ type ClientConn interface { // // Deprecated: Use UpdateState instead. NewServiceConfig(serviceConfig string) + // ParseServiceConfig parses the provided service config and returns an + // object that provides the parsed config. + ParseServiceConfig(serviceConfigJSON string) *serviceconfig.ParseResult } // Target represents a target for gRPC, as specified in: @@ -164,14 +224,14 @@ type Builder interface { // // gRPC dial calls Build synchronously, and fails if the returned error is // not nil. - Build(target Target, cc ClientConn, opts BuildOption) (Resolver, error) + Build(target Target, cc ClientConn, opts BuildOptions) (Resolver, error) // Scheme returns the scheme supported by this resolver. // Scheme is defined at https://github.com/grpc/grpc/blob/master/doc/naming.md. Scheme() string } -// ResolveNowOption includes additional information for ResolveNow. -type ResolveNowOption struct{} +// ResolveNowOptions includes additional information for ResolveNow. +type ResolveNowOptions struct{} // Resolver watches for the updates on the specified target. // Updates include address updates and service config updates. @@ -180,7 +240,7 @@ type Resolver interface { // again. It's just a hint, resolver can ignore this if it's not necessary. // // It could be called multiple times concurrently. - ResolveNow(ResolveNowOption) + ResolveNow(ResolveNowOptions) // Close closes the resolver. Close() } diff --git a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go index 6934905b0f6..3eaf724cd6d 100644 --- a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go +++ b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go @@ -21,22 +21,29 @@ package grpc import ( "fmt" "strings" - "sync/atomic" + "sync" + "time" + "google.golang.org/grpc/balancer" + "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal/channelz" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/serviceconfig" ) // ccResolverWrapper is a wrapper on top of cc for resolvers. -// It implements resolver.ClientConnection interface. +// It implements resolver.ClientConn interface. type ccResolverWrapper struct { - cc *ClientConn - resolver resolver.Resolver - addrCh chan []resolver.Address - scCh chan string - done uint32 // accessed atomically; set to 1 when closed. - curState resolver.State + cc *ClientConn + resolverMu sync.Mutex + resolver resolver.Resolver + done *grpcsync.Event + curState resolver.State + + pollingMu sync.Mutex + polling chan struct{} } // split2 returns the values from strings.SplitN(s, sep, 2). @@ -67,60 +74,126 @@ func parseTarget(target string) (ret resolver.Target) { return ret } -// newCCResolverWrapper parses cc.target for scheme and gets the resolver -// builder for this scheme and builds the resolver. The monitoring goroutine -// for it is not started yet and can be created by calling start(). -// -// If withResolverBuilder dial option is set, the specified resolver will be -// used instead. -func newCCResolverWrapper(cc *ClientConn) (*ccResolverWrapper, error) { - rb := cc.dopts.resolverBuilder - if rb == nil { - return nil, fmt.Errorf("could not get resolver for scheme: %q", cc.parsedTarget.Scheme) +// newCCResolverWrapper uses the resolver.Builder to build a Resolver and +// returns a ccResolverWrapper object which wraps the newly built resolver. +func newCCResolverWrapper(cc *ClientConn, rb resolver.Builder) (*ccResolverWrapper, error) { + ccr := &ccResolverWrapper{ + cc: cc, + done: grpcsync.NewEvent(), } - ccr := &ccResolverWrapper{ - cc: cc, - addrCh: make(chan []resolver.Address, 1), - scCh: make(chan string, 1), + var credsClone credentials.TransportCredentials + if creds := cc.dopts.copts.TransportCredentials; creds != nil { + credsClone = creds.Clone() + } + rbo := resolver.BuildOptions{ + DisableServiceConfig: cc.dopts.disableServiceConfig, + DialCreds: credsClone, + CredsBundle: cc.dopts.copts.CredsBundle, + Dialer: cc.dopts.copts.Dialer, } var err error - ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, resolver.BuildOption{DisableServiceConfig: cc.dopts.disableServiceConfig}) + // We need to hold the lock here while we assign to the ccr.resolver field + // to guard against a data race caused by the following code path, + // rb.Build-->ccr.ReportError-->ccr.poll-->ccr.resolveNow, would end up + // accessing ccr.resolver which is being assigned here. + ccr.resolverMu.Lock() + defer ccr.resolverMu.Unlock() + ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, rbo) if err != nil { return nil, err } return ccr, nil } -func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOption) { - ccr.resolver.ResolveNow(o) +func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) { + ccr.resolverMu.Lock() + if !ccr.done.HasFired() { + ccr.resolver.ResolveNow(o) + } + ccr.resolverMu.Unlock() } func (ccr *ccResolverWrapper) close() { + ccr.resolverMu.Lock() ccr.resolver.Close() - atomic.StoreUint32(&ccr.done, 1) + ccr.done.Fire() + ccr.resolverMu.Unlock() } -func (ccr *ccResolverWrapper) isDone() bool { - return atomic.LoadUint32(&ccr.done) == 1 +// poll begins or ends asynchronous polling of the resolver based on whether +// err is ErrBadResolverState. +func (ccr *ccResolverWrapper) poll(err error) { + ccr.pollingMu.Lock() + defer ccr.pollingMu.Unlock() + if err != balancer.ErrBadResolverState { + // stop polling + if ccr.polling != nil { + close(ccr.polling) + ccr.polling = nil + } + return + } + if ccr.polling != nil { + // already polling + return + } + p := make(chan struct{}) + ccr.polling = p + go func() { + for i := 0; ; i++ { + ccr.resolveNow(resolver.ResolveNowOptions{}) + t := time.NewTimer(ccr.cc.dopts.resolveNowBackoff(i)) + select { + case <-p: + t.Stop() + return + case <-ccr.done.Done(): + // Resolver has been closed. + t.Stop() + return + case <-t.C: + select { + case <-p: + return + default: + } + // Timer expired; re-resolve. + } + } + }() } func (ccr *ccResolverWrapper) UpdateState(s resolver.State) { - if ccr.isDone() { + if ccr.done.HasFired() { return } grpclog.Infof("ccResolverWrapper: sending update to cc: %v", s) if channelz.IsOn() { ccr.addChannelzTraceEvent(s) } - ccr.cc.updateResolverState(s) ccr.curState = s + ccr.poll(ccr.cc.updateResolverState(ccr.curState, nil)) +} + +func (ccr *ccResolverWrapper) ReportError(err error) { + if ccr.done.HasFired() { + return + } + grpclog.Warningf("ccResolverWrapper: reporting error to cc: %v", err) + if channelz.IsOn() { + channelz.AddTraceEvent(ccr.cc.channelzID, &channelz.TraceEventDesc{ + Desc: fmt.Sprintf("Resolver reported error: %v", err), + Severity: channelz.CtWarning, + }) + } + ccr.poll(ccr.cc.updateResolverState(resolver.State{}, err)) } // NewAddress is called by the resolver implementation to send addresses to gRPC. func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { - if ccr.isDone() { + if ccr.done.HasFired() { return } grpclog.Infof("ccResolverWrapper: sending new addresses to cc: %v", addrs) @@ -128,31 +201,53 @@ func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { ccr.addChannelzTraceEvent(resolver.State{Addresses: addrs, ServiceConfig: ccr.curState.ServiceConfig}) } ccr.curState.Addresses = addrs - ccr.cc.updateResolverState(ccr.curState) + ccr.poll(ccr.cc.updateResolverState(ccr.curState, nil)) } // NewServiceConfig is called by the resolver implementation to send service // configs to gRPC. func (ccr *ccResolverWrapper) NewServiceConfig(sc string) { - if ccr.isDone() { + if ccr.done.HasFired() { return } grpclog.Infof("ccResolverWrapper: got new service config: %v", sc) - c, err := parseServiceConfig(sc) - if err != nil { + if ccr.cc.dopts.disableServiceConfig { + grpclog.Infof("Service config lookups disabled; ignoring config") + return + } + scpr := parseServiceConfig(sc) + if scpr.Err != nil { + grpclog.Warningf("ccResolverWrapper: error parsing service config: %v", scpr.Err) + if channelz.IsOn() { + channelz.AddTraceEvent(ccr.cc.channelzID, &channelz.TraceEventDesc{ + Desc: fmt.Sprintf("Error parsing service config: %v", scpr.Err), + Severity: channelz.CtWarning, + }) + } + ccr.poll(balancer.ErrBadResolverState) return } if channelz.IsOn() { - ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: c}) + ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: scpr}) } - ccr.curState.ServiceConfig = c - ccr.cc.updateResolverState(ccr.curState) + ccr.curState.ServiceConfig = scpr + ccr.poll(ccr.cc.updateResolverState(ccr.curState, nil)) +} + +func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult { + return parseServiceConfig(scJSON) } func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { var updates []string - oldSC, oldOK := ccr.curState.ServiceConfig.(*ServiceConfig) - newSC, newOK := s.ServiceConfig.(*ServiceConfig) + var oldSC, newSC *ServiceConfig + var oldOK, newOK bool + if ccr.curState.ServiceConfig != nil { + oldSC, oldOK = ccr.curState.ServiceConfig.Config.(*ServiceConfig) + } + if s.ServiceConfig != nil { + newSC, newOK = s.ServiceConfig.Config.(*ServiceConfig) + } if oldOK != newOK || (oldOK && newOK && oldSC.rawJSONString != newSC.rawJSONString) { updates = append(updates, "service config updated") } diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 088c3f1b252..d3a4adc5ee6 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -648,35 +648,58 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei return nil, st.Err() } + var size int if pf == compressionMade { // To match legacy behavior, if the decompressor is set by WithDecompressor or RPCDecompressor, // use this decompressor as the default. if dc != nil { d, err = dc.Do(bytes.NewReader(d)) - if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) - } + size = len(d) } else { - dcReader, err := compressor.Decompress(bytes.NewReader(d)) - if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) - } - // Read from LimitReader with limit max+1. So if the underlying - // reader is over limit, the result will be bigger than max. - d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) - if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) - } + d, size, err = decompress(compressor, d, maxReceiveMessageSize) } + if err != nil { + return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) + } + } else { + size = len(d) } - if len(d) > maxReceiveMessageSize { + if size > maxReceiveMessageSize { // TODO: Revisit the error code. Currently keep it consistent with java // implementation. - return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", len(d), maxReceiveMessageSize) + return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", size, maxReceiveMessageSize) } return d, nil } +// Using compressor, decompress d, returning data and size. +// Optionally, if data will be over maxReceiveMessageSize, just return the size. +func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize int) ([]byte, int, error) { + dcReader, err := compressor.Decompress(bytes.NewReader(d)) + if err != nil { + return nil, 0, err + } + if sizer, ok := compressor.(interface { + DecompressedSize(compressedBytes []byte) int + }); ok { + if size := sizer.DecompressedSize(d); size >= 0 { + if size > maxReceiveMessageSize { + return nil, size, nil + } + // size is used as an estimate to size the buffer, but we + // will read more data if available. + // +MinRead so ReadFrom will not reallocate if size is correct. + buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead)) + bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + return buf.Bytes(), int(bytesRead), err + } + } + // Read from LimitReader with limit max+1. So if the underlying + // reader is over limit, the result will be bigger than max. + d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + return d, len(d), err +} + // For the two compressor parameters, both should not be set, but if they are, // dc takes precedence over compressor. // TODO(dfawley): wrap the old compressor/decompressor using the new API? @@ -848,7 +871,7 @@ type channelzData struct { // The SupportPackageIsVersion variables are referenced from generated protocol // buffer files to ensure compatibility with the gRPC version used. The latest -// support package version is 5. +// support package version is 6. // // Older versions are kept for compatibility. They may be removed if // compatibility cannot be maintained. @@ -858,6 +881,7 @@ const ( SupportPackageIsVersion3 = true SupportPackageIsVersion4 = true SupportPackageIsVersion5 = true + SupportPackageIsVersion6 = true ) const grpcUA = "grpc-go/" + Version diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index f064b73e555..0d75cb109a0 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -130,6 +130,7 @@ type serverOptions struct { readBufferSize int connectionTimeout time.Duration maxHeaderListSize *uint32 + headerTableSize *uint32 } var defaultServerOptions = serverOptions{ @@ -343,8 +344,8 @@ func StatsHandler(h stats.Handler) ServerOption { // unknown service handler. The provided method is a bidi-streaming RPC service // handler that will be invoked instead of returning the "unimplemented" gRPC // error whenever a request is received for an unregistered service or method. -// The handling function has full access to the Context of the request and the -// stream, and the invocation bypasses interceptors. +// The handling function and stream interceptor (if set) have full access to +// the ServerStream, including its Context. func UnknownServiceHandler(streamHandler StreamHandler) ServerOption { return newFuncServerOption(func(o *serverOptions) { o.unknownStreamDesc = &StreamDesc{ @@ -377,6 +378,16 @@ func MaxHeaderListSize(s uint32) ServerOption { }) } +// HeaderTableSize returns a ServerOption that sets the size of dynamic +// header table for stream. +// +// This API is EXPERIMENTAL. +func HeaderTableSize(s uint32) ServerOption { + return newFuncServerOption(func(o *serverOptions) { + o.headerTableSize = &s + }) +} + // NewServer creates a gRPC server which has no service registered and has not // started to accept requests yet. func NewServer(opt ...ServerOption) *Server { @@ -686,6 +697,7 @@ func (s *Server) newHTTP2Transport(c net.Conn, authInfo credentials.AuthInfo) tr ReadBufferSize: s.opts.readBufferSize, ChannelzParentID: s.channelzID, MaxHeaderListSize: s.opts.maxHeaderListSize, + HeaderTableSize: s.opts.headerTableSize, } st, err := transport.NewServerTransport("http2", c, config) if err != nil { @@ -853,41 +865,58 @@ func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Str } func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, md *MethodDesc, trInfo *traceInfo) (err error) { - if channelz.IsOn() { - s.incrCallsStarted() - defer func() { - if err != nil && err != io.EOF { - s.incrCallsFailed() - } else { - s.incrCallsSucceeded() - } - }() - } sh := s.opts.statsHandler - if sh != nil { - beginTime := time.Now() - begin := &stats.Begin{ - BeginTime: beginTime, + if sh != nil || trInfo != nil || channelz.IsOn() { + if channelz.IsOn() { + s.incrCallsStarted() } - sh.HandleRPC(stream.Context(), begin) - defer func() { - end := &stats.End{ + var statsBegin *stats.Begin + if sh != nil { + beginTime := time.Now() + statsBegin = &stats.Begin{ BeginTime: beginTime, - EndTime: time.Now(), - } - if err != nil && err != io.EOF { - end.Error = toRPCErr(err) } - sh.HandleRPC(stream.Context(), end) - }() - } - if trInfo != nil { - defer trInfo.tr.Finish() - trInfo.tr.LazyLog(&trInfo.firstLine, false) + sh.HandleRPC(stream.Context(), statsBegin) + } + if trInfo != nil { + trInfo.tr.LazyLog(&trInfo.firstLine, false) + } + // The deferred error handling for tracing, stats handler and channelz are + // combined into one function to reduce stack usage -- a defer takes ~56-64 + // bytes on the stack, so overflowing the stack will require a stack + // re-allocation, which is expensive. + // + // To maintain behavior similar to separate deferred statements, statements + // should be executed in the reverse order. That is, tracing first, stats + // handler second, and channelz last. Note that panics *within* defers will + // lead to different behavior, but that's an acceptable compromise; that + // would be undefined behavior territory anyway. defer func() { - if err != nil && err != io.EOF { - trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) - trInfo.tr.SetError() + if trInfo != nil { + if err != nil && err != io.EOF { + trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + trInfo.tr.SetError() + } + trInfo.tr.Finish() + } + + if sh != nil { + end := &stats.End{ + BeginTime: statsBegin.BeginTime, + EndTime: time.Now(), + } + if err != nil && err != io.EOF { + end.Error = toRPCErr(err) + } + sh.HandleRPC(stream.Context(), end) + } + + if channelz.IsOn() { + if err != nil && err != io.EOF { + s.incrCallsFailed() + } else { + s.incrCallsSucceeded() + } } }() } @@ -1087,31 +1116,15 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transport.Stream, srv *service, sd *StreamDesc, trInfo *traceInfo) (err error) { if channelz.IsOn() { s.incrCallsStarted() - defer func() { - if err != nil && err != io.EOF { - s.incrCallsFailed() - } else { - s.incrCallsSucceeded() - } - }() } sh := s.opts.statsHandler + var statsBegin *stats.Begin if sh != nil { beginTime := time.Now() - begin := &stats.Begin{ + statsBegin = &stats.Begin{ BeginTime: beginTime, } - sh.HandleRPC(stream.Context(), begin) - defer func() { - end := &stats.End{ - BeginTime: beginTime, - EndTime: time.Now(), - } - if err != nil && err != io.EOF { - end.Error = toRPCErr(err) - } - sh.HandleRPC(stream.Context(), end) - }() + sh.HandleRPC(stream.Context(), statsBegin) } ctx := NewContextWithServerTransportStream(stream.Context(), stream) ss := &serverStream{ @@ -1126,6 +1139,41 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp statsHandler: sh, } + if sh != nil || trInfo != nil || channelz.IsOn() { + // See comment in processUnaryRPC on defers. + defer func() { + if trInfo != nil { + ss.mu.Lock() + if err != nil && err != io.EOF { + ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) + ss.trInfo.tr.SetError() + } + ss.trInfo.tr.Finish() + ss.trInfo.tr = nil + ss.mu.Unlock() + } + + if sh != nil { + end := &stats.End{ + BeginTime: statsBegin.BeginTime, + EndTime: time.Now(), + } + if err != nil && err != io.EOF { + end.Error = toRPCErr(err) + } + sh.HandleRPC(stream.Context(), end) + } + + if channelz.IsOn() { + if err != nil && err != io.EOF { + s.incrCallsFailed() + } else { + s.incrCallsSucceeded() + } + } + }() + } + ss.binlog = binarylog.GetMethodLogger(stream.Method()) if ss.binlog != nil { md, _ := metadata.FromIncomingContext(ctx) @@ -1179,16 +1227,6 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp if trInfo != nil { trInfo.tr.LazyLog(&trInfo.firstLine, false) - defer func() { - ss.mu.Lock() - if err != nil && err != io.EOF { - ss.trInfo.tr.LazyLog(&fmtStringer{"%v", []interface{}{err}}, true) - ss.trInfo.tr.SetError() - } - ss.trInfo.tr.Finish() - ss.trInfo.tr = nil - ss.mu.Unlock() - }() } var appErr error var server interface{} diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index d0787f1e2a1..5a80a575a5e 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -136,9 +136,9 @@ type retryPolicy struct { maxAttempts int // Exponential backoff parameters. The initial retry attempt will occur at - // random(0, initialBackoffMS). In general, the nth attempt will occur at + // random(0, initialBackoff). In general, the nth attempt will occur at // random(0, - // min(initialBackoffMS*backoffMultiplier**(n-1), maxBackoffMS)). + // min(initialBackoff*backoffMultiplier**(n-1), maxBackoff)). // // These fields are required and must be greater than zero. initialBackoff time.Duration @@ -261,20 +261,17 @@ type jsonSC struct { } func init() { - internal.ParseServiceConfig = func(sc string) (interface{}, error) { - return parseServiceConfig(sc) - } + internal.ParseServiceConfigForTesting = parseServiceConfig } - -func parseServiceConfig(js string) (*ServiceConfig, error) { +func parseServiceConfig(js string) *serviceconfig.ParseResult { if len(js) == 0 { - return nil, fmt.Errorf("no JSON service config provided") + return &serviceconfig.ParseResult{Err: fmt.Errorf("no JSON service config provided")} } var rsc jsonSC err := json.Unmarshal([]byte(js), &rsc) if err != nil { grpclog.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return nil, err + return &serviceconfig.ParseResult{Err: err} } sc := ServiceConfig{ LB: rsc.LoadBalancingPolicy, @@ -288,7 +285,7 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { if len(lbcfg) != 1 { err := fmt.Errorf("invalid loadBalancingConfig: entry %v does not contain exactly 1 policy/config pair: %q", i, lbcfg) grpclog.Warningf(err.Error()) - return nil, err + return &serviceconfig.ParseResult{Err: err} } var name string var jsonCfg json.RawMessage @@ -303,17 +300,25 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { var err error sc.lbConfig.cfg, err = parser.ParseConfig(jsonCfg) if err != nil { - return nil, fmt.Errorf("error parsing loadBalancingConfig for policy %q: %v", name, err) + return &serviceconfig.ParseResult{Err: fmt.Errorf("error parsing loadBalancingConfig for policy %q: %v", name, err)} } } else if string(jsonCfg) != "{}" { grpclog.Warningf("non-empty balancer configuration %q, but balancer does not implement ParseConfig", string(jsonCfg)) } break } + if sc.lbConfig == nil { + // We had a loadBalancingConfig field but did not encounter a + // supported policy. The config is considered invalid in this + // case. + err := fmt.Errorf("invalid loadBalancingConfig: no supported policies found") + grpclog.Warningf(err.Error()) + return &serviceconfig.ParseResult{Err: err} + } } if rsc.MethodConfig == nil { - return &sc, nil + return &serviceconfig.ParseResult{Config: &sc} } for _, m := range *rsc.MethodConfig { if m.Name == nil { @@ -322,7 +327,7 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { d, err := parseDuration(m.Timeout) if err != nil { grpclog.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return nil, err + return &serviceconfig.ParseResult{Err: err} } mc := MethodConfig{ @@ -331,7 +336,7 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { } if mc.retryPolicy, err = convertRetryPolicy(m.RetryPolicy); err != nil { grpclog.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return nil, err + return &serviceconfig.ParseResult{Err: err} } if m.MaxRequestMessageBytes != nil { if *m.MaxRequestMessageBytes > int64(maxInt) { @@ -356,13 +361,13 @@ func parseServiceConfig(js string) (*ServiceConfig, error) { if sc.retryThrottling != nil { if mt := sc.retryThrottling.MaxTokens; mt <= 0 || mt > 1000 { - return nil, fmt.Errorf("invalid retry throttling config: maxTokens (%v) out of range (0, 1000]", mt) + return &serviceconfig.ParseResult{Err: fmt.Errorf("invalid retry throttling config: maxTokens (%v) out of range (0, 1000]", mt)} } if tr := sc.retryThrottling.TokenRatio; tr <= 0 { - return nil, fmt.Errorf("invalid retry throttling config: tokenRatio (%v) may not be negative", tr) + return &serviceconfig.ParseResult{Err: fmt.Errorf("invalid retry throttling config: tokenRatio (%v) may not be negative", tr)} } } - return &sc, nil + return &serviceconfig.ParseResult{Config: &sc} } func convertRetryPolicy(jrp *jsonRetryPolicy) (p *retryPolicy, err error) { diff --git a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go index 53b27875a1a..187c304421c 100644 --- a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go @@ -22,27 +22,20 @@ // This package is EXPERIMENTAL. package serviceconfig -import ( - "google.golang.org/grpc/internal" -) - // Config represents an opaque data structure holding a service config. type Config interface { - isConfig() + isServiceConfig() } // LoadBalancingConfig represents an opaque data structure holding a load -// balancer config. +// balancing config. type LoadBalancingConfig interface { isLoadBalancingConfig() } -// Parse parses the JSON service config provided into an internal form or -// returns an error if the config is invalid. -func Parse(ServiceConfigJSON string) (Config, error) { - c, err := internal.ParseServiceConfig(ServiceConfigJSON) - if err != nil { - return nil, err - } - return c.(Config), err +// ParseResult contains a service config or an error. Exactly one must be +// non-nil. +type ParseResult struct { + Config Config + Err error } diff --git a/vendor/google.golang.org/grpc/stats/stats.go b/vendor/google.golang.org/grpc/stats/stats.go index f3f593c8443..9e22c393f16 100644 --- a/vendor/google.golang.org/grpc/stats/stats.go +++ b/vendor/google.golang.org/grpc/stats/stats.go @@ -91,6 +91,8 @@ type InHeader struct { LocalAddr net.Addr // Compression is the compression algorithm used for the RPC. Compression string + // Header contains the header metadata received. + Header metadata.MD } // IsClient indicates if the stats information is from client side. @@ -104,6 +106,9 @@ type InTrailer struct { Client bool // WireLength is the wire length of trailer. WireLength int + // Trailer contains the trailer metadata received from the server. This + // field is only valid if this InTrailer is from the client side. + Trailer metadata.MD } // IsClient indicates if the stats information is from client side. @@ -146,6 +151,8 @@ type OutHeader struct { LocalAddr net.Addr // Compression is the compression algorithm used for the RPC. Compression string + // Header contains the header metadata sent. + Header metadata.MD } // IsClient indicates if this stats information is from client side. @@ -159,6 +166,9 @@ type OutTrailer struct { Client bool // WireLength is the wire length of trailer. WireLength int + // Trailer contains the trailer metadata sent to the client. This + // field is only valid if this OutTrailer is from the server side. + Trailer metadata.MD } // IsClient indicates if this stats information is from client side. @@ -176,6 +186,7 @@ type End struct { EndTime time.Time // Trailer contains the trailer metadata received from the server. This // field is only valid if this End is from the client side. + // Deprecated: use Trailer in InTrailer instead. Trailer metadata.MD // Error is the error the RPC ended with. It is an error generated from // status.Status and can be converted back to status.Status using diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 134a624a15d..bb99940e36f 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -488,7 +488,7 @@ func (cs *clientStream) shouldRetry(err error) error { pushback := 0 hasPushback := false if cs.attempt.s != nil { - if to, toErr := cs.attempt.s.TrailersOnly(); toErr != nil || !to { + if !cs.attempt.s.TrailersOnly() { return err } diff --git a/vendor/google.golang.org/grpc/test/bufconn/bufconn.go b/vendor/google.golang.org/grpc/test/bufconn/bufconn.go index 60ae770f54e..168cdb8578d 100644 --- a/vendor/google.golang.org/grpc/test/bufconn/bufconn.go +++ b/vendor/google.golang.org/grpc/test/bufconn/bufconn.go @@ -37,7 +37,16 @@ type Listener struct { done chan struct{} } +// Implementation of net.Error providing timeout +type netErrorTimeout struct { + error +} + +func (e netErrorTimeout) Timeout() bool { return true } +func (e netErrorTimeout) Temporary() bool { return false } + var errClosed = fmt.Errorf("closed") +var errTimeout net.Error = netErrorTimeout{error: fmt.Errorf("i/o timeout")} // Listen returns a Listener that can only be contacted by its own Dialers and // creates buffered connections between the two. @@ -104,6 +113,13 @@ type pipe struct { wwait sync.Cond rwait sync.Cond + // Indicate that a write/read timeout has occurred + wtimedout bool + rtimedout bool + + wtimer *time.Timer + rtimer *time.Timer + closed bool writeClosed bool } @@ -112,6 +128,9 @@ func newPipe(sz int) *pipe { p := &pipe{buf: make([]byte, 0, sz)} p.wwait.L = &p.mu p.rwait.L = &p.mu + + p.wtimer = time.AfterFunc(0, func() {}) + p.rtimer = time.AfterFunc(0, func() {}) return p } @@ -137,6 +156,10 @@ func (p *pipe) Read(b []byte) (n int, err error) { if p.writeClosed { return 0, io.EOF } + if p.rtimedout { + return 0, errTimeout + } + p.rwait.Wait() } wasFull := p.full() @@ -171,6 +194,10 @@ func (p *pipe) Write(b []byte) (n int, err error) { if !p.full() { break } + if p.wtimedout { + return 0, errTimeout + } + p.wwait.Wait() } wasEmpty := p.empty() @@ -232,11 +259,48 @@ func (c *conn) Close() error { return err2 } -func (*conn) LocalAddr() net.Addr { return addr{} } -func (*conn) RemoteAddr() net.Addr { return addr{} } -func (c *conn) SetDeadline(t time.Time) error { return fmt.Errorf("unsupported") } -func (c *conn) SetReadDeadline(t time.Time) error { return fmt.Errorf("unsupported") } -func (c *conn) SetWriteDeadline(t time.Time) error { return fmt.Errorf("unsupported") } +func (c *conn) SetDeadline(t time.Time) error { + c.SetReadDeadline(t) + c.SetWriteDeadline(t) + return nil +} + +func (c *conn) SetReadDeadline(t time.Time) error { + p := c.Reader.(*pipe) + p.mu.Lock() + defer p.mu.Unlock() + p.rtimer.Stop() + p.rtimedout = false + if !t.IsZero() { + p.rtimer = time.AfterFunc(time.Until(t), func() { + p.mu.Lock() + defer p.mu.Unlock() + p.rtimedout = true + p.rwait.Broadcast() + }) + } + return nil +} + +func (c *conn) SetWriteDeadline(t time.Time) error { + p := c.Writer.(*pipe) + p.mu.Lock() + defer p.mu.Unlock() + p.wtimer.Stop() + p.wtimedout = false + if !t.IsZero() { + p.wtimer = time.AfterFunc(time.Until(t), func() { + p.mu.Lock() + defer p.mu.Unlock() + p.wtimedout = true + p.wwait.Broadcast() + }) + } + return nil +} + +func (*conn) LocalAddr() net.Addr { return addr{} } +func (*conn) RemoteAddr() net.Addr { return addr{} } type addr struct{} diff --git a/vendor/google.golang.org/grpc/trace.go b/vendor/google.golang.org/grpc/trace.go index 0a57b999481..07a2d26b3e7 100644 --- a/vendor/google.golang.org/grpc/trace.go +++ b/vendor/google.golang.org/grpc/trace.go @@ -41,9 +41,6 @@ func methodFamily(m string) string { if i := strings.Index(m, "/"); i >= 0 { m = m[:i] // remove everything from second slash } - if i := strings.LastIndex(m, "."); i >= 0 { - m = m[i+1:] // cut down to last dotted component - } return m } diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 5411a73a22e..1a831b159ab 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.23.0" +const Version = "1.27.1" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index 661e1e1de9b..0e737072781 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -31,12 +31,15 @@ PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" if [[ "$1" = "-install" ]]; then # Check for module support if go help mod >& /dev/null; then + # Install the pinned versions as defined in module tools. + pushd ./test/tools go install \ golang.org/x/lint/golint \ golang.org/x/tools/cmd/goimports \ honnef.co/go/tools/cmd/staticcheck \ github.com/client9/misspell/cmd/misspell \ github.com/golang/protobuf/protoc-gen-go + popd else # Ye olde `go get` incantation. # Note: this gets the latest version of all tools (vs. the pinned versions @@ -67,18 +70,21 @@ elif [[ "$#" -ne 0 ]]; then fi # - Ensure all source files contain a copyright message. -git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | fail_on_output +(! git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go') # - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. (! grep 'func Test[^(]' *_test.go) (! grep 'func Test[^(]' test/*.go) +# - Do not import x/net/context. +(! git grep -l 'x/net/context' -- "*.go") + # - Do not import math/rand for real library code. Use internal/grpcrand for # thread safety. -git ls-files "*.go" | xargs grep -l '"math/rand"' 2>&1 | (! grep -v '^examples\|^stress\|grpcrand\|wrr_test') +git grep -l '"math/rand"' -- "*.go" 2>&1 | (! grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test') # - Ensure all ptypes proto packages are renamed when importing. -git ls-files "*.go" | (! xargs grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/") +(! git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go") # - Check imports that are illegal in appengine (until Go 1.11). # TODO: Remove when we drop Go 1.10 support @@ -86,10 +92,12 @@ go list -f {{.Dir}} ./... | xargs go run test/go_vet/vet.go # - gofmt, goimports, golint (with exceptions for generated code), go vet. gofmt -s -d -l . 2>&1 | fail_on_output -goimports -l . 2>&1 | (! grep -vE "(_mock|\.pb)\.go:") | fail_on_output +goimports -l . 2>&1 | (! grep -vE "(_mock|\.pb)\.go") golint ./... 2>&1 | (! grep -vE "(_mock|\.pb)\.go:") go vet -all . +misspell -error . + # - Check that generated proto files are up to date. if [[ -z "${VET_SKIP_PROTO}" ]]; then PATH="/home/travis/bin:${PATH}" make proto && \ @@ -105,30 +113,47 @@ if go help mod >& /dev/null; then fi # - Collection of static analysis checks -# TODO(dfawley): don't use deprecated functions in examples. -staticcheck -go 1.9 -checks 'inherit,-ST1015' -ignore ' -google.golang.org/grpc/balancer.go:SA1019 -google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go:SA1019 -google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go:SA1019 -google.golang.org/grpc/xds/internal/balancer/edsbalancer/balancergroup.go:SA1019 -google.golang.org/grpc/xds/internal/balancer/xds.go:SA1019 -google.golang.org/grpc/xds/internal/balancer/xds_client.go:SA1019 -google.golang.org/grpc/balancer_conn_wrappers.go:SA1019 -google.golang.org/grpc/balancer_test.go:SA1019 -google.golang.org/grpc/benchmark/benchmain/main.go:SA1019 -google.golang.org/grpc/benchmark/worker/benchmark_client.go:SA1019 -google.golang.org/grpc/clientconn.go:S1024 -google.golang.org/grpc/clientconn_state_transition_test.go:SA1019 -google.golang.org/grpc/clientconn_test.go:SA1019 -google.golang.org/grpc/examples/features/debugging/client/main.go:SA1019 -google.golang.org/grpc/examples/features/load_balancing/client/main.go:SA1019 -google.golang.org/grpc/internal/transport/handler_server.go:SA1019 -google.golang.org/grpc/internal/transport/handler_server_test.go:SA1019 -google.golang.org/grpc/resolver/dns/dns_resolver.go:SA1019 -google.golang.org/grpc/stats/stats_test.go:SA1019 -google.golang.org/grpc/test/balancer_test.go:SA1019 -google.golang.org/grpc/test/channelz_test.go:SA1019 -google.golang.org/grpc/test/end2end_test.go:SA1019 -google.golang.org/grpc/test/healthcheck_test.go:SA1019 -' ./... -misspell -error . +# +# TODO(dfawley): don't use deprecated functions in examples or first-party +# plugins. +SC_OUT="$(mktemp)" +staticcheck -go 1.9 -checks 'inherit,-ST1015' ./... > "${SC_OUT}" || true +# Error if anything other than deprecation warnings are printed. +(! grep -v "is deprecated:.*SA1019" "${SC_OUT}") +# Only ignore the following deprecated types/fields/functions. +(! grep -Fv '.HandleResolvedAddrs +.HandleSubConnStateChange +.HeaderMap +.NewAddress +.NewServiceConfig +.Metadata is deprecated: use Attributes +.Type is deprecated: use Attributes +.UpdateBalancerState +balancer.Picker +grpc.CallCustomCodec +grpc.Code +grpc.Compressor +grpc.Decompressor +grpc.MaxMsgSize +grpc.MethodConfig +grpc.NewGZIPCompressor +grpc.NewGZIPDecompressor +grpc.RPCCompressor +grpc.RPCDecompressor +grpc.RoundRobin +grpc.ServiceConfig +grpc.WithBalancer +grpc.WithBalancerName +grpc.WithCompressor +grpc.WithDecompressor +grpc.WithDialer +grpc.WithMaxMsgSize +grpc.WithServiceConfig +grpc.WithTimeout +http.CloseNotifier +naming.Resolver +naming.Update +naming.Watcher +resolver.Backend +resolver.GRPCLB' "${SC_OUT}" +) diff --git a/vendor/modules.txt b/vendor/modules.txt index 51b591f24ab..62dc29b95fe 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -8,6 +8,8 @@ cloud.google.com/go/internal/version cloud.google.com/go/storage # github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml +# github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157 +github.com/Djarvur/go-err113 # github.com/OpenPeeDeeP/depguard v1.0.1 github.com/OpenPeeDeeP/depguard # github.com/agext/levenshtein v1.2.2 @@ -23,7 +25,7 @@ github.com/apparentlymart/go-cidr/cidr github.com/apparentlymart/go-textseg/textseg # github.com/armon/go-radix v1.0.0 github.com/armon/go-radix -# github.com/aws/aws-sdk-go v1.29.20 +# github.com/aws/aws-sdk-go v1.31.2 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn github.com/aws/aws-sdk-go/aws/awserr @@ -163,6 +165,7 @@ github.com/aws/aws-sdk-go/service/mediastore github.com/aws/aws-sdk-go/service/mediastoredata github.com/aws/aws-sdk-go/service/mq github.com/aws/aws-sdk-go/service/neptune +github.com/aws/aws-sdk-go/service/networkmanager github.com/aws/aws-sdk-go/service/opsworks github.com/aws/aws-sdk-go/service/organizations github.com/aws/aws-sdk-go/service/personalize @@ -175,6 +178,7 @@ github.com/aws/aws-sdk-go/service/rds github.com/aws/aws-sdk-go/service/redshift github.com/aws/aws-sdk-go/service/resourcegroups github.com/aws/aws-sdk-go/service/route53 +github.com/aws/aws-sdk-go/service/route53domains github.com/aws/aws-sdk-go/service/route53resolver github.com/aws/aws-sdk-go/service/s3 github.com/aws/aws-sdk-go/service/s3/internal/arn @@ -197,6 +201,7 @@ github.com/aws/aws-sdk-go/service/storagegateway github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface github.com/aws/aws-sdk-go/service/swf +github.com/aws/aws-sdk-go/service/synthetics github.com/aws/aws-sdk-go/service/transfer github.com/aws/aws-sdk-go/service/waf github.com/aws/aws-sdk-go/service/wafregional @@ -212,13 +217,13 @@ github.com/bflad/gopaniccheck/passes/logpaniccallexpr github.com/bflad/gopaniccheck/passes/logpanicfcallexpr github.com/bflad/gopaniccheck/passes/logpaniclncallexpr github.com/bflad/gopaniccheck/passes/paniccallexpr -# github.com/bflad/tfproviderdocs v0.5.0 +# github.com/bflad/tfproviderdocs v0.6.0 github.com/bflad/tfproviderdocs github.com/bflad/tfproviderdocs/check github.com/bflad/tfproviderdocs/check/sidenavigation github.com/bflad/tfproviderdocs/command github.com/bflad/tfproviderdocs/version -# github.com/bflad/tfproviderlint v0.11.0 +# github.com/bflad/tfproviderlint v0.14.0 github.com/bflad/tfproviderlint/cmd/tfproviderlint github.com/bflad/tfproviderlint/helper/analysisutils github.com/bflad/tfproviderlint/helper/astutils @@ -283,6 +288,9 @@ github.com/bflad/tfproviderlint/passes/S031 github.com/bflad/tfproviderlint/passes/S032 github.com/bflad/tfproviderlint/passes/S033 github.com/bflad/tfproviderlint/passes/S034 +github.com/bflad/tfproviderlint/passes/S035 +github.com/bflad/tfproviderlint/passes/S036 +github.com/bflad/tfproviderlint/passes/S037 github.com/bflad/tfproviderlint/passes/V001 github.com/bflad/tfproviderlint/passes/V002 github.com/bflad/tfproviderlint/passes/V003 @@ -298,8 +306,10 @@ github.com/bflad/tfproviderlint/passes/helper/resource/testmatchresourceattrcall github.com/bflad/tfproviderlint/passes/helper/schema/crudfuncinfo github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatagetchangeassignstmt github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatagetokexistscallexpr +github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialcallexpr github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatapartialselectorexpr github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetcallexpr +github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialcallexpr github.com/bflad/tfproviderlint/passes/helper/schema/resourcedatasetpartialselectorexpr github.com/bflad/tfproviderlint/passes/helper/schema/resourceinfo github.com/bflad/tfproviderlint/passes/helper/schema/resourceinfodatasourceonly @@ -310,7 +320,9 @@ github.com/bflad/tfproviderlint/passes/helper/schema/schemainfocomputedonly github.com/bflad/tfproviderlint/passes/helper/schema/schemamapcompositelit github.com/bflad/tfproviderlint/passes/helper/schema/schemavalidatefuncinfo github.com/bflad/tfproviderlint/passes/helper/validation/cidrnetworkselectorexpr +github.com/bflad/tfproviderlint/passes/helper/validation/iprangecallexpr github.com/bflad/tfproviderlint/passes/helper/validation/iprangeselectorexpr +github.com/bflad/tfproviderlint/passes/helper/validation/singleipcallexpr github.com/bflad/tfproviderlint/passes/helper/validation/singleipselectorexpr github.com/bflad/tfproviderlint/passes/helper/validation/validatejsonstringselectorexpr github.com/bflad/tfproviderlint/passes/helper/validation/validatelistuniquestringsselectorexpr @@ -331,8 +343,8 @@ github.com/bgentry/go-netrc/netrc github.com/bgentry/speakeasy # github.com/bmatcuk/doublestar v1.2.1 github.com/bmatcuk/doublestar -# github.com/bombsimon/wsl/v2 v2.0.0 -github.com/bombsimon/wsl/v2 +# github.com/bombsimon/wsl/v3 v3.0.0 +github.com/bombsimon/wsl/v3 # github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc github.com/boombuler/barcode github.com/boombuler/barcode/qr @@ -379,7 +391,7 @@ github.com/gobwas/glob/util/strings github.com/gofrs/flock # github.com/gogo/protobuf v1.2.1 github.com/gogo/protobuf/proto -# github.com/golang/protobuf v1.3.2 +# github.com/golang/protobuf v1.3.4 github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go/descriptor github.com/golang/protobuf/ptypes @@ -410,7 +422,7 @@ github.com/golangci/gocyclo/pkg/gocyclo # github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a github.com/golangci/gofmt/gofmt github.com/golangci/gofmt/goimports -# github.com/golangci/golangci-lint v1.23.8 +# github.com/golangci/golangci-lint v1.26.0 github.com/golangci/golangci-lint/cmd/golangci-lint github.com/golangci/golangci-lint/internal/cache github.com/golangci/golangci-lint/internal/errorutil @@ -424,6 +436,7 @@ github.com/golangci/golangci-lint/pkg/fsutils github.com/golangci/golangci-lint/pkg/golinters github.com/golangci/golangci-lint/pkg/golinters/goanalysis github.com/golangci/golangci-lint/pkg/golinters/goanalysis/load +github.com/golangci/golangci-lint/pkg/golinters/nolintlint github.com/golangci/golangci-lint/pkg/goutil github.com/golangci/golangci-lint/pkg/lint github.com/golangci/golangci-lint/pkg/lint/linter @@ -514,9 +527,9 @@ github.com/hashicorp/hcl/v2/json github.com/hashicorp/logutils # github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 github.com/hashicorp/terraform-config-inspect/tfconfig -# github.com/hashicorp/terraform-json v0.4.0 +# github.com/hashicorp/terraform-json v0.5.0 github.com/hashicorp/terraform-json -# github.com/hashicorp/terraform-plugin-sdk v1.7.0 +# github.com/hashicorp/terraform-plugin-sdk v1.13.1 github.com/hashicorp/terraform-plugin-sdk/acctest github.com/hashicorp/terraform-plugin-sdk/helper/acctest github.com/hashicorp/terraform-plugin-sdk/helper/customdiff @@ -568,7 +581,7 @@ github.com/hashicorp/terraform-plugin-sdk/internal/version github.com/hashicorp/terraform-plugin-sdk/meta github.com/hashicorp/terraform-plugin-sdk/plugin github.com/hashicorp/terraform-plugin-sdk/terraform -# github.com/hashicorp/terraform-plugin-test v1.2.0 +# github.com/hashicorp/terraform-plugin-test v1.3.0 github.com/hashicorp/terraform-plugin-test # github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 github.com/hashicorp/terraform-svchost @@ -588,7 +601,7 @@ github.com/jen20/awspolicyequivalence github.com/jingyugao/rowserrcheck/passes/rowserr # github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3 github.com/jirfag/go-printf-func-name/pkg/analyzer -# github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af +# github.com/jmespath/go-jmespath v0.3.0 github.com/jmespath/go-jmespath # github.com/katbyte/terrafmt v0.2.1-0.20200303174203-e6a3e82cb21b github.com/katbyte/terrafmt @@ -616,6 +629,8 @@ github.com/kisielk/gotool/internal/load github.com/konsorten/go-windows-terminal-sequences # github.com/magiconair/properties v1.8.1 github.com/magiconair/properties +# github.com/maratori/testpackage v1.0.1 +github.com/maratori/testpackage/pkg/testpackage # github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb github.com/matoous/godox # github.com/mattn/go-colorable v0.1.4 @@ -638,6 +653,8 @@ github.com/mitchellh/go-wordwrap github.com/mitchellh/mapstructure # github.com/mitchellh/reflectwalk v1.0.1 github.com/mitchellh/reflectwalk +# github.com/nakabonne/nestif v0.3.0 +github.com/nakabonne/nestif # github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d github.com/nbutton23/zxcvbn-go github.com/nbutton23/zxcvbn-go/adjacency @@ -668,7 +685,9 @@ github.com/posener/complete/match github.com/pquerna/otp github.com/pquerna/otp/hotp github.com/pquerna/otp/totp -# github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83 +# github.com/ryancurrah/gomodguard v1.0.4 +github.com/ryancurrah/gomodguard +# github.com/securego/gosec v0.0.0-20200316084457-7da9f46445fd github.com/securego/gosec github.com/securego/gosec/rules # github.com/sergi/go-diff v1.0.0 @@ -692,16 +711,21 @@ github.com/spf13/pflag github.com/spf13/viper # github.com/stretchr/objx v0.2.0 github.com/stretchr/objx -# github.com/stretchr/testify v1.4.0 +# github.com/stretchr/testify v1.5.1 github.com/stretchr/testify/assert github.com/stretchr/testify/mock # github.com/subosito/gotenv v1.2.0 github.com/subosito/gotenv +# github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 +github.com/tdakkota/asciicheck +# github.com/tetafro/godot v0.3.3 +github.com/tetafro/godot # github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e github.com/timakin/bodyclose/passes/bodyclose -# github.com/tommy-muehle/go-mnd v1.1.1 +# github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa github.com/tommy-muehle/go-mnd github.com/tommy-muehle/go-mnd/checks +github.com/tommy-muehle/go-mnd/config # github.com/ulikunitz/xz v0.5.5 github.com/ulikunitz/xz github.com/ulikunitz/xz/internal/hash @@ -761,10 +785,12 @@ golang.org/x/crypto/openpgp/packet golang.org/x/crypto/openpgp/s2k golang.org/x/crypto/poly1305 golang.org/x/crypto/ssh -# golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee +# golang.org/x/mod v0.2.0 +golang.org/x/mod/internal/lazyregexp +golang.org/x/mod/modfile golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.0.0-20200202094626-16171245cfb2 +# golang.org/x/net v0.0.0-20200301022130-244492dfa37a golang.org/x/net/context golang.org/x/net/context/ctxhttp golang.org/x/net/html @@ -781,7 +807,7 @@ golang.org/x/oauth2/google golang.org/x/oauth2/internal golang.org/x/oauth2/jws golang.org/x/oauth2/jwt -# golang.org/x/sys v0.0.0-20191008105621-543471e840be +# golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 golang.org/x/sys/cpu golang.org/x/sys/unix # golang.org/x/text v0.3.2 @@ -790,7 +816,7 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2 +# golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/analysistest golang.org/x/tools/go/analysis/internal/analysisflags @@ -847,12 +873,18 @@ golang.org/x/tools/go/ssa/ssautil golang.org/x/tools/go/types/objectpath golang.org/x/tools/go/types/typeutil golang.org/x/tools/imports +golang.org/x/tools/internal/analysisinternal golang.org/x/tools/internal/fastwalk +golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/gopathwalk golang.org/x/tools/internal/imports +golang.org/x/tools/internal/lsp/diff +golang.org/x/tools/internal/lsp/diff/myers golang.org/x/tools/internal/packagesinternal +golang.org/x/tools/internal/span +golang.org/x/tools/internal/telemetry/event golang.org/x/tools/internal/testenv -# golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 +# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 golang.org/x/xerrors golang.org/x/xerrors/internal # google.golang.org/api v0.9.0 @@ -880,14 +912,16 @@ google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 +# google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/iam/v1 google.golang.org/genproto/googleapis/rpc/code google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/googleapis/type/expr -# google.golang.org/grpc v1.23.0 +# google.golang.org/grpc v1.27.1 google.golang.org/grpc +google.golang.org/grpc/attributes +google.golang.org/grpc/backoff google.golang.org/grpc/balancer google.golang.org/grpc/balancer/base google.golang.org/grpc/balancer/roundrobin @@ -905,10 +939,13 @@ google.golang.org/grpc/internal google.golang.org/grpc/internal/backoff google.golang.org/grpc/internal/balancerload google.golang.org/grpc/internal/binarylog +google.golang.org/grpc/internal/buffer google.golang.org/grpc/internal/channelz google.golang.org/grpc/internal/envconfig google.golang.org/grpc/internal/grpcrand google.golang.org/grpc/internal/grpcsync +google.golang.org/grpc/internal/resolver/dns +google.golang.org/grpc/internal/resolver/passthrough google.golang.org/grpc/internal/syscall google.golang.org/grpc/internal/transport google.golang.org/grpc/keepalive @@ -916,8 +953,6 @@ google.golang.org/grpc/metadata google.golang.org/grpc/naming google.golang.org/grpc/peer google.golang.org/grpc/resolver -google.golang.org/grpc/resolver/dns -google.golang.org/grpc/resolver/passthrough google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status diff --git a/website/allowed-subcategories.txt b/website/allowed-subcategories.txt index 4ea5173fe08..ded3bc6bac6 100644 --- a/website/allowed-subcategories.txt +++ b/website/allowed-subcategories.txt @@ -59,14 +59,15 @@ IAM Inspector IoT KMS -Kinesis Firehose Kinesis +Kinesis Data Analytics v2 (SQL and Java Applications) +Kinesis Firehose Kinesis Video Lambda License Manager Lightsail MQ -Macie +Macie Classic Managed Streaming for Kafka (MSK) MediaConvert MediaPackage @@ -82,6 +83,7 @@ RAM RDS Redshift Resource Groups +Route53 Domains Route53 Resolver Route53 S3 @@ -100,10 +102,13 @@ Shield SimpleDB Step Function (SFN) Storage Gateway +Synthetics Transfer +Transit Gateway Network Manager VPC WAF Regional WAF +WAFv2 WorkLink WorkMail WorkSpaces diff --git a/website/aws.erb b/website/aws.erb index 6522f4e05a2..79349f6b552 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -53,6 +53,9 @@
  • aws_region
  • +
  • + aws_regions +
  • @@ -218,6 +221,39 @@
  • aws_apigatewayv2_api
  • +
  • + aws_apigatewayv2_api_mapping +
  • +
  • + aws_apigatewayv2_authorizer +
  • +
  • + aws_apigatewayv2_deployment +
  • +
  • + aws_apigatewayv2_domain_name +
  • +
  • + aws_apigatewayv2_integration +
  • +
  • + aws_apigatewayv2_integration_response +
  • +
  • + aws_apigatewayv2_model +
  • +
  • + aws_apigatewayv2_route +
  • +
  • + aws_apigatewayv2_route_response +
  • +
  • + aws_apigatewayv2_stage +
  • +
  • + aws_apigatewayv2_vpc_link +
  • @@ -355,6 +391,20 @@
  • Backup